pi-retention
v0.1.5
Published
Local retention tracker for Pi skills and extensions.
Readme
Pi Retention
Local retention tracker for Pi skills and extensions.
What this is
Pi Retention counts local usage, surfaces expired items, and quarantines one stale item at a time on startup.
Startup behavior
On each Pi launch, Pi Retention evaluates expired active roots and may prompt for at most one quarantine candidate.
- Ordering: earliest
dueAtwins; ties break on oldestlastUsedAt(age). - Deny: declining the prompt changes nothing; the same candidate is offered on the next launch.
- Excluded: pinned (
P), quarantined (Q), self-protected, and not-yet-due roots never appear in the startup prompt. - Report:
/retention:reportuses the same ordering and labels the startup candidate explicitly.
See ROADMAP.md for MVP scope and non-goals.
Features
- Tracks usage locally per artifact root
- Reports stale and protected items
- Prompts once per startup for the oldest expired candidate (due date, then age)
- Report rows show
A/!/P/Qstatus and the single startup candidate - Quarantines approved items before manual purge
- Keeps retention data local
Commands
retention:init— initialize the manifest for the current projectretention:report— show all tracked rootsretention:confirm— quarantine the oldest expired candidateretention:restore— restore one quarantined itemretention:purge— permanently delete one quarantined itemretention:pin/retention:unpin— protect or release one item
Data files
.pi-retention-project.yaml— project manifest.pi-retention.yaml— per-root sidecar.pi-retention.jsonl— append-only usage log.pi-retention-trash/— quarantine area
Install
Install the published npm package with Pi:
pi install npm:pi-retentionPin a specific version when you want reproducible installs:
pi install npm:[email protected]Install into the current project instead of your user Pi settings:
pi install npm:pi-retention -lOr install from GitHub:
pi install git:github.com/eiei114/pi-retentionTry it without permanently installing:
pi -e npm:pi-retentionQuick start
Try this package locally from a clone:
pi -e .Then run:
/retention:reportOn startup, Pi Retention checks the single oldest expired candidate and asks once before quarantine. Declining the prompt leaves the item active for the next launch.
Package contents
Published tarball includes:
| Path | Purpose |
|---|---|
| extensions/ | Pi TypeScript extension entrypoints |
| lib/ | Shared TypeScript helpers |
| docs/ | Supporting docs (examples.md, release.md) |
| README.md | Project entrypoint |
| ROADMAP.md | MVP scope and non-goals |
| CHANGELOG.md | Release history |
| LICENSE | MIT license |
Development
npm install
npm run cinpm run ci runs typecheck, tests, and npm run pack:check (npm pack --dry-run) to verify the published tarball contents before release.
Release
Before tagging, confirm package readiness:
npm run ci
npm run pack:checkThen bump and push:
npm version patch
git pushSee docs/release.md for Trusted Publishing setup.
Docs
Security
Pi packages can execute code with your local permissions. Review extensions before installing third-party packages.
For vulnerability reporting, see SECURITY.md.
Links
- npm: https://www.npmjs.com/package/pi-retention
- GitHub: https://github.com/eiei114/pi-retention
- Issues: https://github.com/eiei114/pi-retention/issues
CONTRIBUTING.mdCODE_OF_CONDUCT.mdCHANGELOG.md
License
MIT
