Repository navigation
Add OpenCode and MiMo Code backends over ACP (#408) - #432
Merged
Merged
Conversation
Two new thread backends drive the OpenCode CLI and Xiaomi's MiMo Code fork through their Agent Client Protocol server (`opencode acp --pure`, `mimo acp --pure`), the way Codex runs through `codex app-server`: one shared server per backend, a session per thread as the resume handle, `session/request_permission` answered through Modex's approval cards, rules and policies, and Stop as `session/cancel`. Modex's modes are agents injected inline through the CLI's config variable: Chat denies edits, Agent allows them, Full access asks nothing, Plan pins the built-in plan agent. A refused mode fails the turn. Settings gets cards, verified executable overrides and default models for both; health reads `auth list`'s credential count and the model list is `<cli> models`. Not wired: confined Code Review turns (refused), Modex's knowledge, Space and image tools, question cards, efforts in the model list. Accepted live on OpenCode 1.19.5 and MiMo Code 0.1.16 (docs/opencode.md, docs/reviews/2026-10-28-opencode-*.json, -mimo-acp.json). AGENTS.md's CLI-only rule now names all four CLIs. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A stubbed or older backends:health result has no opencode/mimo entries; the executable-path rows now read them optionally instead of throwing and taking the Coding CLIs section down. The stale-account e2e counts all four cards. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Code coverage overviewLanguages: TypeScript TypeScript / code-coverage-agent
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. |
This was referenced Oct 28, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #408.
What
Two new thread backends, OpenCode and MiMo Code (Xiaomi's OpenCode fork, binary
mimo), driven through their Agent Client Protocol server (opencode acp --pure,mimo acp --pure) the way Codex runs throughcodex app-server. One class,apps/desktop/src/main/engine/backends/acp.ts, serves both.session/resume, elsesession/loadwith the replayed history discarded; an unknown session starts afresh with a notice).session/request_permissionis answered through Modex's approval cards, rules and thread policies. A command is theshelltool with a$ commandtitle; an edit carries its path and never its content. The answer is the request's own option (allow_once/allow_always/ reject).session/cancel; the prompt answerscancelledand the turn is interrupted. Only a second Stop kills the shared server.OPENCODE_CONFIG_CONTENT/MIMOCODE_CONFIG_CONTENT(merged over the person's own config; nothing written to disk; self-update and transcript sharing off): Chat denies edits, Agent allows them, Full access asks nothing, Plan pins the built-in plan agent. A refusedset_modefails the turn, so no turn runs looser than asked.--version, default model selects, routing toggles; health isauth list's credential count; the model list is<cli> models.Not wired (documented in
docs/opencode.md)Confined Code Review turns are refused (they stay on Claude); Modex's knowledge, Space and image tools are not attached (their instructions go in as text with a notice); no question cards; no efforts in the model list; no cache measurements (Auto assumes an effort or fast change clears it).
For Val
AGENTS.md's CLI-only sentence now names all four CLIs: "Real models run only through theclaude,codex,opencodeandmimoCLIs (the last two over theiracpserver)". The CLIs reach their configured providers and OpenCode's free-model gateway as they do from a terminal; Modex adds no network call of its own and never sees a credential (sign-in staysopencode auth login/mimo auth loginin a terminal).Evidence
docs/reviews/2026-10-28-opencode-acp.json: raw ACP probes on OpenCode 1.19.5 (capabilities, text turn, cancel in 16 ms, resume, plan-mode write refused, build-mode edit asks, Modex'smodex-chatwrite refused / shell asks and is denied,modex-agentwrite runs,modex-fullshell runs).docs/reviews/2026-10-28-mimo-acp.json: MiMo Code 0.1.16 handshake, session, Modex agents listed as modes,set_mode; with no credentials a prompt ends with no text and no tokens.docs/reviews/2026-10-28-opencode-backend-live.json: the compiled backend driving the real OpenCode on its free model: health, 9 models, text turn, Chat-mode shell denied through the approval path (nothing written), Agent-mode write without a prompt, Stop confirmed 17 ms after cancel.apps/desktop/test/acp-backend.test.ts: 13 unit tests on a scripted ACP server (config injection, mode/model/effort setup, streaming, permission mapping for all three answers, edit approvals without content, cancel, resume once per server and the unknown-session fallback, load replay discarded, refused mode fails, confinement refused, server exit, unoffered client requests declined, health and model probes, tool-call mapping).pnpm build && pnpm testgreen locally (2041 desktop tests). Playwright e2e: 464 passed, 7 skipped on the first commit, with 6 failures that the second commit fixes (the Settings executable rows threw on a health map without the new ids; the stale-account spec now counts four cards).backend-health.spec.tsandcode-review-agent.spec.tspass after the fix; the full run is on CI.🤖 Generated with Claude Code