@fenglimg/fabric-cli 1.8.0-rc.1 → 1.8.0-rc.2
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/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { defineCommand, runMain } from "citty";
|
|
|
8
8
|
|
|
9
9
|
// src/commands/index.ts
|
|
10
10
|
var allCommands = {
|
|
11
|
-
init: () => import("./init-
|
|
11
|
+
init: () => import("./init-CAZN4S4T.js").then((module) => module.default),
|
|
12
12
|
scan: () => import("./scan-NNBNGIZG.js").then((module) => module.default),
|
|
13
13
|
serve: () => import("./serve-466QXQ5Q.js").then((module) => module.default),
|
|
14
14
|
doctor: () => import("./doctor-F52XWWZC.js").then((module) => module.default)
|
|
@@ -18,7 +18,7 @@ var allCommands = {
|
|
|
18
18
|
var main = defineCommand({
|
|
19
19
|
meta: {
|
|
20
20
|
name: "fabric",
|
|
21
|
-
version: "1.8.0-rc.
|
|
21
|
+
version: "1.8.0-rc.2",
|
|
22
22
|
description: 'Initialize and manage Fabric projects. Use "fabric init" for one-shot setup.'
|
|
23
23
|
},
|
|
24
24
|
subCommands: allCommands
|
|
@@ -1992,7 +1992,7 @@ function readProjectName(target) {
|
|
|
1992
1992
|
return basename(target);
|
|
1993
1993
|
}
|
|
1994
1994
|
function getCliVersion() {
|
|
1995
|
-
return true ? "1.8.0-rc.
|
|
1995
|
+
return true ? "1.8.0-rc.2" : "unknown";
|
|
1996
1996
|
}
|
|
1997
1997
|
function sortRecord(record) {
|
|
1998
1998
|
return Object.fromEntries(Object.entries(record).sort(([left], [right]) => left.localeCompare(right)));
|
|
@@ -2003,8 +2003,8 @@ function toPosixPath(path) {
|
|
|
2003
2003
|
|
|
2004
2004
|
// src/commands/init.ts
|
|
2005
2005
|
var CLAUDE_INIT_SKILL_TEMPLATE = "templates/claude-skills/fabric-init/SKILL.md";
|
|
2006
|
-
var CLAUDE_INIT_REMINDER_HOOK_TEMPLATE = "templates/claude-hooks/
|
|
2007
|
-
var CLAUDE_INIT_REMINDER_COMMAND = ".claude/hooks/
|
|
2006
|
+
var CLAUDE_INIT_REMINDER_HOOK_TEMPLATE = "templates/claude-hooks/fabric-init-reminder.cjs";
|
|
2007
|
+
var CLAUDE_INIT_REMINDER_COMMAND = ".claude/hooks/fabric-init-reminder.cjs";
|
|
2008
2008
|
var CODEX_INIT_SKILL_TEMPLATE = "templates/codex-skills/fabric-init/SKILL.md";
|
|
2009
2009
|
var CODEX_SESSION_START_HOOK_TEMPLATE = "templates/codex-hooks/fabric-session-start.cjs";
|
|
2010
2010
|
var CODEX_STOP_HOOK_TEMPLATE = "templates/codex-hooks/fabric-stop-reminder.cjs";
|
|
@@ -2114,8 +2114,8 @@ async function runInitCommand(args) {
|
|
|
2114
2114
|
});
|
|
2115
2115
|
const plan = intent.wizardEnabled ? await resolveInitExecutionPlanWithWizard(basePlan, args, createDefaultInitWizardAdapter()) : basePlan;
|
|
2116
2116
|
if (plan === null) {
|
|
2117
|
-
|
|
2118
|
-
|
|
2117
|
+
process.exitCode = 130;
|
|
2118
|
+
return;
|
|
2119
2119
|
}
|
|
2120
2120
|
return executeInitExecutionPlan(plan);
|
|
2121
2121
|
}
|
|
@@ -2251,7 +2251,7 @@ async function buildInitFabricPlan(target, options) {
|
|
|
2251
2251
|
const codexSessionStartHookPath = join8(target, ".codex", "hooks", "fabric-session-start.cjs");
|
|
2252
2252
|
const codexStopHookPath = join8(target, ".codex", "hooks", "fabric-stop-reminder.cjs");
|
|
2253
2253
|
const codexHooksConfigPath = join8(target, ".codex", "hooks.json");
|
|
2254
|
-
const claudeHookPath = join8(target, ".claude", "hooks", "
|
|
2254
|
+
const claudeHookPath = join8(target, ".claude", "hooks", "fabric-init-reminder.cjs");
|
|
2255
2255
|
const claudeSettingsPath = join8(target, ".claude", "settings.json");
|
|
2256
2256
|
const metaPath = join8(fabricDir, "agents.meta.json");
|
|
2257
2257
|
const replaceFabricDir = shouldReplaceWritableDirectory(fabricDir, options);
|
|
@@ -3029,7 +3029,7 @@ function isClaudeInitReminderStopEntry(entry) {
|
|
|
3029
3029
|
return false;
|
|
3030
3030
|
}
|
|
3031
3031
|
return entry.hooks.some(
|
|
3032
|
-
(hook) => isRecord(hook) && hook.type === "command" && typeof hook.command === "string" && hook.command.includes("agents-md-init-reminder.cjs")
|
|
3032
|
+
(hook) => isRecord(hook) && hook.type === "command" && typeof hook.command === "string" && (hook.command.includes("fabric-init-reminder.cjs") || hook.command.includes("agents-md-init-reminder.cjs"))
|
|
3033
3033
|
);
|
|
3034
3034
|
}
|
|
3035
3035
|
function isRecord(value) {
|
|
@@ -3286,5 +3286,6 @@ export {
|
|
|
3286
3286
|
initCommand,
|
|
3287
3287
|
initFabric,
|
|
3288
3288
|
resolveInitExecutionPlanWithWizard,
|
|
3289
|
+
runInitCommand,
|
|
3289
3290
|
shouldUseInitWizard
|
|
3290
3291
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fenglimg/fabric-cli",
|
|
3
|
-
"version": "1.8.0-rc.
|
|
3
|
+
"version": "1.8.0-rc.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"fab": "dist/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"tree-sitter-javascript": "^0.25.0",
|
|
21
21
|
"tree-sitter-typescript": "^0.23.2",
|
|
22
22
|
"web-tree-sitter": "^0.26.8",
|
|
23
|
-
"@fenglimg/fabric-server": "1.8.0-rc.
|
|
24
|
-
"@fenglimg/fabric-shared": "1.8.0-rc.
|
|
23
|
+
"@fenglimg/fabric-server": "1.8.0-rc.2",
|
|
24
|
+
"@fenglimg/fabric-shared": "1.8.0-rc.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^22.15.0",
|
|
@@ -13,6 +13,6 @@ process.stdout.write(
|
|
|
13
13
|
JSON.stringify({
|
|
14
14
|
decision: "block",
|
|
15
15
|
reason:
|
|
16
|
-
"fab init 已完成证据收集,但项目 AGENTS.md 初始化尚未完成。调用
|
|
16
|
+
"fab init 已完成证据收集,但项目 AGENTS.md 初始化尚未完成。调用 fabric-init skill (通过 Skill 工具) 完成 3 阶段初始化访谈。参考: .claude/skills/fabric-init/SKILL.md + .fabric/forensic.json",
|
|
17
17
|
}),
|
|
18
18
|
);
|