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.
| Property | Type | Description |
|---|---|---|
message.type | string | Message type identifier |
message.payload | Record<string, unknown> | Arbitrary data to send |
Returns: SdkResultAsync<null>
subscribe(key, handler)
Listens for messages of a specific type.
| Parameter | Type | Description |
|---|---|---|
key | string | Message type to listen for |
handler | (payload: Record<string, unknown>) => void | Callback invoked on each matching message |
Returns: SdkResultAsync<null>
unsubscribe(key)
Stops listening for a specific message type. Removes all handlers for that key.
| Parameter | Type | Description |
|---|---|---|
key | string | Message type to stop listening for |
Returns: SdkResultAsync<null>