feat: Manage the team from the CLI - #27
Merged
Merged
Conversation
- team / api-key / member / invitation / usage commands over /admin/v1, same base URL and API key as every other command - write commands take --idempotency-key (client grows *_with_headers) - wire + offline tests; README section Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- read sweep (team joins its roster) + usage period echo and 92-day cap - api-key lifecycle asserts SEMANTICS: minted keys authenticate, rotate kills the old material, revoke and member-removal kill the rest - set-role verified on the roster; a vm key carries the member's role and 403s on owner-only ops; idempotent replay: same id, secret redacted - pagination walks both pages; expires_at round-trips - invitation create/revoke is opt-in via MEMORYLAKE_INVITE_EMAIL (env/.env, never committed); pending -> revoked transitions, no token - personal teams (the CI account) pin the 409 refusal of member and invitation writes instead of failing; org teams run full lifecycles - key probes run in throwaway homes: auth login switches active profile Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exposes the newly unified management-plane API (
/admin/v1/*) through the CLI, riding on the same base URL and API key as every existing command — no new configuration, no new credential type.New command families (14 operations):
teamget,renameapi-key(aliaskey)list,get,create,rotate,revokememberlist,create(virtual),set-role,removeinvitation(aliasinvite)create,list,revokeusageNotes
--idempotency-key; the core client gained*_with_headersvariants to carry it (existing methods delegate, no call-site churn).key create/key rotateprint the full key exactly once, matching the server's one-time-secret contract; an idempotent replay omits it, and thekeyfield isOptionfor exactly that case.encode_segment, with a hostile-id regression test.Idempotency-Keyper subcommand; offline tests pin the login requirement; a client test pins that extra headers reach the wire without displacing auth./admin/v1/*do not exist.🤖 Generated with Claude Code