KuralleChatRouterOptions
type KuralleChatRouterOptions = object;Properties
Section titled “Properties”runtime
Section titled “runtime”runtime: OpenAICompatRuntime;sendWidgetWelcomeMessage?
Section titled “sendWidgetWelcomeMessage?”optional sendWidgetWelcomeMessage?: boolean;Whether /agents/chat/:sessionId should auto-greet on socket open.
Deprecated. Use widgetWelcomeMode instead.
Backward compatibility mapping:
false=>offtrue+widgetWelcomeMessage=>statictrue+ no message =>model
streamFilter?
Section titled “streamFilter?”optional streamFilter?: StreamEventFilter;Controls which HarnessStreamPart events are sent to external clients (SSE + widget/flow WebSockets).
'safe': only user-facing events (text-delta, done, sanitized error, suggested-questions, input).'all': full stream (Studio / dev tooling).- function: custom predicate; return true to emit.
Default
Section titled “Default”'safe'upgradeWebSocket?
Section titled “upgradeWebSocket?”optional upgradeWebSocket?: UpgradeWebSocket;widgetWelcomeMessage?
Section titled “widgetWelcomeMessage?”optional widgetWelcomeMessage?: string;Optional static welcome text to send immediately on socket open. If provided, this is sent directly instead of running a runtime turn.
widgetWelcomeMode?
Section titled “widgetWelcomeMode?”optional widgetWelcomeMode?: WidgetWelcomeMode;Controls widget welcome behavior for /agents/chat/:sessionId.
off: do not send a welcome turn on connect.model: generate welcome by callingruntime.stream(...).static: sendwidgetWelcomeMessagedirectly without model inference.
widgetWelcomeSuggestions?
Section titled “widgetWelcomeSuggestions?”optional widgetWelcomeSuggestions?: string[];Optional static quick-reply suggestions for the initial widget state.