Skip to main content

Stateless Messaging API Reference

kittl.stateless — real-time messaging between extensions.

Scope: exempt — always allowed

send(message)

Broadcasts a message to all subscribers of that message type.

PropertyTypeDescription
message.typestringMessage type identifier
message.payloadRecord<string, unknown>Arbitrary data to send

Returns: SdkResultAsync<null>

subscribe(key, handler)

Listens for messages of a specific type.

ParameterTypeDescription
keystringMessage type to listen for
handler(payload: Record<string, unknown>) => voidCallback invoked on each matching message

Returns: SdkResultAsync<null>

unsubscribe(key)

Stops listening for a specific message type. Removes all handlers for that key.

ParameterTypeDescription
keystringMessage type to stop listening for

Returns: SdkResultAsync<null>