cargo-hauler 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +16 -11
  3. package/dist/.claude-plugin/marketplace.json +1 -1
  4. package/dist/.claude-plugin/plugin.json +1 -1
  5. package/dist/.codex-plugin/plugin.json +1 -1
  6. package/dist/.cursor-plugin/plugin.json +1 -1
  7. package/dist/INSTALL.md +1 -1
  8. package/dist/README.md +16 -11
  9. package/dist/agent-bundle.compile-evidence.json +1 -1
  10. package/dist/agent-bundle.manifest.json +1 -1
  11. package/dist/agent-bundle.package-compile-evidence.json +1 -1
  12. package/dist/bin/cargo-hauler-flight.mjs +71 -36
  13. package/dist/bin/cargo-hauler.mjs +82 -47
  14. package/dist/bin/hauler.js +107 -76
  15. package/dist/hooks/event-route-session-start.claude.mjs +2 -2
  16. package/dist/hooks/event-route-session-start.codex.mjs +2 -2
  17. package/dist/hooks/event-route-session-start.cursor.mjs +2 -2
  18. package/dist/hooks/event-route-stop.claude.mjs +2 -2
  19. package/dist/hooks/event-route-stop.codex.mjs +2 -2
  20. package/dist/hooks/event-route-stop.cursor.mjs +2 -2
  21. package/dist/hooks/event-route-tool-after.claude.execute.mjs +2 -2
  22. package/dist/hooks/event-route-tool-after.claude.mjs +6 -6
  23. package/dist/hooks/event-route-tool-after.codex.execute.mjs +2 -2
  24. package/dist/hooks/event-route-tool-after.codex.mjs +6 -6
  25. package/dist/hooks/event-route-tool-after.cursor.execute.mjs +2 -2
  26. package/dist/hooks/event-route-tool-after.cursor.mjs +6 -6
  27. package/dist/hooks/event-route-tool-before.claude.execute.mjs +2 -2
  28. package/dist/hooks/event-route-tool-before.codex.execute.mjs +2 -2
  29. package/dist/hooks/event-route-tool-before.cursor.execute.mjs +2 -2
  30. package/dist/hooks/hooks-flight.mjs +61 -31
  31. package/dist/install.mjs +1 -1
  32. package/dist/mcp/mcp-hauler-2b8242f9-flight.mjs +76 -41
  33. package/dist/mcp/mcp-hauler-2b8242f9.mjs +74 -39
  34. package/dist/mcp-apps/dashboard.html +2 -2
  35. package/dist/package.json +1 -1
  36. package/dist/plugin.json +1 -1
  37. package/dist/scripts/hauler.mjs +107 -76
  38. package/dist/skills/cargo-hauler/SKILL.md +4 -1
  39. package/dist/skills/hauler-dashboard/SKILL.md +1 -1
  40. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 711f6ea: Identity, coverage, and batch/fold now refuse to share when the forwarded caller environment differs, so two `cargo test`/`check` runs that differ only in `OUT` (or any other variable cargo will see) no longer coalesce onto one result (#222). Duration estimates still key on the compile surface — including when the variable arrives via `env OUT=…` — so one-off output paths do not cold-start EWMA. The PATH shim stays in the foreground for non-TTY callers instead of returning exit 75 and running later against torn-down state; `CARGO_HAULER_SHIM_BACKGROUND=1` restores auto-background for scripts that consume tickets (#223).
8
+
3
9
  ## 0.8.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -378,16 +378,20 @@ too, along with any log whose row is gone. `hauler exec --bg -- cargo …` and
378
378
  `hauler_request` return the ticket immediately. A synchronous request also switches to background mode when a
379
379
  *measured* estimate — EWMA history or kache priors, never the cold-start
380
380
  default — exceeds the host's shell-tool cap (nine minutes for Claude, ten for
381
- Codex, fourteen for Cursor; the PATH shim uses `CARGO_HAULER_HOST` when it is
382
- exported, otherwise the Claude cap). The estimate that is compared is the
383
- whole wait: the work queued ahead in the lane plus the job's own runtime,
384
- which the queued line reports as `wait ~Ns, run ~Ns`. That conversion exits
385
- `75` (`EX_TEMPFAIL`) with the ticket on stderr, so `cargo build && …` chains
386
- and scripts cannot mistake "submitted" for "built"; explicit `--bg` keeps exit
387
- `0`. When the caller's stdout is not a terminal (`cargo test > out.log`), the
388
- notice adds that the redirect receives no output and to read it with
389
- `hauler result cc-N --full`. Failed runs feed the estimate history too, so a broken build is not
390
- re-estimated cold on every retry.
381
+ Codex, fourteen for Cursor). The PATH shim (`--host shim`) is cargo to its
382
+ caller: a non-TTY invocation (a script, `spawnSync`, `make`) waits for the
383
+ ticket to finish and returns cargo's exit code. An interactive shim (stdout
384
+ is a TTY) still auto-backgrounds on the cap, using `CARGO_HAULER_HOST` when
385
+ it is exported, otherwise the Claude cap; `CARGO_HAULER_SHIM_BACKGROUND=1`
386
+ restores that for scripts that consume tickets themselves. The estimate that
387
+ is compared is the whole wait: the work queued ahead in the lane plus the
388
+ job's own runtime, which the queued line reports as `wait ~Ns, run ~Ns`. That
389
+ conversion exits `75` (`EX_TEMPFAIL`) with the ticket on stderr, so
390
+ `cargo build && …` chains and scripts cannot mistake "submitted" for "built";
391
+ explicit `--bg` keeps exit `0`. When the caller's stdout is not a terminal
392
+ (`cargo test > out.log`), the notice adds that the redirect receives no
393
+ output and to read it with `hauler result cc-N --full`. Failed runs feed the
394
+ estimate history too, so a broken build is not re-estimated cold on every retry.
391
395
 
