@indigoai-us/hq-cli 5.345.245 → 5.345.247

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 (127) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/dist/command-catalog.generated.d.ts +96 -9
  3. package/dist/command-catalog.generated.js +117 -9
  4. package/dist/commands/bot.js +1 -1
  5. package/dist/commands/core-checkpoint-native.d.ts +5 -1
  6. package/dist/commands/core-checkpoint-native.js +13 -5
  7. package/dist/commands/deploy-comments.js +139 -0
  8. package/dist/commands/deploy-list.d.ts +5 -0
  9. package/dist/commands/deploy-list.js +8 -0
  10. package/dist/commands/dm.d.ts +4 -1
  11. package/dist/commands/dm.js +11 -2
  12. package/dist/commands/files.d.ts +11 -2
  13. package/dist/commands/files.js +48 -3
  14. package/dist/commands/install-global.d.ts +15 -0
  15. package/dist/commands/install-global.js +98 -4
  16. package/dist/commands/lanes-loop.js +4 -1
  17. package/dist/commands/lanes.js +16 -5
  18. package/dist/commands/mcp-registration.d.ts +17 -0
  19. package/dist/commands/mcp-registration.js +119 -0
  20. package/dist/commands/mesh.d.ts +2 -0
  21. package/dist/commands/mesh.js +26 -6
  22. package/dist/commands/pkg-install.js +1 -1
  23. package/dist/commands/reindex.js +3 -2
  24. package/dist/commands/rescue.d.ts +22 -1
  25. package/dist/commands/rescue.js +56 -9
  26. package/dist/commands/sources.d.ts +1 -1
  27. package/dist/commands/sources.js +1 -1
  28. package/dist/commands/storage.d.ts +15 -2
  29. package/dist/commands/storage.js +74 -7
  30. package/dist/hq-cloud-sync-runner/bin/sync-runner.js +232 -225
  31. package/dist/hq-cloud-sync-runner/package.json +1 -1
  32. package/dist/lib/agent-kit/mcp/tools.js +22 -0
  33. package/dist/lib/bot/jobs/hot-signal-sync.js +4 -1
  34. package/dist/lib/daemon/fleet-members-cache.d.ts +55 -0
  35. package/dist/lib/daemon/fleet-members-cache.js +266 -0
  36. package/dist/lib/daemon/handoff.d.ts +4 -0
  37. package/dist/lib/daemon/handoff.js +2 -1
  38. package/dist/lib/daemon/hook-requests.d.ts +2 -1
  39. package/dist/lib/daemon/hook-requests.js +19 -2
  40. package/dist/lib/daemon/install.d.ts +9 -1
  41. package/dist/lib/daemon/install.js +11 -2
  42. package/dist/lib/daemon/ops/policy.d.ts +23 -3
  43. package/dist/lib/daemon/ops/policy.js +62 -15
  44. package/dist/lib/daemon/run.js +12 -0
  45. package/dist/lib/daemon/server.d.ts +5 -0
  46. package/dist/lib/daemon/server.js +1 -1
  47. package/dist/lib/daemon/supervisor.d.ts +6 -0
  48. package/dist/lib/daemon/supervisor.js +31 -2
  49. package/dist/lib/doctor/checks/antigravity-wiring.d.ts +21 -0
  50. package/dist/lib/doctor/checks/antigravity-wiring.js +75 -0
  51. package/dist/lib/doctor/checks/anywhere.js +30 -0
  52. package/dist/lib/doctor/checks/runtime-probe.js +13 -0
  53. package/dist/lib/doctor/checks/sync-runtime.js +8 -1
  54. package/dist/lib/doctor/platform.d.ts +1 -1
  55. package/dist/lib/doctor/platform.js +5 -0
  56. package/dist/lib/doctor/registry.js +3 -0
  57. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  58. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  59. package/dist/lib/hook-engine/coverage.d.ts +159 -0
  60. package/dist/lib/hook-engine/coverage.js +347 -0
  61. package/dist/lib/hook-engine/native-precompact-compatibility.json +1 -0
  62. package/dist/lib/hot-channels/signals-pass.d.ts +52 -2
  63. package/dist/lib/hot-channels/signals-pass.js +65 -3
  64. package/dist/lib/install/antigravity-targets.d.ts +39 -0
  65. package/dist/lib/install/antigravity-targets.js +122 -0
  66. package/dist/lib/install/claude-targets.d.ts +6 -0
  67. package/dist/lib/install/claude-targets.js +9 -1
  68. package/dist/lib/lanes/reconcile-result.d.ts +1 -1
  69. package/dist/lib/lanes/reconcile.js +19 -4
  70. package/dist/lib/lanes/remote-control-lane.d.ts +6 -0
  71. package/dist/lib/lanes/remote-control-lane.js +10 -1
  72. package/dist/lib/lanes/spawn.d.ts +2 -0
  73. package/dist/lib/lanes/spawn.js +19 -3
  74. package/dist/lib/lanes/worker-env-scrub.d.ts +48 -0
  75. package/dist/lib/lanes/worker-env-scrub.js +146 -0
  76. package/dist/lib/lanes/worker-process.js +4 -1
  77. package/dist/lib/mesh/client.js +5 -1
  78. package/dist/lib/mesh/live/daemon/doctor.d.ts +9 -0
  79. package/dist/lib/mesh/live/daemon/doctor.js +51 -6
  80. package/dist/lib/mesh/live/daemon/install.d.ts +39 -0
  81. package/dist/lib/mesh/live/daemon/install.js +70 -0
  82. package/dist/lib/mesh/live/daemon/outbox-company.d.ts +47 -0
  83. package/dist/lib/mesh/live/daemon/outbox-company.js +77 -0
  84. package/dist/lib/mesh/live/daemon/run.d.ts +2 -0
  85. package/dist/lib/mesh/live/daemon/run.js +48 -3
  86. package/dist/lib/mesh/live/daemon/state.d.ts +5 -0
  87. package/dist/lib/mesh/live/daemon/system-unit.d.ts +21 -0
  88. package/dist/lib/mesh/live/daemon/system-unit.js +80 -0
  89. package/dist/lib/mesh/live/daemon/transcript-watch.d.ts +4 -1
  90. package/dist/lib/mesh/live/daemon/transcript-watch.js +42 -38
  91. package/dist/lib/mesh/live/direct-drain.js +3 -1
  92. package/dist/lib/mesh/live/emit.js +4 -2
  93. package/dist/lib/mesh/live/flush.d.ts +61 -0
  94. package/dist/lib/mesh/live/flush.js +434 -114
  95. package/dist/lib/mesh/live/paths.d.ts +10 -0
  96. package/dist/lib/mesh/live/paths.js +14 -0
  97. package/dist/lib/mesh/live/reporting-privacy.d.ts +41 -1
  98. package/dist/lib/mesh/live/reporting-privacy.js +81 -7
  99. package/dist/lib/mesh/live/spool.d.ts +171 -17
  100. package/dist/lib/mesh/live/spool.js +777 -62
  101. package/dist/lib/signals/engine.d.ts +82 -2
  102. package/dist/lib/signals/engine.js +389 -53
  103. package/dist/lib/signals/steps/extract.js +5 -0
  104. package/dist/lib/work-context/organize.d.ts +22 -4
  105. package/dist/lib/work-context/organize.js +50 -21
  106. package/dist/lib/work-context/paths.d.ts +6 -0
  107. package/dist/lib/work-context/paths.js +9 -0
  108. package/dist/lib/work-context/reconcile.d.ts +1 -1
  109. package/dist/lib/work-context/reconcile.js +1 -1
  110. package/dist/startup-registration.d.ts +14 -0
  111. package/dist/startup-registration.js +26 -0
  112. package/dist/utils/cli-telemetry.d.ts +6 -0
  113. package/dist/utils/cli-telemetry.js +154 -9
  114. package/dist/utils/github-tag-fallback.d.ts +7 -2
  115. package/dist/utils/github-tag-fallback.js +17 -8
  116. package/dist/utils/hq-core-source.d.ts +31 -0
  117. package/dist/utils/hq-core-source.js +144 -0
  118. package/dist/utils/interactive-caller.d.ts +6 -0
  119. package/dist/utils/interactive-caller.js +8 -0
  120. package/dist/utils/shipped-codex-hooks.d.ts +6 -4
  121. package/dist/utils/shipped-codex-hooks.js +22 -10
  122. package/dist/utils/vault-api.js +1 -0
  123. package/dist/utils/version-report.d.ts +3 -1
  124. package/dist/utils/version-report.js +13 -5
  125. package/docs/anywhere-runtime.md +2 -2
  126. package/package.json +8 -8
  127. package/scripts/check-function-manifest.mjs +99 -18
