{"_id":"@bugabinga/pi-ext-prune","name":"@bugabinga/pi-ext-prune","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bugabinga/pi-ext-prune","version":"0.1.0","description":"Lossless conversation compactor for pi","type":"module","main":"index.ts","scripts":{"test":"bun test ./__tests__/*.test.ts","test:watch":"bun test ./__tests__/*.test.ts --watch","test:unit":"bun test ./__tests__/extract.test.ts ./__tests__/format.test.ts ./__tests__/merge.test.ts ./__tests__/recall.test.ts","test:harness":"bun test ./__tests__/harness.test.ts","test:real":"PRUNE_REAL=1 bun test ./__tests__/real/*.test.ts --timeout 120000","test:all":"bun run test && bun run test:real","test:coverage":"bun test ./__tests__/*.test.ts --coverage"},"keywords":["pi","extension","compaction","memory","pi-extension"],"license":"MIT","peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":"*","typebox":"*"},"devDependencies":{"@marcfargas/pi-test-harness":"git+ssh://git@github.com/bugabinga/pi-test-harness.git#0cb5ce5f10fb18c9a80e904e2e3310cc98a28e29"},"gitHead":"a40a427fabf644375d6aab393ae450e15079f5b5","_id":"@bugabinga/pi-ext-prune@0.1.0","_nodeVersion":"26.1.0","_npmVersion":"11.14.1","dist":{"integrity":"sha512-RLjmkLxRh4PC2RjlqsN48AjBLqejl9ievsYz8hTwFwzyPs5gYShjm0t0zqqlY0gEOapSgxyP/OOHhsShjpbtBQ==","shasum":"1c7ce91f8730dc205a1b7b649a0cc3c4fb31caf3","tarball":"https://registry.npmjs.org/@bugabinga/pi-ext-prune/-/pi-ext-prune-0.1.0.tgz","fileCount":21,"unpackedSize":419698,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBHq67vFb1LiPuy43Dsob2Iegfy0XKgk12h0QgIFgm0xAiAP3lJisQlEb4+kcp74Ow/D6ZhwT1ShO+uk2fR/2tVyeA=="}]},"_npmUser":{"name":"bugabinga","email":"oliver+npm@bugabinga.net"},"directories":{},"maintainers":[{"name":"bugabinga","email":"oliver+npm@bugabinga.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-ext-prune_0.1.0_1779328455696_0.22844923405568207"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-21T01:54:15.528Z","0.1.0":"2026-05-21T01:54:16.056Z","modified":"2026-05-21T01:54:16.285Z"},"maintainers":[{"name":"bugabinga","email":"oliver+npm@bugabinga.net"}],"description":"Lossless conversation compactor for pi","keywords":["pi","extension","compaction","memory","pi-extension"],"license":"MIT","readme":"# prune — Lossless Conversation Compactor\n\n> Trim conversation to essentials. Search everything.\n\n## Overview\n\n`prune` is a deterministic compaction extension for pi:\n\n- structured sections for goals, files, blockers, preferences\n- brief transcript with stable `#N` refs\n- raw JSONL recall via `prune_recall` after prune compaction\n- no LLM call for compaction summary\n\n## Commands\n\n| Command | Description |\n|----------|-------------|\n| `/prune` | Run compaction now |\n| `/prune-recall <query>` | Search session history |\n\n## Tool\n\n`prune_recall` is registered but only exposed to the agent after a prune compaction exists in the current branch.\n\n```typescript\nprune_recall({ query: \"auth token\" })\nprune_recall({ query: \"auth token\", scope: \"all\" })\nprune_recall({ query: \"auth token\", expand: [12, 14] })\n```\n\n## Output Format\n\n```text\n[Session Goal]\n- Fix the auth bug\n- [Scope change]\n- also update token refresh logic\n\n[Files And Changes]\n- Modified: session.ts\n\n[Outstanding Context]\n- lint still failing\n\n---\n[user]\nFix the auth bug (#1)\n* read \"src/auth/session.ts\" (#3)\n\nUse prune_recall to search for prior work, decisions, and context from before this summary.\nDo not redo work already completed.\n```\n\n## Testing\n\n```bash\nbun install\n\nbun test              # fast default: unit + harness, no network\nbun run test:unit     # pure funcs only\nbun run test:harness  # pi-test-harness extension wiring\nbun run test:watch    # watch fast tests\nbun run test:coverage # coverage for fast tests\n\nbun run test:real     # real MiniMax integ test, costs quota\nbun run test:all      # fast tests + real MiniMax\n```\n\nNotes:\n\n- `bun test` intentionally excludes `__tests__/real/` → no skipped real test in normal runs.\n- `test:real` uses only MiniMax, temp cwd/agentDir/session, `noExtensions: true`, only prune loaded.\n\n## Demo\n\n<!-- demo:prune_suite:start -->\n![Prune recall](assets/prune_suite.gif)\n<!-- demo:prune_suite:end -->\n","readmeFilename":"README.md","_rev":"1-4b61bd2882d55fe2d946e9afc11cded1"}