mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-08 18:39:50 +00:00
feat(openclaw): add channel selection to setup options (#2671)
Add BlueBubbles, Discord, Slack, Signal, and Google Chat to the multi-select setup options for OpenClaw. Selected channels get `enabled: true` stubs written via `openclaw config set`, so the dashboard renders channel cards properly instead of showing "Unsupported type: . Use Raw mode." Channels are gated by enabledSteps — only user-selected channels get stubbed. WhatsApp and Telegram remain in the list as before. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f4b535c8d
commit
00df240f49
3 changed files with 46 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.19.2",
|
||||
"version": "0.19.3",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
|
|
@ -446,13 +446,21 @@ async function setupOpenclawConfig(
|
|||
// Write channel stubs so the dashboard renders channel cards properly,
|
||||
// even when the user hasn't configured them yet. Without stubs the
|
||||
// dashboard shows "Unsupported type: . Use Raw mode."
|
||||
await asyncTryCatchIf(isOperationalError, () =>
|
||||
runner.runServer(
|
||||
"export PATH=$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.local/bin:$PATH; " +
|
||||
"openclaw config set channels.telegram.enabled true >/dev/null; " +
|
||||
"openclaw config set channels.whatsapp.enabled true >/dev/null",
|
||||
),
|
||||
);
|
||||
const channelNames = [
|
||||
"telegram",
|
||||
"whatsapp",
|
||||
"discord",
|
||||
"slack",
|
||||
"signal",
|
||||
"googlechat",
|
||||
"bluebubbles",
|
||||
].filter((ch) => !enabledSteps || enabledSteps.has(ch));
|
||||
if (channelNames.length > 0) {
|
||||
const stubCmds = channelNames.map((ch) => `openclaw config set channels.${ch}.enabled true >/dev/null`).join("; ");
|
||||
await asyncTryCatchIf(isOperationalError, () =>
|
||||
runner.runServer("export PATH=$HOME/.npm-global/bin:$HOME/.bun/bin:$HOME/.local/bin:$PATH; " + stubCmds),
|
||||
);
|
||||
}
|
||||
|
||||
// Configure Telegram channel if a bot token was provided
|
||||
if (telegramBotToken) {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,36 @@ const AGENT_EXTRA_STEPS: Record<string, OptionalStep[]> = {
|
|||
hint: "connect via bot token from @BotFather",
|
||||
dataEnvVar: "TELEGRAM_BOT_TOKEN",
|
||||
},
|
||||
{
|
||||
value: "whatsapp",
|
||||
label: "WhatsApp",
|
||||
hint: "link via QR code after launch",
|
||||
},
|
||||
{
|
||||
value: "discord",
|
||||
label: "Discord",
|
||||
hint: "connect via bot token",
|
||||
},
|
||||
{
|
||||
value: "slack",
|
||||
label: "Slack",
|
||||
hint: "connect via bot + app tokens",
|
||||
},
|
||||
{
|
||||
value: "signal",
|
||||
label: "Signal",
|
||||
hint: "link via signal-cli",
|
||||
},
|
||||
{
|
||||
value: "googlechat",
|
||||
label: "Google Chat",
|
||||
hint: "connect via webhook",
|
||||
},
|
||||
{
|
||||
value: "bluebubbles",
|
||||
label: "BlueBubbles",
|
||||
hint: "iMessage bridge via BlueBubbles server",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue