Class ServiceCollectionExtensions
DI registration helpers for the OpenClaw bridge channel.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
AddOpenClawBridge(IServiceCollection, Action<OpenClawConfig>)
Registers OpenClawBridgeChannel as an IChannel with WebSocket JSON-RPC connectivity to an OpenClaw gateway.
public static IServiceCollection AddOpenClawBridge(this IServiceCollection services, Action<OpenClawConfig> configure)
Parameters
servicesIServiceCollectionconfigureAction<OpenClawConfig>
Returns
AddOpenClawRouting(IServiceCollection, Action<OpenClawRoutingConfig>, Func<string, string, Task<string?>>?)
Registers the OpenClaw routing infrastructure with per-channel mode configuration. Call after AddOpenClawBridge(IServiceCollection, Action<OpenClawConfig>) to enable intelligent message routing.
public static IServiceCollection AddOpenClawRouting(this IServiceCollection services, Action<OpenClawRoutingConfig> configure, Func<string, string, Task<string?>>? messageProcessor = null)
Parameters
servicesIServiceCollectionThe service collection.
configureAction<OpenClawRoutingConfig>Configure routing options (modes, channels, agent profiles).
messageProcessorFunc<string, string, Task<string>>Callback that processes a user message through JD.AI's agent. Parameters: (sessionKey, content) → response string.