Add per-turn cyber access program selection (#40687)

## 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
This commit is contained in:
faizan-oai authored and copyberry committed 2026-08-25 19:54:52 +00:00
1 parent a6e63f9f32
commit 94967e03e5
72 files changed
+1323 -273

No files matched your search

+9 -9
View File
@@ -742,15 +742,16 @@ impl AgentControl {
)
.await;
let start_options = TurnStartOptions {
parent_turn_id: options.parent_turn_id,
root_turn_id: options.root_turn_id,
cyber_access_program: options.cyber_access_program,
..Default::default()
};
match initial_input {
SpawnInitialInput::UserInput(input) => {
self.send_input(
new_thread.thread_id,
input,
options.parent_turn_id,
options.root_turn_id,
)
.await?;
self.send_input(new_thread.thread_id, input, start_options)
.await?;
}
SpawnInitialInput::InterAgentCommunication(communication, context) => {
self.send_inter_agent_communication_after_capacity_check(
@@ -758,8 +759,7 @@ impl AgentControl {
&state,
communication,
context,
options.parent_turn_id,
options.root_turn_id,
start_options,
)
.await?;
}