



























@@ -96,10 +96,11 @@ describe("Codex plugin thread config", () => {
9696const disabledApps = pluginOverrideDisabled.configPatch?.apps as
9797| Record<string, unknown>
9898| undefined;
99-expect(disabledApps?.["google-calendar-app"]).toMatchObject({
99+expect(disabledApps?.["google-calendar-app"]).toEqual({
100100enabled: true,
101101destructive_enabled: false,
102102open_world_enabled: true,
103+default_tools_approval_mode: "auto",
103104});
104105expect(disabledApps?.["google-calendar-app"]).not.toHaveProperty("default_tools_enabled");
105106expect(disabledApps?.["google-calendar-app"]).not.toHaveProperty("tools");
@@ -124,9 +125,11 @@ describe("Codex plugin thread config", () => {
124125const enabledApps = pluginOverrideEnabled.configPatch?.apps as
125126| Record<string, unknown>
126127| undefined;
127-expect(enabledApps?.["google-calendar-app"]).toMatchObject({
128+expect(enabledApps?.["google-calendar-app"]).toEqual({
128129enabled: true,
129130destructive_enabled: true,
131+open_world_enabled: true,
132+default_tools_approval_mode: "auto",
130133});
131134expect(
132135pluginOverrideEnabled.policyContext.apps["google-calendar-app"]?.allowDestructiveActions,
@@ -257,8 +260,12 @@ describe("Codex plugin thread config", () => {
257260},
258261},
259262});
260-expect(config.policyContext.apps["google-calendar-app"]).toMatchObject({
263+expect(config.policyContext.apps["google-calendar-app"]).toEqual({
264+configKey: "google-calendar",
265+marketplaceName: CODEX_PLUGINS_MARKETPLACE_NAME,
261266pluginName: "google-calendar",
267+allowDestructiveActions: false,
268+mcpServerNames: [],
262269});
263270expect(config.diagnostics).toStrictEqual([]);
264271expect(
@@ -388,15 +395,25 @@ describe("Codex plugin thread config", () => {
388395 request,
389396});
390397391-expect(config.configPatch?.apps).toMatchObject({
398+expect(config.configPatch?.apps).toEqual({
399+_default: {
400+enabled: false,
401+destructive_enabled: false,
402+open_world_enabled: false,
403+},
392404"google-calendar-app": {
393405enabled: true,
394406destructive_enabled: false,
395407open_world_enabled: true,
408+default_tools_approval_mode: "auto",
396409},
397410});
398-expect(config.policyContext.apps["google-calendar-app"]).toMatchObject({
411+expect(config.policyContext.apps["google-calendar-app"]).toEqual({
412+configKey: "google-calendar",
413+marketplaceName: CODEX_PLUGINS_MARKETPLACE_NAME,
399414pluginName: "google-calendar",
415+allowDestructiveActions: false,
416+mcpServerNames: [],
400417});
401418expect(config.diagnostics).toStrictEqual([]);
402419expect(request.mock.calls.map(([method]) => method)).toContain("plugin/install");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。