@nazty_labs/common-ground 0.5.1

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 (62) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +64 -0
  3. package/SETUP.md +219 -0
  4. package/dist/access.d.ts +172 -0
  5. package/dist/access.js +175 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +198 -0
  8. package/dist/commands.d.ts +189 -0
  9. package/dist/commands.js +202 -0
  10. package/dist/discovery.d.ts +73 -0
  11. package/dist/discovery.js +417 -0
  12. package/dist/errors.d.ts +15 -0
  13. package/dist/errors.js +22 -0
  14. package/dist/export.d.ts +14 -0
  15. package/dist/export.js +86 -0
  16. package/dist/guidance.d.ts +11 -0
  17. package/dist/guidance.js +75 -0
  18. package/dist/hooks.d.ts +4 -0
  19. package/dist/hooks.js +141 -0
  20. package/dist/init.d.ts +304 -0
  21. package/dist/init.js +150 -0
  22. package/dist/maintenance.d.ts +126 -0
  23. package/dist/maintenance.js +23 -0
  24. package/dist/matching.d.ts +17 -0
  25. package/dist/matching.js +32 -0
  26. package/dist/model.d.ts +974 -0
  27. package/dist/model.js +21 -0
  28. package/dist/navigation.d.ts +164 -0
  29. package/dist/navigation.js +164 -0
  30. package/dist/operations.d.ts +10 -0
  31. package/dist/operations.js +130 -0
  32. package/dist/paging.d.ts +5 -0
  33. package/dist/paging.js +32 -0
  34. package/dist/retrieval.d.ts +146 -0
  35. package/dist/retrieval.js +150 -0
  36. package/dist/review-files.d.ts +3 -0
  37. package/dist/review-files.js +106 -0
  38. package/dist/review.d.ts +86 -0
  39. package/dist/review.js +124 -0
  40. package/dist/server.d.ts +8 -0
  41. package/dist/server.js +105 -0
  42. package/dist/source-search.d.ts +63 -0
  43. package/dist/source-search.js +245 -0
  44. package/dist/store.d.ts +452 -0
  45. package/dist/store.js +718 -0
  46. package/dist/version.d.ts +1 -0
  47. package/dist/version.js +2 -0
  48. package/dist/workflow.d.ts +450 -0
  49. package/dist/workflow.js +317 -0
  50. package/docs/architecture.md +65 -0
  51. package/docs/audit-0.4.0.md +42 -0
  52. package/docs/demo.md +42 -0
  53. package/docs/discovery.md +70 -0
  54. package/docs/knowledge-policy.md +51 -0
  55. package/docs/pillar-contract.md +98 -0
  56. package/docs/quiet-workflow.md +98 -0
  57. package/docs/releases.md +157 -0
  58. package/package.json +52 -0
  59. package/schemas/admission.schema.json +75 -0
  60. package/schemas/knowledge.schema.json +192 -0
  61. package/schemas/patch.schema.json +220 -0
  62. package/schemas/update.schema.json +218 -0
