{"_id":"@derogab/pi-auto-mode","_rev":"5-cb30f3d4010238bcc6f191c174be9193","name":"@derogab/pi-auto-mode","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@derogab/pi-auto-mode","version":"0.1.0","keywords":["pi-package"],"_id":"@derogab/pi-auto-mode@0.1.0","maintainers":[{"name":"derogab","email":"derosagabriele@outlook.it"}],"homepage":"https://github.com/derogab/agent-kit#readme","bugs":{"url":"https://github.com/derogab/agent-kit/issues"},"pi":{"extensions":["./extensions/auto-mode.ts"]},"dist":{"shasum":"5801184e7ad2ec5494f47982ccfde8a1070dd053","tarball":"https://registry.npmjs.org/@derogab/pi-auto-mode/-/pi-auto-mode-0.1.0.tgz","fileCount":8,"integrity":"sha512-TPLV0L3hxOcwN8unpo11d5DT/7405UJFUkIlAbWRFpjrB4jZDgNRKlAw8qG1wvZgrkAuD1TDZJmseASG/eEn5Q==","signatures":[{"sig":"MEUCIQCRKvElaEArFLcaqArLvIzM+9V0my0FZD9SVU/ofiDHPgIgOV9hEpcJl3kckSG3wDXrEM/+x07myJHAK3EeM8dBrLQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@derogab%2fpi-auto-mode@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":64052},"type":"module","gitHead":"e4d00cc1b91d7870f161c94d8cfb96ceb1c0cf1e","scripts":{"test":"npm run typecheck && node --experimental-strip-types --test test/*.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"derogab","email":"derosagabriele@outlook.it"},"repository":{"url":"git+https://github.com/derogab/agent-kit.git","type":"git","directory":"plugins/auto-mode"},"_npmVersion":"11.16.0","description":"Automatically check Pi bash commands before execution","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"24.12.4","@earendil-works/pi-ai":"0.80.10","@earendil-works/pi-tui":"0.80.10","@earendil-works/pi-coding-agent":"0.80.10"},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-auto-mode_0.1.0_1784751998891_0.7368910095023675","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@derogab/pi-auto-mode","version":"0.2.0","keywords":["pi-package"],"_id":"@derogab/pi-auto-mode@0.2.0","maintainers":[{"name":"derogab","email":"derosagabriele@outlook.it"}],"homepage":"https://github.com/derogab/agent-kit#readme","bugs":{"url":"https://github.com/derogab/agent-kit/issues"},"pi":{"extensions":["./extensions/auto-mode.ts"]},"dist":{"shasum":"432393da0fcb1086cfceaaff86bfd70826df7eda","tarball":"https://registry.npmjs.org/@derogab/pi-auto-mode/-/pi-auto-mode-0.2.0.tgz","fileCount":14,"integrity":"sha512-iS4BsHra/Gh1qYKvXgrmkDgmmWwnWJlpcPM8D1aE9uz+QQkaHRwhCF2DzIktZXXI+2Ta2LZx7h9bLrb9JQdqVQ==","signatures":[{"sig":"MEYCIQDrjo9vzM+TtWmkhQNFzefQg66HsDYP+uAPoZcTZcfl7AIhAPJ2rFUkkrEjFv+E9TdRSyh97CPlAV0ZCM5wQdl32ACq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@derogab%2fpi-auto-mode@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":57507},"type":"module","gitHead":"6c491d3e903cd0e76f0f72f16a14d8efd5543264","scripts":{"test":"npm run typecheck && node --experimental-strip-types --test test/*.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"derogab","email":"derosagabriele@outlook.it"},"repository":{"url":"git+https://github.com/derogab/agent-kit.git","type":"git","directory":"plugins/auto-mode"},"_npmVersion":"11.16.0","description":"Checks Bash commands before execution","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@huggingface/hub":"2.13.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"7.0.2","@types/node":"26.1.1","@earendil-works/pi-tui":"0.82.0","@earendil-works/pi-coding-agent":"0.82.0"},"peerDependencies":{"@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-auto-mode_0.2.0_1784982977768_0.528036057072842","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@derogab/pi-auto-mode","version":"0.2.1","keywords":["pi-package"],"_id":"@derogab/pi-auto-mode@0.2.1","maintainers":[{"name":"derogab","email":"derosagabriele@outlook.it"}],"homepage":"https://github.com/derogab/agent-kit#readme","bugs":{"url":"https://github.com/derogab/agent-kit/issues"},"pi":{"extensions":["./extensions/auto-mode.ts"]},"dist":{"shasum":"fcf6c0f84dda03ce340db8831dfac3613f80a771","tarball":"https://registry.npmjs.org/@derogab/pi-auto-mode/-/pi-auto-mode-0.2.1.tgz","fileCount":14,"integrity":"sha512-Bb16ya3pE1Lth2Q6gv1/6hoA7Nq4UyL7Ur9rCcYdQO01T6CNGYcPaAr/xJ6SYYuIWElzFjsBaPMMuUndwRGcjg==","signatures":[{"sig":"MEYCIQCwSSEJxQp0JMVG13YVOMBzWd4lKrFQqJA+Cql3HAKnHwIhAPn8vP4YwTl/Sdd0S7OqxJfPIrZfNYfy09JDGLnIBIFX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@derogab%2fpi-auto-mode@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":57510},"type":"module","gitHead":"c02e34e3e49fdaa4e30a03c96d10bec52e5c1934","scripts":{"test":"npm run typecheck && node --experimental-strip-types --test test/*.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"derogab","email":"derosagabriele@outlook.it"},"repository":{"url":"git+https://github.com/derogab/agent-kit.git","type":"git","directory":"plugins/auto-mode"},"_npmVersion":"11.16.0","description":"Checks Bash commands before execution","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@huggingface/hub":"2.13.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"7.0.2","@types/node":"26.1.1","@earendil-works/pi-tui":"0.82.0","@earendil-works/pi-coding-agent":"0.82.0"},"peerDependencies":{"@earendil-works/pi-tui":"*","@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-auto-mode_0.2.1_1784988716653_0.24494640747777363","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@derogab/pi-auto-mode","version":"0.3.0","keywords":["pi-package"],"_id":"@derogab/pi-auto-mode@0.3.0","maintainers":[{"name":"derogab","email":"derosagabriele@outlook.it"}],"homepage":"https://github.com/derogab/agent-kit#readme","bugs":{"url":"https://github.com/derogab/agent-kit/issues"},"pi":{"extensions":["./extensions/auto-mode.ts"]},"dist":{"shasum":"2314426cf772e6e01d5e1f9b1915696a02ea3004","tarball":"https://registry.npmjs.org/@derogab/pi-auto-mode/-/pi-auto-mode-0.3.0.tgz","fileCount":12,"integrity":"sha512-s1ue81g6rc/7U7co5pTxuAa3wcoyc6wiNyYtf28h0S2txLhrOAxYwVesEsKlzLNe8VIUqzh0TnNUbGY//83CZA==","signatures":[{"sig":"MEUCIC9W+42KWo94lRP2iUbE5gP3C4wE9cXSaipg2iJpXhIyAiEA1+1V8JUAmydAa2bKqZwZWEUTQronaIiCsFtAQU2sqUY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@derogab%2fpi-auto-mode@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":30561},"type":"module","gitHead":"b485131a538176b4b8c4e737686c4ff675eef15f","scripts":{"test":"npm run typecheck && node --experimental-strip-types --test test/*.test.ts","typecheck":"tsc --noEmit"},"_npmUser":{"name":"derogab","email":"derosagabriele@outlook.it"},"repository":{"url":"git+https://github.com/derogab/agent-kit.git","type":"git","directory":"plugins/auto-mode"},"_npmVersion":"11.16.0","description":"Checks Bash commands before execution","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@huggingface/hub":"2.14.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"7.0.2","@types/node":"26.1.2","@earendil-works/pi-coding-agent":"0.82.1"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-auto-mode_0.3.0_1785404635760_0.3115918972080838","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@derogab/pi-auto-mode","version":"0.4.0","description":"Checks Bash commands before execution","type":"module","scripts":{"typecheck":"tsc --noEmit","test":"npm run typecheck && node --experimental-strip-types --test test/*.test.ts"},"keywords":["pi-package"],"repository":{"type":"git","url":"git+https://github.com/derogab/agent-kit.git","directory":"plugins/auto-mode"},"publishConfig":{"access":"public"},"pi":{"extensions":["./extensions/auto-mode.ts"]},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"devDependencies":{"@earendil-works/pi-coding-agent":"0.84.1","@types/node":"26.2.0","typescript":"7.0.2"},"dependencies":{"@huggingface/hub":"2.15.0"},"gitHead":"c735db99d196dee2c97f723385170fd82dcb3471","_id":"@derogab/pi-auto-mode@0.4.0","bugs":{"url":"https://github.com/derogab/agent-kit/issues"},"homepage":"https://github.com/derogab/agent-kit#readme","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-3JPqd8QTWUun09pWGIDPoGpwVrhONtJX+qHin755OPou47OR9kNXYonNL0+lnE7TNIHR59SVyuURbs8JnZswkQ==","shasum":"278f742aad6a15ac49e5ce66b6ac372375075b95","tarball":"https://registry.npmjs.org/@derogab/pi-auto-mode/-/pi-auto-mode-0.4.0.tgz","fileCount":13,"unpackedSize":49957,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@derogab%2fpi-auto-mode@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD465nacNhe2oj1Zhce2bLsyjf/gCW+usP94d1+G0ArnwIgJNoTZTeqkwCT2++8fRK17pL0ncC4WrVuoo2s1EBW3mQ="}]},"_npmUser":{"name":"derogab","email":"derosagabriele@outlook.it"},"directories":{},"maintainers":[{"name":"derogab","email":"derosagabriele@outlook.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-auto-mode_0.4.0_1786209433545_0.8349986021308333"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-22T20:26:38.768Z","modified":"2026-08-08T17:17:14.040Z","0.1.0":"2026-07-22T20:26:39.019Z","0.2.0":"2026-07-25T12:36:17.919Z","0.2.1":"2026-07-25T14:11:56.799Z","0.3.0":"2026-07-30T09:43:55.909Z","0.4.0":"2026-08-08T17:17:13.696Z"},"bugs":{"url":"https://github.com/derogab/agent-kit/issues"},"homepage":"https://github.com/derogab/agent-kit#readme","keywords":["pi-package"],"repository":{"type":"git","url":"git+https://github.com/derogab/agent-kit.git","directory":"plugins/auto-mode"},"description":"Checks Bash commands before execution","maintainers":[{"name":"derogab","email":"derosagabriele@outlook.it"}],"readme":"# auto-mode\n\nA Pi plugin that adds an optional safety check to Pi's built-in `bash` tool using explicit policy rules and a local classifier for commands not covered by those rules.\n\n> **WARNING**: this plugin is under active development and must be considered alpha software. Use it with caution.\n\n## Install\n\n```bash\npi install npm:@derogab/pi-auto-mode\n```\n\nInstall the unified [`llama`](https://llama.app/) CLI and make it available on your `PATH`.\nAuto-mode starts and maintains `llama serve` in the background on an available local port\nwhile enabled, downloading the selected model to the Hugging Face cache when needed.\nConcurrent Pi instances share one server per model, keeping a single copy of it in memory;\nthe server stops once the last of those instances stops using it.\n\n## Controls\n\nRun `/auto-mode` to manage the plugin settings.\n\n## Configure\n\nCreate `auto-mode.json` in either or both locations:\n\n- Pi's user agent directory, normally `~/.pi/agent/auto-mode.json`\n- The trusted project's `.pi/auto-mode.json`\n\n```json\n{\n  \"allow\": [\n    \"^git status$\",\n    \"^git diff$\",\n    \"^npm test$\",\n    \"^npm run (lint|build)$\"\n  ],\n  \"ask\": [\n    \"^git commit(?:\\\\s|$)\",\n    \"^git push(?:\\\\s|$)\",\n    \"^npm publish(?:\\\\s|$)\"\n  ],\n  \"deny\": [\n    \"^git push(?=\\\\s|$)(?=[\\\\s\\\\S]*\\\\s(?:-[a-zA-Z]*f[a-zA-Z]*|--force(?:-with-lease)?(?:=\\\\S+)?)(?:\\\\s|$))\",\n    \"(^|\\\\s)(sudo|doas)(\\\\s|$)\",\n    \"\\\\brm\\\\b(?=[\\\\s\\\\S]*\\\\s(?:-[a-zA-Z]*[rR][a-zA-Z]*|--(?:r|re|rec|recu|recur|recurs|recursi|recursiv|recursive))(?:\\\\s|$))(?=[\\\\s\\\\S]*\\\\s(?:-[a-zA-Z]*f[a-zA-Z]*|--(?:f|fo|for|forc|force))(?:\\\\s|$))\"\n  ]\n}\n```\n\nRules are checked in order: `deny`, `ask`, `allow`, then the classifier. Each rule is a case-sensitive JavaScript regular expression matched as written against the command. Rules from both files are combined. Missing files are ignored; invalid files block commands.\n\nAuto-mode is not a sandbox or a guarantee of safety.\n\nThe classifier uses the [0.8B](https://huggingface.co/inclusionAI/SingGuard-NSFA-0.8B-GGUF), [2B](https://huggingface.co/inclusionAI/SingGuard-NSFA-2B-GGUF), [4B](https://huggingface.co/inclusionAI/SingGuard-NSFA-4B-GGUF), or [9B](https://huggingface.co/inclusionAI/SingGuard-NSFA-9B-GGUF) SingGuard-NSFA model by the SingGuard Team at Ant Group's AI Security Lab, released under the Apache 2.0 license.\n","readmeFilename":"README.md"}