@fenglimg/fabric-shared 1.6.0 → 1.7.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.
package/dist/index.d.ts CHANGED
@@ -130,6 +130,7 @@ declare const agentsMetaNodeSchema: z.ZodEffects<z.ZodObject<{
130
130
  must_read_if: string;
131
131
  entities?: string[] | undefined;
132
132
  }>>;
133
+ sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
133
134
  }, "strip", z.ZodTypeAny, {
134
135
  file: string;
135
136
  priority: "high" | "medium" | "low";
@@ -154,6 +155,7 @@ declare const agentsMetaNodeSchema: z.ZodEffects<z.ZodObject<{
154
155
  tier: "always" | "path" | "description";
155
156
  description?: string | undefined;
156
157
  } | undefined;
158
+ sections?: string[] | undefined;
157
159
  }, {
158
160
  file: string;
159
161
  priority: "high" | "medium" | "low";
@@ -178,6 +180,7 @@ declare const agentsMetaNodeSchema: z.ZodEffects<z.ZodObject<{
178
180
  tier: "always" | "path" | "description";
179
181
  description?: string | undefined;
180
182
  } | undefined;
183
+ sections?: string[] | undefined;
181
184
  }>, {
182
185
  file: string;
183
186
  priority: "high" | "medium" | "low";
@@ -202,6 +205,7 @@ declare const agentsMetaNodeSchema: z.ZodEffects<z.ZodObject<{
202
205
  tier: "always" | "path" | "description";
203
206
  description?: string | undefined;
204
207
  } | undefined;
208
+ sections?: string[] | undefined;
205
209
  }, unknown>;
206
210
  declare const agentsMetaSchema: z.ZodObject<{
207
211
  revision: z.ZodString;
@@ -249,6 +253,7 @@ declare const agentsMetaSchema: z.ZodObject<{
249
253
  must_read_if: string;
250
254
  entities?: string[] | undefined;
251
255
  }>>;
256
+ sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
252
257
  }, "strip", z.ZodTypeAny, {
253
258
  file: string;
254
259
  priority: "high" | "medium" | "low";
@@ -273,6 +278,7 @@ declare const agentsMetaSchema: z.ZodObject<{
273
278
  tier: "always" | "path" | "description";
274
279
  description?: string | undefined;
275
280
  } | undefined;
281
+ sections?: string[] | undefined;
276
282
  }, {
277
283
  file: string;
278
284
  priority: "high" | "medium" | "low";
@@ -297,6 +303,7 @@ declare const agentsMetaSchema: z.ZodObject<{
297
303
  tier: "always" | "path" | "description";
298
304
  description?: string | undefined;
299
305
  } | undefined;
306
+ sections?: string[] | undefined;
300
307
  }>, {
301
308
  file: string;
302
309
  priority: "high" | "medium" | "low";
@@ -321,6 +328,7 @@ declare const agentsMetaSchema: z.ZodObject<{
321
328
  tier: "always" | "path" | "description";
322
329
  description?: string | undefined;
323
330
  } | undefined;
331
+ sections?: string[] | undefined;
324
332
  }, unknown>>;
325
333
  }, "strip", z.ZodTypeAny, {
326
334
  revision: string;
@@ -348,6 +356,7 @@ declare const agentsMetaSchema: z.ZodObject<{
348
356
  tier: "always" | "path" | "description";
349
357
  description?: string | undefined;
350
358
  } | undefined;
359
+ sections?: string[] | undefined;
351
360
  }>;
