Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/agents/zcode.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ZCode

Codeg connects to [official ZCode](https://github.com/zai-org/ZCode) through the community [zcode-acp-server](https://github.com/william0wang/zcode-acp) bridge. The bundled registry pins the bridge to `0.72.0`.
Codeg connects to [official ZCode](https://github.com/zai-org/ZCode) through the community [zcode-acp-server](https://github.com/william0wang/zcode-acp) bridge. The bundled registry pins the bridge to `0.75.0`.

Bridge 0.75.0 has been exercised with official ZCode on Windows for mode changes, permissions, cancellation, stdio MCP and session restoration after a Codeg server restart. macOS and Linux still need equivalent runtime validation.

## Setup

Expand All @@ -21,7 +23,7 @@ ZCode Start Plan accounts cannot run through the bridge. Their model requests ne

A new session explicitly confirms Build mode before sending its first prompt. A valid saved mode, including Yolo, takes precedence. Confirming the mode makes the bridge create the ZCode backend session when the conversation connects rather than at its first prompt. Existing sessions use the normal restore and preference flow. Model and thought selectors follow ACP configuration updates rather than a hardcoded model list.

The bridge writes a disabled sandbox template to `.zcode/acp/sandbox.json` in each workspace it runs in.
The bridge leaves an unarmed workspace's sandbox configuration untouched. To use its optional sandbox, configure it in the bridge; installing or connecting through Codeg does not enable it.

Codeg records its own ACP transcripts for ZCode, including messages, thoughts, tools and usage. These transcripts support history and reconnecting to sessions created in Codeg. Existing custom ZCode entries keep their registration, launch configuration and history; the built-in option records its history separately. This integration does not scan ZCode's native SQLite sessions.

Expand Down
7 changes: 5 additions & 2 deletions src-tauri/src/acp/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4748,9 +4748,12 @@ pub fn get_agent_meta(agent_type: AgentType) -> AcpAgentMeta {
// notification that ends a turn, which codeg does not read. The
// rest (quota cards, CLIProxy, sandbox pacing when a workspace arms
// the sandbox) is opt-in and outside what codeg drives.
// 0.75.0 preserves the stdio launch, mode and MCP contract. It also
// stops creating a sandbox template in an unarmed workspace (since
// 0.73.0), and improves headless resume and replayed card identity.
distribution: AgentDistribution::Npx {
version: "0.72.0",
package: "zcode-acp-server@0.72.0",
version: "0.75.0",
package: "zcode-acp-server@0.75.0",
cmd: "zcode-acp-server",
args: &["server"],
env: &[],
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/db/service/custom_agent_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ mod zcode_legacy_registration_tests {
);
match builtin.distribution {
AgentDistribution::Npx { package, cmd, .. } => {
assert_eq!(package, "zcode-acp-server@0.72.0");
assert_eq!(package, "zcode-acp-server@0.75.0");
assert_eq!(cmd, "zcode-acp-server");
}
_ => panic!("builtin launch distribution changed"),
Expand Down
Loading