架构

NemoClaw 有两个主要组件:一个与 OpenClaw CLI 集成的 TypeScript 插件,以及一个编排 OpenShell 资源的 Python 蓝图。

NemoClaw 插件

插件是一个精简的 TypeScript 包,在 openclaw nemoclaw 下注册命令。 它与 OpenClaw gateway 在同一进程中运行,处理面向用户的 CLI 交互。

nemoclaw/
├── src/
│   ├── index.ts                    Plugin entry — registers all commands
│   ├── cli.ts                      Commander.js subcommand wiring
│   ├── commands/
│   │   ├── launch.ts               Fresh install into OpenShell
│   │   ├── connect.ts              Interactive shell into sandbox
│   │   ├── status.ts               Blueprint run state + sandbox health
│   │   ├── logs.ts                 Stream blueprint and sandbox logs
│   │   └── slash.ts                /nemoclaw chat command handler
│   └── blueprint/
│       ├── resolve.ts              Version resolution, cache management
│       ├── fetch.ts                Download blueprint from OCI registry
│       ├── verify.ts               Digest verification, compatibility checks
│       ├── exec.ts                 Subprocess execution of blueprint runner
│       └── state.ts                Persistent state (run IDs)
├── openclaw.plugin.json            Plugin manifest
└── package.json                    Commands declared under openclaw.extensions

NemoClaw 蓝图

蓝图是一个版本化的 Python 制品,拥有独立的发布流程。 插件负责解析、验证和作为子进程执行蓝图。 蓝图驱动与 OpenShell CLI 的所有交互。

nemoclaw-blueprint/
├── blueprint.yaml                  Manifest — version, profiles, compatibility
├── orchestrator/
│   └── runner.py                   CLI runner — plan / apply / status
├── policies/
│   └── openclaw-sandbox.yaml       Strict baseline network + filesystem policy

蓝图生命周期

flowchart LR
    A[resolve] --> B[verify digest]
    B --> C[plan]
    C --> D[apply]
    D --> E[status]
  1. 解析。 插件定位蓝图制品,并根据 blueprint.yaml 中的 min_openshell_versionmin_openclaw_version 约束检查版本。
  2. 验证。 插件根据预期值检查制品摘要。
  3. 规划。 运行器确定需要创建或更新哪些 OpenShell 资源,如 gateway、提供者、sandbox、推理路由和策略。
  4. 应用。 运行器通过调用 openshell CLI 命令执行规划。
  5. 状态。 运行器报告当前状态。

沙箱环境

沙箱运行 ghcr.io/nvidia/openshell-community/sandboxes/openclaw 容器镜像。在沙箱内部:

  • OpenClaw 运行时已预装 NemoClaw 插件。
  • 推理调用通过 OpenShell 路由到配置的提供者。
  • 网络出站受 openclaw-sandbox.yaml 中基线策略的限制。
  • 文件系统访问被限制在 /sandbox/tmp(可读写),系统路径为只读。

推理路由

来自代理的推理请求不会直接离开沙箱。 OpenShell 拦截它们并路由到配置的提供者:

Agent (sandbox)  ──▶  OpenShell gateway  ──▶  NVIDIA cloud (build.nvidia.com)

有关提供者配置详情,请参阅推理配置