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
fix(integrations): preserve concurrent embed endpoint in unified release
Rahman5f6e70ecc4b7
diff --cc app/api/integrations/setup/route.tsindex 46a09eda,032e4458..c2d6d7d1--- a/app/api/integrations/setup/route.ts+++ b/app/api/integrations/setup/route.ts@@@ -15,7 -15,7 +15,7 @@@ function cors(req: NextRequest): Recordif (!origin || (![MSO_ORIGIN, MCP_UI_DOMAIN].includes(origin) && !local)) return null;return { ...BASE_HEADERS, "Access-Control-Allow-Origin": origin, "Access-Control-Allow-Methods": "POST, OPTIONS", "Access-Control-Allow-Headers": "Authorization, Content-Type" };}- export const GET = integrationPageResponse;-export function GET() { return integrationPageResponse(false); }++export function GET() { return integrationPageResponse(); }export function OPTIONS(req: NextRequest) {const headers = cors(req);return new NextResponse(null, { status: headers ? 204 : 403, headers: headers ?? BASE_HEADERS });diff --cc app/integrations/embed/route.tsindex 00000000,368b3e35..b39e53a9mode 000000,100644..100644--- a/app/integrations/embed/route.ts+++ b/app/integrations/embed/route.ts@@@ -1,0 -1,4 +1,4 @@@-import { integrationPageResponse } from "@/lib/infra/setup-page";++import { integrationManagerResponse } from "@/lib/infra/setup-page";+ export const runtime = "nodejs";+ export const dynamic = "force-dynamic";-export function GET() { return integrationPageResponse(true); }++export function GET() { return integrationManagerResponse(); }diff --cc app/integrations/route.test.tsindex a1c79ad1,804d0904..da1c2b34--- a/app/integrations/route.test.ts+++ b/app/integrations/route.test.ts@@@ -1,4 -1,3 +1,5 @@@++import { GET as embedGET } from "./embed/route";+import { GET as standaloneGET } from "./route";import { describe, expect, it, vi } from "vitest";import { NextRequest } from "next/server";vi.mock("server-only", () => ({}));@@@ -13,17 -14,14 +14,17 @@@ describe("friendly native Integrationsexpect(html).toContain("How to get this credential / authorization"); expect(html).not.toContain("si-coder");expect(() => new Function(html.match(/<script nonce="[^"]+">([\s\S]*)<\/script>/)![1])).not.toThrow();});- it("preserves the earlier embed=shell alias and keeps standalone framing denied", () => {- expect(standaloneGET(new Request("https://mso.example.com/integrations?embed=shell")).headers.get("content-security-policy")).toContain("frame-ancestors 'self'");- expect(standaloneGET(new Request("https://mso.example.com/integrations")).headers.get("x-frame-options")).toBe("DENY");- it("allows only same-origin framing on the dedicated shell embed route", async () => {- const response = GET_EMBED();++ it("preserves the dedicated embed alias and keeps standalone framing denied", () => {++ expect(embedGET().headers.get("content-security-policy")).toContain("frame-ancestors 'self'");++ expect(standaloneGET().headers.get("x-frame-options")).toBe("DENY");+ });+ it("limits the embedded manager to the same origin", () => {+ const response = GET();expect(response.headers.get("x-frame-options")).toBe("SAMEORIGIN");expect(response.headers.get("content-security-policy")).toContain("frame-ancestors 'self'");- expect(response.headers.get("content-security-policy")).not.toContain("frame-ancestors 'none'");});it("lets the trusted HTML endpoint own its nonce while retaining owner mutation CSRF checks", async () => {- const read = await proxy(new NextRequest("https://mso.example.com/integrations", { headers: { host: "mso.example.com" } }));+ const read = await proxy(new NextRequest("https://mso.example.com/integrations/manager", { headers: { host: "mso.example.com" } }));expect(read.headers.get("content-security-policy")).toBeNull();const write = await proxy(new NextRequest("https://mso.example.com/api/v1/infra/setup", { method: "POST", headers: { host: "mso.example.com", origin: "https://evil.invalid", "sec-fetch-site": "cross-site" }, body: "{}" }));expect(write.status).toBe(403);diff --cc app/integrations/route.tsindex 4c3218f0,bf42bf24..5604f67a--- a/app/integrations/route.ts+++ b/app/integrations/route.ts@@@ -1,4 -1,4 +1,4 @@@import { integrationPageResponse } from "@/lib/infra/setup-page";export const runtime = "nodejs";export const dynamic = "force-dynamic";- export const GET = integrationPageResponse;-export function GET() { return integrationPageResponse(false); }++export function GET() { return integrationPageResponse(); }diff --cc docs/CHANGELOG.mdindex 073ecca2,40c974f4..59d24e8e--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@@ -8,9 -8,8 +8,10 @@@ this is the *what*, and it is what Sett**Fixed**+- `integrations` preserve strict SC bundle validation+ - `integrations` make shell embed frameable- `integrations` add shell app and detect SC worktrees+- `integrations` expose native shell and managed SC project bindings- `mcp` fall back when project MCP discover returns -32601## 2026-09-12diff --cc docs/INTEGRATIONS.mdindex 30f050bb,50bf8010..6fa193dd--- a/docs/INTEGRATIONS.md+++ b/docs/INTEGRATIONS.md@@@ -51,45 -51,6 +51,45 @@@ and holds a short operation lease againProvider-MCP OAuth is completed in the provider's client. Returning that route doesnot prove the external session is authorized, and MSO never falls back to a local key.+## Ownership and managed SI-Coder++MSO Integrations owns provider/account authority. Batonly owns project plans, task state,+project-to-connection bindings, QA and delivery evidence; it must not mirror provider secrets.+SI-Coder remains optional portable developer tooling. Its standalone store is unchanged.++The shell now exposes **Integrations** in Dock, Launchpad and the App Store, with a pinned+mobile shortcut. `/connections` opens the addressable shell window; `/integrations` remains+the standalone compatibility entrypoint for secure setup links and terminal workflows. Its same-origin+`/integrations/manager` document reuses the existing native service/form and nonce policy;- only that internal document and the compatibility alias `/integrations?embed=shell` permit same-origin framing. Other origins remain blocked.++that internal document, `/integrations/embed`, and the compatibility alias `/integrations?embed=shell` permit same-origin framing. Other origins remain blocked.+Transfer and private setup fragment handoffs remain supported without copying field values.++Settings → MCP → Plugins / Registry separates a declaration from a project binding.+Enter an exact project, inspect the revision, then explicitly activate/deactivate a built-in.+Custom manifests remain declarations only. The browser's registry is not runtime authority;+`.mcp.json` is the project binding. A configured row is deliberately **not** labelled verified.+Use `project_mcp_tools` and then `project_mcp_call` to verify real discovery/execution.++For an MSO-managed SC binding, use `project_mcp_manage` with `plugin: "si-coder"` instead+of `url`, retaining the revision returned by `action: "inspect"`. The portable binding is:++```json+{"mcpServers":{"si-coder":{"plugin":"si-coder","credentialAuthority":"mso"}}}+```++The installed package is resolved by its declared package/bin identity, not the name of a+worktree directory. An unrelated system command named `sc` is never executed as SI-Coder.+This mode exposes reviewed workspace utilities and redirects supported SC account/catalog/+connection-status/verification functions to native MSO. Verification requires explicit+`user`, `provider`, and `connection`; there is no fallback to standalone SC accounts.+SC store mutations, import/export and unaudited flow execution are not exposed in managed+mode. Provider deployment operations continue through `integration_execute`; credentials+are neither copied nor silently synchronized. Standalone SC retains its complete own surface.++This is not an operating-system sandbox for installed code. Activating and calling a local+MCP still requires trust in the installed package and the existing MSO exec-scope approval.+The managed dispatch boundary prevents accidental use of SC's parallel credential workflow.+## Browser and ChatGPTOpen `/integrations`. Public instructions are readable before sign-in; an Ownerdiff --cc docs/PROGRESS.mdindex 098841f2,4a4865a8..8071ca58--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@@ -1,14 -1,5 +1,22 @@@## 2026-09-14 — Integrations is a first-class shell app and SI-Coder worktrees are detected safely++## 2026-09-14 — Preserve dedicated embed endpoint from concurrent release++++The concurrent `/integrations/embed` fix is retained as a same-service alias alongside++`/integrations/manager`; both use one nonce-protected response helper and same-origin framing.++The shell keeps the tested loading/retry implementation and `/connections` deep link.++Standalone setup/API routes remain compatible and keep their default deny-framing policy.+++++## 2026-09-14 — Reconcile parallel Integrations work++The two concurrent implementations are consolidated into one `integrations` feature slice,+not two app descriptors or managers. The native window uses `/connections` and the internal+manager endpoint; the earlier `embed=shell` compatibility alias is retained with same-origin+framing only. Both standalone deny-framing and package-entrypoint spoof regression tests+remain. An explicit invalid `MSO_SC_BIN` never falls back to another user's/default CLI.++The native Integrations workbench existed as a browser/Page/CLI surface but was absent from theOS-shell app manifest, so it could not behave like the other dock/launcher features. Integrationsnow has its own feature-slice `AppDescriptor`, is pinned by the MSO consumer manifest, and reusesdiff --cc next.config.mjsindex a1ccbc98,dc451ccd..cddcb5e5--- a/next.config.mjs+++ b/next.config.mjs@@@ -130,11 -130,11 +130,15 @@@ const nextConfig =// Private API responses must never be cached by any intermediary — they// carry host bytes (fs/read), auth state, and per-session data.{ source: "/api/:path*", headers: [{ key: "Cache-Control", value: "no-store" }] },+ // Only the internal manager is same-origin embeddable; its nonce CSP also+ // restricts frame-ancestors to self. The standalone page/shell retain DENY.+ { source: "/integrations", has: [{ type: "query", key: "embed", value: "shell" }], headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }] },+ { source: "/integrations/manager", headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }, { key: "Cache-Control", value: "no-store" }, { key: "Referrer-Policy", value: "no-referrer" }] },{ source: "/integrations", headers: [{ key: "Cache-Control", value: "no-store" }, { key: "Referrer-Policy", value: "no-referrer" }] },+ // Dedicated shell-only embed path. The global DENY remains authoritative for+ // every ordinary page; this one path is still same-origin only and also has+ // a route-level CSP `frame-ancestors 'self'`.+ { source: "/integrations/embed", headers: [{ key: "X-Frame-Options", value: "SAMEORIGIN" }, { key: "Cache-Control", value: "no-store" }, { key: "Referrer-Policy", value: "no-referrer" }] },{ source: "/api/integrations/:path*", headers: [{ key: "Referrer-Policy", value: "no-referrer" }] },// Named brand/wallpaper assets are effectively immutable but, unlike// /_next chunks, are NOT content-hashed — rename or add ?v= if ever redrawn.diff --cc proxy.tsindex 7b5e7934,a20fe0af..c2209f1a--- a/proxy.ts+++ b/proxy.ts@@@ -305,7 -305,7 +305,7 @@@ export async function proxy(request: Neconst isA2A =pathname === "/a2a/v1" || pathname === "/.well-known/agent-card.json";const isMachineProtocol = isMcp || isA2A;- const isApi = pathname.startsWith("/api/") || isMachineProtocol || (["/integrations", "/integrations/manager"].includes(pathname) && ["GET", "HEAD"].includes(request.method));- const isApi = pathname.startsWith("/api/") || isMachineProtocol || (pathname === "/integrations" && ["GET", "HEAD"].includes(request.method));++ const isApi = pathname.startsWith("/api/") || isMachineProtocol || (["/integrations", "/integrations/manager", "/integrations/embed"].includes(pathname) && ["GET", "HEAD"].includes(request.method));// The historical same-origin bridge is permanently closed. noVNC is executable// third-party code and is served only from its reserved split-origin host above.if (pathname.startsWith("/camoufox-vnc/")) return notFound();