@indigoai-us/hq-cli 5.289.0 → 5.291.0

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 (65) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/assets/scaffold/core/scripts/handoff-finalize.sh +670 -0
  3. package/assets/scaffold/core/scripts/handoff-open-steps.sh +81 -0
  4. package/assets/scaffold/core/scripts/handoff-post.sh +187 -0
  5. package/assets/scaffold/core/scripts/hook-lib.sh +345 -50
  6. package/assets/scaffold/core/scripts/hq-session.sh +182 -21
  7. package/assets/scaffold/core/scripts/jobs-schedule-parse.sh +310 -0
  8. package/assets/scaffold/core/scripts/jobs-validate.sh +451 -0
  9. package/assets/scaffold/core/scripts/lib/session-id.sh +3 -2
  10. package/assets/scaffold/core/scripts/lib/work-mesh-enqueue.sh +2 -1
  11. package/assets/scaffold/core/scripts/qmd-reindex-bg.sh +40 -0
  12. package/dist/command-catalog.generated.d.ts +110 -0
  13. package/dist/command-catalog.generated.js +136 -0
  14. package/dist/commands/cloud.d.ts +26 -14
  15. package/dist/commands/cloud.js +207 -56
  16. package/dist/commands/core-handoff.d.ts +22 -0
  17. package/dist/commands/core-handoff.js +1240 -0
  18. package/dist/commands/core-jobs-native.d.ts +8 -0
  19. package/dist/commands/core-jobs-native.js +624 -0
  20. package/dist/commands/core-native-jobs-flag.d.ts +4 -0
  21. package/dist/commands/core-native-jobs-flag.js +7 -0
  22. package/dist/commands/core-ontology.d.ts +6 -1
  23. package/dist/commands/core-ontology.js +42 -7
  24. package/dist/commands/core-policy.js +24 -5
  25. package/dist/commands/core.js +15 -1
  26. package/dist/commands/integrations-core.js +7 -0
  27. package/dist/commands/lanes.js +111 -35
  28. package/dist/commands/members.js +5 -0
  29. package/dist/commands/mesh.js +46 -25
  30. package/dist/commands/personal-targeted-push-flag.d.ts +4 -0
  31. package/dist/commands/personal-targeted-push-flag.js +7 -0
  32. package/dist/commands/personal-targeted-push-paths.d.ts +3 -0
  33. package/dist/commands/personal-targeted-push-paths.js +67 -0
  34. package/dist/commands/secrets.js +9 -0
  35. package/dist/commands/skill.d.ts +3 -0
  36. package/dist/commands/skill.js +28 -0
  37. package/dist/fast-core.js +1 -0
  38. package/dist/lib/billing/free-month.d.ts +18 -0
  39. package/dist/lib/billing/free-month.js +31 -0
  40. package/dist/lib/billing/plan-limit-refusals.d.ts +69 -0
  41. package/dist/lib/billing/plan-limit-refusals.js +187 -0
  42. package/dist/lib/billing/plan-lock.d.ts +2 -6
  43. package/dist/lib/billing/plan-lock.js +5 -16
  44. package/dist/lib/checkpoint-ontology/entity-file.d.ts +21 -0
  45. package/dist/lib/checkpoint-ontology/entity-file.js +100 -0
  46. package/dist/lib/checkpoint-ontology/merge-copies.d.ts +34 -2
  47. package/dist/lib/checkpoint-ontology/merge-copies.js +541 -27
  48. package/dist/lib/core-utils/secret-patterns.d.ts +3 -1
  49. package/dist/lib/core-utils/secret-patterns.js +3 -2
  50. package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
  51. package/dist/lib/flag-registry-worker-source.generated.js +1 -1
  52. package/dist/lib/lanes/autopilot.d.ts +69 -0
  53. package/dist/lib/lanes/autopilot.js +418 -0
  54. package/dist/lib/lanes/mesh-events.js +2 -0
  55. package/dist/lib/lanes/store.d.ts +4 -2
  56. package/dist/lib/lanes/store.js +18 -9
  57. package/dist/lib/mesh/api.js +4 -0
  58. package/dist/lib/mesh/live/daemon/state.d.ts +7 -1
  59. package/dist/lib/mesh/live/daemon/state.js +34 -2
  60. package/dist/main.js +23 -12
  61. package/dist/utils/plan-gate-error.d.ts +24 -0
  62. package/dist/utils/plan-gate-error.js +219 -9
  63. package/dist/utils/self-update.d.ts +3 -0
  64. package/dist/utils/self-update.js +232 -1
  65. package/package.json +2 -2
@@ -6734,6 +6734,10 @@ export const COMMAND_CATALOG = [
6734
6734
  "flags": "--only <file>",
6735
6735
  "description": "handle only the copy -> original pairs listed in this JSON file"
6736
6736
  },