@@ -121,6 +121,21 @@ export interface LockedCompany {
121
121
  startedAt: string;
122
122
  trigger: string;
123
123
  }
124
+ /** A non-job run that shared the day with a finished job. The job row stays. */
125
+ export interface ManualRunRef {
126
+ path: string;
127
+ status: RunStatus;
128
+ startedAt: string;
129
+ finishedAt: string | null;
130
+ itemsIn: number;
131
+ itemsOut: number;
132
+ estimatedSpendUsd: number;
133
+ /**
134
+ * Only on incrementalRun: the passes whose items and spend are added into
135
+ * this entry. They share one record file, which holds the latest pass.
136
+ */
137
+ passes?: number;
138
+ }
124
139
  export interface RunSummaryEntry {
125
140
  company: string;
126
141
  status: RunStatus;
@@ -133,18 +148,34 @@ export interface RunSummaryEntry {
133
148
  itemsIn: number;
134
149
  itemsOut: number;
135
150
  estimatedSpendUsd: number;
151
+ /** Every non-job, non-incremental run that wrote its own record beside the job's, oldest first. */
152
+ manualRuns?: ManualRunRef[];
153
+ /** The newest entry of manualRuns. */
154
+ lastManualRun?: ManualRunRef;
155
+ /** The incremental passes that ran beside the job's record: one file, the passes' totals added up. */
156
+ incrementalRun?: ManualRunRef;
136
157
  }
137
158
  export interface RunSummary {
138
159
  schemaVersion: typeof RUN_RECORD_SCHEMA_VERSION;
139
160
  date: string;
140
161
  trigger: SignalsTrigger;
141
162
  companies: RunSummaryEntry[];
163
+ /** Every company row plus every run under manualRuns and incrementalRun, each counted once. */
142
164
  totals: {
143
165
  itemsIn: number;
144
166
  itemsOut: number;
145
167
  estimatedSpendUsd: number;
146
168
  };
169
+ /** Rolled up from the company rows only. Runs beside a job's record never change it. */
147
170
  status: RunStatus;
171
+ /** Rolled up from manualRuns and incrementalRun. Absent when the day has none. */
172
+ manualStatus?: RunStatus;
173
+ /** The part of totals that came from manualRuns and incrementalRun. Absent when the day has none. */
174
+ manualTotals?: {
175
+ itemsIn: number;
176
+ itemsOut: number;
177
+ estimatedSpendUsd: number;
178
+ };
148
179
  finishedAt: string;
149
180
  }
150
181
  export interface RunSignalsResult {
@@ -229,6 +260,38 @@ export declare class SignalsConfigError extends Error {
229
260
  export declare const defaultSpawn: SpawnSyncFn;
230
261
  export { localDate };
231
262
  export declare function runRecordRel(date: string, company: string): string;
263
+ /** Local HHMMSS stamp for a sidecar record. Seconds keep two runs in the same minute apart. */
264
+ export declare function manualRunStamp(startedAt: Date): string;
265
+ /**
266
+ * Folder for the records a company's runs write beside its day record. It is a
267
+ * subfolder of the day's runs folder, one per company: the Daily Brief gate
268
+ * lists `runs/<date>/*.json` and takes every file name there as a company, so
269
+ * no record other than a day record may sit at that level. A folder per
270
+ * company also keeps a slug with a dot in it away from another company's files.
271
+ * Windows drops the dots at the end of a folder name, so `acme.` would share
272
+ * `acme`'s folder there: each dot at the end is written as `%2E`, which no
273
+ * slug can contain.
274
+ */
275
+ export declare function sidecarDirRel(date: string, company: string): string;
276
+ /**
277
+ * Sidecar for a non-job run on a day whose job record must stay put. `n` (2
278
+ * and up) tells apart runs that started in the same second.
279
+ */
280
+ export declare function manualRunRecordRel(date: string, company: string, startedAt: Date, n?: number): string;
281
+ /**
282
+ * The one record every incremental pass writes on a day whose job record must
283
+ * stay put. Each pass overwrites it: a meeting runs a pass every few seconds,
284
+ * so a file per pass would grow without bound.
285
+ */
286
+ export declare function incrementalRunRecordRel(date: string, company: string): string;
287
+ /**
288
+ * The runs of the day the owner was alerted for, one key per run. The
289
+ * stopped-run check reads it so each stopped run is alerted once, whatever
290
+ * other run was alerted before or after it.
291
+ */
292
+ export declare function alertedRunsRel(date: string, company: string): string;
293
+ /** The company's manual-run sidecar records for the day, by file name. */
294
+ export declare function manualRunRecordRels(hqRoot: string, date: string, company: string): string[];
232
295
  export declare function summaryRel(date: string): string;
233
296
  /** Companies under companies/ that are also listed in companies/manifest.yaml. */
234
297
  export declare function listCompanies(hqRoot: string): string[];
@@ -265,8 +328,17 @@ export declare function signalsExitCode(result: RunSignalsResult): 0 | 1 | 3;
265
328
  * same rule, formatter, owner DM and hourly dedupe as the end-of-run alert
266
329
  * (`raiseSignalsRunAlerts`). A run whose extract step never finished alerts
267
330
  * only when its adapters step landed sources, as the end-of-run alert does.
268
- * One run is alerted once: when the shared dedupe file already holds an
269
- * alert sent at or after the run started, nothing is sent. Never throws.
331
+ * Each stopped run is alerted once: a run the owner was alerted for is
332
+ * listed in the day's alerted-runs file, by this check and by the end-of-run
333
+ * alert, and is not sent again. An alert for one run never covers another.
334
+ * When that file cannot be written, the check falls back to what it can
335
+ * still read: the runs this process alerted for (kept in memory), and the
336
+ * shared dedupe file in the company vault, where an alert sent at or after a
337
+ * run started covers that run. A DM that went out is always returned as sent.
338
+ * The manual runs written beside the day record are judged the same way,
339
+ * whether or not a later run finished after them. An incremental pass is not
340
+ * judged: it has no adapters step, so the rule above never counts it. Never
341
+ * throws.
270
342
  */
271
343
  export declare function raiseStoppedRunAlert(input: {
272
344
  hqRoot: string;
@@ -280,4 +352,12 @@ export declare function raiseStoppedRunAlert(input: {
280
352
  */
281
353
  daysAgo?: 0 | 1;
282
354
  }): Promise<RaiseSignalsFailureAlertsResult | null>;
355
+ /**
356
+ * The company's records for the day that the stopped-run check can judge: the
357
+ * day record and every manual-run sidecar, newest start first. A sidecar that
358
+ * started in the same instant as the day record sorts first: it is only ever
359
+ * written after that job finished. The shared incremental record is left out:
360
+ * a pass has only an extract step, which the alert rule never counts.
361
+ */
362
+ export declare function dayRunRecords(hqRoot: string, date: string, company: string): RunRecord[];
283
363
  //# sourceMappingURL=engine.d.ts.map