feat: advertise authMethods for ACP registry compatibility#8
Conversation
The ACP registry CI rejects agents with empty authMethods. Declare a single agent-type method (ZCode reads the GLM API key from ~/.zcode/v2/config.json itself — no editor-side credentials needed), matching the glm-acp-agent precedent. Adds registry submission assets (agent.json + icon.svg) and 6 initialize-shape tests covering the registry's validation gates.
There was a problem hiding this comment.
Code Review
This pull request adds compatibility with the ACP Registry by introducing registry submission assets (agent.json and icon.svg), updating the initialize response in src/server.ts to advertise a built-in agent-type authentication method, documenting these changes in the READMEs, and adding a comprehensive test suite in tests/server.test.ts to verify the initialization response shape. The reviewer suggested updating the repository and website URLs in agent.json to point to the official repository instead of a personal fork.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Prepares
zcode-acp-serverfor submission to the ACP Registry by advertising the correctauthMethodsatinitializetime and adding the registry submission assets.Background
The ACP registry CI (
verify_agents.py --auth-check) rejects agents that returnauthMethods: []. The validation requires at least one method withtype∈ {`"agent"`, `"terminal"`} (type omitted defaults to `"agent"`). Our previous empty array would fail with `"No authMethods in response"`.Our authentication model is agent-managed: the GLM API key is read from `~/.zcode/v2/config.json` by the ZCode backend subprocess — the editor never supplies credentials. This maps to ACP's `AuthMethodAgent` (the same pattern used by `glm-acp-agent`, our closest analog).
Changes
1. `src/server.ts` — correct `authMethods`
```diff
```
Also removed the meaningless `agentCapabilities.auth: {}` (empty object).
2. `tests/server.test.ts` (new) — 6 tests covering registry gates
3. `registry/zcode-acp-server/` — submission assets
4. `README.md` / `README.zh-CN.md` — "ACP Registry" section
Documents the auth model and points at the submission assets.
Verification
Subsequent steps (not in this PR)
Design note
The `AuthMethodAgent` variant intentionally omits the `type` field — per the registry validator (`client.py:parse_auth_methods`), omitted type defaults to `"agent"`. This is the canonical shape for "agent self-handles auth" and matches every CLI-wrapping agent in the registry (`gemini`, `claude-acp`, `codex-acp`, `glm-acp-agent`, etc.).