mirror of
https://github.com/usestrix/strix.git
synced 2026-08-23 11:22:37 +02:00
refactor: collapse strix/sandbox into strix/runtime; in-sandbox Caido bootstrap
The split between ``strix/sandbox/`` and ``strix/runtime/`` was artificial — both were managing the same backend. ``strix/sandbox/`` also collided uncomfortably with the SDK's ``agents.sandbox.*`` namespace. ``runtime/`` (which matches ``STRIX_RUNTIME_BACKEND``) is the canonical home for everything Docker / Daytona / K8s lifecycle. While merging, also rip out two pieces of Docker-specific coupling: - ``caido_bootstrap`` was POSTing ``loginAsGuest`` from the host via ``aiohttp`` to ``http://127.0.0.1:{forwarded_port}``. That assumed Docker port forwarding; Daytona / K8s expose ports differently. Now we ``session.exec`` curl from *inside* the container — the SDK's runtime-agnostic exec primitive — so any backend works as long as it implements ``exec``. The host-side Caido ``Client`` still uses the runtime's exposed-port URL for post-bootstrap calls, but that goes through the SDK's own ``resolve_exposed_port`` abstraction (also runtime-agnostic). - The bootstrap retry loop now doubles as the readiness probe, so ``healthcheck.wait_for_tcp_ready`` (and the entire ``healthcheck.py`` module) goes away. Drive-by simplification: drop ``caido_host_port`` plumbing entirely. It was only piped through ``make_agent_context`` → child contexts without ever being read; only ``caido_client`` is consumed. Drops ``aiohttp`` runtime dep (it stays only as a transitive of the Caido SDK).
This commit is contained in:
@@ -15,7 +15,7 @@ from rich.text import Text
|
||||
|
||||
from strix.config import Config
|
||||
from strix.entry import run_strix_scan
|
||||
from strix.sandbox import session_manager
|
||||
from strix.runtime import session_manager
|
||||
from strix.telemetry.tracer import Tracer, set_global_tracer
|
||||
|
||||
from .utils import (
|
||||
|
||||
@@ -37,7 +37,7 @@ from strix.interface.tool_components.agent_message_renderer import AgentMessageR
|
||||
from strix.interface.tool_components.registry import get_tool_renderer
|
||||
from strix.interface.tool_components.user_message_renderer import UserMessageRenderer
|
||||
from strix.interface.utils import build_tui_stats_text
|
||||
from strix.sandbox import session_manager
|
||||
from strix.runtime import session_manager
|
||||
from strix.telemetry.tracer import Tracer, set_global_tracer
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user