UNPKG

@mastra/core

Version:
19 lines • 1.27 kB
import type { NotificationRecord } from './types.js'; export type NotificationRoutingRequirement = { /** Reject the delivery unless an advertised thread owner acknowledges it. */ requireClaimedOwner?: boolean; /** Scopes for the run this notification starts. */ scopes?: string[]; /** The send asked an idle thread to persist, never wake: a delayed delivery keeps that. */ idleBehavior?: 'persist'; }; export declare function readNotificationRoutingRequirement(metadata: NotificationRecord['metadata']): NotificationRoutingRequirement | undefined; /** * Store a requirement on a record's metadata, leaving other metadata alone. Caller metadata * never supplies the reserved key: its scopes would start the delayed run, so any copy the * caller sent is dropped, even when there is no requirement to store. */ export declare function applyNotificationRoutingRequirement(metadata: NotificationRecord['metadata'], requirement: NotificationRoutingRequirement): NotificationRecord['metadata']; /** Drop the reserved key so it never reaches a delivered signal or a recipient. */ export declare function stripNotificationRoutingRequirement(metadata: NotificationRecord['metadata']): NotificationRecord['metadata']; //# sourceMappingURL=routing.d.ts.map