fix: show deployed sandbox agent identity (#44)
Co-authored-by: mmckeen-nv <mmckeen-nv@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,13 @@ import { hostname, networkInterfaces } from "node:os"
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
import { promisify } from "node:util"
|
import { promisify } from "node:util"
|
||||||
import { NEMOCLAW_BIN, NODE_BIN, OPENSHELL_BIN, hostCommandEnv } from "@/app/lib/hostCommands"
|
import { NEMOCLAW_BIN, NODE_BIN, OPENSHELL_BIN, hostCommandEnv } from "@/app/lib/hostCommands"
|
||||||
|
import {
|
||||||
|
parseDefaultSandboxNames,
|
||||||
|
parseNemoclawListJson,
|
||||||
|
resolveSandboxAgent,
|
||||||
|
type NemoClawListJsonIdentity,
|
||||||
|
type NemoClawRegistryData,
|
||||||
|
} from "@/app/lib/nemoclawIdentity.mjs"
|
||||||
import { resolveRuntimeAuthority } from "@/app/lib/runtimeAuthority"
|
import { resolveRuntimeAuthority } from "@/app/lib/runtimeAuthority"
|
||||||
|
|
||||||
const execFileAsync = promisify(execFile)
|
const execFileAsync = promisify(execFile)
|
||||||
@@ -30,10 +37,6 @@ type NemoClawSummary = {
|
|||||||
source: "nemoclaw-cli" | "none"
|
source: "nemoclaw-cli" | "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
type NemoClawRegistryData = {
|
|
||||||
sandboxes?: Record<string, { name?: string; agent?: string | null }>
|
|
||||||
}
|
|
||||||
|
|
||||||
type SandboxItem = {
|
type SandboxItem = {
|
||||||
metadata: {
|
metadata: {
|
||||||
name: string
|
name: string
|
||||||
@@ -115,17 +118,6 @@ function parseOpenShellSandboxNames(output: string) {
|
|||||||
.filter((entry): entry is string => Boolean(entry))
|
.filter((entry): entry is string => Boolean(entry))
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseDefaultSandboxNames(output: string) {
|
|
||||||
return new Set(
|
|
||||||
output
|
|
||||||
.split(/\r?\n/)
|
|
||||||
.map((entry) => stripAnsi(entry))
|
|
||||||
.filter((entry) => /^\s{2,}[\w.-]+(?:\s+\*)?\s*$/.test(entry) && entry.includes("*"))
|
|
||||||
.map((entry) => entry.replace("*", "").trim())
|
|
||||||
.filter(Boolean)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildNemoClawSummary(output: string | null, defaultSandboxNames: Set<string>): NemoClawSummary {
|
function buildNemoClawSummary(output: string | null, defaultSandboxNames: Set<string>): NemoClawSummary {
|
||||||
if (!output) {
|
if (!output) {
|
||||||
return {
|
return {
|
||||||
@@ -163,14 +155,6 @@ function readNemoClawRegistry(): NemoClawRegistryData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveSandboxAgent(name: string, id: string | null, registry: NemoClawRegistryData) {
|
|
||||||
const entries = registry.sandboxes ?? {}
|
|
||||||
const directEntry = entries[name] || (id ? entries[id] : undefined)
|
|
||||||
const namedEntry = Object.values(entries).find((entry) => entry?.name === name || Boolean(id && entry?.name === id))
|
|
||||||
const agent = directEntry?.agent || namedEntry?.agent
|
|
||||||
return typeof agent === "string" && agent.trim() ? agent.trim() : "openclaw"
|
|
||||||
}
|
|
||||||
|
|
||||||
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 || "nemoclaw",
|
||||||
@@ -215,7 +199,12 @@ function readHostIdentity() {
|
|||||||
return { hostname: hostname(), address: "127.0.0.1", interface: "lo0" }
|
return { hostname: hostname(), address: "127.0.0.1", interface: "lo0" }
|
||||||
}
|
}
|
||||||
|
|
||||||
async function readSandbox(name: string, defaultSandboxNames: Set<string>, registry: NemoClawRegistryData): Promise<{ summary: SandboxSummary; pod: SandboxItem }> {
|
async function readSandbox(
|
||||||
|
name: string,
|
||||||
|
defaultSandboxNames: Set<string>,
|
||||||
|
listJsonIdentity: NemoClawListJsonIdentity | null,
|
||||||
|
registry: NemoClawRegistryData | null
|
||||||
|
): Promise<{ summary: SandboxSummary; pod: SandboxItem }> {
|
||||||
try {
|
try {
|
||||||
const [{ stdout: detailsStdout }, { stdout: sshStdout }] = await Promise.all([
|
const [{ stdout: detailsStdout }, { stdout: sshStdout }] = await Promise.all([
|
||||||
execOpenShell(["sandbox", "get", name]),
|
execOpenShell(["sandbox", "get", name]),
|
||||||
@@ -229,7 +218,7 @@ async function readSandbox(name: string, defaultSandboxNames: Set<string>, regis
|
|||||||
const sshConfig = sshStdout.trim()
|
const sshConfig = sshStdout.trim()
|
||||||
const sshHostAlias = parseSshHostAlias(sshConfig, sandboxName)
|
const sshHostAlias = parseSshHostAlias(sshConfig, sandboxName)
|
||||||
const isDefault = defaultSandboxNames.has(sandboxName)
|
const isDefault = defaultSandboxNames.has(sandboxName)
|
||||||
const agent = resolveSandboxAgent(sandboxName, sandboxId, registry)
|
const agent = resolveSandboxAgent(sandboxName, sandboxId, listJsonIdentity, registry)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
summary: {
|
summary: {
|
||||||
@@ -274,7 +263,7 @@ async function readSandbox(name: string, defaultSandboxNames: Set<string>, regis
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
const sandboxName = name
|
const sandboxName = name
|
||||||
const isDefault = defaultSandboxNames.has(sandboxName)
|
const isDefault = defaultSandboxNames.has(sandboxName)
|
||||||
const agent = resolveSandboxAgent(sandboxName, sandboxName, registry)
|
const agent = resolveSandboxAgent(sandboxName, sandboxName, listJsonIdentity, registry)
|
||||||
return {
|
return {
|
||||||
summary: {
|
summary: {
|
||||||
id: sandboxName,
|
id: sandboxName,
|
||||||
@@ -322,15 +311,28 @@ export async function GET() {
|
|||||||
try {
|
try {
|
||||||
const { stdout: sandboxListStdout } = await execOpenShell(["sandbox", "list"])
|
const { stdout: sandboxListStdout } = await execOpenShell(["sandbox", "list"])
|
||||||
const names = parseOpenShellSandboxNames(sandboxListStdout)
|
const names = parseOpenShellSandboxNames(sandboxListStdout)
|
||||||
const [nemoclawListResult, nemoclawStatusResult] = names.length > 0
|
let listJsonIdentity: NemoClawListJsonIdentity | null = null
|
||||||
? await Promise.all([
|
let legacyListResult: { stdout: string; stderr: string } | null = null
|
||||||
execNemoclaw(["list"]).catch(() => null),
|
const nemoclawStatusPromise = names.length > 0
|
||||||
execNemoclaw(["status"]).catch(() => null),
|
? execNemoclaw(["status"]).catch(() => null)
|
||||||
])
|
: Promise.resolve(null)
|
||||||
: [null, null]
|
|
||||||
const defaultSandboxNames = parseDefaultSandboxNames(nemoclawListResult?.stdout ?? "")
|
if (names.length > 0) {
|
||||||
const registry = readNemoClawRegistry()
|
const nemoclawListJsonResult = await execNemoclaw(["list", "--json"]).catch(() => null)
|
||||||
const results = await Promise.all(names.map((name) => readSandbox(name, defaultSandboxNames, registry)))
|
listJsonIdentity = parseNemoclawListJson(nemoclawListJsonResult?.stdout ?? "")
|
||||||
|
if (!listJsonIdentity) {
|
||||||
|
legacyListResult = await execNemoclaw(["list"]).catch(() => null)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const nemoclawStatusResult = await nemoclawStatusPromise
|
||||||
|
const defaultSandboxNames = listJsonIdentity
|
||||||
|
? new Set(listJsonIdentity.defaultSandboxNames)
|
||||||
|
: parseDefaultSandboxNames(legacyListResult?.stdout ?? "")
|
||||||
|
const registry = listJsonIdentity ? null : readNemoClawRegistry()
|
||||||
|
const results = await Promise.all(
|
||||||
|
names.map((name) => readSandbox(name, defaultSandboxNames, listJsonIdentity, registry))
|
||||||
|
)
|
||||||
const sandboxes = results.map((result) => result.summary)
|
const sandboxes = results.map((result) => result.summary)
|
||||||
const items = results.map((result) => result.pod)
|
const items = results.map((result) => result.pod)
|
||||||
const nemoclaw = buildNemoClawSummary(nemoclawStatusResult?.stdout ?? null, defaultSandboxNames)
|
const nemoclaw = buildNemoClawSummary(nemoclawStatusResult?.stdout ?? null, defaultSandboxNames)
|
||||||
@@ -363,7 +365,11 @@ export async function GET() {
|
|||||||
explicitInstanceOverride: authority.explicitInstanceOverride,
|
explicitInstanceOverride: authority.explicitInstanceOverride,
|
||||||
usedMappedSandboxInstance: authority.usedMappedSandboxInstance,
|
usedMappedSandboxInstance: authority.usedMappedSandboxInstance,
|
||||||
})),
|
})),
|
||||||
defaultSource: defaultSandboxNames.size > 0 ? "nemoclaw-cli" : "none",
|
defaultSource: listJsonIdentity
|
||||||
|
? "nemoclaw-list-json"
|
||||||
|
: defaultSandboxNames.size > 0
|
||||||
|
? "nemoclaw-cli"
|
||||||
|
: "none",
|
||||||
count: inventoryCount,
|
count: inventoryCount,
|
||||||
message: hasMappedFallbackWithoutInventory
|
message: hasMappedFallbackWithoutInventory
|
||||||
? "Fetched live OpenShell inventory: zero sandboxes reported, so any mapped NemoClaw dashboard should be treated as fallback-only."
|
? "Fetched live OpenShell inventory: zero sandboxes reported, so any mapped NemoClaw dashboard should be treated as fallback-only."
|
||||||
|
|||||||
@@ -78,14 +78,19 @@ function openDashboardUrl(url: string, openInNewTab: boolean) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function displaySandboxAgent(agent?: string) {
|
function displaySandboxAgent(agent?: string) {
|
||||||
if (agent === 'hermes') return 'Hermes'
|
const normalized = typeof agent === 'string' ? agent.trim().toLowerCase() : ''
|
||||||
return 'OpenClaw'
|
if (normalized === 'hermes') return 'Hermes'
|
||||||
|
if (!normalized || normalized === 'openclaw') return 'OpenClaw'
|
||||||
|
if (normalized === 'unknown') return 'Unknown'
|
||||||
|
return agent || 'Unknown'
|
||||||
}
|
}
|
||||||
|
|
||||||
function SandboxTypeLogo({ agent }: { agent?: string }) {
|
function SandboxTypeLogo({ agent }: { agent?: string }) {
|
||||||
const isHermes = agent === 'hermes'
|
const normalized = typeof agent === 'string' ? agent.trim().toLowerCase() : ''
|
||||||
const label = isHermes ? 'Hermes sandbox' : 'OpenClaw sandbox'
|
const isHermes = normalized === 'hermes'
|
||||||
const logoSrc = isHermes ? HERMES_SANDBOX_LOGO : OPENCLAW_SANDBOX_LOGO
|
const isOpenClaw = !normalized || normalized === 'openclaw'
|
||||||
|
const label = isHermes ? 'Hermes sandbox' : isOpenClaw ? 'OpenClaw sandbox' : 'Non-OpenClaw sandbox'
|
||||||
|
const logoSrc = isHermes ? HERMES_SANDBOX_LOGO : isOpenClaw ? OPENCLAW_SANDBOX_LOGO : null
|
||||||
return (
|
return (
|
||||||
<span
|
<span
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
@@ -93,10 +98,16 @@ function SandboxTypeLogo({ agent }: { agent?: string }) {
|
|||||||
className={`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border shadow-inner ${
|
className={`flex h-8 w-8 shrink-0 items-center justify-center rounded-md border shadow-inner ${
|
||||||
isHermes
|
isHermes
|
||||||
? 'border-sky-300/60 bg-sky-500/15'
|
? 'border-sky-300/60 bg-sky-500/15'
|
||||||
: 'border-rose-300/60 bg-rose-500/15'
|
: isOpenClaw
|
||||||
|
? 'border-rose-300/60 bg-rose-500/15'
|
||||||
|
: 'border-slate-300/60 bg-slate-500/15 text-[10px] font-semibold uppercase tracking-wide text-[var(--foreground-dim)]'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
{logoSrc ? (
|
||||||
<span aria-hidden="true" className="h-6 w-6 bg-contain bg-center bg-no-repeat" style={{ backgroundImage: `url(${logoSrc})` }} />
|
<span aria-hidden="true" className="h-6 w-6 bg-contain bg-center bg-no-repeat" style={{ backgroundImage: `url(${logoSrc})` }} />
|
||||||
|
) : (
|
||||||
|
<span aria-hidden="true">?</span>
|
||||||
|
)}
|
||||||
</span>
|
</span>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
export type NemoClawRegistryData = {
|
||||||
|
sandboxes?: Record<string, { name?: string; agent?: string | null }>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NemoClawListJsonIdentity = {
|
||||||
|
agentsByName: Record<string, string>
|
||||||
|
defaultSandboxNames: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizeAgentIdentifier(agent: unknown): string | null
|
||||||
|
export function parseNemoclawListJson(output: string): NemoClawListJsonIdentity | null
|
||||||
|
export function parseDefaultSandboxNames(output: string): Set<string>
|
||||||
|
export function resolveSandboxAgent(
|
||||||
|
name: string,
|
||||||
|
id: string | null,
|
||||||
|
listJsonIdentity: NemoClawListJsonIdentity | null,
|
||||||
|
registry: NemoClawRegistryData | null
|
||||||
|
): string
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
function canonicalizeAgent(value) {
|
||||||
|
return value
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/[^a-z0-9]+/g, '-')
|
||||||
|
.replace(/^-+|-+$/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
|
export function normalizeAgentIdentifier(agent) {
|
||||||
|
if (typeof agent !== 'string') return null
|
||||||
|
const trimmed = agent.trim()
|
||||||
|
if (!trimmed) return null
|
||||||
|
|
||||||
|
const compact = trimmed.toLowerCase().replace(/[^a-z0-9]/g, '')
|
||||||
|
if (compact === 'openclaw') return 'openclaw'
|
||||||
|
if (compact === 'nemohermes' || compact === 'hermes') return 'hermes'
|
||||||
|
if (compact.includes('openclaw')) return 'openclaw'
|
||||||
|
if (compact.includes('hermes')) return 'hermes'
|
||||||
|
|
||||||
|
const canonical = canonicalizeAgent(trimmed)
|
||||||
|
if (!canonical) return null
|
||||||
|
if (canonical === 'unknown') return 'unknown'
|
||||||
|
return canonical
|
||||||
|
}
|
||||||
|
|
||||||
|
export function parseNemoclawListJson(output) {
|
||||||
|
if (typeof output !== 'string' || output.trim().length === 0) return null
|
||||||
|
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(output)
|
||||||
|
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null
|
||||||
|
if (parsed.schemaVersion !== 1) return null
|
||||||
|
if (!Array.isArray(parsed.sandboxes)) return null
|
||||||
|
|
||||||
|
const agentsByName = {}
|
||||||
|
const defaultSandboxNames = []
|
||||||
|
|
||||||
|
for (const entry of parsed.sandboxes) {
|
||||||
|
if (!entry || typeof entry !== 'object' || Array.isArray(entry)) continue
|
||||||
|
const name = typeof entry.name === 'string' ? entry.name.trim() : ''
|
||||||
|
if (!name) continue
|
||||||
|
|
||||||
|
const normalized = normalizeAgentIdentifier(entry.agent)
|
||||||
|
agentsByName[name] = normalized || 'unknown'
|
||||||
|
if (entry.isDefault === true) defaultSandboxNames.push(name)
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
agentsByName,
|
||||||
|
defaultSandboxNames,
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function parseDefaultSandboxNames(output) {
|
||||||
|
return new Set(
|
||||||
|
output
|
||||||
|
.split(/\r?\n/)
|
||||||
|
.map((entry) => entry.replace(/\u001b\[[0-9;]*m/g, ''))
|
||||||
|
.filter((entry) => /^\s{2,}[\w.-]+(?:\s+\*)?\s*$/.test(entry) && entry.includes('*'))
|
||||||
|
.map((entry) => entry.replace('*', '').trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function resolveSandboxAgent(name, id, listJsonIdentity, registry) {
|
||||||
|
if (listJsonIdentity) {
|
||||||
|
const direct = listJsonIdentity.agentsByName[name] || (id ? listJsonIdentity.agentsByName[id] : null)
|
||||||
|
return direct || 'unknown'
|
||||||
|
}
|
||||||
|
|
||||||
|
const entries = registry?.sandboxes || {}
|
||||||
|
const directEntry = entries[name] || (id ? entries[id] : undefined)
|
||||||
|
const namedEntry = Object.values(entries).find((entry) => entry?.name === name || Boolean(id && entry?.name === id))
|
||||||
|
const normalized = normalizeAgentIdentifier(directEntry?.agent ?? namedEntry?.agent)
|
||||||
|
|
||||||
|
if (normalized) return normalized
|
||||||
|
return 'openclaw'
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import assert from 'node:assert/strict'
|
||||||
|
import {
|
||||||
|
normalizeAgentIdentifier,
|
||||||
|
parseNemoclawListJson,
|
||||||
|
resolveSandboxAgent,
|
||||||
|
} from '../app/lib/nemoclawIdentity.mjs'
|
||||||
|
|
||||||
|
const jsonInventory = JSON.stringify({
|
||||||
|
schemaVersion: 1,
|
||||||
|
sandboxes: [
|
||||||
|
{ name: 'my-hermes', agent: 'Hermes', isDefault: true },
|
||||||
|
{ name: 'gateway-recovered', agent: 'unknown', isDefault: false },
|
||||||
|
{ name: 'custom-agent', agent: 'LangChain DeepAgents Code', isDefault: false },
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
const parsed = parseNemoclawListJson(jsonInventory)
|
||||||
|
assert.ok(parsed, 'schemaVersion=1 NemoClaw JSON inventory should parse')
|
||||||
|
assert.deepEqual(parsed.defaultSandboxNames, ['my-hermes'])
|
||||||
|
assert.equal(parsed.agentsByName['my-hermes'], 'hermes')
|
||||||
|
assert.equal(parsed.agentsByName['gateway-recovered'], 'unknown')
|
||||||
|
assert.equal(parsed.agentsByName['custom-agent'], 'langchain-deepagents-code')
|
||||||
|
|
||||||
|
assert.equal(resolveSandboxAgent('my-hermes', null, parsed, null), 'hermes')
|
||||||
|
assert.equal(resolveSandboxAgent('gateway-recovered', null, parsed, null), 'unknown')
|
||||||
|
assert.equal(resolveSandboxAgent('missing-from-json', null, parsed, null), 'unknown')
|
||||||
|
|
||||||
|
assert.equal(normalizeAgentIdentifier('OpenClaw'), 'openclaw')
|
||||||
|
assert.equal(normalizeAgentIdentifier('nemohermes'), 'hermes')
|
||||||
|
assert.equal(normalizeAgentIdentifier('unknown'), 'unknown')
|
||||||
|
|
||||||
|
const legacyRegistry = {
|
||||||
|
sandboxes: {
|
||||||
|
'legacy-null-agent': { name: 'legacy-null-agent', agent: null },
|
||||||
|
'explicit-hermes': { name: 'explicit-hermes', agent: 'Hermes' },
|
||||||
|
'explicit-unknown': { name: 'explicit-unknown', agent: 'unknown' },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.equal(resolveSandboxAgent('legacy-null-agent', null, null, legacyRegistry), 'openclaw')
|
||||||
|
assert.equal(resolveSandboxAgent('explicit-hermes', null, null, legacyRegistry), 'hermes')
|
||||||
|
assert.equal(resolveSandboxAgent('explicit-unknown', null, null, legacyRegistry), 'unknown')
|
||||||
|
|
||||||
|
assert.equal(parseNemoclawListJson('{'), null, 'invalid JSON must fail closed')
|
||||||
|
assert.equal(parseNemoclawListJson(JSON.stringify({ schemaVersion: 2, sandboxes: [] })), null, 'unsupported schema versions must fail closed')
|
||||||
|
|
||||||
|
console.log('nemoclaw-identity-resolution-check: PASS json identity resolution assertions')
|
||||||
@@ -190,7 +190,7 @@ assert.doesNotMatch(deleteRouteSource, /Pruned NemoClaw registry entry without d
|
|||||||
assert.match(deleteRouteSource, /openShellAlreadyGone/, 'delete route must tolerate sandboxes that OpenShell already deleted while NemoClaw still has registry state')
|
assert.match(deleteRouteSource, /openShellAlreadyGone/, 'delete route must tolerate sandboxes that OpenShell already deleted while NemoClaw still has registry state')
|
||||||
assert.doesNotMatch(deleteRouteSource, /isGatewayRecoverable|recoverableGateway/, 'delete route must not include the later gateway-repair branching')
|
assert.doesNotMatch(deleteRouteSource, /isGatewayRecoverable|recoverableGateway/, 'delete route must not include the later gateway-repair branching')
|
||||||
assert.match(telemetryRouteSource, /const names = parseOpenShellSandboxNames\(sandboxListStdout\)/, 'telemetry must derive inventory from OpenShell before consulting NemoClaw')
|
assert.match(telemetryRouteSource, /const names = parseOpenShellSandboxNames\(sandboxListStdout\)/, 'telemetry must derive inventory from OpenShell before consulting NemoClaw')
|
||||||
assert.match(telemetryRouteSource, /names\.length > 0[\s\S]*execNemoclaw\(\["list"\]\)[\s\S]*execNemoclaw\(\["status"\]\)/, 'telemetry must skip NemoClaw list/status when OpenShell reports zero live sandboxes')
|
assert.match(telemetryRouteSource, /names\.length > 0[\s\S]*execNemoclaw\(\["status"\]\)[\s\S]*execNemoclaw\(\["list", "--json"\]\)/, 'telemetry must skip NemoClaw list/status when OpenShell reports zero live sandboxes and prefer nemoclaw list --json when sandboxes exist')
|
||||||
assert.match(telemetryRouteSource, /readNemoClawRegistry/, 'telemetry must read the NemoClaw registry for agent metadata')
|
assert.match(telemetryRouteSource, /readNemoClawRegistry/, 'telemetry must read the NemoClaw registry for agent metadata')
|
||||||
assert.match(telemetryRouteSource, /resolveSandboxAgent/, 'telemetry must resolve OpenClaw versus Hermes agent metadata')
|
assert.match(telemetryRouteSource, /resolveSandboxAgent/, 'telemetry must resolve OpenClaw versus Hermes agent metadata')
|
||||||
assert.match(telemetryRouteSource, /"nemoclaw\.ai\/agent": agent/, 'telemetry pod labels must include the selected NemoClaw agent')
|
assert.match(telemetryRouteSource, /"nemoclaw\.ai\/agent": agent/, 'telemetry pod labels must include the selected NemoClaw agent')
|
||||||
@@ -200,7 +200,7 @@ assert.match(sandboxListSource, /function displaySandboxAgent\(agent\?: string\)
|
|||||||
assert.match(sandboxListSource, /function SandboxTypeLogo\(\{ agent \}/, 'sandbox list must render per-agent sandbox logos')
|
assert.match(sandboxListSource, /function SandboxTypeLogo\(\{ agent \}/, 'sandbox list must render per-agent sandbox logos')
|
||||||
assert.match(sandboxListSource, /const OPENCLAW_SANDBOX_LOGO = '\/sandbox-logos\/openclaw\.svg'/, 'OpenClaw sandboxes must use the local OpenClaw favicon asset')
|
assert.match(sandboxListSource, /const OPENCLAW_SANDBOX_LOGO = '\/sandbox-logos\/openclaw\.svg'/, 'OpenClaw sandboxes must use the local OpenClaw favicon asset')
|
||||||
assert.match(sandboxListSource, /const HERMES_SANDBOX_LOGO = '\/sandbox-logos\/hermes\.png'/, 'Hermes sandboxes must use the local Hermes favicon asset')
|
assert.match(sandboxListSource, /const HERMES_SANDBOX_LOGO = '\/sandbox-logos\/hermes\.png'/, 'Hermes sandboxes must use the local Hermes favicon asset')
|
||||||
assert.match(sandboxListSource, /const logoSrc = isHermes \? HERMES_SANDBOX_LOGO : OPENCLAW_SANDBOX_LOGO/, 'sandbox type logo must switch assets by agent type')
|
assert.match(sandboxListSource, /const logoSrc = isHermes \? HERMES_SANDBOX_LOGO : isOpenClaw \? OPENCLAW_SANDBOX_LOGO : null/, 'sandbox type logo must avoid misclassifying unknown agents as OpenClaw')
|
||||||
assert.ok(openClawLogoStat.size > 0, 'OpenClaw favicon asset must be vendored locally')
|
assert.ok(openClawLogoStat.size > 0, 'OpenClaw favicon asset must be vendored locally')
|
||||||
assert.ok(hermesLogoStat.size > 0, 'Hermes favicon asset must be vendored locally')
|
assert.ok(hermesLogoStat.size > 0, 'Hermes favicon asset must be vendored locally')
|
||||||
assert.match(sandboxListSource, /selectedSandbox\?\.agent === 'hermes'/, 'sandbox operations must detect Hermes sandboxes')
|
assert.match(sandboxListSource, /selectedSandbox\?\.agent === 'hermes'/, 'sandbox operations must detect Hermes sandboxes')
|
||||||
|
|||||||
Reference in New Issue
Block a user