cargo-hauler 0.6.3 → 0.6.4
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.
- package/CHANGELOG.md +10 -0
- package/README.md +18 -7
- package/artifact/agent-bundle.manifest.json +1 -1
- package/artifact/claude/.claude-plugin/marketplace.json +1 -1
- package/artifact/claude/.claude-plugin/plugin.json +1 -1
- package/artifact/claude/INSTALL.md +1 -1
- package/artifact/claude/bin/cargo-hauler-flight.mjs +134 -68
- package/artifact/claude/bin/cargo-hauler.mjs +454 -80
- package/artifact/claude/hooks/after-tool-shell-after-264de610.mjs +2303 -57
- package/artifact/claude/hooks/before-tool-shell-before-9212219e.mjs +374 -8
- package/artifact/claude/hooks/event-route-session-start.mjs +2 -2
- package/artifact/claude/hooks/event-route-stop.mjs +2 -2
- package/artifact/claude/hooks/hooks-flight.mjs +10591 -8060
- package/artifact/claude/mcp/mcp-hauler-2b8242f9-flight.mjs +2345 -95
- package/artifact/claude/mcp/mcp-hauler-2b8242f9.mjs +87 -56
- package/artifact/claude/mcp-apps/dashboard.html +1 -1
- package/artifact/claude/scripts/hauler.mjs +392 -57
- package/artifact/claude/skills/hauler-dashboard/SKILL.md +1 -1
- package/artifact/codex/.codex-plugin/plugin.json +1 -1
- package/artifact/codex/INSTALL.md +1 -1
- package/artifact/codex/bin/cargo-hauler-flight.mjs +134 -68
- package/artifact/codex/bin/cargo-hauler.mjs +454 -80
- package/artifact/codex/hooks/after-tool-shell-after-264de610.mjs +2303 -57
- package/artifact/codex/hooks/before-tool-shell-before-9212219e.mjs +374 -8
- package/artifact/codex/hooks/event-route-session-start.mjs +2 -2
- package/artifact/codex/hooks/event-route-stop.mjs +2 -2
- package/artifact/codex/hooks/hooks-flight.mjs +10591 -8060
- package/artifact/codex/mcp/mcp-hauler-2b8242f9-flight.mjs +2345 -95
- package/artifact/codex/mcp/mcp-hauler-2b8242f9.mjs +87 -56
- package/artifact/codex/mcp-apps/dashboard.html +1 -1
- package/artifact/codex/scripts/hauler.mjs +392 -57
- package/artifact/codex/skills/hauler-dashboard/SKILL.md +1 -1
- package/artifact/cursor/.cursor-plugin/plugin.json +1 -1
- package/artifact/cursor/INSTALL.md +1 -1
- package/artifact/cursor/bin/cargo-hauler-flight.mjs +134 -68
- package/artifact/cursor/bin/cargo-hauler.mjs +454 -80
- package/artifact/cursor/hooks/after-tool-shell-after-264de610.mjs +2303 -57
- package/artifact/cursor/hooks/before-tool-shell-before-9212219e.mjs +374 -8
- package/artifact/cursor/hooks/event-route-session-start.mjs +2 -2
- package/artifact/cursor/hooks/event-route-stop.mjs +2 -2
- package/artifact/cursor/hooks/hooks-flight.mjs +10591 -8060
- package/artifact/cursor/install.mjs +1 -1
- package/artifact/cursor/mcp/mcp-hauler-2b8242f9-flight.mjs +2345 -95
- package/artifact/cursor/mcp/mcp-hauler-2b8242f9.mjs +87 -56
- package/artifact/cursor/mcp-apps/dashboard.html +1 -1
- package/artifact/cursor/scripts/hauler.mjs +392 -57
- package/artifact/cursor/skills/hauler-dashboard/SKILL.md +1 -1
- package/artifact/portable/INSTALL.md +1 -1
- package/artifact/portable/bin/cargo-hauler-flight.mjs +134 -68
- package/artifact/portable/bin/cargo-hauler.mjs +454 -80
- package/artifact/portable/install.mjs +1 -1
- package/artifact/portable/mcp/mcp-hauler-2b8242f9-flight.mjs +135 -69
- package/artifact/portable/mcp/mcp-hauler-2b8242f9.mjs +86 -55
- package/artifact/portable/mcp-apps/dashboard.html +1 -1
- package/artifact/portable/plugin.json +1 -1
- package/artifact/portable/scripts/hauler.mjs +392 -57
- package/artifact/portable/skills/hauler-dashboard/SKILL.md +1 -1
- package/dist/bin/cargo-hauler-flight.mjs +135 -68
- package/dist/bin/cargo-hauler.js +455 -81
- package/dist/bin/hauler.js +392 -57
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1baf004: Model `env NAME=value … cargo …` and `bash -c '… cargo …'` requests as the cargo they run (#126). A leading `env` (assignments, `-u NAME`) is folded into the request environment and intent key, so such requests get the right subcommand, packages, estimate, identity/coverage attachment, batching, demux, and execution-phase hand-back instead of being recorded as subcommand `env` with a default estimate. A `bash -c` / `sh -c` / `zsh -c` script with exactly one cargo statement is scheduled, estimated, and phase-tracked as that cargo tail, but never attaches, leads, or folds (the script may do more than its cargo), and is never demuxed. `env -i` stays opaque; other `env` options are refused as non-cargo programs.
|
|
8
|
+
- 1baf004: Serialize `hook-state.json` read-modify-write cycles across concurrent sessions' hook processes with a lock beside the file (#110), so one session's completion cursor or stop-denial counter is no longer lost when another session's hook saves at the same moment. Waiting is bounded (2 s) and a lock that cannot be taken degrades to the previous unlocked update rather than failing the host's tool call; a lock older than 5 s is treated as abandoned.
|
|
9
|
+
- cc3e6bc: State precisely when `hauler install-shim` embeds the running npm entry instead of the PATH `hauler` (only when no `hauler` on PATH resolves to a `.js` script; version-manager shims do not count), in the README and in the command's own message, which no longer calls a self-embedded checkout entry "global" (#124)
|
|
10
|
+
- 1baf004: `hauler status`, `hauler daemon status`, `hauler log`, `hauler_status`, and the dashboard no longer die with a `ZodError` when the daemon that answers is from a previous install (#123). The read-only surfaces check the daemon's reported version before parsing its rows; a mismatch reads the ledger, marks the daemon `unresponsive`, and says which version is running and that the next cargo command or `hauler daemon restart` replaces it.
|
|
11
|
+
- e0ef261: Replace a daemon from a previous install before `hauler status`, `hauler daemon status`, ticket reads, MCP tools, or hooks parse its reply; report a clear failure when replacement cannot finish (#127)
|
|
12
|
+
|
|
3
13
|
## 0.6.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ The CLI is `hauler` on PATH from `npm i -g cargo-hauler`. Never run
|
|
|
85
85
|
| `hauler result <ticket> [--full]` | A stored ticket in full: the settled 16 KiB output tail, or the whole live in-memory tail while it runs (not the status preview). The document names the full on-disk output log (`Full output: <path> (size)`) and `--json` carries it as `request.outputPath`; `--full` prints that whole log instead of the tail (the last ~768 KiB when it does not fit, with the path for the rest). |
|
|
86
86
|
| `hauler kill <ticket>` | Stop a ticket: drop it from the queue or SIGTERM (then SIGKILL) its cargo process group, freeing the lane. Riders return to their lane or fail with it. |
|
|
87
87
|
| `hauler request [--session ID] [--host HOST] [--cwd DIR] [--after TICKET …] -- <cargo …>` | Submit a background request and return its ticket, with where it landed in its lane (`queued behind cc-3281 (~13m)`, `waiting for cc-3281`, or `attached to cc-3281`). `--after` works as for `exec`. |
|
|
88
|
-
| `hauler daemon <run\|start\|stop\|status\|restart>` | Manage the daemon lifecycle. `restart` is the manual replacement: it sends the graceful stop, waits up to 5 s for the old pid to exit, then starts a daemon from this install and prints both (`restarted: pid 741314 (0.6.0) → pid 742001 (0.6.1)`); a daemon that has not exited by then is reported, not killed, and nothing is started (exit `1`). Tickets in flight are not handed over: the old daemon settles them itself as it shuts down — `killed`, error `daemon shutdown` — and callers resubmit (only rows a daemon that died without shutting down never marked are stamped `orphaned by daemon restart` by the next daemon's first ledger pass). After upgrading the package,
|
|
88
|
+
| `hauler daemon <run\|start\|stop\|status\|restart>` | Manage the daemon lifecycle. `restart` is the manual replacement: it sends the graceful stop, waits up to 5 s for the old pid to exit, then starts a daemon from this install and prints both (`restarted: pid 741314 (0.6.0) → pid 742001 (0.6.1)`); a daemon that has not exited by then is reported, not killed, and nothing is started (exit `1`). Tickets in flight are not handed over: the old daemon settles them itself as it shuts down — `killed`, error `daemon shutdown` — and callers resubmit (only rows a daemon that died without shutting down never marked are stamped `orphaned by daemon restart` by the next daemon's first ledger pass). After upgrading the package, every client entry — reads (`status`, `daemon status`, `log`, `last`, `await`, `result`, the dashboard and MCP tools), writes, and hooks — checks the daemon version before requesting a versioned payload and replaces a daemon from the previous install automatically. When the old daemon has not exited within the grace, the command fails with `` cargo-hauler daemon pid N (X.Y.Z) is still running 5s after the shutdown request; not restarted — retry once it has exited, or stop it with `hauler daemon stop` `` instead of parsing its payload or starting a second daemon. |
|
|
89
89
|
| `hauler install-shim [--dir DIR] [--real-cargo PATH] [--force]` | Install the optional PATH shim. |
|
|
90
90
|
| `hauler dashboard [--target claude\|codex\|cursor\|portable] [--port N] [--no-open]` | Open the dashboard in a plain browser tab: serve the MCP App standalone against the plugin's own `hauler` server on `127.0.0.1` (`spawnServeApp` from `agent-bundle/serve-app-command`, which runs `agent-bundle serve-app` as a child process and prints its URL), call `hauler_status` once so it opens populated, and stay in the foreground until Ctrl-C. A checkout command: it needs the built `artifact/` beside the CLI and `agent-bundle` under `node_modules` (`pnpm install && pnpm build`); the npm package ships no runtime dependencies and an installed host pack has no artifact, so both report what is missing. In an MCP host, call `hauler_status` instead. |
|
|
91
91
|
|
|
@@ -187,6 +187,13 @@ Within a lane, the daemon can reduce work in three ways:
|
|
|
187
187
|
3. **Batch folding:** compatible queued compile or test requests are combined
|
|
188
188
|
into one invocation.
|
|
189
189
|
|
|
190
|
+
A leading `env NAME=value … cargo …` is folded into the request environment,
|
|
191
|
+
so the cargo behind it is scheduled, estimated, attached, and phase-tracked
|
|
192
|
+
as that cargo command (the assignments are part of its identity). A
|
|
193
|
+
`bash -c` / `sh -c` script whose single cargo statement can be read is
|
|
194
|
+
scheduled and estimated as that cargo command too, but never shared or
|
|
195
|
+
folded: the rest of the script is opaque.
|
|
196
|
+
|
|
190
197
|
A request that could not attach is logged at debug level with the gate that
|
|
191
198
|
refused it (`subcommand`, `opaque-arguments`, `passthrough`,
|
|
192
199
|
`compile-surface`, `packages`, `targets`, `channels`,
|
|
@@ -429,9 +436,12 @@ When the daemon starts Cargo it sets `CARGO_HAULER_INSIDE=1`, and the shim then
|
|
|
429
436
|
invokes the embedded Cargo directly, so the daemon's own Cargo never returns
|
|
430
437
|
through the broker. The shim is POSIX-only; its directory must appear before
|
|
431
438
|
rustup's Cargo directory on `PATH`; replacing an existing destination requires
|
|
432
|
-
`--force`. `hauler install-shim`
|
|
433
|
-
|
|
434
|
-
|
|
439
|
+
`--force`. `hauler install-shim` walks PATH for a `hauler` whose realpath is a
|
|
440
|
+
regular `.js`, `.mjs`, or `.cjs` file outside any plugin copy and embeds that
|
|
441
|
+
realpath (a version-manager shim such as `mise/shims/hauler`, which resolves to
|
|
442
|
+
a native binary, does not count); an npm `dist/bin/hauler.js` entry embeds
|
|
443
|
+
itself only when that walk finds nothing. It refuses to run from a plugin-local
|
|
444
|
+
`scripts/hauler.mjs`.
|
|
435
445
|
If a Node upgrade moves that global file, the shim runs Cargo directly until
|
|
436
446
|
you re-run `hauler install-shim --force`.
|
|
437
447
|
|
|
@@ -619,9 +629,10 @@ unset, the daemon reads kache's configured local store from
|
|
|
619
629
|
`hauler_await` fail loudly when the daemon is unreachable instead of
|
|
620
630
|
reporting a ticket as not found; `hauler_status`, `hauler_log`, and
|
|
621
631
|
`hauler_last` read the ledger with the daemon marked `stopped` or
|
|
622
|
-
`unresponsive`.
|
|
623
|
-
|
|
624
|
-
|
|
632
|
+
`unresponsive`. Before any live daemon reply is parsed, these reads apply
|
|
633
|
+
the one-version rule and replace a daemon left running by a previous
|
|
634
|
+
install. If replacement fails, they report that failure instead of reading
|
|
635
|
+
the stale payload.
|
|
625
636
|
- The state directory is not migrated between installs. Every rendered
|
|
626
637
|
document names the one in use (`state dir …` in the header; `stateRoot` in
|
|
627
638
|
`--json`), so a `CARGO_HAULER_STATE_DIR` change is visible on the next
|