@rafinery/cli 0.8.8 → 0.8.10

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.
@@ -26,12 +26,26 @@ try {
26
26
  if (process.env.RAFA_HOOKS_DISABLED === "1") process.exit(0);
27
27
  if (process.argv[4] !== "1") process.exit(0);
28
28
  if (!existsSync(join(ROOT, "rafa.json"))) process.exit(0);
29
- if (!existsSync(join(ROOT, ".rafa", ".git"))) process.exit(0);
30
29
 
31
30
  const sh = (cmd, cwd = ROOT, timeout) =>
32
31
  execSync(cmd, { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], ...(timeout ? { timeout } : {}) }).trim();
33
32
  const shR = (cmd, timeout) => sh(cmd, join(ROOT, ".rafa"), timeout);
34
33
 
34
+ // SELF-HEAL (owner 2026-07-23): a repo with rafa.json but no materialized .rafa
35
+ // instance must still mirror — "clone → just works" means the FIRST branch checkout
36
+ // bootstraps the lazy .rafa itself (same npx precedent as the pre-push checkpoint
37
+ // hook), bounded so a checkout can never hang. A bootstrap failure degrades to the
38
+ // old silent no-op — a checkout must never break.
39
+ if (!existsSync(join(ROOT, ".rafa", ".git"))) {
40
+ try {
41
+ console.error("rafa · no local .rafa instance — bootstrapping (one-time) …");
42
+ sh("npx -y @rafinery/cli pull", ROOT, 90000);
43
+ } catch {
44
+ process.exit(0);
45
+ }
46
+ if (!existsSync(join(ROOT, ".rafa", ".git"))) process.exit(0);
47
+ }
48
+
35
49
  const branch = sh("git rev-parse --abbrev-ref HEAD");
36
50
  if (branch === "HEAD") process.exit(0); // detached — no mirror
37
51
  if (!/^[A-Za-z0-9._/-]+$/.test(branch)) process.exit(0);
File without changes
File without changes
File without changes
package/lib/releases.mjs CHANGED
@@ -245,6 +245,25 @@ export const RELEASES = [
245
245
  "sha and mints the node (brain ↔ code). Merges need NOT be PR-driven: a plain " +
246
246
  "`git merge` + push to main reconciles too. `rafa update` re-vendors the scan SOP.",
247
247
  },
248
+ {
249
+ version: "0.8.10",
250
+ contract: 1,
251
+ plans: 2,
252
+ requires: "update",
253
+ summary:
254
+ "(0.8.7/0.8.9 were unusable publishes — npm shipped the `workspace:*` dep " +
255
+ "literally; both unpublished, `pnpm publish` is the only publish path.) " +
256
+ "FRESH-SLATE BRANCH MIRRORING: a NEW code branch's brain-mirror branch is cut " +
257
+ "FROM THE REMOTE TRUNK (the published org brain; fetched fresh, offline-safe " +
258
+ "fallback ladder) — never from whatever branch the local .rafa mirror sat on. " +
259
+ "No session leftovers cross branches, local-vs-remote drift can't leak into a " +
260
+ "new branch, and the branch's diff vs trunk stays exactly what the branch " +
261
+ "captured. Switching TO the trunk ff-freshens it from remote (divergence stays " +
262
+ "loud — `rafa pull --full --force` is the explicit adopt). SELF-HEAL: a repo " +
263
+ "with rafa.json but no materialized .rafa bootstraps it automatically on the " +
264
+ "first branch checkout (bounded; a failure never breaks the checkout). " +
265
+ "`rafa update` re-vendors the post-checkout hook.",
266
+ },
248
267
  ];
249
268
 
250
269
  // The release this CLI build ships (last entry).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rafinery/cli",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "description": "rafa — 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": {
@@ -17,11 +17,16 @@
17
17
  "node": ">=18"
18
18
  },
19
19
  "dependencies": {
20
- "@rafinery/okf": "0.1.1"
20
+ "@rafinery/okf": "workspace:*"
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
25
+ "scripts": {
26
+ "bundle": "node scripts/bundle-blueprint.mjs",
27
+ "prepare": "node scripts/bundle-blueprint.mjs",
28
+ "test": "node --test"
29
+ },
25
30
  "keywords": [
26
31
  "rafa",
27
32
  "rafinery",
@@ -37,9 +42,5 @@
37
42
  "url": "git+https://github.com/rafinery-ai/rafinery.git",
38
43
  "directory": "packages/cli"
39
44
  },
40
- "homepage": "https://github.com/rafinery-ai/rafinery/tree/main/packages/cli",
41
- "scripts": {
42
- "bundle": "node scripts/bundle-blueprint.mjs",
43
- "test": "node --test"
44
- }
45
- }
45
+ "homepage": "https://github.com/rafinery-ai/rafinery/tree/main/packages/cli"
46
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License
2
-
3
- Copyright (c) Atai Barkai
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.