@fenglimg/fabric-shared 1.2.0 → 1.3.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-HVAUI6VN.js → chunk-JCRCASHD.js} +66 -12
- package/dist/i18n/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/node.js +9 -0
- package/package.json +1 -1
|
@@ -72,6 +72,7 @@ var enMessages = {
|
|
|
72
72
|
"cli.init.args.no-bootstrap.description": "Skip running bootstrap installer as part of init",
|
|
73
73
|
"cli.init.args.no-mcp.description": "Skip configuring MCP clients as part of init",
|
|
74
74
|
"cli.init.args.no-hooks.description": "Skip installing git hooks as part of init",
|
|
75
|
+
"cli.init.args.interactive.description": "Show preflight summary and capability table when running in a TTY.",
|
|
75
76
|
"cli.init.mcp.install.global": "Using globally-installed @fenglimg/fabric-server",
|
|
76
77
|
"cli.init.mcp.install.local": "Installing @fenglimg/fabric-server to project devDependencies",
|
|
77
78
|
"cli.init.mcp.install.prompt": "MCP server install scope (global|local)",
|
|
@@ -93,8 +94,30 @@ var enMessages = {
|
|
|
93
94
|
"cli.init.stages.summary.failed": "failed",
|
|
94
95
|
"cli.init.next-step": "{label} {message}",
|
|
95
96
|
"cli.init.reason-message": "{label} {message}",
|
|
97
|
+
"cli.init.plan.title": "Fabric init plan",
|
|
98
|
+
"cli.init.plan.target": "Target: {target}",
|
|
99
|
+
"cli.init.plan.actions": "Plan: bootstrap={bootstrap} mcp={mcp} hooks={hooks} mcp-install={mcpInstall}",
|
|
100
|
+
"cli.init.plan.detected": "Detected clients: {clients}",
|
|
101
|
+
"cli.init.plan.writes": "Core writes:",
|
|
102
|
+
"cli.init.capabilities.title": "Client capability summary",
|
|
103
|
+
"cli.init.capabilities.none": "No supported client was detected for bootstrap or MCP follow-up.",
|
|
104
|
+
"cli.init.capabilities.header.client": "Client",
|
|
105
|
+
"cli.init.capabilities.header.bootstrap": "Bootstrap",
|
|
106
|
+
"cli.init.capabilities.header.mcp": "MCP",
|
|
107
|
+
"cli.init.capabilities.header.hook": "Hook",
|
|
108
|
+
"cli.init.capabilities.header.skill": "Skill",
|
|
109
|
+
"cli.init.capabilities.header.follow-up": "Follow-up",
|
|
110
|
+
"cli.init.capabilities.status.ready": "ready",
|
|
111
|
+
"cli.init.capabilities.status.installed": "installed",
|
|
112
|
+
"cli.init.capabilities.status.manual": "manual",
|
|
113
|
+
"cli.init.capabilities.status.skipped": "skipped",
|
|
114
|
+
"cli.init.capabilities.status.failed": "failed",
|
|
115
|
+
"cli.init.capabilities.status.na": "n/a",
|
|
116
|
+
"cli.init.capabilities.follow-up.ready": "continue in client",
|
|
117
|
+
"cli.init.capabilities.follow-up.manual": "manual step required",
|
|
96
118
|
"cli.init.next-step.message": "run fab hooks install to add the Day 4 pre-commit pipeline.",
|
|
97
|
-
"cli.init.reason-message.body": ".fabric/forensic.json is ready; use the agents-md-init skill to finish
|
|
119
|
+
"cli.init.reason-message.body": ".fabric/forensic.json is ready; use the agents-md-init skill to finish internal Fabric initialization.",
|
|
120
|
+
"cli.init.reason-message.manual-body": ".fabric/forensic.json is ready; some detected clients still need manual follow-up because no Fabric skill is installed for them yet.",
|
|
98
121
|
"cli.init.claude-settings.created": "{label} {path} with Claude Stop hook.",
|
|
99
122
|
"cli.init.claude-settings.updated": "{label} {path} with Claude Stop hook.",
|
|
100
123
|
"cli.init.claude-settings.skipped": "{label} {path}: Claude Stop hook already present.",
|
|
@@ -129,11 +152,11 @@ var enMessages = {
|
|
|
129
152
|
"cli.scan.report.recommendations": "Recommendations:",
|
|
130
153
|
"cli.scan.readme-quality.ok": "ok",
|
|
131
154
|
"cli.scan.readme-quality.stub": "stub",
|
|
132
|
-
"cli.scan.recommendation.init": "L0: Run fab init to scaffold
|
|
133
|
-
"cli.scan.recommendation.readme": "L0: Expand README.md before promoting project facts into
|
|
134
|
-
"cli.scan.recommendation.contributing": "L0: Add CONTRIBUTING.md or leave
|
|
155
|
+
"cli.scan.recommendation.init": "L0: Run fab init to scaffold .fabric/bootstrap/README.md with TODO markers.",
|
|
156
|
+
"cli.scan.recommendation.readme": "L0: Expand README.md before promoting project facts into Fabric references.",
|
|
157
|
+
"cli.scan.recommendation.contributing": "L0: Add CONTRIBUTING.md or leave a bootstrap TODO reference for contribution flow.",
|
|
135
158
|
"cli.scan.recommendation.unknown-framework": "L1: Add tech-stack TODOs manually because no framework marker was detected.",
|
|
136
|
-
"cli.scan.recommendation.framework-dirs": "L1: Review {framework} directories for future scoped
|
|
159
|
+
"cli.scan.recommendation.framework-dirs": "L1: Review {framework} directories for future scoped Fabric rule files.",
|
|
137
160
|
"cli.serve.description": "Start the local Fabric MCP HTTP service. Set FABRIC_AUTH_TOKEN to enable Bearer auth for non-localhost binding.",
|
|
138
161
|
"cli.serve.args.port.description": "Listen port, default 7373.",
|
|
139
162
|
"cli.serve.args.host.description": "Listen host, default 127.0.0.1. Set FABRIC_AUTH_TOKEN to enable Bearer auth for non-localhost binding.",
|
|
@@ -142,7 +165,11 @@ var enMessages = {
|
|
|
142
165
|
"cli.serve.ready.title": "Fabric Dashboard",
|
|
143
166
|
"cli.serve.warning.host-fallback": "--host {host} requires FABRIC_AUTH_TOKEN; falling back to 127.0.0.1 for safety",
|
|
144
167
|
"cli.serve.error.port-in-use": "Port {port} in use - try --port {nextPort}",
|
|
145
|
-
"cli.
|
|
168
|
+
"cli.update.description": "Refresh MCP host configuration and git hooks without re-creating Fabric files.",
|
|
169
|
+
"cli.update.args.target.description": "Target project path. Defaults to CLI arg, EXTERNAL_FIXTURE_PATH, fabric.config.json, then cwd.",
|
|
170
|
+
"cli.update.args.no-mcp.description": "Skip re-configuring MCP clients",
|
|
171
|
+
"cli.update.args.no-hooks.description": "Skip re-installing git hooks",
|
|
172
|
+
"cli.sync-meta.description": "Sync Fabric metadata from internal rule files.",
|
|
146
173
|
"cli.sync-meta.args.target.description": "Target project path, default is the current working directory.",
|
|
147
174
|
"cli.sync-meta.args.check-only.description": "Exit with code 1 when .fabric/agents.meta.json is out of date.",
|
|
148
175
|
"cli.sync-meta.drift-detected": "Fabric metadata drift detected. Run fab sync-meta to update.",
|
|
@@ -370,6 +397,7 @@ var zhCNMessages = {
|
|
|
370
397
|
"cli.init.args.no-bootstrap.description": "\u521D\u59CB\u5316\u65F6\u8DF3\u8FC7\u8FD0\u884C bootstrap \u5B89\u88C5\u5668",
|
|
371
398
|
"cli.init.args.no-mcp.description": "\u521D\u59CB\u5316\u65F6\u8DF3\u8FC7\u914D\u7F6E MCP \u5BA2\u6237\u7AEF",
|
|
372
399
|
"cli.init.args.no-hooks.description": "\u521D\u59CB\u5316\u65F6\u8DF3\u8FC7\u5B89\u88C5 git hooks",
|
|
400
|
+
"cli.init.args.interactive.description": "\u5728 TTY \u4E2D\u8FD0\u884C\u65F6\u663E\u793A\u9884\u68C0\u6458\u8981\u548C\u5BA2\u6237\u7AEF\u80FD\u529B\u8868\u3002",
|
|
373
401
|
"cli.init.mcp.install.global": "\u4F7F\u7528\u5168\u5C40\u5B89\u88C5\u7684 @fenglimg/fabric-server",
|
|
374
402
|
"cli.init.mcp.install.local": "\u5C06 @fenglimg/fabric-server \u5B89\u88C5\u5230\u9879\u76EE devDependencies",
|
|
375
403
|
"cli.init.mcp.install.prompt": "MCP \u670D\u52A1\u7AEF\u5B89\u88C5\u8303\u56F4\uFF08global|local\uFF09",
|
|
@@ -391,8 +419,30 @@ var zhCNMessages = {
|
|
|
391
419
|
"cli.init.stages.summary.failed": "\u5931\u8D25",
|
|
392
420
|
"cli.init.next-step": "{label} {message}",
|
|
393
421
|
"cli.init.reason-message": "{label} {message}",
|
|
422
|
+
"cli.init.plan.title": "Fabric \u521D\u59CB\u5316\u8BA1\u5212",
|
|
423
|
+
"cli.init.plan.target": "\u76EE\u6807\uFF1A{target}",
|
|
424
|
+
"cli.init.plan.actions": "\u8BA1\u5212\uFF1Abootstrap={bootstrap} mcp={mcp} hooks={hooks} mcp-install={mcpInstall}",
|
|
425
|
+
"cli.init.plan.detected": "\u68C0\u6D4B\u5230\u7684\u5BA2\u6237\u7AEF\uFF1A{clients}",
|
|
426
|
+
"cli.init.plan.writes": "\u6838\u5FC3\u5199\u5165\uFF1A",
|
|
427
|
+
"cli.init.capabilities.title": "\u5BA2\u6237\u7AEF\u80FD\u529B\u6458\u8981",
|
|
428
|
+
"cli.init.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",
|
|
429
|
+
"cli.init.capabilities.header.client": "\u5BA2\u6237\u7AEF",
|
|
430
|
+
"cli.init.capabilities.header.bootstrap": "Bootstrap",
|
|
431
|
+
"cli.init.capabilities.header.mcp": "MCP",
|
|
432
|
+
"cli.init.capabilities.header.hook": "Hook",
|
|
433
|
+
"cli.init.capabilities.header.skill": "Skill",
|
|
434
|
+
"cli.init.capabilities.header.follow-up": "\u540E\u7EED\u52A8\u4F5C",
|
|
435
|
+
"cli.init.capabilities.status.ready": "\u5DF2\u5C31\u7EEA",
|
|
436
|
+
"cli.init.capabilities.status.installed": "\u5DF2\u5B89\u88C5",
|
|
437
|
+
"cli.init.capabilities.status.manual": "\u624B\u52A8\u5904\u7406",
|
|
438
|
+
"cli.init.capabilities.status.skipped": "\u5DF2\u8DF3\u8FC7",
|
|
439
|
+
"cli.init.capabilities.status.failed": "\u5931\u8D25",
|
|
440
|
+
"cli.init.capabilities.status.na": "\u4E0D\u9002\u7528",
|
|
441
|
+
"cli.init.capabilities.follow-up.ready": "\u53EF\u5728\u5BA2\u6237\u7AEF\u7EE7\u7EED",
|
|
442
|
+
"cli.init.capabilities.follow-up.manual": "\u9700\u8981\u624B\u52A8\u540E\u7EED\u5904\u7406",
|
|
394
443
|
"cli.init.next-step.message": "\u8FD0\u884C fab hooks install \u4EE5\u6DFB\u52A0\u7B2C 4 \u5929\u7684 pre-commit \u6D41\u6C34\u7EBF\u3002",
|
|
395
|
-
"cli.init.reason-message.body": ".fabric/forensic.json \u5DF2\u5C31\u7EEA\uFF1B\u8BF7\u4F7F\u7528 agents-md-init skill \u5B8C\u6210
|
|
444
|
+
"cli.init.reason-message.body": ".fabric/forensic.json \u5DF2\u5C31\u7EEA\uFF1B\u8BF7\u4F7F\u7528 agents-md-init skill \u5B8C\u6210 Fabric \u5185\u90E8\u521D\u59CB\u5316\u3002",
|
|
445
|
+
"cli.init.reason-message.manual-body": ".fabric/forensic.json \u5DF2\u5C31\u7EEA\uFF1B\u90E8\u5206\u5DF2\u68C0\u6D4B\u5230\u7684\u5BA2\u6237\u7AEF\u5C1A\u672A\u5B89\u88C5 Fabric skill\uFF0C\u9700\u8981\u624B\u52A8\u5B8C\u6210\u540E\u7EED\u521D\u59CB\u5316\u3002",
|
|
396
446
|
"cli.init.claude-settings.created": "{label} {path}\uFF0C\u5E76\u5199\u5165 Claude Stop hook\u3002",
|
|
397
447
|
"cli.init.claude-settings.updated": "{label} {path}\uFF0C\u5E76\u5199\u5165 Claude Stop hook\u3002",
|
|
398
448
|
"cli.init.claude-settings.skipped": "{label} {path}\uFF1AClaude Stop hook \u5DF2\u5B58\u5728\u3002",
|
|
@@ -427,11 +477,11 @@ var zhCNMessages = {
|
|
|
427
477
|
"cli.scan.report.recommendations": "\u5EFA\u8BAE\uFF1A",
|
|
428
478
|
"cli.scan.readme-quality.ok": "\u826F\u597D",
|
|
429
479
|
"cli.scan.readme-quality.stub": "\u8349\u7A3F",
|
|
430
|
-
"cli.scan.recommendation.init": "L0\uFF1A\u8FD0\u884C fab init\uFF0C\
|
|
431
|
-
"cli.scan.recommendation.readme": "L0\uFF1A\u5148\u8865\u5145 README.md\uFF0C\u518D\u628A\u9879\u76EE\u4E8B\u5B9E\u6C89\u6DC0\u5230
|
|
432
|
-
"cli.scan.recommendation.contributing": "L0\uFF1A\u6DFB\u52A0 CONTRIBUTING.md\uFF0C\u6216\u5728
|
|
480
|
+
"cli.scan.recommendation.init": "L0\uFF1A\u8FD0\u884C fab init\uFF0C\u5728 .fabric/bootstrap/README.md \u751F\u6210\u5E26 TODO \u6807\u8BB0\u7684\u521D\u59CB\u9AA8\u67B6\u3002",
|
|
481
|
+
"cli.scan.recommendation.readme": "L0\uFF1A\u5148\u8865\u5145 README.md\uFF0C\u518D\u628A\u9879\u76EE\u4E8B\u5B9E\u6C89\u6DC0\u5230 Fabric \u5F15\u7528\u4E2D\u3002",
|
|
482
|
+
"cli.scan.recommendation.contributing": "L0\uFF1A\u6DFB\u52A0 CONTRIBUTING.md\uFF0C\u6216\u5728 bootstrap \u4E2D\u7559\u4E0B\u8D21\u732E\u6D41\u7A0B\u7684 TODO \u5F15\u7528\u3002",
|
|
433
483
|
"cli.scan.recommendation.unknown-framework": "L1\uFF1A\u5F53\u524D\u672A\u68C0\u6D4B\u5230\u6846\u67B6\u6807\u8BB0\uFF0C\u9700\u8981\u624B\u52A8\u8865\u5145\u6280\u672F\u6808 TODO\u3002",
|
|
434
|
-
"cli.scan.recommendation.framework-dirs": "L1\uFF1A\u68C0\u67E5 {framework} \u76EE\u5F55\uFF0C\u540E\u7EED\u4E3A\u5176\u8865\u5145\u4F5C\u7528\u57DF\u5316
|
|
484
|
+
"cli.scan.recommendation.framework-dirs": "L1\uFF1A\u68C0\u67E5 {framework} \u76EE\u5F55\uFF0C\u540E\u7EED\u4E3A\u5176\u8865\u5145\u4F5C\u7528\u57DF\u5316 Fabric \u89C4\u5219\u6587\u4EF6\u3002",
|
|
435
485
|
"cli.serve.description": "\u542F\u52A8\u672C\u5730 Fabric MCP HTTP \u670D\u52A1\u3002\u82E5\u9700\u7ED1\u5B9A\u5230\u975E localhost\uFF0C\u8BF7\u8BBE\u7F6E FABRIC_AUTH_TOKEN \u4EE5\u542F\u7528 Bearer \u9274\u6743\u3002",
|
|
436
486
|
"cli.serve.args.port.description": "\u76D1\u542C\u7AEF\u53E3\uFF0C\u9ED8\u8BA4 7373\u3002",
|
|
437
487
|
"cli.serve.args.host.description": "\u76D1\u542C\u4E3B\u673A\uFF0C\u9ED8\u8BA4 127.0.0.1\u3002\u82E5\u9700\u7ED1\u5B9A\u5230\u975E localhost\uFF0C\u8BF7\u8BBE\u7F6E FABRIC_AUTH_TOKEN \u4EE5\u542F\u7528 Bearer \u9274\u6743\u3002",
|
|
@@ -440,7 +490,11 @@ var zhCNMessages = {
|
|
|
440
490
|
"cli.serve.ready.title": "Fabric \u4EEA\u8868\u76D8",
|
|
441
491
|
"cli.serve.warning.host-fallback": "--host {host} \u9700\u8981 FABRIC_AUTH_TOKEN\uFF1B\u4E3A\u5B89\u5168\u8D77\u89C1\u5DF2\u56DE\u9000\u5230 127.0.0.1",
|
|
442
492
|
"cli.serve.error.port-in-use": "\u7AEF\u53E3 {port} \u5DF2\u88AB\u5360\u7528\uFF0C\u53EF\u5C1D\u8BD5 --port {nextPort}",
|
|
443
|
-
"cli.
|
|
493
|
+
"cli.update.description": "\u5237\u65B0 MCP \u4E3B\u673A\u914D\u7F6E\u548C git hooks\uFF0C\u4E0D\u91CD\u65B0\u521B\u5EFA Fabric \u6587\u4EF6\u3002",
|
|
494
|
+
"cli.update.args.target.description": "\u76EE\u6807\u9879\u76EE\u8DEF\u5F84\u3002\u9ED8\u8BA4\u4F9D\u6B21\u4F7F\u7528 CLI \u53C2\u6570\u3001EXTERNAL_FIXTURE_PATH\u3001fabric.config.json\u3001\u5F53\u524D\u76EE\u5F55\u3002",
|
|
495
|
+
"cli.update.args.no-mcp.description": "\u8DF3\u8FC7\u91CD\u65B0\u914D\u7F6E MCP \u5BA2\u6237\u7AEF",
|
|
496
|
+
"cli.update.args.no-hooks.description": "\u8DF3\u8FC7\u91CD\u65B0\u5B89\u88C5 git hooks",
|
|
497
|
+
"cli.sync-meta.description": "\u4ECE\u5185\u90E8\u89C4\u5219\u6587\u4EF6\u540C\u6B65 Fabric \u5143\u6570\u636E\u3002",
|
|
444
498
|
"cli.sync-meta.args.target.description": "\u76EE\u6807\u9879\u76EE\u8DEF\u5F84\uFF0C\u9ED8\u8BA4\u4E3A\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\u3002",
|
|
445
499
|
"cli.sync-meta.args.check-only.description": "\u5982\u679C .fabric/agents.meta.json \u5DF2\u8FC7\u671F\uFF0C\u5219\u4EE5\u4EE3\u7801 1 \u9000\u51FA\u3002",
|
|
446
500
|
"cli.sync-meta.drift-detected": "\u68C0\u6D4B\u5230 Fabric \u5143\u6570\u636E\u6F02\u79FB\u3002\u8BF7\u8FD0\u884C fab sync-meta \u8FDB\u884C\u66F4\u65B0\u3002",
|
package/dist/i18n/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
enMessages,
|
|
7
7
|
normalizeLocale,
|
|
8
8
|
zhCNMessages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JCRCASHD.js";
|
|
10
10
|
import "./chunk-LXNCAKJZ.js";
|
|
11
11
|
|
|
12
12
|
// src/schemas/agents-meta.ts
|
|
@@ -44,7 +44,7 @@ function withDerivedAgentsMetaNodeDefaults(node) {
|
|
|
44
44
|
}
|
|
45
45
|
function deriveAgentsMetaLayer(file) {
|
|
46
46
|
const normalized = normalizePath(file);
|
|
47
|
-
if (normalized === "AGENTS.md") {
|
|
47
|
+
if (normalized === "AGENTS.md" || normalized === ".fabric/bootstrap/README.md") {
|
|
48
48
|
return "L0";
|
|
49
49
|
}
|
|
50
50
|
if (hasCrossCuttingSegment(normalized)) {
|
package/dist/node.js
CHANGED
|
@@ -16,6 +16,15 @@ function detectFramework(root) {
|
|
|
16
16
|
const packageJsonPath = join(root, "package.json");
|
|
17
17
|
if (existsSync(packageJsonPath)) {
|
|
18
18
|
const packageJson = readPackageJson(packageJsonPath);
|
|
19
|
+
const creatorVersion = packageJson.creator?.version;
|
|
20
|
+
if (typeof creatorVersion === "string" && creatorVersion.trim().length > 0) {
|
|
21
|
+
return {
|
|
22
|
+
kind: "cocos-creator",
|
|
23
|
+
version: creatorVersion,
|
|
24
|
+
subkind: inferCocosSubkind(root, creatorVersion),
|
|
25
|
+
evidence: [`package.json: creator.version=${creatorVersion}`]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
19
28
|
const deps = collectDependencyVersions(packageJson);
|
|
20
29
|
for (const [dependencyName, kind] of [
|
|
21
30
|
["next", "next"],
|