@fenglimg/fabric-shared 2.0.1 → 2.2.0-rc.1
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-7CX32MYL.js → chunk-7TZ2PMVH.js} +80 -4
- package/dist/{chunk-WVPDH4BF.js → chunk-JEXTOQVV.js} +31 -2
- package/dist/{chunk-LTDB2UDN.js → chunk-TX2XZ7AW.js} +2 -0
- package/dist/i18n/index.js +1 -1
- package/dist/{index-UBqD9F0b.d.ts → index-J3Xn5h2J.d.ts} +48 -1
- package/dist/index.d.ts +3083 -227
- package/dist/index.js +1896 -562
- package/dist/node/atomic-write.d.ts +26 -1
- package/dist/node/atomic-write.js +45 -2
- package/dist/node/mcp-payload-guard.d.ts +32 -1
- package/dist/node/mcp-payload-guard.js +15 -1
- package/dist/schemas/api-contracts.d.ts +81 -34
- package/dist/schemas/api-contracts.js +1 -1
- package/dist/templates/bootstrap-canonical.d.ts +1 -1
- package/dist/templates/bootstrap-canonical.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -110,7 +110,7 @@ var enMessages = {
|
|
|
110
110
|
"doctor.cite.warning.justActivated": "Cite policy activated on this run; no historical data yet.",
|
|
111
111
|
"doctor.cite.metric.editsTouched": "Edits touched",
|
|
112
112
|
"doctor.cite.metric.qualifyingCites": "Qualifying cites",
|
|
113
|
-
"doctor.cite.metric.recalledUnverified": "
|
|
113
|
+
"doctor.cite.metric.recalledUnverified": "Applied but not verified",
|
|
114
114
|
"doctor.cite.metric.expectedButMissed": "Expected cite missing",
|
|
115
115
|
"doctor.cite.metric.totalTurns": "Total turns",
|
|
116
116
|
"doctor.cite.metric.complianceRate": "cite compliance rate (incl. KB:none[reason])",
|
|
@@ -955,7 +955,46 @@ var enMessages = {
|
|
|
955
955
|
"dashboard.health.boundary.cli-action": "CLI Action Required:",
|
|
956
956
|
"dashboard.health.boundary.cli-prompt": "You have {count} fixable issues. Run the following command in your terminal to repair metadata automatically.",
|
|
957
957
|
"dashboard.health.runtime.connected": "MCP Runtime Connected",
|
|
958
|
-
"dashboard.health.runtime.disconnected": "MCP Runtime Disconnected"
|
|
958
|
+
"dashboard.health.runtime.disconnected": "MCP Runtime Disconnected",
|
|
959
|
+
// W3-05 (ISS-033): project-scoped command output (whoami / store /
|
|
960
|
+
// scope-explain / sync / metrics) — previously hardcoded English, now
|
|
961
|
+
// resolved via the project's fabric_language.
|
|
962
|
+
"cli.cmd.no-global-config": "no global Fabric config \u2014 run `fabric install --global <url>` first",
|
|
963
|
+
"cli.whoami.uid": "uid: {uid}",
|
|
964
|
+
"cli.whoami.stores-none": "stores: (none mounted)",
|
|
965
|
+
"cli.whoami.stores-label": "stores:",
|
|
966
|
+
"cli.shared.local-only": "(local-only)",
|
|
967
|
+
"cli.store.none-mounted": "(no stores mounted)",
|
|
968
|
+
"cli.store.mounted": "mounted '{alias}' ({count} store(s) total)",
|
|
969
|
+
"cli.store.created": "created store '{alias}' ({uuid}) at {dir}",
|
|
970
|
+
"cli.store.created-local-hint": "(local-only \u2014 add a remote later with `git -C <storeDir> remote add origin <url>`)",
|
|
971
|
+
"cli.store.no-alias": "no store aliased '{alias}'",
|
|
972
|
+
"cli.store.detached": "detached '{alias}' \u2014 on-disk store tree left intact (detach \u2260 delete)",
|
|
973
|
+
"cli.store.bound": "bound required store '{id}' ({count} required)",
|
|
974
|
+
"cli.store.switch-write": "active write store set to '{alias}' for this project",
|
|
975
|
+
"cli.sync.deferred": "{count} store(s) offline \u2014 push deferred; re-run `fabric sync` when online",
|
|
976
|
+
"cli.sync.paused": "sync paused on a conflict \u2014 resolve it, then run `fabric sync --continue` (or `--abort`)",
|
|
977
|
+
"cli.metrics.invalid-since": '--since: invalid duration "{raw}" (expected e.g. 24h, 7d, 30m)',
|
|
978
|
+
"cli.metrics.window": "Fabric metrics \u2014 window: {window}",
|
|
979
|
+
"cli.metrics.window-all-time": "all-time",
|
|
980
|
+
"cli.metrics.rows-range": " rows: {count} ({start} \u2192 {end})",
|
|
981
|
+
"cli.metrics.rows": " rows: {count}",
|
|
982
|
+
"cli.metrics.no-activity": " (no counter activity in window \u2014 server may be idle or just started)",
|
|
983
|
+
// W3-09 (ISS-035): forensic project scan progress (stderr, TTY-only).
|
|
984
|
+
"cli.install.scanning": "scanning project for client/framework signals\u2026",
|
|
985
|
+
"cli.install.scan-complete": " project scan complete",
|
|
986
|
+
// W4-11 (ISS-021): unified project-scan recommendations (cli forensic +
|
|
987
|
+
// http scan share this single i18n-keyed set).
|
|
988
|
+
"scan.rec.install": "Run `fabric install` to scaffold the .fabric/ knowledge layout (decisions, pitfalls, guidelines, models, processes).",
|
|
989
|
+
"scan.rec.readme": "Expand README.md (project goal, run steps, no-touch zones) before promoting facts into Fabric knowledge.",
|
|
990
|
+
"scan.rec.contributing": "Add CONTRIBUTING.md or capture contribution-flow guidance under .fabric/knowledge/processes/.",
|
|
991
|
+
"scan.rec.cocos.lifecycle": "Confirm the Cocos Creator Component lifecycle (onLoad/onEnable/start) ordering with the user.",
|
|
992
|
+
"scan.rec.cocos.human-protect": "Ask whether assets/prefabs and assets/scenes are @HUMAN-protected zones.",
|
|
993
|
+
"scan.rec.cocos.meta-lock": "`.meta` files detected \u2014 consider @HUMAN-locking them so the AI does not modify them.",
|
|
994
|
+
"scan.rec.next": "Confirm app/pages routing boundaries and server-component constraints.",
|
|
995
|
+
"scan.rec.vite": "Confirm the src/main entry, component directories, and build-script maintenance boundaries.",
|
|
996
|
+
"scan.rec.unknown": "No framework marker detected \u2014 confirm the tech stack and main entry with the user first.",
|
|
997
|
+
"scan.rec.generic": "Confirm the AGENTS.md layering boundaries around {kind}'s main entry and generated directories."
|
|
959
998
|
};
|
|
960
999
|
|
|
961
1000
|
// src/i18n/locales/zh-CN.ts
|
|
@@ -1068,7 +1107,7 @@ var zhCNMessages = {
|
|
|
1068
1107
|
"doctor.cite.warning.justActivated": "\u672C\u6B21\u9996\u6B21\u6FC0\u6D3B Cite policy,\u6682\u65E0\u5386\u53F2\u6570\u636E\u3002",
|
|
1069
1108
|
"doctor.cite.metric.editsTouched": "Edit \u89E6\u8FBE\u6570",
|
|
1070
1109
|
"doctor.cite.metric.qualifyingCites": "\u5408\u683C cite",
|
|
1071
|
-
"doctor.cite.metric.recalledUnverified": "
|
|
1110
|
+
"doctor.cite.metric.recalledUnverified": "applied \u4F46\u672A\u9A8C\u8BC1",
|
|
1072
1111
|
"doctor.cite.metric.expectedButMissed": "\u5E94\u67E5\u6CA1\u67E5",
|
|
1073
1112
|
"doctor.cite.metric.totalTurns": "\u603B\u56DE\u5408\u6570",
|
|
1074
1113
|
"doctor.cite.metric.complianceRate": "cite \u5408\u89C4\u7387 (\u542B KB:none[reason])",
|
|
@@ -1907,7 +1946,44 @@ var zhCNMessages = {
|
|
|
1907
1946
|
"dashboard.health.boundary.cli-action": "\u9700\u8981\u6267\u884C CLI \u64CD\u4F5C\uFF1A",
|
|
1908
1947
|
"dashboard.health.boundary.cli-prompt": "\u68C0\u6D4B\u5230 {count} \u4E2A\u53EF\u4FEE\u590D\u7684\u95EE\u9898\u3002\u8BF7\u5728\u7EC8\u7AEF\u4E2D\u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u4EE5\u81EA\u52A8\u4FEE\u590D\u5143\u6570\u636E\u3002",
|
|
1909
1948
|
"dashboard.health.runtime.connected": "MCP \u8FD0\u884C\u65F6\u5DF2\u8FDE\u63A5",
|
|
1910
|
-
"dashboard.health.runtime.disconnected": "MCP \u8FD0\u884C\u65F6\u5DF2\u65AD\u5F00"
|
|
1949
|
+
"dashboard.health.runtime.disconnected": "MCP \u8FD0\u884C\u65F6\u5DF2\u65AD\u5F00",
|
|
1950
|
+
// W3-05 (ISS-033): 项目作用域命令输出 (whoami / store / scope-explain /
|
|
1951
|
+
// sync / metrics) —— 原硬编码英文, 现按项目 fabric_language 渲染。
|
|
1952
|
+
"cli.cmd.no-global-config": "\u672A\u627E\u5230\u5168\u5C40 Fabric \u914D\u7F6E \u2014\u2014 \u8BF7\u5148\u8FD0\u884C `fabric install --global <url>`",
|
|
1953
|
+
"cli.whoami.uid": "uid: {uid}",
|
|
1954
|
+
"cli.whoami.stores-none": "stores: (\u672A\u6302\u8F7D\u4EFB\u4F55 store)",
|
|
1955
|
+
"cli.whoami.stores-label": "stores:",
|
|
1956
|
+
"cli.shared.local-only": "(\u4EC5\u672C\u5730)",
|
|
1957
|
+
"cli.store.none-mounted": "(\u672A\u6302\u8F7D\u4EFB\u4F55 store)",
|
|
1958
|
+
"cli.store.mounted": "\u5DF2\u6302\u8F7D '{alias}' (\u5171 {count} \u4E2A store)",
|
|
1959
|
+
"cli.store.created": "\u5DF2\u521B\u5EFA store '{alias}' ({uuid}) \u4E8E {dir}",
|
|
1960
|
+
"cli.store.created-local-hint": "(\u4EC5\u672C\u5730 \u2014\u2014 \u7A0D\u540E\u7528 `git -C <storeDir> remote add origin <url>` \u6DFB\u52A0 remote)",
|
|
1961
|
+
"cli.store.no-alias": "\u6CA1\u6709\u522B\u540D\u4E3A '{alias}' \u7684 store",
|
|
1962
|
+
"cli.store.detached": "\u5DF2\u5206\u79BB '{alias}' \u2014\u2014 \u78C1\u76D8\u4E0A\u7684 store \u76EE\u5F55\u4FDD\u7559 (\u5206\u79BB \u2260 \u5220\u9664)",
|
|
1963
|
+
"cli.store.bound": "\u5DF2\u7ED1\u5B9A\u5FC5\u9700 store '{id}' (\u5171 {count} \u4E2A\u5FC5\u9700)",
|
|
1964
|
+
"cli.store.switch-write": "\u5DF2\u5C06\u672C\u9879\u76EE\u7684\u6D3B\u52A8\u5199\u5165 store \u8BBE\u4E3A '{alias}'",
|
|
1965
|
+
"cli.sync.deferred": "{count} \u4E2A store \u79BB\u7EBF \u2014\u2014 push \u5DF2\u5EF6\u540E; \u8054\u7F51\u540E\u91CD\u65B0\u8FD0\u884C `fabric sync`",
|
|
1966
|
+
"cli.sync.paused": "sync \u56E0\u51B2\u7A81\u6682\u505C \u2014\u2014 \u89E3\u51B3\u540E\u8FD0\u884C `fabric sync --continue` (\u6216 `--abort`)",
|
|
1967
|
+
"cli.metrics.invalid-since": '--since: \u65E0\u6548\u7684\u65F6\u957F "{raw}" (\u793A\u4F8B: 24h\u30017d\u300130m)',
|
|
1968
|
+
"cli.metrics.window": "Fabric \u6307\u6807 \u2014\u2014 \u65F6\u95F4\u7A97: {window}",
|
|
1969
|
+
"cli.metrics.window-all-time": "\u5168\u90E8\u65F6\u95F4",
|
|
1970
|
+
"cli.metrics.rows-range": " \u884C\u6570: {count} ({start} \u2192 {end})",
|
|
1971
|
+
"cli.metrics.rows": " \u884C\u6570: {count}",
|
|
1972
|
+
"cli.metrics.no-activity": " (\u65F6\u95F4\u7A97\u5185\u65E0\u8BA1\u6570\u6D3B\u52A8 \u2014\u2014 server \u53EF\u80FD\u7A7A\u95F2\u6216\u521A\u542F\u52A8)",
|
|
1973
|
+
// W3-09 (ISS-035): forensic 项目扫描进度 (stderr, 仅 TTY)。
|
|
1974
|
+
"cli.install.scanning": "\u6B63\u5728\u626B\u63CF\u9879\u76EE\u7684\u5BA2\u6237\u7AEF/\u6846\u67B6\u7279\u5F81\u2026",
|
|
1975
|
+
"cli.install.scan-complete": " \u9879\u76EE\u626B\u63CF\u5B8C\u6210",
|
|
1976
|
+
// W4-11 (ISS-021): 统一项目扫描推荐(cli forensic + http scan 共用此 i18n key 集)。
|
|
1977
|
+
"scan.rec.install": "\u8FD0\u884C `fabric install` \u642D\u5EFA .fabric/ \u77E5\u8BC6\u5C42(decisions/pitfalls/guidelines/models/processes)\u3002",
|
|
1978
|
+
"scan.rec.readme": "README \u4FE1\u606F\u4E0D\u8DB3,\u5EFA\u8BAE\u5728\u521D\u59CB\u5316\u8BBF\u8C08\u4E2D\u8865\u9F50\u9879\u76EE\u76EE\u6807\u3001\u8FD0\u884C\u65B9\u5F0F\u548C\u7981\u6539\u533A\u57DF\u3002",
|
|
1979
|
+
"scan.rec.contributing": "\u8865\u5145 CONTRIBUTING.md,\u6216\u5728 .fabric/knowledge/processes/ \u4E0B\u8BB0\u5F55\u8D21\u732E\u6D41\u7A0B\u3002",
|
|
1980
|
+
"scan.rec.cocos.lifecycle": "\u5EFA\u8BAE\u5411\u7528\u6237\u786E\u8BA4 Cocos Creator Component \u751F\u547D\u5468\u671F(onLoad/onEnable/start)\u987A\u5E8F\u3002",
|
|
1981
|
+
"scan.rec.cocos.human-protect": "\u5EFA\u8BAE\u8BE2\u95EE assets/prefabs \u548C assets/scenes \u662F\u5426\u5C5E\u4E8E @HUMAN \u4FDD\u62A4\u533A\u57DF\u3002",
|
|
1982
|
+
"scan.rec.cocos.meta-lock": "\u68C0\u6D4B\u5230 .meta \u6587\u4EF6,\u5EFA\u8BAE\u5728 @HUMAN \u9501\u5B9A .meta \u4E0D\u88AB AI \u6539\u52A8\u3002",
|
|
1983
|
+
"scan.rec.next": "\u5EFA\u8BAE\u786E\u8BA4 app/pages \u8DEF\u7531\u8FB9\u754C\u548C\u670D\u52A1\u7AEF\u7EC4\u4EF6\u7EA6\u675F\u3002",
|
|
1984
|
+
"scan.rec.vite": "\u5EFA\u8BAE\u786E\u8BA4 src/main \u5165\u53E3\u3001\u7EC4\u4EF6\u76EE\u5F55\u548C\u6784\u5EFA\u811A\u672C\u7684\u7EF4\u62A4\u8FB9\u754C\u3002",
|
|
1985
|
+
"scan.rec.unknown": "\u672A\u68C0\u6D4B\u5230\u660E\u786E\u6846\u67B6,\u5EFA\u8BAE\u5148\u8BA9\u7528\u6237\u786E\u8BA4\u6280\u672F\u6808\u548C\u4E3B\u8981\u5165\u53E3\u3002",
|
|
1986
|
+
"scan.rec.generic": "\u5EFA\u8BAE\u56F4\u7ED5 {kind} \u7684\u4E3B\u8981\u5165\u53E3\u548C\u751F\u6210\u76EE\u5F55\u786E\u8BA4 AGENTS.md \u5206\u5C42\u8FB9\u754C\u3002"
|
|
1911
1987
|
};
|
|
1912
1988
|
|
|
1913
1989
|
// src/i18n/create-translator.ts
|
|
@@ -45,7 +45,12 @@ var _ruleDescriptionSchema = z2.object({
|
|
|
45
45
|
// entries without frontmatter still parse.
|
|
46
46
|
tags: z2.array(z2.string()).optional(),
|
|
47
47
|
relevance_scope: z2.enum(["narrow", "broad"]).optional(),
|
|
48
|
-
relevance_paths: z2.array(z2.string()).optional()
|
|
48
|
+
relevance_paths: z2.array(z2.string()).optional(),
|
|
49
|
+
// v2.2 H2-related (W1-T7) — W1-REVIEW codex HIGH-2: the MCP-facing description
|
|
50
|
+
// schema must also carry `related`, else zod strips the graph edges on output
|
|
51
|
+
// validation and they never reach the client (MC1 include_related / fabric-
|
|
52
|
+
// connect would see nothing). Mirrors the agents-meta ruleDescriptionSchema.
|
|
53
|
+
related: z2.array(z2.string()).optional()
|
|
49
54
|
});
|
|
50
55
|
var _descriptionIndexItemSchema = z2.object({
|
|
51
56
|
stable_id: z2.string(),
|
|
@@ -107,6 +112,12 @@ var planContextOutputSchema = z2.object({
|
|
|
107
112
|
})
|
|
108
113
|
),
|
|
109
114
|
candidates: z2.array(_descriptionIndexItemSchema),
|
|
115
|
+
// v2.2 A-INFRA-3 (W1-T3-TOPK) / MC4-payload-budget (W1-T4): number of
|
|
116
|
+
// lower-ranked candidates dropped by the unified truncation chain (top_k cap
|
|
117
|
+
// + payload-budget trim). Present and > 0 ONLY when truncation fired, so the
|
|
118
|
+
// steady-state wire shape is unchanged. Lets the LLM know the returned set is
|
|
119
|
+
// not exhaustive ("N more exist; narrow your intent").
|
|
120
|
+
omitted_candidate_count: z2.number().int().nonnegative().optional(),
|
|
110
121
|
preflight_diagnostics: z2.array(_preflightDiagnosticSchema),
|
|
111
122
|
warnings: z2.array(structuredWarningSchema).optional(),
|
|
112
123
|
// v2.0.0-rc.22 Scope D T-D2: optional auto-heal banner fields. Surfaced
|
|
@@ -233,6 +244,10 @@ var recallInputSchema = z2.object({
|
|
|
233
244
|
),
|
|
234
245
|
ids: z2.array(z2.string()).optional().describe(
|
|
235
246
|
"Optional explicit stable_ids to fetch. When omitted, fab_recall returns ALL entries plan-context surfaces (the common case after rc.37 selectable-filter removal). When provided, filters fetched bodies to this set."
|
|
247
|
+
),
|
|
248
|
+
// v2.2 MC1-recall-pack (W2-T4): graph expansion.
|
|
249
|
+
include_related: z2.boolean().optional().describe(
|
|
250
|
+
"When true, also fetch the one-hop `related` graph neighbours (of the selected entries) that are present in the candidate set. Useful with a scoped `ids` to pull connected knowledge in one call."
|
|
236
251
|
)
|
|
237
252
|
});
|
|
238
253
|
var recallOutputSchema = z2.object({
|
|
@@ -252,6 +267,11 @@ var recallOutputSchema = z2.object({
|
|
|
252
267
|
})
|
|
253
268
|
),
|
|
254
269
|
candidates: z2.array(_descriptionIndexItemSchema),
|
|
270
|
+
// v2.2 W1-REVIEW codex MED-5: fab_recall spreads `...planResult`, so it carries
|
|
271
|
+
// the truncation signal too. Declare it here or zod strips it on output
|
|
272
|
+
// validation — the RECOMMENDED one-step entry would silently lose the "more
|
|
273
|
+
// candidates exist" signal that plan_context surfaces.
|
|
274
|
+
omitted_candidate_count: z2.number().int().nonnegative().optional(),
|
|
255
275
|
preflight_diagnostics: z2.array(_preflightDiagnosticSchema),
|
|
256
276
|
// Same shape as knowledgeSectionsOutputSchema.rules — full body keyed by stable_id.
|
|
257
277
|
rules: z2.array(
|
|
@@ -278,7 +298,16 @@ var recallOutputSchema = z2.object({
|
|
|
278
298
|
// that field for semantics. fab_recall transparently rewrites any old ids
|
|
279
299
|
// passed via `ids` before fetching bodies; the surfaced map still exposes
|
|
280
300
|
// the substitution to callers that want to refresh their cached state.
|
|
281
|
-
redirects: z2.record(z2.string()).optional()
|
|
301
|
+
redirects: z2.record(z2.string()).optional(),
|
|
302
|
+
// v2.2 MC1-recall-pack (W2-T4): packaging increments — a standing behavioral
|
|
303
|
+
// directive (cite-before-edit), dynamic next-step hints, and a truncation
|
|
304
|
+
// summary, so the one-call recall is self-describing.
|
|
305
|
+
directive: z2.string(),
|
|
306
|
+
next_steps: z2.array(z2.string()).optional(),
|
|
307
|
+
truncation: z2.object({
|
|
308
|
+
omitted_candidate_count: z2.number().int().nonnegative(),
|
|
309
|
+
returned_candidate_count: z2.number().int().nonnegative()
|
|
310
|
+
}).optional()
|
|
282
311
|
});
|
|
283
312
|
var recallAnnotations = {
|
|
284
313
|
readOnlyHint: true,
|
|
@@ -79,6 +79,7 @@ var BOOTSTRAP_CANONICAL = `# Fabric Bootstrap
|
|
|
79
79
|
|
|
80
80
|
- **\u89E6\u53D1**: \u505A edit / decide / propose plan \u4E4B\u524D,**\u56DE\u590D\u9996\u884C**\u5FC5\u987B\u5199 \`KB: <id> (<\u22648\u5B57 \u7528\u6CD5>) [applied|dismissed:<reason>]\` \u6216 \`KB: none [<reason>]\`\u3002
|
|
81
81
|
- **\`[applied]\` \u9A8C\u8BC1\u4E49\u52A1**: \u5F15\u7528\u4EFB\u4F55 id \u524D\u5FC5\u987B\u5148\u7528 fab_recall (\u6216\u4E24\u6B65 fab_plan_context \u2192 fab_get_knowledge_sections) \u5B9E\u9645\u6293 KB body, \u9632\u6B62\u7F16\u9020 id\u3002\u9A8C\u8BC1\u4E0D\u901A\u8FC7 = \u4E0D\u80FD cite\u3002
|
|
82
|
+
- **store \u524D\u7F00 (v2.1, \u591A store)**: \u5F53 read-set \u542B\u591A\u4E2A store \u4E14\u540C\u4E00 local id \u5728\u591A store \u95F4 shadow \u65F6,cite \u5FC5\u987B store-qualified: \`KB: <store-alias>:<id> ...\`(\u5982 \`KB: team:KT-DEC-0001 (auth) [applied]\`);alias \u7528\u6237\u81EA\u5B9A/canonical,\u5E95\u5C42 UUID\u3002\u5355 store \u6216\u65E0\u6B67\u4E49\u65F6\u88F8 \`KB: <id>\` \u4ECD valid\u3002personal-only \u6761\u76EE cite \u8FDB\u56E2\u961F\u4EA7\u7269=\u5F3A warning(\u63A5 P2 \u5199\u8DEF\u5F84\u9632\u6CC4\u6F0F R5#3)\u3002
|
|
82
83
|
- **contract \u8BED\u6CD5**: decisions/pitfalls \u7C7B \`[applied]\` cite \u5C3E\u6BB5\u52A0 contract: \`\u2192 <operator> [<operator> ...]\`,operator \u2208 {\`edit:<glob>\` \`!edit:<glob>\` \`require:<symbol>\` \`forbid:<symbol>\` \`skip:<reason>\`}\u3002\u4F8B:\`KB: K-001 (auth) [applied] \u2192 edit:src/auth/**/*.ts !edit:src/legacy/**\`\u3002
|
|
83
84
|
- **skip reason \u8BCD\u5178**: \`sequencing | conditional | semantic | aesthetic | architectural | other:<text>\`\u3002
|
|
84
85
|
- **type \u8DEF\u7531**: models \u7C7B\u5F15\u7528\u4E3A reference cite,\u4E0D\u9700\u8981 contract;guidelines/processes \u7C7B\u6682\u4E0D\u5F3A\u5236,\u63A8\u540E LLM-judge\u3002
|
|
@@ -87,6 +88,7 @@ var BOOTSTRAP_CANONICAL = `# Fabric Bootstrap
|
|
|
87
88
|
- **\`KB: none\` sentinel**: \u679A\u4E3E\u4E24\u79CD\u5408\u89C4\u7406\u7531\u2014\u2014\`[no-relevant]\` \u5DF2\u8C03 \`fab_recall\` / \`fab_plan_context\`(\u6216 hook \u8F93\u51FA\u53EF\u89C1)\u4F46\u65E0\u53EF\u7528\u6761\u76EE;\`[not-applicable]\` \u5F53\u524D\u52A8\u4F5C\u4E0D\u5728 cite \u8303\u56F4(\u7EAF\u63A2\u7D22 / Bash \u53EA\u8BFB / \u7528\u6237\u95EE\u7B54)\u3002\u88F8 \`KB: none\`(\u65E0\u540E\u7F00)\u4ECD\u7136 valid,\u5F52\u7C7B\u4E3A \`[unspecified]\`(legacy \u517C\u5BB9,\u9F13\u52B1\u540E\u7EED\u8865\u6CE8)\u3002
|
|
88
89
|
- **\u7A3D\u6838**: \`fabric doctor --cite-coverage [--since=7d] [--client=cc|codex|all]\` \u8F93\u51FA cite \u8986\u76D6\u7387,\u542B \`KB: none\` sentinel \u62C6\u5206\u3002\u672C\u89C4\u5219\u4E0D\u963B\u65AD\u4F60\u5DE5\u4F5C,\u53EA\u8BB0\u5F55\u3002
|
|
89
90
|
- **Backward compat**: \u89E3\u6790\u5668\u540C\u65F6\u63A5\u53D7\u8001 4-state tags (\`planned\` / \`recalled\` / \`chained-from <id>\`) \u2014 \u90FD\u6620\u5C04\u5230 \`[applied]\` \u8BED\u4E49,gradually \u8FC1\u5230\u65B0\u7B80\u5316\u5F62\u6001\u5373\u53EF,\u65E7 session \u7559\u4E0B\u7684 cite \u4ECD\u7136\u8BA1\u5165 cite-coverage\u3002
|
|
91
|
+
- **\u5B8C\u6574\u53C2\u8003\u4E0B\u6C89** (v2.2 SK5): contract operator / skip\xB7dismissed \u8BCD\u5178 / \u7C7B\u578B\u8DEF\u7531 / \u7A3D\u6838\u53E3\u5F84 / **\u88C1\u51B3\u9636\u68AF** (AI\u81EA\u51B3 \u2192 \u591A-LLM \u542B\u96F6\u4E0A\u4E0B\u6587\u51B7\u8BC4 \u2192 \u975E\u963B\u585E\u961F\u5217) \u7684\u6743\u5A01\u8BE6\u53C2\u5728 \`fabric-review\` skill \u7684 \`ref/cite-contract.md\` \u2014\u2014 bootstrap \u53EA\u7559\u53EF\u6267\u884C core,\u6CBB\u7406\u7EC6\u8282\u5F52 ref \u4E0D\u518D\u6491\u5927 bootstrap\u3002
|
|
90
92
|
`;
|
|
91
93
|
|
|
92
94
|
export {
|
package/dist/i18n/index.js
CHANGED
|
@@ -20,6 +20,7 @@ interface RuleDescription {
|
|
|
20
20
|
tags?: string[];
|
|
21
21
|
relevance_scope?: "narrow" | "broad";
|
|
22
22
|
relevance_paths?: string[];
|
|
23
|
+
related?: string[];
|
|
23
24
|
}
|
|
24
25
|
interface RuleDescriptionIndexItem {
|
|
25
26
|
stable_id: string;
|
|
@@ -116,6 +117,7 @@ declare const mcpPayloadLimitsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
116
117
|
hardBytes?: number | undefined;
|
|
117
118
|
}>>;
|
|
118
119
|
declare const selectionTokenTtlMsSchema: z.ZodNumber;
|
|
120
|
+
declare const planContextTopKSchema: z.ZodNumber;
|
|
119
121
|
declare const fabricLanguageSchema: z.ZodEnum<["match-existing", "zh-CN", "en", "zh-CN-hybrid"]>;
|
|
120
122
|
declare const defaultLayerFilterSchema: z.ZodEnum<["team", "personal", "both"]>;
|
|
121
123
|
declare const fabricConfigSchema: z.ZodObject<{
|
|
@@ -135,6 +137,18 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
135
137
|
cursor?: string | undefined;
|
|
136
138
|
codexCLI?: string | undefined;
|
|
137
139
|
}>>;
|
|
140
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
141
|
+
required_stores: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
suggested_remote: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"$personal">]>>;
|
|
144
|
+
}, "strict", z.ZodTypeAny, {
|
|
145
|
+
id: string;
|
|
146
|
+
suggested_remote?: string | undefined;
|
|
147
|
+
}, {
|
|
148
|
+
id: string;
|
|
149
|
+
suggested_remote?: string | undefined;
|
|
150
|
+
}>, "many">>;
|
|
151
|
+
active_write_store: z.ZodOptional<z.ZodString>;
|
|
138
152
|
scanIgnores: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
139
153
|
audit_mode: z.ZodOptional<z.ZodEnum<["strict", "warn", "off"]>>;
|
|
140
154
|
mcpPayloadLimits: z.ZodOptional<z.ZodObject<{
|
|
@@ -173,7 +187,10 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
173
187
|
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
174
188
|
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
175
189
|
hint_broad_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
190
|
+
hint_broad_budget_chars: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
176
191
|
hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
|
|
192
|
+
cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
193
|
+
self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
177
194
|
hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
178
195
|
hint_narrow_dedup_window_turns: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
179
196
|
hint_broad_cooldown_hours: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -184,6 +201,10 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
184
201
|
hint_summary_max_len: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
185
202
|
hint_reminder_to_context: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
186
203
|
selection_token_ttl_ms: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
plan_context_top_k: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
retrieval_budget_profile: z.ZodOptional<z.ZodEnum<["conservative", "balanced", "generous"]>>;
|
|
206
|
+
embed_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
207
|
+
embed_weight: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
187
208
|
}, "strip", z.ZodTypeAny, {
|
|
188
209
|
fabric_language: "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
|
|
189
210
|
default_layer_filter: "personal" | "team" | "both";
|
|
@@ -210,18 +231,29 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
210
231
|
cite_evict_interval: number;
|
|
211
232
|
onboard_slots_opted_out: string[];
|
|
212
233
|
hint_broad_top_k: number;
|
|
234
|
+
hint_broad_budget_chars: number;
|
|
235
|
+
cite_policy_enabled: boolean;
|
|
236
|
+
self_archive_policy_enabled: boolean;
|
|
213
237
|
hint_narrow_top_k: number;
|
|
214
238
|
hint_narrow_dedup_window_turns: number;
|
|
215
239
|
hint_broad_cooldown_hours: number;
|
|
216
240
|
hint_narrow_cooldown_hours: number;
|
|
217
241
|
hint_summary_max_len: number;
|
|
218
242
|
hint_reminder_to_context: boolean;
|
|
243
|
+
embed_enabled: boolean;
|
|
244
|
+
embed_weight: number;
|
|
219
245
|
clientPaths?: {
|
|
220
246
|
claudeCodeCLI?: string | undefined;
|
|
221
247
|
claudeCodeDesktop?: string | undefined;
|
|
222
248
|
cursor?: string | undefined;
|
|
223
249
|
codexCLI?: string | undefined;
|
|
224
250
|
} | undefined;
|
|
251
|
+
project_id?: string | undefined;
|
|
252
|
+
required_stores?: {
|
|
253
|
+
id: string;
|
|
254
|
+
suggested_remote?: string | undefined;
|
|
255
|
+
}[] | undefined;
|
|
256
|
+
active_write_store?: string | undefined;
|
|
225
257
|
scanIgnores?: string[] | undefined;
|
|
226
258
|
audit_mode?: "strict" | "warn" | "off" | undefined;
|
|
227
259
|
mcpPayloadLimits?: {
|
|
@@ -234,6 +266,8 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
234
266
|
orphan_demote_endorsed_days?: number | undefined;
|
|
235
267
|
orphan_demote_draft_days?: number | undefined;
|
|
236
268
|
selection_token_ttl_ms?: number | undefined;
|
|
269
|
+
plan_context_top_k?: number | undefined;
|
|
270
|
+
retrieval_budget_profile?: "conservative" | "balanced" | "generous" | undefined;
|
|
237
271
|
}, {
|
|
238
272
|
clientPaths?: {
|
|
239
273
|
claudeCodeCLI?: string | undefined;
|
|
@@ -241,6 +275,12 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
241
275
|
cursor?: string | undefined;
|
|
242
276
|
codexCLI?: string | undefined;
|
|
243
277
|
} | undefined;
|
|
278
|
+
project_id?: string | undefined;
|
|
279
|
+
required_stores?: {
|
|
280
|
+
id: string;
|
|
281
|
+
suggested_remote?: string | undefined;
|
|
282
|
+
}[] | undefined;
|
|
283
|
+
active_write_store?: string | undefined;
|
|
244
284
|
scanIgnores?: string[] | undefined;
|
|
245
285
|
audit_mode?: "strict" | "warn" | "off" | undefined;
|
|
246
286
|
mcpPayloadLimits?: {
|
|
@@ -273,7 +313,10 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
273
313
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
274
314
|
onboard_slots_opted_out?: string[] | undefined;
|
|
275
315
|
hint_broad_top_k?: number | undefined;
|
|
316
|
+
hint_broad_budget_chars?: number | undefined;
|
|
276
317
|
hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
|
|
318
|
+
cite_policy_enabled?: boolean | undefined;
|
|
319
|
+
self_archive_policy_enabled?: boolean | undefined;
|
|
277
320
|
hint_narrow_top_k?: number | undefined;
|
|
278
321
|
hint_narrow_dedup_window_turns?: number | undefined;
|
|
279
322
|
hint_broad_cooldown_hours?: number | undefined;
|
|
@@ -284,6 +327,10 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
284
327
|
hint_summary_max_len?: number | undefined;
|
|
285
328
|
hint_reminder_to_context?: boolean | undefined;
|
|
286
329
|
selection_token_ttl_ms?: number | undefined;
|
|
330
|
+
plan_context_top_k?: number | undefined;
|
|
331
|
+
retrieval_budget_profile?: "conservative" | "balanced" | "generous" | undefined;
|
|
332
|
+
embed_enabled?: boolean | undefined;
|
|
333
|
+
embed_weight?: number | undefined;
|
|
287
334
|
}>;
|
|
288
335
|
|
|
289
336
|
interface ClientPaths {
|
|
@@ -301,4 +348,4 @@ type FabricLanguage = "match-existing" | "zh-CN" | "en" | "zh-CN-hybrid";
|
|
|
301
348
|
type DefaultLayerFilter = "team" | "personal" | "both";
|
|
302
349
|
type FabricConfig = z.input<typeof fabricConfigSchema>;
|
|
303
350
|
|
|
304
|
-
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,
|
|
351
|
+
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 };
|