import { type IsoDate } from './dates.js'; import type { NudgeSubject, Occasion, OccasionAcknowledgement, OccasionConflict, OccasionNudge, OpenItem } from './types.js'; /** Everything outstanding, for a surface that pulls rather than receives. */ export interface PendingResult { readonly today: IsoDate; /** What is coming up and has NOT been acknowledged. */ readonly nudge: OccasionNudge | null; /** * Open occurrences the owner has already acknowledged. * * Kept out of `nudge` on purpose. The nudge is composed as something to say * to the owner, and saying an acknowledged occasion back at them is the * badgering this whole round exists to stop, but they asked what is coming * up, and an honest answer includes the one they told us they have in hand. */ readonly acknowledged: readonly NudgeSubject[]; readonly conflicts: readonly { readonly occasionId: string; readonly message: string; }[]; } export interface PendingInput { readonly today: IsoDate; readonly now: number; readonly leadDays: number; readonly occasions: readonly Occasion[]; readonly conflicts: readonly OccasionConflict[]; readonly openItems: readonly OpenItem[]; readonly acknowledgements: readonly OccasionAcknowledgement[]; /** Whether the agent is a configured push destination. */ readonly agentIsPushed: boolean; } /** * Compose the pull. Pure: same inputs, same answer. * * The agent de-duplication is scoped TO THE DAY the push landed, and that * narrowing is load-bearing. It used to be permanent, an item the agent had * ever been pushed carried a stamp and never appeared here again, which was * survivable when a push repeated every few days and is not survivable now that * there are only two. Under the old rule, an occasion pushed once at the top of * its window would then be invisible to "anything coming up?" for the entire * ten days, which is the opposite of what the pull is for. Same day: do not say * it twice in one conversation. Any other day: of course it is listed. */ export declare function composePending(input: PendingInput): PendingResult; //# sourceMappingURL=pending.d.ts.map