mirror of
https://github.com/openai/codex.git
synced 2026-09-06 15:29:32 +00:00
## What changed - Add the experimental `turn/start.cyberAccessProgram` option with `standard`, `daybreakBlue`, and `daybreakRed` values. - Forward the selection as `access_programs.cyber` on Responses, WebSocket, and remote-compaction requests made with ChatGPT authentication, while omitting it for API-key and custom-provider requests. - Preserve the per-turn selection across recovery, compaction, and child-agent turns without making it a persistent thread setting. ## Testing - Cover app-server forwarding, authentication boundaries, WebSocket reuse, turn recovery, compaction, and child-agent inheritance. GitOrigin-RevId: d2eb468f365b2214c5099bc21741cf30f8bd2eb5
13 lines
352 B
Rust
13 lines
352 B
Rust
use codex_api::AccessPrograms;
|
|
use codex_login::CodexAuth;
|
|
use codex_protocol::turn_input::CyberAccessProgram;
|
|
|
|
pub(crate) fn for_auth(
|
|
auth: Option<&CodexAuth>,
|
|
program: Option<CyberAccessProgram>,
|
|
) -> Option<AccessPrograms> {
|
|
program
|
|
.filter(|_| auth.is_some_and(CodexAuth::is_chatgpt_auth))
|
|
.map(AccessPrograms::from)
|
|
}
|