Skip to content

feat(agent-consoles): remote file browser — read-only, MCP-backed (slice 3) - #68

Merged
brettchien merged 1 commit into
mainfrom
feat/adr49-slice3-fs-read
Aug 17, 2026
Merged

feat(agent-consoles): remote file browser — read-only, MCP-backed (slice 3)#68
brettchien merged 1 commit into
mainfrom
feat/adr49-slice3-fs-read

Conversation

@brettchien

@brettchien brettchien commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What

Slice 3 of the agent-consoles ADR (#49) — the remote file editor's read path (Part D), on fresh main (slices 1 #66 + 2 #67 + registry editor #69 + the Part D decision #70 all merged). Adds a capability-gated, read-only directory browser + file viewer to the agent console.

Reworked after #70 — fs is MCP, not bespoke fs/*

The Part D decision (#70) locked the mechanism: fs is an MCP files server the target agent exposes, reached Studio-brokered via the oab reverse-MCP toolnot a bespoke fs/* method set on /acp. This slice was rewritten to match:

The fs MCP server + the oab fs-relay are upstream (openab) and absent today, the same bucket as token streaming / tool_call. So this slice ships the UI + the source-agnostic read contract now; live fs traffic (MCP-backed read, then write/apply) lands in slice 4 with the server + relay. On a real endpoint the browser shows a "pending the fs MCP files server" placeholder; the browser build's mock serves a fixture filesystem so the surface is reviewable.

Changes (console)

  • fileBrowser.ts — capability-gated directory browser + read-only CodeMirror viewer, mounted per open console, disposed on close/switch. .toml highlighted; strictly read-only.
  • render.ts — pure fsListingHtml (dirs-before-files, sizes, open-marking, data-fs-* nav hooks) + fsUnavailableHtml.
  • types/source/fixtures — the fs view-models; fsCapability/fsList/fsRead (Mock = fixture FS; Tauri = honestly unsupported until slice 4).
  • index.html / styles.css — the Files region (listing + viewer split).

ADR fidelity / security

  • Read-onlyfs/write/Apply is slice 4, gated at the fs server's tool level: agent-declared roots, writable default-off, explicit Apply, no /-wide default.
  • Least privilege intact — filesystem content over the Studio-brokered MCP channel; the oab relay stays management-only, no orchestrator/kube creds, no reverse-MCP grant widening.

Testing

  • consoletsc --noEmit clean · 84 vitest (incl. fs render cases) · vite build OK.
  • No Rust change (the bespoke acp-tunnel fs client is removed).

Follows: slice 4 — fs MCP server + oab fs-relay, then write/apply.

🤖 Generated with Claude Code

…ice 3)

Slice 3 of the agent-consoles ADR (#49): the remote file editor's read
path (Part D). Adds a capability-gated, read-only directory browser +
file viewer to the agent console.

Per the merged Part D decision (#70), fs is an MCP files server the
target agent exposes, reached Studio-brokered via the `oab` reverse-MCP
tool — not a bespoke `fs/*` method set on `/acp`. The fs MCP server + the
`oab` fs-relay are upstream (openab) and absent today, the same bucket as
token streaming / `tool_call`. So this slice ships the browser UI + the
source-agnostic read contract now; live fs traffic (MCP-backed read, then
write/apply) lands in slice 4 with the server + relay.

The earlier draft's bespoke `crates/acp-tunnel` `fs/*` client is dropped
(the mechanism #70 rejected); the browser UI it fronted is source-
agnostic and unchanged.

- console/fileBrowser.ts: capability-gated browser + read-only CodeMirror
  viewer, mounted per open console, disposed on close/switch. Read-only.
- render.ts: pure `fsListingHtml` (dirs-before-files, sizes, open-marking,
  `data-fs-*` nav hooks) + `fsUnavailableHtml`.
- types/source/fixtures: the fs view-models; `fsCapability`/`fsList`/
  `fsRead` (Mock = fixture FS; Tauri = honestly unsupported until slice 4).
- index.html / styles.css: the Files region (listing + viewer split).

Security (Part D): read-only — write/Apply is slice 4, gated at the fs
server's tool level (agent-declared roots, `writable` default-off, no
`/`-wide default). No orchestrator/kube creds; the `oab` relay stays
management-only.

Testing: console — `tsc --noEmit` clean · 84 vitest (incl. fs render
cases) · `vite build` OK. No Rust change (the bespoke client is removed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@brettchien
brettchien force-pushed the feat/adr49-slice3-fs-read branch from 29724e0 to 0f15242 Compare August 17, 2026 06:19
@brettchien brettchien changed the title feat(agent-consoles): remote file editor read path — fs client + read-only browser (slice 3) feat(agent-consoles): remote file browser — read-only, MCP-backed (slice 3) Aug 17, 2026
@brettchien
brettchien merged commit e3a3fbf into main Aug 17, 2026
2 checks passed
@brettchien
brettchien deleted the feat/adr49-slice3-fs-read branch August 17, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant