@hk_net/pi-usage-bars 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/docs/provider-research.md +28 -0
- package/extensions/usage-bars/index.ts +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## [0.7.1] - 2026-10-20
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Updated the development and test baseline to Pi SDK 1.3.0; verified the extension loader and Kimi OAuth/xAI Management credential resolution with the Pi 1.3.0 CLI.
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
- Audited Pi 1.3.0 provider additions and documented why TypeSafe, Xiaomi Token Plan, and GitHub Copilot metrics do not currently meet the account-usage support criteria.
|
|
14
|
+
|
|
5
15
|
## [0.7.0] - 2026-09-24
|
|
6
16
|
|
|
7
17
|
### Added
|
package/README.md
CHANGED
|
@@ -35,11 +35,11 @@ OpenRouter shows the account credit balance and current daily, weekly, and month
|
|
|
35
35
|
|
|
36
36
|
MiniMax Subscription Keys can represent an active Token Plan, purchased Credits, or both. The extension shows quota windows when present and a neutral credit-balance line if a first-party key-authenticated response exposes `points_balance`/`credits_balance`. MiniMax currently exposes Credits-only balances through a console endpoint requiring browser-cookie authentication, so a key-only Credits account is shown as “No active Token Plan” with a direction to check the console rather than a fabricated percentage. The extension does not import browser cookies.
|
|
37
37
|
|
|
38
|
-
Google Gemini CLI and Google Antigravity are not supported because Pi removed those built-in providers in version 0.71.0.
|
|
38
|
+
Google Gemini CLI and Google Antigravity are not supported because Pi removed those built-in providers in version 0.71.0. Pi 1.3.0 also adds the TypeSafe classifier, which is not an active chat model monitored by the footer. The reviewed TypeSafe and Xiaomi MiMo documentation does not describe a key-authenticated account-usage endpoint, so neither is currently supported; see [provider support research](docs/provider-research.md).
|
|
39
39
|
|
|
40
40
|
## Requirements
|
|
41
41
|
|
|
42
|
-
- Pi 0.84.2 or newer (tested with
|
|
42
|
+
- Pi 0.84.2 or newer (tested with Pi 1.3.0)
|
|
43
43
|
- Node.js 22.19 or newer when using the npm-distributed Pi CLI
|
|
44
44
|
|
|
45
45
|
Authenticate providers through Pi's `/login` command. The extension resolves credentials through Pi's provider API; it does not read or write `auth.json` itself.
|
|
@@ -62,6 +62,34 @@ A live redacted test with a read-only, team-scoped key returned HTTP 200 for key
|
|
|
62
62
|
|
|
63
63
|
Pi 0.86.1 added the `meta` provider with Meta Muse subscription OAuth and `META_API_KEY` authentication. No documented first-party endpoint was found for remaining subscription quota, reset timing, account balance, or spend. Do not infer quota from local requests or use undocumented console endpoints.
|
|
64
64
|
|
|
65
|
+
## Pi 1.3.0 provider audit (2026-10-20)
|
|
66
|
+
|
|
67
|
+
Comparing the registered `builtinProviders()` lists in [`pi-ai` 0.87.1](https://github.com/earendil-works/pi/blob/v0.87.1/packages/ai/src/providers/all.ts) and [1.3.0](https://github.com/earendil-works/pi/blob/v1.3.0/packages/ai/src/providers/all.ts) found one new provider, `typesafe`, and the Azure provider rename from `azure-openai-responses` to `azure`. The other built-in provider IDs were already present in the 0.87.1 baseline.
|
|
68
|
+
|
|
69
|
+
### TypeSafe
|
|
70
|
+
|
|
71
|
+
**Status:** No documented key-authenticated account-usage endpoint found in the reviewed documentation.
|
|
72
|
+
|
|
73
|
+
Pi documents `typesafe` as a classifier provider. Classifier models do not appear in `/model`; they are called through the classifier API, so they are not the active chat model this extension monitors. That only prevents active-model footer monitoring; the blocker for account usage reporting is separate. TypeSafe's public `POST /v1/systemone` response reports token usage for that individual request and its docs describe per-organization rate limits and per-token pricing, but no key-authenticated account-level quota, balance, or period-spend endpoint is documented. Summing requests seen by Pi would omit activity from other clients and would not represent account usage.
|
|
74
|
+
|
|
75
|
+
Sources: [Pi classifier models](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/models.md#use-classifier-models), [TypeSafe API](https://docs.typesafe.ai/api/system-one), [TypeSafe model pricing and limits](https://docs.typesafe.ai/models).
|
|
76
|
+
|
|
77
|
+
### Xiaomi MiMo Token Plan
|
|
78
|
+
|
|
79
|
+
**Status:** Blocked — no documented key-authenticated account-usage endpoint found in the reviewed documentation as of 2026-10-20.
|
|
80
|
+
|
|
81
|
+
Xiaomi's official documentation describes fixed monthly/annual Token Plan Credits and says current plan usage is available through the Token Plan progress bar/console. Its published API reference lists inference, rate-limit, and model endpoints, but no API-key-authenticated endpoint for remaining/used plan credits or reset time was found. Do not scrape the console or invent usage from requests observed by Pi. Revisit if Xiaomi publishes an authorized account-usage API.
|
|
82
|
+
|
|
83
|
+
Sources: [Xiaomi Token Plan pricing and quota](https://mimo.mi.com/docs/en-US/price/token-plan), [Xiaomi Token Plan usage FAQ](https://mimo.mi.com/static/docs/quick-start/faq/token-plan/Usage&Quota.md), [Token Plan console](https://platform.xiaomimimo.com/token-plan), [published API reference](https://mimo.mi.com/llms.txt), [Pi provider authentication](https://github.com/earendil-works/pi/blob/v1.3.0/packages/coding-agent/docs/providers.md).
|
|
84
|
+
|
|
85
|
+
### GitHub Copilot metrics
|
|
86
|
+
|
|
87
|
+
**Status:** Not suitable for per-user usage bars through Pi's normal Copilot credential.
|
|
88
|
+
|
|
89
|
+
GitHub's documented Copilot usage-metrics API returns organization or enterprise reports. The policy must be enabled for the enterprise, and access requires the relevant enterprise/org reporting permissions; the API is not a personal subscription balance or remaining-quota endpoint. Pi resolves a user's Copilot sign-in/token, which does not establish those administrator permissions or an organization context. Supporting enterprise reports would need a separate, explicitly configured admin credential and scope, and would still not provide a user's current personal quota.
|
|
90
|
+
|
|
91
|
+
Source: [GitHub Copilot usage metrics API](https://docs.github.com/en/rest/copilot/copilot-usage-metrics).
|
|
92
|
+
|
|
65
93
|
## Acceptance criteria for a new provider
|
|
66
94
|
|
|
67
95
|
A provider is suitable when a documented first-party API or response header supplies at least one meaningful account-level value:
|
|
@@ -608,8 +608,8 @@ export default function (pi: ExtensionAPI): void {
|
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
function isClaudeSubscriptionAuth(source: string | undefined): boolean {
|
|
611
|
-
// Pi
|
|
612
|
-
// credential-type discriminator. Keep
|
|
611
|
+
// Pi exposes AuthResult.source as a human-readable label rather than a
|
|
612
|
+
// credential-type discriminator. Keep this source-label assumption in one
|
|
613
613
|
// place until ModelRegistry exposes the resolved credential type directly.
|
|
614
614
|
return source === "OAuth";
|
|
615
615
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hk_net/pi-usage-bars",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Quota, balance, and spend indicators for current Pi providers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@earendil-works/pi-ai": "
|
|
71
|
-
"@earendil-works/pi-coding-agent": "
|
|
72
|
-
"@earendil-works/pi-tui": "
|
|
70
|
+
"@earendil-works/pi-ai": "1.3.0",
|
|
71
|
+
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
72
|
+
"@earendil-works/pi-tui": "1.3.0",
|
|
73
73
|
"@types/bun": "1.3.14",
|
|
74
74
|
"@types/node": "24.13.3",
|
|
75
75
|
"typescript": "5.9.3"
|