Skip to content

feat(providers): add local ZCode ACP backend - #10184

Merged
diegosouzapw merged 5 commits into
diegosouzapw:release/v3.8.50from
megamen32:feat/zcode-acp
Aug 16, 2026
Merged

diegosouzapw merged 5 commits into
diegosouzapw:release/v3.8.50from
megamen32:feat/zcode-acp

Conversation

@megamen32

Copy link
Copy Markdown
Contributor

Summary

  • add a local zcode provider that invokes the authenticated ZCode app-server over its native framed stdio protocol
  • expose ZCode in the provider, CLI and ACP-discovery catalogs without storing Z.ai credentials
  • return OpenAI chat-completion and buffered SSE responses

Validation

  • node --import tsx/esm --test tests/unit/zcode-executor.test.ts tests/unit/zcode-protocol.test.ts tests/unit/zcode-provider.test.ts (5 passing; isolated DATA_DIR)
  • focused ESLint for ZCode, provider, ACP and CLI-catalog files
  • live canary on the maintained deployment: zcode/glm-5.2 -> provider zcode, HTTP 200

Scope

  • 14 files; no unrelated upstream repair commits
  • ZCode app-server uses its native framed stdio protocol, so it is catalogued as a local CLI/provider but is not marked ACP-spawnable.

Upstream note

The base currently imports a missing open-sse/config/providers/registry/github/models/index.ts; that independent base defect prevents loading the full global registry in this checkout and is deliberately not included in this feature PR.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks for this — nice, self-contained addition. I reviewed the diff and validated it independently:

  • Ran your three new test files myself in a clean checkout: all 5 pass.
  • Ran a focused ESLint pass on every touched file: clean, no warnings.
  • Ran tsc --noEmit scoped to the touched files: clean.
  • Checked the failing dast-smoke CI job — confirmed it's the pre-existing base defect you flagged in the PR description (missing github/models/index.ts), unrelated to any file in this PR.
  • Traced the src/lib/acp/registry.ts addition all the way through: since AcpManager.spawn()'s hardcoded allowlist doesn't include zcode and nothing under src/app actually calls it, registering zcode there is safe — it only feeds the installed/version-probe UI, never a real ACP spawn attempt against a non-ACP process. Good call marking acpSpawnable: false in cliTools.ts to keep that boundary explicit.

The provider/executor/no-auth registration mirrors the existing auggie pattern closely, error handling goes through buildErrorBody/sanitizeErrorMessage as required, and the child-process spawning avoids shell interpolation entirely (array args, shell: false) — solid security posture for a local-CLI passthrough.

One thing worth being aware of going forward (not blocking): stream: true currently buffers the whole ZCode turn before emitting a single SSE chunk, so a client with an aggressive idle-timeout could disconnect before a long turn (up to your 120s default) finishes. You already disclose this in the CLI tool notice, which is the right call for v1 — just flagging it in case a follow-up wants true incremental streaming later.

No mandatory changes from my side. Looks merge-ready.

