@fenglimg/fabric-cli 1.5.0 → 1.5.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/README.md CHANGED
@@ -1,19 +1,19 @@
1
1
  # @fenglimg/fabric-cli
2
2
 
3
- `fabric` is the primary CLI binary for Fabric. `fab` is a permanent alias, so you can use either binary.
3
+ `fabric` Fabric 的主命令,`fab` 是永久别名,两者等价。
4
4
 
5
- ## Quick Start
6
-
7
- 1. Install dependencies from the monorepo root with `pnpm install`.
8
- 2. Build the CLI with `pnpm --filter @fenglimg/fabric-cli build`.
9
- 3. Run `fabric init` in the target project for the one-shot setup flow.
10
- 4. Start `fabric serve` and verify `fab_get_rules` in your client.
11
-
12
- `fabric init` auto-runs `bootstrap install`, `config install`, and `hooks install`. Use them standalone only for targeted re-runs.
5
+ ## 快速开始
6
+
7
+ 1. monorepo 根目录运行 `pnpm install`。
8
+ 2. `pnpm --filter @fenglimg/fabric-cli build` 构建 CLI。
9
+ 3. 在目标项目运行 `fabric init`,完成一站式初始化。
10
+ 4. 启动 `fabric serve`,再去客户端里验证 `fab_get_rules`。
11
+
12
+ `fabric init` 会自动执行 `bootstrap install`、`config install` `hooks install`。只有在需要单独重跑某个阶段时,才需要单独调用它们。
13
13
 
14
- `fabric bootstrap install` refreshes the internal bootstrap guide at `.fabric/bootstrap/README.md`. It does not generate root `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md`.
14
+ `fabric bootstrap install` 只会刷新 `.fabric/bootstrap/README.md` 里的内部初始化说明,不会再生成根级 `AGENTS.md`、`CLAUDE.md` `GEMINI.md`。
15
15
 
16
- ## Common Commands
16
+ ## 常用命令
17
17
 
18
18
  - `fabric init`
19
19
  - `fabric serve`
@@ -21,10 +21,10 @@
21
21
  - `fabric approve --interactive`
22
22
  - `fabric approve --all`
23
23
 
24
- ## Advanced Commands
24
+ ## 进阶命令
25
25
 
26
26
  - `fabric bootstrap install`
27
27
  - `fabric config install`
28
28
  - `fabric hooks install`
29
29
 
30
- `fabric approve` updates drifted entries in `.fabric/human-lock.json` after review. Use `--interactive` for per-entry confirmation and `--all` only when drift has already been reviewed elsewhere.
30
+ `fabric approve` 会在审查完成后更新 `.fabric/human-lock.json` 中已经发生漂移的条目。需要逐项确认时使用 `--interactive`,只有在别处已经完成审查时才使用 `--all`。
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import { defineCommand, runMain } from "citty";
9
9
  // src/commands/index.ts
