strix/tests
seanturner83 ce391d76bc
feat(tools): batch_view_files / batch_terminal_execute — sandbox-side concurrency
make_model_settings sets parallel_tool_calls=False (one tool call per turn), so
an agent mapping a codebase pays a full model round-trip per file read / command.
These two function tools let it fan out in a SINGLE call: the reads/execs run
concurrently inside the sandbox (asyncio.gather, semaphore-bounded to 8) and the
combined results come back in one tool response — a real wall-clock win on the
recon-heavy phase of a scan.

- batch_view_files(paths): concurrent read of up to 50 files; per-file result
  {path, content|error, truncated}, order preserved (results[i] ↔ paths[i]).
- batch_terminal_execute(commands): concurrent run of up to 50 INDEPENDENT shell
  commands; per-command {command, exit_code, stdout, stderr}.

Both are session-injected at the core (_view_files_impl / _exec_impl) with a thin
@function_tool shell, so the concurrency + isolation logic is directly testable
without the SDK tool-call layer. Per-item error isolation: one failing read/exec
returns its own error entry, never aborts the batch. Concurrency is bounded so a
large batch can't swamp the sandbox; batch size capped at 50.

Registered in _BASE_TOOLS so root + child agents get them. Session accessed via
the same ctx.context["sandbox_session"] convention the existing tools use. Tools
self-describe; no prompt change — models reach for them unprompted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 21:59:24 +01:00
..
tools feat(tools): batch_view_files / batch_terminal_execute — sandbox-side concurrency 2026-07-16 21:59:24 +01:00
__init__.py Add configurable token / cost usage limits (#576) 2026-06-22 11:17:08 -04:00
test_agent_factory_shell.py Default sandbox exec commands to Bash (#764) 2026-07-14 03:44:05 -07:00
test_agent_tool_registration.py Allow scan agent tool registration (#733) 2026-07-11 23:58:51 -04:00
test_backend_retries.py fix(runtime): retry transient sandbox startup failures (#768) 2026-07-14 23:27:06 -04:00
test_cli_target_list.py Add target list CLI option (#711) 2026-07-06 23:33:08 -04:00
test_config_loader.py feat(settings): add force_required_tool_choice to LlmSettings (#730) 2026-07-10 18:36:33 -04:00
test_cost_tracking.py fix: report cost for streamed OpenRouter calls (#634) 2026-07-03 00:10:28 -04:00
test_docker_client_delete.py fix(runtime): swallow torn-down docker socket in sandbox delete() (#721) 2026-07-10 00:13:35 -04:00
test_execution.py Add configurable token / cost usage limits (#576) 2026-06-22 11:17:08 -04:00
test_hooks.py Add configurable token / cost usage limits (#576) 2026-06-22 11:17:08 -04:00
test_inputs.py Support routed OpenAI required tool choice (#732) 2026-07-10 18:43:07 -04:00
test_local_dir_staging.py fix(runtime): stage symlink-safe copies for LocalDir uploads (#766) 2026-07-14 17:40:23 -04:00
test_local_sources.py Add target list CLI option (#711) 2026-07-06 23:33:08 -04:00
test_models.py Warn when configured LLM is not frontier-recommended (#586) 2026-07-13 17:41:44 -07:00
test_notes.py fix: avoid note ID collisions (#630) 2026-07-02 22:54:44 -04:00
test_optional_deps.py fix(providers): declare bedrock + vertex extras and add provider import-error hints (#588) 2026-07-07 10:24:49 -04:00
test_provider_hints.py fix(providers): match google submodule imports and walk full exception chain 2026-07-10 07:21:47 -07:00
test_proxy_renderer.py fix(tui): show 'more content available' for view_request over 15 lines (#687) 2026-07-06 03:50:02 -07:00
test_report_writer.py fix(reporting): require advisory_cvss for dependency findings + add SCA TUI renderer (#753) 2026-07-12 17:31:49 -07:00
test_reporting_fields.py fix(reporting): require advisory_cvss for dependency findings + add SCA TUI renderer (#753) 2026-07-12 17:31:49 -07:00
test_runner_rate_limit.py feat(settings): add force_required_tool_choice to LlmSettings (#730) 2026-07-10 18:36:33 -04:00
test_runner_root_prompt.py Add root scan prompt options (#750) 2026-07-12 12:31:15 -04:00
test_sarif.py feat(report): SARIF 2.1.0 emitter for CI / code-scanning integration (#626) 2026-07-03 10:43:31 -04:00
test_sarif_stride.py feat(report): tag SARIF rules with STRIDE legs derived from CWE (#708) 2026-07-06 21:19:53 -04:00
test_session_entries.py fix(runtime): stage symlink-safe copies for LocalDir uploads (#766) 2026-07-14 17:40:23 -04:00
test_skill_dir_extension.py Add skill directory registration (#746) 2026-07-12 12:05:58 -04:00
test_state_repo_context.py fix(report): omit SARIF provenance for multiple repos (#726) 2026-07-10 09:41:18 -04:00