Apps · package contract

App packages and manifest.

An app is a signed directory package. The manifest is the contract; the signature covers the exact manifest bytes and every payload file is authenticated.

14 min readUpdated 26 November 2026Package format v1

The package boundary

The importer never trusts manifest paths or host directories. It verifies the detached Ed25519 signature, authenticates each payload file with SHA-256, rejects unknown manifest fields and only then publishes the verified assets or stages a container image reference.

The complete field-by-field reference is below; the end-to-end build and signing flow is in Build your first app.

LimitValue
Manifest filenamepackage.json
Manifest size1 MiB
Payload files2,048 maximum
Single file64 MiB maximum
Total payload256 MiB maximum
Unknown fieldsRejected

Bundle what the app can serve locally

The installed package is the app’s asset root. A web app should render its own interface from that tree: HTML, CSS, JavaScript, fonts, icons, images and default copy. A CDN request is not part of the installation and can change or disappear after the package was signed.

AssetBundle itAvoid
CSS and JavaScriptLocal files such as ./ui.css, ./app.js or local chunksCDN links, remote @import or a third-party script tag
FontsBundled WOFF2 with @font-face, or a system stackGoogle Fonts, a remote font stylesheet or a hotlinked font file
Icons and imagesLocal SVG, PNG, WebP or AVIF under ./media/Remote icon sets, hotlinked screenshots or image CDNs
Default copy and dataBundled JSON or constants required to render the first screenA remote config fetch before the app can start
Live dataBrokered network with explicit origin consentUsing the network for the app shell, fonts or analytics
don't: remote UI assets
<!-- Don't: third-party requests before the app can render -->
<link rel="stylesheet" href="https://cdn.example/ui.css">
<style>
  @import url("https://fonts.example/inter.css");
</style>
<script src="https://cdn.example/chart.js"></script>
<img src="https://cdn.example/hero.png" alt="">
do: signed package assets
<!-- Do: every asset ships in the signed package -->
<link rel="stylesheet" href="./ui.css">
<style>
  @font-face {
    font-family: "Inter";
    src: url("./fonts/inter.woff2") format("woff2");
    font-display: swap;
  }
</style>
<script src="./chart.js" defer></script>
<img src="./media/hero.png" alt="Notes overview">

Bundling also keeps the release deterministic: the signature covers the bytes the user runs, the app starts offline and there is no silent third-party update between signing and launch.

Label external services and accounts

Some apps genuinely need a remote service, a server address or an account. That is allowed; hiding it is not. The listing summary or description and the app must say which feature needs the dependency and what remains possible without it.

Local featuresAccount-gated features
DiscloseWhat to write
Service or providerName the service and whether the user supplies the server URL.
FeatureList every feature that needs it: sync, sharing, live data or device control.
Works withoutList the local features that still work: editing, search, export or settings.
Does not workState the exact limits: no sync, no sharing, no multi-device access.
AccountSay whether an account is required, optional or only needed for one feature.
Data destinationSay what leaves the device and which server receives it.
listing disclosure
Notes

Local notes, search and export work without an account.

Requires: Nextcloud account and server URL for two-way sync and sharing.
Without it: notes stay on this device; sync, sharing and multi-device access are unavailable.

Use the same three lines in the listing and in the app. Do not replace them with a vague “cloud features” claim.

FeatureWithout the external account
Local note editing and searchWorks
Export to a local fileWorks
Two-way syncRequires Nextcloud
Sharing and multi-device accessRequires Nextcloud

In the app, show the same disclosure before the first sign-in or connection attempt and keep the local path usable. Do not put a sign-in wall in front of features that work without an account.

Runtime kinds

KindEntrypointCurrent behaviour
webweb-assetPublished under the installation asset root and hosted in a sandboxed iframe
containercontainer-artifactStaged through the runtime supervisor, attached to a per-app network and launched through the app-host proxy; lifecycle on-demand or always-on
nativenative-artifactSigned executable staged by the supervisor and run headless in a bubblewrap sandbox under a default-deny publisher policy

This guide uses the web runtime. Container apps have a separate image, network and HTTP endpoint contract. Native apps are headless executables under an explicit device policy and have no web bridge, database, OIDC client or channel in this release. App and theme packages are distributed through the public store at store.rumahl.com; certification and support programs are separate.

Manifest fields

FieldPurpose
formatVersionPackage format version.
publisherIdPublisher identity used by the trust store.
app.appIdStable app identity.
app.versionApp version, independent of the package format.
app.runtimeRuntime kind and entrypoints.
app.lifecycleon-demand or always-on where supported.
app.permissions[]Requested permissions with a scope and required flag.
app.providedCapabilities[]Operations the app can serve through the bridge.
app.settings[]Manifest-declared settings and write-only secrets.
app.connectors[]External service target plus container entrypoint.
files[]Path, size and SHA-256 digest for every payload file.

Permissions, capabilities and settings

A permission request declares what the app needs. The platform decides whether it is granted. A capability is a named operation an app provides to other apps. Requesting a capability is not a grant; providing one is not a contribution.

manifest excerpt
"permissions": [
  { "id": "com.rumahl.os.window", "scope": "user-own", "required": true },
  { "id": "com.rumahl.os.settings", "scope": "app-private", "required": true },
  { "id": "com.rumahl.os.network", "scope": "user-selected", "required": true }
],
"settings": [
  { "key": "server.url", "title": "Server address", "type": "text", "required": true },
  { "key": "server.token", "title": "Access token", "type": "secret", "required": true }
]

A secret is a write-only setting kind. It is encrypted at rest; the read shape reports only that the secret is configured. Plain values are validated against the manifest kind.

Sign and verify

shell
cargo run -p rumahl-app-packages --bin rumahl-package -- keygen \
  --key-id example-1 \
  --publisher com.example \
  --keystore keys/example.json

cargo run -p rumahl-app-packages --bin rumahl-package -- sign \
  --package dist/notes \
  --manifest dist/notes/package.json \
  --keystore keys/example.json

cargo run -p rumahl-app-packages --bin rumahl-package -- verify \
  --package dist/notes \
  --trust-store trust.json

Keep the private key out of the package and the repository. Verification is a build and import gate; it is not a claim that the app’s behaviour is safe.

Import and uninstall

RoutePurpose
POST /api/v1/shell/apps/importImport a verified package
GET /api/v1/shell/appsSession-filtered catalog
POST /api/v1/shell/apps/{id}/launchAuthorize launch and return a lease
DELETE /api/v1/shell/apps/{id}Uninstall an app

Uninstall revokes the app’s grants and network consents and removes its runtime resources. Databases are retained in inaccessible storage; physical deletion is a separate purge policy.

Next