@indigoai-us/hq-cli 5.345.152 → 5.345.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/dist/bin/hq-auth-refresh.d.ts +4 -0
  3. package/dist/bin/hq-auth-refresh.js +9 -1
  4. package/dist/command-catalog.generated.d.ts +185 -0
  5. package/dist/command-catalog.generated.js +227 -0
  6. package/dist/command-registration-plan.d.ts +6 -0
  7. package/dist/command-registration-plan.js +1 -0
  8. package/dist/commands/agent-enroll.d.ts +12 -0
  9. package/dist/commands/agent-enroll.js +37 -4
  10. package/dist/commands/cloud.d.ts +17 -0
  11. package/dist/commands/cloud.js +48 -1
  12. package/dist/commands/core-policy.js +4 -4
  13. package/dist/commands/core-session-project-native.js +19 -4
  14. package/dist/commands/decide.d.ts +13 -0
  15. package/dist/commands/decide.js +74 -0
  16. package/dist/commands/integrations-connect.js +24 -1
  17. package/dist/commands/integrations-core.d.ts +14 -0
  18. package/dist/commands/integrations-core.js +19 -1
  19. package/dist/commands/integrations-import.js +22 -1
  20. package/dist/commands/integrations.js +43 -2
  21. package/dist/commands/lanes-message.js +4 -11
  22. package/dist/commands/lanes-questions.js +3 -0
  23. package/dist/commands/lanes-resume.js +4 -11
  24. package/dist/commands/lanes-stories.js +3 -0
  25. package/dist/commands/lanes.js +7 -1
  26. package/dist/commands/run.js +14 -5
  27. package/dist/lib/agent-kit/adopt-identity.d.ts +7 -1
  28. package/dist/lib/agent-kit/adopt-identity.js +18 -3
  29. package/dist/lib/agent-kit/services.d.ts +3 -1
  30. package/dist/lib/agent-kit/services.js +5 -1
  31. package/dist/lib/daemon/ops/policy.d.ts +9 -1
  32. package/dist/lib/daemon/ops/policy.js +37 -2
  33. package/dist/lib/decisions/client.d.ts +67 -0
  34. package/dist/lib/decisions/client.js +120 -0
  35. package/dist/lib/decisions/expiry.d.ts +2 -0
  36. package/dist/lib/decisions/expiry.js +12 -0
  37. package/dist/lib/decisions/fixtures/us001.d.ts +137 -0
  38. package/dist/lib/decisions/fixtures/us001.js +21 -0
  39. package/dist/lib/decisions/import-lanes.d.ts +16 -0
  40. package/dist/lib/decisions/import-lanes.js +152 -0
  41. package/dist/lib/decisions/principal.d.ts +11 -0
  42. package/dist/lib/decisions/principal.js +52 -0
  43. package/dist/lib/doctor/checks/claude-wiring.d.ts +2 -2
  44. package/dist/lib/doctor/checks/claude-wiring.js +21 -10
  45. package/dist/lib/doctor/checks/work-context.js +7 -2
  46. package/dist/lib/doctor/fix/apply.d.ts +3 -2
  47. package/dist/lib/doctor/fix/apply.js +19 -15
  48. package/dist/lib/doctor/fix/refresh-sync-progress.d.ts +14 -0
  49. package/dist/lib/doctor/fix/refresh-sync-progress.js +30 -2
  50. package/dist/lib/doctor/fix/remediation.js +4 -2
  51. package/dist/lib/doctor/hook-gate-profiles.d.ts +19 -0
  52. package/dist/lib/doctor/hook-gate-profiles.js +34 -0
  53. package/dist/lib/doctor/types.d.ts +5 -0
  54. package/dist/lib/install/provider-wrappers.js +5 -1
  55. package/dist/lib/lanes/autopilot.js +4 -1
  56. package/dist/lib/lanes/imported-question.d.ts +5 -0
  57. package/dist/lib/lanes/imported-question.js +17 -0
  58. package/dist/lib/lanes/questions.d.ts +0 -5
  59. package/dist/lib/lanes/questions.js +2 -0
  60. package/dist/lib/lanes/reconcile.js +21 -10
  61. package/dist/lib/lanes/store.d.ts +0 -8
  62. package/dist/lib/lanes/store.js +2 -1
  63. package/dist/lib/lanes/stories.d.ts +15 -0
  64. package/dist/lib/lanes/stories.js +25 -0
  65. package/dist/lib/mesh/client.d.ts +8 -0
  66. package/dist/lib/mesh/client.js +44 -3
  67. package/dist/lib/mesh/denial-codes.js +1 -1
  68. package/dist/lib/mesh/live/daemon/run.d.ts +9 -1
  69. package/dist/lib/mesh/live/daemon/run.js +30 -1
  70. package/dist/lib/mesh/live/flush.d.ts +7 -0
  71. package/dist/lib/mesh/live/flush.js +53 -10
  72. package/dist/lib/registry/registry.js +6 -0
  73. package/dist/lib/scan-packages/index.js +7 -3
  74. package/dist/lib/sync/read-only-local-only.d.ts +45 -0
  75. package/dist/lib/sync/read-only-local-only.js +122 -0
  76. package/dist/lib/work-context/organize.d.ts +2 -0
  77. package/dist/lib/work-context/organize.js +22 -4
  78. package/dist/lib/workers-registry/index.d.ts +12 -1
  79. package/dist/lib/workers-registry/index.js +39 -1
  80. package/dist/utils/cognito-session.d.ts +4 -1
  81. package/dist/utils/cognito-session.js +11 -1
  82. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -2,6 +2,102 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.154] — 2026-10-21
