fix: follow active OpenShell gateway (#46)
Co-authored-by: mmckeen-nv <mmckeen-nv@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,8 @@ OpenShell must already be installed and able to reach its gateway. On this host
|
|||||||
|
|
||||||
The installer does not create an OpenShell gateway for you. Start or connect OpenShell first, then install this dashboard.
|
The installer does not create an OpenShell gateway for you. Start or connect OpenShell first, then install this dashboard.
|
||||||
|
|
||||||
|
Controller commands follow OpenShell's active gateway by default. Set `OPENSHELL_GATEWAY` only for an intentional override; leaving it unset also allows current NemoClaw to restore a port-qualified gateway such as `nemoclaw-8990` when its installer selected an alternate gateway port.
|
||||||
|
|
||||||
## Installer
|
## Installer
|
||||||
|
|
||||||
Install or refresh the locked OpenShell/NemoClaw pair first:
|
Install or refresh the locked OpenShell/NemoClaw pair first:
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ async function runOpenShell(args: string[], extraEnv: Record<string, string> = {
|
|||||||
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, args, {
|
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, args, {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
...extraEnv,
|
...extraEnv,
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
maxBuffer: 20 * 1024 * 1024,
|
maxBuffer: 20 * 1024 * 1024,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function validateSandboxName(value: string) {
|
|||||||
async function runOpenShell(args: string[], timeout = 30000) {
|
async function runOpenShell(args: string[], timeout = 30000) {
|
||||||
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, args, {
|
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, args, {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
timeout,
|
timeout,
|
||||||
maxBuffer: 4 * 1024 * 1024,
|
maxBuffer: 4 * 1024 * 1024,
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ async function listOpenShellSandboxNames() {
|
|||||||
try {
|
try {
|
||||||
const { stdout } = await execFileAsync(OPENSHELL_BIN, ["sandbox", "list"], {
|
const { stdout } = await execFileAsync(OPENSHELL_BIN, ["sandbox", "list"], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
maxBuffer: 1024 * 1024,
|
maxBuffer: 1024 * 1024,
|
||||||
@@ -648,7 +648,7 @@ async function approveOpenClawDeviceRequests(sandboxName: string) {
|
|||||||
"-lc",
|
"-lc",
|
||||||
"openclaw devices approve --latest --json --timeout 10000",
|
"openclaw devices approve --latest --json --timeout 10000",
|
||||||
], hostCommandEnv({
|
], hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}), 15000)
|
}), 15000)
|
||||||
|
|
||||||
const combinedOutput = `${result.stdout}\n${result.stderr}`.trim()
|
const combinedOutput = `${result.stdout}\n${result.stderr}`.trim()
|
||||||
@@ -783,7 +783,7 @@ export async function POST(request: Request) {
|
|||||||
NEMOCLAW_NON_INTERACTIVE: "1",
|
NEMOCLAW_NON_INTERACTIVE: "1",
|
||||||
NEMOCLAW_RECREATE_SANDBOX: "1",
|
NEMOCLAW_RECREATE_SANDBOX: "1",
|
||||||
NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1",
|
NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1",
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!enableTailscale) {
|
if (!enableTailscale) {
|
||||||
@@ -893,7 +893,7 @@ export async function POST(request: Request) {
|
|||||||
|
|
||||||
if (blueprint === "custom-sandbox") {
|
if (blueprint === "custom-sandbox") {
|
||||||
const env: NodeJS.ProcessEnv = hostCommandEnv({
|
const env: NodeJS.ProcessEnv = hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
NO_COLOR: "1",
|
NO_COLOR: "1",
|
||||||
CLICOLOR: "0",
|
CLICOLOR: "0",
|
||||||
CLICOLOR_FORCE: "0",
|
CLICOLOR_FORCE: "0",
|
||||||
@@ -995,7 +995,7 @@ export async function POST(request: Request) {
|
|||||||
const sourceImage = source.image
|
const sourceImage = source.image
|
||||||
const basePolicyPath = resolveNemoClawBasePolicyPath()
|
const basePolicyPath = resolveNemoClawBasePolicyPath()
|
||||||
const env: NodeJS.ProcessEnv = hostCommandEnv({
|
const env: NodeJS.ProcessEnv = hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
const createAttempt = await runCreateCommandUntilReady(OPENSHELL_BIN, [
|
const createAttempt = await runCreateCommandUntilReady(OPENSHELL_BIN, [
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ async function deleteSandbox(sandboxName: string) {
|
|||||||
try {
|
try {
|
||||||
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, ["sandbox", "delete", sandboxName], {
|
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, ["sandbox", "delete", sandboxName], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
timeout: 60000,
|
timeout: 60000,
|
||||||
maxBuffer: 20 * 1024 * 1024,
|
maxBuffer: 20 * 1024 * 1024,
|
||||||
@@ -154,7 +154,7 @@ async function wipePersistentSandboxState(sandboxName: string, agent: string | n
|
|||||||
try {
|
try {
|
||||||
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
const { stdout, stderr } = await execFileAsync(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
maxBuffer: 1024 * 1024,
|
maxBuffer: 1024 * 1024,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const dynamic = "force-dynamic"
|
|||||||
async function run(command: string, args: string[]) {
|
async function run(command: string, args: string[]) {
|
||||||
try {
|
try {
|
||||||
const env = command === OPENSHELL_BIN
|
const env = command === OPENSHELL_BIN
|
||||||
? hostCommandEnv({ OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw" })
|
? hostCommandEnv({ OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined })
|
||||||
: { ...process.env, PATH: HOST_PATH, NO_COLOR: "1", CLICOLOR: "0", CLICOLOR_FORCE: "0" }
|
: { ...process.env, PATH: HOST_PATH, NO_COLOR: "1", CLICOLOR: "0", CLICOLOR_FORCE: "0" }
|
||||||
const { stdout, stderr } = await execFileAsync(command, args, {
|
const { stdout, stderr } = await execFileAsync(command, args, {
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ function readNemoClawRegistry(): NemoClawRegistryData {
|
|||||||
|
|
||||||
async function execNemoclaw(args: string[]) {
|
async function execNemoclaw(args: string[]) {
|
||||||
const env = hostCommandEnv({
|
const env = hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
const command = /\.(?:c?m?js|ts)$/i.test(NEMOCLAW_BIN)
|
const command = /\.(?:c?m?js|ts)$/i.test(NEMOCLAW_BIN)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function parseRouteModel(output: string, label: "Gateway inference" | "System in
|
|||||||
async function readOpenShellInferenceModel() {
|
async function readOpenShellInferenceModel() {
|
||||||
const { stdout } = await execFileAsync(OPENSHELL_BIN, ["inference", "get"], {
|
const { stdout } = await execFileAsync(OPENSHELL_BIN, ["inference", "get"], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
maxBuffer: 5 * 1024 * 1024,
|
maxBuffer: 5 * 1024 * 1024,
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ async function runNemoClaw(args: string[], timeout = 30000): Promise<NemoClawRun
|
|||||||
try {
|
try {
|
||||||
const { stdout, stderr } = await execFileAsync(invocation.file, invocation.args, {
|
const { stdout, stderr } = await execFileAsync(invocation.file, invocation.args, {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
NO_COLOR: "1",
|
NO_COLOR: "1",
|
||||||
CLICOLOR: "0",
|
CLICOLOR: "0",
|
||||||
CLICOLOR_FORCE: "0",
|
CLICOLOR_FORCE: "0",
|
||||||
|
|||||||
@@ -397,13 +397,16 @@ function resolveSandboxInstanceId(instanceId: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildSandboxSshArgs(sandboxName: string, extraArgs: string[]) {
|
function buildSandboxSshArgs(sandboxName: string, extraArgs: string[]) {
|
||||||
|
const gatewayOption = OPENSHELL_GATEWAY
|
||||||
|
? ` --gateway-name ${JSON.stringify(OPENSHELL_GATEWAY)}`
|
||||||
|
: ""
|
||||||
return [
|
return [
|
||||||
"-o", "BatchMode=yes",
|
"-o", "BatchMode=yes",
|
||||||
"-o", "StrictHostKeyChecking=no",
|
"-o", "StrictHostKeyChecking=no",
|
||||||
"-o", "UserKnownHostsFile=/dev/null",
|
"-o", "UserKnownHostsFile=/dev/null",
|
||||||
"-o", "GlobalKnownHostsFile=/dev/null",
|
"-o", "GlobalKnownHostsFile=/dev/null",
|
||||||
"-o", "LogLevel=ERROR",
|
"-o", "LogLevel=ERROR",
|
||||||
"-o", `ProxyCommand=${OPENSHELL_BIN} ssh-proxy --gateway-name nemoclaw --name ${sandboxName}`,
|
"-o", `ProxyCommand=${OPENSHELL_BIN} ssh-proxy${gatewayOption} --name ${sandboxName}`,
|
||||||
`sandbox@openshell-${sandboxName}`,
|
`sandbox@openshell-${sandboxName}`,
|
||||||
...extraArgs,
|
...extraArgs,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ function runSandboxExec(sandboxName: string, script: string, input?: Buffer, tim
|
|||||||
return new Promise<{ stdout: Buffer; stderr: string; code: number | null }>((resolve, reject) => {
|
return new Promise<{ stdout: Buffer; stderr: string; code: number | null }>((resolve, reject) => {
|
||||||
const child = spawn(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
const child = spawn(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
stdio: ["pipe", "pipe", "pipe"],
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ function runSandboxShell(sandboxName: string, script: string, input?: string, ti
|
|||||||
return new Promise<{ stdout: string; stderr: string; code: number | null }>((resolve, reject) => {
|
return new Promise<{ stdout: string; stderr: string; code: number | null }>((resolve, reject) => {
|
||||||
const child = spawn(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
const child = spawn(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
stdio: ["pipe", "pipe", "pipe"],
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ type BrokerNetworkAction = {
|
|||||||
function runOpenShell(args: string[], timeout = 60000) {
|
function runOpenShell(args: string[], timeout = 60000) {
|
||||||
return execFileAsync(OPENSHELL_BIN, args, {
|
return execFileAsync(OPENSHELL_BIN, args, {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
TERM: "dumb",
|
TERM: "dumb",
|
||||||
}),
|
}),
|
||||||
timeout,
|
timeout,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function runSandboxShell(sandboxName: string, script: string, input?: Buffer | s
|
|||||||
return new Promise<{ stdout: string; stderr: string; code: number | null }>((resolve, reject) => {
|
return new Promise<{ stdout: string; stderr: string; code: number | null }>((resolve, reject) => {
|
||||||
const child = spawn(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
const child = spawn(OPENSHELL_BIN, ["sandbox", "exec", "-n", sandboxName, "--", "sh", "-lc", script], {
|
||||||
env: hostCommandEnv({
|
env: hostCommandEnv({
|
||||||
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY || "nemoclaw",
|
OPENSHELL_GATEWAY: process.env.OPENSHELL_GATEWAY?.trim() || undefined,
|
||||||
}),
|
}),
|
||||||
stdio: ["pipe", "pipe", "pipe"],
|
stdio: ["pipe", "pipe", "pipe"],
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const execFileAsync = promisify(execFile)
|
|||||||
const DASHBOARD_PORT_BASE = Number.parseInt(process.env.OPENCLAW_SANDBOX_DASHBOARD_PORT_BASE || "19000", 10)
|
const DASHBOARD_PORT_BASE = Number.parseInt(process.env.OPENCLAW_SANDBOX_DASHBOARD_PORT_BASE || "19000", 10)
|
||||||
const DASHBOARD_PORT_RANGE = Number.parseInt(process.env.OPENCLAW_SANDBOX_DASHBOARD_PORT_RANGE || "2000", 10)
|
const DASHBOARD_PORT_RANGE = Number.parseInt(process.env.OPENCLAW_SANDBOX_DASHBOARD_PORT_RANGE || "2000", 10)
|
||||||
const REMOTE_DASHBOARD_PORT = Number.parseInt(process.env.OPENCLAW_SANDBOX_DASHBOARD_REMOTE_PORT || "18789", 10)
|
const REMOTE_DASHBOARD_PORT = Number.parseInt(process.env.OPENCLAW_SANDBOX_DASHBOARD_REMOTE_PORT || "18789", 10)
|
||||||
const OPENSHELL_GATEWAY = process.env.OPENSHELL_GATEWAY || "nemoclaw"
|
const OPENSHELL_GATEWAY = process.env.OPENSHELL_GATEWAY?.trim() || undefined
|
||||||
const CONTROL_UI_ORIGIN = process.env.OPENCLAW_SANDBOX_CONTROL_UI_ORIGIN || "http://127.0.0.1:18789"
|
const CONTROL_UI_ORIGIN = process.env.OPENCLAW_SANDBOX_CONTROL_UI_ORIGIN || "http://127.0.0.1:18789"
|
||||||
const CONNECT_TIMEOUT_MS = Number.parseInt(process.env.INTER_SANDBOX_CHAT_OPENCLAW_CONNECT_TIMEOUT_MS || "15000", 10)
|
const CONNECT_TIMEOUT_MS = Number.parseInt(process.env.INTER_SANDBOX_CHAT_OPENCLAW_CONNECT_TIMEOUT_MS || "15000", 10)
|
||||||
const SEND_TIMEOUT_MS = Number.parseInt(process.env.INTER_SANDBOX_CHAT_OPENCLAW_SEND_TIMEOUT_MS || "120000", 10)
|
const SEND_TIMEOUT_MS = Number.parseInt(process.env.INTER_SANDBOX_CHAT_OPENCLAW_SEND_TIMEOUT_MS || "120000", 10)
|
||||||
@@ -54,13 +54,16 @@ function getDashboardPort(sandboxName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buildSandboxSshArgs(sandboxName, extraArgs) {
|
function buildSandboxSshArgs(sandboxName, extraArgs) {
|
||||||
|
const gatewayOption = OPENSHELL_GATEWAY
|
||||||
|
? ` --gateway-name ${JSON.stringify(OPENSHELL_GATEWAY)}`
|
||||||
|
: ""
|
||||||
return [
|
return [
|
||||||
"-o", "BatchMode=yes",
|
"-o", "BatchMode=yes",
|
||||||
"-o", "StrictHostKeyChecking=no",
|
"-o", "StrictHostKeyChecking=no",
|
||||||
"-o", "UserKnownHostsFile=/dev/null",
|
"-o", "UserKnownHostsFile=/dev/null",
|
||||||
"-o", "GlobalKnownHostsFile=/dev/null",
|
"-o", "GlobalKnownHostsFile=/dev/null",
|
||||||
"-o", "LogLevel=ERROR",
|
"-o", "LogLevel=ERROR",
|
||||||
"-o", `ProxyCommand=${OPENSHELL_BIN} ssh-proxy --gateway-name ${OPENSHELL_GATEWAY} --name ${sandboxName}`,
|
"-o", `ProxyCommand=${OPENSHELL_BIN} ssh-proxy${gatewayOption} --name ${sandboxName}`,
|
||||||
`sandbox@openshell-${sandboxName}`,
|
`sandbox@openshell-${sandboxName}`,
|
||||||
...extraArgs,
|
...extraArgs,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ assert.match(terminalReadinessSource, /const authority = resolveRuntimeAuthority
|
|||||||
assert.match(telemetrySource, /authoritySource: "runtimeAuthority"/, 'inventory route must declare shared authority source')
|
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(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(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(openshellHostSource, /ssh-proxy\$\{gatewayOption\}/, 'sandbox SSH proxy commands must make the explicit gateway option conditional')
|
||||||
|
assert.doesNotMatch(openshellHostSource, /ssh-proxy --gateway-name nemoclaw/, 'sandbox SSH proxy commands must not force the legacy unqualified NemoClaw gateway')
|
||||||
assert.match(sandboxHealthSource, /stripAnsi/, 'sandbox health must strip OpenShell ANSI styling before parsing fields such as Phase')
|
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, /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, /readSandboxOpenClawDashboardToken/, 'sandbox dashboard bootstrap must fall back to the sandbox OpenClaw token when CLI output is bare')
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ assert.match(deleteRouteSource, /workspace-\*/, 'persistent state wipe must incl
|
|||||||
assert.match(pageSource, /JSON\.stringify\(\{ sandboxName, agent: sandbox\?\.agent \|\| 'openclaw' \}\)/, 'destroy workflow must pass the selected NemoClaw agent to delete state cleanup')
|
assert.match(pageSource, /JSON\.stringify\(\{ sandboxName, agent: sandbox\?\.agent \|\| 'openclaw' \}\)/, 'destroy workflow must pass the selected NemoClaw agent to delete state cleanup')
|
||||||
assert.match(deleteRouteSource, /validateSandboxName/, 'delete route must validate sandbox names before execution')
|
assert.match(deleteRouteSource, /validateSandboxName/, 'delete route must validate sandbox names before execution')
|
||||||
assert.match(deleteRouteSource, /resolveSandboxRef/, 'delete route must resolve sandbox ids to names before deleting')
|
assert.match(deleteRouteSource, /resolveSandboxRef/, 'delete route must resolve sandbox ids to names before deleting')
|
||||||
assert.match(deleteRouteSource, /OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'delete route must use the NemoClaw gateway context')
|
assert.match(deleteRouteSource, /OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'delete route must preserve an explicit gateway without forcing the legacy NemoClaw name')
|
||||||
assert.match(hostCommandsSource, /export function hostCommandEnv/, 'host commands must provide a shared environment for OpenShell child processes')
|
assert.match(hostCommandsSource, /export function hostCommandEnv/, 'host commands must provide a shared environment for OpenShell child processes')
|
||||||
assert.match(hostCommandsSource, /XDG_CONFIG_HOME/, 'shared host command environment must preserve the OpenShell config home')
|
assert.match(hostCommandsSource, /XDG_CONFIG_HOME/, 'shared host command environment must preserve the OpenShell config home')
|
||||||
assert.match(hostCommandsSource, /export function openshellGatewayAddressEnv/, 'shared host command environment must expose gateway address override variables')
|
assert.match(hostCommandsSource, /export function openshellGatewayAddressEnv/, 'shared host command environment must expose gateway address override variables')
|
||||||
@@ -179,9 +179,9 @@ assert.match(hostCommandsSource, /gateway\.json/, 'shared host command environme
|
|||||||
assert.match(hostCommandsSource, /config\.json/, 'shared host command environment must also support the general OpenShell config file')
|
assert.match(hostCommandsSource, /config\.json/, 'shared host command environment must also support the general OpenShell config file')
|
||||||
assert.match(hostCommandsSource, /gatewayHost/, 'OpenShell gateway address config must support a top-level gatewayHost key')
|
assert.match(hostCommandsSource, /gatewayHost/, 'OpenShell gateway address config must support a top-level gatewayHost key')
|
||||||
assert.match(hostCommandsSource, /gateway\.host/, 'OpenShell gateway address config must support a nested gateway host key')
|
assert.match(hostCommandsSource, /gateway\.host/, 'OpenShell gateway address config must support a nested gateway host key')
|
||||||
assert.match(createRouteSource, /const env: NodeJS\.ProcessEnv = hostCommandEnv\(\{[\s\S]*NEMOCLAW_SANDBOX_NAME: sandboxName[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'NemoClaw onboard must receive the shared host command environment')
|
assert.match(createRouteSource, /const env: NodeJS\.ProcessEnv = hostCommandEnv\(\{[\s\S]*NEMOCLAW_SANDBOX_NAME: sandboxName[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'NemoClaw onboard must preserve an explicit gateway while allowing NemoClaw to select its port-qualified gateway')
|
||||||
assert.match(createRouteSource, /NEMOCLAW_AGENT: agent/, 'NemoClaw onboard must receive the selected dashboard agent')
|
assert.match(createRouteSource, /NEMOCLAW_AGENT: agent/, 'NemoClaw onboard must receive the selected dashboard agent')
|
||||||
assert.match(deleteRouteSource, /env: hostCommandEnv\(\{[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY \|\| "nemoclaw"/, 'delete route must pass the shared host command environment to OpenShell')
|
assert.match(deleteRouteSource, /env: hostCommandEnv\(\{[\s\S]*OPENSHELL_GATEWAY: process\.env\.OPENSHELL_GATEWAY\?\.trim\(\) \|\| undefined/, 'delete route must pass the shared host command environment without forcing a gateway')
|
||||||
assert.match(deleteRouteSource, /waitForSandboxDeleted/, 'delete route must poll authoritative inventory until the sandbox is gone')
|
assert.match(deleteRouteSource, /waitForSandboxDeleted/, 'delete route must poll authoritative inventory until the sandbox is gone')
|
||||||
assert.doesNotMatch(deleteRouteSource, /cleanupNemoClawSandbox/, 'delete route must not run NemoClaw destroy cleanup after OpenShell deletion')
|
assert.doesNotMatch(deleteRouteSource, /cleanupNemoClawSandbox/, 'delete route must not run NemoClaw destroy cleanup after OpenShell deletion')
|
||||||
assert.doesNotMatch(deleteRouteSource, /isNemoClawSandboxNotRegistered/, 'delete route must not keep NemoClaw registry cleanup helpers')
|
assert.doesNotMatch(deleteRouteSource, /isNemoClawSandboxNotRegistered/, 'delete route must not keep NemoClaw registry cleanup helpers')
|
||||||
|
|||||||
Reference in New Issue
Block a user