@indigoai-us/hq-cli 5.345.212 → 5.345.214
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 +20 -0
- package/dist/bin/hq-auth-refresh.js +2 -1
- package/dist/command-catalog.generated.d.ts +308 -43
- package/dist/command-catalog.generated.js +373 -43
- package/dist/commands/agent-inbox.d.ts +11 -1
- package/dist/commands/agent-inbox.js +128 -38
- package/dist/commands/agent-kit.js +2 -2
- package/dist/commands/core-handoff.js +1 -0
- package/dist/commands/core-hq-session-native.js +2 -2
- package/dist/commands/core-pin-native.js +1 -1
- package/dist/commands/core-policy.js +1 -1
- package/dist/commands/core-resolve-company-native.js +1 -1
- package/dist/commands/core-sentry-report-fast.d.ts +2 -0
- package/dist/commands/core-sentry-report-fast.js +3 -1
- package/dist/commands/daemon.js +11 -1
- package/dist/commands/integrations-connect.d.ts +7 -1
- package/dist/commands/integrations-connect.js +137 -13
- package/dist/commands/lanes-link.js +10 -5
- package/dist/commands/rescue.js +13 -0
- package/dist/commands/secrets.d.ts +11 -0
- package/dist/commands/secrets.js +41 -7
- package/dist/index.js +2 -0
- package/dist/lazy-commands.js +2 -0
- package/dist/lib/agent-kit/inbox-fetch.d.ts +122 -1
- package/dist/lib/agent-kit/inbox-fetch.js +215 -3
- package/dist/lib/agent-kit/inbox-redact.js +1 -1
- package/dist/lib/agent-kit/inbox-state.d.ts +98 -1
- package/dist/lib/agent-kit/inbox-state.js +261 -4
- package/dist/lib/agent-kit/mcp/tools.d.ts +3 -3
- package/dist/lib/agent-kit/mcp/tools.js +68 -25
- package/dist/lib/agent-kit/run/inbox.js +4 -2
- package/dist/lib/agent-kit/skills.js +4 -1
- package/dist/lib/agent-kit/wake.d.ts +9 -1
- package/dist/lib/agent-kit/wake.js +10 -3
- package/dist/lib/bot/fleet-cron.js +193 -14
- package/dist/lib/bot/fleet-download.d.ts +2 -0
- package/dist/lib/bot/fleet-download.js +23 -0
- package/dist/lib/bot/fleet-local.d.ts +1 -0
- package/dist/lib/bot/fleet-local.js +41 -8
- package/dist/lib/core-utils/session-id.d.ts +1 -1
- package/dist/lib/core-utils/session-id.js +4 -0
- package/dist/lib/daemon/run.js +9 -1
- package/dist/lib/daemon/updater.d.ts +34 -2
- package/dist/lib/daemon/updater.js +51 -2
- package/dist/lib/doctor/checks/release-links.d.ts +50 -8
- package/dist/lib/doctor/checks/release-links.js +260 -24
- package/dist/lib/doctor/fix/apply.js +24 -8
- package/dist/lib/doctor/fix/remediation.js +15 -5
- package/dist/lib/lanes/autopilot-registry.d.ts +14 -0
- package/dist/lib/lanes/autopilot-registry.js +59 -7
- package/dist/lib/lanes/links.d.ts +14 -0
- package/dist/lib/lanes/links.js +320 -25
- package/dist/lib/lanes/outpost-pruner-install.d.ts +10 -0
- package/dist/lib/lanes/outpost-pruner-install.js +4 -3
- package/dist/main.js +3 -1
- package/dist/sentry-init.d.ts +2 -0
- package/dist/sentry-init.js +13 -2
- package/dist/sentry.d.ts +2 -0
- package/dist/sentry.js +5 -1
- package/dist/utils/cli-network-lifecycle.d.ts +9 -0
- package/dist/utils/cli-network-lifecycle.js +52 -0
- package/dist/utils/safe-link.d.ts +63 -0
- package/dist/utils/safe-link.js +246 -0
- package/dist/utils/sentry-keepalive-transport.d.ts +28 -0
- package/dist/utils/sentry-keepalive-transport.js +70 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.345.214] — 2026-11-10
|
|
6
|
+
- `hq agent inbox done` and the `hq_inbox_done` MCP tool now confirm completion before recording it. An id is written to `done-ids.json` only after the server confirms its ack. Until then it is kept in `~/.hq-agent/inbox/ack-pending.json`, which is written before the first ack is sent, so a failed ack or a killed process leaves a record. While it is there, the item stays listed by `hq agent inbox` and `hq_inbox_read` with `ackPending: true`, is marked in the kit wake notice's new `ackPending` list, and is retried by the next inbox read or `done` call. A permanent refusal (HTTP 400, 403 or 404) is not retried: the id moves to `ack-failed.json`, is listed once with `ackFailed` and the reason, and then drops out. A refusal that `done` reports in its own output is not listed again. One listing shows at most 100 of them. `hq_inbox_read` (as `ackFailedMore`) and `hq agent inbox` say how many more wait for the next call. `ack-failed.json` holds at most 5000 records: past that the oldest ones not shown yet are dropped, and the next listing gives their number (`ackFailedDropped`). Refusals are recorded in one write per batch, and an unreadable `ack-failed.json` is moved aside as `ack-failed.json.corrupt-<time>` instead of being overwritten. A 401 (a token problem) and a 409 are not permanent: those ids stay in `ack-pending.json` and are retried. Each ack is bounded and retried once on a transient failure (a lock-held token mint, a 5xx, 408/425/429, a timeout or a dropped connection). A whole batch is bounded by `HQ_AGENT_INBOX_ACK_DEADLINE_MS` (default 60 s), and a read, including its ack retry, returns within 45 s, which stays under the usual 60 s MCP tool timeout. The handled-state files are updated under the inbox lock, so the MCP server and a CLI call cannot drop each other's update. `done` exits 3 when a requested ack is not confirmed and 1 for an invalid id. `--json` (new) and `hq_inbox_done` report `complete`, `ackPending`, `ackFailed`, `ackFailures` and a structured `ackFailureDetails`. `ackFailures` uses the strings `hq_inbox_done` always returned, now one per id: `"<id> (<status>)"` or `"ack skipped: <id>: <message>"`. `marked` now counts only ids whose ack was confirmed, so it can be 0 when acks fail. Before this change, an id was marked done before its ack, so a failed ack hid the item locally while the server kept it pending. Ids already hidden that way before this release stay hidden, because nothing recorded them; the server still lists them as pending. Rerunning `done` is safe because the server ack is idempotent (feedback 3e376c49).
|
|
7
|
+
- `hq integrations connect <domain>` for an app that will not register HQ automatically (for example `shopify.com`) now prints the callback URL to register and the full `--mcp-url … --client-id … --client-secret-stdin` command, with the endpoint taken from the app's blueprint. Only an MCP surface is used for `--mcp-url`; a blueprint that lists only REST or GraphQL APIs falls back to the console. It used to open the generic Integrations page, which has no control, callback URL or credential form for an app the catalog does not list. With `--json`, every sign-in handoff now prints one JSON line on stdout, told apart by `setup`: `sign-in-link` (`authorizationUrl`), `own-oauth-app` (`callbackUrl`, `command`) or `console` (`url`, `serverAddress`). The console handoff used to print nothing on stdout. `hq integrations connect --help` lists the shapes. (feedback_3013b98e)
|
|
8
|
+
- Record that the credential guard runs as bash on hq-core 16.0.46. That release ships the guard without the Unicode fold (25f5507c), and the native port now matches hq-core-staging #1887 (72296f01), which blocks more. The hook engine pin check failed on main and on every pull request after #2528 and #2529 merged together.
|
|
9
|
+
- Port the hq-core-staging #1887 Unicode fold to the native credential guard: it also checks a copy of the payload with U+017F, U+212A, sharp s, U+0130/U+0131, the Latin ligatures and fullwidth letters, digits, `.`, `_` and `-` folded to ASCII, and blocks when either copy blocks, so `cat ~/.aw<U+017F>/credentials` is blocked in every locale. Pin the guard at staging 893afbecf.
|
|
10
|
+
- `hq core hq-session` now reads `HQ_FLEET_SESSION_ID`, the only session id an HQ Fleet scheduled job has. hq-core 16.0.46 taught `core/scripts/hq-session.sh` to accept it, but that script hands `set`, `add` and `remove` to `hq core hq-session`, which still ignored it, so a scheduled job's `hq-session.sh set company <slug>` found no session (or bound the global `.current` one) and every run on a hosted fleet agent failed its company bind. The id ranks last, after `HQ_SESSION_ID` and the Claude, Codex and Grok ids, as in hq-core. The same shared list feeds the session company lock reader, `hq secrets exec`, meetings, crm, workers, index rendering and the work-mesh trusted bind. `hq core resolve-company`, policy, handoff, pin and lane links read the fleet id too. `hq secrets exec` on a fleet job (only `HQ_FLEET_SESSION_ID`) uses its own session's company lock. When that lock cannot scope the call, because the bind failed or was skipped or `hooks.multi-company-session-lock` is off, it still refuses with exit 78 unless it passes `--company`, and its message and the `hq-session set` error now list all seven keys. Feedback rows 998e641c and 8a7c58f2.
|
|
11
|
+
- `hq bot create` downloads the HQ Fleet Runtime through HQ's CDN when the HQ API offers a CDN link. Each file is checked against its pinned hash as soon as it arrives; if the CDN fails or delivers the wrong file, that file comes from HQ storage. One measured first install from Bangladesh took 30 seconds for the 22.9 MB runtime through the CDN and 660 seconds from storage. Hash and signature checks are unchanged. Set `HQ_FLEET_RELEASE_CDN=off` to skip the CDN.
|
|
12
|
+
- The hq-hook engine answers the policy-enforcement gate natively again on the released hq-core 16.0.45. Until now it pinned only an unreleased staging version of the gate. Every gate call on 16.0.45 therefore went back to bash, and PreToolUse-Edit took about 240 ms longer with the port turned on (Beaker bench 2026-11-08, defect 3).
|
|
13
|
+
- The engine now keeps one pin per gate version it reproduces. It answers the 16.0.45 gate natively, except for calls where 16.0.45 reads names differently under Git Bash; those still go to bash.
|
|
14
|
+
- `crates/hq-hook/core-pins.json` lists the hq-core releases the engine supports (16.0.45 and 16.0.46) and records each hook that runs as bash on a release:
|
|
15
|
+
- On 16.0.45: the credential-file guard and the Glob guard. Their ports now follow the newer scripts.
|
|
16
|
+
- On 16.0.46: the policy injector, until its 16.0.46 changes are ported. The secrets-reveal guard and the gate's fact checks now answer natively on 16.0.46: the engine also accepts its `hook-lib.sh` and `session-id.sh`, after corpus replays against those files.
|
|
17
|
+
- A Rust test and `scripts/check-hook-engine-core-pins.mjs` fail when a supported release's hook files are neither pinned nor recorded, or when a newer hq-core release is not listed.
|
|
18
|
+
- Released users get this only with the next engine release.
|
|
19
|
+
- The daily hot-channel sync's failure alert now shows the job's real time, the reason and one fix step. It used to say "The 06:30 hot-channel sync ... did not finish" on every failure, even after the job moved to another time, and gave no reason. The time now comes from the job's own schedule in the Fleet Runtime (or the time the run started when that cannot be read). The alert names the cause for the common failures: signed out of HQ (run `hq login`), Claude signed out (run `claude auth login`), Claude Code not installed, Claude timing out on one document (the `hq sources signals --key` command that retries it), a failed network fetch and a run stopped by a signal. Any other failure shows the last error line, with credentials redacted, including a secret path segment such as a Slack webhook's, a `#fragment` parameter, a password that contains `@`, and a private key line. Each run's entry in `hot-signal-sync.log` now starts with a timestamped header and ends with how the run ended, so the alert's start time finds it (feedback 6040f390).
|
|
20
|
+
- `hq lanes link handover` and `hq lanes link adopt` let a successor session take over a conduct link. Before this, the link recorded its conductor's session id once at `open` and nothing could change it, so a session that took over a link got `session_unlinked` on `read`, `wait`, `send` and `close` and could not even close it (feedback_2c6d6d25). The conductor of record runs `handover`, which prints a one-time token once, good for seven days. The successor runs `adopt --link <id> --token -` with the token on stdin (or `--token-file <path>`; `--token <value>` also works but puts it on the command line). `adopt` moves the conductor role and removes the old session's pointer. Without `--host-session` it clears the previous conductor's host session, and without `--engine` it keeps the link's engine. A link whose conductor no longer holds it can be adopted without a token. A session that is already on a link, including a child of the same link, cannot adopt one. Conductor commands now check the link's recorded conductor, not only the session's pointer, so a former conductor cannot hand over, read, wait on, drain, send on (without `--link`) or close a link it handed over, and `close` takes the same lock as `adopt` and marks the link closed before it removes pointers. Session ids are self-asserted, so these checks guard against stale or mistaken agents, not a hostile process running as the same user.
|
|
21
|
+
A `close` that fails part way through removing pointers can now be finished by running `close` again, and `open`, `join` and `adopt` treat a pointer to a closed link as stale, so a failed close no longer strands the conductor and its children. `ack` checks the conductor of record inside the queue lock, like `read` and hook delivery. `--token -` reads stdin in chunks, retrying `EAGAIN` on a non-blocking stdin and treating `EOF` from a Windows console as the end. `hq lanes --help` lists `link` with a short summary; `hq lanes link --help` keeps the full description.
|
|
22
|
+
- `hq rescue` and `hq doctor --fix` now check that a Windows junction they write for `.agents/skills`, `.codex/claude` or `companies/_template/.obsidian` can be listed through. On machines where a standard user's junction has the right target but cannot be opened, HQ removes it and copies the target folder in its place, marked with `.hq-link-copy`. `hq doctor` reports such a copy as a warning, `hq doctor --fix` and the next `hq rescue` refresh it when its target changes, and a copy whose files you changed is left alone and reported instead of being overwritten.
|
|
23
|
+
- Scheduled hq runs (the daemon's reconcile, index, jobs, sync-core, bots and updater units, and the outpost lanes timers) no longer open a connection to Sentry when they have nothing to report. Each run used to send a release-health session over a new socket, and over days that could exhaust a machine's network ports so every app lost its connection until a reboot (feedback 808d0851). Errors from these runs are still reported. The Sentry transport now reuses one keep-alive connection per process, capped at 2 sockets, and closes it at the end of each run. The daemon updater restarts a daemon that is still running an older hq-cli than the one installed, and a failed lead-registry delivery to an Outpost is retried with exponential backoff (30 s up to 30 min) instead of on every 15 s reconcile pass.
|
|
24
|
+
|
|
5
25
|
## [5.345.212] — 2026-11-10
|
|
6
26
|
- `hq whoami --company <slug> --json` no longer prints the cached sign-in ID token. Since v5.276.0 the JSON carried it as `planLimits.idToken`, so a hook or agent that captured the output also captured the token. `planLimits` is now `{ status }` or `null`; nothing else in the output changed.
|
|
7
27
|
- Billing copy for usage pricing now quotes the pricing feed. The agent box refusal adds the agent-run price ("plus $0.05 per agent run"). `hq billing status` with no card on usage pricing says HQ asks for a card once usage this month passes the included amount; a member is told to ask an owner or admin to add a card. A usage-pricing company whose box is blocked for lack of a card is told "A card is needed before HQ creates this box." Legacy flat-plan companies see the same text as before. The unused legacy `AGENT_PRICE_CENTS` and `OUTPOST_PRICE_CENTS` constants are removed.
|
|
@@ -52,7 +52,7 @@ function parseMinimumValiditySeconds(argv, env) {
|
|
|
52
52
|
return value;
|
|
53
53
|
}
|
|
54
54
|
export async function runAuthRefresh(refreshSession) {
|
|
55
|
-
const { finishSentrySession, Sentry } = await import("../sentry.js");
|
|
55
|
+
const { closeSentryTransport, finishSentrySession, Sentry } = await import("../sentry.js");
|
|
56
56
|
const { refreshCachedSession: refresh } = await import("../utils/cognito-session.js");
|
|
57
57
|
let exitCode = 1;
|
|
58
58
|
try {
|
|
@@ -78,6 +78,7 @@ export async function runAuthRefresh(refreshSession) {
|
|
|
78
78
|
finally {
|
|
79
79
|
finishSentrySession();
|
|
80
80
|
await Sentry.flush(2000);
|
|
81
|
+
closeSentryTransport();
|
|
81
82
|
}
|
|
82
83
|
return exitCode;
|
|
83
84
|
}
|