{"_id":"@bytetrue/pi-vision","_rev":"6-162e747de9d542476b202e544f343413","name":"@bytetrue/pi-vision","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@bytetrue/pi-vision","version":"0.1.0","keywords":["pi-package","pi-extension","vision","multimodal"],"author":{"name":"byte"},"license":"MIT","_id":"@bytetrue/pi-vision@0.1.0","maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"homepage":"https://github.com/ByteTrue/pi-package-mono#readme","bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"d7ba208c2d7bac4296dd1c86975426810c7d2746","tarball":"https://registry.npmjs.org/@bytetrue/pi-vision/-/pi-vision-0.1.0.tgz","fileCount":7,"integrity":"sha512-PURIy5QtoZNaABxFnZ0bp5M3iw2hjKTwASTE49jbb4+P8fsdgSiaddT/2CrU+cRRt3rcQ+FBgUB/RlLm0mZvBg==","signatures":[{"sig":"MEYCIQCyCF7VdVpvNsUHrEeaAhiJvpbxwFMxhKrOO1HiqTJmLwIhANTrmtif6ejSkOWXPZh+kikrwcKLGyfA4WJDqvycNq9m","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21354},"type":"module","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"bytetrue","email":"bytetrue@outlook.com"},"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"_npmVersion":"12.0.2","description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":">=0.79.10"},"_npmOperationalInternal":{"tmp":"tmp/pi-vision_0.1.0_1785658425366_0.6425643864975916","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bytetrue/pi-vision","version":"0.2.0","keywords":["pi-package","pi-extension","vision","multimodal"],"author":{"name":"byte"},"license":"MIT","_id":"@bytetrue/pi-vision@0.2.0","maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"homepage":"https://github.com/ByteTrue/pi-package-mono#readme","bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"bc9286e396e997bec9821ba241cb0f6dd56f97a1","tarball":"https://registry.npmjs.org/@bytetrue/pi-vision/-/pi-vision-0.2.0.tgz","fileCount":8,"integrity":"sha512-CBO4wZ7n9R2FIPU2HOL30uJLypbXuiTnEgU6soPpRhnSIbaJ5YwbaqOKB8Mur8A/3jhB7MEN+CkV/uu9TrDSXw==","signatures":[{"sig":"MEYCIQCqpel8XYdTR2ssYfVrNUJgbHtDgARMu79PQe/br2RGSQIhAInnE2OTnBXzrKFCvN59osZkE5HxNTGhkj/DywZu1Hux","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bytetrue%2fpi-vision@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31751},"type":"module","gitHead":"43bd680aaee29a77b5e3119a1e39cb74e63dfafb","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f02fa06-33a7-4ea6-a9a5-c78a7fe6f9d2"}},"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"_npmVersion":"12.0.2","description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":">=0.79.10"},"_npmOperationalInternal":{"tmp":"tmp/pi-vision_0.2.0_1785779263290_0.8930443865407718","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bytetrue/pi-vision","version":"0.2.1","keywords":["pi-package","pi-extension","vision","multimodal"],"author":{"name":"byte"},"license":"MIT","_id":"@bytetrue/pi-vision@0.2.1","maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"homepage":"https://github.com/ByteTrue/pi-package-mono#readme","bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"762147a10146f2947e4ce929021b931475867628","tarball":"https://registry.npmjs.org/@bytetrue/pi-vision/-/pi-vision-0.2.1.tgz","fileCount":8,"integrity":"sha512-N34ab5B+B87OBphiqo8ziHeB4mqk7s/6ZZQFo2tNK4TSLkqCr3wr87Wvminssueibyo4wcy7MoR86j4Eox3OUA==","signatures":[{"sig":"MEUCIH+AhvOyx3eXCROVtAADQq0/dfFAbnf9LRGoV3dh1U/kAiEA6l10tBpVtvURCP141EjvRm40xxmdHDxXYIQXaO/Q87o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bytetrue%2fpi-vision@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31271},"type":"module","gitHead":"2e8d31687f2efddde450cb473f44a95d97db86bc","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f02fa06-33a7-4ea6-a9a5-c78a7fe6f9d2"}},"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"_npmVersion":"12.0.2","description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":">=0.79.10"},"_npmOperationalInternal":{"tmp":"tmp/pi-vision_0.2.1_1786461858333_0.3162090661079684","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@bytetrue/pi-vision","version":"0.2.2","keywords":["pi-package","pi-extension","vision","multimodal"],"author":{"name":"byte"},"license":"MIT","_id":"@bytetrue/pi-vision@0.2.2","maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"homepage":"https://github.com/ByteTrue/pi-package-mono#readme","bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"e95ff0b31c88c4d7ca6b5a38cdc25c930bc1caad","tarball":"https://registry.npmjs.org/@bytetrue/pi-vision/-/pi-vision-0.2.2.tgz","fileCount":9,"integrity":"sha512-KgnJlhDVvtOfKVaku/yl06rD4ol9sp++Ou7Nk4lHhaO2OsrQg4OU1Kub0qCcxxBAtfSe1VSXxMPtGKvr9TzX0A==","signatures":[{"sig":"MEYCIQCjQZUfR+Qthk83/w5XceEtzDdbdB5yYPzqZsvW/knPGQIhANu5PEem28UoeTMS5GrjD1e0e6KWDpvNSQ8QoGz/M9TJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bytetrue%2fpi-vision@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":103818},"type":"module","gitHead":"fbfd8eaf3f5f1a55a1b142ad2b05c1cf0534d9b8","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f02fa06-33a7-4ea6-a9a5-c78a7fe6f9d2"}},"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"_npmVersion":"12.0.2","description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":">=0.79.10"},"_npmOperationalInternal":{"tmp":"tmp/pi-vision_0.2.2_1787119862234_0.9018314854928047","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@bytetrue/pi-vision","version":"0.2.3","keywords":["pi-package","pi-extension","vision","multimodal"],"author":{"name":"byte"},"license":"MIT","_id":"@bytetrue/pi-vision@0.2.3","maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"homepage":"https://github.com/ByteTrue/pi-package-mono#readme","bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"416d097ff219b89bcf8d05bb62aad6fd6ae51083","tarball":"https://registry.npmjs.org/@bytetrue/pi-vision/-/pi-vision-0.2.3.tgz","fileCount":9,"integrity":"sha512-9o02nJR47BFHtGYJKWtAYCwZvgB614v3qAWS/3YfeLanw2OkYgcKPS6NoZCqqBqEOH1CJojnmlRsA+rhAnGDrg==","signatures":[{"sig":"MEQCIBy/vTh14ObTKis06jRmaL+pamo6HfBewe8BbnsvpH+dAiBd72SThwkrGymLfFVjmf6dQa3l1rREwH1Gx9HykqpZ2w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIF3TYr0/9NYr+oo0jGXMB0qNVAcWiF/dsT1DidzobnjlAiEA69ANUuLGelplo0GcSVyCSblFowR16MvMmvlwiVJ4qFA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bytetrue%2fpi-vision@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":105292},"type":"module","gitHead":"f04326fbc229c568345d3b319e569f3485f1c63e","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0f02fa06-33a7-4ea6-a9a5-c78a7fe6f9d2"}},"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"_npmVersion":"12.0.2","description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","directories":{},"_nodeVersion":"24.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.0","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":">=0.79.10"},"_npmOperationalInternal":{"tmp":"tmp/pi-vision_0.2.3_1789463473806_0.2778933118592235","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"pi":{"extensions":["./src/index.ts"]},"_id":"@bytetrue/pi-vision@0.3.0","bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"dist":{"shasum":"375a84a7a210f487debf7488820000b94a2209f9","tarball":"https://registry.npmjs.org/@bytetrue/pi-vision/-/pi-vision-0.3.0.tgz","fileCount":9,"integrity":"sha512-3CTJEk23b4+pMs6pufaBhxsML77QEvL5VhYHTIxlIy7nTUYlXo50JJHlSJDcyvXCtpLNZK1hN6DDhgH/tTxBRw==","signatures":[{"sig":"MEYCIQDtls1uVtSysI/hWlTu7gchgK29qMVVvx2aC1Rch+hjGAIhAKRn3rnGDijqNbJtpZuLwIYKiXVkHZSQnVLAc4/8AIn5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQtBnLhSM4cw7j7N3p4Sa/nQm3GH+sSzuLePxObaYRMgIhAOeku79xHIYENwkr6UHYvHHDhXhiflEcIG1DnQxNQvSZ"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bytetrue%2fpi-vision@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":110427},"name":"@bytetrue/pi-vision","type":"module","author":{"name":"byte"},"gitHead":"4dbaba7033a0850b338b62156f5b2bfcf3e270c6","license":"MIT","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"version":"0.3.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"0f02fa06-33a7-4ea6-a9a5-c78a7fe6f9d2"}},"homepage":"https://github.com/ByteTrue/pi-package-mono#readme","keywords":["pi-package","pi-extension","vision","multimodal"],"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"_npmVersion":"12.1.0","description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","directories":{},"maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"_nodeVersion":"24.21.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11","typescript":"^5.0.0","@types/node":"^22.0.0"},"peerDependencies":{"typebox":"*","@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":">=0.79.10"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-vision_0.3.0_1790756831099_0.46872613971885135"}}},"time":{"created":"2026-08-02T08:13:45.218Z","modified":"2026-09-30T08:27:11.510Z","0.1.0":"2026-08-02T08:13:45.497Z","0.2.0":"2026-08-03T17:47:43.437Z","0.2.1":"2026-08-11T15:24:18.487Z","0.2.2":"2026-08-19T06:11:02.390Z","0.2.3":"2026-09-15T09:11:13.902Z","0.3.0":"2026-09-30T08:27:11.172Z"},"bugs":{"url":"https://github.com/ByteTrue/pi-package-mono/issues"},"author":{"name":"byte"},"license":"MIT","homepage":"https://github.com/ByteTrue/pi-package-mono#readme","keywords":["pi-package","pi-extension","vision","multimodal"],"repository":{"url":"git+https://github.com/ByteTrue/pi-package-mono.git","type":"git","directory":"packages/pi-vision"},"description":"Pi extension: let a text-only model read images by asking a vision-capable model from your own models.json.","maintainers":[{"name":"bytetrue","email":"bytetrue@outlook.com"}],"readme":"<p align=\"center\">\n  <img src=\"./docs/banner.webp\" alt=\"A crystalline lens translating an image into structured marks\" width=\"100%\">\n</p>\n\n<h1 align=\"center\">@bytetrue/pi-vision</h1>\n\n<p align=\"center\">Let a text-only Pi model understand images through a vision-capable model you already configured.</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@bytetrue/pi-vision\"><img src=\"https://img.shields.io/npm/v/@bytetrue/pi-vision?style=flat-square\" alt=\"npm version\"></a>\n</p>\n\n`pi-vision` uses models and credentials from your existing `models.json`. It adds no provider configuration and chooses no model for you.\n\n## Install\n\n```bash\npi install npm:@bytetrue/pi-vision\n```\n\nRestart or reload Pi, then select a model:\n\n```text\n/vision\n```\n\nThe menu lists models whose Pi configuration declares image input. There is deliberately no default, so the extension cannot silently choose an expensive provider.\n\nIf the list is empty, first add a model whose `input` includes `image` to Pi's `models.json`, then rerun `/vision`. [`@bytetrue/pi-vendor`](https://www.npmjs.com/package/@bytetrue/pi-vendor) can manage that configuration.\n\n## Two ways to use it\n\n| Mode | Best for | How it works |\n| --- | --- | --- |\n| `image_ask(paths, question)` | Local files, comparisons, and focused follow-ups | The Agent sends one or more local images plus a specific question to the configured vision model |\n| Automatic attachment analysis | Images attached through Pi startup, print mode, or RPC | The extension analyzes the whole batch before the first text-only main-model call |\n\nEnable or disable automatic mode explicitly:\n\n```text\n/vision auto on\n/vision auto off\n```\n\nAutomatic mode is off by default because enabling it sends attachments and the current request to another provider.\n\n> [!NOTE]\n> Pi's interactive <kbd>Ctrl</kbd>+<kbd>V</kbd> image paste becomes a local file path in the input. That path uses `image_ask`; it is not an automatic attachment. The same applies when you paste or mention any local image path.\n\n## `image_ask`\n\n```text\nimage_ask(paths, question)\n```\n\n- `paths` — local PNG, JPEG, GIF, or WebP files, absolute or relative to the current working directory.\n- `question` — the specific detail the vision model should answer.\n\nAsk naturally:\n\n> Compare `/tmp/mockup.png` with `/tmp/render.png` and list the visible layout differences.\n\nPass several paths together to compare a mockup with a rendered page, or successive screenshots of the same flow. HTTP(S) URLs are not accepted; download the image first.\n\nIf a text-only model tries Pi's built-in `read` tool on an image, the extension appends a short pointer to `image_ask` instead of leaving the model at a dead end.\n\n## Automatic-mode limits\n\nOne request may contain up to four images with a combined decoded size of 20 MiB. The batch has a fixed 60-second deadline and is rejected as a whole if validation fails.\n\nSuccess or failure is injected before the main model starts. A failure explicitly tells the main model that it did not see the images, reducing the risk of a fabricated visual answer.\n\nTrusted project settings may override the global configuration. An untrusted project cannot enable attachment forwarding.\n\n## Settings\n\n`/vision` keeps its own file and preserves every other key in it:\n\n```json\n{\n  \"model\": \"provider/vision-model\",\n  \"autoAnalyzeAttachments\": false\n}\n```\n\nThe global file is `<pkg-config root>/pi-vision/settings.json`, where the root is `$PI_PKG_CFG_DIR` or `<agent dir>/pi-pkg-cfg` and `<agent dir>` is `$PI_CODING_AGENT_DIR` (`~/.pi/agent` by default). It never touches Pi's `settings.json`. A trusted project may override it with `<project>/.pi/pi-pkg-cfg/pi-vision/settings.json`; that project file is read-only, so nothing is ever written into your repository.\n\nUpgrading from 0.2.x: the `pi-vision` section of Pi's `settings.json` is lifted into the new file — whole section, in one write — the first time the package reads or writes it. Pi's file is left untouched so downgrading still works. A project `pi-vision` section in `<project>/.pi/settings.json` keeps working until you move or delete it, which is deliberate: a project override should outrank the global one. When a value comes from an old path, `/vision` and status output say `legacy (read-only fallback)` next to it.\n\nWhen the current main model already accepts images, `image_ask` is removed from active tools and the extension stays out of Pi's normal image path.\n\n## Development\n\n```bash\nnpm --workspace @bytetrue/pi-vision test\nnpm --workspace @bytetrue/pi-vision run typecheck\nnpm --workspace @bytetrue/pi-vision pack --dry-run\n```\n\nRequires `@earendil-works/pi-coding-agent >=0.79.10`.\n","readmeFilename":"README.md"}