{"_id":"@alexgorbatchev/pi-agentation","_rev":"4-2286b3577523962b231bf16e58163d1c","name":"@alexgorbatchev/pi-agentation","dist-tags":{"latest":"3.1.2"},"versions":{"3.0.0":{"name":"@alexgorbatchev/pi-agentation","version":"3.0.0","keywords":["pi-package","pi-extension","agentation"],"license":"MIT","_id":"@alexgorbatchev/pi-agentation@3.0.0","maintainers":[{"name":"alexgorbatchev","email":"alex.gorbatchev@gmail.com"}],"pi":{"skills":["./skills"],"extensions":["./agentation.ts"]},"bin":{"pi-agentation":"bin/pi-agentation"},"dist":{"shasum":"6861de5525b62d914ee67867c04317db6a122407","tarball":"https://registry.npmjs.org/@alexgorbatchev/pi-agentation/-/pi-agentation-3.0.0.tgz","fileCount":6,"integrity":"sha512-66yOeHYJDHrJNlMZ8KeAqbaQUbB+uEIkYqj8awFEt4t4sAhKSRvW9XAGN+HLMEdNKDLDxK4ySkkPzLKrp/NRKQ==","signatures":[{"sig":"MEYCIQCAKsojoED9VJH/5XXuX48RK/U0PjOJjOK15Qt8aasd3QIhANmd16v9J0iwhA2lv2ayXMouRlc4ps7OFtmvwj98iesp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23932},"gitHead":"5c1705829104f9bda5717d66ecf620e0abb7f223","scripts":{"check":"npm run sync-skill && npm run verify:package && npm run verify:launcher","prepack":"npm run sync-skill","sync-skill":"node ./scripts/syncBundledSkill.js","verify:package":"npm pack --dry-run > /dev/null","verify:launcher":"PI_OFFLINE=1 ./bin/pi-agentation --list-models > /dev/null"},"_npmUser":{"name":"alexgorbatchev","email":"alex.gorbatchev@gmail.com"},"_npmVersion":"11.9.0","description":"pi extension launcher for the Agentation fix loop","directories":{},"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@mariozechner/pi-coding-agent":"^0.61.0","@alexgorbatchev/agentation-skills":"^1.0.0"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-agentation_3.0.0_1774117857662_0.6110829559856861","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@alexgorbatchev/pi-agentation","version":"3.1.0","keywords":["pi-package","pi-extension","agentation"],"license":"MIT","_id":"@alexgorbatchev/pi-agentation@3.1.0","maintainers":[{"name":"alexgorbatchev","email":"alex.gorbatchev@gmail.com"}],"homepage":"https://github.com/alexgorbatchev/pi-agentation#readme","bugs":{"url":"https://github.com/alexgorbatchev/pi-agentation/issues"},"pi":{"skills":["./skills"],"extensions":["./agentation.ts"]},"bin":{"pi-agentation":"bin/pi-agentation"},"dist":{"shasum":"a430a369442b1bdd12bae5cd7de3caa6a872e770","tarball":"https://registry.npmjs.org/@alexgorbatchev/pi-agentation/-/pi-agentation-3.1.0.tgz","fileCount":6,"integrity":"sha512-dU5eenPxKo99GZ+WChe6l5zRtnyOCDu466yn3QOq/GpbbJdRf7w+1tsao54QpZEF0ZFtJzKbIp99b9ab1eqeeQ==","signatures":[{"sig":"MEYCIQDf6LED2hosdRESMOOgipLtEDvc79K379gQvsTBLgNpvwIhAPl9cHC/cfBFOndPmsDXOb7sRXRdiHT2gSHVkfpvsMIM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alexgorbatchev%2fpi-agentation@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43810},"gitHead":"f064aab32553147336b03c35052965a1223ea93e","scripts":{"check":"npm run verify:package && npm run verify:launcher","verify:package":"npm pack --dry-run > /dev/null","verify:launcher":"PI_OFFLINE=1 ./bin/pi-agentation --list-models > /dev/null"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:271ff2a1-c6aa-4c33-a6a1-278ef2021103"}},"repository":{"url":"git+https://github.com/alexgorbatchev/pi-agentation.git","type":"git"},"_npmVersion":"11.12.0","description":"pi extension launcher for Agentation Fork","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@mariozechner/pi-coding-agent":"^0.61.0","@alexgorbatchev/agentation-cli":"^1.0.3"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-agentation_3.1.0_1774304059496_0.18388096717741598","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"name":"@alexgorbatchev/pi-agentation","version":"3.1.1","keywords":["pi-package","pi-extension","agentation"],"license":"MIT","_id":"@alexgorbatchev/pi-agentation@3.1.1","maintainers":[{"name":"alexgorbatchev","email":"alex.gorbatchev@gmail.com"}],"homepage":"https://github.com/alexgorbatchev/pi-agentation#readme","bugs":{"url":"https://github.com/alexgorbatchev/pi-agentation/issues"},"pi":{"skills":["./skills"],"extensions":["./agentation.ts"]},"bin":{"pi-agentation":"bin/pi-agentation"},"dist":{"shasum":"f22afc8ca20326b42ae01fab14f2fd250fb99e15","tarball":"https://registry.npmjs.org/@alexgorbatchev/pi-agentation/-/pi-agentation-3.1.1.tgz","fileCount":6,"integrity":"sha512-7OJr3uB0r1FDMKHf4eDlr9Cs6WGQ4fycsvQHoEv8qdHkjifQU3Hap1FO3fOfiD1VvEjJVj/I6b4EELXVL1gkWQ==","signatures":[{"sig":"MEQCIB9WHmcVlt6/FQC4sx6i7JuyO6iHtui3beMEUVXffdKsAiAwxIeippKpJ+uFm2YRIhk6l/0HGt76ymOZT37lhgcr2A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alexgorbatchev%2fpi-agentation@3.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":43721},"gitHead":"83a72caf45af0e140b8e78f2e1da9a4c37cef20c","scripts":{"check":"npm run verify:package && npm run verify:launcher","verify:package":"npm pack --dry-run > /dev/null","verify:launcher":"PI_OFFLINE=1 ./bin/pi-agentation --list-models > /dev/null"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:271ff2a1-c6aa-4c33-a6a1-278ef2021103"}},"repository":{"url":"git+https://github.com/alexgorbatchev/pi-agentation.git","type":"git"},"_npmVersion":"11.12.1","description":"pi extension launcher for Agentation Fork","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@mariozechner/pi-coding-agent":"^0.61.0","@alexgorbatchev/agentation-cli":"^1.0.3"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-agentation_3.1.1_1774565896357_0.8980693586108364","host":"s3://npm-registry-packages-npm-production"}},"3.1.2":{"name":"@alexgorbatchev/pi-agentation","version":"3.1.2","description":"pi extension launcher for Agentation Fork","repository":{"type":"git","url":"git+https://github.com/alexgorbatchev/pi-agentation.git"},"license":"MIT","keywords":["pi-package","pi-extension","agentation"],"bin":{"pi-agentation":"bin/pi-agentation"},"pi":{"extensions":["./agentation.ts"],"skills":["./skills"]},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"devDependencies":{"@alexgorbatchev/agentation-cli":"^1.0.3","@mariozechner/pi-coding-agent":"^0.61.0"},"scripts":{"check":"npm run verify:package && npm run verify:launcher","verify:package":"npm pack --dry-run > /dev/null","verify:launcher":"PI_OFFLINE=1 ./bin/pi-agentation --list-models > /dev/null"},"publishConfig":{"access":"public"},"gitHead":"76e77fd20e923c3e9af2f47c5cf7d39e90bb5685","_id":"@alexgorbatchev/pi-agentation@3.1.2","bugs":{"url":"https://github.com/alexgorbatchev/pi-agentation/issues"},"homepage":"https://github.com/alexgorbatchev/pi-agentation#readme","_nodeVersion":"22.22.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-e+91k52R7WEYI3A1Vo5qEz7Xct45mBo/ZBQDJXlO06Q3GOAR3yXBukbkNKSSAfiypc68NQ28SaFNm9NWH6IKBQ==","shasum":"f097426f7e56e90121254b5c64cf61609b6d2307","tarball":"https://registry.npmjs.org/@alexgorbatchev/pi-agentation/-/pi-agentation-3.1.2.tgz","fileCount":6,"unpackedSize":45520,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alexgorbatchev%2fpi-agentation@3.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD2Wma/HFC+CD7SC2wUIMKIyCyH3lxwZL34vZblxq478AIhAOPsVBVH2l9SMxWN4il4TJE+EtaadXKWOtYGD7bMhAv4"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:271ff2a1-c6aa-4c33-a6a1-278ef2021103"}},"directories":{},"maintainers":[{"name":"alexgorbatchev","email":"alex.gorbatchev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-agentation_3.1.2_1774590978422_0.7212090186226301"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-21T18:30:57.514Z","modified":"2026-03-27T05:56:18.822Z","3.0.0":"2026-03-21T18:30:57.810Z","3.1.0":"2026-03-23T22:14:19.651Z","3.1.1":"2026-03-26T22:58:16.524Z","3.1.2":"2026-03-27T05:56:18.556Z"},"bugs":{"url":"https://github.com/alexgorbatchev/pi-agentation/issues"},"license":"MIT","homepage":"https://github.com/alexgorbatchev/pi-agentation#readme","keywords":["pi-package","pi-extension","agentation"],"repository":{"type":"git","url":"git+https://github.com/alexgorbatchev/pi-agentation.git"},"description":"pi extension launcher for Agentation Fork","maintainers":[{"name":"alexgorbatchev","email":"alex.gorbatchev@gmail.com"}],"readme":"# pi-agentation\n\nA pi extension launcher for Agentation Fork.\n\nIt resolves the repository's Agentation Fork `projectId`, starts an\nextension-managed watch loop, and dispatches a **one-shot** Agentation Fork\nbatch-processing skill when real annotations arrive.\n\nSee:\n\n- [agentation-fork.vercel.app](https://agentation-fork.vercel.app)\n- [Agentation Fork](https://github.com/alexgorbatchev/agentation)\n- [Agentation Fork CLI](https://github.com/alexgorbatchev/agentation-cli)\n- [Agentation Skills](https://github.com/alexgorbatchev/agentation-skills)\n\n> [!IMPORTANT]\n> When idle, this keeps an Agentation Fork watch loop running but does not\n> spend model tokens. Tokens are only used when a real annotation batch is\n> dispatched for autonomous code-fix work.\n\n## Architecture\n\n`pi-agentation` now splits responsibilities cleanly:\n\n- **Extension**\n  - resolves the project for the current repo\n  - runs `agentation pending` once on startup\n  - then keeps a live `agentation watch <project-id> --timeout 300 --json` loop running\n  - dispatches exactly one skill run per fetched batch\n  - pauses queue polling while the current batch is still in progress\n\n- **Skill**\n  - processes exactly one already-fetched batch\n  - acknowledges each annotation\n  - edits code\n  - resolves, replies, or dismisses annotations\n  - exits when that batch is done\n\nThis avoids the old brittle design where the extension kept re-queuing the same\nskill prompt after every agent turn.\n\n## Behavior\n\n- The launcher (`pi-agentation`) injects the bundled `agentation` skill via `--skill`\n- The extension checks that `/skill:agentation` is available before starting\n- On session start/switch/fork, the extension:\n  - runs `agentation projects --json`\n  - runs `rg` to discover literal `projectId=\"...\"` or `projectId='...'` values in the repo\n  - intersects both lists\n  - auto-starts if exactly one project matches, otherwise prompts you to choose in the TUI\n- The resolved project ID is stored in the current Pi session so reloads/resume do not re-prompt that same session\n- The extension manages the polling loop itself; it does one startup `agentation pending` check and then relies on a live `agentation watch` loop as the primary mechanism\n- When a batch arrives, the extension injects batch context and dispatches `/skill:agentation <project-id>`\n- The UI widget is intentionally conservative: after startup it reports live-watch status, not an authoritative queue-empty claim\n- If a batch is left incomplete, restart `pi-agentation` to retry from a clean watch loop\n- On `session_shutdown`, the extension stops its internal watch loop automatically\n- If the skill is missing, no repo project IDs are found, or no discovered repo IDs are known to Agentation Fork yet: the plugin requests shutdown and exits with code `1`\n\n## Installation\n\nInstall both project packages:\n\n```bash\nnpm install -D @alexgorbatchev/agentation @alexgorbatchev/pi-agentation\n```\n\n`@alexgorbatchev/pi-agentation` ships a bundled `agentation` skill, so you do not need to install a separate skill package for local use.\n\nExecutable resolution order:\n\n- `pi-agentation` resolves `pi` from the nearest `node_modules/.bin/pi` first, then falls back to `PATH`\n- the extension resolves `agentation` from the nearest `node_modules/.bin/agentation` first, then falls back to `PATH`\n- `rg` is still expected on `PATH`\n\nThis makes the package work cleanly when `pi-agentation`, `pi`, and the Agentation Fork CLI are installed into the same Node project, while still supporting global installations.\n\n## Usage\n\nBefore running pi, start the [Agentation Fork CLI](https://github.com/alexgorbatchev/agentation-cli) and connect from the front end which uses `<Agentation projectId=\"...\" />` at least once in the last 24h. Then run the launcher from your project:\n\n```bash\nnpx pi-agentation\n```\n\nIf your shell already exposes local package binaries on `PATH`, you can run:\n\n```bash\npi-agentation\n```\n\n## Notes\n\n- The extension now owns polling; the skill is intentionally one-shot.\n- If you leave a batch partially handled, restart `pi-agentation` to retry from a clean watch loop.\n","readmeFilename":"README.md"}