{"_id":"@blackbelt-technology/pi-dashboard-quota-plugin","_rev":"3-f079ebd2e8e29b4e6e914a1726c6204a","name":"@blackbelt-technology/pi-dashboard-quota-plugin","dist-tags":{"latest":"0.9.0"},"versions":{"0.7.0":{"name":"@blackbelt-technology/pi-dashboard-quota-plugin","version":"0.7.0","license":"MIT","_id":"@blackbelt-technology/pi-dashboard-quota-plugin@0.7.0","maintainers":[{"name":"mbotond","email":"botond.molnar@blackbelt.hu"},{"name":"mrbence","email":"dbence10@gmail.com"},{"name":"robertcsakany","email":"robert.csakany@blackbelt.hu"},{"name":"norbert.herczeg","email":"norbert.herczeg@blackbelt.hu"}],"homepage":"https://github.com/BlackBeltTechnology/pi-agent-dashboard#readme","bugs":{"url":"https://github.com/BlackBeltTechnology/pi-agent-dashboard/issues"},"dist":{"shasum":"a7b182cd300e0083f5b95a593ceb3413380b4e96","tarball":"https://registry.npmjs.org/@blackbelt-technology/pi-dashboard-quota-plugin/-/pi-dashboard-quota-plugin-0.7.0.tgz","fileCount":12,"integrity":"sha512-5NHEnLTgXILQZhdgN9j605rX2Zjj8+1wvXbZL8MlTYue9TgSjy/bXo5rId/ucGWG0gY3Pid0xdRqiyLOkP0onw==","signatures":[{"sig":"MEUCIC7XmzfxUBl3/sEzNlkf69Q+aSGKBkcjTfARDAAXF4e0AiEA0lpuI50vkXfuS9WAutc7t6tA0V2sZ6YkQpkr5e5nYJw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":68180},"type":"module","exports":{".":{"types":"./src/client.tsx","default":"./src/client.tsx"},"./client":{"types":"./src/client.tsx","default":"./src/client.tsx"},"./server":{"types":"./src/server/index.ts","default":"./src/server/index.ts"}},"gitHead":"5b70671be1263180ba641fffec94c92209020a5a","scripts":{"test":"vitest run"},"_npmUser":{"name":"robertcsakany","email":"robert.csakany@blackbelt.hu"},"repository":{"url":"git+https://github.com/BlackBeltTechnology/pi-agent-dashboard.git","type":"git","directory":"packages/quota-plugin"},"_npmVersion":"10.9.3","description":"Surface per-account provider subscription quota (Anthropic, Codex, Copilot, OpenRouter, Z.ai, Kimi, Synthetic) in the dashboard. Self-contained: the plugin owns each provider's usage-endpoint contract and fetches server-side through the host credential se","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@blackbelt-technology/pi-dashboard-shared":"^0.7.0","@blackbelt-technology/dashboard-plugin-runtime":"^0.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@blackbelt-technology/pi-dashboard-client-utils":"^0.7.0"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"pi-dashboard-plugin":{"id":"quota","claims":[{"slot":"content-inline-footer","component":"QuotaWidget"},{"tab":"general","slot":"settings-section","component":"QuotaSettings"}],"client":"./src/client.tsx","server":"./src/server/index.ts","priority":600,"displayName":"Provider Quota","i18nCatalog":"catalog","configSchema":"./configSchema.json"},"_npmOperationalInternal":{"tmp":"tmp/pi-dashboard-quota-plugin_0.7.0_1787700468304_0.1470889229360195","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@blackbelt-technology/pi-dashboard-quota-plugin","version":"0.8.0","license":"MIT","_id":"@blackbelt-technology/pi-dashboard-quota-plugin@0.8.0","maintainers":[{"name":"mbotond","email":"botond.molnar@blackbelt.hu"},{"name":"mrbence","email":"dbence10@gmail.com"},{"name":"robertcsakany","email":"robert.csakany@blackbelt.hu"},{"name":"norbert.herczeg","email":"norbert.herczeg@blackbelt.hu"}],"homepage":"https://github.com/BlackBeltTechnology/pi-agent-dashboard#readme","bugs":{"url":"https://github.com/BlackBeltTechnology/pi-agent-dashboard/issues"},"dist":{"shasum":"8806f36e1be708e182e80a8b2ed135788bd50d78","tarball":"https://registry.npmjs.org/@blackbelt-technology/pi-dashboard-quota-plugin/-/pi-dashboard-quota-plugin-0.8.0.tgz","fileCount":12,"integrity":"sha512-/DV6XTjBdb2vwRh01dKPsTxZPnMYWlTXV8KB5fpb/JL4gZQB0BheXcoTXpCq2Prqc1zShuMf7BpPIjYL/aLqXg==","signatures":[{"sig":"MEUCIQCy0liWoGhCoUPNiJ2zF7ynYYiNYTxpmkqLBVEqYiYEBQIgE7LbEs0T7xei4nUGBzPP0VvKr07Cvt5VwB9jcW/DJSs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blackbelt-technology%2fpi-dashboard-quota-plugin@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":68182},"type":"module","exports":{".":{"types":"./src/client.tsx","default":"./src/client.tsx"},"./client":{"types":"./src/client.tsx","default":"./src/client.tsx"},"./server":{"types":"./src/server/index.ts","default":"./src/server/index.ts"}},"gitHead":"9373dfa416660a285475febc0383608fe14270b1","scripts":{"test":"vitest run"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8996a0d2-ce1d-417a-9acb-fc204a2da6dd"}},"repository":{"url":"git+https://github.com/BlackBeltTechnology/pi-agent-dashboard.git","type":"git","directory":"packages/quota-plugin"},"_npmVersion":"12.0.2","description":"Surface per-account provider subscription quota (Anthropic, Codex, Copilot, OpenRouter, Z.ai, Kimi, Synthetic) in the dashboard. Self-contained: the plugin owns each provider's usage-endpoint contract and fetches server-side through the host credential se","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@blackbelt-technology/pi-dashboard-shared":"^0.8.0","@blackbelt-technology/dashboard-plugin-runtime":"^0.8.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@blackbelt-technology/pi-dashboard-client-utils":"^0.8.0"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"pi-dashboard-plugin":{"id":"quota","claims":[{"slot":"content-inline-footer","component":"QuotaWidget"},{"tab":"general","slot":"settings-section","component":"QuotaSettings"}],"client":"./src/client.tsx","server":"./src/server/index.ts","priority":600,"displayName":"Provider Quota","i18nCatalog":"catalog","configSchema":"./configSchema.json"},"_npmOperationalInternal":{"tmp":"tmp/pi-dashboard-quota-plugin_0.8.0_1787745966324_0.3186987913420849","host":"s3://npm-registry-packages-npm-production"}},"0.9.0":{"_id":"@blackbelt-technology/pi-dashboard-quota-plugin@0.9.0","bugs":{"url":"https://github.com/BlackBeltTechnology/pi-agent-dashboard/issues"},"dist":{"shasum":"098f83c079cb03351d07cfbd1f01343baff6ddc1","tarball":"https://registry.npmjs.org/@blackbelt-technology/pi-dashboard-quota-plugin/-/pi-dashboard-quota-plugin-0.9.0.tgz","fileCount":12,"integrity":"sha512-8eMV3JlPg//oBkGIa9Er8lDAXElFeZw4hxYyXxIIO8tIGSU3Z9M3aJPIs/5syi+SDraN6+zEdMayjIyLSLMTbA==","signatures":[{"sig":"MEUCIGNgiej1tUsYNEMVzfgogZaX4T0KTDV2FCgeVThzxNFvAiEAvfcuPcGg2N/5wvSDbqoTO/4fXD7YPbl60jcowUFog1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFnOaSTxFaSbuCuVneZRgknWsyDp4Q1BfSD7Ed2P62bzAiBVrHKe2keIizlOSYd49AIJSucpcgLaBI5mv3PtCd0NTQ=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@blackbelt-technology%2fpi-dashboard-quota-plugin@0.9.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":94495},"name":"@blackbelt-technology/pi-dashboard-quota-plugin","type":"module","exports":{".":{"types":"./src/client.tsx","default":"./src/client.tsx"},"./client":{"types":"./src/client.tsx","default":"./src/client.tsx"},"./server":{"types":"./src/server/index.ts","default":"./src/server/index.ts"}},"gitHead":"60a155465d55e4438e1425c07b0ab5459083a9b5","license":"MIT","scripts":{"test":"vitest run"},"version":"0.9.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"8996a0d2-ce1d-417a-9acb-fc204a2da6dd"}},"homepage":"https://github.com/BlackBeltTechnology/pi-agent-dashboard#readme","repository":{"url":"git+https://github.com/BlackBeltTechnology/pi-agent-dashboard.git","type":"git","directory":"packages/quota-plugin"},"_npmVersion":"12.2.0","description":"Surface per-account provider subscription quota (Anthropic, Codex, Copilot, OpenRouter, Z.ai, Kimi, Synthetic) in the dashboard. Self-contained: the plugin owns each provider's usage-endpoint contract and fetches server-side through the host credential se","directories":{},"maintainers":[{"name":"mbotond","email":"botond.molnar@blackbelt.hu"},{"name":"mrbence","email":"dbence10@gmail.com"},{"name":"robertcsakany","email":"robert.csakany@blackbelt.hu"},{"name":"norbert.herczeg","email":"norbert.herczeg@blackbelt.hu"}],"_nodeVersion":"24.21.0","dependencies":{"@blackbelt-technology/pi-dashboard-shared":"^0.9.0","@blackbelt-technology/dashboard-plugin-runtime":"^0.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^19.0.0","react-dom":"^19.0.0","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@blackbelt-technology/pi-dashboard-client-utils":"^0.9.0"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"pi-dashboard-plugin":{"id":"quota","claims":[{"slot":"composer-context-group","component":"QuotaWidget"},{"tab":"general","slot":"settings-section","component":"QuotaSettings"}],"client":"./src/client.tsx","server":"./src/server/index.ts","priority":600,"displayName":"Provider Quota","i18nCatalog":"catalog","configSchema":"./configSchema.json"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-dashboard-quota-plugin_0.9.0_1791296964385_0.6063010878866129"}}},"time":{"created":"2026-08-25T23:27:48.207Z","modified":"2026-10-06T14:29:24.821Z","0.7.0":"2026-08-25T23:27:48.455Z","0.8.0":"2026-08-26T12:06:06.466Z","0.9.0":"2026-10-06T14:29:24.467Z"},"bugs":{"url":"https://github.com/BlackBeltTechnology/pi-agent-dashboard/issues"},"license":"MIT","homepage":"https://github.com/BlackBeltTechnology/pi-agent-dashboard#readme","repository":{"url":"git+https://github.com/BlackBeltTechnology/pi-agent-dashboard.git","type":"git","directory":"packages/quota-plugin"},"description":"Surface per-account provider subscription quota (Anthropic, Codex, Copilot, OpenRouter, Z.ai, Kimi, Synthetic) in the dashboard. Self-contained: the plugin owns each provider's usage-endpoint contract and fetches server-side through the host credential se","maintainers":[{"name":"mbotond","email":"botond.molnar@blackbelt.hu"},{"name":"mrbence","email":"dbence10@gmail.com"},{"name":"robertcsakany","email":"robert.csakany@blackbelt.hu"},{"name":"norbert.herczeg","email":"norbert.herczeg@blackbelt.hu"}],"readme":"# Provider Quota plugin\n\nSurfaces per-account **subscription quota** (how much plan budget is left) for\nsupported OAuth providers — Anthropic, GitHub Copilot, Kimi Coding, OpenAI Codex,\nOpenRouter, Synthetic, Z.ai — in the dashboard's cross-session web UI. This is the\n\"how much is left\" axis, distinct from the context window and per-request\nAPI-key rate-limit headers.\n\n## Shape: server fetches, client renders. No bridge.\n\nQuota is an **account-level** fact, so the dashboard **server entry** resolves\ncredentials through the host's own auth abstraction\n(`InternalAuthStorage` + `readAuthJson`, with OAuth refresh — never a hardcoded\n`~/.pi/agent/auth.json` path) and fetches directly via\n[`@latentminds/pi-quotas`](https://www.npmjs.com/package/@latentminds/pi-quotas)\n(pinned `0.4.0`; owns per-provider TTL caching + in-flight dedup). Only derived\n`QuotaWindow[]` reach the client — **tokens never leave the server**.\n\n`GET /api/quota` → `{ providers: [{ provider, windows[] }] }`. A `quota_update`\nbrowser message is broadcast on refresh. No event-store persistence.\n\n## Disabled by default · per-provider\n\nNo quota endpoint called unless both gates true: master toggle\n`plugins.quota.enabled` AND `plugins.quota.providers.<id>.enabled`. None turned\non by migration/upgrade.\n\nSubscription endpoints undocumented; programmatic calls may breach provider\nconsumer terms — **personal/local, single-user use only**. UI displays printed\nToS warning (no `acknowledgedToS` gate). See change proposal for full ToS\nanalysis.\n\n## Client surface\n\n- `composer-context-group` → `QuotaWidget`: a `Quota` group in the composer context strip (after GIT, before STATUS, not streaming-gated). One chip per provider, EVERY window inline (`5h [bar] 14%  7d [bar] 32%`), fill coloured by pace severity, `now` tick, dashed `not live` tag when the server marks the provider `stale`. Chip matching the session model provider (prefix of `session.model` before first `/`) renders first with an accent ring; defined provider absent from `/api/quota` prepends a non-interactive `<model id> · no quota` note, all chips dim. Click opens shared `ui:dialog` pre-selected. No provider with windows → renders nothing. Moved OUT of `content-inline-footer`.\n- `settings-section` → `QuotaSettings`: printed ToS warning + master enable\n  + per-provider toggles (Anthropic included; no `acknowledgedToS` gate).\n\nPace math (`src/pace.ts`) is pure, unit-tested, and guards every division so it\nnever emits `Infinity`/`NaN` or a spurious warning.\n","readmeFilename":"README.md"}