@indigoai-us/hq-cli 5.345.251 → 5.345.253

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 (188) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/assets/scaffold/core/scripts/hq-session.sh +9 -0
  3. package/contracts/host-canary-release.json +9 -3
  4. package/dist/command-catalog.generated.d.ts +269 -1
  5. package/dist/command-catalog.generated.js +330 -1
  6. package/dist/command-registration-plan.d.ts +6 -0
  7. package/dist/command-registration-plan.js +1 -0
  8. package/dist/commands/bot.js +7 -2
  9. package/dist/commands/ci-intake.d.ts +15 -0
  10. package/dist/commands/ci-intake.js +252 -0
  11. package/dist/commands/ci-metrics.d.ts +8 -0
  12. package/dist/commands/ci-metrics.js +55 -0
  13. package/dist/commands/ci.d.ts +13 -0
  14. package/dist/commands/ci.js +10 -0
  15. package/dist/commands/core-bucket-c-work-mesh-offer-native.js +1 -1
  16. package/dist/commands/core-hq-session-binding.d.ts +140 -0
  17. package/dist/commands/core-hq-session-binding.js +363 -0
  18. package/dist/commands/core-hq-session-native.d.ts +23 -0
  19. package/dist/commands/core-hq-session-native.js +59 -9
  20. package/dist/commands/core-stop-autosave.js +1 -1
  21. package/dist/commands/core.js +10 -0
  22. package/dist/commands/doctor.d.ts +5 -1
  23. package/dist/commands/doctor.js +42 -5
  24. package/dist/commands/files.d.ts +62 -0
  25. package/dist/commands/files.js +250 -9
  26. package/dist/commands/install-global.js +4 -2
  27. package/dist/commands/logout.js +4 -0
  28. package/dist/commands/ontology-graph.d.ts +2 -0
  29. package/dist/commands/ontology-graph.js +33 -0
  30. package/dist/commands/report.js +35 -2
  31. package/dist/commands/storage-gate.js +1 -1
  32. package/dist/commands/vault-retention-flag.js +2 -1
  33. package/dist/commands/whoami.js +1 -1
  34. package/dist/hq-cloud-sync-runner/bin/sync-runner.js +238 -221
  35. package/dist/hq-cloud-sync-runner/package.json +1 -1
  36. package/dist/index.js +3 -1
  37. package/dist/lib/agent-kit/inbox-poll-backoff-flag.js +1 -1
  38. package/dist/lib/agent-kit/mcp/tools.js +48 -0
  39. package/dist/lib/bot/fleet-bots-update-pass.js +1 -1
  40. package/dist/lib/bot/fleet-cron.d.ts +50 -0
  41. package/dist/lib/bot/fleet-cron.js +173 -32
  42. package/dist/lib/bot/fleet-local.d.ts +18 -0
  43. package/dist/lib/bot/fleet-local.js +51 -5
  44. package/dist/lib/bot/inbox-poll-backoff-flag.js +1 -1
  45. package/dist/lib/bot/signals-engine-flag.d.ts +1 -1
  46. package/dist/lib/bot/signals-engine-flag.js +1 -1
  47. package/dist/lib/cli-invite-nudge.js +1 -1
  48. package/dist/lib/client-version.d.ts +2 -0
  49. package/dist/lib/client-version.js +24 -0
  50. package/dist/lib/company-flag-gate.d.ts +30 -0
  51. package/dist/lib/company-flag-gate.js +104 -0
  52. package/dist/lib/core-utils/hook-timeout-debug-context-flag.js +1 -1
  53. package/dist/lib/daemon/flag.js +2 -1
  54. package/dist/lib/daemon/legacy-journal-gate.js +3 -1
  55. package/dist/lib/daemon/run.js +4 -3
  56. package/dist/lib/daemon/shared-flag-reads.js +1 -1
  57. package/dist/lib/delivery/migrations.d.ts +32 -1
  58. package/dist/lib/delivery/migrations.js +69 -8
  59. package/dist/lib/doctor/checks/host-core.js +22 -4
  60. package/dist/lib/doctor/checks/jq.d.ts +27 -6
  61. package/dist/lib/doctor/checks/jq.js +46 -8
  62. package/dist/lib/doctor/client-health-reason-codes-flag.js +1 -1
  63. package/dist/lib/doctor/fix/refresh-sync-handoff.d.ts +1 -1
  64. package/dist/lib/doctor/fix/refresh-sync-handoff.js +1 -1
  65. package/dist/lib/flag-client-gate-headers.d.ts +38 -0
  66. package/dist/lib/flag-client-gate-headers.js +62 -0
  67. package/dist/lib/flag-client-headers.d.ts +15 -0
  68. package/dist/lib/flag-client-headers.js +25 -0
  69. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  70. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  71. package/dist/lib/flag-registry-worker.js +35 -0
  72. package/dist/lib/flag-registry.d.ts +1 -20
  73. package/dist/lib/flag-registry.js +5 -81
  74. package/dist/lib/hook-engine/adapter-core-pin.d.ts +30 -0
  75. package/dist/lib/hook-engine/adapter-core-pin.js +30 -0
  76. package/dist/lib/hook-engine/coverage.d.ts +65 -1
  77. package/dist/lib/hook-engine/coverage.js +173 -8
  78. package/dist/lib/hook-engine/reconcile.js +3 -2
  79. package/dist/lib/hot-channels/prompts/signals-pass.md +20 -0
  80. package/dist/lib/hot-channels/signal-changes.d.ts +228 -0
  81. package/dist/lib/hot-channels/signal-changes.js +683 -0
  82. package/dist/lib/hot-channels/signals-pass.d.ts +24 -0
  83. package/dist/lib/hot-channels/signals-pass.js +232 -12
  84. package/dist/lib/lanes/outpost-worktree-pruner-flag.d.ts +1 -1
  85. package/dist/lib/lanes/outpost-worktree-pruner-flag.js +1 -1
  86. package/dist/lib/lanes/registry-flag.js +2 -1
  87. package/dist/lib/lanes/spawn.js +11 -1
  88. package/dist/lib/mesh/live/binding-intent.d.ts +61 -0
  89. package/dist/lib/mesh/live/binding-intent.js +201 -0
  90. package/dist/lib/mesh/live/binding-receipt.d.ts +157 -0
  91. package/dist/lib/mesh/live/binding-receipt.js +365 -0
  92. package/dist/lib/mesh/live/company-flag-refresh.js +1 -1
  93. package/dist/lib/mesh/live/daemon/doctor-telemetry.d.ts +39 -0
  94. package/dist/lib/mesh/live/daemon/doctor-telemetry.js +58 -0
  95. package/dist/lib/mesh/live/daemon/install.js +2 -1
  96. package/dist/lib/mesh/live/daemon/presence.js +9 -0
  97. package/dist/lib/mesh/live/daemon/run.d.ts +3 -0
  98. package/dist/lib/mesh/live/daemon/run.js +33 -1
  99. package/dist/lib/ontology-graph/lineage/index.d.ts +401 -0
  100. package/dist/lib/ontology-graph/lineage/index.js +1027 -0
  101. package/dist/lib/ontology-graph/model/index.d.ts +54 -0
  102. package/dist/lib/ontology-graph/model/index.js +112 -0
  103. package/dist/lib/ontology-graph/model/pass-tasks.d.ts +75 -0
  104. package/dist/lib/ontology-graph/model/pass-tasks.js +166 -0
  105. package/dist/lib/ontology-graph/model/pass.d.ts +6 -0
  106. package/dist/lib/ontology-graph/model/pass.js +9 -2
  107. package/dist/lib/ontology-graph/model/pending-items.d.ts +8 -0
  108. package/dist/lib/ontology-graph/model/pending-items.js +24 -1
  109. package/dist/lib/ontology-graph/model/step.d.ts +1 -1
  110. package/dist/lib/ontology-graph/model/tasks.d.ts +11 -3
  111. package/dist/lib/ontology-graph/model/tasks.js +20 -7
  112. package/dist/lib/ontology-graph/read/brief.js +41 -6
  113. package/dist/lib/ontology-graph/read/index.d.ts +4 -0
  114. package/dist/lib/ontology-graph/read/index.js +173 -29
  115. package/dist/lib/ontology-graph/read/lineage.d.ts +101 -0
  116. package/dist/lib/ontology-graph/read/lineage.js +262 -0
  117. package/dist/lib/ontology-graph/replay/buffered-store.js +17 -0
  118. package/dist/lib/ontology-graph/replay/engine.d.ts +32 -1
  119. package/dist/lib/ontology-graph/replay/engine.js +213 -8
  120. package/dist/lib/ontology-graph/replay/extractors.d.ts +26 -0
  121. package/dist/lib/ontology-graph/replay/extractors.js +25 -1
  122. package/dist/lib/ontology-graph/replay/index.d.ts +2 -0
  123. package/dist/lib/ontology-graph/replay/index.js +9 -3
  124. package/dist/lib/ontology-graph/replay/signal-changes.d.ts +118 -0
  125. package/dist/lib/ontology-graph/replay/signal-changes.js +687 -0
  126. package/dist/lib/ontology-graph/schema/decision-status.d.ts +18 -0
  127. package/dist/lib/ontology-graph/schema/decision-status.js +20 -0
  128. package/dist/lib/ontology-graph/schema/index.d.ts +1 -0
  129. package/dist/lib/ontology-graph/schema/index.js +1 -0
  130. package/dist/lib/ontology-graph/setup/index.js +13 -3
  131. package/dist/lib/search-index/index.d.ts +33 -1
  132. package/dist/lib/search-index/index.js +180 -25
  133. package/dist/lib/search-index/qmd-exit-diagnostics.d.ts +7 -0
  134. package/dist/lib/search-index/qmd-exit-diagnostics.js +25 -1
  135. package/dist/lib/signals/adapters-catalog.js +1 -1
  136. package/dist/lib/smart-ci/cost.d.ts +72 -0
  137. package/dist/lib/smart-ci/cost.js +120 -0
  138. package/dist/lib/smart-ci/github.d.ts +112 -0
  139. package/dist/lib/smart-ci/github.js +267 -0
  140. package/dist/lib/smart-ci/intake.d.ts +288 -0
  141. package/dist/lib/smart-ci/intake.js +1078 -0
  142. package/dist/lib/smart-ci/ledger.d.ts +218 -0
  143. package/dist/lib/smart-ci/ledger.js +527 -0
  144. package/dist/lib/smart-ci/metrics.d.ts +137 -0
  145. package/dist/lib/smart-ci/metrics.js +249 -0
  146. package/dist/lib/smart-ci/records.d.ts +265 -0
  147. package/dist/lib/smart-ci/records.js +281 -0
  148. package/dist/lib/smart-ci/reducer.d.ts +67 -0
  149. package/dist/lib/smart-ci/reducer.js +261 -0
  150. package/dist/lib/sync-core/engine-holds.d.ts +15 -0
  151. package/dist/lib/sync-core/engine-holds.js +104 -11
  152. package/dist/lib/sync-core/engine-home.d.ts +3 -0
  153. package/dist/lib/sync-core/engine-home.js +41 -1
  154. package/dist/lib/sync-core/flag.js +2 -1
  155. package/dist/lib/sync-core/hand-back.d.ts +1 -0
  156. package/dist/lib/sync-core/hand-back.js +7 -2
  157. package/dist/lib/sync-core/legacy-journal-export-child.js +5 -3
  158. package/dist/lib/sync-core/legacy-journal-export.d.ts +23 -4
  159. package/dist/lib/sync-core/legacy-journal-export.js +120 -55
  160. package/dist/lib/sync-core/reconcile.d.ts +2 -1
  161. package/dist/lib/sync-core/reconcile.js +40 -7
  162. package/dist/lib/sync-invalid-entity-warning.js +2 -1
  163. package/dist/lib/windows/install-followup.d.ts +41 -0
  164. package/dist/lib/windows/install-followup.js +87 -0
  165. package/dist/lib/windows/jq.d.ts +59 -0
  166. package/dist/lib/windows/jq.js +154 -3
  167. package/dist/lib/windows/user-path.d.ts +5 -0
  168. package/dist/lib/windows/user-path.js +1 -1
  169. package/dist/lib/work-context/auto-bind.d.ts +12 -0
  170. package/dist/lib/work-context/auto-bind.js +49 -3
  171. package/dist/lib/work-context/organize.d.ts +4 -2
  172. package/dist/lib/work-context/organize.js +18 -8
  173. package/dist/lib/work-context/reconcile.js +16 -1
  174. package/dist/main.js +12 -1
  175. package/dist/utils/client-health-contract.d.ts +30 -0
  176. package/dist/utils/client-health-contract.js +111 -0
  177. package/dist/utils/client-health.d.ts +5 -2
  178. package/dist/utils/client-health.js +74 -5
  179. package/dist/utils/exclusive-lock.d.ts +5 -1
  180. package/dist/utils/exclusive-lock.js +9 -2
  181. package/dist/utils/host-registration.d.ts +7 -0
  182. package/dist/utils/host-registration.js +10 -1
  183. package/dist/utils/pid.d.ts +31 -0
  184. package/dist/utils/pid.js +65 -0
  185. package/dist/utils/resident-package-preload.js +12 -4
  186. package/dist/utils/sentry-fingerprint.js +3 -0
  187. package/package.json +10 -8
  188. package/scripts/install-hook-engine.mjs +5 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,159 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.253] — 2026-11-24
