Help the user install and enable the ssh-guard plugin from this repository.
ChannelStatusTelegram✅ SupportedFeishu✅ SupportedMattermost✅ SupportedWeixin❌ Not SupportedOthers🔍 Unverified
Confirm the target OpenClaw environment and config file location.
Ask which approval language the user wants:
index.zh-CN.tsindex.en.tsDefault to English if the user does not specify a language.
Ensure the plugin directory is reachable from plugins.load.paths.
Ensure plugins.entries["ssh-guard"].enabled is true.
Check the current top-level session.dmScope value first.
If it is already per-channel-peer or per-account-channel-peer, keep it and skip the selection step.
Otherwise, tell the user session.dmScope: "main" is not supported for this plugin in DM flows.
Ask the user to choose one of these top-level session.dmScope values:
per-channel-peerper-account-channel-peerExplain the two choices as OpenClaw session-routing behavior first:
per-channel-peer: DM session key is agent:<agentId>:<channel>:direct:<peerId>, so the same person gets a different DM session in each channelper-account-channel-peer: DM session key is agent:<agentId>:<channel>:<accountId>:direct:<peerId>, so DM sessions are separated by channel, receiving account, and personper-channel-peerper-account-channel-peer when one channel has multiple accounts and they should not share DM session stateper-channel-peer.Use these entry files:
index.zh-CN.ts: Chinese approval prompts and approval keywordsindex.en.ts: English approval prompts and approval keywordsindex.ts: default entry and currently points to index.en.tsIf the user wants Chinese prompts, either:
index.zh-CN.ts, orindex.ts to export index.zh-CN.tsIf the user wants English prompts, keep the current default or point the entry to index.en.ts.
Prefer using this repository as the single source of truth for the plugin.
Do not describe the plugin as a generic policy skill first; it is primarily a publishable OpenClaw plugin repository.
When updating openclaw.json, make minimal changes:
session.dmScope if missingplugins.load.paths if missingssh-guard to plugins.entries if missingenabled to true unless the user explicitly wants it disabledUse absolute paths in config examples.
Preserve existing plugin entries and load paths.
Do not offer main as a valid choice for this plugin's DM setup flow.
Present per-channel-peer and per-account-channel-peer as the recommended DM setup choices for this plugin.
If session.dmScope is already per-channel-peer or per-account-channel-peer, do not ask the user to change it.
Explain that group sessions are unaffected because OpenClaw already routes groups as agent:<agentId>:<channel>:group:<groupId>.
Show config updates in this form:
json
"session": {
"dmScope": "per-channel-peer"
},
"plugins": {
"load": {
"paths": [
"/absolute/path/to/ssh-guard"
]
},
"entries": {
"ssh-guard": {
"enabled": true
}
}
}
When the user asks what this repository is for, explain:
ssh-guard pluginssh until the user explicitly approves themsession.dmScope for DM use, and should not be installed with session.dmScope: "main"📦 Repository: https://github.com/yanbo92/ssh-guard