{"_id":"@alexeiled/pi-provider-compat","_rev":"2-f3c6c20ad4674f48944fe392102d59cd","name":"@alexeiled/pi-provider-compat","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@alexeiled/pi-provider-compat","version":"0.1.0","keywords":["pi-package","pi-extension","pi-provider","pi-ai","compat","custom-provider"],"license":"MIT","_id":"@alexeiled/pi-provider-compat@0.1.0","maintainers":[{"name":"alexeiled","email":"alexei.led@gmail.com"}],"homepage":"https://github.com/alexei-led/pi-provider-compat#readme","bugs":{"url":"https://github.com/alexei-led/pi-provider-compat/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"cad49c29af88dc1bbd8344443711d74be1f26ec7","tarball":"https://registry.npmjs.org/@alexeiled/pi-provider-compat/-/pi-provider-compat-0.1.0.tgz","fileCount":4,"integrity":"sha512-+h2PaNzDJJDk8RbMCevicSFqmifgKLEbUX1JSHak6vw4ei1f5GPAP5GjV6UrpEtJYur/0Bt6kZjUlwjNzS5WkQ==","signatures":[{"sig":"MEUCICZHAh1NXhkCTUOOscEEZp/pvizoOrRtMt9WPkIN6zG0AiEApFSrultSOi3BkCc+KLssR5fp/utKKLnrjQ9XXaW1ouE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8585},"main":"./src/index.ts","type":"module","engines":{"node":">=22.19.0"},"exports":"./src/index.ts","gitHead":"bf31644b0d7d61df3f5af01641b3a75547fa886f","scripts":{"test":"node --import jiti/register --test test/*.test.ts","check":"tsc --noEmit","pack:dry":"npm pack --dry-run","test:all":"npm run check && npm test && npm run pack:dry","publish:dry":"npm publish --dry-run"},"_npmUser":{"name":"alexeiled","email":"alexei.led@gmail.com"},"repository":{"url":"git+https://github.com/alexei-led/pi-provider-compat.git","type":"git"},"_npmVersion":"12.0.1","description":"Bridge Pi custom providers into the legacy pi-ai compat dispatcher","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"npm@11.18.0","devDependencies":{"jiti":"^2.7.0","typescript":"^6.0.3","@types/node":"^24.10.0","@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"peerDependencies":{"@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"_npmOperationalInternal":{"tmp":"tmp/pi-provider-compat_0.1.0_1784364243301_0.1477841365041288","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@alexeiled/pi-provider-compat","version":"0.1.1","description":"Bridge Pi custom providers into the legacy pi-ai compat dispatcher","type":"module","main":"./src/index.ts","exports":"./src/index.ts","license":"MIT","publishConfig":{"access":"public"},"engines":{"node":">=22.19.0"},"keywords":["pi-package","pi-extension","pi-provider","pi-ai","compat","custom-provider"],"scripts":{"check":"tsc --noEmit","test":"node --import jiti/register --test test/*.test.ts","pack:dry":"npm pack --dry-run","publish:dry":"npm publish --dry-run","test:all":"npm run check && npm test && npm run pack:dry"},"pi":{"extensions":["./src/index.ts"]},"peerDependencies":{"@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"devDependencies":{"@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8","@types/node":"^24.10.0","jiti":"^2.7.0","typescript":"^6.0.3"},"packageManager":"npm@11.18.0","repository":{"type":"git","url":"git+https://github.com/alexei-led/pi-provider-compat.git"},"homepage":"https://github.com/alexei-led/pi-provider-compat#readme","bugs":{"url":"https://github.com/alexei-led/pi-provider-compat/issues"},"gitHead":"3c31729dfe9f8ab3638bacff4f9c1513f27c2fe9","_id":"@alexeiled/pi-provider-compat@0.1.1","_nodeVersion":"24.15.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-68YV9IlFwGT8axag4BdoTfYzwj1uCOVTWBLGw8EsG7LjsgA/ksGxd1IPxbegst1RjL7DW7SDsRBjYdLGCJhqYg==","shasum":"aece761d4f67573d27cd710015b8350de52e2830","tarball":"https://registry.npmjs.org/@alexeiled/pi-provider-compat/-/pi-provider-compat-0.1.1.tgz","fileCount":4,"unpackedSize":8585,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alexeiled%2fpi-provider-compat@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICnHjXcWfT30KVI9k4HlRI1YaMaxmoGucy7I87m5SIe8AiEAh/U5f3y0FXH0M2QZv9KMKYvC6w2FiDlNtLhyhlF2XDc="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d5fae2f4-00c0-4e10-aac8-1d60a6a0d3cf"}},"directories":{},"maintainers":[{"name":"alexeiled","email":"alexei.led@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-provider-compat_0.1.1_1784364709953_0.17778749731231147"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-18T08:44:03.135Z","modified":"2026-07-18T08:51:50.462Z","0.1.0":"2026-07-18T08:44:03.457Z","0.1.1":"2026-07-18T08:51:50.130Z"},"bugs":{"url":"https://github.com/alexei-led/pi-provider-compat/issues"},"license":"MIT","homepage":"https://github.com/alexei-led/pi-provider-compat#readme","keywords":["pi-package","pi-extension","pi-provider","pi-ai","compat","custom-provider"],"repository":{"type":"git","url":"git+https://github.com/alexei-led/pi-provider-compat.git"},"description":"Bridge Pi custom providers into the legacy pi-ai compat dispatcher","maintainers":[{"name":"alexeiled","email":"alexei.led@gmail.com"}],"readme":"# @alexeiled/pi-provider-compat\n\n[![npm version](https://img.shields.io/npm/v/%40alexeiled%2Fpi-provider-compat?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@alexeiled/pi-provider-compat)\n[![CI](https://img.shields.io/github/actions/workflow/status/alexei-led/pi-provider-compat/ci.yml?branch=main&style=flat-square&label=ci)](https://github.com/alexei-led/pi-provider-compat/actions/workflows/ci.yml?query=branch%3Amain)\n[![license](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](./LICENSE)\n\nA compatibility bridge for Pi custom providers that use `streamSimple`.\n\n## Problem\n\nPi 0.80 moved the old global `pi-ai` dispatcher to `@earendil-works/pi-ai/compat`.\nCustom providers registered with `pi.registerProvider()` are provider-scoped, but some\nextensions still call the global compat dispatcher directly.\n\nThat mismatch produces errors such as:\n\n```text\nNo API provider registered for api: router-local-api\nNo API provider registered for api: openai-codex-personal-responses\n```\n\nIt can affect model routers, provider aliases, watchdogs, background commands, and any\nextension that calls `stream()` or `streamSimple()` from `@earendil-works/pi-ai/compat`.\n\n## What it does\n\nThis extension discovers every registered provider with both:\n\n- `api`\n- `streamSimple`\n\nIt registers a provider-aware dispatcher for that API in the compat registry when no\ncompat provider is already registered. Calls route by `model.provider`. Existing compat\nproviders are left untouched, preserving their ownership and reload cleanup. The bridge\nrefreshes on session/model lifecycle events and removes only its own registrations.\n\nThere are no provider-specific names or allowlists.\n\n## Install\n\n```bash\npi install npm:@alexeiled/pi-provider-compat\n```\n\nReload Pi:\n\n```text\n/reload\n```\n\nThen retry the command that failed.\n\n## Requirements\n\n- Pi `>=0.80.8`\n- A custom provider registered with `pi.registerProvider(..., { api, streamSimple })`\n\nPi packages its core libraries. This package declares them as peers and does not bundle Pi.\n\n## Scope\n\nThis is a compatibility workaround for extensions that use the legacy global dispatcher.\nIt does not replace a provider implementation, register credentials, or change model routing.\nIt does not override an API that already has a compat provider, and it does not help an API\nthat has no registered provider-scoped `streamSimple` implementation.\n\nThe durable upstream fix is for Pi to bridge `registerProvider()` registrations into the\ncompat registry itself, or for callers to use Pi's provider-scoped runtime.\n\n## Development\n\n```bash\nnpm install\nnpm run test:all\n```\n\nThe tests cover custom routing, preservation and cleanup of an existing compat provider,\nrefresh after provider changes, type checking, and the npm package manifest.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}