Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions nemoclaw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"nemoclaw-runner": "./dist/blueprint/runner.js"
},
"openclaw": {
"extensions": [
"./dist/index.js"
Expand Down
10 changes: 10 additions & 0 deletions nemoclaw/src/blueprint/runner.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -448,3 +449,12 @@ export async function main(argv: string[] = process.argv.slice(2)): Promise<void
throw new Error(`Unknown action '${String(action)}'. Use: plan, apply, status, rollback`);
}
}

// Auto-invoke when run as a CLI binary (not when imported as a module).
import { fileURLToPath } from "node:url";
if (process.argv[1] === fileURLToPath(import.meta.url)) {
main().catch((e: unknown) => {
process.stderr.write((e instanceof Error ? e.message : String(e)) + "\n");
process.exit(1);
});
}
3 changes: 3 additions & 0 deletions nemoclaw/src/blueprint/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
* - Restore: push snapshot contents into sandbox filesystem
* - Cutover: rename host config to archived, point OpenClaw at sandbox
* - Rollback: restore host config from snapshot
*
* TODO(#977): Wire into the `nemoclaw migrate` command alongside migration-state.ts.
* These functions are tested and ready; they need a CLI entry point.
*/

import type { Dirent } from "node:fs";
Expand Down
7 changes: 7 additions & 0 deletions nemoclaw/src/commands/migration-state.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

/**
* Migration state detection and snapshot bundling for the `nemoclaw migrate` flow.
*
* TODO(#977): Wire into the `nemoclaw migrate` command alongside snapshot.ts.
* This module is tested and ready; it needs a CLI entry point.
*/

import {
chmodSync,
copyFileSync,
Expand Down