You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #102 stage 4 (first of two PRs): the consumer-side acceptance pass over the routed CLI surface, at the cli-dispatch proof level the #266 harness landed. The companion framework PR (MCP-tool command projection) follows separately.
What this proves on the real example
examples/audiobook-curator/tests/route-unit/cli-dispatch.test.ts (+270 lines, 13 tests) drives the example's own compiled command graph through public agent-bundle/test (invokeCli, cliJson, cliNdjson) — no product code changes:
Plain commands: inspect canonical one-line JSON with direct-operation byte parity (stdout === JSON.stringify(direct) + '\n'); inventory --strict receipt exitCode authoritative for the process exit code in both the 0 and 1 cases (the failing case removes ffprobe from PATH, hermetically); report-file side effect equals the stdout receipt.
Usage failures: unknown command / unknown option / missing required option → exit 2 + the --help hint; the route's real zod bounds (--max-files 0) → exit 2.
Help agreement: command help carries the real kebab option spellings (--max-files <number>); root help lists every routed command.
Rendered library-audit, all four output modes (Generate CLI, MCPorter, and script projections from the compiled route graph #102 output contract): piped → exactly one final Markdown document, no progress frames on stdout; explicit TTY → \r\x1b[2K progress-in-place frames before the final Markdown; --json → canonical schema-validated receipt; --ndjson → monotonic sequence-numbered events, exactly one terminal complete, and no jsonrpc key anywhere (CLI dialect purity); --json --ndjson → exit 2.
"TTY, Markdown, JSON, and NDJSON output have direct Rstest … coverage" — the real-example Rstest half (the packed half stays with cli-routes-build.test.ts).
"A custom command can use the Agent renderer without becoming an MCP tool" — library-audit proven across modes at the dispatch level.
"A plain script remains a normal executable with no renderer assumptions" — plain commands proven to emit canonical JSON with byte parity and receipt-driven exit codes.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
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
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.
Part of #102 stage 4 (first of two PRs): the consumer-side acceptance pass over the routed CLI surface, at the
cli-dispatchproof level the #266 harness landed. The companion framework PR (MCP-tool command projection) follows separately.What this proves on the real example
examples/audiobook-curator/tests/route-unit/cli-dispatch.test.ts(+270 lines, 13 tests) drives the example's own compiled command graph through publicagent-bundle/test(invokeCli,cliJson,cliNdjson) — no product code changes:inspectcanonical one-line JSON with direct-operation byte parity (stdout === JSON.stringify(direct) + '\n');inventory --strictreceiptexitCodeauthoritative for the process exit code in both the 0 and 1 cases (the failing case removesffprobefromPATH, hermetically); report-file side effect equals the stdout receipt.--helphint; the route's real zod bounds (--max-files 0) → exit 2.--max-files <number>); root help lists every routed command.library-audit, all four output modes (Generate CLI, MCPorter, and script projections from the compiled route graph #102 output contract): piped → exactly one final Markdown document, no progress frames on stdout; explicit TTY →\r\x1b[2Kprogress-in-place frames before the final Markdown;--json→ canonical schema-validated receipt;--ndjson→ monotonic sequence-numbered events, exactly one terminalcomplete, and nojsonrpckey anywhere (CLI dialect purity);--json --ndjson→ exit 2.Acceptance lines covered (issue #102)
cli-routes-build.test.ts).library-auditproven across modes at the dispatch level.Local gates (this branch)
pnpm --filter @agent-bundle-example/audiobook-curator check— validate, build (53 files), typecheck, tests 33→49 passed / 0 failed (route suite 3→16)pnpm lint— 0 errors, 0 warnings (926 files)Tests only; no changeset (example package is unpublished).