Skip to content

Commit f42ae60

Browse files
committed
fix(codex): authorize configured base-disabled apps
1 parent e114001 commit f42ae60

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

extensions/codex/src/app-server/plugin-thread-config.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ describe("Codex plugin thread config", () => {
254254
const request = vi.fn(async (method: string, params?: unknown) => {
255255
if (method === "app/list") {
256256
appListParams.push(params as v2.AppsListParams);
257-
return { data: [appInfo("google-calendar-app", true)], nextCursor: null };
257+
return { data: [appInfo("google-calendar-app", true, false)], nextCursor: null };
258258
}
259259
if (method === "plugin/list") {
260260
return pluginList([pluginSummary("google-calendar", { installed: true, enabled: true })]);
@@ -375,7 +375,7 @@ describe("Codex plugin thread config", () => {
375375
allowDestructiveActions: true,
376376
destructiveApprovalMode: "allow",
377377
},
378-
message: "google-calendar-app is not accessible or enabled for google-calendar.",
378+
message: "google-calendar-app is not accessible for google-calendar.",
379379
},
380380
]);
381381
});
@@ -572,9 +572,7 @@ describe("Codex plugin thread config", () => {
572572
let installed = false;
573573
const request = vi.fn(async (method: string, params?: unknown) => {
574574
if (method === "plugin/list") {
575-
return pluginList([
576-
pluginSummary("google-calendar", { installed, enabled: installed }),
577-
]);
575+
return pluginList([pluginSummary("google-calendar", { installed, enabled: installed })]);
578576
}
579577
if (method === "plugin/read") {
580578
return pluginDetail("google-calendar", [appSummary("google-calendar-app")]);

extensions/codex/src/app-server/plugin-thread-config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,11 @@ export async function buildCodexPluginThreadConfig(
232232
}
233233
pluginAppIds[record.policy.configKey] = [...record.ownedAppIds].toSorted();
234234
for (const app of resolveThreadConfigAppsForRecord({ record, inventory })) {
235-
if (!app.accessible || !app.enabled) {
235+
if (!app.accessible) {
236236
diagnostics.push({
237237
code: "app_not_ready",
238238
plugin: record.policy,
239-
message: `${app.id} is not accessible or enabled for ${record.policy.pluginName}.`,
239+
message: `${app.id} is not accessible for ${record.policy.pluginName}.`,
240240
});
241241
continue;
242242
}
@@ -434,7 +434,7 @@ function shouldForceRefreshForNotReadyPluginApps(
434434
(record) =>
435435
record.appOwnership === "proven" &&
436436
record.ownedAppIds.length > 0 &&
437-
(record.apps.length === 0 || record.apps.some((app) => !app.accessible || !app.enabled)),
437+
(record.apps.length === 0 || record.apps.some((app) => !app.accessible)),
438438
);
439439
}
440440

0 commit comments

Comments
 (0)