6
+ - `hq sync status` now lists local files that sit under a vault prefix you can
7
+ only read and that were never synced. Sync will never upload these files, for
8
+ example notes written before the vault write-access hook blocked that folder.
9
+ The list comes from the local `.hq/vault-access.json` access data and the
10
+ sync journal, so the command makes no extra network calls.
11
+ - `hq lanes resume` and `hq lanes message` without `--account` keep a Claude lane on the account it was created with via `--account`, instead of rebalancing it onto another account (which could belong to another company). Repair of an unusable account still moves the lane.
12
+
13
+ ## [5.345.153] — 2026-10-21
14
+ - `hq-auth-refresh --min-validity-seconds N` now applies to person sessions,
15
+ not only machine tokens: a person session with less than N seconds left
16
+ (120 to 1800, default 120) is renewed. New `--force` renews a person session
17
+ even while it is still valid. The deploy identity resolver can use these to
18
+ stop returning `login_required` while `hq whoami` shows a valid session.
19
+ - `hq doctor --fix` now rotates stale sync-manifest uploads across runs. Each
20
+ run starts after the last company it tried, so a machine with many stale
21
+ company manifests reaches all of them, and a company whose upload keeps
22
+ failing no longer blocks the rest. When stale journals and stale manifests
23
+ are both pending, one of the two network repair slots goes to a manifest
24
+ upload. The run still makes at most two network repairs in total.
25
+ - Work Mesh sessions held because their company was missing now drain once
26
+ your membership confirms the company. Before this, after
27
+ `hq mesh daemon install` those sessions kept piling up in the held and
28
+ dead-letter queues when the session only knew the company's slug. The daemon
29
+ now looks the slug up through your membership, and retries the held backlog
30
+ every 15 minutes instead of only at start. Sessions whose company cannot be
31
+ confirmed stay held.
32
+ - Each agent kit now keeps its machine sign-in tokens in its own folder
33
+ (`token-state/` inside the agent's directory) instead of the shared
34
+ `~/.hq/work-mesh/daemon/cognito-tokens.json`. Before this, an agent running on
35
+ your computer could write to that shared file and your own `hq` commands,
36
+ such as a deploy, would then act as a machine and fail with
37
+ `login_required`. Kits installed before this release pick up the new folder
38
+ without being reinstalled. A token file an agent already wrote to the shared
39
+ location is not removed by this change.
40
+ - When a company's work registry is turned off, `hq doctor` no longer reports
41
+ the held work sessions as a login problem (`AUTH_DENIED`). It now says the
42
+ work registry is disabled and gives the setting a company admin can turn on:
43
+ `hq company --company <slug> settings set --work-registry-enabled true`.
44
+ Sessions held for this reason are re-sent by `hq mesh context requeue` once
45
+ the registry is on.
46
+ - `hq agent enroll` on a computer that already has an enrolled bot now tells
47
+ you to add the new bot with `--name <bot>`, so it gets its own agent
48
+ identity. It no longer suggests `--replace`, which overwrites the first
49
+ bot's credentials. When more than one bot is enrolled on the computer,
50
+ enroll prints the `HQ_AGENT_DIR` value the new bot must run with. Every bot,
51
+ including the first one's MCP server, needs its own `HQ_AGENT_DIR`, or it
52
+ acts as another bot.
53
+ - `hq doctor` no longer fails a hook just because it is left out of the
54
+ `minimal` hook profile on purpose. A hook must now be listed in the lowest
55
+ profile it appears in and every stricter one. Missing from the profile you are running
56
+ (`HQ_HOOK_PROFILE`, `standard` by default) is still a failure, because the
57
+ hook does not run; missing only from a profile you are not running is a
58
+ warning. A hook listed only in `strict` still fails under `standard`.
59
+ `hq doctor --fix` repairs both cases.
60
+ - `hq integrations approve` now prints the provider result when the gateway
61
+ runs the approved call in the background. Before, the command waited for the
62
+ queue row to report `resumed` and then printed only "Approved — the call
63
+ completed.", so paid results such as Apollo matches were lost. The CLI now
64
+ reads the stored result back from the queue row (the call does not run
65
+ again) and prints it; `--json` adds it as `result`. For a call that already
66
+ ran, running `hq integrations approve <queueId>` again returns its stored
67
+ result.
68
+ - `hq run` no longer refuses to start when varlock reports only warnings, such
69
+ as "Value is very short! Is it actually sensitive?" or a 2-character value
70
+ that is sensitive by default. Warnings are printed to stderr and the command
71
+ runs. Real errors still stop `hq run` with exit code 1.
72
+ - Added `hq decide ask|list|show|answer|talk|withdraw|import-lanes` for owner Queue decisions. Release 1 accepts asks from personal local bots and lets the personal local bot import option-style questions addressed to that owner. Imported questions become read-only in legacy lanes; advanced questions are skipped with counts. Ask resolves --company and accepts --expires (default 72h), matching the US-001 decisions service contract. Requires that service before use.
73
+ - Company members can now add apps with `hq integrations connect`, `catalog`,
74
+ `inspect`, `discover`, `import`, and `reconnect --connect`; guests are still
75
+ refused by the server. Removing and governing apps is unchanged.
76
+ - When a member tries to reconnect or replace an app someone else connected,
77
+ the CLI explains that an owner or admin has to reconnect it, instead of
78
+ printing the raw `INTEGRATION_RECONNECT_FORBIDDEN` refusal.
79
+ - `hq integrations connect <app>` on an app someone else connected now tells a
80
+ member to ask an owner or admin, rather than suggesting `reconnect` or
81
+ `--force`, which the server would refuse.
82
+ - `hq integrations import` skips a connector that someone else already
83
+ connected and keeps importing the rest.
84
+ - `hq lanes message --project <p>` and `hq lanes resume --project <p>` now
85
+ work on a lane that has no story. Before this, moving a no-story lane to
86
+ another project appended a stories entry with an empty story id, the lane
87
+ schema rejected it, and the whole write rolled back. The lane now moves to
88
+ the new project, keeps its no-story reason, and gains no story entry.
89
+ `hq lanes stories add` refuses an empty story id with `missing_story`.
90
+ - The unit suite now passes on a developer Mac with a temporary HOME. A setup file gives every test worker the canonical macOS temp directory (`/private/var/...`) and strips HQ, Claude Code and Codex session variables, so a run started from inside an HQ session behaves like CI. Local macOS runs use at most 4 workers unless `--maxWorkers` is passed. Tests no longer pick up Homebrew bash, `/opt/homebrew/bin`, an installed HQ.app, or BSD `stat` differences, and node stubs work when node's path contains a space. Every test worker also puts a stand-in `crontab` first on PATH, and a test fails if `crontab` would resolve to anything else, so no test can edit the real user crontab (a temp HOME does not isolate it). The agent-kit fallback install test now injects its own crontab runner. Linux-only tests (Linux login-home lanes accounts) and the clean-clone checks that need a case-sensitive, non-normalizing filesystem are skipped with a stated reason where they cannot run.
91
+ - The daemon policy index notices a policy file added or removed even when the file watcher misses the event, which macOS FSEvents can do right after a watcher starts. `list()` compares directory stamps taken at the last rebuild.
92
+ - An autopilot lock records the real time it was taken, not the injected clock value.
93
+ - The registry canonicalises directories with the native realpath on macOS, so `/var` and `/private/var` spellings of one directory map to the same key. A registry entry saved with letter case that differs from the disk may need re-registering.
94
+ - The provider wrapper's perl timeout fallback (used where `timeout` is not installed, such as macOS) no longer prints "Alarm clock" to the terminal. The exit status is still 142.
95
+ - `hq core policy` age report prints the awk error for the platform it ran on, and the differential corpus recorder maps both macOS spellings of `$HOME` to `<HOME>`.
96
+ - `hq mesh context organize` now lists fresh candidates when the session's pending decision has expired, instead of returning the same expired decision. Choosing an option or `--create-project` after that no longer fails with `DECISION_EXPIRED` or `DECISION_WINDOW_MISSING`.
97
+ - The published core E2E harness tears down reliably on macOS.
98
+ - Windows lock acquisition now waits out transient EPERM/EBUSY instead of failing early.
99
+ - Worker registry rebuild no longer walks into nested git checkouts. A folder below the scan root that holds a `.git` file (linked worktree) or `.git` folder (clone) is treated as a separate checkout: a `worker.yaml` directly inside it still registers, but nothing beneath it is read. `workspace/worktrees/`, `node_modules/`, and `.git/` folders are skipped wherever they appear. A company folder (`companies/<slug>`) or its `workers/` folder kept as its own repository still registers every worker. The worker-id clash check in `hq core scan-packages` uses the same rule.
100
+
5
101
  ## [5.345.152] — 2026-10-20
6
102
  - The bundled sync engine now uses hq-cloud 6.18.91. When a company Outpost
7
103
  fails to start and the server has already cleaned it up,
@@ -6,6 +6,9 @@
6
6
  * shell out to a plain binary instead of a subcommand. Equivalent to
7
7
  * `hq auth refresh`.
8
8
  *
9
+ * Flags: `--min-validity-seconds N` renews a person session that has less than
10
+ * N seconds left (default 120); `--force` renews it even when still valid.
11
+ *
9
12
  * Exit 0 if a valid session is ensured now (healthy cache hit, refresh, or
10
13
  * machine-token mint). Exit 1 if no valid session could be ensured
11
14
  * non-interactively.
@@ -16,6 +19,7 @@ import "../node-network-compat.js";
16
19
  import type { refreshCachedSession } from "../utils/cognito-session.js";
17
20
  type RefreshSession = (options?: {
18
21
  minValiditySeconds?: number;
22
+ force?: boolean;
19
23
  }) => ReturnType<typeof refreshCachedSession>;
20
24
  export declare function runAuthRefresh(refreshSession?: RefreshSession): Promise<number>;
21
25
  export declare function startAuthRefresh(acquireLease?: typeof acquireCurrentPackageUseLease, updateRequestPending?: () => boolean): Promise<number>;
@@ -6,6 +6,9 @@
6
6
  * shell out to a plain binary instead of a subcommand. Equivalent to
7
7
  * `hq auth refresh`.
8
8
  *
9
+ * Flags: `--min-validity-seconds N` renews a person session that has less than
10
+ * N seconds left (default 120); `--force` renews it even when still valid.
11
+ *
9
12
  * Exit 0 if a valid session is ensured now (healthy cache hit, refresh, or
10
13
  * machine-token mint). Exit 1 if no valid session could be ensured
11
14
  * non-interactively.
@@ -17,6 +20,7 @@ import { acquireCurrentPackageUseLease, currentPackageUseUpdatePending, } from "
17
20
  import "../node-network-compat.js";
18
21
  import { isMainModule } from "../utils/is-main-module.js";
19
22
  const MIN_VALIDITY_FLAG = "--min-validity-seconds";
23
+ const FORCE_FLAG = "--force";
20
24
  function parseMinimumValiditySeconds(argv, env) {
21
25
  let raw;
22
26
  let fromFlag = false;
@@ -53,7 +57,11 @@ export async function runAuthRefresh(refreshSession) {
53
57
  let exitCode = 1;
54
58
  try {
55
59
  const minValiditySeconds = parseMinimumValiditySeconds(process.argv.slice(2), process.env);
56
- const result = await (refreshSession ?? refresh)(minValiditySeconds === undefined ? {} : { minValiditySeconds });
60
+ const force = process.argv.slice(2).includes(FORCE_FLAG);
61
+ const result = await (refreshSession ?? refresh)({
62
+ ...(minValiditySeconds === undefined ? {} : { minValiditySeconds }),
63
+ ...(force ? { force } : {}),
64
+ });
57
65
  if (result.refreshed) {
58
66
  exitCode = 0;
59
67
  }
@@ -27,6 +27,191 @@ export type CommandCatalogEntry = {
27
27
  readonly subcommands: readonly CommandCatalogEntry[];
28
28
  };
29
29
  export declare const COMMAND_CATALOG: readonly [{
30
+ readonly name: "decide";
31
+ readonly description: "Ask and answer owner decisions in the HQ Queue";
32
+ readonly aliases: readonly [];
33
+ readonly hidden: false;
34
+ readonly helpOption: true;
35
+ readonly helpCommand: true;
36
+ readonly usage: "[options] [command]";
37
+ readonly helpText: readonly [];
38
+ readonly arguments: readonly [];
39
+ readonly options: readonly [];
40
+ readonly subcommands: readonly [{
41
+ readonly name: "ask";
42
+ readonly description: "Create an option-choice owner decision as the personal local bot";
43
+ readonly aliases: readonly [];
44
+ readonly hidden: false;
45
+ readonly helpOption: true;
46
+ readonly helpCommand: false;
47
+ readonly usage: "[options] <statement>";
48
+ readonly helpText: readonly [];
49
+ readonly arguments: readonly [{
50
+ readonly name: "statement";
51
+ readonly required: true;
52
+ readonly variadic: false;
53
+ readonly description: "";
54
+ }];
55
+ readonly options: readonly [{
56
+ readonly flags: "--to <audience>";
57
+ readonly description: "Decision audience";
58
+ readonly hidden: false;
59
+ readonly choices: readonly ["me"];
60
+ readonly defaultValue: "me";
61
+ }, {
62
+ readonly flags: "--option <id|label>";
63
+ readonly description: "Choice, repeatable";
64
+ readonly hidden: false;
65
+ readonly defaultValue: readonly [];
66
+ }, {
67
+ readonly flags: "--recommend <id>";
68
+ readonly description: "Recommended option id";
69
+ readonly hidden: false;
70
+ }, {
71
+ readonly flags: "--context-link <url>";
72
+ readonly description: "Context link, repeatable";
73
+ readonly hidden: false;
74
+ readonly defaultValue: readonly [];
75
+ }, {
76
+ readonly flags: "--context <text>";
77
+ readonly description: "Short context brief";
78
+ readonly hidden: false;
79
+ readonly defaultValue: "";
80
+ }, {
81
+ readonly flags: "--company <slug|uid>";
82
+ readonly description: "Company (defaults to the active company)";
83
+ readonly hidden: false;
84
+ }, {
85
+ readonly flags: "--expires <duration|iso>";
86
+ readonly description: "Expiry duration (m, h, d) or ISO date-time";
87
+ readonly hidden: false;
88
+ readonly defaultValue: "72h";
89
+ }, {
90
+ readonly flags: "--commitment <id>";
91
+ readonly description: "Related commitment";
92
+ readonly hidden: false;
93
+ }, {
94
+ readonly flags: "--json";
95
+ readonly description: "Print the decision record";
96
+ readonly hidden: false;
97
+ }];
98
+ readonly subcommands: readonly [];
99
+ }, {
100
+ readonly name: "list";
101
+ readonly description: "Read your decisions across companies, oldest first";
102
+ readonly aliases: readonly [];
103
+ readonly hidden: false;
104
+ readonly helpOption: true;
105
+ readonly helpCommand: false;
106
+ readonly usage: "[options]";
107
+ readonly helpText: readonly [];
108
+ readonly arguments: readonly [];
109
+ readonly options: readonly [{
110
+ readonly flags: "--open";
111
+ readonly description: "List open decisions";
112
+ readonly hidden: false;
113
+ }, {
114
+ readonly flags: "--json";
115
+ readonly description: "Print JSON";
116
+ readonly hidden: false;
117
+ }];
118
+ readonly subcommands: readonly [];
119
+ }, {
120
+ readonly name: "show";
121
+ readonly description: "Show a visible decision, including its options and answer";
122
+ readonly aliases: readonly [];
123
+ readonly hidden: false;
124
+ readonly helpOption: true;
125
+ readonly helpCommand: false;
126
+ readonly usage: "[options] <id>";
127
+ readonly helpText: readonly [];
128
+ readonly arguments: readonly [{
129
+ readonly name: "id";
130
+ readonly required: true;
131
+ readonly variadic: false;
132
+ readonly description: "";
133
+ }];
134
+ readonly options: readonly [];
135
+ readonly subcommands: readonly [];
136
+ }, {
137
+ readonly name: "answer";
138
+ readonly description: "Answer with an option ID; the server enforces expiry and first answer";
139
+ readonly aliases: readonly [];
140
+ readonly hidden: false;
141
+ readonly helpOption: true;
142
+ readonly helpCommand: false;
143
+ readonly usage: "[options] <id>";
144
+ readonly helpText: readonly [];
145
+ readonly arguments: readonly [{
146
+ readonly name: "id";
147
+ readonly required: true;
148
+ readonly variadic: false;
149
+ readonly description: "";
150
+ }];
151
+ readonly options: readonly [{
152
+ readonly flags: "--choice <id>";
153
+ readonly description: "Option id";
154
+ readonly hidden: false;
155
+ }, {
156
+ readonly flags: "--source <source>";
157
+ readonly description: "Answer surface";
158
+ readonly hidden: false;
159
+ readonly choices: readonly ["desktop", "thread"];
160
+ readonly defaultValue: "desktop";
161
+ }];
162
+ readonly subcommands: readonly [];
163
+ }, {
164
+ readonly name: "talk";
165
+ readonly description: "Open the decision's bot conversation";
166
+ readonly aliases: readonly [];
167
+ readonly hidden: false;
168
+ readonly helpOption: true;
169
+ readonly helpCommand: false;
170
+ readonly usage: "[options] <id>";
171
+ readonly helpText: readonly [];
172
+ readonly arguments: readonly [{
173
+ readonly name: "id";
174
+ readonly required: true;
175
+ readonly variadic: false;
176
+ readonly description: "";
177
+ }];
178
+ readonly options: readonly [];
179
+ readonly subcommands: readonly [];
180
+ }, {
181
+ readonly name: "withdraw";
182
+ readonly description: "Withdraw a decision you asked";
183
+ readonly aliases: readonly [];
184
+ readonly hidden: false;
185
+ readonly helpOption: true;
186
+ readonly helpCommand: false;
187
+ readonly usage: "[options] <id>";
188
+ readonly helpText: readonly [];
189
+ readonly arguments: readonly [{
190
+ readonly name: "id";
191
+ readonly required: true;
192
+ readonly variadic: false;
193
+ readonly description: "";
194
+ }];
195
+ readonly options: readonly [];
196
+ readonly subcommands: readonly [];
197
+ }, {
198
+ readonly name: "import-lanes";
199
+ readonly description: "Import option-style legacy questions once; report skipped advanced questions";
200
+ readonly aliases: readonly [];
201
+ readonly hidden: false;
202
+ readonly helpOption: true;
203
+ readonly helpCommand: false;
204
+ readonly usage: "[options]";
205
+ readonly helpText: readonly [];
206
+ readonly arguments: readonly [];
207
+ readonly options: readonly [{
208
+ readonly flags: "--json";
209
+ readonly description: "Print import counts and skipped question reasons";
210
+ readonly hidden: false;
211
+ }];
212
+ readonly subcommands: readonly [];
213
+ }];
214
+ }, {
30
215
  readonly name: "modules";
31
216
  readonly description: "Module management commands";
32
217
  readonly aliases: readonly [];
@@ -1,5 +1,232 @@
1
1
  // This file is generated by scripts/generate-command-catalog.mjs. Do not edit.
2
2
  export const COMMAND_CATALOG = [
3
+ {
4
+ "name": "decide",
5
+ "description": "Ask and answer owner decisions in the HQ Queue",
6
+ "aliases": [],
7
+ "hidden": false,
8
+ "helpOption": true,
9
+ "helpCommand": true,
10
+ "usage": "[options] [command]",
11
+ "helpText": [],
12
+ "arguments": [],
13
+ "options": [],
14
+ "subcommands": [
15
+ {
16
+ "name": "ask",
17
+ "description": "Create an option-choice owner decision as the personal local bot",
18
+ "aliases": [],
19
+ "hidden": false,
20
+ "helpOption": true,
21
+ "helpCommand": false,
22
+ "usage": "[options] <statement>",
23
+ "helpText": [],
24
+ "arguments": [
25
+ {
26
+ "name": "statement",
27
+ "required": true,
28
+ "variadic": false,
29
+ "description": ""
30
+ }
31
+ ],
32
+ "options": [
33
+ {
34
+ "flags": "--to <audience>",
35
+ "description": "Decision audience",
36
+ "hidden": false,
37
+ "choices": [
38
+ "me"
39
+ ],
40
+ "defaultValue": "me"
41
+ },
42
+ {
43
+ "flags": "--option <id|label>",
44
+ "description": "Choice, repeatable",
45
+ "hidden": false,
46
+ "defaultValue": []
47
+ },
48
+ {
49
+ "flags": "--recommend <id>",
50
+ "description": "Recommended option id",
51
+ "hidden": false
52
+ },
53
+ {
54
+ "flags": "--context-link <url>",
55
+ "description": "Context link, repeatable",
56
+ "hidden": false,
57
+ "defaultValue": []
58
+ },
59
+ {
60
+ "flags": "--context <text>",
61
+ "description": "Short context brief",
62
+ "hidden": false,
63
+ "defaultValue": ""
64
+ },
65
+ {
66
+ "flags": "--company <slug|uid>",
67
+ "description": "Company (defaults to the active company)",
68
+ "hidden": false
69
+ },
70
+ {
71
+ "flags": "--expires <duration|iso>",
72
+ "description": "Expiry duration (m, h, d) or ISO date-time",
73
+ "hidden": false,
74
+ "defaultValue": "72h"
75
+ },
76
+ {
77
+ "flags": "--commitment <id>",
78
+ "description": "Related commitment",
79
+ "hidden": false
80
+ },
81
+ {
82
+ "flags": "--json",
83
+ "description": "Print the decision record",
84
+ "hidden": false
85
+ }
86
+ ],
87
+ "subcommands": []
88
+ },
89
+ {
90
+ "name": "list",
91
+ "description": "Read your decisions across companies, oldest first",
92
+ "aliases": [],
93
+ "hidden": false,
94
+ "helpOption": true,
95
+ "helpCommand": false,
96
+ "usage": "[options]",
97
+ "helpText": [],
98
+ "arguments": [],
99
+ "options": [
100
+ {
101
+ "flags": "--open",
102
+ "description": "List open decisions",
103
+ "hidden": false
104
+ },
105
+ {
106
+ "flags": "--json",
107
+ "description": "Print JSON",
108
+ "hidden": false
109
+ }
110
+ ],
111
+ "subcommands": []
112
+ },
113
+ {
114
+ "name": "show",
115
+ "description": "Show a visible decision, including its options and answer",
116
+ "aliases": [],
117
+ "hidden": false,
118
+ "helpOption": true,
119
+ "helpCommand": false,
120
+ "usage": "[options] <id>",
121
+ "helpText": [],
122
+ "arguments": [
123
+ {
124
+ "name": "id",
125
+ "required": true,
126
+ "variadic": false,
127
+ "description": ""
128
+ }
129
+ ],
130
+ "options": [],
131
+ "subcommands": []
132
+ },
133
+ {
134
+ "name": "answer",
135
+ "description": "Answer with an option ID; the server enforces expiry and first answer",
136
+ "aliases": [],
137
+ "hidden": false,
138
+ "helpOption": true,
139
+ "helpCommand": false,
140
+ "usage": "[options] <id>",
141
+ "helpText": [],
142
+ "arguments": [
143
+ {
144
+ "name": "id",
145
+ "required": true,
146
+ "variadic": false,
147
+ "description": ""
148
+ }
149
+ ],
150
+ "options": [
151
+ {
152
+ "flags": "--choice <id>",
153
+ "description": "Option id",
154
+ "hidden": false
155
+ },
156
+ {
157
+ "flags": "--source <source>",
158
+ "description": "Answer surface",
159
+ "hidden": false,
160
+ "choices": [
161
+ "desktop",
162
+ "thread"
163
+ ],
164
+ "defaultValue": "desktop"
165
+ }
166
+ ],
167
+ "subcommands": []
168
+ },
169
+ {
170
+ "name": "talk",
171
+ "description": "Open the decision's bot conversation",
172
+ "aliases": [],
173
+ "hidden": false,
174
+ "helpOption": true,
175
+ "helpCommand": false,
176
+ "usage": "[options] <id>",
177
+ "helpText": [],
178
+ "arguments": [
179
+ {
180
+ "name": "id",
181
+ "required": true,
182
+ "variadic": false,
183
+ "description": ""
184
+ }
185
+ ],
186
+ "options": [],
187
+ "subcommands": []
188
+ },
189
+ {
190
+ "name": "withdraw",
191
+ "description": "Withdraw a decision you asked",
192
+ "aliases": [],
193
+ "hidden": false,
194
+ "helpOption": true,
195
+ "helpCommand": false,
196
+ "usage": "[options] <id>",
197
+ "helpText": [],
198
+ "arguments": [
199
+ {
200
+ "name": "id",
201
+ "required": true,
202
+ "variadic": false,
203
+ "description": ""
204
+ }
205
+ ],
206
+ "options": [],
207
+ "subcommands": []
208
+ },
209
+ {
210
+ "name": "import-lanes",
211
+ "description": "Import option-style legacy questions once; report skipped advanced questions",
212
+ "aliases": [],
213
+ "hidden": false,
214
+ "helpOption": true,
215
+ "helpCommand": false,
216
+ "usage": "[options]",
217
+ "helpText": [],
218
+ "arguments": [],
219
+ "options": [
220
+ {
221
+ "flags": "--json",
222
+ "description": "Print import counts and skipped question reasons",
223
+ "hidden": false
224
+ }
225
+ ],
226
+ "subcommands": []
227
+ }
228
+ ]
229
+ },
3
230
  {
4
231
  "name": "modules",
5
232
  "description": "Module management commands",
@@ -4,6 +4,12 @@ import type { Command } from "commander";
4
4
  * invocation. Multi-module roots keep the old registration order here.
5
5
  */
6
6
  export declare const REGISTRATION_PLAN: readonly [{
7
+ readonly type: "registrar";
8
+ readonly root: "decide";
9
+ readonly parent: "program";
10
+ readonly module: "./commands/decide.js";
11
+ readonly exportName: "registerDecideCommand";
12
+ }, {
7
13
  readonly type: "group";
8
14
  readonly root: "modules";
9
15
  readonly id: "modules";
@@ -3,6 +3,7 @@
3
3
  * invocation. Multi-module roots keep the old registration order here.
4
4
  */
5
5
  export const REGISTRATION_PLAN = [
6
+ { type: "registrar", root: "decide", parent: "program", module: "./commands/decide.js", exportName: "registerDecideCommand" },
6
7
  { type: "group", root: "modules", id: "modules", name: "modules", description: "Module management commands" },
7
8
  { type: "registrar", root: "modules", parent: "modules", module: "./commands/add.js", exportName: "registerAddCommand" },
8
9
  { type: "registrar", root: "modules", parent: "modules", module: "./commands/sync.js", exportName: "registerSyncCommand" },
@@ -138,7 +138,19 @@ export interface EnrollResult {
138
138
  permissionsError?: string;
139
139
  /** The tree this identity lives in. */
140
140
  agentDir: string;
141
+ /**
142
+ * Other agent trees on this host that already hold an identity. When this is
143
+ * non-empty, `hq agent …` cannot tell the bots apart on its own (the root
144
+ * identity wins, or two local bots are ambiguous), so this bot must run with
145
+ * HQ_AGENT_DIR=agentDir or it acts as one of the others.
146
+ */
147
+ otherAgentDirs: string[];
141
148
  }
149
+ /**
150
+ * Agent trees under `home` holding an identity, other than `self`. Existence
151
+ * checks only; no creds file is opened.
152
+ */
153
+ export declare function otherAgentDirsOnHost(self: string, home?: string): string[];
142
154
  /** Pure-ish orchestration so tests can drive it without a TTY or network. */
143
155
  export declare function enrollHost(opts: EnrollOptions, deps?: EnrollDeps): Promise<EnrollResult>;
144
156
  export declare function registerAgentEnrollCommand(agent: Command): void;