@fenglimg/fabric-shared 1.8.0-rc.2 → 2.0.0-rc.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.
@@ -24,6 +24,7 @@ declare const planContextInputSchema: z.ZodObject<{
24
24
  client_hash: z.ZodOptional<z.ZodString>;
25
25
  correlation_id: z.ZodOptional<z.ZodString>;
26
26
  session_id: z.ZodOptional<z.ZodString>;
27
+ include_deprecated: z.ZodOptional<z.ZodBoolean>;
27
28
  }, "strip", z.ZodTypeAny, {
28
29
  paths: string[];
29
30
  known_tech?: string[] | undefined;
@@ -32,6 +33,7 @@ declare const planContextInputSchema: z.ZodObject<{
32
33
  client_hash?: string | undefined;
33
34
  correlation_id?: string | undefined;
34
35
  session_id?: string | undefined;
36
+ include_deprecated?: boolean | undefined;
35
37
  }, {
36
38
  paths: string[];
37
39
  known_tech?: string[] | undefined;
@@ -40,6 +42,7 @@ declare const planContextInputSchema: z.ZodObject<{
40
42
  client_hash?: string | undefined;
41
43
  correlation_id?: string | undefined;
42
44
  session_id?: string | undefined;
45
+ include_deprecated?: boolean | undefined;
43
46
  }>;
44
47
  declare const planContextOutputSchema: z.ZodObject<{
45
48
  revision_hash: z.ZodString;
@@ -90,6 +93,12 @@ declare const planContextOutputSchema: z.ZodObject<{
90
93
  impact: z.ZodArray<z.ZodString, "many">;
91
94
  must_read_if: z.ZodString;
92
95
  entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
96
+ id: z.ZodOptional<z.ZodString>;
97
+ knowledge_type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
98
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
99
+ knowledge_layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
100
+ layer_reason: z.ZodOptional<z.ZodString>;
101
+ created_at: z.ZodOptional<z.ZodString>;
93
102
  }, "strip", z.ZodTypeAny, {
94
103
  summary: string;
95
104
  intent_clues: string[];
@@ -97,6 +106,12 @@ declare const planContextOutputSchema: z.ZodObject<{
97
106
  impact: string[];
98
107
  must_read_if: string;
99
108
  entities?: string[] | undefined;
109
+ id?: string | undefined;
110
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
111
+ maturity?: "draft" | "verified" | "proven" | undefined;
112
+ knowledge_layer?: "personal" | "team" | undefined;
113
+ layer_reason?: string | undefined;
114
+ created_at?: string | undefined;
100
115
  }, {
101
116
  summary: string;
102
117
  intent_clues: string[];
@@ -104,7 +119,17 @@ declare const planContextOutputSchema: z.ZodObject<{
104
119
  impact: string[];
105
120
  must_read_if: string;
106
121
  entities?: string[] | undefined;
122
+ id?: string | undefined;
123
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
124
+ maturity?: "draft" | "verified" | "proven" | undefined;
125
+ knowledge_layer?: "personal" | "team" | undefined;
126
+ layer_reason?: string | undefined;
127
+ created_at?: string | undefined;
107
128
  }>;
129
+ type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
130
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
131
+ layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
132
+ layer_reason: z.ZodOptional<z.ZodString>;
108
133
  }, "strip", z.ZodTypeAny, {
109
134
  description: {
110
135
  summary: string;
@@ -113,11 +138,21 @@ declare const planContextOutputSchema: z.ZodObject<{
113
138
  impact: string[];
114
139
  must_read_if: string;
115
140
  entities?: string[] | undefined;
141
+ id?: string | undefined;
142
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
143
+ maturity?: "draft" | "verified" | "proven" | undefined;
144
+ knowledge_layer?: "personal" | "team" | undefined;
145
+ layer_reason?: string | undefined;
146
+ created_at?: string | undefined;
116
147
  };
117
- level: "L0" | "L1" | "L2";
118
148
  stable_id: string;
149
+ level: "L0" | "L1" | "L2";
119
150
  required: boolean;
120
151
  selectable: boolean;
152
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
153
+ maturity?: "draft" | "verified" | "proven" | undefined;
154
+ layer_reason?: string | undefined;
155
+ layer?: "personal" | "team" | undefined;
121
156
  }, {
122
157
  description: {
123
158
  summary: string;
@@ -126,11 +161,21 @@ declare const planContextOutputSchema: z.ZodObject<{
126
161
  impact: string[];
127
162
  must_read_if: string;
128
163
  entities?: string[] | undefined;
164
+ id?: string | undefined;
165
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
166
+ maturity?: "draft" | "verified" | "proven" | undefined;
167
+ knowledge_layer?: "personal" | "team" | undefined;
168
+ layer_reason?: string | undefined;
169
+ created_at?: string | undefined;
129
170
  };
130
- level: "L0" | "L1" | "L2";
131
171
  stable_id: string;
172
+ level: "L0" | "L1" | "L2";
132
173
  required: boolean;
133
174
  selectable: boolean;
175
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
176
+ maturity?: "draft" | "verified" | "proven" | undefined;
177
+ layer_reason?: string | undefined;
178
+ layer?: "personal" | "team" | undefined;
134
179
  }>, "many">;
135
180
  required_stable_ids: z.ZodArray<z.ZodString, "many">;
136
181
  ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
@@ -169,11 +214,21 @@ declare const planContextOutputSchema: z.ZodObject<{
169
214
  impact: string[];
170
215
  must_read_if: string;
171
216
  entities?: string[] | undefined;
217
+ id?: string | undefined;
218
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
219
+ maturity?: "draft" | "verified" | "proven" | undefined;
220
+ knowledge_layer?: "personal" | "team" | undefined;
221
+ layer_reason?: string | undefined;
222
+ created_at?: string | undefined;
172
223
  };
173
- level: "L0" | "L1" | "L2";
174
224
  stable_id: string;
225
+ level: "L0" | "L1" | "L2";
175
226
  required: boolean;
176
227
  selectable: boolean;
228
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
229
+ maturity?: "draft" | "verified" | "proven" | undefined;
230
+ layer_reason?: string | undefined;
231
+ layer?: "personal" | "team" | undefined;
177
232
  }[];
178
233
  required_stable_ids: string[];
179
234
  ai_selectable_stable_ids: string[];
@@ -204,11 +259,21 @@ declare const planContextOutputSchema: z.ZodObject<{
204
259
  impact: string[];
205
260
  must_read_if: string;
206
261
  entities?: string[] | undefined;
262
+ id?: string | undefined;
263
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
264
+ maturity?: "draft" | "verified" | "proven" | undefined;
265
+ knowledge_layer?: "personal" | "team" | undefined;
266
+ layer_reason?: string | undefined;
267
+ created_at?: string | undefined;
207
268
  };
208
- level: "L0" | "L1" | "L2";
209
269
  stable_id: string;
270
+ level: "L0" | "L1" | "L2";
210
271
  required: boolean;
211
272
  selectable: boolean;
273
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
274
+ maturity?: "draft" | "verified" | "proven" | undefined;
275
+ layer_reason?: string | undefined;
276
+ layer?: "personal" | "team" | undefined;
212
277
  }[];
213
278
  required_stable_ids: string[];
214
279
  ai_selectable_stable_ids: string[];
@@ -234,6 +299,12 @@ declare const planContextOutputSchema: z.ZodObject<{
234
299
  impact: z.ZodArray<z.ZodString, "many">;
235
300
  must_read_if: z.ZodString;
236
301
  entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
302
+ id: z.ZodOptional<z.ZodString>;
303
+ knowledge_type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
304
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
305
+ knowledge_layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
306
+ layer_reason: z.ZodOptional<z.ZodString>;
307
+ created_at: z.ZodOptional<z.ZodString>;
237
308
  }, "strip", z.ZodTypeAny, {
238
309
  summary: string;
239
310
  intent_clues: string[];
@@ -241,6 +312,12 @@ declare const planContextOutputSchema: z.ZodObject<{
241
312
  impact: string[];
242
313
  must_read_if: string;
243
314
  entities?: string[] | undefined;
315
+ id?: string | undefined;
316
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
317
+ maturity?: "draft" | "verified" | "proven" | undefined;
318
+ knowledge_layer?: "personal" | "team" | undefined;
319
+ layer_reason?: string | undefined;
320
+ created_at?: string | undefined;
244
321
  }, {
245
322
  summary: string;
246
323
  intent_clues: string[];
@@ -248,7 +325,17 @@ declare const planContextOutputSchema: z.ZodObject<{
248
325
  impact: string[];
249
326
  must_read_if: string;
250
327
  entities?: string[] | undefined;
328
+ id?: string | undefined;
329
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
330
+ maturity?: "draft" | "verified" | "proven" | undefined;
331
+ knowledge_layer?: "personal" | "team" | undefined;
332
+ layer_reason?: string | undefined;
333
+ created_at?: string | undefined;
251
334
  }>;
335
+ type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
336
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
337
+ layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
338
+ layer_reason: z.ZodOptional<z.ZodString>;
252
339
  }, "strip", z.ZodTypeAny, {
253
340
  description: {
254
341
  summary: string;
@@ -257,11 +344,21 @@ declare const planContextOutputSchema: z.ZodObject<{
257
344
  impact: string[];
258
345
  must_read_if: string;
259
346
  entities?: string[] | undefined;
347
+ id?: string | undefined;
348
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
349
+ maturity?: "draft" | "verified" | "proven" | undefined;
350
+ knowledge_layer?: "personal" | "team" | undefined;
351
+ layer_reason?: string | undefined;
352
+ created_at?: string | undefined;
260
353
  };
261
- level: "L0" | "L1" | "L2";
262
354
  stable_id: string;
355
+ level: "L0" | "L1" | "L2";
263
356
  required: boolean;
264
357
  selectable: boolean;
358
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
359
+ maturity?: "draft" | "verified" | "proven" | undefined;
360
+ layer_reason?: string | undefined;
361
+ layer?: "personal" | "team" | undefined;
265
362
  }, {
266
363
  description: {
267
364
  summary: string;
@@ -270,11 +367,21 @@ declare const planContextOutputSchema: z.ZodObject<{
270
367
  impact: string[];
271
368
  must_read_if: string;
272
369
  entities?: string[] | undefined;
370
+ id?: string | undefined;
371
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
372
+ maturity?: "draft" | "verified" | "proven" | undefined;
373
+ knowledge_layer?: "personal" | "team" | undefined;
374
+ layer_reason?: string | undefined;
375
+ created_at?: string | undefined;
273
376
  };
274
- level: "L0" | "L1" | "L2";
275
377
  stable_id: string;
378
+ level: "L0" | "L1" | "L2";
276
379
  required: boolean;
277
380
  selectable: boolean;
381
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
382
+ maturity?: "draft" | "verified" | "proven" | undefined;
383
+ layer_reason?: string | undefined;
384
+ layer?: "personal" | "team" | undefined;
278
385
  }>, "many">;
279
386
  preflight_diagnostics: z.ZodArray<z.ZodObject<{
280
387
  code: z.ZodLiteral<"missing_description">;
@@ -304,11 +411,21 @@ declare const planContextOutputSchema: z.ZodObject<{
304
411
  impact: string[];
305
412
  must_read_if: string;
306
413
  entities?: string[] | undefined;
414
+ id?: string | undefined;
415
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
416
+ maturity?: "draft" | "verified" | "proven" | undefined;
417
+ knowledge_layer?: "personal" | "team" | undefined;
418
+ layer_reason?: string | undefined;
419
+ created_at?: string | undefined;
307
420
  };
308
- level: "L0" | "L1" | "L2";
309
421
  stable_id: string;
422
+ level: "L0" | "L1" | "L2";
310
423
  required: boolean;
311
424
  selectable: boolean;
425
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
426
+ maturity?: "draft" | "verified" | "proven" | undefined;
427
+ layer_reason?: string | undefined;
428
+ layer?: "personal" | "team" | undefined;
312
429
  }[];
313
430
  required_stable_ids: string[];
314
431
  ai_selectable_stable_ids: string[];
@@ -328,11 +445,21 @@ declare const planContextOutputSchema: z.ZodObject<{
328
445
  impact: string[];
329
446
  must_read_if: string;
330
447
  entities?: string[] | undefined;
448
+ id?: string | undefined;
449
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
450
+ maturity?: "draft" | "verified" | "proven" | undefined;
451
+ knowledge_layer?: "personal" | "team" | undefined;
452
+ layer_reason?: string | undefined;
453
+ created_at?: string | undefined;
331
454
  };
332
- level: "L0" | "L1" | "L2";
333
455
  stable_id: string;
456
+ level: "L0" | "L1" | "L2";
334
457
  required: boolean;
335
458
  selectable: boolean;
459
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
460
+ maturity?: "draft" | "verified" | "proven" | undefined;
461
+ layer_reason?: string | undefined;
462
+ layer?: "personal" | "team" | undefined;
336
463
  }[];
337
464
  required_stable_ids: string[];
338
465
  ai_selectable_stable_ids: string[];
@@ -383,11 +510,21 @@ declare const planContextOutputSchema: z.ZodObject<{
383
510
  impact: string[];
384
511
  must_read_if: string;
385
512
  entities?: string[] | undefined;
513
+ id?: string | undefined;
514
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
515
+ maturity?: "draft" | "verified" | "proven" | undefined;
516
+ knowledge_layer?: "personal" | "team" | undefined;
517
+ layer_reason?: string | undefined;
518
+ created_at?: string | undefined;
386
519
  };
387
- level: "L0" | "L1" | "L2";
388
520
  stable_id: string;
521
+ level: "L0" | "L1" | "L2";
389
522
  required: boolean;
390
523
  selectable: boolean;
524
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
525
+ maturity?: "draft" | "verified" | "proven" | undefined;
526
+ layer_reason?: string | undefined;
527
+ layer?: "personal" | "team" | undefined;
391
528
  }[];
392
529
  required_stable_ids: string[];
393
530
  ai_selectable_stable_ids: string[];
@@ -409,11 +546,21 @@ declare const planContextOutputSchema: z.ZodObject<{
409
546
  impact: string[];
410
547
  must_read_if: string;
411
548
  entities?: string[] | undefined;
549
+ id?: string | undefined;
550
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
551
+ maturity?: "draft" | "verified" | "proven" | undefined;
552
+ knowledge_layer?: "personal" | "team" | undefined;
553
+ layer_reason?: string | undefined;
554
+ created_at?: string | undefined;
412
555
  };
413
- level: "L0" | "L1" | "L2";
414
556
  stable_id: string;
557
+ level: "L0" | "L1" | "L2";
415
558
  required: boolean;
416
559
  selectable: boolean;
560
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
561
+ maturity?: "draft" | "verified" | "proven" | undefined;
562
+ layer_reason?: string | undefined;
563
+ layer?: "personal" | "team" | undefined;
417
564
  }[];
418
565
  required_stable_ids: string[];
419
566
  ai_selectable_stable_ids: string[];
@@ -454,11 +601,21 @@ declare const planContextOutputSchema: z.ZodObject<{
454
601
  impact: string[];
455
602
  must_read_if: string;
456
603
  entities?: string[] | undefined;
604
+ id?: string | undefined;
605
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
606
+ maturity?: "draft" | "verified" | "proven" | undefined;
607
+ knowledge_layer?: "personal" | "team" | undefined;
608
+ layer_reason?: string | undefined;
609
+ created_at?: string | undefined;
457
610
  };
458
- level: "L0" | "L1" | "L2";
459
611
  stable_id: string;
612
+ level: "L0" | "L1" | "L2";
460
613
  required: boolean;
461
614
  selectable: boolean;
615
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
616
+ maturity?: "draft" | "verified" | "proven" | undefined;
617
+ layer_reason?: string | undefined;
618
+ layer?: "personal" | "team" | undefined;
462
619
  }[];
463
620
  required_stable_ids: string[];
464
621
  ai_selectable_stable_ids: string[];
@@ -480,11 +637,21 @@ declare const planContextOutputSchema: z.ZodObject<{
480
637
  impact: string[];
481
638
  must_read_if: string;
482
639
  entities?: string[] | undefined;
640
+ id?: string | undefined;
641
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
642
+ maturity?: "draft" | "verified" | "proven" | undefined;
643
+ knowledge_layer?: "personal" | "team" | undefined;
644
+ layer_reason?: string | undefined;
645
+ created_at?: string | undefined;
483
646
  };
484
- level: "L0" | "L1" | "L2";
485
647
  stable_id: string;
648
+ level: "L0" | "L1" | "L2";
486
649
  required: boolean;
487
650
  selectable: boolean;
651
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
652
+ maturity?: "draft" | "verified" | "proven" | undefined;
653
+ layer_reason?: string | undefined;
654
+ layer?: "personal" | "team" | undefined;
488
655
  }[];
489
656
  required_stable_ids: string[];
490
657
  ai_selectable_stable_ids: string[];
@@ -696,15 +863,15 @@ declare const ruleSectionsInputSchema: z.ZodObject<{
696
863
  correlation_id: z.ZodOptional<z.ZodString>;
697
864
  session_id: z.ZodOptional<z.ZodString>;
698
865
  }, "strip", z.ZodTypeAny, {
699
- sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
700
866
  selection_token: string;
867
+ sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
701
868
  ai_selected_stable_ids: string[];
702
869
  ai_selection_reasons: Record<string, string>;
703
870
  correlation_id?: string | undefined;
704
871
  session_id?: string | undefined;
705
872
  }, {
706
- sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
707
873
  selection_token: string;
874
+ sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
708
875
  ai_selected_stable_ids: string[];
709
876
  ai_selection_reasons: Record<string, string>;
710
877
  correlation_id?: string | undefined;
@@ -721,34 +888,49 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
721
888
  sections: z.ZodRecord<z.ZodString, z.ZodString>;
722
889
  }, "strip", z.ZodTypeAny, {
723
890
  path: string;
724
- level: "L0" | "L1" | "L2";
725
891
  stable_id: string;
892
+ level: "L0" | "L1" | "L2";
726
893
  sections: Record<string, string>;
727
894
  }, {
728
895
  path: string;
729
- level: "L0" | "L1" | "L2";
730
896
  stable_id: string;
897
+ level: "L0" | "L1" | "L2";
731
898
  sections: Record<string, string>;
732
899
  }>, "many">;
733
- diagnostics: z.ZodArray<z.ZodObject<{
900
+ diagnostics: z.ZodArray<z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
734
901
  code: z.ZodLiteral<"missing_section">;
735
902
  severity: z.ZodLiteral<"warn">;
736
903
  stable_id: z.ZodString;
737
904
  section: z.ZodEnum<["MISSION_STATEMENT", "MANDATORY_INJECTION", "BUSINESS_LOGIC_CHUNKS", "CONTEXT_INFO"]>;
738
905
  message: z.ZodString;
739
906
  }, "strip", z.ZodTypeAny, {
740
- stable_id: string;
741
907
  code: "missing_section";
742
908
  message: string;
909
+ stable_id: string;
743
910
  severity: "warn";
744
911
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
745
912
  }, {
746
- stable_id: string;
747
913
  code: "missing_section";
748
914
  message: string;
915
+ stable_id: string;
749
916
  severity: "warn";
750
917
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
751
- }>, "many">;
918
+ }>, z.ZodObject<{
919
+ code: z.ZodLiteral<"missing_knowledge_metadata">;
920
+ severity: z.ZodLiteral<"warn">;
921
+ stable_id: z.ZodString;
922
+ message: z.ZodString;
923
+ }, "strip", z.ZodTypeAny, {
924
+ code: "missing_knowledge_metadata";
925
+ message: string;
926
+ stable_id: string;
927
+ severity: "warn";
928
+ }, {
929
+ code: "missing_knowledge_metadata";
930
+ message: string;
931
+ stable_id: string;
932
+ severity: "warn";
933
+ }>]>, "many">;
752
934
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
753
935
  code: z.ZodString;
