@fenglimg/fabric-shared 2.0.0-rc.37 → 2.0.0-rc.38
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-ZSRVKMYT.js → chunk-7CX32MYL.js} +10 -2
- package/dist/{chunk-VWJQVRSE.js → chunk-LTDB2UDN.js} +3 -3
- package/dist/{chunk-DRQTQEEV.js → chunk-WVPDH4BF.js} +53 -70
- package/dist/i18n/index.js +1 -1
- package/dist/{index-BkXfeNyz.d.ts → index-UBqD9F0b.d.ts} +0 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -12
- package/dist/schemas/api-contracts.d.ts +274 -928
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/i18n/locales/en.ts
|
|
2
2
|
var enMessages = {
|
|
3
|
-
"cli.main.description": "Fabric CLI
|
|
3
|
+
"cli.main.description": "Fabric CLI \u2014 feeds your project's decisions, pitfalls & conventions to your AI assistant automatically, so it stops re-learning them every session.\n\nThree-step mental model:\n Install (\u88C5) - fabric install one-shot project setup\n Configure (\u914D) - fabric config interactive configuration panel\n Run (\u8DD1) - fabric serve launch the local MCP HTTP service\n fabric doctor run target-state diagnostics\n\nExamples:\n fabric install install Fabric in the current project\n fabric config open the interactive configuration panel\n fabric serve --port 7373 start the MCP HTTP service\n fabric doctor --fix repair derived Fabric state\n fabric uninstall --dry-run preview uninstall without removing files",
|
|
4
4
|
"cli.shared.created": "Created",
|
|
5
5
|
"cli.shared.skipped": "Skipped",
|
|
6
6
|
"cli.shared.next": "Next",
|
|
@@ -113,6 +113,9 @@ var enMessages = {
|
|
|
113
113
|
"doctor.cite.metric.recalledUnverified": "Recalled but not verified",
|
|
114
114
|
"doctor.cite.metric.expectedButMissed": "Expected cite missing",
|
|
115
115
|
"doctor.cite.metric.totalTurns": "Total turns",
|
|
116
|
+
"doctor.cite.metric.complianceRate": "cite compliance rate (incl. KB:none[reason])",
|
|
117
|
+
"doctor.cite.metric.complianceNA": "N/A (no cite-expected turns)",
|
|
118
|
+
"doctor.cite.metric.uncorrelatableEdits": "Uncorrelatable edits (no session_id \u2014 stale hook? run `fabric install`)",
|
|
116
119
|
"doctor.cite.section.perClient": "Per-client",
|
|
117
120
|
"doctor.cite.section.dismissedReasons": "Dismissed reasons",
|
|
118
121
|
"doctor.cite.dismissed.scope-mismatch": "Scope mismatch",
|
|
@@ -624,6 +627,7 @@ var enMessages = {
|
|
|
624
627
|
// spawned by the client; already-running Claude Code / Cursor / Codex
|
|
625
628
|
// sessions won't pick up the new mcp config until they restart.
|
|
626
629
|
"cli.install.restart-banner": "Restart hint: any already-running Claude Code / Cursor / Codex CLI session must restart to pick up the new MCP server config; new sessions will autoload the Fabric tools.",
|
|
630
|
+
"cli.install.next-steps": 'Next steps \u2014 get your first value:\n 1. Restart your AI client (Claude Code / Codex). It now auto-surfaces this project\'s knowledge to the assistant.\n 2. Seed knowledge: just work normally \u2014 when you make a decision or hit a pitfall, the fabric-archive skill proposes an entry. Or run the fabric-import skill to backfill from git history.\n 3. Verify it works: ask your AI "what does Fabric know about this repo?", or run `fabric doctor` to check health.',
|
|
627
631
|
"cli.install.capabilities.none": "No supported client was detected for bootstrap or MCP follow-up.",
|
|
628
632
|
"cli.install.capabilities.header.client": "Client",
|
|
629
633
|
"cli.install.capabilities.header.bootstrap": "Bootstrap",
|
|
@@ -956,7 +960,7 @@ var enMessages = {
|
|
|
956
960
|
|
|
957
961
|
// src/i18n/locales/zh-CN.ts
|
|
958
962
|
var zhCNMessages = {
|
|
959
|
-
"cli.main.description": "Fabric CLI
|
|
963
|
+
"cli.main.description": "Fabric CLI \u2014 \u81EA\u52A8\u628A\u672C\u9879\u76EE\u7684\u51B3\u7B56 / \u8E29\u5751 / \u89C4\u8303\u5582\u7ED9\u4F60\u7684 AI \u52A9\u624B\uFF0C\u8BA9\u5B83\u4E0D\u5FC5\u6BCF\u6B21\u4F1A\u8BDD\u91CD\u65B0\u5B66\u3002\n\n\u4E09\u6B65\u5FC3\u667A\u6A21\u578B\uFF1A\n \u88C5 (install) - fabric install \u4E00\u952E\u5B8C\u6210\u9879\u76EE\u521D\u59CB\u5316\n \u914D (config) - fabric config \u6253\u5F00\u4EA4\u4E92\u5F0F\u914D\u7F6E\u9762\u677F\n \u8DD1 (run) - fabric serve \u542F\u52A8\u672C\u5730 MCP HTTP \u670D\u52A1\n fabric doctor \u8FD0\u884C\u76EE\u6807\u6001\u8BCA\u65AD\n\n\u793A\u4F8B\uFF1A\n fabric install \u5728\u5F53\u524D\u9879\u76EE\u4E2D\u5B89\u88C5 Fabric\n fabric config \u6253\u5F00\u4EA4\u4E92\u5F0F\u914D\u7F6E\u9762\u677F\n fabric serve --port 7373 \u542F\u52A8 MCP HTTP \u670D\u52A1\n fabric doctor --fix \u4FEE\u590D Fabric \u6D3E\u751F\u72B6\u6001\n fabric uninstall --dry-run \u9884\u89C8\u5378\u8F7D\uFF0C\u4E0D\u5220\u9664\u6587\u4EF6",
|
|
960
964
|
"cli.shared.created": "\u5DF2\u521B\u5EFA",
|
|
961
965
|
"cli.shared.skipped": "\u5DF2\u8DF3\u8FC7",
|
|
962
966
|
"cli.shared.next": "\u4E0B\u4E00\u6B65",
|
|
@@ -1067,6 +1071,9 @@ var zhCNMessages = {
|
|
|
1067
1071
|
"doctor.cite.metric.recalledUnverified": "recalled \u4F46\u672A\u9A8C\u8BC1",
|
|
1068
1072
|
"doctor.cite.metric.expectedButMissed": "\u5E94\u67E5\u6CA1\u67E5",
|
|
1069
1073
|
"doctor.cite.metric.totalTurns": "\u603B\u56DE\u5408\u6570",
|
|
1074
|
+
"doctor.cite.metric.complianceRate": "cite \u5408\u89C4\u7387 (\u542B KB:none[reason])",
|
|
1075
|
+
"doctor.cite.metric.complianceNA": "N/A (\u65E0\u5E94 cite \u56DE\u5408)",
|
|
1076
|
+
"doctor.cite.metric.uncorrelatableEdits": "\u65E0\u6CD5\u5173\u8054\u7684 edit (\u7F3A session_id \u2014 hook \u8FC7\u671F? \u8BF7\u8DD1 `fabric install`)",
|
|
1070
1077
|
"doctor.cite.section.perClient": "\u6309\u5BA2\u6237\u7AEF\u62C6\u5206",
|
|
1071
1078
|
"doctor.cite.section.dismissedReasons": "\u9A73\u56DE\u539F\u56E0\u5206\u5E03",
|
|
1072
1079
|
"doctor.cite.dismissed.scope-mismatch": "\u8303\u56F4\u4E0D\u7B26",
|
|
@@ -1572,6 +1579,7 @@ var zhCNMessages = {
|
|
|
1572
1579
|
// 时 spawn, 已运行的 Claude Code / Cursor / Codex session 不会自动加载
|
|
1573
1580
|
// 新 mcp config — 必须重启才能拿到 Fabric tools。
|
|
1574
1581
|
"cli.install.restart-banner": "\u91CD\u542F\u63D0\u793A: \u5DF2\u8FD0\u884C\u7684 Claude Code / Cursor / Codex CLI session \u9700\u91CD\u542F\u624D\u80FD\u52A0\u8F7D\u65B0 MCP server \u914D\u7F6E;\u65B0\u4F1A\u8BDD\u4F1A\u81EA\u52A8\u4F7F\u7528 Fabric tools\u3002",
|
|
1582
|
+
"cli.install.next-steps": "\u4E0B\u4E00\u6B65 \u2014\u2014 \u62FF\u5230\u7B2C\u4E00\u4EFD\u4EF7\u503C:\n 1. \u91CD\u542F\u4F60\u7684 AI \u5BA2\u6237\u7AEF (Claude Code / Codex)\u3002\u5B83\u73B0\u5728\u4F1A\u81EA\u52A8\u628A\u672C\u9879\u76EE\u7684\u77E5\u8BC6 surface \u7ED9\u52A9\u624B\u3002\n 2. \u6C89\u6DC0\u77E5\u8BC6: \u6B63\u5E38\u5E72\u6D3B\u5373\u53EF \u2014\u2014 \u5F53\u4F60\u505A\u51B3\u7B56\u6216\u8E29\u5751\u65F6, fabric-archive skill \u4F1A\u63D0\u8BAE\u5165\u5E93; \u6216\u8DD1 fabric-import skill \u4ECE git \u5386\u53F2\u56DE\u704C\u3002\n 3. \u9A8C\u8BC1\u751F\u6548: \u95EE\u4F60\u7684 AI\u300CFabric \u5BF9\u8FD9\u4E2A repo \u77E5\u9053\u4E9B\u4EC0\u4E48?\u300D, \u6216\u8DD1 `fabric doctor` \u67E5\u5065\u5EB7\u3002",
|
|
1575
1583
|
"cli.install.capabilities.none": "\u6CA1\u6709\u68C0\u6D4B\u5230\u53EF\u7528\u4E8E bootstrap \u6216 MCP \u540E\u7EED\u63A5\u529B\u7684\u53D7\u652F\u6301\u5BA2\u6237\u7AEF\u3002",
|
|
1576
1584
|
"cli.install.capabilities.header.client": "\u5BA2\u6237\u7AEF",
|
|
1577
1585
|
"cli.install.capabilities.header.bootstrap": "Bootstrap",
|
|
@@ -35,13 +35,13 @@ var BOOTSTRAP_CANONICAL = `# Fabric Bootstrap
|
|
|
35
35
|
\u5B8C\u6574 maintainer \u7248\u89C1 \`docs/USER-QUICKSTART.md\`\u3002
|
|
36
36
|
|
|
37
37
|
## \u884C\u4E3A\u89C4\u5219
|
|
38
|
-
- **\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\u524D**:\
|
|
38
|
+
- **\u4FEE\u6539\u4EFB\u4F55\u6587\u4EF6\u524D**:\u4F18\u5148\u5355\u6B65 \`fab_recall(paths=[<\u88AB\u6539\u6587\u4EF6>])\` \u2014\u2014 \u4E00\u6B21\u8C03\u7528\u76F4\u63A5\u62FF\u56DE\u6240\u6709\u76F8\u5173 KB \u6B63\u6587(rc.37+ \u9ED8\u8BA4\u8DEF\u5F84,\u7701\u6389\u624B\u52A8\u6311 id \u7684\u73AF\u8282)\u3002**\u4EC5\u5F53\u5355\u6B65\u62C9\u56DE\u7684\u6B63\u6587\u8FC7\u591A\u3001\u5BFC\u81F4\u4E0A\u4E0B\u6587\u8FC7\u8F7D\u9700\u7CBE\u786E\u88C1\u526A\u566A\u97F3\u65F6**\u624D\u8D70\u4E24\u6B65:\u5148 \`fab_plan_context(paths=[...])\` \u62FF \`selection_token\` + \u9876\u5C42 \`candidates[]\`(\u4ECE \`candidates[].stable_id\` \u6311),\u518D \`fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<id>...] })\` \u53D6\u6B63\u6587\u3002
|
|
39
39
|
- **\`.fabric/agents.meta.json\` \u4E25\u7981\u624B\u52A8\u7F16\u8F91**;engine \u4F1A\u81EA\u52A8\u540C\u6B65\u6D3E\u751F\u72B6\u6001,\u663E\u5F0F reconcile \u8DD1 \`fabric doctor --fix\`\u3002
|
|
40
40
|
|
|
41
41
|
## \u77E5\u8BC6\u5E93(KB)
|
|
42
42
|
- **Discovery**:SessionStart hook \u5217 broad-scoped \u6761\u76EE(\u542B personal layer \`KP-*\` \u6761\u76EE,\u5F15\u7528\u65B9\u5F0F\u76F8\u540C);edit \u6587\u4EF6\u65F6 PreToolUse hook \u53EF\u80FD\u89E6\u53D1 narrow hint\u3002
|
|
43
|
-
- **Usage**:\
|
|
44
|
-
- **session_id**: \u8C03\u7528 \`fab_plan_context\` \u65F6, \u52A1\u5FC5\u628A\u5F53\u524D client session id \u4F5C\u4E3A \`session_id\` \u53C2\u6570\u4F20\u5165(Claude Code \u7684 session id \u5728 stdin payload \u4E2D, Codex \u7684\u5BF9\u5E94 identifier \u540C\u7406)\u3002\u8FD9\u80FD\u8BA9 \`fabric doctor --archive-history\` \u4E0E archive-hint hook \u51C6\u786E\u8BC6\u522B\u8DE8\u4F1A\u8BDD debt \u72B6\u6001\u3002
|
|
43
|
+
- **Usage**:\u5E38\u6001\u8D70\u5355\u6B65 \`fab_recall(paths=[...])\` \u4E00\u6B21\u62FF\u56DE\u76F8\u5173 KB \u6B63\u6587\u3002\u4EC5\u5F53\u5355\u6B65\u6B63\u6587\u8FC7\u591A\u81F4\u4E0A\u4E0B\u6587\u8FC7\u8F7D\u3001\u9700\u7CBE\u786E\u88C1\u526A\u566A\u97F3\u65F6\u624D\u4E24\u6B65:\`fab_plan_context(paths=[...])\` \u8FD4\u56DE \`selection_token\` + \u9876\u5C42 \`candidates[]\`,\u518D \`fab_get_knowledge_sections({ selection_token, ai_selected_stable_ids: [<\u4ECE candidates[].stable_id \u6311>...] })\` \u62C9\u5168\u6587;\`selection_token\` \u5FC5\u987B\u6765\u81EA\u6700\u8FD1\u4E00\u6B21 \`fab_plan_context\`,\u4E0D\u53EF\u51ED\u7A7A\u7F16\u9020\u3002
|
|
44
|
+
- **session_id**: \u8C03\u7528 \`fab_recall\` / \`fab_plan_context\` \u65F6, \u52A1\u5FC5\u628A\u5F53\u524D client session id \u4F5C\u4E3A \`session_id\` \u53C2\u6570\u4F20\u5165(Claude Code \u7684 session id \u5728 stdin payload \u4E2D, Codex \u7684\u5BF9\u5E94 identifier \u540C\u7406)\u3002\u8FD9\u80FD\u8BA9 \`fabric doctor --archive-history\` \u4E0E archive-hint hook \u51C6\u786E\u8BC6\u522B\u8DE8\u4F1A\u8BDD debt \u72B6\u6001\u3002
|
|
45
45
|
- **Write flows**:\`fabric-archive\` / \`fabric-review\` / \`fabric-import\` \u4E09\u4E2A Skills\u3002
|
|
46
46
|
- **Language**:\u6E32\u67D3\u6309 \`.fabric/fabric-config.json\` \u7684 \`fabric_language\` \u5B57\u6BB5\u3002
|
|
47
47
|
- **Archive cadence nudge** (rc.36): \u6BCF\u5B8C\u6210 5+ \u6B21 Edit / \u663E\u8457 decision \u540E,\u5728\u5408\u9002\u56DE\u5408\u4E3B\u52A8 propose \u8C03 \`fabric-archive\` skill \u2014 archive \u6CA1\u5EFA\u7ACB\u9891\u7387\u4F1A\u8BA9 KB \u6162\u901F\u6B7B\u6389\u3002
|
|
@@ -37,42 +37,22 @@ var _ruleDescriptionSchema = z2.object({
|
|
|
37
37
|
maturity: _maturityEnum.optional(),
|
|
38
38
|
knowledge_layer: _layerEnum.optional(),
|
|
39
39
|
layer_reason: z2.string().optional(),
|
|
40
|
-
created_at: z2.string().optional()
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
selectable: z2.boolean(),
|
|
47
|
-
description: _ruleDescriptionSchema,
|
|
48
|
-
// v2.0: top-level knowledge surface for client-side filtering. Mirrors
|
|
49
|
-
// description.* — exposed here so MCP clients can filter without reaching
|
|
50
|
-
// into the nested payload.
|
|
51
|
-
type: _knowledgeTypeEnum.optional(),
|
|
52
|
-
maturity: _maturityEnum.optional(),
|
|
53
|
-
layer: _layerEnum.optional(),
|
|
54
|
-
layer_reason: z2.string().optional(),
|
|
55
|
-
// v2/rc.2: tag list shipped via frontmatter (commit a85121a). Exposed at
|
|
56
|
-
// the API surface so MCP clients can filter without re-parsing the
|
|
57
|
-
// description payload. Absent on legacy entries; consumers should treat
|
|
58
|
-
// missing as [].
|
|
40
|
+
created_at: z2.string().optional(),
|
|
41
|
+
// v2.0.0-rc.38 UX-3 (D-MCP fold ③): these three were previously carried ONLY
|
|
42
|
+
// as top-level mirrors on the index item. With the mirrors removed,
|
|
43
|
+
// `description` becomes their canonical (and only) home, so the schema must
|
|
44
|
+
// validate them here. Optional + default-safe (tags/[]/broad) so legacy
|
|
45
|
+
// entries without frontmatter still parse.
|
|
59
46
|
tags: z2.array(z2.string()).optional(),
|
|
60
|
-
// v2.0-rc.5 (C1): relevance scope/paths drive plan-context-hint narrowing.
|
|
61
|
-
// Exposed at the API surface so MCP clients (and the `fabric
|
|
62
|
-
// plan-context-hint` CLI from D1) can filter without re-parsing the
|
|
63
|
-
// description payload. Defaults applied at the parse layer
|
|
64
|
-
// (knowledge-meta-builder + agentsMetaNodeBaseSchema):
|
|
65
|
-
// relevance_scope → 'broad' (always-surface, safe default)
|
|
66
|
-
// relevance_paths → [] (no path anchors)
|
|
67
|
-
// Consumers should treat missing fields as broad/[]. Optional on the wire
|
|
68
|
-
// so older servers without rc.5 schemas remain wire-compatible.
|
|
69
47
|
relevance_scope: z2.enum(["narrow", "broad"]).optional(),
|
|
70
48
|
relevance_paths: z2.array(z2.string()).optional()
|
|
71
49
|
});
|
|
50
|
+
var _descriptionIndexItemSchema = z2.object({
|
|
51
|
+
stable_id: z2.string(),
|
|
52
|
+
description: _ruleDescriptionSchema
|
|
53
|
+
});
|
|
72
54
|
var _requirementProfileSchema = z2.object({
|
|
73
55
|
target_path: z2.string(),
|
|
74
|
-
path_segments: z2.array(z2.string()),
|
|
75
|
-
extension: z2.string(),
|
|
76
56
|
known_tech: z2.array(z2.string()),
|
|
77
57
|
user_intent: z2.string(),
|
|
78
58
|
detected_entities: z2.array(z2.string())
|
|
@@ -104,6 +84,18 @@ var planContextInputSchema = z2.object({
|
|
|
104
84
|
"Path context for narrow-scope relevance filtering. Defaults to `paths`; empty = no filter."
|
|
105
85
|
)
|
|
106
86
|
});
|
|
87
|
+
var _preflightDiagnosticSchema = z2.object({
|
|
88
|
+
// v2.0.0-rc.38 UX-2: `empty_shell_suppressed` surfaces draft entries whose
|
|
89
|
+
// description carries no selection signal (summary === stable_id + empty
|
|
90
|
+
// intent_clues/tech_stack/impact). They are filtered out of `candidates` to
|
|
91
|
+
// cut noise; this diagnostic names them so `fabric doctor` /
|
|
92
|
+
// --enrich-descriptions can prompt enrichment.
|
|
93
|
+
code: z2.enum(["missing_description", "empty_shell_suppressed"]),
|
|
94
|
+
severity: z2.literal("warn"),
|
|
95
|
+
message: z2.string(),
|
|
96
|
+
stable_ids: z2.array(z2.string()).optional(),
|
|
97
|
+
path: z2.string().optional()
|
|
98
|
+
});
|
|
107
99
|
var planContextOutputSchema = z2.object({
|
|
108
100
|
revision_hash: z2.string(),
|
|
109
101
|
stale: z2.boolean(),
|
|
@@ -111,22 +103,11 @@ var planContextOutputSchema = z2.object({
|
|
|
111
103
|
entries: z2.array(
|
|
112
104
|
z2.object({
|
|
113
105
|
path: z2.string(),
|
|
114
|
-
requirement_profile: _requirementProfileSchema
|
|
115
|
-
description_index: z2.array(_descriptionIndexItemSchema)
|
|
106
|
+
requirement_profile: _requirementProfileSchema
|
|
116
107
|
})
|
|
117
108
|
),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
preflight_diagnostics: z2.array(
|
|
121
|
-
z2.object({
|
|
122
|
-
code: z2.literal("missing_description"),
|
|
123
|
-
severity: z2.literal("warn"),
|
|
124
|
-
message: z2.string(),
|
|
125
|
-
stable_ids: z2.array(z2.string()).optional(),
|
|
126
|
-
path: z2.string().optional()
|
|
127
|
-
})
|
|
128
|
-
)
|
|
129
|
-
}),
|
|
109
|
+
candidates: z2.array(_descriptionIndexItemSchema),
|
|
110
|
+
preflight_diagnostics: z2.array(_preflightDiagnosticSchema),
|
|
130
111
|
warnings: z2.array(structuredWarningSchema).optional(),
|
|
131
112
|
// v2.0.0-rc.22 Scope D T-D2: optional auto-heal banner fields. Surfaced
|
|
132
113
|
// ONLY when the loadActiveMetaOrStale call detected drift and rebuilt the
|
|
@@ -167,7 +148,7 @@ var planContextHintOutputSchema = z2.object({
|
|
|
167
148
|
var knowledgeSectionsInputSchema = z2.object({
|
|
168
149
|
selection_token: z2.string().min(1).describe("Selection token returned by fab_plan_context"),
|
|
169
150
|
ai_selected_stable_ids: z2.array(z2.string()).describe(
|
|
170
|
-
"Stable ids picked from fab_plan_context
|
|
151
|
+
"Stable ids picked from fab_plan_context candidates[].stable_id; choose 1..N to fetch bodies for"
|
|
171
152
|
),
|
|
172
153
|
ai_selection_reasons: z2.record(z2.string().min(1)).describe("Reason for each AI-selected L1 stable_id"),
|
|
173
154
|
correlation_id: z2.string().optional().describe("Optional caller-provided correlation id for Event Ledger records"),
|
|
@@ -179,16 +160,10 @@ var knowledgeSectionsInputSchema = z2.object({
|
|
|
179
160
|
});
|
|
180
161
|
var knowledgeSectionsOutputSchema = z2.object({
|
|
181
162
|
revision_hash: z2.string(),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
* `rules[].level` directly. Kept as optional for one rc to avoid breaking
|
|
187
|
-
* pre-rc.23 clients that destructure this field.
|
|
188
|
-
*/
|
|
189
|
-
precedence: z2.tuple([z2.literal("L2"), z2.literal("L1"), z2.literal("L0")]).optional().describe(
|
|
190
|
-
"DEPRECATED (removed in rc.24): hardcoded L2/L1/L0 precedence tuple from the retired rc.5 selection ceremony. Use rules[].level instead."
|
|
191
|
-
),
|
|
163
|
+
// v2.0.0-rc.38 UX-13 (D-MCP step-2 audit): the deprecated `precedence`
|
|
164
|
+
// L2/L1/L0 tuple (flagged "removed in rc.24" but still emitted) is gone — it
|
|
165
|
+
// was a constant 3-string field on every response read by no production
|
|
166
|
+
// consumer. Use rules[].level for ordering.
|
|
192
167
|
selected_stable_ids: z2.array(z2.string()),
|
|
193
168
|
rules: z2.array(
|
|
194
169
|
z2.object({
|
|
@@ -267,25 +242,17 @@ var recallOutputSchema = z2.object({
|
|
|
267
242
|
// with fab_get_knowledge_sections (e.g. fetch additional ids later) — every
|
|
268
243
|
// recall response is still token-backed internally.
|
|
269
244
|
selection_token: z2.string(),
|
|
245
|
+
// v2.0.0-rc.38 UX-1/UX-4: mirrors planContextOutputSchema fold ① — per-path
|
|
246
|
+
// description_index collapsed into a single top-level `candidates`, and
|
|
247
|
+
// `preflight_diagnostics` lifted out of the removed `shared` wrapper.
|
|
270
248
|
entries: z2.array(
|
|
271
249
|
z2.object({
|
|
272
250
|
path: z2.string(),
|
|
273
|
-
requirement_profile: _requirementProfileSchema
|
|
274
|
-
description_index: z2.array(_descriptionIndexItemSchema)
|
|
251
|
+
requirement_profile: _requirementProfileSchema
|
|
275
252
|
})
|
|
276
253
|
),
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
preflight_diagnostics: z2.array(
|
|
280
|
-
z2.object({
|
|
281
|
-
code: z2.literal("missing_description"),
|
|
282
|
-
severity: z2.literal("warn"),
|
|
283
|
-
message: z2.string(),
|
|
284
|
-
stable_ids: z2.array(z2.string()).optional(),
|
|
285
|
-
path: z2.string().optional()
|
|
286
|
-
})
|
|
287
|
-
)
|
|
288
|
-
}),
|
|
254
|
+
candidates: z2.array(_descriptionIndexItemSchema),
|
|
255
|
+
preflight_diagnostics: z2.array(_preflightDiagnosticSchema),
|
|
289
256
|
// Same shape as knowledgeSectionsOutputSchema.rules — full body keyed by stable_id.
|
|
290
257
|
rules: z2.array(
|
|
291
258
|
z2.object({
|
|
@@ -792,7 +759,23 @@ var citeCoverageReportSchema = z2.object({
|
|
|
792
759
|
qualifying_cites: z2.number().int().nonnegative(),
|
|
793
760
|
recalled_unverified: z2.number().int().nonnegative(),
|
|
794
761
|
expected_but_missed: z2.number().int().nonnegative(),
|
|
795
|
-
total_turns: z2.number().int().nonnegative()
|
|
762
|
+
total_turns: z2.number().int().nonnegative(),
|
|
763
|
+
// v2.0.0-rc.38 UX-8 (C, user-authorized): cite-policy COMPLIANCE rate —
|
|
764
|
+
// the corrected G-CITE semantic. The legacy qualifying_cites/edits ratio
|
|
765
|
+
// measured "how often an applicable KB id existed" (a function of corpus
|
|
766
|
+
// density / soak), NOT "did the AI follow the cite policy". Compliance
|
|
767
|
+
// credits every valid cite line — `KB: <id> [applied|dismissed]` AND
|
|
768
|
+
// `KB: none [reason]` (the policy explicitly allows the none sentinel) —
|
|
769
|
+
// over the turns where a cite was expected. null when no cite-expected
|
|
770
|
+
// turns observed (avoids a misleading 0/0 → 0). Range [0,1].
|
|
771
|
+
cite_compliance_rate: z2.number().min(0).max(1).nullable().optional(),
|
|
772
|
+
compliant_cites: z2.number().int().nonnegative().optional(),
|
|
773
|
+
noncompliant_cites: z2.number().int().nonnegative().optional(),
|
|
774
|
+
// Edit signals lacking session_id → uncorrelatable, silently excluded from
|
|
775
|
+
// expected_but_missed. >0 typically means a stale pre-session_id hook is
|
|
776
|
+
// installed (run `fabric install`). Surfaced so the denominator gap is
|
|
777
|
+
// visible rather than a silent 100% confound.
|
|
778
|
+
uncorrelatable_edits: z2.number().int().nonnegative().optional()
|
|
796
779
|
}),
|
|
797
780
|
per_client: z2.record(
|
|
798
781
|
z2.string(),
|
package/dist/i18n/index.js
CHANGED
|
@@ -23,16 +23,7 @@ interface RuleDescription {
|
|
|
23
23
|
}
|
|
24
24
|
interface RuleDescriptionIndexItem {
|
|
25
25
|
stable_id: string;
|
|
26
|
-
level: AgentsLayer;
|
|
27
|
-
required: boolean;
|
|
28
|
-
selectable: boolean;
|
|
29
26
|
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
27
|
}
|
|
37
28
|
interface AgentsMetaNodeActivation {
|
|
38
29
|
tier: AgentsActivationTier;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsLayer, c as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, d as AgentsMeta, L as LedgerEntry } from './index-
|
|
2
|
-
export { e as AgentsActivationTier, g as AgentsMetaCountersEnvelope, h as AgentsMetaKnowledgeTypeCounters, i as AgentsMetaNodeActivation, j as AiLedgerEntry, k as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, l as FabricLanguage, m as HumanLedgerEntry, M as McpPayloadLimits, R as RuleDescription, n as RuleDescriptionIndexItem, o as auditModeSchema, p as clientPathsSchema, q as defaultLayerFilterSchema, r as fabricLanguageSchema, s as mcpPayloadLimitsSchema, t as selectionTokenTtlMsSchema } from './index-
|
|
1
|
+
import { A as AgentsMetaNode, a as AgentsIdentitySource, b as AgentsLayer, c as AgentsTopologyType, H as HumanLockEntry, f as fabricConfigSchema, d as AgentsMeta, L as LedgerEntry } from './index-UBqD9F0b.js';
|
|
2
|
+
export { e as AgentsActivationTier, g as AgentsMetaCountersEnvelope, h as AgentsMetaKnowledgeTypeCounters, i as AgentsMetaNodeActivation, j as AiLedgerEntry, k as AuditMode, C as ClientPaths, D as DefaultLayerFilter, F as FabricConfig, l as FabricLanguage, m as HumanLedgerEntry, M as McpPayloadLimits, R as RuleDescription, n as RuleDescriptionIndexItem, o as auditModeSchema, p as clientPathsSchema, q as defaultLayerFilterSchema, r as fabricLanguageSchema, s as mcpPayloadLimitsSchema, t as selectionTokenTtlMsSchema } from './index-UBqD9F0b.js';
|
|
3
3
|
export { Locale, Messages, PROTECTED_TOKENS, ProtectedToken, TranslationKey, Translator, createTranslator, defaultMessages, detectNodeLocale, enMessages, normalizeLocale, resolveFabricLocale, zhCNMessages } from './i18n/index.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import { Layer, KnowledgeType, StableId } from './schemas/api-contracts.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
BOOTSTRAP_CANONICAL,
|
|
3
|
+
BOOTSTRAP_MARKER_BEGIN,
|
|
4
|
+
BOOTSTRAP_MARKER_END,
|
|
5
|
+
BOOTSTRAP_REGEX,
|
|
6
|
+
LEGACY_KB_MARKER_BEGIN,
|
|
7
|
+
LEGACY_KB_MARKER_END,
|
|
8
|
+
LEGACY_KB_REGEX
|
|
9
|
+
} from "./chunk-LTDB2UDN.js";
|
|
2
10
|
import {
|
|
3
11
|
PROTECTED_TOKENS,
|
|
4
12
|
createTranslator,
|
|
@@ -8,7 +16,7 @@ import {
|
|
|
8
16
|
normalizeLocale,
|
|
9
17
|
resolveFabricLocale,
|
|
10
18
|
zhCNMessages
|
|
11
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7CX32MYL.js";
|
|
12
20
|
import {
|
|
13
21
|
FabExtractKnowledgeInputSchema,
|
|
14
22
|
FabExtractKnowledgeInputShape,
|
|
@@ -56,16 +64,8 @@ import {
|
|
|
56
64
|
recallInputSchema,
|
|
57
65
|
recallOutputSchema,
|
|
58
66
|
structuredWarningSchema
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import
|
|
61
|
-
BOOTSTRAP_CANONICAL,
|
|
62
|
-
BOOTSTRAP_MARKER_BEGIN,
|
|
63
|
-
BOOTSTRAP_MARKER_END,
|
|
64
|
-
BOOTSTRAP_REGEX,
|
|
65
|
-
LEGACY_KB_MARKER_BEGIN,
|
|
66
|
-
LEGACY_KB_MARKER_END,
|
|
67
|
-
LEGACY_KB_REGEX
|
|
68
|
-
} from "./chunk-VWJQVRSE.js";
|
|
67
|
+
} from "./chunk-WVPDH4BF.js";
|
|
68
|
+
import "./chunk-LXNCAKJZ.js";
|
|
69
69
|
|
|
70
70
|
// src/schemas/agents-meta.ts
|
|
71
71
|
import { z } from "zod";
|