@fenglimg/fabric-shared 2.2.0-rc.4 → 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;
@@ -26,10 +24,7 @@ interface RuleDescription {
26
24
  interface RuleDescriptionIndexItem {
27
25
  stable_id: string;
28
26
  description: RuleDescription;
29
- }
30
- interface AgentsMetaNodeActivation {
31
- tier: AgentsActivationTier;
32
- description?: string;
27
+ always_active?: boolean;
33
28
  }
34
29
  interface AgentsMetaNode {
35
30
  file: string;
@@ -38,12 +33,10 @@ interface AgentsMetaNode {
38
33
  hash: string;
39
34
  stable_id?: string;
40
35
  identity_source?: AgentsIdentitySource;
41
- activation?: AgentsMetaNodeActivation;
42
36
  description?: RuleDescription;
43
37
  sections?: string[];
44
38
  deps?: string[];
45
39
  priority?: "high" | "medium" | "low";
46
- level?: AgentsLayer;
47
40
  topology_type?: AgentsTopologyType;
48
41
  }
49
42
  interface AgentsMetaKnowledgeTypeCounters {
@@ -94,17 +87,14 @@ declare const auditModeSchema: z.ZodEnum<["strict", "warn", "off"]>;
94
87
  declare const clientPathsSchema: z.ZodObject<{
95
88
  claudeCodeCLI: z.ZodOptional<z.ZodString>;
96
89
  claudeCodeDesktop: z.ZodOptional<z.ZodString>;
97
- cursor: z.ZodOptional<z.ZodString>;
98
90
  codexCLI: z.ZodOptional<z.ZodString>;
99
91
  }, "strict", z.ZodTypeAny, {
100
92
  claudeCodeCLI?: string | undefined;
101
93
  claudeCodeDesktop?: string | undefined;
102
- cursor?: string | undefined;
103
94
  codexCLI?: string | undefined;
104
95
  }, {
105
96
  claudeCodeCLI?: string | undefined;
106
97
  claudeCodeDesktop?: string | undefined;
107
- cursor?: string | undefined;
108
98
  codexCLI?: string | undefined;
109
99
  }>;
110
100
  declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
@@ -119,26 +109,48 @@ declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
119
109
  }>>;
120
110
  declare const selectionTokenTtlMsSchema: z.ZodNumber;
121
111
  declare const planContextTopKSchema: z.ZodNumber;
122
- declare const fabricLanguageSchema: z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>;
112
+ declare const fabricLanguageSchema: z.ZodEnum<["zh-CN", "en"]>;
123
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
+ }>;
124
138
  declare const fabricConfigSchema: z.ZodObject<{
125
139
  clientPaths: z.ZodOptional<z.ZodObject<{
126
140
  claudeCodeCLI: z.ZodOptional<z.ZodString>;
127
141
  claudeCodeDesktop: z.ZodOptional<z.ZodString>;
128
- cursor: z.ZodOptional<z.ZodString>;
129
142
  codexCLI: z.ZodOptional<z.ZodString>;
130
143
  }, "strict", z.ZodTypeAny, {
131
144
  claudeCodeCLI?: string | undefined;
132
145
  claudeCodeDesktop?: string | undefined;
133
- cursor?: string | undefined;
134
146
  codexCLI?: string | undefined;
135
147
  }, {
136
148
  claudeCodeCLI?: string | undefined;
137
149
  claudeCodeDesktop?: string | undefined;
138
- cursor?: string | undefined;
139
150
  codexCLI?: string | undefined;
140
151
  }>>;
141
152
  project_id: z.ZodOptional<z.ZodString>;
153
+ workspace_binding_id: z.ZodOptional<z.ZodString>;
142
154
  required_stores: z.ZodOptional<z.ZodArray<z.ZodObject<{
143
155
  id: z.ZodString;
144
156
  suggested_remote: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"$personal">]>>;
@@ -151,6 +163,17 @@ declare const fabricConfigSchema: z.ZodObject<{
151
163
  }>, "many">>;
152
164
  active_write_store: z.ZodOptional<z.ZodString>;
153
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>;
154
177
  scanIgnores: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
155
178
  audit_mode: z.ZodOptional<z.ZodEnum<["strict", "warn", "off"]>>;
156
179
  mcpPayloadLimits: z.ZodOptional<z.ZodObject<{
@@ -163,8 +186,21 @@ declare const fabricConfigSchema: z.ZodObject<{
163
186
  warnBytes?: number | undefined;
164
187
  hardBytes?: number | undefined;
165
188
  }>>;
166
- fabric_language: z.ZodDefault<z.ZodOptional<z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>>>;
167
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
+ }>>;
168
204
  archive_hint_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
169
205
  underseed_node_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
170
206
  archive_edit_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -194,6 +230,7 @@ declare const fabricConfigSchema: z.ZodObject<{
194
230
  onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
195
231
  hint_broad_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
196
232
  hint_broad_budget_chars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
233
+ broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
197
234
  hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
198
235
  cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
199
236
  self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -204,19 +241,18 @@ declare const fabricConfigSchema: z.ZodObject<{
204
241
  orphan_demote_proven_days: z.ZodOptional<z.ZodNumber>;
205
242
  orphan_demote_verified_days: z.ZodOptional<z.ZodNumber>;
206
243
  orphan_demote_draft_days: z.ZodOptional<z.ZodNumber>;
207
- orphan_demote_stable_days: z.ZodOptional<z.ZodNumber>;
208
- orphan_demote_endorsed_days: z.ZodOptional<z.ZodNumber>;
209
244
  hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
210
245
  hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
211
246
  selection_token_ttl_ms: z.ZodOptional<z.ZodNumber>;
212
247
  plan_context_top_k: z.ZodOptional<z.ZodNumber>;
213
248
  retrieval_budget_profile: z.ZodOptional<z.ZodEnum<["conservative", "balanced", "generous"]>>;
249
+ recall_body_budget_bytes: z.ZodOptional<z.ZodNumber>;
214
250
  embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
215
251
  embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
216
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"]>>>;
217
253
  }, "strip", z.ZodTypeAny, {
218
- fabric_language: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
219
254
  default_layer_filter: "personal" | "team" | "both";
255
+ nudge_mode: "silent" | "minimal" | "normal" | "verbose";
220
256
  archive_hint_cooldown_hours: number;
221
257
  underseed_node_threshold: number;
222
258
  archive_edit_threshold: number;
@@ -244,6 +280,7 @@ declare const fabricConfigSchema: z.ZodObject<{
244
280
  onboard_slots_opted_out: string[];
245
281
  hint_broad_top_k: number;
246
282
  hint_broad_budget_chars: number;
283
+ broad_index_backstop: number;
247
284
  cite_policy_enabled: boolean;
248
285
  self_archive_policy_enabled: boolean;
249
286
  hint_narrow_top_k: number;
@@ -258,55 +295,74 @@ declare const fabricConfigSchema: z.ZodObject<{
258
295
  clientPaths?: {
259
296
  claudeCodeCLI?: string | undefined;
260
297
  claudeCodeDesktop?: string | undefined;
261
- cursor?: string | undefined;
262
298
  codexCLI?: string | undefined;
263
299
  } | undefined;
264
300
  project_id?: string | undefined;
301
+ workspace_binding_id?: string | undefined;
265
302
  required_stores?: {
266
303
  id: string;
267
304
  suggested_remote?: string | undefined;
268
305
  }[] | undefined;
269
306
  active_write_store?: string | undefined;
270
307
  active_project?: string | undefined;
308
+ write_routes?: {
309
+ scope: string;
310
+ store: string;
311
+ }[] | undefined;
312
+ default_write_store?: string | undefined;
271
313
  scanIgnores?: string[] | undefined;
272
314
  audit_mode?: "strict" | "warn" | "off" | undefined;
273
315
  mcpPayloadLimits?: {
274
316
  warnBytes?: number | undefined;
275
317
  hardBytes?: number | undefined;
276
318
  } | undefined;
319
+ observe?: {
320
+ session_start?: boolean | undefined;
321
+ pre_tool_use?: boolean | undefined;
322
+ stop?: boolean | undefined;
323
+ } | undefined;
277
324
  cite_nudge_ignore_globs?: string[] | undefined;
278
325
  fabric_event_retention_days?: 7 | 30 | 90 | undefined;
279
326
  hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
280
327
  orphan_demote_proven_days?: number | undefined;
281
328
  orphan_demote_verified_days?: number | undefined;
282
329
  orphan_demote_draft_days?: number | undefined;
283
- orphan_demote_stable_days?: number | undefined;
284
- orphan_demote_endorsed_days?: number | undefined;
285
330
  selection_token_ttl_ms?: number | undefined;
286
331
  plan_context_top_k?: number | undefined;
287
332
  retrieval_budget_profile?: "conservative" | "balanced" | "generous" | undefined;
333
+ recall_body_budget_bytes?: number | undefined;
288
334
  }, {
289
335
  clientPaths?: {
290
336
  claudeCodeCLI?: string | undefined;
291
337
  claudeCodeDesktop?: string | undefined;
292
- cursor?: string | undefined;
293
338
  codexCLI?: string | undefined;
294
339
  } | undefined;
295
340
  project_id?: string | undefined;
341
+ workspace_binding_id?: string | undefined;
296
342
  required_stores?: {
297
343
  id: string;
298
344
  suggested_remote?: string | undefined;
299
345
  }[] | undefined;
300
346
  active_write_store?: string | undefined;
301
347
  active_project?: string | undefined;
348
+ write_routes?: {
349
+ scope: string;
350
+ store: string;
351
+ }[] | undefined;
352
+ default_write_store?: string | undefined;
302
353
  scanIgnores?: string[] | undefined;
303
354
  audit_mode?: "strict" | "warn" | "off" | undefined;
304
355
  mcpPayloadLimits?: {
305
356
  warnBytes?: number | undefined;
306
357
  hardBytes?: number | undefined;
307
358
  } | undefined;
308
- fabric_language?: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid" | undefined;
309
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;
310
366
  archive_hint_cooldown_hours?: number | undefined;
311
367
  underseed_node_threshold?: number | undefined;
312
368
  archive_edit_threshold?: number | undefined;
@@ -336,6 +392,7 @@ declare const fabricConfigSchema: z.ZodObject<{
336
392
  onboard_slots_opted_out?: string[] | undefined;
337
393
  hint_broad_top_k?: number | undefined;
338
394
  hint_broad_budget_chars?: number | undefined;
395
+ broad_index_backstop?: number | undefined;
339
396
  hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
340
397
  cite_policy_enabled?: boolean | undefined;
341
398
  self_archive_policy_enabled?: boolean | undefined;
@@ -346,13 +403,12 @@ declare const fabricConfigSchema: z.ZodObject<{
346
403
  orphan_demote_proven_days?: number | undefined;
347
404
  orphan_demote_verified_days?: number | undefined;
348
405
  orphan_demote_draft_days?: number | undefined;
349
- orphan_demote_stable_days?: number | undefined;
350
- orphan_demote_endorsed_days?: number | undefined;
351
406
  hint_summary_max_len?: number | undefined;
352
407
  hint_reminder_to_context?: boolean | undefined;
353
408
  selection_token_ttl_ms?: number | undefined;
354
409
  plan_context_top_k?: number | undefined;
355
410
  retrieval_budget_profile?: "conservative" | "balanced" | "generous" | undefined;
411
+ recall_body_budget_bytes?: number | undefined;
356
412
  embed_enabled?: boolean | undefined;
357
413
  embed_weight?: number | undefined;
358
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;
@@ -361,7 +417,6 @@ declare const fabricConfigSchema: z.ZodObject<{
361
417
  interface ClientPaths {
362
418
  claudeCodeCLI?: string;
363
419
  claudeCodeDesktop?: string;
364
- cursor?: string;
365
420
  codexCLI?: string;
366
421
  }
367
422
  type AuditMode = "strict" | "warn" | "off";
@@ -373,4 +428,4 @@ type FabricLanguage = "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
373
428
  type DefaultLayerFilter = "team" | "personal" | "both";
374
429
  type FabricConfig = z.input<typeof fabricConfigSchema>;
375
430
 
376
- 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 };