@indigoai-us/hq-cli 5.345.247 → 5.345.248

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 (239) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/assets/lanes-hooks/hq-lanes-drain.sh +1 -1
  3. package/contracts/host-canary-release.json +14 -0
  4. package/dist/command-catalog.generated.d.ts +1113 -0
  5. package/dist/command-catalog.generated.js +1370 -0
  6. package/dist/command-registration-plan.d.ts +6 -0
  7. package/dist/command-registration-plan.js +1 -0
  8. package/dist/commands/lanes-hold.js +7 -7
  9. package/dist/commands/lanes-resume.js +2 -2
  10. package/dist/commands/lanes-review.js +1 -1
  11. package/dist/commands/lanes-session-start.d.ts +1 -1
  12. package/dist/commands/lanes-session-start.js +3 -3
  13. package/dist/commands/lanes-shared.d.ts +1 -1
  14. package/dist/commands/lanes.d.ts +2 -2
  15. package/dist/commands/lanes.js +50 -50
  16. package/dist/commands/mesh.d.ts +25 -0
  17. package/dist/commands/mesh.js +48 -8
  18. package/dist/commands/ontology-graph.d.ts +62 -0
  19. package/dist/commands/ontology-graph.js +439 -0
  20. package/dist/index.js +1 -1
  21. package/dist/lanes-monitor-check-argv.d.ts +1 -1
  22. package/dist/lanes-monitor-check-argv.js +1 -1
  23. package/dist/lanes-monitor-check-fast.d.ts +1 -1
  24. package/dist/lanes-monitor-check-fast.js +1 -1
  25. package/dist/lanes-session-start-argv.d.ts +1 -1
  26. package/dist/lanes-session-start-argv.js +1 -1
  27. package/dist/lib/capacity/sign-in.d.ts +1 -1
  28. package/dist/lib/capacity/sign-in.js +1 -1
  29. package/dist/lib/daemon/hook-requests-conduct-link.js +2 -2
  30. package/dist/lib/daemon/lanes-monitor-state.d.ts +2 -2
  31. package/dist/lib/daemon/lanes-monitor-state.js +2 -2
  32. package/dist/lib/daemon/merge-sections.d.ts +3 -3
  33. package/dist/lib/daemon/merge-sections.js +7 -7
  34. package/dist/lib/daemon/remote-control-pools.js +1 -1
  35. package/dist/lib/daemon/run.js +1 -1
  36. package/dist/lib/daemon/state-file.d.ts +1 -1
  37. package/dist/lib/daemon/state-file.js +1 -1
  38. package/dist/lib/flag-snapshot-file.d.ts +2 -0
  39. package/dist/lib/flag-snapshot-file.js +118 -48
  40. package/dist/lib/hook-engine/canary-gate.d.ts +57 -3
  41. package/dist/lib/hook-engine/canary-gate.js +138 -6
  42. package/dist/lib/hot-channels/graph-context.d.ts +105 -0
  43. package/dist/lib/hot-channels/graph-context.js +377 -0
  44. package/dist/lib/hot-channels/signals-pass.js +27 -1
  45. package/dist/lib/lanes/claude-credential.d.ts +1 -1
  46. package/dist/lib/lanes/claude-credential.js +1 -1
  47. package/dist/lib/lanes/delivery-core.d.ts +1 -1
  48. package/dist/lib/lanes/delivery-core.js +1 -1
  49. package/dist/lib/lanes/delivery.d.ts +10 -10
  50. package/dist/lib/lanes/delivery.js +8 -8
  51. package/dist/lib/lanes/dropbox.d.ts +1 -1
  52. package/dist/lib/lanes/dropbox.js +1 -1
  53. package/dist/lib/lanes/hooks-install.js +2 -2
  54. package/dist/lib/lanes/index.d.ts +1 -1
  55. package/dist/lib/lanes/index.js +1 -1
  56. package/dist/lib/lanes/monitor.js +1 -1
  57. package/dist/lib/lanes/quota-notice.js +1 -1
  58. package/dist/lib/lanes/quota.d.ts +1 -1
  59. package/dist/lib/lanes/quota.js +1 -1
  60. package/dist/lib/lanes/repo-merge-hold.d.ts +2 -2
  61. package/dist/lib/lanes/repo-merge-hold.js +2 -2
  62. package/dist/lib/lanes/spawn.d.ts +4 -4
  63. package/dist/lib/lanes/spawn.js +5 -5
  64. package/dist/lib/mesh/live/company-flag-refresh.d.ts +61 -0
  65. package/dist/lib/mesh/live/company-flag-refresh.js +159 -0
  66. package/dist/lib/mesh/live/company-reporting-gaps.d.ts +61 -0
  67. package/dist/lib/mesh/live/company-reporting-gaps.js +238 -0
  68. package/dist/lib/mesh/live/daemon/duplicate-unit.d.ts +156 -0
  69. package/dist/lib/mesh/live/daemon/duplicate-unit.js +616 -0
  70. package/dist/lib/mesh/live/daemon/run.d.ts +13 -0
  71. package/dist/lib/mesh/live/daemon/run.js +35 -2
  72. package/dist/lib/mesh/live/direct-drain.js +1 -1
  73. package/dist/lib/mesh/live/emit.d.ts +3 -0
  74. package/dist/lib/mesh/live/emit.js +32 -9
  75. package/dist/lib/mesh/live/flush.d.ts +3 -0
  76. package/dist/lib/mesh/live/flush.js +115 -32
  77. package/dist/lib/mesh/live/liveness-carry.d.ts +1 -1
  78. package/dist/lib/mesh/live/liveness-carry.js +1 -1
  79. package/dist/lib/mesh/live/reporting-privacy.d.ts +119 -3
  80. package/dist/lib/mesh/live/reporting-privacy.js +235 -11
  81. package/dist/lib/mesh/live/spool.d.ts +17 -2
  82. package/dist/lib/mesh/live/spool.js +22 -6
  83. package/dist/lib/ontology-graph/legacy/coverage.d.ts +67 -0
  84. package/dist/lib/ontology-graph/legacy/coverage.js +192 -0
  85. package/dist/lib/ontology-graph/legacy/index.d.ts +199 -0
  86. package/dist/lib/ontology-graph/legacy/index.js +1150 -0
  87. package/dist/lib/ontology-graph/legacy/parse.d.ts +49 -0
  88. package/dist/lib/ontology-graph/legacy/parse.js +126 -0
  89. package/dist/lib/ontology-graph/legacy/report.d.ts +14 -0
  90. package/dist/lib/ontology-graph/legacy/report.js +254 -0
  91. package/dist/lib/ontology-graph/legacy/verb-map.d.ts +35 -0
  92. package/dist/lib/ontology-graph/legacy/verb-map.js +84 -0
  93. package/dist/lib/ontology-graph/lint/checks.d.ts +140 -0
  94. package/dist/lib/ontology-graph/lint/checks.js +717 -0
  95. package/dist/lib/ontology-graph/lint/coverage.d.ts +106 -0
  96. package/dist/lib/ontology-graph/lint/coverage.js +241 -0
  97. package/dist/lib/ontology-graph/lint/daily-job.d.ts +259 -0
  98. package/dist/lib/ontology-graph/lint/daily-job.js +595 -0
  99. package/dist/lib/ontology-graph/lint/index.d.ts +65 -0
  100. package/dist/lib/ontology-graph/lint/index.js +176 -0
  101. package/dist/lib/ontology-graph/model/files.d.ts +20 -0
  102. package/dist/lib/ontology-graph/model/files.js +89 -0
  103. package/dist/lib/ontology-graph/model/index.d.ts +65 -0
  104. package/dist/lib/ontology-graph/model/index.js +100 -0
  105. package/dist/lib/ontology-graph/model/pass-tasks.d.ts +156 -0
  106. package/dist/lib/ontology-graph/model/pass-tasks.js +345 -0
  107. package/dist/lib/ontology-graph/model/pass.d.ts +109 -0
  108. package/dist/lib/ontology-graph/model/pass.js +958 -0
  109. package/dist/lib/ontology-graph/model/runner.d.ts +50 -0
  110. package/dist/lib/ontology-graph/model/runner.js +160 -0
  111. package/dist/lib/ontology-graph/model/step.d.ts +195 -0
  112. package/dist/lib/ontology-graph/model/step.js +523 -0
  113. package/dist/lib/ontology-graph/model/tasks.d.ts +183 -0
  114. package/dist/lib/ontology-graph/model/tasks.js +349 -0
  115. package/dist/lib/ontology-graph/not-implemented.d.ts +5 -0
  116. package/dist/lib/ontology-graph/not-implemented.js +8 -0
  117. package/dist/lib/ontology-graph/org/compare.d.ts +28 -0
  118. package/dist/lib/ontology-graph/org/compare.js +239 -0
  119. package/dist/lib/ontology-graph/org/derive.d.ts +65 -0
  120. package/dist/lib/ontology-graph/org/derive.js +352 -0
  121. package/dist/lib/ontology-graph/org/index.d.ts +73 -0
  122. package/dist/lib/ontology-graph/org/index.js +513 -0
  123. package/dist/lib/ontology-graph/org/load.d.ts +31 -0
  124. package/dist/lib/ontology-graph/org/load.js +476 -0
  125. package/dist/lib/ontology-graph/org/role.d.ts +38 -0
  126. package/dist/lib/ontology-graph/org/role.js +268 -0
  127. package/dist/lib/ontology-graph/org/structure.d.ts +63 -0
  128. package/dist/lib/ontology-graph/org/structure.js +437 -0
  129. package/dist/lib/ontology-graph/org/text.d.ts +95 -0
  130. package/dist/lib/ontology-graph/org/text.js +315 -0
  131. package/dist/lib/ontology-graph/org/types.d.ts +452 -0
  132. package/dist/lib/ontology-graph/org/types.js +80 -0
  133. package/dist/lib/ontology-graph/pages/index.d.ts +64 -0
  134. package/dist/lib/ontology-graph/pages/index.js +193 -0
  135. package/dist/lib/ontology-graph/pages/render.d.ts +142 -0
  136. package/dist/lib/ontology-graph/pages/render.js +682 -0
  137. package/dist/lib/ontology-graph/proposals/apply.d.ts +109 -0
  138. package/dist/lib/ontology-graph/proposals/apply.js +468 -0
  139. package/dist/lib/ontology-graph/proposals/group.d.ts +63 -0
  140. package/dist/lib/ontology-graph/proposals/group.js +232 -0
  141. package/dist/lib/ontology-graph/proposals/index.d.ts +173 -0
  142. package/dist/lib/ontology-graph/proposals/index.js +474 -0
  143. package/dist/lib/ontology-graph/proposals/model.d.ts +162 -0
  144. package/dist/lib/ontology-graph/proposals/model.js +196 -0
  145. package/dist/lib/ontology-graph/proposals/org-chart.d.ts +82 -0
  146. package/dist/lib/ontology-graph/proposals/org-chart.js +340 -0
  147. package/dist/lib/ontology-graph/read/brief.d.ts +26 -0
  148. package/dist/lib/ontology-graph/read/brief.js +251 -0
  149. package/dist/lib/ontology-graph/read/graph-index.d.ts +76 -0
  150. package/dist/lib/ontology-graph/read/graph-index.js +198 -0
  151. package/dist/lib/ontology-graph/read/index.d.ts +59 -0
  152. package/dist/lib/ontology-graph/read/index.js +792 -0
  153. package/dist/lib/ontology-graph/read/member.d.ts +7 -0
  154. package/dist/lib/ontology-graph/read/member.js +34 -0
  155. package/dist/lib/ontology-graph/read/names.d.ts +44 -0
  156. package/dist/lib/ontology-graph/read/names.js +292 -0
  157. package/dist/lib/ontology-graph/read/reader-setting.d.ts +19 -0
  158. package/dist/lib/ontology-graph/read/reader-setting.js +62 -0
  159. package/dist/lib/ontology-graph/read/test-graph.d.ts +37 -0
  160. package/dist/lib/ontology-graph/read/test-graph.js +150 -0
  161. package/dist/lib/ontology-graph/replay/buffered-store.d.ts +33 -0
  162. package/dist/lib/ontology-graph/replay/buffered-store.js +50 -0
  163. package/dist/lib/ontology-graph/replay/config.d.ts +41 -0
  164. package/dist/lib/ontology-graph/replay/config.js +105 -0
  165. package/dist/lib/ontology-graph/replay/engine.d.ts +100 -0
  166. package/dist/lib/ontology-graph/replay/engine.js +1174 -0
  167. package/dist/lib/ontology-graph/replay/extractors.d.ts +59 -0
  168. package/dist/lib/ontology-graph/replay/extractors.js +1555 -0
  169. package/dist/lib/ontology-graph/replay/index.d.ts +90 -0
  170. package/dist/lib/ontology-graph/replay/index.js +220 -0
  171. package/dist/lib/ontology-graph/replay/listing-manifest.d.ts +66 -0
  172. package/dist/lib/ontology-graph/replay/listing-manifest.js +242 -0
  173. package/dist/lib/ontology-graph/replay/member.d.ts +19 -0
  174. package/dist/lib/ontology-graph/replay/member.js +65 -0
  175. package/dist/lib/ontology-graph/replay/mentions.d.ts +58 -0
  176. package/dist/lib/ontology-graph/replay/mentions.js +239 -0
  177. package/dist/lib/ontology-graph/replay/readers.d.ts +98 -0
  178. package/dist/lib/ontology-graph/replay/readers.js +1251 -0
  179. package/dist/lib/ontology-graph/replay/rules.d.ts +127 -0
  180. package/dist/lib/ontology-graph/replay/rules.js +374 -0
  181. package/dist/lib/ontology-graph/replay/scope.d.ts +35 -0
  182. package/dist/lib/ontology-graph/replay/scope.js +115 -0
  183. package/dist/lib/ontology-graph/replay/transcripts.d.ts +39 -0
  184. package/dist/lib/ontology-graph/replay/transcripts.js +224 -0
  185. package/dist/lib/ontology-graph/replay/util.d.ts +55 -0
  186. package/dist/lib/ontology-graph/replay/util.js +256 -0
  187. package/dist/lib/ontology-graph/resolve/entity-index.d.ts +159 -0
  188. package/dist/lib/ontology-graph/resolve/entity-index.js +652 -0
  189. package/dist/lib/ontology-graph/resolve/index.d.ts +113 -0
  190. package/dist/lib/ontology-graph/resolve/index.js +214 -0
  191. package/dist/lib/ontology-graph/resolve/machine.d.ts +34 -0
  192. package/dist/lib/ontology-graph/resolve/machine.js +95 -0
  193. package/dist/lib/ontology-graph/resolve/normalize.d.ts +35 -0
  194. package/dist/lib/ontology-graph/resolve/normalize.js +124 -0
  195. package/dist/lib/ontology-graph/resolve/org-chart.d.ts +107 -0
  196. package/dist/lib/ontology-graph/resolve/org-chart.js +578 -0
  197. package/dist/lib/ontology-graph/resolve/org-layer.d.ts +78 -0
  198. package/dist/lib/ontology-graph/resolve/org-layer.js +159 -0
  199. package/dist/lib/ontology-graph/resolve/org-seed.d.ts +141 -0
  200. package/dist/lib/ontology-graph/resolve/org-seed.js +631 -0
  201. package/dist/lib/ontology-graph/resolve/org-sources.d.ts +165 -0
  202. package/dist/lib/ontology-graph/resolve/org-sources.js +634 -0
  203. package/dist/lib/ontology-graph/resolve/roster.d.ts +76 -0
  204. package/dist/lib/ontology-graph/resolve/roster.js +226 -0
  205. package/dist/lib/ontology-graph/resolve/seed.d.ts +267 -0
  206. package/dist/lib/ontology-graph/resolve/seed.js +1198 -0
  207. package/dist/lib/ontology-graph/resolve/upsert.d.ts +58 -0
  208. package/dist/lib/ontology-graph/resolve/upsert.js +139 -0
  209. package/dist/lib/ontology-graph/resolve/writer.d.ts +128 -0
  210. package/dist/lib/ontology-graph/resolve/writer.js +351 -0
  211. package/dist/lib/ontology-graph/schema/authority.d.ts +73 -0
  212. package/dist/lib/ontology-graph/schema/authority.js +157 -0
  213. package/dist/lib/ontology-graph/schema/default-schema.d.ts +10 -0
  214. package/dist/lib/ontology-graph/schema/default-schema.js +242 -0
  215. package/dist/lib/ontology-graph/schema/grammar.d.ts +57 -0
  216. package/dist/lib/ontology-graph/schema/grammar.js +409 -0
  217. package/dist/lib/ontology-graph/schema/index.d.ts +12 -0
  218. package/dist/lib/ontology-graph/schema/index.js +10 -0
  219. package/dist/lib/ontology-graph/schema/validate.d.ts +13 -0
  220. package/dist/lib/ontology-graph/schema/validate.js +132 -0
  221. package/dist/lib/ontology-graph/store/files.d.ts +34 -0
  222. package/dist/lib/ontology-graph/store/files.js +207 -0
  223. package/dist/lib/ontology-graph/store/fs.d.ts +30 -0
  224. package/dist/lib/ontology-graph/store/fs.js +101 -0
  225. package/dist/lib/ontology-graph/store/graph-store.d.ts +14 -0
  226. package/dist/lib/ontology-graph/store/graph-store.js +520 -0
  227. package/dist/lib/ontology-graph/store/index.d.ts +18 -0
  228. package/dist/lib/ontology-graph/store/index.js +15 -0
  229. package/dist/lib/ontology-graph/store/ingest.d.ts +37 -0
  230. package/dist/lib/ontology-graph/store/ingest.js +323 -0
  231. package/dist/lib/ontology-graph/store/paths.d.ts +114 -0
  232. package/dist/lib/ontology-graph/store/paths.js +232 -0
  233. package/dist/lib/ontology-graph/types.d.ts +1183 -0
  234. package/dist/lib/ontology-graph/types.js +131 -0
  235. package/dist/lib/secret-scan/gitleaks-rules.generated.js +1 -1
  236. package/dist/utils/frontmatter.d.ts +14 -0
  237. package/dist/utils/frontmatter.js +18 -0
  238. package/dist/utils/interactive-caller.js +1 -1
  239. package/package.json +8 -8