352
361
  }, {
353
362
  revision: string;
@@ -359,6 +368,155 @@ declare function deriveAgentsMetaIdentitySource(node: Pick<AgentsMetaNode, "file
359
368
  declare function deriveAgentsMetaLayer(file: string): AgentsLayer;
360
369
  declare function deriveAgentsMetaTopologyType(file: string): AgentsTopologyType;
361
370
 
371
+ declare const RULE_TEST_INDEX_SCHEMA_VERSION = 1;
372
+ declare const ruleTestLinkSchema: z.ZodObject<{
373
+ rule_stable_id: z.ZodString;
374
+ rule_file: z.ZodString;
375
+ rule_hash: z.ZodString;
376
+ previous_rule_hash: z.ZodOptional<z.ZodString>;
377
+ test_file: z.ZodString;
378
+ test_hash: z.ZodString;
379
+ previous_test_hash: z.ZodOptional<z.ZodString>;
380
+ annotation_line: z.ZodNumber;
381
+ }, "strict", z.ZodTypeAny, {
382
+ rule_stable_id: string;
383
+ rule_file: string;
384
+ rule_hash: string;
385
+ test_file: string;
386
+ test_hash: string;
387
+ annotation_line: number;
388
+ previous_rule_hash?: string | undefined;
389
+ previous_test_hash?: string | undefined;
390
+ }, {
391
+ rule_stable_id: string;
392
+ rule_file: string;
393
+ rule_hash: string;
394
+ test_file: string;
395
+ test_hash: string;
396
+ annotation_line: number;
397
+ previous_rule_hash?: string | undefined;
398
+ previous_test_hash?: string | undefined;
399
+ }>;
400
+ declare const ruleTestOrphanAnnotationSchema: z.ZodObject<{
401
+ rule_stable_id: z.ZodString;
402
+ test_file: z.ZodString;
403
+ test_hash: z.ZodString;
404
+ previous_test_hash: z.ZodOptional<z.ZodString>;
405
+ annotation_line: z.ZodNumber;
406
+ }, "strict", z.ZodTypeAny, {
407
+ rule_stable_id: string;
408
+ test_file: string;
409
+ test_hash: string;
410
+ annotation_line: number;
411
+ previous_test_hash?: string | undefined;
412
+ }, {
413
+ rule_stable_id: string;
414
+ test_file: string;
415
+ test_hash: string;
416
+ annotation_line: number;
417
+ previous_test_hash?: string | undefined;
418
+ }>;
419
+ declare const ruleTestIndexSchema: z.ZodObject<{
420
+ schema_version: z.ZodLiteral<1>;
421
+ generated_at: z.ZodString;
422
+ revision: z.ZodOptional<z.ZodString>;
423
+ previous_revision: z.ZodOptional<z.ZodString>;
424
+ links: z.ZodArray<z.ZodObject<{
425
+ rule_stable_id: z.ZodString;
426
+ rule_file: z.ZodString;
427
+ rule_hash: z.ZodString;
428
+ previous_rule_hash: z.ZodOptional<z.ZodString>;
429
+ test_file: z.ZodString;
430
+ test_hash: z.ZodString;
431
+ previous_test_hash: z.ZodOptional<z.ZodString>;
432
+ annotation_line: z.ZodNumber;
433
+ }, "strict", z.ZodTypeAny, {
434
+ rule_stable_id: string;
435
+ rule_file: string;
436
+ rule_hash: string;
437
+ test_file: string;
438
+ test_hash: string;
439
+ annotation_line: number;
440
+ previous_rule_hash?: string | undefined;
441
+ previous_test_hash?: string | undefined;
442
+ }, {
443
+ rule_stable_id: string;
444
+ rule_file: string;
445
+ rule_hash: string;
446
+ test_file: string;
447
+ test_hash: string;
448
+ annotation_line: number;
449
+ previous_rule_hash?: string | undefined;
450
+ previous_test_hash?: string | undefined;
451
+ }>, "many">;
452
+ orphan_annotations: z.ZodArray<z.ZodObject<{
453
+ rule_stable_id: z.ZodString;
454
+ test_file: z.ZodString;
455
+ test_hash: z.ZodString;
456
+ previous_test_hash: z.ZodOptional<z.ZodString>;
457
+ annotation_line: z.ZodNumber;
458
+ }, "strict", z.ZodTypeAny, {
459
+ rule_stable_id: string;
460
+ test_file: string;
461
+ test_hash: string;
462
+ annotation_line: number;
463
+ previous_test_hash?: string | undefined;
464
+ }, {
465
+ rule_stable_id: string;
466
+ test_file: string;
467
+ test_hash: string;
468
+ annotation_line: number;
469
+ previous_test_hash?: string | undefined;
470
+ }>, "many">;
471
+ }, "strict", z.ZodTypeAny, {
472
+ schema_version: 1;
473
+ generated_at: string;
474
+ links: {
475
+ rule_stable_id: string;
476
+ rule_file: string;
477
+ rule_hash: string;
478
+ test_file: string;
479
+ test_hash: string;
480
+ annotation_line: number;
481
+ previous_rule_hash?: string | undefined;
482
+ previous_test_hash?: string | undefined;
483
+ }[];
484
+ orphan_annotations: {
485
+ rule_stable_id: string;
486
+ test_file: string;
487
+ test_hash: string;
488
+ annotation_line: number;
489
+ previous_test_hash?: string | undefined;
490
+ }[];
491
+ revision?: string | undefined;
492
+ previous_revision?: string | undefined;
493
+ }, {
494
+ schema_version: 1;
495
+ generated_at: string;
496
+ links: {
497
+ rule_stable_id: string;
498
+ rule_file: string;
499
+ rule_hash: string;
500
+ test_file: string;
501
+ test_hash: string;
502
+ annotation_line: number;
503
+ previous_rule_hash?: string | undefined;
504
+ previous_test_hash?: string | undefined;
505
+ }[];
506
+ orphan_annotations: {
507
+ rule_stable_id: string;
508
+ test_file: string;
509
+ test_hash: string;
510
+ annotation_line: number;
511
+ previous_test_hash?: string | undefined;
512
+ }[];
513
+ revision?: string | undefined;
514
+ previous_revision?: string | undefined;
515
+ }>;
516
+ type RuleTestLink = z.infer<typeof ruleTestLinkSchema>;
517
+ type RuleTestOrphanAnnotation = z.infer<typeof ruleTestOrphanAnnotationSchema>;
518
+ type RuleTestIndex = z.infer<typeof ruleTestIndexSchema>;
519
+
362
520
  declare const ledgerSourceSchema: z.ZodEnum<["ai", "human"]>;
363
521
  declare const ledgerQuerySchema: z.ZodObject<{
364
522
  source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
@@ -1129,6 +1287,7 @@ declare const forensicReportSchema: z.ZodObject<{
1129
1287
  }>;
1130
1288
  recommendations_for_skill: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1131
1289
  }, "strip", z.ZodTypeAny, {
1290
+ generated_at: string;
1132
1291
  framework: {
1133
1292
  evidence: string[];
1134
1293
  kind: string;
@@ -1136,7 +1295,6 @@ declare const forensicReportSchema: z.ZodObject<{
1136
1295
  subkind: string;
1137
1296
  };
1138
1297
  version: string;
1139
- generated_at: string;
1140
1298
  generated_by: string;
1141
1299
  target: string;
1142
1300
  project_name: string;
@@ -1191,6 +1349,7 @@ declare const forensicReportSchema: z.ZodObject<{
1191
1349
  };
1192
1350
  recommendations_for_skill?: string[] | undefined;
1193
1351
  }, {
1352
+ generated_at: string;
1194
1353
  framework: {
1195
1354
  evidence: string[];
1196
1355
  kind: string;
@@ -1198,7 +1357,6 @@ declare const forensicReportSchema: z.ZodObject<{
1198
1357
  subkind: string;
1199
1358
  };
1200
1359
  version: string;
1201
- generated_at: string;
1202
1360
  generated_by: string;
1203
1361
  target: string;
1204
1362
  project_name: string;
@@ -1666,6 +1824,7 @@ declare const metaUpdatedEventSchema: z.ZodObject<{
1666
1824
  must_read_if: string;
1667
1825
  entities?: string[] | undefined;
1668
1826
  }>>;
1827
+ sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1669
1828
  }, "strip", z.ZodTypeAny, {
1670
1829
  file: string;
1671
1830
  priority: "high" | "medium" | "low";
@@ -1690,6 +1849,7 @@ declare const metaUpdatedEventSchema: z.ZodObject<{
1690
1849
  tier: "always" | "path" | "description";
1691
1850
  description?: string | undefined;
1692
1851
  } | undefined;
1852
+ sections?: string[] | undefined;
1693
1853
  }, {
1694
1854
  file: string;
1695
1855
  priority: "high" | "medium" | "low";
@@ -1714,6 +1874,7 @@ declare const metaUpdatedEventSchema: z.ZodObject<{
1714
1874
  tier: "always" | "path" | "description";
1715
1875
  description?: string | undefined;
1716
1876
  } | undefined;
1877
+ sections?: string[] | undefined;
1717
1878
  }>, {
1718
1879
  file: string;
1719
1880
  priority: "high" | "medium" | "low";
@@ -1738,6 +1899,7 @@ declare const metaUpdatedEventSchema: z.ZodObject<{
1738
1899
  tier: "always" | "path" | "description";
1739
1900
  description?: string | undefined;
1740
1901
  } | undefined;
1902
+ sections?: string[] | undefined;
1741
1903
  }, unknown>>;
1742
1904
  }, "strip", z.ZodTypeAny, {
1743
1905
  revision: string;
@@ -1765,6 +1927,7 @@ declare const metaUpdatedEventSchema: z.ZodObject<{
1765
1927
  tier: "always" | "path" | "description";
1766
1928
  description?: string | undefined;
1767
1929
  } | undefined;
1930
+ sections?: string[] | undefined;
1768
1931
  }>;
1769
1932
  }, {
1770
1933
  revision: string;
@@ -1798,6 +1961,7 @@ declare const metaUpdatedEventSchema: z.ZodObject<{
1798
1961
  tier: "always" | "path" | "description";
1799
1962
  description?: string | undefined;
1800
1963
  } | undefined;
1964
+ sections?: string[] | undefined;
1801
1965
  }>;
1802
1966
  };
1803
1967
  }, {
@@ -2269,6 +2433,7 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2269
2433
  }>;
2270
2434
  recommendations_for_skill: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2271
2435
  }, "strip", z.ZodTypeAny, {
2436
+ generated_at: string;
2272
2437
  framework: {
2273
2438
  evidence: string[];
2274
2439
  kind: string;
@@ -2276,7 +2441,6 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2276
2441
  subkind: string;
2277
2442
  };
2278
2443
  version: string;
2279
- generated_at: string;
2280
2444
  generated_by: string;
2281
2445
  target: string;
2282
2446
  project_name: string;
@@ -2331,6 +2495,7 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2331
2495
  };
2332
2496
  recommendations_for_skill?: string[] | undefined;
