feat(api): add v2 resource management endpoints - #6900
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8ab4f07 to
b20179a
Compare
65caebf to
0f63bb6
Compare
PR SummaryLow Risk Overview Also publishes generated command docs for knowledge connectors (create/update/delete/list/sync and document exclude/restore), Reviewed by Cursor Bugbot for commit f0b8e0b. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR adds public v2 endpoints and CLI support for skill editors, accessible workspaces, knowledge connectors, strict service-account credential input, and reusable workspace profiles.
Confidence Score: 5/5The PR appears safe to merge, with canonical authorization, connector containment, audit behavior, and shared CLI authentication invariants preserved. The reviewed resource operations authenticate at their boundaries, resolve canonical parent and workspace context before authorization, preserve semantic audit effects, and expose validated public contracts without an accepted blocking or non-blocking defect.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/knowledge/application/connectors.ts | Adds authorized knowledge-connector operations that resolve canonical resource context before reads, mutations, synchronization, and document management. |
| apps/sim/app/api/v2/knowledge/[id]/connectors/route.ts | Exposes contract-backed v2 connector list and create endpoints through shared authentication, authorization, and presentation infrastructure. |
| apps/sim/lib/skills/application/use-cases.ts | Adds editor roster and grant/revoke use cases while preserving authoritative audit effects and no-op handling. |
| apps/sim/app/api/v2/credentials/route.ts | Updates service-account creation to consume the strict write-only credentials JSON contract. |
| apps/sim/lib/workspaces/application/list-public-workspaces.ts | Implements the public projection and pagination path for workspaces accessible to the authenticated principal. |
| packages/sim-cli/src/config/profile.ts | Adds direct shared-auth profile resolution with explicit validation against missing, chained, self-referential, or conflicting configuration. |
| packages/sim-cli/src/commands/auth.ts | Adds workspace-profile creation and dependency-aware authentication lifecycle behavior. |
| packages/sim-cli/src/generated/v2-api.ts | Regenerates CLI bindings for the new v2 resource-management contracts. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Client[CLI or API client] --> Route[v2 route adapter]
Route --> Auth[Authenticate and construct Principal]
Auth --> UseCase[Authorized application use case]
UseCase --> Context[Resolve canonical resource and workspace]
Context --> Authz[Check operation policy and permission]
Authz --> Domain[Execute resource operation]
Domain --> Audit[Project semantic audit and effects]
Domain --> Response[Safe public response]
Profile[Workspace CLI profile] --> AuthProfile[Stored authentication profile]
AuthProfile --> Client
Reviews (1): Last reviewed commit: "feat(cli): add shared workspace profiles" | Re-trigger Greptile
0f63bb6 to
f0b8e0b
Compare
Summary
Type of Change
Testing
Checklist