@indigoai-us/hq-cli 5.345.54 → 5.345.56

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 (72) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/assets/scaffold/core/scripts/derive-trigger-facts.sh +10 -1
  3. package/assets/scaffold/core/scripts/jobs-validate.sh +2 -1
  4. package/assets/scaffold/core/scripts/session-title.sh +18 -15
  5. package/dist/command-catalog.generated.d.ts +143 -2
  6. package/dist/command-catalog.generated.js +175 -2
  7. package/dist/command-registration-plan.d.ts +6 -1
  8. package/dist/command-registration-plan.js +2 -1
  9. package/dist/commands/cloud.d.ts +7 -0
  10. package/dist/commands/cloud.js +92 -16
  11. package/dist/commands/core-delegate-w1b.js +18 -5
  12. package/dist/commands/core-derive-trigger-facts-command.js +14 -0
  13. package/dist/commands/core-derive-trigger-facts-native.d.ts +1 -0
  14. package/dist/commands/core-derive-trigger-facts-native.js +20 -1
  15. package/dist/commands/daemon.js +16 -0
  16. package/dist/commands/doctor.d.ts +1 -0
  17. package/dist/commands/doctor.js +15 -2
  18. package/dist/commands/import-scan.d.ts +24 -0
  19. package/dist/commands/import-scan.js +75 -0
  20. package/dist/commands/lanes-checks.d.ts +3 -0
  21. package/dist/commands/lanes-checks.js +34 -0
  22. package/dist/commands/lanes-session-start.d.ts +17 -0
  23. package/dist/commands/lanes-session-start.js +195 -0
  24. package/dist/commands/lanes-shared.d.ts +2 -1
  25. package/dist/commands/lanes-watch.d.ts +2 -0
  26. package/dist/commands/lanes-watch.js +2 -1
  27. package/dist/commands/lanes.d.ts +3 -1
  28. package/dist/commands/lanes.js +121 -18
  29. package/dist/commands/members.d.ts +4 -0
  30. package/dist/commands/members.js +23 -2
  31. package/dist/lanes-drain-hook.js +6 -2
  32. package/dist/lib/daemon/conflict-notices.d.ts +4 -0
  33. package/dist/lib/daemon/conflict-notices.js +80 -0
  34. package/dist/lib/doctor/checks/sync-health.d.ts +2 -0
  35. package/dist/lib/doctor/checks/sync-health.js +47 -23
  36. package/dist/lib/import-scan/events.d.ts +135 -0
  37. package/dist/lib/import-scan/events.js +71 -0
  38. package/dist/lib/import-scan/run.d.ts +84 -0
  39. package/dist/lib/import-scan/run.js +308 -0
  40. package/dist/lib/import-scan/scan-event.schema.json +127 -0
  41. package/dist/lib/import-scan/validate.d.ts +31 -0
  42. package/dist/lib/import-scan/validate.js +111 -0
  43. package/dist/lib/lanes/dropbox.d.ts +4 -2
  44. package/dist/lib/lanes/dropbox.js +54 -9
  45. package/dist/lib/lanes/flag-keys.d.ts +10 -0
  46. package/dist/lib/lanes/flag-keys.js +10 -0
  47. package/dist/lib/lanes/hooks-install.d.ts +14 -11
  48. package/dist/lib/lanes/hooks-install.js +70 -50
  49. package/dist/lib/lanes/monitor.js +1 -1
  50. package/dist/lib/lanes/reaper.d.ts +58 -0
  51. package/dist/lib/lanes/reaper.js +403 -0
  52. package/dist/lib/lanes/registry-flag.d.ts +2 -0
  53. package/dist/lib/lanes/registry-flag.js +1 -1
  54. package/dist/lib/lanes/spawn.d.ts +2 -0
  55. package/dist/lib/lanes/spawn.js +32 -2
  56. package/dist/lib/lanes/status-fields.d.ts +12 -0
  57. package/dist/lib/lanes/status-fields.js +189 -0
  58. package/dist/lib/lanes/types.js +1 -1
  59. package/dist/lib/lanes/worker-continuity.d.ts +18 -0
  60. package/dist/lib/lanes/worker-continuity.js +81 -0
  61. package/dist/lib/lanes/worker-process.d.ts +4 -0
  62. package/dist/lib/lanes/worker-process.js +77 -0
  63. package/dist/main.js +9 -3
  64. package/dist/utils/cli-telemetry.d.ts +4 -1
  65. package/dist/utils/cli-telemetry.js +8 -0
  66. package/dist/utils/jq-windows-compat.d.ts +13 -0
  67. package/dist/utils/jq-windows-compat.js +48 -0
  68. package/dist/utils/run-bundled-script.d.ts +3 -0
  69. package/dist/utils/run-bundled-script.js +9 -80
  70. package/dist/utils/windows-bash.d.ts +5 -0
  71. package/dist/utils/windows-bash.js +75 -0
  72. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,7 +2,38 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [5.345.56] — 2026-10-09
