惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
U
Unit 42
V
Visual Studio Blog
D
DataBreaches.Net
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
D
Docker
G
Google Developers Blog
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
S
SegmentFault 最新的问题

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(codex): match connector app approvals by id · opencla...
kevinslin · 2026-05-12 · via Recent Commits to openclaw:main

@@ -97,6 +97,28 @@ function buildPluginApprovalElicitation(overrides: Record<string, unknown> = {})

9797

};

9898

}

9999100+

function buildConnectorPluginApprovalElicitation(overrides: Record<string, unknown> = {}) {

101+

return {

102+

threadId: "thread-1",

103+

turnId: "turn-1",

104+

serverName: "codex_apps",

105+

mode: "form",

106+

message: "Allow Google Calendar to create an event?",

107+

_meta: {

108+

codex_approval_kind: "mcp_tool_call",

109+

source: "connector",

110+

connector_id: "connector_google_calendar",

111+

connector_name: "Google Calendar",

112+

tool_title: "create_event",

113+

},

114+

requestedSchema: {

115+

type: "object",

116+

properties: {},

117+

},

118+

...overrides,

119+

};

120+

}

121+100122

function createPluginAppPolicyContext(

101123

params: {

102124

allowDestructiveActions?: boolean;

@@ -543,6 +565,114 @@ describe("Codex app-server elicitation bridge", () => {

543565

expect(mockCallGatewayTool).not.toHaveBeenCalled();

544566

});

545567568+

it("accepts connector-id plugin app elicitations when destructive actions are enabled", async () => {

569+

const result = await handleCodexAppServerElicitationRequest({

570+

requestParams: buildConnectorPluginApprovalElicitation(),

571+

paramsForRun: createParams(),

572+

threadId: "thread-1",

573+

turnId: "turn-1",

574+

pluginAppPolicyContext: createPluginAppPolicyContext({

575+

allowDestructiveActions: true,

576+

apps: [

577+

{

578+

appId: "connector_google_calendar",

579+

pluginName: "google-calendar",

580+

mcpServerNames: [],

581+

},

582+

],

583+

}),

584+

});

585+586+

expect(result).toEqual({

587+

action: "accept",

588+

content: null,

589+

_meta: null,

590+

});

591+

expect(mockCallGatewayTool).not.toHaveBeenCalled();

592+

});

593+594+

it("declines connector-id plugin app elicitations when destructive actions are disabled", async () => {

595+

const result = await handleCodexAppServerElicitationRequest({

596+

requestParams: buildConnectorPluginApprovalElicitation(),

597+

paramsForRun: createParams(),

598+

threadId: "thread-1",

599+

turnId: "turn-1",

600+

pluginAppPolicyContext: createPluginAppPolicyContext({

601+

allowDestructiveActions: false,

602+

apps: [

603+

{

604+

appId: "connector_google_calendar",

605+

pluginName: "google-calendar",

606+

mcpServerNames: [],

607+

},

608+

],

609+

}),

610+

});

611+612+

expect(result).toEqual({ action: "decline", content: null, _meta: null });

613+

expect(mockCallGatewayTool).not.toHaveBeenCalled();

614+

});

615+616+

it("declines live connector elicitations that only match display names", async () => {

617+

const result = await handleCodexAppServerElicitationRequest({

618+

requestParams: buildConnectorPluginApprovalElicitation({

619+

_meta: {

620+

codex_approval_kind: "mcp_tool_call",

621+

source: "connector",

622+

connector_name: "Google Calendar",

623+

tool_title: "create_event",

624+

},

625+

}),

626+

paramsForRun: createParams(),

627+

threadId: "thread-1",

628+

turnId: "turn-1",

629+

pluginAppPolicyContext: createPluginAppPolicyContext({

630+

allowDestructiveActions: true,

631+

apps: [

632+

{

633+

appId: "connector_google_calendar",

634+

pluginName: "google-calendar",

635+

mcpServerNames: [],

636+

},

637+

],

638+

}),

639+

});

640+641+

expect(result).toEqual({ action: "decline", content: null, _meta: null });

642+

expect(mockCallGatewayTool).not.toHaveBeenCalled();

643+

});

644+645+

it("declines live connector elicitations with mismatched app and connector ids", async () => {

646+

const result = await handleCodexAppServerElicitationRequest({

647+

requestParams: buildConnectorPluginApprovalElicitation({

648+

_meta: {

649+

codex_approval_kind: "mcp_tool_call",

650+

source: "connector",

651+

app_id: "other-app",

652+

connector_id: "connector_google_calendar",

653+

connector_name: "Google Calendar",

654+

tool_title: "create_event",

655+

},

656+

}),

657+

paramsForRun: createParams(),

658+

threadId: "thread-1",

659+

turnId: "turn-1",

660+

pluginAppPolicyContext: createPluginAppPolicyContext({

661+

allowDestructiveActions: true,

662+

apps: [

663+

{

664+

appId: "connector_google_calendar",

665+

pluginName: "google-calendar",

666+

mcpServerNames: [],

667+

},

668+

],

669+

}),

670+

});

671+672+

expect(result).toEqual({ action: "decline", content: null, _meta: null });

673+

expect(mockCallGatewayTool).not.toHaveBeenCalled();

674+

});

675+546676

it("declines plugin app elicitations that are missing active turn correlation", async () => {

547677

const result = await handleCodexAppServerElicitationRequest({

548678

requestParams: buildPluginApprovalElicitation({ turnId: null }),