protocol rename

This commit is contained in:
Roy Han
2026-03-24 14:42:53 -07:00
parent e7a4e25e83
commit 5d7f0e0c83
77 changed files with 296 additions and 308 deletions
@@ -82,9 +82,9 @@ use codex_protocol::protocol::SkillMetadata as CoreSkillMetadata;
use codex_protocol::protocol::SkillScope as CoreSkillScope;
use codex_protocol::protocol::SkillToolDependency as CoreSkillToolDependency;
use codex_protocol::protocol::SubAgentSource as CoreSubAgentSource;
use codex_protocol::protocol::SubmissionType;
use codex_protocol::protocol::TokenUsage as CoreTokenUsage;
use codex_protocol::protocol::TokenUsageInfo as CoreTokenUsageInfo;
use codex_protocol::protocol::UserMessageType;
use codex_protocol::request_permissions::PermissionGrantScope as CorePermissionGrantScope;
use codex_protocol::request_permissions::RequestPermissionProfile as CoreRequestPermissionProfile;
use codex_protocol::user_input::ByteRange as CoreByteRange;
@@ -3919,7 +3919,7 @@ pub struct TurnStartParams {
/// Classify the primary input message submitted with `turn/start`.
#[serde(default, skip_serializing_if = "Option::is_none")]
#[ts(optional = nullable)]
pub user_message_type: Option<UserMessageType>,
pub submission_type: Option<SubmissionType>,
/// Optional JSON Schema used to constrain the final assistant message for
/// this turn.
#[ts(optional = nullable)]
@@ -8040,7 +8040,7 @@ mod tests {
effort: None,
summary: None,
personality: None,
user_message_type: None,
submission_type: None,
output_schema: None,
collaboration_mode: None,
};
+6 -6
View File
@@ -735,7 +735,7 @@ async fn trigger_zsh_fork_multi_cmd_approval(
text: message,
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
};
turn_params.approval_policy = Some(AskForApproval::OnRequest);
@@ -821,7 +821,7 @@ async fn resume_message_v2(
text: user_message,
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})?;
println!("< turn/start response: {turn_response:?}");
@@ -966,7 +966,7 @@ async fn send_message_v2_with_policies(
// Test client sends plain text without UI element ranges.
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
};
turn_params.approval_policy = policies.approval_policy;
@@ -1007,7 +1007,7 @@ async fn send_follow_up_v2(
// Test client sends plain text without UI element ranges.
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
};
let first_turn_response = client.turn_start(first_turn_params)?;
@@ -1021,7 +1021,7 @@ async fn send_follow_up_v2(
// Test client sends plain text without UI element ranges.
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
};
let follow_up_response = client.turn_start(follow_up_params)?;
@@ -1245,7 +1245,7 @@ fn live_elicitation_timeout_pause(
sandbox_policy: Some(SandboxPolicy::DangerFullAccess),
effort: Some(ReasoningEffort::High),
cwd: Some(workspace),
user_message_type: None,
submission_type: None,
..Default::default()
})?;
println!("< turn/start response: {turn_response:?}");
@@ -6072,7 +6072,7 @@ impl CodexMessageProcessor {
Op::UserInputWithMetadata {
items: mapped_items,
final_output_json_schema: params.output_schema,
user_message_type: params.user_message_type,
submission_type: params.submission_type,
},
)
.await;
@@ -599,7 +599,7 @@ async fn turn_start_jsonrpc_span_parents_core_turn_spans() -> Result<()> {
effort: None,
summary: None,
personality: None,
user_message_type: None,
submission_type: None,
output_schema: None,
collaboration_mode: None,
},
@@ -419,7 +419,7 @@ async fn external_auth_refreshes_on_unauthorized() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -526,7 +526,7 @@ async fn external_auth_refresh_error_fails_turn() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -649,7 +649,7 @@ async fn external_auth_refresh_mismatched_workspace_fails_turn() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -765,7 +765,7 @@ async fn external_auth_refresh_invalid_access_token_fails_turn() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -342,7 +342,7 @@ async fn send_turn_and_wait(mcp: &mut McpProcess, thread_id: &str, text: &str) -
text: text.to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -202,7 +202,7 @@ async fn send_turn_start_request(stream: &mut WsClient, id: i64, thread_id: &str
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})?),
)
@@ -86,7 +86,7 @@ async fn thread_start_injects_dynamic_tools_into_model_requests() -> Result<()>
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -165,7 +165,7 @@ async fn thread_start_keeps_hidden_dynamic_tools_out_of_model_requests() -> Resu
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -254,7 +254,7 @@ async fn dynamic_tool_call_round_trip_sends_text_content_items_to_model() -> Res
text: "Run the tool".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -423,7 +423,7 @@ async fn dynamic_tool_call_round_trip_sends_content_items_to_model() -> Result<(
text: "Run the tool".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -248,7 +248,7 @@ async fn turn_start_notify_payload_includes_initialize_client_name() -> Result<(
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -137,7 +137,7 @@ async fn mcp_server_elicitation_round_trip() -> Result<()> {
text_elements: Vec::new(),
}],
model: Some("mock-model".to_string()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -170,7 +170,7 @@ async fn mcp_server_elicitation_round_trip() -> Result<()> {
text_elements: Vec::new(),
}],
model: Some("mock-model".to_string()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -63,7 +63,7 @@ async fn turn_start_accepts_output_schema_v2() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
output_schema: Some(output_schema.clone()),
..Default::default()
})
@@ -146,7 +146,7 @@ async fn turn_start_output_schema_is_per_turn_v2() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
output_schema: Some(output_schema.clone()),
..Default::default()
})
@@ -189,7 +189,7 @@ async fn turn_start_output_schema_is_per_turn_v2() -> Result<()> {
text: "Hello again".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
output_schema: None,
..Default::default()
})
@@ -156,7 +156,7 @@ async fn start_plan_mode_turn(mcp: &mut McpProcess) -> Result<codex_app_server_p
text: "Plan this".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
collaboration_mode: Some(collaboration_mode),
..Default::default()
})
@@ -54,7 +54,7 @@ async fn request_permissions_round_trip() -> Result<()> {
text_elements: Vec::new(),
}],
model: Some("mock-model".to_string()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -57,7 +57,7 @@ async fn request_user_input_round_trip() -> Result<()> {
}],
model: Some("mock-model".to_string()),
effort: Some(ReasoningEffort::Medium),
user_message_type: None,
submission_type: None,
collaboration_mode: Some(CollaborationMode {
mode: ModeKind::Plan,
settings: Settings {
+1 -1
View File
@@ -434,7 +434,7 @@ async fn materialize_thread_rollout(mcp: &mut McpProcess, thread_id: &str) -> Re
text: "materialize rollout".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -63,7 +63,7 @@ async fn openai_model_header_mismatch_emits_model_rerouted_notification_v2() ->
text: "trigger safeguard".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -137,7 +137,7 @@ async fn response_model_field_mismatch_emits_model_rerouted_notification_v2_when
text: "trigger response model check".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -92,7 +92,7 @@ async fn thread_archive_requires_materialized_rollout() -> Result<()> {
text: "materialize".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -190,7 +190,7 @@ async fn thread_archive_clears_stale_subscriptions_before_resume() -> Result<()>
text: "materialize".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -268,7 +268,7 @@ async fn thread_archive_clears_stale_subscriptions_before_resume() -> Result<()>
text: "secondary turn".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -463,7 +463,7 @@ async fn thread_fork_ephemeral_remains_pathless_and_omits_listing() -> Result<()
text: "continue".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -216,7 +216,7 @@ async fn thread_list_reports_system_error_idle_flag_after_failed_turn() -> Resul
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -239,7 +239,7 @@ async fn thread_list_reports_system_error_idle_flag_after_failed_turn() -> Resul
text: "fail turn".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -441,7 +441,7 @@ async fn thread_read_reports_system_error_idle_flag_after_failed_turn() -> Resul
text: "fail this turn".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -564,7 +564,7 @@ async fn thread_resume_without_overrides_does_not_change_updated_at_or_mtime() -
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -614,7 +614,7 @@ async fn thread_resume_keeps_in_flight_turn_streaming() -> Result<()> {
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -640,7 +640,7 @@ async fn thread_resume_keeps_in_flight_turn_streaming() -> Result<()> {
text: "respond with docs".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -723,7 +723,7 @@ async fn thread_resume_rejects_history_when_thread_is_running() -> Result<()> {
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -747,7 +747,7 @@ async fn thread_resume_rejects_history_when_thread_is_running() -> Result<()> {
text: "keep running".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -841,7 +841,7 @@ async fn thread_resume_rejects_mismatched_path_when_thread_is_running() -> Resul
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -865,7 +865,7 @@ async fn thread_resume_rejects_mismatched_path_when_thread_is_running() -> Resul
text: "keep running".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -949,7 +949,7 @@ async fn thread_resume_rejoins_running_thread_even_with_override_mismatch() -> R
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -972,7 +972,7 @@ async fn thread_resume_rejoins_running_thread_even_with_override_mismatch() -> R
text: "keep running".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1064,7 +1064,7 @@ async fn thread_resume_replays_pending_command_execution_request_approval() -> R
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1088,7 +1088,7 @@ async fn thread_resume_replays_pending_command_execution_request_approval() -> R
text_elements: Vec::new(),
}],
approval_policy: Some(AskForApproval::UnlessTrusted),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1205,7 +1205,7 @@ async fn thread_resume_replays_pending_file_change_request_approval() -> Result<
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1230,7 +1230,7 @@ async fn thread_resume_replays_pending_file_change_request_approval() -> Result<
}],
cwd: Some(workspace.clone()),
approval_policy: Some(AskForApproval::UnlessTrusted),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1375,7 +1375,7 @@ async fn thread_resume_with_overrides_defers_updated_at_until_turn_start() -> Re
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1555,7 +1555,7 @@ async fn thread_resume_prefers_path_over_thread_id() -> Result<()> {
text: "materialize".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1676,7 +1676,7 @@ async fn start_materialized_thread_and_restart(
text: seed_text.to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1751,7 +1751,7 @@ async fn thread_resume_accepts_personality_override() -> Result<()> {
text: "seed history".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1792,7 +1792,7 @@ async fn thread_resume_accepts_personality_override() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -61,7 +61,7 @@ async fn thread_rollback_drops_last_turns_and_persists_to_rollout() -> Result<()
text: first_text.to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -83,7 +83,7 @@ async fn thread_rollback_drops_last_turns_and_persists_to_rollout() -> Result<()
text: "Second".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -205,7 +205,7 @@ async fn thread_shell_command_uses_existing_active_turn() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -53,7 +53,7 @@ async fn thread_status_changed_emits_runtime_updates() -> Result<()> {
text_elements: Vec::new(),
}],
model: Some("mock-model".to_string()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -176,7 +176,7 @@ async fn thread_status_changed_can_be_opted_out() -> Result<()> {
text_elements: Vec::new(),
}],
model: Some("mock-model".to_string()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -60,7 +60,7 @@ async fn thread_unarchive_moves_rollout_back_into_sessions_directory() -> Result
text: "materialize".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -177,7 +177,7 @@ async fn thread_unsubscribe_during_turn_interrupts_turn_and_emits_thread_closed(
text_elements: Vec::new(),
}],
cwd: Some(working_directory),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -251,7 +251,7 @@ async fn thread_unsubscribe_clears_cached_status_before_resume() -> Result<()> {
text: "fail this turn".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -78,7 +78,7 @@ async fn turn_interrupt_aborts_running_turn() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(working_directory.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -173,7 +173,7 @@ async fn turn_interrupt_resolves_pending_command_approval_request() -> Result<()
text_elements: Vec::new(),
}],
cwd: Some(working_directory),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -121,7 +121,7 @@ async fn turn_start_sends_originator_header() -> Result<()> {
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -193,7 +193,7 @@ async fn turn_start_emits_user_message_item_with_text_elements() -> Result<()> {
text: "Hello".to_string(),
text_elements: text_elements.clone(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -282,7 +282,7 @@ async fn turn_start_accepts_text_at_limit_with_mention_item() -> Result<()> {
path: "app://demo-app".to_string(),
},
],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -346,7 +346,7 @@ async fn turn_start_rejects_combined_oversized_text_input() -> Result<()> {
text_elements: Vec::new(),
},
],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -423,7 +423,7 @@ async fn turn_start_emits_notifications_and_accepts_model_override() -> Result<(
text: "Hello".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -473,7 +473,7 @@ async fn turn_start_emits_notifications_and_accepts_model_override() -> Result<(
text_elements: Vec::new(),
}],
model: Some("mock-model-override".to_string()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -570,7 +570,7 @@ async fn turn_start_accepts_collaboration_mode_override_v2() -> Result<()> {
model: Some("mock-model-override".to_string()),
effort: Some(ReasoningEffort::Low),
summary: Some(ReasoningSummary::Auto),
user_message_type: None,
submission_type: None,
output_schema: None,
collaboration_mode: Some(collaboration_mode),
..Default::default()
@@ -658,7 +658,7 @@ async fn turn_start_uses_thread_feature_overrides_for_collaboration_mode_instruc
model: Some("mock-model-override".to_string()),
effort: Some(ReasoningEffort::Low),
summary: Some(ReasoningSummary::Auto),
user_message_type: None,
submission_type: None,
output_schema: None,
collaboration_mode: Some(collaboration_mode),
..Default::default()
@@ -728,7 +728,7 @@ async fn turn_start_accepts_personality_override_v2() -> Result<()> {
text_elements: Vec::new(),
}],
personality: Some(Personality::Friendly),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -810,7 +810,7 @@ async fn turn_start_change_personality_mid_thread_v2() -> Result<()> {
text_elements: Vec::new(),
}],
personality: None,
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -835,7 +835,7 @@ async fn turn_start_change_personality_mid_thread_v2() -> Result<()> {
text_elements: Vec::new(),
}],
personality: Some(Personality::Friendly),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -938,7 +938,7 @@ async fn turn_start_uses_migrated_pragmatic_personality_without_override_v2() ->
text_elements: Vec::new(),
}],
personality: None,
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1007,7 +1007,7 @@ async fn turn_start_accepts_local_image_input() -> Result<()> {
.send_turn_start_request(TurnStartParams {
thread_id: thread.id.clone(),
input: vec![V2UserInput::LocalImage { path: image_path }],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1095,7 +1095,7 @@ async fn turn_start_exec_approval_toggle_v2() -> Result<()> {
text: "run python".to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1165,7 +1165,7 @@ async fn turn_start_exec_approval_toggle_v2() -> Result<()> {
model: Some("mock-model".to_string()),
effort: Some(ReasoningEffort::Medium),
summary: Some(ReasoningSummary::Auto),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1239,7 +1239,7 @@ async fn turn_start_exec_approval_decline_v2() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1408,7 +1408,7 @@ async fn turn_start_updates_sandbox_and_cwd_between_turns_v2() -> Result<()> {
summary: Some(ReasoningSummary::Auto),
service_tier: None,
personality: None,
user_message_type: None,
submission_type: None,
output_schema: None,
collaboration_mode: None,
})
@@ -1442,7 +1442,7 @@ async fn turn_start_updates_sandbox_and_cwd_between_turns_v2() -> Result<()> {
summary: Some(ReasoningSummary::Auto),
service_tier: None,
personality: None,
user_message_type: None,
submission_type: None,
output_schema: None,
collaboration_mode: None,
})
@@ -1545,7 +1545,7 @@ async fn turn_start_file_change_approval_v2() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1763,7 +1763,7 @@ async fn turn_start_emits_spawn_agent_item_with_model_metadata_v2() -> Result<()
text: PARENT_PROMPT.to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -1978,7 +1978,7 @@ config_file = "./custom-role.toml"
text: PARENT_PROMPT.to_string(),
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -2125,7 +2125,7 @@ async fn turn_start_file_change_approval_accept_for_session_persists_v2() -> Res
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -2203,7 +2203,7 @@ async fn turn_start_file_change_approval_accept_for_session_persists_v2() -> Res
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -2307,7 +2307,7 @@ async fn turn_start_file_change_approval_decline_v2() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -2453,7 +2453,7 @@ async fn command_execution_notifications_include_process_id() -> Result<()> {
text_elements: Vec::new(),
}],
sandbox_policy: Some(codex_app_server_protocol::SandboxPolicy::DangerFullAccess),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -127,7 +127,7 @@ async fn turn_start_shell_zsh_fork_executes_command_v2() -> Result<()> {
model: Some("mock-model".to_string()),
effort: Some(codex_protocol::openai_models::ReasoningEffort::Medium),
summary: Some(codex_protocol::config_types::ReasoningSummary::Auto),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -242,7 +242,7 @@ async fn turn_start_shell_zsh_fork_exec_approval_decline_v2() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -376,7 +376,7 @@ async fn turn_start_shell_zsh_fork_exec_approval_cancel_v2() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(workspace.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -547,7 +547,7 @@ async fn turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2()
model: Some("mock-model".to_string()),
effort: Some(codex_protocol::openai_models::ReasoningEffort::Medium),
summary: Some(codex_protocol::config_types::ReasoningSummary::Auto),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -121,7 +121,7 @@ async fn turn_steer_rejects_oversized_text_input() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(working_directory.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
@@ -225,7 +225,7 @@ async fn turn_steer_returns_active_turn_id() -> Result<()> {
text_elements: Vec::new(),
}],
cwd: Some(working_directory.clone()),
user_message_type: None,
submission_type: None,
..Default::default()
})
.await?;
+1 -7
View File
@@ -10,6 +10,7 @@ use codex_protocol::config_types::ServiceTier;
use codex_protocol::openai_models::ReasoningEffort;
use codex_protocol::protocol::SandboxPolicy;
use codex_protocol::protocol::SkillScope;
use codex_protocol::protocol::SubmissionType;
use serde::Serialize;
use sha1::Digest;
use sha1::Sha1;
@@ -38,13 +39,6 @@ pub(crate) struct CodexTurnEvent {
pub(crate) collaboration_mode: ModeKind,
}
#[derive(Clone, Copy, Debug, Serialize)]
#[serde(rename_all = "snake_case")]
pub(crate) enum SubmissionType {
Prompt,
PromptQueued,
}
#[derive(Clone, Copy, Debug, Serialize)]
#[serde(rename_all = "snake_case")]
pub(crate) enum TurnEventType {
+21 -23
View File
@@ -17,7 +17,6 @@ use crate::analytics_client::AppInvocation;
use crate::analytics_client::CodexTurnEvent;
use crate::analytics_client::CodexTurnSteerEvent;
use crate::analytics_client::InvocationType;
use crate::analytics_client::SubmissionType;
use crate::analytics_client::build_track_events_context;
use crate::apps::render_apps_section;
use crate::auth_env_telemetry::collect_auth_env_telemetry;
@@ -106,10 +105,10 @@ use codex_protocol::protocol::ReviewRequest;
use codex_protocol::protocol::RolloutItem;
use codex_protocol::protocol::SessionSource;
use codex_protocol::protocol::SubAgentSource;
use codex_protocol::protocol::SubmissionType;
use codex_protocol::protocol::TurnAbortReason;
use codex_protocol::protocol::TurnContextItem;
use codex_protocol::protocol::TurnContextNetworkItem;
use codex_protocol::protocol::UserMessageType as SubmittedUserMessageType;
use codex_protocol::protocol::W3cTraceContext;
use codex_protocol::request_permissions::PermissionGrantScope;
use codex_protocol::request_permissions::RequestPermissionProfile;
@@ -851,7 +850,7 @@ pub(crate) struct TurnContext {
pub(crate) user_instructions: Option<String>,
pub(crate) collaboration_mode: CollaborationMode,
pub(crate) personality: Option<Personality>,
pub(crate) user_message_type: Option<SubmittedUserMessageType>,
pub(crate) submission_type: Option<SubmissionType>,
pub(crate) approval_policy: Constrained<AskForApproval>,
pub(crate) sandbox_policy: Constrained<SandboxPolicy>,
pub(crate) file_system_sandbox_policy: FileSystemSandboxPolicy,
@@ -948,7 +947,7 @@ impl TurnContext {
provider: self.provider.clone(),
reasoning_effort,
reasoning_summary: self.reasoning_summary,
user_message_type: None,
submission_type: None,
session_source: self.session_source.clone(),
environment: Arc::clone(&self.environment),
cwd: self.cwd.clone(),
@@ -1190,7 +1189,7 @@ pub(crate) struct SessionSettingsUpdate {
pub(crate) final_output_json_schema: Option<Option<Value>>,
pub(crate) personality: Option<Personality>,
pub(crate) app_server_client_name: Option<String>,
pub(crate) user_message_type: Option<SubmittedUserMessageType>,
pub(crate) submission_type: Option<SubmissionType>,
}
impl Session {
@@ -1409,7 +1408,7 @@ impl Session {
user_instructions: session_configuration.user_instructions.clone(),
collaboration_mode: session_configuration.collaboration_mode.clone(),
personality: session_configuration.personality,
user_message_type: None,
submission_type: None,
approval_policy: session_configuration.approval_policy.clone(),
sandbox_policy: session_configuration.sandbox_policy.clone(),
file_system_sandbox_policy: session_configuration.file_system_sandbox_policy.clone(),
@@ -2401,7 +2400,7 @@ impl Session {
sub_id,
session_configuration,
updates.final_output_json_schema,
updates.user_message_type,
updates.submission_type,
sandbox_policy_changed,
)
.await)
@@ -2412,7 +2411,7 @@ impl Session {
sub_id: String,
session_configuration: SessionConfiguration,
final_output_json_schema: Option<Option<Value>>,
user_message_type: Option<SubmittedUserMessageType>,
submission_type: Option<SubmissionType>,
sandbox_policy_changed: bool,
) -> Arc<TurnContext> {
let per_turn_config = Self::build_per_turn_config(&session_configuration);
@@ -2480,7 +2479,7 @@ impl Session {
if let Some(final_schema) = final_output_json_schema {
turn_context.final_output_json_schema = final_schema;
}
turn_context.user_message_type = user_message_type;
turn_context.submission_type = submission_type;
let turn_context = Arc::new(turn_context);
turn_context.turn_metadata_state.spawn_git_enrichment_task();
turn_context
@@ -2585,7 +2584,7 @@ impl Session {
sub_id,
session_configuration,
/*final_output_json_schema*/ None,
/*user_message_type*/ None,
/*submission_type*/ None,
/*sandbox_policy_changed*/ false,
)
.await
@@ -4590,7 +4589,7 @@ mod handlers {
items,
collaboration_mode,
personality,
user_message_type,
submission_type,
} => {
let collaboration_mode = collaboration_mode.or_else(|| {
Some(CollaborationMode {
@@ -4616,7 +4615,7 @@ mod handlers {
final_output_json_schema: Some(final_output_json_schema),
personality,
app_server_client_name: None,
user_message_type,
submission_type,
},
)
}
@@ -4627,19 +4626,19 @@ mod handlers {
items,
SessionSettingsUpdate {
final_output_json_schema: Some(final_output_json_schema),
user_message_type: None,
submission_type: None,
..Default::default()
},
),
Op::UserInputWithMetadata {
items,
final_output_json_schema,
user_message_type,
submission_type,
} => (
items,
SessionSettingsUpdate {
final_output_json_schema: Some(final_output_json_schema),
user_message_type,
submission_type,
..Default::default()
},
),
@@ -5407,7 +5406,7 @@ async fn spawn_review_thread(
provider: provider_for_context,
reasoning_effort,
reasoning_summary,
user_message_type: None,
submission_type: None,
session_source,
environment: Arc::clone(&parent_turn_context.environment),
tools_config,
@@ -6020,16 +6019,15 @@ pub(crate) async fn run_turn(
}
if !input.is_empty() {
let user_message_type = turn_context
.user_message_type
.unwrap_or(SubmittedUserMessageType::Prompt);
let submission_type = turn_context
.submission_type
.unwrap_or(SubmissionType::Prompt);
sess.services.analytics_events_client.track_turn_event(
tracking,
CodexTurnEvent {
submission_type: match user_message_type {
SubmittedUserMessageType::Prompt => Some(SubmissionType::Prompt),
SubmittedUserMessageType::PromptQueued => Some(SubmissionType::PromptQueued),
SubmittedUserMessageType::PromptSteering => None,
submission_type: match submission_type {
SubmissionType::Prompt => Some(SubmissionType::Prompt),
SubmissionType::PromptQueued => Some(SubmissionType::PromptQueued),
},
sandbox_policy: turn_context.sandbox_policy.get().clone(),
reasoning_effort: turn_context.reasoning_effort,
+1 -1
View File
@@ -3037,7 +3037,7 @@ async fn user_turn_updates_approvals_reviewer() {
final_output_json_schema: None,
collaboration_mode: None,
personality: config.personality,
user_message_type: None,
submission_type: None,
},
)
.await;
+1 -1
View File
@@ -523,7 +523,7 @@ async fn run_review_on_session(
final_output_json_schema: Some(params.schema.clone()),
collaboration_mode: None,
personality: params.personality,
user_message_type: None,
submission_type: None,
})
.await
}),
+1 -1
View File
@@ -731,7 +731,7 @@ impl TestCodex {
service_tier,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+7 -7
View File
@@ -318,7 +318,7 @@ async fn apply_patch_cli_move_without_content_change_has_no_turn_diff(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -929,7 +929,7 @@ async fn apply_patch_shell_command_heredoc_with_cd_emits_turn_diff() -> Result<(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1012,7 +1012,7 @@ async fn apply_patch_shell_command_failure_propagates_error_and_skips_diff() ->
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1165,7 +1165,7 @@ async fn apply_patch_emits_turn_diff_event_with_unified_diff(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1231,7 +1231,7 @@ async fn apply_patch_turn_diff_for_rename_with_content_change(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1305,7 +1305,7 @@ async fn apply_patch_aggregates_diff_across_multiple_tool_calls() -> Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1379,7 +1379,7 @@ async fn apply_patch_aggregates_diff_preserves_success_after_failure() -> Result
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -566,7 +566,7 @@ async fn submit_turn(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+2 -2
View File
@@ -1323,7 +1323,7 @@ async fn user_turn_collaboration_mode_overrides_model_and_effort() -> anyhow::Re
collaboration_mode: Some(collaboration_mode),
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1438,7 +1438,7 @@ async fn user_turn_explicit_reasoning_summary_overrides_model_catalog_default()
collaboration_mode: None,
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.unwrap();
+1 -1
View File
@@ -2327,7 +2327,7 @@ text(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -191,7 +191,7 @@ async fn collaboration_instructions_added_on_user_turn() -> Result<()> {
collaboration_mode: Some(collaboration_mode),
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -308,7 +308,7 @@ async fn user_turn_overrides_collaboration_instructions_after_override() -> Resu
collaboration_mode: Some(turn_mode),
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
+7 -7
View File
@@ -1666,7 +1666,7 @@ async fn auto_compact_runs_after_resume_when_token_usage_is_over_limit() {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.unwrap();
@@ -1758,7 +1758,7 @@ async fn pre_sampling_compact_runs_on_switch_to_smaller_context_model() {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.expect("submit first user turn");
@@ -1784,7 +1784,7 @@ async fn pre_sampling_compact_runs_on_switch_to_smaller_context_model() {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.expect("submit second user turn");
@@ -1896,7 +1896,7 @@ async fn pre_sampling_compact_runs_after_resume_and_switch_to_smaller_model() {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.expect("submit pre-resume turn");
@@ -1946,7 +1946,7 @@ async fn pre_sampling_compact_runs_after_resume_and_switch_to_smaller_model() {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.expect("submit resumed user turn");
@@ -3150,7 +3150,7 @@ async fn snapshot_request_shape_pre_turn_compaction_strips_incoming_model_switch
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.expect("submit first user turn");
@@ -3176,7 +3176,7 @@ async fn snapshot_request_shape_pre_turn_compaction_strips_incoming_model_switch
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await
.expect("submit second user turn");
+2 -2
View File
@@ -59,7 +59,7 @@ async fn submit_user_turn(
service_tier: None,
collaboration_mode,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
Ok(())
@@ -141,7 +141,7 @@ async fn execpolicy_blocks_shell_invocation() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+2 -2
View File
@@ -130,7 +130,7 @@ async fn copy_paste_local_image_persists_rollout_request_shape() -> anyhow::Resu
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -215,7 +215,7 @@ async fn drag_drop_image_persists_rollout_request_shape() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+8 -8
View File
@@ -210,7 +210,7 @@ async fn user_turn_tracks_turn_event_analytics() -> anyhow::Result<()> {
},
}),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -309,7 +309,7 @@ async fn user_turn_tracks_turn_event_prompt_type_analytics() -> anyhow::Result<(
},
}),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -398,7 +398,7 @@ async fn user_turn_tracks_turn_steer_analytics() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -859,7 +859,7 @@ async fn plan_mode_emits_plan_item_from_proposed_plan_block() -> anyhow::Result<
service_tier: None,
collaboration_mode: Some(collaboration_mode),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -937,7 +937,7 @@ async fn plan_mode_strips_plan_from_agent_messages() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: Some(collaboration_mode),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1047,7 +1047,7 @@ async fn plan_mode_streaming_citations_are_stripped_across_added_deltas_and_done
service_tier: None,
collaboration_mode: Some(collaboration_mode),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1235,7 +1235,7 @@ async fn plan_mode_streaming_proposed_plan_tag_split_across_added_and_delta_is_p
service_tier: None,
collaboration_mode: Some(collaboration_mode),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1350,7 +1350,7 @@ async fn plan_mode_handles_missing_plan_close_tag() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: Some(collaboration_mode),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -88,7 +88,7 @@ async fn codex_returns_json_result(model: String) -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -69,7 +69,7 @@ async fn submit_skill_turn(test: &TestCodex, skill_path: PathBuf, prompt: &str)
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+14 -14
View File
@@ -134,7 +134,7 @@ async fn model_change_appends_model_instructions_developer_message() -> Result<(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -172,7 +172,7 @@ async fn model_change_appends_model_instructions_developer_message() -> Result<(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -233,7 +233,7 @@ async fn model_and_personality_change_only_appends_model_instructions() -> Resul
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -271,7 +271,7 @@ async fn model_and_personality_change_only_appends_model_instructions() -> Resul
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -414,7 +414,7 @@ async fn model_change_from_image_to_text_strips_prior_image_content() -> Result<
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -436,7 +436,7 @@ async fn model_change_from_image_to_text_strips_prior_image_content() -> Result<
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -545,7 +545,7 @@ async fn generated_image_is_replayed_for_image_capable_models() -> Result<()> {
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -567,7 +567,7 @@ async fn generated_image_is_replayed_for_image_capable_models() -> Result<()> {
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -679,7 +679,7 @@ async fn model_change_from_generated_image_to_text_preserves_prior_generated_ima
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -701,7 +701,7 @@ async fn model_change_from_generated_image_to_text_preserves_prior_generated_ima
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -815,7 +815,7 @@ async fn thread_rollback_after_generated_image_drops_entire_image_turn_history()
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -845,7 +845,7 @@ async fn thread_rollback_after_generated_image_drops_entire_image_turn_history()
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -1001,7 +1001,7 @@ async fn model_switch_to_smaller_model_updates_token_context_window() -> Result<
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1061,7 +1061,7 @@ async fn model_switch_to_smaller_model_updates_token_context_window() -> Result<
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -129,7 +129,7 @@ async fn snapshot_model_visible_layout_turn_overrides() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |event| {
@@ -154,7 +154,7 @@ async fn snapshot_model_visible_layout_turn_overrides() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: Some(Personality::Friendly),
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |event| {
@@ -234,7 +234,7 @@ async fn snapshot_model_visible_layout_cwd_change_does_not_refresh_agents() -> R
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |event| {
@@ -259,7 +259,7 @@ async fn snapshot_model_visible_layout_cwd_change_does_not_refresh_agents() -> R
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |event| {
@@ -370,7 +370,7 @@ async fn snapshot_model_visible_layout_resume_with_personality_change() -> Resul
service_tier: None,
collaboration_mode: None,
personality: Some(Personality::Friendly),
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&resumed.codex, |event| {
@@ -104,7 +104,7 @@ async fn renews_cache_ttl_on_matching_models_etag() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -110,7 +110,7 @@ async fn refresh_models_on_models_etag_mismatch_and_avoid_duplicate_models_fetch
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+13 -13
View File
@@ -111,7 +111,7 @@ async fn user_turn_personality_none_does_not_add_update_message() -> anyhow::Res
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -163,7 +163,7 @@ async fn config_personality_some_sets_instructions_template() -> anyhow::Result<
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -222,7 +222,7 @@ async fn config_personality_none_sends_no_personality() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -287,7 +287,7 @@ async fn default_personality_is_pragmatic_without_config_toml() -> anyhow::Resul
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -340,7 +340,7 @@ async fn user_turn_personality_some_adds_update_message() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -379,7 +379,7 @@ async fn user_turn_personality_some_adds_update_message() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -447,7 +447,7 @@ async fn user_turn_personality_same_value_does_not_add_update_message() -> anyho
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -486,7 +486,7 @@ async fn user_turn_personality_same_value_does_not_add_update_message() -> anyho
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -567,7 +567,7 @@ async fn user_turn_personality_skips_if_feature_disabled() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -606,7 +606,7 @@ async fn user_turn_personality_skips_if_feature_disabled() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -724,7 +724,7 @@ async fn remote_model_friendly_personality_instructions_with_feature() -> anyhow
service_tier: None,
collaboration_mode: None,
personality: Some(Personality::Friendly),
user_message_type: None,
submission_type: None,
})
.await?;
@@ -844,7 +844,7 @@ async fn user_turn_personality_remote_model_template_includes_update_message() -
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -883,7 +883,7 @@ async fn user_turn_personality_remote_model_template_includes_update_message() -
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+5 -5
View File
@@ -712,7 +712,7 @@ async fn per_turn_overrides_keep_cached_prefix_and_key_constant() -> anyhow::Res
collaboration_mode: None,
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -826,7 +826,7 @@ async fn send_user_turn_with_no_changes_does_not_send_environment_context() -> a
collaboration_mode: None,
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -848,7 +848,7 @@ async fn send_user_turn_with_no_changes_does_not_send_environment_context() -> a
collaboration_mode: None,
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -954,7 +954,7 @@ async fn send_user_turn_with_changes_sends_environment_context() -> anyhow::Resu
collaboration_mode: None,
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
@@ -976,7 +976,7 @@ async fn send_user_turn_with_changes_sends_environment_context() -> anyhow::Resu
collaboration_mode: None,
final_output_json_schema: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await;
+4 -4
View File
@@ -181,7 +181,7 @@ async fn remote_models_long_model_slug_is_sent_with_high_reasoning() -> Result<(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -245,7 +245,7 @@ async fn namespaced_model_slug_uses_catalog_metadata_without_fallback_warning()
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -406,7 +406,7 @@ async fn remote_models_remote_model_uses_unified_exec() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -626,7 +626,7 @@ async fn remote_models_apply_remote_base_instructions() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -201,7 +201,7 @@ async fn submit_turn(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
Ok(())
@@ -153,7 +153,7 @@ async fn submit_turn(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
Ok(())
@@ -153,7 +153,7 @@ async fn request_user_input_round_trip_for_mode(mode: ModeKind) -> anyhow::Resul
},
}),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -265,7 +265,7 @@ where
service_tier: None,
collaboration_mode: Some(collaboration_mode),
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+6 -6
View File
@@ -137,7 +137,7 @@ async fn stdio_server_round_trip() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -308,7 +308,7 @@ async fn stdio_image_responses_round_trip() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -513,7 +513,7 @@ async fn stdio_image_responses_are_sanitized_for_text_only_model() -> anyhow::Re
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -629,7 +629,7 @@ async fn stdio_server_propagates_whitelisted_env_vars() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -792,7 +792,7 @@ async fn streamable_http_tool_call_round_trip() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1040,7 +1040,7 @@ async fn streamable_http_with_oauth_round_trip_impl() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -53,7 +53,7 @@ async fn openai_model_header_mismatch_emits_warning_event_and_warning_item() ->
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -153,7 +153,7 @@ async fn response_model_field_mismatch_emits_warning_when_header_matches_request
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -240,7 +240,7 @@ async fn openai_model_header_mismatch_only_emits_one_warning_per_turn() -> Resul
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -291,7 +291,7 @@ async fn openai_model_header_casing_only_mismatch_does_not_warn() -> Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+4 -4
View File
@@ -172,7 +172,7 @@ async fn run_snapshot_command_with_options(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -264,7 +264,7 @@ async fn run_shell_command_snapshot_with_options(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -336,7 +336,7 @@ async fn run_tool_turn_on_harness(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -569,7 +569,7 @@ async fn shell_command_snapshot_still_intercepts_apply_patch() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -73,7 +73,7 @@ async fn submit_turn_with_policies(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
Ok(())
+1 -1
View File
@@ -82,7 +82,7 @@ async fn user_turn_includes_skill_instructions() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -403,7 +403,7 @@ async fn mcp_call_marks_thread_memory_mode_polluted_when_configured() -> Result<
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
wait_for_event(&test.codex, |event| {
+5 -5
View File
@@ -93,7 +93,7 @@ async fn shell_tool_executes_command_and_streams_output() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -165,7 +165,7 @@ async fn update_plan_tool_emits_plan_update_event() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -247,7 +247,7 @@ async fn update_plan_tool_rejects_malformed_payload() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -344,7 +344,7 @@ async fn apply_patch_tool_executes_and_emits_patch_events() -> anyhow::Result<()
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -449,7 +449,7 @@ async fn apply_patch_reports_parse_diagnostics() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -50,7 +50,7 @@ async fn run_turn(test: &TestCodex, prompt: &str) -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -368,7 +368,7 @@ async fn shell_tools_start_before_response_completed_when_stream_delayed() -> an
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -494,7 +494,7 @@ async fn mcp_image_output_preserves_image_and_no_text_summary() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+26 -26
View File
@@ -200,7 +200,7 @@ async fn unified_exec_intercepts_apply_patch_exec_command() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -335,7 +335,7 @@ async fn unified_exec_emits_exec_command_begin_event() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -419,7 +419,7 @@ async fn unified_exec_resolves_relative_workdir() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -506,7 +506,7 @@ async fn unified_exec_respects_workdir_override() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -605,7 +605,7 @@ async fn unified_exec_emits_exec_command_end_event() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -686,7 +686,7 @@ async fn unified_exec_emits_output_delta_for_exec_command() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -768,7 +768,7 @@ async fn unified_exec_full_lifecycle_with_background_end_event() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -904,7 +904,7 @@ async fn unified_exec_emits_terminal_interaction_for_write_stdin() -> Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1047,7 +1047,7 @@ async fn unified_exec_terminal_interaction_captures_delayed_output() -> Result<(
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1213,7 +1213,7 @@ async fn unified_exec_emits_one_begin_and_one_end_event() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1317,7 +1317,7 @@ async fn exec_command_reports_chunk_and_exit_metadata() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1441,7 +1441,7 @@ async fn unified_exec_defaults_to_pipe() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1537,7 +1537,7 @@ async fn unified_exec_can_enable_tty() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1624,7 +1624,7 @@ async fn unified_exec_respects_early_exit_notifications() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1761,7 +1761,7 @@ async fn write_stdin_returns_exit_metadata_and_clears_session() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1935,7 +1935,7 @@ async fn unified_exec_emits_end_event_when_session_dies_via_stdin() -> Result<()
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2018,7 +2018,7 @@ async fn unified_exec_keeps_long_running_session_after_turn_end() -> Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2112,7 +2112,7 @@ async fn unified_exec_interrupt_preserves_long_running_session() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2222,7 +2222,7 @@ async fn unified_exec_reuses_session_via_stdin() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2363,7 +2363,7 @@ PY
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
// This is a worst case scenario for the truncate logic.
@@ -2483,7 +2483,7 @@ async fn unified_exec_timeout_and_followup_poll() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2585,7 +2585,7 @@ PY
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2687,7 +2687,7 @@ async fn unified_exec_runs_under_sandbox() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2797,7 +2797,7 @@ async fn unified_exec_python_prompt_under_seatbelt() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -2898,7 +2898,7 @@ async fn unified_exec_runs_on_all_platforms() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -3039,7 +3039,7 @@ async fn unified_exec_prunes_exited_sessions_first() -> Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -184,7 +184,7 @@ async fn user_shell_command_does_not_replace_active_turn() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+14 -14
View File
@@ -178,7 +178,7 @@ async fn user_turn_with_local_image_attaches_image() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -288,7 +288,7 @@ async fn view_image_tool_attaches_local_image() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -430,7 +430,7 @@ async fn view_image_tool_can_preserve_original_resolution_when_requested_on_gpt5
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -530,7 +530,7 @@ async fn view_image_tool_errors_clearly_for_unsupported_detail_values() -> anyho
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -623,7 +623,7 @@ async fn view_image_tool_treats_null_detail_as_omitted() -> anyhow::Result<()> {
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -724,7 +724,7 @@ async fn view_image_tool_resizes_when_model_lacks_original_detail_support() -> a
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -836,7 +836,7 @@ async fn view_image_tool_does_not_force_original_resolution_with_capability_feat
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -939,7 +939,7 @@ await codex.emitImage(out);
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1060,7 +1060,7 @@ console.log(out.type);
summary: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1154,7 +1154,7 @@ async fn view_image_tool_errors_when_path_is_directory() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1231,7 +1231,7 @@ async fn view_image_tool_errors_for_non_image_files() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1313,7 +1313,7 @@ async fn view_image_tool_errors_when_file_missing() -> anyhow::Result<()> {
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1437,7 +1437,7 @@ async fn view_image_tool_returns_unsupported_message_for_text_only_model() -> an
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -1513,7 +1513,7 @@ async fn replaces_invalid_local_image_after_bad_request() -> anyhow::Result<()>
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
@@ -164,7 +164,7 @@ async fn websocket_fallback_hides_first_websocket_retry_stream_error() -> Result
service_tier: None,
collaboration_mode: None,
personality: None,
user_message_type: None,
submission_type: None,
})
.await?;
+1 -1
View File
@@ -199,7 +199,7 @@ impl AppServerClient {
// Debug client sends plain text with no UI markup spans.
text_elements: Vec::new(),
}],
user_message_type: None,
submission_type: None,
..Default::default()
},
};
+1 -1
View File
@@ -708,7 +708,7 @@ async fn run_exec_session(args: ExecRunArgs) -> anyhow::Result<()> {
summary: None,
personality: None,
output_schema,
user_message_type: None,
submission_type: None,
collaboration_mode: None,
},
},
+3 -4
View File
@@ -206,9 +206,8 @@ pub struct ConversationTextParams {
#[derive(Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
pub enum UserMessageType {
pub enum SubmissionType {
Prompt,
PromptSteering,
PromptQueued,
}
@@ -260,7 +259,7 @@ pub enum Op {
final_output_json_schema: Option<Value>,
/// Semantic classification of this submitted user input.
#[serde(default, skip_serializing_if = "Option::is_none")]
user_message_type: Option<UserMessageType>,
submission_type: Option<SubmissionType>,
},
/// Similar to [`Op::UserInput`], but contains additional context required
@@ -322,7 +321,7 @@ pub enum Op {
/// Semantic classification of this submitted user message when known by
/// the higher-level surface.
#[serde(default, skip_serializing_if = "Option::is_none")]
user_message_type: Option<UserMessageType>,
submission_type: Option<SubmissionType>,
},
/// Inter-agent communication that should be recorded as assistant history
+1 -1
View File
@@ -5269,7 +5269,7 @@ impl ChatWidget {
final_output_json_schema: None,
collaboration_mode,
personality,
user_message_type: None,
submission_type: None,
};
if !self.submit_op(op) {
+2 -2
View File
@@ -2019,7 +2019,7 @@ impl App {
final_output_json_schema,
collaboration_mode,
personality,
user_message_type,
submission_type,
} => {
if let Some(turn_id) = self.active_turn_id_for_thread(thread_id).await {
match app_server
@@ -2053,7 +2053,7 @@ impl App {
*service_tier,
collaboration_mode.clone(),
*personality,
*user_message_type,
*submission_type,
final_output_json_schema.clone(),
)
.await?;
+6 -6
View File
@@ -17,7 +17,7 @@ use codex_protocol::protocol::Op;
use codex_protocol::protocol::ReviewDecision;
use codex_protocol::protocol::ReviewRequest;
use codex_protocol::protocol::SandboxPolicy;
use codex_protocol::protocol::UserMessageType;
use codex_protocol::protocol::SubmissionType;
use codex_protocol::request_permissions::RequestPermissionsResponse;
use codex_protocol::request_user_input::RequestUserInputResponse;
use codex_protocol::user_input::UserInput;
@@ -52,7 +52,7 @@ pub(crate) enum AppCommandView<'a> {
final_output_json_schema: &'a Option<Value>,
collaboration_mode: &'a Option<CollaborationMode>,
personality: &'a Option<Personality>,
user_message_type: &'a Option<UserMessageType>,
submission_type: &'a Option<SubmissionType>,
},
OverrideTurnContext {
cwd: &'a Option<PathBuf>,
@@ -157,7 +157,7 @@ impl AppCommand {
final_output_json_schema: Option<Value>,
collaboration_mode: Option<CollaborationMode>,
personality: Option<Personality>,
user_message_type: Option<UserMessageType>,
submission_type: Option<SubmissionType>,
) -> Self {
Self(Op::UserTurn {
items,
@@ -172,7 +172,7 @@ impl AppCommand {
final_output_json_schema,
collaboration_mode,
personality,
user_message_type,
submission_type,
})
}
@@ -318,7 +318,7 @@ impl AppCommand {
final_output_json_schema,
collaboration_mode,
personality,
user_message_type,
submission_type,
} => AppCommandView::UserTurn {
items,
cwd,
@@ -332,7 +332,7 @@ impl AppCommand {
final_output_json_schema,
collaboration_mode,
personality,
user_message_type,
submission_type,
},
Op::OverrideTurnContext {
cwd,
@@ -75,7 +75,7 @@ use codex_protocol::protocol::ReviewRequest;
use codex_protocol::protocol::ReviewTarget as CoreReviewTarget;
use codex_protocol::protocol::SandboxPolicy;
use codex_protocol::protocol::SessionNetworkProxyRuntime;
use codex_protocol::protocol::UserMessageType;
use codex_protocol::protocol::SubmissionType;
use color_eyre::eyre::ContextCompat;
use color_eyre::eyre::Result;
use color_eyre::eyre::WrapErr;
@@ -380,7 +380,7 @@ impl AppServerSession {
service_tier: Option<Option<codex_protocol::config_types::ServiceTier>>,
collaboration_mode: Option<codex_protocol::config_types::CollaborationMode>,
personality: Option<codex_protocol::config_types::Personality>,
user_message_type: Option<UserMessageType>,
submission_type: Option<SubmissionType>,
output_schema: Option<serde_json::Value>,
) -> Result<TurnStartResponse> {
let request_id = self.next_request_id();
@@ -399,7 +399,7 @@ impl AppServerSession {
effort,
summary,
personality,
user_message_type,
submission_type,
output_schema,
collaboration_mode,
},
+7 -10
View File
@@ -2696,10 +2696,7 @@ impl ChatWidget {
.map(|pending| pending.user_message)
.collect();
if !pending_steers.is_empty() {
self.submit_user_message_with_type(
merge_user_messages(pending_steers),
Some(UserMessageType::PromptSteering),
);
self.submit_user_message_with_type(merge_user_messages(pending_steers), None);
} else if let Some(combined) = self.drain_pending_messages_for_restore() {
self.restore_user_message_to_composer(combined);
}
@@ -5209,7 +5206,7 @@ impl ChatWidget {
fn submit_user_message_with_type(
&mut self,
user_message: UserMessage,
user_message_type: Option<UserMessageType>,
submission_type: Option<SubmissionType>,
) {
if !self.is_session_configured() {
tracing::warn!("cannot submit user message before session is configured; queueing");
@@ -5426,7 +5423,7 @@ impl ChatWidget {
/*final_output_json_schema*/ None,
collaboration_mode,
personality,
user_message_type,
submission_type,
);
if !self.submit_op(op) {
@@ -6886,13 +6883,13 @@ impl ChatWidget {
if self.bottom_pane.is_task_running() {
return;
}
let user_message_type = if self.rejected_steers_queue.is_empty() {
UserMessageType::PromptQueued
let submission_type = if self.rejected_steers_queue.is_empty() {
Some(SubmissionType::PromptQueued)
} else {
UserMessageType::PromptSteering
None
};
if let Some(user_message) = self.pop_next_queued_user_message() {
self.submit_user_message_with_type(user_message, Some(user_message_type));
self.submit_user_message_with_type(user_message, submission_type);
}
// Update the list to reflect the remaining queued messages (if any).
self.refresh_pending_input_preview();