@@ -0,0 +1,974 @@
1
+ import { z } from 'zod';
2
+ export declare const relativePath: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
3
+ export declare const chapterKey: z.ZodString;
4
+ export declare const factKey: z.ZodString;
5
+ export declare const Evidence: z.ZodObject<{
6
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
7
+ quote: z.ZodString;
8
+ }, "strict", z.ZodTypeAny, {
9
+ path: string;
10
+ quote: string;
11
+ }, {
12
+ path: string;
13
+ quote: string;
14
+ }>;
15
+ export declare const Fact: z.ZodObject<{
16
+ id: z.ZodString;
17
+ statement: z.ZodString;
18
+ evidence: z.ZodArray<z.ZodObject<{
19
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
20
+ quote: z.ZodString;
21
+ }, "strict", z.ZodTypeAny, {
22
+ path: string;
23
+ quote: string;
24
+ }, {
25
+ path: string;
26
+ quote: string;
27
+ }>, "many">;
28
+ } & {
29
+ sourceScope: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
30
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
31
+ }, "strict", z.ZodTypeAny, {
32
+ id: string;
33
+ statement: string;
34
+ evidence: {
35
+ path: string;
36
+ quote: string;
37
+ }[];
38
+ sourceScope: string[];
39
+ dependsOn: string[];
40
+ }, {
41
+ id: string;
42
+ statement: string;
43
+ evidence: {
44
+ path: string;
45
+ quote: string;
46
+ }[];
47
+ sourceScope: string[];
48
+ dependsOn?: string[] | undefined;
49
+ }>;
50
+ export declare const ChapterDefinition: z.ZodObject<{
51
+ id: z.ZodString;
52
+ title: z.ZodString;
53
+ scope: z.ZodString;
54
+ excludes: z.ZodString;
55
+ } & {
56
+ paths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
57
+ }, "strict", z.ZodTypeAny, {
58
+ id: string;
59
+ title: string;
60
+ scope: string;
61
+ excludes: string;
62
+ paths: string[];
63
+ }, {
64
+ id: string;
65
+ title: string;
66
+ scope: string;
67
+ excludes: string;
68
+ paths: string[];
69
+ }>;
70
+ export declare const Chapter: z.ZodObject<{
71
+ id: z.ZodString;
72
+ title: z.ZodString;
73
+ scope: z.ZodString;
74
+ excludes: z.ZodString;
75
+ } & {
76
+ paths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
77
+ } & {
78
+ revision: z.ZodNumber;
79
+ facts: z.ZodArray<z.ZodObject<{
80
+ id: z.ZodString;
81
+ statement: z.ZodString;
82
+ evidence: z.ZodArray<z.ZodObject<{
83
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
84
+ quote: z.ZodString;
85
+ }, "strict", z.ZodTypeAny, {
86
+ path: string;
87
+ quote: string;
88
+ }, {
89
+ path: string;
90
+ quote: string;
91
+ }>, "many">;
92
+ } & {
93
+ sourceScope: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
94
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
95
+ }, "strict", z.ZodTypeAny, {
96
+ id: string;
97
+ statement: string;
98
+ evidence: {
99
+ path: string;
100
+ quote: string;
101
+ }[];
102
+ sourceScope: string[];
103
+ dependsOn: string[];
104
+ }, {
105
+ id: string;
106
+ statement: string;
107
+ evidence: {
108
+ path: string;
109
+ quote: string;
110
+ }[];
111
+ sourceScope: string[];
112
+ dependsOn?: string[] | undefined;
113
+ }>, "many">;
114
+ sources: z.ZodRecord<z.ZodString, z.ZodString>;
115
+ dependencyFingerprints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
116
+ }, "strict", z.ZodTypeAny, {
117
+ id: string;
118
+ title: string;
119
+ scope: string;
120
+ excludes: string;
121
+ paths: string[];
122
+ revision: number;
123
+ facts: {
124
+ id: string;
125
+ statement: string;
126
+ evidence: {
127
+ path: string;
128
+ quote: string;
129
+ }[];
130
+ sourceScope: string[];
131
+ dependsOn: string[];
132
+ }[];
133
+ sources: Record<string, string>;
134
+ dependencyFingerprints: Record<string, string>;
135
+ }, {
136
+ id: string;
137
+ title: string;
138
+ scope: string;
139
+ excludes: string;
140
+ paths: string[];
141
+ revision: number;
142
+ facts: {
143
+ id: string;
144
+ statement: string;
145
+ evidence: {
146
+ path: string;
147
+ quote: string;
148
+ }[];
149
+ sourceScope: string[];
150
+ dependsOn?: string[] | undefined;
151
+ }[];
152
+ sources: Record<string, string>;
153
+ dependencyFingerprints?: Record<string, string> | undefined;
154
+ }>;
155
+ export declare const PillarDefinition: z.ZodObject<{
156
+ id: z.ZodString;
157
+ title: z.ZodString;
158
+ scope: z.ZodString;
159
+ excludes: z.ZodString;
160
+ } & {
161
+ chapters: z.ZodArray<z.ZodObject<{
162
+ id: z.ZodString;
163
+ title: z.ZodString;
164
+ scope: z.ZodString;
165
+ excludes: z.ZodString;
166
+ } & {
167
+ paths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
168
+ }, "strict", z.ZodTypeAny, {
169
+ id: string;
170
+ title: string;
171
+ scope: string;
172
+ excludes: string;
173
+ paths: string[];
174
+ }, {
175
+ id: string;
176
+ title: string;
177
+ scope: string;
178
+ excludes: string;
179
+ paths: string[];
180
+ }>, "many">;
181
+ }, "strict", z.ZodTypeAny, {
182
+ id: string;
183
+ title: string;
184
+ scope: string;
185
+ excludes: string;
186
+ chapters: {
187
+ id: string;
188
+ title: string;
189
+ scope: string;
190
+ excludes: string;
191
+ paths: string[];
192
+ }[];
193
+ }, {
194
+ id: string;
195
+ title: string;
196
+ scope: string;
197
+ excludes: string;
198
+ chapters: {
199
+ id: string;
200
+ title: string;
201
+ scope: string;
202
+ excludes: string;
203
+ paths: string[];
204
+ }[];
205
+ }>;
206
+ export declare const Pillar: z.ZodObject<{
207
+ id: z.ZodString;
208
+ title: z.ZodString;
209
+ scope: z.ZodString;
210
+ excludes: z.ZodString;
211
+ } & {
212
+ chapters: z.ZodArray<z.ZodObject<{
213
+ id: z.ZodString;
214
+ title: z.ZodString;
215
+ scope: z.ZodString;
216
+ excludes: z.ZodString;
217
+ } & {
218
+ paths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
219
+ } & {
220
+ revision: z.ZodNumber;
221
+ facts: z.ZodArray<z.ZodObject<{
222
+ id: z.ZodString;
223
+ statement: z.ZodString;
224
+ evidence: z.ZodArray<z.ZodObject<{
225
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
226
+ quote: z.ZodString;
227
+ }, "strict", z.ZodTypeAny, {
228
+ path: string;
229
+ quote: string;
230
+ }, {
231
+ path: string;
232
+ quote: string;
233
+ }>, "many">;
234
+ } & {
235
+ sourceScope: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
236
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
237
+ }, "strict", z.ZodTypeAny, {
238
+ id: string;
239
+ statement: string;
240
+ evidence: {
241
+ path: string;
242
+ quote: string;
243
+ }[];
244
+ sourceScope: string[];
245
+ dependsOn: string[];
246
+ }, {
247
+ id: string;
248
+ statement: string;
249
+ evidence: {
250
+ path: string;
251
+ quote: string;
252
+ }[];
253
+ sourceScope: string[];
254
+ dependsOn?: string[] | undefined;
255
+ }>, "many">;
256
+ sources: z.ZodRecord<z.ZodString, z.ZodString>;
257
+ dependencyFingerprints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
258
+ }, "strict", z.ZodTypeAny, {
259
+ id: string;
260
+ title: string;
261
+ scope: string;
262
+ excludes: string;
263
+ paths: string[];
264
+ revision: number;
265
+ facts: {
266
+ id: string;
267
+ statement: string;
268
+ evidence: {
269
+ path: string;
270
+ quote: string;
271
+ }[];
272
+ sourceScope: string[];
273
+ dependsOn: string[];
274
+ }[];
275
+ sources: Record<string, string>;
276
+ dependencyFingerprints: Record<string, string>;
277
+ }, {
278
+ id: string;
279
+ title: string;
280
+ scope: string;
281
+ excludes: string;
282
+ paths: string[];
283
+ revision: number;
284
+ facts: {
285
+ id: string;
286
+ statement: string;
287
+ evidence: {
288
+ path: string;
289
+ quote: string;
290
+ }[];
291
+ sourceScope: string[];
292
+ dependsOn?: string[] | undefined;
293
+ }[];
294
+ sources: Record<string, string>;
295
+ dependencyFingerprints?: Record<string, string> | undefined;
296
+ }>, "many">;
297
+ }, "strict", z.ZodTypeAny, {
298
+ id: string;
299
+ title: string;
300
+ scope: string;
301
+ excludes: string;
302
+ chapters: {
303
+ id: string;
304
+ title: string;
305
+ scope: string;
306
+ excludes: string;
307
+ paths: string[];
308
+ revision: number;
309
+ facts: {
310
+ id: string;
311
+ statement: string;
312
+ evidence: {
313
+ path: string;
314
+ quote: string;
315
+ }[];
316
+ sourceScope: string[];
317
+ dependsOn: string[];
318
+ }[];
319
+ sources: Record<string, string>;
320
+ dependencyFingerprints: Record<string, string>;
321
+ }[];
322
+ }, {
323
+ id: string;
324
+ title: string;
325
+ scope: string;
326
+ excludes: string;
327
+ chapters: {
328
+ id: string;
329
+ title: string;
330
+ scope: string;
331
+ excludes: string;
332
+ paths: string[];
333
+ revision: number;
334
+ facts: {
335
+ id: string;
336
+ statement: string;
337
+ evidence: {
338
+ path: string;
339
+ quote: string;
340
+ }[];
341
+ sourceScope: string[];
342
+ dependsOn?: string[] | undefined;
343
+ }[];
344
+ sources: Record<string, string>;
345
+ dependencyFingerprints?: Record<string, string> | undefined;
346
+ }[];
347
+ }>;
348
+ export declare const Registry: z.ZodObject<{
349
+ schemaVersion: z.ZodLiteral<2>;
350
+ pillars: z.ZodArray<z.ZodObject<{
351
+ id: z.ZodString;
352
+ title: z.ZodString;
353
+ scope: z.ZodString;
354
+ excludes: z.ZodString;
355
+ } & {
356
+ chapters: z.ZodArray<z.ZodObject<{
357
+ id: z.ZodString;
358
+ title: z.ZodString;
359
+ scope: z.ZodString;
360
+ excludes: z.ZodString;
361
+ } & {
362
+ paths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
363
+ } & {
364
+ revision: z.ZodNumber;
365
+ facts: z.ZodArray<z.ZodObject<{
366
+ id: z.ZodString;
367
+ statement: z.ZodString;
368
+ evidence: z.ZodArray<z.ZodObject<{
369
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
370
+ quote: z.ZodString;
371
+ }, "strict", z.ZodTypeAny, {
372
+ path: string;
373
+ quote: string;
374
+ }, {
375
+ path: string;
376
+ quote: string;
377
+ }>, "many">;
378
+ } & {
379
+ sourceScope: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
380
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
381
+ }, "strict", z.ZodTypeAny, {
382
+ id: string;
383
+ statement: string;
384
+ evidence: {
385
+ path: string;
386
+ quote: string;
387
+ }[];
388
+ sourceScope: string[];
389
+ dependsOn: string[];
390
+ }, {
391
+ id: string;
392
+ statement: string;
393
+ evidence: {
394
+ path: string;
395
+ quote: string;
396
+ }[];
397
+ sourceScope: string[];
398
+ dependsOn?: string[] | undefined;
399
+ }>, "many">;
400
+ sources: z.ZodRecord<z.ZodString, z.ZodString>;
401
+ dependencyFingerprints: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
402
+ }, "strict", z.ZodTypeAny, {
403
+ id: string;
404
+ title: string;
405
+ scope: string;
406
+ excludes: string;
407
+ paths: string[];
408
+ revision: number;
409
+ facts: {
410
+ id: string;
411
+ statement: string;
412
+ evidence: {
413
+ path: string;
414
+ quote: string;
415
+ }[];
416
+ sourceScope: string[];
417
+ dependsOn: string[];
418
+ }[];
419
+ sources: Record<string, string>;
420
+ dependencyFingerprints: Record<string, string>;
421
+ }, {
422
+ id: string;
423
+ title: string;
424
+ scope: string;
425
+ excludes: string;
426
+ paths: string[];
427
+ revision: number;
428
+ facts: {
429
+ id: string;
430
+ statement: string;
431
+ evidence: {
432
+ path: string;
433
+ quote: string;
434
+ }[];
435
+ sourceScope: string[];
436
+ dependsOn?: string[] | undefined;
437
+ }[];
438
+ sources: Record<string, string>;
439
+ dependencyFingerprints?: Record<string, string> | undefined;
440
+ }>, "many">;
441
+ }, "strict", z.ZodTypeAny, {
442
+ id: string;
443
+ title: string;
444
+ scope: string;
445
+ excludes: string;
446
+ chapters: {
447
+ id: string;
448
+ title: string;
449
+ scope: string;
450
+ excludes: string;
451
+ paths: string[];
452
+ revision: number;
453
+ facts: {
454
+ id: string;
455
+ statement: string;
456
+ evidence: {
457
+ path: string;
458
+ quote: string;
459
+ }[];
460
+ sourceScope: string[];
461
+ dependsOn: string[];
462
+ }[];
463
+ sources: Record<string, string>;
464
+ dependencyFingerprints: Record<string, string>;
465
+ }[];
466
+ }, {
467
+ id: string;
468
+ title: string;
469
+ scope: string;
470
+ excludes: string;
471
+ chapters: {
472
+ id: string;
473
+ title: string;
474
+ scope: string;
475
+ excludes: string;
476
+ paths: string[];
477
+ revision: number;
478
+ facts: {
479
+ id: string;
480
+ statement: string;
481
+ evidence: {
482
+ path: string;
483
+ quote: string;
484
+ }[];
485
+ sourceScope: string[];
486
+ dependsOn?: string[] | undefined;
487
+ }[];
488
+ sources: Record<string, string>;
489
+ dependencyFingerprints?: Record<string, string> | undefined;
490
+ }[];
491
+ }>, "many">;
492
+ }, "strict", z.ZodTypeAny, {
493
+ schemaVersion: 2;
494
+ pillars: {
495
+ id: string;
496
+ title: string;
497
+ scope: string;
498
+ excludes: string;
499
+ chapters: {
500
+ id: string;
501
+ title: string;
502
+ scope: string;
503
+ excludes: string;
504
+ paths: string[];
505
+ revision: number;
506
+ facts: {
507
+ id: string;
508
+ statement: string;
509
+ evidence: {
510
+ path: string;
511
+ quote: string;
512
+ }[];
513
+ sourceScope: string[];
514
+ dependsOn: string[];
515
+ }[];
516
+ sources: Record<string, string>;
517
+ dependencyFingerprints: Record<string, string>;
518
+ }[];
519
+ }[];
520
+ }, {
521
+ schemaVersion: 2;
522
+ pillars: {
523
+ id: string;
524
+ title: string;
525
+ scope: string;
526
+ excludes: string;
527
+ chapters: {
528
+ id: string;
529
+ title: string;
530
+ scope: string;
531
+ excludes: string;
532
+ paths: string[];
533
+ revision: number;
534
+ facts: {
535
+ id: string;
536
+ statement: string;
537
+ evidence: {
538
+ path: string;
539
+ quote: string;
540
+ }[];
541
+ sourceScope: string[];
542
+ dependsOn?: string[] | undefined;
543
+ }[];
544
+ sources: Record<string, string>;
545
+ dependencyFingerprints?: Record<string, string> | undefined;
546
+ }[];
547
+ }[];
548
+ }>;
549
+ export declare const Maintenance: z.ZodObject<{
550
+ factId: z.ZodString;
551
+ action: z.ZodEnum<["correct", "merge", "remove", "tighten"]>;
552
+ reason: z.ZodString;
553
+ replacement: z.ZodOptional<z.ZodString>;
554
+ }, "strict", z.ZodTypeAny, {
555
+ factId: string;
556
+ action: "correct" | "merge" | "remove" | "tighten";
557
+ reason: string;
558
+ replacement?: string | undefined;
559
+ }, {
560
+ factId: string;
561
+ action: "correct" | "merge" | "remove" | "tighten";
562
+ reason: string;
563
+ replacement?: string | undefined;
564
+ }>;
565
+ export declare const Review: z.ZodObject<{
566
+ chapterId: z.ZodString;
567
+ expectedRevision: z.ZodNumber;
568
+ invalidatedFactIds: z.ZodArray<z.ZodString, "many">;
569
+ reviewedFactIds: z.ZodArray<z.ZodString, "many">;
570
+ facts: z.ZodArray<z.ZodObject<{
571
+ id: z.ZodString;
572
+ statement: z.ZodString;
573
+ evidence: z.ZodArray<z.ZodObject<{
574
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
575
+ quote: z.ZodString;
576
+ }, "strict", z.ZodTypeAny, {
577
+ path: string;
578
+ quote: string;
579
+ }, {
580
+ path: string;
581
+ quote: string;
582
+ }>, "many">;
583
+ } & {
584
+ sourceScope: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
585
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
586
+ }, "strict", z.ZodTypeAny, {
587
+ id: string;
588
+ statement: string;
589
+ evidence: {
590
+ path: string;
591
+ quote: string;
592
+ }[];
593
+ sourceScope: string[];
594
+ dependsOn: string[];
595
+ }, {
596
+ id: string;
597
+ statement: string;
598
+ evidence: {
599
+ path: string;
600
+ quote: string;
601
+ }[];
602
+ sourceScope: string[];
603
+ dependsOn?: string[] | undefined;
604
+ }>, "many">;
605
+ reason: z.ZodString;
606
+ maintenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
607
+ factId: z.ZodString;
608
+ action: z.ZodEnum<["correct", "merge", "remove", "tighten"]>;
609
+ reason: z.ZodString;
610
+ replacement: z.ZodOptional<z.ZodString>;
611
+ }, "strict", z.ZodTypeAny, {
612
+ factId: string;
613
+ action: "correct" | "merge" | "remove" | "tighten";
614
+ reason: string;
615
+ replacement?: string | undefined;
616
+ }, {
617
+ factId: string;
618
+ action: "correct" | "merge" | "remove" | "tighten";
619
+ reason: string;
620
+ replacement?: string | undefined;
621
+ }>, "many">>;
622
+ }, "strict", z.ZodTypeAny, {
623
+ facts: {
624
+ id: string;
625
+ statement: string;
626
+ evidence: {
627
+ path: string;
628
+ quote: string;
629
+ }[];
630
+ sourceScope: string[];
631
+ dependsOn: string[];
632
+ }[];
633
+ reason: string;
634
+ chapterId: string;
635
+ expectedRevision: number;
636
+ invalidatedFactIds: string[];
637
+ reviewedFactIds: string[];
638
+ maintenance?: {
639
+ factId: string;
640
+ action: "correct" | "merge" | "remove" | "tighten";
641
+ reason: string;
642
+ replacement?: string | undefined;
643
+ }[] | undefined;
644
+ }, {
645
+ facts: {
646
+ id: string;
647
+ statement: string;
648
+ evidence: {
649
+ path: string;
650
+ quote: string;
651
+ }[];
652
+ sourceScope: string[];
653
+ dependsOn?: string[] | undefined;
654
+ }[];
655
+ reason: string;
656
+ chapterId: string;
657
+ expectedRevision: number;
658
+ invalidatedFactIds: string[];
659
+ reviewedFactIds: string[];
660
+ maintenance?: {
661
+ factId: string;
662
+ action: "correct" | "merge" | "remove" | "tighten";
663
+ reason: string;
664
+ replacement?: string | undefined;
665
+ }[] | undefined;
666
+ }>;
667
+ export declare const Verification: z.ZodObject<{
668
+ sourceFiles: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
669
+ documentFiles: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
670
+ }, "strict", z.ZodTypeAny, {
671
+ sourceFiles: string[];
672
+ documentFiles: string[];
673
+ }, {
674
+ sourceFiles: string[];
675
+ documentFiles: string[];
676
+ }>;
677
+ export declare const Update: z.ZodObject<{
678
+ chapterId: z.ZodString;
679
+ factIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
680
+ touchedPaths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
681
+ reviews: z.ZodArray<z.ZodObject<{
682
+ chapterId: z.ZodString;
683
+ expectedRevision: z.ZodNumber;
684
+ invalidatedFactIds: z.ZodArray<z.ZodString, "many">;
685
+ reviewedFactIds: z.ZodArray<z.ZodString, "many">;
686
+ facts: z.ZodArray<z.ZodObject<{
687
+ id: z.ZodString;
688
+ statement: z.ZodString;
689
+ evidence: z.ZodArray<z.ZodObject<{
690
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
691
+ quote: z.ZodString;
692
+ }, "strict", z.ZodTypeAny, {
693
+ path: string;
694
+ quote: string;
695
+ }, {
696
+ path: string;
697
+ quote: string;
698
+ }>, "many">;
699
+ } & {
700
+ sourceScope: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
701
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
702
+ }, "strict", z.ZodTypeAny, {
703
+ id: string;
704
+ statement: string;
705
+ evidence: {
706
+ path: string;
707
+ quote: string;
708
+ }[];
709
+ sourceScope: string[];
710
+ dependsOn: string[];
711
+ }, {
712
+ id: string;
713
+ statement: string;
714
+ evidence: {
715
+ path: string;
716
+ quote: string;
717
+ }[];
718
+ sourceScope: string[];
719
+ dependsOn?: string[] | undefined;
720
+ }>, "many">;
721
+ reason: z.ZodString;
722
+ maintenance: z.ZodOptional<z.ZodArray<z.ZodObject<{
723
+ factId: z.ZodString;
724
+ action: z.ZodEnum<["correct", "merge", "remove", "tighten"]>;
725
+ reason: z.ZodString;
726
+ replacement: z.ZodOptional<z.ZodString>;
727
+ }, "strict", z.ZodTypeAny, {
728
+ factId: string;
729
+ action: "correct" | "merge" | "remove" | "tighten";
730
+ reason: string;
731
+ replacement?: string | undefined;
732
+ }, {
733
+ factId: string;
734
+ action: "correct" | "merge" | "remove" | "tighten";
735
+ reason: string;
736
+ replacement?: string | undefined;
737
+ }>, "many">>;
738
+ }, "strict", z.ZodTypeAny, {
739
+ facts: {
740
+ id: string;
741
+ statement: string;
742
+ evidence: {
743
+ path: string;
744
+ quote: string;
745
+ }[];
746
+ sourceScope: string[];
747
+ dependsOn: string[];
748
+ }[];
749
+ reason: string;
750
+ chapterId: string;
751
+ expectedRevision: number;
752
+ invalidatedFactIds: string[];
753
+ reviewedFactIds: string[];
754
+ maintenance?: {
755
+ factId: string;
756
+ action: "correct" | "merge" | "remove" | "tighten";
757
+ reason: string;
758
+ replacement?: string | undefined;
759
+ }[] | undefined;
760
+ }, {
761
+ facts: {
762
+ id: string;
763
+ statement: string;
764
+ evidence: {
765
+ path: string;
766
+ quote: string;
767
+ }[];
768
+ sourceScope: string[];
769
+ dependsOn?: string[] | undefined;
770
+ }[];
771
+ reason: string;
772
+ chapterId: string;
773
+ expectedRevision: number;
774
+ invalidatedFactIds: string[];
775
+ reviewedFactIds: string[];
776
+ maintenance?: {
777
+ factId: string;
778
+ action: "correct" | "merge" | "remove" | "tighten";
779
+ reason: string;
780
+ replacement?: string | undefined;
781
+ }[] | undefined;
782
+ }>, "many">;
783
+ verification: z.ZodObject<{
784
+ sourceFiles: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
785
+ documentFiles: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
786
+ }, "strict", z.ZodTypeAny, {
787
+ sourceFiles: string[];
788
+ documentFiles: string[];
789
+ }, {
790
+ sourceFiles: string[];
791
+ documentFiles: string[];
792
+ }>;
793
+ tidyId: z.ZodOptional<z.ZodString>;
794
+ }, "strict", z.ZodTypeAny, {
795
+ chapterId: string;
796
+ touchedPaths: string[];
797
+ reviews: {
798
+ facts: {
799
+ id: string;
800
+ statement: string;
801
+ evidence: {
802
+ path: string;
803
+ quote: string;
804
+ }[];
805
+ sourceScope: string[];
806
+ dependsOn: string[];
807
+ }[];
808
+ reason: string;
809
+ chapterId: string;
810
+ expectedRevision: number;
811
+ invalidatedFactIds: string[];
812
+ reviewedFactIds: string[];
813
+ maintenance?: {
814
+ factId: string;
815
+ action: "correct" | "merge" | "remove" | "tighten";
816
+ reason: string;
817
+ replacement?: string | undefined;
818
+ }[] | undefined;
819
+ }[];
820
+ verification: {
821
+ sourceFiles: string[];
822
+ documentFiles: string[];
823
+ };
824
+ factIds?: string[] | undefined;
825
+ tidyId?: string | undefined;
826
+ }, {
827
+ chapterId: string;
828
+ touchedPaths: string[];
829
+ reviews: {
830
+ facts: {
831
+ id: string;
832
+ statement: string;
833
+ evidence: {
834
+ path: string;
835
+ quote: string;
836
+ }[];
837
+ sourceScope: string[];
838
+ dependsOn?: string[] | undefined;
839
+ }[];
840
+ reason: string;
841
+ chapterId: string;
842
+ expectedRevision: number;
843
+ invalidatedFactIds: string[];
844
+ reviewedFactIds: string[];
845
+ maintenance?: {
846
+ factId: string;
847
+ action: "correct" | "merge" | "remove" | "tighten";
848
+ reason: string;
849
+ replacement?: string | undefined;
850
+ }[] | undefined;
851
+ }[];
852
+ verification: {
853
+ sourceFiles: string[];
854
+ documentFiles: string[];
855
+ };
856
+ factIds?: string[] | undefined;
857
+ tidyId?: string | undefined;
858
+ }>;
859
+ export declare const LegacyRegistry: z.ZodObject<{
860
+ schemaVersion: z.ZodLiteral<1>;
861
+ pillars: z.ZodArray<z.ZodObject<{
862
+ id: z.ZodString;
863
+ title: z.ZodString;
864
+ scope: z.ZodString;
865
+ excludes: z.ZodString;
866
+ } & {
867
+ paths: z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>, "many">;
868
+ revision: z.ZodNumber;
869
+ facts: z.ZodArray<z.ZodObject<{
870
+ id: z.ZodString;
871
+ statement: z.ZodString;
872
+ evidence: z.ZodArray<z.ZodObject<{
873
+ path: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>>;
874
+ quote: z.ZodString;
875
+ }, "strict", z.ZodTypeAny, {
876
+ path: string;
877
+ quote: string;
878
+ }, {
879
+ path: string;
880
+ quote: string;
881
+ }>, "many">;
882
+ }, "strict", z.ZodTypeAny, {
883
+ id: string;
884
+ statement: string;
885
+ evidence: {
886
+ path: string;
887
+ quote: string;
888
+ }[];
889
+ }, {
890
+ id: string;
891
+ statement: string;
892
+ evidence: {
893
+ path: string;
894
+ quote: string;
895
+ }[];
896
+ }>, "many">;
897
+ sources: z.ZodRecord<z.ZodString, z.ZodString>;
898
+ }, "strict", z.ZodTypeAny, {
899
+ id: string;
900
+ title: string;
901
+ scope: string;
902
+ excludes: string;
903
+ paths: string[];
904
+ revision: number;
905
+ facts: {
906
+ id: string;
907
+ statement: string;
908
+ evidence: {
909
+ path: string;
910
+ quote: string;
911
+ }[];
912
+ }[];
913
+ sources: Record<string, string>;
914
+ }, {
915
+ id: string;
916
+ title: string;
917
+ scope: string;
918
+ excludes: string;
919
+ paths: string[];
920
+ revision: number;
921
+ facts: {
922
+ id: string;
923
+ statement: string;
924
+ evidence: {
925
+ path: string;
926
+ quote: string;
927
+ }[];
928
+ }[];
929
+ sources: Record<string, string>;
930
+ }>, "many">;
931
+ }, "strict", z.ZodTypeAny, {
932
+ schemaVersion: 1;
933
+ pillars: {
934
+ id: string;
935
+ title: string;
936
+ scope: string;
937
+ excludes: string;
938
+ paths: string[];
939
+ revision: number;
940
+ facts: {
941
+ id: string;
942
+ statement: string;
943
+ evidence: {
944
+ path: string;
945
+ quote: string;
946
+ }[];
947
+ }[];
948
+ sources: Record<string, string>;
949
+ }[];
950
+ }, {
951
+ schemaVersion: 1;
952
+ pillars: {
953
+ id: string;
954
+ title: string;
955
+ scope: string;
956
+ excludes: string;
957
+ paths: string[];
958
+ revision: number;
959
+ facts: {
960
+ id: string;
961
+ statement: string;
962
+ evidence: {
963
+ path: string;
964
+ quote: string;
965
+ }[];
966
+ }[];
967
+ sources: Record<string, string>;
968
+ }[];
969
+ }>;
970
+ export type Definition = z.infer<typeof PillarDefinition>;
971
+ export type ChapterRecord = z.infer<typeof Chapter>;
972
+ export type RegistryRecord = z.infer<typeof Registry>;
973
+ export type UpdateRequest = z.infer<typeof Update>;
974
+ export declare function unique(values: string[], label: string): void;