fix: align browser property with base class and remove dead env writes

- shipyard_neo: browser property now returns None when not initialized
  instead of raising RuntimeError, matching ComputerBooter base contract
- computer_tool_provider: remove dead os.environ writes for shipyard
  (SHIPYARD_ENDPOINT / SHIPYARD_ACCESS_TOKEN are never read anywhere)
  and remove unused os import
This commit is contained in:
zenfun
2026-03-13 01:14:23 +08:00
parent dfc0c34d95
commit 048c511b18
2 changed files with 1 additions and 6 deletions
@@ -474,9 +474,7 @@ class ShipyardNeoBooter(ComputerBooter):
return self._shell
@property
def browser(self) -> BrowserComponent:
if self._browser is None:
raise RuntimeError("ShipyardNeoBooter is not initialized.")
def browser(self) -> BrowserComponent | None:
return self._browser
async def upload_file(self, path: str, file_name: str) -> dict:
@@ -12,7 +12,6 @@ does not require changes here.
from __future__ import annotations
import os
import platform
from functools import cache
from typing import TYPE_CHECKING
@@ -202,8 +201,6 @@ class ComputerToolProvider:
if not ep or not at:
logger.error("Shipyard sandbox configuration is incomplete.")
return []
os.environ["SHIPYARD_ENDPOINT"] = ep
os.environ["SHIPYARD_ACCESS_TOKEN"] = at
# Always return the full tool set for schema stability
return get_default_sandbox_tools(ctx.sandbox_cfg)