Uh oh!
There was an error while loading. Please reload this page.
improvement(copilot): consolidate application adapters - #6450
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview The adapter enforces immutable operation registry membership (rejecting forged operation objects), delegated-service policy (e.g. copilot vs executor), trusted file/table scope projection (model tool input stays non-authoritative for resource scope), and principal identity/TTL/scope checks before Removes Centralizes Copilot-visible errors via Reviewed by Cursor Bugbot for commit 3532852. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR consolidates Copilot domain execution behind a shared application adapter and centralizes trusted context validation, delegated-principal construction, operation registration, resource-scope projection, and safe caller-visible error handling.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the scope of this follow-up review. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/application/application-adapter.ts | Adds the shared adapter that validates operation identity, trusted context, delegated-principal configuration, policy, and projected resource scope before invoking domain use cases. |
| apps/sim/lib/copilot/auth/application-delegation.ts | Centralizes validation of server-authored Copilot execution context and creation of bounded, short-lived delegated principals. |
| apps/sim/lib/copilot/tools/registry/server-tool-adapter.ts | Centralizes caller-visible application-error projection while preserving structured logging for unexpected tool failures. |
| apps/sim/lib/copilot/application/execute-file-use-case.ts | Migrates file use-case execution to the shared adapter and projects trusted file scope into delegated principals. |
| apps/sim/lib/copilot/application/execute-table-use-case.ts | Migrates table execution and admission to the shared adapter with trusted table-scope projection. |
| apps/sim/lib/copilot/application/execute-knowledge-use-case.ts | Migrates knowledge execution, principal construction, and safe error projection to the consolidated application infrastructure. |
Sequence Diagram
sequenceDiagram
participant Tool as Copilot tool handler
participant Adapter as Copilot application adapter
participant Auth as Delegation validation
participant UseCase as Domain application use case
Tool->>Adapter: trusted context, use case, input, trusted scope
Adapter->>Auth: validate context and construct principal
Auth-->>Adapter: bounded delegated principal
Adapter->>Adapter: verify operation identity, policy, and scope
Adapter->>UseCase: "execute({ principal, input })"
UseCase-->>Adapter: result or application error
Adapter-->>Tool: result
Reviews (2): Last reviewed commit: "improvement(copilot): consolidate applic..." | Re-trigger Greptile
f6813af to
80f0569Compare80f0569 to
3532852CompareTheodoreSpeaks
commented
Aug 9, 2026
TheodoreSpeaks
commented
Aug 9, 2026
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 3532852. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Type of Change
Testing
Checklist