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
9 changes: 0 additions & 9 deletions nemoclaw/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
/**
* NemoClaw β€” OpenClaw Plugin for OpenShell
*
* Uses the real OpenClaw plugin API. Types defined locally are minimal stubs
* that match the OpenClaw SDK interfaces available at runtime via
* `openclaw/plugin-sdk`. We define them here because the SDK package is only
* available inside the OpenClaw host process and cannot be imported at build
* time.
*/
import type { Command } from "commander";
/** Subset of OpenClawConfig that we actually read. */
export interface OpenClawConfig {
Expand Down
2 changes: 1 addition & 1 deletion nemoclaw/dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 35 additions & 2 deletions nemoclaw/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nemoclaw/dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 23 additions & 2 deletions nemoclaw/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* time.
*/

import { execFileSync } from "node:child_process";
import type { Command } from "commander";
import { registerCliCommands } from "./cli.js";
import { handleSlashCommand } from "./commands/slash.js";
Expand Down Expand Up @@ -244,8 +245,28 @@ export default function register(api: OpenClawPluginApi): void {
],
});

const bannerEndpoint = onboardCfg?.endpointType ?? "build.nvidia.com";
const bannerModel = onboardCfg?.model ?? "nvidia/nemotron-3-super-120b-a12b";
// Resolve banner values: prefer onboard config, fall back to live
// OpenShell inference state, then to hardcoded defaults.
let bannerEndpoint: string = onboardCfg?.endpointType ?? "";
let bannerModel: string = onboardCfg?.model ?? "";

if (!bannerEndpoint || !bannerModel) {
try {
const raw = execFileSync("openshell", ["inference", "get", "--json"], {
encoding: "utf-8",
timeout: 3000,
stdio: ["pipe", "pipe", "pipe"],
});
const parsed = JSON.parse(raw) as { provider?: string; model?: string; endpoint?: string };
if (!bannerEndpoint) bannerEndpoint = parsed.endpoint ?? parsed.provider ?? "";
if (!bannerModel) bannerModel = parsed.model ?? "";
} catch {
// openshell not available or not configured β€” use defaults
}
}

if (!bannerEndpoint) bannerEndpoint = "build.nvidia.com";
if (!bannerModel) bannerModel = "nvidia/nemotron-3-super-120b-a12b";

api.logger.info("");
api.logger.info(" β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”");
Expand Down