fix(setup): drop ZCode's enable: false from retained entries

Main's ZCode registration treats a native enable: false as stale and expects setup to repair it. Entry retention kept that switch, so setup reported unchanged while doctor still reported stale.
This commit is contained in:
xeropresence
2026-10-12 21:49:21 -04:00
parent 55246a6425
commit 303008f35d
2 changed files with 10 additions and 7 deletions
+4 -3
View File
@@ -65,9 +65,10 @@ Other fields you added to that entry, such as OMP's `timeout` or Codex's
`args`, `type` or `transport`, and the environment map) and REA's
client-specific keys. It removes remote-server keys such as `url`, `headers`,
`oauth_resource`, and `tcp` that contradict the local command, and an entry-level
`enabled: false` or (outside Grok Build) `disabled: true`, so the registration
is active. A registration field that does not parse, including a non-boolean
`enabled` or `disabled` and a malformed `startup_timeout_sec` or `tools`, is
`enabled: false`, ZCode's `enable: false`, or (outside Grok Build)
`disabled: true`, so the registration is active. A registration field that
does not parse, including a non-boolean `enabled` or `disabled` and a
malformed `startup_timeout_sec` or `tools`, is
removed too. A `tools` value is removed except on GitHub Copilot CLI, which
replaces it with `["*"]`; Codex rejects a `tools` sequence. An existing entry
without a `command` is a remote server and is replaced whole. DeepSeek Harness
@@ -1545,10 +1545,11 @@ const keepsCopilotTools = (dialect: ClientRegistrationDialect): boolean =>
/**
* Whether setup replaces or removes an existing entry key. Setup registers an
* active server, so entry-level switches that turn it off are removed too.
* A registration-status field that does not parse is removed as well, using
* the same schemas doctor uses, so setup cannot report success for a value
* doctor will reject. Grok Build's boolean entry `disabled` is kept.
* active server, so entry-level switches that turn it off are removed too,
* including ZCode's native `enable: false`. A registration-status field that
* does not parse is removed as well, using the same schemas doctor uses, so
* setup cannot report success for a value doctor will reject. Grok Build's
* boolean entry `disabled` is kept.
*/
const registrationManagedKey = (
dialect: ClientRegistrationDialect,
@@ -1560,6 +1561,7 @@ const registrationManagedKey = (
!registrationFieldAccepted(key, value) ||
(key === "tools" && !keepsCopilotTools(dialect)) ||
(key === "enabled" && value === false) ||
(key === "enable" && value === false && dialect === "zcode") ||
(key === "disabled" && value === true && !keepsGrokDisabledFlag(dialect));
/**