You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 49b5b86
Browse filesBrowse the repository at this point in the historyBrowse files
* feat: node-hosted plugins β dynamic tools, MCP servers, and skills
Nodes become declarative plugin hosts:
- node.pluginTools.update: node hosts publish plugin-registered agent tool
descriptors; gateway materializes them as agent tools executing via
node.invoke under the node command allowlist, with tools.effective
invalidation and node online/offline removal.
- Trusted paired-node descriptors: no gateway-side plugin registration
required; gateway.nodes.pluginTools.enabled off-switch (default on);
description/count caps; deterministic node-prefixed collision names.
- Declarative node-hosted MCP: nodeHost.mcp.servers (McpServerConfig shape)
starts MCP clients on the node host, publishes tools as pluginId node-mcp,
executes via built-in mcp.tools.call.v1 with per-layer timeouts, failure
isolation, and orphan-safe shutdown. No re-pairing when servers change.
- Node-hosted skills: node.skills.update publishes ~/.openclaw/skills
content (64 skills/64KB/512KB caps both sides); gateway merges them into
the skills snapshot while connected and exec host=node is available, with
node:// locators, node-prefixed collisions, disabled command dispatch,
and gateway.nodes.skills.enabled + nodeHost.skills.enabled switches.
- Security: node-supplied pluginIds cannot satisfy pluginId-scoped tool
allowlists unless gateway-registered; reserved node-mcp id requires the
core MCP descriptor shape; protocol registry kept out of public
plugin-sdk dts.
- E2E: pond harness proves publication, MCP round-trip, skills locator, and
disconnect/reconnect for all three surfaces.
* style: format node-plugin-tools test
* fix(skills): keep status loader unfiltered when eligibility is passed
skills.status started passing eligibility for the node-skill merge, which
flipped loadWorkspaceSkillEntries into filtered mode and dropped disabled
skills from status reports (QA plugin-lifecycle-hot-reload timeout). Status
now merges node skills explicitly around an unfiltered load. Also: regen
docs_map for new node docs sections; add the intentional node-host MCP
onclose suppression to the lint-suppression allowlist.
The Gateway treats these as **claims** and enforces server-side allowlists.
277
+
Connected nodes can publish optional agent-visible plugin or MCP tool
278
+
descriptors with `node.pluginTools.update` after a successful connect or
279
+
reconnect. Headless node hosts restart to apply declarative MCP inventory
280
+
changes. This update method is the only publication path; plugin tool descriptors are not accepted in
281
+
`connect` params. Each descriptor must use a provider-safe tool `name` and name
282
+
a `command` in the node's current command allowlist. The Gateway trusts descriptor
283
+
metadata from the paired node, filters descriptors outside the approved command
284
+
surface, removes them when the node disconnects, and rejects operator attempts
285
+
to mutate another node's catalog. Set `gateway.nodes.pluginTools.enabled: false`
286
+
to ignore node-published descriptors.
287
+
288
+
Connected node hosts publish their complete skill replacement catalog with
289
+
`node.skills.update`. This node-role method is the only node skill publication
290
+
path; skills are not accepted in `connect` params. Each descriptor contains a
291
+
safe name, description, and bounded `SKILL.md` content. The Gateway parses that
292
+
content with the normal skills loader, includes it in agent skill snapshots
293
+
while the node is connected, and removes it on disconnect. Set
294
+
`gateway.nodes.skills.enabled: false` to ignore node-published skills.
295
+
267
296
## Presence
268
297
269
298
-`system-presence` returns entries keyed by device identity, including
@@ -499,7 +528,9 @@ methods. Treat this as feature discovery, not a full enumeration of
499
528
- `node.rename` updates a paired node label.
500
529
- `node.invoke` forwards a command to a connected node.
501
530
- `node.invoke.result` returns the result for an invoke request.
531
+
- `mcp.tools.call.v1` is the headless node-host command for calling a configured node-local MCP tool. It is carried through `node.invoke`, requires the node to declare the command, and remains subject to pairing approval and `gateway.nodes.denyCommands`.
502
532
- `node.event` carries node-originated events back into the gateway.
533
+
- `node.pluginTools.update` is the only publication path for replacing the connected node's agent-visible plugin/MCP tool descriptors; `connect` params do not carry them.
503
534
- `node.pending.pull` and `node.pending.ack` are the connected-node queue APIs.
504
535
- `node.pending.enqueue` and `node.pending.drain` manage durable pending work for offline/disconnected nodes.
Copy file name to clipboardExpand all lines: docs/nodes/index.md
+81-2Lines changed: 81 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,81 @@ Naming options:
136
136
-`--display-name` on `openclaw node run` / `openclaw node install` (persists in `~/.openclaw/node.json` on the node, alongside the client instance ID and Gateway connection metadata).
after it connects, and the Gateway adds them to agent skill snapshots only while
193
+
that node remains connected. Each skill directory name must match the `name`
194
+
frontmatter field so the abstract node locator maps to one entry without adding
195
+
another protocol field.
196
+
197
+
The initial node-role pairing approves skill publication. Adding, removing, or
198
+
changing skills does not require another pairing or Gateway configuration
199
+
change. Restart `openclaw node run` or `openclaw node restart` after changing
200
+
node skill files; the node host does not watch the skills directory.
201
+
202
+
Node-hosted skill entries identify their node and carry their execution
203
+
location. Skill files, referenced relative paths, and binaries remain on that
204
+
node. Load instructions and run commands with
205
+
`exec host=node node=<node-id>` so relative paths resolve on the node rather
206
+
than the Gateway machine. The publishing node must have approved `system.run`,
207
+
and the agent's exec policy must allow `host=node`; otherwise the skill stays
208
+
out of that agent's snapshot.
209
+
210
+
Set `nodeHost.skills.enabled: false` on the node to stop publication. Gateway
211
+
operators can ignore skills from every paired node with
212
+
`gateway.nodes.skills.enabled: false`.
213
+
139
214
### Headless identity state
140
215
141
216
The headless node keeps three separate state files:
@@ -278,7 +353,7 @@ These rows describe the Gateway policy ceiling, not the commands implemented by
278
353
279
354
`talk.ptt.start`, `talk.ptt.stop`, `talk.ptt.cancel`, and `talk.ptt.once` are allowed by default for any node that advertises the `talk` capability or declares `talk.*` commands, independent of platform label.
280
355
281
-
Desktop host commands (`system.run`, `system.run.prepare`, `system.which`, `browser.proxy`, `screen.snapshot` on macOS/Windows) are not part of the static platform-default table above. They become available once the operator approves a pairing request that declares them, after which the node's approved command set carries them forward on reconnect.
356
+
Desktop host commands (`system.run`, `system.run.prepare`, `system.which`, `browser.proxy`, `mcp.tools.call.v1`, and `screen.snapshot` on macOS/Windows) are not part of the static platform-default table above. They become available once the operator approves a pairing request that declares them, after which the node's approved command set carries them forward on reconnect.
282
357
283
358
Dangerous or privacy-heavy commands still require explicit opt-in with `gateway.nodes.allowCommands`, even if a node declares them: `camera.snap`, `camera.clip`, `screen.record`, `computer.act`, `contacts.add`, `calendar.add`, `reminders.add`, `sms.send`, `sms.search`. `gateway.nodes.denyCommands` always wins over defaults and extra allowlist entries. See [Computer use](/nodes/computer-use) for the additional macOS, tool-policy, and arming gates around desktop input.
284
359
@@ -303,6 +378,10 @@ Node-related settings live under `gateway.nodes` and `tools.exec`:
303
378
// node pairing on an exact device-key match read back over SSH.
304
379
sshVerify:true,
305
380
},
381
+
// Trust agent-visible plugin tools published by paired nodes (default: true).
382
+
pluginTools: {
383
+
enabled:true,
384
+
},
306
385
// Opt into dangerous/privacy-heavy node commands (camera.snap, etc.).
307
386
allowCommands: ["camera.snap", "screen.record"],
308
387
// Block exact command names even if defaults or allowCommands include them.
@@ -322,7 +401,7 @@ Node-related settings live under `gateway.nodes` and `tools.exec`:
322
401
}
323
402
```
324
403
325
-
Use exact node command names. `denyCommands` removes a command even when a platform default or `allowCommands` entry would otherwise allow it. See [Gateway configuration reference](/gateway/configuration-reference#gateway) for gateway node pairing and command-policy field details.
404
+
Use exact node command names. `denyCommands` removes a command even when a platform default or `allowCommands` entry would otherwise allow it. Paired nodes may publish agent-visible plugin tool descriptors by default, but each descriptor's command must still be in the node's approved command surface. Set `gateway.nodes.pluginTools.enabled: false` to ignore all such descriptors. See [Gateway configuration reference](/gateway/configuration-reference#gateway) for gateway node pairing and command-policy field details.
|`api.registerCommand(def)`| Custom command (bypasses the LLM) |
146
+
|`api.registerNodeHostCommand(command)`| Command handled by `openclaw node run`; optional `agentTool` metadata can expose it as an agent-visible tool while the node is connected |
146
147
147
148
Plugin commands can set `agentPromptGuidance` when the agent needs a short,
148
149
command-owned routing hint. Keep that text about the command itself; do not add
@@ -169,6 +170,19 @@ surfaces: only guidance explicitly scoped to `codex_app_server` is promoted into
169
170
that higher-priority lane. Legacy string guidance and unscoped structured
170
171
guidance remain available to non-Codex prompt surfaces for compatibility.
171
172
173
+
Node-host commands run on the connected node host, not inside the Gateway
174
+
process. If `agentTool` is present, the node publishes a descriptor after a
175
+
successful Gateway connect; the Gateway exposes it to agent runs only while that
176
+
node is connected and only if the descriptor's `command` is in the node's
177
+
approved command surface. Set `agentTool.defaultPlatforms` to opt a
178
+
non-dangerous command into the default node command allowlist; otherwise require
179
+
explicit `gateway.nodes.allowCommands` or a node-invoke policy. `agentTool.name`
180
+
must be provider-safe: start with a letter, use only letters, digits,
181
+
underscores, or hyphens, and stay within 64 characters. MCP-backed node tools
182
+
can set `agentTool.mcp` metadata so catalog and tool-search surfaces can show
183
+
the remote MCP server/tool identity, but execution still goes through the
Copy file name to clipboardExpand all lines: docs/plugins/sdk-runtime.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -334,9 +334,15 @@ two-party event loops that do not go through the shared inbound reply runner.
334
334
});
335
335
```
336
336
337
+
`nodes.list(...)` includes each connected node's advertised
338
+
`nodePluginTools` descriptors when that node exposes plugin or MCP-backed
339
+
tools to the agent. Those descriptors are live connection state: the Gateway
340
+
drops them when the node disconnects, and a node can replace them with
341
+
`node.pluginTools.update` after local plugin/MCP inventory changes.
342
+
337
343
Inside the Gateway this runtime is in-process. In plugin CLI commands it calls the configured Gateway over RPC, so commands such as `openclaw googlemeet recover-tab` can inspect paired nodes from the terminal. Node commands still go through normal Gateway node pairing, command allowlists, plugin node-invoke policies, and node-local command handling.
338
344
339
-
Plugins that expose dangerous node-host commands should register a node-invoke policy with `api.registerNodeInvokePolicy(...)`. The policy runs in the Gateway after command allowlist checks and before the command is forwarded to the node, so direct `node.invoke` calls and higher-level plugin tools share the same enforcement path.
345
+
Plugins that expose node-hosted agent tools can set `agentTool.defaultPlatforms` for non-dangerous commands that should be allowlisted by default. Omit it when operators must opt in with `gateway.nodes.allowCommands`. Dangerous node-host commands should register a node-invoke policy with `api.registerNodeInvokePolicy(...)`; the policy runs in the Gateway after command allowlist checks and before the command is forwarded to the node, so direct `node.invoke` calls, node-hosted plugin tools, and higher-level plugin tools share the same enforcement path.
340
346
341
347
<Warning>
342
348
The optional `scopes` field requests Gateway operator scopes for the invocation. OpenClaw honors it only for bundled plugins and trusted official plugin installations; requests from other plugins do not elevate the call. Use it only when a trusted plugin must invoke a node command with a stricter Gateway scope, such as `operator.admin`.
0 commit comments