Table of Contents

Namespace JD.AI.Channels.OpenClaw.Routing

Classes

InterceptModeHandler

Intercept mode: suppresses OpenClaw's agent and routes the message through JD.AI instead. On receiving a user message, calls chat.abort to stop OpenClaw's processing, runs the message through JD.AI (Semantic Kernel → Ollama/provider), then injects the response back via chat.inject (without re-triggering OpenClaw's agent).

OpenClawAgentProfileConfig

Defines an agent configuration profile for processing routed messages.

OpenClawChannelRouteConfig

Routing configuration for a specific OpenClaw channel.

OpenClawRoutingConfig

Top-level routing configuration for the OpenClaw bridge.

OpenClawRoutingService

Hosted service that connects the OpenClaw bridge and routes incoming messages to JD.AI agents based on per-channel routing configuration.

OpenClaw broadcasts two event types to WebSocket clients:

  • "agent" — lifecycle, assistant, tool events (has stream and sessionKey)
  • "chat" — chat deltas and finals (has state, sessionKey)

User input is NOT broadcast as a WebSocket event. To detect user messages, we watch for agent lifecycle "start" events and query chat.history for the session.

PassthroughModeHandler

Passthrough mode: observes events for logging/analytics but never responds.

ProxyModeHandler

Proxy mode: JD.AI is the sole agent backend for a dedicated OpenClaw session. OpenClaw acts purely as transport. No need to abort — there's no competing agent.

SidecarModeHandler

Sidecar mode: both JD.AI and OpenClaw process messages. JD.AI only responds when the message matches a trigger (command prefix, regex, or @mention). OpenClaw handles everything else normally.

Interfaces

IOpenClawModeHandler

Handles messages for a specific OpenClawRoutingMode. Each mode handler decides whether to process a message and how to respond.

Enums

OpenClawRoutingMode

Determines how messages from an OpenClaw channel are handled by JD.AI.