Repository navigation
Run ACP agents as custom CLIs, and let editors drive Solenta over ACP (#272) - #1699
Conversation
Solenta-Message-Id: 11966517-c619-42ad-a3b4-d2b5bfe76d8b
Solenta-Message-Id: adc9fdbc-6b99-4514-a298-2ac7372c41fb
…nt-client-protocol-acp-fo-34efb3 # Conflicts: # electron/runner-provider-generic.js
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cb349a3cc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| agent_servers: { | ||
| Solenta: { | ||
| command: process.execPath, |
There was a problem hiding this comment.
Add the custom-agent type to the Zed configuration
When this generated JSON is pasted into Zed, the Solenta entry has no type discriminator. Zed's documented custom-agent format requires "type": "custom", so the advertised Zed configuration is rejected or ignored rather than launching Solenta; generate a Zed-compatible entry or separate editor-specific configurations. Zed custom-agent configuration
Useful? React with 👍 / 👎.
| const acpJson = url | ||
| ? JSON.stringify( |
There was a problem hiding this comment.
Require steer capability before offering ACP configuration
The Integrations UI leaves the steer checkbox off by default, producing a pairing with only read and launch, but this ACP server uses task_send for every follow-up and task_stop for cancellation, and both handlers require steer. Consequently, the default copied configuration can complete only its first prompt: later prompts fail authorization, and cancellation cannot stop the task. Only emit this configuration for steer-enabled pairings or otherwise ensure the ACP flow has the required capability.
Useful? React with 👍 / 👎.
| const handle = acp | ||
| ? runAcpAgent({ | ||
| ...callbacks, | ||
| command: spawn.binary, | ||
| args: spawn.args, |
There was a problem hiding this comment.
Keep the prompt out of remote ACP command arguments
For an SSH or WSL project, spawn.args was constructed above with the user prompt appended for the legacy generic runner, and this ACP branch now passes those same arguments to runAcpAgent before also sending the prompt through session/prompt. ACP agents expect their configured arguments merely to start the stdio server, so remote ACP commands receive an unexpected prompt argument and commonly exit before the handshake; construct the crossing spawn without the appended prompt when acp is selected. ACP transport documentation
Useful? React with 👍 / 👎.
docs.html gained the readiness-probe paragraph in #1689 without a rebuild, so site-llms.test.js failed on main and on every PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
replay.js polls replay.log while the fake CLI appends to it. An empty file or a half-written last line threw "Unexpected end of JSON input" on macOS CI instead of reading as not-done-yet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nt-client-protocol-acp-fo-34efb3 # Conflicts: # electron/runner-permissions.js
Any agent that speaks the Agent Client Protocol now plugs into Solenta without a per-vendor adapter. Pick Agent Client Protocol (ACP) as the Output of a custom CLI in Settings › Agents. In the other direction, Zed, JetBrains and other ACP editors can launch and follow Solenta tasks through a pairing token. Closes the work in #272.
Changes
kimi loginin a terminal".electron/acp-server.js, a stdio bridge that editors start.agent_serversentry.task_statusresult gains an additivereplyfield{id, text}holding the full latest reply. It's what the bridge streams from.Verification
custom-cli-provider.test.js(14 tests) uses a fake ACP agent. It covers streaming, tool steps, approve and deny on the card, Full access, Stop clearing an open card, resume (ignoring the history the agent replays while reloading), the failed-resume fallback, the handshake timeout and the sign-in hint.acp-server.test.js(6 tests) runs against a real orch server, a real store and a real pairing token, with only the agent run faked. It covers launch, streaming and follow-up, cancel, waiting for approval, a read-only pairing's error, project picking, and the script refusing to start without its env.npm run typecheckis clean.settingsModal.test.tsxpasses 97/97.test:electronrun with the inheritedCODER_*variables removed: 5010 pass, 1 fail. The failure wassite-llms.test.js, which was also red on main: Mark dev servers live only once a declared readiness probe passes #1689 changeddocs.htmlwithout regeneratingsite/llms-full.txt. This PR now includes the regenerated file (only that one paragraph), and the test passes locally.opencode acp(1.17.12) andkimi acp(0.39.1) and started a session; both say they can reload sessions.replay-scenarios.test.js: the helper parsedreplay.logwhile the fake CLI was still writing it ("Unexpected end of JSON input").electron/test/support/replay.jsnow treats an empty file or a half-written line as not done yet. Passed 5/5 on three local runs.Notes for reviewers
electron/acp.js,electron/acp-server.js, thenrunner-provider-generic.jsandrunner-permissions.js.sessionIdis now only set for ACP agents that can reload sessions. The existing code paths that clear it (provider switch, rewind, fork) already set transcript replay, which is the right fallback.task_statusonce a second, about 60 of the pairing's default 120 reads per minute. Two concurrent editor sessions can hit HTTP 429; it then waits 5s and retries.authenticate; users sign agents in from a terminal once.claude-opus-5-5 via Claude Code