2333
2497
  }, {
2498
+ generated_at: string;
2334
2499
  framework: {
2335
2500
  evidence: string[];
2336
2501
  kind: string;
@@ -2338,7 +2503,6 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2338
2503
  subkind: string;
2339
2504
  };
2340
2505
  version: string;
2341
- generated_at: string;
2342
2506
  generated_by: string;
2343
2507
  target: string;
2344
2508
  project_name: string;
@@ -2396,6 +2560,7 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2396
2560
  }, "strip", z.ZodTypeAny, {
2397
2561
  type: "drift:detected";
2398
2562
  payload: {
2563
+ generated_at: string;
2399
2564
  framework: {
2400
2565
  evidence: string[];
2401
2566
  kind: string;
@@ -2403,7 +2568,6 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2403
2568
  subkind: string;
2404
2569
  };
2405
2570
  version: string;
2406
- generated_at: string;
2407
2571
  generated_by: string;
2408
2572
  target: string;
2409
2573
  project_name: string;
@@ -2461,6 +2625,7 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2461
2625
  }, {
2462
2626
  type: "drift:detected";
2463
2627
  payload: {
2628
+ generated_at: string;
2464
2629
  framework: {
2465
2630
  evidence: string[];
2466
2631
  kind: string;
@@ -2468,7 +2633,6 @@ declare const driftDetectedEventSchema: z.ZodObject<{
2468
2633
  subkind: string;
2469
2634
  };
2470
2635
  version: string;
2471
- generated_at: string;
2472
2636
  generated_by: string;
2473
2637
  target: string;
2474
2638
  project_name: string;
@@ -2572,6 +2736,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2572
2736
  must_read_if: string;
2573
2737
  entities?: string[] | undefined;
2574
2738
  }>>;
2739
+ sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2575
2740
  }, "strip", z.ZodTypeAny, {
2576
2741
  file: string;
2577
2742
  priority: "high" | "medium" | "low";
@@ -2596,6 +2761,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2596
2761
  tier: "always" | "path" | "description";
2597
2762
  description?: string | undefined;
2598
2763
  } | undefined;
2764
+ sections?: string[] | undefined;
2599
2765
  }, {
2600
2766
  file: string;
2601
2767
  priority: "high" | "medium" | "low";
@@ -2620,6 +2786,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2620
2786
  tier: "always" | "path" | "description";
2621
2787
  description?: string | undefined;
2622
2788
  } | undefined;
2789
+ sections?: string[] | undefined;
2623
2790
  }>, {
2624
2791
  file: string;
2625
2792
  priority: "high" | "medium" | "low";
@@ -2644,6 +2811,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2644
2811
  tier: "always" | "path" | "description";
2645
2812
  description?: string | undefined;
2646
2813
  } | undefined;
2814
+ sections?: string[] | undefined;
2647
2815
  }, unknown>>;
2648
2816
  }, "strip", z.ZodTypeAny, {
2649
2817
  revision: string;
@@ -2671,6 +2839,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2671
2839
  tier: "always" | "path" | "description";
2672
2840
  description?: string | undefined;
2673
2841
  } | undefined;
2842
+ sections?: string[] | undefined;
2674
2843
  }>;
2675
2844
  }, {
2676
2845
  revision: string;
@@ -2704,6 +2873,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2704
2873
  tier: "always" | "path" | "description";
2705
2874
  description?: string | undefined;
2706
2875
  } | undefined;
2876
+ sections?: string[] | undefined;
2707
2877
  }>;
2708
2878
  };
2709
2879
  }, {
@@ -3171,6 +3341,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3171
3341
  }>;
3172
3342
  recommendations_for_skill: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3173
3343
  }, "strip", z.ZodTypeAny, {
3344
+ generated_at: string;
3174
3345
  framework: {
3175
3346
  evidence: string[];
3176
3347
  kind: string;
@@ -3178,7 +3349,6 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3178
3349
  subkind: string;
3179
3350
  };
3180
3351
  version: string;
3181
- generated_at: string;
3182
3352
  generated_by: string;
3183
3353
  target: string;
3184
3354
  project_name: string;
@@ -3233,6 +3403,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3233
3403
  };
3234
3404
  recommendations_for_skill?: string[] | undefined;
3235
3405
  }, {
3406
+ generated_at: string;
3236
3407
  framework: {
3237
3408
  evidence: string[];
3238
3409
  kind: string;
@@ -3240,7 +3411,6 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3240
3411
  subkind: string;
3241
3412
  };
3242
3413
  version: string;
3243
- generated_at: string;
3244
3414
  generated_by: string;
3245
3415
  target: string;
3246
3416
  project_name: string;
@@ -3298,6 +3468,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3298
3468
  }, "strip", z.ZodTypeAny, {
3299
3469
  type: "drift:detected";
3300
3470
  payload: {
3471
+ generated_at: string;
3301
3472
  framework: {
3302
3473
  evidence: string[];
3303
3474
  kind: string;
@@ -3305,7 +3476,6 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3305
3476
  subkind: string;
3306
3477
  };
3307
3478
  version: string;
3308
- generated_at: string;
3309
3479
  generated_by: string;
3310
3480
  target: string;
3311
3481
  project_name: string;
@@ -3363,6 +3533,7 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3363
3533
  }, {
3364
3534
  type: "drift:detected";
3365
3535
  payload: {
3536
+ generated_at: string;
3366
3537
  framework: {
3367
3538
  evidence: string[];
3368
3539
  kind: string;
@@ -3370,7 +3541,6 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3370
3541
  subkind: string;
3371
3542
  };
3372
3543
  version: string;
3373
- generated_at: string;
3374
3544
  generated_by: string;
3375
3545
  target: string;
3376
3546
  project_name: string;
@@ -3427,4 +3597,778 @@ declare const fabricEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3427
3597
  };
3428
3598
  }>]>;
3429
3599
 
