feat(hldp): replace Codex bulk recovery with recursive causal root

This commit is contained in:
冰朔 2026-08-15 15:11:37 +08:00
commit a483b2a1b9
14 changed files with 499 additions and 49 deletions

View file

@ -0,0 +1,18 @@
# Codex HLDP recursive memory
This is a deliberately small, non-blocking implementation of the HLDP v1 runtime root.
- `bootstrap`: emits at most 2 KiB of protocol navigation, never memory content.
- `verify`: validates a recursively addressed causal tree and the 10-child limit.
- `route`: ranks only the current node's child summaries and returns at most three paths.
- `read-node`: reads one selected node with a hard byte limit.
The optional Codex hook is valid only for `SessionStart`. There are intentionally no user-prompt, tool-use, pre-compact, or post-compact hooks.
```bash
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs bootstrap
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs verify --tree memory.json
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs route --tree memory.json --query "why did the plan change"
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs read-node --tree memory.json --path root/decision
node --test server-tools/codex-hldp-recursive-memory/hldp-memory.test.mjs
```