diff --git a/README.md b/README.md index e643504..e2c05d9 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,7 @@ Behind a reverse proxy, route WebSocket upgrades for the dashboard proxy paths t ## Hermes Notes -With NemoClaw `v0.0.37`, the create flow includes a Fresh Hermes Sandbox option. It uses NemoClaw onboard with `--agent hermes`; the existing Fresh NemoClaw Image and Quick Deploy paths remain OpenClaw-oriented. +The create flow includes managed NemoClaw agent options beyond the default OpenClaw sandbox. Fresh Hermes Sandbox uses NemoClaw onboard with `--agent hermes`; Fresh Deep Agents Code Sandbox uses `--agent langchain-deepagents-code` for the upstream LangChain Deep Agents Code terminal harness. The existing Fresh NemoClaw Image and Quick Deploy paths remain OpenClaw-oriented. ## Remote Controller Nodes diff --git a/app/api/sandbox/create/route.ts b/app/api/sandbox/create/route.ts index 0439acf..c99de7a 100644 --- a/app/api/sandbox/create/route.ts +++ b/app/api/sandbox/create/route.ts @@ -77,7 +77,7 @@ type NemoClawCreateCommand = { type CreateInferenceMode = "auto" | "vllm" | "nim" type CreateGpuMode = "none" | "auto" | "required" -type NemoClawAgent = "openclaw" | "hermes" +type NemoClawAgent = "openclaw" | "hermes" | "langchain-deepagents-code" type CreateInferenceSettings = { mode: CreateInferenceMode @@ -151,14 +151,15 @@ function nemoClawGpuArgs(mode: CreateGpuMode) { } function nemoClawAgentArgs(agent: NemoClawAgent) { - return agent === "hermes" ? ["--agent", "hermes"] : [] + return agent === "openclaw" ? [] : ["--agent", agent] } function isNemoClawOnboardBlueprint(blueprint: string) { - return blueprint === "nemoclaw-blueprint" || blueprint === "nemoclaw-hermes" + return blueprint === "nemoclaw-blueprint" || blueprint === "nemoclaw-hermes" || blueprint === "nemoclaw-deepagents-code" } function nemoClawAgentForBlueprint(blueprint: string): NemoClawAgent { + if (blueprint === "nemoclaw-deepagents-code") return "langchain-deepagents-code" return blueprint === "nemoclaw-hermes" ? "hermes" : "openclaw" } @@ -180,8 +181,8 @@ function buildNemoClawCreateCommand(gpuMode: CreateGpuMode, agent: NemoClawAgent ? { file: NODE_BIN, args: [NEMOCLAW_BIN, ...args], mode: "cli-onboard" } : { file: NEMOCLAW_BIN, args, mode: "cli-onboard" } } - if (agent === "hermes") { - throw new Error("Hermes sandbox creation requires the current NemoClaw CLI with --agent hermes support. Set NEMOCLAW_BIN in .env.local.") + if (agent !== "openclaw") { + throw new Error(`${agent} sandbox creation requires the current NemoClaw CLI with --agent support. Set NEMOCLAW_BIN in .env.local.`) } if (NEMOCLAW_SETUP && commandExists(NEMOCLAW_SETUP)) { return { file: "/bin/bash", args: [NEMOCLAW_SETUP], mode: "legacy-setup" } @@ -732,6 +733,14 @@ export async function GET() { source: "~/NemoClaw/agents/hermes/Dockerfile", supportsTailscale: false, }, + { + id: "nemoclaw-deepagents-code", + label: "Fresh Deep Agents Code Sandbox", + description: "Bootstraps LangChain Deep Agents Code using NemoClaw's terminal-agent workflow.", + type: "blueprint", + source: "~/NemoClaw/agents/langchain-deepagents-code/manifest.yaml", + supportsTailscale: false, + }, { id: "custom-sandbox", label: "New Custom Sandbox", diff --git a/app/components/ConfigurationPanel.tsx b/app/components/ConfigurationPanel.tsx index d825ef3..01275e3 100644 --- a/app/components/ConfigurationPanel.tsx +++ b/app/components/ConfigurationPanel.tsx @@ -128,7 +128,7 @@ export default function ConfigurationPanel({ sandboxId, mode = 'existing', onCre const assembledPolicy = useMemo(() => ({ ...policy, network_policies: blocksToPolicy(blocks) }), [policy, blocks]) const activePreset = selectedPreset ? getSecurityPreset(selectedPreset) : null const activeBlueprint = blueprints.find((bp) => bp.id === selectedBlueprint) - const isNemoClawOnboardBlueprint = selectedBlueprint === 'nemoclaw-blueprint' || selectedBlueprint === 'nemoclaw-hermes' + const isNemoClawOnboardBlueprint = selectedBlueprint === 'nemoclaw-blueprint' || selectedBlueprint === 'nemoclaw-hermes' || selectedBlueprint === 'nemoclaw-deepagents-code' function applyPreset(presetId: SecurityPresetId) { const preset = getSecurityPreset(presetId); if (!preset) return @@ -219,7 +219,7 @@ export default function ConfigurationPanel({ sandboxId, mode = 'existing', onCre
- setSandboxName(e.target.value)} placeholder={selectedBlueprint === 'nemoclaw-hermes' ? 'my-hermes' : selectedBlueprint === 'nemoclaw-blueprint' ? 'my-assistant' : selectedBlueprint === 'redeploy-image' ? 'my-assistant-copy' : 'custom-sandbox'} className="mt-2 w-full rounded-sm border border-[var(--border-subtle)] bg-[var(--background)] px-3 py-2 text-xs font-mono text-[var(--foreground)]" /> + setSandboxName(e.target.value)} placeholder={selectedBlueprint === 'nemoclaw-hermes' ? 'my-hermes' : selectedBlueprint === 'nemoclaw-deepagents-code' ? 'my-deepagents-code' : selectedBlueprint === 'nemoclaw-blueprint' ? 'my-assistant' : selectedBlueprint === 'redeploy-image' ? 'my-assistant-copy' : 'custom-sandbox'} className="mt-2 w-full rounded-sm border border-[var(--border-subtle)] bg-[var(--background)] px-3 py-2 text-xs font-mono text-[var(--foreground)]" />
diff --git a/tests/sandbox-lifecycle-check.mjs b/tests/sandbox-lifecycle-check.mjs index 122187e..d2df896 100644 --- a/tests/sandbox-lifecycle-check.mjs +++ b/tests/sandbox-lifecycle-check.mjs @@ -82,10 +82,11 @@ assert.match(createRouteSource, /sandbox\.create\.error[\s\S]*unknown blueprint/ assert.match(pageSource, //, 'dashboard must surface the activity log so create progress remains visible after navigation') assert.match(activityPanelSource, /sandbox creation/, 'activity panel copy must include sandbox creation progress events') assert.match(createRouteSource, /"onboard",[\s\S]*"--non-interactive",[\s\S]*"--recreate-sandbox"/, 'blueprint create must use the Monday-era normal NemoClaw onboard flow') -assert.match(createRouteSource, /type NemoClawAgent = "openclaw" \| "hermes"/, 'blueprint create must model OpenClaw and Hermes NemoClaw agents') +assert.match(createRouteSource, /type NemoClawAgent = "openclaw" \| "hermes" \| "langchain-deepagents-code"/, 'blueprint create must model OpenClaw, Hermes, and Deep Agents Code NemoClaw agents') assert.match(createRouteSource, /function nemoClawAgentForBlueprint\(blueprint: string\): NemoClawAgent/, 'blueprint create must map dashboard blueprints to NemoClaw agents') assert.match(createRouteSource, /blueprint === "nemoclaw-hermes" \? "hermes" : "openclaw"/, 'Hermes blueprint must select the Hermes NemoClaw agent without changing the OpenClaw default') -assert.match(createRouteSource, /agent === "hermes" \? \["--agent", "hermes"\] : \[\]/, 'Hermes sandbox creation must pass --agent hermes to NemoClaw') +assert.match(createRouteSource, /blueprint === "nemoclaw-deepagents-code"\) return "langchain-deepagents-code"/, 'Deep Agents Code blueprint must select the upstream NemoClaw agent id') +assert.match(createRouteSource, /agent === "openclaw" \? \[\] : \["--agent", agent\]/, 'non-default NemoClaw agent creation must pass --agent to NemoClaw') assert.match(createRouteSource, /type CreateGpuMode = "none" \| "auto" \| "required"/, 'blueprint create must model explicit GPU passthrough modes') assert.match(createRouteSource, /process\.env\.OPENSHELL_CONTROL_CREATE_GPU_MODE \|\| "none"/, 'sandbox create must default to no GPU passthrough unless requested') assert.match(createRouteSource, /mode === "required"[\s\S]*return \["--gpu"\]/, 'NemoClaw create must pass --gpu when GPU passthrough is required') @@ -99,6 +100,8 @@ assert.match(createRouteSource, /label: "Fresh NemoClaw Image"/, 'full rebuild p assert.match(createRouteSource, /id: "nemoclaw-hermes"/, 'create API must expose Hermes sandbox creation') assert.match(createRouteSource, /label: "Fresh Hermes Sandbox"/, 'Hermes sandbox creation must be labeled clearly in the create API') assert.match(createRouteSource, /source: "~\/NemoClaw\/agents\/hermes\/Dockerfile"/, 'Hermes sandbox creation must point at the upstream Hermes agent source') +assert.match(createRouteSource, /id: "nemoclaw-deepagents-code"/, 'create API must expose Deep Agents Code sandbox creation') +assert.match(createRouteSource, /source: "~\/NemoClaw\/agents\/langchain-deepagents-code\/manifest\.yaml"/, 'Deep Agents Code sandbox creation must point at the upstream agent manifest') assert.match(createRouteSource, /readNemoClawRegistry/, 'image redeploy must discover the default NemoClaw sandbox image automatically') assert.match(createRouteSource, /listOpenShellSandboxNames/, 'image redeploy must fall back to live OpenShell inventory when registry entries are stale') assert.match(createRouteSource, /resolveSourcePodImage\(sourceSandboxName, sandboxName\)/, 'image redeploy must allow optional explicit source while defaulting automatically') @@ -318,8 +321,9 @@ assert.match(configPanelSource, /type CreateGpuMode = "none" \| "auto" \| "requi assert.match(configPanelSource, /gpuMode: createGpuMode/, 'create panel must send the selected GPU mode to the create API') assert.match(configPanelSource, /Require GPU/, 'create panel must let operators require GPU passthrough') assert.match(configPanelSource, /createInference/, 'create panel must send create-time inference settings') -assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-blueprint' \|\| selectedBlueprint === 'nemoclaw-hermes'/, 'create panel must treat Hermes as a NemoClaw onboard blueprint') +assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-blueprint' \|\| selectedBlueprint === 'nemoclaw-hermes' \|\| selectedBlueprint === 'nemoclaw-deepagents-code'/, 'create panel must treat NemoClaw managed agents as onboard blueprints') assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-hermes' \? 'my-hermes'/, 'create panel must provide a Hermes-specific sandbox name placeholder') +assert.match(configPanelSource, /selectedBlueprint === 'nemoclaw-deepagents-code' \? 'my-deepagents-code'/, 'create panel must provide a Deep Agents Code-specific sandbox name placeholder') assert.match(configPanelSource, /useState\('redeploy-image'\)/, 'create panel must default to quick deploy') assert.doesNotMatch(configPanelSource, /Source Sandbox|sourceSandboxName/, 'basic create panel must not require choosing a source image')