@fenglimg/fabric-shared 2.0.0-rc.29 → 2.0.0-rc.33
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.
- package/dist/{chunk-225L7D4T.js → chunk-Z7UPW75I.js} +122 -32
- package/dist/i18n/index.js +1 -1
- package/dist/index-Crx0-0-9.d.ts +301 -0
- package/dist/index.d.ts +54 -210
- package/dist/index.js +98 -14
- package/dist/schemas/api-contracts.d.ts +84 -84
- package/dist/types/index.d.ts +2 -122
- package/package.json +1 -1
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
type AgentsLayer = "L0" | "L1" | "L2";
|
|
4
|
+
type AgentsTopologyType = "mirror" | "cross-cutting" | "domain" | "local" | "global";
|
|
5
|
+
type AgentsActivationTier = "always" | "path" | "description";
|
|
6
|
+
type AgentsIdentitySource = "declared" | "derived";
|
|
7
|
+
interface RuleDescription {
|
|
8
|
+
summary: string;
|
|
9
|
+
intent_clues: string[];
|
|
10
|
+
tech_stack: string[];
|
|
11
|
+
impact: string[];
|
|
12
|
+
must_read_if: string;
|
|
13
|
+
entities?: string[];
|
|
14
|
+
id?: string;
|
|
15
|
+
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes";
|
|
16
|
+
maturity?: "draft" | "verified" | "proven";
|
|
17
|
+
knowledge_layer?: "personal" | "team";
|
|
18
|
+
layer_reason?: string;
|
|
19
|
+
created_at?: string;
|
|
20
|
+
tags?: string[];
|
|
21
|
+
relevance_scope?: "narrow" | "broad";
|
|
22
|
+
relevance_paths?: string[];
|
|
23
|
+
}
|
|
24
|
+
interface RuleDescriptionIndexItem {
|
|
25
|
+
stable_id: string;
|
|
26
|
+
level: AgentsLayer;
|
|
27
|
+
required: boolean;
|
|
28
|
+
selectable: boolean;
|
|
29
|
+
description: RuleDescription;
|
|
30
|
+
type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes";
|
|
31
|
+
maturity?: "draft" | "verified" | "proven";
|
|
32
|
+
layer?: "personal" | "team";
|
|
33
|
+
layer_reason?: string;
|
|
34
|
+
relevance_scope?: "narrow" | "broad";
|
|
35
|
+
relevance_paths?: string[];
|
|
36
|
+
}
|
|
37
|
+
interface AgentsMetaNodeActivation {
|
|
38
|
+
tier: AgentsActivationTier;
|
|
39
|
+
description?: string;
|
|
40
|
+
}
|
|
41
|
+
interface AgentsMetaNode {
|
|
42
|
+
file: string;
|
|
43
|
+
content_ref?: string;
|
|
44
|
+
scope_glob: string;
|
|
45
|
+
hash: string;
|
|
46
|
+
stable_id?: string;
|
|
47
|
+
identity_source?: AgentsIdentitySource;
|
|
48
|
+
activation?: AgentsMetaNodeActivation;
|
|
49
|
+
description?: RuleDescription;
|
|
50
|
+
sections?: string[];
|
|
51
|
+
deps?: string[];
|
|
52
|
+
priority?: "high" | "medium" | "low";
|
|
53
|
+
level?: AgentsLayer;
|
|
54
|
+
topology_type?: AgentsTopologyType;
|
|
55
|
+
}
|
|
56
|
+
interface AgentsMetaKnowledgeTypeCounters {
|
|
57
|
+
MOD: number;
|
|
58
|
+
DEC: number;
|
|
59
|
+
GLD: number;
|
|
60
|
+
PIT: number;
|
|
61
|
+
PRO: number;
|
|
62
|
+
}
|
|
63
|
+
interface AgentsMetaCountersEnvelope {
|
|
64
|
+
KP: AgentsMetaKnowledgeTypeCounters;
|
|
65
|
+
KT: AgentsMetaKnowledgeTypeCounters;
|
|
66
|
+
}
|
|
67
|
+
interface AgentsMeta {
|
|
68
|
+
revision: string;
|
|
69
|
+
nodes: Record<string, AgentsMetaNode>;
|
|
70
|
+
counters?: AgentsMetaCountersEnvelope;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface AiLedgerEntry {
|
|
74
|
+
id?: string;
|
|
75
|
+
ts: number;
|
|
76
|
+
source: "ai";
|
|
77
|
+
commit_sha?: string;
|
|
78
|
+
intent: string;
|
|
79
|
+
affected_paths: string[];
|
|
80
|
+
}
|
|
81
|
+
interface HumanLedgerEntry {
|
|
82
|
+
id?: string;
|
|
83
|
+
ts: number;
|
|
84
|
+
source: "human";
|
|
85
|
+
parent_sha: string;
|
|
86
|
+
parent_ledger_entry_id?: string;
|
|
87
|
+
intent: string;
|
|
88
|
+
affected_paths: string[];
|
|
89
|
+
diff_stat: string;
|
|
90
|
+
annotation?: string;
|
|
91
|
+
}
|
|
92
|
+
type LedgerEntry = AiLedgerEntry | HumanLedgerEntry;
|
|
93
|
+
interface HumanLockEntry {
|
|
94
|
+
file: string;
|
|
95
|
+
start_line: number;
|
|
96
|
+
end_line: number;
|
|
97
|
+
hash: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare const auditModeSchema: z.ZodEnum<["strict", "warn", "off"]>;
|
|
101
|
+
declare const clientPathsSchema: z.ZodObject<{
|
|
102
|
+
claudeCodeCLI: z.ZodOptional<z.ZodString>;
|
|
103
|
+
claudeCodeDesktop: z.ZodOptional<z.ZodString>;
|
|
104
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
105
|
+
codexCLI: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strict", z.ZodTypeAny, {
|
|
107
|
+
claudeCodeCLI?: string | undefined;
|
|
108
|
+
claudeCodeDesktop?: string | undefined;
|
|
109
|
+
cursor?: string | undefined;
|
|
110
|
+
codexCLI?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
claudeCodeCLI?: string | undefined;
|
|
113
|
+
claudeCodeDesktop?: string | undefined;
|
|
114
|
+
cursor?: string | undefined;
|
|
115
|
+
codexCLI?: string | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
warnBytes: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
hardBytes: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
warnBytes?: number | undefined;
|
|
122
|
+
hardBytes?: number | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
warnBytes?: number | undefined;
|
|
125
|
+
hardBytes?: number | undefined;
|
|
126
|
+
}>>;
|
|
127
|
+
declare const selectionTokenTtlMsSchema: z.ZodNumber;
|
|
128
|
+
declare const fabricLanguageSchema: z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>;
|
|
129
|
+
declare const defaultLayerFilterSchema: z.ZodEnum<["team", "personal", "both"]>;
|
|
130
|
+
declare const fabricConfigSchema: z.ZodObject<{
|
|
131
|
+
clientPaths: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
claudeCodeCLI: z.ZodOptional<z.ZodString>;
|
|
133
|
+
claudeCodeDesktop: z.ZodOptional<z.ZodString>;
|
|
134
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
135
|
+
codexCLI: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, "strict", z.ZodTypeAny, {
|
|
137
|
+
claudeCodeCLI?: string | undefined;
|
|
138
|
+
claudeCodeDesktop?: string | undefined;
|
|
139
|
+
cursor?: string | undefined;
|
|
140
|
+
codexCLI?: string | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
claudeCodeCLI?: string | undefined;
|
|
143
|
+
claudeCodeDesktop?: string | undefined;
|
|
144
|
+
cursor?: string | undefined;
|
|
145
|
+
codexCLI?: string | undefined;
|
|
146
|
+
}>>;
|
|
147
|
+
scanIgnores: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
148
|
+
audit_mode: z.ZodOptional<z.ZodEnum<["strict", "warn", "off"]>>;
|
|
149
|
+
mcpPayloadLimits: z.ZodOptional<z.ZodObject<{
|
|
150
|
+
warnBytes: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
hardBytes: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
warnBytes?: number | undefined;
|
|
154
|
+
hardBytes?: number | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
warnBytes?: number | undefined;
|
|
157
|
+
hardBytes?: number | undefined;
|
|
158
|
+
}>>;
|
|
159
|
+
fabric_language: z.ZodDefault<z.ZodOptional<z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>>>;
|
|
160
|
+
default_layer_filter: z.ZodDefault<z.ZodOptional<z.ZodEnum<["team", "personal", "both"]>>>;
|
|
161
|
+
archive_hint_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
162
|
+
underseed_node_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
163
|
+
archive_edit_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
164
|
+
archive_hint_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
165
|
+
review_hint_pending_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
166
|
+
review_hint_pending_age_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
167
|
+
maintenance_hint_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
168
|
+
maintenance_hint_cooldown_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
169
|
+
import_window_first_run_months: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
170
|
+
import_window_rerun_months: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
171
|
+
import_max_pending_per_run: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
172
|
+
import_max_commits_scan: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
173
|
+
import_skip_canonical_threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
174
|
+
archive_max_candidates_per_batch: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
175
|
+
archive_max_recent_paths: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
176
|
+
archive_digest_max_sessions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
177
|
+
review_topic_result_cap: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
178
|
+
review_stale_pending_days: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
179
|
+
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
180
|
+
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
181
|
+
hint_broad_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
182
|
+
hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
183
|
+
hint_narrow_dedup_window_turns: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
184
|
+
hint_broad_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
185
|
+
hint_narrow_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
186
|
+
orphan_demote_stable_days: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
orphan_demote_endorsed_days: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
orphan_demote_draft_days: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
190
|
+
hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
191
|
+
selection_token_ttl_ms: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
fabric_language: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
|
|
194
|
+
default_layer_filter: "personal" | "team" | "both";
|
|
195
|
+
archive_hint_cooldown_hours: number;
|
|
196
|
+
underseed_node_threshold: number;
|
|
197
|
+
archive_edit_threshold: number;
|
|
198
|
+
archive_hint_hours: number;
|
|
199
|
+
review_hint_pending_count: number;
|
|
200
|
+
review_hint_pending_age_days: number;
|
|
201
|
+
maintenance_hint_days: number;
|
|
202
|
+
maintenance_hint_cooldown_days: number;
|
|
203
|
+
import_window_first_run_months: number;
|
|
204
|
+
import_window_rerun_months: number;
|
|
205
|
+
import_max_pending_per_run: number;
|
|
206
|
+
import_max_commits_scan: number;
|
|
207
|
+
import_skip_canonical_threshold: number;
|
|
208
|
+
archive_max_candidates_per_batch: number;
|
|
209
|
+
archive_max_recent_paths: number;
|
|
210
|
+
archive_digest_max_sessions: number;
|
|
211
|
+
review_topic_result_cap: number;
|
|
212
|
+
review_stale_pending_days: number;
|
|
213
|
+
onboard_slots_opted_out: string[];
|
|
214
|
+
hint_broad_top_k: number;
|
|
215
|
+
hint_narrow_top_k: number;
|
|
216
|
+
hint_narrow_dedup_window_turns: number;
|
|
217
|
+
hint_broad_cooldown_hours: number;
|
|
218
|
+
hint_narrow_cooldown_hours: number;
|
|
219
|
+
hint_summary_max_len: number;
|
|
220
|
+
hint_reminder_to_context: boolean;
|
|
221
|
+
clientPaths?: {
|
|
222
|
+
claudeCodeCLI?: string | undefined;
|
|
223
|
+
claudeCodeDesktop?: string | undefined;
|
|
224
|
+
cursor?: string | undefined;
|
|
225
|
+
codexCLI?: string | undefined;
|
|
226
|
+
} | undefined;
|
|
227
|
+
scanIgnores?: string[] | undefined;
|
|
228
|
+
audit_mode?: "strict" | "warn" | "off" | undefined;
|
|
229
|
+
mcpPayloadLimits?: {
|
|
230
|
+
warnBytes?: number | undefined;
|
|
231
|
+
hardBytes?: number | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
234
|
+
orphan_demote_stable_days?: number | undefined;
|
|
235
|
+
orphan_demote_endorsed_days?: number | undefined;
|
|
236
|
+
orphan_demote_draft_days?: number | undefined;
|
|
237
|
+
selection_token_ttl_ms?: number | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
clientPaths?: {
|
|
240
|
+
claudeCodeCLI?: string | undefined;
|
|
241
|
+
claudeCodeDesktop?: string | undefined;
|
|
242
|
+
cursor?: string | undefined;
|
|
243
|
+
codexCLI?: string | undefined;
|
|
244
|
+
} | undefined;
|
|
245
|
+
scanIgnores?: string[] | undefined;
|
|
246
|
+
audit_mode?: "strict" | "warn" | "off" | undefined;
|
|
247
|
+
mcpPayloadLimits?: {
|
|
248
|
+
warnBytes?: number | undefined;
|
|
249
|
+
hardBytes?: number | undefined;
|
|
250
|
+
} | undefined;
|
|
251
|
+
fabric_language?: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid" | undefined;
|
|
252
|
+
default_layer_filter?: "personal" | "team" | "both" | undefined;
|
|
253
|
+
archive_hint_cooldown_hours?: number | undefined;
|
|
254
|
+
underseed_node_threshold?: number | undefined;
|
|
255
|
+
archive_edit_threshold?: number | undefined;
|
|
256
|
+
archive_hint_hours?: number | undefined;
|
|
257
|
+
review_hint_pending_count?: number | undefined;
|
|
258
|
+
review_hint_pending_age_days?: number | undefined;
|
|
259
|
+
maintenance_hint_days?: number | undefined;
|
|
260
|
+
maintenance_hint_cooldown_days?: number | undefined;
|
|
261
|
+
import_window_first_run_months?: number | undefined;
|
|
262
|
+
import_window_rerun_months?: number | undefined;
|
|
263
|
+
import_max_pending_per_run?: number | undefined;
|
|
264
|
+
import_max_commits_scan?: number | undefined;
|
|
265
|
+
import_skip_canonical_threshold?: number | undefined;
|
|
266
|
+
archive_max_candidates_per_batch?: number | undefined;
|
|
267
|
+
archive_max_recent_paths?: number | undefined;
|
|
268
|
+
archive_digest_max_sessions?: number | undefined;
|
|
269
|
+
review_topic_result_cap?: number | undefined;
|
|
270
|
+
review_stale_pending_days?: number | undefined;
|
|
271
|
+
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
272
|
+
onboard_slots_opted_out?: string[] | undefined;
|
|
273
|
+
hint_broad_top_k?: number | undefined;
|
|
274
|
+
hint_narrow_top_k?: number | undefined;
|
|
275
|
+
hint_narrow_dedup_window_turns?: number | undefined;
|
|
276
|
+
hint_broad_cooldown_hours?: number | undefined;
|
|
277
|
+
hint_narrow_cooldown_hours?: number | undefined;
|
|
278
|
+
orphan_demote_stable_days?: number | undefined;
|
|
279
|
+
orphan_demote_endorsed_days?: number | undefined;
|
|
280
|
+
orphan_demote_draft_days?: number | undefined;
|
|
281
|
+
hint_summary_max_len?: number | undefined;
|
|
282
|
+
hint_reminder_to_context?: boolean | undefined;
|
|
283
|
+
selection_token_ttl_ms?: number | undefined;
|
|
284
|
+
}>;
|
|
285
|
+
|
|
286
|
+
interface ClientPaths {
|
|
287
|
+
claudeCodeCLI?: string;
|
|
288
|
+
claudeCodeDesktop?: string;
|
|
289
|
+
cursor?: string;
|
|
290
|
+
codexCLI?: string;
|
|
291
|
+
}
|
|
292
|
+
type AuditMode = "strict" | "warn" | "off";
|
|
293
|
+
interface McpPayloadLimits {
|
|
294
|
+
warnBytes?: number;
|
|
295
|
+
hardBytes?: number;
|
|
296
|
+
}
|
|
297
|
+
type FabricLanguage = "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
|
|
298
|
+
type DefaultLayerFilter = "team" | "personal" | "both";
|
|
299
|
+
type FabricConfig = z.input<typeof fabricConfigSchema>;
|
|
300
|
+
|
|
301
|
+
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, selectionTokenTtlMsSchema as t };
|