diff --git a/strix/runtime/backends.py b/strix/runtime/backends.py index 51abb7e6..d77bb8f8 100644 --- a/strix/runtime/backends.py +++ b/strix/runtime/backends.py @@ -81,16 +81,17 @@ def register_backend( backend: SandboxBackend, *, supports_bind_mounts: bool = False, - supports_mount_free: bool = True, + supports_mount_free: bool | None = None, ) -> None: """Register a custom backend under ``name``. Intended for downstream users who ship their own runtime — register before any ``session_manager.create_or_reuse`` call. Re-registering - an existing name overwrites the prior entry. ``supports_bind_mounts`` - defaults to False: a remote runtime cannot see the caller's filesystem, so - it is handed local sources as manifest entries to upload instead. + an existing name overwrites the prior entry. Remote backends without bind + mounts default to mount-free support, while bind-mount backends must explicitly opt in. """ + if supports_mount_free is None: + supports_mount_free = not supports_bind_mounts _BACKENDS[name] = backend if supports_bind_mounts: _BIND_MOUNT_BACKENDS.add(name)