feat(cli): workspace members namespace + post-login workspace prompt#28
Merged
George-iam merged 1 commit intomainfrom Mar 9, 2026
Merged
Conversation
…28) Track H plan completion — three missing items: 1. axme workspace members list/include/exclude - New subcommand group under `axme workspace` that mirrors the plan's required `axme workspace members` namespace. - `include <actor-id>` — calls POST /v1/workspaces/{id}/members/include (add existing org member to a workspace without changing org role). - `exclude <member-id>` — calls DELETE /v1/workspaces/{id}/members/{mid}/exclude (remove from workspace only; org membership retained). - `list` — scoped to active workspace. 2. Post-login interactive workspace prompt After email OTP verification, if the server has not auto-selected a workspace: - 0 workspaces → prints guidance message. - 1 workspace → auto-selects it and tells the user. - N>1 workspaces → shows a numbered list, prompts the user to pick one, calls POST /v1/portal/personal/workspace-selection with the choice. Prompt is bypassed in --json mode and in non-interactive/piped environments. 3. Refactored workspace command into named functions newWorkspaceListCmd, newWorkspaceUseCmd extracted for readability. Made-with: Cursor
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.
Summary
Closes three remaining gaps from TRACK_H_ACCOUNT_IDENTITY_AND_ACCESS_MODEL_PLAN.md:
1.
axme workspace members list/include/excludeNew subcommand group under
axme workspaceimplementing the plan's required namespace:axme workspace members list— list workspace membersaxme workspace members include <actor-id> [--role member] [--org-id] [--workspace-id]— include an existing org member into the workspace (callsPOST /v1/workspaces/{id}/members/include)axme workspace members exclude <member-id> [--workspace-id]— remove from workspace without removing from org (callsDELETE /v1/workspaces/{id}/members/{mid}/exclude)This complements the existing
axme memberorg-level commands.2. Post-login interactive workspace prompt
After email OTP login, if the server has not auto-selected a workspace:
POST /v1/portal/personal/workspace-selection.Bypassed in
--jsonmode so scripted/CI usage is unaffected.3. Workspace command refactor
newWorkspaceListCmdandnewWorkspaceUseCmdextracted as named functions for readability.Test plan
go test ./cmd/axme/)axme workspace members --helpshows list/include/excludeaxme loginwith a fresh account auto-selects single workspaceaxme loginwith multiple workspaces shows numbered promptMade with Cursor