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(a2a): harden remote v1 delegation
Rahmanb9e41f095b7a
diff --git a/docs/A2A.md b/docs/A2A.mdindex 0114dbe5..07c394de 100644--- a/docs/A2A.md+++ b/docs/A2A.md@@ -30,7 +30,7 @@ narrow:MSO does not copy hidden transcript history, durable memory, Skills, tool state, or raw MSOsession/workflow identifiers. Internal identifiers may be represented only by one-way opaquehashes in metadata.-- A2A writes still pass through the normal MCP/terminal `write` scope, exact-call approval,+- A2A registry writes use `write`; remote send/handoff/cancel use `exec` scope, exact-call approval,audit trail, and per-operation rate limits. `yolo` bypasses the human prompt only; it does notbypass exact-payload binding or server authorization.@@ -96,10 +96,10 @@ The provider-neutral MCP catalog exposes:| `a2a_agent_discover` | read | Validate/discover a public v1 Agent Card || `a2a_agent_register` | write | Register or refresh public Agent Card metadata || `a2a_agent_remove` | write | Remove local registry metadata |-| `a2a_message_send` | write | Send one explicit A2A message |+| `a2a_message_send` | exec | Send one explicit A2A message || `a2a_task_get` | read | Read remote A2A task state/history |-| `a2a_task_cancel` | write | Request remote task cancellation |-| `a2a_handoff` | write | Delegate an explicit objective/context |+| `a2a_task_cancel` | exec | Request remote task cancellation |+| `a2a_handoff` | exec | Delegate an explicit objective/context |This is intentionally a stable generic catalog. Registering another remote agent does not addnew dynamic MCP tool names; the target is data (`alias`/id/Agent Card URL), just as projectdiff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 519c24e8..887a6d70 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -11,6 +11,10 @@ this is the *what*, and it is what Settings → About shows as “What's new”.- `agent` add eval-gated tool forge- `agent` add interactive permissions and a2a v1+**Fixed**++- `a2a` harden remote v1 delegation+## 2026-09-01**Added**diff --git a/docs/CHATGPT-PLUGIN.md b/docs/CHATGPT-PLUGIN.mdindex 6ac42fef..4b38059e 100644--- a/docs/CHATGPT-PLUGIN.md+++ b/docs/CHATGPT-PLUGIN.md@@ -12,10 +12,10 @@> <https://help.openai.com/en/articles/12584461-developer-mode-and-mcp-apps-in-chatgpt-beta>> and <https://help.openai.com/en/articles/20001256-plugins-in-chatgpt-and-codex>.-<!-- mcp-toolset: server=1.6.0 version=2026.09.02.4 tools=59 read=29 write=23 exec=7 -->+<!-- mcp-toolset: server=1.6.0 version=2026.09.02.5 tools=59 read=29 write=20 exec=10 -->-MSO currently exposes MCP server **1.6.0**, toolset **2026.09.02.4**: **60 transport tools** total; **59 model/operator tools**-(29 read, 23 write, 7 exec) plus app-only `workflow_status` for the progress widget. Use `GET /mcp` or Settings → MCP as the live authority if+MSO currently exposes MCP server **1.6.0**, toolset **2026.09.02.5**: **60 transport tools** total; **59 model/operator tools**+(29 read, 20 write, 10 exec) plus app-only `workflow_status` for the progress widget. Use `GET /mcp` or Settings → MCP as the live authority ifthis document and a deployed instance ever disagree.## 1. What this connection does@@ -172,13 +172,10 @@ scope.- `sys_processes`- `sys_stats`- `tool_forge_candidates`-### `write` — read + 23 tools+### `write` — read + 20 tools- `a2a_agent_register`- `a2a_agent_remove`-- `a2a_message_send`-- `a2a_task_cancel`-- `a2a_handoff`- `agent_memory_forget`- `agent_memory_remember`- `agent_session_note`@@ -198,8 +195,11 @@ scope.- `workflow_finish`- `workflow_start`-### `exec` — write + 7 tools+### `exec` — write + 10 tools+- `a2a_message_send`+- `a2a_task_cancel`+- `a2a_handoff`- `browser_power`- `exec_job_cancel`- `exec_job_start`@@ -233,7 +233,7 @@ locally with `mso provider set <id>` rather than pasting credentials into a Chat### A2A peer delegation-ChatGPT can use `a2a_agent_discover`/`a2a_agents_list` to find peers, then the write-scope+ChatGPT can use `a2a_agent_discover`/`a2a_agents_list` to find peers, then the exec-scope`a2a_message_send` or `a2a_handoff` to delegate explicit work. `a2a_task_get` polls the remotetask and `a2a_task_cancel` requests cancellation; register/remove only mutate MSO's local publicAgent Card registry. MSO never auto-forwards this ChatGPT conversation, private agent memory, ordiff --git a/docs/CONNECTORS-GATEWAY-INTEGRATION.md b/docs/CONNECTORS-GATEWAY-INTEGRATION.mdindex 9ea5ddce..289cb4d0 100644--- a/docs/CONNECTORS-GATEWAY-INTEGRATION.md+++ b/docs/CONNECTORS-GATEWAY-INTEGRATION.md@@ -4,10 +4,10 @@> can evolve independently, so do not claim its mapping count is current without checking> that repository at the time of the change.-<!-- mcp-toolset: server=1.6.0 version=2026.09.02.4 tools=59 read=29 write=23 exec=7 -->+<!-- mcp-toolset: server=1.6.0 version=2026.09.02.5 tools=59 read=29 write=20 exec=10 -->-MSO currently exposes MCP server **1.6.0**, toolset **2026.09.02.4**: **60 transport tools** total; **59 model/operator tools**-(29 read, 23 write, 7 exec) plus app-only `workflow_status`. `GET /mcp` exposes the live names, version/hash and scoped+MSO currently exposes MCP server **1.6.0**, toolset **2026.09.02.5**: **60 transport tools** total; **59 model/operator tools**+(29 read, 20 write, 10 exec) plus app-only `workflow_status`. `GET /mcp` exposes the live names, version/hash and scopedmanifest and is the machine-readable parity source.## Why this contract matters@@ -41,17 +41,17 @@ Before changing an MCP tool name:`infra_providers_list`, `project_capabilities`, `projects_list`, `screen_capture`, `skills_list`,`skills_read`, `skills_search`, `sys_processes`, `sys_stats`, `tool_forge_candidates`.-### Write (23 beyond read)+### Write (20 beyond read)-`a2a_agent_register`, `a2a_agent_remove`, `a2a_message_send`, `a2a_task_cancel`, `a2a_handoff`,+`a2a_agent_register`, `a2a_agent_remove`,`agent_memory_forget`, `agent_memory_remember`, `agent_session_note`, `agent_session_rename`,`apps_power`, `cloudflare_dns_upsert`, `dokploy_project_ensure`, `fs_copy`, `fs_delete`,`fs_mkdir`, `fs_move`, `fs_upload_file`, `fs_write`, `hostinger_dns_upsert`,`tool_forge_propose`, `workflow_cancel`, `workflow_finish`, `workflow_start`.-### Exec (7 beyond write)+### Exec (10 beyond write)-`browser_power`, `exec_job_cancel`, `exec_job_start`, `exec_run`, `project_function_call`, `tool_forge_evaluate`, `tool_forge_promote`.+`a2a_message_send`, `a2a_task_cancel`, `a2a_handoff`, `browser_power`, `exec_job_cancel`, `exec_job_start`, `exec_run`, `project_function_call`, `tool_forge_evaluate`, `tool_forge_promote`.### App-only bridge (1)diff --git a/docs/MCP.md b/docs/MCP.mdindex 72e42f7e..c8556e05 100644--- a/docs/MCP.md+++ b/docs/MCP.md@@ -76,8 +76,8 @@ Picked per token, on the consent screen, capped by `OS_MCP_MAX_SCOPE`. The highe| Scope | Tools ||---|---|| `read` | `a2a_agent_discover` `a2a_agents_list` `a2a_task_get` `agent_memory_read` `agent_memory_search` `agent_session_current` `agent_session_resume` `agent_sessions_list` `fs_list` `fs_read` `fs_search` `fs_usage` `sys_stats` `sys_processes` `apps_list` `apps_logs` `projects_list` `project_capabilities` `skills_list` `skills_read` `skills_search` `screen_capture` `browser_status` `exec_job_status` `infra_providers_list` `infra_provider_doctor` `dokploy_projects_list` `cloudflare_zones_list` |-| `write` | + `a2a_agent_register` `a2a_agent_remove` `a2a_message_send` `a2a_task_cancel` `a2a_handoff` `agent_memory_forget` `agent_memory_remember` `agent_session_note` `agent_session_rename` `workflow_start` `workflow_cancel` `workflow_finish` `fs_write` `fs_upload_file` `fs_mkdir` `fs_move` `fs_copy` `fs_delete` `apps_power` `dokploy_project_ensure` `cloudflare_dns_upsert` `hostinger_dns_upsert` |-| `exec` | + `project_function_call` `exec_run` `exec_job_start` `exec_job_cancel` `browser_power` |+| `write` | + `a2a_agent_register` `a2a_agent_remove` `agent_memory_forget` `agent_memory_remember` `agent_session_note` `agent_session_rename` `workflow_start` `workflow_cancel` `workflow_finish` `fs_write` `fs_upload_file` `fs_mkdir` `fs_move` `fs_copy` `fs_delete` `apps_power` `dokploy_project_ensure` `cloudflare_dns_upsert` `hostinger_dns_upsert` |+| `exec` | + `a2a_message_send` `a2a_task_cancel` `a2a_handoff` `project_function_call` `exec_run` `exec_job_start` `exec_job_cancel` `browser_power` |Alfa — the in-app assistant — overlaps the same host capabilities under dot.case names,and `lib/mcp/parity.test.ts` fails if one surface gains a tool the other lacks@@ -124,10 +124,10 @@ The catalog has a stable server version plus a schema-derived toolset signature.Settings → MCP shows the current version/hash/count and stores a browser-local acknowledgement when the operator marks ChatGPT refreshed. A later signature change becomes an explicit stale-snapshot warning. This does not mutate ChatGPT remotely; it makes the required refresh visible instead of relying on memory.-<!-- mcp-toolset: server=1.6.0 version=2026.09.02.4 tools=59 read=29 write=23 exec=7 -->+<!-- mcp-toolset: server=1.6.0 version=2026.09.02.5 tools=59 read=29 write=20 exec=10 -->-Current transport catalog: **60 tools**, server `1.6.0` / toolset `2026.09.02.4`.-The model/operator catalog is **59 tools** (29 read, 23 write, 7 exec); `workflow_status` is the+Current transport catalog: **60 tools**, server `1.6.0` / toolset `2026.09.02.5`.+The model/operator catalog is **59 tools** (29 read, 20 write, 10 exec); `workflow_status` is theone app-only MCP Apps bridge used by the progress widget and is documented separately.`agent_memory_search` is the typed-memory retrieval surface. It resolves semantic/episodic/procedural claims at an optional point in time, returns confidence/provenance and competing effective claims, and can expose superseded/retracted history when explicitly requested. `agent_memory_remember` remains the write surface and now accepts typed metadata; raw ChatGPT conversation ids are never stored as provenance.@@ -140,8 +140,7 @@ stable project-automation seam.The eight `a2a_*` tools are the provider-neutral remote-agent seam: `a2a_agents_list`,`a2a_agent_discover`, `a2a_agent_register`, `a2a_agent_remove`, `a2a_message_send`,`a2a_task_get`, `a2a_task_cancel`, and `a2a_handoff`. Discovery and task reads are read scope;-registry mutations, messages, cancellation, and handoff are write scope and therefore keep the-normal exact-call approval/audit boundary. Registered peers are data, not dynamic MCP names.+registry add/remove are write scope; remote messages, cancellation, and handoff are exec scope so auto-write cannot silently delegate external work. All mutations keep the normal exact-call approval/audit boundary. Registered peers are data, not dynamic MCP names.MSO's current A2A client accepts only public HTTPS v1 peers, blocks SSRF/DNS rebinding, andfails closed when an Agent Card requires credentials. A normal message transmits only explicitdiff --git a/lib/a2a/client.test.ts b/lib/a2a/client.test.tsindex a46966f4..e64d510a 100644--- a/lib/a2a/client.test.ts+++ b/lib/a2a/client.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from "vitest";-import { cancelA2ATask, discoverA2AAgent, getA2ATask, sendA2AMessage } from "./client";+import { a2aAgentCardUrl, cancelA2ATask, discoverA2AAgent, getA2ATask, MAX_A2A_MESSAGE_BYTES, MAX_A2A_RESPONSE_BYTES, sendA2AMessage } from "./client";const card = (binding = "JSONRPC") => ({name: "Research Agent", description: "Finds concise answers", version: "1.2.0", capabilities: { streaming: false },@@ -31,9 +31,11 @@ it("uses v1 HTTP+JSON operation paths for send/get/cancel including tenant", asyconst fetcher = async (input: RequestInfo | URL, init?: RequestInit) => { calls.push({ url: String(input), init }); return calls.length === 1 ? response(card("HTTP+JSON")) : response({ task: { id: "t-1" } }); };const agent = await discoverA2AAgent("https://agent.example.test", fetcher);await sendA2AMessage(agent, "go", {}, fetcher); await getA2ATask(agent, "t-1", 4, fetcher); await cancelA2ATask(agent, "t-1", fetcher);- expect(calls[1].url).toBe("https://agent.example.test/a2a/research/message:send");- expect(calls[2].url).toBe("https://agent.example.test/a2a/research/tasks/t-1?historyLength=4");- expect(calls[3].url).toBe("https://agent.example.test/a2a/research/tasks/t-1:cancel");+ expect(calls[1].url).toBe("https://agent.example.test/a2a/message:send");+ expect(JSON.parse(String(calls[1].init?.body)).tenant).toBe("research");+ expect(calls[2].url).toBe("https://agent.example.test/a2a/tasks/t-1?tenant=research&historyLength=4");+ expect(calls[3].url).toBe("https://agent.example.test/a2a/tasks/t-1:cancel");+ expect(JSON.parse(String(calls[3].init?.body))).toEqual({ tenant: "research" });});it("fails closed when the Agent Card requires authentication", async () => {@@ -41,3 +43,21 @@ it("fails closed when the Agent Card requires authentication", async () => {const fetcher = async () => response(secured); const agent = await discoverA2AAgent("https://agent.example.test", fetcher);await expect(sendA2AMessage(agent, "secret work", {}, fetcher)).rejects.toThrow("credential profiles are not configured");});+++it("rejects insecure/private targets before any A2A network call", () => {+ expect(() => a2aAgentCardUrl("http://agent.example.com")).toThrow(/HTTPS/);+ expect(() => a2aAgentCardUrl("https://127.0.0.1:9999")).toThrow(/host not allowed/i);+});++it("rejects peers that advertise only pre-v1 interfaces", async () => {+ const legacy = { ...card(), supportedInterfaces: [{ url: "https://agent.example.test/a2a", protocolBinding: "JSONRPC", protocolVersion: "0.3" }] };+ await expect(discoverA2AAgent("https://agent.example.test", async () => response(legacy))).rejects.toThrow(/no supported v1/i);+});++it("bounds Agent Card/remote response bytes and outbound message bytes", async () => {+ const oversized = new Response("{}", { status: 200, headers: { "content-length": String(MAX_A2A_RESPONSE_BYTES + 1) } });+ await expect(discoverA2AAgent("https://agent.example.test", async () => oversized)).rejects.toThrow(/response exceeds/);+ const agent = await discoverA2AAgent("https://agent.example.test", async () => response(card()));+ await expect(sendA2AMessage(agent, "x".repeat(MAX_A2A_MESSAGE_BYTES + 1), {}, async () => response({}))).rejects.toThrow(/message exceeds/);+});diff --git a/lib/a2a/client.ts b/lib/a2a/client.tsindex 4fa468b5..96b83617 100644--- a/lib/a2a/client.ts+++ b/lib/a2a/client.ts@@ -144,8 +144,7 @@ function assertMessage(value: string): string {}function restOperationUrl(iface: A2AAgentInterface, operation: string): string {const url = assertA2AUrl(iface.url); const base = url.pathname.endsWith("/") ? url.pathname : `${url.pathname}/`;- const tenant = iface.tenant ? `${encodeURIComponent(iface.tenant)}/` : "";- url.pathname = `${base}${tenant}${operation}`.replace(/\/{2,}/g, "/"); url.search = "";+ url.pathname = `${base}${operation}`.replace(/\/{2,}/g, "/"); url.search = "";return url.toString();}function requestParams(iface: A2AAgentInterface, params: Record<string, unknown>): Record<string, unknown> {@@ -167,11 +166,14 @@ async function invoke(target: A2ADiscoveredAgent, method: "SendMessage" | "GetTa}if (method === "GetTask") {const taskId = encodeURIComponent(String(params.id)); const url = new URL(restOperationUrl(iface, `tasks/${taskId}`));+ if (iface.tenant) url.searchParams.set("tenant", iface.tenant);if (params.historyLength !== undefined) url.searchParams.set("historyLength", String(params.historyLength));return fetchJson(url.toString(), { headers: headers(iface, "application/a2a+json") }, fetchImpl);}const path = method === "SendMessage" ? "message:send" : `tasks/${encodeURIComponent(String(params.id))}:cancel`;- const body = { ...params }; if (iface.tenant) delete body.tenant;+ const body = method === "SendMessage"+ ? requestParams(iface, params)+ : { ...(iface.tenant ? { tenant: iface.tenant } : {}) };return fetchJson(restOperationUrl(iface, path), { method: "POST", headers: headers(iface, "application/a2a+json"), body: JSON.stringify(body) }, fetchImpl);}diff --git a/lib/mcp/tools-a2a.test.ts b/lib/mcp/tools-a2a.test.tsindex 5c362636..e2943ef4 100644--- a/lib/mcp/tools-a2a.test.ts+++ b/lib/mcp/tools-a2a.test.ts@@ -23,15 +23,19 @@ beforeEach(() => {});describe("MCP A2A tools", () => {- it("exports the complete read/write A2A v1 surface with write approval semantics", () => {+ it("uses read/write/exec scopes so remote A2A actions stay approval-gated", () => {expect([...byName]).toHaveLength(8);expect(byName.get("a2a_agents_list")?.scope).toBe("read");expect(byName.get("a2a_agent_discover")?.scope).toBe("read");expect(byName.get("a2a_task_get")?.scope).toBe("read");- for (const name of ["a2a_agent_register", "a2a_agent_remove", "a2a_message_send", "a2a_task_cancel", "a2a_handoff"]) {+ for (const name of ["a2a_agent_register", "a2a_agent_remove"]) {expect(byName.get(name)?.scope, name).toBe("write");expect(byName.get(name)?.limit?.max, `${name} rate limit`).toBeGreaterThan(0);}+ for (const name of ["a2a_message_send", "a2a_task_cancel", "a2a_handoff"]) {+ expect(byName.get(name)?.scope, name).toBe("exec");+ expect(byName.get(name)?.limit?.max, `${name} rate limit`).toBeGreaterThan(0);+ }});it("hands off only explicit objective/context and hashes caller ids before crossing the A2A boundary", async () => {@@ -39,7 +43,7 @@ describe("MCP A2A tools", () => {const sessionId = "session-raw-super-secret-id";const workflowId = "workflow-raw-super-secret-id";const out = await tool!.run({ target: "peer", objective: "research", context: "facts only" }, {- principal: "mcp-client:test", sessionId, workflowId, scope: "write", actor: "test",+ principal: "mcp-client:test", sessionId, workflowId, scope: "exec", actor: "test",});expect(mocks.resolve).toHaveBeenCalledWith("peer");expect(mocks.handoff).toHaveBeenCalledWith(peer, "research", "facts only", expect.objectContaining({@@ -55,7 +59,7 @@ describe("MCP A2A tools", () => {it("does not synthesize hidden context when sending a normal A2A message", async () => {mocks.send.mockResolvedValue({ task: { id: "t-2" } });await byName.get("a2a_message_send")!.run({ target: "peer", message: "explicit only" }, {- principal: "mcp-client:test", sessionId: "hidden-session", scope: "write", actor: "test",+ principal: "mcp-client:test", sessionId: "hidden-session", scope: "exec", actor: "test",});expect(mocks.send).toHaveBeenCalledWith(peer, "explicit only", {contextId: undefined, taskId: undefined, returnImmediately: true,diff --git a/lib/mcp/tools-a2a.ts b/lib/mcp/tools-a2a.tsindex a36948e8..3e8725b2 100644--- a/lib/mcp/tools-a2a.ts+++ b/lib/mcp/tools-a2a.ts@@ -52,7 +52,7 @@ export const A2A_TOOLS: McpTool[] = [{name: "a2a_message_send",description: "Send one text message to a public A2A v1 agent via its advertised JSONRPC or HTTP+JSON interface. Does not expose this MSO session history; only the explicit message and optional A2A context/task ids are transmitted.",- scope: "write", annotations: { openWorldHint: true }, limit: { key: "a2a.send", max: 30, windowMs: 60_000 }, audit: { action: "a2a.send", targetArg: "target" },+ scope: "exec", annotations: { openWorldHint: true }, limit: { key: "a2a.send", max: 30, windowMs: 60_000 }, audit: { action: "a2a.send", targetArg: "target" },result: { maxTextBytes: 64 * 1024, overflowHint: "A2A response was compacted; use a2a_task_get with the returned task id for focused status." },inputSchema: S({target: { type: "string", description: "Registered alias/id or public Agent Card URL." }, message: { type: "string", description: "Explicit message to the remote agent, max 24 KiB." },@@ -76,14 +76,14 @@ export const A2A_TOOLS: McpTool[] = [{name: "a2a_task_cancel",description: "Request cancellation of one in-progress A2A v1 task. The remote agent remains authoritative about whether cancellation is allowed.",- scope: "write", annotations: { destructiveHint: true, openWorldHint: true }, limit: { key: "a2a.cancel", max: 30, windowMs: 60_000 }, audit: { action: "a2a.cancel", targetArg: "task_id" },+ scope: "exec", annotations: { destructiveHint: true, openWorldHint: true }, limit: { key: "a2a.cancel", max: 30, windowMs: 60_000 }, audit: { action: "a2a.cancel", targetArg: "task_id" },inputSchema: S({ target: { type: "string" }, task_id: { type: "string" } }, ["target", "task_id"]),run: async (a) => cancelA2ATask(await target(str(a, "target")), str(a, "task_id")),},{name: "a2a_handoff",description: "Delegate an explicit objective plus optional caller-supplied context to another A2A v1 agent. Hidden MSO history, memory and tool state are NEVER copied; the handoff includes only these arguments and anonymous source hashes.",- scope: "write", annotations: { openWorldHint: true }, limit: { key: "a2a.send", max: 30, windowMs: 60_000 }, audit: { action: "a2a.send", targetArg: "target" },+ scope: "exec", annotations: { openWorldHint: true }, limit: { key: "a2a.send", max: 30, windowMs: 60_000 }, audit: { action: "a2a.send", targetArg: "target" },result: { maxTextBytes: 64 * 1024, overflowHint: "A2A handoff response was compacted; poll the returned task with a2a_task_get." },inputSchema: S({target: { type: "string", description: "Registered alias/id or public Agent Card URL." }, objective: { type: "string", description: "Delegated objective, max 8 KiB." },diff --git a/lib/mcp/toolset.ts b/lib/mcp/toolset.tsindex 67d7c26b..6550f4e2 100644--- a/lib/mcp/toolset.ts+++ b/lib/mcp/toolset.ts@@ -3,8 +3,8 @@ import type { Scope } from "./scope";import type { McpTool } from "./tool-kit";export const MCP_SERVER_VERSION = "1.6.0";-export const MCP_TOOLSET_VERSION = "2026.09.02.4";-export const MCP_TOOLSET_CHANGED_AT = "2026-09-02T05:58:15Z";+export const MCP_TOOLSET_VERSION = "2026.09.02.5";+export const MCP_TOOLSET_CHANGED_AT = "2026-09-02T06:43:00Z";export type McpToolsetInfo = {serverVersion: string;