{"_id":"@astudioplus/compressor","_rev":"13-ae863fe31cd64a0c15cac268cf219399","name":"@astudioplus/compressor","dist-tags":{"latest":"0.5.2"},"versions":{"0.1.0":{"name":"@astudioplus/compressor","version":"0.1.0","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.1.0","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js"},"cpu":["x64","arm64"],"dist":{"shasum":"9299fd607b7395093637c0fb18e0d045d8393463","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.1.0.tgz","fileCount":108,"integrity":"sha512-bsIJPHLSaM8pYga+RwvXJKu91XnUpr1grsOLUzmmh/7LFXr10A+PTu0Lr95UhDKq5ZjSy5o48V1Kg5wRr3Kwcw==","signatures":[{"sig":"MEQCIHY8ZiXmG5mEuXyKZzWffF9jc/HGxDc/Me1PK1SQggVWAiBgbetSm9uDcxTly13PJXl0KKUguQY12X8ni4zvEu6ctg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":349638},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"e8bc3f1314e64b53fd9b59468c87a3444562bd59","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --outfile=dist/copilot-hook.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"deprecated":"broken when installed; use 0.1.1+","repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.1.0_1781157560952_0.076749165407066","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@astudioplus/compressor","version":"0.1.1","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.1.1","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js"},"cpu":["x64","arm64"],"dist":{"shasum":"040cc593d9e6473dc12d6e4f067e3a75c7ab95b7","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.1.1.tgz","fileCount":108,"integrity":"sha512-Crs/s6FspRLpM7JMLM59ajpmF159lDxY5jq/d4RGm5J80UE+BaOahbX/7Rfv0a40Hz10yT/4fnKf+67m70ltaw==","signatures":[{"sig":"MEUCIQCrqKt6Reyovbh+Z26BPT1Uy8Q9UG+yPZClB6h1dd/hzgIgVty45cYdNEN2dgWf2Gub9q9NW77xfzejWIPdqkQ6ihc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":350810},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"9cdcf994e57c39b360fb84c690d47a5ff7c402e0","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --outfile=dist/copilot-hook.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.1.1_1781158746846_0.7377235075516397","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@astudioplus/compressor","version":"0.1.2","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.1.2","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js"},"cpu":["x64","arm64"],"dist":{"shasum":"c9640d37bf87cbf8a43d41467c5a55c39ee01b3b","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.1.2.tgz","fileCount":108,"integrity":"sha512-xvD3ivLdx6V+y/JXwJZhYWZ75Fyxegx5ShUAAzN1juEdhE4lplPnpuk5wtK7B5J5EyP6u4rHMp8Hm0dSmt+OQA==","signatures":[{"sig":"MEUCIQDYA+icWFdpTGwRp6PjzTR4V8EVKGzcRPqLET7JZh97MQIgG1kYkRAiWhvJlx0HSCFSypigkW5wb4RlA0iYEszQT08=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":352972},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"977b6d33f401848cd8991c378ae3f452eee48c2b","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --outfile=dist/copilot-hook.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.1.2_1781160018013_0.6945773096122758","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@astudioplus/compressor","version":"0.3.0","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.3.0","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"228d9061f3879c3f3907a1d812be977251fd0127","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.3.0.tgz","fileCount":117,"integrity":"sha512-wERf5sVnXzDm1rFRVx+0yYLGxsZlDUt58i9g9hXtuq4iSbDYLgXQUEXGhEgJ+YCoTxflSfXcknAuSnFadXz4/g==","signatures":[{"sig":"MEUCIHZkNWE2Z51EkcLmgod7a5oOLQUpIUbpOGrc2CDY1vsEAiEAsZ7mOr42MXBkT1vJUp9e7qLdkoiUbtffGmEcdLU4Af0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":479689},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"712121b918e9ac3374c8995233e30a9ac9ca6327","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.3.0_1781306302862_0.5548997358108578","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@astudioplus/compressor","version":"0.3.1","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.3.1","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"8e3e0428d101dc1a2bbcf44912de70be6711459f","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.3.1.tgz","fileCount":119,"integrity":"sha512-+Bpe2Cg8/yvF77FMnRYn36X2HcS/HRHS4lC35ByJB3sUITTNMPbcIsPSnu142rIA6kEsM0T+81k5Y+XLUB9WTw==","signatures":[{"sig":"MEUCIF0NK0IIIrjliPjoBxyEwAicE8HSuopfvFSGyBeo2ByHAiEAu5FvEL7thDyVUMb0q4RiVxR7Y4tJPkf/+KoAqeq3WH0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":489516},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"056fac62fb4e60b63c87b634fc364463e272fe99","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.3.1_1781378805144_0.4245734705241273","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@astudioplus/compressor","version":"0.3.2","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.3.2","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"a8e104f267d1232c5ab7a9c7fb182b0a0d9bcaae","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.3.2.tgz","fileCount":125,"integrity":"sha512-gDxMheLt8VltkuIsLXeC/1/cEeEREnua03vxkfowQIWkuPwQUvoOtSKq1H1H9O4PWqoZki+af4OP4SG68xEzpQ==","signatures":[{"sig":"MEUCIDRLztQ55IaqpN7fqT1hA6l4UKGL2QCXnsmViMTyOieIAiEA+pOK1WKwAoe1Tr3B+Ptk+xT/6NI9wH9WBPT/5Iw8u9Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":505600},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"214954c419ad26f495b53bfec78e86773cb71c53","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.3.2_1781425760127_0.14948897556336327","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@astudioplus/compressor","version":"0.3.3","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.3.3","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"b4d66ec66ec50d44bea3e31b712dfd78c07cdb91","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.3.3.tgz","fileCount":125,"integrity":"sha512-iOGN5QKmzKxBA7Yc7SAzruhQAjRqar80ftUfLNNUl2LQafjtZ6t5JLMS4Ts1cDzPIQyaevB7SQRC2TnP2UeZRg==","signatures":[{"sig":"MEUCIChU/XoKbWMIV64t7LmMXV8LFrDP30sob/evALU9YlIHAiEAwJ8C3E9fUEFEwQ0bdxATpze7y95/A2sDo4RI7rL644Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":506401},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"1dd8c20efd6bcb2a1afc99d7326fefec23d9e044","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.3.3_1781426451583_0.20512812523230473","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@astudioplus/compressor","version":"0.3.4","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.3.4","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"7d970b7a4905012578a4e2f385595cf85a117971","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.3.4.tgz","fileCount":137,"integrity":"sha512-/+NGyi6rA6aehYV43XETqmzV3qMEoZ+QAZD+gX7PcTQJUWtKMZQR0MyKNzpwmtPYSOrLdT14P9fPFic1qPiRYg==","signatures":[{"sig":"MEUCIH93/uVAeuwo39MmXECy41fZhvGzEzLCRguHsqf0LIpgAiEA4RQLcu/NcLo3tBg8sRmAK/mfqVXjkhgqrmJlJJcDynw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":578470},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"be1c51446cdc527351cf791b0d7e1773e7488815","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.3.4_1781836601736_0.25392883937968524","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@astudioplus/compressor","version":"0.4.0","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.4.0","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"bc5d2ae0f91c7d01b75fcf785373044357699bd8","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.4.0.tgz","fileCount":139,"integrity":"sha512-wtshOSRtbiiGZVhxdgVWsm8sPSZYGUjp2pfDTw6wY6F5b/f1pSfYII6iaG33Aa06RUODh5IYtWb18eGH3F9npw==","signatures":[{"sig":"MEUCIANd6yQRDeAZR40CG62HAB/5u3JAsZeehDYzRtsmb5TeAiEAxi0k4Laz/MPUQSSeShi2ZNNQQ2NbhdcL+vT18lyg2ro=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIEWAjqBKn6xEerSQFo3g7tUT09Vmzpm4tdmqgE4i0XBQAiEAhA+S/rTIXw1Wx/CCfsHlZ4D2gNlceO5WEiDbMgcX3TA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":592507},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"be1c51446cdc527351cf791b0d7e1773e7488815","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.4.0_1789170669568_0.5379091463860344","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@astudioplus/compressor","version":"0.5.0","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.5.0","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"0b1e5ac1a58910fdd1dc4d61d6b0d485e8fd9e9d","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.5.0.tgz","fileCount":139,"integrity":"sha512-DEB7ekBsoZJ9RORK8gAxPFvPBdx9yYjPECrLBwPa+Rw6S+0yEQohatAAfLMIQ81ZxYLNNXbw3nm0g3w4RsTddw==","signatures":[{"sig":"MEUCICAfMO6iyWKvATezIuNo+ZHOgZd0YDjqIPk5buX8caSzAiEAu5NAYkFiIbDyahvjpx89ENuYmH/PFgKyAEHF43tFg/E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIE0xina1AOdkqzN2SH9bzeDMITdfIkhSuQwnPHZnOW7qAiACZOGYe5jOqG0OGHhIMvyCkuljM9yGoIQ6EsOW7lFLmA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":604192},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"0e47be767a39596f2af3b74ea7bde55c4e47c5b3","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.5.0_1789241539468_0.7174020263175587","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@astudioplus/compressor","version":"0.5.1","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","_id":"@astudioplus/compressor@0.5.1","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"homepage":"https://github.com/anvanster/compressor#readme","bugs":{"url":"https://github.com/anvanster/compressor/issues"},"os":["darwin","linux","win32"],"bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"dist":{"shasum":"740d554fdac98082d1b29dd3f370b01c3d651be3","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.5.1.tgz","fileCount":139,"integrity":"sha512-NilRFk7gEtHQQPvZipH7FC9+X+dZsRRJTztC0co1RUNYmX1VNKzp7ljcrtLyevB/svKbUNCo40i09wH8nJlK2g==","signatures":[{"sig":"MEUCIQCYfFPaeFbEC/PFHUeIFJ8awlStQr5n/v8esRwFutxHjAIgeGbIGBgSeNO0SKObtvQoxV4UcYEMy//QSiNs9rceqBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCM3ox0r0xMp0A/TxWJLs2Koq3qUdEW7Iwi3sbmo/ostQIgQ7bxg9/jop+2EEbkZK4YJvRpzgDhwe4eWRzeivhNW+s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":610730},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"2325e2f4e1f67bc5dad02974169801486d86d5e3","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"tmp":"tmp/compressor_0.5.1_1789326443904_0.2666747074446212","host":"s3://npm-registry-packages-npm-production"}},"0.5.2":{"os":["darwin","linux","win32"],"_id":"@astudioplus/compressor@0.5.2","bin":{"compressor":"dist/cli/index.js","compressor-hook":"dist/hook.js","compressor-copilot-hook":"dist/copilot-hook.js"},"cpu":["x64","arm64"],"bugs":{"url":"https://github.com/anvanster/compressor/issues"},"dist":{"shasum":"8e28e8bdf343429dc4bfb72cfc9e28c9c4b9aef0","tarball":"https://registry.npmjs.org/@astudioplus/compressor/-/compressor-0.5.2.tgz","fileCount":139,"integrity":"sha512-6KQpknzl0BFn461KIHnEbK+C5gSIhCxzT9ekxEH2skH+MBdKPV5dO0eslwhE4QvAkEiqT1dkzQqjHimmSPVnSA==","signatures":[{"sig":"MEUCIQC5pwq9eYMMtZN59ngfaNAqETjrX3NROG+vW8s+JCipewIgCIOxkNLmg2vbQmy2flVFnM8UCpgLJXmguPj2yVrqxZc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCILBST6IIdTZb4DmBLunerLHbLkWQ/vvUiBPlrOFicUgIgIjcdY1G0HH8RQ7X2A9SXhbGoEQtff5QX+ENvq4h+DB4="}],"unpackedSize":615531},"name":"@astudioplus/compressor","type":"module","author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"engines":{"node":">=20.0.0"},"exports":{".":"./dist/index.js","./engine":"./dist/engine/index.js","./tokens":"./dist/tokens/index.js"},"gitHead":"e1145f1e116f92244fea971495c6784030bbf19c","license":"MIT","scripts":{"test":"node --test \"test/**/*.test.ts\"","build":"tsc -p tsconfig.build.json && npm run bundle:hook && npm run bundle:copilot-hook && npm run bundle:opencode-plugin","prepare":"npm run build","typecheck":"tsc -p tsconfig.json --noEmit","bundle:hook":"esbuild src/hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/hook.js","prepublishOnly":"npm run build","bundle:copilot-hook":"esbuild src/copilot-hook-entry.ts --bundle --platform=node --format=esm --banner:js=\"#!/usr/bin/env node\" --outfile=dist/copilot-hook.js","bundle:opencode-plugin":"esbuild src/opencode-plugin-entry.ts --bundle --platform=node --format=esm --outfile=dist/opencode-plugin.js"},"version":"0.5.2","_npmUser":{"name":"anvanster-personal","email":"anvanster@gmail.com"},"homepage":"https://github.com/anvanster/compressor#readme","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"_npmVersion":"11.9.0","description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","directories":{},"maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"_nodeVersion":"25.6.1","dependencies":{"commander":"^15.0.0","js-tiktoken":"^1.0.21","@anthropic-ai/sdk":"^0.104.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.0","typescript":"^6.0.3","@types/node":"^25.9.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/compressor_0.5.2_1789354070384_0.4478899492491102"}}},"time":{"created":"2026-06-11T05:59:20.802Z","modified":"2026-09-14T02:47:50.631Z","0.1.0":"2026-06-11T05:59:21.095Z","0.1.1":"2026-06-11T06:19:07.026Z","0.1.2":"2026-06-11T06:40:18.214Z","0.3.0":"2026-06-12T23:18:23.080Z","0.3.1":"2026-06-13T19:26:45.311Z","0.3.2":"2026-06-14T08:29:20.349Z","0.3.3":"2026-06-14T08:40:51.746Z","0.3.4":"2026-06-19T02:36:41.943Z","0.4.0":"2026-09-11T23:51:09.672Z","0.5.0":"2026-09-12T19:32:19.555Z","0.5.1":"2026-09-13T19:07:24.040Z","0.5.2":"2026-09-14T02:47:50.482Z"},"bugs":{"url":"https://github.com/anvanster/compressor/issues"},"author":{"name":"Andrey Vasilevsky","email":"anvanster@gmail.com"},"license":"MIT","homepage":"https://github.com/anvanster/compressor#readme","keywords":["token-optimization","prompt-compression","context-compression","ai-coding-agents","claude-code","github-copilot","cursor","agents-md","llm","anthropic","developer-tools","cli"],"repository":{"url":"git+https://github.com/anvanster/compressor.git","type":"git"},"description":"Reduce token usage in AI coding agents (Claude Code, Copilot, Cursor) with instruction packs and tool-output compression hooks — savings you can measure.","maintainers":[{"name":"anvanster-personal","email":"anvanster@gmail.com"}],"readme":"# compressor\n\nToken optimization for AI coding agents. Two parts you install: **mode-switchable instruction packs** (full / optimized / slim) for Claude Code, GitHub Copilot, Cursor, OpenCode, and AGENTS.md-reading agents, and **tool-output compression hooks** that shrink file reads and command output before they enter the model's context. Every optimization is benchmarked against real agent sessions before it ships — current measured numbers, methodology, and the project's mistakes live in [docs/BENCHMARKING.md](docs/BENCHMARKING.md).\n\n## Install\n\nRequires Node **>= 20**.\n\nOne-line install from GitHub (builds from source, puts `compressor` on your PATH):\n\n```sh\n# macOS / Linux / WSL\ncurl -fsSL https://raw.githubusercontent.com/anvanster/compressor/main/install.sh | bash\n```\n\n```powershell\n# Windows (PowerShell)\nirm https://raw.githubusercontent.com/anvanster/compressor/main/install.ps1 | iex\n```\n\nPin a tag/branch/commit with `COMPRESSOR_REF` (env var `$env:COMPRESSOR_REF` on Windows), e.g. `COMPRESSOR_REF=v0.3.0`.\n\nInstall the CLI globally (recommended — also enables relocatable hook commands):\n\n```sh\nnpm install -g @astudioplus/compressor\n```\n\nOr install from source:\n\n```sh\ngit clone https://github.com/anvanster/compressor.git\ncd compressor\nnpm install\nnpm run build      # compiles the CLI and bundles the hook entries\nnpm link           # optional: puts `compressor` on your PATH\n```\n\nWithout `npm link`, substitute `node /path/to/compressor/dist/cli/index.js` for `compressor` below. Note that source-checkout installs embed the absolute path of the clone in hook commands — don't move the directory after running `init` (re-run `init` if you do).\n\n## Quickstart\n\n### Claude Code\n\n```sh\ncd your-project\ncompressor init                      # claude-code, mode optimized, project scope\ncompressor status\ncompressor set-mode slim             # switch modes\ncompressor set-mode full             # removes everything — a true baseline\n```\n\n`init`, `set-mode`, and `uninstall` modify your agent config files, so they\nfirst show the diff, warn you, and back up every changed file before writing\n(in a terminal they also prompt to confirm). Preview without writing using\n`--dry-run`; skip the prompt with `--yes`; turn off the backup with\n`--no-backup`. Undo the last change with `compressor restore` (or\n`compressor restore --list` to pick one).\n\nWhat `init` installs at project scope:\n\n- `.claude/output-styles/compressor-<mode>.md` — the instruction pack as an output style (system prompt, cache-friendly)\n- `.claude/settings.json` — `outputStyle` set to `compressor-<mode>` (a pre-existing foreign `outputStyle` is stashed and restored on uninstall)\n- `.claude/settings.local.json` — the PostToolUse hook entry (matcher `Read|Bash|Grep|Glob`). It carries a machine-specific absolute path, so it goes in the conventionally gitignored local file, never the shared `settings.json`\n\nWith `--global` everything goes to `~/.claude/` instead, hook included in `~/.claude/settings.json`. Changes take effect on the next session (`/clear` or a new session).\n\n### GitHub Copilot\n\n```sh\ncompressor init --agent copilot              # project: instructions + hook\ncompressor init --agent copilot --global     # machine-wide hook only (Copilot CLI)\n```\n\nProject scope installs a marked section in `.github/copilot-instructions.md` plus a `postToolUse` hook config at `.github/hooks/compressor.json`. Global scope installs the hook to `~/.copilot/hooks/compressor.json` (`$COPILOT_HOME` honored) — instructions have no user-global mechanism in Copilot, so global is hook-only.\n\nThe honest caveat (also shown by `compressor status`): with an absolute-path install, **compression is effective in Copilot CLI on this machine only** — the cloud agent and teammates who pull a committed `.github/hooks/compressor.json` get a fail-open no-op, and the VS Code IDE surface does not execute hook files at all (instructions still apply there). With a global npm install, `init` writes relocatable commands (`compressor-copilot-hook --mode <m>`) that work on any machine where the package is on PATH. Copilot `postToolUse` is fail-open by platform design, so a dead command never blocks the agent.\n\n### Cursor\n\n```sh\ncompressor init --agent cursor\n```\n\nInstalls `.cursor/rules/compressor.mdc` (`alwaysApply: true`). A legacy `.cursorrules` file gets a marked section only if it already exists — it is never created. **Instructions only**: Cursor's hooks can replace MCP tool output but not built-in Read/Shell output, so the compression half of compressor does not apply.\n\n### AGENTS.md\n\n```sh\ncompressor init --agent agents-md\n```\n\nUpserts a marked section in `AGENTS.md`, read natively by Cursor, Copilot, Codex, Windsurf, OpenCode and others. Claude Code does **not** read AGENTS.md (use the claude-code adapter). Instructions only — no hook mechanism exists through this file.\n\n### OpenCode\n\n```sh\ncompressor init --agent opencode            # project: .opencode/plugins/compressor.js\ncompressor init --agent opencode --global   # machine-wide: ~/.config/opencode/plugins/\ncompressor init --agent agents-md           # instructions (OpenCode reads AGENTS.md natively)\n```\n\nInstalls an in-process compression plugin: OpenCode's `tool.execute.after` hook mutates tool output directly (no subprocess — the cheapest hot path of any integration). Plugins load at startup; restart any running opencode session. Instructions come via the agents-md adapter.\n\nMultiple agents in one go: `compressor init --agent claude-code copilot agents-md opencode`.\n\n### Support matrix\n\n| Agent | Instruction pack | Compression hook | Global scope |\n|---|---|---|---|\n| claude-code | yes (output style) | yes (PostToolUse) [^1] | yes (style + hook) |\n| copilot | yes (project only) | yes — Copilot CLI [^2] | hook only [^3] |\n| cursor | yes (`.mdc` rules) | no [^4] | no (per-project standard) |\n| agents-md | yes (marked section) | no | no (per-project standard) |\n| opencode | via agents-md (OpenCode reads `AGENTS.md` natively) | yes — in-process plugin [^5] | yes (`~/.config/opencode/plugins`) |\n\n[^1]: At project scope the hook entry lives in `.claude/settings.local.json` because it embeds a machine-specific absolute path (npm installs with the bins on PATH get relocatable `compressor-hook` commands instead).\n[^2]: Absolute-path installs work on this machine only; relocatable installs (global npm) work wherever the package is on PATH. The VS Code IDE runs no hook files.\n[^3]: `~/.copilot/hooks/compressor.json`, loaded by Copilot CLI only; Copilot has no user-global instructions mechanism.\n[^4]: Cursor `postToolUse` can replace MCP tool output only; built-in Read/Shell output cannot be rewritten.\n[^5]: OpenCode plugins run in-process (`tool.execute.after` mutates the tool output string directly) — no subprocess on the hot path. The plugin file format is doc-verified against opencode.ai and the sst/opencode source; not yet live-verified against a running OpenCode install, and `status` says so.\n\n## Modes\n\n| Mode | Instructions | Tool-output compression |\n|---|---|---|\n| `full` | none — `set-mode full` **removes** every compressor artifact and the hook, giving a true baseline rather than \"empty instructions present\" | none (passthrough) |\n| `optimized` | answer-first output discipline plus context discipline (targeted reads, no re-reads, no tool-output echo) — 11 atoms | tier 1 structural (ANSI strip, blank-run collapse, repeated-line dedupe, recoverable truncation at ~5,000 est. tokens) + comment-strip above ~2,000 est. tokens; output below ~600 est. tokens is never touched |\n| `slim` | optimized plus code-first responses under a hard ~10% explanation budget — 12 atoms | tiers 1–2 (skeleton view above ~6,000 est. tokens) plus log-aware filtering (test failures + summary, build errors) above ~800 est. tokens; touch floor ~300 |\n\nEvery omission is marked, sized, and recoverable — truncation markers state the exact `Read offset/limit` to retrieve the omitted lines, line numbers are never renumbered, and targeted reads (explicit offset/limit) pass through untouched. The hook is fail-open: any error means the original output passes through unchanged.\n\n## What the savings look like\n\n**A repetitive command output, compressed by the hook before the model sees it.** A 402-line build log becomes 4 lines; the marker tells the model what was collapsed:\n\n```text\n[INFO] building module graph... ok\n[compressor: previous line repeated 399 more times]\nFAIL: type error in engine.ts\nError: exit 1\n```\n\n**A large file read, truncated recoverably.** A 916-line file keeps its head and tail; the omitted middle is one marker line carrying the exact retrieval instruction, and original line numbers are preserved so edits and navigation still work:\n\n```text\n   354→  max: 100,\n[compressor: lines 355-916 omitted (~4749 est tokens) — Read src/telemetry.mjs with offset=355 and limit=562 to retrieve]\n   356→  let mask = 0;\n```\n\n**Your accumulated savings, from the live ledger.** Every worthwhile compression in a real session (at least 200 chars and 10% saved) appends one privacy-safe event — sizes and transform ids, never content and never a path.\nHook events are attributed to the agent's working directory, so `compressor savings --by project` breaks totals down per repo. The one identifying field is an optional project label, and it defaults to a keyed digest whose key is kept at `~/.compressor/project-salt`, outside the ledger, so a report you share cannot be tested against guessed project names:\n\n```text\n$ compressor savings --by tool\nsaved 127,041 chars (exact) ≈ 36,300 tokens (estimated — cheap estimator, not billable counts) · last 30 days\nevents: 8 (last 30 days)\n\nby tool:\n  bash  ████████████████████████████████████████  ≈ 35,162 tok\n  read  █                                         ≈ 1,138 tok\n```\n\n`compressor savings --html report.html` writes a self-contained report (inline SVG, no JS, no network). Kill switch: `COMPRESSOR_NO_LEDGER=1`.\nOpt into plain folder names with `COMPRESSOR_PROJECT_LABEL=name`, or relocate the digest key with `COMPRESSOR_PROJECT_SALT`, which must be an **absolute path to the key file** - any other value (a relative path, or a key pasted in place of a path) is ignored and the default `~/.compressor/project-salt` is used ([architecture](docs/ARCHITECTURE.md#7-ledger-and-savings)).\n\nBenchmarked effect sizes (real agent sessions, success-checked): the hook cut context volume **−16%** on log-heavy work, and the instruction packs cut conversational output **−10% to −79%** depending on conversation type, with zero measured quality loss. Effects are domain-specific — full numbers, distributions, run ids, and caveats in [docs/BENCHMARKING.md](docs/BENCHMARKING.md).\n\n## CLI reference\n\n| Command | What it does | Key flags (defaults) |\n|---|---|---|\n| `init` | install the instruction pack + hook for the given agents | `--agent <name...>` (`claude-code`), `--mode optimized\\|slim` (`optimized`), `--global`, `--dry-run`, `--hook-command auto\\|absolute\\|relocatable` (`auto`: PATH-based `compressor-hook` commands when npm-installed with the bins on PATH; absolute dev-build paths in source checkouts) |\n| `set-mode <full\\|optimized\\|slim>` | switch mode; `full` removes all compressor artifacts (true baseline) | `--agent <name...>` (`claude-code`), `--global`, `--dry-run`, `--hook-command` (as `init`) |\n| `status` | show installation state per agent — derived from files and markers, no state file to drift | `--global` |\n| `uninstall` | remove all compressor-owned artifacts | `--agent <name...>` (`claude-code`), `--global`, `--dry-run` |\n| `compress` | compress stdin to stdout via the engine; stats on stderr | `--mode` (`optimized`), `--kind read\\|bash\\|search\\|other` (`other`), `--file-path <path>`, `--marker-style plain\\|deterrent\\|informative` |\n| `count <file...>` | token counts per file — estimated by default | `--exact` (Anthropic `count_tokens`, needs `ANTHROPIC_API_KEY`), `--model` (`claude-sonnet-4-6`) |\n| `stats` | aggregate actual token usage from Claude Code transcripts | `--project <path>` (cwd), `--since` (`30d`) |\n| `savings` | show what the compression hook saved (live ledger, estimated tokens) | `--since` (`30d`, or `all`), `--by day\\|tool\\|mode\\|agent\\|project` (`day`), `--html <path>`, `--ledger-dir <dir>` |\n| `hook post-tool-use` | Claude Code PostToolUse protocol entry: payload on stdin, updated output on stdout | `--mode` (`optimized`), `--marker-style`, `--recovery-budget <n\\|off>` (overrides `COMPRESSOR_RECOVERY_BUDGET`/`COMPRESSOR_NO_RECOVERY_BUDGET`) |\n| `hook copilot-post-tool-use` | Copilot postToolUse protocol entry: payload on stdin, `modifiedResult` JSON on stdout | `--mode` (`optimized`), `--marker-style`, `--recovery-budget <n\\|off>` |\n\nInstalled hooks run as the dedicated bins `compressor-hook` / `compressor-copilot-hook` (the bundled entries directly — no CLI startup on the hot path); the `compressor hook …` subcommands exist for protocol testing.\n\nThe benchmarking commands (`compressor benchmark`, `compressor report`) are a from-source feature for measuring compressor itself — documented in [docs/BENCHMARKING.md](docs/BENCHMARKING.md).\n\n## Seeing your savings\n\nThree views, deliberately not conflated:\n\n- **`compressor savings`** — the live ledger (see the example above). Token numbers here are estimates from a cheap chars/3.5 estimator and are labelled as such; chars are exact. The ledger is fail-open — a broken ledger never breaks your agent.\n- **`compressor stats`** — raw token usage aggregated from your local Claude Code transcripts (the authoritative usage fields). Currently shows usage totals, not a before/after comparison.\n- **Benchmarks** — the measured before/after numbers, from real headless agent sessions with success checks: [docs/BENCHMARKING.md](docs/BENCHMARKING.md).\n\n## Limitations\n\nStated plainly, because the alternative is users discovering them:\n\n- **Copilot compression runs in Copilot CLI (and conditionally the cloud agent), never the IDE.** Relocatable installs (global npm) work for teammates who install the package; the cloud agent additionally needs the config on the default branch and the package in its environment. The Copilot IDE surface runs no hook files at all.\n- **Cursor and AGENTS.md get instructions only.** No mechanism exists to rewrite built-in tool output there.\n- **Compression pays where output is redundant (logs, repeated lines) and can cost where it is dense (code).** The measured hook effect is −16% context on log-heavy work, ~0 on moderate output, and slightly negative on dense code files where the model re-reads truncated content — see [docs/BENCHMARKING.md](docs/BENCHMARKING.md). The recovery-read budget (first 3 targeted re-reads pass through, further ones are compressed; `COMPRESSOR_RECOVERY_BUDGET` tunes, `COMPRESSOR_NO_RECOVERY_BUDGET=1` disables) bounds the re-read cost; its behavioral effect is not yet benchmarked.\n- **The OpenCode plugin is doc-verified, not yet live-verified** against a running OpenCode install — `compressor status` says so until it is.\n\n## Further reading\n\n- **Benchmarks and measured results**: [docs/BENCHMARKING.md](docs/BENCHMARKING.md) — current numbers with run ids, how to run the harness, auth modes, and safety rails.\n- **Methodology and run record**: [docs/MEASUREMENTS.md](docs/MEASUREMENTS.md) — the full experimental record, including the retracted first corpus and what it taught.\n- **Architecture**: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — engine tiers, adapter contracts, hook protocols, and the design decisions behind them.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","readmeFilename":"README.md"}