Update agent SDKs and add gated Codex goals support (#114)

* add gated codex goals support

* sync README SDK versions

* bump claude agent sdk

* add codex goals settings toggle
This commit is contained in:
Eyejoker
2026-05-02 01:42:04 +09:00
committed by GitHub
parent bb1998be29
commit 7576bcd3ff
20 changed files with 616 additions and 30 deletions

View File

@@ -7,6 +7,7 @@ import {
import type {
ClaudeAccountSummary,
CodexAccountSummary,
CodexFeatureSnapshot,
FastModeSnapshot,
ModelConfigSnapshot,
} from './settings-store.js';
@@ -42,6 +43,7 @@ const modelConfig: ModelConfigSnapshot = {
};
const fastMode: FastModeSnapshot = { codex: true, claude: false };
const codexFeatures: CodexFeatureSnapshot = { goals: false };
const moaSettings: MoaSettingsSnapshot = {
enabled: true,
@@ -107,6 +109,7 @@ function makeDeps(
responseLength: 2,
}),
getActiveCodexSettingsIndex: () => 1,
getCodexFeatures: () => codexFeatures,
getFastMode: () => fastMode,
getModelConfig: () => modelConfig,
getMoaSettings: () => moaSettings,
@@ -116,6 +119,7 @@ function makeDeps(
refreshCodexAccount: async () => makeCodexAccount(),
removeAccountDirectory: () => undefined,
setActiveCodexSettingsIndex: () => undefined,
updateCodexFeatures: () => codexFeatures,
updateFastMode: () => fastMode,
updateModelConfig: () => modelConfig,
updateMoaSettings: () => moaSettings,
@@ -155,6 +159,10 @@ describe('web dashboard settings routes', () => {
expect(mode?.status).toBe(200);
await expect(mode?.json()).resolves.toEqual(fastMode);
const features = await route('/api/settings/codex-features');
expect(features?.status).toBe(200);
await expect(features?.json()).resolves.toEqual(codexFeatures);
const moa = await route('/api/settings/moa');
expect(moa?.status).toBe(200);
const moaJson = (await moa?.json()) as MoaSettingsSnapshot;
@@ -187,6 +195,10 @@ describe('web dashboard settings routes', () => {
calls.push(`models:${JSON.stringify(input)}`);
return modelConfig;
},
updateCodexFeatures: (input) => {
calls.push(`codex-features:${JSON.stringify(input)}`);
return { goals: input.goals === true };
},
updateMoaSettings: (input) => {
calls.push(`moa:${JSON.stringify(input)}`);
return moaSettings;
@@ -230,6 +242,15 @@ describe('web dashboard settings routes', () => {
codexCurrentIndex: 1,
});
const goals = await route(
'/api/settings/codex-features',
'PATCH',
{ goals: true },
deps,
);
expect(goals?.status).toBe(200);
await expect(goals?.json()).resolves.toEqual({ goals: true });
const moa = await route(
'/api/settings/moa',
'PATCH',
@@ -255,6 +276,7 @@ describe('web dashboard settings routes', () => {
'add:claude-token',
'delete:codex:4',
'current:4',
'codex-features:{"goals":true}',
'moa:{"enabled":false,"models":[{"name":"kimi","enabled":false}]}',
]);
});