Skip to content

extensions/ directory not bundled, causing 'plugin not found' errors for telegram/discord #14

@nakayama900

Description

@nakayama900

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

  1. Extensions exist in the clawdbot source:
    ```
    $ ls extensions/
    discord/ telegram/ slack/ memory-core/
    googlechat/ signal/ ...
    ```

  2. 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;
    ```

  3. `plugin-auto-enable.ts` correctly adds these to `plugins.entries` when channels are configured

  4. 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

  1. 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 = "...";
    };
    };
    };
    };
    };
    ```

  2. Run `home-manager switch`

  3. 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

Possible Fix

Include the `extensions/` directory in the nix-clawdbot package, similar to how `dist/` and `node_modules/` are included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions