You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ACP: route file I/O through client fs/* delegation #2
The ACP adapter uses mecatl's own osfs Workspace and never delegates file I/O to the editor. It does not call the client's fs/read_text_file / fs/write_text_file, so edits hit disk directly rather than flowing through the editor's buffers/undo — the editor's unsaved buffers and mecatl's on-disk view can diverge.
Validated (independent cross-check):
The session roots on osfs via Service.CreateSession(ctx, req.Cwd, …) (internal/adapter/acp/agent.go); no fs/read_text_file/fs/write_text_file strings exist anywhere in internal/adapter/acp/ (only the deferral note in doc.go).
ClientCapabilities is decoded as opaque json.RawMessage and never inspected (internal/adapter/acp/types.go).
Proposed approach
A JSON-RPC-backed tool.Workspace implementation that routes reads/writes through ACP fs/* client requests (the adapter is already a JSON-RPC client for session/request_permission), injected as the per-session Workspace in ACP mode when the client advertises fs.readTextFile/writeTextFile (the capability is the client's, not agent-advertised).
Caveats from review:
The seam is tool.Workspace (it deliberately lives in internal/tool, not internal/port — see CLAUDE.md).
Workspace also exposes Grep and the Edit read-ledger (RecordRead/WasReadUnchanged), which ACP fs/* does not provide — a JSON-RPC Workspace must synthesize those. So it's more than a read/write shim. Large / behavioral.
Part of ACP Phase 3 long-tail (docs/adr/0001-acp-adapter.md).
Done in 941646b. Hybrid: file Read/Write + the Edit read-ledger now delegate through the client's fs/read_text_file/fs/write_text_file when it advertises both fs capabilities; Grep/Glob/Stat stay on a consistent local view (the mutation path is buffer-consistent because read-before-edit forces a re-read through fs/* before any write). Per-session workspace override seam mirrors the #7 sessionEngines pattern (WorkspaceFactory unchanged → gRPC/HTTP untouched). Panel caught and fixed a real write-clobber (unsaved buffer misclassified as new), symlink-escape, and unbounded-call issues — all now fail closed. grep-over-buffers and fs/* on session/load are documented residuals/deferrals (the latter mirrors the MCP-on-load asymmetry, tracked alongside #9).
Activity
feat(acp): delegate file Read/Write through client fs/* (hybrid) (#2)
JAORMX commentedon Jun 1, 2026
Done in 941646b. Hybrid: file Read/Write + the Edit read-ledger now delegate through the client's fs/read_text_file/fs/write_text_file when it advertises both fs capabilities; Grep/Glob/Stat stay on a consistent local view (the mutation path is buffer-consistent because read-before-edit forces a re-read through fs/* before any write). Per-session workspace override seam mirrors the #7 sessionEngines pattern (WorkspaceFactory unchanged → gRPC/HTTP untouched). Panel caught and fixed a real write-clobber (unsaved buffer misclassified as new), symlink-escape, and unbounded-call issues — all now fail closed. grep-over-buffers and fs/* on session/load are documented residuals/deferrals (the latter mirrors the MCP-on-load asymmetry, tracked alongside #9).
feat(prompt): enrich the default system prompt + model-aware agency d…
feat(memory): adopt declarative-not-imperative memory-write guidance …
test(e2e): guardrails slot-enable live scenario (#159)
fix(scheduler): panel-review fixes — singleton trial-lease, read-lean…
fix(scheduler): panel-review fixes — singleton trial-lease, read-lean…
fix(scheduler): panel-review fixes — singleton trial-lease, read-lean…
fix(scheduler): review fixes — singleton skip-path, PendingFireSessio…
fix(scheduler): panel-review fixes — singleton trial-lease, read-lean…
feat: scheduled tasks — durable registry + tick loop + claim-before-f…
fix(steer): round-2 rework — mutex inbox (drop supersede) + clean-exi…
fix(steer): round-2 rework — mutex inbox (drop supersede) + clean-exi…
Listener-scoped workspace authority (ADR 0237) (#763)