import type { StoreEvent, TypeBinding } from './store-types.js'; export declare const KIND_PUBLISHED = "published"; export declare const KIND_ALL_AVAILABLE = "all-available"; /** The two producer-relay kinds (P3.9, relay.ts) travel the same machinery as the notices. */ export declare const KIND_REJECTED = "rejected"; export declare const KIND_CHANGED = "deliverable-changed"; /** A review cycle that reached its max_rework_rounds (P4.7, rework.ts): to the root and the leads involved. */ export declare const KIND_EXHAUSTED = "rework-exhausted"; export type NoticeKind = typeof KIND_PUBLISHED | typeof KIND_ALL_AVAILABLE | typeof KIND_REJECTED | typeof KIND_CHANGED | typeof KIND_EXHAUSTED; /** One thing a decision maker must be told. `key` is stable across restarts: it names the obligation. */ export interface Notice { key: string; kind: NoticeKind; /** Relay kinds, and the copies of an exhaustion notice: the producer itself, or the short copy to the lead (or root). */ audience?: 'producer' | 'lead'; to: string; /** Sequence of the committed event that created the obligation (the publish that triggered it). */ seq: number; /** The document and version a publish notice is about (an all-available one: the completing publish). */ doc: string; version: number; subject: string; body: string; } /** What the notice derivation needs to know of one document type. */ export interface TypeInfo { type: string; hasChecks: boolean; consumers: TypeBinding['consumers']; } type Published = Extract; /** The decision makers of a type, in declaration order, each once. */ export declare function deciders(t: Pick): string[]; /** The types a decision maker needs before it has "all documents": those whose consuming sections it decides for. */ export declare function neededTypes(types: readonly TypeInfo[], role: string): string[]; /** The message a decision maker gets for one committed publish. `earlier` are the committed events before it. */ export declare function publishedNotice(e: Published, t: TypeInfo, role: string, earlier: readonly StoreEvent[]): Notice; /** The one message a decision maker gets when every document type it needs has a document. */ export declare function allAvailableNotice(role: string, e: Published, docs: { id: string; version: number; }[], hasChecks: boolean): Notice; /** * Every notice the committed log obliges, in order: for each publish, the publish notices (in decider order), * then the all-available message of each decision maker that publish completed. Pure and deterministic, so the * same log always derives the same keys and the same text. */ export declare function deriveNotices(types: readonly TypeInfo[], events: readonly StoreEvent[]): Notice[]; export {}; //# sourceMappingURL=notice.d.ts.map