Prefer installed NemoClaw source for onboarding

This commit is contained in:
Codex
2026-04-29 16:55:24 +00:00
parent e8201b1d42
commit 772d331831
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -163,9 +163,9 @@ export const NEMOCLAW_SETUP = firstExisting(NEMOCLAW_SETUP_CANDIDATES, "")
export const NEMOCLAW_CWD_CANDIDATES = unique([
process.env.NEMOCLAW_CWD,
HOME ? path.join(HOME, ".nemoclaw/source") : undefined,
NEMOCLAW_SETUP ? path.dirname(path.dirname(NEMOCLAW_SETUP)) : undefined,
NEMOCLAW_BIN.includes("/") ? path.dirname(path.dirname(NEMOCLAW_BIN)) : undefined,
HOME ? path.join(HOME, ".nemoclaw/source") : undefined,
HOME ? path.join(HOME, "NemoClaw") : undefined,
HOME ? path.join(HOME, "nemoclaw") : undefined,
])
+5
View File
@@ -58,6 +58,11 @@ assert.match(hostCommandsSource, /\.nemoclaw\/source\/scripts\/setup\.sh/, 'host
assert.match(hostCommandsSource, /discoverHomeFiles\("scripts\/setup\.sh"\)/, 'runtime command resolution must scan user home directories for setup.sh')
assert.match(hostCommandsSource, /discoverHomeFiles\("bin\/nemoclaw\.js"\)/, 'runtime command resolution must scan user home directories for nemoclaw.js')
assert.match(hostCommandsSource, /export const NEMOCLAW_SETUP_CANDIDATES/, 'runtime command resolution must expose searched setup candidates')
assert.ok(
hostCommandsSource.indexOf('HOME ? path.join(HOME, ".nemoclaw/source") : undefined') <
hostCommandsSource.indexOf('NEMOCLAW_SETUP ? path.dirname(path.dirname(NEMOCLAW_SETUP)) : undefined'),
'NemoClaw onboard must prefer the installed package root over stale legacy checkout setup paths',
)
assert.doesNotMatch(hostCommandsSource, /\/Users\/markmckeen|\/home\/nvidia/, 'host command resolution must not bake in developer machine paths')
assert.match(mcpBrokerUrlSource, /discoverOpenShellDockerGateway/, 'MCP broker URL generation must discover the active OpenShell Docker gateway')
assert.match(mcpBrokerUrlSource, /OPEN_SHELL_CONTAINER/, 'MCP broker URL generation must respect the configured cluster container')