@fractaal/pi-fractal-compact
Ben/Fractal high-fidelity compaction extension for Pi.
Package details
Install @fractaal/pi-fractal-compact from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@fractaal/pi-fractal-compact- Package
@fractaal/pi-fractal-compact- Version
0.1.2- Published
- Sep 9, 2026
- Downloads
- 809/mo · 337/wk
- Author
- fractaal
- License
- MIT
- Types
- extension
- Size
- 48.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@fractaal/pi-fractal-compact
Canonical package for Ben/Fractal's high-fidelity compaction hook.
It replaces stock compaction with a methodology-preserving summary prompt and also emits ALR-compatible compaction status events when an event bus is present.
When Pi supplies session_before_compact.summarizeNativeContext, the extension
uses that checkpoint-aware callback with its existing Fractal prompt instead of
making a tail-only provider request. Pi owns checkpoint replay, cancellation,
and the successful plaintext checkpoint transition. Ordinary compaction keeps
using the registered provider when no native callback is supplied.