{"_id":"@arcanemachine/pi-context-available","_rev":"2-8756cc4a6e18bd78d971ac0963b41bc8","name":"@arcanemachine/pi-context-available","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@arcanemachine/pi-context-available","version":"0.1.0","keywords":["pi","pi-coding-agent","pi-extension","pi-package","context","tokens"],"author":{"name":"Nicholas Moen"},"license":"MIT","_id":"@arcanemachine/pi-context-available@0.1.0","maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"homepage":"https://github.com/arcanemachine/pi-context-available#readme","bugs":{"url":"https://github.com/arcanemachine/pi-context-available/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"dea507b61adff11f9f202dff0f8f6f8e4289d068","tarball":"https://registry.npmjs.org/@arcanemachine/pi-context-available/-/pi-context-available-0.1.0.tgz","fileCount":5,"integrity":"sha512-NE62DO8nRpLXPTJsIFYg8lVGgWIUPeirtbO4i/CS05btvvpwobV6A9012uiZhpgq2PX09kqQlp82GmCHMVW2eQ==","signatures":[{"sig":"MEYCIQDDH91bihvlNg/T6xvvyMQnZsThBd6Fa8injfBfmIsuzgIhAMMXGC0t/mnfoYdo02XhzJAf2K4kXvoBe4GUv8WZZCSL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7106},"type":"module","engines":{"node":">=22.19.0"},"gitHead":"313a196904f8c9ad791a450934c2f6902e79affa","scripts":{"test":"vitest run --exclude '**/dist/**'","build":"tsc","watch":"tsc --watch","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" package.json README.md AGENTS.md CHANGELOG.md LICENSE.md tsconfig.json","typecheck":"tsc --noEmit","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" package.json README.md AGENTS.md CHANGELOG.md LICENSE.md tsconfig.json","prepublishOnly":"npm run format:check && npm run typecheck && npm run test && npm run build"},"_npmUser":{"name":"arcanemachine","email":"arcanemachine@gmail.com"},"repository":{"url":"git+https://github.com/arcanemachine/pi-context-available.git","type":"git"},"_npmVersion":"11.13.0","description":"Show the current Pi context usage and capacity to the agent","directories":{},"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.6","typebox":"1.3.7","prettier":"^3.8.3","typescript":"^5.9.3","@types/node":"^25.3.3","@earendil-works/pi-coding-agent":"0.84.1"},"peerDependencies":{"typebox":"*","@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"typebox":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-context-available_0.1.0_1788480151356_0.93782031690768","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@arcanemachine/pi-context-available","version":"0.1.1","description":"Show the current Pi context usage and capacity to the agent","type":"module","keywords":["pi","pi-coding-agent","pi-extension","pi-package","context","tokens"],"pi":{"extensions":["./src/index.ts"],"image":"https://raw.githubusercontent.com/arcanemachine/pi-context-available/main/logo.jpg"},"scripts":{"build":"tsc","watch":"tsc --watch","typecheck":"tsc --noEmit","test":"vitest run --exclude '**/dist/**'","format":"prettier --write \"src/**/*.ts\" \"tests/**/*.ts\" package.json README.md AGENTS.md CHANGELOG.md LICENSE.md tsconfig.json","format:check":"prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" package.json README.md AGENTS.md CHANGELOG.md LICENSE.md tsconfig.json","prepublishOnly":"npm run format:check && npm run typecheck && npm run test && npm run build"},"author":{"name":"Nicholas Moen"},"license":"MIT","peerDependencies":{"@earendil-works/pi-coding-agent":"*","typebox":"*"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":true},"typebox":{"optional":true}},"devDependencies":{"@earendil-works/pi-coding-agent":"0.84.1","@types/node":"^25.3.3","prettier":"^3.8.3","typebox":"1.3.7","typescript":"^5.9.3","vitest":"^4.1.6"},"repository":{"type":"git","url":"git+https://github.com/arcanemachine/pi-context-available.git"},"homepage":"https://github.com/arcanemachine/pi-context-available#readme","bugs":{"url":"https://github.com/arcanemachine/pi-context-available/issues"},"engines":{"node":">=22.19.0"},"publishConfig":{"access":"public"},"gitHead":"c0579325218bee50511bc67e2bc76d44bb5cacdd","_id":"@arcanemachine/pi-context-available@0.1.1","_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-7QzaN6n4qnuWJwl2ty9LTVUUV3OpaNSVOGAwmEZw+L2Oq3VEL28Hxy/EdtqaCJIFrOg7RXdEme744BLpNBJiKg==","shasum":"47be6dd0edc8ef1445ef4a56dd7dd992edc722d5","tarball":"https://registry.npmjs.org/@arcanemachine/pi-context-available/-/pi-context-available-0.1.1.tgz","fileCount":6,"unpackedSize":57794,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDuG2GeF6XAeYOPeVZ8fvUYGjhvZ3qr2INML+zuKB3ImQIgN/8KImpiXq8JZQqkWXqo4pmiP/ypqIeF+0UjbzkH+MQ="}]},"_npmUser":{"name":"arcanemachine","email":"arcanemachine@gmail.com"},"directories":{},"maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-context-available_0.1.1_1788482316913_0.8889909103900673"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-04T00:02:31.201Z","modified":"2026-09-04T00:38:37.194Z","0.1.0":"2026-09-04T00:02:31.512Z","0.1.1":"2026-09-04T00:38:37.057Z"},"bugs":{"url":"https://github.com/arcanemachine/pi-context-available/issues"},"author":{"name":"Nicholas Moen"},"license":"MIT","homepage":"https://github.com/arcanemachine/pi-context-available#readme","keywords":["pi","pi-coding-agent","pi-extension","pi-package","context","tokens"],"repository":{"type":"git","url":"git+https://github.com/arcanemachine/pi-context-available.git"},"description":"Show the current Pi context usage and capacity to the agent","maintainers":[{"name":"arcanemachine","email":"arcanemachine@gmail.com"}],"readme":"# pi-context-available\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/arcanemachine/pi-context-available/main/logo.jpg\" alt=\"pi-context-available logo\" width=\"250\" />\n</p>\n\n`pi-context-available` is a [Pi](https://pi.dev) extension that gives the agent\na compact, readable view of the current context usage and capacity.\n\n> Like this extension? See [my other Pi extensions](https://github.com/arcanemachine/pi-projects).\n\n## Requirements\n\n- Pi 0.84.1 or later\n- Node.js 22.19.0 or later for package development\n\n## Installation\n\nFrom npm:\n\n```bash\npi install npm:@arcanemachine/pi-context-available\n```\n\nFrom GitHub:\n\n```bash\npi install git:github.com/arcanemachine/pi-context-available\n```\n\nFor local development:\n\n```bash\npi -e ./src/index.ts\n```\n\n## Tool\n\nThe extension registers one read-only tool:\n\n### `context_available_show`\n\nThe agent can call this tool without arguments. It reports the active model,\nthinking level, used context tokens, total context capacity, and usage\npercentage:\n\n```text\nModel: provider/model (thinkingLevel)\nContext: 123,456 / 234,000 | 52.8%\n```\n\nThe slash is `used / total capacity`; numbers use comma separators. Immediately\nafter compaction, Pi may not know the current used-token count. In that case,\nthe tool preserves the known capacity and reports:\n\n```text\nContext: unknown / 234,000 | unknown\n```\n\nThere is no user-facing slash command because Pi already displays context\nstatistics to the user.\n\n## Development\n\n```bash\nnpm install --ignore-scripts --workspaces=false\nnpm run format:check\nnpm run typecheck\nnpm run test\nnpm run build\nnpm pack --dry-run\n```\n\nPi loads `src/index.ts` directly; no compiled runtime artifact is required.\n\n## License\n\nMIT. See [LICENSE.md](./LICENSE.md).\n","readmeFilename":"README.md"}