Skip to content

Desktop host conformance

This page defines how a desktop host conforms to the Agent App standard. It is not the product PRD for lime-desktop-platform, and it is not an implementation note for a vertical business app. It only specifies how a desktop host installs, projects, checks, runs, and governs Agent Apps.

Fact-source relationship:

  • agentapp is the fact source for the Agent App standard.
  • lime-desktop-platform is one conforming desktop host implementation.
  • content-studio, zhongcao, and OEM apps are Agent App consumers; lime-desktop-platform/samples/platform-conformance is a host-conformance reference fixture.
  • Electron and Tauri may use different adapters, but they must share manifest, projection, readiness, Host Bridge, Capability SDK, and App Server bridge semantics.

Conformance levels

LevelHost capabilityMust not do
Desktop P0Read packages, verify hashes, emit projection, run readiness.Execute app UI, workers, or workflows.
Desktop P1Show app center, install state, setup tasks, blocked / needs-setup.Pretend blocked work succeeded.
Desktop P2Inject Host Bridge and Capability SDK, run controlled UI.Expose Electron, Tauri, Node, Rust, or filesystem internals.
Desktop P3Provide model settings, OAuth session, OEM, billing, updates, and local evidence projection.Rebuild those platform capabilities inside each app.
Desktop P4Let multiple apps share host capabilities and support uninstall, disable, update, and rollback.Let one app-specific shortcut pollute host core.
Desktop P5Reuse the same contract in Tauri or runtime-backed shells while preserving the App Server JSON-RPC / RuntimeCore fact source.Create a second standard or second Agent runtime for another technology stack.
Desktop P6Run app-owned backend services and app storage under host supervision.Let app backends read host databases, secrets, files, or user state directly.

Required desktop host behavior

Standard capabilityHost responsibilityWhat the app sees
DiscoveryDiscover local directories, registry entries, OEM bootstrap payloads, or development fixtures.Installable app list.
VerificationVerify package hash, manifest hash, signatures, and version compatibility.Install review result.
ProjectionEmit catalog cards, entries, capability previews, and provenance without executing code.App center and entry cards.
ReadinessCheck host version, capabilities, session, model settings, secrets, billing, and policy.ready / needs-setup / blocked.
Host BridgeUse lime.agentApp.bridge v1 to transport host snapshots, theme, locale, navigation, and capability calls.SDK bridge and lifecycle events.
Capability SDKInject lime.* handles and let the host decide permission.Governed platform capabilities.
App Server bridgeHost owns the App Server client and projects lime.agent / lime.workflow through Desktop Host IPC into JSON-RPC.SDK tasks, events, and artifact projections only.
Shared user stateProject non-sensitive user, tenant, workspace, locale, theme, entitlement, model, and capability status.Host snapshot without raw tokens or host internals.
App backend servicesSupervise client-local backends and broker declared cloud-remote backends, including multi-language services.Capability-mediated service calls; no direct host authority.
Storage / Artifacts / EvidenceNamespace app data, outputs, logs, and evidence by app, workspace, and tenant.Traceable business state.
CleanupSupport disable, uninstall keep data, uninstall delete data, and export then delete.Recoverable or removable app lifecycle.

Shared platform capabilities

A desktop host may expose these generic capabilities, but only through the Capability SDK or Host Bridge. Business apps must not import host internals.

CapabilitySuggested capabilityBoundary
Model settingslime.modelSettingsApps read effective settings or request setup; they do not persist global model settings.
OAuth / sessionlime.cloudSessionSnapshots do not include bearer tokens; tokens are fetched just in time only.
OEM / brandinglime.branding / lime.uiThe host projects branding, theme, and shell copy; apps consume tokens.
Billing / subscriptionlime.billingThe host projects tenant billing state; apps do not own the ledger.
Updates / distributionlime.appUpdatesThe host checks releases, downloads, switches versions, and rolls back; apps do not build private updaters.
Permissions and policylime.policyHigh-risk actions need human review or policy approval.
Evidencelime.evidenceImportant runs and external side effects keep provenance.
Workspace contextlime.workspaceApps receive scoped workspace projections; they do not own the workspace source of truth.
App storagelime.storageApps own namespace schema and data model; the host owns physical database placement and migrations gatekeeping.

These capability names may be refined in future minor versions, but the semantics must remain stable: apps request capabilities, Host / Cloud governs them, and business facts stay in the app or external system.

Electron and Tauri relationship

flowchart LR
  App[Agent App Package] --> Contract[Agent App Contract]
  Contract --> Manifest[manifest]
  Contract --> Projection[projection]
  Contract --> Readiness[readiness]
  Contract --> Bridge[Host Bridge v1]
  Contract --> SDK[Capability SDK]

  Electron[Electron adapter] --> Contract
  Tauri[Tauri adapter] --> Contract
  RuntimeBacked[runtime-backed shell] --> Contract

  Electron --> Desktop[lime-desktop-platform]
  Tauri --> Desktop

An Electron adapter should prefer WebContentsView or a controlled BrowserWindow for installed app surfaces. iframe remains a lightweight compatibility surface, and <webview> should not be the default new path. A Tauri adapter may use Rust commands, WebView IPC, and a system runtime. The implementation differs, but the app should not observe those differences.

The desktop Agent execution path is fixed:

text
App UI / Worker
  -> Host Bridge / Capability SDK
  -> Electron ipcMain / preload or Tauri WebView IPC
  -> App Server client
  -> App Server JSON-RPC
  -> RuntimeCore / services
  -> ExecutionBackend

