{"_id":"@dreki-gg/pi-modes","_rev":"6-4b9f9b26544cc82623bcd42d7fd31b34","name":"@dreki-gg/pi-modes","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@dreki-gg/pi-modes","version":"0.1.0","keywords":["pi-package"],"author":{"name":"Juan Albarran","email":"jalbarrandev@gmail.com"},"license":"MIT","_id":"@dreki-gg/pi-modes@0.1.0","maintainers":[{"name":"jalbarrang","email":"jalbarrandev@gmail.com"}],"homepage":"https://github.com/dreki-gg/pi-extensions#readme","bugs":{"url":"https://github.com/dreki-gg/pi-extensions/issues"},"pi":{"extensions":["./extensions/modes"]},"dist":{"shasum":"873d5465cb85238044ea3f001e53eb5f187c6012","tarball":"https://registry.npmjs.org/@dreki-gg/pi-modes/-/pi-modes-0.1.0.tgz","fileCount":6,"integrity":"sha512-HNUxXorR9JYscz1Fe9Z6zSfTqZWP2cginOKgVftlwzfbrSzC3LvhgZ/kBg5XI+gJzOG1cFbPEAs4BcBeFYwRnQ==","signatures":[{"sig":"MEYCIQDNcH9B4MjSbNDLPKx9TRDAZZYtDvaYIUNgLh0DggkAawIhAPlUuU3C/PhZ7/zFZVmNGLI4iWkAF7xOShH8LrS3qGhR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19759},"type":"module","gitHead":"1c8ef8c0a9006bcdadfd7742252ae0a1800013a6","scripts":{"lint":"oxlint extensions","format":"oxfmt --write extensions","typecheck":"tsc --noEmit","format:check":"oxfmt --check extensions"},"_npmUser":{"name":"jalbarrang","email":"jalbarrandev@gmail.com"},"repository":{"url":"git+https://github.com/dreki-gg/pi-extensions.git","type":"git","directory":"packages/modes"},"_npmVersion":"11.12.1","description":"Config-driven preset and mode switching for pi — hard-enforced tool whitelists, mode aliases, and session persistence","directories":{},"_nodeVersion":"24.12.0","_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.43.0","oxlint":"^1.58.0","typescript":"^6.0.0","@types/node":"24"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-modes_0.1.0_1775573234382_0.3166004197055594","host":"s3://npm-registry-packages-npm-production"},"deprecated":"No longer maintained."},"0.1.1":{"name":"@dreki-gg/pi-modes","version":"0.1.1","keywords":["pi-package","pi","modes","presets","tool-whitelist"],"author":{"name":"Juan Albarran","email":"jalbarrandev@gmail.com"},"license":"MIT","_id":"@dreki-gg/pi-modes@0.1.1","maintainers":[{"name":"jalbarrang","email":"jalbarrandev@gmail.com"}],"homepage":"https://github.com/dreki-gg/pi-extensions#readme","bugs":{"url":"https://github.com/dreki-gg/pi-extensions/issues"},"pi":{"extensions":["./extensions/modes"]},"dist":{"shasum":"d2c896528605c35790fd1727126fbc736e7c375a","tarball":"https://registry.npmjs.org/@dreki-gg/pi-modes/-/pi-modes-0.1.1.tgz","fileCount":6,"integrity":"sha512-21c+a5zeqgALWFKfWwvXFi9rOYfIAZf91CK65HIFWKxbDicaQ/OQNLNyaNhfUaktqXPGOB4Xa8gppCRaUbOIPQ==","signatures":[{"sig":"MEUCIQDIUkNeNzQ+pelmUxMCdFq1s/4wza/0cZ75OGUb7E6tzAIgVU7Puh8Q4hoO9JAUer2AfSubbUrKOoFxcVHEEQpymAA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dreki-gg%2fpi-modes@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":23824},"type":"module","gitHead":"160b885a41562acaead53384dcad4869f143d6ad","scripts":{"lint":"oxlint extensions","format":"oxfmt --write extensions","typecheck":"tsc --noEmit","format:check":"oxfmt --check extensions"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:265fec6a-60f1-4934-b1d7-cefeb0a20c87"}},"repository":{"url":"git+https://github.com/dreki-gg/pi-extensions.git","type":"git","directory":"packages/modes"},"_npmVersion":"11.11.0","description":"Config-driven preset and mode switching for pi — hard-enforced tool whitelists, mode aliases, and session persistence","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.43.0","oxlint":"^1.58.0","typescript":"^6.0.0","@types/node":"24"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-modes_0.1.1_1775574421066_0.8301987493520309","host":"s3://npm-registry-packages-npm-production"},"deprecated":"No longer maintained."},"0.1.2":{"name":"@dreki-gg/pi-modes","version":"0.1.2","keywords":["pi-package","pi","modes","presets","tool-whitelist"],"author":{"name":"Juan Albarran","email":"jalbarrandev@gmail.com"},"license":"MIT","_id":"@dreki-gg/pi-modes@0.1.2","maintainers":[{"name":"jalbarrang","email":"jalbarrandev@gmail.com"}],"homepage":"https://github.com/dreki-gg/pi-extensions#readme","bugs":{"url":"https://github.com/dreki-gg/pi-extensions/issues"},"pi":{"extensions":["./extensions/modes"]},"dist":{"shasum":"4ebefa935990e3923688eee7d5f4ac97a4448960","tarball":"https://registry.npmjs.org/@dreki-gg/pi-modes/-/pi-modes-0.1.2.tgz","fileCount":6,"integrity":"sha512-/ub/W0yqN3T7UOZ792bnMIECoU2rmjhqYsaoMPoOStmIPpq0kyHNWN3p3wJL2d+jRJuJI/fSUWrlxDYPDpkT1g==","signatures":[{"sig":"MEUCIDTq+Nm1FJKHVc9oiiS47IlnrgWmA0q3xzWzvi29L3U5AiEApKH7hmCZlWRx5W+WTu7xDOwXwd76MyS5jM/nilbYES0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dreki-gg%2fpi-modes@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24818},"type":"module","gitHead":"904020ba3ae140456dbf80e287b98cb9cefeb3e6","scripts":{"lint":"oxlint extensions","format":"oxfmt --write extensions","typecheck":"tsc --noEmit","format:check":"oxfmt --check extensions"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:265fec6a-60f1-4934-b1d7-cefeb0a20c87"}},"repository":{"url":"git+https://github.com/dreki-gg/pi-extensions.git","type":"git","directory":"packages/modes"},"_npmVersion":"11.11.0","description":"Config-driven preset and mode switching for pi — hard-enforced tool whitelists, mode aliases, and session persistence","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.43.0","oxlint":"^1.58.0","typescript":"^6.0.0","@types/node":"24"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-modes_0.1.2_1776747122347_0.8176143270874316","host":"s3://npm-registry-packages-npm-production"},"deprecated":"No longer maintained."},"0.1.3":{"name":"@dreki-gg/pi-modes","version":"0.1.3","keywords":["pi-package","pi","modes","presets","tool-whitelist"],"author":{"name":"Juan Albarran","email":"jalbarrandev@gmail.com"},"license":"MIT","_id":"@dreki-gg/pi-modes@0.1.3","maintainers":[{"name":"jalbarrang","email":"jalbarrandev@gmail.com"}],"homepage":"https://github.com/dreki-gg/pi-extensions#readme","bugs":{"url":"https://github.com/dreki-gg/pi-extensions/issues"},"pi":{"extensions":["./extensions/modes"]},"dist":{"shasum":"82fdfd726dbc5651d64c2bed972d13f9feebb2c8","tarball":"https://registry.npmjs.org/@dreki-gg/pi-modes/-/pi-modes-0.1.3.tgz","fileCount":6,"integrity":"sha512-a1S1zSQejnNYtuLRqEc5DIcqZT9rBe3JF5jnm2jpvJpSewi09iPaEEmRKoJ3tpbsIK6a9zj5K9B6XO8IlIl3pA==","signatures":[{"sig":"MEUCIG7rlmGbzc38hmCm1hyFXfJ+P97UbBFZLx+GKiENZIlMAiEAr+KDR7nwnDK5l7dk1BNeJzguSGF0WsPhq0reDsS1coY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dreki-gg%2fpi-modes@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27231},"type":"module","gitHead":"85b39bafefda7322533bb6ac66f4a8712d78648f","scripts":{"lint":"oxlint extensions","format":"oxfmt --write extensions","typecheck":"tsc --noEmit","format:check":"oxfmt --check extensions"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:265fec6a-60f1-4934-b1d7-cefeb0a20c87"}},"repository":{"url":"git+https://github.com/dreki-gg/pi-extensions.git","type":"git","directory":"packages/modes"},"_npmVersion":"11.11.0","description":"Config-driven preset and mode switching for pi — hard-enforced tool whitelists, mode aliases, and session persistence","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.43.0","oxlint":"^1.58.0","typescript":"^6.0.0","@types/node":"24"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-modes_0.1.3_1777002118476_0.05313094426732512","host":"s3://npm-registry-packages-npm-production"},"deprecated":"No longer maintained."},"0.1.4":{"name":"@dreki-gg/pi-modes","version":"0.1.4","keywords":["pi-package","pi","modes","presets","tool-whitelist"],"author":{"name":"Juan Albarran","email":"jalbarrandev@gmail.com"},"license":"MIT","_id":"@dreki-gg/pi-modes@0.1.4","maintainers":[{"name":"jalbarrang","email":"jalbarrandev@gmail.com"}],"homepage":"https://github.com/dreki-gg/pi-extensions#readme","bugs":{"url":"https://github.com/dreki-gg/pi-extensions/issues"},"pi":{"extensions":["./extensions/modes"]},"dist":{"shasum":"326d66654111780cf58f7be6f50d20b1405e430b","tarball":"https://registry.npmjs.org/@dreki-gg/pi-modes/-/pi-modes-0.1.4.tgz","fileCount":6,"integrity":"sha512-ALfdPUMqMbUXhF2twlsOiPNqOxg8MUOMaa+wzk7rMxAqm39edKy4xeq9X+ux0OKoebblHOJM4P4zXmwLO/1zRQ==","signatures":[{"sig":"MEUCIAelnhtDTNKhPVQA3HFmAXr6nX5Mu/o+vrfJS6bEUl8cAiEAvDTmZljb2hwWEyFYfpymFmG7aAakOt+k50cYcsnRT88=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@dreki-gg%2fpi-modes@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":27648},"type":"module","gitHead":"5b173121c8e5d67bfb971986099b4309c5b2a0ad","scripts":{"lint":"oxlint extensions","format":"oxfmt --write extensions","typecheck":"tsc --noEmit","format:check":"oxfmt --check extensions"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:265fec6a-60f1-4934-b1d7-cefeb0a20c87"}},"repository":{"url":"git+https://github.com/dreki-gg/pi-extensions.git","type":"git","directory":"packages/modes"},"_npmVersion":"11.11.0","description":"Config-driven preset and mode switching for pi — hard-enforced tool whitelists, mode aliases, and session persistence","directories":{},"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.43.0","oxlint":"^1.58.0","typescript":"^6.0.0","@types/node":"24"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-modes_0.1.4_1778222230496_0.2311977907037266","host":"s3://npm-registry-packages-npm-production"},"deprecated":"No longer maintained."}},"time":{"created":"2026-04-07T14:47:14.283Z","modified":"2026-06-25T01:37:41.858Z","0.1.0":"2026-04-07T14:47:14.547Z","0.1.1":"2026-04-07T15:07:01.207Z","0.1.2":"2026-04-21T04:52:02.502Z","0.1.3":"2026-04-24T03:41:58.599Z","0.1.4":"2026-05-08T06:37:10.636Z"},"bugs":{"url":"https://github.com/dreki-gg/pi-extensions/issues"},"author":{"name":"Juan Albarran","email":"jalbarrandev@gmail.com"},"license":"MIT","homepage":"https://github.com/dreki-gg/pi-extensions#readme","keywords":["pi-package","pi","modes","presets","tool-whitelist"],"repository":{"url":"git+https://github.com/dreki-gg/pi-extensions.git","type":"git","directory":"packages/modes"},"description":"Config-driven preset and mode switching for pi — hard-enforced tool whitelists, mode aliases, and session persistence","maintainers":[{"name":"jalbarrang","email":"jalbarrandev@gmail.com"}],"readme":"# @dreki-gg/pi-modes\n\nConfig-driven preset and mode switching for [pi](https://github.com/badlogic/pi-mono).\n\nUse it to create hard-enforced modes like `explore`, `implement`, or `review` that can:\n- restrict tool access\n- inject mode-specific instructions\n- optionally switch model and thinking level\n- persist until explicitly changed\n\n## Install\n\n```bash\npi install npm:@dreki-gg/pi-modes\n```\n\n## What it provides\n\n| Feature | Name | Notes |\n|---|---|---|\n| Flag | `--preset <name>` | Start pi in a configured mode |\n| Command | `/preset [name]` | Select, apply, or clear a preset |\n| Command | `/mode [name]` | Alias of `/preset` |\n| Command | `/modes` | List loaded presets and the active preset |\n| Slash alias | `/<preset-name>` | Typing `/explore` applies preset `explore` |\n\n## Config files\n\nPresets are loaded from:\n\n- global: `~/.pi/agent/presets.json`\n- project: `.pi/presets.json`\n\nProject presets override global presets **field-by-field** for presets with the same name.\n\nOn first run after install, `pi-modes` bootstraps starter defaults into the global file:\n- if `~/.pi/agent/presets.json` does not exist, it creates it\n- if it exists, it adds any missing starter presets\n- it does **not** overwrite existing preset names\n\n## Starter defaults\n\nToday the package seeds this starter preset automatically:\n\n- `explore`\n\nYou can edit or remove it after bootstrap.\n\n## Example `presets.json`\n\n```json\n{\n  \"explore\": {\n    \"description\": \"Read-only exploration and brainstorming\",\n    \"tools\": [\"read\", \"lsp\", \"context7_*\", \"questionnaire\"],\n    \"thinkingLevel\": \"high\",\n    \"instructions\": \"You are in EXPLORE MODE. Your job is to understand, inspect, brainstorm, and ask questions. Do not make changes. Focus on analysis, tradeoffs, risks, and next-step recommendations.\"\n  },\n  \"implement\": {\n    \"tools\": [\"read\", \"bash\", \"edit\", \"write\"],\n    \"instructions\": \"You are in IMPLEMENT MODE. Make focused, correct changes and verify them before finishing.\"\n  }\n}\n```\n\n## Preset schema\n\n```ts\n{\n  [name: string]: {\n    description?: string;\n    provider?: string;\n    model?: string;\n    thinkingLevel?: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';\n    tools?: string[];      // exact tool names or wildcard patterns like \"context7_*\"\n    instructions?: string; // appended to the system prompt when active\n    aliases?: string[];    // optional extra slash aliases\n  }\n}\n```\n\nNotes:\n- Every preset name automatically works as a slash alias, so `explore` becomes `/explore`.\n- If a prompt template, skill, or other slash command already uses that name, the existing command wins and the alias is skipped.\n- Tool patterns support `*` wildcard matching.\n- If a preset specifies unknown tools or patterns that match nothing, the extension warns you.\n\n## Usage\n\n```bash\npi --preset explore\n```\n\nInside pi:\n\n```text\n/preset explore\n/mode implement\n/explore\n/preset off\n/modes\n```\n\nIf `/preset` or `/mode` is called without an argument in interactive mode, the extension opens a selector.\n\n## Explore mode example\n\nThis package is a good fit for a hard-enforced exploration mode where pi can inspect and reason without write access:\n\n```json\n{\n  \"explore\": {\n    \"tools\": [\"read\", \"lsp\", \"context7_*\", \"questionnaire\"],\n    \"instructions\": \"You are in EXPLORE MODE. Investigate, ask clarifying questions, compare options, and brainstorm. Do not make or propose file edits in this mode.\"\n  }\n}\n```\n\nThat disables `bash`, `edit`, `write`, and `subagent` by omission.\n","readmeFilename":"README.md"}