feat: name the account (personal or team) in whoami and login
Merged
SA
23d ago+478+478+012345678901234567890123456789-9-9-0123456789
Name the account (personal or team) in whoami and login
InferenceInfra team accounts (https://github.com/RunanywhereAI/InferenceInfra/pull/6049) add an optional account {id, name, kind} to GET /v1/me. Console side: https://github.com/RunanywhereAI/Runanywhere-monorepo/pull/272.
| Before | After | |
|---|---|---|
wally account whoami | email, session | + account Acme Labs (team) or account personal, only when the server sends one |
whoami --json | email, session, console | + account {id, name, kind}, absent otherwise |
wally account login | signed in as you@x | signed in as you@x (Acme Labs (team)), from one best-effort /v1/me after the grant is saved |
- Compatibility both ways: no path or field renamed. An old server (no field) prints exactly what it did. An old CLI ignores the field (the generated parser reads named fields only). A display-unsafe name is dropped, never a failure.
- Contract: re-vendored with
contracts/sync_from_inferenceinfra.pyfrom InferenceInfrafeat/teams@810be26b. Re-sync fromdevelopmentonce https://github.com/RunanywhereAI/InferenceInfra/pull/6049 merges. - No release in this PR (release with the next validated CLI release).
Validation
cargo fmt --checkRC=0,cargo clippy --all-targets -D warningsRC=0.ctest: 6/6 passed (wally_rust_tests,wally_account_cli_e2ewith new team /--json/ personal / login-line cases, help, decisions, harness). Configured locally with-DWALLY_APPLE_MLX_HOST=OFF(no SDK Swift tree on this machine); CI builds the full host.- Parse tests with and without the field (
tests/test_wally_account.rs); break test: mapping neutered, 2 failed; restored, 3 passed. tests/test_contract_sync.pyOK,generate_console_binding.py --checkOK,sync_from_inferenceinfra.py --checkOK,check-agents-sync.shOK.- Not run: a real
wally login+whoamiagainst the dev control plane with teams on. It needs https://github.com/RunanywhereAI/InferenceInfra/pull/6049 deployed and the flag flipped, neither in scope here.
🤖 Generated with Claude Code
Summary by CodeRabbit
-
New Features
- Account identity now includes an optional account type, ID, and display name. The CLI shows available account details in
whoamioutput, including JSON, and identifies the approved account during sign-in. - The API contract documents account types, team-related errors, and rate-limit responses.
- Account identity now includes an optional account type, ID, and display name. The CLI shows available account details in
-
Bug Fixes
- Missing or unusable account details no longer prevent identity information from being retrieved. Accounts without a valid type are treated as absent.