/** * board-reconcile - the delta -> taskboard reconcile contract (M8 Phase 1). * * Ports Kagemusha's taskboard reconcile mechanism (agent-awareness.ts * buildTaskboardReconcilePrompt / runTaskboardReconcile): when a channel delta * arrives, the AGENT judges which board slots are affected and MUST either act * (partial report_publish / task_create / task_update) or record a * contract_no_update note. The system only debounces, budgets, and serializes; * every judgment is the agent's (agent-first). * * Freshness-layer semantics: the 30-minute dashboard cron remains the * repair/catch-up pass. Over-budget work is DEFERRED (channel stays dirty with * its pending lines), never silently dropped; a crash loses at most one * debounce window, which the next cron repairs. */ export interface ReconcilePromptInput { /** ":" - connector-qualified, collision-free. */ channelKey: string; channelLabel?: string; deltaLines: string[]; todayIso: string; /** Also read kagemusha_tasks as judgment CONTEXT (never the projection source). */ kagemushaContext?: boolean; } /** The prompt MUST begin with this token so the persona's RECONCILE RUN mode engages. */ export declare const RECONCILE_RUN_TOKEN = "RECONCILE RUN"; export interface ReconcileSchedulerOptions { /** Trailing-edge debounce per channel. */ debounceMs?: number; /** A continuously-busy channel still fires by this bound (anti-starvation). */ maxWaitMs?: number; /** GLOBAL budget across all channels (sliding hour). Over-budget defers, never drops. */ globalMaxPerHour?: number; /** Bounded pending lines kept per channel while deferred. */ maxPendingLines?: number; run: (channelKey: string, deltaLines: string[], eventIds: string[]) => Promise; log: (line: string) => void; now?: () => number; } export declare class ReconcileScheduler { private readonly debounceMs; private readonly maxWaitMs; private readonly globalMaxPerHour; private readonly maxPendingLines; private readonly run; private readonly log; private readonly now; private channels; private runTimestamps; private retryTimer; private stopped; constructor(opts: ReconcileSchedulerOptions); enqueue(channelKey: string, lines: string[], eventIds?: readonly string[]): void; /** Channels currently holding deferred/pending work (for observability). */ dirtyChannels(): string[]; stop(): void; private budgetAvailable; private scheduleRetry; private fire; } //# sourceMappingURL=board-reconcile.d.ts.map