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

Closed
opened 2026-02-15 17:04:25 -05:00 by yindo · 2 comments
Owner

Originally created by @nakayama900 on GitHub (Jan 25, 2026).

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 a55f5a9d)
  • 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.

Originally created by @nakayama900 on GitHub (Jan 25, 2026). ## 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 a55f5a9d) - **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 - **clawdbot/clawdbot#1768**: Minimal Docker builds fail: \`plugins.slots.memory: plugin not found: memory-core\` - **clawdbot/clawdbot#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.
yindo closed this issue 2026-02-15 17:04:25 -05:00
Author
Owner

@schickling commented on GitHub (Jan 26, 2026):

This also affects the core gateway startup - not just Discord/Telegram:

plugins.slots.memory: plugin not found: memory-core

The gateway fails to start completely because the memory-core plugin is expected but not bundled. This makes nix-clawdbot unusable in its current state.

@schickling commented on GitHub (Jan 26, 2026): This also affects the core gateway startup - not just Discord/Telegram: ``` plugins.slots.memory: plugin not found: memory-core ``` The gateway fails to start completely because the memory-core plugin is expected but not bundled. This makes nix-clawdbot unusable in its current state.
Author
Owner

@joshp123 commented on GitHub (Feb 3, 2026):

[🤖 this message brought to you by codex] should be fixed in 94e1f7f7 (bundle gateway extensions). Closing for now — come and yell at me in #golden-path-deployments on discord if you're still having issues! Stability work continues; we are making this better every week.

@joshp123 commented on GitHub (Feb 3, 2026): [🤖 this message brought to you by codex] should be fixed in 94e1f7f7 (bundle gateway extensions). Closing for now — come and yell at me in #golden-path-deployments on discord if you're still having issues! Stability work continues; we are making this better every week.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#4