{"_id":"@argszero/cordis-plugin-read-image-guidance","_rev":"2-a0062ec5c2f22cdc1e745e431bfd359a","name":"@argszero/cordis-plugin-read-image-guidance","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@argszero/cordis-plugin-read-image-guidance","version":"0.1.0","keywords":["cordis","deepseek-harness","dsh","plugin","read_image","image","inputModalities","guidance"],"license":"MIT","_id":"@argszero/cordis-plugin-read-image-guidance@0.1.0","maintainers":[{"name":"argszero","email":"argszero.reg@gmail.com"}],"dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"10945a2611872ee6e408ee947dd3904f888d7fd8","tarball":"https://registry.npmjs.org/@argszero/cordis-plugin-read-image-guidance/-/cordis-plugin-read-image-guidance-0.1.0.tgz","fileCount":6,"integrity":"sha512-+qwpsDu6Klud2Z9zsfYzy4ZFgCre5gZnJF//wkWyPcfz07+JkaODHZHDrKZ9WxAGFxfpIqBkvMBm+in1QL/Cug==","signatures":[{"sig":"MEUCIQCp+P/khmBa+IOldNoddlx9kav066oVni5DixfPXzoD7wIgGLa7ykkiuX3Qu+Ps2CFwB5hU7MuT4FADTCb7OS52N5A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17607},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./src/*":"./src/*","./package.json":"./package.json"},"gitHead":"8e43e53d975d31cbafd79a281539cdef43158564","scripts":{"test":"tsc && node --test \"test/*.test.js\"","build":"tsc","prepublishOnly":"tsc"},"_npmUser":{"name":"argszero","email":"argszero.reg@gmail.com"},"_npmVersion":"11.17.0","description":"Actionable read_image refusal for dsh: when the harness refuses to read an image because the resolved model route does not declare image input, turn that opaque 'switch to an image-capable model' message into concrete config guidance (declare \"input: [tex","directories":{},"_nodeVersion":"26.5.0","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.0","@types/node":"^26.5.0","@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-llm":"0.1.5-alpha.1","@deepseek-ai/dsh-agent":"0.1.5-alpha.1","@deepseek-ai/dsh-tools":"0.1.5-alpha.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-tools":">=0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/cordis-plugin-read-image-guidance_0.1.0_1788964825186_0.3366504888031292","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"_id":"@argszero/cordis-plugin-read-image-guidance@0.1.1","dsh":{"bundle":{"patch":"./cordis.patch.yml"}},"dist":{"shasum":"6963b79df5c4f57a3fcc0524e5cd6752a869efd2","tarball":"https://registry.npmjs.org/@argszero/cordis-plugin-read-image-guidance/-/cordis-plugin-read-image-guidance-0.1.1.tgz","fileCount":6,"integrity":"sha512-jJg/3l5K+NVuiALL8MKPm1O/oET6tnI/epYKctzxagrJ7K1BRrcyccFoTv164c6JhbkRGxKq1BQSlAwAX/G43A==","signatures":[{"sig":"MEYCIQChq1ypYkFdls1qLkVvMN4yaqbRgVQ/0JsBJ2PQNvJVewIhAI14iQXOJ+UA6DZXCa+HSZT2QaY4QGrlCFXasdQAZuGr","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFS2G3h7BM2ZmOlbMOrCOw7xMc6l/R3H5w0xKcDxKU+gAiEA0i506IBFK68MorYBd3thKTVT7F7YfCKHrrYQCnQEknA="}],"unpackedSize":18574},"main":"lib/index.js","name":"@argszero/cordis-plugin-read-image-guidance","type":"module","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./src/*":"./src/*","./package.json":"./package.json"},"gitHead":"ce7ba1e44910c2f4df3342b42c0f548aa2b76856","license":"MIT","scripts":{"test":"tsc && node --test \"test/*.test.js\" \"test/*.test.mjs\"","build":"tsc","prepublishOnly":"tsc"},"version":"0.1.1","_npmUser":{"name":"argszero","email":"argszero.reg@gmail.com"},"keywords":["cordis","deepseek-harness","dsh","plugin","read_image","image","inputModalities","guidance"],"_npmVersion":"11.17.0","description":"Actionable read_image refusal for dsh: when the harness refuses to read an image because the resolved model route does not declare image input, turn that opaque 'switch to an image-capable model' message into concrete config guidance (declare \"input: [tex","directories":{},"maintainers":[{"name":"argszero","email":"argszero.reg@gmail.com"}],"_nodeVersion":"26.5.0","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.5.0","@types/node":"^26.5.0","@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-llm":"0.1.5-alpha.1","@deepseek-ai/dsh-agent":"0.1.5-alpha.1","@deepseek-ai/dsh-tools":"0.1.5-alpha.1"},"peerDependencies":{"@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-tools":">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cordis-plugin-read-image-guidance_0.1.1_1789010743351_0.39667804602957446"}}},"time":{"created":"2026-09-09T14:40:24.979Z","modified":"2026-09-10T03:25:43.609Z","0.1.0":"2026-09-09T14:40:25.325Z","0.1.1":"2026-09-10T03:25:43.436Z"},"license":"MIT","keywords":["cordis","deepseek-harness","dsh","plugin","read_image","image","inputModalities","guidance"],"description":"Actionable read_image refusal for dsh: when the harness refuses to read an image because the resolved model route does not declare image input, turn that opaque 'switch to an image-capable model' message into concrete config guidance (declare \"input: [tex","maintainers":[{"name":"argszero","email":"argszero.reg@gmail.com"}],"readme":"# @argszero/cordis-plugin-read-image-guidance\n\n**Actionable `read_image` refusal for dsh.**\n\nWhen the harness refuses to read an image because the resolved model route does\nnot *declare* image input, it currently tells you to *switch models* — but the\nmodel is usually fine. The **declaration** is what's missing. This plugin turns\nthat opaque refusal into concrete config guidance: declare\n`input: [text, image]` on the model's `models` entry (or extend its catalog\nentry), instead of sending you on a model-swap hunt.\n\n## The gap\n\n`read_image`'s capability gate (`assertImageCapableRoute` in `dsh-tool-fs`)\nreads the **declared** `inputModalities` of the resolved route. For custom\nproviders with no catalog entry, the resolution chain\n(`declaredInput ?? base?.input ?? defaultInput`) falls back to `['text']`, so a\nvision-capable model is refused with:\n\n> cannot read \"<path>\" as an image: model \"<model>\" does not declare image\n> input; switch to an image-capable model to read images\n\nThe correct fix is `input: [text, image]` on the model entry — not a model swap.\nThis is the request-① gap of discussion #6049 (the `inputModalities` family,\n6th member: the *tool-read-side* capability gate).\n\n## How it works\n\nIt wraps `tools/execute` (the same around-dispatch seam as the in-tree\n`guard/timeout-policy`). When a `read_image` result carries the exact refusal\nsignature, it rewrites the model-facing message into actionable guidance while\n**preserving** the `isError` flag and the structured `error` (so retry/replay code\npaths stay routable). Every other tool result passes through untouched.\n\n## Usage\n\nMount as a dsh bundle plugin (defaults are sane, rewrite on):\n\n```sh\ndsh plugin --profile web add github:argszero/cordis-plugin-read-image-guidance\n```\n\nTune via a profile layer:\n\n```yaml\n- set:\n    - id: read-image-guidance\n      config:\n        rewrite: false  # observe-only, no rewrite\n```\n\n## Config\n\n| field | type | default | description |\n|-------|------|---------|-------------|\n| `rewrite` | `boolean` | `true` | Set `false` to observe-only (no rewrite). |\n\n## Scope\n\n- Rewrites **only** the exact `read_image` refusal marker\n  (`does not declare image input; switch to an image-capable model to read images`).\n- Never drops the refusal, never touches `isError`, never touches other tools.\n- No native/OCR dependency in v0.1 (an OCR-fallback form is a separate, heavier\n  candidate; this one is the \"declaration detection + actionable error\" half).\n\n## Compatibility\n\n- dsh `0.1.5-alpha.1` (verified against `packages/fs/tool-fs/src/read-image.ts`\n  and `packages/core/tools/src/index.ts`).\n- `peerDependencies`: `@deepseek-ai/cordis ^4.0.2`,\n  `@deepseek-ai/dsh-tools >=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0`.\n\n### A note on the peer range\n\n```\n>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0\n```\n\nEvery dsh release published today is a **prerelease**, and a semver comparator admits\nprereleases only when they share its own `major.minor.patch` tuple. That makes two forms\nwrong, and both have to be avoided:\n\n```jsonc\n// Matches nothing at all: 0.1.2-rc.1 sorts below 0.1.2, and every other\n// prerelease has a different tuple.  -> ETARGET, the package cannot be installed.\n\">=0.1.2\"\n\n// Only 0.1.2-rc.1: a user on the 0.1.5 line gets ERESOLVE.\n\">=0.1.2-rc.1 <0.2.0\"\n\n// What we ship: one comparator per supported tuple line.\n\">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0\"\n```\n\nThe npm `latest` tag for `@deepseek-ai/dsh` is on the `0.1.2` line while `next`/`alpha`\npoint at `0.1.5`, so both comparators are needed. `test/peer-range.test.mjs` fails if\neither bad form comes back.\n\n## Test\n\n```sh\nnpm test\n```\n\nMIT.\n","readmeFilename":"README.md"}