Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
116111c
refactor(cli): harden oclif bridge
cv Apr 30, 2026
5e997cb
test(cli): relax uninstall helper timeouts
cv Apr 30, 2026
88cd958
refactor(cli): migrate status and tunnel commands to oclif
cv Apr 30, 2026
3f748d6
refactor(cli): migrate debug uninstall and gateway-token to oclif
cv Apr 30, 2026
0bc877a
refactor(cli): migrate credentials commands to oclif
cv Apr 30, 2026
3fd15fc
refactor(cli): migrate sandbox inspection commands to oclif
cv Apr 30, 2026
81c62bb
refactor(cli): migrate maintenance commands to oclif
cv Apr 30, 2026
7d6a6fb
refactor(cli): migrate sandbox logs command to oclif
cv May 1, 2026
3f17a4f
refactor(cli): migrate skill install command to oclif
cv May 1, 2026
0fb3c41
refactor(cli): migrate snapshot list and create to oclif
cv May 1, 2026
d11eeee
refactor(cli): migrate shields commands to oclif
cv May 1, 2026
74806ce
refactor(cli): migrate channels mutation commands to oclif
cv May 1, 2026
e637e84
refactor(cli): migrate policy mutation commands to oclif
cv May 1, 2026
ee20dfb
refactor(cli): migrate snapshot restore command to oclif
cv May 1, 2026
8d3a568
refactor(cli): migrate destroy command to oclif
cv May 1, 2026
b447f36
refactor(cli): migrate rebuild command to oclif
cv May 1, 2026
02431db
refactor(cli): migrate connect command to oclif
cv May 1, 2026
37ce2ff
refactor(cli): migrate deploy command to oclif
cv May 1, 2026
d3e218e
refactor(cli): migrate onboard aliases to oclif
cv May 1, 2026
df05a3e
refactor(cli): migrate help and version commands to oclif
cv May 1, 2026
3edcf2e
refactor(cli): centralize legacy oclif dispatch
cv May 1, 2026
47df3b5
refactor(cli): drop trivial oclif wrapper helpers
cv May 1, 2026
460173c
refactor(cli): centralize sandbox runtime bridge
cv May 1, 2026
31c0195
test(cli): keep dispatch table out of coverage ratchet
cv May 1, 2026
bad424d
refactor(cli): centralize policy and channels runtime bridge
cv May 1, 2026
5214142
refactor(cli): centralize global runtime bridge
cv May 1, 2026
5fca48f
refactor(cli): collapse runtime bridge exports
cv May 1, 2026
9616295
refactor(cli): introduce sandbox runtime action facade
cv May 1, 2026
0fbc267
merge(main): resolve sandbox action facade conflicts
cv May 2, 2026
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
4 changes: 2 additions & 2 deletions src/lib/connect-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { Args, Command, Flags } from "@oclif/core";

import { CLI_NAME } from "./branding";
import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { connectSandbox } from "./sandbox-runtime-actions";

