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

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 (241) hide show
  1. package/CHANGELOG.md +206 -1
  2. package/README.md +45 -0
  3. package/assets/scaffold/core/scripts/hq-delegate-verify.sh +5 -2
  4. package/assets/scaffold/core/scripts/lib/epochrealtime.sh +30 -0
  5. package/assets/scaffold/core/scripts/lib/work-mesh-enqueue.sh +12 -5
  6. package/dist/command-catalog.generated.d.ts +105 -10
  7. package/dist/command-catalog.generated.js +127 -10
  8. package/dist/command-help.js +3 -1
  9. package/dist/command-registration-plan.d.ts +6 -0
  10. package/dist/command-registration-plan.js +1 -0
  11. package/dist/commands/auth.d.ts +1 -1
  12. package/dist/commands/auth.js +11 -52
  13. package/dist/commands/bot.js +75 -10
  14. package/dist/commands/capacity.d.ts +4 -1
  15. package/dist/commands/capacity.js +46 -10
  16. package/dist/commands/cloud-demote.d.ts +19 -4
  17. package/dist/commands/cloud-demote.js +85 -12
  18. package/dist/commands/cloud-provision.d.ts +5 -1
  19. package/dist/commands/cloud-provision.js +6 -2
  20. package/dist/commands/cloud.d.ts +36 -0
  21. package/dist/commands/cloud.js +110 -27
  22. package/dist/commands/core-delegate-w1b.js +15 -1
  23. package/dist/commands/core-policy.js +67 -8
  24. package/dist/commands/core.js +1 -0
  25. package/dist/commands/daemon.js +9 -1
  26. package/dist/commands/dm.js +7 -0
  27. package/dist/commands/doctor-usage.d.ts +8 -0
  28. package/dist/commands/doctor-usage.js +20 -0
  29. package/dist/commands/doctor.js +7 -1
  30. package/dist/commands/env.d.ts +18 -0
  31. package/dist/commands/env.js +82 -0
  32. package/dist/commands/files-browse.d.ts +11 -4
  33. package/dist/commands/files-browse.js +21 -4
  34. package/dist/commands/files.d.ts +1 -1
  35. package/dist/commands/files.js +25 -11
  36. package/dist/commands/install-global.js +2 -2
  37. package/dist/commands/integrations-auth-rules.d.ts +27 -0
  38. package/dist/commands/integrations-auth-rules.js +79 -0
  39. package/dist/commands/integrations-import.js +124 -12
  40. package/dist/commands/lanes.js +102 -26
  41. package/dist/commands/logout.d.ts +7 -0
  42. package/dist/commands/logout.js +41 -34
  43. package/dist/commands/mesh.d.ts +2 -0
  44. package/dist/commands/mesh.js +60 -35
  45. package/dist/commands/sources.d.ts +8 -2
  46. package/dist/commands/sources.js +65 -9
  47. package/dist/commands/sync-held.js +5 -2
  48. package/dist/commands/whoami.js +26 -1
  49. package/dist/data/command-states.json +15 -0
  50. package/dist/index.js +52 -4
  51. package/dist/lazy-commands.js +5 -6
  52. package/dist/lib/anywhere-person-setting.d.ts +2 -0
  53. package/dist/lib/anywhere-person-setting.js +6 -3
  54. package/dist/lib/billing/usage-card.d.ts +25 -4
  55. package/dist/lib/billing/usage-card.js +76 -9
  56. package/dist/lib/billing/usage-cost.d.ts +3 -3
  57. package/dist/lib/billing/usage-cost.js +35 -13
  58. package/dist/lib/billing/usage-only.js +4 -2
  59. package/dist/lib/billing/usage-rate-card.d.ts +2 -2
  60. package/dist/lib/billing/usage-rate-card.js +3 -0
  61. package/dist/lib/bot/fleet-cron.d.ts +8 -0
  62. package/dist/lib/bot/fleet-cron.js +126 -7
  63. package/dist/lib/bot/fleet-daemon.d.ts +46 -0
  64. package/dist/lib/bot/fleet-daemon.js +99 -1
  65. package/dist/lib/bot/inflight.d.ts +9 -0
  66. package/dist/lib/bot/inflight.js +10 -0
  67. package/dist/lib/bot/jobs/hot-signal-sync.js +12 -1
  68. package/dist/lib/bot/probe.js +7 -1
  69. package/dist/lib/bot/run.js +20 -1
  70. package/dist/lib/bot/runtime/codex.js +1 -1
  71. package/dist/lib/bot/runtime/grok-acp.d.ts +6 -1
  72. package/dist/lib/bot/runtime/grok-acp.js +32 -14
  73. package/dist/lib/bot/runtime/grok.js +1 -1
  74. package/dist/lib/bot/runtime/index.js +19 -9
  75. package/dist/lib/bot/runtime/messages-stream.js +2 -2
  76. package/dist/lib/bot/runtime/types.d.ts +15 -0
  77. package/dist/lib/bot/runtime/types.js +9 -0
  78. package/dist/lib/bot/runtime-failure.d.ts +23 -0
  79. package/dist/lib/bot/runtime-failure.js +43 -1
  80. package/dist/lib/capacity/accounts.d.ts +8 -0
  81. package/dist/lib/capacity/accounts.js +19 -0
  82. package/dist/lib/capacity/available.d.ts +154 -0
  83. package/dist/lib/capacity/available.js +905 -0
  84. package/dist/lib/capacity/codex-availability.d.ts +14 -1
  85. package/dist/lib/capacity/codex-availability.js +26 -1
  86. package/dist/lib/capacity/collectors/claude-oauth.d.ts +29 -2
  87. package/dist/lib/capacity/collectors/claude-oauth.js +104 -7
  88. package/dist/lib/capacity/collectors/codex.js +10 -7
  89. package/dist/lib/capacity/ledger.d.ts +37 -1
  90. package/dist/lib/capacity/ledger.js +207 -30
  91. package/dist/lib/capacity/project.d.ts +26 -0
  92. package/dist/lib/capacity/project.js +137 -8
  93. package/dist/lib/capacity/refusal-rows.d.ts +31 -0
  94. package/dist/lib/capacity/refusal-rows.js +61 -0
  95. package/dist/lib/capacity/refusal.d.ts +53 -2
  96. package/dist/lib/capacity/refusal.js +284 -65
  97. package/dist/lib/capacity/route.js +46 -11
  98. package/dist/lib/capacity/widget.d.ts +12 -1
  99. package/dist/lib/capacity/widget.js +91 -3
  100. package/dist/lib/daemon/flag-monitor.d.ts +8 -0
  101. package/dist/lib/daemon/flag-monitor.js +17 -6
  102. package/dist/lib/daemon/flag.d.ts +65 -1
  103. package/dist/lib/daemon/flag.js +190 -40
  104. package/dist/lib/daemon/ops/policy.js +62 -5
  105. package/dist/lib/daemon/paths.d.ts +72 -2
  106. package/dist/lib/daemon/paths.js +154 -3
  107. package/dist/lib/daemon/resolver.d.ts +2 -0
  108. package/dist/lib/daemon/resolver.js +3 -0
  109. package/dist/lib/daemon/run.d.ts +9 -0
  110. package/dist/lib/daemon/run.js +79 -21
  111. package/dist/lib/daemon/selfcheck.d.ts +22 -0
  112. package/dist/lib/daemon/selfcheck.js +40 -1
  113. package/dist/lib/daemon/server.d.ts +5 -1
  114. package/dist/lib/daemon/server.js +17 -23
  115. package/dist/lib/daemon/state-file-switch.d.ts +57 -0
  116. package/dist/lib/daemon/state-file-switch.js +88 -0
  117. package/dist/lib/daemon/state-file.d.ts +198 -0
  118. package/dist/lib/daemon/state-file.js +419 -0
  119. package/dist/lib/daemon/tcc-eperm.d.ts +153 -0
  120. package/dist/lib/daemon/tcc-eperm.js +310 -0
  121. package/dist/lib/daemon/timed-flag-monitors.d.ts +47 -0
  122. package/dist/lib/daemon/timed-flag-monitors.js +75 -0
  123. package/dist/lib/delivery/admission.d.ts +86 -0
  124. package/dist/lib/delivery/admission.js +148 -0
  125. package/dist/lib/delivery/artifacts.d.ts +7 -1
  126. package/dist/lib/delivery/artifacts.js +29 -10
  127. package/dist/lib/delivery/attempt-id.d.ts +13 -0
  128. package/dist/lib/delivery/attempt-id.js +16 -0
  129. package/dist/lib/delivery/disposable-target.d.ts +42 -0
  130. package/dist/lib/delivery/disposable-target.js +111 -0
  131. package/dist/lib/delivery/effects.d.ts +136 -0
  132. package/dist/lib/delivery/effects.js +541 -0
  133. package/dist/lib/delivery/enrollment.d.ts +21 -17
  134. package/dist/lib/delivery/enrollment.js +83 -5
  135. package/dist/lib/delivery/escalations.d.ts +51 -0
  136. package/dist/lib/delivery/escalations.js +60 -0
  137. package/dist/lib/delivery/lease.d.ts +80 -0
  138. package/dist/lib/delivery/lease.js +134 -0
  139. package/dist/lib/delivery/migrations.d.ts +120 -4
  140. package/dist/lib/delivery/migrations.js +215 -15
  141. package/dist/lib/delivery/mqtt.d.ts +2 -0
  142. package/dist/lib/delivery/mqtt.js +7 -0
  143. package/dist/lib/delivery/reconciler.d.ts +65 -1
  144. package/dist/lib/delivery/reconciler.js +224 -13
  145. package/dist/lib/delivery/rpc/client.d.ts +22 -0
  146. package/dist/lib/delivery/rpc/client.js +159 -0
  147. package/dist/lib/delivery/rpc/port.d.ts +40 -0
  148. package/dist/lib/delivery/rpc/port.js +16 -0
  149. package/dist/lib/delivery/rpc/server.d.ts +30 -0
  150. package/dist/lib/delivery/rpc/server.js +205 -0
  151. package/dist/lib/delivery/rpc/wire.d.ts +85 -0
  152. package/dist/lib/delivery/rpc/wire.js +143 -0
  153. package/dist/lib/delivery/store.d.ts +2 -0
  154. package/dist/lib/delivery/store.js +4 -0
  155. package/dist/lib/delivery/windows-service-install.d.ts +262 -0
  156. package/dist/lib/delivery/windows-service-install.js +892 -0
  157. package/dist/lib/delivery/workers/macos.d.ts +16 -1
  158. package/dist/lib/delivery/workers/macos.js +54 -12
  159. package/dist/lib/delivery/workers/windows-service-live.d.ts +121 -0
  160. package/dist/lib/delivery/workers/windows-service-live.js +711 -0
  161. package/dist/lib/delivery/workers/windows-service-runner.d.ts +33 -0
  162. package/dist/lib/delivery/workers/windows-service-runner.js +82 -0
  163. package/dist/lib/delivery/workers/windows-service.d.ts +140 -0
  164. package/dist/lib/delivery/workers/windows-service.js +584 -0
  165. package/dist/lib/delivery/workers/windows.d.ts +32 -22
  166. package/dist/lib/delivery/workers/windows.js +50 -64
  167. package/dist/lib/doctor/checks/host-core.d.ts +50 -0
  168. package/dist/lib/doctor/checks/host-core.js +269 -0
  169. package/dist/lib/doctor/checks/replay-recorder.d.ts +39 -0
  170. package/dist/lib/doctor/checks/replay-recorder.js +261 -0
  171. package/dist/lib/doctor/registry.js +4 -0
  172. package/dist/lib/environment/profile.d.ts +239 -0
  173. package/dist/lib/environment/profile.js +251 -0
  174. package/dist/lib/hook-engine/reconcile.js +39 -13
  175. package/dist/lib/hook-engine/registration.d.ts +9 -0
  176. package/dist/lib/hook-engine/registration.js +19 -0
  177. package/dist/lib/hot-channels/adapters/meetings.d.ts +15 -0
  178. package/dist/lib/hot-channels/adapters/meetings.js +36 -3
  179. package/dist/lib/hot-channels/adapters/slack.d.ts +21 -5
  180. package/dist/lib/hot-channels/adapters/slack.js +64 -21
  181. package/dist/lib/hot-channels/alert.d.ts +2 -0
  182. package/dist/lib/hot-channels/alert.js +8 -1
  183. package/dist/lib/hot-channels/contract.d.ts +12 -0
  184. package/dist/lib/hot-channels/contract.js +7 -0
  185. package/dist/lib/hot-channels/loop.js +1 -0
  186. package/dist/lib/hot-channels/run.d.ts +6 -0
  187. package/dist/lib/hot-channels/run.js +4 -0
  188. package/dist/lib/hot-channels/signals-pass.d.ts +74 -1
  189. package/dist/lib/hot-channels/signals-pass.js +82 -41
  190. package/dist/lib/hot-channels/signals-redo.js +10 -2
  191. package/dist/lib/install/claude-targets.d.ts +12 -1
  192. package/dist/lib/install/claude-targets.js +57 -5
  193. package/dist/lib/install/codex-targets.d.ts +2 -2
  194. package/dist/lib/install/codex-targets.js +36 -6
  195. package/dist/lib/install/hook-target.d.ts +3 -0
  196. package/dist/lib/install/hook-target.js +11 -0
  197. package/dist/lib/lanes/canonical-host.d.ts +35 -0
  198. package/dist/lib/lanes/canonical-host.js +65 -0
  199. package/dist/lib/lanes/host-capacity.d.ts +30 -0
  200. package/dist/lib/lanes/host-capacity.js +29 -3
  201. package/dist/lib/lanes/watcher.js +35 -0
  202. package/dist/lib/mesh/live/daemon/run.d.ts +2 -0
  203. package/dist/lib/mesh/live/daemon/run.js +5 -2
  204. package/dist/lib/mesh/live/flush.d.ts +5 -1
  205. package/dist/lib/mesh/live/flush.js +12 -6
  206. package/dist/lib/mesh/live/reporting-privacy.d.ts +32 -0
  207. package/dist/lib/mesh/live/reporting-privacy.js +56 -1
  208. package/dist/lib/mesh/live/spool.d.ts +7 -0
  209. package/dist/lib/mesh/live/spool.js +25 -0
  210. package/dist/lib/person-setting-cache.d.ts +38 -0
  211. package/dist/lib/person-setting-cache.js +98 -0
  212. package/dist/lib/safe-store.d.ts +245 -0
  213. package/dist/lib/safe-store.js +777 -0
  214. package/dist/lib/signals/engine.d.ts +29 -2
  215. package/dist/lib/signals/engine.js +103 -4
  216. package/dist/lib/signals/reply.js +73 -18
  217. package/dist/lib/signals/steps/adapters.js +7 -2
  218. package/dist/lib/signals/steps/extract.d.ts +13 -0
  219. package/dist/lib/signals/steps/extract.js +122 -6
  220. package/dist/main.js +46 -3
  221. package/dist/schemas/hq-available-ai.v1.schema.json +76 -0
  222. package/dist/schemas/hq-environment-profile.v1.schema.json +438 -0
  223. package/dist/utils/auth-expiry.d.ts +8 -0
  224. package/dist/utils/auth-expiry.js +53 -0
  225. package/dist/utils/catalog-runtime-paths.d.ts +34 -0
  226. package/dist/utils/catalog-runtime-paths.js +53 -0
  227. package/dist/utils/cli-telemetry.d.ts +21 -0
  228. package/dist/utils/cli-telemetry.js +34 -0
  229. package/dist/utils/command-usage.d.ts +275 -0
  230. package/dist/utils/command-usage.js +797 -0
  231. package/dist/utils/files-browse-acl.js +1 -1
  232. package/dist/utils/hook-trust.d.ts +7 -0
  233. package/dist/utils/hook-trust.js +31 -4
  234. package/dist/utils/host-registration.d.ts +126 -0
  235. package/dist/utils/host-registration.js +378 -0
  236. package/dist/utils/resident-package-preload.js +2 -0
  237. package/package.json +10 -8
  238. package/scripts/bench-core.mjs +1096 -0
  239. package/scripts/check-function-manifest.mjs +702 -0
  240. package/dist/lib/delivery/workers/windows-boundary.d.ts +0 -453
  241. package/dist/lib/delivery/workers/windows-boundary.js +0 -693
