feat(hldp): replace Codex bulk recovery with recursive causal root
This commit is contained in:
parent
aa3ab774cd
commit
a483b2a1b9
14 changed files with 499 additions and 49 deletions
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env node
|
||||
import fs from "node:fs";
|
||||
import { bootstrap } from "./hldp-memory.mjs";
|
||||
|
||||
let input = {};
|
||||
try {
|
||||
const raw = fs.readFileSync(0, "utf8").trim();
|
||||
if (raw) input = JSON.parse(raw);
|
||||
} catch {
|
||||
input = {};
|
||||
}
|
||||
|
||||
const eventName = input.hook_event_name ?? input.hookEventName ?? "SessionStart";
|
||||
if (eventName !== "SessionStart") process.exit(0);
|
||||
|
||||
const protocolRoot = process.env.HLDP_PROTOCOL_ROOT ?? "hldp/HLDP-RUNTIME-ROOT-v1.0.hdlp";
|
||||
process.stdout.write(JSON.stringify({
|
||||
hookSpecificOutput: {
|
||||
hookEventName: "SessionStart",
|
||||
additionalContext: bootstrap(protocolRoot)
|
||||
}
|
||||
}));
|
||||
Loading…
Reference in a new issue