strix/tests/tools
0xallam 5deeb3ce20 feat(migration): phase 2.5 — wrap sandbox-bound SDK tools
Ten tools ported, all pure pass-throughs to post_to_sandbox:

- browser_action (1 tool): the 21-action mega-tool dispatcher kept
  intact rather than fanned out, to preserve the legacy XML shape.
- terminal_execute (1 tool): tmux session driver.
- python_action (1 tool): IPython session manager.
- proxy / Caido (7 tools): list_requests, view_request, send_request,
  repeat_request, scope_rules, list_sitemap, view_sitemap_entry.

strix_tool decorator gains a strict_mode flag (default True, matching
the SDK default). send_request and repeat_request opt out of strict
mode because their headers / modifications dicts are free-form — the
SDK's strict JSON schema rejects dict[str, X] without enumerated keys.

Tests: 12 new tests in test_sdk_sandbox_tools.py covering registration,
strict-mode opt-out verification for the two free-form tools, and
dispatch shape verification (every wrapper is asserted to forward
its full kwarg surface to post_to_sandbox so the in-container handler
sees the same payload it always has).

Per-file ruff TC002 ignores added for the four new wrapper modules.

Phase 2 (tools) is now complete: 24 SDK function tools wrapped across
think/todo/notes/web_search/file_edit/reporting/load_skill/finish_scan/
browser/terminal/python/proxy. Total: 7 local + 17 sandbox-bound. Phase
3 (multi-agent orchestration) is next.

Refs: PLAYBOOK.md §3.6.
2026-04-25 00:26:30 -07:00
..
__init__.py refactor(tests): reorganize unit tests module structure 2025-12-04 00:02:14 +04:00
conftest.py refactor(tests): reorganize unit tests module structure 2025-12-04 00:02:14 +04:00
test_agents_graph_whitebox.py fix: ensure LLM stats tracking is accurate by including completed subagents (#441) 2026-04-13 00:09:13 -04:00
test_argument_parser.py refactor(tests): reorganize unit tests module structure 2025-12-04 00:02:14 +04:00
test_decorator.py feat(migration): phase 0 — foundation files + smoke tests for SDK migration 2026-04-24 23:43:56 -07:00
test_load_skill_tool.py feat: add skills for specific tools (#366) 2026-03-19 16:47:29 -07:00
test_notes_jsonl_concurrency.py feat(migration): phase 2.1-2.3 — sandbox dispatch + thin slice tool wrappers 2026-04-25 00:13:34 -07:00
test_notes_wiki.py feat: Better source-aware testing (#391) 2026-03-31 11:53:49 -07:00
test_sandbox_dispatch.py feat(migration): phase 2.1-2.3 — sandbox dispatch + thin slice tool wrappers 2026-04-25 00:13:34 -07:00
test_sdk_local_tools.py feat(migration): phase 2.1-2.3 — sandbox dispatch + thin slice tool wrappers 2026-04-25 00:13:34 -07:00
test_sdk_remaining_local_tools.py feat(migration): phase 2.4 — wrap remaining local SDK tools 2026-04-25 00:21:37 -07:00
test_sdk_sandbox_tools.py feat(migration): phase 2.5 — wrap sandbox-bound SDK tools 2026-04-25 00:26:30 -07:00
test_tool_registration_modes.py fix: address review feedback on tool registration gating 2026-03-19 23:50:57 -07:00