Repository navigation
ed-acp-tauri: run an external ACP agent over stdio - #48
Conversation
AgentState::external starts a child process that speaks ACP, such as Anthropic's claude through claude-agent-acp, and serves it with the same client as the in-process agent: session updates, permission prompts, fs/* inside the session roots and URL elicitation. The child is killed when the connection ends, on logout or when the state is dropped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Adds an external-agent mode to AgentState. The host config is split into Common (client info, roots, MCP servers, events hooks) and a Source enum: InProcess keeps the old Profile + surface pair, External carries the new public ExternalConfig (command, args, env, client name/version). connect now builds either the in-memory Channel pair for ed_acp::serve or an AcpAgent child process over stdio, and the initialize/stay-connected logic is extracted into run_session, shared by both transports. logout short-circuits for external agents: it drops the live connection (which hangs up the session, ends connect_with, and drops the process transport, killing the child) and clears pending permission prompts. The in-process path is behaviorally unchanged apart from the refactor. Worth a first look at the external logout branch and the kill-on-drop chain it relies on; the rest is a faithful extraction of the old closure.
Automated review by siGit Code Review · commit 6e503e4 · see the review dashboard
The doc promised the agent forgets its session. For an external agent logout only ends the child process; the CLI keeps its credentials. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.6 <noreply@sigit.si>
There was a problem hiding this comment.
Re-review of the doc-only follow-up. The previously flagged inaccurate logout doc on AgentState is now fixed: lines 682-684 correctly state that the in-process agent forgets its stored session while an external agent only has its child process ended and keeps its own credentials, matching the implementation comment at line 686. No other code changed since the last review, so the remaining open threads stand as before. Nothing new to report.
Automated review by siGit Code Review · commit 8b6a6ba · changes since 6e503e4 · see the review dashboard
AgentState::externalstarts a child process that speaks ACP over stdio, such as Anthropic'sclaudethroughclaude-agent-acp, and serves it with the same client as the in-process agent: session updates, permission prompts,fs/*inside the session roots and URL elicitation. The child is killed when the connection ends, on logout, or when the state is dropped.ExternalConfigcarries the command, args, extra env, client name and version, and the sameroots,mcp_serversandeventshooks asHostConfig.sigit-app needs this to offer a Claude.ai subscription through Anthropic's own CLI. It is an addition to the public API of
ed-acp-tauri, and the in-process path is unchanged.cargo fmt --check,cargo clippy -p ed-acp-tauri --all-targets -- -D warningsandcargo test -p ed-acp-tauripass. I did not run an external agent from this crate directly; sigit-app (getsigit/sigit-app#164) drives it.A release bump to 1.3.6 follows once this and the
ed-claudePR are merged.