export type DecisionChannel = "advise" | "decide" | "alert"; export type DecisionSource = "escalate" | "track" | "loop"; export interface DecisionSessionRef { readonly tmuxName?: string; readonly pane?: string; readonly sessionId?: string; } export interface PendingDecision { readonly id: string; readonly source: DecisionSource; readonly channel?: DecisionChannel; readonly instance: string; readonly workspace?: string; readonly question: string; readonly options?: readonly { readonly id: string; readonly label: string; }[]; readonly sessionRef?: DecisionSessionRef; readonly createdAt: string; } export interface EscalateLikeEnvelope { readonly id: string; readonly type: string; readonly actor?: { readonly instance?: string; readonly scope?: string; }; readonly body?: unknown; readonly createdAt?: string; } export interface AggregateSession { readonly instance?: string; readonly sessionId?: string; readonly workspaceId?: string; readonly launchContext?: { readonly tmux?: { readonly session?: string; readonly pane?: string; }; }; } export interface AggregateEntry { readonly env: EscalateLikeEnvelope; readonly session?: AggregateSession; } /** PURE: map ONE escalate-like envelope to a PendingDecision, or null if it is * not a decision-bearing escalate envelope. */ export declare function escalateToPendingDecision(entry: AggregateEntry): PendingDecision | null; /** * PURE: aggregate escalate-like entries into an ordered, de-duplicated list of * pending decisions. Dedup by `id`. Order = channel priority (alert > decide > * advise > none) then `createdAt` ascending (oldest waiting first). */ export declare function aggregatePendingDecisions(entries: readonly AggregateEntry[]): PendingDecision[]; //# sourceMappingURL=aggregate.d.ts.map