adevwithpurpose and others added 4 commits August 15, 2026 20:28
The new local ZCode ACP backend (zcode://app-server/stdio) was added to the
provider catalog but the translate-path golden snapshot was not regenerated,
so the combined suite (provider-translate-path-golden.test.ts) failed on the
merged tip. Regenerate the snapshot to include the zcode translate-path entry.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Registers the 11 ZCODE_* env vars read by the zcode executor (.env.example
+ docs/reference/ENVIRONMENT.md) so the env-doc-sync gate stays green.

Co-authored-by: Diego Souza <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw#10184's local zcode backend advertises the full GLM_SHARED_MODELS
line-up (registry/zcode, authType none) — same documented case as auggie
and devin-cli-agentic. Update auto/glm provider-set assertion to include
it.

Co-authored-by: Diego Souza <8016841+diegosouzapw@users.noreply.github.com>
@diegosouzapw
diegosouzapw marked this pull request as ready for review August 16, 2026 03:13
@diegosouzapw
diegosouzapw self-requested a review as a code owner August 16, 2026 03:13
@diegosouzapw
diegosouzapw merged commit 595d04d into diegosouzapw:release/v3.8.50 Aug 16, 2026
13 checks passed
@diegosouzapw

Copy link
Copy Markdown
Owner

Validated in local merge-train .claude/worktrees/merge-train-20260816-000002-suite.log on devbox-vm-06-dev002 @ 8be62df65f61cc4cf29cdc3e6bc38173ffafa4e3 (FAST gates green: static + changed tests + vitest; daily full-suite run still required). Merged under the batch merge-train protocol (merge-gates §7). ⚠️ base-red inherited: #10523 (ServiceSupervisor order-dependent test, not touched by this batch).

thinh0704hcm added a commit to thinh0704hcm/OmniRoute that referenced this pull request Aug 16, 2026
…8.50

Sync the fork deployment branch to upstream tip (108 commits), including
the local ZCode ACP backend (diegosouzapw#10184). Conflicts resolved: providers.ts
(getProviderConnectionFamilyIds), visionBridge getComboVisionBridgeDecision
(fork's {decision,hasConfirmedVision} shape + upstream's no-vision state),
radar routes (upstream Cache-Control/validateRadarSyncBody/featureAvailable),
docs counts (148 migrations, 109 MCP tools/33 scopes). Fork-local quota
fetcher work preserved.
thinh0704hcm added a commit to thinh0704hcm/OmniRoute that referenced this pull request Aug 17, 2026
…(341)

Run `npm run gen:provider-reference` to pick up the local ZCode ACP backend
provider added by upstream PR diegosouzapw#10184 (local noauth provider). Regeneration
reconciles the canonical provider count (340 cloud providers) with the
provider-modules total (341), resolving all 6 STRICT docs-counts drifts
inherited from the v3.8.50 merge:

- docs/reference/PROVIDER_REFERENCE.md — stale provider total 340 → 341
- docs/diagrams/{readme-hero,promise-pillars,comparison-table,cli-terminal}.svg — " 340 providers " → 341
- README.md — CLI tools 33 → matches live count
- AGENTS.md / MCP-SERVER.md — MCP tools/scopes refresh

Co-authored-by: roomhacker < roomhacker@bezrabotnyi.com >
Co-authored-by: adevwithpurpose < adevwithpurpose@users.noreply.github.com >
Co-authored-by: diegosouzapw < 8016841+diegosouzapw@users.noreply.github.com >
Inspired-by: diegosouzapw#10184
thinh0704hcm added a commit to thinh0704hcm/OmniRoute that referenced this pull request Aug 17, 2026
Regenerate PROVIDER_REFERENCE (npm run gen:provider-reference) to pick up
the local ZCode ACP backend provider (PR diegosouzapw#10184). Update README.md,
AGENTS.md, llm.txt (root + 42 i18n mirrors), 4 hero/pillar SVGs and
package.json description to reflect the canonical 341 provider count
and the live 34 CLI tools count. This resolves all STRICT docs-counts
drifts inherited from the v3.8.50 upstream sync (Wave 0 of the 18-PR
port batch).

Inspired-by: diegosouzapw#10184
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
* feat(providers): add local ZCode ACP backend

* test(snapshots): regenerate translate-path golden for zcode provider

The new local ZCode ACP backend (zcode://app-server/stdio) was added to the
provider catalog but the translate-path golden snapshot was not regenerated,
so the combined suite (provider-translate-path-golden.test.ts) failed on the
merged tip. Regenerate the snapshot to include the zcode translate-path entry.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

* docs(env): document ZCODE_* vars for the local zcode provider

Registers the 11 ZCODE_* env vars read by the zcode executor (.env.example
+ docs/reference/ENVIRONMENT.md) so the env-doc-sync gate stays green.

Co-authored-by: Diego Souza <8016841+diegosouzapw@users.noreply.github.com>

* test(autoCombo): include zcode in the glm-family provider set

diegosouzapw#10184's local zcode backend advertises the full GLM_SHARED_MODELS
line-up (registry/zcode, authType none) — same documented case as auggie
and devin-cli-agentic. Update auto/glm provider-set assertion to include
it.

Co-authored-by: Diego Souza <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: roomhacker <roomhacker@bezrabotnyi.com>
Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
* feat(providers): add local ZCode ACP backend

* test(snapshots): regenerate translate-path golden for zcode provider

The new local ZCode ACP backend (zcode://app-server/stdio) was added to the
provider catalog but the translate-path golden snapshot was not regenerated,
so the combined suite (provider-translate-path-golden.test.ts) failed on the
merged tip. Regenerate the snapshot to include the zcode translate-path entry.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>

* docs(env): document ZCODE_* vars for the local zcode provider

Registers the 11 ZCODE_* env vars read by the zcode executor (.env.example
+ docs/reference/ENVIRONMENT.md) so the env-doc-sync gate stays green.

Co-authored-by: Diego Souza <8016841+diegosouzapw@users.noreply.github.com>

* test(autoCombo): include zcode in the glm-family provider set

diegosouzapw#10184's local zcode backend advertises the full GLM_SHARED_MODELS
line-up (registry/zcode, authType none) — same documented case as auggie
and devin-cli-agentic. Update auto/glm provider-set assertion to include
it.

Co-authored-by: Diego Souza <8016841+diegosouzapw@users.noreply.github.com>

---------

Co-authored-by: roomhacker <roomhacker@bezrabotnyi.com>
Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants