@juanbenjumea/pi-agy 0.5.8 → 0.5.9
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 +5 -0
- package/extensions/lib/cli.ts +16 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.9
|
|
4
|
+
|
|
5
|
+
- Parse the real agy 1.2.6 `/usage` schema (`command.data.groups[].buckets[]`): usage groups carry the model family in `name`, which the quota reader now honors — live runs previously fell back to dumping the raw JSON envelope and reported `quota_status: unknown`. Found by an end-to-end run against the real CLI.
|
|
6
|
+
- Skip disabled quota buckets (a limit not in effect carries no availability signal) and normalize window spellings (`5h` → `five-hour`) across CLI versions.
|
|
7
|
+
|
|
3
8
|
## 0.5.8
|
|
4
9
|
|
|
5
10
|
- Port the platform-aware install hint from upstream 0.3.4: Windows `ENOENT` errors now point at the PowerShell installer instead of a bash one-liner. (Upstream's other recent changes are already covered here independently: the non-string `response` guard in `parseJsonResponse`, and the live `agy models` catalog supersedes static model-map bumps.)
|
package/extensions/lib/cli.ts
CHANGED
|
@@ -410,6 +410,10 @@ const MODEL_FIELD_KEYS = [
|
|
|
410
410
|
"group",
|
|
411
411
|
"family",
|
|
412
412
|
"pool",
|
|
413
|
+
// agy 1.2.6 usage groups carry the family in `name` ("Gemini Models",
|
|
414
|
+
// "Claude and GPT models"); the looksLikeModelName gate rejects the
|
|
415
|
+
// non-model names ("Weekly Limit Remaining", "usage", …) that also use it.
|
|
416
|
+
"name",
|
|
413
417
|
];
|
|
414
418
|
const REMAINING_FRACTION_KEYS = [
|
|
415
419
|
"remainingFraction",
|
|
@@ -654,7 +658,10 @@ function readQuotaEntry(
|
|
|
654
658
|
value: Record<string, unknown>,
|
|
655
659
|
hintedWindow?: string,
|
|
656
660
|
): AgyQuotaEntry | undefined {
|
|
657
|
-
|
|
661
|
+
// Normalize window spellings ("5h" → "five-hour") so reports and merge
|
|
662
|
+
// keys stay consistent across CLI versions.
|
|
663
|
+
const rawWindow = readString(value, WINDOW_KEYS);
|
|
664
|
+
const window = (rawWindow ? quotaWindowName(rawWindow) ?? rawWindow : undefined) ?? hintedWindow;
|
|
658
665
|
const fraction = readNumber(value, REMAINING_FRACTION_KEYS);
|
|
659
666
|
const percent = readNumber(value, REMAINING_PERCENT_KEYS);
|
|
660
667
|
const normalizedFraction = fraction ?? (percent !== undefined ? percent / 100 : undefined);
|
|
@@ -664,11 +671,14 @@ function readQuotaEntry(
|
|
|
664
671
|
const exhausted =
|
|
665
672
|
value.exhausted === true || value.isExhausted === true || value.is_exhausted === true;
|
|
666
673
|
if (
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
674
|
+
// A disabled limit is not in effect and carries no availability signal —
|
|
675
|
+
// recording its remaining fraction would mislead model selection.
|
|
676
|
+
value.disabled === true ||
|
|
677
|
+
(normalizedFraction === undefined &&
|
|
678
|
+
requests === undefined &&
|
|
679
|
+
tokens === undefined &&
|
|
680
|
+
!reset &&
|
|
681
|
+
!exhausted)
|
|
672
682
|
) {
|
|
673
683
|
return undefined;
|
|
674
684
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juanbenjumea/pi-agy",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.9",
|
|
4
4
|
"description": "Enhanced Antigravity CLI (agy) bridge for Pi — streaming progress, conversation continuity, repo-aware verify, and diff summaries.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|