@rafinery/cli 0.4.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -4,6 +4,21 @@ The machine-readable version of this lives in [`lib/releases.mjs`](lib/releases.
4
4
  CLI reads it to tell a client, on `rafa update`, exactly what an upgrade requires (nothing,
5
5
  a re-scan, or a `rafa migrate`).
6
6
 
7
+ ## 0.4.1
8
+
9
+ **Adopt with:** `npx @rafinery/cli@latest <cmd>` — no file re-sync needed (the fix is inside
10
+ the CLI, which is the point of the blueprint split: a broken gate tool is fixed by a version
11
+ bump, not a re-vendor).
12
+
13
+ - **Fix: `rafa checkpoint` crashed with `EISDIR`** on any repo with existing brain files.
14
+ `scanWorkingFiles` built each candidate's file path but pushed the enclosing DIRECTORY
15
+ path instead (variable shadowing), so checkpoint tried to `readFileSync` a directory.
16
+ Found by the owner during the research-canvas E2E — diagnosis was exact
17
+ (`lib/working-set.mjs`, the `abs` pushed from the outer loop). The scanner's variables
18
+ are now unambiguous (`dirAbs`/`fileAbs`); verified by reproduction: scan returns file
19
+ paths, `_*.md` and `.theirs.md` stay excluded, and checkpoint proceeds past the read
20
+ into the CAS sync.
21
+
7
22
  ## 0.4.0 — the working-set blueprint
8
23
 
9
24
  **Adopt with:** `npx @rafinery/cli@latest update` — it re-syncs the blueprint to the new
package/lib/releases.mjs CHANGED
@@ -92,6 +92,16 @@ export const RELEASES = [
92
92
  "Brain data schema UNCHANGED (no re-scan); the mechanical blueprint-split migration " +
93
93
  "cleans the old vendored files; re-push plans once through the new channel.",
94
94
  },
95
+ {
96
+ version: "0.4.1",
97
+ contract: 1,
98
+ plans: 1,
99
+ requires: "update",
100
+ summary:
101
+ "Fix: `rafa checkpoint` crashed with EISDIR for any repo with existing brain files — " +
102
+ "the working-set scanner returned the directory path instead of each file's path " +
103
+ "(variable shadowing in scanWorkingFiles). No schema change; no re-scan.",
104
+ },
95
105
  ];
96
106
 
97
107
  // The release this CLI build ships (last entry).
@@ -58,13 +58,13 @@ export function writeSidecar(cwd, data) {
58
58
  export function scanWorkingFiles(cwd) {
59
59
  const out = [];
60
60
  for (const dir of WORKING_DIRS) {
61
- const abs = join(cwd, ".rafa", dir);
62
- if (!existsSync(abs)) continue;
63
- for (const e of readdirSync(abs)) {
64
- const p = join(abs, e);
65
- if (statSync(p).isDirectory()) continue;
61
+ const dirAbs = join(cwd, ".rafa", dir);
62
+ if (!existsSync(dirAbs)) continue;
63
+ for (const e of readdirSync(dirAbs)) {
64
+ const fileAbs = join(dirAbs, e);
65
+ if (statSync(fileAbs).isDirectory()) continue;
66
66
  if (!e.endsWith(".md") || e.startsWith("_") || e.endsWith(".theirs.md")) continue;
67
- out.push({ path: `${dir}/${e}`, abs });
67
+ out.push({ path: `${dir}/${e}`, abs: fileAbs });
68
68
  }
69
69
  }
70
70
  return out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rafinery/cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "rafa \u2014 the AI engineer CLI. Vendors the rafa blueprint into your repo (shadcn-style) and runs the deterministic contract gates.",
5
5
  "type": "module",
6
6
  "bin": {