6
+ - Add `hq lanes reap` to report local lanes whose session senior is confirmed ended, clear stale pid markers on request, and keep process-tree stopping behind the `lanes.reap-stop` hq-flags key. SessionStart runs the report-only sweep detached and stores its report in host-specific user state.
7
+ - Record privacy-limited `hq members invite` success and failure outcomes through the existing CLI feature telemetry event.
8
+
9
+ - Continue a senior's most recent same-company, same-provider worker lane on `hq lanes create`, refuse live duplicate worker lanes, and filter `hq lanes list` by worker.
10
+
11
+ - Pass jq diagnostic filters to Windows batch wrappers as single-line arguments so malformed-ACL parity reports the original jq diagnostic instead of failing on an invalid command line.
12
+ - Keep the bundled derive-trigger-facts helper's closed-stdin error prompt on macOS instead of blocking the hook call.
13
+ - Native delegate diagnostics match the bundled helper's Git Bash jq byte handling, including jq.exe CRLF output when `--binary` is unavailable.
14
+ - Lane drop-box hooks deliver queued messages after tool calls and at a deliverable Stop event. Lane list and show JSON include bounded output, PR, inbox, elapsed time, and worker exit fields.
15
+ - hq doctor now finds a company's sync manifest status instead of reporting the company as unresolved.
16
+
17
+ ## [5.345.55] — 2026-10-08
18
+ - Added `hq daemon sync conflicts acknowledge <id>` so the desktop can clear a parked-conflict notice without writing runner-owned sync state.
19
+ - Add `hq import scan`, which runs the HQ import-context scanner on this
20
+ machine (local only) and reports conversation history, repositories,
21
+ companies and projects. `--json --stream` prints the scan as v1 JSON Lines
22
+ events (`start`, `source`, `count`, `company`, `project`, `error`, `done`)
23
+ for the HQ desktop first-run setup; `--json` prints only the final `done`
24
+ object. Each scanner line is validated against a schema and rebuilt from its
25
+ v1 fields; invalid lines are dropped with a warning. Scanner diagnostics are
26
+ shown with paths and token-like strings redacted. The HQ folder comes from
27
+ `--hq-root` or the HQ installer's record only. When the scan cannot run,
28
+ fails or is cancelled, the command emits an `error` event and a `done` and
29
+ exits non-zero; cancelling stops the whole scanner process group. Event
30
+ types are exported from `dist/lib/import-scan/events.js`. Needs an hq-core
31
+ release whose import-context scanner supports `--progress-json`.
32
+ - Exit with actionable recovery steps when a vault upload is refused.
33
+
5
34
  ## [5.345.54] — 2026-10-08
35
+ - Add `hq lanes session-start` for conduct-mode SessionStart bootstrapping. `HQ_LANE_ENGINE` is the preferred engine environment variable; `HQ_CONDUCT_ENGINE` remains a deprecated fallback alias. Show `hq lanes` in root help.
36
+
6
37
  - Prevents `hq` commands run outside an HQ tree on Windows from hanging while searching parent directories for an HQ root.
7
38
 
8
39
  ## [5.345.53] — 2026-10-08
@@ -65,7 +65,16 @@ case "${OSTYPE:-}" in
65
65
  STDIN_JSON="${STDIN_JSON%$'\n'}"
66
66
  done
67
67
  ;;
68
- *) STDIN_JSON="$(</dev/stdin)" || STDIN_JSON='{}' ;;
68
+ *)
69
+ # Bash 3.2 on macOS can block while opening /dev/stdin when fd 0 is closed.
70
+ # Detect that case with a builtin redirection so the existing fail-closed
71
+ # behavior returns promptly on every POSIX host.
72
+ if [[ ! -e /dev/stdin ]]; then
73
+ printf '%s: line 68: /dev/stdin: No such file or directory\n' "$0" >&2
74
+ exit 1
75
+ fi
76
+ STDIN_JSON="$(</dev/stdin)" || STDIN_JSON='{}'
77
+ ;;
69
78
  esac
70
79
  [ -n "$STDIN_JSON" ] || STDIN_JSON='{}'
71
80
  JQ="$(command -v jq || true)"
