{"_id":"@davehardy20/pi-compact-plus","_rev":"9-f1b4ad8502c4c01eeb1b6919c69fff19","name":"@davehardy20/pi-compact-plus","dist-tags":{"latest":"0.1.9"},"versions":{"0.1.0":{"name":"@davehardy20/pi-compact-plus","version":"0.1.0","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.0","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"4e3ef67b5724f90005310f38bd5e9189aaff52d9","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.0.tgz","fileCount":16,"integrity":"sha512-3Jj+g3z92RkkEadJCW18BrUATEN+CFkcdNVRUUcTKvYQaLscS/zkqXlMKPRjxzBgjpX/31+u0cDYYMhsxsXEzQ==","signatures":[{"sig":"MEYCIQDJb0QcL33wj4EG1XxwP4YGcOIEksW9d9FhNSvW/cuEDwIhAMiMXHGWMdAJG936vKjvVtGs8zWUhTmp1lsD6J8F/HgE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":87061},"type":"module","gitHead":"583c7e543eb1fe65c0e31997e4437051871f457e","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.74.0","@earendil-works/pi-coding-agent":"^0.74.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.0_1779016861208_0.08774035627583832","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@davehardy20/pi-compact-plus","version":"0.1.1","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.1","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"096444bede80fa73f28071b655102cb604b5666c","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.1.tgz","fileCount":17,"integrity":"sha512-4cKVPEj5hKWfTru8GVha3T0fBkm5KTTUDiowU0ghYje0Br4NgKgq5jH6+ebaSXttOSrlIJHko3K4dUhvcUkYMA==","signatures":[{"sig":"MEYCIQDWiSUGhor0VhUUgnX31UHoAES2dukstyejStw0qH6G+gIhANOihAlmCHKQfvtCZxc+uCDrtmWeCI3mBaeG4R+Aa/rR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":94185},"type":"module","gitHead":"94fc3ae1924c31ba08a919f7b17983c812e89604","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.74.0","@earendil-works/pi-coding-agent":"^0.74.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.1_1779051835227_0.35726283715287455","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@davehardy20/pi-compact-plus","version":"0.1.3","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.3","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"cb3b9f4d8d906fdcbe7100259d53b3f4eac6160c","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.3.tgz","fileCount":17,"integrity":"sha512-2l/FZsfJ/udZc/xrhyOqRUD6rAZ3MmWjUDfo4MslV+dSvmBoDeah6BeHWzuxcWTaMmaOD2uxyKFxQiE/ETG+4w==","signatures":[{"sig":"MEYCIQCDaNNM9COc3tz5fzIRspb+vdCkZjxS0jvk2M5zkOZcPwIhAKhXripWI4z+yeHbgGGSexds1Mk9qfOYT3oHv1sjZShk","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":95371},"type":"module","gitHead":"766fd1c7f7784559cdbe3f2fb6dd791d44914194","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@earendil-works/pi-ai":"^0.75.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.3_1779053709309_0.2913046469149305","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@davehardy20/pi-compact-plus","version":"0.1.4","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.4","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"c9e1118553d77aad922820ba211b40972dfa0aae","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.4.tgz","fileCount":17,"integrity":"sha512-e4v96bNDOxaaKjsDeF5UIn/lUsKnKZhsBCfnb8SKG8QTk6f1bMy22/mFqer0Ogp4fHZ8abfYcFBoifBGo36O9Q==","signatures":[{"sig":"MEQCIF4yDE94yM9gOMBatoZxTnUB3fN/Vp1lhKW+G5wHY63XAiAG6xRsqMqASlIyj5fmCcKHiBTeETDa6It2AA27agPiuQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96184},"type":"module","gitHead":"862004e6e5ed2dce12b825fec493b161e37a6ed9","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@earendil-works/pi-ai":"^0.75.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.4_1779054523144_0.558723665042048","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@davehardy20/pi-compact-plus","version":"0.1.5","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.5","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"014f085da07c37efc0a0b48f02c274a0aa41754a","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.5.tgz","fileCount":17,"integrity":"sha512-af55Ofbf8w+BfIh+ldp7tNKMeMtNob8fFr+gI+M2sate/z1e0tD92XOZ54/ymMEq/ndRUOkFXoERedIESUnqgQ==","signatures":[{"sig":"MEQCIDTFMBDdyVGK+yyCWD7/9FLVel720i3R+PImBXbpqdeqAiAxHllkEK8Ug2rcvuKRffIm80GrAGI6mfjR5YLHMF/iRw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96184},"type":"module","gitHead":"2476af4928e5861aa304681efbead34122aa852f","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@earendil-works/pi-ai":"^0.75.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.5_1779054666615_0.3505624140922885","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@davehardy20/pi-compact-plus","version":"0.1.6","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.6","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"76691cc7379900238d4b52a82ee8ab9e055faeff","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.6.tgz","fileCount":17,"integrity":"sha512-BL6dMmX75FvkfX5vrMS9sqgxct7mP9k0qVEyUbjZQT5f3pKqEHPqBjchLcBV9vf5xCBEG4L4btRRNf5lnfy9ag==","signatures":[{"sig":"MEQCIFr6LIs7+skn7Y24bdLjaSbrcT56oavS6Z2lVQ86ActrAiAHW8T73SinKsJnuSiCxogkLEGP0iwMcQruXsXI5xEZTg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96798},"type":"module","gitHead":"523a37235c31421ee35f931659510631140a457f","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@earendil-works/pi-ai":"^0.75.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.6_1779094499626_0.8002904936212798","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@davehardy20/pi-compact-plus","version":"0.1.7","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.7","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"e4591ef4c2f8083752588bd12eb57f25292988e9","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.7.tgz","fileCount":18,"integrity":"sha512-cWFN6NTesOs04jL+PQcB86ihQqv7kNs1qrmR2jIhWnQlRF9GuyNfq+TuGHvaTmvOco3jdtKD1P2QvifXtne3jg==","signatures":[{"sig":"MEUCIQCqaAcvIOuik2AG3MmNwaaqcr5nwkTTY6z+jwetSYq/BgIgVpUjnCIwz87u+sBpXmt3dzQF0uNrfvW2UmIfj5lx8EQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":140304},"type":"module","gitHead":"00fc24d73dd7b1c59af32c3e12939d737013a18f","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","verify":"bash ./scripts/verify.sh","typecheck":"tsc --noEmit","test:watch":"vitest","release:check":"bash ./scripts/release-check.sh","release:major":"bash ./scripts/release.sh major","release:minor":"bash ./scripts/release.sh minor","release:patch":"bash ./scripts/release.sh patch"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@earendil-works/pi-ai":"^0.75.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0"},"peerDependencies":{"@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.7_1779358480718_0.996800857459176","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@davehardy20/pi-compact-plus","version":"0.1.8","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","_id":"@davehardy20/pi-compact-plus@0.1.8","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"117743d8025b561793d6e02a68e6aabe9cec5138","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.8.tgz","fileCount":18,"integrity":"sha512-+R0A1wbH4GG4IvgzWozi393uTaF/0zWwSlBn7Lbvsc/uUvMJOWbvHxyIscWJW8KM5NJWBRtV0nIQmKxPSHPZkA==","signatures":[{"sig":"MEUCIQCn8ZE8nj8KdDlZS1bbW9DDTAl2NhRs0UHKyz6m8j80ZgIgHNgD4tIbXNeI0+IYWw2GUr1VFOTIpUjlYENNvc2pF/E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155672},"type":"module","gitHead":"32acf6e6d510e6c5c3e54ab2c2ec27e65a448e34","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","verify":"bash ./scripts/verify.sh","typecheck":"tsc --noEmit","test:watch":"vitest","release:check":"bash ./scripts/release-check.sh","release:major":"bash ./scripts/release.sh major","release:minor":"bash ./scripts/release.sh minor","release:patch":"bash ./scripts/release.sh patch"},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"repository":{"url":"git+https://github.com/davehardy20/pi-compact-plus.git","type":"git"},"_npmVersion":"11.12.1","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","directories":{},"_nodeVersion":"26.0.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^24.7.2","@earendil-works/pi-ai":"^0.75.0","@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0"},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-agent-core":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-ai":{"optional":false},"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-coding-agent":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pi-compact-plus_0.1.8_1779374510179_0.7127854579895936","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@davehardy20/pi-compact-plus","version":"0.1.9","description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","type":"module","keywords":["pi-package","pi-extension","compaction","context-management"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/davehardy20/pi-compact-plus.git"},"bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"homepage":"https://github.com/davehardy20/pi-compact-plus#readme","publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","package:check":"node ./scripts/check-package-contents.js","verify":"bash ./scripts/verify.sh","release:check":"bash ./scripts/release-check.sh","release:publish-current":"bash ./scripts/release.sh --publish-current","release:patch":"bash ./scripts/release.sh patch","release:minor":"bash ./scripts/release.sh minor","release:major":"bash ./scripts/release.sh major"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*","@earendil-works/pi-agent-core":"*","@earendil-works/pi-ai":"*"},"dependencies":{},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":false},"@earendil-works/pi-agent-core":{"optional":false},"@earendil-works/pi-ai":{"optional":false}},"devDependencies":{"@earendil-works/pi-agent-core":"^0.75.0","@earendil-works/pi-coding-agent":"^0.75.0","@earendil-works/pi-ai":"^0.75.0","@types/node":"^24.7.2","typescript":"^5.9.3","vitest":"^3.2.4"},"pi":{"extensions":["./src/index.ts"]},"gitHead":"8ed551a1d165d74e1d520a5b91bc4823866d8a75","_id":"@davehardy20/pi-compact-plus@0.1.9","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-PiwVQnJcYbKp3HrmgDHs5yyh5288qOxYGuP/5T4CfF9AsogoBwWmUKNqEafysIqdS0skUEGxzBh50lr/KSGK1Q==","shasum":"a76fbbc97ab2f4e52b2e3b31c1fef951f3c435df","tarball":"https://registry.npmjs.org/@davehardy20/pi-compact-plus/-/pi-compact-plus-0.1.9.tgz","fileCount":54,"unpackedSize":316974,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHxLisKx4SIVYWvBzSDKIhOvU2Y1hgIn0Vnfzo0K1ICWAiEAjmN9I3JsUvvTAec02A3gKyK89SwUsNZylWiXeZpwXec="}]},"_npmUser":{"name":"davehardy20","email":"dave.hardy@protonmail.com"},"directories":{},"maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-compact-plus_0.1.9_1780755525926_0.9429222415885916"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-17T11:21:01.074Z","modified":"2026-06-06T14:18:46.200Z","0.1.0":"2026-05-17T11:21:01.361Z","0.1.1":"2026-05-17T21:03:55.409Z","0.1.3":"2026-05-17T21:35:09.448Z","0.1.4":"2026-05-17T21:48:43.288Z","0.1.5":"2026-05-17T21:51:06.775Z","0.1.6":"2026-05-18T08:54:59.768Z","0.1.7":"2026-05-21T10:14:40.850Z","0.1.8":"2026-05-21T14:41:50.323Z","0.1.9":"2026-06-06T14:18:46.078Z"},"bugs":{"url":"https://github.com/davehardy20/pi-compact-plus/issues"},"license":"MIT","homepage":"https://github.com/davehardy20/pi-compact-plus#readme","keywords":["pi-package","pi-extension","compaction","context-management"],"repository":{"type":"git","url":"git+https://github.com/davehardy20/pi-compact-plus.git"},"description":"Pi package for advanced context compaction with mode-aware triggers, structured summaries, current-focus extraction, content classification, and lightweight checkpoints.","maintainers":[{"name":"davehardy20","email":"dave.hardy@protonmail.com"}],"readme":"# @davehardy20/pi-compact-plus\n\nAdvanced context compaction for [Pi](https://pi.dev) with mode-aware triggers,\nstructured summaries, current-focus extraction, content classification, and\nlightweight checkpoints.\n\n## What it adds\n\n### Commands\n\n| Command | Description |\n| --- | --- |\n| `/compact-plus` | Manual standard compaction |\n| `/compact-plus hard` | Manual hard compaction (aggressive pruning) |\n| `/compact-plus status` | Show usage, mode, cooldown state, and last compaction telemetry |\n| `/compact-plus tool-prune status` | Show detailed tool-output pruning status |\n| `/compact-plus tool-prune flush` | Manually flush pending tool-output batches |\n| `/compact-plus-status` | Show package identity, version, and source path |\n| `/checkpoint [note]` | Save a lightweight checkpoint without compacting |\n\n### Auto-compaction triggers\n\nCompact+ replaces Pi's single-threshold early-compaction trigger with a tiered policy:\n\n| Band | Usage | Behavior |\n| --- | --- | --- |\n| Normal | < 65% | No auto-compaction |\n| Checkpoint candidate | 65–69% | Eligible for checkpoint (no auto-compact) |\n| Standard | 70–89% | Auto standard compaction |\n| Hard | ≥ 90% | Auto hard compaction (aggressive pruning) |\n\nAuto-compaction is triggered at `message_end` and `turn_end` with cooldown and regrowth guards to avoid thrashing.\n\n### Structured summaries\n\nCompact+ produces structured compaction summaries with these sections:\n\n- Current Objective\n- Current Task State\n- Active File Set\n- Repository State\n- Decisions Made\n- Completed Work\n- Open Problems\n- Current Errors\n- Known Constraints\n- Failed Attempts\n- Next Best Step\n- Continuity Instruction\n- Dependency Chain\n\n### Focus echo\n\nAfter compaction, a compact \"focus echo\" is injected at the recency position\n(before the last user message) to mitigate \"lost in the middle\" degradation.\nThe echo contains the objective, active files, blockers, decisions,\ndependency chain, and next step.\n\nCompact+ currently injects the echo as a synthetic user-context message because\nPi extension custom messages serialize to provider `user` messages, and the\n`context` hook does not yet expose a provider-preserved lower-authority memory\nrole. The echo is therefore explicitly framed as generated, non-authoritative\nmemory and sanitized so it cannot masquerade as a fresh user request. Revisit\nthis fallback if Pi exposes a context/memory role that remains below user,\ndeveloper, and system authority across supported providers.\n\n### Experimental tool-output pruning\n\nCompact+ includes an experimental, default-off tool-output pruning subsystem.\nIt is inspired by the MIT-licensed `pi-context-prune` project and reuses or\nadapts selected `pi-context-prune` ideas and implementation patterns where they\nfit Compact+'s architecture.\n\nWhen enabled, Compact+:\n\n1. Captures eligible tool results after each assistant turn.\n2. Summarizes them with an LLM call after the final assistant message.\n3. Replaces the original text content with compact recovery stubs in future\n   model context.\n4. Persists bounded metadata-only summary entries for branch-safe recovery\n   reconstruction after reloads.\n5. Preserves recovery through a built-in query tool\n   (`compact_plus_query_tool_output`).\n\n**Safety defaults:**\n\n- Off by default; requires explicit enablement.\n- Only the safe `agent-message` mode is implemented. Summarization happens\n  after the agent's final text response.\n- Only text-only tool results are eligible; images, binaries, and mixed content\n  are skipped.\n- Protected exclusions are non-overridable: `read`, `read_hashed`,\n  `hashline_edit`, `compact_plus_query_tool_output`, and Compact+ internal\n  tools are never eligible, even if user include/exclude settings change.\n- User excluded/included tool settings only apply after protected exclusions.\n- Original `toolResult` messages are preserved in the session branch. Pruning\n  only affects future context snapshots by stubbing content, not deleting\n  messages.\n- Durable pruning metadata never stores original tool output. It stores bounded\n  record ids, entry ids, tool call ids, tool names, summaries, argument\n  previews, and counters needed to reconstruct the runtime index safely.\n- Capture, pending/finalized state, metadata reconstruction, summarizer inputs,\n  query scanning, and query output are bounded with hard internal limits so long\n  sessions degrade by trimming/skipping instead of growing without bound.\n- Summarization is atomic: a flushed batch is indexed/pruned only when every\n  pending record has a non-empty summary tied to its short ref.\n- Metadata reconstruction is atomic: malformed active-version metadata,\n  over-limit payloads, duplicates, excluded tools, stale branch entries, or\n  mismatched `entryId`/`toolCallId`/tool-name pairs reconstruct no records.\n\n**Attribution and reuse:** Batch capture, LLM semantic summarization, short\nrefs, branch-aware indexing, and recovery-query behavior were adapted from\n`pi-context-prune` (MIT). Compact+ does not copy the standalone extension wiring;\nit integrates the reused/adapted pieces into Compact+ settings, state,\ntelemetry/status, lifecycle hooks, and context composition. Source files that\nclosely follow or adapt `pi-context-prune` mechanics include attribution comments.\n\n### Features\n\n- **Content classification**: Messages are classified as critical, contextual, or ephemeral for hard-mode pruning.\n- **Tool pair restoration**: Tool call/result pairs are kept atomic after pruning.\n- **Summary normalization**: Compaction summaries are normalized and validated before injection.\n- **Session persistence**: Telemetry state is persisted across sessions.\n- **Model change reset**: State resets when the model changes.\n- **Tool-output pruning** (experimental): LLM-summarized tool output stubs with recovery query tool.\n\n## Install\n\nFrom npm:\n\n```bash\npi install npm:@davehardy20/pi-compact-plus\n```\n\nFrom git:\n\n```bash\npi install git:github.com/davehardy20/pi-compact-plus\n```\n\nFrom a local checkout during development:\n\n```bash\npi install /Users/dave/tools/pi-compact-plus\n```\n\nFor one run only:\n\n```bash\npi -e /Users/dave/tools/pi-compact-plus\n```\n\n## Settings\n\nCompact+ supports threshold tuning through either environment variables or your\nPi agent `settings.json` file at `~/.pi/agent/settings.json`. Environment\nvariables take precedence over `settings.json` values.\n\nDefault profile: checkpoint candidate at `65%`, standard compaction at `70%`,\nhard compaction at `90%`.\n\n| Variable | Default | Description |\n| --- | --- | --- |\n| `COMPACT_PLUS_CHECKPOINT_THRESHOLD` | 65 | Checkpoint-candidate threshold |\n| `COMPACT_PLUS_STANDARD_THRESHOLD` | 70 | Standard compaction threshold |\n| `COMPACT_PLUS_HARD_THRESHOLD` | 90 | Hard compaction threshold |\n| `COMPACT_PLUS_COOLDOWN_MS` | 120000 | Auto-compaction cooldown in ms |\n| `COMPACT_PLUS_SETTINGS_PATH` | `~/.pi/agent/settings.json` | Optional JSON config path |\n| `COMPACT_PLUS_EXPERIMENTAL_TOOL_OUTPUT_PRUNING` | `false` | Enable experimental tool-output pruning |\n| `COMPACT_PLUS_TOOL_OUTPUT_PRUNING_MODE` | `off` | Pruning mode (`off` or `agent-message`) |\n| `COMPACT_PLUS_TOOL_OUTPUT_SUMMARY_STRATEGY` | `llm` | Summary strategy (`llm` only for v1) |\n| `COMPACT_PLUS_TOOL_OUTPUT_PRUNE_STRATEGY` | `stub` | Prune strategy (`stub` or `delete`; v1 uses `stub`) |\n| `COMPACT_PLUS_TOOL_OUTPUT_PRUNE_MIN_CHARS` | (default) | Minimum tool output chars to be eligible |\n| `COMPACT_PLUS_TOOL_OUTPUT_SUMMARY_MAX_CHARS` | (default) | Max chars per LLM summary |\n| `COMPACT_PLUS_TOOL_OUTPUT_QUERY_MAX_CHARS` | (default) | Max chars returned by recovery query |\n| `COMPACT_PLUS_TOOL_OUTPUT_SUMMARIZER_MODEL` | `default` | Summarizer model (`default` or `provider/model-id`) |\n| `COMPACT_PLUS_TOOL_OUTPUT_SUMMARIZER_THINKING` | `low` | Thinking level; see notes below |\n| `COMPACT_PLUS_TOOL_OUTPUT_PRUNE_EXCLUDED_TOOLS` | (comma list) | Additional user exclusions |\n| `COMPACT_PLUS_TOOL_OUTPUT_PRUNE_INCLUDED_TOOLS` | (comma list) | User include allow-list |\n\nTool-output pruning notes:\n\n- Summarizer thinking values: `default`, `off`, `minimal`, `low`, `medium`,\n  `high`, or `xhigh`.\n- User exclusions add tools to skip; protected exclusions still apply.\n- User includes are evaluated after protected exclusions; empty means all\n  eligible tools.\n\nExample `settings.json`:\n\n```json\n{\n  \"thresholds\": {\n    \"checkpoint\": 65,\n    \"standard\": 70,\n    \"hard\": 90\n  },\n  \"cooldownMs\": 120000,\n  \"experimentalToolOutputPruning\": true,\n  \"toolOutputPruningMode\": \"agent-message\",\n  \"toolOutputSummaryStrategy\": \"llm\",\n  \"toolOutputPruneStrategy\": \"stub\"\n}\n```\n\nTop-level keys are also supported: `checkpointThresholdPercent`,\n`standardThresholdPercent`, `hardThresholdPercent`, and `cooldownMs`. Invalid,\nmissing, or overlapping thresholds fall back safely to the default `65 / 70 / 90`\nthreshold profile.\n\nThreshold and cooldown constants are resolved when the extension module loads, so\nchanges to those values require `/reload` or a Pi restart. Tool-output pruning\nsettings are resolved when pruning commands and lifecycle events run, but\n`/reload` is still the safest way to apply settings edits consistently.\n\n## Notes\n\n- Compact+ hooks into Pi's `session_before_compact` event to provide custom summarization.\n- On Pi runtimes that support stream-aware compaction but do not expose the\n  live session `streamFn` to extensions, Compact+ uses the public\n  `@earendil-works/pi-ai` `streamSimple` adapter so custom summaries can still\n  run.\n- If custom summarization still fails after that, Compact+ falls back to Pi's default compaction.\n- The extension persists telemetry to `~/.pi/agent/state/compact-plus-telemetry.json`.\n- State resets when the model changes to avoid stale compaction context from a different model.\n\n### Tool-output pruning recovery\n\nV1 appends `compact-plus-tool-prune-summary` entries for summary visibility,\nobservability, and metadata-only reconstruction. Legacy top-level fields\n(`timestamp`, `refs`, `summaryChars`, `recordCount`) remain for status/history\ncompatibility. Newer entries also include a nested schema-versioned metadata\npayload that is used only after it is validated against the current active\nbranch.\n\nOn reload or branch-tree updates, Compact+ reconstructs finalized pruning\nrecords only when pruning is effectively enabled and metadata matches current\nbranch tool-result entries by `entryId`, `toolCallId`, tool name, tool-result\nrole, and text-only content. Older summary entries without metadata are skipped\nsafely. Active-version metadata that is malformed, oversized, duplicated,\nexcluded by protected/user policy, or stale fails closed and reconstructs no\nrecords.\n\nCompact+ always registers a recovery query tool so recovery stubs can point to\nan available tool, but execution remains inactive and throws unless pruning is\neffectively enabled:\n\n- **Name:** `compact_plus_query_tool_output`\n- **Parameters:** `query`, `recordId`, `ref`, `toolCallId`, `toolName`,\n  `limit`, `includeContent`\n\nUse this tool to recover original output by short ref or search terms. Query\nresults are bounded by record count, scanned record count, per-record original\ntext scan chars, total original text scan chars, and max returned chars. Full\ncontent recovery requires `includeContent=true` and is limited by\n`toolOutputQueryMaxChars` plus hard internal scan/result-size caps. Even after\nmetadata reconstruction, original content is read only from the current branch's\nexisting tool-result messages; it is not read from persisted metadata.\n\n**Caveats:**\n\n- LLM summarization adds latency and token cost per batch.\n- Summaries may omit details; always verify against original output before\n  relying on exact text, line numbers, diagnostics, or hashes.\n- Stubbed content is labeled as historical data, not instructions, to reduce\n  prompt-injection risk from captured tool output.\n- Branch navigation (e.g., switching to a different session branch) removes\n  stale index records automatically. Metadata from stale branches is rejected\n  during reconstruction.\n- Sub-agents currently run with `--no-extensions` and do not inherit pruning behavior.\n\n## Troubleshooting\n\nRun `/compact-plus-status` to confirm:\n\n- package name and version\n- loaded source path\n- package root\n- current compaction state\n- a one-line tool-output pruning status when the experimental feature is enabled\n\nRun `/compact-plus status` for detailed runtime state:\n\n- current usage percent, tokens, and context window\n- usage source (native or estimated)\n- current band and thresholds\n- when Pi has not produced a post-compaction assistant usage yet, status will\n  show usage as unknown instead of estimating from the pre-compaction branch\n- cooldown state\n- last compaction telemetry including mode, trigger source, path, thinking\n  level, compatibility notes, fallback reason, and focus files\n- the latest persisted focus echo derived from the most recent custom\n  compaction summary\n- a one-line tool-output pruning status when the experimental feature is enabled\n\nRun `/compact-plus tool-prune status` for detailed pruning state:\n\n- enabled/mode/strategy\n- indexed record count in the current branch\n- pending batch/record counts\n- whether a flush is in progress\n- last summary status and time\n- last metadata reconstruction status, scanned counts, skipped legacy entries,\n  and a bounded non-sensitive error note when reconstruction fails\n- protected exclusions plus user excluded/included tools\n- summarizer model and thinking level\n\nIf commands appear twice, Pi may be loading both the package and the old local\nextension. Disable or remove the old local auto-discovered extension before\nreload verification.\n\n## Update flow\n\n1. Update the package repo\n2. Push to GitHub\n3. Run `pi update --extensions` or reinstall the package\n4. Run `/reload`\n\n`/reload` alone does not fetch newer package commits.\n\n## Architecture and development notes\n\nRuntime source is split into small ownership seams:\n\n- `src/index.ts` is the Pi extension composition root.\n- `src/commands.ts`, `src/events.ts`, and `src/usage.ts` own command wiring,\n  lifecycle/context hooks, and usage lookup.\n- `src/compaction-coordinator.ts` owns manual/auto compaction orchestration and\n  telemetry side effects.\n- `src/focus-echo/*` owns summary detection, parsing, sanitization, rendering,\n  context injection compatibility, and positioning.\n- `src/tool-output-pruning/*` owns experimental pruning capture, summarization,\n  metadata reconstruction, current-branch stubbing, recovery query, commands,\n  and state.\n\nDev/release playbook:\n\n1. Keep local validation green before opening a PR:\n\n   ```bash\n   npm run typecheck\n   npm test\n   npm run build\n   ```\n\n2. Run `/compact-plus-status` after installing from a local checkout or package\n   update to confirm the loaded package name, version, source path, package root,\n   update flow, and pruning one-line status.\n3. To pick up a newer published package commit, run `pi update --extensions` or\n   reinstall the package, then `/reload`. `/reload` alone does not fetch package\n   updates.\n4. Before release, run `npm run package:check` for a fast package-content\n   sanity check, then `npm run release:check`. Release checks run verification,\n   package-content sanity checks, `npm whoami`, and `npm pack --dry-run`.\n5. Use `scripts/release.sh <patch|minor|major>` only for an intentional release.\n   `--allow-dirty` stages tracked changes with `git add -u`; untracked files\n   must be cleaned or ignored first because npm can pack them from shipped\n   directories.\n\n## Build and test\n\n```bash\nnpm run typecheck\nnpm run build\nnpm test\n```\n","readmeFilename":"README.md"}