Pi package for capturing Pi coding-agent sessions with re_gent.
The extension subscribes to Pi lifecycle events and forwards normalized session, prompt, tool, and assistant-finalization payloads to:
rgt pi-hookrgt pi-hook performs the actual re_gent recording. The extension only observes Pi events and runs the hook process; it does not change tool calls or tool results.
-
Pi with package support.
-
The
rgtbinary available onPATH. -
A repository initialized for re_gent capture, usually with:
rgt init --agent pi
If .regent/ is absent, rgt pi-hook is expected to no-op, so normal Pi usage should continue.
Install project-locally from the GitHub package source:
pi install -l git:github.com/MegaGrindStone/regent-pi-extensionProject-local install writes to .pi/settings.json, so Pi can load the package for that repository.
Run Pi with this checkout as a temporary extension package:
pi -e /home/gs/repository/regent-pi-extensionUseful package commands:
npm install
npm test
npm run typecheck
npm run checkThe extension maps Pi events to the rgt pi-hook payload shape:
session_start→SessionStartbefore_agent_start→UserPromptSubmittool_result→PostToolUseagent_end/ guardedsession_shutdown→Stop
It preserves structured tool input and result data where Pi exposes it, including content, details, and isError.
rgtmissing: ensurergtis onPATHbefore starting Pi. The extension logs a diagnostic if the hook process cannot be spawned.- Hook exits non-zero: run
rgt pi-hooktroubleshooting from the target repository and inspect.regent/log/hook-error.logif.regent/exists. - No
.regent/directory: initialize the repository withrgt init --agent pi. Without.regent/, the hook should silently no-op. - No captured context: after a Pi prompt that uses at least one tool, run
rgt log,rgt show, orrgt blamein the repository and look for apiorigin step.