@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
@@ -26,7 +26,11 @@
26
26
  * merge cannot rewrite (a copy, a knowledge file, a signal) is held.
27
27
  *
28
28
  * A signal whose `entity_refs` names a copy holds that copy: signals are
29
- * server-owned, so the ref cannot be re-pointed from here.
29
+ * server-owned, so the ref cannot be re-pointed from here. With `rewriteRefs`
30
+ * (flag `checkpoint.ontology.merge-rewrite-refs`) signal refs, invoice and
31
+ * bill links, source and knowledge links are re-pointed at the survivor, the
32
+ * survivor receives the copy's `external_ids` and `web_domains`, and only a
33
+ * link from another copy or an external id conflict holds a pair.
30
34
  *
31
35
  * With `pairKind: "variants"` (flag `checkpoint.ontology.merge-variants`) the
32
36
  * pairs are two-file duplicate groups whose canonical names differ only in
@@ -42,6 +46,12 @@ export declare const MERGE_COPIES_FLAG = "checkpoint.ontology.merge-copies";
42
46
  * names differ only in spacing, case or punctuation (CO-65).
43
47
  */
44
48
  export declare const MERGE_VARIANTS_FLAG = "checkpoint.ontology.merge-variants";
49
+ /**
50
+ * `merge-copies --rewrite-refs`: re-point signal `entity_refs`, invoice and
51
+ * bill links, source and knowledge links from a copy to its survivor, and
52
+ * carry the copy's `external_ids` and `web_domains` to the survivor.
53
+ */
54
+ export declare const MERGE_REWRITE_REFS_FLAG = "checkpoint.ontology.merge-rewrite-refs";
45
55
  export type CopySkipReason = "no_original" | "original_invalid" | "identity_differs" | "not_in_duplicate_group" | "group_size" | "type_differs" | "names_differ" | "numbered_copy" | "not_listed";
46
56
  export type PairKind = "numbered" | "variants";
47
57
  export interface CopySkip {
@@ -55,10 +65,22 @@ export interface CopyPair {
55
65
  /** Company-relative path of the original it merges into. */
56
66
  original: string;
57
67
  }
68
+ /**
69
+ * How to settle one provider's `external_ids` conflict: `primary` stays in
70
+ * `external_ids`, and the pair's other id moves to `external_refs` under
71
+ * `namespace` (the provider account or workspace) and `object_type`.
72
+ */
73
+ export interface ExternalIdResolution {
74
+ primary: string;
75
+ namespace: string;
76
+ object_type?: string;
77
+ }
58
78
  /** One entry of a `--only` list: an exact copy -> original pair. */
59
79
  export interface ListedPair {
60
80
  copy: string;
61
81
  original: string;
82
+ /** Provider -> resolution, applied only when `rewriteRefs` is on and the ids conflict. */
83
+ resolve_external_ids?: Record<string, ExternalIdResolution>;
62
84
  }
63
85
  export interface CopyPlan extends CopyPair {
64
86
  add_aliases: string[];
@@ -75,8 +97,14 @@ export interface CopyPlan extends CopyPair {
75
97
  /** Signal files whose `entity_refs` name the copy. */
76
98
  signal_refs: string[];
77
99
  /** Why the copy cannot be merged or deleted from here. */
78
- held?: "signal_refs" | "linked_from_unwritable" | "merge_invalid";
100
+ held?: "signal_refs" | "linked_from_unwritable" | "merge_invalid" | "external_id_conflict";
79
101
  detail?: string;
102
+ /** Keys added to the survivor. Set only when `rewriteRefs` is on. */
103
+ add_external_ids?: string[];
104
+ /** Domains added to the survivor. Set only when `rewriteRefs` is on. */
105
+ add_web_domains?: string[];
106
+ /** `system:namespace:recordId` refs added to the survivor's `external_refs`. Set only when `rewriteRefs` is on. */
107
+ add_external_refs?: string[];
80
108
  /** Body lines of the copy the merged original lacks; a copy with any is never deleted. */
81
109
  unmerged_body_lines: number;
82
110
  }
@@ -105,6 +133,8 @@ export interface MergeCopiesReport {
105
133
  }[];
106
134
  /** Listed entries the finder did not produce. Absent unless `--only` was set. */
107
135
  only_unmatched?: ListedPair[];
136
+ /** Signal, source and knowledge files re-pointed at a survivor. Absent unless `rewriteRefs` was set. */
137
+ rewritten?: string[];
108
138
  /** Entity-file links whose target file does not exist. */
109
139
  broken_links_before: number;
110
140
  broken_links_after: number;
@@ -123,6 +153,8 @@ export interface MergeCopiesOptions {
123
153
  limit?: number;
124
154
  /** Handle only these exact pairs; every other found pair is skipped as `not_listed`. */
125
155
  only?: ListedPair[];
156
+ /** Re-point refs and links held today, and carry ids and domains (flag merge-rewrite-refs). */
157
+ rewriteRefs?: boolean;
126
158
  now: Date;
127
159
  deleteVaultKey?: DeleteVaultKey;
128
160
  }