6737
+ {
6738
+ "flags": "--rewrite-refs",
6739
+ "description": "also re-point signal refs, invoice, source and knowledge links to the survivor and carry external ids and web domains (checkpoint.ontology.merge-rewrite-refs)"
6740
+ },
6737
6741
  {
6738
6742
  "flags": "--json",
6739
6743
  "description": "print JSON"
@@ -6976,6 +6980,65 @@ export const COMMAND_CATALOG = [
6976
6980
  }
6977
6981
  ]
6978
6982
  },
6983
+ {
6984
+ "name": "handoff",
6985
+ "description": "Handoff session helpers",
6986
+ "aliases": [],
6987
+ "hidden": false,
6988
+ "usage": "[options] [command]",
6989
+ "arguments": [],
6990
+ "options": [],
6991
+ "subcommands": [
6992
+ {
6993
+ "name": "finalize",
6994
+ "description": "Write and commit the current session handoff",
6995
+ "aliases": [],
6996
+ "hidden": false,
6997
+ "usage": "[args...]",
6998
+ "arguments": [
6999
+ {
7000
+ "name": "args",
7001
+ "required": false,
7002
+ "variadic": true
7003
+ }
7004
+ ],
7005
+ "options": [],
7006
+ "subcommands": []
7007
+ },
7008
+ {
7009
+ "name": "post",
7010
+ "description": "Run best-effort post-handoff maintenance",
7011
+ "aliases": [],
7012
+ "hidden": false,
7013
+ "usage": "[args...]",
7014
+ "arguments": [
7015
+ {
7016
+ "name": "args",
7017
+ "required": false,
7018
+ "variadic": true
7019
+ }
7020
+ ],
7021
+ "options": [],
7022
+ "subcommands": []
7023
+ },
7024
+ {
7025
+ "name": "open-steps",
7026
+ "description": "List and update open handoff steps",
7027
+ "aliases": [],
7028
+ "hidden": false,
7029
+ "usage": "[args...]",
7030
+ "arguments": [
7031
+ {
7032
+ "name": "args",
7033
+ "required": false,
7034
+ "variadic": true
7035
+ }
7036
+ ],
7037
+ "options": [],
7038
+ "subcommands": []
7039
+ }
7040
+ ]
7041
+ },
6979
7042
  {
6980
7043
  "name": "knowledge-prefs",
6981
7044
  "description": "Resolve a company knowledge-store preference",
@@ -7051,6 +7114,49 @@ export const COMMAND_CATALOG = [
7051
7114
  }
7052
7115
  ]
7053
7116
  },
7117
+ {
7118
+ "name": "jobs",
7119
+ "description": "Scheduled jobs helpers",
7120
+ "aliases": [],
7121
+ "hidden": false,
7122
+ "usage": "[options] [command]",
7123
+ "arguments": [],
7124
+ "options": [],
7125
+ "subcommands": [
7126
+ {
7127
+ "name": "schedule-parse",
7128
+ "description": "Resolve natural-language or raw cron schedules",
7129
+ "aliases": [],
7130
+ "hidden": false,
7131
+ "usage": "[args...]",
7132
+ "arguments": [
7133
+ {
7134
+ "name": "args",
7135
+ "required": false,
7136
+ "variadic": true
7137
+ }
7138
+ ],
7139
+ "options": [],
7140
+ "subcommands": []
7141
+ },
7142
+ {
7143
+ "name": "validate",
7144
+ "description": "Validate scheduled-job YAML files",
7145
+ "aliases": [],
7146
+ "hidden": false,
7147
+ "usage": "[args...]",
7148
+ "arguments": [
7149
+ {
7150
+ "name": "args",
7151
+ "required": false,
7152
+ "variadic": true
7153
+ }
7154
+ ],
7155
+ "options": [],
7156
+ "subcommands": []
7157
+ }
7158
+ ]
7159
+ },
7054
7160
  {
7055
7161
  "name": "worktree-gc",
7056
7162
  "description": "Safely collect old, preserved HQ worktrees",
@@ -11367,6 +11473,36 @@ export const COMMAND_CATALOG = [
11367
11473
  ],
11368
11474
  "subcommands": []
11369
11475
  },
11476
+ {
11477
+ "name": "autopilot",
11478
+ "description": "Check registered team leads and wake them for ready work",
11479
+ "aliases": [],
11480
+ "hidden": false,
11481
+ "usage": "[options] [command]",
11482
+ "arguments": [],
11483
+ "options": [],
11484
+ "subcommands": [
11485
+ {
11486
+ "name": "run",
11487
+ "description": "Run one lead autopilot check pass",
11488
+ "aliases": [],
11489
+ "hidden": false,
11490
+ "usage": "[options]",
11491
+ "arguments": [],
11492
+ "options": [
11493
+ {
11494
+ "flags": "--dry-run",
11495
+ "description": "Report proposed wakes without writing them"
11496
+ },
11497
+ {
11498
+ "flags": "--json",
11499
+ "description": "Emit JSON on stdout (default)"
11500
+ }
11501
+ ],
11502
+ "subcommands": []
11503
+ }
11504
+ ]
11505
+ },
11370
11506
  {
11371
11507
  "name": "reconcile",
11372
11508
  "description": "Run one machine-owned reconcile pass and exit",
@@ -15,6 +15,7 @@
15
15
  import { Command } from "commander";
16
16
  import { type ConflictStrategy, type EntityContext, type MembershipSyncConfig, type SyncMode, type PullScope, type ExplicitGrant, type ShareOptions, type VaultServiceConfig } from "@indigoai-us/hq-cloud";
17
17
  import { type BannerLevel } from "../lib/narrow-hint-banner.js";
18
+ import { type PlanLimitRefusalSummary } from "../lib/billing/plan-limit-refusals.js";
18
19
  /**
19
20
  * Terminal-failure signal for the sync fanout runners. The runners
20
21
  * (`runPushAll` / `runPullAll` / `runPullPersonal` / `runNowSingle` /
@@ -28,7 +29,16 @@ import { type BannerLevel } from "../lib/narrow-hint-banner.js";
28
29
  */
29
30
  export declare class SyncExitError extends Error {
30
31
  readonly code: number;
31
- constructor(code: number);
32
+ /**
33
+ * The client-health outcome to record for this exit. A run whose only
34
+ * problem was a plan-limit refusal exits non-zero (it did not upload what
35
+ * was asked) but is not a sync failure: the engine worked and the refusal
36
+ * is plan state, so it must not count toward `consecutiveFailures`.
37
+ */
38
+ readonly health: "failed" | "succeeded";
39
+ constructor(code: number, opts?: {
40
+ health?: "failed" | "succeeded";
41
+ });
32
42
  }
33
43
  /**
34
44
  * Preserve the vault's typed write-scope refusal at the CLI boundary. This is
@@ -197,6 +207,12 @@ export interface PullAllRow {
197
207
  }
198
208
  export interface ShareCallOptions {
199
209
  company: string;
210
+ /**
211
+ * The target's display slug, or undefined for the personal vault. Labels the
212
+ * shared progress snapshot and builds the company billing link for a
213
+ * plan-limit refusal that arrived without one.
214
+ */
215
+ targetSlug?: string;
200
216
  hqRoot: string;
201
217
  paths: string[];
202
218
  onConflict?: ConflictStrategy;
@@ -217,6 +233,8 @@ export interface ShareCallResult {
217
233
  filesExcludedByScope: number;
218
234
  conflictPaths: string[];
219
235
  aborted: boolean;
236
+ /** Files this leg's plan limit refused; absent or null when none were. */
237
+ planLimit?: PlanLimitRefusalSummary | null;
220
238
  }
221
239
  export interface PushAllDeps {
222
240
  vaultClient: PullAllVaultClient;
@@ -294,22 +312,16 @@ export declare function pushShareCredentials(input: {
294
312
  */
295
313
  export declare function resolveCanonicalPersonUid(vaultClient: PullAllVaultClient): Promise<string>;
296
314
  /**
297
- * Refuse `hq sync push --personal <path>` — the combination silently
298
- * bypasses `PERSONAL_VAULT_EXCLUDED_TOP_LEVEL` (which is only applied by
299
- * `computePersonalVaultPaths`), risking cross-scope upload of `companies/`,
300
- * `repos/`, `workspace/`, or `.git/` content to the personal vault. Real
301
- * incident (2026-05-21): a single command uploaded 196 `companies/{slug}/**`
302
- * objects to a personal vault before being killed. Cleanup required a
303
- * hand-rolled S3 sweep. Closes hq-cli#25.
304
- *
305
- * Refusal — not silent filtering — is intentional: explicit is better than
306
- * implicit guesswork, and the legitimate "I want to push a subset of my
307
- * personal vault" use case has a clean workaround (drop `--personal`, the
308
- * subset upload targets the active company via standard semantics).
315
+ * Keep `hq sync push --personal <path>` refused by default. Positional paths
316
+ * bypass `computePersonalVaultPaths` and can send excluded `companies/`,
317
+ * `repos/`, `workspace/`, or `.git/` content to the personal vault. The
318
+ * default-off targeted-paths gate allows the combination only after every
319
+ * path is realpath-normalized and checked against the computed personal scope
320
+ * and its file exclusions. Closes hq-cli#25.
309
321
  */
310
322
  export declare function assertNoPersonalPositionalPaths(opts: {
311
323
  personal?: boolean;
312
- }, paths: string[] | undefined): void;
324
+ }, paths: string[] | undefined, targetedPersonalPathsEnabled?: boolean): void;
313
325
  /**
314
326
  * Refuse ambiguous selector combinations. `--all`, `--personal`, and
315
327
  * `--company` are mutually exclusive — at most one may be set per