@fenglimg/fabric-shared 2.2.0-rc.3 → 2.2.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.
@@ -1,8 +1,6 @@
1
1
  import { z } from 'zod';
2
2
 
3
- type AgentsLayer = "L0" | "L1" | "L2";
4
3
  type AgentsTopologyType = "mirror" | "cross-cutting" | "domain" | "local" | "global";
5
- type AgentsActivationTier = "always" | "path" | "description";
6
4
  type AgentsIdentitySource = "declared" | "derived";
7
5
  interface RuleDescription {
8
6
  summary: string;
@@ -15,6 +13,7 @@ interface RuleDescription {
15
13
  knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes";
16
14
  maturity?: "draft" | "verified" | "proven";
17
15
  knowledge_layer?: "personal" | "team";
16
+ semantic_scope?: string;
18
17
  layer_reason?: string;
19
18
  created_at?: string;
20
19
  tags?: string[];
@@ -25,10 +24,7 @@ interface RuleDescription {
25
24
  interface RuleDescriptionIndexItem {
26
25
  stable_id: string;
27
26
  description: RuleDescription;
28
- }
29
- interface AgentsMetaNodeActivation {
30
- tier: AgentsActivationTier;
31
- description?: string;
27
+ always_active?: boolean;
32
28
  }
33
29
  interface AgentsMetaNode {
34
30
  file: string;
@@ -37,12 +33,10 @@ interface AgentsMetaNode {
37
33
  hash: string;
38
34
  stable_id?: string;
39
35
  identity_source?: AgentsIdentitySource;
40
- activation?: AgentsMetaNodeActivation;
41
36
  description?: RuleDescription;
42
37
  sections?: string[];
43
38
  deps?: string[];
44
39
  priority?: "high" | "medium" | "low";
45
- level?: AgentsLayer;
46
40
  topology_type?: AgentsTopologyType;
47
41
  }
48
42
  interface AgentsMetaKnowledgeTypeCounters {
@@ -93,17 +87,14 @@ declare const auditModeSchema: z.ZodEnum<["strict", "warn", "off"]>;
93
87
  declare const clientPathsSchema: z.ZodObject<{
94
88
  claudeCodeCLI: z.ZodOptional<z.ZodString>;
95
89
  claudeCodeDesktop: z.ZodOptional<z.ZodString>;
96
- cursor: z.ZodOptional<z.ZodString>;
97
90
  codexCLI: z.ZodOptional<z.ZodString>;
98
91
  }, "strict", z.ZodTypeAny, {
99
92
  claudeCodeCLI?: string | undefined;
100
93
  claudeCodeDesktop?: string | undefined;
101
- cursor?: string | undefined;
102
94
  codexCLI?: string | undefined;
103
95
  }, {
104
96
  claudeCodeCLI?: string | undefined;
105
97
  claudeCodeDesktop?: string | undefined;
106
- cursor?: string | undefined;
107
98
  codexCLI?: string | undefined;
108
99
  }>;
109
100
  declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
@@ -118,26 +109,48 @@ declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
118
109
  }>>;
119
110
  declare const selectionTokenTtlMsSchema: z.ZodNumber;
120
111
  declare const planContextTopKSchema: z.ZodNumber;
121
- declare const fabricLanguageSchema: z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>;
112
+ declare const fabricLanguageSchema: z.ZodEnum<["zh-CN", "en"]>;
122
113
  declare const defaultLayerFilterSchema: z.ZodEnum<["team", "personal", "both"]>;
114
+ declare const nudgeModeSchema: z.ZodEnum<["silent", "minimal", "normal", "verbose"]>;
115
+ declare const observeConfigSchema: z.ZodObject<{
116
+ session_start: z.ZodOptional<z.ZodBoolean>;
117
+ pre_tool_use: z.ZodOptional<z.ZodBoolean>;
118
+ stop: z.ZodOptional<z.ZodBoolean>;
119
+ }, "strict", z.ZodTypeAny, {
120
+ session_start?: boolean | undefined;
121
+ pre_tool_use?: boolean | undefined;
122
+ stop?: boolean | undefined;
123
+ }, {
124
+ session_start?: boolean | undefined;
125
+ pre_tool_use?: boolean | undefined;
126
+ stop?: boolean | undefined;
127
+ }>;
128
+ declare const writeRouteSchema: z.ZodObject<{
129
+ scope: z.ZodString;
130
+ store: z.ZodString;
131
+ }, "strict", z.ZodTypeAny, {
132
+ scope: string;
133
+ store: string;
134
+ }, {
135
+ scope: string;
136
+ store: string;
137
+ }>;
123
138
  declare const fabricConfigSchema: z.ZodObject<{
124
139
  clientPaths: z.ZodOptional<z.ZodObject<{
125
140
  claudeCodeCLI: z.ZodOptional<z.ZodString>;
126
141
  claudeCodeDesktop: z.ZodOptional<z.ZodString>;
127
- cursor: z.ZodOptional<z.ZodString>;
128
142
  codexCLI: z.ZodOptional<z.ZodString>;
129
143
  }, "strict", z.ZodTypeAny, {
130
144
  claudeCodeCLI?: string | undefined;
131
145
  claudeCodeDesktop?: string | undefined;
132
- cursor?: string | undefined;
133
146
  codexCLI?: string | undefined;
134
147
  }, {
135
148
  claudeCodeCLI?: string | undefined;
136
149
  claudeCodeDesktop?: string | undefined;
137
- cursor?: string | undefined;
138
150
  codexCLI?: string | undefined;
139
151
  }>>;
140
152
  project_id: z.ZodOptional<z.ZodString>;
153
+ workspace_binding_id: z.ZodOptional<z.ZodString>;
141
154
  required_stores: z.ZodOptional<z.ZodArray<z.ZodObject<{
142
155
  id: z.ZodString;
143
156
  suggested_remote: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"$personal">]>>;
@@ -149,6 +162,18 @@ declare const fabricConfigSchema: z.ZodObject<{
149
162
  suggested_remote?: string | undefined;
150
163
  }>, "many">>;
151
164
  active_write_store: z.ZodOptional<z.ZodString>;
165
+ active_project: z.ZodOptional<z.ZodString>;
166
+ write_routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
+ scope: z.ZodString;
168
+ store: z.ZodString;
169
+ }, "strict", z.ZodTypeAny, {
170
+ scope: string;
171
+ store: string;
172
+ }, {
173
+ scope: string;
174
+ store: string;
175
+ }>, "many">>;
176
+ default_write_store: z.ZodOptional<z.ZodString>;
152
177
  scanIgnores: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
153
178
  audit_mode: z.ZodOptional<z.ZodEnum<["strict", "warn", "off"]>>;
154
179
  mcpPayloadLimits: z.ZodOptional<z.ZodObject<{
@@ -161,8 +186,21 @@ declare const fabricConfigSchema: z.ZodObject<{
161
186
  warnBytes?: number | undefined;
162
187
  hardBytes?: number | undefined;
163
188
  }>>;
164
- fabric_language: z.ZodDefault<z.ZodOptional<z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>>>;
165
189
  default_layer_filter: z.ZodDefault<z.ZodOptional<z.ZodEnum<["team", "personal", "both"]>>>;
190
+ nudge_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["silent", "minimal", "normal", "verbose"]>>>;
191
+ observe: z.ZodOptional<z.ZodObject<{
192
+ session_start: z.ZodOptional<z.ZodBoolean>;
193
+ pre_tool_use: z.ZodOptional<z.ZodBoolean>;
194
+ stop: z.ZodOptional<z.ZodBoolean>;
195
+ }, "strict", z.ZodTypeAny, {
196
+ session_start?: boolean | undefined;
197
+ pre_tool_use?: boolean | undefined;
198
+ stop?: boolean | undefined;
199
+ }, {
200
+ session_start?: boolean | undefined;
201
+ pre_tool_use?: boolean | undefined;
202
+ stop?: boolean | undefined;
203
+ }>>;
166
204
  archive_hint_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
167
205
  underseed_node_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
168
206
  archive_edit_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -192,6 +230,7 @@ declare const fabricConfigSchema: z.ZodObject<{
192
230
  onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
193
231
  hint_broad_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
194
232
  hint_broad_budget_chars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
233
+ broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
195
234
  hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
196
235
  cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
197
236
  self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -202,19 +241,18 @@ declare const fabricConfigSchema: z.ZodObject<{
202
241
  orphan_demote_proven_days: z.ZodOptional<z.ZodNumber>;
203
242
  orphan_demote_verified_days: z.ZodOptional<z.ZodNumber>;
204
243
  orphan_demote_draft_days: z.ZodOptional<z.ZodNumber>;
205
- orphan_demote_stable_days: z.ZodOptional<z.ZodNumber>;
206
- orphan_demote_endorsed_days: z.ZodOptional<z.ZodNumber>;
207
244
  hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
208
245
  hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
209
246
  selection_token_ttl_ms: z.ZodOptional<z.ZodNumber>;
210
247
  plan_context_top_k: z.ZodOptional<z.ZodNumber>;
211
248
  retrieval_budget_profile: z.ZodOptional<z.ZodEnum<["conservative", "balanced", "generous"]>>;
249
+ recall_body_budget_bytes: z.ZodOptional<z.ZodNumber>;
212
250
  embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
213
251
  embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
214
252
  embed_model: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fast-bge-small-zh-v1.5", "fast-multilingual-e5-large", "fast-bge-small-en-v1.5", "fast-bge-small-en", "fast-bge-base-en-v1.5", "fast-bge-base-en", "fast-all-MiniLM-L6-v2"]>>>;
215
253
  }, "strip", z.ZodTypeAny, {
216
- fabric_language: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
217
254
  default_layer_filter: "personal" | "team" | "both";
255
+ nudge_mode: "silent" | "minimal" | "normal" | "verbose";
218
256
  archive_hint_cooldown_hours: number;
219
257
  underseed_node_threshold: number;
220
258
  archive_edit_threshold: number;
@@ -242,6 +280,7 @@ declare const fabricConfigSchema: z.ZodObject<{
242
280
  onboard_slots_opted_out: string[];
243
281
  hint_broad_top_k: number;
244
282
  hint_broad_budget_chars: number;
283
+ broad_index_backstop: number;
245
284
  cite_policy_enabled: boolean;
246
285
  self_archive_policy_enabled: boolean;
247
286
  hint_narrow_top_k: number;
@@ -256,53 +295,74 @@ declare const fabricConfigSchema: z.ZodObject<{
256
295
  clientPaths?: {
257
296
  claudeCodeCLI?: string | undefined;
258
297
  claudeCodeDesktop?: string | undefined;
259
- cursor?: string | undefined;
260
298
  codexCLI?: string | undefined;
261
299
  } | undefined;
262
300
  project_id?: string | undefined;
301
+ workspace_binding_id?: string | undefined;
263
302
  required_stores?: {
264
303
  id: string;
265
304
  suggested_remote?: string | undefined;
266
305
  }[] | undefined;
267
306
  active_write_store?: string | undefined;
307
+ active_project?: string | undefined;
308
+ write_routes?: {
309
+ scope: string;
310
+ store: string;
311
+ }[] | undefined;
312
+ default_write_store?: string | undefined;
268
313
  scanIgnores?: string[] | undefined;
269
314
  audit_mode?: "strict" | "warn" | "off" | undefined;
270
315
  mcpPayloadLimits?: {
271
316
  warnBytes?: number | undefined;
272
317
  hardBytes?: number | undefined;
273
318
  } | undefined;
319
+ observe?: {
320
+ session_start?: boolean | undefined;
321
+ pre_tool_use?: boolean | undefined;
322
+ stop?: boolean | undefined;
323
+ } | undefined;
274
324
  cite_nudge_ignore_globs?: string[] | undefined;
275
325
  fabric_event_retention_days?: 7 | 30 | 90 | undefined;
276
326
  hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
277
327
  orphan_demote_proven_days?: number | undefined;
278
328
  orphan_demote_verified_days?: number | undefined;
279
329
  orphan_demote_draft_days?: number | undefined;
280
- orphan_demote_stable_days?: number | undefined;
281
- orphan_demote_endorsed_days?: number | undefined;
282
330
  selection_token_ttl_ms?: number | undefined;
283
331
  plan_context_top_k?: number | undefined;
284
332
  retrieval_budget_profile?: "conservative" | "balanced" | "generous" | undefined;
333
+ recall_body_budget_bytes?: number | undefined;
285
334
  }, {
286
335
  clientPaths?: {
287
336
  claudeCodeCLI?: string | undefined;
288
337
  claudeCodeDesktop?: string | undefined;
289
- cursor?: string | undefined;
290
338
  codexCLI?: string | undefined;
291
339
  } | undefined;
292
340
  project_id?: string | undefined;
341
+ workspace_binding_id?: string | undefined;
293
342
  required_stores?: {
294
343
  id: string;
295
344
  suggested_remote?: string | undefined;
296
345
  }[] | undefined;
297
346
  active_write_store?: string | undefined;
347
+ active_project?: string | undefined;
348
+ write_routes?: {
349
+ scope: string;
350
+ store: string;
351
+ }[] | undefined;
352
+ default_write_store?: string | undefined;
298
353
  scanIgnores?: string[] | undefined;
299
354
  audit_mode?: "strict" | "warn" | "off" | undefined;
300
355
  mcpPayloadLimits?: {
301
356
  warnBytes?: number | undefined;
302
357
  hardBytes?: number | undefined;
303
358
  } | undefined;
304
- fabric_language?: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid" | undefined;
305
359
  default_layer_filter?: "personal" | "team" | "both" | undefined;
360
+ nudge_mode?: "silent" | "minimal" | "normal" | "verbose" | undefined;
361
+ observe?: {
362
+ session_start?: boolean | undefined;
363
+ pre_tool_use?: boolean | undefined;
364
+ stop?: boolean | undefined;
365
+ } | undefined;
306
366
  archive_hint_cooldown_hours?: number | undefined;
307
367
  underseed_node_threshold?: number | undefined;
308
368
  archive_edit_threshold?: number | undefined;
@@ -332,6 +392,7 @@ declare const fabricConfigSchema: z.ZodObject<{
332
392
  onboard_slots_opted_out?: string[] | undefined;
333
393
  hint_broad_top_k?: number | undefined;
334
394
  hint_broad_budget_chars?: number | undefined;
395
+ broad_index_backstop?: number | undefined;
335
396
  hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
336
397
  cite_policy_enabled?: boolean | undefined;
337
398
  self_archive_policy_enabled?: boolean | undefined;
@@ -342,13 +403,12 @@ declare const fabricConfigSchema: z.ZodObject<{
342
403
  orphan_demote_proven_days?: number | undefined;
343
404
  orphan_demote_verified_days?: number | undefined;
344
405
  orphan_demote_draft_days?: number | undefined;
345
- orphan_demote_stable_days?: number | undefined;
346
- orphan_demote_endorsed_days?: number | undefined;
347
406
  hint_summary_max_len?: number | undefined;
348
407
  hint_reminder_to_context?: boolean | undefined;
349
408
  selection_token_ttl_ms?: number | undefined;
350
409
  plan_context_top_k?: number | undefined;
351
410
  retrieval_budget_profile?: "conservative" | "balanced" | "generous" | undefined;
411
+ recall_body_budget_bytes?: number | undefined;
352
412
  embed_enabled?: boolean | undefined;
353
413
  embed_weight?: number | undefined;
354
414
  embed_model?: "fast-bge-small-zh-v1.5" | "fast-multilingual-e5-large" | "fast-bge-small-en-v1.5" | "fast-bge-small-en" | "fast-bge-base-en-v1.5" | "fast-bge-base-en" | "fast-all-MiniLM-L6-v2" | undefined;
@@ -357,7 +417,6 @@ declare const fabricConfigSchema: z.ZodObject<{
357
417
  interface ClientPaths {
358
418
  claudeCodeCLI?: string;
359
419
  claudeCodeDesktop?: string;
360
- cursor?: string;
361
420
  codexCLI?: string;
362
421
  }
363
422
  type AuditMode = "strict" | "warn" | "off";
@@ -369,4 +428,4 @@ type FabricLanguage = "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
369
428
  type DefaultLayerFilter = "team" | "personal" | "both";
370
429
  type FabricConfig = z.input<typeof fabricConfigSchema>;
371
430
 
372
- export { type AgentsMetaNode as A, type ClientPaths as C, type DefaultLayerFilter as D, type FabricConfig as F, type HumanLockEntry as H, type LedgerEntry as L, type McpPayloadLimits as M, type RuleDescription as R, type AgentsIdentitySource as a, type AgentsLayer as b, type AgentsTopologyType as c, type AgentsMeta as d, type AgentsActivationTier as e, fabricConfigSchema as f, type AgentsMetaCountersEnvelope as g, type AgentsMetaKnowledgeTypeCounters as h, type AgentsMetaNodeActivation as i, type AiLedgerEntry as j, type AuditMode as k, type FabricLanguage as l, type HumanLedgerEntry as m, type RuleDescriptionIndexItem as n, auditModeSchema as o, clientPathsSchema as p, defaultLayerFilterSchema as q, fabricLanguageSchema as r, mcpPayloadLimitsSchema as s, planContextTopKSchema as t, selectionTokenTtlMsSchema as u };
431
+ export { type AgentsMetaNode as A, type ClientPaths as C, type DefaultLayerFilter as D, type FabricConfig as F, type HumanLockEntry as H, type LedgerEntry as L, type McpPayloadLimits as M, type RuleDescription as R, type AgentsIdentitySource as a, type AgentsTopologyType as b, type AgentsMeta as c, type AgentsMetaCountersEnvelope as d, type AgentsMetaKnowledgeTypeCounters as e, fabricConfigSchema as f, type AiLedgerEntry as g, type AuditMode as h, type FabricLanguage as i, type HumanLedgerEntry as j, type RuleDescriptionIndexItem as k, auditModeSchema as l, clientPathsSchema as m, defaultLayerFilterSchema as n, fabricLanguageSchema as o, mcpPayloadLimitsSchema as p, nudgeModeSchema as q, observeConfigSchema as r, planContextTopKSchema as s, selectionTokenTtlMsSchema as t, writeRouteSchema as w };