Skip to content

iris usage storage: what a client stores, by workspace (#193867) - #625

Open
mayoalexander wants to merge 2 commits into
mainfrom
wt/193867-usage-storage
Open

mayoalexander wants to merge 2 commits into
mainfrom
wt/193867-usage-storage

Conversation

@mayoalexander

Copy link
Copy Markdown

Ticket #193867 (related #193864). Server side: FREELABEL/fl-api#316 (GET /api/v1/usage/storage). Merge that first — until it is deployed this command answers "This API does not have storage usage yet".

What

Extends the existing iris usage (platform-usage.ts) with a subcommand rather than a new top-level verb:

  • iris usage storage — your storage now, by workspace, the last 30 days recorded, and month-to-date GB-months. Plain wording ("You are storing 3.00 GB across 12 files."), decimal units to match the billing figure.
  • iris usage storage --all — every client ranked by bytes (platform admins; the server enforces it with User::isPlatformAdmin, the CLI just says so on 403).
  • --json for both.
  • No user id is ever sent — the server derives the account from the token. Asserted in the unit test.

Also: usage mapped to the Finance help group in command-groups.ts (it was unmapped and fell into Core), and capabilities.json regenerated (bun run capabilities; capabilities:check passes).

Tests

src/cli/cmd/platform-usage-storage.test.ts — 7 pass / 0 fail, run once on iris-hive-001 with bun 1.3.11 (matches main's pin). The repo's test workflow runs on PRs but is known to carry pre-existing failures; typecheck is the gate.

Not in scope

Pricing. This shows usage only; a price per GB-month is the owner's decision.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jtb7WudoN4jCe3AMkAeWQj

Alex Mayo and others added 2 commits November 18, 2026 17:23
`iris usage storage` shows the caller's own storage (now, by workspace,
last 30 days, month-to-date GB-months) from GET /api/v1/usage/storage;
`--all` lists every client for platform admins; `--json`. No user id is
sent — the server derives the account from the token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jtb7WudoN4jCe3AMkAeWQj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jtb7WudoN4jCe3AMkAeWQj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant