fix(agent): harden runner integration and QA

This commit is contained in:
huanghuoguoguo
2026-08-01 09:23:41 +08:00
parent 55f42a4ebc
commit 79611a5513
38 changed files with 1315 additions and 132 deletions
@@ -487,10 +487,15 @@ class BoxStdioSessionRuntime:
)
def _shared_workspace_host_path(self) -> str:
default_workspace = getattr(self.ap.box_service, 'default_workspace', None)
if not default_workspace:
raise RuntimeError('Box default workspace is required for shared MCP host_path staging')
shared_host_path = normalize_host_path(default_workspace)
workspace_host_path = getattr(self.ap.box_service, 'workspace_host_path', None)
if callable(workspace_host_path):
shared_workspace = workspace_host_path(self.owner.execution_context)
else:
# Compatibility for older BoxService embedders used by plugins and tests.
shared_workspace = getattr(self.ap.box_service, 'default_workspace', None)
if not shared_workspace:
raise RuntimeError('Box Workspace host path is required for shared MCP host_path staging')
shared_host_path = normalize_host_path(shared_workspace)
os.makedirs(shared_host_path, exist_ok=True)
return shared_host_path