refactor: scrub migration scars, dead code, and unused helpers

- Strip PLAYBOOK / AUDIT / Phase-N / C-numbered references from
  module docstrings across 16 files; rename
  ``_PHASE1_PARALLEL_DEFAULT`` → ``_PARALLEL_TOOL_CALLS_DEFAULT``.
- Delete unused exception classes: ``SandboxInitializationError``,
  ``ImplementedInClientSideOnlyError``.
- Delete the no-op ``on_handoff`` hook (we don't use SDK handoffs).
- Delete the unreachable backward-compat tab-delimited fallback in
  ``_parse_git_diff_output``.
- Delete orphaned ``strix/tools/load_skill/`` (dir contained only a
  pycache) and stale pycache files.
- Rewrite ``strix/skills/__init__.py``: 168 → 56 LoC. Drop seven
  helper functions (``get_available_skills``, ``get_all_skill_names``,
  ``validate_skill_names``, ``parse_skill_list``,
  ``validate_requested_skills``, ``generate_skills_description``,
  ``_get_all_categories``) — none had external callers; only
  ``load_skills`` is used.
- Drop the stale ``strix/agents/sdk_factory.py`` per-file ruff ignore
  (file no longer exists).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
0xallam
2026-04-25 12:05:24 -07:00
co-authored by Claude Opus 4.7
parent e4be5f9588
commit 4146174503
23 changed files with 212 additions and 525 deletions
+8 -26
View File
@@ -1,31 +1,13 @@
"""Strix runtime package.
What lives here:
- :class:`strix.runtime.strix_docker_client.StrixDockerSandboxClient` —
host-side ``DockerSandboxClient`` subclass that injects
``NET_ADMIN`` / ``NET_RAW`` capabilities and ``host.docker.internal``
extra-hosts, used by the per-scan session manager
(:mod:`strix.sandbox.session_manager`).
- :class:`StrixDockerSandboxClient` — host-side ``DockerSandboxClient``
subclass that injects ``NET_ADMIN`` / ``NET_RAW`` capabilities and
``host.docker.internal`` extra-hosts, used by the per-scan session
manager (:mod:`strix.sandbox.session_manager`).
- ``tool_server.py`` — the FastAPI server that runs *inside* the
sandbox container; sandbox-bound tools (browser, terminal, python,
file_edit, proxy) POST here from the host via
- ``tool_server.py`` — FastAPI server that runs inside the sandbox
container. Sandbox-bound tools (browser, terminal, python, file_edit,
proxy) POST here from the host via
:func:`strix.tools._sandbox_dispatch.post_to_sandbox`.
The legacy DockerRuntime / AbstractRuntime + ``get_runtime`` /
``cleanup_runtime`` globals were removed when the SDK harness took
over scan lifecycle; sandbox sessions are now per-scan and managed by
:func:`strix.sandbox.session_manager.create_or_reuse`.
"""
class SandboxInitializationError(Exception):
"""Raised when sandbox initialization fails (e.g., Docker issues)."""
def __init__(self, message: str, details: str | None = None):
super().__init__(message)
self.message = message
self.details = details
__all__ = ["SandboxInitializationError"]