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

@@ -56,6 +56,10 @@ export interface FastModeSnapshot {
claude: boolean;
}
export interface CodexFeatureSnapshot {
goals: boolean;
}
const ROLE_KEYS = ['OWNER', 'REVIEWER', 'ARBITER'] as const;
function envFilePath(): string {
@@ -634,6 +638,36 @@ export function updateFastMode(
return getFastMode();
}
function readCodexGoals(): boolean {
return readEnvOrProcess('CODEX_GOALS') === 'true';
}
function writeCodexGoals(value: boolean): void {
const file = envFilePath();
const content = fs.existsSync(file) ? fs.readFileSync(file, 'utf-8') : '';
const updated = setOrInsertEnvLine(
content,
'CODEX_GOALS',
value ? 'true' : 'false',
);
const tempPath = `${file}.tmp`;
fs.writeFileSync(tempPath, updated, { mode: 0o600 });
fs.renameSync(tempPath, file);
}
export function getCodexFeatures(): CodexFeatureSnapshot {
return {
goals: readCodexGoals(),
};
}
export function updateCodexFeatures(
input: Partial<CodexFeatureSnapshot>,
): CodexFeatureSnapshot {
if (typeof input.goals === 'boolean') writeCodexGoals(input.goals);
return getCodexFeatures();
}
export function removeAccountDirectory(
provider: 'claude' | 'codex',
index: number,