Skip to content

[Feature]: Pluggable providers #891

@thebalaa

Description

@thebalaa

Pluggable Clawdbot Providers

Problem

Currently, adding a new provider/channel to Clawdbot requires modifying 5+ core files:

  • channels/registry.ts
  • channels/plugins/index.ts
  • channels/dock.ts
  • config/zod-schema.providers-core.ts
  • config/zod-schema.providers.ts

Providers are hardcoded, not discoverable like the existing plugin system.

Proposed Solution

Extend the plugin API to support provider registration:

api.registerChannel({
  id: "matrix",
  meta: { label: "Matrix", ... },
  configSchema: MatrixConfigSchema,
  monitor: monitorMatrixProvider,
  send: sendMessageMatrix,
  probe: probeMatrix,
  actions: { react, edit, delete, ... },
});

Benefits

  • Drop-in provider packages (npm install, enable in config)
  • Community-contributed providers
  • Cleaner separation between core and providers
  • Easier testing (mock providers)

Considerations

  • Config schema validation at runtime vs build time
  • Session routing integration
  • Capability negotiation (what actions does provider support?)
  • Breaking change for existing provider structure

References

  • Current plugin system: src/plugins/
  • Current channel system: src/channels/
  • Matrix provider implementation: src/matrix/ (in progress)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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