架構
NemoClaw 有兩個主要元件:一個整合 OpenClaw CLI 的 TypeScript 外掛,以及一個編排 OpenShell 資源的 Python 藍圖。
NemoClaw 外掛
外掛是一個精簡的 TypeScript 套件,在 openclaw nemoclaw 底下註冊指令。
它與 OpenClaw gateway 在同一個程序中運行,處理面向使用者的 CLI 互動。
nemoclaw/
├── src/
│ ├── index.ts 外掛進入點 — 註冊所有指令
│ ├── cli.ts Commander.js 子指令串接
│ ├── commands/
│ │ ├── launch.ts 全新安裝到 OpenShell
│ │ ├── connect.ts 進入沙箱的互動式 shell
│ │ ├── status.ts 藍圖執行狀態 + 沙箱健康
│ │ ├── logs.ts 串流藍圖和沙箱日誌
│ │ └── slash.ts /nemoclaw 聊天指令處理器
│ └── blueprint/
│ ├── resolve.ts 版本解析、快取管理
│ ├── fetch.ts 從 OCI registry 下載藍圖
│ ├── verify.ts 摘要驗證、相容性檢查
│ ├── exec.ts 子程序執行藍圖執行器
│ └── state.ts 持久狀態(執行 ID)
├── openclaw.plugin.json 外掛 manifest
└── package.json 指令宣告在 openclaw.extensions 下
NemoClaw 藍圖
藍圖是一個有自己發佈串流的版本化 Python 製品。 外掛負責解析、驗證,並以子程序方式執行藍圖。 藍圖驅動所有與 OpenShell CLI 的互動。
nemoclaw-blueprint/
├── blueprint.yaml Manifest — 版本、設定檔、相容性
├── orchestrator/
│ └── runner.py CLI 執行器 — plan / apply / status
├── policies/
│ └── openclaw-sandbox.yaml 嚴格的基線網路 + 檔案系統政策
藍圖生命週期
flowchart LR
A[resolve] --> B[verify digest]
B --> C[plan]
C --> D[apply]
D --> E[status]
- Resolve. 外掛找到藍圖製品,並根據
blueprint.yaml中的min_openshell_version和min_openclaw_version約束檢查版本。 - Verify. 外掛比對製品摘要與預期值。
- Plan. 執行器判斷需要建立或更新哪些 OpenShell 資源,如 gateway、提供者、沙箱、推論路由和政策。
- Apply. 執行器呼叫
openshellCLI 指令來執行計畫。 - Status. 執行器回報目前狀態。
沙箱環境
沙箱運行的是
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)
提供者設定細節請參閱推論設定。