392
396
  A foreground `hauler exec` that receives SIGINT or SIGTERM (Ctrl-C, or a
393
397
  `timeout N …` wrapper) asks the daemon to kill its ticket, waits for the
@@ -674,7 +678,8 @@ Per-host notes and hook timeouts are in [docs/install.md](docs/install.md).
674
678
  | `CARGO_HAULER_LEDGER_MAX_ROWS` | `50000` | Total ledger rows beyond which the oldest finished rows are deleted when the daemon starts; `0` disables the row cap. Pruned rows take their `tickets/<ticket>.log` files with them. |
675
679
  | `CARGO_HAULER_TICKET_LOG_MAX_BYTES` | `67108864` (64 MiB) | Bytes of a leader run's combined output written to `<state dir>/tickets/<ticket>.log` before the log stops with one truncation line; `0` writes no ticket logs (`hauler result` then has only the tail). |
676
680
  | `CARGO_HAULER_LOG_LEVEL` | `Info` | Daemon log level. |
677
- | `CARGO_HAULER_HOST`, `CARGO_HAULER_SESSION` | Unset | Default `--host` and `--session` attribution for `hauler exec`; the PATH shim also borrows `CARGO_HAULER_HOST`'s shell cap for auto-background. |
681
+ | `CARGO_HAULER_HOST`, `CARGO_HAULER_SESSION` | Unset | Default `--host` and `--session` attribution for `hauler exec`; the PATH shim also borrows `CARGO_HAULER_HOST`'s shell cap when auto-background is allowed. |
682
+ | `CARGO_HAULER_SHIM_BACKGROUND` | Unset | `1` / `true` / `on` / `yes` lets a non-TTY PATH shim auto-background over the host cap (exit 75). Without it, a shim that is not a TTY waits for cargo's exit. |
678
683
 
679
684
  A numeric value that does not parse or falls outside its range is reported
680
685
  as a warning (daemon log, or stderr for hand-run commands) and the default