@@ -0,0 +1,109 @@
1
+ import type { AudienceKey, EntityRef, EntityUpsert, GraphEntity, GraphEntityType, GraphRow, GraphSchema, GraphStore, IsoDate, LedgerEntry, LogEntry, Origin, ReadRowsOptions, ReplayCursor, RowClosure, RowId, StoredRow, WriteRowsResult } from "../types.js";
2
+ import { type AppliedSummary, type GraphProposalAction } from "./model.js";
3
+ export declare class ProposalApplyError extends Error {
4
+ constructor(message: string);
5
+ }
6
+ /** A GraphStore that remembers each file's bytes before the first change made through it. */
7
+ export declare class RecordingStore implements GraphStore {
8
+ private readonly inner;
9
+ readonly factsBefore: Map<string, {
10
+ entity: EntityRef;
11
+ audience: AudienceKey;
12
+ before: string | null;
13
+ }>;
14
+ readonly entitiesBefore: Map<`company/${string}` | `person/${string}` | `tool/${string}` | `project/${string}` | `contract/${string}` | `team/${string}` | `role/${string}` | `decision/${string}` | `concept/${string}` | `product/${string}` | `contact/${string}` | `deal/${string}` | `invoice/${string}` | `meeting/${string}`, string | null>;
15
+ readonly touched: Set<`company/${string}` | `person/${string}` | `tool/${string}` | `project/${string}` | `contract/${string}` | `team/${string}` | `role/${string}` | `decision/${string}` | `concept/${string}` | `product/${string}` | `contact/${string}` | `deal/${string}` | `invoice/${string}` | `meeting/${string}`>;
16
+ rowsAdded: number;
17
+ rowsClosed: number;
18
+ constructor(inner: GraphStore);
19
+ get root(): string;
20
+ init(): void;
21
+ schema(): GraphSchema;
22
+ readEntity(ref: EntityRef): GraphEntity | null;
23
+ listEntities(type?: GraphEntityType): EntityRef[];
24
+ listAudiences(): AudienceKey[];
25
+ readRows(ref: EntityRef, options?: ReadRowsOptions): StoredRow[];
26
+ listEntitiesWithRows(audiences?: readonly AudienceKey[]): EntityRef[];
27
+ private noteEntity;
28
+ private noteFacts;
29
+ upsertEntity(input: EntityUpsert): {
30
+ entity: GraphEntity;
31
+ created: boolean;
32
+ changed: boolean;
33
+ };
34
+ removeEntity(ref: EntityRef): boolean;
35
+ writeRows(ref: EntityRef, audience: AudienceKey, rows: readonly GraphRow[]): WriteRowsResult;
36
+ closeRow(ref: EntityRef, audience: AudienceKey, id: RowId, closure: RowClosure): boolean;
37
+ reopenRow(ref: EntityRef, audience: AudienceKey, id: RowId): boolean;
38
+ removeRows(ref: EntityRef, audience: AudienceKey, ids: readonly RowId[]): number;
39
+ appendLog(entry: LogEntry): void;
40
+ readLog(limit?: number): LogEntry[];
41
+ appendLedger(entry: LedgerEntry): void;
42
+ readLedger(run?: string): LedgerEntry[];
43
+ readCursor(): ReplayCursor;
44
+ writeCursor(cursor: ReplayCursor): void;
45
+ markDirty(refs: readonly EntityRef[]): void;
46
+ readDirty(): EntityRef[];
47
+ clearDirty(refs?: readonly EntityRef[]): void;
48
+ }
49
+ export interface ApplyContext {
50
+ /** Proposal id. */
51
+ id: string;
52
+ /** `human:<prs id>` of the member who accepted. */
53
+ by: Origin;
54
+ /** The day of the decision. Rows the decision writes are valid and learned from this day. */
55
+ date: IsoDate;
56
+ /** What the first accept recorded; lets a replay rebuild identities that no longer exist. */
57
+ recorded?: AppliedSummary;
58
+ /** The proposal's one-line summary. Read only for the written form of a name the action gives as a slug. */
59
+ summary?: string;
60
+ }
61
+ /** Applies one action. Returns the identities it removed or absorbed, for the decision record. */
62
+ export declare function applyAction(store: GraphStore, action: GraphProposalAction, context: ApplyContext): Pick<AppliedSummary, "removed" | "kept">;
63
+ interface UndoFacts {
64
+ entity: EntityRef;
65
+ audience: AudienceKey;
66
+ /** False when the accept created the file. */
67
+ existed: boolean;
68
+ /** Rows the accept wrote. */
69
+ added: RowId[];
70
+ /** Rows the accept closed: the line before, and the line the accept left. */
71
+ reopened: {
72
+ open: string;
73
+ closed: string;
74
+ }[];
75
+ }
76
+ interface UndoEntity {
77
+ ref: EntityRef;
78
+ before: string | null;
79
+ afterSha: string | null;
80
+ }
81
+ export interface UndoRecord {
82
+ id: string;
83
+ facts: UndoFacts[];
84
+ entities: UndoEntity[];
85
+ }
86
+ export declare function undoFile(graphRoot: string, id: string): string;
87
+ /** What the recorded changes did, as a record undo can reverse. Call after the action has run. */
88
+ export declare function buildUndoRecord(id: string, store: RecordingStore): UndoRecord;
89
+ export declare function writeUndoRecord(graphRoot: string, record: UndoRecord): void;
90
+ export declare function readUndoRecord(graphRoot: string, id: string): UndoRecord | null;
91
+ export interface UndoResult {
92
+ touched: EntityRef[];
93
+ rowsRemoved: number;
94
+ rowsReopened: number;
95
+ entitiesRestored: EntityRef[];
96
+ /** Entity files changed since the accept, left as they are. */
97
+ entitiesKept: EntityRef[];
98
+ }
99
+ /**
100
+ * Reverses one accept: removes the rows it added, reopens the rows it closed
101
+ * (only while they are still as the accept left them), and restores entity
102
+ * files that have not changed since. Rows written after the accept stay.
103
+ * Rows change only through the store (`removeRows`, `reopenRow`). Throws, and
104
+ * changes nothing, when a facts file it must change has a line that does not
105
+ * parse, or when the store cannot take a row back.
106
+ */
107
+ export declare function undoAccept(store: GraphStore, record: UndoRecord): UndoResult;
108
+ export {};
109
+ //# sourceMappingURL=apply.d.ts.map
@@ -0,0 +1,468 @@
1
+ /**
2
+ * WP-F: applying an accepted proposal, and taking it back.
3
+ *
4
+ * Every change goes through `GraphStore` (`applyIngest`, `closeRow`,
5
+ * `upsertEntity`, `removeEntity`). A human decision writes rows with
6
+ * `by human:<prs id>`, which is tier 1: no later rule, agent or legacy row can
7
+ * close them (schema/authority.ts), and `effectiveFacts` answers with them.
8
+ * Rows and closures a decision writes cite `record:proposal:<id>` or keep the
9
+ * source of the row they confirm.
10
+ *
11
+ * The same function applies a decision the first time and replays it on a
12
+ * rebuild. It is idempotent: row ids do not change, closing a closed row is a
13
+ * no-op, and a merge moves whatever rows the absorbed entity has now.
14
+ *
15
+ * Undo: while an action runs, `RecordingStore` keeps the bytes of every file
16
+ * before its first change. The difference (rows added, rows closed, entity
17
+ * files changed) is saved in `proposals/undo/<id>.json`. `undoAccept` removes
18
+ * exactly the added rows and reopens exactly the rows that accept closed, and
19
+ * leaves every row written since alone. It does so through the store's own
20
+ * `removeRows` and `reopenRow`; it never renders a facts file itself.
21
+ */
22
+ import { createHash } from "node:crypto";
23
+ import * as fs from "node:fs";
24
+ import * as path from "node:path";
25
+ import { formatRow, inverseEdge, parseEntityRef, parseRow, rowId, slugify } from "../schema/index.js";
26
+ import { applyIngest, atomicWriteFile, entityFile, factsFile, graphPath, parseFactsFile, readTextIfExists } from "../store/index.js";
27
+ import { proposalRef } from "./model.js";
28
+ export class ProposalApplyError extends Error {
29
+ constructor(message) {
30
+ super(`ontology proposals: ${message}`);
31
+ this.name = "ProposalApplyError";
32
+ }
33
+ }
34
+ const UNDO_DIR = "proposals/undo";
35
+ const sha = (text) => (text === null ? null : createHash("sha256").update(text).digest("hex"));
36
+ /** A GraphStore that remembers each file's bytes before the first change made through it. */
37
+ export class RecordingStore {
38
+ inner;
39
+ factsBefore = new Map();
40
+ entitiesBefore = new Map();
41
+ touched = new Set();
42
+ rowsAdded = 0;
43
+ rowsClosed = 0;
44
+ constructor(inner) {
45
+ this.inner = inner;
46
+ }
47
+ get root() {
48
+ return this.inner.root;
49
+ }
50
+ init() {
51
+ this.inner.init();
52
+ }
53
+ schema() {
54
+ return this.inner.schema();
55
+ }
56
+ readEntity(ref) {
57
+ return this.inner.readEntity(ref);
58
+ }
59
+ listEntities(type) {
60
+ return this.inner.listEntities(type);
61
+ }
62
+ listAudiences() {
63
+ return this.inner.listAudiences();
64
+ }
65
+ readRows(ref, options) {
66
+ return this.inner.readRows(ref, options);
67
+ }
68
+ listEntitiesWithRows(audiences) {
69
+ return this.inner.listEntitiesWithRows(audiences);
70
+ }
71
+ noteEntity(ref) {
72
+ if (this.entitiesBefore.has(ref) || !parseEntityRef(ref))
73
+ return;
74
+ this.entitiesBefore.set(ref, readTextIfExists(entityFile(this.root, ref)));
75
+ }
76
+ noteFacts(ref, audience) {
77
+ let file;
78
+ try {
79
+ file = factsFile(this.root, audience, ref);
80
+ }
81
+ catch {
82
+ return; // The store refuses the call itself with the real reason.
83
+ }
84
+ if (!this.factsBefore.has(file))
85
+ this.factsBefore.set(file, { entity: ref, audience, before: readTextIfExists(file) });
86
+ }
87
+ upsertEntity(input) {
88
+ this.noteEntity(`${input.type}/${input.slug}`);
89
+ const result = this.inner.upsertEntity(input);
90
+ if (result.changed)
91
+ this.touched.add(result.entity.id);
92
+ return result;
93
+ }
94
+ removeEntity(ref) {
95
+ this.noteEntity(ref);
96
+ const removed = this.inner.removeEntity(ref);
97
+ if (removed)
98
+ this.touched.add(ref);
99
+ return removed;
100
+ }
101
+ writeRows(ref, audience, rows) {
102
+ this.noteFacts(ref, audience);
103
+ const result = this.inner.writeRows(ref, audience, rows);
104
+ if (result.added > 0) {
105
+ this.rowsAdded += result.added;
106
+ this.touched.add(ref);
107
+ }
108
+ return result;
109
+ }
110
+ closeRow(ref, audience, id, closure) {
111
+ this.noteFacts(ref, audience);
112
+ const closed = this.inner.closeRow(ref, audience, id, closure);
113
+ if (closed) {
114
+ this.rowsClosed += 1;
115
+ this.touched.add(ref);
116
+ }
117
+ return closed;
118
+ }
119
+ reopenRow(ref, audience, id) {
120
+ this.noteFacts(ref, audience);
121
+ const reopened = this.inner.reopenRow?.(ref, audience, id) ?? false;
122
+ if (reopened)
123
+ this.touched.add(ref);
124
+ return reopened;
125
+ }
126
+ removeRows(ref, audience, ids) {
127
+ this.noteFacts(ref, audience);
128
+ const removed = this.inner.removeRows?.(ref, audience, ids) ?? 0;
129
+ if (removed > 0)
130
+ this.touched.add(ref);
131
+ return removed;
132
+ }
133
+ appendLog(entry) {
134
+ this.inner.appendLog(entry);
135
+ }
136
+ readLog(limit) {
137
+ return this.inner.readLog(limit);
138
+ }
139
+ appendLedger(entry) {
140
+ this.inner.appendLedger(entry);
141
+ }
142
+ readLedger(run) {
143
+ return this.inner.readLedger(run);
144
+ }
145
+ readCursor() {
146
+ return this.inner.readCursor();
147
+ }
148
+ writeCursor(cursor) {
149
+ this.inner.writeCursor(cursor);
150
+ }
151
+ markDirty(refs) {
152
+ this.inner.markDirty(refs);
153
+ }
154
+ readDirty() {
155
+ return this.inner.readDirty();
156
+ }
157
+ clearDirty(refs) {
158
+ this.inner.clearDirty(refs);
159
+ }
160
+ }
161
+ const laterOf = (a, b) => (a > b ? a : b);
162
+ /** Closes an open F or E row, and the inverse of an edge on its target. False when there was nothing open to close. */
163
+ function closeWithInverse(store, entity, audience, id, context) {
164
+ const stored = store.readRows(entity, { audiences: [audience] }).find((candidate) => candidate.id === id);
165
+ if (!stored || stored.row.kind === "T" || stored.row.valid.to !== undefined)
166
+ return false;
167
+ const closure = { on: laterOf(context.date, stored.row.valid.from), by: proposalRef(context.id) };
168
+ const closed = store.closeRow(entity, audience, id, closure);
169
+ if (stored.row.kind === "E") {
170
+ const inverse = inverseEdge(store.schema(), entity, stored.row);
171
+ if (inverse && !(inverse.entity === entity && rowId(inverse.row) === id)) {
172
+ store.closeRow(inverse.entity, audience, rowId(inverse.row), closure);
173
+ }
174
+ }
175
+ return closed;
176
+ }
177
+ function ingest(store, context, rows) {
178
+ if (rows.length === 0)
179
+ return;
180
+ applyIngest(store, { input: proposalRef(context.id), date: context.date, entities: [], rows });
181
+ }
182
+ /** The row a human decision writes: same statement and citation, human origin, open, full confidence. */
183
+ function humanRow(row, context, from) {
184
+ const stamps = { valid: { from }, src: row.src, learned: context.date, by: context.by, conf: 1 };
185
+ return row.kind === "F"
186
+ ? { kind: "F", field: row.field, value: row.value, ...stamps }
187
+ : { kind: "E", verb: row.verb, target: row.target, ...stamps };
188
+ }
189
+ /** `go-to-market` as `Go To Market`: the last resort when nothing says how a name is written. */
190
+ function nameFromSlug(slug) {
191
+ return slug
192
+ .split("-")
193
+ .filter((word) => word !== "")
194
+ .map((word) => word[0].toUpperCase() + word.slice(1))
195
+ .join(" ");
196
+ }
197
+ /**
198
+ * Creates the entity an accepted edge points at when it has no file yet, so
199
+ * the inverse row never lands on an entity that does not exist. The name is
200
+ * the action's `targetName`, else a quoted name in the proposal's summary that
201
+ * gives this slug (`team "GTM"` for `team/gtm`), else the slug in title case.
202
+ */
203
+ function ensureEdgeTarget(store, target, seen, context, targetName) {
204
+ const parsed = parseEntityRef(target);
205
+ if (!parsed || store.readEntity(target))
206
+ return;
207
+ const quoted = [...(context.summary ?? "").matchAll(/"([^"\n]{1,80})"/g)].map((match) => match[1]);
208
+ const written = [targetName?.trim() ?? "", ...quoted].find((name) => name !== "" && slugify(name) === parsed.slug);
209
+ store.upsertEntity({ type: parsed.type, slug: parsed.slug, canonical_name: written ?? (targetName?.trim() || nameFromSlug(parsed.slug)), seen });
210
+ }
211
+ function upsertFrom(store, entity, into) {
212
+ const target = into ?? { type: entity.type, slug: entity.slug, name: entity.canonical_name };
213
+ const base = {
214
+ type: target.type,
215
+ slug: target.slug,
216
+ canonical_name: target.name,
217
+ aliases: [...entity.aliases, entity.canonical_name],
218
+ keys: entity.keys,
219
+ legacy_ids: entity.legacy_ids,
220
+ };
221
+ store.upsertEntity({ ...base, seen: entity.first_seen });
222
+ if (entity.last_updated !== entity.first_seen)
223
+ store.upsertEntity({ ...base, seen: entity.last_updated });
224
+ }
225
+ /**
226
+ * Copies the chosen rows of `from` onto `to` (with the source, origin and
227
+ * dates they already have) and closes the open ones on `from`. Edge inverses
228
+ * on other entities follow: the inverse to `to` is written, the inverse to
229
+ * `from` is closed.
230
+ */
231
+ function moveRows(store, from, to, pick, context) {
232
+ for (const audience of store.listAudiences()) {
233
+ const chosen = store.readRows(from, { audiences: [audience] }).filter((stored) => pick(audience, stored.id));
234
+ if (chosen.length === 0)
235
+ continue;
236
+ ingest(store, context, chosen
237
+ .filter((stored) => !(stored.row.kind === "E" && (stored.row.target === to || stored.row.target === from)))
238
+ .map((stored) => ({ entity: to, audience, row: stored.row })));
239
+ for (const stored of chosen) {
240
+ if (stored.row.kind !== "T" && stored.row.valid.to === undefined)
241
+ closeWithInverse(store, from, audience, stored.id, context);
242
+ }
243
+ }
244
+ }
245
+ function sameType(a, b) {
246
+ const left = parseEntityRef(a);
247
+ const right = parseEntityRef(b);
248
+ if (!left || !right)
249
+ throw new ProposalApplyError(`not an entity: ${!left ? a : b}`);
250
+ if (left.type !== right.type)
251
+ throw new ProposalApplyError(`cannot combine a ${left.type} with a ${right.type}`);
252
+ return left.type;
253
+ }
254
+ /** Applies one action. Returns the identities it removed or absorbed, for the decision record. */
255
+ export function applyAction(store, action, context) {
256
+ switch (action.type) {
257
+ case "none":
258
+ return {};
259
+ case "close_row":
260
+ closeWithInverse(store, action.entity, action.audience, action.row, context);
261
+ return {};
262
+ case "write_row": {
263
+ if (action.row.kind === "T") {
264
+ ingest(store, context, [{ entity: action.entity, audience: action.audience, row: action.row }]);
265
+ return {};
266
+ }
267
+ // The member's own statement: origin human and full confidence, whatever the proposal's draft row carried.
268
+ const row = { ...action.row, by: context.by, conf: 1 };
269
+ if (row.kind === "E")
270
+ ensureEdgeTarget(store, row.target, row.valid.from, context, "targetName" in action ? action.targetName : undefined);
271
+ ingest(store, context, [{ entity: action.entity, audience: action.audience, row }]);
272
+ return {};
273
+ }
274
+ case "keep_fact": {
275
+ // The named rivals first, so their closure cites the proposal. Then the human row, valid from the
276
+ // decision day: dated earlier than an open rival it would be written closed.
277
+ for (const address of action.close)
278
+ closeWithInverse(store, action.entity, address.audience, address.row, context);
279
+ ingest(store, context, [
280
+ { entity: action.entity, audience: action.audience, row: humanRow(action.keep, context, context.date) },
281
+ ]);
282
+ return {};
283
+ }
284
+ case "retype_edge": {
285
+ const typed = { ...humanRow(action.edge, context, action.edge.valid.from), verb: action.verb };
286
+ ingest(store, context, [{ entity: action.entity, audience: action.audience, row: typed }]);
287
+ closeWithInverse(store, action.entity, action.audience, action.row, context);
288
+ return {};
289
+ }
290
+ case "remove_entity": {
291
+ const identity = store.readEntity(action.entity);
292
+ for (const audience of store.listAudiences()) {
293
+ for (const stored of store.readRows(action.entity, { audiences: [audience], openOnly: true })) {
294
+ if (stored.row.kind !== "T")
295
+ closeWithInverse(store, action.entity, audience, stored.id, context);
296
+ }
297
+ }
298
+ store.removeEntity(action.entity);
299
+ const removed = identity ?? context.recorded?.removed?.find((entity) => entity.id === action.entity);
300
+ return removed ? { removed: [removed] } : {};
301
+ }
302
+ case "merge": {
303
+ if (action.from === action.into)
304
+ throw new ProposalApplyError("cannot merge an entity into itself");
305
+ sameType(action.from, action.into);
306
+ const absorbed = store.readEntity(action.from) ?? context.recorded?.removed?.find((entity) => entity.id === action.from);
307
+ const before = store.readEntity(action.into) ?? context.recorded?.kept ?? null;
308
+ if (!before)
309
+ throw new ProposalApplyError(`cannot merge into ${action.into}: it has no entity file`);
310
+ if (!store.readEntity(action.into))
311
+ upsertFrom(store, before);
312
+ if (absorbed)
313
+ upsertFrom(store, absorbed, { type: before.type, slug: before.slug, name: before.canonical_name });
314
+ moveRows(store, action.from, action.into, () => true, context);
315
+ store.removeEntity(action.from);
316
+ return { ...(absorbed ? { removed: [absorbed] } : {}), kept: context.recorded?.kept ?? before };
317
+ }
318
+ case "merge_group": {
319
+ // One merge per name, in a fixed order. The entity kept is recorded as it was before the first of them.
320
+ const removed = [];
321
+ let kept;
322
+ for (const from of [...new Set(action.from)].sort()) {
323
+ if (from === action.into)
324
+ continue;
325
+ const present = store.readEntity(from) !== null || store.listAudiences().some((audience) => store.readRows(from, { audiences: [audience] }).length > 0);
326
+ // A name that is already gone (merged by an earlier answer) is skipped on the first accept; a replay
327
+ // still rebuilds it from the record.
328
+ if (!present && !context.recorded?.removed?.some((entity) => entity.id === from))
329
+ continue;
330
+ const result = applyAction(store, { type: "merge", from, into: action.into }, context);
331
+ removed.push(...(result.removed ?? []));
332
+ kept = kept ?? result.kept;
333
+ }
334
+ return { ...(removed.length > 0 ? { removed } : {}), ...(kept ? { kept } : {}) };
335
+ }
336
+ case "split": {
337
+ const subject = parseEntityRef(action.entity);
338
+ if (!subject)
339
+ throw new ProposalApplyError(`not an entity: ${action.entity}`);
340
+ const target = `${subject.type}/${action.into.slug}`;
341
+ if (target === action.entity)
342
+ throw new ProposalApplyError("a split needs a new entity, not the same one");
343
+ store.upsertEntity({
344
+ type: subject.type,
345
+ slug: action.into.slug,
346
+ canonical_name: action.into.canonical_name,
347
+ ...(action.into.aliases ? { aliases: action.into.aliases } : {}),
348
+ ...(action.into.keys ? { keys: action.into.keys } : {}),
349
+ seen: context.date,
350
+ });
351
+ const wanted = new Set(action.rows.map((address) => `${address.audience}\n${address.row}`));
352
+ moveRows(store, action.entity, target, (audience, id) => wanted.has(`${audience}\n${id}`), context);
353
+ return {};
354
+ }
355
+ default: {
356
+ const unknown = action;
357
+ throw new ProposalApplyError(`unknown action "${String(unknown.type)}"`);
358
+ }
359
+ }
360
+ }
361
+ export function undoFile(graphRoot, id) {
362
+ if (!/^[0-9a-f]{12}$/.test(id))
363
+ throw new ProposalApplyError(`not a proposal id: ${id}`);
364
+ return path.join(graphPath(graphRoot, UNDO_DIR), `${id}.json`);
365
+ }
366
+ /** What the recorded changes did, as a record undo can reverse. Call after the action has run. */
367
+ export function buildUndoRecord(id, store) {
368
+ const facts = [];
369
+ for (const [file, entry] of [...store.factsBefore].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))) {
370
+ const before = new Map((entry.before === null ? [] : parseFactsFile(entry.before).rows).map((row) => [row.id, row.row]));
371
+ const afterText = readTextIfExists(file);
372
+ const after = afterText === null ? [] : parseFactsFile(afterText).rows;
373
+ const added = [];
374
+ const reopened = [];
375
+ for (const { id: rowKey, row } of after) {
376
+ const was = before.get(rowKey);
377
+ if (!was)
378
+ added.push(rowKey);
379
+ else if (was.kind !== "T" && row.kind !== "T" && was.valid.to === undefined && row.valid.to !== undefined) {
380
+ reopened.push({ open: formatRow(was), closed: formatRow(row) });
381
+ }
382
+ }
383
+ if (added.length > 0 || reopened.length > 0) {
384
+ facts.push({ entity: entry.entity, audience: entry.audience, existed: entry.before !== null, added, reopened });
385
+ }
386
+ }
387
+ const entities = [];
388
+ for (const [ref, before] of [...store.entitiesBefore].sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))) {
389
+ const after = readTextIfExists(entityFile(store.root, ref));
390
+ if (after !== before)
391
+ entities.push({ ref, before, afterSha: sha(after) });
392
+ }
393
+ return { id, facts, entities };
394
+ }
395
+ export function writeUndoRecord(graphRoot, record) {
396
+ atomicWriteFile(undoFile(graphRoot, record.id), `${JSON.stringify(record, null, 2)}\n`);
397
+ }
398
+ export function readUndoRecord(graphRoot, id) {
399
+ const text = readTextIfExists(undoFile(graphRoot, id));
400
+ if (text === null)
401
+ return null;
402
+ return JSON.parse(text);
403
+ }
404
+ /**
405
+ * Reverses one accept: removes the rows it added, reopens the rows it closed
406
+ * (only while they are still as the accept left them), and restores entity
407
+ * files that have not changed since. Rows written after the accept stay.
408
+ * Rows change only through the store (`removeRows`, `reopenRow`). Throws, and
409
+ * changes nothing, when a facts file it must change has a line that does not
410
+ * parse, or when the store cannot take a row back.
411
+ */
412
+ export function undoAccept(store, record) {
413
+ const graphRoot = store.root;
414
+ if (record.facts.length > 0 && (!store.removeRows || !store.reopenRow)) {
415
+ throw new ProposalApplyError("cannot undo: this store cannot remove or reopen a row");
416
+ }
417
+ // Every file is checked before the first change, so a bad line stops the undo with nothing half done.
418
+ for (const entry of record.facts) {
419
+ const file = factsFile(graphRoot, entry.audience, entry.entity);
420
+ const text = readTextIfExists(file);
421
+ if (text === null)
422
+ continue;
423
+ const parsed = parseFactsFile(text);
424
+ if (parsed.errors.length > 0) {
425
+ throw new ProposalApplyError(`cannot undo: ${file}:${parsed.errors[0].line} does not parse; fix it first (hq ontology lint)`);
426
+ }
427
+ }
428
+ const result = { touched: [], rowsRemoved: 0, rowsReopened: 0, entitiesRestored: [], entitiesKept: [] };
429
+ const touched = new Set();
430
+ for (const entry of record.facts) {
431
+ const file = factsFile(graphRoot, entry.audience, entry.entity);
432
+ if (!fs.existsSync(file))
433
+ continue;
434
+ const removed = entry.added.length > 0 ? store.removeRows(entry.entity, entry.audience, entry.added) : 0;
435
+ let reopened = 0;
436
+ for (const line of entry.reopened) {
437
+ const id = rowId(parseRow(line.open));
438
+ const current = store.readRows(entry.entity, { audiences: [entry.audience] }).find((stored) => stored.id === id);
439
+ // Only while the row is exactly as the accept left it.
440
+ if (current && formatRow(current.row) === line.closed && store.reopenRow(entry.entity, entry.audience, id))
441
+ reopened += 1;
442
+ }
443
+ if (removed === 0 && reopened === 0)
444
+ continue;
445
+ // A file the accept created and the undo emptied goes away again, as it was.
446
+ if (!entry.existed && store.readRows(entry.entity, { audiences: [entry.audience] }).length === 0)
447
+ fs.rmSync(file, { force: true });
448
+ result.rowsRemoved += removed;
449
+ result.rowsReopened += reopened;
450
+ touched.add(entry.entity);
451
+ }
452
+ for (const entity of record.entities) {
453
+ const file = entityFile(graphRoot, entity.ref);
454
+ if (sha(readTextIfExists(file)) !== entity.afterSha) {
455
+ result.entitiesKept.push(entity.ref);
456
+ continue;
457
+ }
458
+ if (entity.before === null)
459
+ fs.rmSync(file, { force: true });
460
+ else
461
+ atomicWriteFile(file, entity.before);
462
+ result.entitiesRestored.push(entity.ref);
463
+ touched.add(entity.ref);
464
+ }
465
+ result.touched = [...touched].sort();
466
+ return result;
467
+ }
468
+ //# sourceMappingURL=apply.js.map
@@ -0,0 +1,63 @@
1
+ /**
2
+ * WP-F: one merge proposal per person for name variants at one company.
3
+ *
4
+ * The import and lint file a merge proposal per pair of names. An outside
5
+ * person a meeting transcript spelled five ways ("Adam Adams", "Adam Bees",
6
+ * "Adam Beasts", "Adam") then shows up as nine pair proposals, and answering
7
+ * them one by one in the wrong order leaves rows on a name that is gone. This
8
+ * step reads the open pair proposals between people, keeps the pairs whose two
9
+ * people are both placed at the same outside company, and files one proposal
10
+ * per connected group of three or more names: accept merges all of them into
11
+ * the name with a full name and the most rows.
12
+ *
13
+ * Rules, all deterministic and model-free:
14
+ * - Only people. Nobody who works at the company the graph belongs to
15
+ * (an open `works_at` to it) is ever grouped: the roster has its own rule.
16
+ * - A person is placed at a company by a `works_at` row, open or closed
17
+ * (the old entity files' employer lines are imported closed).
18
+ * - A name with no company is never pulled into a group. Its pair proposals stay.
19
+ * - Two names that carry different email addresses are two people: the group is not formed.
20
+ * - A group a member answered "nope" is not formed again; its pairs stay as pairs.
21
+ *
22
+ * The group proposal carries the pair proposals it stands in for (`replaces`).
23
+ * They leave the open list while the group is open and return when it is
24
+ * declined. Running the step again changes nothing.
25
+ */
26
+ import type { EntityRef, GraphContext, GraphStore } from "../types.js";
27
+ import { type GraphProposal } from "./model.js";
28
+ export interface GroupNameVariantsOptions {
29
+ store?: GraphStore;
30
+ /** Default: the clock. */
31
+ now?: Date;
32
+ /** Smallest number of names that make a group. Default 3: two names are one pair proposal already. */
33
+ minNames?: number;
34
+ /** Count only; leave the open list as it is. */
35
+ dryRun?: boolean;
36
+ /** Reads and writes the open list. Filled in by `groupNameVariantProposals` in index.ts. */
37
+ io: {
38
+ readOpen(context: GraphContext): GraphProposal[];
39
+ writeOpen(context: GraphContext, proposals: readonly GraphProposal[]): void;
40
+ };
41
+ }
42
+ export interface NameVariantGroup {
43
+ id: string;
44
+ company: EntityRef;
45
+ into: EntityRef;
46
+ names: EntityRef[];
47
+ /** Pair proposals the group stands in for. */
48
+ replaced: number;
49
+ }
50
+ export interface GroupNameVariantsResult {
51
+ /** Open group proposals after the run. */
52
+ groups: NameVariantGroup[];
53
+ /** Groups filed by this run. */
54
+ filed: number;
55
+ /** Pair proposals that left the open list in this run. */
56
+ replaced: number;
57
+ /** Groups not formed because two names carry different email addresses. */
58
+ skippedDifferentEmails: number;
59
+ /** Groups not formed because a member declined them. */
60
+ skippedDeclined: number;
61
+ }
62
+ export declare function groupNameVariants(context: GraphContext, options: GroupNameVariantsOptions): GroupNameVariantsResult;
63
+ //# sourceMappingURL=group.d.ts.map