@@ -12,11 +12,11 @@ use codex_protocol::dynamic_tools::DynamicToolCallOutputContentItem;
1212use codex_protocol:: dynamic_tools:: DynamicToolResponse ;
1313use codex_protocol:: dynamic_tools:: DynamicToolSpec ;
1414use codex_protocol:: models:: FunctionCallOutputPayload ;
15+ use codex_protocol:: models:: PermissionProfile ;
1516use codex_protocol:: protocol:: AskForApproval ;
1617use codex_protocol:: protocol:: EventMsg ;
1718use codex_protocol:: protocol:: McpInvocation ;
1819use codex_protocol:: protocol:: Op ;
19- use codex_protocol:: protocol:: SandboxPolicy ;
2020use codex_protocol:: user_input:: UserInput ;
2121use core_test_support:: apps_test_server:: AppsTestServer ;
2222use core_test_support:: apps_test_server:: CALENDAR_CREATE_EVENT_MCP_APP_RESOURCE_URI ;
@@ -157,10 +157,10 @@ async fn search_tool_enabled_by_default_adds_tool_search() -> Result<()> {
157157 let mut builder = configured_builder ( apps_server. chatgpt_base_url . clone ( ) ) ;
158158 let test = builder. build ( & server) . await ?;
159159
160- test. submit_turn_with_policies (
160+ test. submit_turn_with_approval_and_permission_profile (
161161 "list tools" ,
162162 AskForApproval :: Never ,
163- SandboxPolicy :: DangerFullAccess ,
163+ PermissionProfile :: Disabled ,
164164 )
165165 . await ?;
166166
@@ -221,10 +221,10 @@ async fn always_defer_feature_hides_small_app_tool_sets() -> Result<()> {
221221 } ) ;
222222 let test = builder. build ( & server) . await ?;
223223
224- test. submit_turn_with_policies (
224+ test. submit_turn_with_approval_and_permission_profile (
225225 "list tools" ,
226226 AskForApproval :: Never ,
227- SandboxPolicy :: DangerFullAccess ,
227+ PermissionProfile :: Disabled ,
228228 )
229229 . await ?;
230230
@@ -265,10 +265,10 @@ async fn tool_search_disabled_exposes_apps_tools_directly() -> Result<()> {
265265 } ) ;
266266 let test = builder. build ( & server) . await ?;
267267
268- test. submit_turn_with_policies (
268+ test. submit_turn_with_approval_and_permission_profile (
269269 "list tools" ,
270270 AskForApproval :: Never ,
271- SandboxPolicy :: DangerFullAccess ,
271+ PermissionProfile :: Disabled ,
272272 )
273273 . await ?;
274274
@@ -311,10 +311,10 @@ async fn search_tool_is_hidden_for_api_key_auth() -> Result<()> {
311311 . with_config ( move |config| configure_apps ( config, apps_server. chatgpt_base_url . as_str ( ) ) ) ;
312312 let test = builder. build ( & server) . await ?;
313313
314- test. submit_turn_with_policies (
314+ test. submit_turn_with_approval_and_permission_profile (
315315 "list tools" ,
316316 AskForApproval :: Never ,
317- SandboxPolicy :: DangerFullAccess ,
317+ PermissionProfile :: Disabled ,
318318 )
319319 . await ?;
320320
@@ -347,10 +347,10 @@ async fn search_tool_adds_discovery_instructions_to_tool_description() -> Result
347347 let mut builder = configured_builder ( apps_server. chatgpt_base_url . clone ( ) ) ;
348348 let test = builder. build ( & server) . await ?;
349349
350- test. submit_turn_with_policies (
350+ test. submit_turn_with_approval_and_permission_profile (
351351 "list tools" ,
352352 AskForApproval :: Never ,
353- SandboxPolicy :: DangerFullAccess ,
353+ PermissionProfile :: Disabled ,
354354 )
355355 . await ?;
356356
@@ -389,10 +389,10 @@ async fn search_tool_hides_apps_tools_without_search() -> Result<()> {
389389 let mut builder = configured_builder ( apps_server. chatgpt_base_url . clone ( ) ) ;
390390 let test = builder. build ( & server) . await ?;
391391
392- test. submit_turn_with_policies (
392+ test. submit_turn_with_approval_and_permission_profile (
393393 "hello tools" ,
394394 AskForApproval :: Never ,
395- SandboxPolicy :: DangerFullAccess ,
395+ PermissionProfile :: Disabled ,
396396 )
397397 . await ?;
398398
@@ -425,10 +425,10 @@ async fn explicit_app_mentions_expose_apps_tools_without_search() -> Result<()>
425425 let mut builder = configured_builder ( apps_server. chatgpt_base_url . clone ( ) ) ;
426426 let test = builder. build ( & server) . await ?;
427427
428- test. submit_turn_with_policies (
428+ test. submit_turn_with_approval_and_permission_profile (
429429 "Use [$calendar](app://calendar) and then call tools." ,
430430 AskForApproval :: Never ,
431- SandboxPolicy :: DangerFullAccess ,
431+ PermissionProfile :: Disabled ,
432432 )
433433 . await ?;
434434
@@ -957,10 +957,10 @@ async fn tool_search_indexes_only_enabled_non_app_mcp_tools() -> Result<()> {
957957 } ) ;
958958 let test = builder. build ( & server) . await ?;
959959
960- test. submit_turn_with_policies (
960+ test. submit_turn_with_approval_and_permission_profile (
961961 "Find the rmcp echo and image tools." ,
962962 AskForApproval :: Never ,
963- SandboxPolicy :: DangerFullAccess ,
963+ PermissionProfile :: Disabled ,
964964 )
965965 . await ?;
966966
0 commit comments