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
Revert "feat(mcp): add fs_stat read capability for bounded path metadata"
Abdurrahman Fakhrulada8d3620560
diff --git a/docs/generated/MCP-CATALOG.md b/docs/generated/MCP-CATALOG.mdindex 86c53593..5300e0f3 100644--- a/docs/generated/MCP-CATALOG.md+++ b/docs/generated/MCP-CATALOG.md@@ -4,21 +4,21 @@## Full MSO catalog-<!-- mcp-toolset: server=1.17.0 version=2026.10.18.1 tools=119 read=59 write=37 exec=23 -->+<!-- mcp-toolset: server=1.17.0 version=2026.10.10.1 tools=118 read=58 write=37 exec=23 -->| Fact | Current source value ||---|---:|| MCP server | `1.17.0` |-| Toolset | `2026.10.18.1` |-| Toolset changed at | `2026-10-18T00:00:00+00:00` |-| Transport tools | **121** |-| Model/operator tools | **119** |-| Read | **59** |+| Toolset | `2026.10.10.1` |+| Toolset changed at | `2026-10-10T07:40:00+00:00` |+| Transport tools | **120** |+| Model/operator tools | **118** |+| Read | **58** || Write | **37** || Exec | **23** || App-only bridges | **2** |-### Read (59)+### Read (58)- `a2a_agent_discover`- `a2a_agents_list`@@ -44,7 +44,6 @@- `fs_list`- `fs_read`- `fs_search`-- `fs_stat`- `fs_usage`- `infra_provider_doctor`- `infra_providers_list`@@ -153,20 +152,20 @@## ChatGPT model profile-<!-- mcp-chatgpt-profile: server=1.17.0 version=2026.10.18.1 tools=119 read=59 write=37 exec=23 app-only=2 total=121 -->+<!-- mcp-chatgpt-profile: server=1.17.0 version=2026.10.10.1 tools=118 read=58 write=37 exec=23 app-only=2 total=120 -->The ChatGPT profile automatically projects the complete MSO-owned generic model/operator catalog. OAuth scope is still enforced independently; app-only compatibility bridges stay app-only, and project-owned MCP tool names remain dynamic data behind the generic project bridge.| Fact | Current source value ||---|---:|-| ChatGPT transport tools | **121** |-| ChatGPT model/operator tools | **119** |-| Read | **59** |+| ChatGPT transport tools | **120** |+| ChatGPT model/operator tools | **118** |+| Read | **58** || Write | **37** || Exec | **23** || App-only bridges | **2** |-### ChatGPT read (59)+### ChatGPT read (58)- `a2a_agent_discover`- `a2a_agents_list`@@ -192,7 +191,6 @@ The ChatGPT profile automatically projects the complete MSO-owned generic model/- `fs_list`- `fs_read`- `fs_search`-- `fs_stat`- `fs_usage`- `infra_provider_doctor`- `infra_providers_list`diff --git a/lib/host/fs-api.ts b/lib/host/fs-api.tsindex 1fe867a5..6b20282f 100644--- a/lib/host/fs-api.ts+++ b/lib/host/fs-api.ts@@ -1,5 +1,4 @@-export { listDir, readFile, writeFile, makeDir, remove, move, copy, searchFs, usage, statReadable, statReadableMeta, mimeFor, fileStream } from "./fs";-export type { FsReadableMeta } from "./fs";+export { listDir, readFile, writeFile, makeDir, remove, move, copy, searchFs, usage, statReadable, mimeFor, fileStream } from "./fs";export { uploadInto, resolveUploadDest, streamFileInto } from "./fs-upload";export { uploadOneGuarded } from "./fs-upload-guarded";export type { UploadConflictPolicy, GuardedUploadResult } from "./fs-upload-guarded";diff --git a/lib/host/fs.ts b/lib/host/fs.tsindex 23dd6a1e..d364a9bc 100644--- a/lib/host/fs.ts+++ b/lib/host/fs.ts@@ -153,28 +153,6 @@ export async function statReadable(} catch (error) { await handle.close(); throw error; }}-export type FsReadableMeta = {- kind: "file" | "dir" | "symlink";- sizeBytes: number;- mtimeMs: number;- ctimeMs: number;- mode: number;-};--// Resolve + stat a readable path (within READ roots) for bounded metadata.-export async function statReadableMeta(requested: string): Promise<FsReadableMeta> {- const p = await resolveReadable(requested);- const st = await fs.stat(p);- const kind: FsReadableMeta["kind"] = st.isDirectory() ? "dir" : st.isSymbolicLink() ? "symlink" : "file";- return {- kind,- sizeBytes: st.size,- mtimeMs: st.mtimeMs,- ctimeMs: st.ctimeMs,- mode: st.mode,- };-}-// Transfer the verified handle to the stream, optionally for a byte range.export function fileStream(handle: FileHandle, start?: number, end?: number): ReadStream {return handle.createReadStream({ autoClose: true, ...(start !== undefined ? { start, end } : {}) });diff --git a/lib/mcp/parity.test.ts b/lib/mcp/parity.test.tsindex 60d020c0..081afe16 100644--- a/lib/mcp/parity.test.ts+++ b/lib/mcp/parity.test.ts@@ -49,7 +49,6 @@ const MCP_ONLY: Record<string, string> = {"project.mcp.call": "external MCP clients execute one exact dynamically-discovered project MCP tool under exec scope; Alfa can use its approved exec path and must not import project MCP catalogs","fs.upload.file": "external ChatGPT connectors need openai/fileParams to move conversation-generated files onto the VPS; in-shell Alfa already has direct host filesystem access","fs.export.file": "external MCP clients need an authenticated original-byte download bridge; in-shell Alfa already has direct host filesystem access",- "fs.stat": "external MCP clients need a true size/mtime without reading binary content","workflow.start": "the external connector needs an actor-scoped task boundary; Alfa already owns an in-app conversation/run boundary","workflow.status": "app-only MCP Apps bridge used by the ChatGPT progress component; Alfa already owns its in-shell run state and must not poll the external workflow store","workflow.cancel": "same actor-scoped boundary; external runs need explicit recovery from an interrupted task",diff --git a/lib/mcp/tools-read-stats.test.ts b/lib/mcp/tools-read-stats.test.tsindex d41bb466..ccfb10a5 100644--- a/lib/mcp/tools-read-stats.test.ts+++ b/lib/mcp/tools-read-stats.test.ts@@ -1,9 +1,4 @@-import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";-import { mkdtemp, mkdir, rm, writeFile } from "node:fs/promises";-import os from "node:os";-import path from "node:path";-import { READ_ONLY } from "./tool-kit";-+import { describe, expect, it, vi } from "vitest";vi.mock("server-only", () => ({}));const { READ_TOOLS } = await import("./tools-read");@@ -18,60 +13,3 @@ describe("sys_stats model contract", () => {expect(Number(result.uptimeMs)).toBeGreaterThan(Number(result.uptimeSeconds));});});--describe("fs_stat read capability", () => {- let tempRoot: string;-- beforeEach(async () => {- tempRoot = await mkdtemp(path.join(os.tmpdir(), "mso-fs-stat-test-"));- vi.stubEnv("OS_FS_READ_ROOTS", tempRoot);- });-- afterEach(async () => {- vi.unstubAllEnvs();- await rm(tempRoot, { recursive: true, force: true });- });-- it("is listed at read scope with read-only annotations", () => {- const tool = READ_TOOLS.find((row) => row.name === "fs_stat");- expect(tool).toBeDefined();- expect(tool?.scope).toBe("read");- expect(tool?.annotations).toEqual(READ_ONLY);- expect(tool?.description).toContain("true sizeBytes");- });-- it("refuses credential paths", async () => {- const tool = READ_TOOLS.find((row) => row.name === "fs_stat")!;- await expect(tool.run({ path: path.join(tempRoot, ".env.local") }, { scope: "read" })).rejects.toThrow(/credential|sensitive/i);- await expect(tool.run({ path: path.join(tempRoot, ".ssh", "id_rsa") }, { scope: "read" })).rejects.toThrow(/credential|sensitive/i);- });-- it("is callable and returns true size for a temp file", async () => {- const tool = READ_TOOLS.find((row) => row.name === "fs_stat")!;- const filePath = path.join(tempRoot, "binary-sample.bin");- const payload = Buffer.from("MSO-STAT-BOUNDED-TEST-PAYLOAD-12345");- await writeFile(filePath, payload);-- const result = (await tool.run({ path: filePath }, { scope: "read" })) as Record<string, unknown>;- expect(result).toEqual({- kind: "file",- sizeBytes: payload.byteLength,- mtimeMs: expect.any(Number),- ctimeMs: expect.any(Number),- mode: expect.any(Number),- });- });-- it("returns kind 'dir' for a directory", async () => {- const tool = READ_TOOLS.find((row) => row.name === "fs_stat")!;- const dirPath = path.join(tempRoot, "nested-folder");- await mkdir(dirPath);-- const result = (await tool.run({ path: dirPath }, { scope: "read" })) as Record<string, unknown>;- expect(result.kind).toBe("dir");- expect(result.sizeBytes).toEqual(expect.any(Number));- expect(result.mtimeMs).toEqual(expect.any(Number));- expect(result.ctimeMs).toEqual(expect.any(Number));- expect(result.mode).toEqual(expect.any(Number));- });-});diff --git a/lib/mcp/tools-read.ts b/lib/mcp/tools-read.tsindex dd9f0cf1..dc5adfe7 100644--- a/lib/mcp/tools-read.ts+++ b/lib/mcp/tools-read.ts@@ -2,7 +2,7 @@ import { ownedArtifactSession } from "@/lib/agent/artifact-session";import { saveSessionArtifact } from "@/lib/agent/artifacts";import { artifactPaths } from "@/lib/agent/artifact-paths";import path from "node:path";-import { listDir, readFile, searchFs, usage, statReadableMeta, sha256Text, utf8Bytes } from "@/lib/host/fs-api";+import { listDir, readFile, searchFs, usage, sha256Text, utf8Bytes } from "@/lib/host/fs-api";import { stats, processes } from "@/lib/host/system-api";import { captureMsoScreen } from "@/lib/host/screenshot-api";import { createTempShare, tempShareUrl } from "@/lib/host/temp-share-api";@@ -43,17 +43,6 @@ export const READ_TOOLS: McpTool[] = [return { path: a.path, content, bytes: utf8Bytes(content), sha256: sha256Text(content) };},},- {- name: "fs_stat",- description:- "Get bounded metadata for a file or directory on the VPS (kind, true sizeBytes, mtimeMs, ctimeMs, mode). " +- "Use this for true file size or modification time without reading file contents or launching a shell. " +- "Reads are bounded to OS_FS_READ_ROOTS and credential paths (~/.ssh, ~/.mso, cloud tokens) are refused.",- scope: "read",- annotations: READ_ONLY,- inputSchema: S(PATH_P, ["path"]),- run: (a) => statReadableMeta(str(a, "path")),- },{name: "fs_search",description:@@ -185,13 +174,19 @@ export const READ_TOOLS: McpTool[] = [ttlMs: 15 * 60_000,maxDownloads: 5,});- const previewUrl = tempShareUrl(share.id), downloadUrl = tempShareUrl(share.id, true);- const text = `MSO ${shot.shell} screenshot — ${shot.width}×${shot.height}\n` +- (artifactPath ? `Session artifact: ${artifactPath}\n` : "") +- `Temporary preview: ${previewUrl}\nDirect download: ${downloadUrl}\nExpires ${new Date(share.expiresAt).toISOString()} · ${share.downloadsLeft} authenticated downloads`;+ const previewUrl = tempShareUrl(share.id);+ const downloadUrl = tempShareUrl(share.id, true);return mcpDirect([{ type: "image", data: shot.data, mimeType: shot.mimeType },- { type: "text", text },+ {+ type: "text",+ text:+ `MSO ${shot.shell} screenshot — ${shot.width}×${shot.height}\n` ++ (artifactPath ? `Session artifact: ${artifactPath}\n` : "") ++ `Temporary preview: ${previewUrl}\n` ++ `Direct download: ${downloadUrl}\n` ++ `Expires ${new Date(share.expiresAt).toISOString()} · ${share.downloadsLeft} authenticated downloads`,+ },], false, {result: { artifact, artifactPath, shell: shot.shell, width: shot.width, height: shot.height, mimeType: shot.mimeType, previewUrl, downloadUrl, expiresAt: share.expiresAt, downloadsLeft: share.downloadsLeft },});diff --git a/lib/mcp/toolset.ts b/lib/mcp/toolset.tsindex c7d67450..c9de40e2 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.17.0";-export const MCP_TOOLSET_VERSION = "2026.10.18.1";-export const MCP_TOOLSET_CHANGED_AT = "2026-10-18T00:00:00+00:00";+export const MCP_TOOLSET_VERSION = "2026.10.10.1";+export const MCP_TOOLSET_CHANGED_AT = "2026-10-10T07:40:00+00:00";export type McpToolsetInfo = {serverVersion: string;