Files
joelhooks__joelclaw/packages/pi-extensions/package.json
Joel Hooks bc84726e0c feat(memory): pi extension — memory-capture (Rule 8 parity with claude-code)
Mirrors scripts/joelclaw-capture-session.ts but as a native pi extension
using the official extension API (ExtensionAPI.on). Same semantics:

  - Fires on every turn_end event (one Run per invocation, Rule 3)
  - Delta-only capture via ~/.joelclaw/session-state.json (keyed by
    pi session_id), same state file the claude-code hook uses so both
    runtimes coexist cleanly
  - parent_run_id linkage across turns within a session (tree builds
    automatically)
  - Never throws; errors go to ~/.joelclaw/capture.log
  - Network failures outbox to ~/.joelclaw/outbox/<run-id>.json
  - Also fires on session_shutdown to sweep any trailing bytes after
    the last turn_end

Access to the live jsonl path + session id via ctx.sessionManager
(getSessionFile + getSessionId). tags[] marks the trigger
(turn_end | session_shutdown) for diagnostic filtering.

Installation:
  packages/pi-extensions/package.json's pi.extensions array now lists
  ./memory-capture/index.ts alongside the existing inngest-monitor.
  Symlinked into ~/.pi/agent/extensions/memory-capture.

Next pi session you start will pick it up. Verify with:
  joelclaw-runs-tree --runtime=pi --since=1h

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 19:15:55 -07:00

21 lines
416 B
JSON

{
"name": "@joelclaw/pi-extensions",
"version": "0.1.0",
"type": "module",
"private": true,
"pi": {
"extensions": [
"./inngest-monitor/index.ts",
"./memory-capture/index.ts"
]
},
"dependencies": {
"@mariozechner/pi-coding-agent": "~0.52.12",
"@mariozechner/pi-tui": "~0.52.12",
"@sinclair/typebox": "^0.34.33"
},
"devDependencies": {
"typescript": "5.9.2"
}
}