diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index 51f0f7acb0..12ee541290 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -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; @@ -3929,7 +3929,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, + pub submission_type: Option, /// Optional JSON Schema used to constrain the final assistant message for /// this turn. #[ts(optional = nullable)] @@ -8050,7 +8050,7 @@ mod tests { effort: None, summary: None, personality: None, - user_message_type: None, + submission_type: None, output_schema: None, collaboration_mode: None, }; diff --git a/codex-rs/app-server-test-client/src/lib.rs b/codex-rs/app-server-test-client/src/lib.rs index 53ba89a133..05e193d484 100644 --- a/codex-rs/app-server-test-client/src/lib.rs +++ b/codex-rs/app-server-test-client/src/lib.rs @@ -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:?}"); diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index 72fdb676cf..4b29f008b0 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -6115,7 +6115,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; diff --git a/codex-rs/app-server/src/message_processor/tracing_tests.rs b/codex-rs/app-server/src/message_processor/tracing_tests.rs index 98313e6521..0b4ae47b34 100644 --- a/codex-rs/app-server/src/message_processor/tracing_tests.rs +++ b/codex-rs/app-server/src/message_processor/tracing_tests.rs @@ -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, }, diff --git a/codex-rs/app-server/tests/suite/v2/account.rs b/codex-rs/app-server/tests/suite/v2/account.rs index acacb4df84..861093df86 100644 --- a/codex-rs/app-server/tests/suite/v2/account.rs +++ b/codex-rs/app-server/tests/suite/v2/account.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/compaction.rs b/codex-rs/app-server/tests/suite/v2/compaction.rs index 70c3a3e3c9..5639d2768c 100644 --- a/codex-rs/app-server/tests/suite/v2/compaction.rs +++ b/codex-rs/app-server/tests/suite/v2/compaction.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/connection_handling_websocket_unix.rs b/codex-rs/app-server/tests/suite/v2/connection_handling_websocket_unix.rs index 83c90f1492..65fb1bd5ef 100644 --- a/codex-rs/app-server/tests/suite/v2/connection_handling_websocket_unix.rs +++ b/codex-rs/app-server/tests/suite/v2/connection_handling_websocket_unix.rs @@ -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() })?), ) diff --git a/codex-rs/app-server/tests/suite/v2/dynamic_tools.rs b/codex-rs/app-server/tests/suite/v2/dynamic_tools.rs index 2ec81835fc..6c203c3be4 100644 --- a/codex-rs/app-server/tests/suite/v2/dynamic_tools.rs +++ b/codex-rs/app-server/tests/suite/v2/dynamic_tools.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/initialize.rs b/codex-rs/app-server/tests/suite/v2/initialize.rs index d22917391f..a15c9da558 100644 --- a/codex-rs/app-server/tests/suite/v2/initialize.rs +++ b/codex-rs/app-server/tests/suite/v2/initialize.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/mcp_server_elicitation.rs b/codex-rs/app-server/tests/suite/v2/mcp_server_elicitation.rs index 768962cb2f..6e0aff08a3 100644 --- a/codex-rs/app-server/tests/suite/v2/mcp_server_elicitation.rs +++ b/codex-rs/app-server/tests/suite/v2/mcp_server_elicitation.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/output_schema.rs b/codex-rs/app-server/tests/suite/v2/output_schema.rs index ea0924ebb5..7c3f305670 100644 --- a/codex-rs/app-server/tests/suite/v2/output_schema.rs +++ b/codex-rs/app-server/tests/suite/v2/output_schema.rs @@ -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() }) diff --git a/codex-rs/app-server/tests/suite/v2/plan_item.rs b/codex-rs/app-server/tests/suite/v2/plan_item.rs index b6bdf933b9..b538c5f087 100644 --- a/codex-rs/app-server/tests/suite/v2/plan_item.rs +++ b/codex-rs/app-server/tests/suite/v2/plan_item.rs @@ -156,7 +156,7 @@ async fn start_plan_mode_turn(mcp: &mut McpProcess) -> Result Result<()> { text_elements: Vec::new(), }], model: Some("mock-model".to_string()), - user_message_type: None, + submission_type: None, ..Default::default() }) .await?; diff --git a/codex-rs/app-server/tests/suite/v2/request_user_input.rs b/codex-rs/app-server/tests/suite/v2/request_user_input.rs index f1ffd70dc6..bc500b3217 100644 --- a/codex-rs/app-server/tests/suite/v2/request_user_input.rs +++ b/codex-rs/app-server/tests/suite/v2/request_user_input.rs @@ -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 { diff --git a/codex-rs/app-server/tests/suite/v2/review.rs b/codex-rs/app-server/tests/suite/v2/review.rs index a5d6275b3a..648454a1c7 100644 --- a/codex-rs/app-server/tests/suite/v2/review.rs +++ b/codex-rs/app-server/tests/suite/v2/review.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/safety_check_downgrade.rs b/codex-rs/app-server/tests/suite/v2/safety_check_downgrade.rs index e1fe6faf3d..cb85930454 100644 --- a/codex-rs/app-server/tests/suite/v2/safety_check_downgrade.rs +++ b/codex-rs/app-server/tests/suite/v2/safety_check_downgrade.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_archive.rs b/codex-rs/app-server/tests/suite/v2/thread_archive.rs index b9ef112d3f..ed30231a31 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_archive.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_archive.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_fork.rs b/codex-rs/app-server/tests/suite/v2/thread_fork.rs index ec251b40d1..0d6f16c5b4 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_fork.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_fork.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_list.rs b/codex-rs/app-server/tests/suite/v2/thread_list.rs index fff7397895..831ccda625 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_list.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_list.rs @@ -217,7 +217,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?; @@ -240,7 +240,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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_read.rs b/codex-rs/app-server/tests/suite/v2/thread_read.rs index ef69424e9e..7f6de5f39c 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_read.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_read.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_resume.rs b/codex-rs/app-server/tests/suite/v2/thread_resume.rs index f5667a54f8..04aba7c5e9 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_resume.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_resume.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_rollback.rs b/codex-rs/app-server/tests/suite/v2/thread_rollback.rs index 404469956f..a304db3ba8 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_rollback.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_rollback.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_shell_command.rs b/codex-rs/app-server/tests/suite/v2/thread_shell_command.rs index 102521bebf..7751815fa4 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_shell_command.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_shell_command.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_status.rs b/codex-rs/app-server/tests/suite/v2/thread_status.rs index 25a6bcf709..8b77266125 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_status.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_status.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_unarchive.rs b/codex-rs/app-server/tests/suite/v2/thread_unarchive.rs index f57ac86983..0e145d5c8b 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_unarchive.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_unarchive.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/thread_unsubscribe.rs b/codex-rs/app-server/tests/suite/v2/thread_unsubscribe.rs index 999fda76e4..bc95e0e954 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_unsubscribe.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_unsubscribe.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/turn_interrupt.rs b/codex-rs/app-server/tests/suite/v2/turn_interrupt.rs index a22b1882b0..20d263d0bf 100644 --- a/codex-rs/app-server/tests/suite/v2/turn_interrupt.rs +++ b/codex-rs/app-server/tests/suite/v2/turn_interrupt.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/turn_start.rs b/codex-rs/app-server/tests/suite/v2/turn_start.rs index 7623172808..94ce775d2c 100644 --- a/codex-rs/app-server/tests/suite/v2/turn_start.rs +++ b/codex-rs/app-server/tests/suite/v2/turn_start.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/turn_start_zsh_fork.rs b/codex-rs/app-server/tests/suite/v2/turn_start_zsh_fork.rs index db25549b25..38fe3439d9 100644 --- a/codex-rs/app-server/tests/suite/v2/turn_start_zsh_fork.rs +++ b/codex-rs/app-server/tests/suite/v2/turn_start_zsh_fork.rs @@ -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?; diff --git a/codex-rs/app-server/tests/suite/v2/turn_steer.rs b/codex-rs/app-server/tests/suite/v2/turn_steer.rs index 569e547de9..c0480b7b4d 100644 --- a/codex-rs/app-server/tests/suite/v2/turn_steer.rs +++ b/codex-rs/app-server/tests/suite/v2/turn_steer.rs @@ -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?; diff --git a/codex-rs/core/src/analytics_client.rs b/codex-rs/core/src/analytics_client.rs index 2495009f74..d2baf0bdbd 100644 --- a/codex-rs/core/src/analytics_client.rs +++ b/codex-rs/core/src/analytics_client.rs @@ -13,6 +13,7 @@ use codex_protocol::openai_models::ReasoningEffort; use codex_protocol::protocol::AskForApproval; use codex_protocol::protocol::SandboxPolicy; use codex_protocol::protocol::SkillScope; +use codex_protocol::protocol::SubmissionType; use serde::Serialize; use sha1::Digest; use sha1::Sha1; @@ -47,13 +48,6 @@ pub(crate) struct CodexTurnEvent { pub(crate) num_input_images: usize, } -#[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 { diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 4e29b5fb15..a8df661311 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -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, pub(crate) collaboration_mode: CollaborationMode, pub(crate) personality: Option, - pub(crate) user_message_type: Option, + pub(crate) submission_type: Option, pub(crate) approval_policy: Constrained, pub(crate) sandbox_policy: Constrained, 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>, pub(crate) personality: Option, pub(crate) app_server_client_name: Option, - pub(crate) user_message_type: Option, + pub(crate) submission_type: Option, } 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>, - user_message_type: Option, + submission_type: Option, sandbox_policy_changed: bool, ) -> Arc { 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), }, model_provider: turn_context.config.model_provider_id.clone(), sandbox_policy: turn_context.sandbox_policy.get().clone(), diff --git a/codex-rs/core/src/codex_tests.rs b/codex-rs/core/src/codex_tests.rs index 7e6aedc521..b5f04a411f 100644 --- a/codex-rs/core/src/codex_tests.rs +++ b/codex-rs/core/src/codex_tests.rs @@ -3067,7 +3067,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; diff --git a/codex-rs/core/src/guardian/review_session.rs b/codex-rs/core/src/guardian/review_session.rs index a04242050e..178736a929 100644 --- a/codex-rs/core/src/guardian/review_session.rs +++ b/codex-rs/core/src/guardian/review_session.rs @@ -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 }), diff --git a/codex-rs/core/tests/common/test_codex.rs b/codex-rs/core/tests/common/test_codex.rs index 5af047ddd2..46ff19eb6c 100644 --- a/codex-rs/core/tests/common/test_codex.rs +++ b/codex-rs/core/tests/common/test_codex.rs @@ -731,7 +731,7 @@ impl TestCodex { service_tier, collaboration_mode: None, personality: None, - user_message_type: None, + submission_type: None, }) .await?; diff --git a/codex-rs/core/tests/suite/apply_patch_cli.rs b/codex-rs/core/tests/suite/apply_patch_cli.rs index ce54a36921..84a48f8e58 100644 --- a/codex-rs/core/tests/suite/apply_patch_cli.rs +++ b/codex-rs/core/tests/suite/apply_patch_cli.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/approvals.rs b/codex-rs/core/tests/suite/approvals.rs index 45aca4e673..20bfce0a74 100644 --- a/codex-rs/core/tests/suite/approvals.rs +++ b/codex-rs/core/tests/suite/approvals.rs @@ -566,7 +566,7 @@ async fn submit_turn( service_tier: None, collaboration_mode: None, personality: None, - user_message_type: None, + submission_type: None, }) .await?; diff --git a/codex-rs/core/tests/suite/client.rs b/codex-rs/core/tests/suite/client.rs index 1616fc10e2..4726851558 100644 --- a/codex-rs/core/tests/suite/client.rs +++ b/codex-rs/core/tests/suite/client.rs @@ -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(); diff --git a/codex-rs/core/tests/suite/code_mode.rs b/codex-rs/core/tests/suite/code_mode.rs index 2823afb997..bfce8bb112 100644 --- a/codex-rs/core/tests/suite/code_mode.rs +++ b/codex-rs/core/tests/suite/code_mode.rs @@ -2327,7 +2327,7 @@ text( service_tier: None, collaboration_mode: None, personality: None, - user_message_type: None, + submission_type: None, }) .await?; diff --git a/codex-rs/core/tests/suite/collaboration_instructions.rs b/codex-rs/core/tests/suite/collaboration_instructions.rs index 339213c2ed..bcce86da31 100644 --- a/codex-rs/core/tests/suite/collaboration_instructions.rs +++ b/codex-rs/core/tests/suite/collaboration_instructions.rs @@ -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; diff --git a/codex-rs/core/tests/suite/compact.rs b/codex-rs/core/tests/suite/compact.rs index 763b67a987..4f5cd53405 100644 --- a/codex-rs/core/tests/suite/compact.rs +++ b/codex-rs/core/tests/suite/compact.rs @@ -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"); diff --git a/codex-rs/core/tests/suite/exec_policy.rs b/codex-rs/core/tests/suite/exec_policy.rs index bae7255d79..6de4141e6c 100644 --- a/codex-rs/core/tests/suite/exec_policy.rs +++ b/codex-rs/core/tests/suite/exec_policy.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/image_rollout.rs b/codex-rs/core/tests/suite/image_rollout.rs index 0020b9e329..948dff12fe 100644 --- a/codex-rs/core/tests/suite/image_rollout.rs +++ b/codex-rs/core/tests/suite/image_rollout.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/items.rs b/codex-rs/core/tests/suite/items.rs index ae4c634cb0..80e0aa5800 100644 --- a/codex-rs/core/tests/suite/items.rs +++ b/codex-rs/core/tests/suite/items.rs @@ -210,7 +210,7 @@ async fn user_turn_tracks_turn_event_analytics() -> anyhow::Result<()> { }, }), personality: None, - user_message_type: None, + submission_type: None, }) .await?; @@ -321,7 +321,7 @@ async fn user_turn_tracks_turn_event_prompt_type_analytics() -> anyhow::Result<( }, }), personality: None, - user_message_type: None, + submission_type: None, }) .await?; @@ -410,7 +410,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?; @@ -871,7 +871,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?; @@ -949,7 +949,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?; @@ -1059,7 +1059,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?; @@ -1247,7 +1247,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?; @@ -1362,7 +1362,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?; diff --git a/codex-rs/core/tests/suite/json_result.rs b/codex-rs/core/tests/suite/json_result.rs index c3efc4bf6f..027e34edbd 100644 --- a/codex-rs/core/tests/suite/json_result.rs +++ b/codex-rs/core/tests/suite/json_result.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/live_reload.rs b/codex-rs/core/tests/suite/live_reload.rs index 135e292184..647d840c2e 100644 --- a/codex-rs/core/tests/suite/live_reload.rs +++ b/codex-rs/core/tests/suite/live_reload.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/model_switching.rs b/codex-rs/core/tests/suite/model_switching.rs index b948231a2e..38a73922c8 100644 --- a/codex-rs/core/tests/suite/model_switching.rs +++ b/codex-rs/core/tests/suite/model_switching.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/model_visible_layout.rs b/codex-rs/core/tests/suite/model_visible_layout.rs index 3794c36db7..2d93f38dab 100644 --- a/codex-rs/core/tests/suite/model_visible_layout.rs +++ b/codex-rs/core/tests/suite/model_visible_layout.rs @@ -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| { diff --git a/codex-rs/core/tests/suite/models_cache_ttl.rs b/codex-rs/core/tests/suite/models_cache_ttl.rs index e85da8e65d..65b467f48a 100644 --- a/codex-rs/core/tests/suite/models_cache_ttl.rs +++ b/codex-rs/core/tests/suite/models_cache_ttl.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/models_etag_responses.rs b/codex-rs/core/tests/suite/models_etag_responses.rs index 2af4ccec2b..ec3d0077fd 100644 --- a/codex-rs/core/tests/suite/models_etag_responses.rs +++ b/codex-rs/core/tests/suite/models_etag_responses.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/personality.rs b/codex-rs/core/tests/suite/personality.rs index d1af8db9c1..3fdd94e450 100644 --- a/codex-rs/core/tests/suite/personality.rs +++ b/codex-rs/core/tests/suite/personality.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/prompt_caching.rs b/codex-rs/core/tests/suite/prompt_caching.rs index 9a83f437b0..576c17af0b 100644 --- a/codex-rs/core/tests/suite/prompt_caching.rs +++ b/codex-rs/core/tests/suite/prompt_caching.rs @@ -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; diff --git a/codex-rs/core/tests/suite/remote_models.rs b/codex-rs/core/tests/suite/remote_models.rs index 8a2611a6da..7d284e4833 100644 --- a/codex-rs/core/tests/suite/remote_models.rs +++ b/codex-rs/core/tests/suite/remote_models.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/request_permissions.rs b/codex-rs/core/tests/suite/request_permissions.rs index 395ef0d952..7ef963b9e2 100644 --- a/codex-rs/core/tests/suite/request_permissions.rs +++ b/codex-rs/core/tests/suite/request_permissions.rs @@ -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(()) diff --git a/codex-rs/core/tests/suite/request_permissions_tool.rs b/codex-rs/core/tests/suite/request_permissions_tool.rs index 545bdabf5b..d44f47d931 100644 --- a/codex-rs/core/tests/suite/request_permissions_tool.rs +++ b/codex-rs/core/tests/suite/request_permissions_tool.rs @@ -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(()) diff --git a/codex-rs/core/tests/suite/request_user_input.rs b/codex-rs/core/tests/suite/request_user_input.rs index 59f59500bd..952c696653 100644 --- a/codex-rs/core/tests/suite/request_user_input.rs +++ b/codex-rs/core/tests/suite/request_user_input.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/rmcp_client.rs b/codex-rs/core/tests/suite/rmcp_client.rs index d85b00bb88..92d5ffef8d 100644 --- a/codex-rs/core/tests/suite/rmcp_client.rs +++ b/codex-rs/core/tests/suite/rmcp_client.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/safety_check_downgrade.rs b/codex-rs/core/tests/suite/safety_check_downgrade.rs index 65fcc5b9e0..ef8c086275 100644 --- a/codex-rs/core/tests/suite/safety_check_downgrade.rs +++ b/codex-rs/core/tests/suite/safety_check_downgrade.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/shell_snapshot.rs b/codex-rs/core/tests/suite/shell_snapshot.rs index 71b7497d61..960ebdb945 100644 --- a/codex-rs/core/tests/suite/shell_snapshot.rs +++ b/codex-rs/core/tests/suite/shell_snapshot.rs @@ -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?; @@ -571,7 +571,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?; diff --git a/codex-rs/core/tests/suite/skill_approval.rs b/codex-rs/core/tests/suite/skill_approval.rs index e34ee0d23c..21bdf0224c 100644 --- a/codex-rs/core/tests/suite/skill_approval.rs +++ b/codex-rs/core/tests/suite/skill_approval.rs @@ -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(()) diff --git a/codex-rs/core/tests/suite/skills.rs b/codex-rs/core/tests/suite/skills.rs index 070ef0f40d..690de66893 100644 --- a/codex-rs/core/tests/suite/skills.rs +++ b/codex-rs/core/tests/suite/skills.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/sqlite_state.rs b/codex-rs/core/tests/suite/sqlite_state.rs index 29350c938f..8e6b3346bd 100644 --- a/codex-rs/core/tests/suite/sqlite_state.rs +++ b/codex-rs/core/tests/suite/sqlite_state.rs @@ -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| { diff --git a/codex-rs/core/tests/suite/tool_harness.rs b/codex-rs/core/tests/suite/tool_harness.rs index 978671d304..296b5c4c09 100644 --- a/codex-rs/core/tests/suite/tool_harness.rs +++ b/codex-rs/core/tests/suite/tool_harness.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/tool_parallelism.rs b/codex-rs/core/tests/suite/tool_parallelism.rs index 37e2a1ca83..16b0a2edd7 100644 --- a/codex-rs/core/tests/suite/tool_parallelism.rs +++ b/codex-rs/core/tests/suite/tool_parallelism.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/truncation.rs b/codex-rs/core/tests/suite/truncation.rs index 3b47a952df..e610f246a1 100644 --- a/codex-rs/core/tests/suite/truncation.rs +++ b/codex-rs/core/tests/suite/truncation.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/unified_exec.rs b/codex-rs/core/tests/suite/unified_exec.rs index 52b282ad8c..0f81032bd0 100644 --- a/codex-rs/core/tests/suite/unified_exec.rs +++ b/codex-rs/core/tests/suite/unified_exec.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/user_shell_cmd.rs b/codex-rs/core/tests/suite/user_shell_cmd.rs index 52f7314b30..07f63ab5d0 100644 --- a/codex-rs/core/tests/suite/user_shell_cmd.rs +++ b/codex-rs/core/tests/suite/user_shell_cmd.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/view_image.rs b/codex-rs/core/tests/suite/view_image.rs index 906cb33b75..657ec4829b 100644 --- a/codex-rs/core/tests/suite/view_image.rs +++ b/codex-rs/core/tests/suite/view_image.rs @@ -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?; diff --git a/codex-rs/core/tests/suite/websocket_fallback.rs b/codex-rs/core/tests/suite/websocket_fallback.rs index e9ec81f984..79f00a3961 100644 --- a/codex-rs/core/tests/suite/websocket_fallback.rs +++ b/codex-rs/core/tests/suite/websocket_fallback.rs @@ -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?; diff --git a/codex-rs/debug-client/src/client.rs b/codex-rs/debug-client/src/client.rs index 073ec407f3..11029e0f23 100644 --- a/codex-rs/debug-client/src/client.rs +++ b/codex-rs/debug-client/src/client.rs @@ -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() }, }; diff --git a/codex-rs/exec/src/lib.rs b/codex-rs/exec/src/lib.rs index 86e707ab07..f0c33e7edb 100644 --- a/codex-rs/exec/src/lib.rs +++ b/codex-rs/exec/src/lib.rs @@ -674,7 +674,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, }, }, diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rs index a0ede9804f..a2fe6edb75 100644 --- a/codex-rs/protocol/src/protocol.rs +++ b/codex-rs/protocol/src/protocol.rs @@ -207,9 +207,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, } @@ -261,7 +260,7 @@ pub enum Op { final_output_json_schema: Option, /// Semantic classification of this submitted user input. #[serde(default, skip_serializing_if = "Option::is_none")] - user_message_type: Option, + submission_type: Option, }, /// Similar to [`Op::UserInput`], but contains additional context required @@ -323,7 +322,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, + submission_type: Option, }, /// Inter-agent communication that should be recorded as assistant history diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index ae33b1d95b..70a869a305 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -5279,7 +5279,7 @@ impl ChatWidget { final_output_json_schema: None, collaboration_mode, personality, - user_message_type: None, + submission_type: None, }; if !self.submit_op(op) { diff --git a/codex-rs/tui_app_server/src/app.rs b/codex-rs/tui_app_server/src/app.rs index ded6b151f5..b50683e959 100644 --- a/codex-rs/tui_app_server/src/app.rs +++ b/codex-rs/tui_app_server/src/app.rs @@ -2020,7 +2020,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 @@ -2054,7 +2054,7 @@ impl App { *service_tier, collaboration_mode.clone(), *personality, - *user_message_type, + *submission_type, final_output_json_schema.clone(), ) .await?; diff --git a/codex-rs/tui_app_server/src/app_command.rs b/codex-rs/tui_app_server/src/app_command.rs index 658c8f5a73..b6e957d114 100644 --- a/codex-rs/tui_app_server/src/app_command.rs +++ b/codex-rs/tui_app_server/src/app_command.rs @@ -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, collaboration_mode: &'a Option, personality: &'a Option, - user_message_type: &'a Option, + submission_type: &'a Option, }, OverrideTurnContext { cwd: &'a Option, @@ -157,7 +157,7 @@ impl AppCommand { final_output_json_schema: Option, collaboration_mode: Option, personality: Option, - user_message_type: Option, + submission_type: Option, ) -> 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, diff --git a/codex-rs/tui_app_server/src/app_server_session.rs b/codex-rs/tui_app_server/src/app_server_session.rs index e70ae275a5..33d91bc91a 100644 --- a/codex-rs/tui_app_server/src/app_server_session.rs +++ b/codex-rs/tui_app_server/src/app_server_session.rs @@ -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; @@ -390,7 +390,7 @@ impl AppServerSession { service_tier: Option>, collaboration_mode: Option, personality: Option, - user_message_type: Option, + submission_type: Option, output_schema: Option, ) -> Result { let request_id = self.next_request_id(); @@ -409,7 +409,7 @@ impl AppServerSession { effort, summary, personality, - user_message_type, + submission_type, output_schema, collaboration_mode, }, diff --git a/codex-rs/tui_app_server/src/chatwidget.rs b/codex-rs/tui_app_server/src/chatwidget.rs index 9907ac4e01..37277f4011 100644 --- a/codex-rs/tui_app_server/src/chatwidget.rs +++ b/codex-rs/tui_app_server/src/chatwidget.rs @@ -2706,10 +2706,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); } @@ -5219,7 +5216,7 @@ impl ChatWidget { fn submit_user_message_with_type( &mut self, user_message: UserMessage, - user_message_type: Option, + submission_type: Option, ) { if !self.is_session_configured() { tracing::warn!("cannot submit user message before session is configured; queueing"); @@ -5436,7 +5433,7 @@ impl ChatWidget { /*final_output_json_schema*/ None, collaboration_mode, personality, - user_message_type, + submission_type, ); if !self.submit_op(op) { @@ -6896,13 +6893,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();