@indigoai-us/hq-cli 5.345.263 → 5.345.267
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 +116 -0
- package/assets/scaffold/core/scripts/hq-delegate-grant.sh +4 -48
- package/assets/scaffold/core/scripts/hq-delegate-secrets.sh +16 -10
- package/assets/scaffold/core/scripts/hq-delegate-send.sh +17 -1
- package/contracts/host-canary-release.json +7 -7
- package/dist/command-catalog.generated.d.ts +67 -1
- package/dist/command-catalog.generated.js +83 -1
- package/dist/command-registration-plan.d.ts +6 -0
- package/dist/command-registration-plan.js +1 -0
- package/dist/commands/bot.d.ts +2 -0
- package/dist/commands/bot.js +4 -3
- package/dist/commands/core-delegate-w1b.js +21 -40
- package/dist/commands/core-delegate.js +11 -8
- package/dist/commands/files-browse.d.ts +83 -4
- package/dist/commands/files-browse.js +404 -54
- package/dist/commands/groups.js +2 -2
- package/dist/commands/skill.js +15 -0
- package/dist/commands/sync-held.d.ts +11 -0
- package/dist/commands/sync-held.js +65 -1
- package/dist/commands/sync-telemetry-report.d.ts +5 -0
- package/dist/commands/sync-telemetry-report.js +239 -0
- package/dist/commands/sync-telemetry.d.ts +47 -0
- package/dist/commands/sync-telemetry.js +309 -0
- package/dist/index.js +107 -43
- package/dist/lib/agent-kit/mcp/tools.js +2 -2
- package/dist/lib/agent-kit/skills.js +12 -6
- package/dist/lib/bot/runnable.d.ts +17 -7
- package/dist/lib/bot/runnable.js +17 -10
- package/dist/lib/capacity/available.js +6 -2
- package/dist/lib/capacity/collectors/claude-oauth.d.ts +10 -256
- package/dist/lib/capacity/collectors/claude-oauth.js +19 -1078
- package/dist/lib/capacity/ledger.d.ts +12 -1
- package/dist/lib/capacity/ledger.js +15 -5
- package/dist/lib/capacity/route.d.ts +2 -0
- package/dist/lib/capacity/route.js +21 -4
- package/dist/lib/capacity/scheduler.js +2 -3
- package/dist/lib/capacity/sign-in.js +4 -4
- package/dist/lib/daemon/merge-sections.d.ts +44 -9
- package/dist/lib/daemon/merge-sections.js +234 -37
- package/dist/lib/daemon/ops/skill-command.d.ts +2 -0
- package/dist/lib/daemon/ops/skill-command.js +7 -1
- package/dist/lib/daemon/run.js +1 -0
- package/dist/lib/doctor/checks/antigravity-wiring.d.ts +2 -1
- package/dist/lib/doctor/checks/antigravity-wiring.js +75 -3
- package/dist/lib/doctor/checks/hook-engine.d.ts +2 -0
- package/dist/lib/doctor/checks/hook-engine.js +100 -1
- package/dist/lib/doctor/checks/host-core.d.ts +1 -1
- package/dist/lib/doctor/checks/host-core.js +19 -7
- package/dist/lib/doctor/fix/process-identity.d.ts +2 -0
- package/dist/lib/doctor/fix/process-identity.js +5 -2
- package/dist/lib/hook-engine/coverage.d.ts +19 -10
- package/dist/lib/hook-engine/coverage.js +116 -25
- package/dist/lib/hook-engine/native-precompact-compatibility.json +8 -1
- package/dist/lib/hook-engine/native-stop-compatibility.json +8 -4
- package/dist/lib/hook-engine/reconcile.js +60 -2
- package/dist/lib/install/antigravity-targets.d.ts +22 -0
- package/dist/lib/install/antigravity-targets.js +82 -0
- package/dist/lib/signals/reply.js +25 -5
- package/dist/lib/signals/steps/extract.d.ts +28 -4
- package/dist/lib/signals/steps/extract.js +124 -10
- package/dist/lib/sync-core/release.d.ts +1 -1
- package/dist/lib/sync-core/release.js +2 -2
- package/dist/main.js +8 -3
- package/dist/sentry-init.d.ts +7 -1
- package/dist/sentry-init.js +6 -2
- package/dist/sentry.d.ts +7 -0
- package/dist/sentry.js +16 -1
- package/dist/started-version.d.ts +13 -0
- package/dist/started-version.js +34 -0
- package/dist/startup-registration.d.ts +9 -9
- package/dist/startup-registration.js +42 -18
- package/dist/utils/client-health.d.ts +1 -0
- package/dist/utils/client-health.js +54 -11
- package/dist/utils/core-next-kill.d.ts +9 -0
- package/dist/utils/core-next-kill.js +22 -0
- package/dist/utils/host-registration.d.ts +4 -2
- package/dist/utils/host-registration.js +55 -7
- package/dist/utils/install-tree-recovery-markers.d.ts +45 -0
- package/dist/utils/install-tree-recovery-markers.js +70 -0
- package/dist/utils/install-tree-torn.d.ts +102 -5
- package/dist/utils/install-tree-torn.js +199 -2
- package/dist/utils/sentry-fingerprint.js +3 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,123 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [5.345.267] — 2026-11-29
|
|
6
|
+
- Speed up `scope_bash` tests on Windows by reusing the test binary when already outside an HQ tree and evaluating large spelling matrices in-process.
|
|
7
|
+
- Update the legacy journal gate test fixture to use the current sync-core release.
|
|
8
|
+
- Pin `hq-delegate-grant.sh` as `absent-in-staging` in the scaffold freshness test after staging retirement and #4187.
|
|
9
|
+
- Accept Antigravity `run_command` calls that carry `BypassSandbox` and `NotificationTimeoutSeconds` in `hq-hook` PreToolUse; HQ checks still inspect `CommandLine` and `Cwd` as before, and other unknown or case-variant argument keys are still refused.
|
|
10
|
+
- Cache prebuilt Windows `hq-hook` nextest archives on each Beaker runner keyed by commit SHA, run id, and archive SHA-256 so later shards and failed-job reruns on the same machine reuse the verified local archive instead of re-downloading it.
|
|
11
|
+
- Scale Linux `hq-hook PR tests` sharding in `scripts/ci/hq-hook-test-plan.mjs` to `PR_MAX_SHARDS=12`, `FULL_SHARDS=12`, and `PR_SECONDS_PER_SHARD=90` to match the prebuilt nextest archive and autoscaled AWS runner pool, and wire `./.github/actions/sccache-s3` (behind `HQ_BUILD_CACHE`) into the `hq-hook.yml` tag/release build matrix with job-scoped `id-token: write` permissions.
|
|
12
|
+
- hq-hook PR CI now ends with an `hq-hook failure class` job that says whether a red run failed in its tests or lost a runner or a setup step, in the job summary and as an annotation. It exits 1 whenever any other job is red, so it never reports a red run as green.
|
|
13
|
+
- Vendor `.github/actions/sccache-s3/action.yml` from `indigoai-us/hq-github-runners` and wire the shared OIDC-backed S3 `sccache` build cache (`hq-build-cache-804849608251-us-east-2`) into `hq-hook-pr.yml` build/clippy jobs (`build-archive`, `windows-beaker-build`, and `windows-beaker-clippy`) behind the `HQ_BUILD_CACHE` kill switch, keeping `id-token: write` isolated from test shard jobs and retaining the existing local `sccache` setup as a fallback.
|
|
14
|
+
- Run `hq-hook` Windows Beaker shard merging (`windows-beaker-merge`) on Linux (`hq-cli-main-priority` / `hq-hook-mac` / `ubuntu-latest`) instead of scarce Beaker Windows runners, and split train-push native Windows `cargo clippy` into a parallel `windows-beaker-clippy` job so `windows-beaker` shard 1/6 only runs prebuilt tests.
|
|
15
|
+
- Speed up the `hq-hook` Windows release workflow by compiling tests once without dev debug info, running compiled Windows test binaries in parallel with `--no-fail-fast`, preserving a per-runner Cargo target cache on Beaker outside `actions/checkout` cleanup, and resolving `pwsh` or Windows PowerShell with an early bounded preflight check.
|
|
16
|
+
- Record `block-credential-file-read` fail-closed `git -C <missing-dir> diff HEAD` replay differences (`evt-fd252a042132bc4a`, `evt-e81914a040832cb9`) in the `US-013` intended-differences ledger with a pinning test.
|
|
17
|
+
- Remove obsolete `grp_dlg*` delegation-group creation for `agt_*` recipients in `hq core delegate grant` and `hq core delegate secrets`: share file and secret grants directly to `agt_*` (`granteeType: "person"`, `granteeId: agt_*`) so non-owner admins and members can delegate to fleet agents without `manageGroups` permission; preserve legacy `grp_dlg*` secret-sharing compatibility for existing manifests, and surface the server's 403 error on `hq groups create`.
|
|
18
|
+
- Run personal, pack, and company folder hooks natively on `fleet-local` across `PreToolUse`, `PostToolUse`, `SessionStart`, `UserPromptSubmit`, and `SessionEnd` (item 908).
|
|
19
|
+
- Tell agents that `hq files search` lists the entire company vault and can take minutes on a large company, and point them at `hq files get <exact path>` or `hq files browse <narrow prefix>` instead, in the agent kit search skill and the `hq_search` MCP tool description. The `/delegate` pickup prompt now lists a `hq files get` line for the delegation brief, the manifest and every published dossier file, and tells the recipient not to search the vault for them.
|
|
20
|
+
- Speed up `hq files search`: it no longer fetches your grants (the ACL column is now opt-in with `--acl`). When you run it with your own HQ login and are a member of the company, it prints matches from your synced local copy first (`--local-only` skips the vault listing, `--no-local` skips the local copy); API keys, machine and agent identities never get local results. It also accepts `--prefix <path>` to list only one folder inside the company and shows paging progress on stderr when stderr is a terminal or `--progress` is set. Without a terminal it prints one stderr note that a whole-vault listing can take minutes (`--quiet` drops it). The remote listing is also parsed faster: only matching keys are turned into result rows.
|
|
21
|
+
- Stabilize `US-005` bounded-scan test `(j)` against the 5 s vitest timeout on CI by sizing the real-fsync backlog to 30 jobs across 5 batches of 6 (5x the batch bound) while preserving every cursor, partial-tail, batch-bound, and uniqueness assertion.
|
|
22
|
+
- Fix `stop_check::the_safety_budget_is_charged_for_ported_hooks_master_hook_runs_before_a_guard` control-case flake caused by `HQ_SAFETY_GUARD_TOTAL_BUDGET=1` crossing a whole-second `SECONDS` boundary during `master-hook.sh` startup, and tighten the native control assertion.
|
|
23
|
+
- Fixed: Gate Antigravity Stop hook registration in `hq reindex` and `hq doctor` on native Stop compatibility so HQ roots with an active Stop compatibility hold keep SessionStart, PreToolUse, and PostToolUse registered without registering a Stop hook that refuses every turn.
|
|
24
|
+
- Fixed: Allow Antigravity built-in UI and IPC tools (`update_focus`, `update_steps`, `ask_question`, `manage_task` for `list`/`status`/`kill`, `send_message`, `manage_subagents`, `list_plugin_accounts`, `search_marketplace`) in `hq-hook` PreToolUse while keeping `manage_task` `send_input` and opaque execution tools refused, and exclude `edit_file`'s replacement `Target` text from path extraction so multi-line edits no longer fail with a line-break path error.
|
|
25
|
+
- Fixed: The daemon's `merge_approvals` state section no longer copies each conduct link's decision queue into every session on that link (the merge check reads the queue file directly), omits closed or stale conduct-link pointers, and stays within the per-section byte limit, so merges are no longer blocked when many sessions share a conduct link.
|
|
26
|
+
- Internal: The fleet-local sensitive-read parity test no longer flakes on Linux. Its harness now wraps `grep` with `DRAIN_GREP` (matching the env-dump harness fix in #3632) so `printf` cannot take SIGPIPE under `pipefail` after `grep -Eq` exits on an early line and flip a multi-line row (`line-end-before-newline`) into an allow. The pinned adapter and corpus are unchanged; a 200-run loop of `line-end-before-newline` guards the fix.
|
|
27
|
+
- Reliability improvements for git push from HQ.
|
|
28
|
+
- Pin `lanes-repo-merge-hold.sh` (`462fd409`, `hq-core` 16.0.48–16.0.53) in the `hq-hook` bridge port (`ports.rs`) and remove the stale `462fd409` handbacks in `core-pins.json`.
|
|
29
|
+
- test(hq-hook): run `credential_entry::detached_binary_uses_the_explicit_registration_root` through `deterministic_host` (`RunClock::Deterministic`) on a detached copy of the test binary so `Host::Grok`'s 4000 ms `GetProcessTimes` budget does not race against Windows Defender scans of a freshly copied `.exe` under Beaker load (item 951)
|
|
30
|
+
- Fix Beaker Windows archive runner hanging until the 600s timeout (`exit 124`, `complete: false`) when a test binary exits cleanly while an orphaned descendant still holds inherited stdout/stderr handles, and stage `target/x86_64-pc-windows-msvc/tmp` for cross-host shards.
|
|
31
|
+
- Install `cargo-nextest` and `sccache` in Windows `hq-hook-pr` jobs via a checksum-verified Bash script so self-hosted Windows runners without `pwsh` succeed.
|
|
32
|
+
- Fixed: Capture the exit status of `scripts/release/check-verified-main-ci.mjs` in `.github/workflows/publish.yml` under `set -euo pipefail` so exit code `2` sets `verified=false` and falls through to waiting for the tag's CI run instead of aborting under GitHub Actions' default `bash -e`.
|
|
33
|
+
- Match the bash scope check for `hq` path arguments in `hq-hook`: check path-shaped and directory-level `hq` arguments against company folders whether or not the target file exists on disk (including date and arithmetic stand-ins, `--opt=` path flags, quoted attached short options, and Windows root-relative backslash paths), match bash's positional `hq dm` message allowance in Windows mode, refuse `{` in `date` splice bodies, and handle `/dev/stdin`, `/dev/fd/*`, `-`, and combined `-eo`/`-euo` shell options consistently.
|
|
34
|
+
- Ledgered the intended US-014 policy-injection difference when `block-hq-root-git-mutation` denies a `claude-code:PreToolUse:Bash` call (native `Chain` short-circuits on the first `Deny` before `injector::host::Policies` runs; item 869).
|
|
35
|
+
- Fix pre-release CI blockers on `main`: honor per-call `HQ_HOOK_BASH` in `run_bash_purge_with` so parallel `injector::host::tests::run_bash_purge_*` unit tests never race on process-wide `std::env`, replace process-wide `libc::umask` test guards in `injector::held::tests` and `tests/precompact_native.rs` with isolated child `pre_exec` umasks, add `hq-core` `v16.0.53` to `crates/hq-hook/core-pins.json`, update Windows child-count expectations in `src/commands/core-delegate-w1b.test.ts` after direct `agt_*` grants (`#4187`), and bound concurrent Windows MSYS2 `bash` spawns with job-object cleanup and a 90 s Windows per-case timeout in `merged_write_guard` tests.
|
|
36
|
+
- Fix `v5.345.266` release blockers: route claimed `fleet-local` and `agents-v2` PreToolUse events to `pre_tool_use_root` in `crates/hq-hook/tests/host_run.rs` so live-session isolation does not hit missing-registry refusals, query Windows process start times directly via `[System.Diagnostics.Process]::GetProcessById` with a 30 s timeout in `process-identity.ts`, and assert Windows `delegate grant` jq-absent parity tests do not invoke PowerShell lock probes.
|
|
37
|
+
- Changed: the host canary record shipped with the CLI is refreshed for this release build.
|
|
38
|
+
- Changed: the host canary record shipped with the CLI is refreshed for the 5.345.266 release build.
|
|
39
|
+
- Changed: the host canary record shipped with the CLI is refreshed for the 5.345.267 release build.
|
|
40
|
+
- Added: owner switch to relax a native hook check without a release.
|
|
41
|
+
- `scripts/replay-harness.mjs` can build lane 2's old-core results once and reuse them: `--baseline-out <file>` writes every event's old-core runs and noise verdict under a key (events, `--hq-root` tree and git HEAD, the harness, the toolchain on the cores' PATH including `refbin`, OS and every option that changes the old side), and `--baseline-in <file>` reuses them, refusing the run on any key difference or a missing, partial or corrupt file. The new core still runs on every kept event and every difference is still held to the ledger. `--checkpoint <file>` appends each finished event's lane 2 result so a stopped run resumes where it stopped. With a baseline, the 5,000-event hook-port proof drops from about 2 h 08 m to about 4 min. Without the new options the harness behaves as before.
|
|
42
|
+
- Fixed: native PreCompact accepts hq-core-staging #2092's updated purge hook (`825dd3fb`) and runs a hash-verified copy of the installed bash purge script for that revision instead of refusing compaction, and moves `native-precompact-compatibility.json` under `crates/hq-hook/src/` so `native-pin-check` reads the same allowlist.
|
|
43
|
+
- Added: native PreCompact policy-ledger purge support for hq-core-staging #2092 (`825dd3fb`), re-arming HARD rules from `<sid>.hard.txt` under `<ledger>.lock`, promoting soft rules from `<sid>.soft-paths.tsv`, writing `<sid>.in-force.tsv` and `<sid>.compacted`, and keeping the bash route for unmodeled revisions.
|
|
44
|
+
- Fixed: `hq skill create` no longer prints "Sync: complete" when the skill file was not uploaded to the company vault.
|
|
45
|
+
- `hq signals run`: on a Claude HQ Fleet Executive bot, the extract step now runs each source through the bot's `hq-fleet-local complete` helper on the bot's own login, as the signals pass already does, instead of `claude -p` on the personal Claude CLI login. It falls back to the Claude CLI only when the bot has no helper. A signed-out extract now tells you which coding-tool login to sign in again (`hq bot auth <bot> --provider claude`, or `claude auth login`) instead of saying you are signed out of HQ.
|
|
46
|
+
- Raise the built-in `hq-sync-core` fallback release (`SYNC_CORE_RELEASE`) and full-sync minimum floor (`SYNC_CORE_FULL_RELEASE`) to `v0.1.46` so unreachable `pin.json` lookups or stale local binaries cannot silently downgrade full sync to pre-adoption-safety releases.
|
|
47
|
+
- Refresh the unit test shard weights from three batch-train runs. The old weights (2026-11-19) had drifted so far that the slowest of the 16 unit shards ran about 1.6 times the median; in a held-out run the refreshed weights bring it to about 1.05 times.
|
|
48
|
+
- Run the `command_guards` bash-vs-native cases on up to four worker threads instead of two, run the forced hold-timeout locales at the same time, and run one lanes-repo-merge-hold case per answer with the hq-core 16.0.46 hook-lib instead of all of them (neither that guard's bash nor its port reads hook-lib; every secret-reveal case still runs on 16.0.46).
|
|
49
|
+
- Run the `company_git_metadata` path and observed-call parity checks on up to four worker threads, each with its own fixture root, and stop crossing every path spelling with every `tool_input` shape (each spelling still runs through `file_path`, each shape still runs on every path). The binary drops from about 16 s to under 4 s on macOS.
|
|
50
|
+
- Fix an intermittent failure in the Windows service worker test for a runner whose heartbeat goes stale: it ran on wall time against a 300 ms limit, so a slow CI runner saw the heartbeat already stale at submit and got a refusal instead of a lost runner. The test now drives the transport's clock.
|
|
51
|
+
- Split the native delegate differential e2e corpus (ten subcommands in one ~87 s test) into one test per subcommand over three files, so the e2e shards run its parts at once. Same corpora and assertions; the first file checks the parts cover every subcommand exactly once.
|
|
52
|
+
- Split the handoff-finalize shell-to-native differential e2e run (about 70 cases, the slowest test in `e2e/handoff-differential.test.ts`) into three files by sorted case id, so the e2e shards run its parts at once. Same cases and per-case checks; `handoff-differential.test.ts` checks the corpus still holds the required cases and that the parts cover every case exactly once.
|
|
53
|
+
- Fix an intermittent failure in the handoff live-route e2e test: its `hq` stand-in recorded each call line by line, so two calls running at once (the background `hq sync push` and the index rebuild call) could mix their argv. Each call is now appended in one write, with a test that runs 24 long calls at once.
|
|
54
|
+
- Split the torn-install recovery e2e file (32 lanes, about 53 s in CI) over two files with a shared harness in `e2e/helpers/install-tree-torn.ts`, so the e2e shards run the halves at once. Same lanes and assertions, moved unchanged.
|
|
55
|
+
- Deal the scaffold parity e2e matrices over five native and three shell files (were three and two), so no part runs much past the average e2e shard. Same routes and assertions; the coverage checks now expect the new part counts.
|
|
56
|
+
- Split the fast scaffold parity e2e matrices into one test per route, dealt over three native-route files and two shell-companion files, so the e2e shards run them at once instead of one ~159 s file setting a shard's wall time. Same routes, scenarios and assertions; the first file of each matrix checks that its parts cover every route exactly once.
|
|
57
|
+
- Speed up the hq-hook gate parity binaries: the delivery-regex corpus is compared with the platform grep once per run (`tests/gate_delivery_ere.rs`, every regex on every body), and each gate version now sends every regex through its bash gate on one body instead of six. Coverage of the compile check, the policy-line read and the block or allow branch per regex and gate version is unchanged.
|
|
58
|
+
- Speed up the `hq-hook` `image_context_guard` tests: the generated corpus runs in independent ledger parts on worker threads, samples the tool-name and `detail` matrix and starts the count-limit ledger near the limit; the helper-set, staging-suite and malformed-input loops run side by side; and two bash runs whose answers were never checked are gone.
|
|
59
|
+
- Run the `pre_tool_use_master` PreToolUse parity corpus through bash in full on one release per host and on a per-release sample elsewhere, with the native answer for every row still checked on every release, cutting the binary's bash spawns by about 40%.
|
|
60
|
+
- Build `sha2` at `opt-level = 3` in the dev profile so the native PowerShell scope check's script hash no longer dominates the `scope_powershell` differential tests, and stop running bash on the two POSIX differential rows whose bash answer is not asserted.
|
|
61
|
+
- Speed up `crates/hq-hook/tests/p4_master_hook_parity.rs`: cases run on up to four worker threads, each with its own fixture root; the four re-runs of the `sudo -D`/`--chdir` fix become block expectations on the corpus run; the five non-override `HQ_ALLOW_UNSAFE_INSTALL` values go through master-hook on a blocked and an allowed call per part instead of every install command (every value stays on every released-script case and host in `released_parity_package_install`).
|
|
62
|
+
- Avoid redundant double execution in `repo_worktree::paired_or_windows_refusal` and bound concurrent Windows MSYS2 `bash` reference spawns in `repo_worktree` tests to prevent fork-storm flakes on Windows runners.
|
|
63
|
+
- Drive `deadline_parity`'s known-block timeout cases in `stop_check` with `RunClock::Manual` (`deterministic_host::command_manual`) so `1-deny.sh` never races the 250 ms wall-clock headroom under parallel Mac CI load without raising any timeout or budget.
|
|
64
|
+
- Test reliability improvements for stop-job queue rotation.
|
|
65
|
+
|
|
66
|
+
## [5.345.264] — 2026-11-28
|
|
67
|
+
- The nightly fast-route benchmark now prints a timed progress line as it starts each case and phase, so the hour-long run no longer looks hung in the job log.
|
|
68
|
+
- The hq-hook Windows release job now finds the built engine on runners that set `CARGO_TARGET_DIR`.
|
|
69
|
+
- Install `cargo-nextest` and `sccache` in Windows `hq-hook-pr` jobs via a checksum-verified Bash script so self-hosted Windows runners without `pwsh` succeed.
|
|
70
|
+
- Claude Code folder hooks in `hq-hook` now keep plain-text output separate from merged JSON (so plain text ending in a JSON-looking line no longer drops SessionStart or UserPromptSubmit context), fail closed on UserPromptSubmit when a hook process cannot be spawned at all while still warning when a hook runs and exits 126/127, and run their unit and end-to-end tests on Windows as well as Unix.
|
|
71
|
+
- Document the native hook engine architecture, per-event master-hook switching, kill switches, and rollback flow in docs/hook-engine/architecture.md and docs/hook-registration.md.
|
|
72
|
+
- Claimed `master-hook:PreToolUse` natively on `agents-v2` (Unix) with differential parity against `hq-agents-v2` main (`81866ca`) and accepted `hq-core-staging 92f5020b` (`v16.0.52`) `core/scripts/hook-lib.sh` (`436493e3`) in `fleetLocalMergedWriteGuardHold` for `merged-write-guard-shadow` (item 878).
|
|
73
|
+
- On hq-agents-v2 bots running the Rust hook engine, the Indigo company PreToolUse hooks (the hq-core review gate, the Work Mesh overlap reminder and the landing-copy em dash check) are now evaluated natively when their files match a known revision, so their tool calls no longer go to the hook adapter under the bot's hook time limits. An edited or new company hook still runs as a shell script, as before.
|
|
74
|
+
- Run `agents-v2` company `SessionStart` hooks natively through `agents_v2_folder_hooks` inside the `#347` hook budget when they fit, handing back only when over budget.
|
|
75
|
+
- Give the `agents-v2` `on_session_start` hook call the default 5 s plus the time its company `SessionStart` hooks need, so a bot whose company hook has an 8 s limit runs the event natively; tool events keep 5 s.
|
|
76
|
+
- Register Antigravity hooks (`SessionStart`, `PreToolUse`, `PostToolUse`, `Stop`) through the native `hq-hook` engine in `~/.gemini/config/hooks.json` during `hq reindex`, and report Antigravity hook wiring and host-core status in `hq doctor`.
|
|
77
|
+
- feat(hq-hook): port fleet-local helper SessionStart and claim `fleet-local-adapter:SessionStart` (`US-050-B`) alongside `master-hook:SessionStart` (`US-049-B`) under `SessionStart@fleet-local` in `COVERS`
|
|
78
|
+
- Claimed `master-hook:PreToolUse` natively on `fleet-local` (Unix) with differential parity against the hq-fleet-local v0.4.33 adapter on hq-core v16.0.50 and v16.0.52, and accepted the v16.0.51 (`09f5a3e0`) and v16.0.52 (`cf1abd5c`) `core/scripts/lib/hook-adapter-core.sh` in the fleet-local PreToolUse registration hold.
|
|
79
|
+
- Claim `master-hook:SessionStart` on `fleet-local` (`SessionStart@fleet-local`, Unix) in `hq-hook` with `fleet-local-v0.4.33.sh` + `master-hook.sh` parity tests (US-049-B).
|
|
80
|
+
- Port Grok `PreToolUse` onto native `master-hook:PreToolUse` (`pre_tool_use_master.rs`, `core_next.rs`, `coverage.ts`, `expected-uncovered.txt`) with staging-main adapter pins and differential parity tests.
|
|
81
|
+
- hq-hook answers PreToolUse, SessionStart and Codex PostToolUse natively on hq-core v16.0.53-beta trees: it accepts the hqd hook shim from hq-core-staging #2024 and the Codex adapter v16.0.51 to v16.0.53 ship, instead of refusing every such event, and `hq reindex` switches those trees' PreToolUse and SessionStart to the native engine.
|
|
82
|
+
- Fix: recognize hq-core 16.0.52 `core/scripts/hook-lib.sh` (`436493e3`) in `block-agent-secrets-reveal` so strict mode answers natively instead of returning `port-declined`
|
|
83
|
+
- Disable `inject-codex-checkpoint-reprompt` via `HQ_DISABLED_HOOKS` during `scripts/host-canary-injector-parity.mjs` `shadowRoot` replay so Codex `SessionStart` injector parity compares only `inject-policy-on-trigger` without false diffs from `shadowRoot` paths.
|
|
84
|
+
- test(hq-hook): run `credential_entry::detached_binary_uses_the_explicit_registration_root` through `deterministic_host` (`RunClock::Deterministic`) on a detached copy of the test binary so `Host::Grok`'s 4000 ms `GetProcessTimes` budget does not race against Windows Defender scans of a freshly copied `.exe` under Beaker load (item 951)
|
|
85
|
+
- Fix Beaker Windows archive runner hanging until the 600s timeout (`exit 124`, `complete: false`) when a test binary exits cleanly while an orphaned descendant still holds inherited stdout/stderr handles, and stage `target/x86_64-pc-windows-msvc/tmp` for cross-host shards.
|
|
86
|
+
- Install `cargo-nextest` and `sccache` in Windows `hq-hook-pr` jobs via a checksum-verified Bash script so self-hosted Windows runners without `pwsh` succeed.
|
|
87
|
+
- feat(hq-hook): handle `Host::FleetLocal` `SessionStart` natively across the evaluator chain (matching adapter output assembly, skip rules, and library checks), background-mode bots included (non-empty `HQ_FLEET_HOME` with `HQ_FLEET_LOCAL_SESSION_START_BACKGROUND` unset or `1`): claimed registry hooks and `master-hook:SessionStart` run in the foreground instead of the adapter's detached run and 600 s cache (owner-approved difference `us050-c2-fleet-local-session-start-background-foreground`).
|
|
88
|
+
- Internal: make `fleet_merge_hold_parity` hermetic against host `/opt/homebrew/bin` and `/usr/local/bin` binaries when hiding `hq` or `timeout`
|
|
89
|
+
- Surface bounded refusal reasons on stderr and preserve emitted `SessionStart` context on `agents-v2` `on_session_start` in `host::fleet::encode`.
|
|
90
|
+
- Fixed: Restart once and record a counted info event when the installed `hq-cli` package version changes on disk during startup.
|
|
91
|
+
- Shorten >2s real-time test waits in `crates/hq-hook/tests/` (`dispatch`, `session_setup`, `redact_credential_output`, `recorder_early_exits`, `blocking_child_timeout`, `stop_check`) using injected short timeouts and channel synchronization without weakening assertions.
|
|
92
|
+
- Serialize throwaway `git` fixture setup on Windows, disable `core.fsync`, and retry transient `.git/objects/` `Permission denied` AV locks in `prompt_ports_up1.rs` tests.
|
|
93
|
+
- test(hq-hook): run `run_starts_no_interpreter::the_exception_admits_no_other_start` through `deterministic_host` (`RunClock::Deterministic`) so `SessionStart`'s 5 s wall-clock chain budget does not race against slow shared Windows CI hosts (item 968)
|
|
94
|
+
- Match the bash scope check for `date` command substitutions in `hq-hook`: keep literal characters in `date +FORMAT` instead of substituting `0`, treat unknown, backtick, and shadowed `date` forms (function, alias, `PATH`, `hash -p`) as unresolvable, and keep ordinary ISO and dotted timestamp formats allowed in `ssh`/`hq` messages and own-company paths.
|
|
95
|
+
- A machine now keeps one CLI install id when several `hq` commands run at once, so sync health shows one record per machine instead of a new one after each overlap.
|
|
96
|
+
- Fix the hook engine `stable` link staying on the previous engine after a CLI update when `hq` is started through a bin symlink (as on HQ desktop app installs), which left fleet-local events on the shell path and failed fleet profiles in `hq doctor`.
|
|
97
|
+
- Fix: keep Rust hook registrations in place and log loudly to `hook-engine.jsonl` when the host canary gate fails in strict mode (`~/.hq/hook-engine.strict` or `HQ_HOOK_ENGINE=strict`)
|
|
98
|
+
- Keep last-known hook port flags in strict mode when the local flag snapshot is stale, logging a `stale-snapshot` record to `~/.hq/logs/hook-engine.jsonl` and surfacing stale strict-mode snapshots in `hq doctor`.
|
|
99
|
+
- Record the 3 US-046 c9 bounded-parser refusals in `US-010/intended-differences.yaml` (`unbounded-search-unterminated-single-quote`, `unbounded-search-unterminated-substitution`, `unbounded-search-oversized-command`), wire quoted `test:` references for all 6 `block-hq-unbounded-search` ledger rows, drop their baseline exceptions, and add per-case tests for all 9 c9 cases.
|
|
100
|
+
- Pin `bash-arith-subst-guard-lib.sh` `e90d160f` (hq-core 16.0.48–16.0.52) for `enforce-vault-write-access` in `ports.rs` and `core-pins.json`, eliminating strict-miss `script-mismatch` blocks, and add regression tests for all 3 2026-11-19 rollback cases (`60:1959`, `61:942`, `61:968`).
|
|
101
|
+
- Match Bash 5.2 and Bash 5.3+ setlocale warning formatting in `hq-hook` `vault_write` by only appending the `: <strerror>` suffix when the `bash` binary on `PATH` is version 5.3 or newer.
|
|
102
|
+
- Serialize process-spawning tests in `run_starts_no_interpreter.rs` with a test mutex so `the_exception_admits_no_other_start` (1 s `hq --version` limit) never contends with `every_recorded_payload_runs_without_starting_an_interpreter` (54+ `hq-hook` spawns) on loaded Windows runners.
|
|
103
|
+
- Changed: the host canary record shipped with the CLI is refreshed for this release build.
|
|
104
|
+
- Updated missing-jq hook messages to recommend `hq doctor --fix-jq` first.
|
|
105
|
+
- The Rust hook engine's policy frontmatter check now also accepts the hq-cli-floor.sh revision from hq-core-staging #2150 (which adds an optional caller kind parameter while keeping script callers identical).
|
|
106
|
+
- Recognize current `hook-lib.sh` (`436493e3`), `session-id.sh` (`d6a04155`), and `mandatory-scope-authorizer.sh` (`36312275`, PowerShell port from #3993) revisions across `PreToolUse`, `SessionStart`, `UserPromptSubmit`, `Stop`, and `PreCompact` compatibility tables and native ports.
|
|
107
|
+
- Replace substring matching (`is_unknown_revision_reason`) in the native `Stop` unknown-revision path with a typed `stop::compat::CompatError::UnknownRevision` error variant matched directly in `StopCheck::answer_seen` (no behaviour change).
|
|
108
|
+
- `hq sync release-held` run for every scope now clears an upload hold recorded because the computer's identity history could not be proven, and says that it did.
|
|
109
|
+
- Fixed: skip retired `core/hooks/SessionStart/40-conduct-reap.sh` (removed in `hq-core-staging#1253`) in native hook dispatch and coverage checks like `Stop/70-work-mesh-done.sh`, and pin the matching `.claude/hooks/master-hook.sh` revision (`711fb6d2`).
|
|
110
|
+
- Fixed: `hq bot adopt` and `hq bot restore` bring a local company bot back onto this computer when HQ kept no settings for it, instead of calling it a cloud bot and refusing the command that `hq bot status` recommended.
|
|
111
|
+
- Added: `hq sync telemetry` shows sync health, recent errors and usage for a company, read from the HQ server. Company owners and admins can run it; `--json` prints the server response unchanged.
|
|
112
|
+
- Resolve `CARGO_TARGET_TMPDIR` at runtime in `hq-hook` integration tests so relocated test archives use the runner's temp folder.
|
|
113
|
+
- Repin `test/ci/old-path-coverage.test.ts` to the `hq-core-staging@df7fca97a4e8` (`v16.0.53-beta.3`) `hook-registry.json` fixture (`US-046` c5).
|
|
114
|
+
- Read Windows process creation time via `GetProcessTimes` so hook budget calculations use the process's actual start time instead of subtracting the 800 ms unknown-start allowance.
|
|
115
|
+
- Added Windows path handling regression tests for PreToolUse path rules.
|
|
116
|
+
- Append Git for Windows `usr\bin` to the end of `PATH` during `master-hook.sh` hand-off when `awk` is missing from inherited `PATH`, without changing other callers' `PATH`.
|
|
117
|
+
- Improved Windows path normalization and added Windows line-ending, quoting, and path handling test cases for PreToolUse rules.
|
|
118
|
+
|
|
5
119
|
## [5.345.263] — 2026-11-26
|
|
120
|
+
- Fixed: `hq capacity` no longer signs Claude accounts out. The collector used to refresh Claude OAuth tokens itself. Claude refresh tokens are single use, so that refresh raced Claude Code's own refresh, and the loser held a dead token that showed as "signed out: sign-in revoked". The collector now only reads the credential and never posts to the token endpoint or writes the Keychain item or credentials file. An account whose access token has expired shows "expired: refreshes the next time Claude Code is used with this account" until Claude Code renews it. Lanes already start on such an account, because Claude Code renews the token at startup. Grok sign-ins are unchanged.
|
|
121
|
+
|
|
6
122
|
- Fix false refusals in the credential guard's Windows shell-path check on Unix for `date +%H:%M:%S` / `+%Y-%m-%dT%H:%M:%S.000Z` format strings and `\t` escapes inside `awk` programs.
|
|
7
123
|
- fix(delegate): wait for a transiently contended coordination mutex during delegate lock release instead of leaving the lock file behind
|
|
8
124
|
- Use `exec sleep` in `dispatch.rs` timed-out hook test fixtures so parent `bash` cannot race to emit `"Terminated sleep ..."` job-reap notices on Windows stderr.
|
|
@@ -96,35 +96,9 @@ MODE="$(jq -r '.mode // empty' "$MANIFEST" | tr -d '\r')"
|
|
|
96
96
|
[ -n "$PROJECT" ] || die "manifest has no project.name"
|
|
97
97
|
[ -n "$PRINCIPAL" ] || die "manifest has no to.principal"
|
|
98
98
|
|
|
99
|
-
# File-ACL principals
|
|
100
|
-
#
|
|
101
|
-
# a deterministic per-agent delegation group keyed by the full UID digest:
|
|
102
|
-
# grp_dlg<first 32 SHA-256 hex characters>, containing exactly that agent.
|
|
103
|
-
agent_group_id() {
|
|
104
|
-
local principal="$1" digest
|
|
105
|
-
if command -v sha256sum >/dev/null 2>&1; then
|
|
106
|
-
digest="$(printf '%s' "$principal" | sha256sum)"
|
|
107
|
-
elif command -v shasum >/dev/null 2>&1; then
|
|
108
|
-
digest="$(printf '%s' "$principal" | shasum -a 256)"
|
|
109
|
-
else
|
|
110
|
-
die "sha256 utility is required for agent delegation groups"
|
|
111
|
-
fi
|
|
112
|
-
printf 'grp_dlg%.32s' "$digest"
|
|
113
|
-
}
|
|
114
|
-
|
|
99
|
+
# File-ACL principals accept an email, agt_<id>, grp_<id>, or @all directly
|
|
100
|
+
# (agt_<id> stores granteeType="person", granteeId=agt_<id>).
|
|
115
101
|
GRANT_PRINCIPAL="$PRINCIPAL"
|
|
116
|
-
case "$PRINCIPAL" in
|
|
117
|
-
agt_*)
|
|
118
|
-
TAIL="$(printf '%s' "$PRINCIPAL" | tail -c 9 | tr '[:upper:]' '[:lower:]')"
|
|
119
|
-
LEGACY_GROUP="grp_dlg-$TAIL"
|
|
120
|
-
NEXT_GROUP="$(agent_group_id "$PRINCIPAL")"
|
|
121
|
-
RECORDED_GROUP="$(jq -r '.grantPrincipal // empty' "$MANIFEST" | tr -d '\r')"
|
|
122
|
-
case "$RECORDED_GROUP" in
|
|
123
|
-
"$LEGACY_GROUP"|"$NEXT_GROUP") GRANT_PRINCIPAL="$RECORDED_GROUP" ;;
|
|
124
|
-
*) GRANT_PRINCIPAL="$NEXT_GROUP" ;;
|
|
125
|
-
esac
|
|
126
|
-
;;
|
|
127
|
-
esac
|
|
128
102
|
|
|
129
103
|
case "$STATUS" in
|
|
130
104
|
building|granted) ;;
|
|
@@ -178,7 +152,7 @@ case "$PRINCIPAL" in
|
|
|
178
152
|
prs_*) echo " 0. Person recipient: personUid $PRINCIPAL maps to $GRANT_PRINCIPAL; grants are shared to that email" ;;
|
|
179
153
|
esac
|
|
180
154
|
if [ "${PRINCIPAL#agt_}" != "$PRINCIPAL" ]; then
|
|
181
|
-
echo " 0. Agent recipient: grants
|
|
155
|
+
echo " 0. Agent recipient: grants are shared directly to $PRINCIPAL ($DISPLAY)"
|
|
182
156
|
fi
|
|
183
157
|
echo " 1. Push companies/$COMPANY/projects/$PROJECT/ to the vault (on-conflict keep); where the sync engine owns the vault, pin it in .hq/pins.json and wait for its upload after the grants instead"
|
|
184
158
|
jq -r '.vaultPrefixes[] | " 2. Grant \(.permission) on \(.prefix) — \(.reason // "")"' "$MANIFEST" | tr -d '\r'
|
|
@@ -258,30 +232,12 @@ fi
|
|
|
258
232
|
fi
|
|
259
233
|
done
|
|
260
234
|
|
|
261
|
-
# --- 1b. agent recipients: ensure the delegation group exists + contains them
|
|
262
|
-
|
|
263
|
-
if [ "${PRINCIPAL#agt_}" != "$PRINCIPAL" ]; then
|
|
264
|
-
# Group creation and add are idempotent-tolerated; confirm that the complete
|
|
265
|
-
# member list is exactly this agent before any file ACL is shared.
|
|
266
|
-
hq groups create "$GRANT_PRINCIPAL" --name "Delegation: $DISPLAY" --company "$COMPANY" \
|
|
267
|
-
|| echo "hq-delegate-grant: group create reported an error (may already exist) — continuing" >&2
|
|
268
|
-
hq groups add "$GRANT_PRINCIPAL" "$PRINCIPAL" --company "$COMPANY" \
|
|
269
|
-
|| echo "hq-delegate-grant: group add reported an error (may already be a member) — continuing" >&2
|
|
270
|
-
GROUP_MEMBERS="$(NO_COLOR=1 FORCE_COLOR=0 hq groups members "$GRANT_PRINCIPAL" --company "$COMPANY")" \
|
|
271
|
-
|| die "could not verify delegation group membership"
|
|
272
|
-
MEMBER_IDS="$(printf '%s\n' "$GROUP_MEMBERS" | awk '
|
|
273
|
-
{ gsub(/\033\[[0-9;]*m/, "", $0) }
|
|
274
|
-
/^PERSON_UID([[:space:]]|$)/ { collecting = 1; next }
|
|
275
|
-
collecting && NF { print $1 }
|
|
276
|
-
')"
|
|
277
|
-
[ "$MEMBER_IDS" = "$PRINCIPAL" ] || die "delegation group membership does not exactly match recipient"
|
|
278
|
-
fi
|
|
279
|
-
|
|
280
235
|
# --- 2+3. exact structured read-back; never infer identity from a new row ---
|
|
281
236
|
# Requires the structured CLI contracts. Unsupported/failed reads stop the flow.
|
|
282
237
|
EXPECTED_TYPE="" EXPECTED_ID="" EXPECTED_COMPANY=""
|
|
283
238
|
case "$GRANT_PRINCIPAL" in
|
|
284
239
|
grp_*) EXPECTED_TYPE=group; EXPECTED_ID="$GRANT_PRINCIPAL" ;;
|
|
240
|
+
agt_*) EXPECTED_TYPE=person; EXPECTED_ID="$GRANT_PRINCIPAL" ;;
|
|
285
241
|
@all) EXPECTED_TYPE=company-wide; EXPECTED_ID="" ;;
|
|
286
242
|
*)
|
|
287
243
|
RESOLVE_RC=0
|
|
@@ -63,19 +63,25 @@ PROJECT="$(jq -r '.project.name // empty' "$MANIFEST")"
|
|
|
63
63
|
[ -n "$COMPANY" ] || die "manifest has no company"
|
|
64
64
|
[ -n "$PRINCIPAL" ] || die "manifest has no to.principal"
|
|
65
65
|
|
|
66
|
-
# Secret-ACL principals
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
#
|
|
66
|
+
# Secret-ACL principals accept an email, agt_<id>, grp_<id>, out_<id>, or @all.
|
|
67
|
+
# Only a person uid (prs_...) must share through the mapped email recorded in
|
|
68
|
+
# .grantPrincipal by the grant step. For an agent recipient, a legacy grp_dlg*
|
|
69
|
+
# recorded in an older manifest is still honored; otherwise agt_<id> is shared
|
|
70
|
+
# directly.
|
|
71
71
|
SHARE_PRINCIPAL="$PRINCIPAL"
|
|
72
72
|
case "$PRINCIPAL" in
|
|
73
|
-
agt_
|
|
73
|
+
agt_*)
|
|
74
74
|
RECORDED="$(jq -r '.grantPrincipal // empty' "$MANIFEST" | tr -d '\r')"
|
|
75
|
-
case "$
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
case "$RECORDED" in
|
|
76
|
+
grp_dlg*) SHARE_PRINCIPAL="$RECORDED" ;;
|
|
77
|
+
*) SHARE_PRINCIPAL="$PRINCIPAL" ;;
|
|
78
|
+
esac
|
|
79
|
+
;;
|
|
80
|
+
prs_*)
|
|
81
|
+
RECORDED="$(jq -r '.grantPrincipal // empty' "$MANIFEST" | tr -d '\r')"
|
|
82
|
+
case "$RECORDED" in
|
|
83
|
+
?*@?*) SHARE_PRINCIPAL="$RECORDED" ;;
|
|
84
|
+
*) SHARE_PRINCIPAL="" ;;
|
|
79
85
|
esac
|
|
80
86
|
;;
|
|
81
87
|
esac
|
|
@@ -161,7 +161,15 @@ elif [ -n "$PRD_ABS" ] && [ -f "$PRD_ABS" ] && jq -e . "$PRD_ABS" >/dev/null 2>&
|
|
|
161
161
|
fi
|
|
162
162
|
|
|
163
163
|
GET_LINES="$(jq -r --arg co "$COMPANY" \
|
|
164
|
-
'def bashq: if test("
|
|
164
|
+
'def bashq: if test("\\A[A-Za-z0-9_./:@+-]+\\z") then . else @sh end; .vaultPrefixes[] | "hq files get \(.prefix | bashq) --company \($co | bashq)"' "$MANIFEST")"
|
|
165
|
+
|
|
166
|
+
EXACT_LINES="$(jq -r --arg co "$COMPANY" --arg proj "$PROJECT" --arg id "$DELEGATION_ID" \
|
|
167
|
+
'def bashq: if test("\\A[A-Za-z0-9_./:@+-]+\\z") then . else @sh end;
|
|
168
|
+
("projects/" + $proj + "/delegation/" + $id + "/") as $d
|
|
169
|
+
| (if $id == "" then [] else [$d + "BRIEF.md", $d + "manifest.json"] end) as $fixed
|
|
170
|
+
| (.publication.files | if type == "object" then keys else [] end
|
|
171
|
+
| map(ltrimstr("companies/" + $co + "/")) | map(select(. as $f | $fixed | index($f) | not)) | sort) as $published
|
|
172
|
+
| ($fixed + $published)[] | "hq files get \(bashq) --company \($co | bashq)"' "$MANIFEST")"
|
|
165
173
|
|
|
166
174
|
REPO_IS_NULL="$(jq -r 'if .repo == null then "yes" else "no" end' "$MANIFEST")"
|
|
167
175
|
REPO_SECTION=""
|
|
@@ -240,6 +248,14 @@ trap 'rm -rf "$STAGE"; [ "$SEND" -eq 0 ] || rmdir "$LOCK"' EXIT
|
|
|
240
248
|
printf '%s\n' "$GET_LINES"
|
|
241
249
|
echo '```'
|
|
242
250
|
echo
|
|
251
|
+
if [ -n "$EXACT_LINES" ]; then
|
|
252
|
+
echo "The delegation brief, manifest and dossier files are at these exact vault paths. Fetch them directly; do not search the vault for them (\`hq files search\` lists the whole company vault and can take minutes):"
|
|
253
|
+
echo
|
|
254
|
+
echo '```bash'
|
|
255
|
+
printf '%s\n' "$EXACT_LINES"
|
|
256
|
+
echo '```'
|
|
257
|
+
echo
|
|
258
|
+
fi
|
|
243
259
|
echo "$DOSSIER_LINE"
|
|
244
260
|
echo
|
|
245
261
|
if [ -n "$REPO_SECTION" ]; then
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "hq.host-canary-release.v1",
|
|
3
|
-
"cliVersion": "5.345.
|
|
3
|
+
"cliVersion": "5.345.267",
|
|
4
4
|
"hosts": {
|
|
5
5
|
"claude": [
|
|
6
6
|
{
|
|
7
7
|
"passed": true,
|
|
8
|
-
"at": "2026-11-
|
|
9
|
-
"engineVersion": "0.3.1+hq.5.345.
|
|
8
|
+
"at": "2026-11-29T01:51:00.420Z",
|
|
9
|
+
"engineVersion": "0.3.1+hq.5.345.267.src.c375d0eb695aa9f21ff586e2e2ba338378e314b5403cca2f42a102a095ba2e48",
|
|
10
10
|
"gateSha256": "a2879dfe692233f5953bac86672947bbd82f3c5247292f3efcb80f16c3d2c6b1"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"passed": true,
|
|
14
|
-
"at": "2026-11-
|
|
15
|
-
"engineVersion": "0.3.1+hq.5.345.
|
|
14
|
+
"at": "2026-11-29T01:51:20.915Z",
|
|
15
|
+
"engineVersion": "0.3.1+hq.5.345.267.src.c375d0eb695aa9f21ff586e2e2ba338378e314b5403cca2f42a102a095ba2e48",
|
|
16
16
|
"gateSha256": "ca58a94859eae0a345c11c8d9c59303eb76350dc1cf223391037d21979c28718"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"passed": true,
|
|
20
|
-
"at": "2026-11-
|
|
21
|
-
"engineVersion": "0.3.1+hq.5.345.
|
|
20
|
+
"at": "2026-11-29T01:52:01.744Z",
|
|
21
|
+
"engineVersion": "0.3.1+hq.5.345.267.src.c375d0eb695aa9f21ff586e2e2ba338378e314b5403cca2f42a102a095ba2e48",
|
|
22
22
|
"gateSha256": "ecdbab7c2e0a1d94eb9c98f15e760390f215bc7115a217ded24b4275322722d2"
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -1260,6 +1260,43 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
1260
1260
|
readonly hidden: false;
|
|
1261
1261
|
}];
|
|
1262
1262
|
readonly subcommands: readonly [];
|
|
1263
|
+
}, {
|
|
1264
|
+
readonly name: "telemetry";
|
|
1265
|
+
readonly description: "Show sync health, errors and usage for a company, read from the HQ server";
|
|
1266
|
+
readonly aliases: readonly [];
|
|
1267
|
+
readonly hidden: false;
|
|
1268
|
+
readonly helpOption: true;
|
|
1269
|
+
readonly helpCommand: false;
|
|
1270
|
+
readonly usage: "[options]";
|
|
1271
|
+
readonly helpText: readonly [{
|
|
1272
|
+
readonly position: "after";
|
|
1273
|
+
readonly text: "\nReads sync health for a company from the HQ server. It changes nothing on this\ncomputer or on the server, and it does not start or stop a sync.\n\nYou must be signed in as a person (hq login) who is an owner or admin of the\ncompany. Agent and machine sign-ins are refused by the server.\n\nViews:\n summary overall health, held files and safety counters\n machines one line per machine, failing machines first\n errors recent sync errors with their codes\n people billed sync use per person\n folders uploads and downloads per folder\n loops paths rewritten on a fixed interval\n ranking companies ranked by sync use (Indigo staff; takes no --company)\n\nA view or section the server does not record yet prints \"not recorded yet\".\n\nExit codes:\n 0 report printed\n 2 bad arguments\n 3 not signed in\n 4 refused by the server\n 5 rate limited\n 6 server or network failure\n\nExamples:\n hq sync telemetry --company acme\n hq sync telemetry --company acme --view machines --window 7d\n hq sync telemetry --company acme --view errors --machine <installId>\n hq sync telemetry --company acme --json\n";
|
|
1274
|
+
}];
|
|
1275
|
+
readonly arguments: readonly [];
|
|
1276
|
+
readonly options: readonly [{
|
|
1277
|
+
readonly flags: "--company <company>";
|
|
1278
|
+
readonly description: "Company slug or cmp_ uid (defaults to the active company, else your only company)";
|
|
1279
|
+
readonly hidden: false;
|
|
1280
|
+
}, {
|
|
1281
|
+
readonly flags: "--view <view>";
|
|
1282
|
+
readonly description: "What to show: summary, machines, errors, people, folders, loops, ranking";
|
|
1283
|
+
readonly hidden: false;
|
|
1284
|
+
readonly defaultValue: "summary";
|
|
1285
|
+
}, {
|
|
1286
|
+
readonly flags: "--window <window>";
|
|
1287
|
+
readonly description: "Time window: 1h, 24h, 7d, 30d";
|
|
1288
|
+
readonly hidden: false;
|
|
1289
|
+
readonly defaultValue: "24h";
|
|
1290
|
+
}, {
|
|
1291
|
+
readonly flags: "--machine <installId>";
|
|
1292
|
+
readonly description: "Limit the report to one machine by its install id";
|
|
1293
|
+
readonly hidden: false;
|
|
1294
|
+
}, {
|
|
1295
|
+
readonly flags: "--json";
|
|
1296
|
+
readonly description: "Print the server response as JSON; failures print one JSON object";
|
|
1297
|
+
readonly hidden: false;
|
|
1298
|
+
}];
|
|
1299
|
+
readonly subcommands: readonly [];
|
|
1263
1300
|
}];
|
|
1264
1301
|
}, {
|
|
1265
1302
|
readonly name: "cloud";
|
|
@@ -3431,7 +3468,7 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
3431
3468
|
readonly subcommands: readonly [];
|
|
3432
3469
|
}, {
|
|
3433
3470
|
readonly name: "search";
|
|
3434
|
-
readonly description: "Search vault object keys (case-insensitive path/name match) under a company without downloading. Requires --company (or --personal). Content search is not supported in v1.";
|
|
3471
|
+
readonly description: "Search vault object keys (case-insensitive path/name match) under a company without downloading. Requires --company (or --personal). When you run it with your own HQ login, prints matches from your synced local copy first (labelled), then lists the vault, which pages through every object under the company (or --prefix) and can take minutes on large vaults. Content search is not supported in v1.";
|
|
3435
3472
|
readonly aliases: readonly [];
|
|
3436
3473
|
readonly hidden: false;
|
|
3437
3474
|
readonly helpOption: true;
|
|
@@ -3452,6 +3489,35 @@ export declare const COMMAND_CATALOG: readonly [{
|
|
|
3452
3489
|
readonly flags: "--personal";
|
|
3453
3490
|
readonly description: "Search the caller's canonical personal vault. Mutually exclusive with --company.";
|
|
3454
3491
|
readonly hidden: false;
|
|
3492
|
+
}, {
|
|
3493
|
+
readonly flags: "--prefix <path>";
|
|
3494
|
+
readonly description: "Only list the vault under this folder inside companies/<slug>/ (e.g. knowledge/ or companies/<slug>/knowledge/).";
|
|
3495
|
+
readonly hidden: false;
|
|
3496
|
+
}, {
|
|
3497
|
+
readonly flags: "--local-only";
|
|
3498
|
+
readonly description: "Search only your synced local copy under <hq-root>/companies/<slug>/; skip the vault listing. Needs your own HQ login.";
|
|
3499
|
+
readonly hidden: false;
|
|
3500
|
+
}, {
|
|
3501
|
+
readonly flags: "--no-local";
|
|
3502
|
+
readonly description: "Skip the synced local copy; list the vault only.";
|
|
3503
|
+
readonly hidden: false;
|
|
3504
|
+
}, {
|
|
3505
|
+
readonly flags: "--quiet";
|
|
3506
|
+
readonly description: "Do not print the slow-listing note to stderr when stderr is not a terminal.";
|
|
3507
|
+
readonly hidden: false;
|
|
3508
|
+
}, {
|
|
3509
|
+
readonly flags: "--acl";
|
|
3510
|
+
readonly description: "Add the ACL column (fetches your explicit grants, like hq files browse).";
|
|
3511
|
+
readonly hidden: false;
|
|
3512
|
+
}, {
|
|
3513
|
+
readonly flags: "--progress";
|
|
3514
|
+
readonly description: "Print paging progress to stderr even when stderr is not a terminal.";
|
|
3515
|
+
readonly hidden: false;
|
|
3516
|
+
}, {
|
|
3517
|
+
readonly flags: "--hq-root <path>";
|
|
3518
|
+
readonly description: "Local HQ tree root (default: <runtime-path>)";
|
|
3519
|
+
readonly hidden: false;
|
|
3520
|
+
readonly defaultValue: "<runtime-path>";
|
|
3455
3521
|
}];
|
|
3456
3522
|
readonly subcommands: readonly [];
|
|
3457
3523
|
}, {
|
|
@@ -1515,6 +1515,52 @@ export const COMMAND_CATALOG = [
|
|
|
1515
1515
|
}
|
|
1516
1516
|
],
|
|
1517
1517
|
"subcommands": []
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"name": "telemetry",
|
|
1521
|
+
"description": "Show sync health, errors and usage for a company, read from the HQ server",
|
|
1522
|
+
"aliases": [],
|
|
1523
|
+
"hidden": false,
|
|
1524
|
+
"helpOption": true,
|
|
1525
|
+
"helpCommand": false,
|
|
1526
|
+
"usage": "[options]",
|
|
1527
|
+
"helpText": [
|
|
1528
|
+
{
|
|
1529
|
+
"position": "after",
|
|
1530
|
+
"text": "\nReads sync health for a company from the HQ server. It changes nothing on this\ncomputer or on the server, and it does not start or stop a sync.\n\nYou must be signed in as a person (hq login) who is an owner or admin of the\ncompany. Agent and machine sign-ins are refused by the server.\n\nViews:\n summary overall health, held files and safety counters\n machines one line per machine, failing machines first\n errors recent sync errors with their codes\n people billed sync use per person\n folders uploads and downloads per folder\n loops paths rewritten on a fixed interval\n ranking companies ranked by sync use (Indigo staff; takes no --company)\n\nA view or section the server does not record yet prints \"not recorded yet\".\n\nExit codes:\n 0 report printed\n 2 bad arguments\n 3 not signed in\n 4 refused by the server\n 5 rate limited\n 6 server or network failure\n\nExamples:\n hq sync telemetry --company acme\n hq sync telemetry --company acme --view machines --window 7d\n hq sync telemetry --company acme --view errors --machine <installId>\n hq sync telemetry --company acme --json\n"
|
|
1531
|
+
}
|
|
1532
|
+
],
|
|
1533
|
+
"arguments": [],
|
|
1534
|
+
"options": [
|
|
1535
|
+
{
|
|
1536
|
+
"flags": "--company <company>",
|
|
1537
|
+
"description": "Company slug or cmp_ uid (defaults to the active company, else your only company)",
|
|
1538
|
+
"hidden": false
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"flags": "--view <view>",
|
|
1542
|
+
"description": "What to show: summary, machines, errors, people, folders, loops, ranking",
|
|
1543
|
+
"hidden": false,
|
|
1544
|
+
"defaultValue": "summary"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"flags": "--window <window>",
|
|
1548
|
+
"description": "Time window: 1h, 24h, 7d, 30d",
|
|
1549
|
+
"hidden": false,
|
|
1550
|
+
"defaultValue": "24h"
|
|
1551
|
+
},
|
|
1552
|
+
{
|
|
1553
|
+
"flags": "--machine <installId>",
|
|
1554
|
+
"description": "Limit the report to one machine by its install id",
|
|
1555
|
+
"hidden": false
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"flags": "--json",
|
|
1559
|
+
"description": "Print the server response as JSON; failures print one JSON object",
|
|
1560
|
+
"hidden": false
|
|
1561
|
+
}
|
|
1562
|
+
],
|
|
1563
|
+
"subcommands": []
|
|
1518
1564
|
}
|
|
1519
1565
|
]
|
|
1520
1566
|
},
|
|
@@ -4142,7 +4188,7 @@ export const COMMAND_CATALOG = [
|
|
|
4142
4188
|
},
|
|
4143
4189
|
{
|
|
4144
4190
|
"name": "search",
|
|
4145
|
-
"description": "Search vault object keys (case-insensitive path/name match) under a company without downloading. Requires --company (or --personal). Content search is not supported in v1.",
|
|
4191
|
+
"description": "Search vault object keys (case-insensitive path/name match) under a company without downloading. Requires --company (or --personal). When you run it with your own HQ login, prints matches from your synced local copy first (labelled), then lists the vault, which pages through every object under the company (or --prefix) and can take minutes on large vaults. Content search is not supported in v1.",
|
|
4146
4192
|
"aliases": [],
|
|
4147
4193
|
"hidden": false,
|
|
4148
4194
|
"helpOption": true,
|
|
@@ -4167,6 +4213,42 @@ export const COMMAND_CATALOG = [
|
|
|
4167
4213
|
"flags": "--personal",
|
|
4168
4214
|
"description": "Search the caller's canonical personal vault. Mutually exclusive with --company.",
|
|
4169
4215
|
"hidden": false
|
|
4216
|
+
},
|
|
4217
|
+
{
|
|
4218
|
+
"flags": "--prefix <path>",
|
|
4219
|
+
"description": "Only list the vault under this folder inside companies/<slug>/ (e.g. knowledge/ or companies/<slug>/knowledge/).",
|
|
4220
|
+
"hidden": false
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
"flags": "--local-only",
|
|
4224
|
+
"description": "Search only your synced local copy under <hq-root>/companies/<slug>/; skip the vault listing. Needs your own HQ login.",
|
|
4225
|
+
"hidden": false
|
|
4226
|
+
},
|
|
4227
|
+
{
|
|
4228
|
+
"flags": "--no-local",
|
|
4229
|
+
"description": "Skip the synced local copy; list the vault only.",
|
|
4230
|
+
"hidden": false
|
|
4231
|
+
},
|
|
4232
|
+
{
|
|
4233
|
+
"flags": "--quiet",
|
|
4234
|
+
"description": "Do not print the slow-listing note to stderr when stderr is not a terminal.",
|
|
4235
|
+
"hidden": false
|
|
4236
|
+
},
|
|
4237
|
+
{
|
|
4238
|
+
"flags": "--acl",
|
|
4239
|
+
"description": "Add the ACL column (fetches your explicit grants, like hq files browse).",
|
|
4240
|
+
"hidden": false
|
|
4241
|
+
},
|
|
4242
|
+
{
|
|
4243
|
+
"flags": "--progress",
|
|
4244
|
+
"description": "Print paging progress to stderr even when stderr is not a terminal.",
|
|
4245
|
+
"hidden": false
|
|
4246
|
+
},
|
|
4247
|
+
{
|
|
4248
|
+
"flags": "--hq-root <path>",
|
|
4249
|
+
"description": "Local HQ tree root (default: <runtime-path>)",
|
|
4250
|
+
"hidden": false,
|
|
4251
|
+
"defaultValue": "<runtime-path>"
|
|
4170
4252
|
}
|
|
4171
4253
|
],
|
|
4172
4254
|
"subcommands": []
|
|
@@ -141,6 +141,12 @@ export declare const REGISTRATION_PLAN: readonly [{
|
|
|
141
141
|
readonly parent: "sync";
|
|
142
142
|
readonly module: "./commands/sync-held.js";
|
|
143
143
|
readonly exportName: "registerSyncHeldCommands";
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "registrar";
|
|
146
|
+
readonly root: "sync";
|
|
147
|
+
readonly parent: "sync";
|
|
148
|
+
readonly module: "./commands/sync-telemetry.js";
|
|
149
|
+
readonly exportName: "registerSyncTelemetryCommand";
|
|
144
150
|
}, {
|
|
145
151
|
readonly type: "group";
|
|
146
152
|
readonly root: "cloud";
|
|
@@ -26,6 +26,7 @@ export const REGISTRATION_PLAN = [
|
|
|
26
26
|
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-narrow.js", exportName: "registerSyncNarrowCommand" },
|
|
27
27
|
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-manifest.js", exportName: "registerSyncManifestCommand" },
|
|
28
28
|
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-held.js", exportName: "registerSyncHeldCommands" },
|
|
29
|
+
{ type: "registrar", root: "sync", parent: "sync", module: "./commands/sync-telemetry.js", exportName: "registerSyncTelemetryCommand" },
|
|
29
30
|
{ type: "group", root: "cloud", id: "cloud", name: "cloud", description: "Cloud commands — provision entities and manage cloud-backed companies" },
|
|
30
31
|
{ type: "registrar", root: "cloud", parent: "cloud", module: "./commands/cloud-provision.js", exportName: "registerCloudProvisionCommands" },
|
|
31
32
|
{ type: "registrar", root: "cloud", parent: "cloud", module: "./commands/cloud-retire.js", exportName: "registerCloudRetireCommands" },
|
package/dist/commands/bot.d.ts
CHANGED
|
@@ -569,6 +569,8 @@ export declare function configFromLocalConfig(input: {
|
|
|
569
569
|
hqRoot: string;
|
|
570
570
|
dir: string;
|
|
571
571
|
local: BotLocalConfig | null;
|
|
572
|
+
/** Cloud record kind. Used when saved settings omit `kind`. */
|
|
573
|
+
botKind?: "personal" | "company";
|
|
572
574
|
overrides?: BotAdoptOverrides;
|
|
573
575
|
preserveFirstStart?: boolean;
|
|
574
576
|
now?: () => Date;
|
package/dist/commands/bot.js
CHANGED
|
@@ -90,7 +90,7 @@ import { clearPendingSwitch, recoverPendingSwitchSafely, writePendingSwitch } fr
|
|
|
90
90
|
import { classifyRuntimeFailure, isRuntimeUsageLimit, runtimeFailureReason, usageLimitResetsAt } from "../lib/bot/runtime-failure.js";
|
|
91
91
|
import { PROBE_DEFAULT_TIMEOUT_MS, probeBotRuntime } from "../lib/bot/probe.js";
|
|
92
92
|
import { BOT_LOGIN_RUNTIMES, botAuthEnv, botRuntimeAuth, capacityAccountHome, defaultSpawnBrowserSignIn, describeBotAuth, formatBotAuth, isBotLoginRuntime, restoreBotSessions, setAsideBotSessions, discardHeldBotLogin, holdPreviousBotLogin, restoreHeldBotLogin, signInBotRuntime, signOutBotRuntime, withRuntimeAuth, } from "../lib/bot/runtime-auth.js";
|
|
93
|
-
import { BotApi, BotApiError, BOT_RESTORE_DEFAULTS, buildBotLocalConfig, describeBotLocalConfig, orphanBotRunMessage, parseBotLocalConfig, removeOrphanBotDaemon, botDaemonStatus, botDir, botCredsPath, botLogPath, botsRoot, botTokenStateDir, botWorkerRelDir, buildBotDaemonPaths, createBotLogger, deleteBotCreds, installBotDaemon, repairBotDaemonIfStale, healBotDaemonNodeFromJob, introDmText, isBotMemoryMode, botLocalMemoryDir, botMemoryMode, resolveBotMemoryDir, validateBotIntro, validateBotDisplayName, validateBotKickoff, validateBotEffort, validateBotModel, effectiveBotEffort, BOT_EFFORT_LEVELS, DEFAULT_BOT_EFFORT, BOT_MEMORY_MODES, BOT_KINDS, isBotKind, effectiveBotKind, effectiveBotCompanies, botCompanySlug, normalizeBotCompanies, SETUP_BOT_WORKER_ID, isBotRuntimeId, botRuntimeFromBrainName, localNameForRemoteBot, remoteBotRunnability, isPidAlive, listBotWorkerOptions, patchBotConfig, readBotConfig, readBotCredsIdentity, readBotStatus, patchBotStatus, runtimeCrashSinceStart, resolveBotWorker, runBot, runtimeFor, scaffoldBotMemory, scaffoldBotWorker, startBotDaemon, stopBotDaemon, uninstallBotDaemon, validateBotName, writeBotConfig, writeBotCreds, BOT_RUNTIMES, BOT_INTRO_MAX_CHARS, BOT_DISPLAY_NAME_MAX_CHARS, BOT_KICKOFF_MAX_CHARS, detectBotPlatform, withBotLock, localBotRole, remoteBotRole, remoteBotDisplayName, personFacingName, writeCloudDisplayName, setupSlugFor, ASSISTANT_ROLE, HQ_FLEET_RUNTIME_ENGINE_ID, HQ_FLEET_LOCAL_RELEASE, authenticateFleetLocalBot, bootstrapFleetLocalBot, buildSystemPrompt, controlFleetBot as controlFleetLocalBot, ensureFleetBotDaemon, FleetDaemonStoppedError, fleetBotUnitId, fleetBotsManagedByDaemon, fleetLocalGatewayPid, fleetLocalProfileNeedsAdoption, fleetLocalServiceInstalled, fleetProviderForRuntime, importFleetLocalMachineCredential, importFleetLocalProviderLogin, fleetAuthUsesXaiOauthLogin, xaiOauthLoginHeldBack, xaiOauthLoginRefusal, fleetProviderNeedsSignIn, fleetOwnerCompanies, refreshFleetLocalInstructions, fleetLocalPromotionRuntime, installPinnedFleetLocalDistribution, installTargetFleetLocalDistribution, resolveFleetLocalPointerTarget, resolveFleetLocalTargetRelease, fleetLocalProfileDir, fleetProfileOwnerCompanies, fleetLocalChannels, readFleetLocalGatewayState, readFleetLocalIntroSentAt, readFleetLocalSignInNeeded, readPromptSources, removeFleetLocalBot, } from "../lib/bot/index.js";
|
|
93
|
+
import { BotApi, BotApiError, BOT_RESTORE_DEFAULTS, buildBotLocalConfig, describeBotLocalConfig, orphanBotRunMessage, parseBotLocalConfig, removeOrphanBotDaemon, botDaemonStatus, botDir, botCredsPath, botLogPath, botsRoot, botTokenStateDir, botWorkerRelDir, buildBotDaemonPaths, createBotLogger, deleteBotCreds, installBotDaemon, repairBotDaemonIfStale, healBotDaemonNodeFromJob, introDmText, isBotMemoryMode, botLocalMemoryDir, botMemoryMode, resolveBotMemoryDir, validateBotIntro, validateBotDisplayName, validateBotKickoff, validateBotEffort, validateBotModel, effectiveBotEffort, BOT_EFFORT_LEVELS, DEFAULT_BOT_EFFORT, BOT_MEMORY_MODES, BOT_KINDS, isBotKind, effectiveBotKind, effectiveBotCompanies, botCompanySlug, normalizeBotCompanies, SETUP_BOT_WORKER_ID, isBotRuntimeId, botRuntimeFromBrainName, localNameForRemoteBot, remoteBotRunnability, restoreKindForRecord, isPidAlive, listBotWorkerOptions, patchBotConfig, readBotConfig, readBotCredsIdentity, readBotStatus, patchBotStatus, runtimeCrashSinceStart, resolveBotWorker, runBot, runtimeFor, scaffoldBotMemory, scaffoldBotWorker, startBotDaemon, stopBotDaemon, uninstallBotDaemon, validateBotName, writeBotConfig, writeBotCreds, BOT_RUNTIMES, BOT_INTRO_MAX_CHARS, BOT_DISPLAY_NAME_MAX_CHARS, BOT_KICKOFF_MAX_CHARS, detectBotPlatform, withBotLock, localBotRole, remoteBotRole, remoteBotDisplayName, personFacingName, writeCloudDisplayName, setupSlugFor, ASSISTANT_ROLE, HQ_FLEET_RUNTIME_ENGINE_ID, HQ_FLEET_LOCAL_RELEASE, authenticateFleetLocalBot, bootstrapFleetLocalBot, buildSystemPrompt, controlFleetBot as controlFleetLocalBot, ensureFleetBotDaemon, FleetDaemonStoppedError, fleetBotUnitId, fleetBotsManagedByDaemon, fleetLocalGatewayPid, fleetLocalProfileNeedsAdoption, fleetLocalServiceInstalled, fleetProviderForRuntime, importFleetLocalMachineCredential, importFleetLocalProviderLogin, fleetAuthUsesXaiOauthLogin, xaiOauthLoginHeldBack, xaiOauthLoginRefusal, fleetProviderNeedsSignIn, fleetOwnerCompanies, refreshFleetLocalInstructions, fleetLocalPromotionRuntime, installPinnedFleetLocalDistribution, installTargetFleetLocalDistribution, resolveFleetLocalPointerTarget, resolveFleetLocalTargetRelease, fleetLocalProfileDir, fleetProfileOwnerCompanies, fleetLocalChannels, readFleetLocalGatewayState, readFleetLocalIntroSentAt, readFleetLocalSignInNeeded, readPromptSources, removeFleetLocalBot, } from "../lib/bot/index.js";
|
|
94
94
|
import { gatedInteractiveLogin } from "../utils/interactive-caller.js";
|
|
95
95
|
import { brainSignInStatus, fleetInstallProgressReporter, fleetRuntimeStatus, runBotAuthStatus, runBotRuntimeInstall, runBotRuntimeStatus, runBotSignIn } from "./bot-runtime.js";
|
|
96
96
|
import { ensureFleetRuntimeInstalled } from "../lib/bot/fleet-local.js";
|
|
@@ -3820,7 +3820,7 @@ export function configFromLocalConfig(input) {
|
|
|
3820
3820
|
notes.push(`${name} was created before HQ kept a bot's settings in the cloud, so it comes back on defaults (${describeBotLocalConfig(null)}). Change them with: hq bot set ${name} --model <id> --effort <level>`);
|
|
3821
3821
|
}
|
|
3822
3822
|
const runtime = input.overrides?.runtime ?? local?.runtime ?? BOT_RESTORE_DEFAULTS.runtime;
|
|
3823
|
-
const kind =
|
|
3823
|
+
const kind = restoreKindForRecord({ botKind: input.botKind, localConfig: local });
|
|
3824
3824
|
const memory = local?.memory ?? BOT_RESTORE_DEFAULTS.memory;
|
|
3825
3825
|
const model = input.overrides?.model ?? local?.model;
|
|
3826
3826
|
let effort = local?.effort;
|
|
@@ -3930,6 +3930,7 @@ async function adoptRemoteBotLocked(input) {
|
|
|
3930
3930
|
hqRoot: input.hqRoot,
|
|
3931
3931
|
dir,
|
|
3932
3932
|
local,
|
|
3933
|
+
botKind: bot.botKind,
|
|
3933
3934
|
...(input.overrides ? { overrides: input.overrides } : {}),
|
|
3934
3935
|
...(input.preserveFirstStart ? { preserveFirstStart: true } : {}),
|
|
3935
3936
|
});
|
|
@@ -4218,7 +4219,7 @@ function notRunnableHint(reason) {
|
|
|
4218
4219
|
if (reason === "cloud-compute")
|
|
4219
4220
|
return "runs in the cloud, not on a computer";
|
|
4220
4221
|
if (reason === "company-bot")
|
|
4221
|
-
return "a company bot
|
|
4222
|
+
return "a company bot whose saved settings would run it as personal";
|
|
4222
4223
|
return "not a bot this computer can run";
|
|
4223
4224
|
}
|
|
4224
4225
|
/** `hq bot list --remote` — the local bots this account owns, wherever they live. */
|