754
936
  file: z.ZodString;
@@ -769,19 +951,24 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
769
951
  revision_hash: string;
770
952
  rules: {
771
953
  path: string;
772
- level: "L0" | "L1" | "L2";
773
954
  stable_id: string;
955
+ level: "L0" | "L1" | "L2";
774
956
  sections: Record<string, string>;
775
957
  }[];
776
958
  precedence: ["L2", "L1", "L0"];
777
959
  selected_stable_ids: string[];
778
- diagnostics: {
779
- stable_id: string;
960
+ diagnostics: ({
780
961
  code: "missing_section";
781
962
  message: string;
963
+ stable_id: string;
782
964
  severity: "warn";
783
965
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
784
- }[];
966
+ } | {
967
+ code: "missing_knowledge_metadata";
968
+ message: string;
969
+ stable_id: string;
970
+ severity: "warn";
971
+ })[];
785
972
  warnings?: {
786
973
  file: string;
787
974
  code: string;
@@ -792,19 +979,24 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
792
979
  revision_hash: string;
793
980
  rules: {
794
981
  path: string;
795
- level: "L0" | "L1" | "L2";
796
982
  stable_id: string;
983
+ level: "L0" | "L1" | "L2";
797
984
  sections: Record<string, string>;
798
985
  }[];
799
986
  precedence: ["L2", "L1", "L0"];
800
987
  selected_stable_ids: string[];
801
- diagnostics: {
802
- stable_id: string;
988
+ diagnostics: ({
803
989
  code: "missing_section";
804
990
  message: string;
991
+ stable_id: string;
805
992
  severity: "warn";
806
993
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
807
- }[];
994
+ } | {
995
+ code: "missing_knowledge_metadata";
996
+ message: string;
997
+ stable_id: string;
998
+ severity: "warn";
999
+ })[];
808
1000
  warnings?: {
809
1001
  file: string;
810
1002
  code: string;
@@ -879,5 +1071,50 @@ declare const annotateIntentRequestSchema: z.ZodObject<{
879
1071
  ledger_entry_id: string;
880
1072
  annotation: string;
881
1073
  }>;
1074
+ declare const KnowledgeTypeSchema: z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>;
1075
+ type KnowledgeType = z.infer<typeof KnowledgeTypeSchema>;
1076
+ declare const MaturitySchema: z.ZodEnum<["draft", "verified", "proven"]>;
1077
+ type Maturity = z.infer<typeof MaturitySchema>;
1078
+ declare const LayerSchema: z.ZodEnum<["personal", "team"]>;
1079
+ type Layer = z.infer<typeof LayerSchema>;
1080
+ declare const StableIdSchema: z.ZodString;
1081
+ type StableId = z.infer<typeof StableIdSchema>;
1082
+ declare const KnowledgeEntryFrontmatterSchema: z.ZodObject<{
1083
+ id: z.ZodString;
1084
+ type: z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>;
1085
+ maturity: z.ZodEnum<["draft", "verified", "proven"]>;
1086
+ layer: z.ZodEnum<["personal", "team"]>;
1087
+ layer_reason: z.ZodOptional<z.ZodString>;
1088
+ created_at: z.ZodString;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ type: "model" | "decision" | "guideline" | "pitfall" | "process";
1091
+ id: string;
1092
+ maturity: "draft" | "verified" | "proven";
1093
+ created_at: string;
1094
+ layer: "personal" | "team";
1095
+ layer_reason?: string | undefined;
1096
+ }, {
1097
+ type: "model" | "decision" | "guideline" | "pitfall" | "process";
1098
+ id: string;
1099
+ maturity: "draft" | "verified" | "proven";
1100
+ created_at: string;
1101
+ layer: "personal" | "team";
1102
+ layer_reason?: string | undefined;
1103
+ }>;
1104
+ type KnowledgeEntryFrontmatter = z.infer<typeof KnowledgeEntryFrontmatterSchema>;
1105
+ declare const KNOWLEDGE_TYPE_CODES: {
1106
+ readonly model: "MOD";
1107
+ readonly decision: "DEC";
1108
+ readonly guideline: "GLD";
1109
+ readonly pitfall: "PIT";
1110
+ readonly process: "PRO";
1111
+ };
1112
+ type KnowledgeTypeCode = (typeof KNOWLEDGE_TYPE_CODES)[KnowledgeType];
1113
+ declare function formatKnowledgeId(layer: Layer, type: KnowledgeType, counter: number): StableId;
1114
+ declare function parseKnowledgeId(id: string): {
1115
+ layer: Layer;
1116
+ type: KnowledgeType;
1117
+ counter: number;
1118
+ } | null;
882
1119
 
883
- export { annotateIntentRequestSchema, getRulesAnnotations, getRulesInputSchema, getRulesOutputSchema, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, ledgerQuerySchema, ledgerSourceSchema, planContextAnnotations, planContextInputSchema, planContextOutputSchema, ruleSectionsAnnotations, ruleSectionsInputSchema, ruleSectionsOutputSchema, structuredWarningSchema };
1120
+ export { KNOWLEDGE_TYPE_CODES, type KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, type KnowledgeType, type KnowledgeTypeCode, KnowledgeTypeSchema, type Layer, LayerSchema, type Maturity, MaturitySchema, type StableId, StableIdSchema, annotateIntentRequestSchema, formatKnowledgeId, getRulesAnnotations, getRulesInputSchema, getRulesOutputSchema, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextInputSchema, planContextOutputSchema, ruleSectionsAnnotations, ruleSectionsInputSchema, ruleSectionsOutputSchema, structuredWarningSchema };
@@ -1,5 +1,12 @@
1
1
  import {
2
+ KNOWLEDGE_TYPE_CODES,
3
+ KnowledgeEntryFrontmatterSchema,
4
+ KnowledgeTypeSchema,
5
+ LayerSchema,
6
+ MaturitySchema,
7
+ StableIdSchema,
2
8
  annotateIntentRequestSchema,
9
+ formatKnowledgeId,
3
10
  getRulesAnnotations,
4
11
  getRulesInputSchema,
5
12
  getRulesOutputSchema,
@@ -8,6 +15,7 @@ import {
8
15
  humanLockFileParamsSchema,
9
16
  ledgerQuerySchema,
10
17
  ledgerSourceSchema,
18
+ parseKnowledgeId,
11
19
  planContextAnnotations,
12
20
  planContextInputSchema,
13
21
  planContextOutputSchema,
@@ -15,9 +23,16 @@ import {
15
23
  ruleSectionsInputSchema,
16
24
  ruleSectionsOutputSchema,
17
25
  structuredWarningSchema
18
- } from "../chunk-KV27CZH3.js";
26
+ } from "../chunk-HACPXMLL.js";
19
27
  export {
28
+ KNOWLEDGE_TYPE_CODES,
29
+ KnowledgeEntryFrontmatterSchema,
30
+ KnowledgeTypeSchema,
31
+ LayerSchema,
32
+ MaturitySchema,
33
+ StableIdSchema,
20
34
  annotateIntentRequestSchema,
35
+ formatKnowledgeId,
21
36
  getRulesAnnotations,
22
37
  getRulesInputSchema,
23
38
  getRulesOutputSchema,
@@ -26,6 +41,7 @@ export {
26
41
  humanLockFileParamsSchema,
27
42
  ledgerQuerySchema,
28
43
  ledgerSourceSchema,
44
+ parseKnowledgeId,
29
45
  planContextAnnotations,
30
46
  planContextInputSchema,
31
47
  planContextOutputSchema,
@@ -9,6 +9,13 @@ interface RuleDescription {
9
9
  impact: string[];
10
10
  must_read_if: string;
11
11
  entities?: string[];
12
+ id?: string;
13
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process";
14
+ maturity?: "draft" | "verified" | "proven";
15
+ knowledge_layer?: "personal" | "team";
16
+ layer_reason?: string;
17
+ created_at?: string;
18
+ tags?: string[];
12
19
  }
13
20
  interface RuleDescriptionIndexItem {
14
21
  stable_id: string;
@@ -16,6 +23,10 @@ interface RuleDescriptionIndexItem {
16
23
  required: boolean;
17
24
  selectable: boolean;
18
25
  description: RuleDescription;
26
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process";
27
+ maturity?: "draft" | "verified" | "proven";
28
+ layer?: "personal" | "team";
29
+ layer_reason?: string;
19
30
  }
20
31
  interface AgentsMetaNodeActivation {
21
32
  tier: AgentsActivationTier;
@@ -37,9 +48,21 @@ interface AgentsMetaNode {
37
48
  description?: RuleDescription;
38
49
  sections?: string[];
39
50
  }
51
+ interface AgentsMetaKnowledgeTypeCounters {
52
+ MOD: number;
53
+ DEC: number;
54
+ GLD: number;
55
+ PIT: number;
56
+ PRO: number;
57
+ }
58
+ interface AgentsMetaCountersEnvelope {
59
+ KP: AgentsMetaKnowledgeTypeCounters;
60
+ KT: AgentsMetaKnowledgeTypeCounters;
61
+ }
40
62
  interface AgentsMeta {
41
63
  revision: string;
42
64
  nodes: Record<string, AgentsMetaNode>;
65
+ counters?: AgentsMetaCountersEnvelope;
43
66
  }
44
67
 
45
68
  interface AiLedgerEntry {
@@ -89,4 +112,4 @@ interface FabricConfig {
89
112
  mcpPayloadLimits?: McpPayloadLimits;
90
113
  }
91
114
 
92
- export type { AgentsActivationTier, AgentsIdentitySource, AgentsLayer, AgentsMeta, AgentsMetaNode, AgentsMetaNodeActivation, AgentsTopologyType, AiLedgerEntry, AuditMode, ClientPaths, FabricConfig, HumanLedgerEntry, HumanLockEntry, LedgerEntry, McpPayloadLimits, RuleDescription, RuleDescriptionIndexItem };
115
+ export type { AgentsActivationTier, AgentsIdentitySource, AgentsLayer, AgentsMeta, AgentsMetaCountersEnvelope, AgentsMetaKnowledgeTypeCounters, AgentsMetaNode, AgentsMetaNodeActivation, AgentsTopologyType, AiLedgerEntry, AuditMode, ClientPaths, FabricConfig, HumanLedgerEntry, HumanLockEntry, LedgerEntry, McpPayloadLimits, RuleDescription, RuleDescriptionIndexItem };