@@ -219,7 +219,8 @@ validate_job_file() {
219
219
  err "$file" "yaml" "failed to parse YAML"
220
220
  return
221
221
  fi
222
- if [ "$(jq -r 'type' <<<"$json")" != "object" ]; then
222
+ # Use jq's exit status instead of its text output: jq.exe writes CRLF on Windows.
223
+ if ! jq -es 'length == 1 and (.[0] | type == "object")' <<<"$json" >/dev/null; then
223
224
  err "$file" "yaml" "job root must be a mapping"
224
225
  return
225
226
  fi
@@ -38,13 +38,14 @@ done
38
38
 
39
39
  command -v node >/dev/null 2>&1 || exit 0
40
40
 
41
- HQ_ROOT="$HQ_ROOT" SESSION_ID="$SESSION_ID" CMD="$COMMAND" SESSION_CWD="$SESSION_CWD" node - <<'JS'
41
+ HQ_ROOT="$HQ_ROOT" SESSION_ID="$SESSION_ID" SESSION_CWD="$SESSION_CWD" \
42
+ MSYS2_ARG_CONV_EXCL="*" node - "$COMMAND" <<'JS'
42
43
  const fs = require("fs");
43
44
  const path = require("path");
44
45
 
45
46
  const hq = process.env.HQ_ROOT || "";
46
47
  const sid = process.env.SESSION_ID || "default";
47
- let command = (process.env.CMD || "").trim().replace(/^\/+/, "");
48
+ let command = (process.argv[2] || "").trim().replace(/^\/+/, "");
48
49
 
49
50
  const key = sid.replace(/[^A-Za-z0-9._-]/g, "_") || "default";
50
51
  const state = path.join(hq, ".claude", "state");
@@ -133,12 +134,12 @@ if (project) {
133
134
  if (matchesProject) {
134
135
  const st = p.state || "";
135
136
  if (st === "IN_PROGRESS") {
136
- emoji = "▶️";
137
+ emoji = "\u25b6\ufe0f";
137
138
  } else if (st === "COMPLETED") {
138
139
  const ts = p.updatedAt || p.updated_at || "";
139
140
  const t = new Date(ts);
140
141
  if (!isNaN(t.getTime()) && (Date.now() - t.getTime()) / 1000 < 86400) {
141
- emoji = "✅"; // only recent completions
142
+ emoji = "\u2705"; // only recent completions
142
143
  }
143
144
  }
144
145
  break;
@@ -171,15 +172,15 @@ if (project) {
171
172
  // while /handoff runs; only the model can know when it finished, so it sets 📤.
172
173
  // Both are distinct from ✅ "the work shipped" and 🤝 "a person owns it now".
173
174
  const MODES = [
174
- [/^(brainstorm|idea|dream|discover|strategize)$/, "💭"],
175
- [/^(plan|prd|deep-plan|storyboard|architect|review-plan|codebase-design)$/, "📐"],
176
- [/^(run-project|execute-task|ship|land|land-batch|run-pipeline|orchestrate|tdd|deploy)$/, "⚡"],
177
- [/^(review|code-review|security-review)$/, "👀"],
178
- [/^(quality-gate|smoke|verify|diagnose|investigate)$/, "🧪"],
179
- [/^(handoff|checkpoint-handoff|retro)$/, "📝"],
180
- [/^(delegate|new-hire|new-agent|promote)$/, "🤝"],
181
- [/^(dm|hq-slack|meeting-notes|work-broadcast|signals|hq-share)$/, "💬"],
182
- [/^(schedule|job|loop)$/, "🔁"],
175
+ [/^(brainstorm|idea|dream|discover|strategize)$/, "\u{1f4ad}"],
176
+ [/^(plan|prd|deep-plan|storyboard|architect|review-plan|codebase-design)$/, "\u{1f4d0}"],
177
+ [/^(run-project|execute-task|ship|land|land-batch|run-pipeline|orchestrate|tdd|deploy)$/, "\u{26a1}"],
178
+ [/^(review|code-review|security-review)$/, "\u{1f440}"],
179
+ [/^(quality-gate|smoke|verify|diagnose|investigate)$/, "\u{1f9ea}"],
180
+ [/^(handoff|checkpoint-handoff|retro)$/, "\u{1f4dd}"],
181
+ [/^(delegate|new-hire|new-agent|promote)$/, "\u{1f91d}"],
182
+ [/^(dm|hq-slack|meeting-notes|work-broadcast|signals|hq-share)$/, "\u{1f4ac}"],
183
+ [/^(schedule|job|loop)$/, "\u{1f501}"],
183
184
  ];
184
185
 
185
186
  const modeFor = (word) => {
@@ -192,7 +193,7 @@ if (!command) command = "chat";
192
193
  // Precedence: a finished or running project outranks the command word — "it
193
194
  // shipped" and "it is executing right now" beat "you typed /plan an hour ago".
194
195
  // `emoji` is set above from orchestrator state (✅ recent completion, ▶️ running).
195
- const mode = emoji === "▶️" ? "⚡" : (emoji || modeFor(command));
196
+ const mode = emoji === "\u25b6\ufe0f" ? "\u{26a1}" : (emoji || modeFor(command));
196
197
 
197
198
  // --- company ---
198
199
  // Always the first text token. Long slugs get an explicit short form from the
@@ -301,5 +302,7 @@ let title = compose(parts);
301
302
  if (title.length > MAX && parts.length > 1) title = compose([parts[parts.length - 1]]);
302
303
  if (title.length > MAX) title = title.slice(0, MAX - 1).replace(/\s+$/, "") + "…";
303
304
 
304
- console.log(title);
305
+ // The script is also run under Git Bash with LC_ALL=C from its caller. Write
306
+ // the protocol bytes explicitly so the host locale cannot replace UTF-8 glyphs.
307
+ process.stdout.write(Buffer.from(`${title}\n`, "utf8"));
305
308
  JS
@@ -5144,6 +5144,62 @@ export declare const COMMAND_CATALOG: readonly [{
5144
5144
  }];
5145
5145
  readonly subcommands: readonly [];
5146
5146
  }];
5147
+ }, {
5148
+ readonly name: "import";
5149
+ readonly description: "Import existing AI context (Claude Code, Codex, repos) into HQ";
5150
+ readonly aliases: readonly [];
5151
+ readonly hidden: false;
5152
+ readonly helpOption: true;
5153
+ readonly helpCommand: true;
5154
+ readonly usage: "[options] [command]";
5155
+ readonly helpText: readonly [];
5156
+ readonly arguments: readonly [];
5157
+ readonly options: readonly [];
5158
+ readonly subcommands: readonly [{
5159
+ readonly name: "scan";
5160
+ readonly description: "Scan this machine for AI context (sessions, repos, companies, projects); local only";
5161
+ readonly aliases: readonly [];
5162
+ readonly hidden: false;
5163
+ readonly helpOption: true;
5164
+ readonly helpCommand: false;
5165
+ readonly usage: "[options]";
5166
+ readonly helpText: readonly [{
5167
+ readonly position: "after";
5168
+ readonly text: "\nThe desktop app runs: hq import scan --json --stream\nEvents (v1): start, source, count, company, project, error, done. See docs/import-scan-stream.md.";
5169
+ }];
5170
+ readonly arguments: readonly [];
5171
+ readonly options: readonly [{
5172
+ readonly flags: "--json";
5173
+ readonly description: "Print only the final done event as JSON";
5174
+ readonly hidden: false;
5175
+ }, {
5176
+ readonly flags: "--stream";
5177
+ readonly description: "With --json, print every scan event as JSON Lines while scanning";
5178
+ readonly hidden: false;
5179
+ }, {
5180
+ readonly flags: "--hq-root <path>";
5181
+ readonly description: "HQ folder (default: the folder the HQ installer recorded)";
5182
+ readonly hidden: false;
5183
+ }, {
5184
+ readonly flags: "--output <path>";
5185
+ readonly description: "Where to write report.json (default: <hq>/workspace/imports/<scan id>/report.json)";
5186
+ readonly hidden: false;
5187
+ }, {
5188
+ readonly flags: "--scope <dir>";
5189
+ readonly description: "Also scan this folder (repeatable)";
5190
+ readonly hidden: false;
5191
+ readonly defaultValue: readonly [];
5192
+ }, {
5193
+ readonly flags: "--claude-export <path>";
5194
+ readonly description: "Include a claude.ai data export (unzipped folder or conversations.json)";
5195
+ readonly hidden: false;
5196
+ }, {
5197
+ readonly flags: "--no-default-scopes";
5198
+ readonly description: "Scan only --scope folders, not the default code folders";
5199
+ readonly hidden: false;
5200
+ }];
5201
+ readonly subcommands: readonly [];
5202
+ }];
5147
5203
  }, {
5148
5204
  readonly name: "reindex";
5149
5205
  readonly description: "Surface namespaced skills, materialize legacy knowledge repos, regenerate the workers registry, and trust HQ hooks for Codex, Grok, and Claude Code";
@@ -10929,7 +10985,7 @@ export declare const COMMAND_CATALOG: readonly [{
10929
10985
  readonly name: "lanes";
10930
10986
  readonly description: "Create, supervise, and steer worker lanes; routed decision queue";
10931
10987
  readonly aliases: readonly [];
10932
- readonly hidden: true;
10988
+ readonly hidden: false;
10933
10989
  readonly helpOption: true;
10934
10990
  readonly helpCommand: true;
10935
10991
  readonly usage: "[options] [command]";
@@ -10937,6 +10993,54 @@ export declare const COMMAND_CATALOG: readonly [{
10937
10993
  readonly arguments: readonly [];
10938
10994
  readonly options: readonly [];
10939
10995
  readonly subcommands: readonly [{
10996
+ readonly name: "session-start";
10997
+ readonly description: "Internal SessionStart bootstrap";
10998
+ readonly aliases: readonly [];
10999
+ readonly hidden: true;
11000
+ readonly helpOption: true;
11001
+ readonly helpCommand: false;
11002
+ readonly usage: "[options]";
11003
+ readonly helpText: readonly [];
11004
+ readonly arguments: readonly [];
11005
+ readonly options: readonly [{
11006
+ readonly flags: "--json";
11007
+ readonly description: "JSON on stdout (always)";
11008
+ readonly hidden: false;
11009
+ }];
11010
+ readonly subcommands: readonly [];
11011
+ }, {
11012
+ readonly name: "reap";
11013
+ readonly description: "Classify local lanes whose session senior has ended; report only by default";
11014
+ readonly aliases: readonly ["_reap"];
11015
+ readonly hidden: false;
11016
+ readonly helpOption: true;
11017
+ readonly helpCommand: false;
11018
+ readonly usage: "[options]";
11019
+ readonly helpText: readonly [];
11020
+ readonly arguments: readonly [];
11021
+ readonly options: readonly [{
11022
+ readonly flags: "--min-age <minutes>";
11023
+ readonly description: "Minimum lane age in minutes (default: 120)";
11024
+ readonly hidden: false;
11025
+ }, {
11026
+ readonly flags: "--apply-stale-state";
11027
+ readonly description: "Remove stale worker and watcher pid markers";
11028
+ readonly hidden: false;
11029
+ }, {
11030
+ readonly flags: "--stop";
11031
+ readonly description: "Stop candidate process trees when the hq-flags stop key is enabled";
11032
+ readonly hidden: false;
11033
+ }, {
11034
+ readonly flags: "--reason <text>";
11035
+ readonly description: "Required audit reason when --stop is set";
11036
+ readonly hidden: false;
11037
+ }, {
11038
+ readonly flags: "--json";
11039
+ readonly description: "Print machine-readable JSON (default)";
11040
+ readonly hidden: false;
11041
+ }];
11042
+ readonly subcommands: readonly [];
11043
+ }, {
10940
11044
  readonly name: "checks";
10941
11045
  readonly description: "Evaluate tracker and lane health checks";
10942
11046
  readonly aliases: readonly [];
@@ -11546,6 +11650,10 @@ export declare const COMMAND_CATALOG: readonly [{
11546
11650
  readonly flags: "--worker <name>";
11547
11651
  readonly description: "HQ worker or reusable profile id";
11548
11652
  readonly hidden: false;
11653
+ }, {
11654
+ readonly flags: "--fresh-thread";
11655
+ readonly description: "Skip worker continuity and start a cold provider session";
11656
+ readonly hidden: false;
11549
11657
  }, {
11550
11658
  readonly flags: "--provider <name>";
11551
11659
  readonly description: "claude | codex | grok";
@@ -11878,6 +11986,10 @@ export declare const COMMAND_CATALOG: readonly [{
11878
11986
  readonly flags: "--senior <ref>";
11879
11987
  readonly description: "Filter by senior ref";
11880
11988
  readonly hidden: false;
11989
+ }, {
11990
+ readonly flags: "--worker <id>";
11991
+ readonly description: "Filter by worker id";
11992
+ readonly hidden: false;
11881
11993
  }, {
11882
11994
  readonly flags: "--lane <id>";
11883
11995
  readonly description: "Filter by lane id (repeatable)";
@@ -12184,7 +12296,7 @@ export declare const COMMAND_CATALOG: readonly [{
12184
12296
  readonly hidden: false;
12185
12297
  }, {
12186
12298
  readonly flags: "--engine <engine>";
12187
- readonly description: "claude | codex | grok; defaults to HQ_CONDUCT_ENGINE or claude";
12299
+ readonly description: "claude | codex | grok; defaults to HQ_LANE_ENGINE (HQ_CONDUCT_ENGINE is deprecated) or claude";
12188
12300
  readonly hidden: false;
12189
12301
  }, {
12190
12302
  readonly flags: "--reminder";
@@ -13756,6 +13868,35 @@ export declare const COMMAND_CATALOG: readonly [{
13756
13868
  readonly arguments: readonly [];
13757
13869
  readonly options: readonly [];
13758
13870
  readonly subcommands: readonly [{
13871
+ readonly name: "conflicts";
13872
+ readonly description: "Manage parked conflict copy notices";
13873
+ readonly aliases: readonly [];
13874
+ readonly hidden: false;
13875
+ readonly helpOption: true;
13876
+ readonly helpCommand: true;
13877
+ readonly usage: "[options] [command]";
13878
+ readonly helpText: readonly [];
13879
+ readonly arguments: readonly [];
13880
+ readonly options: readonly [];
13881
+ readonly subcommands: readonly [{
13882
+ readonly name: "acknowledge";
13883
+ readonly description: "Acknowledge a parked conflict copy notice";
13884
+ readonly aliases: readonly [];
13885
+ readonly hidden: false;
13886
+ readonly helpOption: true;
13887
+ readonly helpCommand: false;
13888
+ readonly usage: "[options] <noticeId>";
13889
+ readonly helpText: readonly [];
13890
+ readonly arguments: readonly [{
13891
+ readonly name: "noticeId";
13892
+ readonly required: true;
13893
+ readonly variadic: false;
13894
+ readonly description: "";
13895
+ }];
13896
+ readonly options: readonly [];
13897
+ readonly subcommands: readonly [];
13898
+ }];
13899
+ }, {
13759
13900
  readonly name: "status";
13760
13901
  readonly description: "Show sync ownership, heartbeat, last pass and log path";
13761
13902
  readonly aliases: readonly [];
@@ -6253,6 +6253,75 @@ export const COMMAND_CATALOG = [
6253
6253
  }
6254
6254
  ]
6255
6255
  },
6256
+ {
6257
+ "name": "import",
6258
+ "description": "Import existing AI context (Claude Code, Codex, repos) into HQ",
6259
+ "aliases": [],
6260
+ "hidden": false,
6261
+ "helpOption": true,
6262
+ "helpCommand": true,
6263
+ "usage": "[options] [command]",
6264
+ "helpText": [],
6265
+ "arguments": [],
6266
+ "options": [],
6267
+ "subcommands": [
6268
+ {
6269
+ "name": "scan",
6270
+ "description": "Scan this machine for AI context (sessions, repos, companies, projects); local only",
6271
+ "aliases": [],
6272
+ "hidden": false,
6273
+ "helpOption": true,
6274
+ "helpCommand": false,
6275
+ "usage": "[options]",
6276
+ "helpText": [
6277
+ {
6278
+ "position": "after",
6279
+ "text": "\nThe desktop app runs: hq import scan --json --stream\nEvents (v1): start, source, count, company, project, error, done. See docs/import-scan-stream.md."
6280
+ }
6281
+ ],
6282
+ "arguments": [],
6283
+ "options": [
6284
+ {
6285
+ "flags": "--json",
6286
+ "description": "Print only the final done event as JSON",
6287
+ "hidden": false
6288
+ },
6289
+ {
6290
+ "flags": "--stream",
6291
+ "description": "With --json, print every scan event as JSON Lines while scanning",
6292
+ "hidden": false
6293
+ },
6294
+ {
6295
+ "flags": "--hq-root <path>",
6296
+ "description": "HQ folder (default: the folder the HQ installer recorded)",
6297
+ "hidden": false
6298
+ },
6299
+ {
6300
+ "flags": "--output <path>",
6301
+ "description": "Where to write report.json (default: <hq>/workspace/imports/<scan id>/report.json)",
6302
+ "hidden": false
6303
+ },
6304
+ {
6305
+ "flags": "--scope <dir>",
6306
+ "description": "Also scan this folder (repeatable)",
6307
+ "hidden": false,
6308
+ "defaultValue": []
6309
+ },
6310
+ {
6311
+ "flags": "--claude-export <path>",
6312
+ "description": "Include a claude.ai data export (unzipped folder or conversations.json)",
6313
+ "hidden": false
6314
+ },
6315
+ {
6316
+ "flags": "--no-default-scopes",
6317
+ "description": "Scan only --scope folders, not the default code folders",
6318
+ "hidden": false
6319
+ }
6320
+ ],
6321
+ "subcommands": []
6322
+ }
6323
+ ]
6324
+ },
6256
6325
  {
6257
6326
  "name": "reindex",
6258
6327
  "description": "Surface namespaced skills, materialize legacy knowledge repos, regenerate the workers registry, and trust HQ hooks for Codex, Grok, and Claude Code",
@@ -13278,7 +13347,7 @@ export const COMMAND_CATALOG = [
13278
13347
  "name": "lanes",
13279
13348
  "description": "Create, supervise, and steer worker lanes; routed decision queue",
13280
13349
  "aliases": [],
13281
- "hidden": true,
13350
+ "hidden": false,
13282
13351
  "helpOption": true,
13283
13352
  "helpCommand": true,
13284
13353
  "usage": "[options] [command]",
@@ -13286,6 +13355,66 @@ export const COMMAND_CATALOG = [
13286
13355
  "arguments": [],
13287
13356
  "options": [],
13288
13357
  "subcommands": [
13358
+ {
13359
+ "name": "session-start",
13360
+ "description": "Internal SessionStart bootstrap",
13361
+ "aliases": [],
13362
+ "hidden": true,
13363
+ "helpOption": true,
13364
+ "helpCommand": false,
13365
+ "usage": "[options]",
13366
+ "helpText": [],
13367
+ "arguments": [],
13368
+ "options": [
13369
+ {
13370
+ "flags": "--json",
13371
+ "description": "JSON on stdout (always)",
13372
+ "hidden": false
13373
+ }
13374
+ ],
13375
+ "subcommands": []
13376
+ },
13377
+ {
13378
+ "name": "reap",
13379
+ "description": "Classify local lanes whose session senior has ended; report only by default",
13380
+ "aliases": [
13381
+ "_reap"
13382
+ ],
13383
+ "hidden": false,
13384
+ "helpOption": true,
13385
+ "helpCommand": false,
13386
+ "usage": "[options]",
13387
+ "helpText": [],
13388
+ "arguments": [],
13389
+ "options": [
13390
+ {
13391
+ "flags": "--min-age <minutes>",
13392
+ "description": "Minimum lane age in minutes (default: 120)",
13393
+ "hidden": false
13394
+ },
13395
+ {
13396
+ "flags": "--apply-stale-state",
13397
+ "description": "Remove stale worker and watcher pid markers",
13398
+ "hidden": false
13399
+ },
13400
+ {
13401
+ "flags": "--stop",
13402
+ "description": "Stop candidate process trees when the hq-flags stop key is enabled",
13403
+ "hidden": false
13404
+ },
13405
+ {
13406
+ "flags": "--reason <text>",
13407
+ "description": "Required audit reason when --stop is set",
13408
+ "hidden": false
13409
+ },
13410
+ {
13411
+ "flags": "--json",
13412
+ "description": "Print machine-readable JSON (default)",
13413
+ "hidden": false
13414
+ }
13415
+ ],
13416
+ "subcommands": []
13417
+ },
13289
13418
  {
13290
13419
  "name": "checks",
13291
13420
  "description": "Evaluate tracker and lane health checks",
@@ -14028,6 +14157,11 @@ export const COMMAND_CATALOG = [
14028
14157
  "description": "HQ worker or reusable profile id",
14029
14158
  "hidden": false
14030
14159
  },
14160
+ {
14161
+ "flags": "--fresh-thread",
14162
+ "description": "Skip worker continuity and start a cold provider session",
14163
+ "hidden": false
14164
+ },
14031
14165
  {
14032
14166
  "flags": "--provider <name>",
14033
14167
  "description": "claude | codex | grok",
@@ -14438,6 +14572,11 @@ export const COMMAND_CATALOG = [
14438
14572
  "description": "Filter by senior ref",
14439
14573
  "hidden": false
14440
14574
  },
14575
+ {
14576
+ "flags": "--worker <id>",
14577
+ "description": "Filter by worker id",
14578
+ "hidden": false
14579
+ },
14441
14580
  {
14442
14581
  "flags": "--lane <id>",
14443
14582
  "description": "Filter by lane id (repeatable)",
@@ -14811,7 +14950,7 @@ export const COMMAND_CATALOG = [
14811
14950
  },
14812
14951
  {
14813
14952
  "flags": "--engine <engine>",
14814
- "description": "claude | codex | grok; defaults to HQ_CONDUCT_ENGINE or claude",
14953
+ "description": "claude | codex | grok; defaults to HQ_LANE_ENGINE (HQ_CONDUCT_ENGINE is deprecated) or claude",
14815
14954
  "hidden": false
14816
14955
  },
14817
14956
  {
@@ -16736,6 +16875,40 @@ export const COMMAND_CATALOG = [
16736
16875
  "arguments": [],
16737
16876
  "options": [],
16738
16877
  "subcommands": [
16878
+ {
16879
+ "name": "conflicts",
16880
+ "description": "Manage parked conflict copy notices",
16881
+ "aliases": [],
16882
+ "hidden": false,
16883
+ "helpOption": true,
16884
+ "helpCommand": true,
16885
+ "usage": "[options] [command]",
16886
+ "helpText": [],
16887
+ "arguments": [],
16888
+ "options": [],
16889
+ "subcommands": [
16890
+ {
16891
+ "name": "acknowledge",
16892
+ "description": "Acknowledge a parked conflict copy notice",
16893
+ "aliases": [],
16894
+ "hidden": false,
16895
+ "helpOption": true,
16896
+ "helpCommand": false,
16897
+ "usage": "[options] <noticeId>",
16898
+ "helpText": [],
16899
+ "arguments": [
16900
+ {
16901
+ "name": "noticeId",
16902
+ "required": true,
16903
+ "variadic": false,
16904
+ "description": ""
16905
+ }
16906
+ ],
16907
+ "options": [],
16908
+ "subcommands": []
16909
+ }
16910
+ ]
16911
+ },
16739
16912
  {
16740
16913
  "name": "status",
16741
16914
  "description": "Show sync ownership, heartbeat, last pass and log path",
@@ -346,6 +346,12 @@ export declare const REGISTRATION_PLAN: readonly [{
346
346
  readonly parent: "program";
347
347
  readonly module: "./commands/integrations.js";
348
348
  readonly exportName: "registerIntegrationsCommand";
349
+ }, {
350
+ readonly type: "registrar";
351
+ readonly root: "import";
352
+ readonly parent: "program";
353
+ readonly module: "./commands/import-scan.js";
354
+ readonly exportName: "registerImportCommand";
349
355
  }, {
350
356
  readonly type: "registrar";
351
357
  readonly root: "reindex";
@@ -442,7 +448,6 @@ export declare const REGISTRATION_PLAN: readonly [{
442
448
  readonly parent: "program";
443
449
  readonly module: "./commands/lanes.js";
444
450
  readonly exportName: "registerLanesCommand";
445
- readonly hidden: true;
446
451
  }, {
447
452
  readonly type: "registrar";
448
453
  readonly root: "monitor";
@@ -60,6 +60,7 @@ export const REGISTRATION_PLAN = [
60
60
  { type: "registrar", root: "sources", parent: "program", module: "./commands/sources.js", exportName: "registerSourcesCommand" },
61
61
  { type: "registrar", root: "signals", parent: "program", module: "./commands/signals.js", exportName: "registerSignalsCommand" },
62
62
  { type: "registrar", root: "integrations", parent: "program", module: "./commands/integrations.js", exportName: "registerIntegrationsCommand" },
63
+ { type: "registrar", root: "import", parent: "program", module: "./commands/import-scan.js", exportName: "registerImportCommand" },
63
64
  { type: "registrar", root: "reindex", parent: "program", module: "./commands/reindex.js", exportName: "registerReindexCommand" },
64
65
  { type: "registrar", root: "rescue", parent: "program", module: "./commands/rescue.js", exportName: "registerRescueCommand" },
65
66
  { type: "registrar", root: "mcp", parent: "program", module: "./commands/mcp-status.js", exportName: "registerMcpCommand" },
@@ -75,7 +76,7 @@ export const REGISTRATION_PLAN = [
75
76
  { type: "registrar", root: "index", parent: "program", module: "./commands/index-cmd.js", exportName: "registerIndexCommand" },
76
77
  { type: "registrar", root: "doctor", parent: "program", module: "./commands/doctor.js", exportName: "registerDoctorCommand" },
77
78
  { type: "registrar", root: "mesh", parent: "program", module: "./commands/mesh.js", exportName: "registerMeshCommand" },
78
- { type: "registrar", root: "lanes", parent: "program", module: "./commands/lanes.js", exportName: "registerLanesCommand", hidden: true },
79
+ { type: "registrar", root: "lanes", parent: "program", module: "./commands/lanes.js", exportName: "registerLanesCommand" },
79
80
  { type: "registrar", root: "monitor", parent: "program", module: "./commands/monitor.js", exportName: "registerMonitorCommand" },
80
81
  { type: "registrar", root: "daemon", parent: "program", module: "./commands/daemon.js", exportName: "registerDaemonCommand", hidden: true },
81
82
  { type: "registrar", root: "bot", parent: "program", module: "./commands/bot.js", exportName: "registerBotCommand" },
@@ -65,7 +65,10 @@ export declare function withSyncHealthReport<T>(run: () => Promise<T>): Promise<
65
65
  * nothing was scope-excluded. Keeping this pure makes the "never silently
66
66
  * succeed when files were dropped" guarantee unit-testable.
67
67
  */
68
+ export declare function scopeExcludedExitCode(count: number): 0 | 1;
68
69
  export declare function scopeExcludedWarning(count: number): string | null;
70
+ /** Actionable recovery for files refused because the vault baseline is stale. */
71
+ export declare function staleUploadRefusalLines(count: number, paths?: readonly string[]): string[];
69
72
  /**
70
73
  * Optional detail line listing the effective write prefixes when a push
71
74
  * dropped files — helps debug ACL vs scope-excluded mismatches (feedback_7e9c535e).
@@ -231,6 +234,8 @@ export interface ShareCallResult {
231
234
  filesSkipped: number;
232
235
  filesDeleted: number;
233
236
  filesExcludedByScope: number;
237
+ filesRefusedStale?: number;
238
+ filesRefusedStalePaths?: string[];
234
239
  conflictPaths: string[];
235
240
  aborted: boolean;
236
241
  /** Files this leg's plan limit refused; absent or null when none were. */
@@ -272,6 +277,8 @@ export interface PushAllResult {
272
277
  bytesUploaded: number;
273
278
  filesDeleted: number;
274
279
  filesExcludedByScope: number;
280
+ filesRefusedStale?: number;
281
+ filesRefusedStalePaths?: string[];
275
282
  errors: Array<{
276
283
  company: string;
277
284
  message: string;