@fenglimg/fabric-cli 1.8.0-rc.1 → 1.8.0-rc.3

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-AEO5JU7R.js").then((module) => module.default),
11
+ init: () => import("./init-7EYGUJNJ.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.1",
21
+ version: "1.8.0-rc.3",
22
22
  description: 'Initialize and manage Fabric projects. Use "fabric init" for one-shot setup.'
23
23
  },
24
24
  subCommands: allCommands
@@ -463,7 +463,7 @@ function detectClientSupports(workspaceRoot, fabricConfig = {}) {
463
463
  },
464
464
  installedCapabilities: {
465
465
  hook: existsSync5(join5(workspaceRoot, ".codex", "hooks.json")),
466
- skill: existsSync5(join5(workspaceRoot, ".agents", "skills", "fabric-init", "SKILL.md"))
466
+ skill: existsSync5(join5(workspaceRoot, ".codex", "skills", "fabric-init", "SKILL.md"))
467
467
  }
468
468
  }
469
469
  ];
@@ -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.1" : "unknown";
1995
+ return true ? "1.8.0-rc.3" : "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/agents-md-init-reminder.cjs";
2007
- var CLAUDE_INIT_REMINDER_COMMAND = ".claude/hooks/agents-md-init-reminder.cjs";
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
- writeStderr3(t("cli.init.wizard.cancelled"));
2118
- throw new Error(t("cli.init.wizard.cancelled"));
2117
+ process.exitCode = 130;
2118
+ return;
2119
2119
  }
2120
2120
  return executeInitExecutionPlan(plan);
2121
2121
  }
@@ -2247,11 +2247,11 @@ async function buildInitFabricPlan(target, options) {
2247
2247
  const rulesDir = join8(fabricDir, "rules");
2248
2248
  const eventsPath = join8(fabricDir, "events.jsonl");
2249
2249
  const claudeSkillPath = join8(target, ".claude", "skills", "fabric-init", "SKILL.md");
2250
- const codexSkillPath = join8(target, ".agents", "skills", "fabric-init", "SKILL.md");
2250
+ const codexSkillPath = join8(target, ".codex", "skills", "fabric-init", "SKILL.md");
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", "agents-md-init-reminder.cjs");
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.1",
3
+ "version": "1.8.0-rc.3",
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.1",
24
- "@fenglimg/fabric-shared": "1.8.0-rc.1"
23
+ "@fenglimg/fabric-server": "1.8.0-rc.3",
24
+ "@fenglimg/fabric-shared": "1.8.0-rc.3"
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 初始化尚未完成。调用 agents-md-init skill (通过 Skill 工具) 完成 3 阶段初始化访谈。参考: .claude/skills/agents-md-init/SKILL.md + .fabric/forensic.json",
16
+ "fab init 已完成证据收集,但项目 AGENTS.md 初始化尚未完成。调用 fabric-init skill (通过 Skill 工具) 完成 3 阶段初始化访谈。参考: .claude/skills/fabric-init/SKILL.md + .fabric/forensic.json",
17
17
  }),
18
18
  );
@@ -13,7 +13,7 @@ process.stdout.write(
13
13
  JSON.stringify({
14
14
  hookSpecificOutput: {
15
15
  additionalContext:
16
- "这个仓库的 Fabric 初始化还没完成。继续操作前,请先查看 .fabric/forensic.json 和 .fabric/bootstrap/README.md,并使用仓库内的 .agents/skills/fabric-init/SKILL.md。若 Codex hooks 没有触发,请确认配置里已启用 features.codex_hooks = true。",
16
+ "这个仓库的 Fabric 初始化还没完成。继续操作前,请先查看 .fabric/forensic.json 和 .fabric/bootstrap/README.md,并使用仓库内的 .codex/skills/fabric-init/SKILL.md。若 Codex hooks 没有触发,请确认配置里已启用 features.codex_hooks = true。",
17
17
  },
18
18
  }),
19
19
  );
@@ -13,6 +13,6 @@ process.stdout.write(
13
13
  JSON.stringify({
14
14
  decision: "block",
15
15
  reason:
16
- "fab init 已经收集完当前仓库的初始化依据,但后续初始化还没完成。请先确认 Codex 已启用 features.codex_hooks = true,然后查看 .fabric/forensic.json 和 .fabric/bootstrap/README.md,并使用仓库内的 .agents/skills/fabric-init/SKILL.md 继续初始化。",
16
+ "fab init 已经收集完当前仓库的初始化依据,但后续初始化还没完成。请先确认 Codex 已启用 features.codex_hooks = true,然后查看 .fabric/forensic.json 和 .fabric/bootstrap/README.md,并使用仓库内的 .codex/skills/fabric-init/SKILL.md 继续初始化。",
17
17
  }),
18
18
  );