@fenglimg/fabric-shared 2.3.0-rc.4 → 2.3.0-rc.6
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-LDFQYCY7.js → chunk-P6INRP3A.js} +20 -0
- package/dist/{chunk-7PS7LB5T.js → chunk-PPV5IQGX.js} +10 -10
- package/dist/i18n/index.js +1 -1
- package/dist/{index-C0cijMSw.d.ts → index-Ba3sXdL4.d.ts} +6 -9
- package/dist/index.d.ts +12 -224
- package/dist/index.js +50 -9
- package/dist/schemas/api-contracts.d.ts +8 -45
- package/dist/schemas/api-contracts.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -489,6 +489,13 @@ var enMessages = {
|
|
|
489
489
|
"doctor.check.store_orphan.message.plural": "{count} stores exist on disk but are not registered in the global registry (first: {detail}); recall / bind cannot see them. Run `fabric doctor --fix` to adopt them (re-register \u2014 never deletes the on-disk tree).",
|
|
490
490
|
"doctor.check.store_orphan.remediation": "Run `fabric doctor --fix` to adopt the orphan store(s) into the registry (re-register by store_uuid, alias auto-disambiguated on clash; rescue-before-delete \u2014 registers, never deletes on disk).",
|
|
491
491
|
"doctor.check.store_orphan.ok": "No unregistered orphan stores under ~/.fabric/stores.",
|
|
492
|
+
// W2 (F-003): project-registry drift — projects.json ↔ projects/ folder tree.
|
|
493
|
+
"doctor.check.project_registry_drift.name": "Project registry drift",
|
|
494
|
+
"doctor.check.project_registry_drift.ok": "Every knowledge/projects/<id>/ folder is registered in projects.json and no registered folder is empty.",
|
|
495
|
+
"doctor.check.project_registry_drift.message.unregistered": "{total} project registry drift issue(s): {breakdown}. e.g. projects/{projectId}/ in store '{storeAlias}' holds knowledge but is not registered in projects.json (unrouted). Run `fabric doctor --fix` to register it (rescue-before-delete \u2014 never deletes the folder).",
|
|
496
|
+
"doctor.check.project_registry_drift.message.orphan": "{total} project registry drift issue(s): {breakdown}. e.g. projects/{projectId}/ in store '{storeAlias}' exists on disk but is not registered in projects.json. Run `fabric doctor --fix` to register it (rescue \u2014 never deletes the folder).",
|
|
497
|
+
"doctor.check.project_registry_drift.message.empty": "{total} project registry drift issue(s): {breakdown}. e.g. registered project '{projectId}' in store '{storeAlias}' has an empty projects/{projectId}/ folder (zero entries). Run `fabric doctor --fix` to prune the empty folder.",
|
|
498
|
+
"doctor.check.project_registry_drift.remediation": "Run `fabric doctor --fix` to reconcile: orphan / unregistered-write folders are rescue-registered into projects.json (never deleted, even when non-empty); only genuinely-empty registered folders are pruned. A ghost registration (registered id with no folder) is legal (lazy creation) and needs no action.",
|
|
492
499
|
"doctor.check.preexisting_root_files.name": "Preexisting root markdown",
|
|
493
500
|
"doctor.check.preexisting_root_files.ok": "No CLAUDE.md or AGENTS.md detected at project root.",
|
|
494
501
|
"doctor.check.preexisting_root_files.message": "{files} detected at project root. These root files are not auto-loaded by Fabric MCP.",
|
|
@@ -1260,6 +1267,9 @@ var enMessages = {
|
|
|
1260
1267
|
"cli.store.rescope.noop": "re-scope: nothing to do ({count} already at '{scope}')",
|
|
1261
1268
|
"cli.store.rescope.summary": "re-scope \u2192 {scope}: {changed} updated, {unchanged} unchanged",
|
|
1262
1269
|
"cli.store.rescope.refused": "{count} entries refused",
|
|
1270
|
+
"cli.store.reroot.noop": "reroot: nothing to relocate ({skipped} entries stay flat)",
|
|
1271
|
+
"cli.store.reroot.summary": "reroot: {moved} project entries relocated into knowledge/projects/<id>/",
|
|
1272
|
+
"cli.store.reroot.provenance-gap": "{count} moved via fs rename (untracked / non-git) \u2014 git blame history was NOT preserved for these",
|
|
1263
1273
|
"cli.store.none-mounted": "(no stores mounted)",
|
|
1264
1274
|
"cli.store.mounted": "mounted '{alias}' ({count} store(s) total)",
|
|
1265
1275
|
"cli.store.created": "created store '{alias}' ({uuid}) at {dir}",
|
|
@@ -1783,6 +1793,13 @@ var zhCNMessages = {
|
|
|
1783
1793
|
"doctor.check.store_orphan.message.plural": "{count} \u4E2A store \u5728\u78C1\u76D8\u4E0A\u5B58\u5728\u4F46\u672A\u767B\u8BB0\u5230\u5168\u5C40 registry\uFF08\u9996\u4E2A\uFF1A{detail}\uFF09\uFF0Crecall / bind \u90FD\u770B\u4E0D\u5230\u5B83\u4EEC\u3002\u8FD0\u884C `fabric doctor --fix` \u628A\u5B83\u4EEC\u6536\u7F16\uFF08\u91CD\u65B0\u767B\u8BB0,\u7EDD\u4E0D\u5220\u9664\u78C1\u76D8\u6587\u4EF6\uFF09\u3002",
|
|
1784
1794
|
"doctor.check.store_orphan.remediation": "\u8FD0\u884C `fabric doctor --fix` \u628A\u8FD9\u4E9B\u5B64\u513F store \u6536\u7F16\u8FDB registry(\u6309 store_uuid \u91CD\u65B0\u767B\u8BB0\u3001alias \u649E\u5E93\u81EA\u52A8\u6D88\u6B67;rescue-before-delete\u2014\u2014\u53EA\u767B\u8BB0\u4E0D\u5220\u76D8)\u3002",
|
|
1785
1795
|
"doctor.check.store_orphan.ok": "~/.fabric/stores \u4E0B\u6CA1\u6709\u672A\u767B\u8BB0\u7684\u5B64\u513F store\u3002",
|
|
1796
|
+
// W2 (F-003): 项目注册表漂移 —— projects.json ↔ projects/ 文件夹树。
|
|
1797
|
+
"doctor.check.project_registry_drift.name": "\u9879\u76EE\u6CE8\u518C\u8868\u6F02\u79FB",
|
|
1798
|
+
"doctor.check.project_registry_drift.ok": "\u6BCF\u4E2A knowledge/projects/<id>/ \u6587\u4EF6\u5939\u90FD\u5DF2\u5728 projects.json \u6CE8\u518C,\u4E14\u6CA1\u6709\u5DF2\u6CE8\u518C\u6587\u4EF6\u5939\u4E3A\u7A7A\u3002",
|
|
1799
|
+
"doctor.check.project_registry_drift.message.unregistered": "{total} \u5904\u9879\u76EE\u6CE8\u518C\u8868\u6F02\u79FB:{breakdown}\u3002\u4F8B\u5982 store '{storeAlias}' \u7684 projects/{projectId}/ \u6709\u77E5\u8BC6\u6761\u76EE\u4F46\u672A\u5728 projects.json \u6CE8\u518C(\u5199\u5165\u672A\u8DEF\u7531)\u3002\u8FD0\u884C `fabric doctor --fix` \u8865\u767B\u8BB0(rescue-before-delete\u2014\u2014\u4ECE\u4E0D\u5220\u6587\u4EF6\u5939)\u3002",
|
|
1800
|
+
"doctor.check.project_registry_drift.message.orphan": "{total} \u5904\u9879\u76EE\u6CE8\u518C\u8868\u6F02\u79FB:{breakdown}\u3002\u4F8B\u5982 store '{storeAlias}' \u7684 projects/{projectId}/ \u78C1\u76D8\u5B58\u5728\u4F46\u672A\u5728 projects.json \u6CE8\u518C\u3002\u8FD0\u884C `fabric doctor --fix` \u8865\u767B\u8BB0(rescue\u2014\u2014\u4ECE\u4E0D\u5220\u6587\u4EF6\u5939)\u3002",
|
|
1801
|
+
"doctor.check.project_registry_drift.message.empty": "{total} \u5904\u9879\u76EE\u6CE8\u518C\u8868\u6F02\u79FB:{breakdown}\u3002\u4F8B\u5982 store '{storeAlias}' \u5DF2\u6CE8\u518C\u9879\u76EE '{projectId}' \u7684 projects/{projectId}/ \u6587\u4EF6\u5939\u4E3A\u7A7A(\u96F6\u6761\u76EE)\u3002\u8FD0\u884C `fabric doctor --fix` \u6E05\u7406\u7A7A\u6587\u4EF6\u5939\u3002",
|
|
1802
|
+
"doctor.check.project_registry_drift.remediation": "\u8FD0\u884C `fabric doctor --fix` \u5BF9\u8D26:orphan / \u672A\u6CE8\u518C\u5199\u5165\u7684\u6587\u4EF6\u5939\u4F1A\u88AB rescue-register \u8FDB projects.json(\u5373\u4F7F\u975E\u7A7A\u4E5F\u4ECE\u4E0D\u5220\u9664);\u4EC5\u771F\u6B63\u4E3A\u7A7A\u7684\u5DF2\u6CE8\u518C\u6587\u4EF6\u5939\u624D\u88AB\u6E05\u7406\u3002ghost \u6CE8\u518C(\u5DF2\u6CE8\u518C id \u4F46\u65E0\u6587\u4EF6\u5939)\u662F\u5408\u6CD5\u7684(lazy \u521B\u5EFA),\u65E0\u9700\u5904\u7406\u3002",
|
|
1786
1803
|
"doctor.check.preexisting_root_files.name": "\u9884\u5B58\u6839\u76EE\u5F55 markdown",
|
|
1787
1804
|
"doctor.check.preexisting_root_files.ok": "project root \u672A\u68C0\u6D4B\u5230 CLAUDE.md \u6216 AGENTS.md\u3002",
|
|
1788
1805
|
"doctor.check.preexisting_root_files.message": "project root \u68C0\u6D4B\u5230 {files}\u3002\u8FD9\u4E9B root files \u4E0D\u4F1A\u88AB Fabric MCP \u81EA\u52A8\u52A0\u8F7D\u3002",
|
|
@@ -2544,6 +2561,9 @@ var zhCNMessages = {
|
|
|
2544
2561
|
"cli.store.rescope.noop": "\u91CD\u5B9A scope:\u65E0\u9700\u6539\u52A8({count} \u6761\u5DF2\u662F '{scope}')",
|
|
2545
2562
|
"cli.store.rescope.summary": "\u91CD\u5B9A scope \u2192 {scope}:{changed} \u6761\u5DF2\u66F4\u65B0,{unchanged} \u6761\u672A\u53D8",
|
|
2546
2563
|
"cli.store.rescope.refused": "{count} \u6761\u88AB\u62D2\u7EDD",
|
|
2564
|
+
"cli.store.reroot.noop": "reroot:\u65E0\u9700\u8FC1\u79FB({skipped} \u6761\u4FDD\u6301\u5E73\u94FA)",
|
|
2565
|
+
"cli.store.reroot.summary": "reroot:{moved} \u6761\u9879\u76EE\u6761\u76EE\u5DF2\u8FC1\u5165 knowledge/projects/<id>/",
|
|
2566
|
+
"cli.store.reroot.provenance-gap": "{count} \u6761\u7ECF fs rename \u8FC1\u79FB(\u672A\u8DDF\u8E2A / \u975E git)\u2014\u2014 \u8FD9\u4E9B\u6761\u76EE\u7684 git blame \u5386\u53F2\u672A\u4FDD\u7559",
|
|
2547
2567
|
"cli.store.none-mounted": "(\u672A\u6302\u8F7D\u4EFB\u4F55 store)",
|
|
2548
2568
|
"cli.store.mounted": "\u5DF2\u6302\u8F7D '{alias}' (\u5171 {count} \u4E2A store)",
|
|
2549
2569
|
"cli.store.created": "\u5DF2\u521B\u5EFA store '{alias}' ({uuid}) \u4E8E {dir}",
|
|
@@ -47,21 +47,19 @@ var structuredWarningSchema = z3.object({
|
|
|
47
47
|
});
|
|
48
48
|
var _knowledgeTypeEnum = z3.enum(["models", "decisions", "guidelines", "pitfalls", "processes"]);
|
|
49
49
|
var _maturityEnum = z3.enum(["draft", "verified", "proven"]);
|
|
50
|
-
var _layerEnum = z3.enum(["personal", "team"]);
|
|
51
50
|
var _ruleDescriptionSchema = z3.object({
|
|
52
51
|
summary: z3.string(),
|
|
53
52
|
intent_clues: z3.array(z3.string()),
|
|
54
53
|
tech_stack: z3.array(z3.string()),
|
|
55
54
|
impact: z3.array(z3.string()),
|
|
56
55
|
must_read_if: z3.string(),
|
|
57
|
-
entities: z3.array(z3.string()).optional(),
|
|
58
56
|
// v2.0: optional knowledge-entry fields. Absent for v1.x rules; present for
|
|
59
|
-
// entries that declare frontmatter `id/type/maturity/
|
|
57
|
+
// entries that declare frontmatter `id/type/maturity`. W4/Track1: the redundant
|
|
58
|
+
// `knowledge_layer` field was removed — a candidate's layer is derived from its
|
|
59
|
+
// stable_id prefix (KP-→personal, else team; KT-DEC-0004).
|
|
60
60
|
id: z3.string().optional(),
|
|
61
61
|
knowledge_type: _knowledgeTypeEnum.optional(),
|
|
62
62
|
maturity: _maturityEnum.optional(),
|
|
63
|
-
knowledge_layer: _layerEnum.optional(),
|
|
64
|
-
layer_reason: z3.string().optional(),
|
|
65
63
|
created_at: z3.string().optional(),
|
|
66
64
|
// v2.0.0-rc.38 UX-3 (D-MCP fold ③): these three were previously carried ONLY
|
|
67
65
|
// as top-level mirrors on the index item. With the mirrors removed,
|
|
@@ -194,7 +192,11 @@ var planContextHintNarrowEntrySchema = z3.object({
|
|
|
194
192
|
// W2-2 (KT-DEC-0027): the entry's must_read_if trigger hook, forwarded for the
|
|
195
193
|
// SessionStart REFERENCE rendering (decision/pitfall/process → title + hook).
|
|
196
194
|
// Optional — omitted when the frontmatter declares none.
|
|
197
|
-
must_read_if: z3.string().optional()
|
|
195
|
+
must_read_if: z3.string().optional(),
|
|
196
|
+
// TASK-003 (impact-map MVP): the entry's impact list, forwarded so the narrow
|
|
197
|
+
// PreToolUse hint can surface the consequences of ignoring this knowledge when
|
|
198
|
+
// editing a matching relevance path. Optional — omitted when none declared.
|
|
199
|
+
impact: z3.array(z3.string()).optional()
|
|
198
200
|
});
|
|
199
201
|
var planContextHintOutputSchema = z3.object({
|
|
200
202
|
version: z3.literal(1),
|
|
@@ -242,8 +244,8 @@ var knowledgeSectionsOutputSchema = z3.object({
|
|
|
242
244
|
diagnostics: z3.array(
|
|
243
245
|
// v2.0.0-rc.23 TASK-013 (F8b): `missing_section` was removed alongside the
|
|
244
246
|
// A-set enum. `missing_knowledge_metadata` stays as the warn-level signal
|
|
245
|
-
// for un-migrated v1.x entries (no knowledge_type
|
|
246
|
-
//
|
|
247
|
+
// for un-migrated v1.x entries (no knowledge_type in frontmatter). Does NOT
|
|
248
|
+
// block selection.
|
|
247
249
|
z3.object({
|
|
248
250
|
code: z3.enum(["missing_knowledge_metadata", "unresolved_selected_id"]),
|
|
249
251
|
severity: z3.literal("warn"),
|
|
@@ -1092,8 +1094,6 @@ var KnowledgeEntryFrontmatterSchema = z3.object({
|
|
|
1092
1094
|
// draft | verified | proven
|
|
1093
1095
|
layer: LayerSchema,
|
|
1094
1096
|
// personal | team
|
|
1095
|
-
layer_reason: z3.string().optional(),
|
|
1096
|
-
// why this layer (for ambiguous cases)
|
|
1097
1097
|
created_at: z3.string()
|
|
1098
1098
|
// ISO 8601 timestamp
|
|
1099
1099
|
// Note: 'tags' and other fields can be added later but core schema is these 6
|
package/dist/i18n/index.js
CHANGED
|
@@ -8,13 +8,10 @@ interface RuleDescription {
|
|
|
8
8
|
tech_stack: string[];
|
|
9
9
|
impact: string[];
|
|
10
10
|
must_read_if: string;
|
|
11
|
-
entities?: string[];
|
|
12
11
|
id?: string;
|
|
13
12
|
knowledge_type?: "models" | "decisions" | "guidelines" | "pitfalls" | "processes";
|
|
14
13
|
maturity?: "draft" | "verified" | "proven";
|
|
15
|
-
knowledge_layer?: "personal" | "team";
|
|
16
14
|
semantic_scope?: string;
|
|
17
|
-
layer_reason?: string;
|
|
18
15
|
created_at?: string;
|
|
19
16
|
tags?: string[];
|
|
20
17
|
relevance_scope?: "narrow" | "broad";
|
|
@@ -477,7 +474,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
477
474
|
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
478
475
|
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
479
476
|
broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
480
|
-
hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
|
|
477
|
+
hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance", "narrow", "cite-evict"]>, "many">>;
|
|
481
478
|
cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
482
479
|
self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
483
480
|
hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -557,7 +554,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
557
554
|
} | undefined;
|
|
558
555
|
cite_nudge_ignore_globs?: string[] | undefined;
|
|
559
556
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
560
|
-
hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
|
|
557
|
+
hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
|
|
561
558
|
orphan_demote_proven_days?: number | undefined;
|
|
562
559
|
orphan_demote_verified_days?: number | undefined;
|
|
563
560
|
orphan_demote_draft_days?: number | undefined;
|
|
@@ -613,7 +610,7 @@ declare const fabricConfigSchema: z.ZodObject<{
|
|
|
613
610
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
614
611
|
onboard_slots_opted_out?: string[] | undefined;
|
|
615
612
|
broad_index_backstop?: number | undefined;
|
|
616
|
-
hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
|
|
613
|
+
hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
|
|
617
614
|
cite_policy_enabled?: boolean | undefined;
|
|
618
615
|
self_archive_policy_enabled?: boolean | undefined;
|
|
619
616
|
hint_narrow_top_k?: number | undefined;
|
|
@@ -706,7 +703,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
|
|
|
706
703
|
fabric_event_retention_days: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<7>, z.ZodLiteral<30>, z.ZodLiteral<90>]>>;
|
|
707
704
|
onboard_slots_opted_out: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
708
705
|
broad_index_backstop: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
709
|
-
hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance"]>, "many">>;
|
|
706
|
+
hint_dismiss_signals: z.ZodOptional<z.ZodArray<z.ZodEnum<["archive", "review", "import", "maintenance", "narrow", "cite-evict"]>, "many">>;
|
|
710
707
|
cite_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
711
708
|
self_archive_policy_enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
712
709
|
hint_narrow_top_k: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -797,7 +794,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
|
|
|
797
794
|
} | undefined;
|
|
798
795
|
cite_nudge_ignore_globs?: string[] | undefined;
|
|
799
796
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
800
|
-
hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
|
|
797
|
+
hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
|
|
801
798
|
orphan_demote_proven_days?: number | undefined;
|
|
802
799
|
orphan_demote_verified_days?: number | undefined;
|
|
803
800
|
orphan_demote_draft_days?: number | undefined;
|
|
@@ -853,7 +850,7 @@ declare const fabricConfigLoadSchema: z.ZodObject<{
|
|
|
853
850
|
fabric_event_retention_days?: 7 | 30 | 90 | undefined;
|
|
854
851
|
onboard_slots_opted_out?: string[] | undefined;
|
|
855
852
|
broad_index_backstop?: number | undefined;
|
|
856
|
-
hint_dismiss_signals?: ("archive" | "review" | "import" | "maintenance")[] | undefined;
|
|
853
|
+
hint_dismiss_signals?: ("narrow" | "archive" | "review" | "import" | "maintenance" | "cite-evict")[] | undefined;
|
|
857
854
|
cite_policy_enabled?: boolean | undefined;
|
|
858
855
|
self_archive_policy_enabled?: boolean | undefined;
|
|
859
856
|
hint_narrow_top_k?: number | undefined;
|