5 Commits

Author SHA1 Message Date
Paul O'Reilly
8935d58bd2 agent-subscriptions: use /api/oauth/usage and profile for Anthropic usage and plan info
Response rate-limit headers are no longer returned. Read the access token
from the Claude Code profile credentials (user:profile scope), report
5h/7d usage and resets, and add plan info with an inferred monthly renewal.

Claude-Session: https://claude.ai/code/session_01Gz3N3q53Bx9pbjB9tZT9dt
2026-10-14 16:41:22 +13:00
Paul O'Reilly
d6e0220bf5 Update model IDs to 5.x: claude-profile drivers, agent-subscriptions probe
Claude-Session: https://claude.ai/code/session_01SCd4vYV3ig6CpcPV9PCsC6
2026-10-13 10:17:01 +13:00
Paul O'Reilly
52eb484ef7 agent-subscriptions: add window_seconds and elapsed_pct to JSON output
Elapsed is null when a window has no reset timestamp (MiniMax v1 fallback)
so pacing consumers fail closed; negative reset_in_seconds clamps to 0.

Claude-Session: https://claude.ai/code/session_01YQDoWNM7XPPii28khFWoMc
2026-08-02 21:18:02 +12:00
Paul O'Reilly
c0a2110ee6 fix(agent-subscriptions): handle MiniMax API v2 response shape
MiniMax changed from category_remains[text_generation] with count fields
to model_remains[general] with remaining_percent fields. Now tries v2
first (100 - remaining_percent), falls back to v1 count-based calculation.
2026-06-03 20:49:20 +12:00
Paul O'Reilly
b0130bf06b feat(agent-subscriptions): add script to show AI provider subscription usage
Probes Anthropic OAuth and MiniMax subscription usage and displays
percentage consumed for 5-hour and 7-day windows with colour-coded output.
Ported probe logic from agent-runtimes/scripts/ralph_code.
2026-06-03 20:43:24 +12:00