Repository navigation
feat(runtimes): add ZCode as a first-class dispatchable runtime - #990
Open
star-nebula wants to merge 4 commits into
Open
star-nebula wants to merge 4 commits into
star-nebula wants to merge 4 commits into
Conversation
ZCode was invisible to Mission Control even though it is the operator's day-to-day GLM agent: the outbound runtime layer enumerates runtimes through Record<RuntimeId, ...> maps, so adding an id forces every capability surface (detection, auth, dispatch, resume, transcripts, onboarding, install) to actually exist rather than half-exist. Sessions are captured rather than pre-claimed because ZCode mints its own sess_<uuid> ids, so the first successful dispatch owns the thread and a divergent later id cannot hijack it. The capability manifest reports tool_policy, budget_cap, pty and skills_inventory as false: ZCode 0.16.9 ships a denylist, no budget flag and no attachable PTY, and a claimed-true capability would let the scheduler decide on behavior that is not there.
An untyped vi.fn inferred a zero-length parameter tuple, so the assertions on the env we hand the CLI read as possibly-undefined and tsc refused the file. The check itself is what caught it: an incremental typecheck reuses the committed tsbuildinfo and skips the file.
…te DB The first scanner treated ~/.zcode/cli/rollout/model-io-sess_*.jsonl as the session inventory, but those files are raw model request/response captures for only some sessions, and the filename regex never matched the real `model-io-` prefix. The local session list therefore reported zero ZCode sessions on a machine with ~100 of them. ZCode's own SQLite DB (~/.zcode/cli/db/db.sqlite) is the authoritative inventory and transcript source, which is also what the hermes and opencode scanners already do. Scan it read-only with schema-drift guards, keep the rollout capture as a transcript fallback, and expose workingDir so the UI can show it. Tests now build the real five-table schema instead of guessed rollout files.
…itles
The chat continue path sent runCommand a launch whose bin is the node binary
itself; the .mjs heuristic matched on "command === process.execPath" instead of
the command's extension, so node was handed its own executable as the entry
script and died parsing the PE header ("MZ"). Match on the extension.
Local ZCode sessions also showed bare ids because the scanner never read the
session table's title column; select it (blank becomes null) and map it into
the sessions payload like the other local runtimes.
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.
Summary
Adds ZCode as a sixth first-class runtime, with session inventory, transcripts, and task dispatch at parity with the existing runtimes.
src/lib/agent-runtimes.ts, so ZCode shows up in dispatch, the sessions list, terminal view, and settings like the built-in runtimes.~/.zcode/cli/db/db.sqlite) strictly read-only, excluding child/side-agent rows and archived sessions, mirroring the other runtime scanners. Title, working dir, latest model, message counts, and token usage are surfaced per session.--json --resume <sessionId> -p ...).runCommandfound by dispatching a real message through the UI: it prependednodeto any command that happens to be a node binary (matched onspawnCommand === process.execPath), so the ZCode bundle launch died parsing its own PE header (MZ ... SyntaxError). Node is now prepended only when the command is a.mjsentry script.Testing
db.sqlite(pragma-derived columns, not guessed).zcode.cjs --json --resume ....Notes