Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

regent-pi-extension

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-hook

rgt 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.

Requirements

  • Pi with package support.

  • The rgt binary available on PATH.

  • 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

Install project-locally from the GitHub package source:

pi install -l git:github.com/MegaGrindStone/regent-pi-extension

Project-local install writes to .pi/settings.json, so Pi can load the package for that repository.

Local development

Run Pi with this checkout as a temporary extension package:

pi -e /home/gs/repository/regent-pi-extension

Useful package commands:

npm install
npm test
npm run typecheck
npm run check

What is captured

The extension maps Pi events to the rgt pi-hook payload shape:

  • session_start → SessionStart
  • before_agent_start → UserPromptSubmit
  • tool_result → PostToolUse
  • agent_end / guarded session_shutdown → Stop

It preserves structured tool input and result data where Pi exposes it, including content, details, and isError.

Troubleshooting

  • rgt missing: ensure rgt is on PATH before starting Pi. The extension logs a diagnostic if the hook process cannot be spawned.
  • Hook exits non-zero: run rgt pi-hook troubleshooting from the target repository and inspect .regent/log/hook-error.log if .regent/ exists.
  • No .regent/ directory: initialize the repository with rgt 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, or rgt blame in the repository and look for a pi origin step.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages