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)
Pluggable Clawdbot Providers
Problem
Currently, adding a new provider/channel to Clawdbot requires modifying 5+ core files:
channels/registry.tschannels/plugins/index.tschannels/dock.tsconfig/zod-schema.providers-core.tsconfig/zod-schema.providers.tsProviders are hardcoded, not discoverable like the existing plugin system.
Proposed Solution
Extend the plugin API to support provider registration:
Benefits
Considerations
References
src/plugins/src/channels/src/matrix/(in progress)