feat: workspace roles — admins review and manage like the owner
SA
1h ago+196+196+012345678901234567890123456789-53-53-01234567890123456789
Workspace roles in the CLI. Stacked on #1685. The backend adds admins to workspaces: owner and admins decide review requests and rules, and their own submissions go in without review.
What it does
src/altimate/workspace/role.ts:roleOfreads the server'srole(owner, admin or member) and falls back tois_owneron older servers.managesmeans owner or admin.- Schemas: the review summary and the rules sync response accept an optional
role, and the rules state stores it from each pull. - Admins get the owner's actions: approve on rule cards, and the "you, a workspace admin" wording in the remember tool.
skill publish:- review off refuses only members;
- a server with review but no submit route falls back to attaching for managers;
- a server without review still requires ownership (such a server has no admins).
- Wording: user-facing text that named only the owner for reviewing now says "the owner or an admin". That covers the
learnhelp and prompts, send and approve messages, the TUI hint, plugin host headings, and the docs. Owner names and link/bind messages stay owner-only, since the backend still requires the owner there.
Testing
- Typecheck is clean, and the marker guard passes.
- New tests:
role.test.ts; rule-card actions per role, including an older server and an unknown role; the role kept from a pull; publish for an admin with review off, for an admin whose server has no review, and for a member on an older server. - Workspace, rules, learn and server suites: 4,122 pass. The 2 failures also fail without this change: those server tests read the machine's own MCP config.
- Removing each key fix makes its test fail.
🤖 Generated with Claude Code
Summary by cubic
Adds workspace roles to the CLI: workspace admins can now review and manage like the owner, while members still send items for review.
- Reads the server's
role(owner,admin, ormember) from the review summary and rules sync, falling back tois_ownerfor older servers. - Admins get the owner's actions: approve on rule cards, direct attach for
skill publish(review off refuses only members). - Updates user-facing wording and docs to say "the owner or an admin" instead of just the owner.