@fenglimg/fabric-shared 1.8.0-rc.3 → 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,6 +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
+ layer_filter: z.ZodOptional<z.ZodEnum<["team", "personal", "both"]>>;
28
+ target_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
29
  }, "strip", z.ZodTypeAny, {
28
30
  paths: string[];
29
31
  known_tech?: string[] | undefined;
@@ -32,6 +34,8 @@ declare const planContextInputSchema: z.ZodObject<{
32
34
  client_hash?: string | undefined;
33
35
  correlation_id?: string | undefined;
34
36
  session_id?: string | undefined;
37
+ layer_filter?: "personal" | "team" | "both" | undefined;
38
+ target_paths?: string[] | undefined;
35
39
  }, {
36
40
  paths: string[];
37
41
  known_tech?: string[] | undefined;
@@ -40,6 +44,8 @@ declare const planContextInputSchema: z.ZodObject<{
40
44
  client_hash?: string | undefined;
41
45
  correlation_id?: string | undefined;
42
46
  session_id?: string | undefined;
47
+ layer_filter?: "personal" | "team" | "both" | undefined;
48
+ target_paths?: string[] | undefined;
43
49
  }>;
44
50
  declare const planContextOutputSchema: z.ZodObject<{
45
51
  revision_hash: z.ZodString;
@@ -51,31 +57,22 @@ declare const planContextOutputSchema: z.ZodObject<{
51
57
  target_path: z.ZodString;
52
58
  path_segments: z.ZodArray<z.ZodString, "many">;
53
59
  extension: z.ZodString;
54
- inferred_domain: z.ZodArray<z.ZodString, "many">;
55
60
  known_tech: z.ZodArray<z.ZodString, "many">;
56
61
  user_intent: z.ZodString;
57
- intent_tokens: z.ZodArray<z.ZodString, "many">;
58
- impact_hints: z.ZodArray<z.ZodString, "many">;
59
62
  detected_entities: z.ZodArray<z.ZodString, "many">;
60
63
  }, "strip", z.ZodTypeAny, {
61
64
  target_path: string;
62
65
  path_segments: string[];
63
66
  extension: string;
64
- inferred_domain: string[];
65
67
  known_tech: string[];
66
68
  user_intent: string;
67
- intent_tokens: string[];
68
- impact_hints: string[];
69
69
  detected_entities: string[];
70
70
  }, {
71
71
  target_path: string;
72
72
  path_segments: string[];
73
73
  extension: string;
74
- inferred_domain: string[];
75
74
  known_tech: string[];
76
75
  user_intent: string;
77
- intent_tokens: string[];
78
- impact_hints: string[];
79
76
  detected_entities: string[];
80
77
  }>;
81
78
  description_index: z.ZodArray<z.ZodObject<{
@@ -90,6 +87,12 @@ declare const planContextOutputSchema: z.ZodObject<{
90
87
  impact: z.ZodArray<z.ZodString, "many">;
91
88
  must_read_if: z.ZodString;
92
89
  entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
90
+ id: z.ZodOptional<z.ZodString>;
91
+ knowledge_type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
92
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
93
+ knowledge_layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
94
+ layer_reason: z.ZodOptional<z.ZodString>;
95
+ created_at: z.ZodOptional<z.ZodString>;
93
96
  }, "strip", z.ZodTypeAny, {
94
97
  summary: string;
95
98
  intent_clues: string[];
@@ -97,6 +100,12 @@ declare const planContextOutputSchema: z.ZodObject<{
97
100
  impact: string[];
98
101
  must_read_if: string;
99
102
  entities?: string[] | undefined;
103
+ id?: string | undefined;
104
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
105
+ maturity?: "draft" | "verified" | "proven" | undefined;
106
+ knowledge_layer?: "personal" | "team" | undefined;
107
+ layer_reason?: string | undefined;
108
+ created_at?: string | undefined;
100
109
  }, {
101
110
  summary: string;
102
111
  intent_clues: string[];
@@ -104,7 +113,20 @@ declare const planContextOutputSchema: z.ZodObject<{
104
113
  impact: string[];
105
114
  must_read_if: string;
106
115
  entities?: string[] | undefined;
116
+ id?: string | undefined;
117
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
118
+ maturity?: "draft" | "verified" | "proven" | undefined;
119
+ knowledge_layer?: "personal" | "team" | undefined;
120
+ layer_reason?: string | undefined;
121
+ created_at?: string | undefined;
107
122
  }>;
123
+ type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
124
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
125
+ layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
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">>;
108
130
  }, "strip", z.ZodTypeAny, {
109
131
  description: {
110
132
  summary: string;
@@ -113,11 +135,24 @@ declare const planContextOutputSchema: z.ZodObject<{
113
135
  impact: string[];
114
136
  must_read_if: string;
115
137
  entities?: string[] | undefined;
138
+ id?: string | undefined;
139
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
140
+ maturity?: "draft" | "verified" | "proven" | undefined;
141
+ knowledge_layer?: "personal" | "team" | undefined;
142
+ layer_reason?: string | undefined;
143
+ created_at?: string | undefined;
116
144
  };
117
- level: "L0" | "L1" | "L2";
118
145
  stable_id: string;
146
+ level: "L0" | "L1" | "L2";
119
147
  required: boolean;
120
148
  selectable: boolean;
149
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
150
+ maturity?: "draft" | "verified" | "proven" | undefined;
151
+ layer_reason?: string | undefined;
152
+ layer?: "personal" | "team" | undefined;
153
+ tags?: string[] | undefined;
154
+ relevance_scope?: "narrow" | "broad" | undefined;
155
+ relevance_paths?: string[] | undefined;
121
156
  }, {
122
157
  description: {
123
158
  summary: string;
@@ -126,39 +161,33 @@ 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;
179
+ tags?: string[] | undefined;
180
+ relevance_scope?: "narrow" | "broad" | undefined;
181
+ relevance_paths?: string[] | undefined;
134
182
  }>, "many">;
135
- required_stable_ids: z.ZodArray<z.ZodString, "many">;
136
- ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
137
- initial_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
138
- selection_policy: z.ZodObject<{
139
- required_levels: z.ZodTuple<[z.ZodLiteral<"L0">, z.ZodLiteral<"L2">], null>;
140
- ai_selectable_levels: z.ZodTuple<[z.ZodLiteral<"L1">], null>;
141
- final_fetch_rule: z.ZodLiteral<"required_stable_ids + ai_selected_l1_stable_ids">;
142
- }, "strip", z.ZodTypeAny, {
143
- required_levels: ["L0", "L2"];
144
- ai_selectable_levels: ["L1"];
145
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
146
- }, {
147
- required_levels: ["L0", "L2"];
148
- ai_selectable_levels: ["L1"];
149
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
150
- }>;
151
183
  }, "strip", z.ZodTypeAny, {
152
184
  path: string;
153
185
  requirement_profile: {
154
186
  target_path: string;
155
187
  path_segments: string[];
156
188
  extension: string;
157
- inferred_domain: string[];
158
189
  known_tech: string[];
159
190
  user_intent: string;
160
- intent_tokens: string[];
161
- impact_hints: string[];
162
191
  detected_entities: string[];
163
192
  };
164
193
  description_index: {
@@ -169,31 +198,33 @@ declare const planContextOutputSchema: z.ZodObject<{
169
198
  impact: string[];
170
199
  must_read_if: string;
171
200
  entities?: string[] | undefined;
201
+ id?: string | undefined;
202
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
203
+ maturity?: "draft" | "verified" | "proven" | undefined;
204
+ knowledge_layer?: "personal" | "team" | undefined;
205
+ layer_reason?: string | undefined;
206
+ created_at?: string | undefined;
172
207
  };
173
- level: "L0" | "L1" | "L2";
174
208
  stable_id: string;
209
+ level: "L0" | "L1" | "L2";
175
210
  required: boolean;
176
211
  selectable: boolean;
212
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
213
+ maturity?: "draft" | "verified" | "proven" | undefined;
214
+ layer_reason?: string | undefined;
215
+ layer?: "personal" | "team" | undefined;
216
+ tags?: string[] | undefined;
217
+ relevance_scope?: "narrow" | "broad" | undefined;
218
+ relevance_paths?: string[] | undefined;
177
219
  }[];
178
- required_stable_ids: string[];
179
- ai_selectable_stable_ids: string[];
180
- initial_selected_stable_ids: string[];
181
- selection_policy: {
182
- required_levels: ["L0", "L2"];
183
- ai_selectable_levels: ["L1"];
184
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
185
- };
186
220
  }, {
187
221
  path: string;
188
222
  requirement_profile: {
189
223
  target_path: string;
190
224
  path_segments: string[];
191
225
  extension: string;
192
- inferred_domain: string[];
193
226
  known_tech: string[];
194
227
  user_intent: string;
195
- intent_tokens: string[];
196
- impact_hints: string[];
197
228
  detected_entities: string[];
198
229
  };
199
230
  description_index: {
@@ -204,24 +235,27 @@ declare const planContextOutputSchema: z.ZodObject<{
204
235
  impact: string[];
205
236
  must_read_if: string;
206
237
  entities?: string[] | undefined;
238
+ id?: string | undefined;
239
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
240
+ maturity?: "draft" | "verified" | "proven" | undefined;
241
+ knowledge_layer?: "personal" | "team" | undefined;
242
+ layer_reason?: string | undefined;
243
+ created_at?: string | undefined;
207
244
  };
208
- level: "L0" | "L1" | "L2";
209
245
  stable_id: string;
246
+ level: "L0" | "L1" | "L2";
210
247
  required: boolean;
211
248
  selectable: boolean;
249
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
250
+ maturity?: "draft" | "verified" | "proven" | undefined;
251
+ layer_reason?: string | undefined;
252
+ layer?: "personal" | "team" | undefined;
253
+ tags?: string[] | undefined;
254
+ relevance_scope?: "narrow" | "broad" | undefined;
255
+ relevance_paths?: string[] | undefined;
212
256
  }[];
213
- required_stable_ids: string[];
214
- ai_selectable_stable_ids: string[];
215
- initial_selected_stable_ids: string[];
216
- selection_policy: {
217
- required_levels: ["L0", "L2"];
218
- ai_selectable_levels: ["L1"];
219
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
220
- };
221
257
  }>, "many">;
222
258
  shared: z.ZodObject<{
223
- required_stable_ids: z.ZodArray<z.ZodString, "many">;
224
- ai_selectable_stable_ids: z.ZodArray<z.ZodString, "many">;
225
259
  description_index: z.ZodArray<z.ZodObject<{
226
260
  stable_id: z.ZodString;
227
261
  level: z.ZodEnum<["L0", "L1", "L2"]>;
@@ -234,6 +268,12 @@ declare const planContextOutputSchema: z.ZodObject<{
234
268
  impact: z.ZodArray<z.ZodString, "many">;
235
269
  must_read_if: z.ZodString;
236
270
  entities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
271
+ id: z.ZodOptional<z.ZodString>;
272
+ knowledge_type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
273
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
274
+ knowledge_layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
275
+ layer_reason: z.ZodOptional<z.ZodString>;
276
+ created_at: z.ZodOptional<z.ZodString>;
237
277
  }, "strip", z.ZodTypeAny, {
238
278
  summary: string;
239
279
  intent_clues: string[];
@@ -241,6 +281,12 @@ declare const planContextOutputSchema: z.ZodObject<{
241
281
  impact: string[];
242
282
  must_read_if: string;
243
283
  entities?: string[] | undefined;
284
+ id?: string | undefined;
285
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
286
+ maturity?: "draft" | "verified" | "proven" | undefined;
287
+ knowledge_layer?: "personal" | "team" | undefined;
288
+ layer_reason?: string | undefined;
289
+ created_at?: string | undefined;
244
290
  }, {
245
291
  summary: string;
246
292
  intent_clues: string[];
@@ -248,7 +294,20 @@ declare const planContextOutputSchema: z.ZodObject<{
248
294
  impact: string[];
249
295
  must_read_if: string;
250
296
  entities?: string[] | undefined;
297
+ id?: string | undefined;
298
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
299
+ maturity?: "draft" | "verified" | "proven" | undefined;
300
+ knowledge_layer?: "personal" | "team" | undefined;
301
+ layer_reason?: string | undefined;
302
+ created_at?: string | undefined;
251
303
  }>;
304
+ type: z.ZodOptional<z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>>;
305
+ maturity: z.ZodOptional<z.ZodEnum<["draft", "verified", "proven"]>>;
306
+ layer: z.ZodOptional<z.ZodEnum<["personal", "team"]>>;
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">>;
252
311
  }, "strip", z.ZodTypeAny, {
253
312
  description: {
254
313
  summary: string;
@@ -257,11 +316,24 @@ declare const planContextOutputSchema: z.ZodObject<{
257
316
  impact: string[];
258
317
  must_read_if: string;
259
318
  entities?: string[] | undefined;
319
+ id?: string | undefined;
320
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
321
+ maturity?: "draft" | "verified" | "proven" | undefined;
322
+ knowledge_layer?: "personal" | "team" | undefined;
323
+ layer_reason?: string | undefined;
324
+ created_at?: string | undefined;
260
325
  };
261
- level: "L0" | "L1" | "L2";
262
326
  stable_id: string;
327
+ level: "L0" | "L1" | "L2";
263
328
  required: boolean;
264
329
  selectable: boolean;
330
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
331
+ maturity?: "draft" | "verified" | "proven" | undefined;
332
+ layer_reason?: string | undefined;
333
+ layer?: "personal" | "team" | undefined;
334
+ tags?: string[] | undefined;
335
+ relevance_scope?: "narrow" | "broad" | undefined;
336
+ relevance_paths?: string[] | undefined;
265
337
  }, {
266
338
  description: {
267
339
  summary: string;
@@ -270,11 +342,24 @@ declare const planContextOutputSchema: z.ZodObject<{
270
342
  impact: string[];
271
343
  must_read_if: string;
272
344
  entities?: string[] | undefined;
345
+ id?: string | undefined;
346
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
347
+ maturity?: "draft" | "verified" | "proven" | undefined;
348
+ knowledge_layer?: "personal" | "team" | undefined;
349
+ layer_reason?: string | undefined;
350
+ created_at?: string | undefined;
273
351
  };
274
- level: "L0" | "L1" | "L2";
275
352
  stable_id: string;
353
+ level: "L0" | "L1" | "L2";
276
354
  required: boolean;
277
355
  selectable: boolean;
356
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
357
+ maturity?: "draft" | "verified" | "proven" | undefined;
358
+ layer_reason?: string | undefined;
359
+ layer?: "personal" | "team" | undefined;
360
+ tags?: string[] | undefined;
361
+ relevance_scope?: "narrow" | "broad" | undefined;
362
+ relevance_paths?: string[] | undefined;
278
363
  }>, "many">;
279
364
  preflight_diagnostics: z.ZodArray<z.ZodObject<{
280
365
  code: z.ZodLiteral<"missing_description">;
@@ -304,14 +389,25 @@ declare const planContextOutputSchema: z.ZodObject<{
304
389
  impact: string[];
305
390
  must_read_if: string;
306
391
  entities?: string[] | undefined;
392
+ id?: string | undefined;
393
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
394
+ maturity?: "draft" | "verified" | "proven" | undefined;
395
+ knowledge_layer?: "personal" | "team" | undefined;
396
+ layer_reason?: string | undefined;
397
+ created_at?: string | undefined;
307
398
  };
308
- level: "L0" | "L1" | "L2";
309
399
  stable_id: string;
400
+ level: "L0" | "L1" | "L2";
310
401
  required: boolean;
311
402
  selectable: boolean;
403
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
404
+ maturity?: "draft" | "verified" | "proven" | undefined;
405
+ layer_reason?: string | undefined;
406
+ layer?: "personal" | "team" | undefined;
407
+ tags?: string[] | undefined;
408
+ relevance_scope?: "narrow" | "broad" | undefined;
409
+ relevance_paths?: string[] | undefined;
312
410
  }[];
313
- required_stable_ids: string[];
314
- ai_selectable_stable_ids: string[];
315
411
  preflight_diagnostics: {
316
412
  code: "missing_description";
317
413
  message: string;
@@ -328,14 +424,25 @@ declare const planContextOutputSchema: z.ZodObject<{
328
424
  impact: string[];
329
425
  must_read_if: string;
330
426
  entities?: string[] | undefined;
427
+ id?: string | undefined;
428
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
429
+ maturity?: "draft" | "verified" | "proven" | undefined;
430
+ knowledge_layer?: "personal" | "team" | undefined;
431
+ layer_reason?: string | undefined;
432
+ created_at?: string | undefined;
331
433
  };
332
- level: "L0" | "L1" | "L2";
333
434
  stable_id: string;
435
+ level: "L0" | "L1" | "L2";
334
436
  required: boolean;
335
437
  selectable: boolean;
438
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
439
+ maturity?: "draft" | "verified" | "proven" | undefined;
440
+ layer_reason?: string | undefined;
441
+ layer?: "personal" | "team" | undefined;
442
+ tags?: string[] | undefined;
443
+ relevance_scope?: "narrow" | "broad" | undefined;
444
+ relevance_paths?: string[] | undefined;
336
445
  }[];
337
- required_stable_ids: string[];
338
- ai_selectable_stable_ids: string[];
339
446
  preflight_diagnostics: {
340
447
  code: "missing_description";
341
448
  message: string;
@@ -368,11 +475,8 @@ declare const planContextOutputSchema: z.ZodObject<{
368
475
  target_path: string;
369
476
  path_segments: string[];
370
477
  extension: string;
371
- inferred_domain: string[];
372
478
  known_tech: string[];
373
479
  user_intent: string;
374
- intent_tokens: string[];
375
- impact_hints: string[];
376
480
  detected_entities: string[];
377
481
  };
378
482
  description_index: {
@@ -383,20 +487,25 @@ declare const planContextOutputSchema: z.ZodObject<{
383
487
  impact: string[];
384
488
  must_read_if: string;
385
489
  entities?: string[] | undefined;
490
+ id?: string | undefined;
491
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
492
+ maturity?: "draft" | "verified" | "proven" | undefined;
493
+ knowledge_layer?: "personal" | "team" | undefined;
494
+ layer_reason?: string | undefined;
495
+ created_at?: string | undefined;
386
496
  };
387
- level: "L0" | "L1" | "L2";
388
497
  stable_id: string;
498
+ level: "L0" | "L1" | "L2";
389
499
  required: boolean;
390
500
  selectable: boolean;
501
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
502
+ maturity?: "draft" | "verified" | "proven" | undefined;
503
+ layer_reason?: string | undefined;
504
+ layer?: "personal" | "team" | undefined;
505
+ tags?: string[] | undefined;
506
+ relevance_scope?: "narrow" | "broad" | undefined;
507
+ relevance_paths?: string[] | undefined;
391
508
  }[];
392
- required_stable_ids: string[];
393
- ai_selectable_stable_ids: string[];
394
- initial_selected_stable_ids: string[];
395
- selection_policy: {
396
- required_levels: ["L0", "L2"];
397
- ai_selectable_levels: ["L1"];
398
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
399
- };
400
509
  }[];
401
510
  revision_hash: string;
402
511
  selection_token: string;
@@ -409,14 +518,25 @@ declare const planContextOutputSchema: z.ZodObject<{
409
518
  impact: string[];
410
519
  must_read_if: string;
411
520
  entities?: string[] | undefined;
521
+ id?: string | undefined;
522
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
523
+ maturity?: "draft" | "verified" | "proven" | undefined;
524
+ knowledge_layer?: "personal" | "team" | undefined;
525
+ layer_reason?: string | undefined;
526
+ created_at?: string | undefined;
412
527
  };
413
- level: "L0" | "L1" | "L2";
414
528
  stable_id: string;
529
+ level: "L0" | "L1" | "L2";
415
530
  required: boolean;
416
531
  selectable: boolean;
532
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
533
+ maturity?: "draft" | "verified" | "proven" | undefined;
534
+ layer_reason?: string | undefined;
535
+ layer?: "personal" | "team" | undefined;
536
+ tags?: string[] | undefined;
537
+ relevance_scope?: "narrow" | "broad" | undefined;
538
+ relevance_paths?: string[] | undefined;
417
539
  }[];
418
- required_stable_ids: string[];
419
- ai_selectable_stable_ids: string[];
420
540
  preflight_diagnostics: {
421
541
  code: "missing_description";
422
542
  message: string;
@@ -439,11 +559,8 @@ declare const planContextOutputSchema: z.ZodObject<{
439
559
  target_path: string;
440
560
  path_segments: string[];
441
561
  extension: string;
442
- inferred_domain: string[];
443
562
  known_tech: string[];
444
563
  user_intent: string;
445
- intent_tokens: string[];
446
- impact_hints: string[];
447
564
  detected_entities: string[];
448
565
  };
449
566
  description_index: {
@@ -454,20 +571,25 @@ declare const planContextOutputSchema: z.ZodObject<{
454
571
  impact: string[];
455
572
  must_read_if: string;
456
573
  entities?: string[] | undefined;
574
+ id?: string | undefined;
575
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
576
+ maturity?: "draft" | "verified" | "proven" | undefined;
577
+ knowledge_layer?: "personal" | "team" | undefined;
578
+ layer_reason?: string | undefined;
579
+ created_at?: string | undefined;
457
580
  };
458
- level: "L0" | "L1" | "L2";
459
581
  stable_id: string;
582
+ level: "L0" | "L1" | "L2";
460
583
  required: boolean;
461
584
  selectable: boolean;
585
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
586
+ maturity?: "draft" | "verified" | "proven" | undefined;
587
+ layer_reason?: string | undefined;
588
+ layer?: "personal" | "team" | undefined;
589
+ tags?: string[] | undefined;
590
+ relevance_scope?: "narrow" | "broad" | undefined;
591
+ relevance_paths?: string[] | undefined;
462
592
  }[];
463
- required_stable_ids: string[];
464
- ai_selectable_stable_ids: string[];
465
- initial_selected_stable_ids: string[];
466
- selection_policy: {
467
- required_levels: ["L0", "L2"];
468
- ai_selectable_levels: ["L1"];
469
- final_fetch_rule: "required_stable_ids + ai_selected_l1_stable_ids";
470
- };
471
593
  }[];
472
594
  revision_hash: string;
473
595
  selection_token: string;
@@ -480,14 +602,25 @@ declare const planContextOutputSchema: z.ZodObject<{
480
602
  impact: string[];
481
603
  must_read_if: string;
482
604
  entities?: string[] | undefined;
605
+ id?: string | undefined;
606
+ knowledge_type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
607
+ maturity?: "draft" | "verified" | "proven" | undefined;
608
+ knowledge_layer?: "personal" | "team" | undefined;
609
+ layer_reason?: string | undefined;
610
+ created_at?: string | undefined;
483
611
  };
484
- level: "L0" | "L1" | "L2";
485
612
  stable_id: string;
613
+ level: "L0" | "L1" | "L2";
486
614
  required: boolean;
487
615
  selectable: boolean;
616
+ type?: "model" | "decision" | "guideline" | "pitfall" | "process" | undefined;
617
+ maturity?: "draft" | "verified" | "proven" | undefined;
618
+ layer_reason?: string | undefined;
619
+ layer?: "personal" | "team" | undefined;
620
+ tags?: string[] | undefined;
621
+ relevance_scope?: "narrow" | "broad" | undefined;
622
+ relevance_paths?: string[] | undefined;
488
623
  }[];
489
- required_stable_ids: string[];
490
- ai_selectable_stable_ids: string[];
491
624
  preflight_diagnostics: {
492
625
  code: "missing_description";
493
626
  message: string;
@@ -510,7 +643,67 @@ declare const planContextAnnotations: {
510
643
  readonly openWorldHint: false;
511
644
  readonly title: "Plan rule context";
512
645
  };
513
- 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<{
514
707
  path: z.ZodString;
515
708
  client_hash: z.ZodOptional<z.ZodString>;
516
709
  correlation_id: z.ZodOptional<z.ZodString>;
@@ -526,7 +719,7 @@ declare const getRulesInputSchema: z.ZodObject<{
526
719
  correlation_id?: string | undefined;
527
720
  session_id?: string | undefined;
528
721
  }>;
529
- declare const getRulesOutputSchema: z.ZodObject<{
722
+ declare const getKnowledgeOutputSchema: z.ZodObject<{
530
723
  revision_hash: z.ZodString;
531
724
  stale: z.ZodBoolean;
532
725
  rules: z.ZodObject<{
@@ -681,36 +874,39 @@ declare const getRulesOutputSchema: z.ZodObject<{
681
874
  line?: number | undefined;
682
875
  }[] | undefined;
683
876
  }>;
684
- declare const getRulesAnnotations: {
877
+ declare const getKnowledgeAnnotations: {
685
878
  readonly readOnlyHint: true;
686
879
  readonly idempotentHint: true;
687
880
  readonly destructiveHint: false;
688
881
  readonly openWorldHint: false;
689
882
  readonly title: "Get rule content";
690
883
  };
691
- declare const ruleSectionsInputSchema: z.ZodObject<{
884
+ declare const knowledgeSectionsInputSchema: z.ZodObject<{
692
885
  selection_token: z.ZodString;
693
886
  sections: z.ZodArray<z.ZodEnum<["MISSION_STATEMENT", "MANDATORY_INJECTION", "BUSINESS_LOGIC_CHUNKS", "CONTEXT_INFO"]>, "many">;
694
887
  ai_selected_stable_ids: z.ZodArray<z.ZodString, "many">;
695
888
  ai_selection_reasons: z.ZodRecord<z.ZodString, z.ZodString>;
696
889
  correlation_id: z.ZodOptional<z.ZodString>;
697
890
  session_id: z.ZodOptional<z.ZodString>;
891
+ client_hash: z.ZodOptional<z.ZodString>;
698
892
  }, "strip", z.ZodTypeAny, {
699
- sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
700
893
  selection_token: string;
894
+ sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
701
895
  ai_selected_stable_ids: string[];
702
896
  ai_selection_reasons: Record<string, string>;
897
+ client_hash?: string | undefined;
703
898
  correlation_id?: string | undefined;
704
899
  session_id?: string | undefined;
705
900
  }, {
706
- sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
707
901
  selection_token: string;
902
+ sections: ("MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO")[];
708
903
  ai_selected_stable_ids: string[];
709
904
  ai_selection_reasons: Record<string, string>;
905
+ client_hash?: string | undefined;
710
906
  correlation_id?: string | undefined;
711
907
  session_id?: string | undefined;
712
908
  }>;
713
- declare const ruleSectionsOutputSchema: z.ZodObject<{
909
+ declare const knowledgeSectionsOutputSchema: z.ZodObject<{
714
910
  revision_hash: z.ZodString;
715
911
  precedence: z.ZodTuple<[z.ZodLiteral<"L2">, z.ZodLiteral<"L1">, z.ZodLiteral<"L0">], null>;
716
912
  selected_stable_ids: z.ZodArray<z.ZodString, "many">;
@@ -721,34 +917,56 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
721
917
  sections: z.ZodRecord<z.ZodString, z.ZodString>;
722
918
  }, "strip", z.ZodTypeAny, {
723
919
  path: string;
724
- level: "L0" | "L1" | "L2";
725
920
  stable_id: string;
921
+ level: "L0" | "L1" | "L2";
726
922
  sections: Record<string, string>;
727
923
  }, {
728
924
  path: string;
729
- level: "L0" | "L1" | "L2";
730
925
  stable_id: string;
926
+ level: "L0" | "L1" | "L2";
731
927
  sections: Record<string, string>;
732
928
  }>, "many">;
733
- diagnostics: z.ZodArray<z.ZodObject<{
929
+ diagnostics: z.ZodArray<z.ZodDiscriminatedUnion<"code", [z.ZodObject<{
734
930
  code: z.ZodLiteral<"missing_section">;
735
931
  severity: z.ZodLiteral<"warn">;
736
932
  stable_id: z.ZodString;
737
933
  section: z.ZodEnum<["MISSION_STATEMENT", "MANDATORY_INJECTION", "BUSINESS_LOGIC_CHUNKS", "CONTEXT_INFO"]>;
738
934
  message: z.ZodString;
739
935
  }, "strip", z.ZodTypeAny, {
740
- stable_id: string;
741
936
  code: "missing_section";
742
937
  message: string;
938
+ stable_id: string;
743
939
  severity: "warn";
744
940
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
745
941
  }, {
746
- stable_id: string;
747
942
  code: "missing_section";
748
943
  message: string;
944
+ stable_id: string;
749
945
  severity: "warn";
750
946
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
751
- }>, "many">;
947
+ }>, z.ZodObject<{
948
+ code: z.ZodLiteral<"missing_knowledge_metadata">;
949
+ severity: z.ZodLiteral<"warn">;
950
+ stable_id: z.ZodString;
951
+ message: z.ZodString;
952
+ }, "strip", z.ZodTypeAny, {
953
+ code: "missing_knowledge_metadata";
954
+ message: string;
955
+ stable_id: string;
956
+ severity: "warn";
957
+ }, {
958
+ code: "missing_knowledge_metadata";
959
+ message: string;
960
+ stable_id: string;
961
+ severity: "warn";
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
+ }>>;
752
970
  warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
753
971
  code: z.ZodString;
754
972
  file: z.ZodString;
@@ -769,56 +987,501 @@ declare const ruleSectionsOutputSchema: z.ZodObject<{
769
987
  revision_hash: string;
770
988
  rules: {
771
989
  path: string;
772
- level: "L0" | "L1" | "L2";
773
990
  stable_id: string;
991
+ level: "L0" | "L1" | "L2";
774
992
  sections: Record<string, string>;
775
993
  }[];
776
994
  precedence: ["L2", "L1", "L0"];
777
995
  selected_stable_ids: string[];
778
- diagnostics: {
779
- stable_id: string;
996
+ diagnostics: ({
780
997
  code: "missing_section";
781
998
  message: string;
999
+ stable_id: string;
782
1000
  severity: "warn";
783
1001
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
784
- }[];
1002
+ } | {
1003
+ code: "missing_knowledge_metadata";
1004
+ message: string;
1005
+ stable_id: string;
1006
+ severity: "warn";
1007
+ })[];
785
1008
  warnings?: {
786
1009
  file: string;
787
1010
  code: string;
788
1011
  action_hint: string;
789
1012
  line?: number | undefined;
790
1013
  }[] | undefined;
1014
+ redirect_to?: {
1015
+ stable_id: string;
1016
+ } | undefined;
791
1017
  }, {
792
1018
  revision_hash: string;
793
1019
  rules: {
794
1020
  path: string;
795
- level: "L0" | "L1" | "L2";
796
1021
  stable_id: string;
1022
+ level: "L0" | "L1" | "L2";
797
1023
  sections: Record<string, string>;
798
1024
  }[];
799
1025
  precedence: ["L2", "L1", "L0"];
800
1026
  selected_stable_ids: string[];
801
- diagnostics: {
802
- stable_id: string;
1027
+ diagnostics: ({
803
1028
  code: "missing_section";
804
1029
  message: string;
1030
+ stable_id: string;
805
1031
  severity: "warn";
806
1032
  section: "MISSION_STATEMENT" | "MANDATORY_INJECTION" | "BUSINESS_LOGIC_CHUNKS" | "CONTEXT_INFO";
807
- }[];
1033
+ } | {
1034
+ code: "missing_knowledge_metadata";
1035
+ message: string;
1036
+ stable_id: string;
1037
+ severity: "warn";
1038
+ })[];
808
1039
  warnings?: {
809
1040
  file: string;
810
1041
  code: string;
811
1042
  action_hint: string;
812
1043
  line?: number | undefined;
813
1044
  }[] | undefined;
1045
+ redirect_to?: {
1046
+ stable_id: string;
1047
+ } | undefined;
814
1048
  }>;
815
- declare const ruleSectionsAnnotations: {
1049
+ declare const knowledgeSectionsAnnotations: {
816
1050
  readonly readOnlyHint: true;
817
1051
  readonly idempotentHint: true;
818
1052
  readonly destructiveHint: false;
819
1053
  readonly openWorldHint: false;
820
1054
  readonly title: "Filter rule sections";
821
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
+ };
822
1485
  declare const ledgerSourceSchema: z.ZodEnum<["ai", "human"]>;
823
1486
  declare const ledgerQuerySchema: z.ZodObject<{
824
1487
  source: z.ZodOptional<z.ZodEnum<["ai", "human"]>>;
@@ -879,5 +1542,50 @@ declare const annotateIntentRequestSchema: z.ZodObject<{
879
1542
  ledger_entry_id: string;
880
1543
  annotation: string;
881
1544
  }>;
1545
+ declare const KnowledgeTypeSchema: z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>;
1546
+ type KnowledgeType = z.infer<typeof KnowledgeTypeSchema>;
1547
+ declare const MaturitySchema: z.ZodEnum<["draft", "verified", "proven"]>;
1548
+ type Maturity = z.infer<typeof MaturitySchema>;
1549
+ declare const LayerSchema: z.ZodEnum<["personal", "team"]>;
1550
+ type Layer = z.infer<typeof LayerSchema>;
1551
+ declare const StableIdSchema: z.ZodString;
1552
+ type StableId = z.infer<typeof StableIdSchema>;
1553
+ declare const KnowledgeEntryFrontmatterSchema: z.ZodObject<{
1554
+ id: z.ZodString;
1555
+ type: z.ZodEnum<["model", "decision", "guideline", "pitfall", "process"]>;
1556
+ maturity: z.ZodEnum<["draft", "verified", "proven"]>;
1557
+ layer: z.ZodEnum<["personal", "team"]>;
1558
+ layer_reason: z.ZodOptional<z.ZodString>;
1559
+ created_at: z.ZodString;
1560
+ }, "strip", z.ZodTypeAny, {
1561
+ type: "model" | "decision" | "guideline" | "pitfall" | "process";
1562
+ id: string;
1563
+ maturity: "draft" | "verified" | "proven";
1564
+ created_at: string;
1565
+ layer: "personal" | "team";
1566
+ layer_reason?: string | undefined;
1567
+ }, {
1568
+ type: "model" | "decision" | "guideline" | "pitfall" | "process";
1569
+ id: string;
1570
+ maturity: "draft" | "verified" | "proven";
1571
+ created_at: string;
1572
+ layer: "personal" | "team";
1573
+ layer_reason?: string | undefined;
1574
+ }>;
1575
+ type KnowledgeEntryFrontmatter = z.infer<typeof KnowledgeEntryFrontmatterSchema>;
1576
+ declare const KNOWLEDGE_TYPE_CODES: {
1577
+ readonly model: "MOD";
1578
+ readonly decision: "DEC";
1579
+ readonly guideline: "GLD";
1580
+ readonly pitfall: "PIT";
1581
+ readonly process: "PRO";
1582
+ };
1583
+ type KnowledgeTypeCode = (typeof KNOWLEDGE_TYPE_CODES)[KnowledgeType];
1584
+ declare function formatKnowledgeId(layer: Layer, type: KnowledgeType, counter: number): StableId;
1585
+ declare function parseKnowledgeId(id: string): {
1586
+ layer: Layer;
1587
+ type: KnowledgeType;
1588
+ counter: number;
1589
+ } | null;
882
1590
 
883
- export { annotateIntentRequestSchema, getRulesAnnotations, getRulesInputSchema, getRulesOutputSchema, historyStateQuerySchema, humanLockApproveRequestSchema, humanLockFileParamsSchema, ledgerQuerySchema, ledgerSourceSchema, 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 };