import type { IsoDate } from './dates.js'; import type { OccasionNudge, OpenItem } from './types.js'; /** How a nudge leaves the daemon. Bound to the channel delivery router. */ export interface OccasionNudgeDeliverer { deliver(input: { readonly channel: string; readonly nudge: OccasionNudge; }): Promise; } /** * One destination a nudge was pushed to, and what came of it. * * Per destination rather than one verdict for the batch, because with two * channels configured "delivered: false" would say nothing about WHICH one went * quiet, and a channel the owner believes is reaching them and is not is the failure * this whole feature exists to avoid. */ export interface NudgeDelivery { /** The destination as configured: `surfaceKind` or `surfaceKind:address`. */ readonly channel: string; readonly delivered: boolean; readonly deliveryId: string | null; /** Why this one did not land, when it did not. */ readonly failure: string | null; } /** * Push one nudge to every configured destination, independently. * * A destination that throws is RECORDED and the next one is still tried. The * alternative, letting the first failure escape, means an expired Telegram * token stops the agent hearing about the owner's wife's birthday, and the two have * nothing to do with each other. Nothing is swallowed: each failure comes back * in the outcome, the router has already logged it against its surface and * strategy, and the sweep's caller logs the count. */ export declare function pushNudge(deliverer: OccasionNudgeDeliverer | undefined, nudge: OccasionNudge, destinations: readonly string[]): Promise; /** * Remember that the agent has these items in hand, for TODAY. * * Written AFTER the push rather than folded into the raise, so an item is never * marked as spoken by a delivery that had not happened yet. * * The stamp carries the day and the pull compares it against today, so it * suppresses a duplicate within one conversation and nothing beyond that. It * used to be read as permanent, which under a cadence that now pushes twice * would have hidden an occasion from "anything coming up?" for the entire * stretch between its two boundaries. */ export declare function stampSpokenToAgent(put: (item: OpenItem) => Promise, raised: readonly OpenItem[], today: IsoDate): Promise; //# sourceMappingURL=push.d.ts.map