package/CHANGELOG.md CHANGED
@@ -2,15 +2,175 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [5.345.215-beta.0] — 2026-11-11
5
+ ## [5.345.217] — 2026-11-14
6
+
7
+ - Windows Grok ACP bots (Grok 1.0.77) no longer split each reply into one-word messages, fail permission and terminal RPC, drop resumed chats that omit `sessionId`, or die on `--no-subagents` (`feedback_0af4d198`). MCP OAuth crashes, Windows daemon self-restart, and cross-machine bot credential theft are unchanged.
8
+
9
+ - `scripts/bench-core.mjs` refuses a linked git worktree as `--root` for the old or selected core, since the old core exits 2 on every event there, and a hook that exits nonzero is reported with the first line of its stderr.
10
+ - The local command count no longer follows a link at
11
+ `~/.hq/command-usage/usage.tsv` and no longer waits on a named pipe there.
12
+ When that path is a link (symbolic or hard), a pipe, or a folder, or the
13
+ folder is a link, belongs to another user, or is writable by others, no
14
+ count is kept and the command runs as it would otherwise.
15
+ - An existing `~/.hq/command-usage` folder of yours that only you can write to
16
+ (for example mode 0755) is changed to mode 0700 the next time `hq` counts a
17
+ run. A folder that the group or others can write to is left as it is, and no
18
+ count is kept in it.
19
+ - `--i-still-use-this` is read only before the command's own arguments
20
+ (`hq old thing --i-still-use-this`). In `hq run tool --i-still-use-this` the
21
+ flag now belongs to `tool`.
22
+ - An installed `hq` ignores the test-only variable that names another command
23
+ states table, so the environment cannot switch the retiring-command gate off.
24
+ - The daemon state file (`~/.hq/daemon/hq-state.json`) is now behind a switch that is on by default, so nothing changes unless it is turned off. To turn it off on one machine, set `HQ_FLAG_DAEMON_STATE_FILE=false` in the daemon's and the hooks' environment or create the file `~/.hq/daemon-state-file.off`; the flag `daemon-state-file` set to `false` turns it off too. While it is off the daemon writes no state file and no self-check result for it, and removes its own previous state file once (only a regular file of the user's in a private daemon folder; a link is never followed). The hook engine then reads flags from the flag snapshot only, as it did before the state file. A daemon folder that is a symlink or belongs to another user no longer stops the daemon from starting; other daemon folders (requests, bundle stages, logs) are still refused when they cannot be made private. If the switch is turned off only by the server flag and the old file could not be removed, hooks keep reading that file until it expires (at most 11 minutes).
25
+ - The daemon now keeps a state file (`~/.hq/daemon/hq-state.json`, owner-only) that hooks can read instead of starting Node or calling the network. It holds the flag values the registry returned for the daemon's scope, the vault access list (company, role, granted paths and their permission) and the latest machine-check results, and it states its own maximum age (10 minutes). It is rewritten atomically from each flag registry answer the daemon's timed flag monitors already share, so it adds no registry request and no delay to a kill switch; when the daemon is signed out or the registry cannot be reached the file carries no flag values. The hook engine reads it with no process and no network call, alongside the existing flag snapshot, which is unchanged; a missing, stale, truncated or future-dated file is ignored, so guards keep working and flag-gated extras use their defaults. On macOS and Linux the engine reads the file only from the default daemon folder: it opens that folder without following a symlink, opens the file relative to it without following a symlink, and reads it only when the folder and the file belong to the user and are not writable by group or others and the file is a regular file with one link. On Windows the engine does not read the state file yet and uses the flag snapshot.
26
+ - `hq cloud demote company` now works right after `hq cloud retire company` without `--force`. hq-pro hides a retired company from the by-slug lookup and answers `GET /entity/{uid}` with 404, so on a by-slug miss demote reads the uid and slug from the company's own `.hq/config.json` and treats a 404 for that uid as retired or gone. The JSON result's `cloud_check` field names the 404. A 403, 5xx or network error, a live entity, a missing local uid, or a config slug that differs still refuses, and every refusal names `--force`.
27
+ - `hq dm` (send, inbox, thread, channel, requests and the rest) now stops straight away with a clear message when `HQ_API_KEY` is set, instead of opening a browser sign-in and hanging. The DM service has no API-key route, so run `hq login` once and unset `HQ_API_KEY` to send a DM.
28
+ - New `hq env validate <file>` checks an environment profile against the new `hq-environment-profile.v1` schema (`src/schemas/hq-environment-profile.v1.schema.json`). A profile describes one place that can do work (this machine, an Outpost, a MicroVM template) as a declared part and a set of readings that each carry `observed_at` and `ttl_seconds`. Every login in a profile records its owning business and its holder: a login the owner holds is listed with its label whichever of the owner's businesses owns it, and a login held by another person is listed by existence only. A login is marked `usable` only when the owner holds it and it is enabled and signed in. `room.availability` takes the same words `hq capacity available` emits. A string shaped like a credential is rejected anywhere in a profile. The command is read-only, needs no sign-in, exits 1 when the file is rejected, lists at most 100 issues, reads files up to 5 MB, and refuses any other `schema_version` by name. Nothing writes or reads a profile yet; `--json` prints the result for scripts.
29
+ - `hq lanes create` no longer fails with a stale `laneVersion` HTTP 400 after the worker has started. The 400 comes from the Work Mesh `lane_started` event append (`lane.laneVersion is stale`); the CLI now re-reads the lane and retries that one event once, using the fresh version. The worker is already running at that point, so any remaining Work Mesh failure (stale after the retry, a failed `lane_started` event, a failed lane registration, a failed story status patch) returns `ok: true` with a `story_warning` that starts with `Lane <id> is RUNNING (do not re-run create)` and names what did not sync plus the manual `hq mesh story ... --status in_progress` fix. A non-zero exit is avoided so a conductor does not retry and start a second worker.
30
+ - Fix three failures in the all-platform hq-hook workflow: the native block-hq-glob hook now words a missing tool interpreter like bash 5.2 on Linux ("cannot execute: required file not found"), and two tests no longer assume a jq version (post_tool_use_records_receipts_and_proofs) or that C:\a is absent (folder_paths_follow_cygwin). Feedback 983159de.
31
+ - On Linux with GNU awk, the native policy hooks now read prompts and policy files that have text outside ASCII in a UTF-8 locale, as gawk does, instead of returning those calls to the bash hook. Other Linux awks (mawk, busybox) are unchanged. The hq-hook crate also passes `cargo fmt --check` and clippy on stable Rust 1.100 again.
32
+ - The hq-hook store code no longer fails clippy's `unnecessary_cast` check on Linux: the sticky-bit mode checks use a `u32` constant instead of casting `libc::S_ISVTX`, whose type is `u32` on Linux and `u16` on macOS. No behavior change.
33
+ - `hq bot list` and `hq bot status` now report an HQ Fleet Runtime bot as answering while its gateway is running a turn, so the desktop app keeps the bot's working line up on turns longer than two minutes. The start time stays empty for these bots.
34
+ - Adds `scripts/check-function-manifest.mjs`, the check for the HQ function manifest (`core/functions.yaml` in hq-core): it fails when a function has two owners, when a command, daemon file, hook or core script exists that the manifest does not list, or when something still names a retiring or removed function. The script ships in the package so the hq-core pull request job can run it; no `hq` command changes.
35
+ - A resumed Grok bot chat on Windows now posts only the new reply. Before, the earlier conversation that Grok replays when it loads a saved session could be posted ahead of the new answer.
36
+ - Adds `scripts/bench-core.mjs`, the speed gate for the HQ hook core. It measures the time HQ adds to one tool call and to one prompt for Claude Code, Codex and Grok Build, for the old bash core, `hq-hook run`, or whatever the host's registration runs, and reports pass or fail against 150 ms per tool call and 300 ms per prompt. Cores are run in alternating order, each result keeps its median, spread and the load average, and a slow result taken under heavy load is reported as not decidable. It needs only Node, writes a JSON and a text report, and ships in the package so a bot box can run it over SSH. No `hq` command changes.
37
+ - block-hq-glob: the Rust hook works out `git rev-parse --show-toplevel` itself, following git's repository discovery, config checks and ownership check, and starts git only for shapes it cannot prove.
38
+ - block-hq-glob: searched paths outside ASCII are now compared natively instead of always starting git.
39
+ - block-hq-glob: a non-empty BASH_ENV other than /dev/null hands the call back to bash, and six more GIT_* variables that cannot change the toplevel no longer force git.
40
+ - block-hq-glob: on Windows, the `nul` value MSYS passes for `BASH_ENV=/dev/null` no longer hands every bridged call back to bash.
41
+ - block-hq-glob: config values that older git releases (2.39, 2.43) die on, and `core.whitespace` values with a rule git may read as tab-in-indent (including shortened names such as `tab`), are left to the installed git instead of being answered natively.
42
+ - The host canary uses the CLI’s shared safe-store implementation for evidence files, bundled for standalone Node 20 and 22 hook callbacks.
43
+ - Add a scripted host canary that checks an allowed call, a denied protected write, and policy injection against disposable HQ snapshots, and fails when a requested host cannot be verified.
44
+ - A daily hot-channel sync that fails without an error line no longer alerts "gave no reason". The alert says whether hq printed nothing or printed output with no error, and for an empty run the log records the command the job ran. `hq sources` commands name an error that has no message by its class, code and cause instead of printing a bare cross.
45
+ - With `cli.bot-signals-engine-job` off, a daily hot-channel sync whose signals step fails now sends the owner a direct message. The message names the channels affected, the cause, one fix step and the log. Before, the alert went only to the job's log because the sync still exited 0. A run that lands sources and finds no signals without an error still goes only to the log. The job alert also names Claude usage limits, unreadable Claude replies and other Claude errors with their own fix steps.
46
+ - Flag `core.next` (off by default) makes `hq reindex` register Claude Code, Codex and Grok Build hooks as a direct call of `hq-hook run --host <host> <Event>` through a release-stable path, so Codex keeps trusting the hooks across releases. An event switches only when the engine reports (`hq-hook capabilities --json`) every evaluator that event needs; every other event, and every event on Windows, keeps the old registration. `HQ_CORE_NEXT=off` or the file `~/.hq/state/core-next.off` sends the next event to the old dispatcher without a reinstall, and `hq doctor` shows which core each host uses per event and why. With the flag off, registrations are unchanged.
47
+ - `hq-hook record` can record hook events on a trial machine: when the flag
48
+ `core.replay-recorder` is on for the person or machine, each event's payload
49
+ and the hook answer are redacted and appended to a size-capped store under
50
+ `~/.hq/replay-recorder`. It is off by default; `HQ_REPLAY_RECORDER` set to
51
+ `off`, `0`, `false`, `no` or `disabled`, or `~/.hq/replay-recorder.off`,
52
+ turns it off. It records on macOS and Linux only; on Windows it records
53
+ nothing for now. `hq doctor` shows whether it is on and how much it holds.
54
+ - `hq` now keeps a local count of the commands you run, in
55
+ `~/.hq/command-usage/usage.tsv`: the date and the command name of each run,
56
+ never arguments or values. The file is never sent, synced, or attached to
57
+ feedback, so `HQ_TELEMETRY=0` does not turn it off; it is kept to about
58
+ 512 KiB and 30 days. `hq doctor usage` (and `--json`) shows the counts, and a
59
+ one-time notice on the first interactive run says what is stored.
60
+ - A command that is being retired no longer runs: it prints what replaced it
61
+ and exits non-zero. Add `--i-still-use-this` after the command name to run it
62
+ anyway; those runs are counted apart. No command is marked as retiring in
63
+ this release.
64
+ - `scripts/replay-harness.mjs` runs the old hook core and the new one on the same events and compares the decision, the block reason class and the injected policies. It runs the existing corpora first, then the old core against itself to leave out events that are not repeatable, then old against new. A difference passes only when `replay/intended-differences.yaml` (or a story's own list) names it with a reason. The ledger and the replay files have a code owner. Nothing that runs for users changes.
65
+ - Six commands are now marked as being retired: `hq crm entity list`,
66
+ `hq crm entity get`, `hq report promote`, `hq report discard-draft`,
67
+ `hq report access` and `hq report templates`. Run without a flag, each one
68
+ prints `"<command>" is being retired and did not run. No replacement is
69
+ listed.` and exits non-zero without doing anything. To run one anyway, add
70
+ `--i-still-use-this` after the command name, for example
71
+ `hq report access <reportId> --mode company --i-still-use-this`; it then
72
+ works as before and the run is counted apart in `hq doctor usage`. Nothing
73
+ is deleted in this release, and `hq --help` still lists the commands.
74
+ - `hq crm entity upsert`, `hq report get`, `hq report publish`,
75
+ `hq report adopt` and `hq report decommission` are unchanged: the CRM pack
76
+ and scheduled report jobs still run them. `hq db`, `hq team-sync`,
77
+ `hq modules` and `hq deploy` are unchanged.
78
+ - `hq auth logout` now signs out the same way as `hq logout`: it ends the
79
+ session on the HQ server (the refresh token is revoked) and then deletes the
80
+ local tokens. Before, it only deleted the local file. If the server cannot be
81
+ reached, both commands still delete the local tokens and say the session
82
+ could not be ended everywhere.
83
+ - `hq whoami` now also shows what `hq auth status` showed: whether the session
84
+ is valid or about to expire, when it expires, and the token source.
85
+ `hq whoami --json` adds `sessionExpiresAt` and `sessionExpiring`.
86
+ - `hq packages packs list`, `hq packages packs update`,
87
+ `hq packages packs uninstall` and `hq packages remove` are being retired.
88
+ They no longer run and instead name the command to use: `hq packs list`,
89
+ `hq packs update`, `hq packs uninstall` or `hq remove`. Add
90
+ `--i-still-use-this` after the command name to run one anyway.
91
+ - `hq-hook run` now carries the company scope guard as a native evaluator (`company-scope`, slot 2) for Read, Write, Edit, MultiEdit, NotebookEdit, Grep, Glob and Bash. Bash commands are read by a shell reader in Rust instead of starting `mandatory-scope-authorizer.sh`, and the cross-company settings warning comes from the same evaluator. The guard writes no session store files, reads the multi-company flag cache only (a miss counts as off), and refuses a command it cannot read. It refuses some commands the bash guard allows; the list is in `crates/hq-hook/tests/fixtures/US-012/intended-differences.yaml`.
92
+ - `hq-hook run --host` refuses an agent's prompt or compaction it cannot evaluate. When a payload names an agent, or cannot be read at all, and the program has no verdict (unreadable payload, wrong event, panic, time budget, unusable command line, or an evaluator in the chain that panics or overruns), UserPromptSubmit and PreCompact are refused on Claude Code and Codex, and UserPromptSubmit on Grok Build. SubagentStart cannot be refused on any host; the tool call that starts the agent and every tool call inside it already fail closed. No registration calls `run` yet, so hook behavior is unchanged.
93
+ - `hq-hook run --host <host> <Event>` now asks one ordered chain of evaluators, listed in `crates/hq-hook/src/host/registry.rs`. The chain stops at the first refusal, keeps an ask unless a later evaluator refuses, merges added context under the host's size limit by a stated priority, and refuses a tool call when an evaluator panics or passes the time budget. `hq-hook run --list-evaluators` prints the registered evaluators. The list is empty in this change, so hook behavior is unchanged.
94
+ - `hq-hook run --host <claude|codex|grok|fleet-local|agents-v2> <Event>` is a new native entry point for every host. It reads the host's hook payload into one event model and writes the answer in that host's format, exit code and size limit. It starts no bash, Node or jq process, refuses a tool call when it cannot read the payload or passes its time budget, and recognises the same registration loaded twice without leaving a file per event. No registration calls it yet and no guard is wired to it, so hook behavior is unchanged.
95
+ - `hq-hook run --host <host> Stop` and `PreCompact` now run one native check. At Stop it reads the transcript tail once and applies the checkpoint gate, the capability-link, final-message link-placement and humanize-before-send checks in the old order (first block wins), and appends the Work Mesh `turn_end` line to `~/.hq/work-mesh/spool.jsonl` itself. At an automatic compaction it prints one banner with one first action (`/checkpoint`). It starts no process. Its state files are opened relative to a held folder and refuse links, FIFOs, extra hard links and files others can write. No host registration calls `hq-hook run` yet, so hook behavior is unchanged.
96
+ - `hq-hook dispatch` now blocks when a hook registry safety guard (`"safety": true`) ends without a verdict, as master-hook.sh does. A safety guard allows only with exit 0, and exit 2 stays its own block. A guard killed by a signal exits 2 with `guard crashed, blocked: <id> was killed by signal 11 (SIGSEGV, exit 139), so this tool call was not checked.`; a timeout blocks with `guard timed out, blocked`; exit 1 and any other code block with `guard failed, blocked: <id> exited <n> without a verdict`. Exit 1 blocking is an owner decision (2026-11-10): a guard's internal error exits 1 under bash 5 but 127 under bash 3.2. Non-safety hooks keep exit 1 as a non-blocking hook error, and a guard marked both `safety` and `fail_closed` gets the safety message. Before, the engine did not read `safety`, so a guard that crashed with exit 139 was passed on and the host ran the tool call. The hook index carries the new field (index format 4; a format-3 row is rejected), and `hq-hook index registry` still prints the 11 fields it printed before. A new pull-request workflow (`hq-hook-pr.yml`) runs the crate's tests on Linux when `crates/hq-hook` changes.
97
+ - The native company scope guard in `hq-hook run` finds its HQ root as the bash guard does: the registration's `--hq-root` first, then `CLAUDE_PROJECT_DIR`, then the HQ installation the `hq-hook` binary sits in, then the working directory. It no longer reads `HQ_ROOT`. `hq-hook run --host` takes `--hq-root` for every host, the Fleet hosts included. Without a root it can trust (no `--hq-root`, no usable `CLAUDE_PROJECT_DIR`, no installation around the binary, and a working directory outside HQ) it refuses every Bash call, saying `--hq-root` is required, and refuses a Read, Write, Edit, Glob or Grep whose target or search folder is in an HQ tree or holds one below it. `hq reindex` always passes `--hq-root`, so installed registrations are unaffected. Its refusal for a call it cannot decide is one line. `scripts/replay-harness.mjs` runs the new core with `--hq-root` (its working copy, or a stand-in HQ tree). Correction to the earlier entry for the native guard: it does write one session store file, the capability a subagent inherits from its parent, as the bash guard does.
98
+ - The native Stop check (`hq-hook run --host <host> Stop`) now queues the five background jobs the old Stop path started as processes: the checkpoint after a turn that already replied, the Codex heartbeat checkpoint, the company checkpoint-setting refresh, the Codex eligibility probe and the Bash autosave sweep. Each becomes one line in `~/.hq/daemon/jobs/stop-jobs.jsonl` with the old argv, working directory and allowlisted environment, written only on the Stops where the old path started the job. Nothing runs these lines yet; the `hq daemon` drain is a follow-up. A refused queue drops the line and prints one stderr line. It never blocks a Stop. No host registration calls `hq-hook run` yet, so hook behavior is unchanged.
99
+ - `hq-hook`'s file store (`crates/hq-hook/src/host/store.rs`) no longer follows a link placed at any folder above a store file. It used to check only the file's own folder, so a link at a higher folder (for example `~/.hq` or `~/.hq/state`, or `workspace/orchestrator` for the callers that keep policy and image state) redirected the duplicate-event ledger and the engine log, and created folders, behind it. The folder is now opened by walking its path from `/` one folder at a time without following a link; only a link root owns, on a path of folders root alone may write (`/var` and `/tmp` on macOS), is followed, and no link is followed past a folder others may write (root's sticky `/tmp` included). Every folder above must belong to root or to this account and not be writable by others (root's sticky `/tmp` aside). A refused path drops the log line or leaves the ledger unavailable, as before; no hook answer changes. When a folder on the ledger's or the engine log's path can be written by group or other, as umask 0002 leaves `~/.hq`, `hq-hook run` names the folder (escaped, never as a command) and the fix in words in one stderr line, once per session, on an allowed call only.
100
+ - HQ MCP calls and gateway calls now show as "$0.10 per 100 calls". The
101
+ bundled price card matches the live feed, at $0.001 a call for both. A
102
+ price under one cent no longer prints as $0.00.
103
+ - HQ Native delivery tests (not used by any `hq` command): the delivery gate now runs build and test through the macOS worker over the local network connection, adds a check that a cut-off worker's claim expires and is picked up again without a restart, and gains a developer-only script to run the gate live on one Mac. The live run itself still waits on the owner's approval.
104
+ - `hq session add company` now widens the daemon's check lock too. After adding a company, later reads of that company are no longer blocked as locked to the original one (`feedback_a4a04ca0`, `feedback_cf07aef6`).
105
+ - The daemon's five timed flag monitors (four kill switches and the HQ Anywhere runtime gate) now share one flag registry request per 30-second tick instead of making one each. A signed-in machine running the daemon all day drops from 14,400 to 2,880 of these requests per day. A kill switch still applies on the next tick, and a failed read still returns each flag to its existing default. A new test runs the monitors through a simulated idle hour and fails when their server requests go over a stated budget.
106
+ - The Work Mesh Live daemon no longer asks the server for your HQ Anywhere
107
+ setting every 10 seconds. It makes no request while there is nothing to
108
+ send, reads the setting once when it first has something to send, and reads
109
+ it again when your sign-in or the local HQ Anywhere state changes, or after
110
+ 15 minutes. If the setting cannot be read, nothing is reported.
111
+ - `hq runners capacity --json` now prints `host.aliases`: the other ids this machine is recorded under. `host.id` is unchanged (the Outpost id from `/etc/outpost/outpost-id` on an Outpost, the stable id from `~/.hq/lane-host.json` elsewhere). The aliases are the hostnames in `~/.hq/lane-host.json`, the current hostname, and any host id from a lane record of the last 30 days that refers to this machine. The list is printed on every machine, and in the `host_capacity` entries of `hq runners list --json` for an Outpost that reports it. It is for reading and never decides which lanes count. On a machine that is not an Outpost, the same command now counts the lanes that lane admission already treats as running on this machine. Before, a lane stamped with the machine's old hostname id was listed under `queued_lanes` and left out of the `running` and `queued` counts. Counting on an Outpost is unchanged. No record is rewritten, and a snapshot from an older CLI without `host.aliases` still parses.
112
+ - Add declarative path and search checks to the optional native hook entrypoint, with legacy root selection, scoped Glob checks across symlinked roots, rule listing, and explicit approval rules for protected artifacts.
113
+ - `hq sync push`, `hq sync push --all` and `hq sync now` now describe skipped files in plain words everywhere, for example "2 already up to date, 1 merged with the cloud copy, 1 held for the next pass", instead of a bare "N skipped". Conflicts, broken links and skips that need a look are grouped as "N skipped (...)", with any skips the CLI cannot attribute named "N other" inside the group (for example "3 skipped (2 conflicts, 1 other)"), and the company line shows a warning mark for them. When every skip is unattributed the line stays a plain "N skipped" and does not turn yellow.
114
+ - The retiring-command refusal and its notice, described in other notes for
115
+ this release, are switched off before shipping. No command is refused or
116
+ warned about for being retired. The ten commands marked `retiring`
117
+ (`hq crm entity list`, `hq crm entity get`, `hq report access`,
118
+ `hq report discard-draft`, `hq report promote`, `hq report templates`,
119
+ `hq packages packs list`, `hq packages packs update`,
120
+ `hq packages packs uninstall` and `hq packages remove`) behave as they did
121
+ in 5.345.215.
122
+ - `--i-still-use-this` is accepted. Its only effect is that the run is counted
123
+ apart in `hq doctor usage`.
124
+ - The local command count (`hq doctor usage`) and the list of commands marked
125
+ `retiring` stay in place.
126
+ - Adds an internal module, `src/lib/safe-store.ts`, that the local stores
127
+ `hq` keeps under your home folder will use to read and write their files.
128
+ It holds the store folder open, refuses a folder or file that a link, a
129
+ pipe, another user or a group- or world-writable mode could redirect, and
130
+ refuses an operation when the folder was replaced while it ran. No store
131
+ uses it yet, so nothing changes in this release.
132
+ - `hq signals run --trigger job` on a day the job already ran now marks the day's run record with `alreadyRanToday: true` instead of only reporting it in memory. The record keeps the earlier run's outcome, a dry run writes nothing, and a later chat or manual run writes a fresh record as before.
133
+ - A signals run that stops at its spend cap no longer tells the member "This looks temporary." The reply names the source it stopped at and the cap, and says how to raise the cap for one run: `hq signals run --company <slug> --max-budget-usd <amount>`. When another step also had a problem, the reply keeps that step's guidance and adds the spend-cap line after it.
134
+ - `hq sources signals` no longer skips the remaining channels after one channel's signals pass fails, and its count now includes the signals a failed channel wrote before it failed. The report lists each failed channel (`failedChannels` in `--json`).
135
+ - Incremental signal extraction: when the run stops between two sources because the budget left is below the last source's cost (or is used up), the run record now names the source it did not start under `detail.budgetStoppedAt`. Before, only a stop inside a source was named. In both cases the field names the first source left unfinished, which the next run takes first.
136
+ - Incremental signal extraction: when Claude stops the turn at its budget cap the step now returns `budget-exceeded` and leaves the cursor in place. Before, it failed with a message to check the login.
137
+ - `hq signals run`: signal candidates with no citation marker in the body are now counted in the run record under `detail.uncitedCandidates`, with their sources under `detail.uncitedSources`. Nothing is rejected or left unprocessed for a missing citation. Entity candidates are not counted.
138
+ - The hot-channel sync's signals step uses Claude Code. When Claude Code is not installed or not signed in and your main bot runs on Codex, the step now fails with the code `claude-logged-out-codex-bot` and says to sign in to Claude Code on this computer (`claude auth login`). The owner's alert and the job's direct message say the same. When the main bot runs on Claude, the message is the same as before.
139
+ - The bot's hot-signal-sync job (signals engine path) now checks yesterday's and today's run records before each fire and each automatic retry, so a morning run that hung is reported at the next morning's fire at the latest. A record still `running` with no live run lock (its process is gone, it holds no lock, or the lock is more than 3 hours old), or a `failed` record, that landed sources and produced no signals sends the owner the same signals-failure DM the end-of-run check sends, with the same hourly dedupe. One stopped run is alerted at most once.
140
+ - `hq signals run --trigger job`: when marking the day's run record `alreadyRanToday` fails, the error is logged and the earlier run's record is left as it was, instead of being replaced by a failed record.
141
+ - A hot-channel sync that fails only because of a rate limit (Slack's `app_rate_limited`, or a Linear, Attio or Gmail 429 after every retry) is now recorded as temporary in the signals run record, so the run keeps its automatic retry and the reply says it looks temporary.
142
+ - The Slack hot-channel sync no longer fails forever on an old Slack rate-limit marker. A marker whose newest pause is an hour old counts as resolved, and a marker dated in the future or with no readable time no longer blocks the sync. Before, a company that sent no later Slack event kept the marker open and every Slack sync failed as a temporary rate limit.
143
+ - `hq sources sync` has a new `--trigger` option (`scheduled` or `on-demand`, default `on-demand`) that sets the trigger its run-ledger lines record. With `cli.bot-signals-engine-job` off, the daily hot-signal-sync job now passes `--trigger scheduled`, so `hq sources runs` shows its runs as scheduled instead of on-demand. If the job runs an older hq that has no `--trigger` option, it runs the sync again without it.
144
+ - The bundled Work Mesh hook helper `core/scripts/lib/work-mesh-enqueue.sh` now builds event ids correctly under comma-decimal locales (de_DE, fr_FR, ar_EG). It split `EPOCHREALTIME` on a dot, so under those locales an event id had a wrong time part or the helper exited with "value too great for base", and the hook event was dropped. The scaffold now carries hq-core-staging's `lib/epochrealtime.sh` (`hq_epochrealtime_parse`), which the helper sources, and the freshness manifest pins both files to hq-core-staging 31cd5f3b3 (PR #1922). This change and hq-core-staging #1922 must land together.
145
+
146
+ ## [5.345.215] — 2026-11-12
147
+
148
+ - `hq sync held` and the `hq sync push` hold notice no longer say another account was signed in. A first install on a new computer also holds uploads until `hq sync release-held`; that used to read as a security scare (feedback_baa82c96). The hold itself is unchanged.
149
+
6
150
  - `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
151
  - 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
152
  - 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
153
  - `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.
154
+ - On a Mac where `hq daemon` runs local bots, `hq bot create`, `start`, `restart`, `adopt`, `restore` and `auth` now check that the daemon is actually running before handing a bot to it. If its login item is installed but the daemon is stopped, the CLI runs `hq daemon start` and waits up to 20 seconds for it. If it still is not running, the command exits non-zero with one plain sentence (and `reason: "daemon-stopped"` under `--json`) instead of reporting a start that nothing would pick up. `hq bot create` stops before HQ makes the bot's identity.
10
155
  - `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
156
  - `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.
157
+ - `hq capacity` and the `/capacity` card show each Claude account's banked limit resets, including Fable-only resets. An account at 100% that still holds a reset reads "used up, reset banked" instead of plain "used up", and a "Resets banked" row lists each reset, what it clears, and when it expires. The collector asks the usage endpoint for the reset block (`cedar_ember=1`) and names the installed Claude Code version in its user agent, because the server returns grants only to a Claude Code client. Banked resets are kept per account; before this the ledger kept one provider-level record, so only the last account read would have shown its resets.
158
+ - `hq capacity`, `hq capacity route` and `hq lanes create --account auto` now give one answer for one login. Codex readings from both collectors use one account id per home, an existing ledger is migrated when `now.json` is rebuilt with no event deleted, and accounts on one home or one Claude identity are merged in `now.json`. (find-available-ai US-002)
159
+ - `hq capacity available --json` and `~/.hq/capacity/available.json` give one token-free `hq-available-ai.v1` answer to what AI can run now. A stale view starts one background read, `--fresh` waits at most 3 seconds, and with no ledger the rows come from each tool's own status command. A process that cannot find the HQ root, or whose `HQ_ROOT` or `CLAUDE_PROJECT_DIR` names a folder that is neither an HQ tree nor holds a lanes config, keeps the last `available.json` rather than writing one without the registry's accounts, and logs why. (find-available-ai US-003)
160
+ - A real usage-limit refusal on a model-CLI bot's turn, `hq bot probe` or a lane now holds that account for the window the refusal names (session, weekly, one model, or no window), and a 429 shows as rate limited with the plan figure kept. A refusal that names no window gets the provider's short hold first, and its reset only on a repeat. A hold ends at its reset, or sooner when a newer reading of that limit is below 100%, and then the account is back on its last real reading. Nothing is recorded when the account cannot be identified. Only the error a tool reports in its own output (including the error Grok returns over its Windows protocol) records a refusal, never raw stderr, which can carry the model's own text. On `hq capacity ingest refusal`, `--account` is required unless `--limit-id` names a limit exactly one account has; a limit id several accounts share is a usage error, and a provider with one account is not a default. The default hold for a refusal that names no window is now 15 minutes, shortened from 1 hour. (find-available-ai US-004)
161
+ - On desktops where `hq daemon` runs the mesh service, restart the daemon after upgrading (`hq daemon restart`) so the already-running mesh service picks up `HQ_ROOT` and expired Claude tokens on the capacity card renew again.
12
162
  - `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).
163
+ - `pnpm run build` now passes on Windows. Its command catalog check failed there for two reasons: a checkout with `core.autocrlf=true` has CRLF line endings, and a path in one option's help text was recorded with backslashes. The check now ignores CRLF, the catalog always records the path after `<runtime-home>` or `<runtime-path>` with `/`, and help text shows that path with the platform's own separator. Help text on macOS and Linux is unchanged.
13
164
  - `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)
165
+ - The native credential guard answers hq-core 16.0.46 again. It pins the released guard (25f5507c), hq-core-staging main after #1926 (0555a4bd) and hq-core-staging #1887 (72296f01), and picks the behavior by script hash: the Unicode fold runs only for 72296f01. In a UTF-8 locale it now also matches U+212A and U+0130 as `k` and `i` under nocasematch, as bash does. The 16.0.46 credential guard handback is removed from `core-pins.json`.
166
+ - The native credential guard also answers hq-core-staging main after #1927 (30015cbc), with the Unicode fold on (#1887 is merged there). The pins for 16.0.46 (25f5507c), #1926 (0555a4bd) and #1887 (72296f01) stay.
167
+ - HQ Native delivery: storing a build artifact no longer fails on Windows with `STORE_IO ... EPERM: operation not permitted, fsync`. Windows cannot fsync a directory, so the artifact store now skips that step there, as the rest of the CLI already does. Other platforms still fsync the blob directory and still refuse when that fails.
168
+ - HQ Native delivery on Windows: the service runner's spool writes, including the heartbeat written every 200 ms, now retry for up to 75 ms when Windows refuses to replace a file another process has open (EPERM, EACCES or EBUSY). A write that still fails removes its temporary file, so failed writes no longer leave `.tmp` files in the spool. macOS and Linux still rename once.
169
+ - A process whose `HQ_ROOT` or `CLAUDE_PROJECT_DIR` is a folder inside an HQ tree (a session opened in `repos/...` or `companies/<slug>`) now refreshes `~/.hq/capacity/available.json` from the account registry of the nearest enclosing folder that has a lanes config (`personal/lanes/config.json`), instead of always keeping the last file. A copy of the hq-core template inside HQ (such as `repos/public/hq-core` or an hq-core-staging worktree) has the same folders as an HQ tree but no lanes config, so it no longer stops the search. Before, a root at or below such a copy read an empty registry and wrote available.json as fresh, with a default login the registry turned off named best and the registry's other accounts missing. When no folder on the way has a lanes config, the outermost HQ tree is used, so a fresh install still gets the default logins. A folder with no enclosing HQ tree still keeps the last file, and an explicit `HQ_ROOT` that has a lanes config is still used as given. (find-available-ai follow-up)
170
+ - On Windows, a Grok bot turn over ACP that Grok refuses (for example a usage limit) is now reported as that refusal even when the Grok process exits with code 0 while a process it started still holds its output open. Before, that turn ended as "grok returned non-JSON output" with no reported error, so the refusal was not recorded. (find-available-ai follow-up)
171
+ - `hq files browse` no longer labels files you created as "creator-only" when teammates can read them. When your creator grant and a team, person, group or open grant both cover a file, the shared grant now wins whatever order the server returns them in. The creator label now reads "creator access (you created it; others may also have access)", because browse sees only your own grants. The JSON `aclSource` value is still `creator` (feedback 10ed97a5).
172
+ - The `/delegate` verifier (the bundled `hq-delegate-verify.sh` and its native port) now accepts both the old and the new creator label. A delegation no longer fails its file check, and its pickup DM is no longer blocked, when the installed hq-cli and the verifier print different creator labels (feedback 10ed97a5).
173
+ - `hq files purge` now tells the truth about a scheduled purge. hq-pro answers with `status: "pending_purge"`, `purgeScheduled: true` and `purged: false`; the CLI used to miss those fields and print that the version was deleted immediately and could not be cancelled. It now says the version is scheduled for deletion on the purge date, stays listed and readable until then, and can be cancelled with `hq files purge --cancel`. `--cancel` itself now sends the `cancel_purge` action hq-pro expects and accepts its `purgeCancelled` / `status: "kept"` reply.
14
174
  - `/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
175
  - `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
176
  - 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.
@@ -24,11 +184,56 @@
24
184
  - `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
185
  - 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
186
  - 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.
187
+ - The native company Git metadata and env-file guards no longer hand calls back to bash. A Windows bash that is not Git Bash and a hook PATH that cannot be built now get a one-line native block that says what to change. The env-file guard also blocks, instead of handing back, an env-file write it cannot classify: a Git Bash locale that is neither UTF-8 nor single-byte, and, off macOS and Windows, content with characters outside ASCII when the locale (LC_ALL, LC_CTYPE or LANG) is not C or POSIX, because gawk and mawk are not modelled yet.
188
+ - hq-hook: adds a shared check (`crates/hq-hook/src/unmodelled.rs`) that native hook ports run first. It blocks a call (exit 2, one line saying what to change) when the hook environment or input is outside what the ports model: bash option variables (`BASHOPTS`, `SHELLOPTS`, `POSIXLY_CORRECT`), exported bash functions other than the ones hosts set for every login shell (RHEL's `which` wrapper, Environment Modules, Lmod, Spack and scl-utils functions pass), a non-empty `CDPATH` or `GLOBIGNORE`, an `OSTYPE` from the other platform family, an unset or empty `PATH` or a `PATH` entry starting with `~`, non-UTF-8 `HOME`/`HQ_ROOT`/`CLAUDE_PROJECT_DIR`, and input that is not one standard UTF-8 JSON value (NaN or other non-standard numbers, numbers of 1e300 or more, unpaired surrogate escapes, a byte-order mark, NUL bytes, nesting past 100 levels, more than one value). `block-hq-glob` and the scope authorizer used to hand these environments back to bash; they now block them the same way (`block-hq-glob` still answers with `CDPATH` or `GLOBIGNORE` set, since its script runs no `cd` and no glob). Claude Code and Codex do not send any of these, and all hook flags stay off.
189
+ - The bot's daily hot-signal-sync script no longer dies with MODULE_NOT_FOUND after an hq-cli update. It still runs `node <baked dist/index.js>` while that file exists; when a pnpm global hash folder is gone, it runs the stable `~/Library/pnpm/bin/hq` launcher (or `hq` on PATH) instead of the old hash path. (feedback_614121bf)
190
+ - The hook engine supports hq-core 16.0.47. `core-pins.json` lists the release, and the native ports for block-company-git-metadata, block-core-writes, block-plans-dir-during-deep-plan, image-context-guard, block-repo-edits-use-worktree and the policy-enforcement gate accept its `hook-lib.sh` (b971dae4), which changes only code those guards never reach. Its credential guard (30015cbc) and block-hq-glob (925bba9f) were already pinned. inject-policy-on-trigger, block-agent-secrets-reveal, lanes-repo-merge-hold and merged-write-guard-shadow run as bash on 16.0.47 until their new behavior is ported. Every earlier pin stays.
27
191
  - 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
192
  - 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.
193
+ - Adds the Windows worker to the HQ Native delivery library (`src/lib/delivery`). It is not connected to any `hq` command, daemon unit or startup path, so nothing changes for users. Jobs run through a Windows service under its own virtual account, and each job runs inside a Windows Job Object that kills the whole process tree on cancel, on a memory, process-count or CPU-time limit, when the service stops and when the runner is killed. Install and uninstall are bound to one pilot service (`HQNDUS006040`); an unsigned service wrapper is accepted only by its pinned sha256, for that pilot service and root, and only with `--pilot-unsigned-wrapper`. Windows results are untrusted and cannot be promoted. Containment holds against normal and buggy jobs, not a deliberately hostile job, because jobs share the runner's account; a separate job identity is required before Windows runs untrusted third-party code. Uninstall takes two rollbacks with a restart between them. See `docs/delivery-windows-pilot.md`. The earlier boundary-service launcher is removed.
194
+ - Adds deployment admission with fenced effects to the HQ Native delivery library (`src/lib/delivery`). It is not connected to any `hq` command, daemon unit or startup path yet, so nothing changes for users. A deployment needs an exact, verified, promoted release artifact and an explicit company policy that approves the environment. The policy is held in the delivery store, signed, and set only by an authenticated company admin; a worker cannot supply it. Every request records a signed snapshot of the policy, artifact and context, and every refusal records a decision scoped to the company and environment, published to the company's escalation topic. Effects are serialized per environment and carry a fence that the target enforces. A stale or lease-lost publisher is refused, and an unknown outcome must be reconciled against the target before any retry. The in-flight guard has a tunable maximum hold. The delivery store moves to schema v6.
195
+ - Adds the HQ Native delivery gate-one test harness (`test/delivery/gate-one.test.ts` and `test/delivery/gate-one/`). It is test code only: nothing is wired to an `hq` command, daemon unit or startup path, so nothing changes for users. On loopback, it takes a tagged fixture repository through `git archive`, a real build and test run, signed artifacts, a store-held company policy and a fenced deploy, then starts the app from the bytes the deployment target stored and checks that the identity the app serves equals the verified artifact and its required test receipts. The commit stamped into the app and named in its provenance is the one read back from the archive. A runner executes the fault matrix (controller and worker process crashes, broker restart, duplicate and reordered notifications, a stale worker, backup and restore with the old controller still running, cross-company denial) against the real delivery library and records every observation itself. The runner owns the required scenario list, which is frozen with its scenario objects: it runs exactly that matrix or fails without running anything, and it writes the "gate one passed" record (with `matrixComplete` and the scenario ids) only when the complete matrix passed. Leftover processes and non-loopback sockets are sampled from the OS (`ps`, plus `lsof` on macOS or `/proc` on Linux), not taken from what scenarios register, and any failed or timed-out sample fails the run. Self-tests prove that a broken scenario, a wrong source commit, an incomplete or padded matrix, an orphaned child and a failed sample each make the result fail. Must be fixed in a second slice before the live gate-one run counts as evidence: socket sampling misses sockets that open and close between samples, and in this run the in-process brokers of four scenarios were never sampled, so the loopback line covers sampled sockets only (N1); a grandchild whose parent exits before any sample sees it escapes the leftover check, so teardown should also check the test process's group (N2); the deployment target stores the deployed bytes and the harness starts them, so the target's own serving is not probed (I3); S-stale-worker loses its lease by returning it, not by expiry, and does not deploy again after reconciling (I4); the broker scenario restarts the broker but does not cut off one worker while it holds a claim (I5); the broker restarts on the same port, so a port taken in that window would show as a failure, not a false pass (I7).
196
+ - Completes the HQ Native delivery gate-one loopback harness (US-011 slice 2). It is still test code only: no `hq` command, daemon unit or shipped code changes. Gate one now proves six more things, each with a self-test that fails without the change:
197
+ - Socket coverage: sockets opened in the test process are recorded as they open. Each scenario samples its long-lived children while they run, and the gate fails unless it saw every known child and its socket.
198
+ - Escaped processes: scenario children run in their own process groups, and any live member of those groups at teardown fails the gate.
199
+ - Served app: the deployment target, not the harness, starts the deployed bytes, and the served identity is read from that app.
200
+ - Stale worker: after reconcile, a stale worker that tries to deploy again is refused, and a fresh deploy applies at the next fence.
201
+ - Partition: a new `S-partition` scenario cuts one worker's notification path while it holds a claim, then lets it reconnect.
202
+ - Broker restart: the broker restarts on a fresh port behind a client address that stays bound.
203
+ - Cleanup: the run kills only its own process groups that still have a live member: at the end, the groups the leftover check reported; on process exit, SIGINT or SIGTERM, the groups with a live recorded member. A clean run sends no signal.
204
+ - Connect attempts: a failed attempt to reach a non-loopback address also fails the loopback check.
205
+ - Refusals: the stale-worker and partition refusal checks require the specific refusal code.
206
+
207
+ Adds `docs/delivery-proof.md`, which explains what gate one proves, how to run it, and what the live run on enrolled machines must add.
208
+ - Extends the HQ Native delivery gate-one loopback harness (US-011 slice 3). It is still test code and docs only: no `hq` command, daemon unit or shipped code changes.
209
+ - A new required scenario, `S-worker-partition`, cuts the worker-to-controller path while the worker holds a claim. The worker's claim, report and deploy calls go over a test-only loopback transport. With an abrupt close, the worker's report fails at once and is accepted once after the heal. With a silent drop, the worker hits its own timeout instead of hanging. A controller restart then fences it, and its late report and publish are refused with exact codes. The target holds one effect.
210
+ - Self-tests show the scenario fails when the worker bypasses the transport, and fails within a bounded time when the worker's client has no timeout.
211
+ - The full run can keep its report in a chosen folder (`HQ_TEST_GATE_ONE_EVIDENCE_DIR`) for the live run.
212
+
213
+ Adds `docs/delivery-gate-one-live-brief.md`, the brief for running gate one on the owner's Mac. `docs/delivery-proof.md` now lists two live-run gaps: the library has no worker-to-controller network transport, and a held claim has no lease timeout.
214
+ - HQ Native delivery library (not yet used by any `hq` command): a worker's claim now carries a lease, 120 seconds by default, that the worker renews with a heartbeat. When the lease expires, the attempt is abandoned, the job can be claimed again under a new attempt id, and the old worker's late report, artifact upload and deploy publication are refused. Revoking a worker now frees its claims in the same step. A deploy attempt that loses its lease is marked unknown and goes to reconcile. Opening an older delivery store migrates it to schema v7 after writing an exact backup.
215
+ - HQ Native delivery library (not yet used by any `hq` command): workers can now reach the controller over a loopback network connection instead of only in the same process. Only the worker calls (read, claim, report, return, renew) are allowed, every call is authenticated again by the controller, a lost answer is retried without creating a second attempt (and a retry is answered only while the worker still holds that claim), and the connection stays on the local machine unless explicitly allowed otherwise. A worker that cannot renew its claim for too long now gives it up on its own.
216
+ - On macOS the hq daemon now recovers by itself when macOS privacy (TCC) stops letting it read the HQ folder, which happened after HQ.app updated itself and left the daemon running from the deleted old app bundle (feedback d63d2633). When hqd sees "operation not permitted" (EPERM) on reads of several paths under the HQ root within a minute, it logs one event, reports it once to Sentry, and exits with code 74 so launchd starts a fresh daemon, instead of failing every file operation until someone ran `launchctl kickstart -k`. EPERM outside the HQ root, EPERM from chmod, chown, utime, unlink, rmdir or rename, EACCES, other platforms and a daemon that is already stopping are left alone. After 3 such exits in 30 minutes, or when the daemon cannot record the exit, it stays up and `hq daemon status` says HQ needs Full Disk Access instead of restarting in a loop. A daemon that stayed up checks the HQ folder every minute and clears that warning once it can read it again.
217
+ - `hq integrations import` now checks each Claude Desktop connector's key against hq-pro's rules before connecting it. A connector whose key header HQ refuses (Proxy-*, X-Forwarded-* and the rest of hq-pro's denylist), whose header name is invalid or longer than 64 characters, or whose key has a space or a non-ASCII character is skipped with a message that never shows the key. `Authorization: Basic` credentials are now imported as HQ's Basic scheme (username and password) instead of a raw key with a space. If hq-pro still refuses one connector with a 400, that connector is skipped and the rest of the import continues. Before, any of these stopped the whole import. (feedback_950d8abe)
218
+ - `hq sources sync` no longer fails the whole meetings step with "meeting id must be a safe path segment" when a bot transcript has no `recall_bot_id` or `transcript_id` (Recall desktop-SDK recordings, legacy exports). The `meeting:` prefix on the document id is stripped once, so these transcripts get `signal_source_ref: meeting:<id>`. A transcript whose id is still not a safe path segment lands without a `signal_source_ref` and the sync prints one warning for it; the other meetings carry on.
219
+ - `hq mesh claim` and `hq mesh story` no longer stop at `404 PROJECT_VIEW_NOT_FOUND` when the project has no Board yet. If the local `prd.json` lists the story, they register the project from it (the same merge `hq mesh project ensure` does) and retry once. `hq mesh claim` also gains `--no-ensure`, which only prints the `hq mesh project ensure` command, and its `--json` output names `registeredFrom` when it registered the project.
29
220
  - 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`.
221
+ - Port protected scaffold write checks to Rust, including local-settings bypasses, core YAML exclusions, package mounts, and existing redirects. Pin the guard and shared hook library; leave enablement unchanged. Windows drive letters and MSYS package-mount targets now use the shared path conversion, preventing protected writes from escaping the check. The port runs the shared unmodelled-input deny first, models the Windows hook runner's bash and tool PATH, reads `$PWD` and `HQ_LIB_WINSEP` as bash and hook-lib do, discards every exclusion when yq fails on any document, and denies natively, never handing back, where yq versions, YAML parsers, locales or bash versions would disagree.
222
+ - Port the company Git metadata write guard to the native hook engine with pinned Bash parity on macOS and Windows. Inputs the port does not model (PATH unset, jq-only numbers, deep nesting, bash option variables) get the shared native deny.
223
+ - Port the env-file content guard to native Rust with byte-exact Bash parity and pinned emergency fallback.
224
+ - Port the image-context guard to Rust, including image size and per-context byte/count budgets, sub-agent ledgers, and existing bypasses. The bridge pins the bash guard and shared library; the enablement flag is unchanged. Ledger rows append as one complete write under concurrent reads; incomplete or invalid trailing records do not erase earlier complete charges.
225
+ - Run the merged write guard shadow natively, with the same allow and deny records as the pinned shell and Node helper and no child processes. Inputs the native hooks do not model (unusual JSON, shell option variables, a `core/core.yaml` shape yq reads differently, a missing guard program) now block the call with a one-line message instead of being recorded.
226
+ - Run the numbered policy sibling guard natively, with the same allow and block decisions as the pinned bash hook and no child processes. Inputs the port does not model get the shared native deny, and on Windows it blocks a numbered policy path rather than guess what Git Bash would find on disk.
227
+ - Run the active deep-plan file guard natively with pinned Bash parity and no child processes; inputs the port does not model (bash option variables, exported functions, PATH unset, non-UTF-8 input or paths, deep nesting, non-standard numbers) are blocked natively with a message that says what to change.
228
+ - Run the repository-worktree write guard natively with pinned Bash parity and no child processes.
30
229
  - `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.
230
+ - `hq core policy retire <slug>` now requires `--evidence "<block log path, incident ref or ledger entry>"` and records it as `retired_evidence:` in the policy frontmatter, so a rule is not retired on guesswork. Whitespace-only evidence is refused, and `--reason` and `--evidence` must be single-line (a newline or other control character exits 2); backslashes and quotes in `retired_reason` and `retired_evidence` are now escaped. `--by` (written as the bare `retired_by:` value) must be a plain id: letters, digits, `.`, `_`, `@`, `-`, starting with a letter or `_` (so YAML cannot read it as a number or date, e.g. `0x1F`, `1e3`, `1.5`, `2026-11-04`), and not a YAML keyword such as `null` or `true`; anything else exits 2. The one exemption from `--evidence` is `--by garden-policy-pass`, which the garden automation uses because it derives its evidence from the age report; the exemption is keyed on that `--by` string, which anyone can type, so it is not an identity check (feedback_7dd12e68).
31
231
  - 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).
232
+ - `hq dm send --attach` now sends the file's SHA-256 with the vault presign, so S3 Object Lock no longer rejects the upload with "Content-MD5 OR x-amz-checksum- HTTP header is required". (feedback_c5a9b4bb, feedback_719cfab7)
233
+ - `hq signals run`: when Claude itself stops a source at the run's budget cap, the extract step now records `budget-exceeded` and ends the step as partial, the same as when the engine stops between sources. The source stays unprocessed for the next run, the signal and entity candidates the stopped turn had already written for that source are removed so the next run does not write them twice, and the run record names the source under `detail.budgetStoppedAt`. If the stopped turn also wrote a candidate into another company, that file is still deleted and recorded as a failure, and the run still ends at the stop. Before, that stop was recorded as a failed source with a generic error.
234
+ - The hot-channel signals pass (`hq sources sync`, `hq sources signals`) now sends a document again, up to three calls, when Claude's reply is unusable (`claude-bad-output`), and goes on to the remaining documents if all three replies fail. The failed document stays queued and the run still ends as failed. Before, one reply with a JSON syntax error stopped the run, and the same meeting at the front of the queue blocked every meeting behind it on later runs. A run can now make up to three calls per document instead of one; it stops after three documents in a row fail, and it does not resend a document when Claude printed nothing.
235
+ - `hq sources signals --since` no longer re-queues a landed document whose signals were already written under a `meeting:<id>` index `source_ref` instead of the file path. The daily and on-demand backlog was looping the same meetings and duplicating signal files (feedback_1bdd2f65).
236
+ - The build step that bundles the hq-cloud sync runner now works on Windows. It spawned esbuild's JavaScript launcher directly, which Windows cannot run (spawnSync ENOENT). On Windows it now runs the launcher through node. The bundle and the step on macOS and Linux are unchanged.
32
237
  - `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
238
 
34
239
  ## [5.345.214] — 2026-11-10
package/README.md CHANGED
@@ -142,6 +142,51 @@ timeout knob and is unchanged.
142
142
  The same kill switch and event shape should be documented on hqforwork.com
143
143
  when that site's telemetry page is added (indigo-marketing; not this repo).
144
144
 
145
+ ### Local command count
146
+
147
+ Separately from telemetry, `hq` keeps a count of the commands you run in
148
+ `~/.hq/command-usage/usage.tsv` on this computer. Each run adds one line with
149
+ the date (UTC) and the command name, for example `secrets env`. Arguments, flag
150
+ values, file paths, company names, the working directory, and environment
151
+ values are never written. The count is used to see which commands are still in
152
+ use before one is removed.
153
+
154
+ The file is never sent, synced, or attached to `hq feedback`, so
155
+ `HQ_TELEMETRY=0` does not turn it off. It is kept to about 512 KiB: runs are
156
+ folded into one line per day and command, and days older than 30 days are
157
+ dropped. Nothing is written when `~/.hq` does not exist. Nothing is written
158
+ either when `usage.tsv` is a link (symbolic or hard), a named pipe, or a
159
+ folder, or when `~/.hq/command-usage` is a link, belongs to another user, or
160
+ can be written by the group or others; the command runs as it would otherwise.
161
+
162
+ `NODE_ENV=test` (or `VITEST=true`) marks a test run, and a test run never
163
+ writes to `~/.hq/command-usage`. If your shell sets `NODE_ENV=test`, `hq` keeps
164
+ no count. An installed `hq` ignores the test-only variables that name another
165
+ command table.
166
+
167
+ ```bash
168
+ hq doctor usage # counts per command for the last 30 days
169
+ hq doctor usage --json
170
+ rm -rf ~/.hq/command-usage # clear it
171
+ ```
172
+
173
+ The first interactive run that is not `--json` prints this line once on stderr
174
+ and records that it was shown under `~/.hq/cli-command-usage-disclosed-v1`:
175
+
176
+ ```
177
+ HQ keeps a count of the commands you run in ~/.hq/command-usage on this computer (the command name and the date of each run, never arguments, file contents, or secrets). It is never sent anywhere, so HQ_TELEMETRY=0 does not turn it off. Run `hq doctor usage` to see it; delete that folder to clear it.
178
+ ```
179
+
180
+ No command is being retired right now. Some commands are marked `retiring` in
181
+ the CLI's command table, but the retiring-command gate is switched off: every
182
+ command runs as before, with no notice and no change to its exit code.
183
+ `--i-still-use-this` is still accepted so scripts that pass it keep working.
184
+ Written directly after the command name, before the command's own arguments
185
+ (`hq old thing --i-still-use-this`), hq takes it out and the run of a marked
186
+ command is counted apart in `hq doctor usage`; it has no other effect. A flag
187
+ written after the command's first argument or after `--` belongs to that
188
+ command: `hq run tool --i-still-use-this` hands it to `tool`.
189
+
145
190
  ## Monitors
146
191
 
147
192
  `hq monitor` runs a command in the background and sends its stdout lines to the
@@ -171,8 +171,11 @@ listing_has_exact_key() {
171
171
  function exact_key(row, expected, modified, size) {
172
172
  gsub(/\033\[[0-9;]*m/, "", row)
173
173
  sub(/[[:space:]]+$/, "", row)
174
- if (row !~ / +(shared-with-you|creator access — creator-only|role-bypass|personal-vault|private folder — children are creator-only)$/) return 0
175
- sub(/ +(shared-with-you|creator access — creator-only|role-bypass|personal-vault|private folder — children are creator-only)$/, "", row)
174
+ # hq-cli releases word the creator label differently ("creator access —
175
+ # creator-only", "creator access (...)"). Match the stable "creator access"
176
+ # prefix with either suffix so any verifier/hq-cli version pair agrees.
177
+ if (row !~ / +(shared-with-you|creator access( — creator-only| \([^()]*\))?|role-bypass|personal-vault|private folder — children are creator-only)$/) return 0
178
+ sub(/ +(shared-with-you|creator access( — creator-only| \([^()]*\))?|role-bypass|personal-vault|private folder — children are creator-only)$/, "", row)
176
179
  modified = row
177
180
  sub(/^.* +/, "", modified)
178
181
  if (modified != "—" && modified !~ /^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\.[0-9][0-9][0-9]Z$/) return 0
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+ # hq-core: public
3
+ # epochrealtime.sh — locale-proof parse of a bash $EPOCHREALTIME string.
4
+ #
5
+ # Sourced by work-mesh-enqueue.sh, hook-adapter-core.sh and hook-stop-async.sh.
6
+ # Bash prints EPOCHREALTIME with the locale decimal separator: "." under C,
7
+ # "," under de_DE or fr_FR, a multibyte character under ar_EG. The parse
8
+ # below never looks at the separator: the seconds are the leading digits and
9
+ # the fraction is every digit after them.
10
+ #
11
+ # hq_epochrealtime_parse "12,345678" || fallback
12
+ # # HQ_EPOCH_MS = 12345 (seconds + first 3 fraction digits)
13
+ # # HQ_EPOCH_DIGITS = 12345678 (seconds + whole fraction)
14
+ #
15
+ # Sets variables instead of printing so callers need no command substitution.
16
+ # Returns 1, with both variables empty, when the string has no leading digits.
17
+ # shellcheck disable=SC2034 # HQ_EPOCH_* are read by the sourcing callers
18
+ hq_epochrealtime_parse() {
19
+ local s="${1-}" seconds fraction
20
+ HQ_EPOCH_MS=""
21
+ HQ_EPOCH_DIGITS=""
22
+ seconds="${s%%[![:digit:]]*}"
23
+ [ -n "$seconds" ] || return 1
24
+ fraction="${s#"$seconds"}"
25
+ fraction="${fraction//[![:digit:]]/}"
26
+ HQ_EPOCH_DIGITS="${seconds}${fraction}"
27
+ fraction="${fraction}000"
28
+ HQ_EPOCH_MS="${seconds}${fraction:0:3}"
29
+ return 0
30
+ }
@@ -21,6 +21,9 @@
21
21
  # [--cwd P] [--hq-root P] [--company-slug S] [--project P] [--task T] \
22
22
  # [--tool-writes N] [--spool PATH]
23
23
 
24
+ # shellcheck source=core/scripts/lib/epochrealtime.sh
25
+ . "${BASH_SOURCE[0]%/*}/epochrealtime.sh" 2>/dev/null || true
26
+
24
27
  # Crockford base32 alphabet (ULID) — no I L O U
25
28
  _WORK_MESH_CROCKFORD='0123456789ABCDEFGHJKMNPQRSTVWXYZ'
26
29
 
@@ -68,11 +71,15 @@ work_mesh_ulid() {
68
71
  local -i i rem val
69
72
 
70
73
  if [[ -n "${EPOCHREALTIME-}" ]]; then
71
- local sec=${EPOCHREALTIME%.*}
72
- local frac=${EPOCHREALTIME#*.}000
73
- frac=${frac:0:3}
74
- now_ms=$((10#$sec * 1000 + 10#$frac))
75
- else
74
+ # EPOCHREALTIME uses the locale decimal separator ("," under de_DE, a
75
+ # multibyte character under ar_EG, ...); hq_epochrealtime_parse does not
76
+ # depend on the separator.
77
+ if command -v hq_epochrealtime_parse >/dev/null 2>&1 \
78
+ && hq_epochrealtime_parse "$EPOCHREALTIME"; then
79
+ now_ms=$((10#$HQ_EPOCH_MS))
80
+ fi
81
+ fi
82
+ if [[ -z "${now_ms-}" ]]; then
76
83
  now_ms=$(date +%s%3N 2>/dev/null || true)
77
84
  case "$now_ms" in
78
85
  ""|*[!0-9]*)