Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
Merge managed-domain updates into the Nakama parity draft
Abdurrahman Fakhrulb2363b4320f6
diff --cc docs/PROGRESS.mdindex de2cb227,bd0b82cd..eb3eadd7--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@@ -107,6 -85,40 +107,40 @@@ verb, and `docs/CLI.md` was regenerategates passed (100% routing recall, 97.3% schema reduction, deterministic selection). Per the P7 #5 / P8 #6closed-loop rule, a passing corpus is not evidence of a defect, so it reported the observed gate values insteadof inventing a speculative change.+ ## 2026-10-17: Handoff the managed-domain CLI candidate for a new session+-The owner explicitly requested a committed, pushed draft PR checkpoint and progress record before continuing in a new session. Implementation is preserved on `agent/mso-103047d38625`; the code commit is `da3ce4f69dfcdcb44a26f4522ced653194ec6172`, based on `89d61bb0d73b47047c67e51df9a6ee30351c8c3a`. The task worktree is `/home/rahman/.cache/mso-worktrees/mso-103047d38625`; canonical remains `/home/rahman/mso`. Keep the draft separate from release integration until the remaining checks pass.++The owner explicitly requested a committed, pushed draft PR checkpoint and progress record before continuing in a new session. Implementation is preserved on `agent/mso-103047d38625`; the code commit is `da3ce4f69dfcdcb44a26f4522ced653194ec6172`, based on `89d61bb0d73b47047c67e51df9a6ee30351c8c3a`. The task worktree is `~/.cache/mso-worktrees/mso-103047d38625`; canonical remains `~/mso`. Keep the draft separate from release integration until the remaining checks pass.++ The implementation and operating guide are in `docs/MANAGED-DOMAINS.md`, `scripts/mso-domain.ts`, `scripts/cli/managed-apps.sh`, `lib/managed-apps/domain-*`, `lib/infra/managed-domain*` and the named-gateway helpers in `scripts/lib/gateway-app-route*.sh` / `gateway-named-config.mjs`. The earlier entry below records the design reasons. Setup persists a versioned private configuration, and enable/install/update/start/restart use its shared ingress-before-DNS lifecycle. The replacement connector must have its own registration evidence before the prior connector is retired; interrupted swaps use bounded identity-checked recovery.++ Verification of the code commit:++ - Typecheck and zero-warning ESLint passed. `bun run check`, the strict high/critical dependency audit and generated-changelog check passed.+ - The targeted gateway run passed all 38 cases before the full run. Core configuration/store/probe/env, provider DNS/route, CLI and managed-app lifecycle regression groups also passed their targeted runs.+ - Full `bun run verify` completed its coverage run with **749 passing / 3 failing files; 4,604 passing / 5 failing tests (4,609 total)**. The overall verify gate failed and coverage completion is not a release pass.+ - Three failures in `lib/forge/forge.test.ts` require a real accessible Docker daemon and the existing `mso-forge-sandbox:node22-v1` fixture image. No Docker executable, daemon socket or remote Docker host was available. After Docker is available, use `bash scripts/provision-forge-sandbox.sh`; do not replace these tests with mocks or skips.+ - Two candidate test issues remain: `scripts/mso-gateway-app-route-recovery.test.ts` expects the immediate-start failure text, while a loaded full run reaches the connection-registration failure instead; preserve the actual recovery/identity assertions when making that fixture deterministic. `scripts/mso-heartbeat.test.ts` copies a fixture checkout that lacks the new `scripts/lib/gateway-named-config.mjs`; update its fixture dependency inventory.+ - The isolated production build, zero-build-warning check, eager shell bundle budget and **all mandatory browser journeys passed** (build/E2E job exit 0). This includes release, native Integrations, native Google Integrations, server status, Assistant UX, deferred shell performance, macOS chrome and iOS lock checks on the code commit.++ The MSO exec environment inherits `NODE_ENV=production`; unit/coverage verification must explicitly use `NODE_ENV=test` so production process-ownership guards correctly distinguish test fixtures. The successful baseline ZIP tests used real Info-ZIP 3.0 extracted to `/tmp/mso-domain-toolchain.rZ3neG/root/usr/bin` on this host; ensure a real `zip` executable is available when reproducing. Keep production build verification in `scripts/verify-build.sh`, which archives committed HEAD and never builds over the live checkout.++ Operational state at handoff: the existing gateway-owned fallback runtime served the cockpit on loopback port 4005 and the public MSO hostname. This task did not deploy code, enable 9Router, write public DNS or apply tunnel routes. The selected Integrations user `rahman` and direct Cloudflare connection `mso-domains` now exist; their private setup form was opened, but the latest redacted connection query still reported the API token missing. Supply credentials through that private form, with Zone Read, DNS Edit and Cloudflare Tunnel Edit for the intended zone/account. The desired nested 9Router hostname also needs a certificate covering it; a CNAME alone does not establish working HTTPS.++ Next session should first read this entry and the draft PR, resume the existing branch/worktree, fix the two fixture issues, provide Docker/Forge prerequisites and rerun the required gates. Then verify the saved Cloudflare connection, run domain setup preview and apply as documented, rebuild through the supported lifecycle, and run `mso mapp enable 9router` or `mso domain ensure 9router --apply`. This installation has no active `mso.service`; its supported runtime rebuild is `mso update --rebuild`. The previous entry below explains why the current ship finalizer cannot complete on this topology.++ Evidence retained on the host: workflow `dc617f85-a3c5-4d80-925b-37f1eeb36f95`; full verify job `8eb2c590-0c0d-4775-ba25-f39d01f19b3d`, log `/tmp/mso-domain-verify-final.QG0zye`; isolated build/E2E job `254d79b0-1475-42ab-9baf-bc85092f9450`, log `/tmp/mso-domain-build-final.WiH3Vo`; check/strict-audit job `5706b638-f060-41a4-9b32-c7d6b5259e6c`. Logs and job access are host/session evidence; the committed summary is the durable handoff record.++ ## 2026-10-17: Persist managed-app domains and provision them through the existing MSO gateway++ The earlier app-host RFC described the hostname and login boundary, but enabling an application did not own a complete DNS lifecycle or leave durable evidence when setup stopped halfway through. `mso domain setup` now discovers the existing Cloudflare zone, account and named tunnel through a selected MSO Integration. Its public routing configuration, ownership ID, per-app progress, resource receipts and last error live in a private versioned store outside the checkout. Writes are atomic, retain the previous valid snapshot and serialize operations across processes; malformed or unsafe state fails visibly instead of becoming an empty configuration. The environment editor preserves unrelated values, validates the file before saving setup, and supports explicit repair after an interrupted write.++ `mso mapp enable <id>` installs an absent managed app, waits for its existing job and starts it through the shared API. Successful install/update jobs and start/restart actions then use the same domain provisioner. Local runtime success remains visible if domain setup needs attention, while CLI exit 2 and persistent diagnostics identify that incomplete outcome. Status, doctor and preview commands do not create infrastructure; `ensure --apply` resumes the saved plan. Stopping or uninstalling an app does not silently delete its hostname.++ Provisioning first checks the deployed MSO app-host authorization gate, the selected provider identity and exact-name DNS conflicts. It establishes the authenticated MSO ingress before publishing a CNAME. Remote tunnel updates preserve unrelated configuration; locally configured tunnels use only the existing MSO-owned named-gateway lifecycle. Conflicting foreign records/routes and unsafe Host overrides are refused. A matching record can be reused without taking ownership, and a lost DNS write response is resolved by rereading before retrying. App health and public HTTPS/authentication are checked separately before recording `ready`. The cockpit and app retain their existing separate, host-only authorization cookies.++ Nested application names require a certificate covering those exact hosts. DNS creation is not presented as TLS success, and no paid certificate is purchased automatically. Current setup, repair and migration boundaries are documented in `docs/MANAGED-DOMAINS.md`; the old RFC is retained as historical context rather than an active setup recipe.++ Verification on the inspected fallback-runtime host found no Docker executable, daemon socket or configured remote Docker host. The existing mandatory Tool Forge sandbox tests therefore remain an environment prerequisite for release; no live DNS, application installation or deployment is claimed from candidate-only checks.## 2026-10-17: Deploying on a host with no `mso.service`, and why `bun run ship` cannot finalize therediff --cc lib/security-store-path.tsindex 01c8e2cf,70c211bb..ff327535--- a/lib/security-store-path.ts+++ b/lib/security-store-path.ts@@@ -11,11 -11,12 +11,12 @@@ const STORE_ENV ="OS_A2A_STORE", "OS_A2A_TASK_STORE", "OS_A2A_CREDENTIAL_STORE", "OS_A2A_INBOUND_TOKEN_STORE","OS_A2A_LOCAL_AUTH_STORE", "OS_LOCAL_AGENT_MESSAGE_STORE", "OS_LOCAL_AGENT_PRESENCE_STORE","OS_CONFIG_STORE", "OS_PREFS_PATH", "OS_SKILL_MEMORY_STORE", "MSO_SURFACE_APPS_FILE",+ "OS_MANAGED_DOMAINS_STORE",] as const;-const DIRECTORY_ENV = ["OS_TOOL_FORGE_DIR", "OS_AGENT_MEMORY_DIR", "OS_AGENT_SESSIONS_DIR", "OS_PROJECT_AGENT_TASKS_DIR"] as const;+const DIRECTORY_ENV = ["OS_TOOL_FORGE_DIR", "OS_AGENT_MEMORY_DIR", "OS_AGENT_SESSIONS_DIR", "OS_PROJECT_AGENT_TASKS_DIR", "OS_AGENT_PROFILES_DIR"] as const;const expand = (value: string) => path.resolve(expandOwnerStorePath(value));-export async function pinSecurityStorePath(storePath: string) {+export async function pinSecurityStorePath(storePath: string, { durable = false }: { durable?: boolean } = {}) {if (process.platform !== "linux") throw new Error("Pinned security-store operations require Linux or WSL");storePath = expandOwnerStorePath(storePath);if (typeof storePath !== "string" || storePath.includes("\0") || !path.isAbsolute(storePath)) throw new Error("Security store needs an absolute path");diff --cc scripts/cli/commands.shindex db91c951,225ccdea..1ed429ef--- a/scripts/cli/commands.sh+++ b/scripts/cli/commands.sh@@@ -102,9 -104,9 +104,9 @@@ mso_cli_main()case "$cmd" inversion|--version|-V|-v|ls|cat|raw|share|usage|search|project-candidates|write|mkdir|rm|mv|cp|zip|upload|exec|stats|ps|units|unit|packages|cleanup|status|health|doctor)mso_cmd_host "$cmd" "$@" ;;- agent|chat|model|setup|onboard|provider|providers|integrations|channels|agent-groups|flow|workflow|gateway|heartbeat|web|camoufox|apps|mapp|term)+ agent|chat|model|setup|onboard|provider|providers|integrations|channels|agent-groups|flow|workflow|gateway|domain|heartbeat|web|camoufox|apps|mapp|term)mso_cmd_runtime "$cmd" "$@" ;;- ai|cockpit|threads|agent-sessions|agents|org|a2a|memory|memory-graph|agent-vault|config|prefs|federation|models|jev|skills|changelog|stock)+ ai|cockpit|threads|agent-sessions|agent-profiles|agents|org|a2a|memory|memory-graph|agent-vault|config|prefs|federation|models|jev|skills|changelog|stock)mso_cmd_state "$cmd" "$@" ;;devices|device|approve|revoke|oauth|mcp|audit|whoami|login|logout|service|build|deploy|update|reset|uninstall|crud|api|completion)mso_cmd_admin "$cmd" "$@" ;;