@@ -1 +1 @@
1
- {"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","name":"cargo-hauler-marketplace","owner":{"name":"cargo-hauler"},"plugins":[{"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","keywords":["cargo","rust","agent","mcp","claude-code","codex","cursor","build-orchestration"],"license":"MIT","name":"cargo-hauler","repository":"https://github.com/ScriptedAlchemy/cargo-hauler","source":"./","version":"0.8.2"}]}
1
+ {"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","name":"cargo-hauler-marketplace","owner":{"name":"cargo-hauler"},"plugins":[{"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","keywords":["cargo","rust","agent","mcp","claude-code","codex","cursor","build-orchestration"],"license":"MIT","name":"cargo-hauler","repository":"https://github.com/ScriptedAlchemy/cargo-hauler","source":"./","version":"0.8.3"}]}
@@ -1 +1 @@
1
- {"author":{"name":"cargo-hauler"},"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","name":"cargo-hauler","version":"0.8.2"}
1
+ {"author":{"name":"cargo-hauler"},"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","name":"cargo-hauler","version":"0.8.3"}
@@ -1 +1 @@
1
- {"author":{"name":"cargo-hauler"},"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","hooks":"./.codex-plugin/hooks.json","interface":{"capabilities":["mcp","hooks","skills"],"category":"Productivity","defaultPrompt":["Help me use cargo-hauler."],"developerName":"cargo-hauler","displayName":"cargo-hauler","longDescription":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","shortDescription":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks."},"keywords":["cargo","rust","agent","mcp","claude-code","codex","cursor","build-orchestration"],"license":"MIT","mcpServers":"./.codex-plugin/mcp.json","name":"cargo-hauler","repository":"https://github.com/ScriptedAlchemy/cargo-hauler","skills":"./skills/","version":"0.8.2"}
1
+ {"author":{"name":"cargo-hauler"},"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","hooks":"./.codex-plugin/hooks.json","interface":{"capabilities":["mcp","hooks","skills"],"category":"Productivity","defaultPrompt":["Help me use cargo-hauler."],"developerName":"cargo-hauler","displayName":"cargo-hauler","longDescription":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","shortDescription":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks."},"keywords":["cargo","rust","agent","mcp","claude-code","codex","cursor","build-orchestration"],"license":"MIT","mcpServers":"./.codex-plugin/mcp.json","name":"cargo-hauler","repository":"https://github.com/ScriptedAlchemy/cargo-hauler","skills":"./skills/","version":"0.8.3"}
@@ -1 +1 @@
1
- {"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","displayName":"cargo-hauler","hooks":"./.cursor-plugin/hooks.json","keywords":["cargo","rust","agent","mcp","claude-code","codex","cursor","build-orchestration"],"license":"MIT","mcpServers":"./.cursor-plugin/mcp.json","name":"cargo-hauler","repository":"https://github.com/ScriptedAlchemy/cargo-hauler","skills":"./skills/","version":"0.8.2"}
1
+ {"description":"Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.","displayName":"cargo-hauler","hooks":"./.cursor-plugin/hooks.json","keywords":["cargo","rust","agent","mcp","claude-code","codex","cursor","build-orchestration"],"license":"MIT","mcpServers":"./.cursor-plugin/mcp.json","name":"cargo-hauler","repository":"https://github.com/ScriptedAlchemy/cargo-hauler","skills":"./skills/","version":"0.8.3"}
package/dist/INSTALL.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Coalesce, schedule, and stream cargo so concurrent agent sessions share compiles instead of fighting locks.
4
4
 
5
- Version: `0.8.2`
5
+ Version: `0.8.3`
6
6
 
7
7
  Run these commands from this bundle directory. The bundle is self-contained: every command below is
8
8
  a host command or the bundled installer, and nothing requires the `agent-bundle` CLI. Where that CLI is
package/dist/README.md CHANGED
@@ -378,16 +378,20 @@ too, along with any log whose row is gone. `hauler exec --bg -- cargo …` and
378
378
  `hauler_request` return the ticket immediately. A synchronous request also switches to background mode when a
379
379
  *measured* estimate — EWMA history or kache priors, never the cold-start
380
380
  default — exceeds the host's shell-tool cap (nine minutes for Claude, ten for
