All articles
Back to Developers
Hosting & bridge

App hosting & bridge

Authorized catalog and launch, isolated app origins, short-lived leases, the iframe bridge, runtime control and persistent channels.

9 min read Updated: 21 November 2026
Markdown

Catalog and launch authority

Installed apps are not trusted shell code. Rust returns a session-filtered catalog, and a launch is authorized again for the live account, installation and grants.

RoutePurpose
GET /api/v1/shell/appsBounded, session-filtered app catalog
POST /api/v1/shell/apps/:id/launchAuthorize and return a frame URL plus short-lived lease
GET/POST /api/v1/shell/apps/:id/runtimeRead or change runtime state
POST /api/v1/shell/apps/importImport a verified package
POST /api/v1/shell/capabilities/invokeInvoke a capability through the platform

Isolation

  • Each installation uses .<RUMAHL_APP_HOST_SUFFIX>, normally apps..
  • Assets are served under /launch/<256-bit-random-lease>/.
  • A lease is bound to one session and installation, expires after 90 seconds without renewal and lives in memory only.
  • The iframe uses sandbox="allow-scripts" without allow-same-origin.
  • App hosts never route to shell APIs and strip cookies and Authorization.
  • Apps receive no shell session token or broad platform bearer credential.

Bridge protocol

Installed apps reach the shell only through window.postMessage using rumahl.bridge.v1. The channel is bound to the frame contentWindow; event.origin is "null" for a sandboxed app.

MethodPurpose
os.infoBounded shell and app information
os.theme.get / os.theme.changedRead and follow the semantic OS palette
os.settings.get / os.settings.setRead or write the app’s own manifest settings
os.notificationSend a user notification
os.window.*Close, minimize or focus the app window
os.capabilities.invokeInvoke another installed app’s declared capability

Capabilities and channels

The capability registry is derived from installed apps, and every existing account is granted each provided capability at install. A web provider is reached through its frame; an always-on service can connect over the persistent rumahl.channel.v1 loopback channel with a hello/token handshake.

  • Capability providers register handlers with rumahl.provide(capability, handler).
  • Deliveries wait for the bridge handshake so provider registration is not raced.
  • Theme changes are pushed to apps and streamed services as --rumahl-* variables.
  • Standalone services can be embedded through the same-origin stream proxy under /api/v1/shell/streams/{id}/.

Settings and brokered network

Apps that declare com.rumahl.os.settings can persist manifest-declared values bound to the installation. Secret values are write-only and encrypted at rest. Apps that declare com.rumahl.os.network can ask the platform to perform an HTTP(S) request to an origin the user explicitly approved for that installation; the platform attaches configured secrets server-side and returns only the response.

  • Settings are read and written through GET/PUT /api/v1/shell/apps/{id}/settings.
  • Consent and file access use /apps/{id}/grants and /apps/{id}/files/content.
  • Network consent uses GET/PUT/DELETE /apps/{id}/network/consent; requests use POST /apps/{id}/network/request.
  • The network broker allows HTTP(S) only, follows no redirects, refuses link-local targets and never sends cookies.
  • A denied request returns 403 with a reason such as approval-required so the shell can offer consent.
Consent is not installation

Installing an app does not grant its network origins or its file access. The current account and session must approve the exact origin or resource, and revocation takes effect on the next request.

Publication boundary

Only Web runtimes with a main web-asset entrypoint are launchable in this slice. Assets must be published under $RUMAHL_STATE_DIR/app-assets// and must contain public assets only.

Warning

Container web proxies, OIDC app login, native app backends and a general action bridge still need separate authorization contracts. The generic web-app network broker is limited to declared capability, explicit origin consent and the documented transport rules.

Need more context? Read the source or open a discussion with the project.

On this page