@indigoai-us/hq-cli 5.345.219 → 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.
- package/CHANGELOG.md +52 -0
- package/dist/command-catalog.generated.d.ts +25 -1
- package/dist/command-catalog.generated.js +31 -1
- package/dist/commands/bot.d.ts +48 -0
- package/dist/commands/bot.js +108 -8
- package/dist/commands/cloud.d.ts +16 -0
- package/dist/commands/cloud.js +112 -102
- package/dist/commands/core-checkpoint-native.d.ts +13 -0
- package/dist/commands/core-checkpoint-native.js +167 -52
- package/dist/commands/core-hook-registration-plan.js +5 -4
- package/dist/commands/daemon.js +21 -2
- package/dist/commands/integrations.js +84 -3
- package/dist/commands/packs.js +23 -0
- package/dist/commands/pkg-update.d.ts +6 -0
- package/dist/commands/pkg-update.js +15 -7
- package/dist/commands/run.js +55 -45
- package/dist/commands/sources.js +3 -2
- package/dist/lib/bot/fleet-cron.js +5 -2
- package/dist/lib/bot/inflight.d.ts +9 -0
- package/dist/lib/bot/jobs/hot-signal-sync.d.ts +51 -0
- package/dist/lib/bot/jobs/hot-signal-sync.js +90 -9
- package/dist/lib/bot/run.d.ts +29 -5
- package/dist/lib/bot/run.js +203 -1
- package/dist/lib/bot/signals-try-now.d.ts +76 -0
- package/dist/lib/bot/signals-try-now.js +111 -0
- package/dist/lib/capacity/collectors/claude-oauth.d.ts +22 -3
- package/dist/lib/capacity/collectors/claude-oauth.js +78 -22
- package/dist/lib/capacity/scheduler.d.ts +8 -0
- package/dist/lib/capacity/scheduler.js +5 -2
- package/dist/lib/daemon/run.js +5 -0
- package/dist/lib/daemon/runtime-notifications.d.ts +7 -0
- package/dist/lib/daemon/runtime-notifications.js +50 -0
- package/dist/lib/doctor/checks/fleet-hook-core.d.ts +9 -1
- package/dist/lib/doctor/checks/fleet-hook-core.js +39 -15
- package/dist/lib/hook-engine/fleet-registration.d.ts +17 -5
- package/dist/lib/hook-engine/fleet-registration.js +53 -17
- package/dist/lib/hot-channels/alert.d.ts +10 -1
- package/dist/lib/hot-channels/alert.js +34 -7
- package/dist/lib/hot-channels/signals-claude-login.d.ts +53 -0
- package/dist/lib/hot-channels/signals-claude-login.js +96 -0
- package/dist/lib/hot-channels/signals-pass.d.ts +17 -0
- package/dist/lib/hot-channels/signals-pass.js +31 -3
- package/dist/lib/search-index/index.js +11 -1
- package/dist/lib/signals/engine.d.ts +1 -0
- package/dist/lib/signals/engine.js +7 -0
- package/dist/lib/signals/reply.d.ts +48 -0
- package/dist/lib/signals/reply.js +72 -11
- package/dist/lib/signals/steps/adapters.js +6 -0
- package/dist/lib/signals/steps/extract.d.ts +50 -3
- package/dist/lib/signals/steps/extract.js +100 -17
- package/dist/lib/signals/steps/types.d.ts +19 -0
- package/dist/lib/sync-core/engine-home.d.ts +6 -1
- package/dist/lib/sync-core/engine-home.js +13 -3
- package/dist/lib/sync-core/reconcile.js +1 -1
- package/dist/lib/sync-core/release-compare.d.ts +7 -0
- package/dist/lib/sync-core/release-compare.js +16 -0
- package/dist/lib/sync-core/release.d.ts +2 -1
- package/dist/lib/sync-core/release.js +2 -10
- package/dist/run/schema-env-overrides.d.ts +24 -0
- package/dist/run/schema-env-overrides.js +72 -0
- package/dist/utils/host-registration.d.ts +1 -1
- package/dist/utils/host-registration.js +4 -0
- package/package.json +13 -9
- package/scripts/check-function-manifest.mjs +5 -4
- package/dist/commands/__fixtures__/access-vault.d.ts +0 -95
- package/dist/commands/__fixtures__/access-vault.js +0 -166
- package/dist/commands/__fixtures__/make-tar.d.ts +0 -38
- package/dist/commands/__fixtures__/make-tar.js +0 -102
- package/dist/commands/secrets-public-types.test-d.d.ts +0 -2
- package/dist/commands/secrets-public-types.test-d.js +0 -18
- package/dist/lib/decisions/fixtures/us001.d.ts +0 -137
- package/dist/lib/decisions/fixtures/us001.js +0 -21
- package/dist/lib/doctor/__testing__/fake-hq-tree.d.ts +0 -226
- package/dist/lib/doctor/__testing__/fake-hq-tree.js +0 -408
- package/dist/lib/doctor/__testing__/run-doctor.d.ts +0 -8
- package/dist/lib/doctor/__testing__/run-doctor.js +0 -69
- package/dist/lib/fingerprint/fixtures.d.ts +0 -19
- package/dist/lib/fingerprint/fixtures.js +0 -61
- package/dist/lib/hot-channels/adapters/__fixtures__/dummy.d.ts +0 -33
- package/dist/lib/hot-channels/adapters/__fixtures__/dummy.js +0 -53
- package/dist/lib/hot-channels/adapters/__fixtures__/meeting-providers.d.ts +0 -38
- package/dist/lib/hot-channels/adapters/__fixtures__/meeting-providers.js +0 -64
- package/dist/lib/mesh/live/daemon/mqtt-events.test-d.d.ts +0 -2
- package/dist/lib/mesh/live/daemon/mqtt-events.test-d.js +0 -10
- package/dist/lib/test-utils/isolated-flag-company-context.d.ts +0 -3
- package/dist/lib/test-utils/isolated-flag-company-context.js +0 -18
- package/scripts/hook-engine-manifest.mjs +0 -22
- package/scripts/mesh-daemon-if-stale.mjs +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,58 @@
|
|
|
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
|
+
|
|
5
57
|
## [5.345.219] — 2026-11-15
|
|
6
58
|
- Add `hq agents create-external` so an admin can mint an external bot and
|
|
7
59
|
a one-time enrollment code from the CLI. Console Add bot is hosted-only
|
|
@@ -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
|
}, {
|
|
@@ -18970,7 +18978,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
18970
18978
|
}];
|
|
18971
18979
|
}, {
|
|
18972
18980
|
readonly name: "status";
|
|
18973
|
-
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)";
|
|
18974
18982
|
readonly aliases: readonly [];
|
|
18975
18983
|
readonly hidden: false;
|
|
18976
18984
|
readonly helpOption: true;
|
|
@@ -18982,6 +18990,22 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
18982
18990
|
readonly flags: "--json";
|
|
18983
18991
|
readonly description: "Print machine-readable JSON";
|
|
18984
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;
|
|
18985
19009
|
}];
|
|
18986
19010
|
readonly subcommands: readonly [];
|
|
18987
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": []
|
|
@@ -23153,7 +23163,7 @@ export const COMMAND_CATALOG = [
|
|
|
23153
23163
|
},
|
|
23154
23164
|
{
|
|
23155
23165
|
"name": "status",
|
|
23156
|
-
"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)",
|
|
23157
23167
|
"aliases": [],
|
|
23158
23168
|
"hidden": false,
|
|
23159
23169
|
"helpOption": true,
|
|
@@ -23166,6 +23176,26 @@ export const COMMAND_CATALOG = [
|
|
|
23166
23176
|
"flags": "--json",
|
|
23167
23177
|
"description": "Print machine-readable JSON",
|
|
23168
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
|
|
23169
23199
|
}
|
|
23170
23200
|
],
|
|
23171
23201
|
"subcommands": []
|
package/dist/commands/bot.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type LegacyMoveState, type LegacyProviderLoginProbe } from "../lib/bot/legacy-convert.js";
|
|
2
|
+
import { type ClaudeLoginNow, type SignalsClaudeLogin } from "../lib/hot-channels/signals-claude-login.js";
|
|
2
3
|
import { Command } from "commander";
|
|
3
4
|
import { type ExecutiveBot } from "../lib/bot/executive.js";
|
|
4
5
|
import { waitForGatewayReady, type BotReadiness, type ReadyWaitResult } from "../lib/bot/readiness.js";
|
|
@@ -70,6 +71,12 @@ export interface BotRow {
|
|
|
70
71
|
runtimeSignedIn: boolean | null;
|
|
71
72
|
/** The terminal command that signs the bot's coding tool in on this computer. */
|
|
72
73
|
signInCommand: string;
|
|
74
|
+
/**
|
|
75
|
+
* The Claude Code login the hot-channel signals pass needs, which can differ
|
|
76
|
+
* from the bot's own runtime login (a Codex bot still runs signals on
|
|
77
|
+
* Claude Code). Only for a bot with the hot-signal-sync job; null otherwise.
|
|
78
|
+
*/
|
|
79
|
+
signalsClaudeSignIn: SignalsClaudeSignIn | null;
|
|
73
80
|
/**
|
|
74
81
|
* Set when the bot cannot run until its model provider is signed in, on any
|
|
75
82
|
* engine: a Fleet bot never signed in or whose last turn failed on auth, a
|
|
@@ -161,6 +168,47 @@ export declare function ownerSignInAllowed(): boolean;
|
|
|
161
168
|
* sign-out, and the next start checks afresh.
|
|
162
169
|
*/
|
|
163
170
|
export declare function runtimeSignedIn(status: Pick<BotStatusFile, "runtimeSignIn" | "runtimeSignInCheck"> | null | undefined, processAlive: boolean): boolean | null;
|
|
171
|
+
export interface SignalsClaudeSignIn {
|
|
172
|
+
/** The companies this bot runs the hot-signal-sync job for. */
|
|
173
|
+
companies: string[];
|
|
174
|
+
/**
|
|
175
|
+
* Whether Claude Code is signed in for signals: the live check when it
|
|
176
|
+
* answered, else what the last signals pass saw; null when neither knows.
|
|
177
|
+
*/
|
|
178
|
+
signedIn: boolean | null;
|
|
179
|
+
/** Where `signedIn` came from. */
|
|
180
|
+
basis: "live" | "last-signals-pass" | "none";
|
|
181
|
+
/** This status call's `claude auth status` (once per call); null when it was not run. */
|
|
182
|
+
liveCheck: ClaudeLoginNow | null;
|
|
183
|
+
/** What the last signals pass saw (secondary context); null when none was recorded. */
|
|
184
|
+
lastSignalsPass: {
|
|
185
|
+
signedIn: boolean;
|
|
186
|
+
checkedAt: string;
|
|
187
|
+
signedOutSince: string | null;
|
|
188
|
+
} | null;
|
|
189
|
+
/** The last signals pass's record time; kept with `source` and `signedOutSince` for older readers. */
|
|
190
|
+
checkedAt: string | null;
|
|
191
|
+
source: SignalsClaudeLogin["source"] | null;
|
|
192
|
+
/** While the last signals pass saw it signed out: since when. */
|
|
193
|
+
signedOutSince: string | null;
|
|
194
|
+
/** Set when Claude is signed in now but the last signals pass failed signed out. */
|
|
195
|
+
queuedDocsHint: string | null;
|
|
196
|
+
/** Where to sign in: the HQ app first, the terminal command as the fallback. */
|
|
197
|
+
fix: string;
|
|
198
|
+
command: string;
|
|
199
|
+
}
|
|
200
|
+
/** The live check `hq bot status` / `list` run once per call. Tests replace it. */
|
|
201
|
+
export declare const signalsClaudeSeams: {
|
|
202
|
+
check: () => Promise<ClaudeLoginNow>;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* `signalsClaudeSignIn` for a row, for a bot with the hot-signal-sync job:
|
|
206
|
+
* the live check when given and it answered, the last signals pass's record
|
|
207
|
+
* as secondary context and as the fallback. Never runs `claude` itself.
|
|
208
|
+
*/
|
|
209
|
+
export declare function signalsClaudeSignInFor(dir: string, fleet: boolean, record?: SignalsClaudeLogin | null, live?: ClaudeLoginNow | null): SignalsClaudeSignIn | null;
|
|
210
|
+
/** The status lines for the Claude Code login signals needs: the answer first, the last signals pass as context. */
|
|
211
|
+
export declare function signalsClaudeSignInLines(s: SignalsClaudeSignIn): string[];
|
|
164
212
|
export interface BrainSignIn {
|
|
165
213
|
provider: BotRuntimeId;
|
|
166
214
|
needed: true;
|
package/dist/commands/bot.js
CHANGED
|
@@ -8,8 +8,9 @@ import { runSignals } from "../lib/signals/engine.js";
|
|
|
8
8
|
import { defaultResolveBotRuntime } from "../lib/signals/steps/extract.js";
|
|
9
9
|
import { BOT_SIGNALS_ENGINE_JOB_FLAG, signalsEngineForJob } from "../lib/bot/signals-engine-flag.js";
|
|
10
10
|
import { resolveProcessFlagGate } from "../lib/flag-registry.js";
|
|
11
|
-
import { currentHotSignalSyncCompany, readActiveCompanySlug, registerHotSignalSyncOnStart, runHotSignalSyncJob } from "../lib/bot/jobs/hot-signal-sync.js";
|
|
12
|
-
import { createClaudeSignalsPass } from "../lib/hot-channels/signals-pass.js";
|
|
11
|
+
import { currentHotSignalSyncCompany, hasScheduledBriefJob, hotSignalSyncJobCompanies, readActiveCompanySlug, registerHotSignalSyncOnStart, runHotSignalSyncJob } from "../lib/bot/jobs/hot-signal-sync.js";
|
|
12
|
+
import { CLAUDE_SIGN_IN_STEPS, createClaudeSignalsPass } from "../lib/hot-channels/signals-pass.js";
|
|
13
|
+
import { checkClaudeLoginNow, readSignalsClaudeLogin, recordSignalsPassClaudeLogin } from "../lib/hot-channels/signals-claude-login.js";
|
|
13
14
|
import { machineTimeZone } from "../lib/bot/job-run.js";
|
|
14
15
|
import { runCompanyHotChannelSync } from "./sources.js";
|
|
15
16
|
import { OwnerContextCache, lookupOwnerContext } from "../lib/bot/owner-context.js";
|
|
@@ -510,6 +511,85 @@ export function runtimeSignedIn(status, processAlive) {
|
|
|
510
511
|
return false;
|
|
511
512
|
return status.runtimeSignInCheck?.signedIn ?? null;
|
|
512
513
|
}
|
|
514
|
+
/** The live check `hq bot status` / `list` run once per call. Tests replace it. */
|
|
515
|
+
export const signalsClaudeSeams = {
|
|
516
|
+
check: () => checkClaudeLoginNow(),
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* `signalsClaudeSignIn` for a row, for a bot with the hot-signal-sync job:
|
|
520
|
+
* the live check when given and it answered, the last signals pass's record
|
|
521
|
+
* as secondary context and as the fallback. Never runs `claude` itself.
|
|
522
|
+
*/
|
|
523
|
+
export function signalsClaudeSignInFor(dir, fleet, record = readSignalsClaudeLogin(), live = null) {
|
|
524
|
+
const companies = hotSignalSyncJobCompanies(dir, { fleet });
|
|
525
|
+
if (companies.length === 0)
|
|
526
|
+
return null;
|
|
527
|
+
const signedOutSince = record && !record.signedIn ? (record.signedOutSince ?? record.checkedAt) : null;
|
|
528
|
+
const liveAnswer = live && live.signedIn !== null ? live.signedIn : null;
|
|
529
|
+
const signedIn = liveAnswer ?? record?.signedIn ?? null;
|
|
530
|
+
const basis = liveAnswer !== null ? "live" : record ? "last-signals-pass" : "none";
|
|
531
|
+
const queuedDocsHint = liveAnswer === true && record?.signedIn === false
|
|
532
|
+
? `queued documents run at the next sync, or run ${companies.map((c) => `\`hq sources sync --company ${c}\``).join(" or ")} now`
|
|
533
|
+
: null;
|
|
534
|
+
return {
|
|
535
|
+
companies,
|
|
536
|
+
signedIn,
|
|
537
|
+
basis,
|
|
538
|
+
liveCheck: live,
|
|
539
|
+
lastSignalsPass: record ? { signedIn: record.signedIn, checkedAt: record.checkedAt, signedOutSince } : null,
|
|
540
|
+
checkedAt: record?.checkedAt ?? null,
|
|
541
|
+
source: record?.source ?? null,
|
|
542
|
+
signedOutSince,
|
|
543
|
+
queuedDocsHint,
|
|
544
|
+
fix: CLAUDE_SIGN_IN_STEPS,
|
|
545
|
+
command: signInCommand("claude"),
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Run the live check once for this status call, only when some row has the
|
|
550
|
+
* signals job, and fill it into those rows. Never throws: a failed check
|
|
551
|
+
* leaves the rows on the last signals pass's record and says so.
|
|
552
|
+
*/
|
|
553
|
+
async function decorateSignalsClaudeLive(rows) {
|
|
554
|
+
const targets = rows.filter((row) => row.signalsClaudeSignIn !== null);
|
|
555
|
+
if (targets.length === 0)
|
|
556
|
+
return;
|
|
557
|
+
let live;
|
|
558
|
+
try {
|
|
559
|
+
live = await signalsClaudeSeams.check();
|
|
560
|
+
}
|
|
561
|
+
catch (err) {
|
|
562
|
+
live = { signedIn: null, checkedAt: new Date().toISOString(), error: err instanceof Error ? err.message : String(err) };
|
|
563
|
+
}
|
|
564
|
+
const record = readSignalsClaudeLogin();
|
|
565
|
+
for (const row of targets) {
|
|
566
|
+
row.signalsClaudeSignIn = signalsClaudeSignInFor(row.dir, row.engine === HQ_FLEET_RUNTIME_ENGINE_ID, record, live);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
/** The status lines for the Claude Code login signals needs: the answer first, the last signals pass as context. */
|
|
570
|
+
export function signalsClaudeSignInLines(s) {
|
|
571
|
+
const forWhat = `(hot-channel signals for ${s.companies.join(", ")})`;
|
|
572
|
+
const state = s.signedIn === true
|
|
573
|
+
? chalk.green("Claude Code signed in")
|
|
574
|
+
: s.signedIn === false
|
|
575
|
+
? chalk.yellow("Claude Code signed out")
|
|
576
|
+
: chalk.gray("Claude Code sign-in unknown");
|
|
577
|
+
const how = s.basis === "live"
|
|
578
|
+
? "checked now"
|
|
579
|
+
: s.liveCheck?.error
|
|
580
|
+
? `live check failed (${s.liveCheck.error}); from the last signals pass`
|
|
581
|
+
: s.basis === "last-signals-pass"
|
|
582
|
+
? "from the last signals pass"
|
|
583
|
+
: "not checked";
|
|
584
|
+
const lines = [`${state} ${forWhat} ${chalk.dim(how)}${s.signedIn === false ? ` - ${s.fix}` : ""}`];
|
|
585
|
+
const last = s.lastSignalsPass;
|
|
586
|
+
if (last) {
|
|
587
|
+
lines.push(chalk.dim(`signals last saw Claude Code ${last.signedIn ? "signed in" : "signed out"} at ${last.checkedAt}${!last.signedIn && last.signedOutSince && last.signedOutSince !== last.checkedAt ? ` (since ${last.signedOutSince})` : ""}`));
|
|
588
|
+
}
|
|
589
|
+
if (s.queuedDocsHint)
|
|
590
|
+
lines.push(s.queuedDocsHint);
|
|
591
|
+
return lines;
|
|
592
|
+
}
|
|
513
593
|
/**
|
|
514
594
|
* `brainUsage` for a row. A model-CLI bot records it itself (status.brainUsage);
|
|
515
595
|
* a Fleet bot's last failure carries the runtime's `brain_usage`, and an older
|
|
@@ -635,6 +715,7 @@ function rowFor(name, opts = {}) {
|
|
|
635
715
|
...(fleet && config.fleetAuthPending === true ? { needsSignIn: true, authCommand: fleetAuthCommand(name, config) } : {}),
|
|
636
716
|
...(fleet && config.fleetServiceInstallPending === true ? { needsSignIn: false, serviceInstallPending: true } : {}),
|
|
637
717
|
signInCommand: fleet ? fleetAuthCommand(name, config) : signInCommand(config.runtime),
|
|
718
|
+
signalsClaudeSignIn: signalsClaudeSignInFor(dir, fleet),
|
|
638
719
|
brainSignIn: brainSignInFor(name, config, status, legacy),
|
|
639
720
|
brainUsage: brainUsageFor(config, status),
|
|
640
721
|
...(legacy ? { legacy: legacyStatusJson(legacy) } : {}),
|
|
@@ -2102,18 +2183,23 @@ async function runBotResident(nameArg) {
|
|
|
2102
2183
|
// the first sync starts in the background right after the job is created.
|
|
2103
2184
|
// US-006: a fired job runs the signals engine (garden -> adapters ->
|
|
2104
2185
|
// extract -> garden -> upload) and replies in the storyboarded format.
|
|
2105
|
-
const
|
|
2106
|
-
// The engine is gated default-off (cli.bot-signals-engine-job); with the
|
|
2107
|
-
// flag off the job runs the hot-channel sync alone, as before US-006.
|
|
2108
|
-
signalsEngineForJob(runSignals).then((signals) => runHotSignalSyncJob({
|
|
2186
|
+
const hotSignalSyncJob = (input, signals) => runHotSignalSyncJob({
|
|
2109
2187
|
...input,
|
|
2110
2188
|
hqRoot: config.hqRoot,
|
|
2111
2189
|
timeZone: input.timeZone ?? machineTimeZone(),
|
|
2190
|
+
// This local bot replies in the owner's HQ DM, which the desktop app
|
|
2191
|
+
// shows: the reply links today's brief with hq-desktop://brief (US-023).
|
|
2192
|
+
desktopLinks: true,
|
|
2193
|
+
// Read per run, so a brief job added or removed since start counts.
|
|
2194
|
+
briefJobScheduled: hasScheduledBriefJob(dir),
|
|
2112
2195
|
...(signals ? { signals } : {}),
|
|
2113
2196
|
sync: (syncInput) => runCompanyHotChannelSync({ hqRoot: config.hqRoot, ...syncInput }),
|
|
2114
2197
|
// A new pass per run: the login preflight and the 20-document cap are per run.
|
|
2115
|
-
signalsPass: createClaudeSignalsPass({ hqRoot: config.hqRoot, company: input.company, botRuntime: defaultResolveBotRuntime }),
|
|
2116
|
-
})
|
|
2198
|
+
signalsPass: createClaudeSignalsPass({ hqRoot: config.hqRoot, company: input.company, botRuntime: defaultResolveBotRuntime, onClaudeLogin: recordSignalsPassClaudeLogin }),
|
|
2199
|
+
});
|
|
2200
|
+
// The engine is gated default-off (cli.bot-signals-engine-job); with the
|
|
2201
|
+
// flag off the job runs the hot-channel sync alone, as before US-006.
|
|
2202
|
+
const runHotSignalSync = (input) => signalsEngineForJob(runSignals).then((signals) => hotSignalSyncJob(input, signals));
|
|
2117
2203
|
// Prefer the Executive bot for daily hot-channel sync. Other personal bots
|
|
2118
2204
|
// keep their company covered until the Executive has a replacement job.
|
|
2119
2205
|
// Identity only (never the executive.enabled opt-in); with no personal bot
|
|
@@ -2137,6 +2223,15 @@ async function runBotResident(nameArg) {
|
|
|
2137
2223
|
runtime: runtimeFor(config.runtime),
|
|
2138
2224
|
ownerContext: () => owner.get(),
|
|
2139
2225
|
hotSignalSync: (input) => runHotSignalSync(input),
|
|
2226
|
+
// US-006 AC9: the member's "Try now" runs the same entry point as the job,
|
|
2227
|
+
// as `--trigger chat --force`, behind the same cli.bot-signals-engine-job
|
|
2228
|
+
// flag. Flag off: null, and the message goes to the model as before.
|
|
2229
|
+
signalsTryNow: async () => {
|
|
2230
|
+
const signals = await signalsEngineForJob(runSignals);
|
|
2231
|
+
if (!signals)
|
|
2232
|
+
return null;
|
|
2233
|
+
return (input) => hotSignalSyncJob({ ...input, catchUp: false, tryNow: true }, signals);
|
|
2234
|
+
},
|
|
2140
2235
|
// US-005: decision picks in the owner DM, with the bot's own machine token
|
|
2141
2236
|
// (never the owner's login).
|
|
2142
2237
|
decisions: new DecisionsClient(token),
|
|
@@ -2190,6 +2285,7 @@ async function runBotList(opts) {
|
|
|
2190
2285
|
const executiveBot = resolveExecutiveBot();
|
|
2191
2286
|
const rows = listBotNames(botsRoot()).map((n) => rowFor(n, { executiveBot }));
|
|
2192
2287
|
await decorateOnline(rows);
|
|
2288
|
+
await decorateSignalsClaudeLive(rows);
|
|
2193
2289
|
if (opts.json) {
|
|
2194
2290
|
console.log(JSON.stringify({
|
|
2195
2291
|
bots: rows,
|
|
@@ -2306,6 +2402,7 @@ async function runBotStatus(nameArg, opts) {
|
|
|
2306
2402
|
const legacy = fleet ? null : legacyMoveState(dir, config, legacyConvertSeams.providerLogin(dir, config));
|
|
2307
2403
|
const row = rowFor(name, { legacy });
|
|
2308
2404
|
await decorateOnline([row]);
|
|
2405
|
+
await decorateSignalsClaudeLive([row]);
|
|
2309
2406
|
const status = readBotStatus(dir);
|
|
2310
2407
|
const creds = readBotCredsIdentity(dir);
|
|
2311
2408
|
const channels = fleet ? fleetLocalChannels(readFleetLocalGatewayState(config.agentUid), row.processAlive) : null;
|
|
@@ -2338,6 +2435,9 @@ async function runBotStatus(nameArg, opts) {
|
|
|
2338
2435
|
console.log(` readiness: ${row.readiness === "ready" ? chalk.green(`ready${row.readyAt ? ` since ${row.readyAt}` : ""}`) : row.readiness === "offline" ? chalk.gray("offline") : chalk.yellow(row.readiness)}`);
|
|
2339
2436
|
if (row.needsSignIn)
|
|
2340
2437
|
console.log(` sign-in: required (${row.authCommand})`);
|
|
2438
|
+
if (row.signalsClaudeSignIn) {
|
|
2439
|
+
signalsClaudeSignInLines(row.signalsClaudeSignIn).forEach((line, i) => console.log(` ${i === 0 ? "signals: " : " "}${line}`));
|
|
2440
|
+
}
|
|
2341
2441
|
if (row.brainUsage.state === "exhausted") {
|
|
2342
2442
|
console.log(` usage: ${chalk.yellow(`out of usage${row.brainUsage.resetsAt ? `, resets ${row.brainUsage.resetsAt}` : ""}`)} — switch account: hq bot switch-account ${name} --runtime <claude|codex|grok>`);
|
|
2343
2443
|
}
|
package/dist/commands/cloud.d.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* hq sync push [paths...] — broadcast local file(s) to the vault
|
|
12
12
|
* hq sync pull — pull all permitted files from the vault
|
|
13
13
|
* hq sync status — show local journal summary
|
|
14
|
+
* (also `hq daemon sync status --local`)
|
|
14
15
|
*/
|
|
15
16
|
import { Command } from "commander";
|
|
16
17
|
import { type ConflictStrategy, type EntityContext, type MembershipSyncConfig, type SyncMode, type PullScope, type ExplicitGrant, type ShareOptions, type VaultServiceConfig } from "@indigoai-us/hq-cloud";
|
|
@@ -692,6 +693,21 @@ export declare function nowPushLegRefused(input: {
|
|
|
692
693
|
uploadFailedCount: number;
|
|
693
694
|
identityHeldCount: number;
|
|
694
695
|
}): boolean;
|
|
696
|
+
/** Options shared by `hq sync status` and `hq daemon sync status --local`. */
|
|
697
|
+
export interface SyncJournalStatusOptions {
|
|
698
|
+
/** HQ root given on the command line; undefined means the default root (not checked). */
|
|
699
|
+
hqRoot?: string;
|
|
700
|
+
company?: string;
|
|
701
|
+
all?: boolean;
|
|
702
|
+
json?: boolean;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* The local sync-journal summary printed by `hq sync status` and
|
|
706
|
+
* `hq daemon sync status --local`: per-scope summaries plus the read-only and
|
|
707
|
+
* server-owned local-only lists, as text or (`json`) the full JSON. Exits the
|
|
708
|
+
* process with status 1 on an error, after printing "✗ Status failed:".
|
|
709
|
+
*/
|
|
710
|
+
export declare function runSyncJournalStatus(options: SyncJournalStatusOptions): void;
|
|
695
711
|
/**
|
|
696
712
|
* Human-friendly label for a journal slug in `hq sync status`. The
|
|
697
713
|
* personal-vault fanout slot and the legacy `companies/personal` company both
|