381
- Codex, fourteen for Cursor; the PATH shim uses `CARGO_HAULER_HOST` when it is
382
- exported, otherwise the Claude cap). The estimate that is compared is the
383
- whole wait: the work queued ahead in the lane plus the job's own runtime,
384
- which the queued line reports as `wait ~Ns, run ~Ns`. That conversion exits
385
- `75` (`EX_TEMPFAIL`) with the ticket on stderr, so `cargo build && …` chains
386
- and scripts cannot mistake "submitted" for "built"; explicit `--bg` keeps exit
387
- `0`. When the caller's stdout is not a terminal (`cargo test > out.log`), the
388
- notice adds that the redirect receives no output and to read it with
389
- `hauler result cc-N --full`. Failed runs feed the estimate history too, so a broken build is not
390
- re-estimated cold on every retry.
381
+ Codex, fourteen for Cursor). The PATH shim (`--host shim`) is cargo to its
382
+ caller: a non-TTY invocation (a script, `spawnSync`, `make`) waits for the
383
+ ticket to finish and returns cargo's exit code. An interactive shim (stdout
384
+ is a TTY) still auto-backgrounds on the cap, using `CARGO_HAULER_HOST` when
385
+ it is exported, otherwise the Claude cap; `CARGO_HAULER_SHIM_BACKGROUND=1`
386
+ restores that for scripts that consume tickets themselves. The estimate that
387
+ is compared is the whole wait: the work queued ahead in the lane plus the
388
+ job's own runtime, which the queued line reports as `wait ~Ns, run ~Ns`. That
389
+ conversion exits `75` (`EX_TEMPFAIL`) with the ticket on stderr, so
390
+ `cargo build && …` chains and scripts cannot mistake "submitted" for "built";
391
+ explicit `--bg` keeps exit `0`. When the caller's stdout is not a terminal
392
+ (`cargo test > out.log`), the notice adds that the redirect receives no
393
+ output and to read it with `hauler result cc-N --full`. Failed runs feed the
394
+ estimate history too, so a broken build is not re-estimated cold on every retry.
391
395
 
392
396
  A foreground `hauler exec` that receives SIGINT or SIGTERM (Ctrl-C, or a
393
397
  `timeout N …` wrapper) asks the daemon to kill its ticket, waits for the
@@ -674,7 +678,8 @@ Per-host notes and hook timeouts are in [docs/install.md](docs/install.md).
674
678
  | `CARGO_HAULER_LEDGER_MAX_ROWS` | `50000` | Total ledger rows beyond which the oldest finished rows are deleted when the daemon starts; `0` disables the row cap. Pruned rows take their `tickets/<ticket>.log` files with them. |
675
679
  | `CARGO_HAULER_TICKET_LOG_MAX_BYTES` | `67108864` (64 MiB) | Bytes of a leader run's combined output written to `<state dir>/tickets/<ticket>.log` before the log stops with one truncation line; `0` writes no ticket logs (`hauler result` then has only the tail). |
676
680
  | `CARGO_HAULER_LOG_LEVEL` | `Info` | Daemon log level. |
677
- | `CARGO_HAULER_HOST`, `CARGO_HAULER_SESSION` | Unset | Default `--host` and `--session` attribution for `hauler exec`; the PATH shim also borrows `CARGO_HAULER_HOST`'s shell cap for auto-background. |
681
+ | `CARGO_HAULER_HOST`, `CARGO_HAULER_SESSION` | Unset | Default `--host` and `--session` attribution for `hauler exec`; the PATH shim also borrows `CARGO_HAULER_HOST`'s shell cap when auto-background is allowed. |
682
+ | `CARGO_HAULER_SHIM_BACKGROUND` | Unset | `1` / `true` / `on` / `yes` lets a non-TTY PATH shim auto-background over the host cap (exit 75). Without it, a shim that is not a TTY waits for cargo's exit. |
678
683
 
679
684
  A numeric value that does not parse or falls outside its range is reported
680
685
  as a warning (daemon log, or stderr for hand-run commands) and the default