{"_id":"@arhen/pi-core-goal","name":"@arhen/pi-core-goal","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@arhen/pi-core-goal","version":"0.0.1","type":"module","description":"Session-log-backed long-running /goal mode for pi: automatic continuation after agent_settled, token budget, strict completion/blocked audits, cache-stable system prefix.","license":"MIT","author":{"name":"arhen"},"repository":{"type":"git","url":"git+https://github.com/arhen/pi-extensions.git","directory":"packages/core/pi-core-goal"},"main":"./src/index.ts","keywords":["pi","pi-coding-agent","pi-extension","pi-package","goal"],"peerDependencies":{"@earendil-works/pi-ai":"^0.84.2","@earendil-works/pi-coding-agent":"^0.84.2","@earendil-works/pi-tui":"^0.84.2","typebox":"^1.3.14"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"pi":{"extensions":["./src/index.ts"]},"devDependencies":{"@types/bun":"^1.3.14","typescript":"^7.0.2"},"_id":"@arhen/pi-core-goal@0.0.1","gitHead":"7f4177e7c098c142364dd57b0d39a14edfc17dca","bugs":{"url":"https://github.com/arhen/pi-extensions/issues"},"homepage":"https://github.com/arhen/pi-extensions#readme","_nodeVersion":"23.8.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-H5JlPvDVdCLVwvGxJ8Ed/JK/U+T0Dg1i/CZHe5INAREgagPiNyjdNutQf8Z8NhPHPjNxKS7RP9hwzboZvxH2+A==","shasum":"fb4ec29c3829a5274340794dc7266f08a2254c00","tarball":"https://registry.npmjs.org/@arhen/pi-core-goal/-/pi-core-goal-0.0.1.tgz","fileCount":4,"unpackedSize":35466,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHOnGAYVakZGPqvXfx+/41T0agBnHHBBMPydjGls6uw/AiA6Zb7REtjnNA1FPwA3BvGmZuWhrqXnYKUArjEQ7eH5Fg=="}]},"_npmUser":{"name":"arhen","email":"itsme.arhen@gmail.com"},"directories":{},"maintainers":[{"name":"arhen","email":"itsme.arhen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-core-goal_0.0.1_1788372141875_0.2527270575197933"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-02T18:02:21.668Z","0.0.1":"2026-09-02T18:02:22.005Z","modified":"2026-09-02T18:02:22.180Z"},"maintainers":[{"name":"arhen","email":"itsme.arhen@gmail.com"}],"description":"Session-log-backed long-running /goal mode for pi: automatic continuation after agent_settled, token budget, strict completion/blocked audits, cache-stable system prefix.","homepage":"https://github.com/arhen/pi-extensions#readme","keywords":["pi","pi-coding-agent","pi-extension","pi-package","goal"],"repository":{"type":"git","url":"git+https://github.com/arhen/pi-extensions.git","directory":"packages/core/pi-core-goal"},"author":{"name":"arhen"},"bugs":{"url":"https://github.com/arhen/pi-extensions/issues"},"license":"MIT","readme":"# @arhen/pi-core-goal\n\nSession-log-backed long-running objective mode for pi. One goal per thread; the agent keeps continuing automatically until the goal is complete, blocked, paused, or out of budget.\n\n## Usage\n\n```text\n/goal <objective>     → set and start a goal\n/goal                 → show current goal + usage\n/goal edit            → edit the objective\n/goal pause|resume    → stop/start automatic continuation\n/goal clear           → remove the goal\n```\n\nTools exposed to the agent: `create_goal`, `get_goal`, `update_goal` (complete/blocked only).\n\n## Design\n\n- State lives in the session log (`appendEntry`), reconstructed on reload/tree navigation. No external files.\n- Continuation is queued on `agent_settled` — after retries, compaction, and queued messages have fully drained — never mid-pipeline.\n- The system-prompt injection is static per goal (objective + rules only). Usage numbers travel in the continuation message at the end of the context, so the provider prompt-cache prefix stays stable across goal turns. Use `get_goal` for live numbers.\n- Optional `token_budget` stops automatic continuation when exhausted.\n- Strict completion and blocked audits in the continuation prompt: complete only with requirement-by-requirement evidence; blocked only after the same blocker repeats for 3 consecutive goal turns.\n\n## Test\n\n```bash\nbun test\n```\n","readmeFilename":"README.md","_rev":"1-c3f75597ebf5a79b6362f44009fd3379"}