# rumahl.dev — full documentation > Generated from the same source as the human documentation. The docs start page and navigation index are omitted here; area landing pages are included because they carry the area rules. Use llms.txt for the page index. Canonical site: https://rumahl.dev/ Documentation: https://rumahl.dev/docs/ Agent guide: https://rumahl.dev/docs/agents/ Compact index: https://rumahl.dev/llms.txt # Start here ## Agent documentation URL: https://rumahl.dev/docs/agents/ A separate documentation surface for LLMs and AI agents: compact index, full text, grounding rules and current rumahl OS limits. A separate, model-readable documentation surface. Same source as the human docs, but generated as one corpus with explicit grounding rules. ## Read it | Format | Use it for | | --- | --- | | Agent documentation | This page: rules, status and entry points | | llms.txt | A compact, sectioned index of every documentation page | | llms-full.txt | The complete documentation text in one file | | ai.md | The same agent guide as Markdown | > **A separate contract, not a separate product** > The agent docs do not describe extra APIs or hidden behavior. They are a readable projection of the current human documentation. ## Grounding rules - Describe the current implementation, not an imagined roadmap. - Web, container and native apps are available. Container apps launch through an HTTP app-host proxy; native apps run headless in a bubblewrap sandbox under a default-deny policy. Apps and themes are distributed through the public store at store.rumahl.com; package downloads and updates come from github.com/rumahl/apps. - A signed package is not a certification, a review or an endorsement. - An app talks to the OS through the bridge. Apps do not call each other directly. - Use the exact route, bridge method, version or path when answering. Do not invent endpoints or fields. - Never claim a certification program, a support promise or a general self-service submission flow exists. - The public store is store.rumahl.com; its catalog API is at /api/catalog and is separate from github.com/rumahl/apps, which serves downloads and updates. Themes use the same store. - If a page labels something as unavailable, repeat that limit in the answer. ## Current status rumahl OS is in development. The developer server runs the real Rust platform and the React shell. The API reference is generated from the current release. Web, container and native runtimes are implemented, including trust revocation. The public store is live at store.rumahl.com (deployed on Vercel), with downloads and updates from github.com/rumahl/apps. A UEFI image can be flashed or installed from the setup page. It has A/B slots, signed update bundles with automatic rollback and an optional Secure Boot signing step; hardware acceptance, certification and a support promise are not released. ## Documentation areas | Area | What it covers | | --- | --- | | Apps | Build, package, host, connect, APIs and SDKs — the largest area | | Stores | Sources, custom storefronts, publishing and trust | | Themes | RUI authoring, tokens, packaging and install | | Platform | Architecture, identity, data and shell contracts | ## How to answer - Start with the current status and the boundary that applies. - Quote the exact route, bridge method, version field or package path. - Separate implemented store/runtime support from missing certification and support programs. - Link to the relevant human page for the full context. - Never turn a signature, a source certificate or a local package into a certification claim. ## Source and regeneration Both surfaces are generated by `node build.mjs` from the documentation source in `src/*.mjs`. The full text is assembled from the page content, not written by hand, so it cannot drift from the human pages on its own. ## Next - [Open the compact index](/llms.txt) - [Open the full documentation](/llms-full.txt) - [Read the human documentation](/docs/) --- ## Changelog URL: https://rumahl.dev/changelog/ Product, documentation and site changes for rumahl.dev and the rumahl developer platform. Changelog Product, documentation and site changes. This page tracks the developer site, the docs and the published npm packages — not rumahl OS releases. Developer platform Newest first npm · 0.1.0 12 entries Filter in the sidebar 2 Dec 2026 Latest Platform Docs ## Wi-Fi, a default firewall and A/B updates The device can join Wi-Fi during setup, the image ships a default-deny inbound policy, and system updates have two slots with signed bundles and rollback. - Setup and Settings scan for Wi-Fi networks and join them through iwd; the root broker writes the profile with mode 0600. - nftables drops new inbound connections except HTTPS, app host ports, DHCP, mDNS and ICMP. Container ports publish on loopback only. - The setup wizard installs the running image to a disk: GPT with ESP, two 1536 MiB root slots and a fresh data partition. - System updates use a signed bundle, write the inactive slot and kernel, and roll back after two unsuccessful starts. - Secure Boot signing is an opt-in build step; the settings page reports the firmware and image state. [Device setup](/docs/device-setup/)[Storage & updates](/docs/storage-updates/) 1 Dec 2026 Apps Stores Platform Docs ## Browser setup, OS-owned stores and a release path The first-device setup now runs in the browser, the store and its updates are owned by the platform, and tagged images have a reproducible release path. - Three-step setup (account, network, device) with inline validation, automatic sign-in and a first-run welcome window. - Network step reports DHCP or a self-assigned 169.254 address; static IPv4, gateway and DNS are applied through the privileged host-config broker. - Session lock with password re-check, restart/shutdown for administrators, and a persistent get-started card on a fresh desktop. - Store sources, app auto-update policy and install jobs are OS state. The official store is the default, and installs continue when the Store window is closed. - System updates use the fixed release repository, stable/beta channels and admin-gated install. A/B activation and rollback do not exist yet; images without the updater report updates as unsupported. - Tagged builds publish the UEFI image, `SHA256SUMS` and a GitHub release. The official publisher keys are the default trust store and NTP is enabled. - The apps repository has validation, a signed-release updater, catalog regeneration and a health watchdog; the public storefront runs on Vercel. [Runtime kinds](/docs/runtime-kinds/)[Stores](/docs/store/)[Storage & updates](/docs/storage-updates/)[Publish & release](/docs/publish/#automation) 25 Nov 2026 Apps Platform Docs ## Runtimes and the public store are available The runtime matrix now describes what ships: web, container and native apps are installed and launched by the platform, trust revocation is part of the package boundary, and apps and themes share the public store at store.rumahl.com. - Container apps launch through the app-host proxy, their own network and the readiness-checked HTTP endpoint. - Native apps are installed from signed artifacts and run headless in a bubblewrap sandbox under a default-deny policy. - The trust store can revoke publishers and signing keys; revoked apps cannot launch or start. - The public store is `store.rumahl.com`, with the storefront and catalog API separate from package downloads and updates in `github.com/rumahl/apps`. Apps and themes share the same store. - Certification and a long-term support promise remain separate work. [Runtime kinds](/docs/runtime-kinds/)[Certification and trust](/docs/certification/)[Review and release](/docs/review/) 25 Nov 2026 Site Docs Apps Themes Platform ## npm packages, a changelog sidebar and more pixel illustrations The documentation now covers the published npm packages, the changelog has its own navigation, and the main entry pages use new pixel scenes and clearer copy. - The SDK page documents `@rumahl/ui@0.1.0`, `@rumahl/bridge-client@0.1.0` and `@rumahl/contracts@0.1.0`, plus the workspace-only shell and SSR packages. - Home, the docs overview and versioning explain what is published, how to install it and why the registry can differ from the local checkout. - Changelog is in the main navigation and has a sidebar with category filters and docs links. - New pixel scenes cover the workbench, notes, setup, request path, catalog, appearance, library, packages and changelog. - Runtime status now documents web, container and native apps as available runtimes, including container app-host launch, the native bubblewrap sandbox and publisher/key revocation. Public catalogs, certification and support programs remain separate work. [Open SDKs & npm](/docs/sdks/)[Package versions](/docs/versioning/#npm-packages)[Changelog](/changelog/) 25 Nov 2026 Docs Apps Stores Themes Platform ## Dos and don’ts moved into each area The central rules page is gone. Apps, Stores, Themes and Platform now carry their own rules, with a pixel graphic for every point and a clear Do / Don’t split. - Each area landing page has a Dos and don’ts section with its own illustration. - Every rule is a card with a pixel graphic; Do is green and Don’t is red. - Home, the docs overview, the footer and the changelog link to the area sections instead of a central page. [Apps rules](/docs/apps/#dos-and-donts)[Themes rules](/docs/themes/#dos-and-donts)[Stores rules](/docs/stores/#dos-and-donts)[Platform rules](/docs/platform/#dos-and-donts) 25 Nov 2026 Docs Apps Themes ## Local assets first, and honest external dependencies Apps and themes are now documented as self-contained by default, with examples for bundling assets and a disclosure format for external services and accounts. - Apps bundle CSS, JavaScript, fonts, icons and images; the UI no longer depends on a CDN. - Apps with an external account or service must label the feature and state what still works without it. - Themes use system fonts, tokens and local CSS; no remote fonts, images, styles or network calls. - Added pixel illustrations for local app assets, self-contained themes and account-gated features. [Asset rules](/docs/app-packages/#local-assets)[Theme rules](/docs/themes/authoring/#self-contained)[Apps rules](/docs/apps/#dos-and-donts) 25 Nov 2026 Site Docs ## Pixel illustrations and a larger overview The start page and the documentation overview now use detailed pixel illustrations for every area, and the rules moved into the area pages. - Area tiles and home path cards show full pixel illustrations instead of abstract icon scenes. - The overview explains the four page types and the start page adds a local-first section and a release checklist. - The area pages now carry their own rules, with a full illustration per topic. - The illustrations are inline SVG, so they adapt to light and dark mode without raster assets. [Open the overview](/docs/)[Read the rules](/docs/apps/#dos-and-donts)[Start page](/) 25 Nov 2026 Site Docs Apps Themes Platform ## Four areas, pixel UI and LLM documentation The documentation now has exactly four areas — Apps, Stores, Themes and Platform — with their own scoped sidebars. Apps is the largest area and now owns the HTTP API, bridge and SDK docs. - The navbar contains Apps, Stores, Themes and Platform. Docs is only the start page, reached through the rumahl.dev wordmark. - Themes is a full area with overview, authoring, tokens and packaging pages. - Platform uses collapsible submenus with pixel icons before group and link labels. - Callouts, code, tables, steps, lists and diagrams use pixel frames while body text stays in RWDS typography. - Agent documentation is separate: `/docs/agents/`, `/llms.txt` and `/llms-full.txt`. - The wordmark is now a pixel lockup; the favicon is a blue pixel tile with a white r. [Open Apps](/docs/apps/)[Open Themes](/docs/themes/)[Agent docs](/docs/agents/) 24 Nov 2026 Stores Docs ## Storefronts, publishing and trust Store documentation now covers the public store, custom sources, the shared OS Store frontend, storefronts and the publisher preflight. - Added API-only stores, API stores with a custom storefront and GitHub repositories. - Added the complete store example and Store guidelines. - Clarified that signed packages are not certifications. [Stores overview](/docs/stores/)[Store guidelines](/docs/store-guidelines/) 24 Nov 2026 Apps Platform ## Permissions, bridge and HTTP API The app-facing contract is documented end to end, from the first permission to the final capability call. - Added the permissions and capabilities model for app-to-app communication. - Added the complete bridge SDK reference and HTTP API guide with request and response examples. - Added versioning, troubleshooting and the 72-route API catalog. [Permissions](/docs/permissions/)[Bridge SDK](/docs/bridge-reference/)[API reference](/docs/api/) 24 Nov 2026 Themes Docs ## Themes documentation and runtime status Theme authoring moved into its own full area, and runtime support is stated without ambiguity. - Added theme authoring, token and parameter reference and packaging pages. - Documented the web, container and native runtime matrix. - Added the web-app tutorial and the signed-package workflow. [Themes](/docs/themes/)[Runtime kinds](/docs/runtime-kinds/) 24 Nov 2026 Site Docs ## The first complete developer site The first local version of rumahl.dev documented the platform, the package contract, hosting, identity, data and the API. - Covered setup, architecture, packages, hosting, lifecycle and shell contracts. - Published the API reference for the current checkout. - Established the static, self-contained documentation build. [Start page](/docs/) No entries in this category. --- ## Contributing URL: https://rumahl.dev/docs/contributing/ How to prepare a focused change, run the checks, sign off commits and review documentation against the implementation. rumahl is developed in public. A useful contribution can be a code fix, a reproducible bug report, a clearer guide or a test that names a boundary. ## Ways to contribute | Contribution | Starting point | | --- | --- | | Bug report | Reproduce on a known revision; include environment, command and result. | | Code | Read ARCHITECTURE.md first; keep the change scoped to one boundary. | | Documentation | Run the instructions and fix the first step that fails. | | Artwork | Belongs in the separate rumahl/assets repository. | Read `CONTRIBUTING.md`, `AI_POLICY.md` and `ARCHITECTURE.md` at your checked-out revision. No commercial support or review deadline is implied. ## Set up **shell** ``` pnpm --dir frontend install --frozen-lockfile pnpm --dir frontend dev ``` Use Linux or WSL2, the pinned Rust toolchain, Node 22.12+ or Node 24, pnpm 11.19.0 and OpenSSL. The developer server runs the real Rust platform and the React shell. See [local setup](/docs/quickstart/). ## Shape the change - Use a typed branch: `feat/`, `fix/`, `docs/`, `test/`, `ci/`, `refactor/`, `perf/`, `build/`, `chore/` or `security/`. - Use Conventional Commits in the imperative mood without a trailing period. - Sign off every commit with `git commit -s`. - Keep generated output, credentials and `.rumahl-dev` out of the diff. > **A hidden button is not authorization** > If a change affects a permission, resource or identity rule, change the backend boundary and add a denial test. The UI explanation is not the policy. ## Run the checks **shell** ``` # Rust cargo fmt --all -- --check cargo clippy --workspace --all-targets --locked -- -D warnings cargo test --workspace --locked # Frontend pnpm --dir frontend lint pnpm --dir frontend typecheck pnpm --dir frontend test pnpm --dir frontend build # Licensing reuse lint ``` Use the integration and image checks in [testing and release](/docs/testing/) when the change crosses those boundaries. State any check you could not run and why. ## Prepare the review - Describe the trigger, expected behavior and current result. - Include a regression test at the boundary that failed. - For a visual change, include before/after evidence at the supported widths. - Link the related issue and state remaining limitations. - Do not include credentials, tokens, private keys, cookies or personal filenames. ## Security Report suspected vulnerabilities through the private security process at [rumahl.com/security](https://rumahl.com/security), never in a public issue or pull request. A security fix should include the denial path and the revocation behavior, not only the happy path. ## Next - [Architecture](/docs/architecture/) — where new code belongs. - [Testing and release](/docs/testing/) — the full check matrix. - [Source on GitHub](https://github.com/rumahl/rumahl) --- # Apps ## Apps URL: https://rumahl.dev/docs/apps/ Build, package, host and connect apps for rumahl OS: signed web, container and native packages, the bridge, permissions, settings and local services. Apps Bundle your web app, sign its manifest and launch it in the rumahl shell. Publish it through [store.rumahl.com](https://store.rumahl.com/), with package downloads and updates served from [github.com/rumahl/apps](https://github.com/rumahl/apps). Use the bridge to request platform features, from opening a window to calling a capability exposed by another app. [Start building](/docs/build-an-app/) [App packages](/docs/app-packages/) Web · available Bridge v1 Signed packages Local assets first > **New to rumahl apps?** > Start with Local setup, then follow Build your first app. You do not need to read the API or bridge reference before your first package works. Build and host ## From a folder to a running app. Start with the web runtime. Bundle the interface and its assets, then sign the manifest and import the package into your local shell. When you launch it, the shell opens an isolated frame and the platform issues a short-lived lease for bridge requests. [Tutorial ### Build your first app From an empty folder to a signed, launchable web app. Start the tutorial](/docs/build-an-app/) [Contract ### App packages & manifest Every field, limit, entrypoint, permission and digest. Read the package contract](/docs/app-packages/) [Runtime ### Hosting & bridge Catalog, launch authority, leases, isolation and the bridge. Read the hosting contract](/docs/app-hosting/) [Operations ### Lifecycle & data Install journal, databases, secrets and uninstall order. Read the lifecycle](/docs/app-lifecycle/) Local assets first ## Package the interface, not a stack of CDNs. An app should render from its signed package. Fonts, icons, styles, images and scripts that can live in the package should live there; the network is for data and services that are genuinely remote. [Read the asset rules](/docs/app-packages/#local-assets) Signed package No remote UI assets ### If the network is down, the interface still works. Bundle CSS, JavaScript, fonts, icons, images and default copy. Use the brokered network only for live data, a user-connected service or an external account that is genuinely part of the feature. - **Bundle what you can.** A relative path inside the package is easier to verify, cache and launch offline. - **Keep remote content essential.** No CDN for a UI kit, no Google Fonts, no hotlinked images or analytics. - **Label what stays remote.** Name the service or account, the feature it powers and what still works without it. [Read the disclosure rules](/docs/app-packages/#external-services) Connect and secure ## Give the app only what it needs. Identify the operations your app needs before you request permissions. If it needs data from an external service, use the brokered network and tell users which feature depends on that service. When a user declines access, keep the app’s local features available. [Platform ### Permissions & capabilities Scopes, grants, consent and app-to-app calls through the platform. Read the model](/docs/permissions/) [Integration ### Connect a service Connectors, OIDC, settings and user-approved network origins. Read the integration model](/docs/integrations/) [Status ### Runtime kinds What web, container and native apps can do today. Check runtime support](/docs/runtime-kinds/) [Reference ### Bridge SDK Handshake, methods, settings, network and providers. Open the SDK reference](/docs/bridge-reference/) API & SDK ## Build against the platform. Apps is also the home of the HTTP API, bridge SDK and versioned contracts. [HTTP ### API reference All 72 routes, grouped by resource and authorization boundary. Open the API reference](/docs/api/) [HTTP ### HTTP API guide Sessions, limits, request/response examples and status codes. Read the API guide](/docs/api-guide/) [Toolkit ### SDKs & npm Published npm packages, bridge client, contracts and the package CLI. Open the toolkit](/docs/sdks/) [Compatibility ### Versions & compatibility Package, store, bridge and API versions in one table. Read versions](/docs/versioning/) Dos and don’ts ## Rules for apps. An app is a guest. It owns its interface, but the platform owns identity, data and the decision to launch. These rules keep the package honest and the app useful when the network is not. Do 8 Sign the exact manifest bytes and authenticate every payload file with SHA-256. Request the smallest permission set; handle denial as a normal state, not an error. Use the bridge for platform data, secrets and network access instead of reaching around it. Test import, launch, denial, update and uninstall against a clean profile. State the runtime kind honestly: web, container and native apps are available, but they have different launch, isolation and capability contracts. Bundle CSS, JavaScript, fonts, icons, images and default copy; render from relative paths. Label an external account or service, the feature it powers and what still works without it. Keep local features usable when an optional service or account is unavailable. Don’t 8 Ship a host directory or an unsigned manifest and expect the platform to infer trust. Read or relay the shell session from inside an app frame. Ask for a broad permission because it makes the demo shorter. Depend on another app’s internal URL or storage instead of a declared capability. Hide a failed verification step or leave the developer listener reachable beyond loopback. Promise certification or a support window that does not exist, or present a custom storefront as the official store.rumahl.com frontend. Load UI assets from a CDN or hotlink fonts, icons and images. Hide an account requirement or block local features behind a sign-in wall. Next ## Ready to distribute? Stores publish the signed packages you build here. The OS Store frontend stays the same for every source. [Go to Stores](/docs/stores/) --- ## Local setup URL: https://rumahl.dev/docs/quickstart/ Install the rumahl OS developer environment, trust the local certificate and open your first local session. Run the rumahl OS developer server on Linux or WSL2. You’ll trust the local HTTPS certificate, open the shell in your browser and create a test account you can use to import your first app. Once you can sign in to the local shell, you’re ready to [build and import the Notes app](/docs/build-an-app/). ## What you will get - A local HTTPS shell at `https://localhost:8443`. - A local developer account stored in SQLite. - An app catalog that starts empty until you import an app. - A repeatable environment for testing apps, capabilities and the bridge. This is a development environment. It is not a production installer and it is not exposed to your network. ## Before you start The developer server is for development and testing. It is not a production installer, it listens on loopback and it should never be exposed as the public OS interface. | Requirement | What you need | | --- | --- | | Operating system | Linux, or WSL2 on Windows | | Node.js | 22.12+ or 24 with ICU support | | pnpm | 11.19.0 | | Rust | The toolchain pinned by the repository | | OpenSSL | For local certificate handling | | Browser | A dedicated profile for local HTTPS certificates | > **Do not use this as your household server** > The development listener binds to 127.0.0.1. For remote development, use SSH port forwarding rather than exposing the port. ## The short version If the tools above are already installed, these are the commands. The detailed steps below explain what each one does. **shell** ``` git clone https://github.com/rumahl/rumahl.git cd rumahl pnpm --dir frontend install --frozen-lockfile pnpm --dir frontend dev # open https://localhost:8443 and sign in ``` ## Check out the repository All commands below run from the root of the rumahl repository, not the documentation project. **shell** ``` git clone https://github.com/rumahl/rumahl.git cd rumahl node --version pnpm --version rustc --version openssl version ``` ## Install dependencies **shell** ``` pnpm --dir frontend install --frozen-lockfile ``` Use the repository lockfile. The frontend workspace owns the shell, the bridge client and the UI package. ## Start the developer server **shell** ``` pnpm --dir frontend dev ``` The first run builds the Rust platform and can take longer than later starts. Wait for the HTTPS origin in the terminal. The default is `https://localhost:8443`. > **Custom port** > Use pnpm --dir frontend dev --port 9443 if the default port is occupied. A second developer process must not share the same state directory. ## Trust the local certificate The development server creates a short-lived localhost certificate under `.rumahl-dev/tls`. Trust the public certificate in a dedicated browser profile, or supply a locally trusted certificate with `--cert` and `--key`. > **A dismissed warning is not a working setup** > A page can render after dismissing a certificate warning while service-worker registration, WSS and hot reload remain broken. Trust the certificate before diagnosing anything else. ## Sign in The first start creates a local developer account and writes its credentials to `.rumahl-dev/credentials.json`. These are local development credentials, not your GitHub account. **shell** ``` cat .rumahl-dev/credentials.json ``` Use the account name and password from that file. There is no universal default password and no public registration endpoint. ## Your first session 1 ### Open the shell Visit the HTTPS origin printed by the server and sign in with the generated account. 2 ### Inspect the app catalog The catalog is session-filtered. An empty catalog is not automatically a broken installation; it can mean no app has been imported or granted. 3 ### Check persistence Sign out, sign in again, then restart the server. Local accounts and sessions live in SQLite and survive a restart. ## If something goes wrong | Symptom | What to check | | --- | --- | | Browser warns about the certificate | Trust the local certificate in a dedicated profile. A dismissed warning can break WebSockets and hot reload. | | Port 8443 is already in use | Start on another port with --port 9443 and use that origin. | | Login fails | Read.rumahl-dev/credentials.json. There is no universal default password. | | The app catalog is empty | That is normal before an app is imported. Continue with the tutorial. | | The page loads but data does not update | Check that the certificate is trusted and the developer server is still running. | ## Next - [Build your first app](/docs/build-an-app/) — package, sign, import and launch your first app. - [Apps overview](/docs/apps/) — the full app development path. - [Troubleshooting](/docs/troubleshooting/) — diagnostics for import, launch, bridge and consent. --- ## Build your first app URL: https://rumahl.dev/docs/build-an-app/ A complete guide to packaging, signing, importing and launching a web app on rumahl OS. Build a small Notes app that runs in the rumahl shell. You’ll sign and import a web package, use the bridge to expose search to other apps and check what happens when the user denies access. Before starting, open the shell and sign in with the test account from the [local setup guide](/docs/quickstart/). ## What you will build A web app called **Notes** with one screen. It runs in a sandboxed browser window that cannot read the shell session, provides a search capability to other apps and requests only the window permission it needs. The app is packaged, signed and imported through the platform API. You do not need to publish this app to a store yet. The goal is to understand the full path from a folder to a running app. | Piece | Value in this tutorial | | --- | --- | | App ID | com.example.notes | | Runtime | web with a web-asset entrypoint | | Lifecycle | on-demand | | Permission | com.rumahl.os.window, scope user-own | | Capability | com.example.notes.search | | Hosting | Assets published under the installation asset root | > **A working app is more than a page** > The platform does not trust a manifest path or a host directory. The package must be signed, every payload file must be authenticated, and the live account, installation and grants are checked again at launch. ## What you will learn - How a signed app package is structured. - How to sign a manifest and verify every payload file. - How the shell imports and launches an app. - How the bridge connects an app to the platform. - How permissions, denial and uninstall behave in practice. ## Prerequisites - A running developer server, as described in [local setup](/docs/quickstart/). - The rumahl source checkout with the package CLI available. - A terminal and a browser profile that trusts the development certificate. - No published npm package is required; the CLI runs from the repository. > **First time here?** > Complete Local setup first. You need a running developer server and a browser profile that trusts the local certificate before the import steps will work. ## Understand the three boundaries ### The package boundary An app is a signed directory. `package.json` is the manifest. The signature covers the exact manifest bytes, and every payload file is listed with a SHA-256 digest. The importer rejects unknown manifest fields rather than silently ignoring them. ### The runtime boundary A web app is served from an isolated app origin and launched inside ` ` without `allow-same-origin`. It has an opaque origin, no shell session token and no broad platform bearer credential. ### The authority boundary The shell asks the platform to launch the app. Rust re-reads the live account, session, installation and grants. A lease is short-lived, bound to one session and installation, and cannot authorize a shell API call or an arbitrary file. **Signed package** manifest + SHA-256 payload **Import** verify, publish, install **Launch** account + grants + lease **Bridge** declared methods only ## 1. Create the package Start with a clean directory outside the shell source. The name of the folder is not the app identity; the manifest decides that. **shell** ``` mkdir -p notes-app/dist/notes cd notes-app cat > dist/notes/index.html <<'HTML' Notes

Notes

Local notes, one window.

