From 6b3ec285d84d94dc8125f648ff14663f1143c705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Andr=C3=A9?= Date: Sun, 26 Jul 2026 17:09:06 +0000 Subject: [PATCH] fix(tools): DeriveDenyHashes creates its output dir before writing (unblocks DerivedSync) --- LifeOS/install/LIFEOS/TOOLS/DeriveDenyHashes.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LifeOS/install/LIFEOS/TOOLS/DeriveDenyHashes.ts b/LifeOS/install/LIFEOS/TOOLS/DeriveDenyHashes.ts index 2d1303fbe2..b91ef6969d 100755 --- a/LifeOS/install/LIFEOS/TOOLS/DeriveDenyHashes.ts +++ b/LifeOS/install/LIFEOS/TOOLS/DeriveDenyHashes.ts @@ -28,9 +28,9 @@ * token, so filtering here keeps the scan precise. Tune ALLOWLIST/STOPWORDS with * --show-tokens. */ -import { readFileSync, writeFileSync, existsSync, appendFileSync, readdirSync } from "node:fs"; +import { readFileSync, writeFileSync, existsSync, appendFileSync, readdirSync, mkdirSync } from "node:fs"; import { homedir } from "node:os"; -import { join } from "node:path"; +import { join, dirname } from "node:path"; import { createHash, randomBytes } from "node:crypto"; const HOME = process.env.HOME || homedir(); @@ -198,6 +198,7 @@ function main(): void { note: "Salted hashes of distinctive private tokens. No plaintext. Salt in .env (never ships).", hashes, }; + mkdirSync(dirname(OUT_PATH), { recursive: true }); // self-create output dir (e.g. skills/_LIFEOS absent on a fresh/partial install) writeFileSync(OUT_PATH, JSON.stringify(payload, null, 0) + "\n"); console.log(`[DeriveDenyHashes] wrote ${hashes.length} salted hashes -> ${OUT_PATH} (no plaintext)`); }