KuralleChatRouterOptions
type KuralleChatRouterOptions = object;Properties
Section titled “Properties”resolveSignalActor?
Section titled “resolveSignalActor?”optional resolveSignalActor?: (c) => SignalActor | undefined | Promise<SignalActor | undefined>;Who a /api/chat/resume decision is attributed to in the durable audit log.
Derive this from your own authentication — a session cookie, a bearer token, the request context. It is deliberately NOT read from the request body: a client that could name its own actor could approve as anyone.
Omitted, decisions are attributed to the service itself (hono-resume), which is
honest but means the audit log cannot tell you which human approved.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”SignalActor | undefined | Promise<SignalActor | undefined>
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 StreamPart events are sent to external clients (SSE + widget/flow WebSockets).
'safe': events classified asclientby core, with errors sanitized.'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.