Summary
Close the remaining gap between production rendered CLI routes and the public Agent Bundle test harness. A consumer should be able to exercise a routed JSX/TSX CLI command through the same render-session and output-mode behavior used by the generated executable.
Verified gap
Production rendered CLI commands now use the generated render-session path, but packages/agent-bundle/src/test/cli.ts still documents and implements a plain-command-only bridge. Its invokeCli path calls the route export directly and validates the returned value; it does not drive the rendered command's Flight/Agent Document projection.
The original parent, #103, is closed. Its stated scope included real CLI/script projection helpers, but the rendered CLI proof currently lives in package-specific route-unit/build tests rather than the public agent-bundle/test harness.
Relationship to existing work
This issue is the focused consumer-harness follow-up.
Acceptance criteria
invokeCli, or a clearly named sibling API, detects rendered commands and drives the same render-session path as the generated CLI entry.
- The harness can assert Markdown/TTY, JSON, and NDJSON behavior for a JSX/TSX CLI route.
- Cancellation, render errors, result-schema errors, and protocol-purity behavior match production.
- A projection test exercises a rendered CLI command end to end at the public CLI-dispatch proof level.
- Stale comments claiming rendered commands cannot reach the harness are removed.
- The scaffolder documentation explains which proof level to use for plain versus rendered commands.
Summary
Close the remaining gap between production rendered CLI routes and the public Agent Bundle test harness. A consumer should be able to exercise a routed JSX/TSX CLI command through the same render-session and output-mode behavior used by the generated executable.
Verified gap
Production rendered CLI commands now use the generated render-session path, but
packages/agent-bundle/src/test/cli.tsstill documents and implements a plain-command-only bridge. ItsinvokeClipath calls the route export directly and validates the returned value; it does not drive the rendered command's Flight/Agent Document projection.The original parent, #103, is closed. Its stated scope included real CLI/script projection helpers, but the rendered CLI proof currently lives in package-specific route-unit/build tests rather than the public
agent-bundle/testharness.Relationship to existing work
This issue is the focused consumer-harness follow-up.
Acceptance criteria
invokeCli, or a clearly named sibling API, detects rendered commands and drives the same render-session path as the generated CLI entry.