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(mcp): make read pipeline schema portable
Rahman33b38796ef1d
diff --git a/CLAUDE.md b/CLAUDE.mdindex d20a804f..567572f3 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -348,7 +348,7 @@ the real runtime and working analogue before changing a tool or skill contract.it AND `tools/call` re-checks it — a client can call a name it was never shown.- **Tool names are an MSO public API contract.** Keep global names MSO-owned and generic.Project-owned MCP names are data behind `project_mcp_tools` / `project_mcp_call`; never copy them into the global catalog.- <!-- mcp-toolset: server=1.7.0 version=2026.09.03.3 tools=72 read=34 write=24 exec=14 -->+ <!-- mcp-toolset: server=1.7.0 version=2026.09.03.4 tools=72 read=34 write=24 exec=14 -->The full MSO transport exposes **73 tools**: **72 model/operator tools** (34 read, 24 write, 14 exec) plus app-only `workflow_status`.ChatGPT receives a deliberately smaller static profile; hidden full-catalog names are rejected at call time, not merely omitted from `tools/list`.- Store is `~/.mso/mcp.json`, **sha256 only**, same atomic-write + fail-loud-on-corruptdiff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 55d308e3..30b4adab 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -160,7 +160,7 @@ park a visible Approve/Deny card. The complete semantic contract is**MCP** is for external clients such as ChatGPT, Claude.ai and Cursor. Its catalog lives in`lib/mcp/`; access is controlled by the OAuth token scope rather than Alfa approval cards.-<!-- mcp-toolset: server=1.7.0 version=2026.09.03.3 tools=72 read=34 write=24 exec=14 -->+<!-- mcp-toolset: server=1.7.0 version=2026.09.03.4 tools=72 read=34 write=24 exec=14 -->The full transport exposes **73 tools**: **72 model/operator tools** (34 read, 24 write, 14 exec) plus app-only `workflow_status`. ChatGPT gets a compact client profile rather than the full set. Project function/MCP names remain data behind `project_capabilities`, `project_function_call`, `project_mcp_tools`, and `project_mcp_call`; they never rewrite the global tool prefix. `GET /mcp` reports both full and ChatGPT signatures.See `docs/MCP.md` for protocol/security internals, `docs/A2A.md` for peer-agent delegation, and `docs/CHATGPT-PLUGIN.md` for thediff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 50234a88..687e9836 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -10,6 +10,10 @@ this is the *what*, and it is what Settings → About shows as “What's new”.- `mcp` harden ChatGPT profile and project bridge+**Fixed**++- `mcp` make read pipeline schema portable+**Faster**- `agent` expand objective repo corpusdiff --git a/docs/CHATGPT-PLUGIN.md b/docs/CHATGPT-PLUGIN.mdindex 99058fa4..41b836d6 100644--- a/docs/CHATGPT-PLUGIN.md+++ b/docs/CHATGPT-PLUGIN.md@@ -4,11 +4,11 @@>> ChatGPT's Developer Mode/App UI can change independently of MSO. Use the current OpenAI MCP/App documentation for exact menu labels, and use MSO Settings → MCP / `GET /mcp` for the live server/profile signatures.-<!-- mcp-chatgpt-profile: server=1.7.0 version=2026.09.03.3 tools=28 read=14 write=8 exec=6 app-only=1 total=29 -->+<!-- mcp-chatgpt-profile: server=1.7.0 version=2026.09.03.4 tools=28 read=14 write=8 exec=6 app-only=1 total=29 -->-MSO server **1.7.0**, toolset **2026.09.03.3** exposes a full generic catalog for MCP clients, but a registered ChatGPT client receives only **29 transport tools**: **28 model/operator tools** (14 read, 8 write, 6 exec) plus app-only `workflow_status`.+MSO server **1.7.0**, toolset **2026.09.03.4** exposes a full generic catalog for MCP clients, but a registered ChatGPT client receives only **29 transport tools**: **28 model/operator tools** (14 read, 8 write, 6 exec) plus app-only `workflow_status`.-The compact descriptor regression currently measures **31,811 JSON bytes** for all 29 ChatGPT tool definitions (roughly 8k tokens at a 4-byte/token estimate), with the largest individual descriptor **2,507 bytes**. CI keeps the profile below 40 KiB and each descriptor below 8 KiB. Bytes are the deterministic contract; token estimates vary by tokenizer.+The compact descriptor regression currently measures **31,908 JSON bytes** for all 29 ChatGPT tool definitions (roughly 8k tokens at a 4-byte/token estimate), with the largest individual descriptor **2,507 bytes**. CI keeps the profile below 40 KiB and each descriptor below 8 KiB. Bytes are the deterministic contract; token estimates vary by tokenizer.## Why ChatGPT gets a compact profilediff --git a/docs/MCP.md b/docs/MCP.mdindex 203afa30..31864ddc 100644--- a/docs/MCP.md+++ b/docs/MCP.md@@ -116,9 +116,9 @@ 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.7.0 version=2026.09.03.3 tools=72 read=34 write=24 exec=14 -->+<!-- mcp-toolset: server=1.7.0 version=2026.09.03.4 tools=72 read=34 write=24 exec=14 -->-Current full transport catalog: **73 tools**, server `1.7.0` / toolset `2026.09.03.3`.+Current full transport catalog: **73 tools**, server `1.7.0` / toolset `2026.09.03.4`.The model/operator catalog is **72 tools** (34 read, 24 write, 14 exec); `workflow_status` is the one app-only MCP Apps bridge. ChatGPT receives a smaller client profile rather than this full set; see [`CHATGPT-PLUGIN.md`](./CHATGPT-PLUGIN.md).`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.diff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex fc542844..1f789421 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -4,7 +4,8 @@ Running log of what shipped each phase. Newest at top.## 2026-09-03 — MCP 1.7 ChatGPT compact profile + dynamic project MCP-- **ChatGPT scanner contract:** full MSO remains 73 transport tools / 72 model tools (34 read / 24 write / 14 exec + app-only `workflow_status`), while ChatGPT is client-profiled to **29 transport tools = 28 model tools (14 read / 8 write / 6 exec) + app-only bridge**. The profile is fail-closed at list and direct-call time, keeps only MSO-owned generic names, and regression-measures **31,811 descriptor bytes (~8k rough tokens)** with a 40 KiB total / 8 KiB per-tool guard.+- **ChatGPT scanner contract:** full MSO remains 73 transport tools / 72 model tools (34 read / 24 write / 14 exec + app-only `workflow_status`), while ChatGPT is client-profiled to **29 transport tools = 28 model tools (14 read / 8 write / 6 exec) + app-only bridge**. The profile is fail-closed at list and direct-call time, keeps only MSO-owned generic names, and regression-measures **31,908 descriptor bytes (~8k rough tokens)** with a 40 KiB total / 8 KiB per-tool guard.+- **Scanner portability follow-up:** MCP Inspector 2.5.0 successfully listed the live 29-tool profile but strict lint found one unconstrained `{}` schema at `read_pipeline.transform.where[].value`. The schema now advertises the runtime's real scalar contract explicitly (`string <= 2048 | number | boolean | null`) so portable clients do not have to interpret a bare permissive schema. Toolset advances to `2026.09.03.4`; live acceptance must include Inspector `tools/list --strict` with zero portability findings.- **Metadata SSOT:** every advertised tool is normalized through one descriptor layer with a human title, explicit `readOnlyHint` / `destructiveHint` / `openWorldHint`, optional idempotency, and matching top-level + `_meta.securitySchemes`. ChatGPT gets compact descriptions/schema descriptions without changing behavior or constraints.- **Project MCP stays dynamic:** added generic exec-scope `project_mcp_tools` and `project_mcp_call`. `.mcp.json` stays private; `project_capabilities` exposes only server alias/transport/auth class, stdio runs without shell inside project cwd from a credential-scrubbed environment, remote HTTP uses SSRF/DNS-rebinding guards, and another project's OAuth is never copied/minted implicitly. Project-specific tool names never enter MSO `tools/list`.- **OAuth/transport refresh hardening:** new OAuth grants bind `resource=<origin>/mcp`, return `iss`, issue one-hour access tokens plus rotating hashed refresh credentials, and revoke by grant family. Legacy bearers remain a migration path. Streamable HTTP validates `MCP-Protocol-Version`; the unsupported optional SSE GET listener now returns 405.diff --git a/docs/TESTING-HANDOFF.md b/docs/TESTING-HANDOFF.mdindex 2e83555a..f187a133 100644--- a/docs/TESTING-HANDOFF.md+++ b/docs/TESTING-HANDOFF.md@@ -4,7 +4,7 @@ Update this file at the end of every manual or automated test session. Keep it f## Current status-The current release target is **MSO CLI 1.12.0**, MCP server `1.7.0`, toolset `2026.09.03.3`; use `mso --version` plus `/api/health` for the exact Git build because documentation-only release commits also advance that identity. The v1.10/v1.11 findings and the v1.12 sectioned-terminal/recoverable-error work below are resolved and retained as historical test evidence. Do not re-open a resolved finding from prose alone: reproduce it against the current build first. There is no known 1.12 release blocker in this handoff.+The current release target is **MSO CLI 1.12.0**, MCP server `1.7.0`, toolset `2026.09.03.4`; use `mso --version` plus `/api/health` for the exact Git build because documentation-only release commits also advance that identity. The v1.10/v1.11 findings and the v1.12 sectioned-terminal/recoverable-error work below are resolved and retained as historical test evidence. Do not re-open a resolved finding from prose alone: reproduce it against the current build first. There is no known 1.12 release blocker in this handoff.Current verified behavior:- MCP 1.7 release candidate: ChatGPT is fail-closed to a 29-tool compact MSO-only profile (~31.8 KiB descriptor JSON / ~8k rough tokens), full MSO remains 73 transport tools, and project-specific MCP names stay dynamic behind `project_mcp_tools` / `project_mcp_call`. OAuth resource binding + rotating refresh credentials, Streamable HTTP protocol handling, and legacy registered ChatGPT-client profile detection have focused regression coverage. Deterministic security gates (Trivy/OSV/Gitleaks/Semgrep/ShellCheck) pass; Codex Security AI scanning is explicitly incomplete because executor/cost guards stopped it, with 0 findings in the targeted partial reports.@@ -29,7 +29,7 @@ Current verified behavior:```textYou are taking over MSO testing work in /home/rahman/projects/mso.-Read docs/TESTING-HANDOFF.md first. Current verified source baseline: CLI 1.12.0, MCP server 1.7.0, toolset 2026.09.03.3; resolve the exact live Git build from `mso --version`/`/api/health`. Preserve existing work and do not re-open resolved v1.10-v1.12 findings unless you can reproduce them against the current build.+Read docs/TESTING-HANDOFF.md first. Current verified source baseline: CLI 1.12.0, MCP server 1.7.0, toolset 2026.09.03.4; resolve the exact live Git build from `mso --version`/`/api/health`. Preserve existing work and do not re-open resolved v1.10-v1.12 findings unless you can reproduce them against the current build.For a new issue: record the exact reproduction, distinguish durable state from live receiver/process state, avoid duplicate write/exec retries when outcome is uncertain, add the smallest focused regression, run typecheck plus the relevant contract tests, then update this handoff with factual results.```@@ -82,7 +82,7 @@ Validation minimum: focused unit tests for success, offline target, absent subsc**Verified so far**- TypeScript: PASS after OAuth/project/profile changes.- Focused OAuth/route/store/profile/project-MCP contract tests: PASS.-- ChatGPT descriptor metric: **29 tools / 31,811 bytes / ~7,953 rough tokens / 2,507 max tool bytes**.+- ChatGPT descriptor metric: **29 tools / 31,908 bytes / ~7,977 rough tokens / 2,604 max tool bytes**.- `node scripts/check-docs.mjs`: PASS at 72 model MCP tools + one app-only bridge.- Full repository verify/build and live deployment verification are the remaining release gates for this session.diff --git a/lib/mcp/chatgpt-profile.test.ts b/lib/mcp/chatgpt-profile.test.tsindex b2f3a762..a55aee93 100644--- a/lib/mcp/chatgpt-profile.test.ts+++ b/lib/mcp/chatgpt-profile.test.ts@@ -33,6 +33,10 @@ describe("ChatGPT compact MCP profile", () => {expect(tools.some((tool) => tool.name === "local_agent_inbox")).toBe(true);expect(tools.some((tool) => tool.name === "project_mcp_tools")).toBe(true);expect(tools.some((tool) => tool.name === "project_mcp_call")).toBe(true);+ const pipeline = tools.find((tool) => tool.name === "read_pipeline") as { inputSchema?: { properties?: { calls?: { items?: { properties?: { transform?: { properties?: { where?: { items?: { properties?: { value?: unknown } } } } } } } } } } } | undefined;+ expect(pipeline?.inputSchema?.properties?.calls?.items?.properties?.transform?.properties?.where?.items?.properties?.value).toEqual({+ anyOf: [{ type: "string", maxLength: 2048 }, { type: "number" }, { type: "boolean" }, { type: "null" }],+ });expect(tools.some((tool) => String(tool.name) === "private_echo" || String(tool.name).startsWith("project_fixture_"))).toBe(false);});diff --git a/lib/mcp/tools-read-pipeline.ts b/lib/mcp/tools-read-pipeline.tsindex 6476ce20..92c31a5e 100644--- a/lib/mcp/tools-read-pipeline.ts+++ b/lib/mcp/tools-read-pipeline.ts@@ -7,7 +7,8 @@ const TRANSFORM = {properties: {path: { type: "string", description: "Optional simple dotted path selected from the raw result before other operations." },where: { type: "array", maxItems: 4, items: { type: "object", properties: {- field: { type: "string" }, op: { type: "string", enum: ["eq", "ne", "contains", "gt", "gte", "lt", "lte", "exists"] }, value: {},+ field: { type: "string" }, op: { type: "string", enum: ["eq", "ne", "contains", "gt", "gte", "lt", "lte", "exists"] },+ value: { anyOf: [{ type: "string", maxLength: 2048 }, { type: "number" }, { type: "boolean" }, { type: "null" }] },}, required: ["field", "op"], additionalProperties: false } },select: { type: "array", maxItems: 12, items: { type: "string" } },sort: { type: "object", properties: { field: { type: "string" }, direction: { type: "string", enum: ["asc", "desc"] } }, required: ["field"], additionalProperties: false },diff --git a/lib/mcp/toolset.ts b/lib/mcp/toolset.tsindex 72c1f6fe..626de0a3 100644--- a/lib/mcp/toolset.ts+++ b/lib/mcp/toolset.ts@@ -4,8 +4,8 @@ import type { McpTool } from "./tool-kit";import { toolDescriptor, type McpToolProfile } from "./tool-contract";export const MCP_SERVER_VERSION = "1.7.0";-export const MCP_TOOLSET_VERSION = "2026.09.03.3";-export const MCP_TOOLSET_CHANGED_AT = "2026-09-03T07:45:00Z";+export const MCP_TOOLSET_VERSION = "2026.09.03.4";+export const MCP_TOOLSET_CHANGED_AT = "2026-09-03T10:23:00Z";export type McpToolsetInfo = {serverVersion: string;