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
Copy file name to clipboardExpand all lines: docs/cli/approvals.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ openclaw approvals get --node <id|name|ip>
46
46
openclaw approvals get --gateway
47
47
```
48
48
49
-
`get` shows the effective exec policy for the target: the requested `tools.exec` policy, the host approvals-file policy, and the merged effective result.
49
+
`get` shows the effective exec policy for the target: the requested `tools.exec` policy, the host approvals-file policy, and the merged effective result. Nodes with a host-native policy, such as the Windows companion, show that policy directly instead of applying OpenClaw approvals-file policy math.
50
50
51
51
Precedence:
52
52
@@ -68,6 +68,19 @@ openclaw approvals set --gateway --file ./exec-approvals.json
68
68
69
69
`set` accepts JSON5, not only strict JSON. Use either `--file` or `--stdin`, not both.
70
70
71
+
Host-native Windows nodes use their own policy shape:
72
+
73
+
```bash
74
+
openclaw approvals set --node <id|name|ip> --stdin <<'EOF'
75
+
{
76
+
defaultAction: "deny",
77
+
rules: [{ pattern: "hostname", action: "allow" }]
78
+
}
79
+
EOF
80
+
```
81
+
82
+
The CLI reads the node's current hash first and sends it with the update, so concurrent local edits are rejected instead of overwritten. `rules` is required because this operation replaces the node's complete rule list; `defaultAction` is optional. A node that reports its native policy as disabled cannot be configured remotely; enable or configure the policy on that host first. Host-native policies do not support the `allowlist add|remove` helpers.
83
+
71
84
## "Never prompt" / YOLO example
72
85
73
86
Set the host approvals defaults to `full` + `off` for a host that should never stop on exec approvals:
@@ -85,7 +98,7 @@ openclaw approvals set --stdin <<'EOF'
85
98
EOF
86
99
```
87
100
88
-
Node variant: same body with `openclaw approvals set --node <id|name|ip> --stdin`.
101
+
For nodes that expose an OpenClaw approvals file, use the same body with `openclaw approvals set --node <id|name|ip> --stdin`. Host-native nodes require their owner-specific shape shown above.
89
102
90
103
This changes the **host approvals file** only. To keep the requested OpenClaw policy aligned, also set:
91
104
@@ -129,7 +142,7 @@ No target flag means the local approvals file on disk.
129
142
130
143
## Notes
131
144
132
-
- The node host must advertise `system.execApprovals.get/set` (macOS app or headless node host).
145
+
- The node host must advertise `system.execApprovals.get/set` (macOS app, headless node host, or Windows companion).
133
146
- Approvals files are stored per host in the OpenClaw state dir: `$OPENCLAW_STATE_DIR/exec-approvals.json`, or `~/.openclaw/exec-approvals.json` when the variable is unset.
0 commit comments