feat: muse hub user create/delete CLI commands (musehub#224)
Companion to musehub's server-side change (DELETE /api/admin/users/{handle}, shared delete_identity_account service, MCP parity). Closes the CLI-side gap: user/identity had read/update but no create or delete, unlike every other hub resource's full CRUD convention.
run_user_create wraps POST /api/users (profile creation -- distinct from identity/keypair registration via `muse auth register`, which must already have happened).
run_user_delete is one CLI surface for both self-delete and admin-delete (design decision confirmed via AskUserQuestion): omitting --handle (or passing your own handle) calls DELETE /api/me; passing a different handle calls DELETE /api/admin/users/{handle}, which the hub rejects with 403 unless the caller has admin privileges -- the CLI performs no authorization check of its own, it only routes. Requires --yes, matching the existing `muse hub repo delete` confirmation convention.
TDD: wrote command-construction tests first (mirroring TestHubUserReadUpdateCommands' existing pattern) confirming genuine RED (ImportError -- the functions didn't exist), then implemented. Confirmed GREEN: 110 passed in test_cli_hub.py.
Documented both paths in docs/agent-guide.md (Gitism Glossary + Users/ topics/forks command reference), per musehub#224's own acceptance criteria.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Semantic Changes
14 symbols
Files Changed
~3
1259 in snapshot
0 comments
muse hub commit comment sha256:992af0a75d7793d0d26f1f8378827ac61ca1052684797a718cda70d1719ea137 --body "your comment"
No comments yet. Be the first to start the discussion.