Repository navigation
Commit ba66dfd
authored
feat(api): agent identity on v2 meta, scoped CLI pairing keys, and v2 workspace rename (#9904)
* feat(api): agent identity on v2 meta, scoped CLI pairing keys, and v2 workspace rename
- GET /api/v2/meta adds keyId, userId, workspaceId and links {openapi, docs, mcp};
existing fields unchanged. The API catalog shares the same link source.
- CLI pairing login accepts --read-only and --expires-in <days>. The request rides
the approval URL, is shown on the approval card, is recorded with the approval
and applied at mint; the unauthenticated poll cannot set either. The poll echoes
access and expiresAt, and the CLI refuses to store a key that does not match
what was asked (an older server mints full access). The signed-out login bounce
now keeps scope, workspace, access and expiry instead of dropping them.
sim whoami shows the key's expiry and bound workspace.
- POST /api/v2/credentials/connections returns draftId. Opening a connection link
that is unknown, expired or another account's now explains to sign in as the
creating account, without saying which case applied.
- PATCH /api/v2/workspaces/{workspaceId} renames a workspace or changes its logo
through the existing workspaces.identity.update operation, widened to personal
API keys and OAuth tokens (api:write); Admin still required, workspace keys
still denied. Workspace update operations move into the operations registry.
- Regenerated OpenAPI, MCP catalog, CLI client and CLI docs.
* fix(cli-auth): pass route context in the new approve and poll tests
* test(mcp): expect the identity fields getMeta now returns
* fix(workspaces): count members before the rename so a failed count never hides a committed update
* improvement(cli-auth): reuse the api-key access schema and tidy handoff validation
* fix(api): publish the workspace PATCH body rules and check CLI-minted keys exactly
- PATCH /v2/workspaces/{id}: the body schema publishes minProperties 1, and
logoUrl is a pattern (root-relative path or https URL, protocol-relative
refused) instead of an unpublished refine.
- sim login refuses a minted key whose access or expiry differs from the
request in either direction, with the expiry checked against the requested
days within a clock tolerance.
- sim workspaces update --logo-url documents that clearing the logo goes
through the API or MCP.1 parent c844be8 commit ba66dfd
46 files changed
Lines changed: 1222 additions & 162 deletions
File tree
- apps
- docs
- content/docs/cli
- scripts/fixtures
- sim
- app
- .well-known/api-catalog
- api
- auth/oauth2/authorize
- cli/auth
- approve
- poll
- v2
- credentials/connections
- meta
- workspaces/[workspaceId]
- workspaces/[id]
- cli/auth
- oauth/credential-connected
- lib
- api
- application
- contracts
- v2
- openapi
- mcp
- generated
- cli-auth
- credentials
- workspaces
- application
- packages/sim-cli/src
- auth
- commands
- contract
- generated
- http
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
9239 | 9240 | | |
9240 | 9241 | | |
9241 | 9242 | | |
| 9243 | + | |
| 9244 | + | |
| 9245 | + | |
| 9246 | + | |
| 9247 | + | |
| 9248 | + | |
| 9249 | + | |
| 9250 | + | |
| 9251 | + | |
| 9252 | + | |
| 9253 | + | |
| 9254 | + | |
| 9255 | + | |
| 9256 | + | |
| 9257 | + | |
| 9258 | + | |
| 9259 | + | |
| 9260 | + | |
| 9261 | + | |
| 9262 | + | |
| 9263 | + | |
9242 | 9264 | | |
9243 | 9265 | | |
9244 | 9266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
44 | 65 | | |
45 | 66 | | |
46 | 67 | | |
| |||
0 commit comments