export default class ConnectCliCommand extends Command {
static id = "sandbox:connect";
Expand All @@ -30,7 +30,7 @@ export default class ConnectCliCommand extends Command {
console.error(` Usage: ${CLI_NAME} <name> connect [--probe-only]`);
process.exit(1);
}
await getNemoClawRuntimeBridge().sandboxConnect(args.sandboxName, {
await connectSandbox(args.sandboxName, {
probeOnly: Boolean(flags["probe-only"]),
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/destroy-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Args, Command, Flags } from "@oclif/core";

import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { destroySandbox } from "./sandbox-runtime-actions";

export default class DestroyCliCommand extends Command {
static id = "sandbox:destroy";
Expand All @@ -27,6 +27,6 @@ export default class DestroyCliCommand extends Command {
const legacyArgs: string[] = [];
if (flags.yes) legacyArgs.push("--yes");
if (flags.force) legacyArgs.push("--force");
await getNemoClawRuntimeBridge().sandboxDestroy(args.sandboxName, legacyArgs);
await destroySandbox(args.sandboxName, legacyArgs);
}
}
4 changes: 2 additions & 2 deletions src/lib/rebuild-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Args, Command, Flags } from "@oclif/core";

import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { rebuildSandbox } from "./sandbox-runtime-actions";

export default class RebuildCliCommand extends Command {
static id = "sandbox:rebuild";
Expand All @@ -29,6 +29,6 @@ export default class RebuildCliCommand extends Command {
if (flags.yes) legacyArgs.push("--yes");
if (flags.force) legacyArgs.push("--force");
if (flags.verbose) legacyArgs.push("--verbose");
await getNemoClawRuntimeBridge().sandboxRebuild(args.sandboxName, legacyArgs);
await rebuildSandbox(args.sandboxName, legacyArgs);
}
}
3 changes: 2 additions & 1 deletion src/lib/sandbox-inspection-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Args, Command, Flags } from "@oclif/core";
import { CLI_NAME } from "./branding";
import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import * as sandboxConfig from "./sandbox-config";
import { showSandboxStatus } from "./sandbox-runtime-actions";

const sandboxNameArg = Args.string({
name: "sandbox",
Expand All @@ -30,7 +31,7 @@ export class SandboxStatusCommand extends Command {

public async run(): Promise<void> {
const { args } = await this.parse(SandboxStatusCommand);
await getNemoClawRuntimeBridge().sandboxStatus(args.sandboxName);
await showSandboxStatus(args.sandboxName);
}
}

Expand Down
7 changes: 3 additions & 4 deletions src/lib/sandbox-logs-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@

import { Args, Command, Flags } from "@oclif/core";

import type { NemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { showSandboxLogs } from "./sandbox-runtime-actions";

let runtimeBridgeFactory = (): Pick<NemoClawRuntimeBridge, "sandboxLogs"> => getNemoClawRuntimeBridge();
let runtimeBridgeFactory = () => ({ sandboxLogs: showSandboxLogs });

export function setSandboxLogsRuntimeBridgeFactoryForTest(
factory: () => Pick<NemoClawRuntimeBridge, "sandboxLogs">,
factory: () => { sandboxLogs: (sandboxName: string, follow: boolean) => void },
): void {
runtimeBridgeFactory = factory;
}
Expand Down
41 changes: 41 additions & 0 deletions src/lib/sandbox-runtime-actions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

/* v8 ignore start -- transitional action facade until implementations leave src/nemoclaw.ts. */

import type { SandboxConnectOptions } from "./nemoclaw-runtime-bridge";
import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";

export async function connectSandbox(
sandboxName: string,
options?: SandboxConnectOptions,
): Promise<void> {
await getNemoClawRuntimeBridge().sandboxConnect(sandboxName, options);
}

export async function showSandboxStatus(sandboxName: string): Promise<void> {
await getNemoClawRuntimeBridge().sandboxStatus(sandboxName);
}

export function showSandboxLogs(sandboxName: string, follow: boolean): void {
getNemoClawRuntimeBridge().sandboxLogs(sandboxName, follow);
}

export async function destroySandbox(sandboxName: string, args: string[] = []): Promise<void> {
await getNemoClawRuntimeBridge().sandboxDestroy(sandboxName, args);
}

export async function rebuildSandbox(sandboxName: string, args: string[] = []): Promise<void> {
await getNemoClawRuntimeBridge().sandboxRebuild(sandboxName, args);
}

export async function installSandboxSkill(
sandboxName: string,
args: string[] = [],
): Promise<void> {
await getNemoClawRuntimeBridge().sandboxSkillInstall(sandboxName, args);
}

export async function runSandboxSnapshot(sandboxName: string, args: string[]): Promise<void> {
await getNemoClawRuntimeBridge().sandboxSnapshot(sandboxName, args);
}
7 changes: 3 additions & 4 deletions src/lib/skill-install-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@

import { Args, Command, Flags } from "@oclif/core";

import type { NemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { installSandboxSkill } from "./sandbox-runtime-actions";

let runtimeBridgeFactory = (): Pick<NemoClawRuntimeBridge, "sandboxSkillInstall"> => getNemoClawRuntimeBridge();
let runtimeBridgeFactory = () => ({ sandboxSkillInstall: installSandboxSkill });

export function setSkillInstallRuntimeBridgeFactoryForTest(
factory: () => Pick<NemoClawRuntimeBridge, "sandboxSkillInstall">,
factory: () => { sandboxSkillInstall: (sandboxName: string, args?: string[]) => Promise<void> },
): void {
runtimeBridgeFactory = factory;
}
Expand Down
9 changes: 5 additions & 4 deletions src/lib/snapshot-cli-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

import { Args, Command, Flags } from "@oclif/core";

import type { NemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { getNemoClawRuntimeBridge } from "./nemoclaw-runtime-bridge";
import { runSandboxSnapshot } from "./sandbox-runtime-actions";

let runtimeBridgeFactory = (): Pick<NemoClawRuntimeBridge, "sandboxSnapshot"> => getNemoClawRuntimeBridge();
let runtimeBridgeFactory = () => ({ sandboxSnapshot: runSandboxSnapshot });

export function setSnapshotRuntimeBridgeFactoryForTest(factory: () => Pick<NemoClawRuntimeBridge, "sandboxSnapshot">): void {
export function setSnapshotRuntimeBridgeFactoryForTest(
factory: () => { sandboxSnapshot: (sandboxName: string, args: string[]) => Promise<void> },
): void {
runtimeBridgeFactory = factory;
}

Expand Down
Loading