@fenglimg/fabric-shared 2.3.0-rc.1 → 2.3.0-rc.3

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,389 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- type AgentsTopologyType = "mirror" | "cross-cutting" | "domain" | "local" | "global";
4
- type AgentsIdentitySource = "declared" | "derived";
5
- interface RuleDescription {
6
- summary: string;
7
- intent_clues: string[];
8
- tech_stack: string[];
9
- impact: string[];
10
- must_read_if: string;
11
- entities?: string[];
12
- id?: string;
13
- knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes";
14
- maturity?: "draft" | "verified" | "proven";
15
- knowledge_layer?: "personal" | "team";
16
- semantic_scope?: string;
17
- layer_reason?: string;
18
- created_at?: string;
19
- tags?: string[];
20
- relevance_scope?: "narrow" | "broad";
21
- relevance_paths?: string[];
22
- related?: string[];
23
- }
24
- interface RuleDescriptionIndexItem {
25
- stable_id: string;
26
- description: RuleDescription;
27
- always_active?: boolean;
28
- }
29
- interface AgentsMetaNode {
30
- file: string;
31
- content_ref?: string;
32
- scope_glob: string;
33
- hash: string;
34
- stable_id?: string;
35
- identity_source?: AgentsIdentitySource;
36
- description?: RuleDescription;
37
- sections?: string[];
38
- deps?: string[];
39
- priority?: "high" | "medium" | "low";
40
- topology_type?: AgentsTopologyType;
41
- }
42
- interface AgentsMetaKnowledgeTypeCounters {
43
- MOD: number;
44
- DEC: number;
45
- GLD: number;
46
- PIT: number;
47
- PRO: number;
48
- }
49
- interface AgentsMetaCountersEnvelope {
50
- KP: AgentsMetaKnowledgeTypeCounters;
51
- KT: AgentsMetaKnowledgeTypeCounters;
52
- }
53
- interface AgentsMeta {
54
- revision: string;
55
- nodes: Record<string, AgentsMetaNode>;
56
- counters?: AgentsMetaCountersEnvelope;
57
- }
58
-
59
- interface AiLedgerEntry {
60
- id?: string;
61
- ts: number;
62
- source: "ai";
63
- commit_sha?: string;
64
- intent: string;
65
- affected_paths: string[];
66
- }
67
- interface HumanLedgerEntry {
68
- id?: string;
69
- ts: number;
70
- source: "human";
71
- parent_sha: string;
72
- parent_ledger_entry_id?: string;
73
- intent: string;
74
- affected_paths: string[];
75
- diff_stat: string;
76
- annotation?: string;
77
- }
78
- type LedgerEntry = AiLedgerEntry | HumanLedgerEntry;
79
- interface HumanLockEntry {
80
- file: string;
81
- start_line: number;
82
- end_line: number;
83
- hash: string;
84
- }
85
-
86
- declare const auditModeSchema: z.ZodEnum<["strict", "warn", "off"]>;
87
- declare const clientPathsSchema: z.ZodObject<{
88
- claudeCodeCLI: z.ZodOptional<z.ZodString>;
89
- claudeCodeDesktop: z.ZodOptional<z.ZodString>;
90
- codexCLI: z.ZodOptional<z.ZodString>;
91
- }, "strict", z.ZodTypeAny, {
92
- claudeCodeCLI?: string | undefined;
93
- claudeCodeDesktop?: string | undefined;
94
- codexCLI?: string | undefined;
95
- }, {
96
- claudeCodeCLI?: string | undefined;
97
- claudeCodeDesktop?: string | undefined;
98
- codexCLI?: string | undefined;
99
- }>;
100
- declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
101
- warnBytes: z.ZodOptional<z.ZodNumber>;
102
- hardBytes: z.ZodOptional<z.ZodNumber>;
103
- }, "strip", z.ZodTypeAny, {
104
- warnBytes?: number | undefined;
105
- hardBytes?: number | undefined;
106
- }, {
107
- warnBytes?: number | undefined;
108
- hardBytes?: number | undefined;
109
- }>>;
110
- declare const selectionTokenTtlMsSchema: z.ZodNumber;
111
- declare const planContextTopKSchema: z.ZodNumber;
112
- declare const fabricLanguageSchema: z.ZodEnum<["zh-CN", "en"]>;
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
- }>;
138
- declare const fabricConfigSchema: z.ZodObject<{
139
- clientPaths: z.ZodOptional<z.ZodObject<{
140
- claudeCodeCLI: z.ZodOptional<z.ZodString>;
141
- claudeCodeDesktop: z.ZodOptional<z.ZodString>;
142
- codexCLI: z.ZodOptional<z.ZodString>;
143
- }, "strict", z.ZodTypeAny, {
144
- claudeCodeCLI?: string | undefined;
145
- claudeCodeDesktop?: string | undefined;
146
- codexCLI?: string | undefined;
147
- }, {
148
- claudeCodeCLI?: string | undefined;
149
- claudeCodeDesktop?: string | undefined;
150
- codexCLI?: string | undefined;
151
- }>>;
152
- project_id: z.ZodOptional<z.ZodString>;
153
- workspace_binding_id: z.ZodOptional<z.ZodString>;
154
- required_stores: z.ZodOptional<z.ZodArray<z.ZodObject<{
155
- id: z.ZodString;
156
- suggested_remote: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"$personal">]>>;
157
- }, "strict", z.ZodTypeAny, {
158
- id: string;
159
- suggested_remote?: string | undefined;
160
- }, {
161
- id: string;
162
- suggested_remote?: string | undefined;
163
- }>, "many">>;
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>;
177
- scanIgnores: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
178
- audit_mode: z.ZodOptional<z.ZodEnum<["strict", "warn", "off"]>>;
179
- mcpPayloadLimits: z.ZodOptional<z.ZodObject<{
180
- warnBytes: z.ZodOptional<z.ZodNumber>;
181
- hardBytes: z.ZodOptional<z.ZodNumber>;
182
- }, "strip", z.ZodTypeAny, {
183
- warnBytes?: number | undefined;
184
- hardBytes?: number | undefined;
185
- }, {
186
- warnBytes?: number | undefined;
187
- hardBytes?: number | undefined;
188
- }>>;
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
- }>>;
204
- archive_hint_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
205
- underseed_node_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
206
- archive_edit_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
207
- archive_hint_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
208
- review_hint_pending_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
209
- review_hint_pending_age_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
210
- maintenance_hint_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
211
- maintenance_hint_cooldown_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
212
- review_stale_pending_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
213
- cite_recall_nudge: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
214
- cite_recall_window_minutes: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
215
- cite_nudge_ignore_globs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
- conflict_lint_similarity_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
217
- fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
218
- onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
219
- broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
220
- hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
221
- cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
222
- self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
223
- hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
224
- hint_narrow_dedup_window_turns: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
225
- hint_broad_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
226
- hint_narrow_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
227
- orphan_demote_proven_days: z.ZodOptional<z.ZodNumber>;
228
- orphan_demote_verified_days: z.ZodOptional<z.ZodNumber>;
229
- orphan_demote_draft_days: z.ZodOptional<z.ZodNumber>;
230
- broad_review_recheck_days: z.ZodOptional<z.ZodNumber>;
231
- hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
232
- hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
233
- selection_token_ttl_ms: z.ZodOptional<z.ZodNumber>;
234
- plan_context_top_k: z.ZodOptional<z.ZodNumber>;
235
- recall_relevance_ratio: z.ZodOptional<z.ZodNumber>;
236
- embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
237
- embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
238
- 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"]>>>;
239
- }, "strip", z.ZodTypeAny, {
240
- default_layer_filter: "personal" | "team" | "both";
241
- nudge_mode: "silent" | "minimal" | "normal" | "verbose";
242
- archive_hint_cooldown_hours: number;
243
- underseed_node_threshold: number;
244
- archive_edit_threshold: number;
245
- archive_hint_hours: number;
246
- review_hint_pending_count: number;
247
- review_hint_pending_age_days: number;
248
- maintenance_hint_days: number;
249
- maintenance_hint_cooldown_days: number;
250
- review_stale_pending_days: number;
251
- cite_recall_nudge: boolean;
252
- cite_recall_window_minutes: number;
253
- conflict_lint_similarity_threshold: number;
254
- onboard_slots_opted_out: string[];
255
- broad_index_backstop: number;
256
- cite_policy_enabled: boolean;
257
- self_archive_policy_enabled: boolean;
258
- hint_narrow_top_k: number;
259
- hint_narrow_dedup_window_turns: number;
260
- hint_broad_cooldown_hours: number;
261
- hint_narrow_cooldown_hours: number;
262
- hint_summary_max_len: number;
263
- hint_reminder_to_context: boolean;
264
- embed_enabled: boolean;
265
- embed_weight: number;
266
- 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";
267
- clientPaths?: {
268
- claudeCodeCLI?: string | undefined;
269
- claudeCodeDesktop?: string | undefined;
270
- codexCLI?: string | undefined;
271
- } | undefined;
272
- project_id?: string | undefined;
273
- workspace_binding_id?: string | undefined;
274
- required_stores?: {
275
- id: string;
276
- suggested_remote?: string | undefined;
277
- }[] | undefined;
278
- active_write_store?: string | undefined;
279
- active_project?: string | undefined;
280
- write_routes?: {
281
- scope: string;
282
- store: string;
283
- }[] | undefined;
284
- default_write_store?: string | undefined;
285
- scanIgnores?: string[] | undefined;
286
- audit_mode?: "strict" | "warn" | "off" | undefined;
287
- mcpPayloadLimits?: {
288
- warnBytes?: number | undefined;
289
- hardBytes?: number | undefined;
290
- } | undefined;
291
- observe?: {
292
- session_start?: boolean | undefined;
293
- pre_tool_use?: boolean | undefined;
294
- stop?: boolean | undefined;
295
- } | undefined;
296
- cite_nudge_ignore_globs?: string[] | undefined;
297
- fabric_event_retention_days?: 7 | 30 | 90 | undefined;
298
- hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
299
- orphan_demote_proven_days?: number | undefined;
300
- orphan_demote_verified_days?: number | undefined;
301
- orphan_demote_draft_days?: number | undefined;
302
- broad_review_recheck_days?: number | undefined;
303
- selection_token_ttl_ms?: number | undefined;
304
- plan_context_top_k?: number | undefined;
305
- recall_relevance_ratio?: number | undefined;
306
- }, {
307
- clientPaths?: {
308
- claudeCodeCLI?: string | undefined;
309
- claudeCodeDesktop?: string | undefined;
310
- codexCLI?: string | undefined;
311
- } | undefined;
312
- project_id?: string | undefined;
313
- workspace_binding_id?: string | undefined;
314
- required_stores?: {
315
- id: string;
316
- suggested_remote?: string | undefined;
317
- }[] | undefined;
318
- active_write_store?: string | undefined;
319
- active_project?: string | undefined;
320
- write_routes?: {
321
- scope: string;
322
- store: string;
323
- }[] | undefined;
324
- default_write_store?: string | undefined;
325
- scanIgnores?: string[] | undefined;
326
- audit_mode?: "strict" | "warn" | "off" | undefined;
327
- mcpPayloadLimits?: {
328
- warnBytes?: number | undefined;
329
- hardBytes?: number | undefined;
330
- } | undefined;
331
- default_layer_filter?: "personal" | "team" | "both" | undefined;
332
- nudge_mode?: "silent" | "minimal" | "normal" | "verbose" | undefined;
333
- observe?: {
334
- session_start?: boolean | undefined;
335
- pre_tool_use?: boolean | undefined;
336
- stop?: boolean | undefined;
337
- } | undefined;
338
- archive_hint_cooldown_hours?: number | undefined;
339
- underseed_node_threshold?: number | undefined;
340
- archive_edit_threshold?: number | undefined;
341
- archive_hint_hours?: number | undefined;
342
- review_hint_pending_count?: number | undefined;
343
- review_hint_pending_age_days?: number | undefined;
344
- maintenance_hint_days?: number | undefined;
345
- maintenance_hint_cooldown_days?: number | undefined;
346
- review_stale_pending_days?: number | undefined;
347
- cite_recall_nudge?: boolean | undefined;
348
- cite_recall_window_minutes?: number | undefined;
349
- cite_nudge_ignore_globs?: string[] | undefined;
350
- conflict_lint_similarity_threshold?: number | undefined;
351
- fabric_event_retention_days?: 7 | 30 | 90 | undefined;
352
- onboard_slots_opted_out?: string[] | undefined;
353
- broad_index_backstop?: number | undefined;
354
- hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
355
- cite_policy_enabled?: boolean | undefined;
356
- self_archive_policy_enabled?: boolean | undefined;
357
- hint_narrow_top_k?: number | undefined;
358
- hint_narrow_dedup_window_turns?: number | undefined;
359
- hint_broad_cooldown_hours?: number | undefined;
360
- hint_narrow_cooldown_hours?: number | undefined;
361
- orphan_demote_proven_days?: number | undefined;
362
- orphan_demote_verified_days?: number | undefined;
363
- orphan_demote_draft_days?: number | undefined;
364
- broad_review_recheck_days?: number | undefined;
365
- hint_summary_max_len?: number | undefined;
366
- hint_reminder_to_context?: boolean | undefined;
367
- selection_token_ttl_ms?: number | undefined;
368
- plan_context_top_k?: number | undefined;
369
- recall_relevance_ratio?: number | undefined;
370
- embed_enabled?: boolean | undefined;
371
- embed_weight?: number | undefined;
372
- 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;
373
- }>;
374
-
375
- interface ClientPaths {
376
- claudeCodeCLI?: string;
377
- claudeCodeDesktop?: string;
378
- codexCLI?: string;
379
- }
380
- type AuditMode = "strict" | "warn" | "off";
381
- interface McpPayloadLimits {
382
- warnBytes?: number;
383
- hardBytes?: number;
384
- }
385
- type FabricLanguage = "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
386
- type DefaultLayerFilter = "team" | "personal" | "both";
387
- type FabricConfig = z.input<typeof fabricConfigSchema>;
388
-
389
- 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 };