@fenglimg/fabric-cli 1.3.1 → 1.4.0
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/{bootstrap-3PUKUYTY.js → bootstrap-B6RCVJZJ.js} +2 -2
- package/dist/{chunk-VOQKQ6W2.js → chunk-BEKSXO5N.js} +10 -2
- package/dist/{chunk-XFSQM3LJ.js → chunk-BVTMVW5M.js} +1 -1
- package/dist/{chunk-TKTWHAKV.js → chunk-XQYY2U2C.js} +1 -1
- package/dist/{config-GINBGANU.js → config-EC5L2QNI.js} +2 -2
- package/dist/index.js +5 -5
- package/dist/{init-T3LGMGAO.js → init-QC2MLFHR.js} +770 -253
- package/dist/{update-AN3FYF2O.js → update-FY2WKWPB.js} +2 -2
- package/package.json +4 -3
- package/templates/codex-hooks/fabric-session-start.cjs +19 -0
- package/templates/codex-hooks/fabric-stop-reminder.cjs +18 -0
- package/templates/codex-skills/fabric-init/SKILL.md +27 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fenglimg/fabric-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"fab": "dist/index.js",
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
"templates"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
+
"@clack/prompts": "^1.2.0",
|
|
16
17
|
"@iarna/toml": "^2.2.5",
|
|
17
18
|
"citty": "^0.2.2",
|
|
18
19
|
"minimatch": "^10.0.1",
|
|
19
20
|
"picocolors": "^1.1.1",
|
|
20
21
|
"string-width": "^7.2.0",
|
|
21
|
-
"@fenglimg/fabric-
|
|
22
|
-
"@fenglimg/fabric-
|
|
22
|
+
"@fenglimg/fabric-server": "1.4.0",
|
|
23
|
+
"@fenglimg/fabric-shared": "1.4.0"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/iarna__toml": "^2.0.5",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { existsSync } = require("node:fs");
|
|
3
|
+
const { join } = require("node:path");
|
|
4
|
+
|
|
5
|
+
const forensicPath = join(process.cwd(), ".fabric", "forensic.json");
|
|
6
|
+
const initContextPath = join(process.cwd(), ".fabric", "init-context.json");
|
|
7
|
+
|
|
8
|
+
if (!existsSync(forensicPath) || existsSync(initContextPath)) {
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
process.stdout.write(
|
|
13
|
+
JSON.stringify({
|
|
14
|
+
hookSpecificOutput: {
|
|
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.",
|
|
17
|
+
},
|
|
18
|
+
}),
|
|
19
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { existsSync } = require("node:fs");
|
|
3
|
+
const { join } = require("node:path");
|
|
4
|
+
|
|
5
|
+
const forensicPath = join(process.cwd(), ".fabric", "forensic.json");
|
|
6
|
+
const initContextPath = join(process.cwd(), ".fabric", "init-context.json");
|
|
7
|
+
|
|
8
|
+
if (!existsSync(forensicPath) || existsSync(initContextPath)) {
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
process.stdout.write(
|
|
13
|
+
JSON.stringify({
|
|
14
|
+
decision: "block",
|
|
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.",
|
|
17
|
+
}),
|
|
18
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Hard Rules (DO NOT TRANSLATE)
|
|
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.
|
|
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.
|
|
16
|
+
|
|
17
|
+
## Purpose
|
|
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.
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
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.
|