HTML cat > dist/notes/style.css <<'CSS' body { margin: 0; font: 16px/1.6 system-ui, sans-serif; background: #f6f8f5; color: #18201c; } .notes { max-width: 38rem; margin: 3rem auto; padding: 0 1.25rem; } .notes ul { padding-left: 1.1rem; } CSS ``` Keep every URL relative. The app is served under a lease path, not at the host root, and navigation must not assume a fixed mount point. The tutorial keeps the package at `dist/notes/` so the signing command and the manifest refer to the same root. ## 2. Write the manifest The manifest is the contract. It declares the app identity, runtime, entrypoint, lifecycle, requested permissions and the settings the app can persist. **dist/notes/package.json** ``` { "formatVersion": 1, "publisherId": "com.example", "app": { "appId": "com.example.notes", "version": "0.1.0", "displayName": "Notes", "runtime": { "kind": "web", "entrypoints": [ { "id": "main", "kind": "web-asset", "path": "index.html" } ] }, "lifecycle": "on-demand", "permissions": [ { "id": "com.rumahl.os.window", "scope": "user-own", "required": true, "reason": "Control its own window" } ], "providedCapabilities": ["com.example.notes.search"], "settings": [ { "key": "notes.title", "title": "Window title", "type": "text", "required": false } ] }, "files": [ { "path": "index.html", "size": 512, "sha256": "" }, { "path": "style.css", "size": 420, "sha256": "" }, { "path": "main.js", "size": 1300, "sha256": "" } ] } ``` > **The digest values are not placeholders in a real package** > The signing and verification CLI computes and checks the exact bytes. Generate the final manifest from your build rather than hand-editing digests. ### What each field means | Field | Why it exists | | --- | --- | | formatVersion | Allows the package format to evolve without ambiguity. | | publisherId | Stable publisher identity used by the trust store. | | appId | Stable app identity. A new installation ID does not silently inherit old data. | | runtime.kind | Selects the hosting and isolation model. This tutorial uses web. | | entrypoints | Declares which paths the host may publish and serve. | | permissions | Requests a capability; it does not grant it. | | providedCapabilities | Names the operations this app can serve to other apps. | ## 3. Add the app logic The app must not fetch the shell API with a session cookie it does not have. It talks through the bridge, and the platform decides what the app is allowed to do. **dist/notes/main.js** ``` import { connectRumahlBridge } from "@rumahl/bridge-client"; const rumahl = connectRumahlBridge(); await rumahl.ready(); const notes = [ { id: '1', title: 'Buy oats', body: 'The good ones, not the dust.' }, { id: '2', title: 'Water the monstera', body: 'Every second Tuesday.' } ]; // Publish a capability. The platform decides whether a caller may invoke it. rumahl.provide('com.example.notes.search', async (invocation) => { const query = String(invocation.resource?.key ?? '').toLowerCase(); return notes .filter((note) => `${note.title} ${note.body}`.toLowerCase().includes(query)) .map((note) => ({ id: note.id, title: note.title })); }); ``` The client is framework-agnostic and safe outside rumahl OS: when there is no parent shell, `available` is `false` and calls reject. It performs the `hello`/`welcome` handshake before exposing typed helpers. Keep the return shape of a capability stable and document it with the app. A caller receives the result through the platform, not through a direct app-to-app channel. ## 4. Sign and verify Signing is a build step, not a runtime step. The private key belongs in a keystore that is never published inside the app assets. **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 ``` A successful verify proves the manifest bytes and every listed payload file are intact. It does not prove the app is safe, useful or compatible with the current OS build. ## 5. Import the package Use a live shell session and the exact shell origin. The import endpoint is a mutating request and requires the same-origin check. **POST /api/v1/shell/apps/import** ``` { "importVersion": 1, "files": [ { "path": "package.json", "content": "" }, { "path": "package.sig.json", "content": "" }, { "path": "index.html", "content": "" }, { "path": "main.js", "content": "" } ], "device": "", "installOrigin": "store" } ``` The import endpoint accepts a JSON envelope, not a raw archive. The shell sends the same verified files it received from a package document; the Rust importer checks the signature and every digest again. The request body is capped at 32 MiB. The successful response contains the installation identity. Keep that value: launch, settings and data routes are scoped to the installation, not just the app ID. > **Import is not installation consent** > The importer verifies the package. It does not grant network origins, file access or every capability the app declares. Those are separate consent decisions. ## 6. Launch and connect The shell obtains the session-filtered catalog and asks the platform to launch one installation. **HTTP** ``` GET /api/v1/shell/apps POST /api/v1/shell/apps/{id}/launch { "installationId": "6f18…a2" } ``` The response includes a frame URL, a lease and a renewal interval. The lease expires quickly and is renewed while the window remains open. Losing renewal should close the frame and offer Retry, not reuse a stale URL. **bridge** ``` // Inside the hosted app, the bridge is the only route to the shell. // Methods are declared and capability-gated. rumahl.provide('com.example.notes.search', async (invocation) => { return searchNotes(invocation); }); ``` ## 7. Settings and local network access Two resources make an app genuinely useful without giving it a socket: own settings and a brokered HTTP(S) request. ### Settings Declare `com.rumahl.os.settings` and a settings schema in the manifest. The platform stores values per installation. A `secret` value is write-only and encrypted at rest; the app never receives it back. **manifest excerpt** ``` "permissions": [ { "id": "com.rumahl.os.settings", "scope": "app-private", "required": true }, { "id": "com.rumahl.os.network", "scope": "user-selected", "required": true } ], "settings": [ { "key": "ha.url", "title": "Home Assistant address", "type": "text", "required": true }, { "key": "ha.token", "title": "Access token", "type": "secret", "required": true } ] ``` ### Network consent The app never receives a cookie jar or a secret in plaintext. It asks the platform to make the request after the user approves the exact origin for that installation. **HTTP** ``` GET /api/v1/shell/apps/{id}/network/consent PUT /api/v1/shell/apps/{id}/network/consent POST /api/v1/shell/apps/{id}/network/request # a denied request returns 403 with a reason { "reason": "approval-required", "origin": "http://homeassistant.local:8123" } ``` > **Consent is per installation, user and origin** > A durable grant can expire and can be revoked. A session grant is cleared when the browser session ends. Revocation takes effect on the next request. ## 8. Expose and invoke a capability A capability is an operation, not a permission. First-party and third-party apps use the same contract. **bridge** ``` const rumahl = connectRumahlBridge(); await rumahl.ready(); // Provider: register a handler inside the hosted app. rumahl.provide('com.example.notes.search', async (invocation) => { return searchNotes(invocation); }); // Caller: the shell authorizes and delivers it through the platform. const result = await rumahl.invokeCapability('com.example.notes.search', { namespace: 'com.example.notes', kind: 'query', key: 'monstera' }); ``` Callers use the declared bridge method `os.capabilities.invoke` through `invokeCapability`. The shell delivers the request to the provider through the platform; apps never open a direct channel to each other. The exact authorization is repeated by Rust. A caller that saw a button in the UI still needs a live account, installation and grant. A disabled UI state is not an authorization decision. ## 9. Test the boundaries Test the app in the same order the platform checks it. A successful page load is the weakest possible signal. | Check | Expected result | | --- | --- | | Launch without permission | Denied, not a rendered app with a hidden button | | Wrong or expired lease | Frame rejected; renewal or retry required | | Unknown bridge method | Refused, never silently executed | | Settings secret read | Never returned as plaintext | | Network request without consent | 403 with approval-required | | Uninstall | Grants and consents are revoked; data follows the retention policy | | A second account | Sees only its own catalog, grants and settings | > **Test denial** > A review that only demonstrates the happy path has not tested the platform boundary. Add at least one denial case for every permission you request. ## 10. Publish checklist - The manifest contains no unknown fields and no secrets. - The signature verifies against the intended publisher trust store. - Every asset is public-only; no keystore, source map with secrets or local database is inside the payload. - The entrypoint works under a lease path and uses relative URLs. - Settings are validated against the manifest; required values are handled. - Network origins are narrow, explicit and revocable. - At least one denial path is tested for each permission. - The public store is `store.rumahl.com`; package downloads and updates resolve to `github.com/rumahl/apps`. - A certification program, a support promise and staged rollback policy are not released. > **The store is available; the support program is not** > Signed packages, the install journal, container launch, native sandboxing, revocation and the public store exist. Certification, a long-term support promise, universal self-service submission and staged rollback policy are not released. Do not promise a support window or certification from this guide. ## Where to go next - [App packages and manifest](/docs/app-packages/) — every field, limit and runtime kind. - [Hosting and bridge](/docs/app-hosting/) — leases, isolation and the complete method surface. - [Connectors and identity](/docs/integrations/) — external services and OIDC. - [API reference](/docs/api/) — every documented route and method. --- ## App packages and manifest URL: https://rumahl.dev/docs/app-packages/ The signed app package, manifest fields, runtime kinds, settings, permissions and the signing CLI. 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](/docs/build-an-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 | > **Public assets only** > The published web tree must contain public assets only. Never put keystores, credentials, source maps with secrets or local databases inside the installed payload. ## 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: remote UI assets** ``` ``` **do: signed package assets** ``` Notes overview ``` > **Relative paths stay inside the package** > An absolute URL is a network dependency. Use paths relative to the app asset root and include every referenced file in files[] with its digest. 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 features Account-gated features | 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. | **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. | 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 | > **Use listing text and the app UI, not an unknown manifest field** > The manifest parser rejects unknown fields. There is no documented manifest field for an external account. Put the disclosure in the existing listing summary or description and in the app before sign-in; keep the package manifest valid. 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. **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. > **Installation is not consent** > Installing an app does not grant network origins or personal file access. The current account and session must approve the exact origin or resource. ## 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 | 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](/docs/build-an-app/) — the complete tutorial. - [Hosting and bridge](/docs/app-hosting/) — what happens after import. - [API reference](/docs/api/) — routes and enforcement. --- ## Hosting and bridge URL: https://rumahl.dev/docs/app-hosting/ Catalog, launch authority, isolated app origins, leases, the rumahl.bridge.v1 protocol and capability channels. Installed apps are not trusted shell code. The platform authorizes a launch for a live account, gives the window a short-lived lease and exposes only declared bridge methods. ## Catalog and launch authority The catalog is bounded and session-filtered. A launch is authorized again for the live account, installation and grants; an installation that was removed cannot authorize a replacement. | Route | Purpose | | --- | --- | | GET /api/v1/shell/apps | Bounded, session-filtered app catalog | | POST /api/v1/shell/apps/{id}/launch | Authorize launch and return a frame URL plus short-lived lease | | GET/POST /api/v1/shell/apps/{id}/runtime | Read runtime state or send a runtime action | | POST /api/v1/shell/apps/import | Import a verified package | | POST /api/v1/shell/capabilities/invoke | Invoke a declared capability through the platform | A launch response carries a frame URL, a lease and a renewal interval. The shell refreshes the catalog on snapshot revisions and at a regular interval, failing closed on errors. Web and container apps launch through the frame route. Native apps are headless and use the runtime route to start and stop their sandbox instead. ## Web isolation and leases - Each installation uses ` . `, normally `apps. `. - Assets are served under `/launch/ / `. - 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. > **A lease is not a platform token** > It authorizes asset transport for one frame, one session and one installation. It cannot be reused as a shell credential or a file path. ## The bridge protocol Web apps reach the shell only through `window.postMessage` using `rumahl.bridge.v1`. The channel is bound to the frame’s `contentWindow`; `event.origin` is `"null"` for a sandboxed app. Container apps are served on their installation host through the app-host proxy and do not receive a general action bridge. Native apps are headless and have no bridge channel in this release. | Method | Purpose | | --- | --- | | os.info | Bounded shell and app information | | os.theme.get / os.theme.changed | Read and follow the semantic OS palette | | os.settings.get / os.settings.set | Read or write the app’s own manifest settings | | os.notification | Send a user notification | | os.window.* | Close, minimize or focus the app window | | os.capabilities.invoke | Invoke another installed app’s declared capability | | os.warnings.* | Register, publish, test or clear OS weather warnings | | os.files.request / read / write | Consented personal-file access | | os.settings.get / os.settings.set | Read or write the app’s own settings | | os.net.request | Brokered HTTP(S) request to a consented origin | | pets.* | Optional pet interaction surface | **hosted app** ``` import { connectRumahlBridge } from "@rumahl/bridge-client"; const rumahl = connectRumahlBridge(); await rumahl.ready(); // Providers register one handler per declared capability. rumahl.provide('com.example.notes.search', async (invocation) => { const query = String(invocation.resource?.key ?? '').toLowerCase(); return notes .filter((note) => note.title.toLowerCase().includes(query)) .map((note) => ({ id: note.id, title: note.title })); }); ``` The app-side bridge client ships with the shell contracts. It binds messages to the current frame and refuses methods the app did not declare. The same client exposes settings, network, theme and window helpers. ## Capabilities and channels The capability registry is derived from installed apps. The platform grants each capability to existing accounts at install, but a grant still needs a live session and installation when it is used. - 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. - 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` persist manifest values bound to the installation. Apps that declare `com.rumahl.os.network` ask the platform to perform an HTTP(S) request to an origin the user approved for that installation. > **The network broker is for data, not for the interface** > CSS, JavaScript, fonts, icons and images belong in the signed package. Use com.rumahl.os.network for live data or a user-connected service, not for the UI shell. - Settings: `GET/PUT /api/v1/shell/apps/{id}/settings`. - Consent and file access: `/apps/{id}/grants` and `/apps/{id}/files/content`. - Network consent: `GET/PUT/DELETE /apps/{id}/network/consent`. - Brokered request: `POST /apps/{id}/network/request`. - The broker allows HTTP(S) only, follows no redirects, refuses link-local targets and never sends cookies. > **The app never gets the secret** > A secret setting is decrypted server-side for an approved request. The app receives the response, not the cookie jar, the socket or the plaintext credential. ## Runtime publication boundary **Web:** assets are published under `$RUMAHL_STATE_DIR/app-assets/ / ` and contain public assets only. The iframe is sandboxed without same-origin access. **Container:** the signed image archive is staged by the runtime supervisor, the container runs on a per-installation network without a published host port, and the root broker points nginx at the container’s private address. The app host sets a `__Host-` launch cookie and redirects to the declared endpoint; shell cookies and credentials are not forwarded. **Native:** the signed executable is staged by the supervisor and runs headless in a bubblewrap sandbox. There is no frame, no app-host route and no bridge. The app gets only its private `/data` directory and an isolated network unless the manifest requests egress. > **The bridge is a web contract, not a universal app API** > Container apps are reached through HTTP and the app-host proxy. Native apps have no bridge, app database, OIDC client, runtime secret or channel in this release. Do not describe those contracts as available. ## Next - [App packages](/docs/app-packages/) — the manifest and signing CLI. - [Connectors and identity](/docs/integrations/) — external services and OIDC. - [API reference](/docs/api/) — the complete route catalog. --- ## App lifecycle and data URL: https://rumahl.dev/docs/app-lifecycle/ The durable install and uninstall journal, app databases, secrets, OIDC registration and crash recovery. Installing an app crosses persistence, runtime, identity and secrets boundaries that cannot share one transaction. rumahl records ordered steps and can resume or compensate after a crash. ## Why a journal The platform snapshot, app databases, runtime preparation, OIDC registration and secret delivery are separate providers. A single process can fail between any two. The journal makes each step visible and recoverable; the platform snapshot is written last so live state cannot advertise resources that were never created. ## Install order **install** ``` optional app databases prepare runtime instance and secret namespace optional OIDC client registration activate runtime instance store platform snapshot ``` App code cannot start before its declared runtime secrets exist. A provider call that may have happened but was not confirmed stays `applying`; it is not retried blindly. ## Uninstall order **uninstall** ``` stop runtime remove runtime secrets revoke app grants and network consents revoke OIDC client remove prepared runtime retain app databases store removed platform snapshot ``` An interrupted uninstall resumes forward. Databases are moved into inaccessible retained storage; physical deletion is a separate purge policy that is not implemented yet. > **Retention is not deletion** > Uninstall removes access and runtime resources. It does not promise immediate physical erasure of app data. A purge workflow needs an explicit policy and audit path. ## Crash-visible states | Phase | Meaning | | --- | --- | | pending | Not started | | applying | Provider call may have happened; ambiguous after a crash | | applied | Provider confirmed success | | compensation-pending | A previous step must be reversed | | compensating | Reverse call in progress | | compensated | Reverse call confirmed | ## App databases Databases are optional and declared by logical names. The host path, engine, credentials and connection details belong to the provider, never the manifest. **manifest** ``` "databases": [ { "id": "primary" }, { "id": "search-index" } ] ``` - Every active database is addressed by `(installationId, appDatabaseId)`. - An app can declare at most eight databases. - SQLite is the first local provider. PostgreSQL remains a separate adapter; native apps have no database delivery contract in this release. - A new installation never inherits an old installation’s database. - Uninstall removes the binding; retained data is not silently reattached on reinstall. ## OIDC registration A web or container app may register as an OIDC relying party during installation. The journal treats registration as one more participant: a failed install compensates the client, and uninstall revokes it. OIDC is optional and is not required for a local web app. Native apps have no OIDC client contract and the validator rejects a native OIDC declaration. ## Current status > **App updates are OS-owned; staged rollout is not** > The OS checks enabled store sources, applies the all-apps or selected-app auto-update policy and runs updates as resumable platform jobs. App data is kept. Staged rollout, health-gated rollback and a public support window are still missing; do not promise a support period. ## Next - [Secrets and storage](/docs/secrets/) — encryption and runtime delivery. - [Identity and OIDC](/docs/identity/) — account and consent contracts. - [Testing and release](/docs/testing/) — how the journal is exercised. --- ## Runtime kinds URL: https://rumahl.dev/docs/runtime-kinds/ How web, container and native apps are installed and launched on rumahl OS, what isolation each runtime gets, and which distribution and trust programs are still missing. All three runtimes ship with an install and launch path. They differ in isolation, launch surface and operational contract. This page states what ships for each runtime, then lists the platform programs that are still missing. > **Status labels** > Web · available means a signed package, import, a sandboxed frame and the bridge. Container · available means a signed artifact, a staged image, a per-app network and an HTTP endpoint launched through the app-host proxy. Native · available means a signed executable staged by the supervisor and run in a bubblewrap sandbox under a default-deny policy. Themes · available means themes install locally and are distributed through the public store. Store · available means the public catalog at store.rumahl.com, with downloads and updates from github.com/rumahl/apps; apps and themes share it. Trust · revocation means publisher and key revocation exist; certification does not. ## Status at a glance | Runtime | Status | What that means | | --- | --- | --- | | web | available | Signed package, import, launch lease, sandboxed iframe and bridge. The public catalog is at store.rumahl.com; the installer runs from the setup page, and a support period is a separate program. | | container | available | Signed artifact, staged image, per-app Docker network, HTTP endpoint readiness and app-host proxy launch. A general non-HTTP action bridge is still missing. | | native | available | Signed executable, admin opt-in, publisher allowlist, one-time consent, supervisor staging, bubblewrap sandbox and headless start/stop. Brokered capabilities and syscall hardening are still missing. | | Themes | available | Theme packages install and run locally and are distributed through the same public store as apps. Certification and support rules are still missing. | | Store | available | The public storefront and catalog API live at store.rumahl.com ( /api/catalog ). Package downloads and updates resolve to github.com/rumahl/apps; the store implementation is github.com/rumahl/store.rumahl.com. | | Trust | revocation | Signed packages and publisher identity exist. Publisher and signing-key revocation block install, update and launch. There is no certification program, review authority or support promise. | ## What is still missing These are the remaining gaps between the runtime contracts and a complete public app platform. Some are implementation work; others are product, policy or process decisions. | Area | What is missing | | --- | --- | | Web | A long-term support/compatibility promise; the installer exists, a hardware support list does not | | Container | General action bridge for non-HTTP container apps | | Native | Seccomp/resource policy and brokered file, database, OIDC and channel contracts | | Themes | Theme certification and support rules | | Trust | Certification program, independent review authority, stable support promise, theme revocation | | System updates | Signed A/B bundles, per-slot kernels, a GRUB boot counter and automatic rollback are implemented. The bundle must be signed offline; hardware acceptance is pending. | | Installer | The setup page installs the running image to a disk. Supported hardware list, Secure Boot enforcement and data encryption are still missing. | > **These are gaps, not roadmap commitments** > The list describes what does not exist in this release. It is not a promise that every item will ship, or a support window for any runtime. ## Web — available A web app is a signed directory package with a `web-asset` entrypoint. The shell imports it, publishes the asset tree under the installation root, authorizes a launch lease and hosts the app in a sandboxed iframe without `allow-same-origin`. Platform features go through `rumahl.bridge.v1`; the app never receives the shell session. The public store at `store.rumahl.com` provides the catalog and storefront. Package downloads and updates resolve to `github.com/rumahl/apps`. The same public store lists themes. ### Still missing - A supported installer for a production OS image. - A long-term support period and compatibility promise for the shell and web apps. **web manifest excerpt** ``` { "runtime": { "kind": "web", "entrypoints": [ { "id": "main", "kind": "web-asset", "path": "index.html" } ] }, "lifecycle": "on-demand" } ``` Start with [Build your first app](/docs/build-an-app/) for the working developer path. ## Container — available A container app declares one OCI/Docker image and one HTTP endpoint. The runtime supervisor stages the image through the authenticated image socket, creates a per-installation Docker network and starts the container without publishing a host port. The app host proxy reaches the container's private address, and the root broker writes the installation's nginx upstream. - Launch is authorized for one live account, installation and lease; the app host sets a `__Host-` launch cookie and redirects to the declared endpoint. - Containers are read-only, non-root, capability-free, `no-new-privileges`, PID- and memory-limited, with a private data mount. - Egress is isolated unless the manifest requests `com.rumahl.os.network`. - Activation waits for the declared endpoint and optional health path; an unreachable service is stopped instead of being left running behind a broken route. - `always-on` services restart with `unless-stopped`; on-demand apps start on launch and stay stopped after a manual Stop. - WebSocket traffic is proxied through the same authenticated app host. **container manifest excerpt** ``` { "runtime": { "kind": "container", "entrypoints": [ { "id": "service", "kind": "container-artifact", "path": "runtime/server.oci" }, { "id": "main", "kind": "endpoint", "endpoint": "web" } ] }, "lifecycle": "always-on" } ``` > **The image is inside the package signature, not separately signed** > The package signature covers the image archive and every declared file. The OCI image itself is not independently signed. The app-host proxy protects browser routing; it does not make every local process on the device unable to reach the container bridge address. ### Still missing - A general bidirectional action bridge for containers that are not plain HTTP services. ## Native — available under a default-deny policy A native app declares exactly one signed `native-artifact`: a package-relative executable and a target ABI. The validator accepts it only when the ABI matches the host, and installation additionally requires the administrator to enable native execution and allow the publisher. - Device policies: `rumahl.apps.native_enabled` defaults to `false`; `rumahl.apps.native_publishers` defaults to an empty list. - Non-web installs require the one-time consent token bound to the user, session, runtime and manifest digest. - The supervisor stages the executable through the authenticated native socket, verifies the SHA-256 and writes a content-addressed file under the supervisor-owned runtime tree. The platform service cannot write that tree directly. - The executable runs in an unprivileged bubblewrap sandbox: user, mount, PID, IPC, UTS, cgroup and network namespaces; no capabilities; a cleared environment; a read-only system; a private writable `/data`; no host home, platform state or Docker socket. - Native apps are headless. The launcher opens their management page; Start, Stop and Restart use the normal runtime API. There is no iframe and no `rumahl.bridge.v1` channel. - Native apps have no app database, OIDC client, runtime secret, channel descriptor or brokered network path in this release. Network egress is all-or-nothing through `com.rumahl.os.network`. **native manifest excerpt** ``` { "runtime": { "kind": "native", "entrypoints": [ { "id": "main", "kind": "native-artifact", "path": "runtime/helper", "abi": "x86_64-unknown-linux-gnu" } ] }, "lifecycle": "on-demand" } ``` > **Native is not a permission bypass** > The sandbox is the boundary. A native app does not inherit host access from the package signature, and enabling native execution does not grant files, databases, OIDC or the bridge. Those contracts do not exist for native apps yet. ### Still missing - A seccomp or equivalent syscall policy in addition to the namespace and filesystem boundary. - Brokered file, database, OIDC and channel contracts for native apps. - Resource accounting and automatic handling of already-running apps when a publisher is revoked. Native packages are distributed through the same public store as web, container and theme packages. ## Themes — distributed through the public store RUI theme packages install and run locally: tokens, modes, parameters, code layers and consent are documented in the theme guides. Distributed themes use the same public marketplace as apps: the catalog and storefront are at `store.rumahl.com`, and downloads and updates resolve to `github.com/rumahl/apps`. Local package installation remains for development, offline use and private themes. ### Missing - Theme certification and a support promise. - Theme revocation and update rules that match app packages. See [Themes](/docs/themes/) and [Theme packages](/docs/themes/packages/) for the package workflow. ## Trust — signatures, publisher identity and revocation Packages are verified against the device trust store: Ed25519 over the exact manifest bytes and SHA-256 over every payload file. The trust store can also revoke a publisher or a signing key. - `revokedPublishers` and `revokedKeys` are explicit arrays in the trust store. A revoked package cannot be previewed as installable, installed or updated. - The platform loads revocations on startup. A matching installed app stays visible for inspection and uninstall, but launch and start are denied. Status remains readable, and an already-running process can still be stopped. - Changing the trust store requires a platform restart. A malformed configured trust store stops startup instead of silently dropping revocations. - Theme packages are not covered by package revocation yet. ### Missing - A certification program and an independent review authority. - A stable support promise with an owner and an expiry policy. - Revocation and certification rules for distributed themes. See [Review](/docs/review/), [Certification and trust](/docs/certification/) and [Store](/docs/store/) for the current review and store process. ## Choosing a runtime | If you need… | Choose | | --- | --- | | A signed app with a UI and local state | Web | | A static app that consumes capabilities or broker network access | Web | | An always-on service with an HTTP endpoint | Container | | A headless signed executable under an administrator policy | Native | | Direct host integration | Not available through an app; use an isolated platform service by design | | A theme for the shell | The public store at store.rumahl.com, or a local package | ## Next - [App packages and manifest](/docs/app-packages/) — every field and limit. - [Hosting and bridge](/docs/app-hosting/) — catalog, leases and the web bridge. - [Themes](/docs/themes/) — the local theme workflow. - [API reference](/docs/api/) — runtime, package and launch routes. --- ## Connect a service URL: https://rumahl.dev/docs/integrations/ Integration levels, connector bundles, brokered network access and OpenID Connect for local services. rumahl connects existing services instead of replacing them. The integration level describes who owns installation and updates — not what the app is allowed to do. ## Three integration levels | Level | What rumahl does | What stays independent | | --- | --- | --- | | Connected | Links an existing service over its API or URL | The service keeps its own lifecycle, accounts and data | | Enhanced | Adds the optional rumahl Connector for deeper capabilities | The upstream service remains the system of record | | Native | Installs and manages a supported system | The integration still depends on declared capabilities, not installation magic | Installation level never grants permissions. A native app and a connected app use the same permission and capability checks. ## Connectors A connector bundle targets an external service such as Nextcloud, Plex or Home Assistant. The OS installs the bundle, registers the app as an OIDC relying party for that service and exposes the chosen capabilities through the platform. **manifest excerpt** ``` "connectors": [ { "target": "nextcloud", "entrypoint": "main" } ] ``` > **No frozen universal connector API yet** > The broader connector specification for arbitrary NAS and smart-home providers is product direction. Provider support varies; the documentation describes current implementation boundaries. ## Brokered network access An integration app often needs to reach a LAN service, but it must not receive a socket or a cookie jar. The platform performs the HTTP(S) request after the user approves the exact origin for that installation. **manifest excerpt** ``` "permissions": [ { "id": "com.rumahl.os.network", "scope": "user-selected", "required": true } ], "settings": [ { "key": "ha.url", "title": "Home Assistant address", "type": "text", "required": true }, { "key": "ha.token", "title": "Access token", "type": "secret", "required": true } ] ``` | Contract | Boundary | | --- | --- | | Consent | Per installation, user and exact origin; session-bound or durable with an expiry | | Transport | HTTP(S) only, no credentials in the URL, no fragments, no redirect following | | Targets | Link-local, unspecified, broadcast and multicast are refused even after DNS resolution | | Secrets | Decrypted server-side and attached by the platform; never returned to the app | | Cookies | Never sent; response Set-Cookie is never exposed | A denied request returns `403` with a reason such as `approval-required`. The shell can then ask the user to approve the exact origin rather than silently retrying. ## Identity and OIDC rumahl OS is its own standards-compliant OpenID Provider for installed applications. Local accounts stay local; a service can authenticate a user without turning rumahl into a cloud identity provider. | Endpoint | Purpose | | --- | --- | | /.well-known/openid-configuration | Provider metadata | | /oauth2/jwks | Public signing keys | | /oauth2/authorize | Authorization request | | /oauth2/authorize/approve | Explicit consent | | /oauth2/token | Token exchange | | /oauth2/userinfo | User information for authorized clients | > **OIDC is not a prerequisite for every app** > An app can use local data, capabilities or OIDC independently. External services retain their own users and permissions; signing in to rumahl does not silently sign you in to Nextcloud. ## Designing the boundary - Request the narrowest permission scope that supports the feature. - Keep service data in the service unless there is a clear reason to copy it. - Use `Resource` references, never host paths. - Test revocation: consent removal must take effect on the next request. - The integration level is a lifecycle decision, not a shortcut around authorization. ## Next - [Hosting and bridge](/docs/app-hosting/) — how a hosted app reaches the platform. - [App packages](/docs/app-packages/) — manifest fields and signing. - [API reference](/docs/api/) — consent and network routes. --- ## Permissions and capabilities URL: https://rumahl.dev/docs/permissions/ Permission scopes, grants, the OS catalog, bridge capabilities and app-to-app communication through the platform. 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. ## The model | Term | Meaning | | --- | --- | | Permission | A declared need with a scope. The platform decides whether it is granted. | | Grant | An explicit decision for a subject, permission, scope, resource and validity. | | Capability | A named operation an installed app provides to other apps. | | Bridge method | A versioned message such as os.info or os.capabilities.invoke. | > **Three separate decisions** > Installation does not grant permissions. A capability declaration does not grant a caller access. A rendered button is not authorization. Each is checked at the platform boundary. ## Permission scopes | Scope | Use | | --- | --- | | app-private | Data owned by one installation only | | user-own | Resources belonging to the current account | | user-selected | The user picks the exact resources or origin | | explicit | A grant names concrete resource keys | | family-shared | A shared family/resource boundary | | system | Platform-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. | Permission | Allowed scopes | Purpose | | --- | --- | --- | | rumahl.files.read | user-selected, explicit | Read personal files the user selected | | rumahl.files.write | user-selected, explicit | Write personal files the user selected | > **Unknown OS permissions are rejected** > A manifest that requests rumahl.files.delete is rejected before a grant can exist. Do not assume a permission family exists because one member does. ## 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 | Route | Purpose | | --- | --- | | GET /api/v1/shell/apps/{id}/grants | Read requested grants and current decisions | | PUT /api/v1/shell/apps/{id}/grants | Issue explicit consent | | DELETE /api/v1/shell/apps/{id}/grants/{grant} | Revoke one grant | | GET/PUT/DELETE /api/v1/shell/apps/{id}/network/consent | List, 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. | Capability | Methods | | --- | --- | | com.rumahl.os.info | os.info | | com.rumahl.os.theme | os.theme.get, theme updates via os.theme.changed | | com.rumahl.os.notification | os.notification | | com.rumahl.os.window | os.window.close, minimize, focus | | com.rumahl.os.capabilities | os.capabilities.invoke | | com.rumahl.os.settings | os.settings.get, os.settings.set | | com.rumahl.os.network | os.net.request | | com.rumahl.os.warnings | os.warnings.register, publish, test, clear | | rumahl.files.read / write | os.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" }); ``` > **A capability can return a browser delivery** > If the authorized provider is a running web app, the platform returns a browser-delivery instruction and the shell finishes the request in that frame. The caller does not need the provider’s iframe reference. ## Denial and debugging | Symptom | What to check | | --- | --- | | 403 on a capability call | Caller permission, provider declaration, live installation and session | | Method refused | The app did not declare the capability for that bridge method | | Provider not found | The provider is installed but not running; retry or open it | | Network denial | The exact origin is not approved, or consent was revoked | | File denial | The 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 - [Hosting and bridge](/docs/app-hosting/) — leases and isolation. - [App packages](/docs/app-packages/) — manifest fields. - [SDKs and npm](/docs/sdks/) — bridge client, contracts and install steps. --- ## API reference URL: https://rumahl.dev/docs/api/ The current rumahl OS route catalog: shell, apps, files, streams, consent, admin, recovery, OIDC and the bridge. Every documented rumahl OS route in one place: shell state, files, apps, consent, streams, admin, recovery, OIDC and the app bridge. The current release is the source of truth. ## One authorization boundary A shell action and an app bridge call both end at the same platform boundary. The browser sends a same-origin request with the session cookie; the gateway checks Host, Origin and CSRF; Rust revalidates the live account, session, installation and grants before the operation runs. **request flow** ``` shell action / app bridge ↓ same-origin request + session cookie ↓ gateway: Host, Origin, CSRF ↓ Rust: account, session, installation, grants ↓ domain operation or denial ``` A rendered control is never proof of permission. Hiding a button is not authorization. For request shapes, limits and complete examples, read the [HTTP API guide](/docs/api-guide/). For the app-side method surface, read the [Bridge SDK reference](/docs/bridge-reference/). ## Base URL and request rules - Routes are relative to the running instance, for example `https:// `. Development uses `https://localhost:8443`. - A local password login issues a fresh 12-hour `__Host-` session cookie. - Mutating `/api/v1/` requests require the exact shell Origin. - Foreign Host headers and missing CSRF protection are rejected. - Private responses are `no-store` and are never cached by the offline worker. - App windows never receive the shell session token or a broad bearer credential. ## Shell, session and preferences **Shell and session** 13 routes GET `/` Server-rendered shell document GET `/api/v1/shell/snapshot` Current shell, account, app and session state GET `/api/v1/device/addresses` Display-safe allowed device origins GET `/api/v1/shell/events` Live shell events GET/PUT `/api/v1/shell/preferences` Load or save preferences GET/PUT `/api/v1/shell/os-mode` Load or save the presentation mode GET/PUT `/api/v1/shell/workspace` Load or save workspace state GET `/api/v1/shell/config` Display-safe platform configuration GET `/api/v1/shell/widgets/{id}/frame` Widget frame POST `/api/v1/shell/surfaces/{id}/frame` Shell surface frame POST `/api/v1/shell/report` Client report to the platform POST `/api/v1/shell/reauthenticate` Re-check the password for the lock screen GET `/api/v1/shell/theme-policy` Effective theme policy for the account ## Files and workspace **Files** 8 routes GET/POST/PUT/DELETE `/api/v1/shell/fs` List, create, rename or remove shell-visible entries GET/PUT `/api/v1/shell/fs/content` Read or write shell-visible file content GET `/api/v1/shell/fs/resolve` Resolve a shell-visible path GET `/api/v1/files` List personal files POST `/api/v1/files` Create a file or folder PUT `/api/v1/files` Move or rename an entry DELETE `/api/v1/files` Remove an entry GET/PUT `/api/v1/files/content` Download or write personal file content Workspace and file requests stay behind the same session and origin checks. Resources are logical references, not arbitrary host paths. ## Apps and capabilities **Apps** 10 routes GET `/api/v1/shell/apps` Bounded, session-filtered app catalog POST `/api/v1/shell/apps/{id}/launch` Authorize launch and return a frame URL plus short-lived lease GET/PUT `/api/v1/shell/apps/{id}/settings` Read or write manifest-declared settings GET `/api/v1/shell/apps/{id}/data` Scoped app data GET/POST `/api/v1/shell/apps/{id}/runtime` Read runtime state or send a runtime action POST `/api/v1/shell/apps/import` Import a verified package DELETE `/api/v1/shell/apps/{id}` Uninstall an app POST `/api/v1/shell/capabilities/invoke` Invoke a declared capability through the platform GET `/api/v1/shell/apps/{id}/image` Recorded app image diagnostics GET `/api/v1/shell/apps/{id}/storage` App storage diagnostics The catalog is session-filtered. Launch and renewal authorize the live account, installation and grants again. ## App consent, files and network **Consent and network** 5 routes GET/PUT `/api/v1/shell/apps/{id}/grants` Read requested grants or issue explicit consent DELETE `/api/v1/shell/apps/{id}/grants/{grant}` Revoke one grant GET/PUT `/api/v1/shell/apps/{id}/files/content` Read or write consented app files GET/PUT/DELETE `/api/v1/shell/apps/{id}/network/consent` List, approve or revoke an origin consent POST `/api/v1/shell/apps/{id}/network/request` Brokered HTTP(S) request with server-side secrets Installation grants nothing. Each request is checked against the live installation, account, session and explicit consent. ## Streams and app store **Streams and store** 8 routes GET `/api/v1/shell/streams` List available service streams POST `/api/v1/shell/streams/{id}/grant` Grant a stream scope GET `/api/v1/shell/streams/{id}/api/websockets` WebSocket proxy for a stream GET `/api/v1/shell/streams/{id}/` Stream root GET `/api/v1/shell/streams/{id}/{*tail}` Same-origin stream asset proxy GET `/api/v1/shell/store/fetch` Fetch an app-store resource GET `/api/v1/shell/store/image` Proxy an app-store image POST `/api/v1/shell/store/trust` Write the app-store trust file ## Store, install jobs, updates and network These routes are OS-owned: the platform persists the state, downloads packages and applies system updates. The shell only asks and polls; closing a window does not abort an operation. **Store sources and update policy** 4 routes GET/PUT `/api/v1/shell/store/sources` Read or save the account source list GET/PUT `/api/v1/shell/store/updates` Read or save the app auto-update policy GET `/api/v1/shell/store/updates/state` Last update check and pending app updates POST `/api/v1/shell/store/updates/check` Run an update check now The official store is the default until the account saves its own list. The scheduler checks enabled sources in the background. **OS install jobs** 6 routes POST `/api/v1/shell/apps/preview` Validate a package and return its preview POST `/api/v1/shell/apps/install` Start an OS-owned install or update job GET `/api/v1/shell/apps/installs` List active install jobs GET `/api/v1/shell/apps/install/{job}` Poll job progress, consent or error POST `/api/v1/shell/apps/install/{job}/confirm` Confirm an install after consent POST `/api/v1/shell/apps/install/{job}/cancel` Cancel a queued or parked job Install, preview and package downloads run as platform jobs. The shell receives progress and a consent preview; it never streams package bytes through the app frame. **System updates** 4 routes GET/PUT `/api/v1/shell/system-updates` Read state or save channel and auto-download POST `/api/v1/shell/system-updates/check` Check the release repository now POST `/api/v1/shell/system-updates/download` Download the selected release POST `/api/v1/shell/system-updates/install` Apply a downloaded release The platform checks the fixed release repository. Applying an update requires an administrator and the privileged image updater. **Network configuration** 1 routes GET/PUT `/api/v1/shell/network` Read the observed network or apply a static configuration Static IPv4, gateway and DNS are validated and applied through the privileged host-config broker. The platform service never writes network files itself. ## Weather warnings **OS-owned warnings** 5 routes GET `/api/v1/shell/warnings` Active warnings and revision POST `/api/v1/shell/warnings/register` Register a warning publisher POST `/api/v1/shell/warnings/publish` Publish a warning batch POST `/api/v1/shell/warnings/clear` Clear published warnings POST `/api/v1/shell/warnings/test` Publish a test warning Publishing and test warnings require the relevant app capability and policy. ## Administration **Admin** 10 routes GET/POST `/api/v1/admin/users` List or create local users PATCH/DELETE `/api/v1/admin/users/{id}` Update or remove a local user POST `/api/v1/admin/users/{id}/password` Set a user password GET `/api/v1/admin/sessions` List sessions DELETE `/api/v1/admin/sessions/{id}` Revoke one session GET `/api/v1/admin/audit` Read the admin audit trail GET/PUT `/api/v1/admin/policies` Read or set account and device policies GET/POST `/api/v1/admin/groups` List or create groups DELETE `/api/v1/admin/groups/{id}` Delete a group PUT `/api/v1/admin/groups/{id}/members` Update group membership Requires an administrator actor. This surface is not exposed to an ordinary app window. ## Recovery API The recovery environment is served directly by Rust and does not need the React desktop or SSR renderer. Host power and maintenance actions require the separate recovery broker, peer-UID checks and an operator allowlist. **Recovery** 21 routes GET `/recovery` Recovery page GET `/recovery.js` Recovery client GET `/api/v1/recovery/status` Recovery status GET `/api/v1/recovery/audit` Recovery audit GET `/api/v1/recovery/components` Components GET `/api/v1/recovery/sensors` Sensors GET `/api/v1/recovery/storage` Storage GET `/api/v1/recovery/disks` Disks POST `/api/v1/recovery/disk-test` Run a disk test GET `/api/v1/recovery/diagnostics` Diagnostics GET `/api/v1/recovery/network` Network state POST `/api/v1/recovery/network-test` Run a network test GET `/api/v1/recovery/logs` Logs GET `/api/v1/recovery/crashes` Crash records GET `/api/v1/recovery/boot` Boot state GET `/api/v1/recovery/system` System information POST `/api/v1/recovery/quarantine` Quarantine an item GET/PUT `/api/v1/recovery/settings` Read or update recovery settings GET/POST `/api/v1/recovery/host` Host status or an allowed host action POST `/api/v1/recovery/restart` Restart through the recovery broker POST `/api/v1/recovery/self-heal` Run self-heal ## OpenID Connect **Standards endpoints** 6 routes GET `/.well-known/openid-configuration` Provider metadata GET `/oauth2/jwks` Public signing keys GET `/oauth2/authorize` Authorization request POST `/oauth2/authorize/approve` Explicit consent POST `/oauth2/token` Token exchange GET `/oauth2/userinfo` User information for authorized clients rumahl OS is its own OpenID Provider for installed applications. Local account and session rules still apply. ## Bridge methods | Method | Purpose | | --- | --- | | os.info | Bounded shell and app information | | os.theme.get / os.theme.changed | Read and follow the semantic OS palette | | os.notification | Send a user notification | | os.window.close / minimize / focus | Control the app’s own window | | os.capabilities.invoke | Invoke another installed app’s declared capability | | os.warnings.register / publish / test / clear | OS-owned weather-warning source | | os.files.request / read / write | Consented personal-file access | | os.settings.get / os.settings.set | Read or write the app’s own settings | | os.net.request | Brokered HTTP(S) request to a consented origin | | pets.state / interact / action.register / action.unregister | Optional pet interaction surface | The bridge uses `window.postMessage` with protocol `rumahl.bridge.v1`. The channel is bound to the frame’s `contentWindow`; a sandboxed app has origin `"null"`. ## Errors and denial - 2xx: the request was accepted; 4xx: authentication, permission or request validation; 5xx: the platform operation failed. - Permission request is not permission grant. Installation and capability discovery do not create a grant. - Unknown bridge methods and unknown manifest fields are rejected rather than ignored. - A session or UI mode never grants recovery, maintenance or admin rights. - Do not retry a denied mutation with a different origin or a cached private response. > **The source checkout wins** > This page tracks the current release. When a route changes, update the API reference together with the platform code and tests. --- ## HTTP API guide URL: https://rumahl.dev/docs/api-guide/ How to call the rumahl OS HTTP API: sessions, origin checks, request bodies, response shapes, limits, errors and complete examples for apps, settings, capabilities and the store. The conventions behind every route: how a request is authenticated, which checks run before the handler, the limits on each body and the shapes returned by the app, settings, capability and store endpoints. ## Base URL and versions Routes are relative to the running instance. Development uses `https://localhost:8443`; production uses the device’s HTTPS hostname. There is no public shared shell API host; the public store API is a separate service at `store.rumahl.com`. **shell** ``` # development export RUMAHL=https://localhost:8443 # inspect the current shell session curl --cookie session.txt "$RUMAHL/api/v1/shell/snapshot" ``` Response documents carry a version field where the shape is public: `catalogVersion`, `launchVersion`, `importVersion`, `settingsVersion`, `networkVersion` and `capabilityVersion`. Treat an unknown version as unsupported. ## Session and origin checks | Check | Rule | | --- | --- | | Session | A live __Host- session cookie, issued by a local password login | | Lifetime | 12 hours; a new login issues a fresh cookie | | Origin | Mutating /api/v1/ requests require the exact shell origin | | Host | Foreign Host headers are rejected by the gateway | | CSRF | Cross-site form posts and missing CSRF protection are rejected | | Cache | Private responses are no-store and are not cached by the offline worker | | App windows | Never receive the shell session token or a broad bearer credential | > **Browser and app are different callers** > A shell page calls the API with the session cookie. An installed app calls the bridge; the shell performs the HTTP request on its behalf. An app iframe cannot call the shell API directly. ## Request headers **request shape** ``` GET /api/v1/shell/apps HTTP/1.1 Host: localhost:8443 Cookie: __Host-rumahl_session=… Accept: application/json POST /api/v1/shell/apps/com.example.notes/launch HTTP/1.1 Host: localhost:8443 Origin: https://localhost:8443 Cookie: __Host-rumahl_session=… Content-Type: application/json {"installationId":"0199…"} ``` Mutating routes expect `Content-Type: application/json` unless documented otherwise. The launch route returns `415` for a missing or wrong content type, `403` for a wrong origin and `400` for an unexpected body key. ## Example: read the app catalog **shell** ``` curl --cookie session.txt \ "$RUMAHL/api/v1/shell/apps" ``` **catalog response** ``` { "catalogVersion": 1, "apps": [ { "id": "com.example.notes", "installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f", "title": "Notes", "version": "1.4.0", "launchable": true, "revoked": false, "capabilities": [ "com.rumahl.os.info", "com.rumahl.os.theme", "com.rumahl.os.settings" ], "runtime": "web", "lifecycle": "on-demand", "connectors": [] } ] } ``` The catalog is filtered by the live account. Installation alone does not mean launchable: `launchable` also depends on published assets and the runtime. A `revoked` app stays visible but cannot launch or start. Native apps are headless, so their catalog entry is not launched through the frame route; use the runtime route to start and stop the sandbox. ## Example: launch an app **shell** ``` curl --cookie session.txt \ -H "Origin: $RUMAHL" \ -H "Content-Type: application/json" \ -d '{"installationId":"0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f"}' \ "$RUMAHL/api/v1/shell/apps/com.example.notes/launch" ``` **launch response** ``` { "launchVersion": 1, "id": "com.example.notes", "installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f", "lease": "6f6a1c2d3e4f…", "frameUrl": "https://0199….apps.localhost/launch/…/index.html", "renewAfterSeconds": 30 } ``` | Field | Meaning | | --- | --- | | lease | A narrow bearer capability bound to one session and installation | | frameUrl | The sandboxed app URL; assets are served only under the lease | | renewAfterSeconds | Renew before 90 seconds elapse or the frame is removed | Renew by sending the same body with the existing `lease`. A missing or unauthorized app returns `404`; unavailable storage or configuration returns `503`. In safe mode the route returns `423` with `{"launchError":"safe-mode"}`. > **The lease is not a platform token** > It authorizes one app’s assets for one session. It cannot call shell APIs, read arbitrary files or be reused by another installation. ## Example: import a signed package **import request (shape)** ``` { "importVersion": 1, "files": [ { "path": "package.json", "content": "" }, { "path": "package.sig.json", "content": "" }, { "path": "frontend/index.html", "content": "" } ], "device": "0199…", "installOrigin": "store" } ``` **import response** ``` { "importVersion": 1, "id": "com.example.notes", "installationId": "0199a0d2-7e1c-7c2a-9b6e-6f6a1c2d3e4f", "title": "Notes", "version": "1.4.0" } ``` The importer verifies the detached Ed25519 signature and every SHA-256 digest before publishing assets. A package that fails verification is rejected; a policy denial returns `403 {"error":"denied"}`. The request body is capped at 32 MiB. ## Example: read and write app settings **shell** ``` curl --cookie session.txt \ "$RUMAHL/api/v1/shell/apps/com.example.notes/settings?installationId=0199…" curl --cookie session.txt -X PUT \ -H "Origin: $RUMAHL" -H "Content-Type: application/json" \ -d '{"values":{"server.url":"https://nas.local","server.token":"secret"}}' \ "$RUMAHL/api/v1/shell/apps/com.example.notes/settings?installationId=0199…" ``` **settings response** ``` { "settingsVersion": 1, "id": "com.example.notes", "installationId": "0199…", "manifest": [ { "key": "server.url", "title": "Server address", "description": null, "type": "text", "required": true, "options": [] }, { "key": "server.token", "title": "Access token", "description": null, "type": "secret", "required": true, "options": [] } ], "values": { "server.url": "https://nas.local" }, "secrets": ["server.token"], "extended": null } ``` Secret plaintext is never returned. A write is validated against the manifest kind, a secret is sealed with the platform field cipher and a required value must be present after the write. ## Example: invoke a capability **shell** ``` curl --cookie session.txt -X POST \ -H "Origin: $RUMAHL" -H "Content-Type: application/json" \ -d '{"capability":"com.example.notes.search","resource":{"namespace":"com.example.notes","kind":"query","key":"monstera"}}' \ "$RUMAHL/api/v1/shell/capabilities/invoke" ``` **invoke response** ``` { "capabilityVersion": 1, "outcome": "invoked", "result": [{ "id": "2", "title": "Water the monstera" }], "browser": { "appId": "com.example.notes", "installationId": "0199…" } } ``` For a running web provider, `browser` tells the shell which frame receives the `provider.invoke` request. A denied call returns an outcome of `denied`; a missing permission or unknown capability is a denial, not an empty result. ## Example: fetch a store index **shell** ``` curl --cookie session.txt \ "$RUMAHL/api/v1/shell/store/fetch?url=https%3A%2F%2Fstore.example%2Findex.json" ``` **index response (shape)** ``` { "storeVersion": 1, "name": "Example Store", "apps": [ { "id": "com.example.notes", "title": "Notes", "version": "1.4.0", "packageUrl": "https://store.example/packages/notes.package.json" } ] } ``` | Condition | Result | | --- | --- | | HTTP URL, credentials or fragment | Rejected | | Redirect | Not followed | | Timeout | 15 seconds | | Document too large | Rejected above 32 MiB | | Untrusted certificate | 428 with host and leaf SHA-256 fingerprint | | Successful fetch | The source JSON, proxied through the authenticated bridge | ## Status codes and error handling | Status | Meaning | Action | | --- | --- | --- | | 400 | Malformed body, query or content type | Fix the request; do not retry unchanged | | 401 | No live session | Log in again | | 403 | Wrong origin, CSRF, missing grant or policy denial | Do not retry; show the consent or sign-in path | | 404 | Unknown or unauthorized app/resource | Treat as not found; do not infer existence | | 413 | Body above the route limit | Reduce the payload | | 415 | Unsupported content type | Send application/json | | 423 | Safe mode or locked state | Open recovery; do not loop | | 428 | Certificate trust required | Show the fingerprint and ask the user | | 500 | Unexpected server error | Retry once, then show diagnostics | | 503 | Storage or runtime unavailable | Retry later; fail closed | > **Private responses are not cached** > Do not store shell or app responses in a service worker, localStorage or a shared proxy. The platform sends no-store for a reason. ## Request limits | Route | Body limit | | --- | --- | | POST /api/v1/shell/apps/{id}/launch | 1 KiB | | POST /api/v1/shell/capabilities/invoke | 4 KiB | | POST /api/v1/shell/report | 4 KiB | | DELETE /api/v1/shell/apps/{id} | 2 KiB | | GET/PUT /api/v1/shell/apps/{id}/settings | 256 KiB | | POST /api/v1/shell/apps/preview | 32 MiB | | POST /api/v1/shell/apps/install | 32 MiB | | POST /api/v1/shell/apps/import | 32 MiB | | POST /api/v1/shell/reauthenticate | 2 KiB | | PUT /api/v1/shell/network | 4 KiB | | PUT /api/v1/shell/store/sources | 32 KiB | | PUT /api/v1/shell/store/updates | 64 KiB | | PUT /api/v1/shell/system-updates | 4 KiB | | POST /api/v1/shell/system-updates/* | 2 KiB | ## Route catalog **Apps** 8 routes GET `/api/v1/shell/apps` Bounded, session-filtered app catalog POST `/api/v1/shell/apps/{id}/launch` Authorize launch and return a frame URL plus lease GET/PUT `/api/v1/shell/apps/{id}/settings` Read or write manifest settings GET `/api/v1/shell/apps/{id}/data` Scoped app data GET/POST `/api/v1/shell/apps/{id}/runtime` Read runtime state or send an action POST `/api/v1/shell/apps/import` Import a verified package DELETE `/api/v1/shell/apps/{id}` Uninstall an app POST `/api/v1/shell/capabilities/invoke` Invoke a declared capability The catalog is session-filtered. Launch and renewal re-authorize the live account, installation and grants. **Consent and network** 5 routes GET/PUT `/api/v1/shell/apps/{id}/grants` Read or issue explicit consent DELETE `/api/v1/shell/apps/{id}/grants/{grant}` Revoke one grant GET/PUT `/api/v1/shell/apps/{id}/files/content` Read or write consented app files GET/PUT/DELETE `/api/v1/shell/apps/{id}/network/consent` List, approve or revoke an origin POST `/api/v1/shell/apps/{id}/network/request` Brokered HTTP(S) request Installation grants nothing. Each request is checked against the live installation, account, session and explicit consent. **Store** 7 routes GET `/api/v1/shell/store/fetch` Fetch a store index or package document GET `/api/v1/shell/store/image` Proxy and validate source artwork POST `/api/v1/shell/store/trust` Write the source certificate trust file GET/PUT `/api/v1/shell/store/sources` Read or save the OS-owned source list GET/PUT `/api/v1/shell/store/updates` Read or save the app auto-update policy GET `/api/v1/shell/store/updates/state` Last check and pending app updates POST `/api/v1/shell/store/updates/check` Run an app update check Sources are untrusted catalogue providers. The shell fetches through the authenticated bridge and verifies packages on import. **Install jobs** 6 routes POST `/api/v1/shell/apps/preview` Validate a package without installing it POST `/api/v1/shell/apps/install` Start an OS-owned install or update GET `/api/v1/shell/apps/installs` List active jobs GET `/api/v1/shell/apps/install/{job}` Job progress and consent preview POST `/api/v1/shell/apps/install/{job}/confirm` Confirm a parked install POST `/api/v1/shell/apps/install/{job}/cancel` Cancel a queued or parked job Install and preview jobs run in the platform. The shell starts a job, polls it and confirms once consent is known; a reload reconnects through `/installs`. **System updates** 4 routes GET/PUT `/api/v1/shell/system-updates` State, channel and auto-download policy POST `/api/v1/shell/system-updates/check` Check releases now POST `/api/v1/shell/system-updates/download` Download the selected release POST `/api/v1/shell/system-updates/install` Apply a downloaded release Fixed release repository, stable/beta channels and optional stable auto-download. Applying requires an administrator and the privileged updater. **Network** 1 routes GET/PUT `/api/v1/shell/network` Observed network or a new static configuration The platform validates static IPv4, gateway and DNS and asks the root host-config broker to apply them. ## Next - [API reference](/docs/api/) — every route in the current release. - [Bridge SDK reference](/docs/bridge-reference/) — the app-side contract. - [Permissions](/docs/permissions/) — grants, scopes and consent. - [Troubleshooting](/docs/troubleshooting/) — status codes and diagnostics. --- ## Bridge SDK reference URL: https://rumahl.dev/docs/bridge-reference/ The complete rumahl.bridge.v1 app-side contract: handshake, methods, types, settings, network requests, capability providers and error handling. The typed client for an app running inside rumahl OS. It performs the handshake, binds messages to the parent frame and exposes the complete v1 method surface. ## Import the client `@rumahl/bridge-client` is a workspace package in the rumahl repository. It is not published to npm today. Inside the frontend workspace, import it directly. A standalone app should vendor the client or copy the protocol from `@rumahl/contracts/bridge`. **app/bridge.ts** ``` import { connectRumahlBridge, applyRumahlTheme, RumahlBridgeError } from "@rumahl/bridge-client"; import type { BridgeAppInfo, BridgeTheme, BridgeSettings, BridgeNetworkRequest, BridgeCapabilityResult } from "@rumahl/bridge-client"; ``` > **Safe outside the shell** > When the page is opened in a normal browser, available is false and every call rejects with not-embedded. Use that to provide a standalone preview without branching your whole app. ## Connect and dispose **app/connect.ts** ``` const rumahl = connectRumahlBridge({ timeoutMs: 5000, handshakeRetryMs: 600 }); // The shell must acknowledge the handshake before app identity is known. const welcome = await rumahl.ready(); // { appId: "com.example.notes", methods: ["os.info", "os.theme.get", ...] } if (!rumahl.available) { // Standalone browser preview. } rumahl.appId; // string | null // Remove listeners and reject every pending call. window.addEventListener("pagehide", () => rumahl.dispose(), {once: true}); ``` | Member | Type | Meaning | | --- | --- | --- | | available | boolean | True when a parent shell frame exists | | appId | string \| null | The app ID from the shell welcome message | | ready() | Promise | Resolves after the handshake | | call(method, params?) | Promise | Raw method call; prefer typed helpers | | dispose() | void | Removes the listener and rejects pending calls | ## Wire protocol The client speaks `rumahl.bridge.v1` over `postMessage`. The app is an opaque-origin iframe, so the shell binds the channel to the concrete parent window rather than trusting an origin string. **wire messages** ``` // app → shell { "bridge": "rumahl.bridge.v1", "kind": "hello" } // shell → app { "bridge": "rumahl.bridge.v1", "kind": "welcome", "version": 1, "appId": "com.example.notes", "methods": ["os.info", "os.theme.get", "os.notification"] } // app → shell { "bridge": "rumahl.bridge.v1", "kind": "request", "id": "m3k2-1", "method": "os.theme.get" } // shell → app { "bridge": "rumahl.bridge.v1", "kind": "response", "id": "m3k2-1", "ok": true, "result": { "scheme": "dark", "accent": "#6cc79b", "reducedMotion": false, "palette": { } } } ``` Requests time out after 5 seconds by default. A response with `ok: false` carries `{code, message}` and is converted to a `RumahlBridgeError`. ## Methods and required capabilities A method is refused unless the signed manifest declares the corresponding capability. The welcome message lists the methods the shell will accept for this installation. | Method | Capability | Purpose | | --- | --- | --- | | os.info | com.rumahl.os.info | App, account and presentation mode | | os.theme.get | com.rumahl.os.theme | Current semantic palette | | os.notification | com.rumahl.os.notification | Show a toast or notification | | os.window.close / minimize / focus | com.rumahl.os.window | Control the app window | | os.capabilities.invoke | com.rumahl.os.capabilities | Call another app’s capability | | os.settings.get / set | com.rumahl.os.settings | Own manifest settings and secrets | | os.net.request | com.rumahl.os.network | Brokered HTTP(S) request | | os.files.request / read / write | rumahl.files.read / write | User-selected file access | | os.warnings.register / publish / test / clear | com.rumahl.os.warnings | OS weather-warning source | | pets.state / interact / action.register / action.unregister | com.rumahl.pets.interact | Optional pet surface | An app can also subscribe to events such as `os.theme.changed` and `os.notification.action` through `on(topic, listener)`. ## App and account information **app/info.ts** ``` const info = await rumahl.info(); ``` **BridgeAppInfo** ``` { "app": { "id": "com.example.notes", "title": "Notes", "version": "1.4.0" }, "account": { "displayName": "Ada" }, "mode": "desktop" } ``` `mode` is `desktop`, `launcher` or `mobile`. Do not use it as an authorization signal; it only describes the current presentation. ## Theme **app/theme.ts** ``` const theme = await rumahl.theme(); const stop = rumahl.watchTheme((next) => { applyRumahlTheme(next); }); ``` **BridgeTheme** ``` { "scheme": "dark", "accent": "#6cc79b", "reducedMotion": false, "palette": { "background": "#0f1512", "surface": "#161f1a", "text": "#eef4f0", "textMuted": "#a9bab0", "border": "#30443a", "accent": "#6cc79b", "onAccent": "#0f1512" } } ``` `applyRumahlTheme(theme, root)` sets `--rumahl-background`, `--rumahl-surface`, `--rumahl-text`, `--rumahl-text-muted`, `--rumahl-border`, `--rumahl-accent` and `--rumahl-on-accent`. It also sets `color-scheme`, `data-rumahl-theme` and `data-rumahl-reduced-motion`. **app/theme.css** ``` .panel { background: var(--rumahl-surface); color: var(--rumahl-text); border: 1px solid var(--rumahl-border); } .primary { background: var(--rumahl-accent); color: var(--rumahl-on-accent); } ``` ## Notifications **app/notify.ts** ``` await rumahl.notify({ title: "Backup complete", message: "42 files copied to the NAS.", description: "Last run took 18 seconds.", variant: "success", progress: 1, duration: 5000, buttons: [ { id: "open", label: "Open folder" }, { id: "dismiss", label: "Dismiss" } ] }); ``` | Field | Type | Notes | | --- | --- | --- | | message | string | Required | | title | string | Optional heading | | variant | success \| warning \| info \| error \| loading | Visual tone | | progress | number | 0..1 progress bar | | duration | number \| null | Milliseconds; null keeps it persistent | | buttons | {id,label}[] | Actions arrive as os.notification.action events | | emergency | boolean | Requires com.rumahl.os.emergency | **app/notification-events.ts** ``` rumahl.on("os.notification.action", (payload) => { const action = payload as { notificationId: string; actionId: string }; if (action.actionId === "open") openBackupFolder(); }); ``` ## Settings and secrets An app reads and writes only its own manifest-declared settings. Secret values are write-only: the read shape tells you which keys are configured, never their plaintext. **manifest excerpt** ``` "settings": [ { "key": "server.url", "title": "Server address", "type": "text", "required": true }, { "key": "server.token", "title": "Access token", "type": "secret", "required": true }, { "key": "sync.interval", "title": "Sync interval", "type": "number" } ] ``` **app/settings.ts** ``` const current = await rumahl.settings(); // { values: { "server.url": "https://nas.local" }, secrets: ["server.token"] } await rumahl.setSettings({ values: { "server.url": "https://nas.local", "server.token": "new-token", // sealed by the platform "sync.interval": 300 } }); // null clears an optional value. await rumahl.setSettings({values: {"sync.interval": null}}); ``` | Limit | Value | | --- | --- | | Settings per manifest | 64 | | Plain value size | 64 KiB | | Secret value size | 16 KiB | | Settings per write | 64 | | Required values | Must be present after the write | ## Brokered network requests The app never receives a socket or a cookie jar. The OS sends the request to an origin the user approved for this installation, attaches an optional secret server-side and returns a bounded response. **app/network.ts** ``` const response = await rumahl.requestNetwork({ url: "https://homeassistant.local:8123/api/states", method: "GET", headers: {Accept: "application/json"}, secret: "server.token", // attached as Authorization: Bearer … maxBytes: 512 * 1024 }); if (response.status === 401) { await showTokenPrompt(); } const states = JSON.parse(response.body); ``` **BridgeNetworkResponse** ``` { "status": 200, "headers": { "content-type": "application/json" }, "body": "[…]", "truncated": false } ``` | Rule | Value | | --- | --- | | Schemes | HTTP and HTTPS only | | Methods | GET, POST, PUT, PATCH, DELETE, HEAD | | Redirects | Not followed; a 3xx is returned as-is | | Request body | 256 KiB maximum | | Response body | 2 MiB maximum, clamped by maxBytes | | Timeout | 20 seconds total, 10 seconds connect | | Headers | 16 maximum; only an allowlist is accepted | | Forbidden headers | Authorization, Cookie, Host, Origin | | Cookies | Never sent; Set-Cookie is never exposed | | WebSocket / SSE | Not available through the bridge yet | > **Consent is per origin** > The dialog shows the exact scheme://host[:port]. A session grant ends with the browser session; a durable grant can expire after at most one year. Revocation applies to the next request. ## Capabilities ### Provide a capability **app/provider.ts** ``` const unregister = rumahl.provide( "com.example.notes.search", async (invocation) => { const key = invocation.resource?.key ?? ""; return notes .filter((note) => note.title.toLowerCase().includes(key.toLowerCase())) .map((note) => ({id: note.id, title: note.title})); } ); // Later: unregister(); ``` ### Invoke another app **app/caller.ts** ``` const outcome = await rumahl.invokeCapability( "com.example.notes.search", {namespace: "com.example.notes", kind: "query", key: "monstera"} ); if (outcome.outcome === "invoked") { console.log(outcome.result); } ``` **BridgeCapabilityResult** ``` { "capability": "com.example.notes.search", "outcome": "invoked", "result": [{ "id": "2", "title": "Water the monstera" }] } ``` The HTTP route behind `os.capabilities.invoke` returns `capabilityVersion`, `outcome`, `result` and, for a running web provider, a `browser` delivery instruction. The shell then delivers `provider.invoke` to the provider frame. Apps never open a direct channel to each other. ## Errors | Code | Meaning | What to do | | --- | --- | --- | | not-embedded | No parent shell frame | Use the standalone preview path | | timeout | No response within the timeout | Retry or show a reconnect state | | denied | The platform denied the operation | Explain the missing grant or consent | | no-provider | The capability handler is not registered | Open the provider app and retry | | unknown-method | Method not in the v1 surface | Check contracts and manifest declarations | | invalid-params | Malformed request | Fix the payload shape | | failed | The provider or platform operation failed | Surface the message and retry safely | | disposed | The client was disposed | Create a new bridge after remounting | **app/errors.ts** ``` import {RumahlBridgeError} from "@rumahl/bridge-client"; try { await rumahl.requestNetwork({url: "https://nas.local/api"}); } catch (error) { if (error instanceof RumahlBridgeError && error.code === "denied") { // The origin is not approved for this installation. showConsentHelp(); } else { throw error; } } ``` > **Do not fake authorization** > A disabled button, a hidden menu item or a query parameter is not a permission check. The platform rechecks the live installation, account and grants on every call. ## Testing the bridge Run the app as a normal page for UI tests, then use a parent-frame harness to exercise the protocol. A harness can answer `hello` with `welcome`, record requests and return deterministic responses. **test/harness.ts** ``` // A minimal parent-frame harness for unit tests. window.addEventListener("message", (event) => { const message = event.data; if (message?.kind === "hello") { event.source?.postMessage({ bridge: "rumahl.bridge.v1", kind: "welcome", version: 1, appId: "com.example.test", methods: ["os.info", "os.theme.get", "os.settings.get"] }, "*"); } if (message?.kind === "request" && message.method === "os.info") { event.source?.postMessage({ bridge: "rumahl.bridge.v1", kind: "response", id: message.id, ok: true, result: { app: {id: "com.example.test", title: "Test", version: "1.0.0"}, account: {displayName: "Test"}, mode: "desktop" } }, "*"); } }); ``` Also test the non-embedded case, a denied request, a timeout, a provider that throws and disposal during a pending call. ## Next - [Permissions and capabilities](/docs/permissions/) — grants and app-to-app calls. - [Hosting and bridge](/docs/app-hosting/) — leases, isolation and delivery. - [SDKs and npm](/docs/sdks/) — packages, contracts and CLI. - [API reference](/docs/api/) — the HTTP surface. --- ## SDKs and npm packages URL: https://rumahl.dev/docs/sdks/ The published npm packages for rumahl OS: @rumahl/ui, @rumahl/bridge-client and @rumahl/contracts, plus the workspace packages and package CLI. Three packages are published on npm for building apps and themes against rumahl OS. The shell and the SSR server stay inside the workspace, because they are the platform rather than an app dependency. This page is written against the current checkout and the public registry. The packages are early: the registry and the local source can be at different points in time. Pin the exact version you tested and check the exports you import. > **Registry status on 25 November 2026** > The latest tag points to @rumahl/ui@0.1.0, @rumahl/bridge-client@0.1.0 and @rumahl/contracts@0.1.0. @rumahl/ui@0.1.1 exists on the registry but is not the latest tag. @rumahl/shell and @rumahl/ssr are not published. ## Published packages | Package | Latest | Use | Where | | --- | --- | --- | --- | | @rumahl/ui | 0.1.0 | RUI components, tokens, themes, icons and CSS | npm | | @rumahl/bridge-client | 0.1.0 | Typed client for rumahl.bridge.v1 | npm | | @rumahl/contracts | 0.1.0 | Bridge, event, widget and snapshot types | npm | | @rumahl/shell | — | The first-party OS shell React app | workspace | | @rumahl/ssr | — | Server rendering and shell response | workspace | | rumahl-package | — | Keygen, sign and verify packages | repo binary | Three public packages Workspace-only shell > **The site and the registry can diverge** > The documentation is generated from the local checkout. npm can be behind or ahead of that checkout. If an export or field is missing, compare the version in your lockfile before you change the code. ## Install Install the three public packages with the version you verified. The bridge client depends on the matching contracts version. **install** ``` # pnpm pnpm add @rumahl/ui@0.1.0 @rumahl/bridge-client@0.1.0 @rumahl/contracts@0.1.0 # npm npm install @rumahl/ui@0.1.0 @rumahl/bridge-client@0.1.0 @rumahl/contracts@0.1.0 ``` | Requirement | What you need | | --- | --- | | Node.js | >=20 for every published package | | React | >=19 as a peer dependency of @rumahl/ui | | Bundler | ESM support and CSS imports, for example Vite or Next.js | | Next.js | Add @rumahl/ui to transpilePackages if your setup does not transpile package JavaScript automatically | > **Pin exact versions for now** > The packages are pre-1.0. Use exact versions in the lockfile and read the package README before upgrading. A floating range can move the package underneath an app or theme that was tested against a different export surface. ## RUI components and themes `@rumahl/ui` is the operating-system design system. It is not RWDS. Import the styles once, wrap the app in `ThemeProvider` and use semantic tokens instead of local colors. **Example.tsx** ``` import { Button, GroupContainer, GroupRow } from "@rumahl/ui/components"; import "@rumahl/ui/base.css"; import "@rumahl/ui/primitives.css"; export function Example() { return ( ); } ``` | Entry point | What it exposes | | --- | --- | | @rumahl/ui | Tokens, color helpers, theme registry, slots and the SDK | | @rumahl/ui/components | React components and controls | | @rumahl/ui/icons | The system icon set | | @rumahl/ui/i18n | The German and English message catalog provider | | @rumahl/ui/*.css | Base, materials, primitives, controls and component styles | See [Create a theme](/docs/themes/authoring/) for the token and package workflow. The theme package format is separate from the npm component package. ## Bridge client `@rumahl/bridge-client` is framework-agnostic. It performs the `hello`/`welcome` handshake, binds messages to the parent frame and exposes typed helpers. Outside the shell, `available` is false and calls reject instead of hanging. **bridge.ts** ``` import { connectRumahlBridge } from "@rumahl/bridge-client"; const rumahl = connectRumahlBridge(); await rumahl.ready(); const info = await rumahl.info(); const theme = await rumahl.theme(); const settings = await rumahl.settings(); await rumahl.notify({ message: "Synced", variant: "success" }); rumahl.watchTheme((next) => applyTheme(next)); rumahl.window.minimize(); ``` | Helper | Purpose | | --- | --- | | info() | Bounded app and account information | | theme() / watchTheme() | Read the semantic palette and follow changes | | notify() | Send a user notification | | settings() / setSettings() | Read or write the app’s own settings; secrets are write-only | | requestNetwork() | Brokered HTTP(S) request to a consented origin | | provide() | Register a provided capability handler | | invokeCapability() | Call another app’s capability through the platform | | window.* | Close, minimize or focus the app window | A method is refused unless the signed manifest declares the matching capability. The npm package does not bypass the platform’s consent, lease or origin checks. ## Contracts `@rumahl/contracts/bridge` owns the protocol version, the complete method union, capability ids and message types. Use it instead of copying string literals into an app. **contracts.ts** ``` import { RUMAHL_BRIDGE, RUMAHL_BRIDGE_VERSION, BRIDGE_METHODS, BRIDGE_CAPABILITIES } from "@rumahl/contracts/bridge"; RUMAHL_BRIDGE; // "rumahl.bridge.v1" RUMAHL_BRIDGE_VERSION; // 1 BRIDGE_METHODS; // the complete v1 method surface BRIDGE_CAPABILITIES.window; // "com.rumahl.os.window" ``` | Entry point | What it validates or exposes | | --- | --- | | @rumahl/contracts | Snapshot and contribution types for UI contract v1 | | @rumahl/contracts/parse | Bounded shell snapshot parsers | | @rumahl/contracts/events | Shell event parser | | @rumahl/contracts/widget | Widget frame descriptor validation | | @rumahl/contracts/bridge | The rumahl.bridge.v1 message contract | The protocol is versioned. New methods are additive; a caller should still check the app’s declared capabilities and handle a refusal. ## Workspace-only packages `@rumahl/shell` and `@rumahl/ssr` are first-party applications, not an SDK. They are consumed inside the rumahl frontend workspace and are not published to npm. Cloning the repository is the supported way to run or modify them. **workspace** ``` git clone https://github.com/rumahl/rumahl.git cd rumahl pnpm --dir frontend install --frozen-lockfile ``` The local package manifests keep `private: true`. The public tarballs are built artifacts; do not infer that the source tree and the registry metadata are byte-identical. ## Package CLI **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 ``` The CLI is a Rust binary in the repository. It is not part of the npm packages and does not read a shell session. ## Versions and compatibility Package versions, contract versions and the OS release are separate promises. A new SDK patch does not silently change `formatVersion` or `rumahl.bridge.v1`. | Version surface | Current | Rule | | --- | --- | --- | | @rumahl/ui | 0.1.0 | Pin exact; 0.1.1 exists but is not the latest tag | | @rumahl/bridge-client | 0.1.0 | Keep it aligned with contracts 0.1.0 | | @rumahl/contracts | 0.1.0 | Use the matching protocol version | | Bridge protocol | rumahl.bridge.v1 | Additive methods; unknown required versions are unsupported | | Package format | formatVersion: 1 | The signed manifest is authoritative | See [Versions and compatibility](/docs/versioning/) for the complete contract table and the rules for updates. ## Platform APIs The HTTP API, bridge, OIDC and store source endpoints are documented in the [API reference](/docs/api/). SDK helpers do not change the server-side authorization boundary; they only make the calls typed. ## Next - [Bridge SDK reference](/docs/bridge-reference/) — the complete app-side contract. - [Permissions and capabilities](/docs/permissions/) — app-to-app calls. - [Publish an app](/docs/publish/) — package and store metadata. - [Create a theme](/docs/themes/authoring/) — RUI tokens and packages. --- ## Versions and compatibility URL: https://rumahl.dev/docs/versioning/ The versioned contracts in rumahl OS: package format, bridge protocol, store index, API response versions, app identity and the current compatibility policy. rumahl versions its contracts independently of the operating system release. A package format, a store index and a bridge protocol are separate promises; do not infer one from another. ## Versioned surfaces | Contract | Current version | Where it appears | | --- | --- | --- | | Package format | formatVersion: 1 | package.json | | Package document envelope | packageVersion: 1 | Store package URL | | Store index | storeVersion: 1 | store.json | | Bridge protocol | rumahl.bridge.v1 | hello, welcome, requests and events | | App catalog response | catalogVersion: 1 | GET /api/v1/shell/apps | | Launch response | launchVersion: 1 | POST /api/v1/shell/apps/{id}/launch | | Import response | importVersion: 1 | POST /api/v1/shell/apps/import | | Settings response | settingsVersion: 1 | /apps/{id}/settings | | Network response | networkVersion: 1 | /apps/{id}/network/request | | Capability response | capabilityVersion: 1 | /api/v1/shell/capabilities/invoke | | Theme package | Package-defined | ZIP with theme.json | | Shell preferences | settingsVersion: 1 | /api/v1/shell/preferences | The operating system version is not a protocol version. A new OS release can add methods; it does not silently change the meaning of `formatVersion: 1`. ## npm package versions The public SDK packages have their own version line. They are not the OS release and they are not the bridge protocol. | Package | Latest tag | Notes | | --- | --- | --- | | @rumahl/ui | 0.1.0 | 0.1.1 exists on the registry but is not tagged latest | | @rumahl/bridge-client | 0.1.0 | Depends on @rumahl/contracts@0.1.0 | | @rumahl/contracts | 0.1.0 | Types and parsers for the v1 contracts | | @rumahl/shell | Not published | First-party workspace package | | @rumahl/ssr | Not published | First-party workspace package | > **Pin exact SDK versions** > The packages are pre-1.0. The local checkout can be ahead of the registry, and the latest tag is not the same as every published version. Use exact versions in the lockfile and check the exports you import. See SDKs and npm packages. ## Compatibility rules - An unknown required version is unsupported. Do not guess a shape. - New optional response fields may be added within a version; ignore fields you do not know. - New bridge methods are additive. A caller must still check the app’s declared methods and handle refusal. - Removing a method, changing a field type or changing a permission requirement is a new version. - An app update keeps its app ID but may raise the app version; the publisher identity must remain stable. - A changed publisher is a different trust identity, not an update of the old app. > **No stable support window yet** > The project is in active development. There is no long-term support promise and no published deprecation calendar. System updates have stable and beta channels, but no A/B rollback; pin the app and SDK versions you tested and verify them against the checkout you deploy. ## Feature detection Do not infer bridge support from the OS version. Use the welcome message and the declared permissions. **app/feature-detect.ts** ``` const welcome = await rumahl.ready(); if (!welcome.methods.includes("os.net.request")) { // This installation or shell does not expose brokered network access. showUnsupported("Network access is not available in this shell."); } const capabilities = new Set(welcome.methods); ``` For HTTP responses, check the version field before reading the rest of the document: **catalog-check.ts** ``` const response = await fetch("/api/v1/shell/apps"); const catalog = await response.json(); if (catalog.catalogVersion !== 1) { throw new Error(`Unsupported catalog version: ${catalog.catalogVersion}`); } ``` ## App identity and versions | Field | Changes when | | --- | --- | | publisherId | The publisher identity changes; treat it as a new trust relationship | | appId | The app is a different product; do not reuse an ID for a fork | | app.version | The app payload changes | | formatVersion | The package contract changes | | package.sig.json.keyId | The signing key changes; the trust store decides whether to accept it | An update is identified by the installation and the publisher. A package with the same app ID but a different publisher does not inherit the old grants, consents or data. ## Store and package compatibility - A source can serve apps for multiple OS versions, but each package declares its own runtime and requirements. - An index entry must use the same app ID and version as the signed manifest. - The package document is transport; it does not add a second manifest version. - A source that cannot parse an index must fail visibly rather than silently dropping apps. ## Deprecation checklist for a future contract - Publish the replacement and the migration path before removing the old form. - Keep the old version readable for at least one announced window. - Surface a clear error for an unsupported version, not a generic failure. - Document the exact fields that changed and the security consequences. - Provide a test fixture for both versions during the transition. ## Next - [App packages](/docs/app-packages/) — the manifest contract. - [Bridge SDK reference](/docs/bridge-reference/) — the v1 method surface. - [Build a store](/docs/store/) — the index contract. - [Review and release](/docs/review/) — preflight and rollback. --- # Stores ## Stores URL: https://rumahl.dev/docs/stores/ Build a store source, add a custom storefront, publish signed apps and understand the shared OS Store frontend and trust rules. Stores The public rumahl store is [store.rumahl.com](https://store.rumahl.com/): a storefront and the catalog API at `/api/catalog` for apps and themes. Package downloads and updates resolve to [github.com/rumahl/apps](https://github.com/rumahl/apps). You can also publish from another API source or Git repository; users install and update through the shared Store inside rumahl OS. [Build a store](/docs/store/) [Store guidelines](/docs/store-guidelines/) store.rumahl.com Apps and themes One OS frontend Signed packages The rule that matters ## One frontend inside rumahl OS. Every configured source is browsed, searched and installed through the common Store app. A custom storefront is an additional website outside the shell, not a replacement for the OS Store. [Read the guidelines](/docs/store-guidelines/) Sources ## Choose the store type. The public store at `store.rumahl.com` is the default destination for apps and themes; its package downloads and updates come from `github.com/rumahl/apps`. You can also host an HTTPS `store.json` index, add a custom storefront or use a GitHub source. [Public store ### store.rumahl.com The public storefront and catalog API for apps and themes; packages live in github.com/rumahl/apps. Read the store contract](/docs/store/) [API-only ### Build a store source An HTTPS store.json index and signed package URLs. No custom storefront. Build the source](/docs/store/) [Custom storefront ### Build a custom storefront An external website for discovery on the same signed packages. Build a storefront](/docs/storefront/) [Repository ### A complete store source A full repository with signing, index, storefront and deployment. Open the example](/docs/store-example/) [Catalogue ### Store metadata Featured apps, categories, ratings and artwork on the common Store frontend. Read the metadata contract](/docs/store/#front-page) Publish and trust ## Make the listing honest. Put the app version, compatibility and support details in the catalogue entry. Sign each release and run the publisher preflight before updating the index. A valid signature identifies the package signer and attests to the integrity of the package. Certification is a separate claim. [Publishing ### Publish an app Package document, catalogue entry, updates and removal. Publish an app](/docs/publish/) [Release ### Review & release A repeatable publisher preflight, QA and rollback path. Review a release](/docs/review/) [Trust ### Certification & trust What signatures, publisher identity and source trust prove. Read the trust model](/docs/certification/) [Policy ### Store guidelines The rules for sources, custom storefronts and metadata. Read the rules](/docs/store-guidelines/) Dos and don’ts ## Rules for stores. Every store uses the same OS Store frontend for install and updates. A custom storefront may help people discover packages, but it does not replace the OS Store or its rules. Do 5 Serve signed packages with clear source metadata, versions and compatibility notes. Run the publisher preflight before every release and fix what it reports. Keep one common OS Store frontend for installation, updates and removal. State limits, support expectations and the current runtime status in the listing. Link to the exact package and version a user is about to install. Don’t 5 Present a signed package as reviewed, certified or endorsed by rumahl. Build a storefront that replaces installation, checkout or update handling inside the OS. Mirror packages you do not control or cannot verify. Hide a failed preflight, an unsigned artifact or a missing compatibility note. Use a custom storefront to bypass the store guidelines that apply to every source. Next ## Need to build the app first? Apps covers the package, bridge and permission model that a store distributes. [Go to Apps](/docs/apps/) --- ## Stores, the public store and custom sources URL: https://rumahl.dev/docs/store/ Understand the public store at store.rumahl.com, its catalog API and GitHub package source, plus custom store sources and storefronts. The public rumahl store is [store.rumahl.com](https://store.rumahl.com/): a storefront and the catalog API at `/api/catalog` for apps and themes. Package downloads and updates resolve to [github.com/rumahl/apps](https://github.com/rumahl/apps). Inside rumahl OS, every source uses the same Store app; the platform owns verification, installation and device trust. ## What a store is The native Store app is a trusted first-party shell app at `/app/store`. It does not trust source metadata as executable content. It fetches a JSON index through the authenticated same-origin bridge, displays the catalogue and installs the signed package the index points to. The public rumahl store separates three jobs: - [store.rumahl.com](https://store.rumahl.com/) serves the public storefront and the catalog/communication API used by rumahl OS. - [github.com/rumahl/apps](https://github.com/rumahl/apps) holds the app and theme packages. Downloads and updates resolve here. - [github.com/rumahl/store.rumahl.com](https://github.com/rumahl/store.rumahl.com) is the storefront and API implementation. It is a separate repository from the package repository. The same store lists apps and themes. There is no separate theme marketplace. The public catalog endpoint is `https://store.rumahl.com/api/catalog`; its package entries point into `github.com/rumahl/apps` for downloads and updates. The public storefront uses RWDS; the native Store in rumahl OS uses RUI. Both read the same catalog and the same optional `editorial` block, so the hero, five featured apps and curated collections are the same product without sharing a visual component implementation. | Piece | Owner | | --- | --- | | Public storefront and API | store.rumahl.com | | Public app and theme packages | github.com/rumahl/apps | | Store implementation | github.com/rumahl/store.rumahl.com | | OS Store frontend | rumahl OS shell (the same UI for every source) | | Custom storefront website | Your store, external and optional | | Catalogue index | The public store API or your HTTPS source | | Package URL | The public package repository or your source | | Signature verification | The rumahl platform | | Install consent and journal | The rumahl platform | | Source trust decision | The local rumahl account | > **The store cannot bypass signatures** > A source controls metadata and where a package lives. It cannot make an invalid signature valid, skip the install journal or grant a permission. ## Sources are owned by the OS The source list is platform state, not browser state. It is stored per account by the OS and shared by every device signed into that account. The official store is the default until the account saves its own list; a saved list replaces the default and an empty list stays empty. - **Settings → Store sources** edits the list. The Store app, the update check and the background scheduler read the same list. - The scheduler checks enabled sources roughly every six hours, after source changes and after installs. It does not need an open browser. - App updates use the OS-owned policy: auto-update all apps or selected apps. Updates download and install through platform jobs, so closing the Store window does not cancel them. - Installs are OS jobs too. The desktop and launcher show a pending tile with an iOS-style progress ring while the package downloads and verifies. - The public storefront is a Next.js app deployed on Vercel. It reads the catalog at runtime, so publishing an app does not rebuild or redeploy the storefront. Source errors stay visible: an unreachable host, a certificate problem, an HTTP status or an invalid index is reported with the reason instead of hiding the source. ## 1. Choose a store type | Store type | What it provides | Status | | --- | --- | --- | | Public rumahl store | The storefront and catalog API at store.rumahl.com; app and theme packages live in github.com/rumahl/apps. | Available | | API-only | An HTTPS JSON index and signed package URLs. No custom storefront. | Implemented | | API + custom storefront | The same index plus an external website for discovery. The OS Store remains the shared frontend. | Allowed; storefront is external | | Git repository | A GitHub repository with store.json, or a single-app repo with manifest.json and store-package.json. | Implemented for GitHub | **The most important rule:** inside rumahl OS, all stores render through the one Store app. A custom storefront is an additional discovery surface outside the shell. It must not replace the OS Store, hide the source, or bypass signed-package installation. See [Store guidelines](/docs/store-guidelines/). ## 2. Publish the common index The shell fetches the index through `GET /api/v1/shell/store/fetch?url=…`. It allows HTTPS only, rejects credentials and fragments, follows no redirects, has a 15 second timeout and limits the document to 32 MiB. **Settings → Store sources** ``` https://store.example/index.json ``` **repository spec** ``` github:owner/repo github:owner/repo@main/catalog https://github.com/owner/repo/tree/main/catalog # each resolves to: https://raw.githubusercontent.com/owner/repo/main/catalog/store.json ``` A GitHub source resolves the repository, ref and optional directory to a raw `store.json`. Only GitHub is recognized today; other Git hosts are not accepted by the source parser. A GitHub repository without `store.json` can still be a single-app source. The shell reads `manifest.json` for identity and `store-package.json` for the signed package, which is useful for a repository that ships exactly one app. For a catalogue, publish `store.json`. **index.json** ``` { "storeVersion": 1, "name": "Example Store", "description": "Small local-first apps for the home.", "editorial": { "hero": { "eyebrow": "Featured", "title": "A quieter home", "summary": "Apps for your home and your work.", "cta": "Explore the collection", "target": "featured", "image": "https://store.example/editorial/hero.webp" }, "featured": ["com.example.notes"], "collections": [{ "id": "home", "title": "A better home server", "summary": "Core apps for a capable, private home.", "category": "All Apps", "image": "https://store.example/editorial/collection.webp" }] }, "apps": [ { "id": "com.example.notes", "title": "Notes", "version": "1.0.0", "summary": "A local-first notes app.", "publisher": "Example", "packageUrl": "https://store.example/packages/notes.package.json", "sourceUrl": "https://github.com/example/notes", "category": "Productivity", "rating": 4.8, "downloads": 18400, "featured": true, "permissions": ["Read personal files", "Show notifications"], "iconUrl": "https://store.example/media/notes-icon.png", "screenshots": ["https://store.example/media/notes-screen.png"] } ] } ``` A relative `packageUrl` resolves against the index URL. It must still resolve to HTTPS. App IDs must be valid rumahl app IDs. | Required field | Rule | | --- | --- | | storeVersion | Must be 1 | | name | Source display name | | apps[] | Array of app entries | | apps[].id | Valid rumahl app ID, identical to the signed manifest | | apps[].title | Non-empty display title | | apps[].version | Package version | | apps[].packageUrl | HTTPS package document, absolute or relative to the index | Optional fields are omitted when unknown. Invalid optional metadata is ignored; an invalid required field fails the index. ## 3. Design the common front page This section describes the front page **inside rumahl OS** and the public storefront. It is metadata-driven and shared by every source. A source shapes the editorial composition through optional fields, not injected HTML, CSS or JavaScript: | Field | Effect | | --- | --- | | editorial.hero | Shared landscape hero: eyebrow, title, summary, CTA label, target and image | | editorial.featured[] | Ordered app ids for the five-card featured row | | editorial.popular[] / recent[] | Ordered app ids for the Popular now and New arrivals rank rows | | editorial.feature | Tinted editorial band: eyebrow, title, summary, CTA, target and app icon ids | | editorial.collections[] | Up to six curated collection cards with title, summary, category and image | | description / releaseNotes | Longer source copy for detail pages; bounded by the index parser | | featured: true | Fallback ordering when a source does not provide shared editorial content | | category / categories | Category filter and card tags; up to six values | | rating | A number from 0 to 5; optional detail metadata | | downloads | A non-negative integer; optional detail metadata | | sourceUrl | Optional HTTPS source repository link shown on the app detail page | | permissions | Human-readable source metadata; the signed manifest stays authoritative | | fullAccess: true | Marks an app as full system access and shows a risk warning before install. Use only when true; it is not a grant | | iconUrl / screenshots | Same-origin metadata artwork; up to 8 MiB each | > **Optional can be omitted** > Missing icons and screenshots fall back to generated monogram artwork. A source without editorial gets a derived hero and category collections, and featured flags fall back to the ranked catalogue. The Store does not invent ratings, downloads or a verified-publisher badge. > **Web-only showcase fields** > The public web storefront also reads showcase and showcaseEditorial for real projects shown as example listings. They are separate from the signed apps array, are labelled as examples and are ignored by the OS installer. A custom storefront is not limited to this metadata layout. It is your own website; see the next section. ## Custom storefronts A store may have its own website for discovery, editorial content, developer pages or account features. It is a normal website hosted by the store. It is not injected into the OS Store and there is no API that replaces the shell frontend. This is the **API + custom storefront** store type. - The custom frontend must follow the [Store guidelines](/docs/store-guidelines/). - It must present the same signed packages and must not offer an unsigned install path. - It must not imply that it is an official rumahl Store or that rumahl reviewed the app. - It must state its publisher/source identity and provide a way to report a problem. - Inside rumahl OS, the source is still browsed and installed through the common Store frontend. The complete requirements — identity, accessibility, privacy, support and the no-unsigned-install rule — are in the [Store guidelines](/docs/store-guidelines/). The implementation guide is [Build a custom storefront](/docs/storefront/). > **One frontend in the OS** > A custom storefront is an additional website, not a second Store inside rumahl OS. All configured sources share the same Store UI, search, app detail page and signed install flow. ## 4. Images and media The shell CSP only permits same-origin images. Source artwork is fetched through `GET /api/v1/shell/store/image?url=…`. PNG, JPEG, WebP, GIF and AVIF are accepted; invalid optional metadata is ignored, while required fields fail the index. - Use the same HTTPS origin as the index for icons and screenshots. - Keep art local-first: show the actual app, not a generic mockup. - Mark screenshots that are illustrative; do not imply a feature the package lacks. - Use a square icon and a wide first screenshot for the detail hero. ## 5. Certificate trust The source bridge uses normal web PKI. If a source presents an untrusted certificate, the Store performs a short TLS probe and returns `428 Precondition Required` with the host and SHA-256 leaf fingerprint. The user can trust or cancel. A confirmed certificate is pinned per OS account and host in `$RUMAHL_STATE_DIR/app-store-trust.json`. Package URLs on the same host use the same decision. If the certificate changes, the next fetch asks again. System-trusted certificates never trigger the prompt. > **Do not ask users to skip TLS** > A self-signed local store is a development tool, not a reason to disable verification. The trust prompt is the supported path. ## 6. Test the store locally The repository includes a development example store: **shell** ``` scripts/dev-example-store.sh # builds and signs example apps, then starts a local HTTPS store ``` - Open **Settings → Store sources**. - Add the local HTTPS URL. - Confirm the source certificate prompt once. - Browse Discover, All apps, My apps and a detail page. - Install one app and verify the signed package and install journal. - Disable the source and confirm it disappears from the Store navigation. ## Store source checklist - `storeVersion: 1` and valid app IDs. - Every `packageUrl` is HTTPS and serves a signed package, including GitHub raw URLs. - A custom storefront links to the same signed packages and never replaces the OS Store. - Icons and screenshots use the same origin and a supported image type. - Featured entries are real; do not invent ratings or downloads. - Permissions metadata matches the signed manifest or is omitted. - Source errors remain visible; the Store does not hide an unavailable source. - Installation remains on the signed-package path. ## Next - [Build a custom storefront](/docs/storefront/) — the external website contract. - [A complete store source](/docs/store-example/) — signed packages, index and deployment. - [Store guidelines](/docs/store-guidelines/) — rules for custom frontends and metadata. - [Publish an app](/docs/publish/) — package, metadata and review. - [Certification and trust](/docs/certification/) — what is verified today. - [App packages](/docs/app-packages/) — the signed manifest. --- ## Build a custom storefront URL: https://rumahl.dev/docs/storefront/ Build an external storefront website for a rumahl store source: read the public index, present signed packages honestly and send users to the common OS Store for installation. Build a public website where people can find your apps, read release details and copy your source URL. The official rumahl storefront is `store.rumahl.com`; this guide is for a custom source that keeps the same signed-package and OS Store rules. If you still need an index, define your source and publish a catalogue with the [store source guide](/docs/store/). ## What a custom storefront is It is a normal website hosted by the store. It reads the same public `store.json` index that rumahl OS reads inside the Store app. It can have a landing page, categories, editorial collections, search and app detail pages. It is not the public `store.rumahl.com` frontend and must not present itself as one. It is **not** a replacement for the OS Store and it is not embedded in the shell. When a user adds your source URL in rumahl OS, the common Store frontend presents your catalogue. Your website is a separate discovery surface. A custom storefront can also be the start page of a normal browser. It still cannot replace the shell front page or inject itself into rumahl OS. There is no documented new-tab or shell-homepage plugin API. | You can | You cannot | | --- | --- | | Design your own storefront website | Replace the Store UI inside rumahl OS | | Read and present the public index | Inject HTML, CSS or JavaScript into the OS Store | | Link users to the source URL | Trigger a signed install from a web page today | | Publish editorial content and collections | Bypass package signatures or permission prompts | | Use your own domain and visual identity | Impersonate rumahl or call your site the official Store | > **No web-to-OS install API** > There is currently no supported API for a website to install an app into rumahl OS. Do not build a “direct install” button or claim that one exists. The supported path is: add the source in Settings → Store sources, then install in the Store. ## A simple architecture **static storefront** ``` store.example ├── index.html your storefront ├── app.js fetches and renders the catalogue ├── catalog/store.json the same index used by rumahl OS ├── packages/notes.package.json └── media/notes-icon.png ``` - Publish `store.json` at the source URL you will give users. - Publish a signed package document for every app. - Build a static or server-rendered website that reads the index. - Tell users to add the index URL in rumahl OS. - Keep the website and the index in sync. If your website is on a different origin from the index, serve CORS headers that allow `GET`. If you cannot allow CORS, proxy the index through your own server and validate the response before rendering it. ## Read the index The index is deliberately small and source-owned. Required fields fail the catalogue when missing; optional fields can be omitted. The optional `editorial` block lets the public storefront and the native RUI Store show the same hero, five featured apps and curated collections. A custom storefront may render it or derive its own layout. **storefront/index.ts** ``` type StoreIndex = { storeVersion: 1; name: string; description?: string; editorial?: { hero: { eyebrow?: string; title: string; summary: string; cta?: string; target?: string; image?: string; }; featured?: string[]; popular?: string[]; recent?: string[]; feature?: { eyebrow?: string; title: string; summary: string; cta?: string; target?: string; appIds?: string[]; }; collections?: Array<{ id: string; title: string; summary: string; category: string; image?: string; }>; }; apps: StoreApp[]; // Optional web-storefront example listings. Ignored by the OS installer. showcase?: StoreApp[]; showcaseEditorial?: unknown; }; type StoreApp = { id: string; title: string; version: string; summary?: string; publisher?: string; packageUrl: string; sourceUrl?: string; category?: string; categories?: string[]; rating?: number; downloads?: number; featured?: boolean; permissions?: string[]; iconUrl?: string; screenshots?: string[]; }; ``` **storefront/store.js** ``` const INDEX_URL = "/catalog/store.json"; export async function loadStore() { const response = await fetch(INDEX_URL, {headers: {accept: "application/json"}}); if (!response.ok) throw new Error(`Store index returned ${response.status}`); const value = await response.json(); if (value?.storeVersion !== 1 || !Array.isArray(value.apps)) { throw new Error("Unsupported store index"); } return value; } ``` > **Treat the index as untrusted data** > Never insert catalogue strings with innerHTML. Use textContent or a templating layer that escapes by default. The index is data, not markup. ## Render a catalogue A useful storefront answers four questions quickly: what is this app, who publishes it, what does it need, and how do I get it in rumahl OS. **storefront/render.js** ``` import {loadStore} from "./store.js"; const grid = document.querySelector("[data-apps]"); function card(app) { const article = document.createElement("article"); article.className = "app-card"; const title = document.createElement("h2"); title.textContent = app.title; const summary = document.createElement("p"); summary.textContent = app.summary ?? "No summary provided."; const meta = document.createElement("p"); meta.className = "meta"; meta.textContent = [app.publisher, app.category, app.version] .filter(Boolean) .join(" · "); const permissions = document.createElement("p"); permissions.className = "permissions"; permissions.textContent = app.permissions?.length ? `Requests: ${app.permissions.join(", ")}` : "No permissions listed by the source."; const link = document.createElement("a"); link.href = `/app/?id=${encodeURIComponent(app.id)}`; link.textContent = "View app"; article.append(title, summary, meta, permissions, link); return article; } const store = await loadStore(); grid.replaceChildren(...store.apps.map(card)); ``` Use the signed manifest as the authority for permissions and version. If the index omits an app or cannot be fetched, show the failure instead of silently using stale data. ## Send users to rumahl OS There is no install API and no documented custom URL scheme for adding a source. The reliable flow is explicit and copyable: - Show the source URL and a **Copy source URL** button. - Tell the user to open **Settings → Store sources** in rumahl OS. - Add the URL and confirm the certificate if prompted. - Open the Store, choose the source and install the signed package. **storefront/source.html** ```

Add this store to rumahl OS

Open Settings → Store sources, then add this URL.

https://store.example/catalog/store.json

Installation happens in the Store. This website cannot install apps directly.

``` > **The external website is not the installer** > The package document is transport for the signed package. Opening it in a browser does not install anything, and it must not be presented as a download-and-run installer. ## App detail pages - Use the app ID in the URL, for example `/app/?id=com.example.notes`, and resolve it from the live index. - Show publisher, version, categories and the source-declared permissions. - Link back to the source URL instructions, not to a raw package file. - Do not invent ratings, download counts or a “verified” badge. - If an app is removed from the index, return a clear not-found state. **storefront/detail.js** ``` const params = new URLSearchParams(location.search); const id = params.get("id"); const store = await loadStore(); const app = store.apps.find((entry) => entry.id === id); if (!app) { document.querySelector("[data-app]").textContent = "This app is not in the current catalogue."; } else { renderApp(app); } ``` ## Follow the store guidelines A custom storefront must follow the same rules as the source it presents. The most important ones are: - State your store identity and do not impersonate rumahl. - Never offer an unsigned or direct install path. - Keep metadata truthful and consistent with the signed manifest. - Meet WCAG 2.2 AA, respect reduced motion and support narrow screens. - Publish a privacy notice, support contact and security contact. Read the complete [Store guidelines](/docs/store-guidelines/) before launch. ## Quality checklist - The page works with JavaScript disabled at least for the source instructions. - Catalogue text is inserted as text, never as raw HTML. - Every app card links to a detail page or a stable anchor. - The source URL can be copied with a keyboard. - Focus is visible and headings follow a logical order. - Images have alt text and width/height attributes. - The layout works at 390 px and at 200% zoom. - Failed index requests show an error and a retry path. - The custom storefront and the OS Store show the same app IDs and versions. - No claim of review, certification or endorsement appears anywhere. ## Next - [Store guidelines](/docs/store-guidelines/) — the complete policy. - [Build a store](/docs/store/) — index, source types and certificate trust. - [Publish an app](/docs/publish/) — signed package and catalogue entry. - [Certification and trust](/docs/certification/) — what a signature proves. --- ## Store guidelines URL: https://rumahl.dev/docs/store-guidelines/ The rules every rumahl store source and every custom storefront must follow: one OS frontend, signed packages, truthful metadata, clear identity, accessibility, privacy and support. A store is a source of signed packages and descriptive metadata. These rules apply to every source and to every custom storefront that presents it. They exist so a store can be independent without becoming a second platform. ## What these guidelines cover These guidelines apply to: - The public store at `store.rumahl.com` and its catalog API. - An HTTPS store index and its package documents. - A GitHub repository used as a store. - A custom storefront website that presents the same catalogue. - Metadata, artwork and claims shown in any of the above. They do not replace package signature verification, the permission model or the rumahl OS terms. A store cannot grant itself an exception to any platform check. ## One storefront inside rumahl OS > **The OS Store is the common frontend** > Every configured source is browsed, searched and installed through the same Store app. The public storefront is store.rumahl.com; a custom storefront is an additional website outside the shell. It is not embedded in the OS Store and it does not replace the Store UI. This is a product guarantee, not a limitation you can opt out of. A source controls its catalogue and metadata. rumahl OS controls the Store frontend, the package verification, the install journal and the permission prompts. | Surface | Who owns it | May be customised? | | --- | --- | --- | | Store window, navigation, search and app detail page | rumahl OS | No. Shared by every source. | | Catalogue index and app metadata | The store | Yes, within this document. | | Package contents and signature | The publisher | Yes. The signature must stay valid. | | External storefront website | The store | Yes, within this document. | | Install consent, journal and grants | rumahl OS | No. | ## Store types | Type | What you publish | What users see in rumahl OS | | --- | --- | --- | | Public rumahl store | The catalog and storefront at store.rumahl.com; app and theme packages in github.com/rumahl/apps. | The public catalogue inside the common Store frontend. | | API-only | An HTTPS index and signed package URLs. No website of your own. | Your catalogue inside the common Store frontend. | | API + custom storefront | The same index and packages, plus an external discovery website. | The same common Store frontend. The external website is separate. | | Git repository | A GitHub repository containing store.json and package documents. | The same common Store frontend, resolved from the raw GitHub URL. | A custom storefront does not change the install path. It is an additional presentation layer for a source that already follows the index contract. The public store’s downloads and updates come from `github.com/rumahl/apps`; its storefront/API implementation is a separate repository. ## Requirements for every source ### HTTPS and stable URLs - Serve the index over HTTPS. HTTP, embedded credentials and fragments are rejected. - Keep the index URL stable. The URL is the source identity on the device. - Do not redirect the index or package document. The fetch bridge does not follow redirects. - Use a certificate that validates normally. A self-signed certificate requires an explicit user trust decision and is a development tool, not a production shortcut. ### Signed packages only - Every `packageUrl` must serve a package document whose files match a valid Ed25519 signature and SHA-256 digests. - Do not modify, repack or re-sign another publisher’s package. Publish your own package under your own publisher identity. - Do not present a package document as an installer that runs outside rumahl OS. The supported install path is the OS Store. - An update must use the same publisher identity and a newer version. ### Truthful metadata - The app ID, version and publisher in the index must match the signed manifest. - Ratings and download counts must be real measurements. If you do not have them, omit them. - `featured` is an editorial choice, not a paid ranking. Do not describe it as one. - Permissions shown in the index must match the signed manifest or be omitted. The manifest is authoritative. - Screenshots and icons must show the actual app. Do not show a feature the package does not contain. - Do not use “verified”, “certified”, “reviewed” or a checkmark badge unless the claim is defined and true. rumahl currently has no app certification program. - If the app needs an external service or account, name the feature and state what works without it. Do not hide the dependency behind a sign-in wall or a vague “cloud” claim. > **A signature is not an endorsement** > A valid package signature proves the publisher key and the bytes. It does not prove safety, quality or review. A store listing must not imply otherwise. ## Requirements for custom storefronts A custom storefront is allowed. It must remain a storefront, not a parallel operating system or an unauthorised installer. ### Clear identity and no impersonation - State the store’s name, publisher and relationship to rumahl. Do not present the site as an official rumahl property. - Do not copy the rumahl name, logo, Store interface or domain in a way that suggests endorsement. - Do not call your website “the rumahl Store”. Use a distinct store name and explain that it is a third-party source. - Link to these guidelines and to the rumahl trademark policy where appropriate. ### One supported install path - Explain that the source must be added in **Settings → Store sources** inside rumahl OS. - Provide the exact source URL in copyable form. Do not hide it behind a button that only works in one browser. - Do not offer a “direct install”, “sideload” or “download and run” path that bypasses the OS Store. - Do not link to a raw package document as if opening it installed the app. - Do not claim that a website can trigger an install today. There is no supported web-to-OS install API. ### Use the same catalogue - Render the same app IDs, versions and package URLs that the source index returns. - A detail page may be richer than the index, but it must not contradict the index or the signed manifest. - If the live index fails, show the failure. Do not silently substitute stale or invented data. - Do not reorder or filter the catalogue in a way that hides security-relevant facts, such as the publisher or requested permissions. ### Commerce and disclosure - If an app or placement is sponsored, label it clearly as sponsored. - Do not sell a ranking or a “verified” badge that does not exist. - State who receives payment and what the user gets before any purchase. - Do not make an app’s availability conditional on granting unrelated permissions or accepting marketing. ### Accessibility - Target WCAG 2.2 AA for the storefront: keyboard access, visible focus, semantic headings, form labels and sufficient contrast. - Do not rely on colour alone for status, price or availability. - Respect `prefers-reduced-motion` and `prefers-color-scheme`. - Images need meaningful alt text; decorative artwork uses empty alt text. - Test at 200% zoom and at 390 px width without horizontal scrolling. ### Privacy and data minimisation - Do not require an account to browse a public catalogue unless there is a clear reason. - Collect only the data the storefront needs, explain why, and provide a privacy notice. - Do not fingerprint, track across sites or sell visitor data. - Do not ask for rumahl OS credentials. A storefront never needs them. - Do not place secrets or private package data in a public repository or frontend bundle. ### Security - Serve the storefront and index over HTTPS with a valid certificate. - Set a Content Security Policy and other standard security headers. Avoid inline scripts where possible. - Sanitise any catalogue text before inserting it into HTML. The index is data, not markup. - Do not proxy arbitrary URLs through your server without an allowlist. - Report a security issue with a documented contact and a response process. **baseline headers** ``` Content-Security-Policy: default-src 'self'; img-src 'self' https: data:; style-src 'self'; script-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none' Strict-Transport-Security: max-age=31536000; includeSubDomains Referrer-Policy: strict-origin-when-cross-origin X-Content-Type-Options: nosniff ``` ## Artwork and screenshots - Use a square icon and at least one wide screenshot that shows the real interface. - Keep artwork on the same HTTPS origin as the index. Cross-origin artwork is rejected by the Store image bridge. - PNG, JPEG, WebP, GIF and AVIF are accepted. Keep each image under 8 MiB. - Do not use rumahl trademarks as your app icon or store logo. - Do not put essential text only inside an image. ## Support, removal and changes - Publish a support contact and a security contact. - State how users can report a broken app, a malicious listing or a privacy concern. - When you remove an app from the index, explain that installed copies remain on devices until uninstalled. - When you remove a source, its catalogue becomes unreachable; it does not uninstall or revoke already installed packages. - If a package is compromised, publish a security notice and a replacement version. Do not reuse the compromised version number. ## Enforcement and limits rumahl does not review every source before it is added. The platform enforces the technical boundary: signatures, package limits, TLS trust, permissions and installation. A source that violates these guidelines can still be removed from a device, blocked by the user or reported to its host. | Violation | Technical effect | Storefront consequence | | --- | --- | --- | | Invalid or missing signature | Install is rejected | Listing must not claim installability | | HTTP package URL | Package fetch is rejected | Remove the listing or fix the URL | | Impersonating rumahl | No platform exception | Store can be reported and removed | | Unsigned install path | Outside the platform | Prohibited by these guidelines | | False rating or download count | No platform verification | Listing is misleading and can be removed | | Hidden permissions | Manifest remains authoritative | Listing violates truthful metadata rules | > **No formal certification** > Following these guidelines does not make an app certified, reviewed or endorsed. See Certification and trust for the exact vocabulary. ## Store review checklist - The source is HTTPS, stable and does not redirect. - `storeVersion: 1` and valid app IDs. - Every package verifies against the intended trust store. - Index and manifest agree on ID, version and publisher. - Ratings, downloads, screenshots and permissions are real. - No unsigned install path and no claim of certification. - The custom storefront identifies its publisher and links to these guidelines. - Keyboard, contrast, zoom and mobile checks pass. - A support and security contact is published. - The common OS Store still presents the same catalogue correctly. ## Next - [Build a store](/docs/store/) — the index, source types and testing. - [Build a custom storefront](/docs/storefront/) — the external website contract. - [Publish an app](/docs/publish/) — package document and catalogue entry. - [Certification and trust](/docs/certification/) — what is and is not verified. --- ## A complete store source URL: https://rumahl.dev/docs/store-example/ An end-to-end example of a rumahl store repository: signed packages, store.json, package documents, a static storefront and a GitHub Pages deployment. One repository that produces signed packages, a valid `store.json`, a custom storefront and a GitHub source. This is the smallest end-to-end shape that works in rumahl OS. ## What you will build **repository** ``` my-store/ ├── apps/ │ └── notes/ │ ├── manifest.json │ └── frontend/ │ ├── index.html │ └── main.js ├── keys/ # never commit the private keystore ├── scripts/ │ ├── package.mjs # signed directory -> package document │ └── index.mjs # catalogue entry generation ├── site/ │ ├── index.html # your custom storefront (optional) │ ├── app.js │ ├── store.json │ ├── packages/ │ │ └── notes.package.json │ └── media/ │ ├── notes-icon.png │ └── notes-screen.png └── trust.json # development verification only ``` The same `site/` directory is both an HTTPS source and a custom storefront. Inside rumahl OS, only `store.json` and the signed packages matter; the website is an additional discovery surface. The public rumahl store is different: `store.rumahl.com` serves the public storefront and catalog API, while downloads and updates resolve to `github.com/rumahl/apps`. ## 1. The app manifest **apps/notes/manifest.json** ``` { "formatVersion": 1, "publisherId": "com.example", "app": { "appId": "com.example.notes", "version": "1.0.0", "displayName": "Notes", "runtime": { "kind": "web", "entrypoints": [ { "id": "main", "kind": "web-asset", "path": "frontend/index.html" } ] }, "lifecycle": "on-demand", "permissions": [ { "id": "com.rumahl.os.window", "scope": "user-own", "required": true }, { "id": "com.rumahl.os.theme", "scope": "user-own", "required": true } ], "settings": [] } } ``` The exact bytes of this file are what the signature covers. The importer validates the schema, entrypoints, permissions and every payload digest. ## 2. Sign the package **shell** ``` cargo run -p rumahl-app-packages --bin rumahl-package -- keygen \ --key-id example-1 --publisher com.example \ --keystore keys/example.json --trust-store trust.json cargo run -p rumahl-app-packages --bin rumahl-package -- sign \ --package build/notes \ --manifest apps/notes/manifest.json \ --keystore keys/example.json cargo run -p rumahl-app-packages --bin rumahl-package -- verify \ --package build/notes --trust-store trust.json ``` The signed directory now contains `package.json`, `package.sig.json` and the payload. Keep `keys/example.json` out of the repository and out of CI logs. ## 3. Build the package document A package URL returns a JSON envelope with base64 file contents. The shell sends the same files through the authenticated import endpoint; the Rust importer still verifies the signature. **scripts/package.mjs** ``` import {readdir, readFile, writeFile, mkdir} from "node:fs/promises"; import {join, relative} from "node:path"; async function filesUnder(root, current = root) { const entries = await readdir(current, {withFileTypes: true}); const files = []; for (const entry of entries) { const path = join(current, entry.name); if (entry.isDirectory()) files.push(...await filesUnder(root, path)); else files.push(path); } return files; } export async function packageDocument(packageDir, output) { const files = []; for (const path of (await filesUnder(packageDir)).sort()) { files.push({ path: relative(packageDir, path).split("\\").join("/"), content: (await readFile(path)).toString("base64") }); } await mkdir(join(output, "packages"), {recursive: true}); await writeFile( join(output, "packages", "notes.package.json"), JSON.stringify({packageVersion: 1, files}) ); } ``` > **Paths are part of the package** > Keep every path exactly as it appears in the signed manifest. Do not rename, rewrite or normalise files while building the package document. ## 4. Generate the index **scripts/index.mjs** ``` import {writeFile} from "node:fs/promises"; const store = { storeVersion: 1, name: "Example Store", description: "Small local-first apps for the home.", apps: [ { id: "com.example.notes", title: "Notes", version: "1.0.0", summary: "A local-first notes app.", publisher: "Example", packageUrl: "packages/notes.package.json", category: "Productivity", iconUrl: "media/notes-icon.png", screenshots: ["media/notes-screen.png"], permissions: ["Control its own window", "Follow the OS theme"] } ] }; await writeFile("site/store.json", JSON.stringify(store, null, 2) + "\n"); ``` `packageUrl` is relative to the index URL, so the same index works on HTTPS and on a GitHub raw URL. Optional fields are omitted when you do not have real values. > **Do not invent ratings** > There is no need for rating, downloads or featured. The Store falls back to the catalogue and does not invent a verified badge. ## 5. Host the source | Option | Index URL | Notes | | --- | --- | --- | | Static HTTPS host | https://store.example/store.json | Serve the whole site/ directory | | GitHub repository | github:example/store | The shell resolves raw.githubusercontent.com/example/store/main/store.json | | GitHub directory | github:example/store@main/catalog | The index is catalog/store.json | | GitHub tree URL | https://github.com/example/store/tree/main/catalog | Equivalent to the directory form | For a GitHub source, relative package URLs resolve against the raw index URL. Keep the `packages/` and `media/` directories next to `store.json`. **github-pages.yml** ``` name: Publish store on: push: tags: ["v*"] permissions: contents: read pages: write id-token: write jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - name: Restore signing key run: | mkdir -p keys echo "$RUMAHL_KEYSTORE" | base64 -d > keys/example.json chmod 600 keys/example.json env: RUMAHL_KEYSTORE: ${{ secrets.RUMAHL_KEYSTORE }} - name: Build package CLI run: cargo build --locked -p rumahl-app-packages --bin rumahl-package - name: Sign and package run: | mkdir -p build/notes cp -R apps/notes/frontend build/notes/frontend target/debug/rumahl-package sign \ --package build/notes \ --manifest apps/notes/manifest.json \ --keystore keys/example.json node scripts/package.mjs node scripts/index.mjs - uses: actions/upload-pages-artifact@v3 with: path: site - uses: actions/deploy-pages@v4 ``` Store the keystore as an encrypted repository secret. A leaked signing key lets an attacker publish as your publisher identity; rotate the key and treat the old identity as compromised. ## 6. Test end to end - Run the repository’s example store: `scripts/dev-example-store.sh`. - Add the local HTTPS URL in **Settings → Store sources**. - Confirm the certificate once. - Install the app and verify the signed package and install journal. - Open the custom storefront and follow the same source URL instructions. - Disable the source and confirm the catalogue disappears from the Store navigation. **shell** ``` scripts/dev-example-store.sh # builds and signs example apps, serves the site, and mirrors a GitHub source tree ``` ## 7. Add the custom storefront The optional `site/index.html` reads the same `store.json`. It must follow the [Store guidelines](/docs/store-guidelines/): identify the publisher, never offer an unsigned install path, tell users to add the source in Settings, and keep the metadata truthful. The complete external website contract is in [Build a custom storefront](/docs/storefront/). ## Publish checklist - The source is HTTPS, stable and does not redirect. - Each package verifies against the intended trust store. - `store.json` has `storeVersion: 1` and valid app IDs. - Index and manifest agree on ID, version and publisher. - Package and image URLs resolve on the same host or GitHub raw host. - No private key, token or database is in the repository or `site/`. - The OS Store and the custom storefront show the same catalogue. - No review, certification or verified badge is claimed. ## Next - [Publish an app](/docs/publish/) — the package document in detail. - [Build a custom storefront](/docs/storefront/) — the external website contract. - [Store guidelines](/docs/store-guidelines/) — the rules for every source. - [Review & release](/docs/review/) — preflight and rollback. --- ## Publish an app URL: https://rumahl.dev/docs/publish/ Prepare a signed package, create the store package document and publish app metadata for a rumahl store source. A store publishes two things: a signed package document and a catalogue entry. The package carries the trust; the index carries the discovery and front-page metadata. The public rumahl store is `store.rumahl.com`; package downloads and updates resolve to `github.com/rumahl/apps`. Apps and themes share the same store. ## 1. Prepare the signed package Start with a verified package directory containing `package.json`, `package.sig.json` and the payload files. The signing and verification steps are in [Build your first app](/docs/build-an-app/). - Set a stable `publisherId` and `appId`. - Declare only the permissions and capabilities the app uses. - Sign the exact manifest bytes; every payload file is covered by SHA-256. - Verify against the development trust store before publishing. - Test install and launch from a local source, not only from a directory import. > **Publisher identity is not a certification** > A matching publisher ID proves which key signed the package. It does not prove the app is safe, reviewed or certified. Do not label a package “verified” beyond what the signature actually states. > **Two repositories, two jobs** > The public storefront and catalog API live at store.rumahl.com. The app and theme packages live at github.com/rumahl/apps. The store implementation is a separate repository at github.com/rumahl/store.rumahl.com. Do not mirror package bytes into the storefront repository. ## 2. Build the store package document A source package URL returns a JSON envelope with base64 file contents. The shell validates the envelope, then sends the files through the authenticated import endpoint. The Rust importer verifies the signature and every digest. **notes.package.json** ``` { "packageVersion": 1, "files": [ { "path": "package.json", "content": "" }, { "path": "package.sig.json", "content": "" }, { "path": "frontend/index.html", "content": "" }, { "path": "frontend/main.js", "content": "" } ] } ``` Keep the paths exactly as they appear in the package manifest. The package document is transport, not a second manifest; do not rename or rewrite files during packaging. ## 3. Add the catalogue entry The source index points at the package document and supplies display metadata. Required fields fail the index when missing; optional metadata is ignored when invalid. **index entry** ``` { "id": "com.example.notes", "title": "Notes", "version": "1.0.0", "summary": "A local-first notes app.", "publisher": "Example", "packageUrl": "https://store.example/packages/notes.package.json", "category": "Productivity", "rating": 4.8, "downloads": 18400, "featured": true, "permissions": ["Read personal files", "Show notifications"], "iconUrl": "https://store.example/media/notes-icon.png", "screenshots": ["https://store.example/media/notes-screen.png"] } ``` | Field | Rule | | --- | --- | | id | Valid rumahl app ID and the same ID as the manifest | | title | Display title, no claim beyond the package | | version | The package version; updates require a newer version and same publisher | | packageUrl | HTTPS, relative to the index or absolute | | category / categories | Up to six categories | | rating / downloads | Optional numbers; never invent them | | permissions | Human-readable source metadata; the manifest is authoritative | | iconUrl / screenshots | Same origin as the index, supported image types, 8 MiB max | ## 4. Appear on the storefront The front page is assembled from source metadata, not custom source HTML. Set `featured: true` to be preferred for the cover and The Edit; add categories, a real rating and a screenshot-led presentation. The chart and registry remain download/rating-driven. > **No arbitrary storefront code** > A source cannot inject JavaScript, CSS or layout. It supplies bounded metadata; the Store owns the presentation. This is what keeps a source from becoming a second shell. ## 5. Updates and removal - An update needs a newer version and the same publisher identity. - A package with a changed publisher is not an update of the old app. - Uninstall revokes grants and consents; retained data is not silently inherited by a new installation. - Removing an app from the index does not uninstall it from a device. - Removing a source makes its catalogue unreachable; it does not revoke already installed packages. ## 6. Release automation The official store imports signed releases from each app's own repository. The app repository is the build and signing boundary; `rumahl/apps` is the catalogue and package store. - Build and sign the release offline. Keep the private signing key outside CI. - Attach `release.tar.gz` to a draft GitHub release. It contains `package.json`, `package.sig.json` and the payload files at its root. - Publish the release. A workflow in the app repository dispatches `app-release` to `rumahl/apps` with a GitHub App token, not a personal access token. - The repository updater checks the app against `store.config.json:apps`, downloads the fixed asset through the GitHub API, rejects traversal and links, validates the signature and commits the release. - The catalog workflow regenerates `store.json` and the package documents. The Vercel storefront reads the catalog at runtime; it is not rebuilt. The updater cannot sign and never accepts a caller-supplied URL. A failed signature or a malformed archive leaves the repository unchanged. See [release automation](https://github.com/rumahl/apps/blob/main/docs/release-automation.md) and the [app release workflow template](https://github.com/rumahl/apps/blob/main/docs/app-release-workflow.yml). For the official store, a maintainer merges the submission after validation. New publisher keys and validator/workflow changes require a separate `security-approved` review. ## 7. Submit to the public store The public catalog lives in [github.com/rumahl/apps](https://github.com/rumahl/apps); there is no separate submission repository. The store's [submit page](https://store.rumahl.com/submit/) opens an App submission issue. - **New app:** the issue becomes a checklist. One pull request adds `apps/ /listing.json`, a real icon and screenshots, the publisher key in `trust/trust-store.json` and the source repository in `store.config.json`. - **Listed app:** the submission workflow imports the signed release from the configured repository into a pull request, validates it and links the issue. A maintainer reviews and merges. - **After the listing:** a published signed release dispatches `app-release` and updates the catalog without a pull request. The storefront reads the new catalog at runtime and needs no deployment. - **Without the dispatch workflow:** open an issue for each version, or ask a maintainer to run `Repository updater` with the app id and version. Both use the same importer and validator. > **Automation verifies bytes, not behaviour** > The submission bot only imports and validates. A passing workflow is not certification, a security review or a support promise; a maintainer decides what enters the catalog. ## 8. Publish checklist - Package verifies against the intended trust store. - Manifest and index use the same app ID and version. - No secret, keystore or private source map is inside the payload. - Every permission is used and explained; optional permissions are handled when denied. - If the app needs an external service or account, the listing states the feature and what still works without it. - Icon and screenshots are real, same-origin and show the actual app. - A local install, launch, denial path and uninstall are tested. - The listing does not imply review, certification or availability the platform does not provide. ## Next - [Build a store source](/docs/store/) — index, front page and trust. - [Review and release](/docs/review/) — a repeatable publisher preflight. - [Certification and trust](/docs/certification/) — what is actually verified. - [Permissions and capabilities](/docs/permissions/) — consent and inter-app calls. --- ## Review and release URL: https://rumahl.dev/docs/review/ A practical preflight review for signed rumahl apps and store listings: automated verification, manual QA, permission justification, security, accessibility, release and revocation. A repeatable preflight before a package reaches a store. This is not a certification program; it is the work a publisher can do today to make a package safe to install and honest to list. ## What review means today | Check | Who performs it | Automatic? | | --- | --- | --- | | Package signature and file digests | The Rust importer | Yes | | Manifest schema and package limits | The Rust importer | Yes | | Source TLS and certificate pinning | The store bridge and the user | Partly | | Permission and capability declarations | The manifest parser and platform | Yes | | App behaviour and security | The publisher; not rumahl | No | | Listing truthfulness | The publisher; not rumahl | No | | Certification against published criteria | No authority exists yet | No | > **Review is not certification** > A completed review proves that you checked your own release. It does not create a rumahl certification, a verified badge or an endorsement. Use the exact words: signed, tested, reviewed by the publisher. ## 1. Automated gate Run the same checks the importer will run, against the same trust store the target device uses. **shell** ``` rumahl-package verify \ --package dist/notes \ --trust-store trust.json # Confirm the package is deterministic and the manifest is unchanged. sha256sum dist/notes/package.json find dist/notes -type f -print0 | sort -z | xargs -0 sha256sum ``` | Check | Pass condition | | --- | --- | | Signature | Detached Ed25519 signature verifies over the exact manifest bytes | | Payload digests | Every declared file matches its SHA-256 and size | | File limit | At most 2,048 files | | Single file | At most 64 MiB | | Total payload | At most 256 MiB | | Manifest | At most 1 MiB and no unknown fields | | Identity | Stable publisher ID, app ID and a newer version | | Secrets | No key, token, database or private source map in the payload | Store the verification output with the release record. It is evidence for the exact package bytes you shipped, not a claim about behaviour. ## 2. Permission and capability review - Every requested permission is used by a visible feature. - No permission is requested “for later”. - A required permission has a clear explanation and a working denial path. - Optional permissions are optional in the UI, not silently required. - Network origins are specific; do not request a broad origin when one host is enough. - Secrets are write-only and never logged, rendered or returned to the app. - Provided capabilities are named in your publisher namespace and documented. - Capability handlers validate the resource and return bounded results. **permission justification** ``` "permissions": [ { "id": "com.rumahl.os.network", "scope": "user-selected", "required": true, "reason": "Reach the NAS address the user configures" }, { "id": "rumahl.files.read", "scope": "user-selected", "required": false, "reason": "Attach a note from a file the user picks" } ] ``` ## 3. Manual QA matrix | Area | Test | | --- | --- | | Install | Fresh install, upgrade from the previous version, uninstall and reinstall | | Launch | Desktop, launcher, narrow window, fullscreen, reload and close | | Lease | Stay open past 90 seconds and confirm renewal | | Bridge | Handshake, info, theme, notification, settings and window controls | | Denial | Refuse a required permission and every optional permission | | Network | Approved origin, denied origin, revoked grant, timeout and 3xx | | Files | Picker cancel, read, write and a revoked grant | | Theme | Light, dark, system change and reduced motion | | Keyboard | Complete every primary task without a pointer | | Zoom | 200% zoom and 390 px width without horizontal scrolling | | Offline | Launch without a network and show a useful state | | Uninstall | Confirm grants, consents and runtime resources are removed | Run the matrix against the signed package, not a development build with different assets. ## 4. Security and privacy review - Threat model the app: what can a malicious provider, a compromised origin or a stolen token do? - Treat every catalogue field and every capability response as untrusted input. - Do not put secrets in URLs, logs, analytics, screenshots or error messages. - Use the brokered network call; do not ask the user to disable TLS verification. - Keep dependencies current and record the lockfile version used for the release. - Provide a security contact and a response time for vulnerability reports. - Describe what data leaves the device and where it goes. - Do not use dark patterns to obtain consent. > **A capability is an authorization boundary** > Validate the caller’s resource, return only what the operation needs and never expose a broader file or network primitive through a capability. ## 5. Listing review | Field | Review | | --- | --- | | Title | Matches the manifest display name; no claim beyond the package | | Summary | Describes the actual app in plain language | | Publisher | The real publisher identity, not a rumahl mark | | Version | Matches the signed manifest | | Rating / downloads | Real measurements or omitted | | Permissions | Matches the manifest or omitted | | External dependency | Service or account named; affected feature and limits stated | | Screenshots | Show the real app; no invented features | | Featured | An editorial choice, not a paid ranking | | Badges | No “certified”, “verified” or “reviewed by rumahl” claim | For a custom storefront, also review identity, accessibility, privacy, support and the absence of an unsigned install path. See the [Store guidelines](/docs/store-guidelines/). ## 6. Release and rollback - Build once, sign once, and keep the verified package bytes immutable. - Publish the package document and the index entry together. - Keep the previous package document reachable for rollback. - Use a new version for every change. Never reuse a version number. - Test the update path from the published previous version. - Record the release version, signature key ID and verification output. - Announce security-relevant changes and the supported version. **release layout** ``` release/ ├── 1.4.0/ │ ├── notes.package.json │ ├── package.json │ ├── package.sig.json │ └── verify.txt ├── 1.3.0/ # kept for rollback └── index.json # points at the current version ``` ## 7. Incident response - Remove the affected version from the public catalog at `store.rumahl.com` and the package source in `github.com/rumahl/apps`, then point to a fixed version. - Do not reuse the compromised version number or signature key. - Publish a clear notice: what happened, who is affected and what to do. - Ask users to uninstall if the app cannot be made safe. - Rotate publisher keys if the private key may have leaked; a new key is a new publisher identity for update purposes. - Revoke the publisher or signing key in the device trust store. After the platform restart, installs and updates are blocked and installed apps cannot launch or start. - Keep the install journal and verification evidence for the investigation. ## What a future certification would add The current release gate is technical verification plus publisher review. A real certification program would need more than a badge: - Published security and behaviour criteria. - A named authority and reviewer identity. - Evidence standards and a reproducible review record. - Publisher key custody and identity requirements. - Permission and data-flow review. - Expiry, revocation and a vulnerability response process. - A way to prove the reviewed bytes are the published bytes. Until that exists, the honest label is “signed package” and “publisher review”. See [Certification and trust](/docs/certification/). ## Release checklist - Package verifies against the intended trust store. - Manifest, index and listing agree on ID, version and publisher. - Every permission has a reason and a denial path. - No secret or private key is in the payload. - The QA matrix passes on the signed package. - Accessibility, keyboard and zoom checks pass. - Privacy notice and security contact are published. - Update and rollback paths are tested. - No certification or endorsement is claimed. ## Next - [Publish an app](/docs/publish/) — package document and catalogue entry. - [Certification and trust](/docs/certification/) — the exact trust vocabulary. - [Testing and release](/docs/testing/) — runtime checks. - [Store guidelines](/docs/store-guidelines/) — listing and storefront rules. --- ## Certification and trust URL: https://rumahl.dev/docs/certification/ What package signatures, publisher identity, source trust and install review actually prove — and what is not yet a certification program. rumahl verifies packages and shows source provenance. It does not yet have an app certification program, a verified-publisher badge or a behavioral review authority. This page separates what exists from what does not. ## Short answers | Question | Current answer | | --- | --- | | Is every package signature verified? | Yes, server-side, before install. | | Does a signature prove the app is safe? | No. It proves the bytes and publisher key. | | Is there a verified-publisher badge? | No. The Store does not invent one from metadata. | | Is there an app certification program? | No. There is no certification schema or authority today. | | Can a publisher or key be revoked? | Yes. The trust store blocks install, update and launch; revoked apps can still be stopped and uninstalled. | | Can a store grant permissions? | No. Only the platform and the user consent path can. | > **Do not use the word “certified” for a signed package** > A signed package is signed. A review is a review. A certification is a policy program with criteria, an authority and its own revocation process. Publisher and key revocation exist separately; the certification program does not. ## What is verified today - Detached Ed25519 signature over the exact manifest bytes. - SHA-256 digest for every payload file listed in the manifest. - Package limits: manifest size, file count, per-file size and total payload. - Manifest schema and unknown-field rejection. - Publisher ID consistency for updates. - Publisher and signing-key revocation from the trust store. - OS permission catalog validation and capability declarations. - Source TLS trust and certificate fingerprint pinning. - Install journal verification before the platform snapshot is published. ## Trust store and source trust Package signatures are checked against the device’s configured trust store. A development image may use a development trust store; that is not a release certification. A store source is a separate trust decision: the source certificate is pinned per OS account and host, and a changed certificate asks again. The public store at `store.rumahl.com` is the official distribution surface, but its listing is still metadata; the signed package remains the trust anchor. **trust model** ``` score: package signature verified payload hashes verified publisher identity verified against trust store source TLS pinned per account + host install journal verified before snapshot publisher/key revocation supported app behavior / security NOT certified publisher review NOT implemented ``` ## Trust vocabulary | Label | Meaning | Available? | | --- | --- | --- | | Signed | The manifest and payload match a publisher key | Yes | | Trusted source | The local account pinned the source certificate | Yes | | Reviewed | A named reviewer checked behavior and permissions | No public program | | Certified | A formal, revocable certification against published criteria | No | Use the exact label. A source-owned field cannot upgrade a package from signed to reviewed or certified. ## What a certification program would need - Published security and behavior criteria, not a vague badge. - A named authority, review record and evidence standard. - Publisher identity and key custody requirements. - Permission justification and data-flow review. - Revocation, expiry and a response process for vulnerabilities. - A reproducible way to verify that the reviewed package is the published package. - Clear wording for a failed, expired or revoked certification. ## Current release gate For now, use the package and source checks in [Publish an app](/docs/publish/) and the runtime checks in [Testing and release](/docs/testing/). Do not describe a source listing as an endorsement. The Store’s metadata is descriptive; the signed manifest remains authoritative. ## Next - [Review and release](/docs/review/) — a publisher preflight that is not a certification. - [Publish an app](/docs/publish/) — package document and index metadata. - [Build a store](/docs/store/) — source trust and front page. - [Permissions](/docs/permissions/) — what the user actually grants. --- # Themes ## Themes URL: https://rumahl.dev/docs/themes/ Author, package and distribute RUI themes for rumahl OS: the data contract, token roles, parameters, safe code and the public store. Themes Define the colours, shapes and typography of rumahl OS with RUI tokens. Build light and dark modes, expose settings such as accent colour and package everything the shell needs to render the theme offline. Distribute themes through the same [public store](https://store.rumahl.com/) as apps. [Create a theme](/docs/themes/authoring/) [Tokens & parameters](/docs/themes/tokens/) RUI · not RWDS Light & dark Sandboxed code No remote assets store.rumahl.com The contract ## One theme, every surface. Start with a base theme and set semantic roles such as surface, text and accent. Define values for both appearance modes if you support them, then use parameters with safe defaults for choices users can adjust in Settings. [Authoring ### Create a theme Start from Iris or Ground, define tokens and add user-facing parameters. Start authoring](/docs/themes/authoring/) [Contract ### Tokens & parameters Colour, material, shape, motion, typography and parameter kinds. Read the token reference](/docs/themes/tokens/) [Packaging ### Package & install theme.json, ZIP layout, validation, trust and uninstall. Read packaging](/docs/themes/packages/) [Runtime ### How themes are applied The shell projects semantic tokens onto the document root. Read the shell contract](/docs/shell-ui/) Self-contained by default ## A theme must render without the network. A theme is visual data. Remote fonts, images, styles or scripts are dependencies, not theme assets. Use tokens, local CSS and system resources; keep the preview image for the gallery, not the runtime. [Read the theme rules](/docs/themes/authoring/#self-contained) Theme package No remote fonts or images ### Tokens and local CSS, not a remote asset bundle. The theme package inlines its styles and optional code. It has no remote font or image field, so a theme that needs a CDN is not portable and not offline-safe. - **Fonts:** a system stack or an OS-bundled face; no Google Fonts or remote `@font-face`. - **Images:** gradients, patterns and token-driven surfaces; `preview.png` is gallery metadata, not a runtime background. - **Code:** presentation only; no `fetch`, XHR, WebSocket or remote scripts. [Read the packaging check](/docs/themes/packages/#self-contained) Before you start ## Use RUI tokens for the shell Use the RUI token reference when you choose values for the shell, launcher and windows. The RWDS token set belongs to websites and documentation. [Create a theme](/docs/themes/authoring/) Current state ## Local packages and the public store. Themes install and validate locally, and are distributed through the same public store as apps at `store.rumahl.com`. Package downloads and updates resolve to `github.com/rumahl/apps`; local install remains for development, offline use and private themes. - **Package** theme.json, or a ZIP with theme.json at the root or one directory deep. - **Modes** Light, dark or both; the shell falls back to a supported mode. - **Code** Optional theme code is sandboxed by default; full shell access needs explicit trust. - **Distribution** The public store at store.rumahl.com; downloads and updates from github.com/rumahl/apps. - **Limits** No theme certification or support promise yet. Dos and don’ts ## Rules for themes. A theme changes semantic tokens, not component structure. It should survive a new component, a new mode and a different screen without knowing which app is on screen — and it should render without the network. Do 7 Start from the semantic token set and keep the light and dark roles paired. Use parameters for user choices such as accent, density or radius; keep layout structure in the components. Test every bundled mode, both color schemes and a 390px viewport. Ship tokens, assets and the manifest together, and bump the version when any of them changes. Give every parameter a safe default so the theme still renders when a value is missing. Keep the theme self-contained: system fonts, tokens and local CSS. Test with the network disconnected and keep `preview.png` out of runtime CSS. Don’t 7 Hard-code raw colors outside the token set, or override component internals with theme CSS. Depend on a specific app, store catalogue or page being present. Edit the synced RWDS files in place instead of extending them. Use a parameter to change information architecture or hide required controls. Publish a theme package without its assets or with a version that did not change. Use remote `@import`, fonts, wallpapers or images. Fetch data from theme code or make rendering depend on a network call. --- ## Create a theme URL: https://rumahl.dev/docs/themes/authoring/ Author, package and install a rumahl UI theme: tokens, modes, parameters, CSS, safe code and validation. Create a theme that changes how the rumahl shell looks using RUI tokens. Start with a base theme, define light and dark values, then package the theme and try it in Settings. Use the [tokens and parameters reference](/docs/themes/tokens/) to choose roles before you add package files. ## What a theme is RUI is the operating-system design system. A theme is a resolved set of token values, a variant selection and optional metadata. The shell projects it onto the document root as `--rumahl-ui-*` custom properties. An app never needs to know which theme is active. | Part | Purpose | | --- | --- | | id / name | Stable identity and the label shown in Settings | | tokens | Semantic values for color, material, shape, motion, typography and layout | | modes | Which appearance modes the theme supports: light, dark or both | | variants | Shell layout, launcher layout and window chrome | | parameters | Optional user-facing controls that tune a token | | css | Optional presentation-only stylesheet | | code | Optional theme module; sandboxed by default, full access only with explicit trust | | preview | Optional real preview image in a package | > **RUI, not RWDS** > This page is for the rumahl OS shell and installed apps. Websites, docs and editorial surfaces use RWDS. Do not ship an RUI theme as a website theme. ## 1. Author the theme Use the public SDK when the theme lives in the RUI workspace. Omitted tokens fall back to the default base, so a theme is always complete. **theme.ts** ``` import { defineTheme, registerTheme } from "@rumahl/ui/sdk"; export const ocean = registerTheme(defineTheme({ id: "com.example.ocean", name: "Ocean", description: "A cool, low-contrast theme for dim rooms.", modes: ["light", "dark"], base: "iris", tokens: { "color.accent": "#0b6ea8", "color.accent.strong": "#3b9ad1", "color.canvas.background": "#071a24", "color.panel.background": "#0d2733", "color.text.primary": "#eaf4f9", "color.text.muted": "#9ab4c2", "color.outline": "#ffffff24", "shape.radius.window": "16px", "material.opacity": "0.72", "typography.display": "\"Fraunces Variable\", Georgia, serif" } })); ``` Use `base: "ground"` only when the theme owns its presentation and should not inherit Iris chrome. For most themes, start with Iris and change tokens. ## 2. Choose tokens, not pixels | Group | Typical roles | | --- | --- | | color.* | accent, accent.strong, on.accent, canvas, panel, surface, text.primary, text.muted, outline, shadow | | material.* | blur, saturation, opacity, morphism | | shape.* | window, dock, icon and control radii | | motion.* | duration and easing roles | | typography.* | UI and display families and the type scale | | layout.* | layout primitives for shell and app surfaces | | texture.wallpaper | wallpaper-aware surface treatment | | icon.gradient | system icon artwork | Do not hard-code a component color or radius. If a value is missing, add a semantic role to the theme contract rather than reaching into component CSS. The complete token family and parameter reference is in [Theme tokens and parameters](/docs/themes/tokens/). ## 3. Make a portable package The OS installs a `theme.json` file or a ZIP with `theme.json` at its root (or one directory deep). A ZIP can name sibling `styles.css`, `code.js` and a preview image; their contents are inlined into the installed theme. **package layout** ``` ocean/ theme.json styles.css # optional code.js # optional preview.png # optional ``` **theme.json** ``` { "id": "com.example.ocean", "name": "Ocean", "description": "A cool theme for dim rooms.", "version": "0.1.0", "author": "com.example", "modes": ["light", "dark"], "variants": { "shellLayout": "dock", "launcherLayout": "springboard", "windowChrome": "standard" }, "tokens": { "color.accent": "#0b6ea8", "color.canvas.background": "#071a24", "color.panel.background": "#0d2733", "color.text.primary": "#eaf4f9", "shape.radius.window": "16px" }, "css": "styles.css" } ``` > **CSS is presentation only** > The installed stylesheet is applied CSP-safely. It cannot replace a component contract or grant a capability. Theme code is a separate, explicit trust decision. ## 4. Keep the theme self-contained A theme must render with the network disconnected. Remote fonts, images, stylesheets and scripts are not theme assets; they are dependencies that can fail, track the user or change after installation. The package already inlines `styles.css` and optional code. | Resource | Do | Don’t | | --- | --- | --- | | Fonts | A system stack or an OS-bundled face | Google Fonts, remote @font-face or @import | | Images and wallpaper | Gradients, patterns and token-driven surfaces | Remote background images, hotlinked wallpaper or a CDN | | CSS | Local styles.css inlined by the package | url(https://…) or a remote @import | | Code | Presentation-only theme lifecycle code | fetch, XHR, WebSocket or a remote script | | Icons | Built-in RUI artwork or tokens | A remote icon font or icon CDN | | Preview | preview.png for the gallery only | Using the preview as a runtime background | **don't: remote resources** ``` @import url("https://fonts.googleapis.com/css2?family=Fraunces"); .hero { background-image: url("https://cdn.example/wallpaper.jpg"); } ``` **do: system fonts and local CSS** ``` /* Token values come from theme.json; the stylesheet stays local. */ .surface { font-family: var(--rumahl-ui-typography-ui); background-image: linear-gradient(135deg, #0d273300, #0d273366), repeating-linear-gradient(90deg, #ffffff08 0 2px, transparent 2px 8px); } ``` > **No remote asset field in a theme package** > A package names theme.json, styles.css, code.js and preview.png; their contents are inlined. There is no remote font, image or stylesheet field. If a resource is not packaged or provided by the OS, it is not part of the theme. `preview.png` is gallery metadata. Do not reference it as a runtime background; use tokens, gradients and CSS patterns instead. If a visual idea seems to require a remote resource, it is not essential to the theme contract. Use a local fallback, a system asset or a token. A theme that cannot render offline is not ready to install. ## 5. Add tunable parameters A parameter points at one token and asks the shell to render a control. Ranges are clamped; choices are discrete; colours can seed derived roles. **theme.json excerpt** ``` "parameters": [ { "kind": "range", "id": "corner", "token": "shape.radius.window", "min": 0, "max": 24, "step": 1, "label": { "en": "Window corners", "de": "Fensterecken" } }, { "kind": "choice", "id": "material", "token": "material.blur", "options": [ { "value": "6px", "label": { "en": "Calm" } }, { "value": "36px", "label": { "en": "Deep glass" } } ], "label": { "en": "Glass depth" } } ] ``` Parameters that reference an unknown token are rejected. A theme can ship its own labels in English and German. See [Tokens and parameters](/docs/themes/tokens/) for the complete kinds and rules. ## 6. Test and install - Open **Settings → Display → Themes**. - Choose **Install theme** and select the `.json` or `.zip` package. - Review the validation report. A code theme runs sandboxed by default; full shell access needs explicit consent and a trusted code hash. - Select the theme, switch light/dark and test the parameter controls. - Check a narrow window, long app titles, reduced motion and a high-contrast display. - Uninstall or reset to verify the shell returns to a built-in theme cleanly. > **No code injection from a data theme** > A JSON theme cannot run JavaScript. If a package contains code.js, review what it does before granting full shell access. Sandboxed code cannot read the shell DOM, cookies or platform APIs. ## Theme quality checks - Body and control text keep readable contrast in every supported mode. - Focus rings remain visible on every surface. - Reduced motion removes decorative motion without hiding content. - Long labels and German strings do not clip controls. - The theme does not depend on a particular wallpaper. - The theme renders with the network disconnected: no remote font, image, CSS or code request. - Every parameter writes only its declared token. - Uninstall restores the previous theme and preferences. ## Public distribution Themes are distributed through the same public store as apps at `store.rumahl.com`; package downloads and updates resolve to `github.com/rumahl/apps`. Local installation still exists for development, offline use and private themes. ## Current limits Theme certification, a support promise and theme-wide revocation rules are still missing. ## Next - [Themes overview](/docs/themes/) — the four theme docs. - [Tokens and parameters](/docs/themes/tokens/) — the complete contract. - [Package and install](/docs/themes/packages/) — theme.json, ZIP, trust and validation. - [Shell and UI contracts](/docs/shell-ui/) — how themes are applied. --- ## Theme tokens and parameters URL: https://rumahl.dev/docs/themes/tokens/ The complete RUI theme token and parameter contract: colour, material, shape, motion, typography, modes, variants and control kinds. A theme is a set of semantic values, not a pile of component overrides. These are the token families, modes and parameter kinds the shell understands. ## Token families | Group | Roles | | --- | --- | | color.* | accent, accent.strong, on.accent, canvas.background, panel.background, surface, text.primary, text.muted, outline, shadow | | material.* | blur, saturation, opacity, morphism | | shape.* | window, dock, icon and control radii | | motion.* | duration and easing roles | | typography.* | family, display and type scale | | layout.* | Layout primitives for shell and app surfaces | | texture.wallpaper | Wallpaper-aware surface treatment | | icon.gradient | System icon artwork | Write semantic roles, not component selectors. If a component needs a value the contract does not have, add a role to the theme contract instead of reaching into component CSS. > **The token is the theme API** > A theme that hard-codes a component colour or radius is outside the contract. It may render on one shell build and break on the next. ## Modes, bases and variants | Field | Values | Meaning | | --- | --- | --- | | modes | ["light"], ["dark"], both | Appearance modes the theme supports | | base | iris, ground | Native chrome or the flat foundation | | shellLayout | desktop, dock, launcher | Shell presentation | | launcherLayout | grid, springboard | Launcher arrangement | | windowChrome | standard, compact | Window title and controls | `iris` inherits the native rumahl chrome and is the right base for most themes. `ground` is a square, flat, shadow-less foundation for a theme that owns its presentation. It is a base, not a complete theme. The shell resolves the active mode and variant selection. A theme declares what it supports; it does not force a mode onto the user. ## Parameter kinds A parameter points at one token and asks the shell to render a control. The shell clamps ranges, validates choices and resolves labels per locale. | Kind | Fields | Use | | --- | --- | --- | | range | min, max, step, optional unit, decimals | Numeric values such as radius, blur or opacity | | color | optional presets[], seed | A colour token; seed recomputes derived roles | | choice | options[] | A small set of named values, such as material or layout | **theme.json parameters** ``` "parameters": [ { "kind": "range", "id": "corner", "token": "shape.radius.window", "min": 0, "max": 24, "step": 1, "unit": "px", "label": { "en": "Window corners", "de": "Fensterecken" } }, { "kind": "color", "id": "accent", "token": "color.accent", "seed": true, "label": { "en": "Accent" } }, { "kind": "choice", "id": "material", "token": "material.blur", "options": [ { "value": "6px", "label": { "en": "Calm" } }, { "value": "36px", "label": { "en": "Deep glass" } } ], "label": { "en": "Glass depth" } } ] ``` > **Unknown tokens are rejected** > A parameter that points at an unknown token fails validation. A parameter may write only its declared token. ## A complete token set **theme tokens** ``` { "id": "com.example.ocean", "name": "Ocean", "modes": ["light", "dark"], "base": "iris", "tokens": { "color.accent": "#0b6ea8", "color.accent.strong": "#3b9ad1", "color.on.accent": "#ffffff", "color.canvas.background": "#071a24", "color.panel.background": "#0d2733", "color.text.primary": "#eaf4f9", "color.text.muted": "#9ab4c2", "color.outline": "#ffffff24", "shape.radius.window": "16px", "material.opacity": "0.72", "material.blur": "18px", "typography.display": "\"Fraunces Variable\", Georgia, serif" } } ``` Omitted tokens fall back to the base, so a theme is always complete. That fallback is a floor, not a reason to omit the roles that define the theme. ## Quality rules - Body and control text keep readable contrast in every supported mode. - Focus rings are visible on every surface. - Reduced motion removes decorative motion without hiding content. - Long labels and German strings do not clip controls. - The theme does not depend on a particular wallpaper. - Every parameter writes only its declared token. ## Next - [Create a theme](/docs/themes/authoring/) — the authoring flow. - [Package & install](/docs/themes/packages/) — theme.json, ZIP, trust and validation. - [Shell & UI](/docs/shell-ui/) — how the shell applies a theme. - [RUI design documentation](https://rumahl.com/design/rui) --- ## Theme packages and install URL: https://rumahl.dev/docs/themes/packages/ Package, validate and install an RUI theme: theme.json, ZIP layout, styles.css, code trust, previews, uninstall and troubleshooting. A theme package is a JSON document or a ZIP with `theme.json` at its root. Styling is data; code is a separate trust decision. ## Package format The OS accepts a single `.json` file or a `.zip` with `theme.json` at the root or one directory deep. A ZIP may name sibling `styles.css`, `code.js` and a preview image; their contents are inlined into the installed theme. **package layout** ``` ocean/ theme.json styles.css # optional code.js # optional preview.png # optional ``` | File | Required | Purpose | | --- | --- | --- | | theme.json | Yes | Theme identity, modes, variants, tokens and parameters | | styles.css | No | Presentation-only CSS, applied CSP-safely | | code.js | No | Optional theme code; sandboxed by default | | preview.png | No | Real preview image shown in the gallery | ## Self-contained package A theme package is self-contained by design. The files in the package are inlined; there is no remote asset field. A theme that loads a remote font, image or stylesheet is not portable and not offline-safe. > **No remote assets in a theme package** > A package inlines theme.json, styles.css, code.js and preview.png. It has no field for a remote font, image or stylesheet. A remote @import, url(https://…) or fetch() makes the theme dependent on a third party; remove it before install. ## theme.json **theme.json** ``` { "id": "com.example.ocean", "name": "Ocean", "description": "A cool theme for dim rooms.", "version": "0.1.0", "author": "com.example", "modes": ["light", "dark"], "base": "iris", "variants": { "shellLayout": "dock", "launcherLayout": "springboard", "windowChrome": "standard" }, "tokens": { "color.accent": "#0b6ea8", "color.canvas.background": "#071a24", "color.panel.background": "#0d2733", "color.text.primary": "#eaf4f9", "shape.radius.window": "16px" }, "parameters": [], "css": "styles.css" } ``` Omitted tokens fall back to the selected base. Use a stable `id`; the name is display metadata, not identity. ## Install and test - Open **Settings → Display → Themes**. - Choose **Install theme** and select the `.json` or `.zip` package. - Review the validation report. An invalid token, duplicate id or unknown parameter is rejected. - Select the theme, switch light/dark and test every parameter control. - Check a narrow window, long app titles, reduced motion and a high-contrast display. - Uninstall or reset to verify the shell returns to a built-in theme cleanly. > **Code is not data** > A JSON theme cannot run JavaScript. If a package contains code.js, review what it does before granting full shell access. Sandboxed code cannot read the shell DOM, cookies or platform APIs. ## Code, sandbox and full access | Runtime | What it can do | Trust | | --- | --- | --- | | No code | Tokens, CSS and parameters only | No extra consent | | Sandboxed code | Draw inside an isolated layer | Sandboxed by default | | Shell code | Legacy full-access module API | Explicit consent and trusted code hash | A theme that declares no runtime is treated as a shell-code theme for legacy compatibility and needs explicit consent before execution. Prefer data-only or sandboxed themes. ## Validation and troubleshooting | Symptom | Likely cause | Fix | | --- | --- | --- | | Unknown token | Parameter or token not in the contract | Use a declared token or add the role to the contract | | Duplicate theme id | Another installed theme has the same id | Use a stable unique id | | Invalid mode | Mode not in light / dark | Declare supported modes only | | Preview missing | No sibling preview image | Optional; omit or add a real preview | | Theme looks incomplete | Required base roles omitted | Start from the base and override the roles that define the theme | | Remote URL or network call | Theme depends on a remote font, image or request | Remove it; use system resources, tokens or local CSS | | Code does not run | Runtime not declared or trust not granted | Review the code and grant trust explicitly | ## Public distribution The public store at `store.rumahl.com` lists themes in the same catalog as apps. Package downloads and updates resolve to `github.com/rumahl/apps`. Local installation remains for development, offline use and private themes. ## Current limits Theme certification, a support promise and theme-wide revocation rules are still missing. Uninstall removes the installed theme and its settings; export is available for local packages. ## Next - [Themes overview](/docs/themes/) — the four theme docs. - [Create a theme](/docs/themes/authoring/) — the authoring flow. - [Tokens & parameters](/docs/themes/tokens/) — the complete contract. - [Shell & UI](/docs/shell-ui/) — how the shell applies a theme. --- # Platform ## Platform URL: https://rumahl.dev/docs/platform/ The rumahl OS platform: architecture, local identity, themes, secrets, storage, shell contracts and release checks. Platform Follow a request from the shell through the HTTP gateway to the platform core. Learn how the platform identifies the caller, authorizes access to resources and handles storage, secrets and updates. [Read the architecture](/docs/architecture/) [Identity & OIDC](/docs/identity/) Local-first OIDC provider Encrypted at rest Core contracts ## How the system fits together. Start with the request path to see where a platform decision is made. Read the identity contract if your integration needs a session or OIDC, or open the shell contract if you’re working on navigation and visible state. [Model ### Architecture Invariants, repository boundaries and the request path. Read the architecture](/docs/architecture/) [Identity ### Identity & OIDC Local accounts, sessions, PKCE and the OpenID Provider. Read identity](/docs/identity/) [Appearance ### Themes Tokens, modes, parameters and portable theme packages. Create a theme](/docs/themes/) [Shell ### Shell & UI Routes, snapshots, surfaces and the custom front page. Read the shell contract](/docs/shell-ui/) Data and operations ## Keep data and updates inside the boundary. Callers address storage through logical resources that the platform resolves. Use the secrets guide to see how write-only values reach the runtime, and the storage and updates guide to understand where persistent data belongs. [Security ### Secrets & storage Write-only secrets, encryption at rest and runtime delivery. Read the secret model](/docs/secrets/) [Operations ### Storage & updates Volumes, schema safety and the current update boundary. Read storage](/docs/storage-updates/) [Quality ### Testing & release Unit, bridge, browser and image checks before shipping. Open the check matrix](/docs/testing/) [Diagnostics ### Troubleshooting Import, launch, bridge, store and consent failures. Troubleshoot](/docs/troubleshooting/) Dos and don’ts ## Rules for the platform. The platform is local-first, but local does not mean unguarded. Identity, installations, grants and secrets are checked against live state every time an operation crosses a boundary. Do 5 Authorize from the live account, installation and grants at launch and at each capability call. Keep data on the machine unless a user explicitly connects an external service. Use short-lived leases and re-check them instead of caching a decision forever. Document available, local-only and missing states explicitly. Keep the developer listener on loopback and use SSH forwarding for remote work. Don’t 5 Trust a manifest path, a cached grant or a claim made by the client. Expose the developer server as the public OS interface. Bypass the platform by calling an app service directly. Store secrets in a theme, a storefront or a client-side bundle. Promise production stability for a development checkout. Next ## Build on the platform. Apps consume the platform contracts; the Apps area has the package, API and bridge guides. [Go to Apps](/docs/apps/) --- ## Architecture URL: https://rumahl.dev/docs/architecture/ The platform invariants, repository boundaries and request path from the OS shell to the Rust domain core. Trace how rumahl OS handles a request from the shell or an installed app. The path explains where the caller’s identity is established, where access is checked and which layer performs the work. For a concrete example of how the platform evaluates grants between apps, see the [permissions and capabilities guide](/docs/permissions/). ## Platform invariants - Core provides mechanisms, not products. Core contains no app-specific behavior. - Apps never communicate directly with other apps. - Apps depend on capabilities, not concrete providers. - Permission request is not permission grant. Capability is not contribution. - Every operation has an identity. - Resources are logical references, never host paths. - First-party and third-party apps use the same platform contracts. - Privileged OS operations run in isolated services. - Transport, persistence, authentication and UI concerns stay outside the domain core. > **Boundaries before features** > A feature that bypasses identity, capability or resource policy is not a shortcut. It is a second architecture. ## Request path **flow** ``` OS shell / app window │ same-origin request or bridge call ▼ platform-web / platform-api │ Host, Origin, CSRF, session ▼ platform-service │ account, installation, grants, policy ▼ domain core │ identity, resources, lifecycle ▼ persistence / host adapter ``` The frontend and installed apps never perform privileged host operations. A request passes through platform contracts so identity, permissions, resource ownership and policy can be enforced before work leaves the domain. In a development server, Vite and React SSR sit in front of the same Rust HTTP gateway. Production uses immutable bundles, strict CSP and content-derived build IDs; the authorization boundary is the same. ## Source map | Path | Responsibility | | --- | --- | | core/ | Domain concepts, policies and platform invariants | | platform-api/ | Stable contracts without implementation leakage | | platform-service/ | Composition of core, auth, persistence and app operations | | platform-web/ | HTTP/HTTPS gateway, shell snapshot, apps and OIDC adapter | | frontend/ | React shell, SSR, bridge client, UI kit and Storybook | | ui-contracts/ | Engine-neutral snapshot, theme and extension contracts | | account-auth/ · oidc-provider/ | Local accounts and OpenID Connect | | app-packages/ | Signed package manifest, verification, import and CLI | | app-operations/ | Durable install/uninstall journal across providers | | persistence-sqlite/ | Snapshots, accounts, operations, databases and secrets | | platform-buildroot/ | System image and service integration | ## Where new code belongs ### A new permission rule It belongs at the backend authorization boundary and in the UI explanation. Hiding a button is not authorization. If the rule changes resource semantics, it belongs in core policy first. ### A new app runtime It belongs behind the runtime adapter and the package contract. Do not teach `platform-web` about a specific container engine or a specific app. ### A new host operation It belongs in an isolated service with an explicit contract. The shell should receive a bounded result, never a host path or a privileged socket. ### A new UI state If it changes a platform decision, it is not only a UI state. Model it in the contracts and test denial, reconnect and restart behavior. ## Identity and resources Every relevant operation has an identity. The platform must determine which user, application or service is responsible before privileged work happens. Resources are logical references; the platform resolves them and controls access. Callers do not select a host path. They name a resource and an operation. The resolution and the authorization are platform work. ## Next - [App lifecycle and data](/docs/app-lifecycle/) — install, uninstall and databases. - [Identity and OIDC](/docs/identity/) — local accounts and consent. - [Testing and release](/docs/testing/) — the check matrix. --- ## Device setup and network URL: https://rumahl.dev/docs/device-setup/ Set up a rumahl OS device in the browser: flash or install the image, account, DHCP, static and Wi-Fi networking, session lock, the default firewall, Secure Boot and A/B updates. A rumahl OS device boots into a browser setup, not a console wizard. This page covers the UEFI image and the installer, the three setup steps, automatic, static and Wi-Fi networking, the default firewall, Secure Boot and A/B system updates. > **This is not the developer server** > The local setup guide runs the developer server on loopback. This page describes a flashed rumahl OS image on a device. Never expose the developer server as the public OS interface. ## 1. Flash the image The real-hardware target is an x86-64 UEFI image with a read-only system partition and a persistent data partition. Build it with `rumahl_x86_64_uefi_defconfig`, then write the whole disk image: **flash the whole device** ``` sudo platform-buildroot/image/flash.sh \ build/uefi-output/images/rumahl-disk.img /dev/sdX --grow ``` `--grow` expands the data partition to fill the target. Back up anything on the device first; flashing erases it. Boot the device in UEFI mode. Secure Boot must be disabled for the current image because the boot chain is not signed. The same medium is also the installer. Boot it from USB, open the setup page on the device and choose **Install on this device** in the welcome step. The installer writes a GPT disk with an ESP, two root slots and a fresh data partition, copies the running image into both slots, installs GRUB and reboots into the internal disk. Every file on the selected disk is erased; the installer refuses the disk it is running from and any disk smaller than 8 GiB. ## 2. First boot and the setup URL The first-boot unit creates the persistent directories, device CA, TLS certificate and the TPM-sealed secret-store key when a TPM exists. It does not block the console waiting for input. Instead, the console and the login page show the addresses where setup is available: **console hint** ``` https:/// https://rumahl.local/ (mDNS, when available) ``` Open the address in a browser. The certificate is device-generated and self-signed; accept it once. The setup page is available only while no account exists. ## 3. The three setup steps 1 ### Account Create the first administrator. It becomes the device owner. The username must start and end with a letter or digit; the password is at least six characters. Inline errors stay next to the field and entered values are kept. 2 ### Network The page reports the current DHCP or self-assigned address, gateway and DNS. Choose **Scan for networks** to join a Wi-Fi network: pick an SSID, enter the WPA passphrase and the device connects before setup continues. The same controls are in Settings → System → Network. 3 ### Device Name the device. The name appears on the login screen and in the local network. Leave it empty to keep the first-boot default. After **Create device**, the setup signs in automatically and opens the desktop with the first-run welcome. There is no second login. The welcome covers personalization, the Store and system updates; it can be replayed from **Settings → System → About**. ## 4. Network modes | Mode | Behaviour | | --- | --- | | DHCP | Tried first. The device gets its address, gateway and DNS from the network. | | Self-assigned | If no DHCP server answers, systemd-networkd assigns a tested 169.254.0.0/16 link-local address so the setup page stays reachable. | | Wi-Fi (iwd) | Scan and join from the setup page or Settings. The root broker writes the iwd profile with mode 0600; passphrases are never stored by the platform. Only printable-ASCII SSIDs without =, / or \ are accepted. | | Static IPv4 | Set in Settings → System → Network. The platform validates the address, gateway, subnet and DNS and asks the privileged host-config broker to write the systemd-networkd configuration and reconfigure the interface. | Static configuration is an administrator action. The platform service never writes network files itself; the root broker owns the interface. A change can briefly drop the connection and is applied immediately. ## 5. Session lock and power - **Lock** in the quick settings hides the desktop. Unlocking asks for the account password again; the attempt is audited. The lock survives reloads and new tabs. - **Restart** and **shut down** require an administrator and a confirmation. They call the recovery host broker. - **Sign out** ends the session and clears the lock state for the next login. ## 6. Updates and recovery System updates come from `github.com/rumahl/rumahl` with stable and beta channels. Releases publish a signed A/B bundle; the platform downloads it, an administrator confirms, and the root updater writes the inactive slot and its kernel. 1 ### Verify The bundle manifest carries an Ed25519 signature over the version and both payload digests. Unknown keys, a modified manifest or a digest mismatch are rejected before anything is written. 2 ### Write the inactive slot The running slot is never touched. The update writes the new root filesystem and `bzImage` into the other slot and sets `next_entry` in the GRUB environment block. 3 ### Boot and confirm GRUB boots the new slot once. `rumahl-boot-ok.service` marks the boot successful after the platform and nginx start. If the new slot does not get that far, the second start switches back to the previous slot automatically. The release workflow can only build the bundle as `rumahl-update- .tar.zst.unsigned`; the signing key never reaches CI. A maintainer signs it offline with `scripts/sign-system-update.sh` and attaches the signed name. A release without that asset offers no in-place update. > **A/B is implemented, hardware acceptance is pending** > The slot switch and rollback logic are in the image and covered by unit tests. Run the A/B items in the real-hardware acceptance checklist before relying on OTA in production. ## 7. Default firewall The image loads an nftables policy at boot: every new inbound connection is dropped except loopback, established/related traffic, ICMP, DHCP, mDNS, HTTPS (443) and the per-installation app host ports. The privileged broker replaces the `app_ports` set whenever an app route is allocated or released. Container apps publish their declared ports on `127.0.0.1` only; LAN access goes through the authenticated nginx app host. Verify the policy on the device with `nft list ruleset` and a LAN port scan. nginx has an ordering dependency on `nftables.service`, so the HTTPS listener never starts before the policy is loaded. ## 8. Secure Boot Secure Boot signing is opt-in. A build with `RUMAHL_SECURE_BOOT_KEY` and `RUMAHL_SECURE_BOOT_CERT` signs the GRUB EFI binary and both slot kernels with `sbsign` and publishes the certificate on the ESP. Enroll that certificate in the firmware `db` to boot with Secure Boot enabled. Settings → System → About reports the firmware state and whether the running image is unsigned, signed or enforcing. Without the key pair the image is unsigned and Secure Boot must stay disabled; GRUB does not enforce kernel signatures yet. ## What is still missing - A supported hardware list and a graphical disk picker beyond the setup page; the installer runs from the flashed medium. - Secure Boot enforcement of kernel signatures and a TPM PCR policy. - Encryption of the data partition at rest. - Hardware acceptance of the installer, A/B rollback and the firewall. ## Next - [Local setup](/docs/quickstart/) — run the developer server and import your first app. - [Runtime kinds](/docs/runtime-kinds/) — what apps can do on the device. - [Storage & updates](/docs/storage-updates/) — data and update boundaries. - [Troubleshooting](/docs/troubleshooting/) — setup, network and install failures. --- ## Identity and OpenID Connect URL: https://rumahl.dev/docs/identity/ Local accounts, sessions, the OpenID Provider and consent for installed applications. rumahl OS owns local accounts and acts as its own OpenID Provider. Installed applications can authenticate through a live local session without turning rumahl into a cloud account provider. ## Local accounts rumahl supports multiple local user accounts. Account selection and session state are explicit: changing the active desktop account must not silently change an existing app or OAuth session. - A local password login issues a fresh 12-hour `__Host-` session cookie. - Credentials and sessions are stored in SQLite and survive server restarts. - There is no public account-registration endpoint and no universal default password. - Development credentials are generated into the local state directory, never embedded in source. ## The OpenID Provider rumahl OS is a standards-compliant OpenID Provider for installed applications. Protocol DTOs, tokens and signing keys stay outside the domain core; the account and consent decisions remain local. | Endpoint | Purpose | | --- | --- | | GET /.well-known/openid-configuration | Provider metadata | | GET /oauth2/jwks | Public signing keys | | GET /oauth2/authorize | Authorization request | | POST /oauth2/authorize/approve | Explicit consent | | POST /oauth2/token | Authorization-code exchange | | GET /oauth2/userinfo | User information for authorized clients | The discovery document advertises Authorization Code only, PKCE `S256`, pairwise subjects, EdDSA ID tokens and the `openid`, `profile` and `email` scopes. There is no implicit flow, password grant or refresh-token grant in the current provider. **discovery (shape)** ``` { "issuer": "https://localhost:8443", "authorization_endpoint": "https://localhost:8443/oauth2/authorize", "token_endpoint": "https://localhost:8443/oauth2/token", "userinfo_endpoint": "https://localhost:8443/oauth2/userinfo", "jwks_uri": "https://localhost:8443/oauth2/jwks", "response_types_supported": ["code"], "grant_types_supported": ["authorization_code"], "subject_types_supported": ["pairwise"], "id_token_signing_alg_values_supported": ["EdDSA"], "code_challenge_methods_supported": ["S256"], "token_endpoint_auth_methods_supported": ["client_secret_basic", "none"], "scopes_supported": ["openid", "profile", "email"] } ``` ## Authorization Code + PKCE Generate a high-entropy verifier, send its SHA-256 challenge, then present the verifier at the token endpoint. Never put a client secret or a token in a URL. **authorization request** ``` GET /oauth2/authorize? response_type=code& client_id=com.example.notes& redirect_uri=https%3A%2F%2Fnotes.example%2Fcallback& scope=openid%20profile& state=& nonce=& code_challenge=& code_challenge_method=S256 HTTP/1.1 Host: localhost:8443 ``` The provider shows a local consent page. The user approves or denies the requested scopes for the live local account and session. Approval is a same-origin form post, not a JSON API. **token exchange** ``` POST /oauth2/token HTTP/1.1 Host: localhost:8443 Content-Type: application/x-www-form-urlencoded grant_type=authorization_code& code=& redirect_uri=https%3A%2F%2Fnotes.example%2Fcallback& client_id=com.example.notes& code_verifier= ``` **token response** ``` { "access_token": "…", "id_token": "…", "token_type": "Bearer", "expires_in": 900, "scope": "openid profile" } ``` Access tokens and ID tokens expire after 15 minutes. The current provider does not issue refresh tokens; re-run the authorization flow when a token expires. The `id_token` is signed with EdDSA and uses a pairwise subject per client. ## UserInfo and claims **userinfo request** ``` GET /oauth2/userinfo HTTP/1.1 Host: localhost:8443 Authorization: Bearer ``` **userinfo response (shape)** ``` { "sub": "", "name": "Ada", "email": "ada@example.invalid", "email_verified": true } ``` | Claim | Scope | Notes | | --- | --- | --- | | sub | openid | Pairwise subject; stable for this client, not global across clients | | name | profile | Display name when available | | email | email | Email when available | | email_verified | email | Whether the account marked the address verified | | auth_time | openid | ID token claim for the authentication time | | nonce | openid | Echoed into the ID token for replay protection | ## Protocol errors | Error | Meaning | | --- | --- | | invalid_request | Missing or malformed parameter | | invalid_client | Unknown client or failed client authentication | | invalid_grant | Bad, expired or already-used authorization code; wrong redirect or verifier | | unsupported_response_type | Only code is supported | | invalid_scope | A scope the client is not allowed to request | | access_denied | The user denied consent | ## Flow rules - Use Authorization Code with PKCE for installed applications. - No resource-owner password grant, implicit flow or refresh-token grant is exposed. - Consent is explicit and revocable. A new scope is a new decision. - Uninstalling an app revokes its authorization codes, consents, access tokens and client registration. - Local accounts and OIDC sessions are separate from the website account or GitHub account. > **OIDC is optional** > An app can use local settings, capabilities and data without OIDC. A web app that does not need an external identity should not ask for it. ## Sessions and revocation A session is a live authorization input, not a permanent identity. Rust revalidates the live account, session, installation and grants at launch and on renewal. An explicit grant for a removed installation cannot authorize its replacement. The shell should fail closed on a revoked session: close the frame, clear private in-memory state and offer a new login. Do not replay a stale lease or reuse a cached private response. ## Next - [Secrets and storage](/docs/secrets/) — encryption and delivery. - [Hosting and bridge](/docs/app-hosting/) — launch authority. - [API reference](/docs/api/) — OIDC and session routes. --- ## Secrets and storage URL: https://rumahl.dev/docs/secrets/ How app secrets are sealed at rest, delivered to the runtime and kept out of logs, bundles and the frontend. A secret is not a string in a manifest. It is a write-only value sealed at rest, resolved server-side for one authorized operation and never returned to the app or the frontend bundle. ## The boundary - Secret values are stored per installation and key, bound to an associated encryption context. - The app can set a secret and learn that it is configured; it cannot read the plaintext back. - The renderer, platform snapshot, logs and app asset tree never contain the plaintext. - A ciphertext moved to another key or installation fails authentication. ## Encryption at rest On a host with a TPM, the field cipher is sealed by the TPM. Development and TPM-less hosts use a random 32-byte key in the state directory with owner-only permissions. The key never enters SQLite, logs or a browser bundle. **secret lifecycle** ``` manifest setting: type "secret" ↓ platform validates and seals the value ↓ storage: app_setting(installation_id, key) ↓ runtime request: decrypt server-side ↓ attach to the authorized operation ↓ return the result, never the secret ``` ## Secret settings **manifest excerpt** ``` "settings": [ { "key": "ha.url", "title": "Home Assistant address", "type": "text" }, { "key": "ha.token", "title": "Access token", "type": "secret", "required": true } ] ``` A secret must not declare `options`. An empty secret clears the stored value. A required value must be present after a write, otherwise the request is denied. | Limit | Value | | --- | --- | | Settings per manifest | 64 | | Plain value size | 64 KiB | | Secret value size | 16 KiB | | Settings per write | 64 | | Required values | Must be present after the write | **read settings** ``` GET /api/v1/shell/apps/com.example.notes/settings?installationId=0199… Cookie: __Host-rumahl_session=… HTTP/1.1 200 OK Content-Type: application/json { "settingsVersion": 1, "id": "com.example.notes", "installationId": "0199…", "manifest": [ { "key": "ha.url", "title": "Home Assistant address", "type": "text", "required": false }, { "key": "ha.token", "title": "Access token", "type": "secret", "required": true } ], "values": { "ha.url": "http://homeassistant.local:8123" }, "secrets": ["ha.token"] } ``` **replace a secret** ``` PUT /api/v1/shell/apps/com.example.notes/settings?installationId=0199… Origin: https://localhost:8443 Content-Type: application/json { "values": { "ha.token": "new-token" } } ``` > **Write-only means write-only** > Do not design an app screen that reads a stored token back. Show “configured” and provide a replace action. The API returns configuration state, not the secret. ## Rotation and removal - Replace a secret by writing a new value; the old ciphertext is overwritten. - Clear an optional secret by writing an empty value; a required secret cannot be cleared without replacing it. - Uninstall removes every setting value for that installation. - An update keeps settings because the installation identity is stable. - A reinstall is a new installation and does not inherit the old secrets. - Rotate the publisher key separately from app secrets; a signing key is not a runtime setting. ## Runtime delivery The platform delivers a secret only to an operation that passes the live account, installation and grant checks. For a brokered network request, the platform attaches the configured secret server-side; the app receives the response, not the credential. | Rule | Reason | | --- | --- | | No secret in manifest | The manifest is public package metadata | | No secret in app assets | Published web assets are readable | | No secret in logs or audit body | A log is a second disclosure surface | | No plaintext over the bridge | The app frame is an untrusted guest | | No re-use across installations | Associated context binds the ciphertext to one identity | ## Storage boundary The state volume is private to the platform. App data, databases and secrets are addressed through platform resources, not host paths. Uninstall removes runtime access and retained database bindings; physical purge is a separate policy. ## Next - [App lifecycle and data](/docs/app-lifecycle/) — the journal around secrets. - [Identity and OIDC](/docs/identity/) — the account boundary. - [Testing and release](/docs/testing/) — denial and restart checks. --- ## Storage and updates URL: https://rumahl.dev/docs/storage-updates/ Volumes, private state, schema safety and the current boundary around system updates. The state volume is private platform data. Apps address resources; the platform resolves paths and owns the update boundary. ## Volumes | Area | Purpose | | --- | --- | | State volume | Platform database, accounts, operations, app settings, secrets and asset roots | | App assets | Published immutable web assets under the installation root | | App data | Provider-managed storage disclosed through logical resources | | Recovery state | Diagnostics, quarantine and recovery settings behind the recovery broker | The state volume is not a public web root. App hosts serve only their own published asset tree; shell APIs never route to arbitrary host paths. ## Schema safety - Database representations stay outside domain types. - Migrations are ordered and validated against the current schema. - A provider snapshot precedes a schema migration; a failed health check rolls back with the runtime. - Apps cannot choose a host path, DSN or database engine. - Uninstall retains data in an inaccessible state until an explicit purge policy exists. > **App updates and OS updates are different programs** > App updates use the OS-owned install journal and keep app data. OS updates have a fixed release source but no A/B activation or rollback yet; an image that does not ship the privileged updater reports system updates as unsupported and must be reflashed. ## System updates The platform checks the fixed repository [github.com/rumahl/rumahl](https://github.com/rumahl/rumahl). Releases are selected by channel: stable releases are not pre-releases; beta includes pre-releases and `-beta`/`-rc` tags. The channel and stable auto-download are device settings. - The platform fetches the release list, downloads the signed A/B bundle named `rumahl-update- .tar.zst` and verifies its digest. The full disk image is a reflash artifact and is never applied in place. - A bundle is a zstd-compressed tar with a `manifest.json`, `rootfs.ext4` and `bzImage`. The manifest is signed with Ed25519 over the version and both payload digests. - Applying requires an administrator. The platform asks the root host-config broker; the privileged updater verifies the signature against `/etc/rumahl/system-update-keys.json`, verifies both digests, writes the inactive slot and its kernel, and arms the GRUB environment block. - GRUB boots the new slot once. `rumahl-boot-ok.service` marks a successful start; two unsuccessful starts switch back to the previous slot. The running slot is never written. - An unsigned bundle, an unknown key or a digest mismatch is rejected before any partition is written. CI only builds the bundle as `*.tar.zst.unsigned`; a maintainer signs it offline with `scripts/sign-system-update.sh`. - An image without A/B slots or the updater reports system updates as **unsupported** and disables install. Debug builds and `RUMAHL_OS_CHANNEL=dev` never contact the release repository. The release workflow builds the UEFI image on a `v*` tag, compresses it to `rumahl-os- .img.zst`, builds the unsigned update bundle, publishes `SHA256SUMS` and creates the GitHub release. The installed version comes from `RUMAHL_OS_VERSION` in the image environment. > **A/B is implemented, hardware acceptance is pending** > The slot switch and rollback are covered by unit tests and the acceptance checklist. Do not promise production OTA until the real-hardware run is recorded. ## App update boundary An app update needs more than replacing files: provider snapshot, schema migration, health check and rollback must agree. The platform must not advertise a new version before the updated runtime passes its health check. **update contract** ``` stage update → provider snapshot → migrate → start updated runtime → health check → commit or rollback runtime + data together ``` ## Backups and recovery Recovery has its own Rust-served surface and a separate trust boundary. Host power and maintenance actions require the recovery broker, peer-UID checks and an explicit operator allowlist. A shell session does not grant maintenance rights. ## Next - [App lifecycle and data](/docs/app-lifecycle/) — the operation journal. - [Secrets and storage](/docs/secrets/) — encryption and delivery. - [API reference](/docs/api/) — recovery and filesystem routes. --- ## Shell and UI contracts URL: https://rumahl.dev/docs/shell-ui/ One address, two presentations, route ownership, shell snapshots, preferences and theme contracts. The rumahl OS shell owns OS-level navigation, window behavior and preference state. Apps provide content through explicit contracts; they do not take over the shell. ## One address, two presentations The same HTTPS origin serves the authenticated desktop shell and the login/SSR entry. The gateway preserves the exact origin for session and CSRF checks. The shell can render desktop and launcher modes without changing the platform boundary. | Route area | Owner | | --- | --- | | / | Shell document and client router | | /app/:appId/* | Installed app host, resolved by the platform | | /settings/* | Shell settings surfaces | | /recovery | Separate recovery environment served by Rust | | /api/v1/* | Platform API, never app-rendered | ## Snapshot contracts Rust is authoritative for the shell snapshot and authorization. The frontend consumes a bounded snapshot; it does not derive permission from a visible control or a local preference. - Account and session state are explicit. - App catalog entries are session-filtered and bounded. - Preferences are versioned and persisted by the platform. - Live events update the snapshot; a reconnect must re-establish authorization. ## Custom front page in the browser The shell front page is owned by the shell. It is not a user-supplied HTML slot. Customize it through the supported presentation settings: desktop or launcher mode, launcher/shell layout variants, the active RUI theme, wallpaper and account/device preferences. A web app can be a useful front-page experience, but it opens in an app window; it cannot replace the shell or inject arbitrary chrome. - Use [a theme package](/docs/themes/authoring/) for visual identity. - Use shell and launcher variants for structure, not for embedding arbitrary markup. - Use a storefront source for a custom catalogue front page; see [Build a store](/docs/store/) and [Build a custom storefront](/docs/storefront/). - There is no documented browser new-tab or shell-homepage plugin API. Do not assume one. > **Storefront front page is metadata-driven** > A store source controls featured apps, categories, ratings, downloads, icons and screenshots. It cannot inject JavaScript, CSS or a custom layout into the Store. ## App surfaces An installed app runs in an isolated iframe. The shell owns the frame host, the launch lease and the bridge channel. The app owns only its own document and uses declared bridge methods for information, theme, settings, notifications, windows and capabilities. **bridge boundary** ``` shell frame host │ postMessage · rumahl.bridge.v1 ▼ app iframe (opaque origin) │ declared methods only ▼ platform authorization │ ▼ capability / settings / notification result ``` > **No direct app-to-app calls** > Apps must not open a direct channel to another app. A capability call goes through the platform, which knows the caller, installation and current grants. ## Preferences and themes The shell owns the active theme and presentation preferences. A theme supplies semantic tokens; components read those tokens rather than local colors. Theme changes are pushed to apps as semantic variables and must respect the user’s reduced-motion setting. - Desktop and launcher modes are shell state, not app routes. - An app window does not silently change the account session. - Preferences survive a reload and remain scoped to the account or device as defined. - Theme variables are projections of tokens, not a second color system. ## Quality checks Shell changes must be checked in the real shell at desktop and narrow widths, with keyboard focus, long app titles, missing app data and revoked sessions. A fixture-only demo cannot validate authentication, persistence or backend permissions. ## Next - [Hosting and bridge](/docs/app-hosting/) — launch leases and isolation. - [Testing and release](/docs/testing/) — browser and shell checks. - [API reference](/docs/api/) — shell and preference routes. --- ## Testing and release URL: https://rumahl.dev/docs/testing/ The frontend, Rust, browser, shell and Buildroot checks expected before shipping a rumahl change. A green unit test does not prove that an image boots or that a permission is enforced. Check the smallest boundary you changed, then the integration path that actually ships. ## Frontend checks **shell** ``` pnpm --dir frontend typecheck pnpm --dir frontend lint pnpm --dir frontend test pnpm --dir frontend build ``` Run the checks from the repository root. A change to shared contracts can pass a component test and still break the SSR or client boundary; run both the unit suite and the production build. ## Rust checks **shell** ``` cargo fmt --all -- --check cargo clippy --workspace --all-targets --locked -- -D warnings cargo test --workspace --locked ``` Dependency changes must respect `deny.toml`. Do not add a wildcard requirement or a dependency outside the license allowlist. ## Integration and browser checks **shell** ``` python3 tests/e2e/development/check.py python3 tests/e2e/development/check.py --browser python3 tests/e2e/shell/check.py python3 -m unittest discover -s platform-buildroot/recovery -p "test_*.py" -v ``` | Check | What it proves | | --- | --- | | Development check | Prebuilt mode, verified HTTPS, login/SSR, origin and file boundaries, HMR, SSR output, lock behavior and persisted sessions | | Browser check | Native form login, hydration, React state preservation and CSS hot updates | | Shell check | Real HTTPS gateway, SQLite, two users, immutable assets, sessions, WebSocket revocation and recovery independence | | Recovery unit tests | Recovery parsing and behavior without touching the host | ## Release acceptance Process-level tests do not prove that a Buildroot image boots. Use the production HTTPS test and Buildroot acceptance documented in their READMEs before shipping an image, including a booted VM or device test. > **Separate development from release** > The developer server serves source code and must never be exposed as the public OS interface. Production keeps immutable bundles, strict CSP and content-derived build IDs. ## App-specific checks - Launch without the required grant is denied, not merely hidden. - An expired lease is rejected and the frame offers retry. - Unknown bridge methods and malformed manifests are refused. - A secret is never returned as plaintext. - Network consent revocation applies on the next request. - A container without `com.rumahl.os.network` cannot reach the LAN or internet. - A native app cannot read the host home, platform state, Docker socket or another app’s data. - A revoked publisher blocks launch and start, while stop and uninstall remain available. - Uninstall revokes grants and consents and does not expose retained data. - A second account sees only its own catalog, grants and settings. ## Next - [Architecture](/docs/architecture/) — the boundaries under test. - [App lifecycle](/docs/app-lifecycle/) — install and uninstall journal. - [Contributing](/docs/contributing/) — branch, DCO and review. --- ## Troubleshooting URL: https://rumahl.dev/docs/troubleshooting/ Diagnose package import, app launch, bridge, store source, certificate, network consent and settings failures in rumahl OS. Most failures are one of five boundaries: package verification, launch authorization, asset publishing, the bridge channel or user consent. Find the boundary before changing code. ## First checks - Is the package signed and unchanged since signing? - Does the catalog list the app as `launchable: true`? - Does the error happen at import, at launch, or after the frame loads? - Is the app calling the bridge, or is it calling the shell API directly? - Which grant, origin or certificate is missing? > **Read the boundary** > A rendered error in the app is not proof that the platform denied the call. Check the network/console boundary first, then the UI. ## Package import fails | Symptom | Likely cause | Fix | | --- | --- | --- | | Signature does not verify | Manifest changed after signing; wrong key or trust store | Sign the exact manifest bytes and verify with the intended trust store | | Unknown field | Manifest schema mismatch or a typo | Remove the field; unknown fields are rejected | | File digest mismatch | A payload file changed after the manifest was written | Regenerate the manifest and sign again | | Package too large | Over 2,048 files, 64 MiB per file or 256 MiB total | Reduce the payload | | Manifest too large | Over 1 MiB | Move data out of the manifest | | Native package rejected | NativeTrustDenied, NativePublisherNotAllowed or a foreign ABI | Enable native execution, allow the publisher and build the artifact for the host ABI | | Native app installs but does not start | Executable not staged, bwrap unavailable or the sandbox failed at startup | Check the runtime supervisor log, the staged artifact and the host kernel namespace configuration | | Native app has no window | Native apps are headless by design | Open the app management page and use Start/Stop; native apps have no iframe or bridge | | Container app is not launchable | No declared HTTP endpoint, failed readiness or no app-host proxy | Declare the endpoint and health path, then check the runtime supervisor, broker and container state | | Publisher update rejected | Publisher identity changed | Use the same publisher key for an update | | Installed app cannot launch | Publisher or signing key was revoked | Stop the running process if needed and uninstall; revocation is loaded at startup | **shell** ``` # Verify exactly what the platform will verify. rumahl-package verify \ --package dist/notes \ --trust-store trust.json # Inspect the signed manifest bytes. sha256sum dist/notes/package.json cat dist/notes/package.sig.json ``` Do not edit `package.json` after signing. Re-signing changes the signature envelope and requires the private key; never put the key in the package. ## App will not launch | Response | Meaning | Fix | | --- | --- | --- | | 404 | Unknown app, wrong account or missing launch grant | Check the catalog and the live installation | | 423 | Safe mode is active | Open recovery and leave safe mode | | 503 | Storage, asset publication or runtime unavailable | Check the platform service and published assets | | Blank frame | Entrypoint missing, assets unpublished or wrong path | Confirm the entrypoint directory and relative asset URLs | | Frame disappears after 90 seconds | Lease renewal stopped | Keep the window open and renew every 30 seconds | | Works in preview, fails in the shell | Absolute URLs or an unsupported browser API | Use relative asset URLs and the bridge | Web and container apps launch through the frame route; web assets must be published under the installation root, and a container must expose a ready HTTP endpoint. Native apps are headless and use the runtime route instead of a frame. A missing asset, failed readiness check or missing runtime keeps the app not launchable or stopped. **expected launch response** ``` { "launchVersion": 1, "id": "com.example.notes", "installationId": "0199…", "lease": "…", "frameUrl": "https://0199….apps.localhost/launch/…/index.html", "renewAfterSeconds": 30 } ``` ## Bridge calls fail | Code | Meaning | Fix | | --- | --- | --- | | not-embedded | The page is not inside a shell frame | Use the standalone path or launch from the Store | | timeout | No response within 5 seconds | Check the handshake, parent frame and shell logs | | denied | Missing permission, grant or consent | Declare the capability and request consent | | no-provider | No handler registered for the capability | Open the provider app and register the handler | | unknown-method | Method not in the v1 surface | Check @rumahl/contracts/bridge | | provider.invoke never arrives | Provider not running or not handshaken | Start the provider; delivery waits for its handshake | **debug handshake** ``` const rumahl = connectRumahlBridge(); if (!rumahl.available) { // This is a standalone preview. } const welcome = await rumahl.ready(); console.log(welcome.appId, welcome.methods); ``` A method is refused if the signed manifest did not declare its capability. The shell does not fall back to a broad baseline for a modern manifest. > **Do not call the shell API from an app** > An installed app has an opaque origin and no shell session token. Use the bridge; the shell performs the authorized request. ## Store source fails | Symptom | Cause | Fix | | --- | --- | --- | | 428 with a fingerprint | Untrusted source certificate | Compare the fingerprint, then trust or cancel | | Index rejected | HTTP URL, credentials, fragment, redirect or invalid JSON | Serve stable HTTPS JSON without redirects | | Index works, app is missing | Required field invalid | Check the required index fields and app IDs | | Icons or screenshots missing | Cross-origin or unsupported image | Use the same origin; PNG, JPEG, WebP, GIF or AVIF under 8 MiB | | GitHub source is empty | Wrong owner, repository, ref or directory | Resolve the raw store.json URL and open it directly | | Package URL rejected | HTTP or a different certificate decision | Use HTTPS; trust the host once | | App installs but the custom storefront shows different data | The website is reading a stale copy | Fetch the live index and show fetch errors | **source resolution** ``` GitHub source github:owner/repo github:owner/repo@main/catalog https://github.com/owner/repo/tree/main/catalog Resolves to https://raw.githubusercontent.com/owner/repo/main/catalog/store.json ``` Only GitHub is recognized by the current source parser. Another Git host is not a supported GitHub source; use an HTTPS index instead. ## Network consent fails | Response | Meaning | Fix | | --- | --- | --- | | 403 {"reason":"approval-required"} | The exact origin is not approved | Show the consent dialog for the origin | | 403 {"reason":"private-approval-required"} | A private or loopback target needs explicit consent | Explain the LAN target and request consent | | 403 {"reason":"blocked-target"} | Forbidden destination | Do not retry; the platform will keep refusing | | 403 {"reason":"not-permitted"} | The app did not declare network access | Declare com.rumahl.os.network | | 401 from the upstream service | The service rejected its own auth | Check the secret setting and the upstream account | | 3xx from the upstream service | Redirects are not followed | Call the final URL directly | The origin is `scheme://host[:port]` only. A path, query or fragment is not part of consent. Revocation applies to the next request; a cached private response is not reused. ## Settings and secrets - A required value must be present after the write, or the write is denied. - A secret is write-only. A read returns the key in `secrets`, never the plaintext. - `null` clears an optional value. An empty secret clears the stored secret. - Settings belong to one installation. A reinstall does not inherit the old installation. - Limits: 64 settings, 64 KiB per plain value, 16 KiB per secret. ## What to include in a bug report - The step: import, launch, bridge call, store fetch or network request. - The exact status code and response body, with secrets removed. - The manifest excerpt, app ID and version. - The source URL and whether its certificate was trusted. - The bridge method and whether `ready()` resolved. - The runtime: development server, installed shell or recovery environment. - Whether the failure is reproducible after a fresh login and a relaunch. > **Never paste secrets** > Remove session cookies, private keys, access tokens, lease URLs and personal file paths before sharing logs. ## Next - [HTTP API guide](/docs/api-guide/) — request shapes and status codes. - [Bridge SDK reference](/docs/bridge-reference/) — methods and error codes. - [Runtime status](/docs/runtime-kinds/) — what is actually launchable. - [Testing and release](/docs/testing/) — a repeatable verification path. ---