@fenglimg/fabric-shared 2.0.0-rc.1 → 2.0.0-rc.8

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,7 +24,8 @@ 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
+ layer_filter: z.ZodOptional<z.ZodEnum<["team", "personal", "both"]>>;
28
+ target_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
28
29
  }, "strip", z.ZodTypeAny, {
29
30
  paths: string[];
30
31
  known_tech?: string[] | undefined;
@@ -33,7 +34,8 @@ declare const planContextInputSchema: z.ZodObject<{
33
34
  client_hash?: string | undefined;
34
35
  correlation_id?: string | undefined;
35
36
  session_id?: string | undefined;
36
- include_deprecated?: boolean | undefined;
37
+ layer_filter?: "personal" | "team" | "both" | undefined;
38
+ target_paths?: string[] | undefined;
37
39
  }, {
38
40
  paths: string[];
39
41
  known_tech?: string[] | undefined;
@@ -42,7 +44,8 @@ declare const planContextInputSchema: z.ZodObject<{
42
44
  client_hash?: string | undefined;
43
45
  correlation_id?: string | undefined;
44
46
  session_id?: string | undefined;
45
- include_deprecated?: boolean | undefined;
47
+ layer_filter?: "personal" | "team" | "both" | undefined;
48
+ target_paths?: string[] | undefined;
46
49
  }>;
47
50
  declare const planContextOutputSchema: z.ZodObject<{
48
51
  revision_hash: z.ZodString;
@@ -54,31 +57,22 @@ declare const planContextOutputSchema: z.ZodObject<{
54
57
  target_path: z.ZodString;
55
58
  path_segments: z.ZodArray<z.ZodString, "many">;
56
59
  extension: z.ZodString;
57
- inferred_domain: z.ZodArray<z.ZodString, "many">;
58
60
  known_tech: z.ZodArray<z.ZodString, "many">;
59
61
  user_intent: z.ZodString;
60
- intent_tokens: z.ZodArray<z.ZodString, "many">;
61
- impact_hints: z.ZodArray<z.ZodString, "many">;
62
62
  detected_entities: z.ZodArray<z.ZodString, "many">;
63
63
  }, "strip", z.ZodTypeAny, {
64
64
  target_path: string;
65
65
  path_segments: string[];
66
66
  extension: string;
67
- inferred_domain: string[];
68
67
  known_tech: string[];
69
68
  user_intent: string;
70
- intent_tokens: string[];
71
- impact_hints: string[];
72
69
  detected_entities: string[];
73
70
  }, {
74
71
  target_path: string;
75
72
  path_segments: string[];
76
73
  extension: string;
77
- inferred_domain: string[];
78
74
  known_tech: string[];
79
75
  user_intent: string;
80
- intent_tokens: string[];
81
- impact_hints: string[];
82
76
  detected_entities: string[];
83
77
  }>;
84
78
  description_index: z.ZodArray<z.ZodObject<{
@@ -130,6 +124,9 @@ declare const planContextOutputSchema: z.ZodObject<{
130
124
  maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
131
125
  layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
132
126
  layer_reason: z.ZodOptional<z.ZodString>;
127
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
128
+ relevance_scope: z.ZodOptional<z.ZodEnum<["narrow", "broad"]>>;
129
+ relevance_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
133
130
  }, "strip", z.ZodTypeAny, {
134
131
  description: {
135
132
  summary: string;
@@ -153,6 +150,9 @@ declare const planContextOutputSchema: z.ZodObject<{
153
150
  maturity?: "draft" | "verified" | "proven" | undefined;
154
151
  layer_reason?: string | undefined;
155
152
  layer?: "personal" | "team" | undefined;
153
+ tags?: string[] | undefined;
154
+ relevance_scope?: "narrow" | "broad" | undefined;
155
+ relevance_paths?: string[] | undefined;
156
156
  }, {
157
157
  description: {
158
158
  summary: string;
@@ -176,34 +176,18 @@ declare const planContextOutputSchema: z.ZodObject<{
176
176
  maturity?: "draft" | "verified" | "proven" | undefined;
177
177
  layer_reason?: string | undefined;
178
178
  layer?: "personal" | "team" | undefined;
179
+ tags?: string[] | undefined;
180
+ relevance_scope?: "narrow" | "broad" | undefined;
181
+ relevance_paths?: string[] | undefined;
179
182
  }>, "many">;
180
- required_stable_ids: z.ZodArray<z.ZodString, "many">;
181
- ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
182
- initial_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
183
- selection_policy: z.ZodObject<{
184
- required_levels: z.ZodTuple<[z.ZodLiteral<"L0">, z.ZodLiteral<"L2">], null>;
185
- ai_selectable_levels: z.ZodTuple<[z.ZodLiteral<"L1">], null>;
186
- final_fetch_rule: z.ZodLiteral<"required_stable_ids + ai_selected_l1_stable_ids">;
187
- }, "strip", z.ZodTypeAny, {
188
- required_levels: ["L0", "L2"];
189
- ai_selectable_levels: ["L1"];
190
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
191
- }, {
192
- required_levels: ["L0", "L2"];
193
- ai_selectable_levels: ["L1"];
194
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
195
- }>;
196
183
  }, "strip", z.ZodTypeAny, {
197
184
  path: string;
198
185
  requirement_profile: {
199
186
  target_path: string;
200
187
  path_segments: string[];
201
188
  extension: string;
202
- inferred_domain: string[];
203
189
  known_tech: string[];
204
190
  user_intent: string;
205
- intent_tokens: string[];
206
- impact_hints: string[];
207
191
  detected_entities: string[];
208
192
  };
209
193
  description_index: {
@@ -229,26 +213,18 @@ declare const planContextOutputSchema: z.ZodObject<{
229
213
  maturity?: "draft" | "verified" | "proven" | undefined;
230
214
  layer_reason?: string | undefined;
231
215
  layer?: "personal" | "team" | undefined;
216
+ tags?: string[] | undefined;
217
+ relevance_scope?: "narrow" | "broad" | undefined;
218
+ relevance_paths?: string[] | undefined;
232
219
  }[];
233
- required_stable_ids: string[];
234
- ai_selectable_stable_ids: string[];
235
- initial_selected_stable_ids: string[];
236
- selection_policy: {
237
- required_levels: ["L0", "L2"];
238
- ai_selectable_levels: ["L1"];
239
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
240
- };
241
220
  }, {
242
221
  path: string;
243
222
  requirement_profile: {
244
223
  target_path: string;
245
224
  path_segments: string[];
246
225
  extension: string;
247
- inferred_domain: string[];
248
226
  known_tech: string[];
249
227
  user_intent: string;
250
- intent_tokens: string[];
251
- impact_hints: string[];
252
228
  detected_entities: string[];
253
229
  };
254
230
  description_index: {
@@ -274,19 +250,12 @@ declare const planContextOutputSchema: z.ZodObject<{
274
250
  maturity?: "draft" | "verified" | "proven" | undefined;
275
251
  layer_reason?: string | undefined;
276
252
  layer?: "personal" | "team" | undefined;
253
+ tags?: string[] | undefined;
254
+ relevance_scope?: "narrow" | "broad" | undefined;
255
+ relevance_paths?: string[] | undefined;
277
256
  }[];
278
- required_stable_ids: string[];
279
- ai_selectable_stable_ids: string[];
280
- initial_selected_stable_ids: string[];
281
- selection_policy: {
282
- required_levels: ["L0", "L2"];
283
- ai_selectable_levels: ["L1"];
284
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
285
- };
286
257
  }>, "many">;
287
258
  shared: z.ZodObject<{
288
- required_stable_ids: z.ZodArray<z.ZodString, "many">;
289
- ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
290
259
  description_index: z.ZodArray<z.ZodObject<{
291
260
  stable_id: z.ZodString;
292
261
  level: z.ZodEnum<["L0", "L1", "L2"]>;
@@ -336,6 +305,9 @@ declare const planContextOutputSchema: z.ZodObject<{
336
305
  maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
337
306
  layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
338
307
  layer_reason: z.ZodOptional<z.ZodString>;
308
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
309
+ relevance_scope: z.ZodOptional<z.ZodEnum<["narrow", "broad"]>>;
310
+ relevance_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
339
311
  }, "strip", z.ZodTypeAny, {
340
312
  description: {
341
313
  summary: string;
@@ -359,6 +331,9 @@ declare const planContextOutputSchema: z.ZodObject<{
359
331
  maturity?: "draft" | "verified" | "proven" | undefined;
360
332
  layer_reason?: string | undefined;
361
333
  layer?: "personal" | "team" | undefined;
334
+ tags?: string[] | undefined;
335
+ relevance_scope?: "narrow" | "broad" | undefined;
336
+ relevance_paths?: string[] | undefined;
362
337
  }, {
363
338
  description: {
364
339
  summary: string;
@@ -382,6 +357,9 @@ declare const planContextOutputSchema: z.ZodObject<{
382
357
  maturity?: "draft" | "verified" | "proven" | undefined;
383
358
  layer_reason?: string | undefined;
384
359
  layer?: "personal" | "team" | undefined;
360
+ tags?: string[] | undefined;
361
+ relevance_scope?: "narrow" | "broad" | undefined;
362
+ relevance_paths?: string[] | undefined;
385
363
  }>, "many">;
386
364
  preflight_diagnostics: z.ZodArray<z.ZodObject<{
387
365
  code: z.ZodLiteral<"missing_description">;
@@ -426,9 +404,10 @@ declare const planContextOutputSchema: z.ZodObject<{
426
404
  maturity?: "draft" | "verified" | "proven" | undefined;
427
405
  layer_reason?: string | undefined;
428
406
  layer?: "personal" | "team" | undefined;
407
+ tags?: string[] | undefined;
408
+ relevance_scope?: "narrow" | "broad" | undefined;
409
+ relevance_paths?: string[] | undefined;
429
410
  }[];
430
- required_stable_ids: string[];
431
- ai_selectable_stable_ids: string[];
432
411
  preflight_diagnostics: {
433
412
  code: "missing_description";
434
413
  message: string;
@@ -460,9 +439,10 @@ declare const planContextOutputSchema: z.ZodObject<{
460
439
  maturity?: "draft" | "verified" | "proven" | undefined;
461
440
  layer_reason?: string | undefined;
462
441
  layer?: "personal" | "team" | undefined;
442
+ tags?: string[] | undefined;
443
+ relevance_scope?: "narrow" | "broad" | undefined;
444
+ relevance_paths?: string[] | undefined;
463
445
  }[];
464
- required_stable_ids: string[];
465
- ai_selectable_stable_ids: string[];
466
446
  preflight_diagnostics: {
467
447
  code: "missing_description";
468
448
  message: string;
@@ -495,11 +475,8 @@ declare const planContextOutputSchema: z.ZodObject<{
495
475
  target_path: string;
496
476
  path_segments: string[];
497
477
  extension: string;
498
- inferred_domain: string[];
499
478
  known_tech: string[];
500
479
  user_intent: string;
501
- intent_tokens: string[];
502
- impact_hints: string[];
503
480
  detected_entities: string[];
504
481
  };
505
482
  description_index: {
@@ -525,15 +502,10 @@ declare const planContextOutputSchema: z.ZodObject<{
525
502
  maturity?: "draft" | "verified" | "proven" | undefined;
526
503
  layer_reason?: string | undefined;
527
504
  layer?: "personal" | "team" | undefined;
505
+ tags?: string[] | undefined;
506
+ relevance_scope?: "narrow" | "broad" | undefined;
507
+ relevance_paths?: string[] | undefined;
528
508
  }[];
529
- required_stable_ids: string[];
530
- ai_selectable_stable_ids: string[];
531
- initial_selected_stable_ids: string[];
532
- selection_policy: {
533
- required_levels: ["L0", "L2"];
534
- ai_selectable_levels: ["L1"];
535
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
536
- };
537
509
  }[];
538
510
  revision_hash: string;
539
511
  selection_token: string;
@@ -561,9 +533,10 @@ declare const planContextOutputSchema: z.ZodObject<{
561
533
  maturity?: "draft" | "verified" | "proven" | undefined;
562
534
  layer_reason?: string | undefined;
563
535
  layer?: "personal" | "team" | undefined;
536
+ tags?: string[] | undefined;
537
+ relevance_scope?: "narrow" | "broad" | undefined;
538
+ relevance_paths?: string[] | undefined;
564
539
  }[];
565
- required_stable_ids: string[];
566
- ai_selectable_stable_ids: string[];
567
540
  preflight_diagnostics: {
568
541
  code: "missing_description";
569
542
  message: string;
@@ -586,11 +559,8 @@ declare const planContextOutputSchema: z.ZodObject<{
586
559
  target_path: string;
587
560
  path_segments: string[];
588
561
  extension: string;
589
- inferred_domain: string[];
590
562
  known_tech: string[];
591
563
  user_intent: string;
592
- intent_tokens: string[];
593
- impact_hints: string[];
594
564
  detected_entities: string[];
595
565
  };
596
566
  description_index: {
@@ -616,15 +586,10 @@ declare const planContextOutputSchema: z.ZodObject<{
616
586
  maturity?: "draft" | "verified" | "proven" | undefined;
617
587
  layer_reason?: string | undefined;
618
588
  layer?: "personal" | "team" | undefined;
589
+ tags?: string[] | undefined;
590
+ relevance_scope?: "narrow" | "broad" | undefined;
591
+ relevance_paths?: string[] | undefined;
619
592
  }[];
620
- required_stable_ids: string[];
621
- ai_selectable_stable_ids: string[];
622
- initial_selected_stable_ids: string[];
623
- selection_policy: {
624
- required_levels: ["L0", "L2"];
625
- ai_selectable_levels: ["L1"];
626
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
627
- };
628
593
  }[];
629
594
  revision_hash: string;
630
595
  selection_token: string;
@@ -652,9 +617,10 @@ declare const planContextOutputSchema: z.ZodObject<{
652
617
  maturity?: "draft" | "verified" | "proven" | undefined;
653
618
  layer_reason?: string | undefined;
654
619
  layer?: "personal" | "team" | undefined;
620
+ tags?: string[] | undefined;
621
+ relevance_scope?: "narrow" | "broad" | undefined;
622
+ relevance_paths?: string[] | undefined;
655
623
  }[];
656
- required_stable_ids: string[];
657
- ai_selectable_stable_ids: string[];
658
624
  preflight_diagnostics: {
659
625
  code: "missing_description";
660
626
  message: string;
@@ -677,7 +643,67 @@ declare const planContextAnnotations: {
677
643
  readonly openWorldHint: false;
678
644
  readonly title: "Plan rule context";
679
645
  };
680
- declare const getRulesInputSchema: z.ZodObject<{
646
+ declare const planContextHintNarrowEntrySchema: z.ZodObject<{
647
+ id: z.ZodString;
648
+ type: z.ZodString;
649
+ maturity: z.ZodString;
650
+ summary: z.ZodString;
651
+ }, "strip", z.ZodTypeAny, {
652
+ type: string;
653
+ summary: string;
654
+ id: string;
655
+ maturity: string;
656
+ }, {
657
+ type: string;
658
+ summary: string;
659
+ id: string;
660
+ maturity: string;
661
+ }>;
662
+ declare const planContextHintOutputSchema: z.ZodObject<{
663
+ version: z.ZodLiteral<1>;
664
+ revision_hash: z.ZodString;
665
+ target_paths: z.ZodArray<z.ZodString, "many">;
666
+ narrow: z.ZodArray<z.ZodObject<{
667
+ id: z.ZodString;
668
+ type: z.ZodString;
669
+ maturity: z.ZodString;
670
+ summary: z.ZodString;
671
+ }, "strip", z.ZodTypeAny, {
672
+ type: string;
673
+ summary: string;
674
+ id: string;
675
+ maturity: string;
676
+ }, {
677
+ type: string;
678
+ summary: string;
679
+ id: string;
680
+ maturity: string;
681
+ }>, "many">;
682
+ broad_count: z.ZodNumber;
683
+ }, "strip", z.ZodTypeAny, {
684
+ narrow: {
685
+ type: string;
686
+ summary: string;
687
+ id: string;
688
+ maturity: string;
689
+ }[];
690
+ target_paths: string[];
691
+ revision_hash: string;
692
+ version: 1;
693
+ broad_count: number;
694
+ }, {
695
+ narrow: {
696
+ type: string;
697
+ summary: string;
698
+ id: string;
699
+ maturity: string;
700
+ }[];
701
+ target_paths: string[];
702
+ revision_hash: string;
703
+ version: 1;
704
+ broad_count: number;
705
+ }>;
706
+ declare const getKnowledgeInputSchema: z.ZodObject<{
681
707
  path: z.ZodString;
682
708
  client_hash: z.ZodOptional<z.ZodString>;
683
709
  correlation_id: z.ZodOptional<z.ZodString>;
@@ -693,7 +719,7 @@ declare const getRulesInputSchema: z.ZodObject<{
693
719
  correlation_id?: string | undefined;
694
720
  session_id?: string | undefined;
695
721
  }>;
696
- declare const getRulesOutputSchema: z.ZodObject<{
722
+ declare const getKnowledgeOutputSchema: z.ZodObject<{
697
723
  revision_hash: z.ZodString;
698
724
  stale: z.ZodBoolean;
699
725
  rules: z.ZodObject<{
@@ -848,25 +874,27 @@ declare const getRulesOutputSchema: z.ZodObject<{
848
874
  line?: number | undefined;
849
875
  }[] | undefined;
850
876
  }>;
851
- declare const getRulesAnnotations: {
877
+ declare const getKnowledgeAnnotations: {
852
878
  readonly readOnlyHint: true;
853
879
  readonly idempotentHint: true;
854
880
  readonly destructiveHint: false;
855
881
  readonly openWorldHint: false;
856
882
  readonly title: "Get rule content";
857
883
  };
858
- declare const ruleSectionsInputSchema: z.ZodObject<{
884
+ declare const knowledgeSectionsInputSchema: z.ZodObject<{
859
885
  selection_token: z.ZodString;
860
886
  sections: z.ZodArray<z.ZodEnum<["MISSION_STATEMENT", "MANDATORY_INJECTION", "BUSINESS_LOGIC_CHUNKS", "CONTEXT_INFO"]>, "many">;
861
887
  ai_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
862
888
  ai_selection_reasons: z.ZodRecord<z.ZodString, z.ZodString>;
863
889
  correlation_id: z.ZodOptional<z.ZodString>;
864
890
  session_id: z.ZodOptional<z.ZodString>;
891
+ client_hash: z.ZodOptional<z.ZodString>;
865
892
  }, "strip", z.ZodTypeAny, {
866
893
  selection_token: string;
867
894
  sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
868
895
  ai_selected_stable_ids: string[];
869
896
  ai_selection_reasons: Record<string, string>;
897
+ client_hash?: string | undefined;
870
898
  correlation_id?: string | undefined;
871
899
  session_id?: string | undefined;
872
900
  }, {
@@ -874,10 +902,11 @@ declare const ruleSectionsInputSchema: z.ZodObject<{
874
902
  sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
875
903
  ai_selected_stable_ids: string[];
876
904
  ai_selection_reasons: Record<string, string>;
905
+ client_hash?: string | undefined;
877
906
  correlation_id?: string | undefined;
878
907
  session_id?: string | undefined;
879
908
  }>;
880
- declare const ruleSectionsOutputSchema: z.ZodObject<{
909
+ declare const knowledgeSectionsOutputSchema: z.ZodObject<{
881
910
  revision_hash: z.ZodString;
882
911
  precedence: z.ZodTuple<[z.ZodLiteral<"L2">, z.ZodLiteral<"L1">, z.ZodLiteral<"L0">], null>;
883
912
  selected_stable_ids: z.ZodArray<z.ZodString, "many">;
@@ -931,6 +960,13 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
931
960
  stable_id: string;
932
961
  severity: "warn";
933
962
  }>]>, "many">;
963
+ redirect_to: z.ZodOptional<z.ZodObject<{
964
+ stable_id: z.ZodString;
965
+ }, "strip", z.ZodTypeAny, {
966
+ stable_id: string;
967
+ }, {
968
+ stable_id: string;
969
+ }>>;
934
970
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
935
971
  code: z.ZodString;
936
972
  file: z.ZodString;
@@ -975,6 +1011,9 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
975
1011
  action_hint: string;
976
1012
  line?: number | undefined;
977
1013
  }[] | undefined;
1014
+ redirect_to?: {
1015
+ stable_id: string;
1016
+ } | undefined;
978
1017
  }, {
979
1018
  revision_hash: string;
980
1019
  rules: {
@@ -1003,14 +1042,446 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
1003
1042
  action_hint: string;
1004
1043
  line?: number | undefined;
1005
1044
  }[] | undefined;
1045
+ redirect_to?: {
1046
+ stable_id: string;
1047
+ } | undefined;
1006
1048
  }>;
1007
- declare const ruleSectionsAnnotations: {
1049
+ declare const knowledgeSectionsAnnotations: {
1008
1050
  readonly readOnlyHint: true;
1009
1051
  readonly idempotentHint: true;
1010
1052
  readonly destructiveHint: false;
1011
1053
  readonly openWorldHint: false;
1012
1054
  readonly title: "Filter rule sections";
1013
1055
  };
1056
+ declare const ProposedReasonSchema: z.ZodEnum<["explicit-user-mark", "diagnostic-then-fix", "decision-confirmation", "wrong-turn-revert", "new-dependency-or-pattern", "dismissal-with-reason"]>;
1057
+ type ProposedReason = z.infer<typeof ProposedReasonSchema>;
1058
+ declare const PROPOSED_REASON_DESCRIPTIONS: Record<ProposedReason, string>;
1059
+ declare const FabExtractKnowledgeInputSchema: z.ZodEffects<z.ZodObject<{
1060
+ source_sessions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
1061
+ source_session: z.ZodOptional<z.ZodString>;
1062
+ recent_paths: z.ZodArray<z.ZodString, "many">;
1063
+ user_messages_summary: z.ZodString;
1064
+ type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1065
+ slug: z.ZodString;
1066
+ layer: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1067
+ proposed_reason: z.ZodEnum<["explicit-user-mark", "diagnostic-then-fix", "decision-confirmation", "wrong-turn-revert", "new-dependency-or-pattern", "dismissal-with-reason"]>;
1068
+ session_context: z.ZodString;
1069
+ }, "strip", z.ZodTypeAny, {
1070
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1071
+ recent_paths: string[];
1072
+ user_messages_summary: string;
1073
+ slug: string;
1074
+ proposed_reason: "explicit-user-mark" | "diagnostic-then-fix" | "decision-confirmation" | "wrong-turn-revert" | "new-dependency-or-pattern" | "dismissal-with-reason";
1075
+ session_context: string;
1076
+ layer?: "personal" | "team" | undefined;
1077
+ source_sessions?: string[] | undefined;
1078
+ source_session?: string | undefined;
1079
+ }, {
1080
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1081
+ recent_paths: string[];
1082
+ user_messages_summary: string;
1083
+ slug: string;
1084
+ proposed_reason: "explicit-user-mark" | "diagnostic-then-fix" | "decision-confirmation" | "wrong-turn-revert" | "new-dependency-or-pattern" | "dismissal-with-reason";
1085
+ session_context: string;
1086
+ layer?: "personal" | "team" | undefined;
1087
+ source_sessions?: unknown;
1088
+ source_session?: string | undefined;
1089
+ }>, {
1090
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1091
+ recent_paths: string[];
1092
+ user_messages_summary: string;
1093
+ slug: string;
1094
+ proposed_reason: "explicit-user-mark" | "diagnostic-then-fix" | "decision-confirmation" | "wrong-turn-revert" | "new-dependency-or-pattern" | "dismissal-with-reason";
1095
+ session_context: string;
1096
+ layer?: "personal" | "team" | undefined;
1097
+ source_sessions?: string[] | undefined;
1098
+ source_session?: string | undefined;
1099
+ }, {
1100
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1101
+ recent_paths: string[];
1102
+ user_messages_summary: string;
1103
+ slug: string;
1104
+ proposed_reason: "explicit-user-mark" | "diagnostic-then-fix" | "decision-confirmation" | "wrong-turn-revert" | "new-dependency-or-pattern" | "dismissal-with-reason";
1105
+ session_context: string;
1106
+ layer?: "personal" | "team" | undefined;
1107
+ source_sessions?: unknown;
1108
+ source_session?: string | undefined;
1109
+ }>;
1110
+ declare const FabExtractKnowledgeInputShape: {
1111
+ source_sessions: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
1112
+ source_session: z.ZodOptional<z.ZodString>;
1113
+ recent_paths: z.ZodArray<z.ZodString, "many">;
1114
+ user_messages_summary: z.ZodString;
1115
+ type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1116
+ slug: z.ZodString;
1117
+ layer: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1118
+ proposed_reason: z.ZodEnum<["explicit-user-mark", "diagnostic-then-fix", "decision-confirmation", "wrong-turn-revert", "new-dependency-or-pattern", "dismissal-with-reason"]>;
1119
+ session_context: z.ZodString;
1120
+ };
1121
+ type FabExtractKnowledgeInput = z.infer<typeof FabExtractKnowledgeInputSchema>;
1122
+ declare const FabExtractKnowledgeOutputSchema: z.ZodObject<{
1123
+ pending_path: z.ZodString;
1124
+ idempotency_key: z.ZodString;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ pending_path: string;
1127
+ idempotency_key: string;
1128
+ }, {
1129
+ pending_path: string;
1130
+ idempotency_key: string;
1131
+ }>;
1132
+ type FabExtractKnowledgeOutput = z.infer<typeof FabExtractKnowledgeOutputSchema>;
1133
+ declare const fabExtractKnowledgeAnnotations: {
1134
+ readonly readOnlyHint: false;
1135
+ readonly idempotentHint: true;
1136
+ readonly destructiveHint: false;
1137
+ readonly openWorldHint: false;
1138
+ readonly title: "Extract pending knowledge entry";
1139
+ };
1140
+ declare const FabReviewInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
1141
+ action: z.ZodLiteral<"list">;
1142
+ filters: z.ZodOptional<z.ZodObject<{
1143
+ type: z.ZodOptional<z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>>;
1144
+ layer: z.ZodOptional<z.ZodEnum<["team", "personal", "both"]>>;
1145
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
1146
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1147
+ created_after: z.ZodOptional<z.ZodString>;
1148
+ }, "strip", z.ZodTypeAny, {
1149
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1150
+ maturity?: "draft" | "verified" | "proven" | undefined;
1151
+ layer?: "personal" | "team" | "both" | undefined;
1152
+ tags?: string[] | undefined;
1153
+ created_after?: string | undefined;
1154
+ }, {
1155
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1156
+ maturity?: "draft" | "verified" | "proven" | undefined;
1157
+ layer?: "personal" | "team" | "both" | undefined;
1158
+ tags?: string[] | undefined;
1159
+ created_after?: string | undefined;
1160
+ }>>;
1161
+ }, "strip", z.ZodTypeAny, {
1162
+ action: "list";
1163
+ filters?: {
1164
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1165
+ maturity?: "draft" | "verified" | "proven" | undefined;
1166
+ layer?: "personal" | "team" | "both" | undefined;
1167
+ tags?: string[] | undefined;
1168
+ created_after?: string | undefined;
1169
+ } | undefined;
1170
+ }, {
1171
+ action: "list";
1172
+ filters?: {
1173
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1174
+ maturity?: "draft" | "verified" | "proven" | undefined;
1175
+ layer?: "personal" | "team" | "both" | undefined;
1176
+ tags?: string[] | undefined;
1177
+ created_after?: string | undefined;
1178
+ } | undefined;
1179
+ }>, z.ZodObject<{
1180
+ action: z.ZodLiteral<"approve">;
1181
+ pending_paths: z.ZodArray<z.ZodString, "many">;
1182
+ }, "strip", z.ZodTypeAny, {
1183
+ action: "approve";
1184
+ pending_paths: string[];
1185
+ }, {
1186
+ action: "approve";
1187
+ pending_paths: string[];
1188
+ }>, z.ZodObject<{
1189
+ action: z.ZodLiteral<"reject">;
1190
+ pending_paths: z.ZodArray<z.ZodString, "many">;
1191
+ reason: z.ZodString;
1192
+ }, "strip", z.ZodTypeAny, {
1193
+ action: "reject";
1194
+ pending_paths: string[];
1195
+ reason: string;
1196
+ }, {
1197
+ action: "reject";
1198
+ pending_paths: string[];
1199
+ reason: string;
1200
+ }>, z.ZodObject<{
1201
+ action: z.ZodLiteral<"modify">;
1202
+ pending_path: z.ZodString;
1203
+ changes: z.ZodObject<{
1204
+ title: z.ZodOptional<z.ZodString>;
1205
+ summary: z.ZodOptional<z.ZodString>;
1206
+ layer: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1207
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
1208
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1209
+ relevance_scope: z.ZodOptional<z.ZodEnum<["narrow", "broad"]>>;
1210
+ relevance_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1211
+ }, "strip", z.ZodTypeAny, {
1212
+ summary?: string | undefined;
1213
+ maturity?: "draft" | "verified" | "proven" | undefined;
1214
+ layer?: "personal" | "team" | undefined;
1215
+ tags?: string[] | undefined;
1216
+ relevance_scope?: "narrow" | "broad" | undefined;
1217
+ relevance_paths?: string[] | undefined;
1218
+ title?: string | undefined;
1219
+ }, {
1220
+ summary?: string | undefined;
1221
+ maturity?: "draft" | "verified" | "proven" | undefined;
1222
+ layer?: "personal" | "team" | undefined;
1223
+ tags?: string[] | undefined;
1224
+ relevance_scope?: "narrow" | "broad" | undefined;
1225
+ relevance_paths?: string[] | undefined;
1226
+ title?: string | undefined;
1227
+ }>;
1228
+ }, "strip", z.ZodTypeAny, {
1229
+ pending_path: string;
1230
+ action: "modify";
1231
+ changes: {
1232
+ summary?: string | undefined;
1233
+ maturity?: "draft" | "verified" | "proven" | undefined;
1234
+ layer?: "personal" | "team" | undefined;
1235
+ tags?: string[] | undefined;
1236
+ relevance_scope?: "narrow" | "broad" | undefined;
1237
+ relevance_paths?: string[] | undefined;
1238
+ title?: string | undefined;
1239
+ };
1240
+ }, {
1241
+ pending_path: string;
1242
+ action: "modify";
1243
+ changes: {
1244
+ summary?: string | undefined;
1245
+ maturity?: "draft" | "verified" | "proven" | undefined;
1246
+ layer?: "personal" | "team" | undefined;
1247
+ tags?: string[] | undefined;
1248
+ relevance_scope?: "narrow" | "broad" | undefined;
1249
+ relevance_paths?: string[] | undefined;
1250
+ title?: string | undefined;
1251
+ };
1252
+ }>, z.ZodObject<{
1253
+ action: z.ZodLiteral<"search">;
1254
+ query: z.ZodString;
1255
+ filters: z.ZodOptional<z.ZodObject<{
1256
+ type: z.ZodOptional<z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>>;
1257
+ layer: z.ZodOptional<z.ZodEnum<["team", "personal", "both"]>>;
1258
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
1259
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1260
+ created_after: z.ZodOptional<z.ZodString>;
1261
+ }, "strip", z.ZodTypeAny, {
1262
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1263
+ maturity?: "draft" | "verified" | "proven" | undefined;
1264
+ layer?: "personal" | "team" | "both" | undefined;
1265
+ tags?: string[] | undefined;
1266
+ created_after?: string | undefined;
1267
+ }, {
1268
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1269
+ maturity?: "draft" | "verified" | "proven" | undefined;
1270
+ layer?: "personal" | "team" | "both" | undefined;
1271
+ tags?: string[] | undefined;
1272
+ created_after?: string | undefined;
1273
+ }>>;
1274
+ }, "strip", z.ZodTypeAny, {
1275
+ action: "search";
1276
+ query: string;
1277
+ filters?: {
1278
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1279
+ maturity?: "draft" | "verified" | "proven" | undefined;
1280
+ layer?: "personal" | "team" | "both" | undefined;
1281
+ tags?: string[] | undefined;
1282
+ created_after?: string | undefined;
1283
+ } | undefined;
1284
+ }, {
1285
+ action: "search";
1286
+ query: string;
1287
+ filters?: {
1288
+ type?: "decisions" | "pitfalls" | "guidelines" | "models" | "processes" | undefined;
1289
+ maturity?: "draft" | "verified" | "proven" | undefined;
1290
+ layer?: "personal" | "team" | "both" | undefined;
1291
+ tags?: string[] | undefined;
1292
+ created_after?: string | undefined;
1293
+ } | undefined;
1294
+ }>, z.ZodObject<{
1295
+ action: z.ZodLiteral<"defer">;
1296
+ pending_paths: z.ZodArray<z.ZodString, "many">;
1297
+ until: z.ZodOptional<z.ZodString>;
1298
+ reason: z.ZodOptional<z.ZodString>;
1299
+ }, "strip", z.ZodTypeAny, {
1300
+ action: "defer";
1301
+ pending_paths: string[];
1302
+ reason?: string | undefined;
1303
+ until?: string | undefined;
1304
+ }, {
1305
+ action: "defer";
1306
+ pending_paths: string[];
1307
+ reason?: string | undefined;
1308
+ until?: string | undefined;
1309
+ }>]>;
1310
+ type FabReviewInput = z.infer<typeof FabReviewInputSchema>;
1311
+ declare const FabReviewOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
1312
+ action: z.ZodLiteral<"list">;
1313
+ items: z.ZodArray<z.ZodObject<{
1314
+ pending_path: z.ZodString;
1315
+ type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1316
+ layer: z.ZodEnum<["team", "personal"]>;
1317
+ maturity: z.ZodEnum<["draft", "verified", "proven"]>;
1318
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1319
+ title: z.ZodOptional<z.ZodString>;
1320
+ summary: z.ZodOptional<z.ZodString>;
1321
+ origin: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1322
+ }, "strip", z.ZodTypeAny, {
1323
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1324
+ maturity: "draft" | "verified" | "proven";
1325
+ layer: "personal" | "team";
1326
+ pending_path: string;
1327
+ summary?: string | undefined;
1328
+ tags?: string[] | undefined;
1329
+ title?: string | undefined;
1330
+ origin?: "personal" | "team" | undefined;
1331
+ }, {
1332
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1333
+ maturity: "draft" | "verified" | "proven";
1334
+ layer: "personal" | "team";
1335
+ pending_path: string;
1336
+ summary?: string | undefined;
1337
+ tags?: string[] | undefined;
1338
+ title?: string | undefined;
1339
+ origin?: "personal" | "team" | undefined;
1340
+ }>, "many">;
1341
+ }, "strip", z.ZodTypeAny, {
1342
+ action: "list";
1343
+ items: {
1344
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1345
+ maturity: "draft" | "verified" | "proven";
1346
+ layer: "personal" | "team";
1347
+ pending_path: string;
1348
+ summary?: string | undefined;
1349
+ tags?: string[] | undefined;
1350
+ title?: string | undefined;
1351
+ origin?: "personal" | "team" | undefined;
1352
+ }[];
1353
+ }, {
1354
+ action: "list";
1355
+ items: {
1356
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1357
+ maturity: "draft" | "verified" | "proven";
1358
+ layer: "personal" | "team";
1359
+ pending_path: string;
1360
+ summary?: string | undefined;
1361
+ tags?: string[] | undefined;
1362
+ title?: string | undefined;
1363
+ origin?: "personal" | "team" | undefined;
1364
+ }[];
1365
+ }>, z.ZodObject<{
1366
+ action: z.ZodLiteral<"approve">;
1367
+ approved: z.ZodArray<z.ZodObject<{
1368
+ pending_path: z.ZodString;
1369
+ stable_id: z.ZodString;
1370
+ }, "strip", z.ZodTypeAny, {
1371
+ stable_id: string;
1372
+ pending_path: string;
1373
+ }, {
1374
+ stable_id: string;
1375
+ pending_path: string;
1376
+ }>, "many">;
1377
+ }, "strip", z.ZodTypeAny, {
1378
+ approved: {
1379
+ stable_id: string;
1380
+ pending_path: string;
1381
+ }[];
1382
+ action: "approve";
1383
+ }, {
1384
+ approved: {
1385
+ stable_id: string;
1386
+ pending_path: string;
1387
+ }[];
1388
+ action: "approve";
1389
+ }>, z.ZodObject<{
1390
+ action: z.ZodLiteral<"reject">;
1391
+ rejected: z.ZodArray<z.ZodString, "many">;
1392
+ }, "strip", z.ZodTypeAny, {
1393
+ action: "reject";
1394
+ rejected: string[];
1395
+ }, {
1396
+ action: "reject";
1397
+ rejected: string[];
1398
+ }>, z.ZodObject<{
1399
+ action: z.ZodLiteral<"modify">;
1400
+ pending_path: z.ZodString;
1401
+ prior_stable_id: z.ZodOptional<z.ZodString>;
1402
+ new_stable_id: z.ZodOptional<z.ZodString>;
1403
+ }, "strip", z.ZodTypeAny, {
1404
+ pending_path: string;
1405
+ action: "modify";
1406
+ prior_stable_id?: string | undefined;
1407
+ new_stable_id?: string | undefined;
1408
+ }, {
1409
+ pending_path: string;
1410
+ action: "modify";
1411
+ prior_stable_id?: string | undefined;
1412
+ new_stable_id?: string | undefined;
1413
+ }>, z.ZodObject<{
1414
+ action: z.ZodLiteral<"search">;
1415
+ items: z.ZodArray<z.ZodObject<{
1416
+ pending_path: z.ZodString;
1417
+ type: z.ZodEnum<["decisions", "pitfalls", "guidelines", "models", "processes"]>;
1418
+ layer: z.ZodEnum<["team", "personal"]>;
1419
+ maturity: z.ZodEnum<["draft", "verified", "proven"]>;
1420
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1421
+ title: z.ZodOptional<z.ZodString>;
1422
+ summary: z.ZodOptional<z.ZodString>;
1423
+ origin: z.ZodOptional<z.ZodEnum<["team", "personal"]>>;
1424
+ }, "strip", z.ZodTypeAny, {
1425
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1426
+ maturity: "draft" | "verified" | "proven";
1427
+ layer: "personal" | "team";
1428
+ pending_path: string;
1429
+ summary?: string | undefined;
1430
+ tags?: string[] | undefined;
1431
+ title?: string | undefined;
1432
+ origin?: "personal" | "team" | undefined;
1433
+ }, {
1434
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1435
+ maturity: "draft" | "verified" | "proven";
1436
+ layer: "personal" | "team";
1437
+ pending_path: string;
1438
+ summary?: string | undefined;
1439
+ tags?: string[] | undefined;
1440
+ title?: string | undefined;
1441
+ origin?: "personal" | "team" | undefined;
1442
+ }>, "many">;
1443
+ }, "strip", z.ZodTypeAny, {
1444
+ action: "search";
1445
+ items: {
1446
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1447
+ maturity: "draft" | "verified" | "proven";
1448
+ layer: "personal" | "team";
1449
+ pending_path: string;
1450
+ summary?: string | undefined;
1451
+ tags?: string[] | undefined;
1452
+ title?: string | undefined;
1453
+ origin?: "personal" | "team" | undefined;
1454
+ }[];
1455
+ }, {
1456
+ action: "search";
1457
+ items: {
1458
+ type: "decisions" | "pitfalls" | "guidelines" | "models" | "processes";
1459
+ maturity: "draft" | "verified" | "proven";
1460
+ layer: "personal" | "team";
1461
+ pending_path: string;
1462
+ summary?: string | undefined;
1463
+ tags?: string[] | undefined;
1464
+ title?: string | undefined;
1465
+ origin?: "personal" | "team" | undefined;
1466
+ }[];
1467
+ }>, z.ZodObject<{
1468
+ action: z.ZodLiteral<"defer">;
1469
+ deferred: z.ZodArray<z.ZodString, "many">;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ action: "defer";
1472
+ deferred: string[];
1473
+ }, {
1474
+ action: "defer";
1475
+ deferred: string[];
1476
+ }>]>;
1477
+ type FabReviewOutput = z.infer<typeof FabReviewOutputSchema>;
1478
+ declare const fabReviewAnnotations: {
1479
+ readonly readOnlyHint: false;
1480
+ readonly idempotentHint: false;
1481
+ readonly destructiveHint: false;
1482
+ readonly openWorldHint: false;
1483
+ readonly title: "Review pending knowledge entries";
1484
+ };
1014
1485
  declare const ledgerSourceSchema: z.ZodEnum<["ai", "human"]>;
1015
1486
  declare const ledgerQuerySchema: z.ZodObject<{
1016
1487
  source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
@@ -1117,4 +1588,4 @@ declare function parseKnowledgeId(id: string): {
1117
1588
  counter: number;
1118
1589
  } | null;
1119
1590
 
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 };
1591
+ export { type FabExtractKnowledgeInput, FabExtractKnowledgeInputSchema, FabExtractKnowledgeInputShape, type FabExtractKnowledgeOutput, FabExtractKnowledgeOutputSchema, type FabReviewInput, FabReviewInputSchema, type FabReviewOutput, FabReviewOutputSchema, KNOWLEDGE_TYPE_CODES, type KnowledgeEntryFrontmatter, KnowledgeEntryFrontmatterSchema, type KnowledgeType, type KnowledgeTypeCode, KnowledgeTypeSchema, type Layer, LayerSchema, type Maturity, MaturitySchema, PROPOSED_REASON_DESCRIPTIONS, type ProposedReason, ProposedReasonSchema, type StableId, StableIdSchema, annotateIntentRequestSchema, fabExtractKnowledgeAnnotations, fabReviewAnnotations, formatKnowledgeId, getKnowledgeAnnotations, getKnowledgeInputSchema, getKnowledgeOutputSchema, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, knowledgeSectionsAnnotations, knowledgeSectionsInputSchema, knowledgeSectionsOutputSchema, ledgerQuerySchema, ledgerSourceSchema, parseKnowledgeId, planContextAnnotations, planContextHintNarrowEntrySchema, planContextHintOutputSchema, planContextInputSchema, planContextOutputSchema, structuredWarningSchema };