@maxhealth.tech/prefab / actions / SubscribeOpts
Interface: SubscribeOpts
Defined in: actions/subscribe.ts:12
Properties
stateKey
stateKey: string;Defined in: actions/subscribe.ts:14
Reactive store key where incoming data is written.
push?
optional push?: boolean;Defined in: actions/subscribe.ts:16
false always polls, even on a host with subscriptions: a stateless server sends no resource notifications. Defaults to true.
fallbackInterval?
optional fallbackInterval?: number;Defined in: actions/subscribe.ts:18
Poll interval (ms) when the host does not support push subscriptions. Defaults to 2000.
fallbackTool?
optional fallbackTool?: string;Defined in: actions/subscribe.ts:20
Tool to call when polling in fallback mode.
fallbackArgs?
optional fallbackArgs?: Record<string, unknown>;Defined in: actions/subscribe.ts:22
Arguments passed to the fallback tool call.
onData?
optional onData?: Action | Action[];Defined in: actions/subscribe.ts:24
Action(s) executed whenever new data arrives (push or poll).
onError?
optional onError?: Action | Action[];Defined in: actions/subscribe.ts:26
Action(s) executed on subscription or poll error.