@indigoai-us/hq-cli 5.345.212 → 5.345.215-beta.0

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 (161) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/bin/hq-auth-refresh.js +2 -1
  3. package/dist/command-catalog.generated.d.ts +442 -50
  4. package/dist/command-catalog.generated.js +541 -50
  5. package/dist/commands/agent-inbox.d.ts +11 -1
  6. package/dist/commands/agent-inbox.js +128 -38
  7. package/dist/commands/agent-kit.js +2 -2
  8. package/dist/commands/agents.d.ts +51 -1
  9. package/dist/commands/agents.js +154 -2
  10. package/dist/commands/bot-jobs.d.ts +2 -15
  11. package/dist/commands/bot-jobs.js +2 -94
  12. package/dist/commands/bot-runtime.d.ts +46 -5
  13. package/dist/commands/bot-runtime.js +228 -18
  14. package/dist/commands/bot.d.ts +16 -9
  15. package/dist/commands/bot.js +169 -51
  16. package/dist/commands/cloud.d.ts +66 -13
  17. package/dist/commands/cloud.js +120 -39
  18. package/dist/commands/company-restore.d.ts +23 -0
  19. package/dist/commands/company-restore.js +128 -0
  20. package/dist/commands/company.js +2 -0
  21. package/dist/commands/core-handoff.js +1 -0
  22. package/dist/commands/core-hq-session-native.js +2 -2
  23. package/dist/commands/core-pin-native.js +1 -1
  24. package/dist/commands/core-policy.js +1 -1
  25. package/dist/commands/core-resolve-company-native.js +1 -1
  26. package/dist/commands/core-sentry-report-fast.d.ts +2 -0
  27. package/dist/commands/core-sentry-report-fast.js +3 -1
  28. package/dist/commands/daemon.js +11 -1
  29. package/dist/commands/integrations-connect.d.ts +17 -4
  30. package/dist/commands/integrations-connect.js +224 -26
  31. package/dist/commands/lanes-link.js +10 -5
  32. package/dist/commands/lanes.js +26 -9
  33. package/dist/commands/rescue.js +13 -0
  34. package/dist/commands/secrets.d.ts +11 -0
  35. package/dist/commands/secrets.js +41 -7
  36. package/dist/commands/sources.js +6 -0
  37. package/dist/commands/storage-offload.d.ts +12 -0
  38. package/dist/commands/storage-offload.js +41 -3
  39. package/dist/commands/sync-mode.js +5 -0
  40. package/dist/commands/whoami.js +4 -0
  41. package/dist/index.js +2 -0
  42. package/dist/lazy-commands.js +2 -0
  43. package/dist/lib/agent-kit/inbox-fetch.d.ts +122 -1
  44. package/dist/lib/agent-kit/inbox-fetch.js +215 -3
  45. package/dist/lib/agent-kit/inbox-redact.js +1 -1
  46. package/dist/lib/agent-kit/inbox-state.d.ts +98 -1
  47. package/dist/lib/agent-kit/inbox-state.js +261 -4
  48. package/dist/lib/agent-kit/mcp/tools.d.ts +3 -3
  49. package/dist/lib/agent-kit/mcp/tools.js +68 -25
  50. package/dist/lib/agent-kit/run/inbox.js +4 -2
  51. package/dist/lib/agent-kit/skills.js +4 -1
  52. package/dist/lib/agent-kit/wake.d.ts +9 -1
  53. package/dist/lib/agent-kit/wake.js +10 -3
  54. package/dist/lib/bot/config.d.ts +1 -0
  55. package/dist/lib/bot/config.js +10 -0
  56. package/dist/lib/bot/eventbridge-cron.d.ts +22 -0
  57. package/dist/lib/bot/eventbridge-cron.js +104 -0
  58. package/dist/lib/bot/fleet-cron.js +193 -14
  59. package/dist/lib/bot/fleet-download.d.ts +2 -0
  60. package/dist/lib/bot/fleet-download.js +23 -0
  61. package/dist/lib/bot/fleet-local.d.ts +34 -1
  62. package/dist/lib/bot/fleet-local.js +254 -37
  63. package/dist/lib/bot/fleet-python.d.ts +3 -0
  64. package/dist/lib/bot/fleet-python.js +34 -4
  65. package/dist/lib/bot/fleet-runtime-sources.d.ts +15 -0
  66. package/dist/lib/bot/fleet-runtime-sources.js +30 -0
  67. package/dist/lib/bot/legacy-provider-login.d.ts +8 -0
  68. package/dist/lib/bot/legacy-provider-login.js +19 -2
  69. package/dist/lib/bot/prompt.js +1 -1
  70. package/dist/lib/bot/readiness.d.ts +8 -0
  71. package/dist/lib/bot/readiness.js +17 -3
  72. package/dist/lib/bot/runtime-auth.d.ts +30 -0
  73. package/dist/lib/bot/runtime-auth.js +94 -3
  74. package/dist/lib/bot/status.d.ts +2 -0
  75. package/dist/lib/capacity/collectors/grok-refresh.d.ts +80 -0
  76. package/dist/lib/capacity/collectors/grok-refresh.js +189 -0
  77. package/dist/lib/capacity/collectors/grok.d.ts +5 -0
  78. package/dist/lib/capacity/collectors/grok.js +56 -5
  79. package/dist/lib/core-utils/session-id.d.ts +1 -1
  80. package/dist/lib/core-utils/session-id.js +4 -0
  81. package/dist/lib/daemon/catalog.js +11 -1
  82. package/dist/lib/daemon/run.js +9 -1
  83. package/dist/lib/daemon/updater.d.ts +34 -2
  84. package/dist/lib/daemon/updater.js +51 -2
  85. package/dist/lib/db/sqlite-binding.d.ts +1 -0
  86. package/dist/lib/db/sqlite-binding.js +1 -1
  87. package/dist/lib/delivery/artifacts.d.ts +99 -0
  88. package/dist/lib/delivery/artifacts.js +548 -0
  89. package/dist/lib/delivery/backup.d.ts +78 -0
  90. package/dist/lib/delivery/backup.js +343 -0
  91. package/dist/lib/delivery/cache.d.ts +29 -0
  92. package/dist/lib/delivery/cache.js +33 -0
  93. package/dist/lib/delivery/contracts.d.ts +142 -0
  94. package/dist/lib/delivery/contracts.js +289 -0
  95. package/dist/lib/delivery/credentials.d.ts +54 -0
  96. package/dist/lib/delivery/credentials.js +119 -0
  97. package/dist/lib/delivery/enrollment.d.ts +142 -0
  98. package/dist/lib/delivery/enrollment.js +382 -0
  99. package/dist/lib/delivery/identity.d.ts +25 -0
  100. package/dist/lib/delivery/identity.js +82 -0
  101. package/dist/lib/delivery/inbox.d.ts +116 -0
  102. package/dist/lib/delivery/inbox.js +260 -0
  103. package/dist/lib/delivery/migrations.d.ts +139 -0
  104. package/dist/lib/delivery/migrations.js +623 -0
  105. package/dist/lib/delivery/mqtt-adapter.d.ts +50 -0
  106. package/dist/lib/delivery/mqtt-adapter.js +242 -0
  107. package/dist/lib/delivery/mqtt.d.ts +61 -0
  108. package/dist/lib/delivery/mqtt.js +112 -0
  109. package/dist/lib/delivery/outbox.d.ts +95 -0
  110. package/dist/lib/delivery/outbox.js +187 -0
  111. package/dist/lib/delivery/provenance.d.ts +129 -0
  112. package/dist/lib/delivery/provenance.js +93 -0
  113. package/dist/lib/delivery/reconciler.d.ts +151 -0
  114. package/dist/lib/delivery/reconciler.js +492 -0
  115. package/dist/lib/delivery/restore.d.ts +35 -0
  116. package/dist/lib/delivery/restore.js +134 -0
  117. package/dist/lib/delivery/store.d.ts +161 -0
  118. package/dist/lib/delivery/store.js +940 -0
  119. package/dist/lib/delivery/workers/macos-job-helper.d.ts +103 -0
  120. package/dist/lib/delivery/workers/macos-job-helper.js +927 -0
  121. package/dist/lib/delivery/workers/macos.d.ts +176 -0
  122. package/dist/lib/delivery/workers/macos.js +901 -0
  123. package/dist/lib/delivery/workers/windows-boundary.d.ts +453 -0
  124. package/dist/lib/delivery/workers/windows-boundary.js +693 -0
  125. package/dist/lib/delivery/workers/windows-job-helper.d.ts +35 -0
  126. package/dist/lib/delivery/workers/windows-job-helper.js +264 -0
  127. package/dist/lib/delivery/workers/windows.d.ts +241 -0
  128. package/dist/lib/delivery/workers/windows.js +608 -0
  129. package/dist/lib/doctor/checks/release-links.d.ts +50 -8
  130. package/dist/lib/doctor/checks/release-links.js +260 -24
  131. package/dist/lib/doctor/fix/apply.js +24 -8
  132. package/dist/lib/doctor/fix/remediation.js +15 -5
  133. package/dist/lib/install/provider-wrappers.d.ts +2 -0
  134. package/dist/lib/install/provider-wrappers.js +68 -3
  135. package/dist/lib/lanes/autopilot-registry.d.ts +14 -0
  136. package/dist/lib/lanes/autopilot-registry.js +59 -7
  137. package/dist/lib/lanes/links.d.ts +14 -0
  138. package/dist/lib/lanes/links.js +320 -25
  139. package/dist/lib/lanes/outpost-pruner-install.d.ts +10 -0
  140. package/dist/lib/lanes/outpost-pruner-install.js +4 -3
  141. package/dist/main.js +3 -1
  142. package/dist/sentry-init.d.ts +2 -0
  143. package/dist/sentry-init.js +13 -2
  144. package/dist/sentry.d.ts +2 -0
  145. package/dist/sentry.js +5 -1
  146. package/dist/utils/cli-network-lifecycle.d.ts +9 -0
  147. package/dist/utils/cli-network-lifecycle.js +52 -0
  148. package/dist/utils/cognito-callback-port.d.ts +14 -0
  149. package/dist/utils/cognito-callback-port.js +24 -0
  150. package/dist/utils/cognito-session.js +3 -3
  151. package/dist/utils/deleted-company-notice.d.ts +59 -0
  152. package/dist/utils/deleted-company-notice.js +156 -0
  153. package/dist/utils/login-browser.d.ts +1 -1
  154. package/dist/utils/login-browser.js +7 -5
  155. package/dist/utils/resident-package-preload.js +30 -15
  156. package/dist/utils/safe-link.d.ts +63 -0
  157. package/dist/utils/safe-link.js +246 -0
  158. package/dist/utils/sentry-keepalive-transport.d.ts +28 -0
  159. package/dist/utils/sentry-keepalive-transport.js +70 -0
  160. package/dist/utils/vault-api.js +7 -0
  161. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -2,6 +2,55 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.215-beta.0] — 2026-11-11
