cargo-hauler 0.4.5 → 0.4.6
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 +6 -0
- package/README.md +33 -8
- 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 +5225 -5060
- package/artifact/claude/bin/cargo-hauler.mjs +4942 -4691
- 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/event-route-tool-after.mjs +2 -2
- package/artifact/claude/hooks/event-route-tool-before.mjs +2 -2
- package/artifact/claude/hooks/hooks-flight.mjs +376 -275
- package/artifact/claude/mcp/mcp-hauler-2b8242f9-flight.mjs +5207 -5042
- package/artifact/claude/mcp/mcp-hauler-2b8242f9.mjs +8591 -8441
- package/artifact/claude/mcp-apps/dashboard.html +1 -1
- package/artifact/claude/scripts/hauler.mjs +757 -59
- package/artifact/codex/.codex-plugin/plugin.json +1 -1
- package/artifact/codex/INSTALL.md +1 -1
- package/artifact/codex/bin/cargo-hauler-flight.mjs +5225 -5060
- package/artifact/codex/bin/cargo-hauler.mjs +4942 -4691
- 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/event-route-tool-after.mjs +2 -2
- package/artifact/codex/hooks/event-route-tool-before.mjs +2 -2
- package/artifact/codex/hooks/hooks-flight.mjs +376 -275
- package/artifact/codex/mcp/mcp-hauler-2b8242f9-flight.mjs +5207 -5042
- package/artifact/codex/mcp/mcp-hauler-2b8242f9.mjs +8591 -8441
- package/artifact/codex/mcp-apps/dashboard.html +1 -1
- package/artifact/codex/scripts/hauler.mjs +757 -59
- package/artifact/cursor/.cursor-plugin/plugin.json +1 -1
- package/artifact/cursor/INSTALL.md +1 -1
- package/artifact/cursor/bin/cargo-hauler-flight.mjs +5225 -5060
- package/artifact/cursor/bin/cargo-hauler.mjs +4942 -4691
- 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/event-route-tool-after.mjs +2 -2
- package/artifact/cursor/hooks/event-route-tool-before.mjs +2 -2
- package/artifact/cursor/hooks/hooks-flight.mjs +376 -275
- package/artifact/cursor/install.mjs +1 -1
- package/artifact/cursor/mcp/mcp-hauler-2b8242f9-flight.mjs +5207 -5042
- package/artifact/cursor/mcp/mcp-hauler-2b8242f9.mjs +8591 -8441
- package/artifact/cursor/mcp-apps/dashboard.html +1 -1
- package/artifact/cursor/scripts/hauler.mjs +757 -59
- package/artifact/portable/INSTALL.md +1 -1
- package/artifact/portable/bin/cargo-hauler-flight.mjs +5225 -5060
- package/artifact/portable/bin/cargo-hauler.mjs +4942 -4691
- package/artifact/portable/install.mjs +1 -1
- package/artifact/portable/mcp/mcp-hauler-2b8242f9-flight.mjs +5206 -5041
- package/artifact/portable/mcp/mcp-hauler-2b8242f9.mjs +8589 -8439
- package/artifact/portable/mcp-apps/dashboard.html +1 -1
- package/artifact/portable/plugin.json +1 -1
- package/artifact/portable/scripts/hauler.mjs +757 -59
- package/dist/bin/cargo-hauler-flight.mjs +5225 -5060
- package/dist/bin/cargo-hauler.js +4942 -4691
- package/dist/bin/hauler.js +757 -59
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4257982: Survive a CLI or plugin upgrade under a daemon left running from the older install, and add `hauler daemon restart`. The client schemas now default the fields older daemons never send (`outputPath`, `after`), so `hauler status`, `hauler result`, `hauler await`, and the `hauler_*` tools read a 0.4.1 daemon's replies instead of printing a Zod issue array; a reply that still cannot be read fails as `daemon is 0.4.1 (pid N, since 3h ago), this CLI is 0.4.4 — restart it with \`hauler daemon restart\`` with the first mismatch (`active[0].outputPath expected string, received undefined`) on a second line, and `hauler daemon status` says the same. The status report carries the daemon `version` (older daemons are asked with one `ping`), `hauler status --json` exposes it as `daemonVersion`, and every document header — plus the status summary — warns `daemon 0.4.2 ≠ cli 0.4.4 — restart it with \`hauler daemon restart\`` while the versions differ. `hauler daemon restart` sends the graceful stop, waits up to 5 s for the old pid to exit, starts a daemon from this install, and prints both pids and versions (`previousPid` in the JSON result; exit `1` when the old daemon did not exit, in which case nothing is started). Tickets in flight at a restart are not handed over: the new daemon marks them `killed` with `orphaned by daemon restart`, and `hauler result` / `hauler_result` explain that instead of showing a plain kill. The shell header ends with `state dir <path>` so a moved `CARGO_HAULER_STATE_DIR` is visible on every command. (#75)
|
|
8
|
+
|
|
3
9
|
## 0.4.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -41,11 +41,14 @@ src/
|
|
|
41
41
|
Every rendered route — MCP tool, CLI command, rendered script — composes
|
|
42
42
|
through one layout, the way a page framework's `layout.tsx` wraps every page:
|
|
43
43
|
|
|
44
|
-
- **Header:** `<DaemonBadge>` prints what the request-start probe proved
|
|
45
|
-
`cargo-hauler · daemon running (pid 4021) ·
|
|
46
|
-
· 2 lanes busy · up since 3h ago
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
- **Header:** `<DaemonBadge>` prints what the request-start probe proved and
|
|
45
|
+
which state directory it is: `cargo-hauler · daemon running (pid 4021) ·
|
|
46
|
+
2/5 permits +1 riding, 1 queued · 2 lanes busy · up since 3h ago · state dir
|
|
47
|
+
/fast/cache/cargo-hauler`, or `daemon stopped · no socket; it starts on
|
|
48
|
+
demand…`, or `daemon unresponsive · did not accept a connection within
|
|
49
|
+
750ms (machine saturated)…`. When the daemon is another build than the CLI
|
|
50
|
+
or MCP server rendering the document, a second line says so: `cargo-hauler
|
|
51
|
+
· daemon 0.4.2 ≠ cli 0.4.4 — restart it with \`hauler daemon restart\``.
|
|
49
52
|
- **Body:** the route's own document, unchanged. The route keeps its
|
|
50
53
|
`<Agent.Result value>`; the runtime merges it into the shell so
|
|
51
54
|
`structuredContent` and `--json` are exactly what the route declared.
|
|
@@ -66,7 +69,7 @@ and a `health` value from one bounded `status` probe:
|
|
|
66
69
|
|
|
67
70
|
| `health.state` | meaning |
|
|
68
71
|
| --- | --- |
|
|
69
|
-
| `running` | `pid`, `startedAtMs`, `latencyMs`, `running` (permit holders), `riding` (attached), `queued`, `busyLanes`, `maxConcurrent` |
|
|
72
|
+
| `running` | `pid`, `startedAtMs`, `latencyMs`, `running` (permit holders), `riding` (attached), `queued`, `busyLanes`, `maxConcurrent`, and `version` when the daemon states one (on the status report from 0.4.5, by one extra `ping` for older daemons) |
|
|
70
73
|
| `stopped` | `socket-missing` (starts on demand) or `connection-refused` (stale socket) |
|
|
71
74
|
| `unresponsive` | `accept-timeout` (never accepted), `answer-timeout` (accepted, no `status-result`), or `connection-closed` within the probe budget (750 ms for the accept and for the answer); ledger reads still work |
|
|
72
75
|
| `unreachable` | `open-failed` with the errno (`EACCES`, `EMFILE`, …): the socket is present but could not be opened, which is not evidence the daemon is down |
|
|
@@ -225,7 +228,7 @@ executable beside it (`dist/bin/cargo-hauler.js` in the package,
|
|
|
225
228
|
| `hauler result <ticket> [--full]` | A stored ticket; running tickets include a live output tail. 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). |
|
|
226
229
|
| `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. |
|
|
227
230
|
| `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`. |
|
|
228
|
-
| `hauler daemon <run\|start\|stop\|status>` | Manage the daemon lifecycle. |
|
|
231
|
+
| `hauler daemon <run\|start\|stop\|status\|restart>` | Manage the daemon lifecycle. `restart` 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.4.1) → pid 742001 (0.4.4)`); a daemon that has not exited by then is reported, not killed, and nothing is started (exit `1`). Tickets in flight at the restart are not handed over: the new daemon marks them `killed` with the error `orphaned by daemon restart`. |
|
|
229
232
|
| `hauler install-shim [--dir DIR] [--real-cargo PATH] [--force]` | Install the optional PATH shim. |
|
|
230
233
|
|
|
231
234
|
The `hauler` MCP server projects the same operations as `hauler_status`,
|
|
@@ -454,6 +457,23 @@ error `stalled: no CPU for Nm after owner disconnected; killed automatically`.
|
|
|
454
457
|
tickets (`--bg`, `hauler_request`) have no streaming connection and are only
|
|
455
458
|
ever flagged.
|
|
456
459
|
|
|
460
|
+
Tickets do not survive a daemon restart. `hauler daemon restart` (or `stop`
|
|
461
|
+
then `start`) ends every queued or running ticket: the cargo processes die
|
|
462
|
+
with the daemon, and the new daemon's first ledger pass marks each of them
|
|
463
|
+
`killed` with the error `orphaned by daemon restart`, so `hauler result cc-N`
|
|
464
|
+
answers `cc-N killed — orphaned by daemon restart: the daemon stopped while it
|
|
465
|
+
was in flight and does not hand runs over; resubmit if the work is still
|
|
466
|
+
needed` rather than looking like a failure of the command itself. Restart when
|
|
467
|
+
the CLI or plugin was upgraded under a running daemon: every document then
|
|
468
|
+
carries `daemon 0.4.2 ≠ cli 0.4.4 — restart it with \`hauler daemon restart\``,
|
|
469
|
+
and a reply the newer client still cannot read is reported as `daemon is 0.4.2
|
|
470
|
+
(pid N, since 3h ago), this CLI is 0.4.4 — restart it with \`hauler daemon
|
|
471
|
+
restart\`` with the first schema mismatch on a second line — never as a raw
|
|
472
|
+
validation dump. The client schemas default the fields older daemons never
|
|
473
|
+
send (`outputPath`, `after`), so a plain version difference alone does not
|
|
474
|
+
break `status`, `result`, or `await`; finish or `hauler kill` what is in
|
|
475
|
+
flight before restarting if the work matters.
|
|
476
|
+
|
|
457
477
|
The `tool/after` route checks the session's background tickets — `--bg`,
|
|
458
478
|
`hauler_request`, and synchronous requests the client converted to a ticket
|
|
459
479
|
— and, on the first tool call after one finishes, adds its result to the
|
|
@@ -582,7 +602,12 @@ unset, the daemon reads kache's configured local store from
|
|
|
582
602
|
`hauler_await` fail loudly when the daemon is unreachable instead of
|
|
583
603
|
reporting a ticket as not found; `hauler_status`, `hauler_log`, and
|
|
584
604
|
`hauler_last` read the ledger with the daemon marked `stopped` or
|
|
585
|
-
`unresponsive`.
|
|
605
|
+
`unresponsive`. A daemon whose reply the client cannot read fails as a
|
|
606
|
+
version difference naming both versions and `hauler daemon restart`.
|
|
607
|
+
- The state directory is not migrated between installs. Every rendered
|
|
608
|
+
document names the one in use (`state dir …` in the header; `stateRoot` in
|
|
609
|
+
`--json`), so a `CARGO_HAULER_STATE_DIR` change is visible on the next
|
|
610
|
+
command rather than discovered from an empty ledger.
|
|
586
611
|
- Test sharing uses identity attachment or batch folding, never coverage.
|
|
587
612
|
Folded `test` and `nextest` requests receive the composite output and exit
|
|
588
613
|
code, so a failure may come from another package in the batch.
|