Surface WSL Bot 配置经验
从 OpenClaw 配置与调试 拆分。
以下信息来源于 surface-wsl-bot DM 记录(2026-03-04 ~ 2026-03-22)。
Windows 路径修复
WSL 环境中 openclaw.json 的 agents.defaults.workspace 被错误设为 Windows 路径 C:\\Users\\micha\\.openclaw\\workspace,导致在 /home/restry/C:\Users\micha\.openclaw\workspace 创建目录。修复为 Linux 路径 ~/.openclaw/workspace。
Mattermost 附件问题
附件无法接收的排查路径:
- 插件双重加载(
plugins.load.paths+channels.mattermost)→ 去掉 plugins.load.paths 中的 mattermost 条目 - SSRF 保护拦截(Mattermost 域名解析为内网 IP)→ 关闭本地 DNS 解析,让域名走公网 IP
Elevated 权限配置
{
"tools": {
"elevated": {
"enabled": true,
"allowFrom": {
"mattermost": ["all"]
}
}
}
}注意:修改此配置后需要重启 Gateway 才能生效,但重启 Gateway 又需要 elevated 权限——形成死循环。解决方案:用户在终端手动执行 openclaw gateway restart。
Agent 配置(5 Agent 体系)
{
"agents": {
"list": [
{ "id": "main", "name": "Jarvis", "model": { "primary": "github-copilot/claude-opus-4.6" }},
{ "id": "alpha", "workspace": "~/.openclaw/workspace/agents/alpha" },
{ "id": "gamma", "workspace": "~/.openclaw/workspace/agents/gamma" },
{ "id": "otter", "workspace": "~/.openclaw/workspace-otter" },
{ "id": "bnef", "workspace": "~/.openclaw/workspace-bnef" },
{ "id": "clawline", "workspace": "~/.openclaw/workspace-clawline" }
]
}
}已删除的 Agent:memory-distiller(smartExtraction 替代)、antfarm-medic(无实际用途)。