Skip to content

armgit / mso

Public Imported from GitHub
0

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.

merge: reconcile graph custom routing with current main

Rahman72e9ff2d03f1
diff --cc docs/CHANGELOG.md
index 06b89c4d,86ecfacb..ebb7fb64
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@@ -4,33 -4,18 +4,43 @@@
Newest first. `docs/PROGRESS.md` is the source of truth for *why* a change was made;
this is the *what*, and it is what Settings → About shows as “What's new”.
++## 2026-09-19
++
++**Fixed**
++
++- `browser` isolate Camoufox viewer cache
++
## 2026-09-18
**Added**
+- `install` add cross-platform host adapters
+- `integrations` add safe Convex Cloud deploy runner
+- `workflows` add reviewed external editor tabs
+ - `graph` add selected custom nodes and readable connection routing
- `organization` add internal project flows with callable CRUD
**Fixed**
+- `browser` isolate sibling Camoufox viewer auth
+- `integrations` allow Convex snapshot imports
+- `review` preserve session and surface store invariants
+- `security` validate cache exceptions from raw report
+- `security` scope passive cache review by path
+- `auth` permanently revoke retired cookie sessions
+- `workflows` preserve explicit empty sandbox
+- `security` review cache-only passive signal
+ - `graph` close routing and compact focus review
+- `auth` bind sessions to cookie scope
+- `workflows` remount editors when sandbox policy changes
+- `workflows` retain approved shared surface placements
+- `browser` keep Camoufox automation on demand
+- `workflows` isolate external editors from cockpit session cookies
+ - `graph` reconcile controlled selection and preserve routing groundwork
+- `workflows` keep runtime registry out of deployment tracing
+- `security` apply existing ZAP informational policy explicitly
+- `security` require executed passive scan evidence
+ - `security` restore native dependency update cooldown
- `browser` retain private viewer connectivity without server access
- `release` align Node support and read-only browser reconnects
- `extensions` lock project controls until initial inspection
diff --cc docs/PROGRESS.md
index 73e51b9c,809aeb94..88ef4999
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@@ -1,113 -1,18 +1,124 @@@
+ ## 2026-09-18 — Close graph routing review without changing executable topology
+
+ PR review exposed four presentation/runtime issues: clear short facing ports could be mislabeled as overlaps, controlled parent selection could be ignored for existing nodes, each routed edge recomputed against the whole obstacle set during drag, and compact fitting could center arbitrary storage-order nodes instead of workflow triggers. The shared route scene now clamps/direct-routes short clear links, caches route geometry across unrelated movement, and is owned at the canvas boundary. Endpoint sibling ranks are built once per scene instead of rebuilding/sorting an adjacency union for every edge; after warm-up, a 25-run 200-node/400-edge synthetic scene build measured about 0.48 ms median on this host, while repeated unrelated movement reused all 400 cached routes. Controlled selection changes win while transient box/ctrl selections survive data-only updates. Compact focus derives from manual/schedule/webhook or semantic session roots and maps collapsed trigger members to their visible custom-group proxy. Grouping remains presentation metadata; stored nodes, handles, edges and execution semantics are unchanged.
+
-## 2026-09-18 — Restore native dependency update cooldown
-
-PR verification caught the isolated node-gyp Dependabot entry missing the existing seven-day version-update cooldown. Reuse the already-reviewed configuration and regression-test delta from the parallel security work; the change adds only the missing cooldown and tests all declared ecosystems. No scanner suppression, dependency replacement, or runtime behavior change is involved.
-
+ ## 2026-09-18 — Selected custom nodes and visible connector routing
+
+ - Complete selection-based named grouping in Workflow and Organization project canvases. Collapse/expand/ungroup retain original executable nodes, ports and edges; grouping is bounded, validated metadata in the existing private stores.
+ - Preserve multi-selection and atomic group/multi-node movement; prune group membership only on explicit member deletion. Extend existing function-calling and CLI actions rather than inventing another store.
+ - Replace unconditional smoothstep connectors with shared bounded orthogonal routing against measured cards, directional markers, crossing halos and selected-route emphasis. Impossible overlapping-card paths are visibly marked rather than silently claimed safe.
+ - Verification is performed against synthetic stores and the real production build; private operator graph content is never embedded in source.
+
+## 2026-09-18 — Close external-editor review around durable session policy and owner stores
+
+The latest PR review found four boundary issues after the cookie-policy epoch landed. CLI device
+approve/role/revoke writes now preserve the durable `sessionPolicy` record instead of rewriting
+the auth store without it. Repeated session validation uses a read-only fast path when the stored
+scope already matches and acquires the cross-process mutation lock only for an actual rotation,
+with a locked recheck before writing. Workflow-only surface updates preserve MCP Page placement
+only from an existing row that itself normalizes as a valid reviewed app, so malformed legacy
+bytes cannot create Page approval. `MSO_SURFACE_APPS_FILE` is now one of the explicitly allowed
+owner security-store paths, so a configured registry outside the home directory remains writable
+without a duplicate filesystem-write-root declaration. Existing validated Page auth query metadata
+is preserved unchanged. Targeted regressions cover all four boundaries.
+
+## 2026-09-18 — Permanently revoke prior cookie-policy generations
+
+A follow-up security review found that a deterministic scope label could revive an old signed session if configuration later returned to the same cookie Domain. The private auth-device store now keeps one durable cookie-policy epoch and rotates it on every actual scope transition, including A to host-only to A. Signed browser sessions carry both scope and epoch; route and middleware/WebSocket authorization require both. Existing approved devices and roles are preserved, but pre-epoch sessions require a one-time sign-in. Workflow edits also preserve an existing reviewed MCP Page auth path with query parameters without allowing the Workflow endpoint to create or change that Page-owned metadata.
+
+## 2026-09-18 — Preserve the strictest reviewed external-editor sandbox
+
+PR review found that an explicit empty iframe sandbox was normalized as if the owner had
+omitted the field, causing the runtime default to add scripts, same-origin and forms.
+The surface registry now distinguishes omitted sandbox policy from an explicitly empty
+policy. Empty remains a valid, strict sandbox; non-empty values still use the same
+allowlist and byte bound. No permission token is added or broadened.
+
+## 2026-09-18 — Bind signed sessions to their cookie policy
+
+The external-editor security review found a migration edge case: after a broad Domain cookie
+is narrowed or unset, the browser can retain the old cookie until its original expiry even
+though logout no longer knows its former Domain. Session payloads now carry the normalized
+cookie policy that minted them, and both route authorization and middleware/WebSocket gates
+reject a valid HMAC when that policy no longer matches current configuration. Legacy tokens
+without a scope are intentionally invalidated once. This preserves safe host-only sibling
+editors such as a separately hosted n8n while making a retained broader Owner cookie unusable
+against MSO after a scope change. No cookie is widened, no secret is rotated, and current
+domain-match/host collision checks remain in place.
+
+## 2026-09-18 — Remount reviewed workflow editors when sandbox policy changes
+
+A focus refresh can tighten an existing external editor's sandbox without changing its id or origin.
+The embedded document must not keep the permissions from the previous navigation. The iframe key now
+includes the reviewed sandbox policy, so a policy change remounts the document before it can continue.
+Blocked destinations and cookie-isolated origins remain unchanged; no sandbox capability is added.
+
+## 2026-09-18 — Preserve existing MCP Page approval during Workflow metadata edits
+
+The shared registry review found that a Workflow-only save replaced a previously shared
+entry with only the Workflows placement. Preserve an existing explicit MCP Page placement,
+or the legacy implicit Page approval, while adding/updating the Workflow placement. New
+and Workflow-only entries still cannot acquire Page approval through this endpoint. Repeated
+saves, prior explicit/legacy grants and refusal of caller-supplied Page escalation are tested;
+revision checks, owner review, unrelated entries and cookie-scope rejection remain intact.
+
+## 2026-09-18 — Keep external editor links outside the cockpit session-cookie scope
+
+The pending external-editor review exposed a domain-cookie leak: different origins can
+still receive the same session cookie. A new shared surface policy reuses the validated
+session-cookie authority and also accounts for host-only cookies across different ports.
+External Workflow entries that would receive cockpit credentials now remain visible as
+blocked metadata but expose no iframe, editor link or login URL. The same unsafe entries
+are omitted from the MCP Page catalogue and cannot be resolved as Page routes. Registry
+approval never grants cookie trust; exact cockpit links remain remote-only. No cookie,
+TLS, CSP, same-origin or role protection is relaxed and provider sessions are untouched.
+
+Regression tests reproduce the previous unsafe URLs before the fix and cover domain/host
+scope, leading-dot/case normalization, suffix lookalikes, remote-only links, runtime policy
+refresh and shared readers. The browser journey additionally verifies the blocked panel
+and zero unsafe requests rather than interpreting a hidden iframe as sufficient isolation.
+
+## 2026-09-18 — Reviewed workflow provider tabs
+
+- Keep the native automation/session editor unchanged and mounted while switching to external workflow editors such as n8n. The new wrapper consumes explicit workflow placements in the existing owner-reviewed surface registry, not app-store HTML or credential values.
+- Share the registry outside the MCP transport without adding another store. Owner-only no-store metadata and revision-checked, explicitly reviewed configuration APIs/CLI preserve exact origins, unrelated entries, safe sandbox permissions and remote-only fallback. Configuration input cannot carry paths or credentials.
+- Workflow-only placements never grant an MCP Page nested-frame origin. Load frames only on demand, preserve editor state when switching, expose top-level sign-in/open/reload actions and keyboard-accessible tabs. Browser login remains external-service-owned; framing never means MCP token forwarding or authentication bypass.
+- Add registry/access tests and a mandatory isolated browser journey with synthetic stores. Live n8n frame checks wait for actual nonblank paint as well as visible controls; keep the synthetic approved parent and signed-out proof distinct from authenticated editor claims.
+- The strict release build caught project-wide tracing of the dynamic registry path. Mark that owner-local runtime read as a non-build input, matching other private stores; the warning-fatal release gate remains unchanged.
+
+## 2026-09-18 — Scope cache retrieval review to immutable asset paths
+
+PR review caught that a rule-wide 10050 INFO entry would also downgrade a future
+shared-cache exposure on an authenticated or user-specific URL. Rule 10050 is therefore
+removed from the rule-wide ZAP policy. Hosted and local DAST now validate the raw ZAP
+JSON: only same-origin, query-free /_next/static/chunks/*.js and
+/_next/static/media/*.woff2 instances are accepted for that rule; every other 10050
+instance and every otherwise-unreviewed alert remains a failing condition.
+
+## 2026-09-18 — Classify cache retrieval only for immutable public assets
+
+The first post-merge passive ZAP run against main produced one new default warning:
+rule 10050 (Retrieved from Cache) on five content-hashed _next/static JavaScript/font
+assets carrying an Age header. The report contained no authenticated, personal, or
+user-specific URL for that rule. Keep the signal visible as INFO for those intentionally
+cacheable public assets; do not use IGNORE, do not alter authenticated response caching,
+and leave every other unreviewed ZAP rule at its default warning/failure behavior.
+
+## 2026-09-18 — Require executed passive security scan evidence
+
+The security closeout found that the scheduled hosted ZAP workflow could report
+success while its only scan step was skipped when no target was configured. Add a
+dependency-free target guard before an unconditional passive scan. Missing, unsafe
+or credential-bearing targets fail without echoing their contents; existing scanner
+pins, passive scope, rule classifications and alert failures remain unchanged.
+Tests exercise the CLI refusal and workflow wiring. Security assurance guidance now
+separates successful code/dependency/secret checks from historical alert dismissals
+and passive-scan execution; no dismissal or badge attestation is performed.
+The first executed hosted scan exposed a second wiring error: the pinned ZAP action
+only forwarded its policy input when it found IGNORE entries. Pass the existing
+INFO-only file explicitly with `-c`; preserve all five informational findings, new
+warning failures and the original policy bytes rather than inventing new exceptions.
+
## 2026-09-18 — Keep private viewer routing client-verifiable
The PR review reproduced a deployment-compatibility regression: a hostname resolving
diff --cc docs/WORKFLOW-GRAPH.md
index b5c644c6,734d8d0d..76326096
--- a/docs/WORKFLOW-GRAPH.md
+++ b/docs/WORKFLOW-GRAPH.md
@@@ -225,14 -185,22 +225,33 @@@ MSO targets **core self-hosted workflo
Organization is not owned by Workflow Graph. An `agent` node may set `orgSeatId`; at execution time MSO resolves that seat from the private Organization registry and routes to its current Project Agent, Local Agent, or A2A target. This indirection lets a workflow say “send to the CTO seat” without duplicating which concrete agent currently fills that seat. Direct project-bound Agent nodes remain backward compatible. See [`ORGANIZATION.md`](./ORGANIZATION.md).
+### External editor credential isolation
+
+Different origins do not by themselves isolate cookies. Reviewed external editors must
+be outside the currently validated `OS_SESSION_COOKIE_DOMAIN` and must not reuse a cockpit
+hostname on another port when cookies are host-only. MSO blocks both framing and editor/login
+links for colliding destinations and shows the configuration reason. Signed browser sessions
+are also bound to a durable cookie-policy generation. Widening, narrowing or unsetting the
+Domain rotates that generation in the private auth store; returning later to an earlier Domain
+rotates it again, so retained/captured tokens from that older generation never revive. Shared
+MCP Page discovery uses the same boundary. Registry review is not a credential-sharing exception; native managed-app/
+browser proxy routes keep their separate existing authentication boundaries.
+
+ ## Selected custom nodes and connector routing
+
+ One or multiple selected nodes can become a named, collapsible custom node directly
+ on the automation canvas. Ctrl/Cmd-click or box-select, then **Create custom node**.
+ The selection survives rerenders. Double-click the compact card to expand it;
+ **Ungroup** removes only the wrapper. Save persists the change as ordinary graph data.
+ `metadata.customNodes` stores `{id,name,nodeIds,collapsed}` arrays, validated against
+ the same graph. Members cannot belong to overlapping/nested groups.
+
+ This is a presentation abstraction, not an executable new node type: stored node ids,
+ configurations, boundary handles, input references, edge topology and run receipts stay
+ unchanged. Original members execute in the original graph. Clone/export/import carry
+ the grouping metadata. The existing `workflow_graph` get/update actions provide function
+ calling with the current revision; no new transport or permission bypass is introduced.
+
+ The shared connector renderer avoids measured node cards where a route exists, uses
+ arrowheads and crossing halos, and highlights a selected node's incident routes.
+ Overlapping cards without a viable port exit receive a visible routing warning.
diff --cc scripts/e2e/release.mjs
index abfa824f,3d5f6109..3050accc
--- a/scripts/e2e/release.mjs
+++ b/scripts/e2e/release.mjs
@@@ -12,8 -12,8 +12,9 @@@ import { releaseFixture } from "./relea
import { camoufoxConnectionJourney } from "./camoufox-connection.mjs";
execFileSync(process.execPath, ["scripts/e2e/mcp-page.mjs"], { stdio: "inherit" });
+execFileSync(process.execPath, ["scripts/e2e/workflow-embeds.mjs"], { stdio: "inherit" });
execFileSync(process.execPath, ["scripts/e2e/organization-flow.mjs"], { stdio: "inherit" });
+ execFileSync(process.execPath, ["scripts/e2e/graph-custom.mjs"], { stdio: "inherit" });
const fixture = await releaseFixture();
let browser;
try {