6
+ - Resolve `agents-v2` adapter parent and grandparent directories via `Path::parent()` before canonicalizing so Windows verbatim (`\\?\`) paths locate the HQ root instead of failing on `..` normalization.
7
+ - Claim `master-hook:PreToolUse` natively on hosted agents-v2 bots, modelled on master-hook.sh 774bca73 (hq-core v16.0.50) as the hq-agents-v2 adapter e5cec6c1 runs it, with differential tests against both. A `pre_tool_call` goes back to the adapter when the registered fallback is the earlier released adapter a8e9a7e, the root has `.claude/hooks/mandatory-scope-authorizer.sh`, the registry lists any PreToolUse row or is one this reader rejects, a PreToolUse folder hook outside `companies/` exists, or the host is not Unix. A fallback naming any other unknown adapter revision is refused natively when none of these hands the call back. The merge gates (hold records, daemon sections, owner approval, review) no longer answer on agents-v2, matching the released adapter, which never refused a merge there. On Claude Code and Codex, the native hqd policy check with `HOME` unset or empty now looks for the socket at `/.hq/daemon/hqd.sock`, as master-hook does.
8
+ - Internal: the merged write guard shadow in `hq-hook` is now claimed on hosted agents (`agents-v2`). It records what the released agents-v2 adapter records: the adapter's own payload and tool name (approval requests included), its HQ root as the project folder, every tool the registry row's matcher takes, and calls a later guard refuses. It runs only when the adapter's settings and registry would run the row. An unreadable wrapper is refused, as the adapter refuses it. A wrapper of an unknown revision, or any call on Windows, goes back to the adapter. A call the native row cannot rebuild is refused only while a session's shadow marker is on. A call is refused once the runtime's own pre_tool_call hook timeout from its config has passed. `hq reindex` keeps agents-v2 PreToolUse on the adapter while the registry lists the row and its files are off their pins.
9
+ - Internal: `hq-hook` now accepts the hq-agents-v2 #347 hook adapter (sha256 `31877890`, shipped in the v2.71 p33a944a artifact) on hosted agents. SessionEnd, SubagentStop, PostToolUse, UserPromptSubmit and SessionStart stay native under it, as they do under the #332 adapter, when the call's native time budget ends before #347 stops starting hooks (its 21 s budget, 56 s on SessionEnd and SubagentStop, less its 2 s kill grace and 1 s). The event goes back to the adapter when `HQ_AGENTS_V2_HOOK_BUDGET_SECONDS` lowers that budget, `SECONDS` or `HQ_PERL_BIN` is set, `core/scripts/lib/advisory-cap.sh` or `perl-child-locale.sh` is present but not a released copy, `advisory-cap.sh` is present without `perl-child-locale.sh`, the budget value is too large for the adapter's integer test, or a PostToolUse or SessionStart call has company folder hooks. PreToolUse and Stop under #347 always go back to the adapter: #347 runs PreToolUse safety guards first, skips other guards and advisory hooks that run past its budget, blocks on a missing safety guard, and drops a Stop hook's block when the hook runs out of time. Before this change a #347 adapter sent every gated event back to the adapter, and a native PreToolUse registration refused every tool call under it.
10
+ - Stripped the Windows `\\?\` verbatim prefix from temporary fixture directories in the credential-guard test harness (`credential_native`, `credential_history`, `credential_reflog`, and `support/credential_history`) and normalized Windows `jq` CRLF stdout in the `credential_history` legacy comparison.
11
+ - CI: the Windows (Beaker) baseline reader no longer marks the hook crate's lib unit tests as aborted when a child test's result line is glued onto the end of a parent test line, so a main baseline where every binary reported reads as complete.
12
+ - Bound pipe reads and writes in the Glob parity test harness so a stalled subprocess fails with a timeout diagnostic.
13
+ - Pin `jq-1.7.1` and `yq v4.54.3` via SHA-256-verified downloads in the Windows `hq-hook` workflow and add fast tool/version preflight and bounded child execution to `block_hq_glob` parity tests.
14
+ - Internal: contributors get `pnpm changelog:new` and `pnpm changelog:check`, and the pre-push hook now runs the release-note fragment check locally. When a branch adds no `changelog.d` fragment, the hook writes a draft from the branch's first commit subject and stops the push, so the required "changelog entry" check no longer fails after a full CI cycle. The hook refreshes `origin/main` first and does not block stacked branches or failures it cannot confirm against a current base. `HQ_NO_CHANGELOG=1` skips the local check only.
15
+ - Internal: split `build` into `build-node20` and native-`needs:` `build-node22` (`build (node 22) / ci`) with report-only coverage merge moved to an advisory `coverage-summary` job, and wired hardened `scripts/ci/changelog-only-reuse.mjs` into `ci.yml`'s `route` job so `changelog.d/`-only synchronize pushes over a full green run skip redundant shards.
16
+ - Internal: added fail-closed `scripts/ci/changelog-only-reuse.mjs` helper (unwired) and unit tests to verify when a pull request `synchronize` push changes only `changelog.d/*.md` release-note fragments on top of a prior full green `ci.yml` run.
17
+ - Fail closed on `build (node 22) / ci` and `e2e (node 22)` for same-repo draft PRs skipped by `HQ_DRAFT_PR_CI=off` (zero-checkout step on `hq-mac-light`) so stale `skipped` statuses cannot satisfy branch protection on `ready_for_review` before upstream shards complete.
18
+ - Internal: CI's four e2e shards now split the e2e files by measured time and start each shard's heaviest file first, using the same weighted sequencer as the unit shards. Under vitest's default split the slowest e2e shard took about 192 s against about 32 s for the quickest; the estimate after the change is about 160 s for the slowest.
19
+ - CI: hook-crate pull requests now run only the tests their change reaches, in 1 to 4 shards planned by `scripts/ci/hq-hook-test-plan.mjs`. Slow bash-parity cases run on a pull request only when it changes their own module or test file. Batch train pushes and the daily main run still run every test in 6 balanced shards. Node affected-test selection is now on by default for pull requests (`HQ_CLI_PR_AFFECTED_TESTS=off` turns it off). Known Windows failures on main are tracked with an owner in `crates/hq-hook/ci/windows-known-failures.json`.
20
+ - Internal: added the `HQ_DRAFT_PR_CI=off` draft guard and `ready_for_review` trigger to `stop-native-pr.yml`, and switched `e2e (node 22)` in `ci.yml` from `wait-for-jobs.mjs` polling to native `needs: [route, e2e-build, e2e-shard]` with `always() && !cancelled()`.
21
+ - CI: the hook PR test tiers now treat the new 16.0.51 gate target's four slow delivery-regex parity tests like its siblings': they run on batch trains and the daily main run, and on a pull request only when the diff touches the gate or command-guard code.
22
+ - The daily hot-channel sync on a local bot no longer messages you every morning when it could not reach the network. It retries for a few minutes first (a laptop that just woke often has no connection yet), stays quiet on a single failed morning, and tells you once when the same failure repeats. Any failure is sent at most once until a run works or the reason changes.
23
+ - PreToolUse native members report executed registry and folder hooks to `pre_tool_use_master::ran` so timeout-sentry rows and `HQ_HOOK_TRACE` lines match `master-hook.sh`.
24
+ - `hq files delete` now handles the per-company delete limit in HQ Pro. When the server stops a delete, it shows how many objects the delete would remove, how many were already deleted in the window, and the limit. In a terminal you can type a confirmation to go ahead; without a terminal, or with only `--yes`, it stops. When the server needs another owner or admin to approve, it says so and exits with an error. `--dry-run` warns when a real delete would hit the limit. When the server runs the limit in watch-only mode, `--dry-run` says a real delete would go through and shows the limit, instead of saying it would be stopped. When another owner or admin must approve, the message says no HQ command can approve it yet. If the delete alone is over the approval limit, it says to split it into chunks no bigger than the limit and wait for the window to pass between chunks; otherwise it says to wait for the window to pass. `--dry-run` gives the same advice. `--confirmation` together with `--dry-run` is now an error.
25
+ - Fix Windows test-harness tool discovery (`which` and `/bin/bash`) in `hq-hook` parity suites (`merged_write_guard`, `command_rules`, `numbered_policy_sibling`)
26
+ - Drop the obsolete US-048 side-effect ledger row for PreToolUse per-hook journal rows; native PreToolUse now journals the same rows and trace lines as `master-hook.sh`.
27
+ - Internal: `hq-hook` now accepts the `core/scripts/lib/hook-adapter-core.sh` that HQ Core v16.0.51 ships on hosted agents (`agents-v2`) and local fleet bots (`fleet-local`). It differs from the revision the native ports already reproduce only in comment lines, so on a v16.0.51 install fleet-local PreToolUse and agents-v2 and fleet-local PostToolUse are answered natively instead of being refused or handed back to the shell adapter. `hq reindex` lets fleet-local PostToolUse switch on that file as well.
28
+ - Bound the `jq` index-error probe in `gate::post` with a 500 ms hard deadline and process-tree cleanup so a missing or hanging `jq` cannot stall `PostToolUse`.
29
+ - Create the disposable `<base>/reindex-codex` directory in `scripts/host-canary.mjs` before invoking `reindex` with `CODEX_HOME` pointing to it.
30
+ - Changed: the host canary record shipped with the CLI is refreshed for this release build.
31
+ - Move the `hq-hook` release-tag Windows x64 job to self-hosted Beaker runners (`[self-hosted, Windows, X64, hq-windows]`) using the pinned Beaker Rust toolchain step and add a `platforms=windows-beaker` manual dispatch option.
32
+ - Pin the GNU Bash version used alongside system Bash for macOS image-context parity tests.
33
+ - Internal: the repository merge-hold check in `hq-hook` now decides like `hq runners hold check` and is claimed on hosted agents (`agents-v2`) as well as Claude Code, Codex and Grok Build. Holds are matched by repository whatever company owns them, and a hold company's `lanes.repo-merge-hold` setting that the daemon does not report as on is read from the flag registry at the call, as the CLI reads it. A merge is refused when a hold record or that setting cannot be read or trusted, including a record with a field `hq runners hold` never writes and a registry read that runs out of time. The short window in which a held merge was allowed after the setting was switched on is gone. Hold records are read under the registered HQ root as well as the hook's own. On agents-v2, where the shell adapter never applied the hold, merges are now checked with the hold and review records exactly as `hq runners hold check` checks them. The daemon-state, conduct-link, owner-approval and daemon review-row refusals no longer apply on agents-v2, as the released agents-v2 adapter never applied them, and `hq-hook` tests now cover every merge refusal agents-v2 keeps or stops applying, on tool calls and exec approvals.
34
+ - Added native support and pin for the updated `inject-policy-on-trigger.sh` revision with MCP PostToolUse trigger text and short-reply handling while keeping earlier pins accepted.
35
+ - agents-v2 hook handling returns to the released behavior. The native agents-v2 PreToolUse, merge-hold and write-guard claims will return in a later release.
36
+ - Added: `hq ci intake` records what CI does for a repository (workflow runs and jobs, check runs, pull requests, pushes, and runner pool counts) into the HQ Native run ledger, and `hq ci metrics --repo <owner/repo> --since <date>` prints queue wait and run time (median and p90), replaced-head runs, cold-start and idle runner minutes, PR open to merge, merge to production where the repository deploys on merge, and cost per merge with each input marked measured or estimated. The intake only reads GitHub, as this machine's signed-in `gh` login: it sends GET requests, uses conditional requests so unchanged data costs no rate limit, checks every request against an hourly budget that is kept across restarts (default 1,500 charged requests), stops while the login has 500 or fewer requests left, and writes one audit line per request. A restarted intake continues from its saved position and records nothing twice; a stretch it could not read is written to the ledger as a gap. Closed records older than two hours move to dated archive files beside the ledger, which `hq ci metrics` reads as well. `--replay-fixture` records from a saved file and `--record-fixture` saves a past window as one. Nothing in `hq ci` changes GitHub, a workflow or a runner. The ledger store file moves to schema version 8, which adds an empty Smart CI section to existing stores when they are next opened.
37
+ - `hq sync-core` hand-back now knows every hold direction hq-syncd writes (`delete_local`, `delete_remote`, `overwrite_local`, `overwrite_remote`, `merge`, `undecided`, `not_approvable`). A vault whose engine hold names a change that keeps this device's copy (`overwrite_remote`, `merge`, `undecided`, `not_approvable`), a direction this hq does not know, or a group with no usable direction is no longer handed to the current sync, which would replace those local copies with the vault's: the old-sync switch stays off and the engine keeps its ownership record until the engine runs the vault again and the hold is decided. Each reconcile reports the waiting vault in `rollout.json`.
38
+ - Fixed: on Codex, the PostToolUse redaction check now runs before refusing a call, so plain reads such as `tail` are no longer blocked.
39
+ - Changed: on Codex, policy reminders for a tool call now also arrive before the call runs.
40
+ - Keep `crates/hq-hook/tests/fixtures` `.cjs` and `.mjs` files LF on Windows checkouts so pinned fixture SHA-256 checks match on Windows.
41
+ - Normalize Windows paths, inherited `PATH`, and refusal footer expectations in `command_rules` integration tests.
42
+ - Pass POSIX `cwd` paths to the legacy Bash reference runner on Windows in `credential_native` tests and match the Windows unregistered-root refusal text in `credential_entry`.
43
+ - Accept `hq-core` v16.0.48–v16.0.50 `.claude/hooks/migrate-policy-triggers-if-changed.sh` (`1a01eb3c`) in native `SessionStart` `migrate-policy-triggers` by porting the native `last-success` stamp check, and add a registration-time pin hold in `coverage.ts`.
44
+ - Pin the `hq-core` `v16.0.51` `policy-enforcement-gate.sh` and `hook-gate.sh` in the native Rust hook engine and the registration coverage holds, with `v16.0.51` shell-oracle parity tests, so the native policy enforcement gate answers on a `v16.0.51` root and the `v16.0.51` `hq_augment_path` PATH is reproduced. On a `v16.0.51` root the native gate still treats `broadcast` inside an identifier (`broadcast_inbox_message`, `broadcast2`) as a request for `work-broadcast`, which `v16.0.51`'s shell gate no longer does, so a later gated call can be refused where the shell allowed it. The Grok Stop observer also accepts the `v16.0.51` `session-id.sh`. SessionStart, the first-prompt company bind and the native session bind still hand `v16.0.51` roots back to the shell, because `v16.0.51`'s `master-hook.sh` records environment session aliases that the native path does not write.
45
+
46
+ ## [5.345.252] — 2026-11-24
47
+ - Added: the agent MCP tool `hq_dm_send` takes an optional `continueExchange` boolean for agent recipients (`agt_…`). When hq-pro-core 1.182.0 or later pauses an agent-to-agent DM at the loop check, the tool shows the server's warning. The sending agent may then resend the same message once with `continueExchange: true`, and only if the exchange is about unfinished work. The resend reuses the held message's idempotency key, and the tool says "continued the exchange" when the server confirms. If the continued message is held again, the tool tells the agent to stop and not reply. Each DM to an agent now carries its own idempotency key. The flag is refused for a person, an email or a channel recipient, and for a non-boolean value, before anything is sent.
48
+ - The `hq_inbox_read` refused-ack paging test writes its 320 records to the state file in one locked call, instead of rewriting the file 320 times.
49
+ - Internal: on hosted bots (agents-v2) the hq-hook engine runs the bound company's own hook scripts (`companies/<company>/hooks/PreToolUse`, `PostToolUse` and `SessionStart`) itself, with the input, arguments and environment the bot's shell adapter gave them, so those scripts no longer keep the three events on the shell adapter. Another company's scripts never run. A company PreToolUse script that refuses, fails or runs out of time stops the tool call; on PostToolUse and SessionStart a refusal only adds a warning. When the scripts could run longer than the engine's time for the call, as master-hook's 120 s per script allows, the registered call goes to the shell adapter instead, so a slow script is waited for as before.
50
+ - Added test coverage locking in case-sensitive Antigravity tool-name checks.
51
+ - CI: the Windows baseline reader no longer marks a run incomplete when a failed test prints the output of a child test run it started.
52
+ - CI: the Windows test reader no longer marks a run incomplete when a child test run's result line is split over two lines.
53
+ - Internal: the batch train (`scripts/ci/batch-train.py`) no longer drops a green batch when main moves outside the train by at most 5 commits that touch none of the batch's files and no global path (workflows, CI scripts, manifests, lockfiles, toolchain and test config), and no required check on the new main is red. It merges the tested batch on top of the new main, at most twice per batch, and records each such move in the run report. Any compare it cannot read in full keeps the previous stop and rebuild.
54
+ - Internal: the batch train (`scripts/ci/batch-train.py`) reads job logs with `gh api --allow-escape-sequences`. gh 2.x refuses to print a job log with ANSI colour codes without it and exits 1, so the train could not read any gate log and judged a rate-limited run as a plain red (train run 45346687074). A gate whose log still cannot be read is classified from its check-run annotations, where `scripts/ci/wait-for-jobs.mjs` now also writes the `WAIT_FOR_JOBS_RATE_LIMITED` line. When the train cannot read the failed jobs, a gate's log or an annotation, it no longer judges the result: it holds the batch once until its own API limit resets (at most 20 min), judges it again, and otherwise stops without merging, drafting or splitting.
55
+ - Internal: the batch train (`scripts/ci/batch-train.py`) reads each PR's commit messages before its squash merge. When the PR title or any commit message holds `[skip ci]`, `[ci skip]`, `[no ci]`, `[skip actions]` or `[actions skip]`, it passes an explicit `--subject` and `--body` of the PR title (markers removed) and number, so the squash commit on main does not skip push workflows. If the commits cannot be read, or GitHub lists none, it does not merge that PR or the ones after it.
56
+ - ci: the two ci.yml gate pollers no longer run at the same time. `e2e (node 22)` now starts when `build (node 22) / ci` ends (it needs the build job, never its shards) and then waits for the e2e build and shards itself, so a re-run of failed jobs waits again. Both waits read the run's jobs once a minute, and the build job's first read comes after 120 s (`WAIT_FOR_JOBS_INITIAL_DELAY_SECONDS`, new). Required check names are unchanged.
57
+ - Internal: the CI gates `build (node 22) / ci` and `e2e (node 22)` (`scripts/ci/wait-for-jobs.mjs`) now treat a 403 or 429 whose body says "rate limit exceeded" as a rate limit even without the rate-limit headers, wait until the reset plus 1-5 s of jitter, and back off between polls from 30 s to 120 s. A limit that cannot clear before the gate's timeout fails the gate at once with a `WAIT_FOR_JOBS_RATE_LIMITED reset=<time>` line instead of a flat wait and "jobs still not finished". The batch train (`scripts/ci/batch-train.py`) reads that line, or GitHub's "API rate limit exceeded for installation" text, as infrastructure: it never splits the batch or drafts a PR for it, waits for the reset (at most 20 min), re-runs the failed jobs once, and otherwise stops without merging.
58
+ - Added a 17-case real-call Claude Code `Glob`/`Grep` PreToolUse corpus fixture and regression test confirming every case allows under the current Claude adapter.
59
+ - Check cleanup parity fixtures for live helper replies instead of fixed survival waits.
60
+ - Add `Host::Antigravity` payload decode, encode, strict tool-name mapping (refusing control characters including trailing newlines and NUL bytes), and opaque-tool refusals in `hq-hook`.
61
+ - Add Antigravity PreToolUse guard-chain wiring and parity fixtures for supported tool calls in `hq-hook`.
62
+ - Changed: `hq ontology lookup`, `neighbors`, `search`, `traverse` and `hq ontology brief --style full` now show when a decision was replaced by a later one. `lookup` and `neighbors` print `replaced: on <date> by <id> (<name>) [citation] file: <path>` directly under the header for a decision with an open `superseded_by` edge, and `replaces: <id> (<name>) on <date> ...` for the decision that replaced it. Duplicate edges to the same decision are shown once, a chain is followed for up to five decisions (`, itself replaced on <date> by <id>`), and a loop is reported as one. `lookup` prints the status of a replaced decision as `status = replaced [citation of the edge] (was decided [citation of the stored status])`, so "replaced" carries the origin and confidence of the edge that says so. Any other line that shows a replaced decision ends with ` | replaced <date> by <id> [<origin> <confidence>]`, for example `[agent:sonnet 0.60]`. With `--as-of`, the candidate lines under `ambiguous:` and `no match:` are marked as of that day. `--json` adds `replacedBy` and `replaces` on `lookup` and `neighbors`, `replacedBy` on a `search` result and `targetReplacedBy` on an edge (each `{id, date, source, by, conf}`); no existing field changed. The full brief also prints the day beside a project's stage, status and owner and a customer's stage (`stage beta [2026-11-19]`). The readers apply this by rule: nothing in the graph is written or closed, and a decision with no lineage prints as before.
63
+ - Added: `hq ontology update` and `rebuild` now say what the run revised from the changes its signals state: how many decisions were marked replaced, reversed and withdrawn, how many status rows were closed and how many lineage links were written. `--json` carries the same numbers under `revised`.
64
+ - Added: `hq ontology lineage backfill --company <slug>` finds lineage for decisions recorded before signals stated it. It walks decisions oldest day first, picks up to 6 earlier open decisions per decision by the rare words the two statements share and by shared topics that are not on a large share of all decisions, asks the model in batches whether the decision replaces or reverses any of them, and writes each day's accepted links before the next day. An answer must quote both statements. A link carries the model's origin at confidence 0.60 and reads as `replaced`; the command writes no status row, leaves a decision alone when a person or a record has since said it stands, and writes no second link for a pair another model already linked. Options: `--dry-run` (decisions, batches, estimated token and list-price cost ranges, and the flags that let the estimate through the daily cap; no model call), `--from`/`--to`, `--restart`, `--retry-unanswered`, `--allow-unanswered`, `--max-input-tokens`/`--max-output-tokens`, `--graph-root`, `--json`. A run that reaches the cap stops and the next run carries on; a decision that gets no usable reply holds its day and is sent again by the next run, and after three runs it is recorded as unanswered and listed by count. Running it again with nothing new changes nothing.
65
+ - Added: `hq ontology lineage undo --company <slug>` removes exactly the links the backfill wrote and clears its state, so a later backfill starts from the first day. Rows changed since are left and counted. `--dry-run` counts and writes nothing.
66
+ - Fixed: the `revised:` line of `hq ontology update` and `rebuild` counts each decision once, not once per audience folder, and no longer counts a status that was already in the graph.
67
+ - Added: the company graph now records decision lineage from signals by rule. When a signal file carries `changes`, `hq ontology rebuild` and `update` write a `supersedes` edge from the new decision to the earlier one (origin `rule:signal-changes`, confidence 0.75) and set the earlier decision's status to `superseded`, `reversed` or `withdrawn` from the new signal's day. The rows depend only on the set of changes: a decision changed twice keeps one open status after any number of rebuilds, and `update` reaches the same rows as a rebuild. A status a person or a record wrote on or after the change that says the decision stands is kept and the change is not applied; one that confirms the change keeps the link. A change a signal no longer states is taken back. `completes` is not applied to decisions. No model is called for this.
68
+ - Changed: `hq ontology lookup`, `neighbors`, `search` and the brief name the kind of change (`replaced:`, `reversed:`, `withdrawn:`), print a status this rule wrote once with its own citation, and end the citation of its rows with `from a signal quote`. When a person or a record set a status that says the decision stands after a link was written, the link is shown as `earlier link:` and the decision is not marked as replaced. `--json` adds `kind`, `withdrawn` and `earlierLinks`.
69
+ - Added: `model_tasks` in `companies/<slug>/settings/ontology.yaml` switches the graph's own model tasks off per company: `extraction` (reading sources no signal covers), `typing` (relationship typing) and `summaries` (page summaries), each `on`, `off`, `true` or `false`; `model_tasks: off` switches all three off. With a task off, nothing new is collected or sent for it, and items an earlier run left pending for it are held: they are kept, counted and reported ("N items pending for typing are held because the task is off") and are sent when the task is switched on again. A settings file that is not valid YAML, a `model_tasks` that is not a mapping, or a value that is not one of the four words switches the affected tasks off and the run says why; an unknown key under `model_tasks` gets a warning. `hq ontology status` shows the effective setting. A company without the key behaves as before.
70
+ - Added: the signals pass now records when a new signal changes an earlier one. Before a document is read, up to 12 earlier open decisions, action items, commitments and risks of the same audience that share its words or entities are added to the same model turn as data, under labels made for that turn. A signal in the reply may carry `changes`, naming the earlier item, the kind (`replaces`, `reverses`, `completes` or `withdraws`) and 4 to 30 words quoted from the document. Each entry is checked before anything is written: the earlier item must be one that was shown, older than the document, from another source and not already changed in the same run, and the quote must appear in the document body, on whole words, near words or entities it shares with the earlier item. What passes is written to the signal file as `changes`; what fails is dropped and counted in `changes_dropped` and in a warning line. Within one run, a document's new items and the items it changed are visible to the documents read after it. No extra model call is made, and a document with no earlier item is sent as before.
71
+ - Internal: on Claude Code and Codex (macOS and Linux), the new hook engine can now answer PreToolUse itself instead of the old `master-hook.sh` dispatcher, once `hq reindex` switches it over. Roots whose hook setup it does not fully model stay on the old dispatcher.
72
+ - Accept a registered `--hq-root` holding `core/` plus `core/core.yaml` or `.claude/hooks/hook-gate.sh` even before a `companies/` directory exists.
73
+ - Replace the 0.1s FIFO poll loop in `cleanup_mcp_parity` helper fixtures with a blocking `read -t 30` and close inherited fd 3 on spawned child helpers so live probes are not split across timeouts under load.
74
+ - Complete the Grok `PostToolUse` `journal-due` native port so Grok `Write`/`Edit`/`Bash` calls match the shipped hook instead of emitting a false block (`#3662`).
75
+ - Fix grandchild process-kill race in `src/lib/daemon/hook-requests-autocommit.test.ts` by waiting up to 1.5 s for asynchronous `SIGKILL` exit and treating Linux `/proc/<pid>/stat` zombie/dead states as terminated.
76
+ - Fixed: aligned agents-v2 prompt hook registration and enforcement behavior.
77
+ - Exit 0 with one clear stderr line (no block) when `PostToolUse` receives invalid JSON; empty, non-object, and wrong-typed payloads still exit 1.
78
+ - The `pretool_paths`, `pretool_batch2` and `lanes_reminder` hook tests no longer fail with `Broken pipe` when a hook exits before it reads its stdin payload. They use one shared stdin helper that accepts only `BrokenPipe` and still fails on any other write error.
79
+ - The `runBounded` process-group test now checks that the group's SIGTERM reached the grandchild through a marker file the grandchild writes, instead of polling the grandchild's pid. A killed grandchild that its new parent had not yet reaped still answered that poll.
80
+ - `hq sources sync` no longer fails the whole signals pass when one meeting times out. That document stays queued and the rest of the day's meetings still run. If 3 documents in a row time out, or every document that was tried timed out, the pass stops and fails as before so a provider outage is still reported.
81
+ - Fixed: `hq bot stop`'s final SIGKILL and the Windows mesh daemon stop no longer signal pid 0 from a bot status file or a corrupt daemon pid lock. `process.kill(0)` signals the caller's whole process group, so a bad file could kill the terminal that ran the command. Lane worker and watcher pid files, and the doctor refresh-sync pull pid file, are now written through a temp file and a rename, so a reader never sees an empty or partial pid.
82
+ - Internal: test cleanup in the child-bootstrap, runtime-stream and resolve-company suites validates pids read back from fixture files before signalling them, and the new `src/utils/pid.ts` helpers (`parsePid`, `signalPid`, `signalProcessGroup`, `writePidFileAtomic`) refuse 0, negative and non-integer pids. An empty `child.pid` could make cleanup run `process.kill(0, "SIGKILL")` and kill a CI runner (#3626).
83
+ - Flag requests now report the client version and platform.
84
+ - Run six real-time hook cases on the nightly schedule and remove fixed waits from process tests.
85
+ - fix(release): the Windows hook package jobs now install their release tools in each job instead of restoring a shared cache. In v5.345.251 the Windows x64 hook package did not publish because it restored a cache saved by the Windows Arm job on a different drive.
86
+ - Changed: the host canary record shipped with the CLI is refreshed for this release build.
87
+ - Fixed: a file this machine had just uploaded is no longer left "for the next sync" on every later push. A background pull that checked the new upload recorded an older vault version for it, so each push after that was refused as a conflict and nothing uploaded. Pull now records the version it fetched, and push repairs records that already have the older version: it reads the vault copy once and uploads when that copy is the one this machine last synced. Rescue also removes files an earlier release shipped and a later one removed, and keeps retired hooks when `companies/` or a company folder is a missing link. hq-cli now uses hq-cloud 6.18.124.
88
+ - Added jq-only PATH suffix recovery in the native hook gate to match `hook-gate.sh`.
89
+ - Added: `hq-hook` reads a second flag for each bridged hook, `hook-engine-port-<id>-shadow`. When it is true the hook runs in shadow mode (the shell script decides and the engine runs beside it and logs), whatever `hook-engine-port-<id>` and `hook-engine-port-<id>-v2` say. `hq-hook bridge-plan` prints `shadow` for that hook. The flag service stores booleans only, so this is how it can put a hook in shadow mode. A `-shadow` flag for a name that is not a bridged hook is ignored.
90
+ - Improved Windows path handling and native guard evaluation in `hq-hook`.
91
+ - hq-hook on Windows: the company scope check reads HOME in every spelling Windows uses (`C:\Users\name`, `C:/Users/name`, `/c/Users/name`), so `~` and `$HOME` paths are read as the same folder on both sides of a comparison. On every platform, a hook process whose HOME is set to something that is not one absolute folder now stops a call that names a path, with a message that says so.
92
+ - hq-hook on Windows: when HOME is not set, the company scope check takes the home folder from USERPROFILE. When neither is set, a call that names a path under the home folder or a `.hq` folder stops with a message that names the two variables; other calls are unchanged. Nothing changes on macOS or Linux.
93
+ - hq-hook on Windows: the company scope check reads a path under the home `.hq` folder the same way in any letter case, including the drive letter, and reads `/c/../d/...` as drive D as Git Bash does. Nothing changes on macOS or Linux.
94
+ - **hq-hook: the hook state store works on Windows.** In the native engine (`hq-hook run`), the hooks that keep state between calls now run on Windows. They no longer stop with "the Rust state store, which is off on this platform (Windows) until US-022". Nothing changes for Windows machines today: HQ does not register the native engine on Windows yet, and the master-hook bridge still runs the bash hooks there. In the native engine the image-size hook and the session handoff are not yet on for Windows.
95
+ - **hq-hook on Windows: Codex and Grok tool calls work with a Windows home folder.** The native engine read a Windows home folder name (`C:\Users\name`) as pattern text, and Codex and Grok tool calls failed. It now reads it as a folder, in every spelling a command can use.
96
+ - **hq-hook on Windows: the package-install log row is valid JSON.** The row under `workspace/learnings/` wrote the working folder with Windows backslashes, which no JSON reader accepts. It now writes the folder as Git Bash prints it (`/c/Users/name`).
97
+ - hq-hook on Windows: the hook state store can now create, write, rename and remove its files and folders (session ledgers, held reminders, lock folders, the duplicate ledger and the engine log). Also, the Windows read of the hook registry and Stop scripts opens the folders above its folder without blocking other programs, so a program holding a folder such as C:\Users open no longer makes that read fail.
98
+ - Fixed: on the `hq core hq-session` fast path, a company change named with two leading `--session-id` flags (`--session-id a --session-id b set company_slug acme`) now records its binding receipt for the last one, as the command itself already did. Before, only the first flag was skipped, so the change was not seen and no receipt was written, and a hook-confirmed bind of the session's own id was never recorded.
99
+ - Fixed: `hq core hq-session set company_slug PERSONAL` (or `Personal`, any letter case) is now the no-company scope, stored as `personal`, as the CLI's session readers already read it. Before, the native command and the bundled `hq-session.sh` stored it as a company named `PERSONAL`. The native session bind in `hq-hook` accepts the matching `hq-session.sh` revision from hq-core-staging, which folds the same way, beside the revisions it already accepted, which keep their behavior.
100
+ - Fix `journal_due::shell_and_native_writers_on_one_counter_lose_no_update` test contention by running the 13 concurrent shell/native counter updates in barrier-synchronized waves of 2–3 writers instead of queuing 7 bash subprocesses against the 1 s `LOCK_WAIT`.
101
+ - ci: the "Main full suite" workflow no longer cancels a main push run in progress when a newer push arrives; the newer push waits, and only the newest waiting push runs next.
102
+ - Hardened the repository merge-hold check to refuse when the hold lookup cannot complete or confirm an answer.
103
+ - Preserve a merge check refusal when its explanation cannot be read.
104
+ - Fixed: automatic project binding no longer sends sessions to a Board that was archived or completed, such as a duplicate archived in favor of the canonical Board. Remembered bindings to such a Board are forgotten, so the session binds to the active project instead.
105
+ - Fixed: the Board roster now shows when each member's HQ daemon was last seen. The daemon reports a small health summary (counts only) for each company every five minutes, and the Work Mesh service no longer crashes and restarts when a connection to the live channel times out.
106
+ - Improved tool-name normalization in native hook handling.
107
+ - Internal: hardened the PreToolUse guard and made its file check faster.
108
+ - Stabilize the `post_mesh_tool_writes` stand-in daemon handoff so overlapping `prd.json` writes reliably coalesce into a rerun under Linux CI load.
109
+ - Hardened the `protect-core` parity test harness so exit-0 bash runs preserve stdout/stderr diagnostics and avoid repeated `PATH` prefix growth.
110
+ - Fixed: when the qmd bundled with hq fails its startup check, hq now checks the qmd on your PATH the same way before using it. A PATH copy that fails, such as a damaged `qmd.cmd` in `%APPDATA%\npm` on Windows, is no longer run. If neither copy works, hq search prints what happened and the one command that fixes it (reinstall hq), instead of a raw qmd error. Errors from a PATH copy now also record why the bundled copy was skipped.
111
+ - Fixed: `hq reindex` keeps an event of the project's `.claude/settings.json` on `master-hook.sh` while Codex or Grok Build keeps that event on its shell adapter and the root's `hook-adapter-core.sh` is a revision that reads only `master-hook.sh` entries. `hq doctor` reports such an event as held, and as a failure when it is already registered to the new core.
112
+ - Removed the timed "twice the text" credential-shape scan test. The counted engine-input check in the same suite already fails on any scan whose cost grows faster than the text.
113
+ - Re-pin the native `core/scripts/lib/hook-adapter-core.sh` SHA-256 to `cf1abd5c832722d26a46ced0694e8a3cd0d70ff30194a03fb2ce989289a8621c` (`hq-core-staging#2129`, comment-only change).
114
+ - Refuse `NotebookEdit` calls targeting `repos/` outside `workspace/worktrees/` in `hq-hook` `repo-worktree` command rules across Claude and Codex payloads.
115
+ - Fixed: `hq report decommission` now retires the hq-pro report record (DELETE with the current revision) before printing `decommissioned: true`. Direct CLI use no longer reports success while `hq report get` still shows a live or draft-ready record.
116
+ - Fixed Claude Code project hook registration on HQ Core v16.0.51 by recognizing its released adapter alongside the current revision.
117
+ - Added: the native company scope guard (`hq-hook`) now leaves a single-use bind intent when it allows a Bash call that runs `hq-session.sh set company_slug <slug>`, `add company <slug>` or `remove company <slug>` for the calling session, so `hq core hq-session` can record a session's bind of its own id. The file is `~/.hq/work-mesh/bindings/intents/<session>.<tool_use_id>` (mode 0600, folders 0700, never written through a link, never replacing an existing file) and holds the action, the company and the time. The guard's allow or refuse answer is unchanged; a write that fails is one line in the engine log. Command forms the guard cannot read with confidence, calls it refuses, and a `--session-id` naming another session write nothing. The intent is written on macOS and Linux only; on Windows nothing is written yet.
118
+ - Fixed: the copy of the current sync's record that HQ gives the new sync engine is now decided file by file, and leaves a file out whenever it is not sure. A file the current sync wrote after its switch was turned off is left out and the rest are copied, with one journal or several; without a known switch-off time nothing is copied. A file is also left out when its sync or removal time is not a plain UTC timestamp or is in the future, when two journals disagree about it at the same time, or, on macOS and Windows, when two names differ only by case or Unicode form. When two journals both have a file, the later of its sync time and removal time wins. HQ reads the journal only from `HQ_STATE_DIR` when it is set, and otherwise from `~/.hq` and the daemon's own state folder. An old copy is marked out of date before it is removed; if it cannot be removed, for example on Windows while the engine has it open, HQ warns on each reconcile, records it in the rollout state, tries again, and writes no new copy until the old one is gone. This includes a company already back on the current sync. A company with nothing to copy is no longer reported as an error.
119
+ - Changed: the client-health heartbeat now carries `syncEngineByVault`, one
120
+ entry per vault in this machine's new sync engine rollout state, at most 16:
121
+ vault uid, whether the engine or the legacy sync owns it, whether the
122
+ daemon's engine unit is running (checked against a live daemon pid), the
123
+ last cycle's time and result, held count and hold kinds, conflicts and
124
+ transfer failures (with a truncated flag when the engine's list hit its
125
+ cap) and requests in the last 24 hours. No paths or file names are sent.
126
+ A machine with rollout state but no vaults sends an empty list; a machine
127
+ with no rollout state sends the same heartbeat as before.
128
+ - Fixed: `hq` commands no longer slow down on some machines with an unusual
129
+ engine status file.
130
+ - Changed: each `syncEngineByVault` entry in the client-health heartbeat now
131
+ carries `safety` when the sync engine reports it: for vault deletes sent,
132
+ vault deletes applied to local files, local files a download moved to the sync trash, conflict backups written,
133
+ local edits replaced by a vault body, uploads over a vault body, deletes and
134
+ uploads the vault refused, and adoption runs, the total, the count in the last
135
+ 24 hours and the time of the last one. Counters that never fired are left
136
+ out, an engine that reports none sends an empty `safety`, and an older engine
137
+ sends none. Numbers only; no paths.
138
+ - Add full-adapter Antigravity credential-search tests for case variants, backslash forms, `**/.aws/credentials`, `~/.config/gh`, and `~/.hq/secrets-cache`.
139
+ - Changed: accept `hq-core` v16.0.49/v16.0.50 `prompt-company-mention.sh` (`6cb4ec86`) in native `UserPromptSubmit` company bind by porting `prompt_company_mention_scheduled_task_body` and dispatching scheduled-task resolution by the on-disk library revision.
140
+ - Added: `hq-hook` answers Stop natively on Grok, fleet-local and agents-v2 hosts (`grok-adapter:Stop`, `fleet-local-adapter:Stop` and `agents-v2-adapter:Stop` claimed), exports `HQ_STOP_DECISION_DELIVERABLE` to Grok Stop and SubagentStop hooks, runs the lanes Stop hooks natively on fleet hosts, and hands an agents-v2 Stop back to the shell adapter unless the adapter is the fixed hq-agents-v2 #332 revision. Supersedes #3505.
141
+ - Changed: on hosted agents, the hooks that run after a tool call are answered natively by `hq-hook` instead of through the shell adapter. An HQ root with a hook that has no native port, such as a company folder hook, still sends the event to the shell adapter, which runs it.
142
+ - Added: port `agents-v2-adapter:SessionStart` natively in `hq-hook` (immediate `HQ_SESSION_RENDERED=1` no-op, root gate, `HQ_COMPANY_SLUG` single-tenant scope pre-bind, normalized payload, synchronous settings refusal, post-#332 `HQ_HARNESS=codex` mesh export, native skip list) with differential parity tests (US-050-B). A registered agents-v2 SessionStart stays on the adapter while any SessionStart hook is not covered natively (today `master-hook:SessionStart`, and any unported folder hook such as `core/hooks/SessionStart/40-conduct-reap.sh`), or when the adapter is not the fixed hq-agents-v2 #332 revision. The native answer matches the adapter's: it runs a registry hook only when `hook-registry.json` lists it with a script that exists, runs a SessionStart folder hook such as the agent-browser check only when master-hook would run that file, prints `{"context": ...}` in the adapter's indented form, prints nothing after a refusal, refuses when `settings.json` starts master-hook SessionStart, and exits 0 for a registration that names no HQ root where the adapter would find none (one where it would find a root goes to the adapter).
143
+ - Added: port agents-v2 SubagentStop adapter and master-hook rows natively with differential parity tests (US-050-B / US-049-B). Only the fixed hq-agents-v2 #332 adapter (sha256 e5cec6c1) keeps SubagentStop native; an older or edited adapter, or a root with no settings or registry file, hands the event back to the adapter as it does for SessionEnd.
144
+ - Added: port `agents-v2-adapter:UserPromptSubmit` and `master-hook:UserPromptSubmit` for `agents-v2` natively in `hq-hook` (rendered-session early no-op, local US-030 pending freshness stamp, scope pre-bind, post-#332 single-pass skip list and `HQ_HARNESS=codex` master overlay, `UserPromptSubmit@agents-v2` COVERS claim, and differential parity suite).
145
+ - Fixed: a local HQ Fleet bot no longer waits forever for a release update after one of its scheduled jobs stopped mid-run. The update now counts a scheduled job as running only while its run claim is younger than the HQ Fleet Runtime's own 300-second limit, which a live run refreshes every minute. An older, future-dated or unreadable claim no longer holds the update. The daemon log names the job and the claim's time, and also reports a schedule file it cannot read instead of passing over it (hq-core-rust US-054).
146
+ - Fixed: a local bot's scheduled job saved with a year in its schedule (for example `cron(0 9 ? * MON-FRI 2026)`) now moves into the HQ Fleet Runtime instead of being skipped on every `hq bot set` and restart. The old local scheduler never applied the year field, so the job moves as the same five fields it ran on, and the bot's log notes the conversion. As with other moved jobs, the schedule runs in the HQ Fleet Runtime's time zone. A job that still cannot move, such as one that runs on an event or has a schedule that is not text, stays unchanged in `jobs.json`, and the warning now gives the reason for each job (hq-core-rust US-055).
147
+ - Enabled Windows compaction history storage in PreCompact using the owner-only Windows store backend.
148
+ - ci(hq-hook): the Windows hq-hook baseline run is split over four shard jobs on the team's Windows runners instead of one job (about 43 minutes of test time became about 11 per shard). One job joins the shard results into the same `beaker-baseline` artifact; the baseline counts as complete only when every shard reported.
149
+ - fix(windows): `hq doctor --fix-jq` now adds the jq folder (`%USERPROFILE%\.local\bin`) to the user PATH, places a copy beside `hq.cmd` so terminals and Claude Code sessions that are already open find it, finishes with the `jq.on-path` check against the PATH a new terminal gets, and exits 1 with the exact remaining step when that check still fails. Before, it installed jq off PATH, printed "Verified" and exited 0 while HQ hooks kept blocking every tool call. The first hq command after an install or update, the npm postinstall and `hq install-global` now do the same on their own, so a Windows machine without jq needs no jq install by hand; a session that was already open may need a restart when hq is not installed under the user profile. The `jq.on-path` hint on Windows names `hq doctor --fix-jq` instead of winget, and a terminal opened before the repair gets a restart warning instead of a failure (#3716).
150
+ - fix(hq-hook): fall through to normalized repository-edit path checks when the Windows worktree port allows
151
+ - Respect repository worktree requirements for direct file edits on Windows.
152
+ - ci(hq-hook): the Windows hq-hook tests (Beaker) no longer run on draft pull request pushes; add the `ci-windows` label to a draft to get them (it takes effect on the next push). Ready pull requests are unchanged. Also adds a per-batch mode behind the repository variable `HQ_WINDOWS_PER_BATCH=on`: the Windows tests then run once per batch-train batch, on the train's combined commit with the whole Windows list, and the batch train requires that result (green, or red only on tests that already fail on main) instead of one per pull request.
153
+ - Improved Windows path handling for Glob root and company Git metadata checks.
154
+ - Added: `hq core hq-session` keeps a dated record of each company change to a session (`set company_slug`, `add company`, `remove company`) in `~/.hq/work-mesh/bindings/<session>.jsonl`, with the source of the change: `explicit` for a bind a person or agent ran, the source a launcher names, or `scheduled_task` for an unattended run. Each line names the HQ tree it was made in, and, when `--session-id` named another session, the caller's session. A record is kept only for a session named with `--session-id` (or, when the bundled script runs, by the environment); binds made from inside a hook, binds found through `workspace/sessions/.current`, and `set company_source` leave no record. Nothing reads the record to decide reporting yet. `hq logout` deletes it.
155
+ - Added: when `hq core hq-session` binds a session to a single company whose Work Mesh reporting is required (the `work-mesh-company-reporting-required` flag is on), it prints "Activity in session <first 12 characters of its id> is reported to <company>. Required by the company.", adding "(this session)" or "(not this session)" when the caller's own session is known. Nothing records that the line was shown. The session-binding record is now kept only for a `--session-id` the caller typed that names a session no session variable in the environment names (ids compared without case, `CURSOR_TRACE_ID` included), so an id a child process inherited is never credited, and its lines are schema version 2. `hq core hq-session` records a session's bind of its own id when the hook host confirmed that session for the tool call that ran it. The confirmation is a single-use intent file under `~/.hq/work-mesh/bindings/intents/`, owned by the user and writable by no one else, which the native scope guard is to write (not yet shipped). Until then no intent exists and such binds are not credited. When an unconfirmed change leaves a lock set different from the session's last record (an unbind, a remove, a switch, or an add from one company to two), a line with the new lock set and the source `unconfirmed` is written. It never counts, so the earlier bind is closed and nothing new is credited. Only an exact repeat writes nothing.
156
+ - Work Mesh: the organize ask no longer offers "Leave untracked" when the session is (or will be) company-bound. That choice was refused on submit, so the prompt was a dead option.
157
+
5
158
  ## [5.345.251] — 2026-11-23
6
159
  - Fixed: on hosted agents, the engine-log row for an advisory hook refusal no longer shows "reason withheld" on a slow or busy machine. The time limit for checking each reason now starts after the checker has loaded, and a slow log write no longer uses up the limit for the next row.
7
160
  - Fixed: on hosted agents, when a native hook refuses after a tool call or before a model call, `hq-hook` now keeps running the remaining hooks, prints the reason and writes it to the engine log. Before, the first refusal stopped the remaining hooks and its reason was lost.
@@ -280,6 +280,15 @@ cmd_set() {
280
280
  local key="${1:-}" value="${2:-}"
281
281
  [ -n "$key" ] && [ $# -ge 2 ] || { echo "usage: hq-session.sh set <key> <value>" >&2; exit 1; }
282
282
 
283
+ # `personal` is the no-company scope in any letter case (PERSONAL, Personal),
284
+ # as the CLI's session readers treat it. Fold it here so the stored value,
285
+ # the capability and the Work Mesh register all see the reserved scope,
286
+ # never a company of that name.
287
+ # A bracket pattern, not tr: the exact-name bind path starts no process.
288
+ if [ "$key" = "company_slug" ]; then
289
+ case "$value" in [Pp][Ee][Rr][Ss][Oo][Nn][Aa][Ll]) value=personal ;; esac
290
+ fi
291
+
283
292
  # Reject invalid company_slug values before writing anything. A case alias
284
293
  # could otherwise bind the session and surface policies from a differently
285
294
  # named company directory on a case-insensitive filesystem.
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "schema": "hq.host-canary-release.v1",
3
- "cliVersion": "5.345.251",
3
+ "cliVersion": "5.345.253",
4
4
  "hosts": {
5
5
  "claude": [
6
6
  {
7
7
  "passed": true,
8
- "at": "2026-11-23T20:02:40.967Z",
9
- "engineVersion": "0.3.1+hq.5.345.251.src.99cd299fb79b3367c65b2895f280daaa61a0b825b0223f002c5d4b56b189f195",
8
+ "at": "2026-11-24T19:51:13.230Z",
9
+ "engineVersion": "0.3.1+hq.5.345.253.src.59e8f1923191dbcba843a9703992994f8782a22fd64be131061da7975ae0d421",
10
10
  "gateSha256": "a2879dfe692233f5953bac86672947bbd82f3c5247292f3efcb80f16c3d2c6b1"
11
+ },
12
+ {
13
+ "passed": true,
14
+ "at": "2026-11-24T19:52:12.286Z",
15
+ "engineVersion": "0.3.1+hq.5.345.253.src.59e8f1923191dbcba843a9703992994f8782a22fd64be131061da7975ae0d421",
16
+ "gateSha256": "ca58a94859eae0a345c11c8d9c59303eb76350dc1cf223391037d21979c28718"
11
17
  }
12
18
  ]
13
19
  }
@@ -3236,6 +3236,10 @@ export declare const COMMAND_CATALOG: readonly [{
3236
3236
  readonly flags: "-y, --yes";
3237
3237
  readonly description: "Skip the confirmation prompt (for scripts); not above 1000 objects";
3238
3238
  readonly hidden: false;
3239
+ }, {
3240
+ readonly flags: "--confirmation <token>";
3241
+ readonly description: "Send an hqdc_ delete confirmation token with a real company-vault delete; asks you to type the confirmation in a terminal first (not with --dry-run or --personal)";
3242
+ readonly hidden: false;
3239
3243
  }];
3240
3244
  readonly subcommands: readonly [];
3241
3245
  }, {
@@ -6006,6 +6010,126 @@ export declare const COMMAND_CATALOG: readonly [{
6006
6010
  readonly hidden: false;
6007
6011
  }];
6008
6012
  readonly subcommands: readonly [];
6013
+ }, {
6014
+ readonly name: "lineage";
6015
+ readonly description: "Decision lineage: which decision replaced an earlier one";
6016
+ readonly aliases: readonly [];
6017
+ readonly hidden: false;
6018
+ readonly helpOption: true;
6019
+ readonly helpCommand: true;
6020
+ readonly usage: "[options] [command]";
6021
+ readonly helpText: readonly [];
6022
+ readonly arguments: readonly [];
6023
+ readonly options: readonly [];
6024
+ readonly subcommands: readonly [{
6025
+ readonly name: "backfill";
6026
+ readonly description: "Ask the model, day by day from the oldest, whether each decision with no stated change replaces or reverses an earlier open one, and write a link for each that holds (model authority, no status row; each written link is listed in .state/lineage-backfill.jsonl, and `hq ontology lineage undo` removes exactly those). A day with a decision that got no usable reply is not written: the next run sends it again, and after 3 runs it is recorded as unanswered. Exit code 2 when the walk stopped early, 3 when it finished with a decision unanswered in this run. Runs whenever it is invoked, whatever model_tasks says";
6027
+ readonly aliases: readonly [];
6028
+ readonly hidden: false;
6029
+ readonly helpOption: true;
6030
+ readonly helpCommand: false;
6031
+ readonly usage: "[options]";
6032
+ readonly helpText: readonly [];
6033
+ readonly arguments: readonly [];
6034
+ readonly options: readonly [{
6035
+ readonly flags: "--company <slug>";
6036
+ readonly description: "company whose graph to use";
6037
+ readonly hidden: false;
6038
+ }, {
6039
+ readonly flags: "--hq-root <path>";
6040
+ readonly description: "HQ installation to operate on";
6041
+ readonly hidden: false;
6042
+ }, {
6043
+ readonly flags: "--graph-root <path>";
6044
+ readonly description: "graph folder to use instead of companies/<slug>/.hq/ontology-graph (env HQ_ONTOLOGY_GRAPH_ROOT)";
6045
+ readonly hidden: false;
6046
+ }, {
6047
+ readonly flags: "--member <person uid>";
6048
+ readonly description: "member the graph is built or read for (env HQ_ONTOLOGY_MEMBER)";
6049
+ readonly hidden: false;
6050
+ }, {
6051
+ readonly flags: "--audience-key <key>";
6052
+ readonly description: "audience key the member holds; repeat for more (env HQ_ONTOLOGY_AUDIENCE_KEYS, comma-separated)";
6053
+ readonly hidden: false;
6054
+ }, {
6055
+ readonly flags: "--json";
6056
+ readonly description: "print JSON";
6057
+ readonly hidden: false;
6058
+ }, {
6059
+ readonly flags: "--from <date>";
6060
+ readonly description: "first decision day to ask about (YYYY-MM-DD)";
6061
+ readonly hidden: false;
6062
+ }, {
6063
+ readonly flags: "--to <date>";
6064
+ readonly description: "last decision day to ask about (YYYY-MM-DD)";
6065
+ readonly hidden: false;
6066
+ }, {
6067
+ readonly flags: "--restart";
6068
+ readonly description: "forget what earlier runs settled, their attempt counts and their unanswered decisions, and walk from the first day; answers already given cost nothing";
6069
+ readonly hidden: false;
6070
+ }, {
6071
+ readonly flags: "--retry-unanswered";
6072
+ readonly description: "send the decisions earlier runs recorded as unanswered again";
6073
+ readonly hidden: false;
6074
+ }, {
6075
+ readonly flags: "--allow-unanswered";
6076
+ readonly description: "record a decision with no usable reply as unanswered at once instead of holding its day for the next run, and do not exit non-zero for it";
6077
+ readonly hidden: false;
6078
+ }, {
6079
+ readonly flags: "--max-input-tokens <n>";
6080
+ readonly description: "model input tokens allowed per day for this run, counting the day's earlier runs (default 150000)";
6081
+ readonly hidden: false;
6082
+ }, {
6083
+ readonly flags: "--max-output-tokens <n>";
6084
+ readonly description: "model output tokens allowed per day for this run (default 20000)";
6085
+ readonly hidden: false;
6086
+ }, {
6087
+ readonly flags: "--dry-run";
6088
+ readonly description: "count the decisions and batches and estimate the tokens and the list-price cost as ranges, with the flags that let the estimate through the daily cap; call no model and write nothing";
6089
+ readonly hidden: false;
6090
+ }];
6091
+ readonly subcommands: readonly [];
6092
+ }, {
6093
+ readonly name: "undo";
6094
+ readonly description: "Take back what `hq ontology lineage backfill` wrote: remove the rows .state/lineage-backfill.jsonl lists (each link's edge and its inverse) and clear the walk's state, so a later backfill starts from the first day. A row is removed only when the graph still holds it as the backfill wrote it; a row changed since is left and counted. No other row is touched, and no model is called";
6095
+ readonly aliases: readonly [];
6096
+ readonly hidden: false;
6097
+ readonly helpOption: true;
6098
+ readonly helpCommand: false;
6099
+ readonly usage: "[options]";
6100
+ readonly helpText: readonly [];
6101
+ readonly arguments: readonly [];
6102
+ readonly options: readonly [{
6103
+ readonly flags: "--company <slug>";
6104
+ readonly description: "company whose graph to use";
6105
+ readonly hidden: false;
6106
+ }, {
6107
+ readonly flags: "--hq-root <path>";
6108
+ readonly description: "HQ installation to operate on";
6109
+ readonly hidden: false;
6110
+ }, {
6111
+ readonly flags: "--graph-root <path>";
6112
+ readonly description: "graph folder to use instead of companies/<slug>/.hq/ontology-graph (env HQ_ONTOLOGY_GRAPH_ROOT)";
6113
+ readonly hidden: false;
6114
+ }, {
6115
+ readonly flags: "--member <person uid>";
6116
+ readonly description: "member the graph is built or read for (env HQ_ONTOLOGY_MEMBER)";
6117
+ readonly hidden: false;
6118
+ }, {
6119
+ readonly flags: "--audience-key <key>";
6120
+ readonly description: "audience key the member holds; repeat for more (env HQ_ONTOLOGY_AUDIENCE_KEYS, comma-separated)";
6121
+ readonly hidden: false;
6122
+ }, {
6123
+ readonly flags: "--json";
6124
+ readonly description: "print JSON";
6125
+ readonly hidden: false;
6126
+ }, {
6127
+ readonly flags: "--dry-run";
6128
+ readonly description: "count what would be removed and left; write nothing";
6129
+ readonly hidden: false;
6130
+ }];
6131
+ readonly subcommands: readonly [];
6132
+ }];
6009
6133
  }, {
6010
6134
  readonly name: "lookup";
6011
6135
  readonly description: "Find an entity by name and print its facts, each with a source and date";
@@ -14224,6 +14348,150 @@ export declare const COMMAND_CATALOG: readonly [{
14224
14348
  readonly subcommands: readonly [];
14225
14349
  }];
14226
14350
  }];
14351
+ }, {
14352
+ readonly name: "ci";
14353
+ readonly description: "Smart CI: record and measure what CI does (watch-only)";
14354
+ readonly aliases: readonly [];
14355
+ readonly hidden: false;
14356
+ readonly helpOption: true;
14357
+ readonly helpCommand: true;
14358
+ readonly usage: "[options] [command]";
14359
+ readonly helpText: readonly [];
14360
+ readonly arguments: readonly [];
14361
+ readonly options: readonly [];
14362
+ readonly subcommands: readonly [{
14363
+ readonly name: "intake";
14364
+ readonly description: "Record CI jobs, checks, pull requests, pushes and runner pool state into the run ledger (read-only towards GitHub)";
14365
+ readonly aliases: readonly [];
14366
+ readonly hidden: false;
14367
+ readonly helpOption: true;
14368
+ readonly helpCommand: false;
14369
+ readonly usage: "[options]";
14370
+ readonly helpText: readonly [];
14371
+ readonly arguments: readonly [];
14372
+ readonly options: readonly [{
14373
+ readonly flags: "--repo <owner/name>";
14374
+ readonly description: "repository to record; repeat for more (default: indigoai-us/hq-cli and indigoai-us/hq-pro)";
14375
+ readonly hidden: false;
14376
+ }, {
14377
+ readonly flags: "--runner-org <org>";
14378
+ readonly description: "org whose runner pools are sampled (default: indigoai-us)";
14379
+ readonly hidden: false;
14380
+ }, {
14381
+ readonly flags: "--no-runners";
14382
+ readonly description: "do not sample runner pools";
14383
+ readonly hidden: false;
14384
+ }, {
14385
+ readonly flags: "--no-check-runs";
14386
+ readonly description: "do not read check runs";
14387
+ readonly hidden: false;
14388
+ }, {
14389
+ readonly flags: "--store-dir <path>";
14390
+ readonly description: "ledger directory (default: HQ_SMART_CI_STORE_DIR, else ~/.hq/delivery/ledger)";
14391
+ readonly hidden: false;
14392
+ }, {
14393
+ readonly flags: "--once";
14394
+ readonly description: "run one cycle and stop";
14395
+ readonly hidden: false;
14396
+ }, {
14397
+ readonly flags: "--duration-minutes <n>";
14398
+ readonly description: "stop after this many minutes (default: run until stopped)";
14399
+ readonly hidden: false;
14400
+ }, {
14401
+ readonly flags: "--interval-seconds <n>";
14402
+ readonly description: "seconds between cycles (default: 60)";
14403
+ readonly hidden: false;
14404
+ }, {
14405
+ readonly flags: "--lookback-minutes <n>";
14406
+ readonly description: "on a first start, also record runs created this many minutes back (default: 0)";
14407
+ readonly hidden: false;
14408
+ }, {
14409
+ readonly flags: "--hourly-budget <n>";
14410
+ readonly description: "charged GitHub requests an hour the intake allows itself, counted across restarts (default: 1500)";
14411
+ readonly hidden: false;
14412
+ }, {
14413
+ readonly flags: "--rate-floor <n>";
14414
+ readonly description: "make no request while the gh login has this many or fewer requests left this hour (default: 500)";
14415
+ readonly hidden: false;
14416
+ }, {
14417
+ readonly flags: "--active-window-minutes <n>";
14418
+ readonly description: "closed records older than this move to dated archive files; 0 keeps one file (default: 120)";
14419
+ readonly hidden: false;
14420
+ }, {
14421
+ readonly flags: "--audit-log <path>";
14422
+ readonly description: "where to write one line per GitHub request (default: smart-ci-github-audit.jsonl in the ledger directory)";
14423
+ readonly hidden: false;
14424
+ }, {
14425
+ readonly flags: "--replay-fixture <path>";
14426
+ readonly description: "record a fixture file instead of polling GitHub";
14427
+ readonly hidden: false;
14428
+ }, {
14429
+ readonly flags: "--batch-size <n>";
14430
+ readonly description: "observations per commit when replaying (default: 200)";
14431
+ readonly hidden: false;
14432
+ }, {
14433
+ readonly flags: "--record-fixture <path>";
14434
+ readonly description: "read a past window from GitHub and write it as a fixture; needs one --repo, --from and --to";
14435
+ readonly hidden: false;
14436
+ }, {
14437
+ readonly flags: "--from <iso>";
14438
+ readonly description: "start of the window to record (inclusive)";
14439
+ readonly hidden: false;
14440
+ }, {
14441
+ readonly flags: "--to <iso>";
14442
+ readonly description: "end of the window to record (exclusive)";
14443
+ readonly hidden: false;
14444
+ }, {
14445
+ readonly flags: "--json";
14446
+ readonly description: "print the final summary as JSON";
14447
+ readonly hidden: false;
14448
+ }];
14449
+ readonly subcommands: readonly [];
14450
+ }, {
14451
+ readonly name: "metrics";
14452
+ readonly description: "Print CI waits, waste and cost per merge for a repo from the run ledger";
14453
+ readonly aliases: readonly [];
14454
+ readonly hidden: false;
14455
+ readonly helpOption: true;
14456
+ readonly helpCommand: false;
14457
+ readonly usage: "[options]";
14458
+ readonly helpText: readonly [];
14459
+ readonly arguments: readonly [];
14460
+ readonly options: readonly [{
14461
+ readonly flags: "--repo <owner/name>";
14462
+ readonly description: "repository to report on";
14463
+ readonly hidden: false;
14464
+ }, {
14465
+ readonly flags: "--since <date>";
14466
+ readonly description: "start of the window, a date (2026-11-21) or an ISO time, UTC";
14467
+ readonly hidden: false;
14468
+ }, {
14469
+ readonly flags: "--until <date>";
14470
+ readonly description: "end of the window, exclusive (default: now)";
14471
+ readonly hidden: false;
14472
+ }, {
14473
+ readonly flags: "--store-dir <path>";
14474
+ readonly description: "ledger directory (default: HQ_SMART_CI_STORE_DIR, else ~/.hq/delivery/ledger)";
14475
+ readonly hidden: false;
14476
+ }, {
14477
+ readonly flags: "--deploy-workflow <name>";
14478
+ readonly description: "workflow that deploys to production on merge (default: known per repo)";
14479
+ readonly hidden: false;
14480
+ }, {
14481
+ readonly flags: "--github-billed-usd <amount>";
14482
+ readonly description: "billed GitHub amount for this repo and window, to use in place of the estimate";
14483
+ readonly hidden: false;
14484
+ }, {
14485
+ readonly flags: "--aws-fleet-usd <amount>";
14486
+ readonly description: "AWS runner fleet amount for this window, to use in place of the estimate";
14487
+ readonly hidden: false;
14488
+ }, {
14489
+ readonly flags: "--json";
14490
+ readonly description: "print the numbers as JSON";
14491
+ readonly hidden: false;
14492
+ }];
14493
+ readonly subcommands: readonly [];
14494
+ }];
14227
14495
  }, {
14228
14496
  readonly name: "env";
14229
14497
  readonly description: "Environment profiles: the places that can do work (hq-environment-profile.v1)";
@@ -14397,7 +14665,7 @@ export declare const COMMAND_CATALOG: readonly [{
14397
14665
  readonly hidden: false;
14398
14666
  }, {
14399
14667
  readonly flags: "--fix-jq";
14400
- readonly description: "Install the verified jq required by HQ hooks on Windows.";
14668
+ readonly description: "Install the verified jq required by HQ hooks on Windows, add it to your PATH, and check it.";
14401
14669
  readonly hidden: false;
14402
14670
  }, {
14403
14671
  readonly flags: "--client-health-report";