Host implementation constraints:

  • Electron / Tauri adapters only own desktop shell capabilities, IPC allowlists, controlled UI surfaces, sidecar lifecycle, and renderer-safe projection.
  • The App Server client is held by the host main process or equivalent trusted process; renderers / iframes do not connect directly to the sidecar.
  • Electron app surfaces must use host-owned session partitions, context isolation, sandboxing, and preload allowlists; apps must not receive Node, Electron, or filesystem APIs.
  • initialize -> initialized is a required gate for every App Server transport.
  • agentSession/event is the public task event ingress; app UI must not fabricate runtime success from local state.
  • When App Server is unavailable, the host returns blocked / host:error; product paths must not fall back to mock success.

Launch flow

sequenceDiagram
  autonumber
  participant User
  participant Host as Desktop host
  participant Cloud as Lime Cloud
  participant Package as App Package
  participant App as App UI

  User->>Host: Open app center or standalone app
  Host->>Cloud: Fetch catalog, tenant policy, OEM, billing, session
  Host->>Package: Read APP.md and app.*.yaml
  Host->>Host: Verify packageHash and manifestHash
  Host->>Host: Build projection
  Host->>Host: Run readiness
  alt needs-setup or blocked
    Host-->>User: Show setupActions and blocker reasons
  else ready
    Host->>App: Mount controlled UI surface
    App->>Host: app:ready
    Host-->>App: host:snapshot
    App->>Host: capability:invoke
    Host-->>App: result / error / event
  end

Minimum host snapshot fields

A host snapshot may contain:

  • app id, entry key, route, and install mode
  • non-sensitive locale, timezone, workspace id, and tenant id summary
  • theme mode, effective theme, and CSS variables
  • capability profile summary
  • readiness state and setup findings summary
  • cloud session presence, control-plane base URL, and tenant context
  • non-sensitive billing, branding, and model settings status or versions

A host snapshot must not contain:

  • bearer tokens
  • plaintext secrets
  • private user file contents
  • raw billing ledgers
  • host internal paths, Electron objects, Tauri command names, or Rust structs

Readiness state rules

StateMeaningUI requirement
readyThe current entry can launch.Primary action is enabled.
needs-setupA user or admin can fix setup.Show setupActions.
blockedThe current environment cannot run the app or is incompatible.Show reasons and block launch.
disabledAn admin or policy hides the entry.Entry visibility is controlled.

blocked and needs-setup are user-visible states, not internal logs. The host must explain which capability, policy, secret, billing state, model setting, or host version caused the failure.

Storage boundary

A desktop host should separate:

ScopeContentsExample
Host core databaseInstall state, user/session projections, host settings, capability registry, policy, and app catalog facts.host.db or App Server host schema.
App package cacheOfficial packages, hashes, signatures, projection cache.Install directory or download cache.
App namespaceApp-local storage, workflow state, artifact refs.Per-app SQLite file, per-app schema, or appId namespace.
WorkspaceUser-movable business data and app outputs.Workspace files and artifacts.
User dataSession, secure cache, host preferences, download cache.OS userData.
CloudRegistry, tenant policy, OAuth, billing, OEM.Lime Cloud control plane.

Apps must not copy platform sessions, global model settings, billing ledgers, or OEM authority config into their persistent state.

The physical database engine may be shared, but the writable logical boundary must not be shared. On desktop, per-app SQLite database files are the preferred default because they reduce cross-app write contention and simplify uninstall, backup, migration rollback, and corruption recovery. On server, a shared PostgreSQL instance may use per-app schemas and roles; high-risk apps should use dedicated databases. Shared tables are only appropriate for low-risk metadata with tenant, workspace, app scoping, and database-enforced policy.

lime-desktop-platform positioning

lime-desktop-platform can be Lime's standard desktop host implementation, but it must not redefine the Agent App standard.

It should implement:

  • app center
  • app install, projection, readiness, launch, disable, uninstall, and update
  • Host Bridge v1
  • Capability SDK adapter
  • host projection for model settings, OAuth, OEM, billing, updates, and platform settings
  • developer diagnostics
  • Electron-first adapter
  • Tauri adapter compatibility plan

It should not implement:

  • content-studio content production workflows
  • zhongcao or other sample domain business logic
  • proxy execution for vertical publishing platforms
  • private model gateways that bypass standard capabilities
  • a second manifest, projection, readiness, or bridge contract that conflicts with Agent App

Conformance checklist

  • [ ] Projection is stable for the same package and host profile.
  • [ ] Verification, projection, and readiness finish before app code executes.
  • [ ] Host Bridge messages include protocol="lime.agentApp.bridge" and version=1.
  • [ ] Apps can only call host capabilities through the Capability SDK.
  • [ ] Apps declaring agentRuntime.bridge.kind=app-server-json-rpc enter App Server JSON-RPC through Desktop Host IPC.
  • [ ] App Server transport completes initialize -> initialized before business methods are allowed.
  • [ ] agentSession/event, artifact/read, and evidence/export derive from RuntimeCore / services facts, not app UI synthesis.
  • [ ] lime.cloudSession snapshots never leak tokens.
  • [ ] Model settings, OAuth, OEM, billing, and updates are platform capabilities, not app-local state.
  • [ ] blocked / needs-setup are visible and explainable or recoverable.
  • [ ] App data, artifacts, evidence, and logs are namespaced.
  • [ ] Host core database state is not writable by app-owned migrations.
  • [ ] App backend services run under host supervision and reach host resources only through capabilities.
  • [ ] Electron app surfaces use context isolation, sandboxing, preload allowlists, and host-owned session partitions.
  • [ ] disable / uninstall / update do not break other apps.
  • [ ] Electron and Tauri adapters share the same contract.

Draft host-platform standard for installable agent applications.