diff --git a/Dockerfile b/Dockerfile index d6df8b46bb3..04c23227dbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,6 +116,7 @@ config = { \ 'models': [{'id': model, 'name': model, 'reasoning': False, 'input': ['text'], 'cost': {'input': 0, 'output': 0, 'cacheRead': 0, 'cacheWrite': 0}, 'contextWindow': 131072, 'maxTokens': 4096}] \ } \ }}, \ + 'channels': {'defaults': {'configWrites': False}}, \ 'gateway': { \ 'mode': 'local', \ 'controlUi': { \ diff --git a/bin/lib/onboard.js b/bin/lib/onboard.js index d1b7e5791cd..2bbbda577e3 100644 --- a/bin/lib/onboard.js +++ b/bin/lib/onboard.js @@ -447,6 +447,14 @@ async function createSandbox(gpu) { if (process.env.NVIDIA_API_KEY) { envArgs.push(`NVIDIA_API_KEY=${shellQuote(process.env.NVIDIA_API_KEY)}`); } + const discordToken = getCredential("DISCORD_BOT_TOKEN") || process.env.DISCORD_BOT_TOKEN; + if (discordToken) { + envArgs.push(`DISCORD_BOT_TOKEN=${shellQuote(discordToken)}`); + } + const slackToken = getCredential("SLACK_BOT_TOKEN") || process.env.SLACK_BOT_TOKEN; + if (slackToken) { + envArgs.push(`SLACK_BOT_TOKEN=${shellQuote(slackToken)}`); + } // Run without piping through awk — the pipe masked non-zero exit codes // from openshell because bash returns the status of the last pipeline diff --git a/bin/nemoclaw.js b/bin/nemoclaw.js index 220f1aa1cda..832a8d3cc5d 100755 --- a/bin/nemoclaw.js +++ b/bin/nemoclaw.js @@ -158,6 +158,10 @@ async function deploy(instanceName) { if (ghToken) envLines.push(`GITHUB_TOKEN=${shellQuote(ghToken)}`); const tgToken = getCredential("TELEGRAM_BOT_TOKEN"); if (tgToken) envLines.push(`TELEGRAM_BOT_TOKEN=${shellQuote(tgToken)}`); + const discordToken = getCredential("DISCORD_BOT_TOKEN"); + if (discordToken) envLines.push(`DISCORD_BOT_TOKEN=${shellQuote(discordToken)}`); + const slackToken = getCredential("SLACK_BOT_TOKEN"); + if (slackToken) envLines.push(`SLACK_BOT_TOKEN=${shellQuote(slackToken)}`); const envDir = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-env-")); const envTmp = path.join(envDir, "env"); fs.writeFileSync(envTmp, envLines.join("\n") + "\n", { mode: 0o600 }); diff --git a/nemoclaw-blueprint/policies/openclaw-sandbox.yaml b/nemoclaw-blueprint/policies/openclaw-sandbox.yaml index b8acba476ae..321354f37dc 100644 --- a/nemoclaw-blueprint/policies/openclaw-sandbox.yaml +++ b/nemoclaw-blueprint/policies/openclaw-sandbox.yaml @@ -158,7 +158,7 @@ network_policies: - { path: /usr/local/bin/npm } # ── Messaging — pre-allowed for agent notifications ──────────── - # Telegram Bot API is open by default so the agent can send + # Telegram and Discord are open by default so the agent can send # notifications and respond to chats without triggering approval. telegram: name: telegram @@ -171,3 +171,30 @@ network_policies: rules: - allow: { method: GET, path: "/bot*/**" } - allow: { method: POST, path: "/bot*/**" } + + discord: + name: discord + endpoints: + - host: discord.com + port: 443 + protocol: rest + enforcement: enforce + tls: terminate + rules: + - allow: { method: GET, path: "/**" } + - allow: { method: POST, path: "/**" } + - host: gateway.discord.gg + port: 443 + protocol: rest + enforcement: enforce + tls: terminate + rules: + - allow: { method: GET, path: "/**" } + - allow: { method: POST, path: "/**" } + - host: cdn.discordapp.com + port: 443 + protocol: rest + enforcement: enforce + tls: terminate + rules: + - allow: { method: GET, path: "/**" }