diff --git a/src/lib/global-cli-actions.ts b/src/lib/global-cli-actions.ts index 12b7211c53b..49334c3adbe 100644 --- a/src/lib/global-cli-actions.ts +++ b/src/lib/global-cli-actions.ts @@ -15,6 +15,7 @@ import { } from "./onboard-action"; import { recoverNamedGatewayRuntime as recoverNamedGatewayRuntimeAction } from "./gateway-runtime-action"; import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge"; +import { runOpenshell } from "./openshell-runtime"; import { help, version } from "./root-help-action"; export async function runOnboardAction(args: string[] = []): Promise { @@ -72,5 +73,11 @@ export function runOpenshellProviderCommand( timeout?: number; }, ) { - return getNemoClawRuntimeBridge().runOpenshell(args, opts); + const runtime = getNemoClawRuntimeBridge() as { + runOpenshell?: typeof runOpenshell; + }; + if (typeof runtime.runOpenshell === "function") { + return runtime.runOpenshell(args, opts); + } + return runOpenshell(args, opts); } diff --git a/src/lib/nemoclaw-runtime-bridge.ts b/src/lib/nemoclaw-runtime-bridge.ts index 15754d23733..645aee00737 100644 --- a/src/lib/nemoclaw-runtime-bridge.ts +++ b/src/lib/nemoclaw-runtime-bridge.ts @@ -3,26 +3,11 @@ /* v8 ignore start -- transitional bridge until command actions are extracted from src/nemoclaw.ts. */ -export interface SpawnLikeResult { - status: number | null; - stdout?: string | Buffer; - stderr?: string | Buffer; -} - export interface SandboxConnectOptions { probeOnly?: boolean; } export interface NemoClawRuntimeBridge { - runOpenshell: ( - args: string[], - opts?: { - env?: Record; - ignoreError?: boolean; - stdio?: import("node:child_process").StdioOptions; - timeout?: number; - }, - ) => SpawnLikeResult; sandboxConnect: (sandboxName: string, options?: SandboxConnectOptions) => Promise; sandboxDestroy: (sandboxName: string, args?: string[]) => Promise; sandboxLogs: (sandboxName: string, follow: boolean) => void; diff --git a/src/nemoclaw.ts b/src/nemoclaw.ts index a42f2382c56..177a4fdc5b6 100644 --- a/src/nemoclaw.ts +++ b/src/nemoclaw.ts @@ -451,7 +451,6 @@ function checkAndRecoverSandboxProcesses( } exports.runtimeBridge = { - runOpenshell, sandboxConnect, sandboxDestroy, sandboxRebuild,