-
Notifications
You must be signed in to change notification settings - Fork 352
fix(agent): 防止下游 harness 能力无感覆盖 Cindy #1215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6bf8377
fix(agent): prevent harness capabilities from overriding Cindy
zqchris 43f9850
fix(agent): preserve colliding user MCP identities
zqchris 51e8ca3
fix(agent): ignore inactive Codex plugin overlays
zqchris 5e54d18
fix(agent): preserve Codex routed plan state
zqchris d3f04af
fix(agent): bind early Codex capability selection
zqchris 9916de1
merge: sync main into harness capability routing
zqchris 2def8e8
fix(agent): close capability routing ambiguities
zqchris 8c32513
fix(agent): keep guards for disconnected MCPs
zqchris 6d41a2a
fix(agent): close capability routing races
zqchris 33839f7
fix(agent): merge reviewed capability selectors
zqchris 2ee23db
fix: address review — record late steer selectors
zqchris 2f66fd6
fix: address review — harden remote Claude guards
zqchris c69d199
fix: address review — require harness provenance
zqchris 7e997fd
fix: address review — close Codex routing fallbacks
zqchris 448ca94
fix: address review — model plugin routing uncertainty
zqchris 5906c30
fix: address review — verify capability provenance
zqchris 64f75f0
fix: distinguish harness MCP provenance
zqchris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
854 changes: 849 additions & 5 deletions
854
apps/desktop/src/main/__tests__/codexGlobalPlugins.test.ts
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| import type { CapabilityRoutingPolicy } from '@cindy/maker-core'; | ||
|
|
||
| /** | ||
| * Product-level arbitration for capability sources that collide inside Cindy. | ||
| * | ||
| * User/project Skills and normal plugin capabilities remain available. Only a | ||
| * named overlapping downstream source is narrowed, and explicit selectors keep | ||
| * that source reachable when the user deliberately chooses it. | ||
| */ | ||
| export const DESKTOP_CAPABILITY_ROUTING_POLICY = { | ||
| overrides: [ | ||
| { | ||
| capabilityId: 'feishu', | ||
| source: { | ||
| kind: 'harness-plugin', | ||
| harness: 'claude-code', | ||
| surface: 'skill', | ||
| id: 'feishu-delegate:message-feishu-coworkers', | ||
| artifactId: 'message-feishu-coworkers', | ||
| containerId: 'feishu-delegate', | ||
| }, | ||
| invocation: 'explicit-only', | ||
| explicitSelectors: [ | ||
| '/feishu-delegate:message-feishu-coworkers', | ||
| ], | ||
| replacement: { | ||
| kind: 'cindy-plugin', | ||
| id: 'xd-feishu', | ||
| }, | ||
| reason: 'Natural-language Feishu requests should use the Cindy-connected account.', | ||
| }, | ||
| { | ||
| capabilityId: 'feishu', | ||
| source: { | ||
| kind: 'harness-plugin', | ||
| harness: 'codex', | ||
| surface: 'skill', | ||
| id: 'feishu-delegate:message-feishu-coworkers', | ||
| artifactId: 'message-feishu-coworkers', | ||
| containerId: 'feishu-delegate@personal', | ||
| }, | ||
| invocation: 'explicit-only', | ||
| explicitSelectors: [ | ||
| '$feishu-delegate:message-feishu-coworkers', | ||
| '/feishu-delegate:message-feishu-coworkers', | ||
| ], | ||
| replacement: { | ||
| kind: 'cindy-plugin', | ||
| id: 'xd-feishu', | ||
| }, | ||
| reason: 'Natural-language Feishu requests should use the Cindy-connected account.', | ||
| }, | ||
| { | ||
| capabilityId: 'feishu', | ||
| source: { | ||
| kind: 'harness-plugin', | ||
| harness: 'claude-code', | ||
| surface: 'mcp', | ||
| id: 'plugin:feishu-delegate:feishu-delegate', | ||
| containerId: 'feishu-delegate', | ||
| }, | ||
| invocation: 'explicit-only', | ||
| explicitSelectors: [ | ||
| '/feishu-delegate:message-feishu-coworkers', | ||
| ], | ||
| replacement: { | ||
| kind: 'cindy-plugin', | ||
| id: 'xd-feishu', | ||
| }, | ||
| reason: 'The downstream Feishu account must not be used without an explicit source choice.', | ||
| }, | ||
| { | ||
| capabilityId: 'feishu', | ||
| source: { | ||
| kind: 'harness-plugin', | ||
| harness: 'codex', | ||
| surface: 'mcp', | ||
| // Codex does not expose plugin provenance in the MCP approval request | ||
| // itself. Give the plugin server a Cindy-only runtime name in the | ||
| // isolated overlay, then verify its owning pluginId from the preceding | ||
| // mcpToolCall item. A user MCP may legally reuse either server name and | ||
| // must remain unaffected. | ||
| id: 'cindy-routed-feishu-delegate', | ||
| artifactId: 'feishu-delegate', | ||
| containerId: 'feishu-delegate@personal', | ||
| }, | ||
| invocation: 'explicit-only', | ||
| explicitSelectors: [ | ||
| '$feishu-delegate:message-feishu-coworkers', | ||
| '/feishu-delegate:message-feishu-coworkers', | ||
| ], | ||
| replacement: { | ||
| kind: 'cindy-plugin', | ||
| id: 'xd-feishu', | ||
| }, | ||
| reason: 'The downstream Feishu account must not be used without an explicit source choice.', | ||
| }, | ||
| { | ||
| capabilityId: 'computer-use', | ||
| source: { | ||
| kind: 'harness-plugin', | ||
| harness: 'codex', | ||
| surface: 'plugin', | ||
| id: 'computer-use@openai-bundled', | ||
| }, | ||
| invocation: 'disabled', | ||
| replacement: { | ||
| kind: 'cindy-host', | ||
| id: 'cindy_computer', | ||
| }, | ||
| reason: 'Cindy owns desktop-control enablement, permissions, and execution.', | ||
| }, | ||
| ], | ||
| } as const satisfies CapabilityRoutingPolicy; |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.