fix: align controller with OpenShell and NemoClaw

Merged verified controller compatibility, terminal, and inference UX fixes.
This commit is contained in:
mmckeen-nv
2026-06-02 21:46:40 -06:00
committed by GitHub
parent 81f7239bf3
commit fafcf6e245
12 changed files with 224 additions and 87 deletions
+77
View File
@@ -47,6 +47,83 @@ assert.match(
/dashboardSessionId: session\.dashboardSessionId/,
'terminal server responses must expose dashboardSessionId metadata'
)
assert.match(
terminalSource,
/falling back to stream transport/,
'terminal server must fall back to stream transport when auto PTY spawn fails'
)
assert.match(
terminalSource,
/transport: session\.transport\.kind/,
'terminal server must report the actual per-session transport after fallback'
)
assert.match(
terminalSource,
/function buildSessionCommand\(sandboxId\)/,
'terminal server must resolve the real command it will execute for each session'
)
assert.match(
terminalSource,
/function normalizeSandboxId\(value\)/,
'terminal server must validate request-controlled sandbox IDs before using them in shell templates'
)
assert.match(
terminalSource,
/\^\[A-Za-z0-9\]\[A-Za-z0-9_\.-\]/,
'terminal server sandbox ID validation must reject shell metacharacters and whitespace'
)
assert.match(
terminalSource,
/OPENSHELL_TERMINAL_ATTACH_TEMPLATE[\s\S]*return buildAttachCommand\(sandboxId\)/,
'terminal server must honor OPENSHELL_TERMINAL_ATTACH_TEMPLATE for sandbox sessions instead of only displaying it'
)
assert.match(
terminalSource,
/replaceAll\('\{sandboxId\}', safeSandboxId\)/,
'terminal server must shell-escape sandboxId before substituting it into attach templates'
)
assert.match(
terminalSource,
/replaceAll\('\{alias\}', safeAlias\)/,
'terminal server must shell-escape aliases before substituting them into attach templates'
)
assert.match(
terminalSource,
/attachCommand: buildSessionCommand\(identity\.sandboxId\)/,
'terminal server attachCommand metadata must match the command family it executes for the session'
)
assert.match(
terminalSource,
/statusCode = message\.startsWith\('Invalid sandboxId'\) \? 400 : 500/,
'terminal server should report invalid sandbox IDs as client errors'
)
assert.match(
terminalSource,
/function buildSessionExec\(sandboxId\)/,
'terminal server must build an executable shell command for each session'
)
assert.match(
terminalSource,
/shellForPlatform\(\)} -lc \$\{shellEscape\(sessionCommand\)\}/,
'terminal server must run attach templates through a shell so compound commands are preserved'
)
assert.match(
terminalSource,
/sessionExec/,
'terminal bootstrap must execute the resolved session command'
)
const operatorTerminalSource = await readFile(path.join(root, 'app/operator-terminal/page.tsx'), 'utf8')
assert.match(
operatorTerminalSource,
/transport\?: string/,
'operator terminal UI must track actual transport metadata'
)
assert.match(
operatorTerminalSource,
/via \$\{liveSession\.transport\}/,
'operator terminal status must disclose the actual live transport to avoid misleading readiness copy'
)
const buildOperatorTerminalRoute = ({ sandboxId, dashboardSessionId, launch }) => {
const searchParams = new URLSearchParams()
+5 -4
View File
@@ -54,11 +54,12 @@ assert.match(installSource, /python3 -m venv "\$PROJECT_VENV"/, 'installer must
assert.match(installSource, /\$venv_python" -m pip install --upgrade uv/, 'installer must install uvx into the virtual environment')
assert.match(installSource, /set_env "OPENSHELL_CONTROL_VENV"/, 'installer must persist the virtual environment path for runtime MCP launches')
assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$\{OPENSHELL_VERSION:-v0\.0\.36\}"/, 'versioned installer must pin OpenShell v0.0.36 by default')
assert.match(versionedInstallSource, /NEMOCLAW_INSTALL_TAG="\$\{NEMOCLAW_INSTALL_TAG:-v0\.0\.37\}"/, 'versioned installer must pin NemoClaw v0.0.37 by default')
assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$\{OPENSHELL_VERSION:-v0\.0\.44\}"/, 'versioned installer must default to the OpenShell release supported by current NemoClaw main')
assert.match(versionedInstallSource, /NEMOCLAW_INSTALL_REF="\$\{NEMOCLAW_INSTALL_REF:-\$\{NEMOCLAW_INSTALL_TAG:-main\}\}"/, 'versioned installer must track the current NemoClaw main ref by default')
assert.match(versionedInstallSource, /NEMOCLAW_SOURCE_URL="\$\{NEMOCLAW_SOURCE_URL:-https:\/\/github\.com\/NVIDIA\/NemoClaw\.git\}"/, 'versioned installer must use the NemoClaw source repository URL')
assert.match(versionedInstallSource, /https:\/\/raw\.githubusercontent\.com\/NVIDIA\/OpenShell\/main\/install\.sh/, 'versioned installer must use the OpenShell installer URL')
assert.match(versionedInstallSource, /https:\/\/github\.com\/NVIDIA\/NemoClaw\/archive\/refs\/tags\/\$\{NEMOCLAW_INSTALL_TAG\}\.zip/, 'versioned installer must download NemoClaw from the pinned tag archive')
assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$OPENSHELL_VERSION" sh/, 'versioned installer must pass the pinned OpenShell version to upstream install.sh')
assert.match(versionedInstallSource, /git -C "\$source_dir" fetch[\s\S]*"\$NEMOCLAW_INSTALL_REF"/, 'versioned installer must fetch NemoClaw from the selected git ref')
assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$OPENSHELL_VERSION" sh/, 'versioned installer must pass the selected OpenShell version to upstream install.sh')
assert.match(versionedInstallSource, /NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE="\$NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE"/, 'versioned installer must support non-interactive third-party acceptance')
assert.match(versionedInstallSource, /NEMOCLAW_NON_INTERACTIVE="\$NEMOCLAW_NON_INTERACTIVE"/, 'versioned installer must run NemoClaw non-interactively by default')
assert.match(versionedInstallSource, /NEMOCLAW_EXPERIMENTAL="\$\{NEMOCLAW_EXPERIMENTAL:-1\}"/, 'versioned installer must default NemoClaw to experimental mode')
+5 -1
View File
@@ -11,10 +11,11 @@ const terminalLivePath = path.join(root, 'app/api/openshell/terminal/live/route.
const terminalReadinessPath = path.join(root, 'app/api/openshell/terminal/readiness/route.ts')
const telemetryPath = path.join(root, 'app/api/telemetry/real/route.ts')
const openshellHostPath = path.join(root, 'app/lib/openshellHost.ts')
const sandboxHealthPath = path.join(root, 'app/api/sandbox/[sandboxId]/health/route.ts')
const packageJsonPath = path.join(root, 'package.json')
const serverPath = path.join(root, 'server.mjs')
const [runtimeAuthoritySource, dashboardOpenSource, dashboardProxySource, terminalLiveSource, terminalReadinessSource, telemetrySource, openshellHostSource, packageJsonSource, serverSource] = await Promise.all([
const [runtimeAuthoritySource, dashboardOpenSource, dashboardProxySource, terminalLiveSource, terminalReadinessSource, telemetrySource, openshellHostSource, sandboxHealthSource, packageJsonSource, serverSource] = await Promise.all([
readFile(runtimeAuthorityPath, 'utf8'),
readFile(dashboardOpenPath, 'utf8'),
readFile(dashboardProxySharedPath, 'utf8'),
@@ -22,6 +23,7 @@ const [runtimeAuthoritySource, dashboardOpenSource, dashboardProxySource, termin
readFile(terminalReadinessPath, 'utf8'),
readFile(telemetryPath, 'utf8'),
readFile(openshellHostPath, 'utf8'),
readFile(sandboxHealthPath, 'utf8'),
readFile(packageJsonPath, 'utf8'),
readFile(serverPath, 'utf8'),
])
@@ -52,6 +54,8 @@ assert.match(terminalReadinessSource, /const authority = resolveRuntimeAuthority
assert.match(telemetrySource, /authoritySource: "runtimeAuthority"/, 'inventory route must declare shared authority source')
assert.match(telemetrySource, /authorities: authorities\.map\(/, 'inventory route must expose per-sandbox authority metadata')
assert.match(openshellHostSource, /const OPENSHELL_GATEWAY = process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'OpenShell host commands must not force the legacy openshell gateway when NemoClaw has selected the nemoclaw gateway')
assert.match(sandboxHealthSource, /stripAnsi/, 'sandbox health must strip OpenShell ANSI styling before parsing fields such as Phase')
assert.match(openshellHostSource, /const canMintBootstrapFromCli = instance\.id === defaultInstance\.id/, 'bootstrap minting should only use CLI for the default OpenClaw instance')
assert.match(openshellHostSource, /readSandboxOpenClawDashboardToken/, 'sandbox dashboard bootstrap must fall back to the sandbox OpenClaw token when CLI output is bare')
assert.match(openshellHostSource, /openclaw dashboard', 15000\)\.catch/, 'sandbox dashboard bootstrap should let OpenClaw initialize before reading the fallback token')
+10 -3
View File
@@ -98,7 +98,10 @@ assert.match(createRouteSource, /NEMOCLAW_EXPERIMENTAL = "1"/, 'blueprint create
assert.match(createRouteSource, /NEMOCLAW_PROVIDER = "vllm"/, 'blueprint create must support the vLLM onboarding provider')
assert.match(createRouteSource, /NEMOCLAW_PROVIDER = "nim-local"/, 'blueprint create must support the NVIDIA NIM onboarding provider')
assert.match(createRouteSource, /NEMOCLAW_PROVIDER_KEY = apiKey/, 'blueprint create must pass NVIDIA API keys through provider env without changing NemoClaw')
assert.match(versionedInstallerSource, /OPENCLAW_VERSION="\$\{OPENCLAW_VERSION:-2026\.4\.27\}"/, 'versioned installer must pin the dashboard-compatible NemoClaw OpenClaw version')
assert.match(versionedInstallerSource, /OPENSHELL_VERSION="\$\{OPENSHELL_VERSION:-v0\.0\.44\}"/, 'versioned installer must default to the OpenShell release supported by current NemoClaw main')
assert.match(versionedInstallerSource, /NEMOCLAW_INSTALL_REF="\$\{NEMOCLAW_INSTALL_REF:-\$\{NEMOCLAW_INSTALL_TAG:-main\}\}"/, 'versioned installer must track the current NemoClaw main ref by default while preserving the legacy tag override')
assert.match(versionedInstallerSource, /OPENCLAW_VERSION="\$\{OPENCLAW_VERSION:-2026\.5\.22\}"/, 'versioned installer must pin the current NemoClaw-compatible OpenClaw base image version')
assert.match(versionedInstallerSource, /git -C "\$source_dir" fetch[\s\S]*"\$NEMOCLAW_INSTALL_REF"/, 'versioned installer must fetch NemoClaw by git ref so branch heads and tags both work')
assert.match(versionedInstallerSource, /docker build[\s\S]*Dockerfile\.base[\s\S]*--build-arg "OPENCLAW_VERSION=\$OPENCLAW_VERSION"[\s\S]*"\$source_dir"/, 'versioned installer must rebuild the stock NemoClaw base image with the pinned OpenClaw version')
assert.doesNotMatch(createRouteSource, /repairOpenClawRuntimePolicy|runtimePolicyRepair/, 'sandbox create must not mutate OpenShell filesystem policy for OpenClaw')
assert.doesNotMatch(createRouteSource, /stabilizeOpenClawGatewayConfig|gatewayConfigRepair|repairOpenClawWorkspacePermissions|workspaceRepair/, 'sandbox create must not patch OpenClaw internals after the Monday rollback')
@@ -233,15 +236,19 @@ assert.match(vllmRestartRouteSource, /\^vllm/, 'vLLM restart route must restrict
assert.doesNotMatch(inferencePanelSource, /nvidia\/NVIDIA-Nemotron-3-Super-120B-A12B-NVFP4/, 'settings UI must not default rebuilt inference routes to the NVIDIA Nemotron model')
assert.match(inferencePanelSource, /method: "DELETE"/, 'settings UI must expose provider deletion')
assert.match(inferencePanelSource, /\/api\/ollama\/models/, 'settings UI must poll local Ollama models')
assert.match(inferencePanelSource, /window\.setInterval\(\(\) => loadOllamaModels\(\{ silent: true \}\), 10000\)/, 'settings UI must autopoll Ollama while the endpoint panel is open')
assert.match(inferencePanelSource, /OLLAMA_BASE_URL = "http:\/\/127\.0\.0\.1:11434\/v1"/, 'settings UI must preset Ollama to the host OpenAI-compatible URL used by the OpenShell gateway')
assert.match(inferencePanelSource, /function applyOllamaModelPreset\(item: OllamaModel\)/, 'settings UI must provide a click preset for local Ollama models')
assert.match(inferencePanelSource, /setCredentialKey\("OLLAMA_API_KEY"\)/, 'settings UI must use a dedicated Ollama credential key for local Ollama presets')
assert.match(inferencePanelSource, /data\.gateway\?\.provider\?\.toLowerCase\(\)\.includes\("ollama"\)/, 'settings UI must hydrate the form with Ollama URL/key defaults when the active route is Ollama')
assert.match(inferencePanelSource, /function ollamaOpenAiBaseUrl\(item: OllamaModel\)[\s\S]*item\.baseUrl[\s\S]*`\$\{baseUrl\}\/v1`/, 'Ollama preset must derive the OpenAI-compatible endpoint from the discovered model source')
assert.match(inferencePanelSource, /function ollamaProviderName\(item: OllamaModel\)[\s\S]*item\.hostKind === "win" \? "ollama-win" : OLLAMA_PROVIDER_NAME/, 'Ollama preset must distinguish Windows-host Ollama from local Ollama')
assert.match(inferencePanelSource, /setName\(ollamaProviderName\(item\)\)[\s\S]*setType\("openai"\)[\s\S]*setModel\(modelName\)[\s\S]*setBaseUrl\(ollamaOpenAiBaseUrl\(item\)\)/, 'Ollama model preset must fill provider name, provider type, model, and discovered endpoint URL')
assert.match(inferencePanelSource, /onClick=\{\(\) => applyOllamaModelPreset\(item\)\}/, 'clicking an Ollama model must load the endpoint preset')
assert.match(inferencePanelSource, /const OLLAMA_BASE_URL = "http:\/\/host\.docker\.internal:11434\/v1"/, 'Ollama preset must keep a fallback host-reachable OpenAI-compatible endpoint')
assert.match(inferencePanelSource, /const OLLAMA_BASE_URL = "http:\/\/127\.0\.0\.1:11434\/v1"/, 'Ollama preset must keep a fallback host-reachable OpenAI-compatible endpoint')
assert.match(ollamaModelsRouteSource, /\/api\/tags/, 'Ollama models route must query the Ollama tags API')
assert.match(ollamaModelsRouteSource, /OLLAMA_BASE_URL/, 'Ollama models route must support a configurable Ollama base URL')
assert.match(ollamaModelsRouteSource, /isChatModelName/, 'Ollama models route must hide embedding-only models from chat inference presets')
assert.match(ollamaModelsRouteSource, /MAC/, 'Ollama models route must label macOS localhost probes clearly instead of calling them Linux')
assert.match(sandboxInferenceRouteSource, /parseRoutes/, 'sandbox inference route must accept multiple provider/model routes')
assert.match(sandboxInferenceRouteSource, /primaryRouteId/, 'sandbox inference route must preserve the primary route selection')
assert.match(sandboxInferenceRouteSource, /saveSandboxInferenceConfig/, 'sandbox inference route must persist per-sandbox inference profiles')