/** * `maybeRefreshAggregate` — Q4=A on-demand aggregate refresh. Recomputes * `phase-complete` / `epic-complete` events only when the current webhook * payload could plausibly change an aggregate state (completed:* label, * issue.closed, pull_request.closed). Zero GraphQL cost on non-completion * payloads. * * Contract: `specs/978-summary-generacy-cockpit/contracts/aggregate-on-demand.md`. */ import { type GhWrapper, type ResolvedEpic } from '@generacy-ai/cockpit'; import { type AggregateState } from '../watch/aggregate.js'; import type { AggregateEvent } from '../watch/aggregate-emit.js'; import type { SnapshotMap } from '../watch/snapshot.js'; export type AggregateTrigger = { kind: 'completed-label'; label: string; } | { kind: 'issue-closed'; } | { kind: 'pr-closed'; } | null; export interface AggregateRefreshInput { trigger: AggregateTrigger; epicRef: string; epicRepo: string; epicNumber: number; prevAgg: AggregateState; prev: SnapshotMap; currentResolved: ResolvedEpic | null; gh: GhWrapper; logger: { warn: (msg: string) => void; }; now: () => string; } export interface AggregateRefreshOutput { events: AggregateEvent[]; nextAgg: AggregateState; nextPrev: SnapshotMap; nextResolved: ResolvedEpic | null; } export declare function maybeRefreshAggregate(input: AggregateRefreshInput): Promise; //# sourceMappingURL=aggregate-on-demand.d.ts.map