@ovftank/pi-compact

OpenCode compaction style for pi

Packages

Package details

extension

Install @ovftank/pi-compact from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@ovftank/pi-compact
Package
@ovftank/pi-compact
Version
1.0.0
Published
Aug 6, 2026
Downloads
149/mo · 11/wk
Author
ovftank
License
MIT
Types
extension
Size
39 KB
Dependencies
0 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-compact

OpenCode compaction style for pi.

Install

pi install git:github.com/ovftank/pi-compact@v1.0.0

Settings

Defaults apply unless overridden. Change only the keys you need in ~/.pi/agent/pi-compact-config.json (or $PI_COMPACT_CONFIG_PATH):

Key Default Meaning
model "" Summary model "provider/modelId"; empty = conversation model
fallbackModels [] Backup models tried in order if the primary fails
maxTokens 4096 Summary output budget
overflowMaxTokens 2048 Smaller output budget for overflow recovery
maxRetries 2 Retries on transient LLM errors
warnAfterCompact true Warn that long threads may reduce accuracy
continueAfterCompact false Send a continuation after automatic compaction
pruneEnabled true Prune old tool outputs before every LLM request
pruneKeepTurns 2 Protect tool outputs from the last 2 user turns
enabled true Master switch; false restores built-in compaction
debug false Write one debug snapshot for each compaction

License

MIT. See LICENSE.