@indigoai-us/hq-cli 5.345.218 → 5.345.220

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 (138) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/dist/command-catalog.generated.d.ts +94 -1
  3. package/dist/command-catalog.generated.js +114 -1
  4. package/dist/commands/agents.d.ts +22 -0
  5. package/dist/commands/agents.js +92 -1
  6. package/dist/commands/bot.d.ts +48 -0
  7. package/dist/commands/bot.js +108 -8
  8. package/dist/commands/cloud.d.ts +16 -0
  9. package/dist/commands/cloud.js +112 -102
  10. package/dist/commands/core-checkpoint-native.d.ts +13 -0
  11. package/dist/commands/core-checkpoint-native.js +167 -52
  12. package/dist/commands/core-hook-registration-plan.d.ts +8 -0
  13. package/dist/commands/core-hook-registration-plan.js +22 -0
  14. package/dist/commands/core.js +9 -0
  15. package/dist/commands/daemon.js +21 -2
  16. package/dist/commands/doctor.js +4 -0
  17. package/dist/commands/integrations.js +84 -3
  18. package/dist/commands/lanes-shared.d.ts +2 -0
  19. package/dist/commands/lanes-watch.js +28 -1
  20. package/dist/commands/lanes.d.ts +2 -0
  21. package/dist/commands/lanes.js +99 -9
  22. package/dist/commands/packs.js +23 -0
  23. package/dist/commands/pkg-update.d.ts +6 -0
  24. package/dist/commands/pkg-update.js +15 -7
  25. package/dist/commands/reindex.js +6 -0
  26. package/dist/commands/run.js +55 -45
  27. package/dist/commands/sources.js +3 -2
  28. package/dist/index.js +8 -0
  29. package/dist/lib/anywhere-person-setting.d.ts +2 -2
  30. package/dist/lib/anywhere-person-setting.js +2 -2
  31. package/dist/lib/bot/fleet-cron.js +5 -2
  32. package/dist/lib/bot/inflight.d.ts +9 -0
  33. package/dist/lib/bot/jobs/hot-signal-sync.d.ts +51 -0
  34. package/dist/lib/bot/jobs/hot-signal-sync.js +90 -9
  35. package/dist/lib/bot/run.d.ts +29 -5
  36. package/dist/lib/bot/run.js +203 -1
  37. package/dist/lib/bot/signals-try-now.d.ts +76 -0
  38. package/dist/lib/bot/signals-try-now.js +111 -0
  39. package/dist/lib/capacity/collectors/claude-oauth.d.ts +22 -3
  40. package/dist/lib/capacity/collectors/claude-oauth.js +78 -22
  41. package/dist/lib/capacity/scheduler.d.ts +8 -0
  42. package/dist/lib/capacity/scheduler.js +5 -2
  43. package/dist/lib/daemon/anywhere-listener.d.ts +33 -1
  44. package/dist/lib/daemon/anywhere-listener.js +86 -4
  45. package/dist/lib/daemon/machine-check-owner.d.ts +21 -0
  46. package/dist/lib/daemon/machine-check-owner.js +95 -0
  47. package/dist/lib/daemon/machine-check-registration.d.ts +4 -0
  48. package/dist/lib/daemon/machine-check-registration.js +64 -0
  49. package/dist/lib/daemon/machine-checks.d.ts +144 -0
  50. package/dist/lib/daemon/machine-checks.js +412 -0
  51. package/dist/lib/daemon/run.js +35 -4
  52. package/dist/lib/daemon/runtime-notifications.d.ts +7 -0
  53. package/dist/lib/daemon/runtime-notifications.js +50 -0
  54. package/dist/lib/daemon/server.d.ts +2 -0
  55. package/dist/lib/daemon/server.js +6 -0
  56. package/dist/lib/daemon/state-file.d.ts +12 -1
  57. package/dist/lib/daemon/state-file.js +23 -1
  58. package/dist/lib/doctor/checks/fleet-hook-core.d.ts +12 -0
  59. package/dist/lib/doctor/checks/fleet-hook-core.js +127 -0
  60. package/dist/lib/doctor/checks/host-core.js +3 -1
  61. package/dist/lib/doctor/checks/machine-checks.d.ts +16 -0
  62. package/dist/lib/doctor/checks/machine-checks.js +103 -0
  63. package/dist/lib/doctor/registry.js +4 -0
  64. package/dist/lib/doctor/types.d.ts +4 -0
  65. package/dist/lib/hook-engine/canary-gate.d.ts +64 -0
  66. package/dist/lib/hook-engine/canary-gate.js +147 -0
  67. package/dist/lib/hook-engine/coverage.d.ts +3 -1
  68. package/dist/lib/hook-engine/coverage.js +8 -2
  69. package/dist/lib/hook-engine/fleet-registration.d.ts +42 -0
  70. package/dist/lib/hook-engine/fleet-registration.js +168 -0
  71. package/dist/lib/hook-engine/reconcile.js +3 -2
  72. package/dist/lib/hook-engine/registration-identity.d.ts +33 -0
  73. package/dist/lib/hook-engine/registration-identity.js +97 -0
  74. package/dist/lib/hook-engine/registration.d.ts +1 -30
  75. package/dist/lib/hook-engine/registration.js +1 -88
  76. package/dist/lib/hook-engine/resolve.d.ts +2 -0
  77. package/dist/lib/hook-engine/resolve.js +7 -3
  78. package/dist/lib/hot-channels/alert.d.ts +10 -1
  79. package/dist/lib/hot-channels/alert.js +34 -7
  80. package/dist/lib/hot-channels/signals-claude-login.d.ts +53 -0
  81. package/dist/lib/hot-channels/signals-claude-login.js +96 -0
  82. package/dist/lib/hot-channels/signals-pass.d.ts +17 -0
  83. package/dist/lib/hot-channels/signals-pass.js +31 -3
  84. package/dist/lib/lanes/canonical-host.d.ts +8 -1
  85. package/dist/lib/lanes/canonical-host.js +9 -3
  86. package/dist/lib/lanes/machine-identity.d.ts +15 -0
  87. package/dist/lib/lanes/machine-identity.js +26 -0
  88. package/dist/lib/lanes/spawn.js +17 -3
  89. package/dist/lib/search-index/index.js +11 -1
  90. package/dist/lib/signals/engine.d.ts +1 -0
  91. package/dist/lib/signals/engine.js +7 -0
  92. package/dist/lib/signals/reply.d.ts +48 -0
  93. package/dist/lib/signals/reply.js +72 -11
  94. package/dist/lib/signals/steps/adapters.js +6 -0
  95. package/dist/lib/signals/steps/extract.d.ts +50 -3
  96. package/dist/lib/signals/steps/extract.js +100 -17
  97. package/dist/lib/signals/steps/types.d.ts +19 -0
  98. package/dist/lib/sync-core/engine-home.d.ts +6 -1
  99. package/dist/lib/sync-core/engine-home.js +13 -3
  100. package/dist/lib/sync-core/reconcile.js +1 -1
  101. package/dist/lib/sync-core/release-compare.d.ts +7 -0
  102. package/dist/lib/sync-core/release-compare.js +16 -0
  103. package/dist/lib/sync-core/release.d.ts +2 -1
  104. package/dist/lib/sync-core/release.js +2 -10
  105. package/dist/run/schema-env-overrides.d.ts +24 -0
  106. package/dist/run/schema-env-overrides.js +72 -0
  107. package/dist/utils/core-next-flag.d.ts +4 -0
  108. package/dist/utils/core-next-flag.js +22 -0
  109. package/dist/utils/core-next-kill.d.ts +16 -0
  110. package/dist/utils/core-next-kill.js +35 -0
  111. package/dist/utils/host-registration.d.ts +33 -23
  112. package/dist/utils/host-registration.js +90 -66
  113. package/package.json +14 -10
  114. package/scripts/check-function-manifest.mjs +5 -4
  115. package/dist/commands/__fixtures__/access-vault.d.ts +0 -95
  116. package/dist/commands/__fixtures__/access-vault.js +0 -166
  117. package/dist/commands/__fixtures__/make-tar.d.ts +0 -38
  118. package/dist/commands/__fixtures__/make-tar.js +0 -102
  119. package/dist/commands/secrets-public-types.test-d.d.ts +0 -2
  120. package/dist/commands/secrets-public-types.test-d.js +0 -18
  121. package/dist/lib/decisions/fixtures/us001.d.ts +0 -137
  122. package/dist/lib/decisions/fixtures/us001.js +0 -21
  123. package/dist/lib/doctor/__testing__/fake-hq-tree.d.ts +0 -226
  124. package/dist/lib/doctor/__testing__/fake-hq-tree.js +0 -408
  125. package/dist/lib/doctor/__testing__/run-doctor.d.ts +0 -8
  126. package/dist/lib/doctor/__testing__/run-doctor.js +0 -69
  127. package/dist/lib/fingerprint/fixtures.d.ts +0 -19
  128. package/dist/lib/fingerprint/fixtures.js +0 -61
  129. package/dist/lib/hot-channels/adapters/__fixtures__/dummy.d.ts +0 -33
  130. package/dist/lib/hot-channels/adapters/__fixtures__/dummy.js +0 -53
  131. package/dist/lib/hot-channels/adapters/__fixtures__/meeting-providers.d.ts +0 -38
  132. package/dist/lib/hot-channels/adapters/__fixtures__/meeting-providers.js +0 -64
  133. package/dist/lib/mesh/live/daemon/mqtt-events.test-d.d.ts +0 -2
  134. package/dist/lib/mesh/live/daemon/mqtt-events.test-d.js +0 -10
  135. package/dist/lib/test-utils/isolated-flag-company-context.d.ts +0 -3
  136. package/dist/lib/test-utils/isolated-flag-company-context.js +0 -18
  137. package/scripts/hook-engine-manifest.mjs +0 -22
  138. package/scripts/mesh-daemon-if-stale.mjs +0 -20
package/CHANGELOG.md CHANGED
@@ -2,6 +2,136 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.220] — 2026-11-15
6
+ - `hq capacity` no longer signs Claude accounts out every few days. Claude refresh tokens are single use, and three paths lost or wrongly revoked them. The token refresh now waits 30s instead of 10s, and the scheduler gives the claude-oauth run 180s so a timed-out run cannot overlap the next and reuse the same token. A finished lane that failed auth no longer marks the current token revoked; only `invalid_grant` from the token endpoint does, and only after a re-read shows no other process has already rotated the token (that case is recorded as `skipped-race` with a backoff). On macOS the rotated token is written when both Keychain selectors confirm the item is missing; other read failures fail closed as before.
7
+
8
+ - `hq index status` and `hq index sync` no longer report a missing qmd binary
9
+ when a large index overflows Node's 1 MiB spawn buffer (ENOBUFS). Captured
10
+ qmd output is allowed up to 64 MiB, and an overflow names the buffer instead
11
+ of `Unable to execute qmd`.
12
+
13
+ - `hq run` no longer lets an inherited process.env value replace a key declared in `.env.schema` (or `.env.local`). Varlock treated the caller's environment as an override, so a shell profile that still exported an old key silently skipped `hq()` after rotation. Schema and `.env.local` now win, matching `hq secrets exec` (feedback_d5698e57).
14
+
15
+ - `hq integrations approve` now reports a finished call whose result the gateway did not keep (`resultAvailable: false`) by printing the server's message, reason (for example `result_too_large`) and size instead of "result could not be read back, run approve again". It no longer suggests a retry, since the call already ran and will not run again. When the gateway returns the live result but did not keep it (`resultAvailable: true` with a reason), the result is printed followed by the server's note that a later approve cannot read it back. An explicit `resultAvailable` is authoritative, so a call that legitimately returns null is not reported as lost. `--json` passes `callAlreadyRan`, `resultAvailable`, `resultOmittedReason`, `resultBytes` and `message` through unchanged. Older gateways that send none of these fields keep the previous text.
16
+ - `hq-hook run` no longer lets a credential read through when a host delivers the same call id with the same content twice within 10 seconds (a doubled registration, or a provider that reuses an id) and a link named in the call now points at a credential file. The duplicate-event ledger used to repeat the earlier allow; the credential check now runs again before an allow is repeated, as the bash guard does on every delivery.
17
+ - `hq daemon sync status --local` prints the local sync journal summary, the same text, JSON and exit status as `hq sync status`, and accepts `--hq-root`, `--company`, `--all` and `--json`. Without `--local`, those journal options are refused and the daemon view is unchanged.
18
+ - The Stop gate's automatic checkpoint (`--trigger stop-gate-auto`) now updates one thread file per session instead of writing a new `T-*-auto-*.json` after every replied turn. The first automatic checkpoint of a session creates the thread and records its name in a per-session stamp; later ones reuse that file, keep its path and creation time, bump `updated_at`, and merge `files_touched`, learnings, insights, decisions and tags (`next_steps`, `conversation_summary` and `git` are replaced by the latest run, not merged; keys the maintenance sibling added are kept). `metadata.title` follows the latest summary only when the thread has no title or still carries the auto-generated one, so a title the sibling improved is kept. Writes are atomic (temp file plus rename) and there is no lockfile: concurrent same-session runs are not serialised. A file is never corrupted, and the existence re-check narrows resurrecting a thread the sibling renamed away to a very small window between the check and the rename. Two runs of the same session at the same instant can lose one union merge, and on the session's first turn they can fork a second thread (the last pointer write wins). A run that would change nothing leaves the file untouched. Explicit `/checkpoint` runs and other triggers still write a new thread each time.
19
+ - `hq-hook` no longer answers a Grok Build call after Grok has stopped waiting and let the call through, on three more paths. The time budget for a Grok call (4 seconds by default, 4.5 at most) now counts from the moment the process was created, so a slow start-up is included. With the new core off, the old Grok bridge is stopped, together with anything it started, if it has not answered within the budget, and the call is refused. The engine log line, and the record of a reminder that was shown, are now written after the answer, and together they can delay the exit by at most 0.2 seconds, so a stalled disk cannot hold the answer. The checks made before any answer (whether the call is inside an HQ folder, the kill switch in the home folder, and with the new core off the look-up of the Grok bridge) are now also limited to the budget: if a stalled disk or network folder holds them past it, the Grok call is refused in time instead of being let through. Claude Code and Codex calls are unchanged.
20
+ - The hq-hook unit tests compile again: two merged ports each added the same COVERS test, so one copy is removed.
21
+ - The `hq-hook` workflow installs the de_DE, fr_FR, en_US and en_GB UTF-8 locales on Linux runners. Three `block_core_writes` tests now probe the installed jq and yq instead of assuming the macOS builds: where Ubuntu's jq rejects `sNaN42` or the runner's yq reads a double-quoted `\/`, bash allows and the test requires the native hook to give the reference deny (never an allow). The NUL-warning locale test requires both to block when a locale is missing.
22
+ - `company_git_metadata` tests now take the bash exit from the installed jq when it is not the reference build: Ubuntu 24.04 jq rejects `nan123` and Ubuntu 26.04 jq reads 257 nested containers, so the bash hook allows or blocks differently there. The native deny is still asserted on every input.
23
+ - hq-hook: the path_rules tests run with an explicit environment (a fixed PATH) and pin conduct-link-inherit's refusal when PATH is unset; the conduct-link Windows lookup test now passes on case-sensitive Linux folders, and Unix-only test helpers no longer break the Windows Clippy build.
24
+ - Account for every injector fixture by role before differential replay and require all planned events to execute in an unfiltered run.
25
+ - Enforce function ownership, coverage and retirement rules in pull-request CI using a reviewed, provenance-pinned CLI manifest snapshot.
26
+ - The native credential check on the optional hook entrypoint now refuses the Git reads that the current shell guard (hq-core-staging #1889) refuses: `^@`, `^!` and `^-` revisions, a tab or `$'...'` quoting in a git command, `~+` and `~-` directories, git arguments with an unquoted glob or a brace expansion, aliases whose value comes from an expansion, and git aliases whose text holds quotes, a backslash or a line break. It also refuses a command word that is quoted, escaped, globbed, brace-expanded, split by a line continuation or expanded (such as `\git`, `g''it` or `{git,log}`) when it could run git, including after a prefix and its options (`env -i`, `nice -n 5`, `timeout 5`, `exec -a x`, `sudo`, `xargs` and similar), and an expanded command word in a command that names git; spell it `git` instead. The same checks apply inside `$(...)` and backtick substitutions, `sh -c`/`bash -c` strings and `eval`, and to a word anywhere in a command that could be git. Commands nested more than six substitutions or shell strings deep are refused. The revision and alias checks also read the command with its quoting removed, so `HEAD^"@"`, `HEAD^\@` and the same forms inside `bash -c` or `eval` are refused, as is a `^` or `~` followed by an expansion (`HEAD^$a`). A git argument with `@`, `!`, `-`, `+` or a second expansion after an expansion is refused too. `alias.` keys are matched in any case and through quotes. A command word spelled `GIT`, `Git`, `\GIT` or `/usr/bin/GIT` is refused, because on macOS and Windows it runs git. So is `git.exe` in any case, also when it is escaped, quoted or globbed (`\git.exe`, `g''it.exe`, `"git.EXE"`), has trailing dots or spaces, or sits in a Windows path such as `"C:\Program Files\Git\cmd\git.exe"`. Commands longer than 64 KiB are refused so that the check always answers well before the hook times out. These checks also apply when the tool call holds bytes that are not valid UTF-8, and a tool call the check cannot parse is refused. Before this, these calls were allowed and could print a tracked credential file. Because the check is conservative, some commands that only mention git (for example `grep git *.md`, or a git command with a tab in its message) are now refused too.
27
+ - PreCompact can now switch to the new hook core on Claude Code, Codex and Grok Build. The native core now does master-hook's own PreCompact work (session bind, twin dedupe, timeout journal rows, trace lines), gates the policy-ledger purge on `purge-policy-ledger-precompact` as `hook-gate.sh` did, and sends the Codex PreCompact banner as `systemMessage` as the Codex adapter did. `hq reindex` switches PreCompact only where the HQ root has no other PreCompact hooks and the host canary passes. Intended differences are listed in `crates/hq-hook/tests/fixtures/US-015-precompact/`.
28
+ - The native PreCompact works only in the HQ its registration names and refuses, in the host's own PreCompact format, what it does not model: a PreCompact hook or registry entry added since the last `hq reindex` (run `hq reindex` to keep PreCompact on the old dispatcher while it exists), a Claude Code `HQ_ROOT` or `CLAUDE_PROJECT_DIR` that names another HQ (an outer HQ that contains this one is handled as master-hook did), a registration command line hq-hook cannot read, a ported PreCompact hook script, a library one of them sources (`transcript-tail.sh`, `hook-lib.sh`), a `master-hook.sh`, or a file master-hook.sh sources or runs on PreCompact (`hook-gate.sh`, `hook-timeout-probe.sh`, `hook-timeout-watchdog.sh`, the HQ root resolver, the adapter core and its helpers, the flag readers and the hqd shim) that is not a released version, a ported registry entry whose fields, matcher, order or grouping are not the released ones (restore these with `/update-hq`; `hq reindex` does not clear them), cached registry rows the old dispatcher would run in place of the released ones (delete the cache file), and a session `company_slug` that is not a plain company folder name (rebind with `hq-session.sh set company_slug`). A refusal binds and purges nothing, and its text names `~/.hq/state/core-next.off` first: that file hands every hook event back to the old dispatcher at once, with no restart (`HQ_CORE_NEXT=off` needs the agent restarted). A registered PreCompact whose worker runs out of its budget before the session company and cached rows are checked is refused too, not answered with exit 1. A twin PreCompact's wait for its twin's verdict now ends on master-hook's whole-second clock, counted from the process start.
29
+ - Run the vault-write access guard natively for allow and block decisions, preserving pinned Bash ACL, shell parsing, diagnostics, and flag behavior with Mac and Windows differential coverage.
30
+ - Match hq-core-staging#1825 in the native vault-write guard: companies/ paths, company keys and grant paths compare without case, and symlinks into companies/ are checked by their real path. A missing tr, an unreadable working folder, settings.local.json or vault-access.json, or a Windows locale the host lacks is now denied natively instead of handed back to Bash.
31
+ - The native vault-write guard denies a Bash command that names a companies/ path and contains a non-ASCII Unicode space (U+00A0, U+2003, U+3000 and the like), which bash can read as a word break under a UTF-8 locale.
32
+ - `hq packs update --registry [slug]` checks the package registry for newer versions of installed registry packages and applies them, exactly as `hq packages update [slug]` does (same checks, output and exit status). Combining `--registry` with any content-pack option (`--json`, `--hq-root`, `--check-only`, `--refresh`, `--yes`, `--allow-hooks`, `--allow-mcp`, `--branch`) is a usage error. `hq packs update` without `--registry` and `hq packages update` are unchanged.
33
+ - The conduct-link inherit hook can join a session from a pending invite
34
+ in the native hook engine. PostToolUse still runs the bash hooks until
35
+ every PostToolUse hook is ported. The join
36
+ ends within the hook's time budget, and on a timeout every process it
37
+ started is stopped.
38
+ - The new hook core (`core.next`) now answers four more PreToolUse hooks natively, each under its old hook id and with the old hook's message: `block-plans-dir-during-deep-plan` (writes to `~/.claude/plans/` during `/deep-plan`), `block-qmd-model-download` (a foreground `qmd vsearch|query|embed|pull` with no local model), `block-raw-temp-home` (HOME pointed at a fresh `mktemp` folder; the hook's perl analyzer is ported in full) and `detect-secrets` (secret-shaped values in shell commands and file edits). They start no bash, jq or perl, honor `HQ_HOOK_PROFILE` and `HQ_DISABLED_HOOKS` as before, and refuse with a reason any input they do not model instead of allowing it. `hq-hook capabilities --json` lists them as covered for PreToolUse. PreToolUse stays on the old dispatcher until every hook it runs is covered.
39
+ - The new hook core (`hq-hook run`) now runs the `policy-enforcement-gate` PreToolUse registry row for every tool, natively, before the policy injector, as the old dispatcher did. Until now it ran the gate only inside the injector, which skips every tool but Bash, so an outbound MCP send (for example `mcp__slack__send_message`) in a session missing a required skill or brief was let through; it is now refused with the gate's own reason. The policy injector also honours `inject-policy-on-trigger`'s profile and `HQ_DISABLED_HOOKS` entry on PreToolUse for its reminder only: turned off, it adds and records no reminder, but a call it would refuse is still refused; with a `hook-gate.sh` whose profile lists cannot be read it runs in full, never turned off by `HQ_DISABLED_HOOKS` alone. A gate row in a shape the port does not model, or a gate script it does not reproduce, is refused with one line naming the hook. `hq-hook capabilities --json` lists both under `covers.PreToolUse`; PreToolUse stays on the old dispatcher until every PreToolUse hook, the dispatcher's own work and the Codex and Grok adapters' work are covered.
40
+ - The native hook engine now claims `warn-cross-company-settings` for PreToolUse (batch PT-2). The company scope check gives its warning, matching the shell hook on the same inputs: the last `companies/` segment of a path or working directory counts even when its name is empty, a repository working directory finds `companies/manifest.yaml` above its first `/repos/`, and the manifest line is matched as the hook's awk pattern matched it (a `.` matches any character). The warning is added context the model reads; the shell hook wrote it to stderr. A repository name the port does not model is refused instead of guessed. PreToolUse still runs on the shell dispatcher, because its other hooks are not ported yet.
41
+ - `mandatory-scope-authorizer` and `block-credential-file-read` stay unclaimed. Their native checks were ported from older shell revisions than the ones released since, so switching to them could let through a call the shell guard blocks. For example, the shell scope guard now checks the Skill tool and the native one does not.
42
+ - The new hook core (`core.next`) now does two more PreToolUse Bash guards natively: `core/hooks/PreToolUse/30-Bash--block-no-verify-bulk-add.sh` (blocks `git commit --no-verify` or `-n` and `git push --no-verify`, with the same message and the same `HQ_ALLOW_NO_VERIFY=1` escape) and `hq-monitor-guard` (with the `monitor.enabled` flag on, blocks a foreground `sleep` of 30 s or more, a sleep loop, `gh run watch` or `gh pr checks --watch`, and points at `hq monitor start`). The monitor guard still asks `hq monitor enabled`, as the bash hook did, but starts no bash and holds the call to 3 s and to the hook's time budget. Where the old hooks' answer depended on the shell's locale (a non-ASCII space such as U+0085 or U+00A0, or a control character such as U+001C, that one locale's `[[:space:]]` counts and another's does not), the ports refuse the call with a reason instead of guessing the locale. An input either port does not model is refused with a reason instead of being allowed. `hq-hook capabilities --json` lists both as covered for PreToolUse. PreToolUse stays on the old dispatcher until every hook it runs is covered. Probe cleanup also stays within its reserved budget, kills a leader that left its original process group directly, and refuses the call if the child cannot be reaped in time. The merged-batch coverage regression requires both PT-3 claims as well as unique event keys. Probe cleanup kills TERM-resistant descendants even when the probe leader exits during the grace period.
43
+ - hq-hook: SessionStart check `check-core-yaml-parity` now runs in-process (US-021). A drifted `hqVersion` between `core/core.yaml` and `repos/public/hq-core/core.yaml` is added to the session context, unless `HQ_HOOK_PROFILE` or `HQ_DISABLED_HOOKS` turns the hook off. Unmodelled input is denied. The machine checks in this batch (`check-stale-model-pin`, `check-hq-update`, `check-client-health`, `desktop-memory-leak-check`) stay with the daemon and `hq doctor`; the other SS-3 hooks stay on bash.
44
+ - Wake the hqd listener when the daemon config or sign-in token file changes, so a gate change is checked without waiting for the next shared read.
45
+ - When signals from hot-channel sync fail because Claude Code is signed out, the message now points to the HQ app first (Settings → AI tools, then Connect Claude, or Install Claude if it is not installed yet) and gives `claude auth login` as the fallback. The owner now gets the alert even when the run only had queued documents and landed nothing new, with at most one message per app per hour for one sign-out. Queued documents still run on the next run after sign-in. For bots that run the signals job, `hq bot status` and `hq bot list` check the Claude Code login that signals needs (one local `claude auth status` per call), show it next to the bot's own login with what signals last saw as context, and say how to run the queued documents now after a sign-in.
46
+ - Signals run records now say why a meetings folder was skipped, and a meetings `source.yaml` that cannot be read is reported as an error instead of being skipped quietly.
47
+ - The bot's signals reply in the HQ desktop app now links straight to today's brief with "Open today's brief", in place of the "Create today's brief" button. Replies sent anywhere else keep the button, and "Try now" works as before.
48
+ - The bot's signals reply no longer promises that your brief runs: a failed or partial run now says it does not stop your brief from building, and the "Create today's brief" button asks instead of saying your brief builds next when no brief job is scheduled.
49
+ - When the bot's morning signals reply offers "Try now", tapping it now runs signals once straight away and replies with the result, and a second tap while that run is going gets the same result instead of starting another run. A failed run's reply now says your brief still builds.
50
+ - The sync engine's config no longer carries `requests_per_day` once the engine on the machine is v0.1.29 or later, which has no daily request count. Engines up to v0.1.28 still get the line, and the next sync reconcile removes it from an existing engine home after the engine updates.
51
+ - The native hook engine now reads the company scope guard's kill switch (`hooks.multi-company-session-lock`) from the daemon's state file (hq-core-rust US-009). On a hook-cache miss, for a session whose primary company has a known uid, the native scope guard takes a fresh state file's value instead of always locking to the primary company, and the policy injector takes it instead of calling the flag registry. An explicit `false` from either the hook cache or the state file wins. A missing, stale, future-dated, corrupt, untrusted, other-scope or switched-off state file changes nothing: the scope guard keeps its stricter answer and the injector keeps its cold read.
52
+ - The published package no longer ships release or test tooling: `scripts/hook-engine-manifest.mjs` (run by prepack and postpublish in the source tree), `scripts/mesh-daemon-if-stale.mjs` (no longer run since the postinstall stopped calling it), and compiled test helpers under `dist/` (`__fixtures__`, `__testing__`, `lib/test-utils`, `*.test-d.*`, and the decisions and fingerprint test data). A new e2e test packs the package and fails if tooling ships or if a runtime file (main, bins, the postinstall script, runtime assets) is missing. What the installed CLI does is unchanged.
53
+ - `hq core hook-registration-plan --host agents-v2` now plans the hq-agents-v2 bot runtime's hooks (US-040). An event gets the native `hq-hook run --host agents-v2` entry only when core.next is on, no kill switch is set, the pinned engine passes its checks and advertises `agents-v2`, and it covers every old hook for the event, including `agents-v2-adapter:<Event>`. Otherwise the event keeps the shell adapter. The native entry's `--fleet-fallback` must be exactly `[<abs bash|sh>, <abs>/hq-agents-v2-hook-adapter.sh, <event>]`; any other fallback keeps the adapter. Other hosts are refused. A fallback that is not a list of strings now stops the plan with an error instead of crashing.
54
+ - `hq doctor` reports agents-v2 profiles: native or shell per event, with the host in the message (`pre_verify=native (agents-v2)`) and in `details.hosts`. It validates native agents-v2 entries against the agents-v2 fallback and coverage, recognizes `hq-agents-v2-hook-adapter.sh` as shell, reports `shell fallback` under a kill switch, and fails duplicate entries and events registered for both Fleet hosts. fleet-local reporting is unchanged.
55
+ - hq-hook: `capabilities --json` now lists `agents-v2` in `registration_hosts`. The native agents-v2 host now applies the adapter's `HQ_AGENTS_V2_UNKNOWN_TOOL` setting. Any value other than unset, empty or `warn` refuses a `pre_tool_call` for a tool with no HQ name. Before this change the native host let such a tool through where the adapter refused it.
56
+
57
+ ## [5.345.219] — 2026-11-15
58
+ - Add `hq agents create-external` so an admin can mint an external bot and
59
+ a one-time enrollment code from the CLI. Console Add bot is hosted-only
60
+ and no longer exposes this path.
61
+ - Reduced test time spent waiting for mocked bot readiness and lane-lock deadlines. Added coverage-provider and slow-file timings to CI output so test execution, worker shutdown, coverage generation, and report writing can be distinguished.
62
+ - The twelve machine checks that ran on every session start or prompt (HQ update, client health, stale model pin, desktop bridge health, review base repair, welcome brief, vault access refresh, setup completeness, fingerprint hooks, agent-browser presence, and the hq CLI and HQ desktop install checks) can now run on the daemon's schedule instead: about a minute after the daemon starts and then hourly, never closer than 15 minutes apart, one at a time, each with its own time limit. The schedule runs when the new hook core (`core.next`) is on for this machine, read at each run so a change takes effect without a daemon restart, and stays off whenever a switch that sends the machine back to the old core is set: `HQ_CORE_NEXT` set to `off`, `0`, `false` or `no`, `HQ_HOOK_ENGINE=off`, or a `~/.hq/state/core-next.off` or `~/.hq/hook-engine.off` file. A script is run only when it is a regular file inside the HQ root with one link, owned by the user and not writable by group or others, in folders that pass the same rules; anything else is reported as not installed or refused and is not run. The results are written owner-only to `~/.hq/daemon/machine-checks.json` and carried into the daemon's state file with each finding's full text and a fingerprint. The hook engine shows each new finding once, at a session start, with no process and no network call, and records what it showed in an owner-only ledger. A finding is recorded as shown only once it is in the session's context; a finding cut or dropped to fit the host's limit is shown at a later start. `hq doctor --only machine-checks` runs the same checks on demand with no daemon (`--verbose` and `--json` include the full text), and a doctor started from inside a check does not start them again.
63
+
64
+ - The legacy dispatcher transfers checks only when this host has a native SessionStart registered for the daemon's HQ root, core.next is enabled, the daemon heartbeat is fresh, and scheduled results exist. The schedule stays dormant without a native SessionStart. Ordinary doctor calls show cached results and their age; only `--only machine-checks` runs repair-capable scripts, with a warning. Findings are recorded as shown only after stdout is written and flushed successfully.
65
+
66
+ - Keep offline machine-check registration and kill-switch queries independent of hook installation metadata so bundled daemon startup and restart work outside the CLI source layout.
67
+ - Isolate launcher and probe test subprocesses from the developer's HQ environment, home, caches and working directory while preserving each test's explicit fixture settings.
68
+ - The host canary (`scripts/host-canary.mjs`) now passes `HQ_FLAG_CORE_NEXT` and the core.next kill switches to the host and its hooks, runs `hq reindex` on its disposable HQ root first (a failed reindex fails the run), and records which command answered each hook, with a per-event `path: shell`, `path: native`, or `path: native+shell` line.
69
+ - New test-only `--fake-full-coverage` mode points that reindex at a stand-in engine that claims every hook, so a canary run can prove the new hook core is actually called.
70
+ - Codex hooks in the host canary are the tracked `.codex/config.toml` registration (parsed; a parse error or missing tool hooks fails the host, as before) combined per event with the `hooks.json` files `hq reindex` rewrites (the user-scope `$CODEX_HOME/hooks.json`, seeded first with what `hq install` writes, and the root's `.codex/hooks.json`). An event where both a shell and a new-core registration run prints `path: native+shell`, so with `--fake-full-coverage` Codex shows `native+shell` because config.toml still runs the shell adapter.
71
+ - Fix the native credential guard being looser than bash on Linux for the hq-core 16.0.46 and #1926 guard versions: in a UTF-8 locale, glibc's regex matches a long-s (U+017F) look-alike against `s`, so bash blocks python3 code that names `.aw<long-s>/credentials` and native now blocks it too. Fold revisions and macOS are unchanged.
72
+ - Make the credential-guard fold tests probe the disk (case-insensitive or not) and bash's own case matching at run time, so the 16.0.46 expectations hold on Linux and stay exactly as before on macOS. Add Linux regression rows.
73
+ - The native detect-secrets port now shortens values in jq's join error the way the installed jq does (jq 1.7.x, 1.8.0/1.8.1, 1.8.2), chosen from `jq --version`; unknown versions use the 1.8.2 style. The verdict is unchanged.
74
+ - `hq-hook` on Linux now answers like the bash it replaces in two cases. The native credential guard no longer reads the no-break space U+00A0 (or U+2007, U+202F) as a word break in a UTF-8 locale, since glibc does not, so `xargs "git<U+00A0>show"` is allowed as bash allows it instead of blocked. The deterministic gate hands a macOS bash 3.2 capture in a multibyte locale other than UTF-8 (eucJP and the like) back to bash off macOS instead of answering it. The delivery-regex parity test compares non-ASCII policy lines only in the C locale off macOS, where awk multibyte decoding is not ported by design.
75
+ - `hq-hook dispatch` now blocks a tool call when a PreToolUse hook registry safety guard (`"safety": true`) points at a script that is missing, as master-hook.sh does. It exits 2 with `BLOCKED: a required HQ safety check is missing (<id>). Run hq rescue from a terminal (or re-run /update-hq) to repair it, then retry.` Before, a missing safety script was skipped and the tool call ran unchecked; only `fail_closed` rows blocked. A guard marked both `safety` and `fail_closed` gets the new message. Missing scripts on other events, and missing non-safety rows without `fail_closed`, are still skipped (owner decision, 2026-11-10).
76
+ - The protect-core test corpus from the closed native port (#2430) now runs against the US-010 path rule table: 100 observed file tool calls and 12 symlinked-cwd relative writes, each under every project and PWD spelling. Tests only; hook behaviour is unchanged.
77
+ - `hq-hook run --host <host> Stop` reads the caller's token file (`~/.hq/cognito-tokens.json` or `HQ_COGNITO_TOKENS_FILE`) as the old checkpoint gate read it: through links, with no folder or file mode check, as a regular file only. Before, a group-writable `~/.hq` or token file, a linked `~/.hq`, a token file with a second hard link, or an override file in a shared folder left the caller's email unknown and silently skipped the opt-in company-scope gate. A folder or FIFO in the token file's place now applies the scope gate as for an in-scope caller, with one stderr line. The PreCompact banner reads today's journal `INDEX.md` the same way, so a linked HQ root or a umask-002 journal folder no longer drops it. No host registration calls `hq-hook run` yet, so hook behavior is unchanged.
78
+ - Fix the hq-hook Windows build and Clippy run that failed the v5.345.218 tag build: a Windows-only test was missing the new `stop_deliverable` field, `scope_bash` tests used Unix-only file APIs, and several test helpers used only by Unix tests were reported as dead code on Windows. Also clear two Clippy errors in the native grep/sed code that failed Windows and Linux (a test-only `compile` reported as never used, and a needless deref). No behaviour change.
79
+ - CI: hq-hook pull requests now run Clippy for the x86_64-pc-windows-msvc target on the Linux runner, so Windows-only compile and lint breaks fail the PR instead of the release tag build. ring's C build uses stub compiler and archiver scripts in scripts/ci because Clippy never links.
80
+ - Fix two Windows clippy lints in hq-hook (a redundant `return` in the injector's scope-cache clock, and items after the test module in the plans-dir port) that failed the v5.345.216 tag build. No behaviour change.
81
+ - The native detect-secrets port now shortens values in jq's join error the jq 1.6 way on hosts whose `jq --version` is 1.6 (for example Ubuntu 22.04): 11 bytes, then `...`, the same as jq 1.7.x. Before, jq 1.6 fell back to the 1.8.2 style. Unknown versions still use the 1.8.2 style. The verdict is unchanged.
82
+ - hq-hook's collation tests now pass on macOS 15.7.7, which orders characters that older macOS collated equal under en_US.UTF-8 and ja_JP.UTF-8. The image-context-guard tests ask the host's awk which ledger paths tie and require bash to treat exactly those as already seen, with at least the old number of collisions, adding `LC_COLLATE=kk_KZ.PT154` cases that still tie. The glob tie tests choose a locale that ties on the host: en_US.UTF-8 where it still does, otherwise kk_KZ.PT154. A new test checks the untied en_US.UTF-8 order against both bashes. The hook's behavior is unchanged.
83
+ - The native Stop check now does what the `40-auto-acl-share-suggestion.sh` and `50-after-turn-suggestions.sh` hooks did: the share-suggestion reminder and the after-turn suggestions, with the same first-turn note and saved state. Neither can block a Stop. Claude Code gets plain text, Codex gets a `systemMessage`, and Grok and Fleet get nothing, matching the old hooks.
84
+ - `hq-hook capabilities` now lists both hooks as covered for Stop. Stop still runs on the old dispatcher until the remaining Stop hooks are ported.
85
+ - Check credential reads natively through the optional hook entrypoint, including Git history, without shell or helper subprocesses. Refuse unsupported Git inputs and argv forms, and include untracked stash files in credential checks.
86
+ - In a repository with replacement refs (`git replace`) or a grafts file, history reads are refused natively, because the guard cannot model that history. Staged changes (`git diff --cached`) and commits that only a linked worktree's HEAD reaches are checked too.
87
+ - The native Stop check now runs the lanes Monitor gate and delivers linked-session messages at Stop, the way `lanes-senior-monitor-stop-gate` and the Stop half of `conduct-lanes-link-deliver` did. Each calls `hq lanes` with a hard time limit that also stays inside the hook's time budget.
88
+ - A Claude Code Stop whose hook input cannot be read is now refused with the lanes gate's message, as the shell gate refused it. Before, it was let through.
89
+ - Run validate-policy-frontmatter natively, with the same allow and deny messages as the pinned shell and no child processes on the PreToolUse path. Inputs the port does not model (non-UTF-8 or NUL payloads, Windows policy writes, hq launchers it cannot read the version of) are blocked with a one-line message instead of being handed back to bash.
90
+ - Reduce test-suite waiting by advancing lock retry clocks in focused command tests and sharing per-case signed-out CLI fixtures. Preserve assertions and process isolation. Add coverage lifecycle timing markers so CI reports the gap between the last test, coverage generation, report writing and shutdown.
91
+ - One host id per machine, the remaining writers and readers. A lane created with `--runner subagent` now records the same stable host id as a worker lane on that machine (the id in `~/.hq/lane-host.json`), where it used to record the hostname. When that file cannot be created or updated, the lane is still created and records the id already on disk, or the hostname when there is none; when the file is not valid, it records the hostname. Placement, Claude account balancing and the local `host_capacity` entry of `hq runners list --json` now count the lanes that lane admission treats as running on this machine, so a lane written under the machine's old hostname id is counted with the lanes written under its stable id, and on a machine that is not an Outpost `hq runners list` and `hq runners capacity` print the same local counts. Fixed: resuming or messaging a Claude lane written under an older id of this machine failed with `claude_account_balance_target_host_unavailable`; `hq lanes watch` failed with `watch_account_host_unavailable` for a lane that carries an earlier hostname of this machine; and account repair at spawn ignored this machine's lanes written under its other ids. On an Outpost, `hq runners capacity --json` also lists the EC2 instance id in `host.aliases` when a lane record of the last 30 days carries it as its origin; the id is read from a local file, with no network call. Counting on an Outpost is unchanged, no lane record is rewritten, and `host.id` is unchanged.
92
+ - `hq-hook` now records three early exits when the replay recorder is on, each with an `exit_reason`: the new core is off and the old dispatcher cannot start (`core-off-no-dispatcher`), an unusable command line (`unusable-command-line`), and an unreadable payload (`unreadable-payload`). Nothing is recorded while the recorder is off. These records do not keep the payload. Fleet hosts are recorded as `local-bot` and `fleet-session`, as in other records. Recording cannot change the hook's answer or exit code. The hook waits at most 2 seconds for the record, the same deadline as `hq-hook record`, so a store lock held by another process or a stalled disk cannot keep the hook from exiting with its answer.
93
+ - `hq-hook` no longer holds an early exit past the host's time budget while it records the exit. The wait for the record is now capped at 2 seconds or the time left in the host's budget for the call, whichever is shorter (for Grok Build, 4 seconds by default), so a store lock held by another process or a stalled disk cannot keep the hook running until the host stops waiting and lets the call through. With no budget left, nothing is recorded. A recorder panic prints nothing.
94
+ - The daemon's hqd listener no longer re-checks HQ Anywhere every 60 seconds:
95
+ it checks when the daemon's shared flag read changes the HQ Anywhere answer
96
+ or the running hqd server's gate changes, with a 10-minute fallback check
97
+ for a missed event.
98
+ - Added tests that the hqd server reports each runtime-gate change to `onRuntimeChange` (and still revokes the login when that observer throws), and that the HQ Anywhere listener unsubscribes from daemon events on `close()`.
99
+ - The native hook engine can now answer two more Bash guards itself, the environment-dump guard and the secret detector, with the same decisions and messages as the shell versions and without starting a process. Both stay off until their engine flags are turned on.
100
+ - Tighten the US-014 injector fixture guard: `setup` and the guard now share one
101
+ list of copied reference and policy folders, a macOS `.DS_Store` no longer
102
+ fails the count locally, and the guard is renamed and split so the two
103
+ sequence files the differential run reads are counted apart from the four
104
+ records it does not read.
105
+ - Guard the US-014 injector corpus so a sign-off run fails unless it compares
106
+ all 76 sequences and 246 events with the Bash injector, and every one of the
107
+ 3,075 injector fixture files is a policy, reference or harness file it uses.
108
+ - The US-015 conditional ledger now records a caller token file over the 1 MiB cap with an out-of-domain email, or none, as an old allow that becomes a block for an unbound session, and its token-file reason no longer lists layouts the gate now reads. A new `hq-hook` test reads every story's `conditional-differences.yaml` and `side-effect-differences.yaml` with the replay harness's own parser, checks the ledger shape, and fails on any block-to-allow entry outside a frozen list of ten existing US-015 ids. Tests only; hook behavior is unchanged.
109
+ - The native Stop check now fails closed where a refused state file or a
110
+ size cap hides what the old shell hooks saw. A refused checkpoint-gate
111
+ state folder or file (a link, a FIFO, a hard link, or a file others can
112
+ write) no longer lets the Stop through: the gate runs without that file,
113
+ still blocks, and says why. When it can neither read nor write its
114
+ block counter, or cannot keep its nudge file, the gate blocks at most
115
+ once per stop cycle: the Stop that follows a block (`stop_hook_active`)
116
+ goes through, so it cannot block forever. A counter it cannot read but
117
+ can still replace (mode 000) is rewritten and counts to three as before.
118
+ When the last 400 transcript lines pass the 16 MiB tail cap before the
119
+ turn's first message, the gate blocks as for a turn with no checkpoint,
120
+ at most three times in a row. When the newest reply lies past the 64 MiB scan
121
+ cap, the capability-link and humanize checks block once and ask for the
122
+ reply again. This applies where the opt-in `core.next` registration
123
+ routes Stop to `hq-hook run`; Windows stays on the shell Stop hook.
124
+ - On Grok, the native Stop check now works out whether a Stop can carry a lanes message from the Stop itself. Before, a `HQ_STOP_DECISION_DELIVERABLE` value inherited from the parent process could reach `hq lanes link _deliver`. An inherited `0` then kept the message queue on an end-of-turn Stop that should have delivered it.
125
+ - With a group-writable HQ folder (umask 0002), the share-suggestion reminder and the "turn off these nudges" note now show once, as the shell hooks show them. Before, they came back on every Stop. hq-hook still writes no state into such folders. It keeps the "shown" note in its own private folder instead and says once a session which folders to fix.
126
+ - The host canary now fails a normal Codex run when the tracked `.codex/config.toml` hooks are broken. Each Codex record carries `source` (`config.toml`, `hooks.json:user`, or `hooks.json:root`), and the allow, deny and token checks read only the `config.toml` records, so the user-scope `hooks.json` entry the canary seeds can no longer pass the run for a `config.toml` that points at a missing adapter. Those errors start with `config.toml hooks:`. `--fake-full-coverage` still reads every record.
127
+ - With `core.next` on, `hq reindex` and `hq install` move a host's hook events (Claude Code, Codex, Grok Build) to the new hook core only when a current host canary passed for that host: `~/.hq/state/host-canary.json` must hold a passing standard run under seven days old for the same hq-hook version and the same hq-core gate (SHA-256 of the root's `.claude/hooks/policy-enforcement-gate.sh`). Otherwise that host keeps its old registrations and reindex prints one warning saying why. Windows stays on the old registrations.
128
+ - `scripts/host-canary.mjs` now writes that record after a standard run (`--record <file>` to choose the file). Each host's entry holds only pass or fail, the time, the hq-hook version and the gate hash: no paths, prompts, payloads or output. `--fake-full-coverage` and the diagnostic probes do not write it.
129
+ - New `scripts/require-canary.mjs --hq-root <checkout>` exits non-zero, naming the reason per host, unless every host has a current passing canary. Flip and deletion work runs it first.
130
+ - New override `hq reindex --skip-host-canary-gate` (or `HQ_SKIP_HOST_CANARY_GATE=1`) switches without a passing canary and prints a warning naming what it bypassed.
131
+ - Fix the new hook core refusing every shell tool call on hq-core v16.0.48-beta.68 ("policy-enforcement-gate.sh is not a version the port reproduces"). hq-hook now pins beta.68's gate (`6005f231`, `gate::Revision::Core16_0_48Beta68`) and its `hook-lib.sh` (`c3eb950f`), and reproduces what the gate added. Refusals label each required skill with the prompt words that set it or "required by a matched policy". The state records `skillTriggers` and `policySkills`. A command whose only send is one `hq dm` to one email or `prs_`/`agt_` uid is no longer held to a work-broadcast requirement the prompt set; its literal body still goes to the delivery gates. A command holding a blank outside ASCII (for example a no-break space) is never exempt, because node may read it as a DM or not depending on where its stdin chunks break; the work-broadcast requirement stays, and its body is never trusted. An input the port cannot settle exactly is denied natively. An unknown gate is still refused.
132
+ - Add the beta.68 gate fixture and run the full gate differential suite against the real beta.68 bash gate, with new scenarios for the labels, the prompt words and the one-person DM exemption, compared on every pinned gate.
133
+ - Added a shared, coverage-gated fleet-local registration plan and validated doctor reporting, with exact adapter handback when a core kill switch is set. Fleet planning and doctor inspection use the same pinned-copy integrity check as desktop reindex. Unsupported agents-v2 registrations fail doctor and are not advertised. Coverage claims remain unchanged.
134
+
5
135
  ## [5.345.218] — 2026-11-14
6
136
 
7
137
  - `hq-session add company <slug>` with a slug that has no folder now says which folder it looked for (`companies/<slug>/`, with the full path) and what to do next: run `ls companies/` and pass the exact folder name, or create the company with `/newcompany`. It used to say the slug "must use the exact real directory name". Follow-up for feedback ec3775c2, finding 2 (finding 1, demote after retire, was fixed in #2621).
@@ -539,6 +539,10 @@ export declare const COMMAND_CATALOG: readonly [{
539
539
  readonly flags: "--branch";
540
540
  readonly description: "Follow the source branch instead of SHA-pinning";
541
541
  readonly hidden: false;
542
+ }, {
543
+ readonly flags: "--registry";
544
+ readonly description: "Update installed registry packages instead (same as `hq packages update [slug]`; [name] is the package slug)";
545
+ readonly hidden: false;
542
546
  }];
543
547
  readonly subcommands: readonly [];
544
548
  }, {
@@ -670,6 +674,10 @@ export declare const COMMAND_CATALOG: readonly [{
670
674
  readonly flags: "--branch";
671
675
  readonly description: "Follow the source branch instead of SHA-pinning";
672
676
  readonly hidden: false;
677
+ }, {
678
+ readonly flags: "--registry";
679
+ readonly description: "Update installed registry packages instead (same as `hq packages update [slug]`; [name] is the package slug)";
680
+ readonly hidden: false;
673
681
  }];
674
682
  readonly subcommands: readonly [];
675
683
  }, {
@@ -6823,6 +6831,10 @@ export declare const COMMAND_CATALOG: readonly [{
6823
6831
  readonly flags: "--lock-timeout <seconds>";
6824
6832
  readonly description: "Bound the wait for the per-root operation lock (seconds). 0 = refuse immediately; omitted = wait indefinitely (the interactive default). --from-hook implies 0; an explicit --lock-timeout wins.";
6825
6833
  readonly hidden: false;
6834
+ }, {
6835
+ readonly flags: "--skip-host-canary-gate";
6836
+ readonly description: "Bypass the host canary gate (hq-core-rust US-019): with core.next on, switch Claude Code, Codex and Grok Build hook events to the new core even when no current passing host canary exists for this hq-hook version and HQ root. Prints a warning. Same as HQ_SKIP_HOST_CANARY_GATE=1.";
6837
+ readonly hidden: false;
6826
6838
  }];
6827
6839
  readonly subcommands: readonly [];
6828
6840
  }, {
@@ -7880,6 +7892,39 @@ export declare const COMMAND_CATALOG: readonly [{
7880
7892
  readonly hidden: false;
7881
7893
  }];
7882
7894
  readonly subcommands: readonly [];
7895
+ }, {
7896
+ readonly name: "create-external";
7897
+ readonly description: "Create an external bot and print a one-time enrollment code";
7898
+ readonly aliases: readonly [];
7899
+ readonly hidden: false;
7900
+ readonly helpOption: true;
7901
+ readonly helpCommand: false;
7902
+ readonly usage: "[options] <name>";
7903
+ readonly helpText: readonly [];
7904
+ readonly arguments: readonly [{
7905
+ readonly name: "name";
7906
+ readonly required: true;
7907
+ readonly variadic: false;
7908
+ readonly description: "";
7909
+ }];
7910
+ readonly options: readonly [{
7911
+ readonly flags: "--company <slug>";
7912
+ readonly description: "Company slug (resolves to companyUid)";
7913
+ readonly hidden: false;
7914
+ }, {
7915
+ readonly flags: "--framework <framework>";
7916
+ readonly description: "Bot framework: grokbot, openclaw, or mcp";
7917
+ readonly hidden: false;
7918
+ }, {
7919
+ readonly flags: "--role <role>";
7920
+ readonly description: "Membership role: member (default) or admin";
7921
+ readonly hidden: false;
7922
+ }, {
7923
+ readonly flags: "--json";
7924
+ readonly description: "Emit raw JSON (code included — pipe carefully)";
7925
+ readonly hidden: false;
7926
+ }];
7927
+ readonly subcommands: readonly [];
7883
7928
  }, {
7884
7929
  readonly name: "rotate";
7885
7930
  readonly description: "Issue a fresh enrollment code for an external agent (old secret + host key stop minting)";
@@ -9643,6 +9688,18 @@ export declare const COMMAND_CATALOG: readonly [{
9643
9688
  readonly hidden: true;
9644
9689
  }];
9645
9690
  readonly subcommands: readonly [{
9691
+ readonly name: "machine-check-owner";
9692
+ readonly description: "Report the offline owner of the twelve scheduled machine checks";
9693
+ readonly aliases: readonly [];
9694
+ readonly hidden: false;
9695
+ readonly helpOption: true;
9696
+ readonly helpCommand: false;
9697
+ readonly usage: "[options]";
9698
+ readonly helpText: readonly [];
9699
+ readonly arguments: readonly [];
9700
+ readonly options: readonly [];
9701
+ readonly subcommands: readonly [];
9702
+ }, {
9646
9703
  readonly name: "checkpoint";
9647
9704
  readonly description: "Record an end-of-turn checkpoint and start HQ maintenance";
9648
9705
  readonly aliases: readonly [];
@@ -9755,6 +9812,26 @@ export declare const COMMAND_CATALOG: readonly [{
9755
9812
  readonly hidden: false;
9756
9813
  }];
9757
9814
  readonly subcommands: readonly [];
9815
+ }, {
9816
+ readonly name: "hook-registration-plan";
9817
+ readonly description: "Print the offline fleet hook registration plan without changing the installation";
9818
+ readonly aliases: readonly [];
9819
+ readonly hidden: false;
9820
+ readonly helpOption: true;
9821
+ readonly helpCommand: false;
9822
+ readonly usage: "[options]";
9823
+ readonly helpText: readonly [];
9824
+ readonly arguments: readonly [];
9825
+ readonly options: readonly [{
9826
+ readonly flags: "--host <host>";
9827
+ readonly description: "Registration host";
9828
+ readonly hidden: false;
9829
+ }, {
9830
+ readonly flags: "--json";
9831
+ readonly description: "Print JSON";
9832
+ readonly hidden: false;
9833
+ }];
9834
+ readonly subcommands: readonly [];
9758
9835
  }, {
9759
9836
  readonly name: "hook-engine-path";
9760
9837
  readonly description: "Print the offline, version-pinned native hook engine path";
@@ -18901,7 +18978,7 @@ export declare const COMMAND_CATALOG: readonly [{
18901
18978
  }];
18902
18979
  }, {
18903
18980
  readonly name: "status";
18904
- readonly description: "Show sync ownership, heartbeat, last pass and log path";
18981
+ readonly description: "Show sync ownership, heartbeat, last pass and log path (--local: the local sync journal summary)";
18905
18982
  readonly aliases: readonly [];
18906
18983
  readonly hidden: false;
18907
18984
  readonly helpOption: true;
@@ -18913,6 +18990,22 @@ export declare const COMMAND_CATALOG: readonly [{
18913
18990
  readonly flags: "--json";
18914
18991
  readonly description: "Print machine-readable JSON";
18915
18992
  readonly hidden: false;
18993
+ }, {
18994
+ readonly flags: "--local";
18995
+ readonly description: "Show the local sync journal summary (what `hq sync status` prints) instead of the daemon's state";
18996
+ readonly hidden: false;
18997
+ }, {
18998
+ readonly flags: "--hq-root <path>";
18999
+ readonly description: "With --local: local HQ tree root";
19000
+ readonly hidden: false;
19001
+ }, {
19002
+ readonly flags: "--company <slug>";
19003
+ readonly description: "With --local: show only this company's journal (company slug)";
19004
+ readonly hidden: false;
19005
+ }, {
19006
+ readonly flags: "--all";
19007
+ readonly description: "With --local: list every local-only file instead of the first 20 per company";
19008
+ readonly hidden: false;
18916
19009
  }];
18917
19010
  readonly subcommands: readonly [];
18918
19011
  }, {
@@ -625,6 +625,11 @@ export const COMMAND_CATALOG = [
625
625
  "flags": "--branch",
626
626
  "description": "Follow the source branch instead of SHA-pinning",
627
627
  "hidden": false
628
+ },
629
+ {
630
+ "flags": "--registry",
631
+ "description": "Update installed registry packages instead (same as `hq packages update [slug]`; [name] is the package slug)",
632
+ "hidden": false
628
633
  }
629
634
  ],
630
635
  "subcommands": []
@@ -791,6 +796,11 @@ export const COMMAND_CATALOG = [
791
796
  "flags": "--branch",
792
797
  "description": "Follow the source branch instead of SHA-pinning",
793
798
  "hidden": false
799
+ },
800
+ {
801
+ "flags": "--registry",
802
+ "description": "Update installed registry packages instead (same as `hq packages update [slug]`; [name] is the package slug)",
803
+ "hidden": false
794
804
  }
795
805
  ],
796
806
  "subcommands": []
@@ -8321,6 +8331,11 @@ export const COMMAND_CATALOG = [
8321
8331
  "flags": "--lock-timeout <seconds>",
8322
8332
  "description": "Bound the wait for the per-root operation lock (seconds). 0 = refuse immediately; omitted = wait indefinitely (the interactive default). --from-hook implies 0; an explicit --lock-timeout wins.",
8323
8333
  "hidden": false
8334
+ },
8335
+ {
8336
+ "flags": "--skip-host-canary-gate",
8337
+ "description": "Bypass the host canary gate (hq-core-rust US-019): with core.next on, switch Claude Code, Codex and Grok Build hook events to the new core even when no current passing host canary exists for this hq-hook version and HQ root. Prints a warning. Same as HQ_SKIP_HOST_CANARY_GATE=1.",
8338
+ "hidden": false
8324
8339
  }
8325
8340
  ],
8326
8341
  "subcommands": []
@@ -9631,6 +9646,47 @@ export const COMMAND_CATALOG = [
9631
9646
  ],
9632
9647
  "subcommands": []
9633
9648
  },
9649
+ {
9650
+ "name": "create-external",
9651
+ "description": "Create an external bot and print a one-time enrollment code",
9652
+ "aliases": [],
9653
+ "hidden": false,
9654
+ "helpOption": true,
9655
+ "helpCommand": false,
9656
+ "usage": "[options] <name>",
9657
+ "helpText": [],
9658
+ "arguments": [
9659
+ {
9660
+ "name": "name",
9661
+ "required": true,
9662
+ "variadic": false,
9663
+ "description": ""
9664
+ }
9665
+ ],
9666
+ "options": [
9667
+ {
9668
+ "flags": "--company <slug>",
9669
+ "description": "Company slug (resolves to companyUid)",
9670
+ "hidden": false
9671
+ },
9672
+ {
9673
+ "flags": "--framework <framework>",
9674
+ "description": "Bot framework: grokbot, openclaw, or mcp",
9675
+ "hidden": false
9676
+ },
9677
+ {
9678
+ "flags": "--role <role>",
9679
+ "description": "Membership role: member (default) or admin",
9680
+ "hidden": false
9681
+ },
9682
+ {
9683
+ "flags": "--json",
9684
+ "description": "Emit raw JSON (code included — pipe carefully)",
9685
+ "hidden": false
9686
+ }
9687
+ ],
9688
+ "subcommands": []
9689
+ },
9634
9690
  {
9635
9691
  "name": "rotate",
9636
9692
  "description": "Issue a fresh enrollment code for an external agent (old secret + host key stop minting)",
@@ -11788,6 +11844,19 @@ export const COMMAND_CATALOG = [
11788
11844
  }
11789
11845
  ],
11790
11846
  "subcommands": [
11847
+ {
11848
+ "name": "machine-check-owner",
11849
+ "description": "Report the offline owner of the twelve scheduled machine checks",
11850
+ "aliases": [],
11851
+ "hidden": false,
11852
+ "helpOption": true,
11853
+ "helpCommand": false,
11854
+ "usage": "[options]",
11855
+ "helpText": [],
11856
+ "arguments": [],
11857
+ "options": [],
11858
+ "subcommands": []
11859
+ },
11791
11860
  {
11792
11861
  "name": "checkpoint",
11793
11862
  "description": "Record an end-of-turn checkpoint and start HQ maintenance",
@@ -11926,6 +11995,30 @@ export const COMMAND_CATALOG = [
11926
11995
  ],
11927
11996
  "subcommands": []
11928
11997
  },
11998
+ {
11999
+ "name": "hook-registration-plan",
12000
+ "description": "Print the offline fleet hook registration plan without changing the installation",
12001
+ "aliases": [],
12002
+ "hidden": false,
12003
+ "helpOption": true,
12004
+ "helpCommand": false,
12005
+ "usage": "[options]",
12006
+ "helpText": [],
12007
+ "arguments": [],
12008
+ "options": [
12009
+ {
12010
+ "flags": "--host <host>",
12011
+ "description": "Registration host",
12012
+ "hidden": false
12013
+ },
12014
+ {
12015
+ "flags": "--json",
12016
+ "description": "Print JSON",
12017
+ "hidden": false
12018
+ }
12019
+ ],
12020
+ "subcommands": []
12021
+ },
11929
12022
  {
11930
12023
  "name": "hook-engine-path",
11931
12024
  "description": "Print the offline, version-pinned native hook engine path",
@@ -23070,7 +23163,7 @@ export const COMMAND_CATALOG = [
23070
23163
  },
23071
23164
  {
23072
23165
  "name": "status",
23073
- "description": "Show sync ownership, heartbeat, last pass and log path",
23166
+ "description": "Show sync ownership, heartbeat, last pass and log path (--local: the local sync journal summary)",
23074
23167
  "aliases": [],
23075
23168
  "hidden": false,
23076
23169
  "helpOption": true,
@@ -23083,6 +23176,26 @@ export const COMMAND_CATALOG = [
23083
23176
  "flags": "--json",
23084
23177
  "description": "Print machine-readable JSON",
23085
23178
  "hidden": false
23179
+ },
23180
+ {
23181
+ "flags": "--local",
23182
+ "description": "Show the local sync journal summary (what `hq sync status` prints) instead of the daemon's state",
23183
+ "hidden": false
23184
+ },
23185
+ {
23186
+ "flags": "--hq-root <path>",
23187
+ "description": "With --local: local HQ tree root",
23188
+ "hidden": false
23189
+ },
23190
+ {
23191
+ "flags": "--company <slug>",
23192
+ "description": "With --local: show only this company's journal (company slug)",
23193
+ "hidden": false
23194
+ },
23195
+ {
23196
+ "flags": "--all",
23197
+ "description": "With --local: list every local-only file instead of the first 20 per company",
23198
+ "hidden": false
23086
23199
  }
23087
23200
  ],
23088
23201
  "subcommands": []
@@ -15,6 +15,7 @@
15
15
  * hq agents start|stop <uid> — EC2 start/stop
16
16
  * hq agents retry <uid> — resume setup from first non-done step
17
17
  * hq agents rm <uid> --yes — deprovision (destructive; flag-guarded)
18
+ * hq agents create-external <name> — mint an external agent + one-time enroll code
18
19
  * hq agents rotate <uid> — new enrollment code for an external agent
19
20
  * hq agents revoke <uid> --yes — revoke an external agent (--remove deletes it)
20
21
  * hq agents jobs list <uid> — off-box job roster (schedule + rate)
@@ -489,6 +490,25 @@ export interface RotateAgentResult {
489
490
  agentUid: string;
490
491
  enrollment: EnrollmentIssue;
491
492
  }
493
+ export declare const VALID_EXTERNAL_FRAMEWORKS: Set<string>;
494
+ export declare const VALID_EXTERNAL_MEMBERSHIP_ROLES: Set<string>;
495
+ export interface CreateExternalAgentInput {
496
+ name: string;
497
+ framework: string;
498
+ membershipRole?: string;
499
+ }
500
+ export interface CreateExternalAgentResult {
501
+ agentUid: string;
502
+ agentEmail: string;
503
+ framework: string;
504
+ enrollment: EnrollmentIssue;
505
+ }
506
+ /**
507
+ * POST /v1/companies/{companyUid}/agents/external — admin mint of an external
508
+ * bot. Returns the one-time enrollment code exactly once (api-contract v1).
509
+ * Console Add bot no longer exposes this path (feedback_6e5798b3).
510
+ */
511
+ export declare function createExternalAgent(token: string, companyUid: string, input: CreateExternalAgentInput): Promise<CreateExternalAgentResult>;
492
512
  /**
493
513
  * POST /v1/agents/{uid}/rotate — invalidate the current secret and host key
494
514
  * and issue a fresh one-time enrollment code (returned exactly once).
@@ -503,6 +523,8 @@ export declare function groupEnrollmentCode(code: string): string;
503
523
  export declare function revokeAgent(token: string, agentUid: string, remove: boolean): Promise<{
504
524
  removed: boolean;
505
525
  }>;
526
+ /** Lines printed after create-external: the code is shown once and never stored. */
527
+ export declare function formatCreateExternalOutput(result: CreateExternalAgentResult): string[];
506
528
  /** Lines printed after a rotate: the code is shown once and never stored. */
507
529
  export declare function formatRotateOutput(result: RotateAgentResult): string[];
508
530
  export declare function registerAgentsCommand(program: Command): void;