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.
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.
| Limit | Value |
|---|---|
| Manifest filename | package.json |
| Manifest size | 1 MiB |
| Payload files | 2,048 maximum |
| Single file | 64 MiB maximum |
| Total payload | 256 MiB maximum |
| Unknown fields | Rejected |
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.
| Asset | Bundle it | Avoid |
|---|---|---|
| CSS and JavaScript | Local files such as ./ui.css, ./app.js or local chunks | CDN links, remote @import or a third-party script tag |
| Fonts | Bundled WOFF2 with @font-face, or a system stack | Google Fonts, a remote font stylesheet or a hotlinked font file |
| Icons and images | Local SVG, PNG, WebP or AVIF under ./media/ | Remote icon sets, hotlinked screenshots or image CDNs |
| Default copy and data | Bundled JSON or constants required to render the first screen | A remote config fetch before the app can start |
| Live data | Brokered network with explicit origin consent | Using the network for the app shell, fonts or analytics |
<!-- 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: 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.
| Disclose | What to write |
|---|---|
| Service or provider | Name the service and whether the user supplies the server URL. |
| Feature | List every feature that needs it: sync, sharing, live data or device control. |
| Works without | List the local features that still work: editing, search, export or settings. |
| Does not work | State the exact limits: no sync, no sharing, no multi-device access. |
| Account | Say whether an account is required, optional or only needed for one feature. |
| Data destination | Say what leaves the device and which server receives it. |
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.
| Feature | Without the external account |
|---|---|
| Local note editing and search | Works |
| Export to a local file | Works |
| Two-way sync | Requires Nextcloud |
| Sharing and multi-device access | Requires 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
| Kind | Entrypoint | Current behaviour |
|---|---|---|
web | web-asset | Published under the installation asset root and hosted in a sandboxed iframe |
container | container-artifact | Staged through the runtime supervisor, attached to a per-app network and launched through the app-host proxy; lifecycle on-demand or always-on |
native | native-artifact | Signed 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
| Field | Purpose |
|---|---|
formatVersion | Package format version. |
publisherId | Publisher identity used by the trust store. |
app.appId | Stable app identity. |
app.version | App version, independent of the package format. |
app.runtime | Runtime kind and entrypoints. |
app.lifecycle | on-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.
"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
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
| Route | Purpose |
|---|---|
POST /api/v1/shell/apps/import | Import a verified package |
GET /api/v1/shell/apps | Session-filtered catalog |
POST /api/v1/shell/apps/{id}/launch | Authorize 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
- Build your first app — the complete tutorial.
- Hosting and bridge — what happens after import.
- API reference — routes and enforcement.
Was this page helpful?