Repository navigation
fix(runtime): adopt ZCode 3.17.1 anchors and session features - #243
Merged
Merged
Conversation
Desktop 3.17.1 ships runtime 0.17.1, which moves three anchors this project patches and adds two behaviors the CLI must follow. - shared-config: the native loader now takes a scope argument (`parseConfigFileToRuntimePatchWithDiagnostics(i, t.scope)`). Match optional trailing arguments and replace only the config value so project-scope parsing keeps working after Desktop settings merge. - tui-bridge: native prompt admission forwards an automation id ahead of the command kind in `steerTurn`. Accept it as an optional prefix. - detached-agent-lifecycle: upstream now tracks detached lifecycle promises and collects rejections itself, so the patch reports `already_present` instead of failing the sync. - sqlite recovery: compaction and multi-part messages persist through the new `commitMessageBundle` transaction. Treat it as an optional replayable write so older stores keep installing. Two tests asserted 0.17.0 behavior: session features are now written after the first persist, and project-token transport failures report `project_token_http_<status>` instead of the generic request code. Verified on runtime 0.17.1 (Desktop 3.17.1) and on the locked 0.17.0 artifact: sync, check, typecheck, unit, runtime, TUI and Node suites.
Contributor
|
pkg-pr-new preview for commit npx --yes https://pkg.pr.new/zcode-app-cli@c1871f8This preview uses the selected commit. PR updates publish automatically after CI succeeds; kingsword09 can also request a preview with |
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.
Why
Desktop 3.17.1 ships runtime 0.17.1. Running
bun run sync:localagainst it fails immediately:Three patch anchors moved and two runtime behaviors changed. Without this change the CLI cannot be built against 3.17.1 at all.
What changed
shared-config(required)parseConfigFileToRuntimePatchWithDiagnostics(i, t.scope),t.scopesurvivestui-bridge(required)automationIdbeforecommandKindinsteerTurndetached-agent-lifecycle(optional)already_presentinstead of failingcommitMessageBundletransactionTwo tests asserted 0.17.0 behavior:
test/node/session-lifecycle.test.cjs— the runtime now writes recorded session features after the first persist, so the stub needssessionFeatures/sessionFeaturesWrite.test/runtime/shared-oauth.test.ts— project-token transport failures reportproject_token_http_<status>instead of the genericproject_token_request_failed.New regression coverage in
test/sync-runtime.test.tsfor the scoped loader (including the unscoped fallback) and for native detached-lifecycle detection.Verification
Against runtime 0.17.1 (local Desktop 3.17.1):
Backward compatibility against the locked 0.17.0 artifact:
CI keeps running
release:build(sync:locked), so this PR does not move the runtime lock. The stable update manifest still reports 3.16.3 for darwin/linux/windows; once it publishes 3.17.1,bun run syncwill produce3.17.1-41and the release flow bumps the build.Not included (needs a decision)
3.17.1 adds a workspace MCP trust gate. Project-scoped servers (
zcode.json,.zcode/config.json, and now.agents/mcp.json) start asuntrustedand are never launched until a digest is recorded in~/.zcode/security/workspace-mcp-trust-v1.json. Observed on the same fixture:{"status":"failed"}— the project server process actually launches.{"status":"untrusted","workspaceTrust":{"declarationDigest":"3b40…","trusted":false}}— no process starts.Desktop grants trust through the
workspace/mcp/trustapp-server method, but the CLI TUI receives no trust hook inloadStartupOptionsand/mcponly supports list/connect/disconnect.workspace/mcp/trustdoes work over the CLI's app-server client (verified:{accepted:true}, thentrusted:true), and the store is shared with Desktop.I left this out deliberately: bypassing the gate would re-enable auto-launching MCP processes from cloned repositories. The recommended follow-up is a launcher-owned
zcode mcp list|trust|untrustcommand over the public app-server protocol, matching howzcode pluginsis built. Say which direction you want and I will implement it as a separate PR.