6
+ - `hq login`, `hq auth login` and the automatic browser sign-in now show the provider's account chooser, so a person with several Google accounts picks one instead of being signed in with whichever the browser used last. Set `HQ_COGNITO_PROMPT=` (empty) to turn this off. Token refresh is unchanged.
7
+ - When a company you belonged to was deleted, `hq whoami`, `hq sources entities`, `hq sync mode --show` and the "No active company memberships found" error now say so on stderr, with the date and how to get it back.
8
+ - New `hq company restore <company>` restores a company you deleted in the last 30 days, by name, slug or company ID. A restored company comes back without its paid plan. `--json` prints the result as JSON.
9
+ - `hq agents jobs update <agent> <jobId>` (alias `edit`) edits a hosted agent's scheduled job in place: `--prompt` or `--prompt-file`, `--name`, `--cron` (five-field or `cron(...)`/`rate(...)`) or `--at` with a required `--tz`, `--context` / `--clear-context`, `--script-file` / `--clear-script`. Only the options passed change; the job keeps its id and paused/active status, and the change applies from its next run. Owners and admins of the agent's company can use it, the same as pause, resume and cancel. `hq agents jobs delete` is now an alias of `cancel`, which removes a job for good whether it is active or paused. Paused jobs do not count toward an agent's 25 active-job limit. Needs the hq-pro-agents job edit route; an older server answers with a clear "cannot edit jobs yet" line.
10
+ - `hq bot switch-account <name> --runtime <claude|codex> --sign-in` signs the bot in with a login of its own first. It runs a browser sign-in into the bot's own folder (`~/.hq/bots/<name>/auth/<runtime>`), the same login `hq bot login` makes, with no terminal needed. Your own Claude Code or Codex sign-in, and every other bot's login, stay as they are. The desktop app's Switch account uses it.
11
+ - `hq bot switch-account --sign-in` keeps the bot's previous own login until the new browser sign-in finishes. It is not signed out first. A failed, cancelled, or killed sign-in puts that login back; the next attempt does not delete it.
12
+ - `hq integrations connect --client-secret-stdin` (and `--token-stdin`) now print a one-line prompt to stderr and read with input hidden when stdin is a terminal, so the command no longer looks frozen while it waits for the secret. Piped input is unchanged and prints nothing extra (feedback_86a49a5c).
13
+ - `hq integrations connect --auth-header` now applies the same header-name rule as hq-pro: at most 64 characters, and not a header HQ refuses to put a key in (Host, Content-Length, Expect, Content-Encoding, WWW-Authenticate, Cookie, Set-Cookie, Forwarded, Via, X-Real-IP, True-Client-IP, CF-Connecting-IP, X-Original-URL, hop-by-hop headers, HTTP2-Settings, Proxy-Authorization, Proxy-Authenticate, the headers HQ's MCP client sets itself, and any Proxy-* or X-Forwarded-* header). Authorization is still allowed. A pasted key with an inner space is now refused before sending, as hq-pro refuses it for a Bearer or custom-header key. Before, both were sent and came back as a 400 from hq-pro. (feedback_950d8abe)
14
+ - `/capacity` no longer shows Grok as signed out after its six-hour sign-in token lapses. When the stored token has expired and no `grok` process is running, HQ renews it with the stored refresh token and writes it back to `~/.grok/auth.json`. A token that cannot be renewed shows as expired, and a revoked sign-in shows as "signed out: sign-in revoked".
15
+ - `hq lanes create --provider claude --outpost primary` from a machine that is not an Outpost now reads that Outpost's Claude account snapshot and can create the lane there. The capacity probe for that explicit target waits the single-lane pickup interval. A local-target create still does not call `primary`.
16
+ - Setting up the HQ Fleet Runtime is faster. The private Python is now installed while the runtime downloads instead of after it, and its install no longer freezes the progress bar. On a Mac whose bots run under hq daemon, `hq bot create` asks the daemon to start the new bot before it registers the bot's scheduled jobs, so the bot boots while they are registered.
17
+ - When an HQ Fleet Local release bundles the runtime's Python packages for this platform, the bundle downloads with the runtime, is checked against the signed release manifest, and the runtime environment is installed from it offline instead of from PyPI. A bundle that fails its hash check stops the install with an error. A release with no bundle, or a bundle uv cannot install on this computer, uses the PyPI install as before.
18
+ - A new ChatGPT or Grok bot starts the same way as a Claude bot. When this computer already has a Codex CLI login, a Grok CLI login, or another Fleet bot's Grok login, `hq bot create` imports it without a browser before the start step, asks hq daemon to start the bot with the same request, and reports the same setup steps, with `needsSignIn: false`. Only a computer with no reusable login still gets a bot that waits for `hq bot auth`.
19
+ - `hq bot auth-status --provider <claude|chatgpt|grok> --json` prints `{ provider, signedIn, source, ok }` and changes nothing on disk. `signedIn` is true exactly when `hq bot create` with that brain needs no sign-in step; if create then cannot import that login, it fails with a plain message instead of asking for a sign-in. An unknown brain prints `{ ok: false, reason: "unknown-provider" }` and exits 1.
20
+ - `hq bot sign-in --provider <chatgpt|grok> --json` signs this computer in through the brain's own CLI before any bot exists: `codex login` or `grok login --oauth`, or their device-code login with `--no-browser`, whose code it prints as `{"event":"auth","phase":"device-code","verificationUri","userCode"}`. It ends with `{ ok, provider, signedIn, source }`, and on SIGTERM stops the CLI and ends with `reason: "cancelled"`. A later create reuses the login.
21
+ - `hq bot create`, `hq bot auth-status` and `hq bot sign-in` accept the same brain names: `claude`, `codex` or `chatgpt` (the same brain), and `grok`, in any case. `auth-status` and `sign-in` still answer with `provider: "chatgpt"` for that brain.
22
+ - `hq bot create` and `hq bot list` now count a Fleet bot (runtime 0.4.30 or newer) as ready only when its gateway reports running and ready and the bot's `status.json` for the same process also says `ready: true`. Create no longer reports ready about a second before `status.json` does, which made the app show Ready and then Starting again.
23
+ - `hq bot create --json` reports `greeting: { sent, sentAt }`: whether the new bot's first message is already on HQ, read from the time the runtime sent it. For Fleet bots, `hq bot list --json` rows fall back to the same time for `introSentAt`.
24
+ - `hq bot auth <name> --provider claude` on a Fleet bot first checks the Claude Code login on this computer. When it is signed out, it changes nothing and exits 1 with `{ ok: false, provider: "claude", signedIn: false, brainSignIn }`. A successful `hq bot auth --json` now also reports `signedIn: true` and `retried`; `retried` stays false until the runtime can answer the messages it held during the sign-out.
25
+ - For a Fleet bot whose brain is signed out, `hq bot list --json` reports `runtimeSignIn: { state: "signed-out", runtime, since }` (the tool name: claude, codex or grok) and a `brainSignIn`, read from the runtime's `state/sign-in-needed.json` marker. `hq bot auth` leaves such a running bot alone instead of restarting it, because the bot re-checks its login every 5 s and answers the waiting message itself. It waits up to 20 s for the marker to clear and reports `reloaded: true`, `restarted: false` and `retried: true` once it has.
26
+ - A Fleet bot's persona now tells it to look up its owner's companies with the hq_companies_list tool, because `hq whoami` does not list companies.
27
+ - The native `block-hq-glob` port now also answers hq-core-staging's normalizing guard (sha256 925bba9f), which denies a Glob of `<hq>/./`, `<hq>//`, `<hq>/core/..` and other spellings of the HQ root. The engine keeps the hq-core 16.0.46 guard pinned and answers it with its own string comparison, choosing by script hash. The normalizing pin takes effect only once hq-core-staging ships that script.
28
+ - Adds the HQ Native delivery library under `src/lib/delivery` with its tests. It is not connected to any `hq` command, daemon unit or startup path yet, so nothing changes for users. It contains the delivery contracts, a crash-safe store with versioned migrations and a single-controller lock, attempt reconciliation, worker enrollment and tenant-scoped identity, per-job credential planning, an MQTT outbox and inbox for notifications, a contained macOS worker launcher, signed artifact provenance with promotion, and verified backup and restore with authority transfer. The Windows worker launcher is included and fails closed: it refuses every job unless a boundary service is supplied to it, and this release supplies none. `src/lib/db/sqlite-binding.ts` now exports `isNativeBindingError`, and the delivery tests run as their own vitest project, two files at a time.
29
+ - Expired Claude tokens on the capacity card renew again on desktops where `hq daemon` runs the mesh service. That service started in the home folder and received the HQ folder only as a `--hq-root` flag, so the capacity collector's lane and account checks (`hq runners list --json`, `hq runners accounts list --json`) exited with `hq_root_unresolved`, the refresh gate failed closed on every collect, and every Claude account stayed "Token expired". The mesh unit now sets `HQ_ROOT`, as the standalone mesh LaunchAgent did before the move under `hq daemon`.
30
+ - `hq storage offload --current` matches the companies folder by exact case again. On a case-sensitive disk (Linux, Outposts), files under a personal `COMPANIES/<slug>/` folder were treated as that company's files since #2475, and `hq storage fetch` could not restore them; they are now personal files. On a case-insensitive disk (macOS), a companies folder spelled with other letter case on disk is still treated as the companies folder.
31
+ - The HQ Anywhere `claude` and `codex` wrappers in `~/.hq/bin` no longer loop with another tool's wrapper. Typing `claude` in a cmux workspace started cmux's wrapper, which ran HQ's wrapper, which picked cmux's wrapper again from PATH, at about 230 new processes a minute. HQ's wrapper now runs the next `claude` after itself on PATH (never another HQ wrapper), so cmux's wrapper and your own wrappers still run, each once. When that next one is a shell script, the wrapper sets `HQ_ANYWHERE_CLAUDE_WRAPPER_ACTIVE` (`HQ_ANYWHERE_CODEX_WRAPPER_ACTIVE` for codex). If a wrapper runs HQ's wrapper again while that variable is set, HQ's wrapper runs the real executable directly (the first `claude` on PATH that is not a shell script, then `~/.local/bin/claude` and `~/.claude/local/node_modules/.bin/claude`), or stops with exit 127 and a message that every `claude` on PATH is a wrapper. The sign-in check follows the same rule. Run `hq install --global` again to refresh an installed wrapper (feedback ed078ef7).
32
+ - `hq sync status` now takes `--all` to list every local-only file instead of the first 20 per company, and `--json` to print the full status (scope summaries and every local-only list, uncapped) as JSON. The default output is unchanged except that the truncation line now reads "... and N more (use --all to list every file)" (feedback_f29d004a).
33
+
34
+ ## [5.345.214] — 2026-11-10
35
+ - `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).
36
+ - `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)
37
+ - 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.
38
+ - 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.
39
+ - `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.
40
+ - `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.
41
+ - 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).
42
+ - 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.
43
+ - `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:
44
+ - On 16.0.45: the credential-file guard and the Glob guard. Their ports now follow the newer scripts.
45
+ - 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.
46
+ - 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.
47
+ - Released users get this only with the next engine release.
48
+ - 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).
49
+ - `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.
50
+ 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.
51
+ - `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.
52
+ - 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.
53
+
5
54
  ## [5.345.212] — 2026-11-10
6
55
  - `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
56
  - 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
  }