What happened
In framework mode src/cli/**/*.tsx compiles to the generated CLI bin (dist/bin/<name>.js, dist/bin/<name>-flight.mjs) as part of the package build. Host artifacts (artifact/plugin, artifact/portable) receive scripts/*.mjs, mcp/, hooks/, skills/, mcp-apps/ — but not the routed CLI.
For cargo-hauler that means:
- The plugin ships
scripts/hauler.mjs (a src/scripts/hauler.ts script route) which owns exec / install-shim / daemon and is meant to forward status | log | last | await | result | request to the routed CLI. Inside an installed plugin there is nothing to forward to, so node <plugin-root>/scripts/hauler.mjs status prints usage and exits 2.
- The bundled
SKILL.md files tell agents to run hauler status / hauler await <ticket>. From a plugin-only install (Claude marketplace, Codex marketplace, Cursor ~/.cursor/plugins/local) those commands do not exist unless the user separately installs the npm package.
- The MCP tools cover the same surface, so MCP-capable sessions are fine — but hooks and skills are the surfaces that reach non-MCP shells.
Reproduce: agent-bundle build on ScriptedAlchemy/cargo-hauler at fa2f923, then node artifact/plugin/scripts/hauler.mjs status.
Ask
One of:
- Emit the generated routed CLI into each host artifact as well (e.g.
artifact/<target>/bin/<name>.mjs alongside scripts/), so a script route can spawn(process.execPath, [sibling]) or the skills can reference ${CLAUDE_PLUGIN_ROOT}/bin/<name>.mjs.
- Or expose an in-process entry (
agent-bundle/cli-runtime or similar) that a script route can import to dispatch argv through the compiled route graph without a second binary.
Related: a raw/streaming output mode for CLI routes that proxy a child process (own stdio entirely, return only an exit code) would let exec itself be a .ts CLI route instead of living in a separate script — today CLI routes must return a JSON-projectable result.
Pin: agent-bundle@105c65d8f.
What happened
In framework mode
src/cli/**/*.tsxcompiles to the generated CLI bin (dist/bin/<name>.js,dist/bin/<name>-flight.mjs) as part of the package build. Host artifacts (artifact/plugin,artifact/portable) receivescripts/*.mjs,mcp/,hooks/,skills/,mcp-apps/— but not the routed CLI.For
cargo-haulerthat means:scripts/hauler.mjs(asrc/scripts/hauler.tsscript route) which ownsexec/install-shim/daemonand is meant to forwardstatus | log | last | await | result | requestto the routed CLI. Inside an installed plugin there is nothing to forward to, sonode <plugin-root>/scripts/hauler.mjs statusprints usage and exits 2.SKILL.mdfiles tell agents to runhauler status/hauler await <ticket>. From a plugin-only install (Claude marketplace, Codex marketplace, Cursor~/.cursor/plugins/local) those commands do not exist unless the user separately installs the npm package.Reproduce:
agent-bundle buildon ScriptedAlchemy/cargo-hauler atfa2f923, thennode artifact/plugin/scripts/hauler.mjs status.Ask
One of:
artifact/<target>/bin/<name>.mjsalongsidescripts/), so a script route canspawn(process.execPath, [sibling])or the skills can reference${CLAUDE_PLUGIN_ROOT}/bin/<name>.mjs.agent-bundle/cli-runtimeor similar) that a script route can import to dispatch argv through the compiled route graph without a second binary.Related: a raw/streaming output mode for CLI routes that proxy a child process (own stdio entirely, return only an exit code) would let
execitself be a.tsCLI route instead of living in a separate script — today CLI routes must return a JSON-projectable result.Pin:
agent-bundle@105c65d8f.