3430
- export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_LAYERS, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsLayer, AgentsMeta, AgentsMetaNode, AgentsTopologyType, type CandidateFileEntry, type CandidateFileFamily, type DriftDetectedEvent, type FabricEvent, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type LedgerAppendedEvent, LedgerEntry, type LockApprovedEvent, type LockDriftEvent, type MetaUpdatedEvent, agentsIdentitySourceSchema, agentsLayerSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aiLedgerEntrySchema, annotateIntentRequestSchema, auditModeSchema, candidateFileEntrySchema, clientPathsSchema, deriveAgentsMetaIdentitySource, deriveAgentsMetaLayer, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, driftDetectedEventSchema, fabricConfigSchema, fabricEventSchema, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, historyStateQuerySchema, humanLedgerEntrySchema, humanLockApproveRequestSchema, humanLockEntrySchema, humanLockFileParamsSchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, ledgerAppendedEventSchema, ledgerEntrySchema, ledgerQuerySchema, ledgerSourceSchema, lockApprovedEventSchema, lockDriftEventSchema, metaUpdatedEventSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, withDerivedAgentsMetaNodeDefaults };
3600
+ declare const ruleContextPlannedEventSchema: z.ZodObject<{
3601
+ event_type: z.ZodLiteral<"rule_context_planned">;
3602
+ target_paths: z.ZodArray<z.ZodString, "many">;
3603
+ required_stable_ids: z.ZodArray<z.ZodString, "many">;
3604
+ ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
3605
+ final_stable_ids: z.ZodArray<z.ZodString, "many">;
3606
+ selection_token: z.ZodOptional<z.ZodString>;
3607
+ client_hash: z.ZodOptional<z.ZodString>;
3608
+ intent: z.ZodOptional<z.ZodString>;
3609
+ known_tech: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3610
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3611
+ kind: z.ZodLiteral<"fabric-event">;
3612
+ id: z.ZodString;
3613
+ ts: z.ZodNumber;
3614
+ schema_version: z.ZodLiteral<1>;
3615
+ correlation_id: z.ZodOptional<z.ZodString>;
3616
+ session_id: z.ZodOptional<z.ZodString>;
3617
+ }, "strip", z.ZodTypeAny, {
3618
+ schema_version: 1;
3619
+ ts: number;
3620
+ id: string;
3621
+ kind: "fabric-event";
3622
+ event_type: "rule_context_planned";
3623
+ target_paths: string[];
3624
+ required_stable_ids: string[];
3625
+ ai_selectable_stable_ids: string[];
3626
+ final_stable_ids: string[];
3627
+ intent?: string | undefined;
3628
+ selection_token?: string | undefined;
3629
+ client_hash?: string | undefined;
3630
+ known_tech?: string[] | undefined;
3631
+ diagnostics?: unknown[] | undefined;
3632
+ correlation_id?: string | undefined;
3633
+ session_id?: string | undefined;
3634
+ }, {
3635
+ schema_version: 1;
3636
+ ts: number;
3637
+ id: string;
3638
+ kind: "fabric-event";
3639
+ event_type: "rule_context_planned";
3640
+ target_paths: string[];
3641
+ required_stable_ids: string[];
3642
+ ai_selectable_stable_ids: string[];
3643
+ final_stable_ids: string[];
3644
+ intent?: string | undefined;
3645
+ selection_token?: string | undefined;
3646
+ client_hash?: string | undefined;
3647
+ known_tech?: string[] | undefined;
3648
+ diagnostics?: unknown[] | undefined;
3649
+ correlation_id?: string | undefined;
3650
+ session_id?: string | undefined;
3651
+ }>;
3652
+ declare const ruleSelectionEventSchema: z.ZodObject<{
3653
+ event_type: z.ZodLiteral<"rule_selection">;
3654
+ selection_token: z.ZodString;
3655
+ target_paths: z.ZodArray<z.ZodString, "many">;
3656
+ required_stable_ids: z.ZodArray<z.ZodString, "many">;
3657
+ ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
3658
+ ai_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
3659
+ final_stable_ids: z.ZodArray<z.ZodString, "many">;
3660
+ ai_selection_reasons: z.ZodRecord<z.ZodString, z.ZodString>;
3661
+ rejected_stable_ids: z.ZodArray<z.ZodString, "many">;
3662
+ ignored_stable_ids: z.ZodArray<z.ZodString, "many">;
3663
+ kind: z.ZodLiteral<"fabric-event">;
3664
+ id: z.ZodString;
3665
+ ts: z.ZodNumber;
3666
+ schema_version: z.ZodLiteral<1>;
3667
+ correlation_id: z.ZodOptional<z.ZodString>;
3668
+ session_id: z.ZodOptional<z.ZodString>;
3669
+ }, "strip", z.ZodTypeAny, {
3670
+ schema_version: 1;
3671
+ ts: number;
3672
+ id: string;
3673
+ kind: "fabric-event";
3674
+ event_type: "rule_selection";
3675
+ target_paths: string[];
3676
+ required_stable_ids: string[];
3677
+ ai_selectable_stable_ids: string[];
3678
+ final_stable_ids: string[];
3679
+ selection_token: string;
3680
+ ai_selected_stable_ids: string[];
3681
+ ai_selection_reasons: Record<string, string>;
3682
+ rejected_stable_ids: string[];
3683
+ ignored_stable_ids: string[];
3684
+ correlation_id?: string | undefined;
3685
+ session_id?: string | undefined;
3686
+ }, {
3687
+ schema_version: 1;
3688
+ ts: number;
3689
+ id: string;
3690
+ kind: "fabric-event";
3691
+ event_type: "rule_selection";
3692
+ target_paths: string[];
3693
+ required_stable_ids: string[];
3694
+ ai_selectable_stable_ids: string[];
3695
+ final_stable_ids: string[];
3696
+ selection_token: string;
3697
+ ai_selected_stable_ids: string[];
3698
+ ai_selection_reasons: Record<string, string>;
3699
+ rejected_stable_ids: string[];
3700
+ ignored_stable_ids: string[];
3701
+ correlation_id?: string | undefined;
3702
+ session_id?: string | undefined;
3703
+ }>;
3704
+ declare const ruleSectionsFetchedEventSchema: z.ZodObject<{
3705
+ event_type: z.ZodLiteral<"rule_sections_fetched">;
3706
+ selection_token: z.ZodString;
3707
+ target_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3708
+ requested_sections: z.ZodArray<z.ZodString, "many">;
3709
+ final_stable_ids: z.ZodArray<z.ZodString, "many">;
3710
+ ai_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
3711
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3712
+ kind: z.ZodLiteral<"fabric-event">;
3713
+ id: z.ZodString;
3714
+ ts: z.ZodNumber;
3715
+ schema_version: z.ZodLiteral<1>;
3716
+ correlation_id: z.ZodOptional<z.ZodString>;
3717
+ session_id: z.ZodOptional<z.ZodString>;
3718
+ }, "strip", z.ZodTypeAny, {
3719
+ schema_version: 1;
3720
+ ts: number;
3721
+ id: string;
3722
+ kind: "fabric-event";
3723
+ event_type: "rule_sections_fetched";
3724
+ final_stable_ids: string[];
3725
+ selection_token: string;
3726
+ ai_selected_stable_ids: string[];
3727
+ requested_sections: string[];
3728
+ target_paths?: string[] | undefined;
3729
+ diagnostics?: unknown[] | undefined;
3730
+ correlation_id?: string | undefined;
3731
+ session_id?: string | undefined;
3732
+ }, {
3733
+ schema_version: 1;
3734
+ ts: number;
3735
+ id: string;
3736
+ kind: "fabric-event";
3737
+ event_type: "rule_sections_fetched";
3738
+ final_stable_ids: string[];
3739
+ selection_token: string;
3740
+ ai_selected_stable_ids: string[];
3741
+ requested_sections: string[];
3742
+ target_paths?: string[] | undefined;
3743
+ diagnostics?: unknown[] | undefined;
3744
+ correlation_id?: string | undefined;
3745
+ session_id?: string | undefined;
3746
+ }>;
3747
+ declare const editIntentCheckedEventSchema: z.ZodObject<{
3748
+ event_type: z.ZodLiteral<"edit_intent_checked">;
3749
+ path: z.ZodString;
3750
+ compliant: z.ZodBoolean;
3751
+ intent: z.ZodString;
3752
+ ledger_entry_id: z.ZodString;
3753
+ ledger_source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
3754
+ commit_sha: z.ZodOptional<z.ZodString>;
3755
+ parent_sha: z.ZodOptional<z.ZodString>;
3756
+ parent_ledger_entry_id: z.ZodOptional<z.ZodString>;
3757
+ diff_stat: z.ZodOptional<z.ZodString>;
3758
+ annotation: z.ZodOptional<z.ZodString>;
3759
+ matched_rule_context_ts: z.ZodNullable<z.ZodNumber>;
3760
+ window_ms: z.ZodNumber;
3761
+ kind: z.ZodLiteral<"fabric-event">;
3762
+ id: z.ZodString;
3763
+ ts: z.ZodNumber;
3764
+ schema_version: z.ZodLiteral<1>;
3765
+ correlation_id: z.ZodOptional<z.ZodString>;
3766
+ session_id: z.ZodOptional<z.ZodString>;
3767
+ }, "strip", z.ZodTypeAny, {
3768
+ path: string;
3769
+ ledger_entry_id: string;
3770
+ schema_version: 1;
3771
+ ts: number;
3772
+ id: string;
3773
+ intent: string;
3774
+ kind: "fabric-event";
3775
+ event_type: "edit_intent_checked";
3776
+ compliant: boolean;
3777
+ matched_rule_context_ts: number | null;
3778
+ window_ms: number;
3779
+ annotation?: string | undefined;
3780
+ commit_sha?: string | undefined;
3781
+ parent_sha?: string | undefined;
3782
+ parent_ledger_entry_id?: string | undefined;
3783
+ diff_stat?: string | undefined;
3784
+ correlation_id?: string | undefined;
3785
+ session_id?: string | undefined;
3786
+ ledger_source?: "ai" | "human" | undefined;
3787
+ }, {
3788
+ path: string;
3789
+ ledger_entry_id: string;
3790
+ schema_version: 1;
3791
+ ts: number;
3792
+ id: string;
3793
+ intent: string;
3794
+ kind: "fabric-event";
3795
+ event_type: "edit_intent_checked";
3796
+ compliant: boolean;
3797
+ matched_rule_context_ts: number | null;
3798
+ window_ms: number;
3799
+ annotation?: string | undefined;
3800
+ commit_sha?: string | undefined;
3801
+ parent_sha?: string | undefined;
3802
+ parent_ledger_entry_id?: string | undefined;
3803
+ diff_stat?: string | undefined;
3804
+ correlation_id?: string | undefined;
3805
+ session_id?: string | undefined;
3806
+ ledger_source?: "ai" | "human" | undefined;
3807
+ }>;
3808
+ declare const ruleDriftDetectedEventSchema: z.ZodObject<{
3809
+ event_type: z.ZodLiteral<"rule_drift_detected">;
3810
+ revision: z.ZodOptional<z.ZodString>;
3811
+ drifted_stable_ids: z.ZodArray<z.ZodString, "many">;
3812
+ missing_files: z.ZodArray<z.ZodString, "many">;
3813
+ stale_files: z.ZodArray<z.ZodString, "many">;
3814
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
3815
+ file: z.ZodString;
3816
+ stable_id: z.ZodString;
3817
+ expected_hash: z.ZodString;
3818
+ actual_hash: z.ZodNullable<z.ZodString>;
3819
+ }, "strip", z.ZodTypeAny, {
3820
+ file: string;
3821
+ stable_id: string;
3822
+ expected_hash: string;
3823
+ actual_hash: string | null;
3824
+ }, {
3825
+ file: string;
3826
+ stable_id: string;
3827
+ expected_hash: string;
3828
+ actual_hash: string | null;
3829
+ }>, "many">>;
3830
+ kind: z.ZodLiteral<"fabric-event">;
3831
+ id: z.ZodString;
3832
+ ts: z.ZodNumber;
3833
+ schema_version: z.ZodLiteral<1>;
3834
+ correlation_id: z.ZodOptional<z.ZodString>;
3835
+ session_id: z.ZodOptional<z.ZodString>;
3836
+ }, "strip", z.ZodTypeAny, {
3837
+ schema_version: 1;
3838
+ ts: number;
3839
+ id: string;
3840
+ kind: "fabric-event";
3841
+ event_type: "rule_drift_detected";
3842
+ drifted_stable_ids: string[];
3843
+ missing_files: string[];
3844
+ stale_files: string[];
3845
+ revision?: string | undefined;
3846
+ correlation_id?: string | undefined;
3847
+ session_id?: string | undefined;
3848
+ details?: {
3849
+ file: string;
3850
+ stable_id: string;
3851
+ expected_hash: string;
3852
+ actual_hash: string | null;
3853
+ }[] | undefined;
3854
+ }, {
3855
+ schema_version: 1;
3856
+ ts: number;
3857
+ id: string;
3858
+ kind: "fabric-event";
3859
+ event_type: "rule_drift_detected";
3860
+ drifted_stable_ids: string[];
3861
+ missing_files: string[];
3862
+ stale_files: string[];
3863
+ revision?: string | undefined;
3864
+ correlation_id?: string | undefined;
3865
+ session_id?: string | undefined;
3866
+ details?: {
3867
+ file: string;
3868
+ stable_id: string;
3869
+ expected_hash: string;
3870
+ actual_hash: string | null;
3871
+ }[] | undefined;
3872
+ }>;
3873
+ declare const ruleBaselineAcceptedEventSchema: z.ZodObject<{
3874
+ event_type: z.ZodLiteral<"rule_baseline_accepted">;
3875
+ revision: z.ZodString;
3876
+ previous_revision: z.ZodOptional<z.ZodString>;
3877
+ accepted_stable_ids: z.ZodArray<z.ZodString, "many">;
3878
+ source: z.ZodOptional<z.ZodEnum<["doctor_fix", "sync_meta"]>>;
3879
+ kind: z.ZodLiteral<"fabric-event">;
3880
+ id: z.ZodString;
3881
+ ts: z.ZodNumber;
3882
+ schema_version: z.ZodLiteral<1>;
3883
+ correlation_id: z.ZodOptional<z.ZodString>;
3884
+ session_id: z.ZodOptional<z.ZodString>;
3885
+ }, "strip", z.ZodTypeAny, {
3886
+ revision: string;
3887
+ schema_version: 1;
3888
+ ts: number;
3889
+ id: string;
3890
+ kind: "fabric-event";
3891
+ event_type: "rule_baseline_accepted";
3892
+ accepted_stable_ids: string[];
3893
+ previous_revision?: string | undefined;
3894
+ source?: "doctor_fix" | "sync_meta" | undefined;
3895
+ correlation_id?: string | undefined;
3896
+ session_id?: string | undefined;
3897
+ }, {
3898
+ revision: string;
3899
+ schema_version: 1;
3900
+ ts: number;
3901
+ id: string;
3902
+ kind: "fabric-event";
3903
+ event_type: "rule_baseline_accepted";
3904
+ accepted_stable_ids: string[];
3905
+ previous_revision?: string | undefined;
3906
+ source?: "doctor_fix" | "sync_meta" | undefined;
3907
+ correlation_id?: string | undefined;
3908
+ session_id?: string | undefined;
3909
+ }>;
3910
+ declare const baselineSyncedEventSchema: z.ZodObject<{
3911
+ event_type: z.ZodLiteral<"baseline_synced">;
3912
+ revision: z.ZodString;
3913
+ previous_revision: z.ZodOptional<z.ZodString>;
3914
+ synced_files: z.ZodArray<z.ZodString, "many">;
3915
+ accepted_stable_ids: z.ZodArray<z.ZodString, "many">;
3916
+ source: z.ZodEnum<["doctor_fix", "sync_meta"]>;
3917
+ kind: z.ZodLiteral<"fabric-event">;
3918
+ id: z.ZodString;
3919
+ ts: z.ZodNumber;
3920
+ schema_version: z.ZodLiteral<1>;
3921
+ correlation_id: z.ZodOptional<z.ZodString>;
3922
+ session_id: z.ZodOptional<z.ZodString>;
3923
+ }, "strip", z.ZodTypeAny, {
3924
+ revision: string;
3925
+ schema_version: 1;
3926
+ source: "doctor_fix" | "sync_meta";
3927
+ ts: number;
3928
+ id: string;
3929
+ kind: "fabric-event";
3930
+ event_type: "baseline_synced";
3931
+ accepted_stable_ids: string[];
3932
+ synced_files: string[];
3933
+ previous_revision?: string | undefined;
3934
+ correlation_id?: string | undefined;
3935
+ session_id?: string | undefined;
3936
+ }, {
3937
+ revision: string;
3938
+ schema_version: 1;
3939
+ source: "doctor_fix" | "sync_meta";
3940
+ ts: number;
3941
+ id: string;
3942
+ kind: "fabric-event";
3943
+ event_type: "baseline_synced";
3944
+ accepted_stable_ids: string[];
3945
+ synced_files: string[];
3946
+ previous_revision?: string | undefined;
3947
+ correlation_id?: string | undefined;
3948
+ session_id?: string | undefined;
3949
+ }>;
3950
+ declare const mcpEventLedgerEventSchema: z.ZodObject<{
3951
+ event_type: z.ZodLiteral<"mcp_event">;
3952
+ mcp_event_id: z.ZodString;
3953
+ stream_id: z.ZodString;
3954
+ message: z.ZodUnknown;
3955
+ kind: z.ZodLiteral<"fabric-event">;
3956
+ id: z.ZodString;
3957
+ ts: z.ZodNumber;
3958
+ schema_version: z.ZodLiteral<1>;
3959
+ correlation_id: z.ZodOptional<z.ZodString>;
3960
+ session_id: z.ZodOptional<z.ZodString>;
3961
+ }, "strip", z.ZodTypeAny, {
3962
+ schema_version: 1;
3963
+ ts: number;
3964
+ id: string;
3965
+ kind: "fabric-event";
3966
+ event_type: "mcp_event";
3967
+ mcp_event_id: string;
3968
+ stream_id: string;
3969
+ message?: unknown;
3970
+ correlation_id?: string | undefined;
3971
+ session_id?: string | undefined;
3972
+ }, {
3973
+ schema_version: 1;
3974
+ ts: number;
3975
+ id: string;
3976
+ kind: "fabric-event";
3977
+ event_type: "mcp_event";
3978
+ mcp_event_id: string;
3979
+ stream_id: string;
3980
+ message?: unknown;
3981
+ correlation_id?: string | undefined;
3982
+ session_id?: string | undefined;
3983
+ }>;
3984
+ declare const eventLedgerEventSchema: z.ZodDiscriminatedUnion<"event_type", [z.ZodObject<{
3985
+ event_type: z.ZodLiteral<"rule_context_planned">;
3986
+ target_paths: z.ZodArray<z.ZodString, "many">;
3987
+ required_stable_ids: z.ZodArray<z.ZodString, "many">;
3988
+ ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
3989
+ final_stable_ids: z.ZodArray<z.ZodString, "many">;
3990
+ selection_token: z.ZodOptional<z.ZodString>;
3991
+ client_hash: z.ZodOptional<z.ZodString>;
3992
+ intent: z.ZodOptional<z.ZodString>;
3993
+ known_tech: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3994
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3995
+ kind: z.ZodLiteral<"fabric-event">;
3996
+ id: z.ZodString;
3997
+ ts: z.ZodNumber;
3998
+ schema_version: z.ZodLiteral<1>;
3999
+ correlation_id: z.ZodOptional<z.ZodString>;
4000
+ session_id: z.ZodOptional<z.ZodString>;
4001
+ }, "strip", z.ZodTypeAny, {
4002
+ schema_version: 1;
4003
+ ts: number;
4004
+ id: string;
4005
+ kind: "fabric-event";
4006
+ event_type: "rule_context_planned";
4007
+ target_paths: string[];
4008
+ required_stable_ids: string[];
4009
+ ai_selectable_stable_ids: string[];
4010
+ final_stable_ids: string[];
4011
+ intent?: string | undefined;
4012
+ selection_token?: string | undefined;
4013
+ client_hash?: string | undefined;
4014
+ known_tech?: string[] | undefined;
4015
+ diagnostics?: unknown[] | undefined;
4016
+ correlation_id?: string | undefined;
4017
+ session_id?: string | undefined;
4018
+ }, {
4019
+ schema_version: 1;
4020
+ ts: number;
4021
+ id: string;
4022
+ kind: "fabric-event";
4023
+ event_type: "rule_context_planned";
4024
+ target_paths: string[];
4025
+ required_stable_ids: string[];
4026
+ ai_selectable_stable_ids: string[];
4027
+ final_stable_ids: string[];
4028
+ intent?: string | undefined;
4029
+ selection_token?: string | undefined;
4030
+ client_hash?: string | undefined;
4031
+ known_tech?: string[] | undefined;
4032
+ diagnostics?: unknown[] | undefined;
4033
+ correlation_id?: string | undefined;
4034
+ session_id?: string | undefined;
4035
+ }>, z.ZodObject<{
4036
+ event_type: z.ZodLiteral<"rule_selection">;
4037
+ selection_token: z.ZodString;
4038
+ target_paths: z.ZodArray<z.ZodString, "many">;
4039
+ required_stable_ids: z.ZodArray<z.ZodString, "many">;
4040
+ ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
4041
+ ai_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
4042
+ final_stable_ids: z.ZodArray<z.ZodString, "many">;
4043
+ ai_selection_reasons: z.ZodRecord<z.ZodString, z.ZodString>;
4044
+ rejected_stable_ids: z.ZodArray<z.ZodString, "many">;
4045
+ ignored_stable_ids: z.ZodArray<z.ZodString, "many">;
4046
+ kind: z.ZodLiteral<"fabric-event">;
4047
+ id: z.ZodString;
4048
+ ts: z.ZodNumber;
4049
+ schema_version: z.ZodLiteral<1>;
4050
+ correlation_id: z.ZodOptional<z.ZodString>;
4051
+ session_id: z.ZodOptional<z.ZodString>;
4052
+ }, "strip", z.ZodTypeAny, {
4053
+ schema_version: 1;
4054
+ ts: number;
4055
+ id: string;
4056
+ kind: "fabric-event";
4057
+ event_type: "rule_selection";
4058
+ target_paths: string[];
4059
+ required_stable_ids: string[];
4060
+ ai_selectable_stable_ids: string[];
4061
+ final_stable_ids: string[];
4062
+ selection_token: string;
4063
+ ai_selected_stable_ids: string[];
4064
+ ai_selection_reasons: Record<string, string>;
4065
+ rejected_stable_ids: string[];
4066
+ ignored_stable_ids: string[];
4067
+ correlation_id?: string | undefined;
4068
+ session_id?: string | undefined;
4069
+ }, {
4070
+ schema_version: 1;
4071
+ ts: number;
4072
+ id: string;
4073
+ kind: "fabric-event";
4074
+ event_type: "rule_selection";
4075
+ target_paths: string[];
4076
+ required_stable_ids: string[];
4077
+ ai_selectable_stable_ids: string[];
4078
+ final_stable_ids: string[];
4079
+ selection_token: string;
4080
+ ai_selected_stable_ids: string[];
4081
+ ai_selection_reasons: Record<string, string>;
4082
+ rejected_stable_ids: string[];
4083
+ ignored_stable_ids: string[];
4084
+ correlation_id?: string | undefined;
4085
+ session_id?: string | undefined;
4086
+ }>, z.ZodObject<{
4087
+ event_type: z.ZodLiteral<"rule_sections_fetched">;
4088
+ selection_token: z.ZodString;
4089
+ target_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4090
+ requested_sections: z.ZodArray<z.ZodString, "many">;
4091
+ final_stable_ids: z.ZodArray<z.ZodString, "many">;
4092
+ ai_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
4093
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
4094
+ kind: z.ZodLiteral<"fabric-event">;
4095
+ id: z.ZodString;
4096
+ ts: z.ZodNumber;
4097
+ schema_version: z.ZodLiteral<1>;
4098
+ correlation_id: z.ZodOptional<z.ZodString>;
4099
+ session_id: z.ZodOptional<z.ZodString>;
4100
+ }, "strip", z.ZodTypeAny, {
4101
+ schema_version: 1;
4102
+ ts: number;
4103
+ id: string;
4104
+ kind: "fabric-event";
4105
+ event_type: "rule_sections_fetched";
4106
+ final_stable_ids: string[];
4107
+ selection_token: string;
4108
+ ai_selected_stable_ids: string[];
4109
+ requested_sections: string[];
4110
+ target_paths?: string[] | undefined;
4111
+ diagnostics?: unknown[] | undefined;
4112
+ correlation_id?: string | undefined;
4113
+ session_id?: string | undefined;
4114
+ }, {
4115
+ schema_version: 1;
4116
+ ts: number;
4117
+ id: string;
4118
+ kind: "fabric-event";
4119
+ event_type: "rule_sections_fetched";
4120
+ final_stable_ids: string[];
4121
+ selection_token: string;
4122
+ ai_selected_stable_ids: string[];
4123
+ requested_sections: string[];
4124
+ target_paths?: string[] | undefined;
4125
+ diagnostics?: unknown[] | undefined;
4126
+ correlation_id?: string | undefined;
4127
+ session_id?: string | undefined;
4128
+ }>, z.ZodObject<{
4129
+ event_type: z.ZodLiteral<"edit_intent_checked">;
4130
+ path: z.ZodString;
4131
+ compliant: z.ZodBoolean;
4132
+ intent: z.ZodString;
4133
+ ledger_entry_id: z.ZodString;
4134
+ ledger_source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
4135
+ commit_sha: z.ZodOptional<z.ZodString>;
4136
+ parent_sha: z.ZodOptional<z.ZodString>;
4137
+ parent_ledger_entry_id: z.ZodOptional<z.ZodString>;
4138
+ diff_stat: z.ZodOptional<z.ZodString>;
4139
+ annotation: z.ZodOptional<z.ZodString>;
4140
+ matched_rule_context_ts: z.ZodNullable<z.ZodNumber>;
4141
+ window_ms: z.ZodNumber;
4142
+ kind: z.ZodLiteral<"fabric-event">;
4143
+ id: z.ZodString;
4144
+ ts: z.ZodNumber;
4145
+ schema_version: z.ZodLiteral<1>;
4146
+ correlation_id: z.ZodOptional<z.ZodString>;
4147
+ session_id: z.ZodOptional<z.ZodString>;
4148
+ }, "strip", z.ZodTypeAny, {
4149
+ path: string;
4150
+ ledger_entry_id: string;
4151
+ schema_version: 1;
4152
+ ts: number;
4153
+ id: string;
4154
+ intent: string;
4155
+ kind: "fabric-event";
4156
+ event_type: "edit_intent_checked";
4157
+ compliant: boolean;
4158
+ matched_rule_context_ts: number | null;
4159
+ window_ms: number;
4160
+ annotation?: string | undefined;
4161
+ commit_sha?: string | undefined;
4162
+ parent_sha?: string | undefined;
4163
+ parent_ledger_entry_id?: string | undefined;
4164
+ diff_stat?: string | undefined;
4165
+ correlation_id?: string | undefined;
4166
+ session_id?: string | undefined;
4167
+ ledger_source?: "ai" | "human" | undefined;
4168
+ }, {
4169
+ path: string;
4170
+ ledger_entry_id: string;
4171
+ schema_version: 1;
4172
+ ts: number;
4173
+ id: string;
4174
+ intent: string;
4175
+ kind: "fabric-event";
4176
+ event_type: "edit_intent_checked";
4177
+ compliant: boolean;
4178
+ matched_rule_context_ts: number | null;
4179
+ window_ms: number;
4180
+ annotation?: string | undefined;
4181
+ commit_sha?: string | undefined;
4182
+ parent_sha?: string | undefined;
4183
+ parent_ledger_entry_id?: string | undefined;
4184
+ diff_stat?: string | undefined;
4185
+ correlation_id?: string | undefined;
4186
+ session_id?: string | undefined;
4187
+ ledger_source?: "ai" | "human" | undefined;
4188
+ }>, z.ZodObject<{
4189
+ event_type: z.ZodLiteral<"rule_drift_detected">;
4190
+ revision: z.ZodOptional<z.ZodString>;
4191
+ drifted_stable_ids: z.ZodArray<z.ZodString, "many">;
4192
+ missing_files: z.ZodArray<z.ZodString, "many">;
4193
+ stale_files: z.ZodArray<z.ZodString, "many">;
4194
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
4195
+ file: z.ZodString;
4196
+ stable_id: z.ZodString;
4197
+ expected_hash: z.ZodString;
4198
+ actual_hash: z.ZodNullable<z.ZodString>;
4199
+ }, "strip", z.ZodTypeAny, {
4200
+ file: string;
4201
+ stable_id: string;
4202
+ expected_hash: string;
4203
+ actual_hash: string | null;
4204
+ }, {
4205
+ file: string;
4206
+ stable_id: string;
4207
+ expected_hash: string;
4208
+ actual_hash: string | null;
4209
+ }>, "many">>;
4210
+ kind: z.ZodLiteral<"fabric-event">;
4211
+ id: z.ZodString;
4212
+ ts: z.ZodNumber;
4213
+ schema_version: z.ZodLiteral<1>;
4214
+ correlation_id: z.ZodOptional<z.ZodString>;
4215
+ session_id: z.ZodOptional<z.ZodString>;
4216
+ }, "strip", z.ZodTypeAny, {
4217
+ schema_version: 1;
4218
+ ts: number;
4219
+ id: string;
4220
+ kind: "fabric-event";
4221
+ event_type: "rule_drift_detected";
4222
+ drifted_stable_ids: string[];
4223
+ missing_files: string[];
4224
+ stale_files: string[];
4225
+ revision?: string | undefined;
4226
+ correlation_id?: string | undefined;
4227
+ session_id?: string | undefined;
4228
+ details?: {
4229
+ file: string;
4230
+ stable_id: string;
4231
+ expected_hash: string;
4232
+ actual_hash: string | null;
4233
+ }[] | undefined;
4234
+ }, {
4235
+ schema_version: 1;
4236
+ ts: number;
4237
+ id: string;
4238
+ kind: "fabric-event";
4239
+ event_type: "rule_drift_detected";
4240
+ drifted_stable_ids: string[];
4241
+ missing_files: string[];
4242
+ stale_files: string[];
4243
+ revision?: string | undefined;
4244
+ correlation_id?: string | undefined;
4245
+ session_id?: string | undefined;
4246
+ details?: {
4247
+ file: string;
4248
+ stable_id: string;
4249
+ expected_hash: string;
4250
+ actual_hash: string | null;
4251
+ }[] | undefined;
4252
+ }>, z.ZodObject<{
4253
+ event_type: z.ZodLiteral<"rule_baseline_accepted">;
4254
+ revision: z.ZodString;
4255
+ previous_revision: z.ZodOptional<z.ZodString>;
4256
+ accepted_stable_ids: z.ZodArray<z.ZodString, "many">;
4257
+ source: z.ZodOptional<z.ZodEnum<["doctor_fix", "sync_meta"]>>;
4258
+ kind: z.ZodLiteral<"fabric-event">;
4259
+ id: z.ZodString;
4260
+ ts: z.ZodNumber;
4261
+ schema_version: z.ZodLiteral<1>;
4262
+ correlation_id: z.ZodOptional<z.ZodString>;
4263
+ session_id: z.ZodOptional<z.ZodString>;
4264
+ }, "strip", z.ZodTypeAny, {
4265
+ revision: string;
4266
+ schema_version: 1;
4267
+ ts: number;
4268
+ id: string;
4269
+ kind: "fabric-event";
4270
+ event_type: "rule_baseline_accepted";
4271
+ accepted_stable_ids: string[];
4272
+ previous_revision?: string | undefined;
4273
+ source?: "doctor_fix" | "sync_meta" | undefined;
4274
+ correlation_id?: string | undefined;
4275
+ session_id?: string | undefined;
4276
+ }, {
4277
+ revision: string;
4278
+ schema_version: 1;
4279
+ ts: number;
4280
+ id: string;
4281
+ kind: "fabric-event";
4282
+ event_type: "rule_baseline_accepted";
4283
+ accepted_stable_ids: string[];
4284
+ previous_revision?: string | undefined;
4285
+ source?: "doctor_fix" | "sync_meta" | undefined;
4286
+ correlation_id?: string | undefined;
4287
+ session_id?: string | undefined;
4288
+ }>, z.ZodObject<{
4289
+ event_type: z.ZodLiteral<"baseline_synced">;
4290
+ revision: z.ZodString;
4291
+ previous_revision: z.ZodOptional<z.ZodString>;
4292
+ synced_files: z.ZodArray<z.ZodString, "many">;
4293
+ accepted_stable_ids: z.ZodArray<z.ZodString, "many">;
4294
+ source: z.ZodEnum<["doctor_fix", "sync_meta"]>;
4295
+ kind: z.ZodLiteral<"fabric-event">;
4296
+ id: z.ZodString;
4297
+ ts: z.ZodNumber;
4298
+ schema_version: z.ZodLiteral<1>;
4299
+ correlation_id: z.ZodOptional<z.ZodString>;
4300
+ session_id: z.ZodOptional<z.ZodString>;
4301
+ }, "strip", z.ZodTypeAny, {
4302
+ revision: string;
4303
+ schema_version: 1;
4304
+ source: "doctor_fix" | "sync_meta";
4305
+ ts: number;
4306
+ id: string;
4307
+ kind: "fabric-event";
4308
+ event_type: "baseline_synced";
4309
+ accepted_stable_ids: string[];
4310
+ synced_files: string[];
4311
+ previous_revision?: string | undefined;
4312
+ correlation_id?: string | undefined;
4313
+ session_id?: string | undefined;
4314
+ }, {
4315
+ revision: string;
4316
+ schema_version: 1;
4317
+ source: "doctor_fix" | "sync_meta";
4318
+ ts: number;
4319
+ id: string;
4320
+ kind: "fabric-event";
4321
+ event_type: "baseline_synced";
4322
+ accepted_stable_ids: string[];
4323
+ synced_files: string[];
4324
+ previous_revision?: string | undefined;
4325
+ correlation_id?: string | undefined;
4326
+ session_id?: string | undefined;
4327
+ }>, z.ZodObject<{
4328
+ event_type: z.ZodLiteral<"mcp_event">;
4329
+ mcp_event_id: z.ZodString;
4330
+ stream_id: z.ZodString;
4331
+ message: z.ZodUnknown;
4332
+ kind: z.ZodLiteral<"fabric-event">;
4333
+ id: z.ZodString;
4334
+ ts: z.ZodNumber;
4335
+ schema_version: z.ZodLiteral<1>;
4336
+ correlation_id: z.ZodOptional<z.ZodString>;
4337
+ session_id: z.ZodOptional<z.ZodString>;
4338
+ }, "strip", z.ZodTypeAny, {
4339
+ schema_version: 1;
4340
+ ts: number;
4341
+ id: string;
4342
+ kind: "fabric-event";
4343
+ event_type: "mcp_event";
4344
+ mcp_event_id: string;
4345
+ stream_id: string;
4346
+ message?: unknown;
4347
+ correlation_id?: string | undefined;
4348
+ session_id?: string | undefined;
4349
+ }, {
4350
+ schema_version: 1;
4351
+ ts: number;
4352
+ id: string;
4353
+ kind: "fabric-event";
4354
+ event_type: "mcp_event";
4355
+ mcp_event_id: string;
4356
+ stream_id: string;
4357
+ message?: unknown;
4358
+ correlation_id?: string | undefined;
4359
+ session_id?: string | undefined;
4360
+ }>]>;
4361
+ type RuleContextPlannedEvent = z.infer<typeof ruleContextPlannedEventSchema>;
4362
+ type RuleSelectionEvent = z.infer<typeof ruleSelectionEventSchema>;
4363
+ type RuleSectionsFetchedEvent = z.infer<typeof ruleSectionsFetchedEventSchema>;
4364
+ type EditIntentCheckedEvent = z.infer<typeof editIntentCheckedEventSchema>;
4365
+ type RuleDriftDetectedEvent = z.infer<typeof ruleDriftDetectedEventSchema>;
4366
+ type RuleBaselineAcceptedEvent = z.infer<typeof ruleBaselineAcceptedEventSchema>;
4367
+ type BaselineSyncedEvent = z.infer<typeof baselineSyncedEventSchema>;
4368
+ type McpEventLedgerEvent = z.infer<typeof mcpEventLedgerEventSchema>;
4369
+ type EventLedgerEvent = RuleContextPlannedEvent | RuleSelectionEvent | RuleSectionsFetchedEvent | EditIntentCheckedEvent | RuleDriftDetectedEvent | RuleBaselineAcceptedEvent | BaselineSyncedEvent | McpEventLedgerEvent;
4370
+ type EventLedgerEventType = EventLedgerEvent["event_type"];
4371
+ type EventLedgerEventInputFor<T extends EventLedgerEvent> = T extends EventLedgerEvent ? Omit<T, "kind" | "id" | "ts" | "schema_version" | "correlation_id" | "session_id"> & Partial<Pick<T, "id" | "ts" | "correlation_id" | "session_id">> : never;
4372
+ type EventLedgerEventInput = EventLedgerEventInputFor<EventLedgerEvent>;
4373
+
4374
+ export { AGENTS_META_IDENTITY_SOURCES, AGENTS_META_LAYERS, AGENTS_META_TOPOLOGY_TYPES, AgentsIdentitySource, AgentsLayer, AgentsMeta, AgentsMetaNode, AgentsTopologyType, type BaselineSyncedEvent, type CandidateFileEntry, type CandidateFileFamily, type DriftDetectedEvent, type EditIntentCheckedEvent, type EventLedgerEvent, type EventLedgerEventInput, type EventLedgerEventType, type FabricEvent, type ForensicAssertion, type ForensicAssertionConfidence, type ForensicAssertionCoverage, type ForensicAssertionType, type ForensicCodeSample, type ForensicEntryPoint, type ForensicEvidenceAnchor, type ForensicFramework, type ForensicReadme, type ForensicReport, type ForensicSamplingBudget, type ForensicTopology, HumanLockEntry, type HumanLockFile, type InitContext, type InitContextDomainGroup, type InitContextFramework, type InitContextInterviewTrailEntry, type InitContextInvariant, type InitContextInvariantConfidenceSnapshot, type InitContextSourceEvidence, type LedgerAppendedEvent, LedgerEntry, type LockApprovedEvent, type LockDriftEvent, type McpEventLedgerEvent, type MetaUpdatedEvent, RULE_TEST_INDEX_SCHEMA_VERSION, type RuleBaselineAcceptedEvent, type RuleContextPlannedEvent, type RuleDriftDetectedEvent, type RuleSectionsFetchedEvent, type RuleSelectionEvent, type RuleTestIndex, type RuleTestLink, type RuleTestOrphanAnnotation, agentsIdentitySourceSchema, agentsLayerSchema, agentsMetaNodeSchema, agentsMetaSchema, agentsTopologyTypeSchema, aiLedgerEntrySchema, annotateIntentRequestSchema, auditModeSchema, baselineSyncedEventSchema, candidateFileEntrySchema, clientPathsSchema, deriveAgentsMetaIdentitySource, deriveAgentsMetaLayer, deriveAgentsMetaStableId, deriveAgentsMetaTopologyType, driftDetectedEventSchema, editIntentCheckedEventSchema, eventLedgerEventSchema, fabricConfigSchema, fabricEventSchema, forensicAssertionCoverageSchema, forensicAssertionSchema, forensicCodeSampleSchema, forensicEntryPointSchema, forensicEvidenceAnchorSchema, forensicFrameworkSchema, forensicReadmeSchema, forensicReportSchema, forensicSamplingBudgetSchema, forensicTopologySchema, historyStateQuerySchema, humanLedgerEntrySchema, humanLockApproveRequestSchema, humanLockEntrySchema, humanLockFileParamsSchema, humanLockFileSchema, initContextDomainGroupSchema, initContextFrameworkSchema, initContextInterviewTrailEntrySchema, initContextInvariantConfidenceSnapshotSchema, initContextInvariantSchema, initContextSchema, initContextSourceEvidenceSchema, ledgerAppendedEventSchema, ledgerEntrySchema, ledgerQuerySchema, ledgerSourceSchema, lockApprovedEventSchema, lockDriftEventSchema, mcpEventLedgerEventSchema, metaUpdatedEventSchema, ruleBaselineAcceptedEventSchema, ruleContextPlannedEventSchema, ruleDescriptionIndexItemSchema, ruleDescriptionSchema, ruleDriftDetectedEventSchema, ruleSectionsFetchedEventSchema, ruleSelectionEventSchema, ruleTestIndexSchema, ruleTestLinkSchema, ruleTestOrphanAnnotationSchema, withDerivedAgentsMetaNodeDefaults };