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
refactor(policy): make OpenShell the sole durable policy source
Replace the branch tree with the complete, tested atomic cutover. NemoClaw keeps policy convenience commands and Shields while OpenShell remains the sole durable policy authority.
Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
description: "Rotate, pause, resume, remove, and conflict-check messaging channels on an existing sandbox."
7
7
description-agent: "Explains channel credential rotation, destructive removal, pause and resume behavior, duplicate credential and port conflicts, and full messaging stop behavior. Use after a channel is configured."
Use host-side channel commands to change a configured messaging channel.
14
21
15
22
## Rotate Credentials
16
23
17
-
Running `channels add` for a channel that is already configured overwrites stored tokens and registers the updated bridge provider.
18
-
Rebuild the sandbox after the update so the image reflects the current channel set.
24
+
Running `channels add` for a channel that is already configured overwrites stored tokens and registers the updated bridge provider. Rebuild the sandbox after the update so the image reflects the current channel set.
19
25
20
-
For WeChat, the cached-token shortcut applies.
21
-
Remove WeChat first when you intend to acquire a fresh account through a new QR scan.
26
+
For WeChat, the cached-token shortcut applies. Remove WeChat first when you intend to acquire a fresh account through a new QR scan.
22
27
23
-
For Google Chat, re-add the channel and paste the replacement service-account JSON.
24
-
NemoClaw updates the gateway-side refresh material.
25
-
The sandbox keeps only the OpenShell credential placeholder.
26
-
OpenShell keeps refreshed access tokens at the gateway and substitutes them at approved egress boundaries.
28
+
For Google Chat, re-add the channel and paste the replacement service-account JSON. NemoClaw updates the gateway-side refresh material. The sandbox keeps only the OpenShell credential placeholder. OpenShell keeps refreshed access tokens at the gateway and substitutes them at approved egress boundaries.
27
29
28
30
<AgentOnlyvariant="hermes">
29
-
Re-adding Google Chat prompts again for the project ID, complete Pub/Sub subscription name, and email sender allowlist.
30
-
It does not create a public webhook endpoint.
31
+
Re-adding Google Chat prompts again for the project ID, complete Pub/Sub subscription name, and
32
+
email sender allowlist. It does not create a public webhook endpoint.
31
33
</AgentOnly>
32
34
33
35
For detailed token rotation procedures, refer to [Credential Rotation](../../security/credential-rotation).
`channels remove wechat` clears the bot token, deletes the `<sandbox>-wechat-bridge` provider, and removes `wechat` from the enabled-channel set.
46
-
The next rebuild omits WeChat configuration and per-account state files.
47
+
`channels remove wechat` clears the bot token, deletes the `<sandbox>-wechat-bridge` provider, and removes `wechat` from the enabled-channel set. The next rebuild omits WeChat configuration and per-account state files.
47
48
48
49
`channels remove googlechat` detaches and deletes the `<sandbox>-googlechat-bridge` provider before the rebuild removes Google Chat configuration and the matching policy preset.
49
50
@@ -54,8 +55,8 @@ If endpoint teardown fails, the command exits nonzero without changing the chann
54
55
</AgentOnly>
55
56
56
57
<AgentOnlyvariant="hermes">
57
-
Hermes Google Chat has no dedicated host-side endpoint to stop.
58
-
The next rebuild omits its Pub/Sub project, subscription, sender allowlist, and runtime adapter configuration.
58
+
Hermes Google Chat has no dedicated host-side endpoint to stop. The next rebuild omits its Pub/Sub
59
+
project, subscription, sender allowlist, and runtime adapter configuration.
59
60
</AgentOnly>
60
61
61
62
For in-sandbox QR-paired channels such as WhatsApp, `channels remove` destructively clears the session directory before rebuild so stale auth files do not reconnect the channel.
@@ -68,13 +69,11 @@ The cleanup targets `/sandbox/.openclaw/<channel>/`.
68
69
The cleanup targets `/sandbox/.hermes/platforms/<channel>/`.
69
70
</AgentOnly>
70
71
71
-
It tries `openshell sandbox exec` and falls back to SSH if the first transport does not produce the success sentinel.
72
-
If neither transport can reach a running sandbox, the command exits nonzero and asks you to start the sandbox and rerun it.
72
+
It tries `openshell sandbox exec` and falls back to SSH if the first transport does not produce the success sentinel. If neither transport can reach a running sandbox, the command exits nonzero and asks you to start the sandbox and rerun it.
73
73
74
-
NemoClaw leaves the registry, policy preset, and `session.policyPresets` unchanged on that failure path so a later retry can complete cleanly.
74
+
NemoClaw leaves the registry and current OpenShell policy unchanged on that failure path so a later retry can complete cleanly.
75
75
76
-
`channels remove whatsapp` clears the client-side Baileys session but cannot deregister the linked device with WhatsApp's servers after the local connection is gone.
77
-
The phone continues to list the sandbox as a Linked Device until you remove it manually or WhatsApp's 14-day inactivity timeout expires.
76
+
`channels remove whatsapp` clears the client-side Baileys session but cannot deregister the linked device with WhatsApp's servers after the local connection is gone. The phone continues to list the sandbox as a Linked Device until you remove it manually or WhatsApp's 14-day inactivity timeout expires.
78
77
79
78
Remove the phone entry before pairing the same account with another sandbox.
For WeChat, `channels stop wechat` followed by rebuild keeps the per-account state under `/sandbox/.openclaw/openclaw-weixin/accounts/` even though the bridge is no longer wired into `openclaw.json`.
92
+
For WeChat, `channels stop wechat` followed by rebuild keeps the per-account state under
93
+
`/sandbox/.openclaw/openclaw-weixin/accounts/` even though the bridge is no longer wired into
94
+
`openclaw.json`.
94
95
</AgentOnly>
95
96
<AgentOnlyvariant="hermes">
96
-
For WeChat, `channels stop wechat` followed by rebuild keeps the per-account state under `/sandbox/.hermes/` even though the bridge is no longer wired into Hermes config.
97
+
For WeChat, `channels stop wechat` followed by rebuild keeps the per-account state under
98
+
`/sandbox/.hermes/` even though the bridge is no longer wired into Hermes config.
97
99
</AgentOnly>
98
-
A later `channels start wechat` plus rebuild revives the bridge against the same iLink account without a fresh QR scan.
99
-
The bot token remains in the OpenShell provider across the stop and start cycle.
100
+
A later `channels start wechat` plus rebuild revives the bridge against the same iLink account
101
+
without a fresh QR scan. The bot token remains in the OpenShell provider across the stop and start
102
+
cycle.
100
103
101
104
Google Chat stop and start cycles also preserve the bridge provider and its gateway-side refresh material.
102
105
103
106
<AgentOnlyvariant="openclaw">
104
-
They preserve the dedicated public webhook endpoint so the Google Cloud configuration can keep the same URL.
105
-
The next rebuild reuses that provider without requiring the service-account JSON again.
106
-
`$$nemoclaw tunnel stop` does not stop the dedicated Google Chat endpoint.
107
-
It controls the separate full-dashboard tunnel.
107
+
They preserve the dedicated public webhook endpoint so the Google Cloud configuration can keep the
108
+
same URL. The next rebuild reuses that provider without requiring the service-account JSON again.
109
+
`$$nemoclaw tunnel stop` does not stop the dedicated Google Chat endpoint. It controls the
110
+
separate full-dashboard tunnel.
108
111
</AgentOnly>
109
112
110
113
<AgentOnlyvariant="hermes">
111
-
They preserve the project ID, Pub/Sub subscription name, and email sender allowlist.
112
-
The next rebuild reuses the bridge provider without requiring the service-account JSON again.
113
-
Hermes Google Chat does not use the dedicated webhook endpoint or `$$nemoclaw tunnel` commands.
114
+
They preserve the project ID, Pub/Sub subscription name, and email sender allowlist. The next
115
+
rebuild reuses the bridge provider without requiring the service-account JSON again. Hermes Google
116
+
Chat does not use the dedicated webhook endpoint or `$$nemoclaw tunnel` commands.
114
117
</AgentOnly>
115
118
116
-
When `channels start` re-enables a channel, NemoClaw records the channel as enabled in the messaging plan.
117
-
The rebuild attaches the existing bridge provider before applying its matching built-in policy preset to the replacement sandbox.
118
-
While a channel remains stopped, the rebuild omits its runtime configuration, token upsert, and channel startup effects.
119
-
Generic providers and refresh bridges remain detached.
119
+
When `channels start` re-enables a channel, NemoClaw records the channel as enabled in the messaging plan. The rebuild attaches the existing bridge provider before applying its matching built-in policy preset to the replacement sandbox. While a channel remains stopped, the rebuild omits its runtime configuration, token upsert, and channel startup effects. Generic providers and refresh bridges remain detached.
120
+
120
121
<AgentOnlyvariant="hermes">
121
-
The rebuild also omits the stopped channel's inactive built-in messaging preset.
122
-
Exact custom policies remain preserved for separate replay, including a custom policy whose name matches a built-in messaging preset.
123
-
For stopped Hermes Discord, a preserved custom credential-bound policy requires the exact validated static provider, so the rebuild retains and attaches only that provider without starting Discord or recreating its credentials.
124
-
A missing or incompatible required provider stops the rebuild before the replacement can use the policy.
122
+
The rebuild also omits the stopped channel's inactive built-in messaging preset from the
123
+
command-time plan. The messaging plan does not persist policy references; rebuild starts from the
124
+
current OpenShell policy and derives any requested channel change from current manifests. For
125
+
stopped Hermes Discord, a preserved custom credential-bound policy requires the exact validated
126
+
static provider, so the rebuild retains and attaches only that provider without starting Discord
127
+
or recreating its credentials. A missing or incompatible required provider stops the rebuild
128
+
before the replacement can use the policy.
125
129
</AgentOnly>
126
-
If the command queues the change without rebuilding, the running sandbox keeps its existing bridge and network policy until you rebuild it.
130
+
If the command queues the change without rebuilding, the running sandbox keeps its existing bridge
131
+
and network policy until you rebuild it.
127
132
128
133
## Avoid Cross-Sandbox Conflicts
129
134
130
135
<Warningtitle="Conflict Detection Scope">
131
-
NemoClaw checks only the sandboxes recorded in the selected OpenShell gateway's sandbox registry.
132
-
It cannot detect or prevent Slack credential reuse across independent OpenShell gateways.
136
+
NemoClaw checks only the sandboxes recorded in the selected OpenShell gateway's sandbox registry.
137
+
It cannot detect or prevent Slack credential reuse across independent OpenShell gateways.
133
138
</Warning>
134
139
135
-
Use distinct credentials and resources for each active messaging sandbox.
136
-
Follow these channel-specific rules:
140
+
Use distinct credentials and resources for each active messaging sandbox. Follow these channel-specific rules:
137
141
138
142
- Use a distinct iLink `accountId` for each WeChat sandbox.
139
143
- Run only one active Slack sandbox on each OpenShell gateway.
140
144
- Use distinct bot and Socket Mode app tokens across OpenShell gateways.
141
145
- Use a different local webhook port for each Microsoft Teams sandbox.
142
146
143
-
When you onboard, rebuild, or add a channel, the command aborts on a conflict or an incomplete required check within the selected OpenShell gateway's sandbox registry.
144
-
Legacy entries without credential hashes count as incomplete.
145
-
An unreadable messaging registry also causes onboarding and rebuild to abort.
146
-
Onboarding and rebuild have no conflict override.
147
+
When you onboard, rebuild, or add a channel, the command aborts on a conflict or an incomplete required check within the selected OpenShell gateway's sandbox registry. Legacy entries without credential hashes count as incomplete. An unreadable messaging registry also causes onboarding and rebuild to abort. Onboarding and rebuild have no conflict override.
147
148
148
-
For `channels add` only, `--force` overrides conflict and incomplete-check aborts.
149
-
Use it only when you accept the duplicate-consumer or shared-resource risk.
150
-
Rerun `channels add <channel>` with the intended token to refresh stored non-secret identity metadata.
149
+
For `channels add` only, `--force` overrides conflict and incomplete-check aborts. Use it only when you accept the duplicate-consumer or shared-resource risk. Rerun `channels add <channel>` with the intended token to refresh stored non-secret identity metadata.
151
150
152
-
Before a rebuild, NemoClaw checks the messaging plan before backup or deletion.
153
-
A conflict leaves the original sandbox intact.
154
-
Resolve any conflict, then rerun the operation.
155
-
`$$nemoclaw status` reports cross-sandbox overlaps within the selected OpenShell gateway's sandbox registry.
151
+
Before a rebuild, NemoClaw checks the messaging plan before backup or deletion. A conflict leaves the original sandbox intact. Resolve any conflict, then rerun the operation. `$$nemoclaw status` reports cross-sandbox overlaps within the selected OpenShell gateway's sandbox registry.
156
152
157
153
## Stop All Delivery
158
154
@@ -163,11 +159,15 @@ Use `channels stop` for an individual bridge or stop the sandbox when you need t
163
159
The deprecated full `$$nemoclaw stop` command also attempts to release an unshared OpenShell gateway port whose ownership NemoClaw can verify.
164
160
165
161
Stopping the in-sandbox gateway stops all channel delivery for that sandbox until you restart the sandbox or gateway.
162
+
166
163
</AgentOnly>
167
164
168
165
<AgentOnlyvariant="hermes">
169
-
`$$nemoclaw tunnel stop` stops the dashboard tunnel services that `$$nemoclaw tunnel start` created without stopping the supervisor-owned Hermes gateway, agent-owned host forwards, or managed OpenShell gateway port.
170
-
The deprecated full `$$nemoclaw stop` command attempts to stop host forwards and safely release an unshared OpenShell gateway port while the Hermes gateway remains under sandbox supervision.
166
+
`$$nemoclaw tunnel stop` stops the dashboard tunnel services that `$$nemoclaw tunnel start`
167
+
created without stopping the supervisor-owned Hermes gateway, agent-owned host forwards, or
168
+
managed OpenShell gateway port. The deprecated full `$$nemoclaw stop` command attempts to stop
169
+
host forwards and safely release an unshared OpenShell gateway port while the Hermes gateway
170
+
remains under sandbox supervision.
171
171
</AgentOnly>
172
172
173
173
Full stop preserves a shared gateway and fails closed without releasing its port when ownership is ambiguous.
0 commit comments