Apps · contract

Permissions and app-to-app calls.

A permission request is not a grant. A capability is not a contribution. Apps talk to each other only through the platform, which knows the caller, installation, account and current consent.

10 min readUpdated 24 November 2026Bridge v1

The model

TermMeaning
PermissionA declared need with a scope. The platform decides whether it is granted.
GrantAn explicit decision for a subject, permission, scope, resource and validity.
CapabilityA named operation an installed app provides to other apps.
Bridge methodA versioned message such as os.info or os.capabilities.invoke.

Permission scopes

ScopeUse
app-privateData owned by one installation only
user-ownResources belonging to the current account
user-selectedThe user picks the exact resources or origin
explicitA grant names concrete resource keys
family-sharedA shared family/resource boundary
systemPlatform-level policy; never inferred from a UI mode

An explicit grant must contain resources. A system grant must not be narrowed to resources. The platform validates both.

The OS permission catalog

Permissions in the OS-owned rumahl. namespace are a fixed contract. Third-party apps may request their own publisher namespace, but they cannot invent a new OS-owned id.

PermissionAllowed scopesPurpose
rumahl.files.readuser-selected, explicitRead personal files the user selected
rumahl.files.writeuser-selected, explicitWrite personal files the user selected

Declare permissions

manifest excerpt
"permissions": [
  { "id": "com.rumahl.os.window", "scope": "user-own", "required": true, "reason": "Control its own window" },
  { "id": "com.rumahl.os.settings", "scope": "app-private", "required": true },
  { "id": "com.rumahl.os.network", "scope": "user-selected", "required": true },
  { "id": "com.rumahl.os.capabilities", "scope": "user-own", "required": true },
  { "id": "rumahl.files.read", "scope": "user-selected", "required": false }
]

A required permission must be resolved for installation to continue. An optional permission can remain ungranted; the app must handle the denial.

Grants and consent

RoutePurpose
GET /api/v1/shell/apps/{id}/grantsRead requested grants and current decisions
PUT /api/v1/shell/apps/{id}/grantsIssue explicit consent
DELETE /api/v1/shell/apps/{id}/grants/{grant}Revoke one grant
GET/PUT/DELETE /api/v1/shell/apps/{id}/network/consentList, approve or revoke an origin consent

A grant can be durable or bound to the current browser session. Revocation takes effect on the next authorization check; do not reuse a cached private response.

Bridge capabilities and methods

The bridge is versioned rumahl.bridge.v1. The shell binds the channel to the concrete iframe.contentWindow; an app has an opaque origin and never receives the shell session token.

CapabilityMethods
com.rumahl.os.infoos.info
com.rumahl.os.themeos.theme.get, theme updates via os.theme.changed
com.rumahl.os.notificationos.notification
com.rumahl.os.windowos.window.close, minimize, focus
com.rumahl.os.capabilitiesos.capabilities.invoke
com.rumahl.os.settingsos.settings.get, os.settings.set
com.rumahl.os.networkos.net.request
com.rumahl.os.warningsos.warnings.register, publish, test, clear
rumahl.files.read / writeos.files.request, read, write

A method the app did not declare is refused. The shell does not fall back to a broad baseline for a modern manifest.

Talking to another app

Apps never open a direct channel to each other. The interaction has four parts:

1

The provider declares a capability

The signed manifest lists it in providedCapabilities. This says what the app can serve; it does not grant anything.

2

The provider registers a handler

Inside its hosted window it calls rumahl.provide(capability, handler) through the bridge client.

3

The caller declares the capability permission

It requests com.rumahl.os.capabilities. The platform checks the live account, session and installation.

4

The platform delivers the call

For a running web provider, the shell delivers provider.invoke to its frame and returns the result. An always-on service uses the persistent rumahl.channel.v1 channel.

bridge client
import { connectRumahlBridge } from "@rumahl/bridge-client";

const rumahl = connectRumahlBridge();
await rumahl.ready();

// Provider: declare a handler for a capability in the signed manifest.
rumahl.provide("com.example.notes.search", async (invocation) => {
  return searchNotes(invocation);
});

// Caller: ask the platform, never the provider window.
const result = await rumahl.invokeCapability("com.example.notes.search", {
  namespace: "com.example.notes",
  kind: "query",
  key: "monstera"
});

Denial and debugging

SymptomWhat to check
403 on a capability callCaller permission, provider declaration, live installation and session
Method refusedThe app did not declare the capability for that bridge method
Provider not foundThe provider is installed but not running; retry or open it
Network denialThe exact origin is not approved, or consent was revoked
File denialThe grant is missing, expired, or scoped to different resources

Do not infer success from a rendered control. Log the denial reason and offer the consent or retry path that matches it.

Next