mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-31 11:51:22 +00:00
docs(i18n): sync zh-CN node exec wording
This commit is contained in:
@@ -1048,7 +1048,6 @@ heartbeat 控制(Gateway 网关 RPC)。
|
||||
- `nodes reject <requestId>`
|
||||
- `nodes rename --node <id|name|ip> --name <displayName>`
|
||||
- `nodes invoke --node <id|name|ip> --command <command> [--params <json>] [--invoke-timeout <ms>] [--idempotency-key <key>]`
|
||||
- `nodes run --node <id|name|ip> [--cwd <path>] [--env KEY=VAL] [--command-timeout <ms>] [--needs-screen-recording] [--invoke-timeout <ms>] <command...>`(mac 节点或无头 node host)
|
||||
- `nodes notify --node <id|name|ip> [--title <text>] [--body <text>] [--sound <name>] [--priority <passive|active|timeSensitive>] [--delivery <system|overlay|auto>] [--invoke-timeout <ms>]`(仅 mac)
|
||||
|
||||
相机:
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
---
|
||||
read_when:
|
||||
- 你正在管理已配对的节点(摄像头、屏幕、画布)
|
||||
- 你正在管理已配对节点(相机、屏幕、画布)
|
||||
- 你需要批准请求或调用节点命令
|
||||
summary: "`openclaw nodes` 的 CLI 参考(列表/状态/批准/调用,摄像头/画布/屏幕)"
|
||||
title: nodes
|
||||
summary: "`openclaw nodes` 的 CLI 参考(列表/状态/批准/调用、相机/画布/屏幕)"
|
||||
title: 节点
|
||||
x-i18n:
|
||||
generated_at: "2026-02-03T10:04:26Z"
|
||||
model: claude-opus-4-5
|
||||
provider: pi
|
||||
source_hash: 23da6efdd659a82dbbc4afd18eb4ab1020a2892f69c28d610f912c8a799f734c
|
||||
generated_at: "2026-03-29T23:52:03Z"
|
||||
model: gpt-5.4
|
||||
provider: openai
|
||||
source_hash: 91d16fba3c12c0cce5e585a7f5072a831de3e10928b2c34bdbf126b3b718e0c3
|
||||
source_path: cli/nodes.md
|
||||
workflow: 15
|
||||
---
|
||||
|
||||
# `openclaw nodes`
|
||||
|
||||
管理已配对的节点(设备)并调用节点功能。
|
||||
管理已配对节点(设备)并调用节点能力。
|
||||
|
||||
相关内容:
|
||||
|
||||
- 节点概述:[节点](/nodes)
|
||||
- 摄像头:[摄像头节点](/nodes/camera)
|
||||
- 节点概览:[节点](/nodes)
|
||||
- 相机:[相机节点](/nodes/camera)
|
||||
- 图像:[图像节点](/nodes/images)
|
||||
|
||||
通用选项:
|
||||
常用选项:
|
||||
|
||||
- `--url`、`--token`、`--timeout`、`--json`
|
||||
- `--url`, `--token`, `--timeout`, `--json`
|
||||
|
||||
## 常用命令
|
||||
|
||||
@@ -40,41 +40,23 @@ openclaw nodes status --connected
|
||||
openclaw nodes status --last-connected 24h
|
||||
```
|
||||
|
||||
`nodes list` 打印待处理/已配对表格。已配对行包含最近连接时长(Last Connect)。
|
||||
使用 `--connected` 仅显示当前已连接的节点。使用 `--last-connected <duration>`
|
||||
筛选在指定时间段内连接过的节点(例如 `24h`、`7d`)。
|
||||
`nodes list` 会打印待处理/已配对表格。已配对行包含距离最近一次连接的时间(上次连接)。
|
||||
使用 `--connected` 仅显示当前已连接的节点。使用 `--last-connected <duration>` 将
|
||||
结果筛选为在某个时长内连接过的节点(例如 `24h`、`7d`)。
|
||||
|
||||
## 调用 / 运行
|
||||
## 调用
|
||||
|
||||
```bash
|
||||
openclaw nodes invoke --node <id|name|ip> --command <command> --params <json>
|
||||
openclaw nodes run --node <id|name|ip> <command...>
|
||||
openclaw nodes run --raw "git status"
|
||||
openclaw nodes run --agent main --node <id|name|ip> --raw "git status"
|
||||
```
|
||||
|
||||
调用标志:
|
||||
|
||||
- `--params <json>`:JSON 对象字符串(默认 `{}`)。
|
||||
- `--invoke-timeout <ms>`:节点调用超时(默认 `15000`)。
|
||||
- `--invoke-timeout <ms>`:节点调用超时时间(默认 `15000`)。
|
||||
- `--idempotency-key <key>`:可选的幂等键。
|
||||
- 此处不允许使用 `system.run` 和 `system.run.prepare`;如需在命令行中执行命令,请使用带 `host=node` 的 `exec` 工具。
|
||||
|
||||
### Exec 风格默认值
|
||||
|
||||
`nodes run` 与模型的 exec 行为一致(默认值 + 审批):
|
||||
|
||||
- 读取 `tools.exec.*`(以及 `agents.list[].tools.exec.*` 覆盖)。
|
||||
- 在调用 `system.run` 前使用 exec 审批(`exec.approval.request`)。
|
||||
- 当设置了 `tools.exec.node` 时可省略 `--node`。
|
||||
- 需要支持 `system.run` 的节点(macOS 配套应用或无头节点主机)。
|
||||
|
||||
标志:
|
||||
|
||||
- `--cwd <path>`:工作目录。
|
||||
- `--env <key=val>`:环境变量覆盖(可重复)。
|
||||
- `--command-timeout <ms>`:命令超时。
|
||||
- `--invoke-timeout <ms>`:节点调用超时(默认 `30000`)。
|
||||
- `--needs-screen-recording`:要求屏幕录制权限。
|
||||
- `--raw <command>`:运行 shell 字符串(`/bin/sh -lc` 或 `cmd.exe /c`)。
|
||||
- `--agent <id>`:智能体范围的审批/白名单(默认为已配置的智能体)。
|
||||
- `--ask <off|on-miss|always>`、`--security <deny|allowlist|full>`:覆盖选项。
|
||||
要在节点上以命令行方式执行命令,请使用带 `host=node` 的 `exec` 工具,而不是 `openclaw nodes run`。
|
||||
`nodes` CLI 现在以能力为中心:通过 `nodes invoke` 直接进行远程过程调用,以及配对、相机、
|
||||
屏幕、位置、画布和通知。
|
||||
|
||||
@@ -275,13 +275,15 @@ macOS 节点暴露 `system.run`、`system.notify` 和 `system.execApprovals.get/
|
||||
示例:
|
||||
|
||||
```bash
|
||||
openclaw nodes run --node <idOrNameOrIp> -- echo "Hello from mac node"
|
||||
openclaw nodes notify --node <idOrNameOrIp> --title "Ping" --body "Gateway ready"
|
||||
openclaw nodes invoke --node <idOrNameOrIp> --command system.which --params '{"name":"git"}'
|
||||
```
|
||||
|
||||
注意事项:
|
||||
|
||||
- `system.run` 在负载中返回 stdout/stderr/退出码。
|
||||
- Shell 执行现在统一走带 `host=node` 的 `exec` 工具;`nodes` 保持为显式节点命令的直接 RPC 表面。
|
||||
- `nodes invoke` 不暴露 `system.run` 或 `system.run.prepare`;这些仅保留在 `exec` 路径上。
|
||||
- `system.notify` 遵守 macOS 应用上的通知权限状态。
|
||||
- `system.run` 支持 `--cwd`、`--env KEY=VAL`、`--command-timeout` 和 `--needs-screen-recording`。
|
||||
- `system.notify` 支持 `--priority <passive|active|timeSensitive>` 和 `--delivery <system|overlay|auto>`。
|
||||
|
||||
@@ -69,9 +69,9 @@ make <target>
|
||||
|
||||
另见:模型仓库中的 `docs/gateway-exposure-matrix.md`。
|
||||
|
||||
### Nodes.run 管道(最高风险能力)
|
||||
### 节点 exec 管道(最高风险能力)
|
||||
|
||||
**声明:** `nodes.run` 需要(a)节点命令允许列表加上声明的命令以及(b)配置时的实时批准;批准被令牌化以防止重放(在模型中)。
|
||||
**声明:** `exec host=node` 需要(a)节点命令允许列表加上声明的命令以及(b)配置时的实时批准;批准被令牌化以防止重放(在模型中)。
|
||||
|
||||
- 绿色运行:
|
||||
- `make nodes-pipeline`
|
||||
|
||||
@@ -329,7 +329,6 @@ OpenClaw 为 browser、canvas、nodes 和 cron 暴露**一流的智能体工具*
|
||||
- `status`、`describe`
|
||||
- `pending`、`approve`、`reject`(配对)
|
||||
- `notify`(macOS `system.notify`)
|
||||
- `run`(macOS `system.run`)
|
||||
- `camera_snap`、`camera_clip`、`screen_record`
|
||||
- `location_get`
|
||||
|
||||
@@ -339,9 +338,9 @@ OpenClaw 为 browser、canvas、nodes 和 cron 暴露**一流的智能体工具*
|
||||
- 图像返回图像块 + `MEDIA:<path>`。
|
||||
- 视频返回 `FILE:<path>`(mp4)。
|
||||
- 位置返回 JSON 负载(lat/lon/accuracy/timestamp)。
|
||||
- `run` 参数:`command` argv 数组;可选的 `cwd`、`env`(`KEY=VAL`)、`commandTimeoutMs`、`invokeTimeoutMs`、`needsScreenRecording`。
|
||||
- 节点 shell 执行现在统一通过带 `host=node` 的 `exec` 工具;`nodes` 保持为显式节点命令的 RPC 表面。
|
||||
|
||||
示例(`run`):
|
||||
示例(节点能力):
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -496,11 +495,11 @@ Canvas 渲染:
|
||||
|
||||
1. `nodes` → `status`
|
||||
2. 在选定的节点上 `describe`
|
||||
3. `notify` / `run` / `camera_snap` / `screen_record`
|
||||
3. `notify` / `invoke` / `camera_snap` / `screen_record`
|
||||
|
||||
## 安全性
|
||||
|
||||
- 避免直接 `system.run`;仅在用户明确同意时使用 `nodes` → `run`。
|
||||
- 避免直接 `system.run`;仅在用户明确同意时使用带 `host=node` 的 `exec` 工具。
|
||||
- 尊重用户对摄像头/屏幕捕获的同意。
|
||||
- 在调用媒体命令前使用 `status/describe` 确保权限。
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ OpenClaw 在**会话开始时**对有资格的 Skills 进行快照,并在同
|
||||
|
||||
## 远程 macOS 节点(Linux Gateway 网关)
|
||||
|
||||
如果 Gateway 网关运行在 Linux 上但连接了一个**允许 `system.run` 的 macOS 节点**(Exec 批准安全设置未设为 `deny`),当所需的二进制文件存在于该节点上时,OpenClaw 可以将仅限 macOS 的 Skills 视为有资格。智能体应通过 `nodes` 工具(通常是 `nodes.run`)执行这些 Skills。
|
||||
如果 Gateway 网关运行在 Linux 上但连接了一个**允许 `system.run` 的 macOS 节点**(Exec 批准安全设置未设为 `deny`),当所需的二进制文件存在于该节点上时,OpenClaw 可以将仅限 macOS 的 Skills 视为有资格。智能体应通过带 `host=node` 的 `exec` 工具执行这些 Skills。
|
||||
|
||||
这依赖于节点报告其命令支持以及通过 `system.run` 进行的二进制文件探测。如果 macOS 节点稍后离线,Skills 仍然可见;调用可能会失败,直到节点重新连接。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user