/** * Stage-2 workorder publishers: key/payload contracts for the system run paths * (dashboard/wiki/promotion, plus the reconcile leg) enqueued into the ledger. * * The workorder pipeline is the ONLY run path since v0.28.0. The former * MAMA_STAGE2_WORKORDERS tri-state (off = legacy persona runs, shadow = board * dual-run against a capture store) and the legacy executeValidatedRun paths * it gated were removed after the 2026-07-22 production cutover to 'on' * (migration plan: docs/superpowers/plans/2026-07-18-stage2-workorder-ownership.md). */ import type { WorkOrderKind } from './task-ledger.js'; import { type BindingCandidate, type ExternalLifecycleDiagnostic, type LifecycleCandidate } from './external-lifecycle.js'; export declare const STAGE2_FLAG_ENV = "MAMA_STAGE2_WORKORDERS"; /** * Boot guard for the retired flag. Unset or 'on' is fine (the pipeline always * runs); 'off'/'shadow' request the removed legacy behavior and must fail the * boot loudly (no-fallback: silently running the pipeline against an explicit * legacy pin would mask the operator's intent). */ export declare function assertStage2FlagCompatible(env?: NodeJS.ProcessEnv): void; export declare function boardFullKey(now: number): string; /** Manual/forced orders get their own key (plan M2): a forced refresh must * never dedup against a pending scheduled FULL that lacks force. */ export declare function boardManualKey(now: number): string; /** * Batch-deterministic key (S2 Task 4): a conductor judgment that delegates * carries its inbox batch, and a crash between enqueue and ack redelivers * the batch - the SAME ids must produce the SAME key so the retry dedups * instead of double-ordering. Wall-clock keys cannot give that. */ export declare function boardBatchKey(causeEventIds: readonly string[]): string; export declare function boardReconcileKey(channelKey: string, now: number): string; export declare function wikiBatchKey(trigger: string, now: number): string; export declare function promotionKey(now: number): string; export declare function promotionManualKey(now: number): string; export interface BoardPayload { mode: 'full' | 'reconcile'; /** Owner-forced refresh: brief must publish even on NO_UPDATE. */ force?: boolean; channelKey?: string; readonly deltaLines?: readonly string[]; /** The delta batch this reconcile rests on; becomes the cause of what it changes. */ readonly eventIds?: readonly string[]; /** Host-authored immutable candidates; reconcile-only. */ readonly candidates?: { readonly bindingCandidates: readonly BindingCandidate[]; readonly lifecycleCandidates: readonly LifecycleCandidate[]; readonly diagnostics?: readonly ExternalLifecycleDiagnostic[]; }; } export interface WikiPayload { batchId: string; /** Trigger provenance; the run does its own novelty check, events carry no content. */ events: string[]; } export interface PromotionPayload { scheduledAt: string; } export interface TemporalPayload { generationKey: string; taskId: number; temporalEpoch: number; occurrenceKey: string; checkAt: number; sourceChannel: string | null; sourceEventId: string | null; } /** * Validate a payload at enqueue time. Unknown fields are rejected LOUDLY - * a misspelled field silently dropped would surface as a wrong run later. * `attempts` is ledger-managed and is never valid publisher input. */ export declare function validateWorkOrderPayload(kind: WorkOrderKind, payload: Record): void; //# sourceMappingURL=workorder-publishers.d.ts.map