-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Bug Report
Summary
When using nix-clawdbot to configure Clawdbot with Telegram and/or Discord channels, the Gateway fails to start with:
Invalid config at /Users/k22097kk/.clawdbot/clawobd.json:
- plugins.entries.telegram: plugin not found: telegram
- plugins.entries.discord: plugin not found: discord
Root Cause
The nix-clawdbot module does not bundle the `extensions/` directory, which contains the bundled channel plugins:
- `extensions/telegram/` (Telegram channel plugin)
- `extensions/discord/` (Discord channel plugin)
- `extensions/slack/` (Slack channel plugin)
- `extensions/memory-core/` (Memory plugin)
This is similar to Issue #1768 ("Minimal Docker builds fail: `plugins.slots.memory: plugin not found: memory-core`"), where minimal Docker builds were omitting the `extensions/` directory.
Evidence
-
Extensions exist in the clawdbot source:
```
$ ls extensions/
discord/ telegram/ slack/ memory-core/
googlechat/ signal/ ...
``` -
Extensions properly export `clawdbotPlugin`:
```typescript
// extensions/telegram/index.ts
const plugin = {
id: "telegram",
name: "Telegram",
description: "Telegram channel plugin",
register(api: ClawdbotPluginApi) {
setTelegramRuntime(api.runtime);
api.registerChannel({ plugin: telegramPlugin });
},
};
export default plugin;
``` -
`plugin-auto-enable.ts` correctly adds these to `plugins.entries` when channels are configured
-
Validation fails because plugins are not in the registry (extensions/ not bundled)
Environment
- Clawdbot version: 2026.1.24-0
- nix-clawdbot: latest (commit a55f5a9)
- OS: macOS 26.2 (Darwin 25.2.0, arm64)
- Node: v22.22.0
Expected Behavior
nix-clawdbot should bundle the `extensions/` directory so that bundled channel plugins (telegram, discord, slack) are available at runtime.
Reproduction Steps
-
Configure nix-clawdbot with Telegram and/or Discord:
```nix
programs.clawdbot = {
instances.default = {
enable = true;
configOverrides = {
channels = {
telegram = {
enabled = true;
tokenFile = "/path/to/token";
};
discord = {
enabled = true;
token = "...";
};
};
};
};
};
``` -
Run `home-manager switch`
-
Gateway fails to start with "plugin not found" errors
Workaround
Using an activation script to remove `plugins.entries`:
```bash
jq 'del(.plugins.entries)' "$CONFIG_FILE"
```
However, this is not ideal as it prevents `plugin-auto-enable.ts` from working correctly.
Related Issues
- Minimal Docker builds fail:
plugins.slots.memory: plugin not found: memory-coremoltbot#1768: Minimal Docker builds fail: `plugins.slots.memory: plugin not found: memory-core` - plugin-auto-enable adds built-in channels (telegram/discord) to plugins.entries, causing validation errors moltbot#2073: (incorrect issue, same root cause but filed against wrong repo)
Possible Fix
Include the `extensions/` directory in the nix-clawdbot package, similar to how `dist/` and `node_modules/` are included.