/** Frozen at repair arm time; it never grants a new notification window. */ export interface RepairFeedbackAuthority { sessionId: string; expiresAt: number; routeReceipt: unknown; } export interface RepairFeedbackScope { principalId: string; principalRecordId: string; principalVersion: number; workspace: string; preset: string; } export interface RepairFeedbackRecord { id: string; scope: RepairFeedbackScope; authorization: { ownerRouteId: string; }; routeReceipt: unknown; feedbackAuthority: RepairFeedbackAuthority; } /** * Callers provide only durable repair facts. Text deliberately excludes * source prompts, model output, paths, and identifiers from the repair work. */ export type RepairFeedbackMilestone = 'independent-acceptance' | 'candidate-staged' | 'finite-canary' | 'iteration-success' | 'final-success' | 'successor-failed' | 'interrupted' | 'budget-exhausted'; export interface RepairIterationOutcome { iteration: number; maxIterations: number; state: string; milestone: RepairFeedbackMilestone; candidateId?: string; deploymentId?: string; goalId?: string; } export interface RepairFeedbackDelivery { validateOwnerRoute(input: { authorityId: string; principalId: string; workspace: string; agentPreset: string; }): unknown; enqueueOwnerNotification(input: { sourceId: string; ownerRouteId: string; scope: RepairFeedbackScope; sessionId: string; idempotencyKey: string; text: string; expiresAt: number; }): unknown; } export type RepairFeedbackResult = { outcome: 'queued'; idempotencyKey: string; text: string; } | { outcome: 'not-queued'; reason: 'expired' | 'route-not-current' | 'delivery-rejected'; }; /** Deterministic, private status text. It never says the original goal is complete or that a person read it. */ export declare function renderRepairFeedback(outcome: RepairIterationOutcome): string; export declare function repairFeedbackIdempotencyKey(record: Pick, outcome: Pick): string; /** * Queue one already-authorized owner notice. Delivery owns the final send-Policy * check; route, lineage, receipt, session, and expiry are fenced before queueing. */ export declare function enqueueRepairFeedback(delivery: RepairFeedbackDelivery, record: RepairFeedbackRecord, outcome: RepairIterationOutcome): RepairFeedbackResult; //# sourceMappingURL=repair-feedback.d.ts.map