10
10
  var allCommands = {
11
11
  approve: () => import("./approve-YT4DEABS.js").then((module) => module.default),
12
- init: () => import("./init-YR7EVBYQ.js").then((module) => module.default),
12
+ init: () => import("./init-QPKI2QOW.js").then((module) => module.default),
13
13
  update: () => import("./update-M5M5PYKE.js").then((module) => module.default),
14
14
  scan: () => import("./scan-QH76LC7Z.js").then((module) => module.default),
15
15
  serve: () => import("./serve-4J2CQY25.js").then((module) => module.default),
@@ -33,7 +33,7 @@ var allCommands = {
33
33
  var main = defineCommand({
34
34
  meta: {
35
35
  name: "fabric",
36
- version: "1.5.0",
36
+ version: "1.5.1",
37
37
  description: 'Initialize and manage Fabric projects. Use "fabric init" for one-shot setup.'
38
38
  },
39
39
  subCommands: allCommands
@@ -1147,7 +1147,7 @@ function readProjectName(target) {
1147
1147
  return basename(target);
1148
1148
  }
1149
1149
  function getCliVersion() {
1150
- return true ? "1.5.0" : "unknown";
1150
+ return true ? "1.5.1" : "unknown";
1151
1151
  }
1152
1152
  function sortRecord(record) {
1153
1153
  return Object.fromEntries(Object.entries(record).sort(([left], [right]) => left.localeCompare(right)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fenglimg/fabric-cli",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "fab": "dist/index.js",
@@ -22,8 +22,8 @@
22
22
  "tree-sitter-javascript": "^0.25.0",
23
23
  "tree-sitter-typescript": "^0.23.2",
24
24
  "web-tree-sitter": "^0.26.8",
25
- "@fenglimg/fabric-server": "1.5.0",
26
- "@fenglimg/fabric-shared": "1.5.0"
25
+ "@fenglimg/fabric-server": "1.5.1",
26
+ "@fenglimg/fabric-shared": "1.5.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/iarna__toml": "^2.0.5",
@@ -13,7 +13,7 @@ process.stdout.write(
13
13
  JSON.stringify({
14
14
  hookSpecificOutput: {
15
15
  additionalContext:
16
- "Fabric initialization is still pending in this repository. Read .fabric/forensic.json, .fabric/bootstrap/README.md, and use the repo skill at .agents/skills/fabric-init/SKILL.md before proceeding. If Codex hooks are not firing, ensure features.codex_hooks = true is enabled in your Codex config.",
16
+ "这个仓库的 Fabric 初始化还没完成。继续操作前,请先查看 .fabric/forensic.json .fabric/bootstrap/README.md,并使用仓库内的 .agents/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 has collected Fabric evidence, but initialization follow-up is still pending. Ensure features.codex_hooks = true is enabled, then use the repo skill at .agents/skills/fabric-init/SKILL.md and review .fabric/forensic.json plus .fabric/bootstrap/README.md before continuing.",
16
+ "fab init 已经收集完当前仓库的初始化依据,但后续初始化还没完成。请先确认 Codex 已启用 features.codex_hooks = true,然后查看 .fabric/forensic.json .fabric/bootstrap/README.md,并使用仓库内的 .agents/skills/fabric-init/SKILL.md 继续初始化。",
17
17
  }),
18
18
  );
@@ -1,27 +1,27 @@
1
1
  ---
2
2
  name: fabric-init
3
- description: Use this skill when `.fabric/forensic.json` exists and Fabric initialization follow-up still needs to be completed for this repository.
3
+ description: Use this skill when `.fabric/forensic.json` exists and this repository still needs the remaining Fabric initialization steps.
4
4
  ---
5
5
 
6
- ## Hard Rules (DO NOT TRANSLATE)
6
+ ## Hard Rules (不要翻译受保护 token)
7
7
 
8
- MUST: Read `.fabric/forensic.json` before taking any other action.
9
- MUST: Treat `.fabric/bootstrap/README.md` as the current bootstrap contract for this repository.
10
- MUST: If `.fabric/init-context.json` already exists, stop and report that initialization follow-up appears complete.
11
- MUST: Use evidence from `.fabric/forensic.json` and the repository layout to guide the initialization follow-up.
8
+ MUST: 先读取 `.fabric/forensic.json`,再做其他动作。
9
+ MUST: `.fabric/bootstrap/README.md` 视为当前仓库的初始化说明。
10
+ MUST: 如果 `.fabric/init-context.json` 已存在,立即停止并报告当前仓库看起来已经完成后续初始化。
11
+ MUST: 使用 `.fabric/forensic.json` 和仓库结构中的依据,判断接下来该做什么。
12
12
  MUST: Preserve protected tokens exactly: `AGENTS.md`, `FABRIC.md`, `.fabric/agents.meta.json`, `.fabric/human-lock.json`, `.fabric/init-context.json`, `.fabric/forensic.json`, `MUST`, `NEVER`.
13
- NEVER: Claim initialization is complete without checking `.fabric/init-context.json`.
14
- NEVER: Rewrite or translate protected tokens.
15
- NEVER: ignore `.fabric/bootstrap/README.md` while deciding next initialization steps.
13
+ NEVER: 在没有检查 `.fabric/init-context.json` 的情况下声称初始化已经完成。
14
+ NEVER: 改写或翻译受保护 token。
15
+ NEVER: 在判断下一步初始化动作时忽略 `.fabric/bootstrap/README.md`。
16
16
 
17
17
  ## Purpose
18
18
 
19
- Use this skill after `fab init` when Codex is working inside the repository and Fabric's evidence pack already exists. The goal is to continue the repository-specific initialization workflow using the generated forensic evidence and bootstrap contract.
19
+ 当你在 Codex 中处理这个仓库,并且 `fab init` 已经生成 `.fabric/forensic.json` 时,使用这个 skill 继续完成仓库专属的 Fabric 初始化。目标是基于当前仓库的初始化依据和内部说明,明确下一步该做什么,而不是重新解释一遍通用流程。
20
20
 
21
21
  ## Workflow
22
22
 
23
- 1. Read `.fabric/forensic.json`.
24
- 2. Read `.fabric/bootstrap/README.md`.
25
- 3. Check whether `.fabric/init-context.json` exists.
26
- 4. If initialization is still pending, summarize the next repository-specific initialization actions Codex should take.
27
- 5. Keep the guidance tightly scoped to Fabric initialization follow-up for this repository.
23
+ 1. 读取 `.fabric/forensic.json`。
24
+ 2. 读取 `.fabric/bootstrap/README.md`。
25
+ 3. 检查 `.fabric/init-context.json` 是否已经存在。
26
+ 4. 如果初始化仍未完成,明确总结当前仓库接下来要做的初始化动作。
27
+ 5. 只讨论这个仓库的后续初始化,不扩展到无关建议。