@@ -92,12 +92,7 @@ def test_detect_skill_activations_returns_unique_ordered_skills(self):
9292 'beta' : _make_skill_data (name = 'beta' ),
9393 }
9494
95- response = (
96- '[ACTIVATE_SKILL: alpha]\n '
97- '[ACTIVATE_SKILL: beta]\n '
98- '[ACTIVATE_SKILL: alpha]\n '
99- 'Let me handle this.'
100- )
95+ response = '[ACTIVATE_SKILL: alpha]\n [ACTIVATE_SKILL: beta]\n [ACTIVATE_SKILL: alpha]\n Let me handle this.'
10196
10297 assert mgr .detect_skill_activations (response ) == ['alpha' , 'beta' ]
10398 assert mgr .detect_skill_activation (response ) == 'alpha'
@@ -240,7 +235,9 @@ async def test_create_skill_creates_managed_prompt_only_skill(self):
240235
241236 ap = _make_ap ()
242237 ap .skill_service = SimpleNamespace (
243- create_skill = AsyncMock (return_value = _make_skill_data (name = 'prompt-skill' , package_root = '/data/skills/prompt-skill' )),
238+ create_skill = AsyncMock (
239+ return_value = _make_skill_data (name = 'prompt-skill' , package_root = '/data/skills/prompt-skill' )
240+ ),
244241 reload_skills = AsyncMock (),
245242 list_skills = AsyncMock (return_value = []),
246243 )
@@ -329,7 +326,9 @@ async def test_update_skill_updates_managed_prompt_only_skill(self):
329326 ap = _make_ap ()
330327 ap .skill_service = SimpleNamespace (
331328 create_skill = AsyncMock (),
332- update_skill = AsyncMock (return_value = _make_skill_data (name = 'time-now' , package_root = '/data/skills/time-now' )),
329+ update_skill = AsyncMock (
330+ return_value = _make_skill_data (name = 'time-now' , package_root = '/data/skills/time-now' )
331+ ),
333332 reload_skills = AsyncMock (),
334333 list_skills = AsyncMock (return_value = []),
335334 )
@@ -523,12 +522,18 @@ async def test_exec_in_activated_skill_mount_rewrites_command_and_refreshes(self
523522 ap .box_service = SimpleNamespace (
524523 available = True ,
525524 default_host_workspace = tmpdir ,
526- execute_spec_payload = AsyncMock (return_value = {'ok' : True }),
525+ execute_tool = AsyncMock (return_value = {'ok' : True }),
527526 )
528527 ap .skill_mgr = SimpleNamespace (refresh_skill_from_disk = Mock ())
529528 loader = NativeToolLoader (ap )
530529
531- query = SimpleNamespace (query_id = 'q1' , launcher_type = 'person' , launcher_id = '123' , variables = {})
530+ query = SimpleNamespace (
531+ query_id = 'q1' ,
532+ launcher_type = 'person' ,
533+ launcher_id = '123' ,
534+ variables = {},
535+ pipeline_config = None ,
536+ )
532537 register_activated_skill (query , _make_skill_data (name = 'demo' , package_root = tmpdir ))
533538
534539 result = await loader .invoke_tool (
@@ -541,11 +546,10 @@ async def test_exec_in_activated_skill_mount_rewrites_command_and_refreshes(self
541546 )
542547
543548 assert result == {'ok' : True }
544- spec_payload = ap .box_service .execute_spec_payload .await_args .args [0 ]
545- assert spec_payload ['cmd' ] == 'python /workspace/scripts/run.py'
546- assert spec_payload ['workdir' ] == '/workspace'
547- assert spec_payload ['host_path' ] == tmpdir
548- assert spec_payload ['session_id' ] == 'skill-person_123-demo'
549+ call_params = ap .box_service .execute_tool .await_args .args [0 ]
550+ # The command is passed through to execute_tool (no rewriting in the unified model)
551+ assert 'python' in call_params ['command' ]
552+ assert '/workspace/.skills/demo' in call_params ['command' ]
549553 ap .skill_mgr .refresh_skill_from_disk .assert_called_once_with ('demo' )
550554
551555 @pytest .mark .asyncio
0 commit comments