Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/lib/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,25 @@ async function promptValidatedSandboxName() {
// Validate: RFC 1123 subdomain — lowercase alphanumeric and hyphens,
// must start with a letter (not a digit) to satisfy Kubernetes naming.
if (/^[a-z]([a-z0-9-]*[a-z0-9])?$/.test(sandboxName)) {
// Reject names that collide with global CLI commands.
// A sandbox named 'status' makes 'nemoclaw status connect' route to
// the global status command instead of the sandbox.
const RESERVED_NAMES = new Set([
"onboard", "list", "deploy", "setup", "setup-spark",
"start", "stop", "status", "debug", "uninstall",
"credentials", "help",
]);
if (RESERVED_NAMES.has(sandboxName)) {
console.error(` Reserved name: '${sandboxName}' is a NemoClaw CLI command.`);
console.error(" Choose a different name to avoid routing conflicts.");
if (isNonInteractive()) {
process.exit(1);
}
if (attempt < MAX_ATTEMPTS - 1) {
console.error(" Please try again.\n");
}
continue;
}
return sandboxName;
}

Expand Down
Loading