import { type CanonicalizeDebtOperation, type RemediationIssue } from './protocol'; export declare const CANONICALIZE_PLAN_STATUS: { /** Every canonical value is settled: the operation is complete and reviewable. */ readonly READY: "READY"; /** At least one canonical value is neither observed-valid nor operator-supplied. */ readonly INPUT_REQUIRED: "INPUT_REQUIRED"; /** This debt cannot be canonicalized by this operation at all. */ readonly NOT_APPLICABLE: "NOT_APPLICABLE"; }; export type CanonicalizePlanStatus = (typeof CANONICALIZE_PLAN_STATUS)[keyof typeof CANONICALIZE_PLAN_STATUS]; /** Why a field still needs a human. */ export declare const CANONICALIZE_DECISION_REASON: { /** The observed value is absent. */ readonly ABSENT: "ABSENT"; /** The observed value is present but not a valid canonical value. */ readonly INVALID: "INVALID"; /** The operator supplied a value that is itself not a valid canonical value. */ readonly REJECTED: "REJECTED"; /** The operator supplied a value for a field that is already canonical. */ readonly NOT_NEGOTIABLE: "NOT_NEGOTIABLE"; }; export type CanonicalizeDecisionReason = (typeof CANONICALIZE_DECISION_REASON)[keyof typeof CANONICALIZE_DECISION_REASON]; export interface UnresolvedDecision { /** Canonical field path, e.g. `debt[0].priority`. */ readonly path: string; readonly field: string; readonly reason: CanonicalizeDecisionReason; /** What the record actually holds today, if anything. */ readonly observed: unknown; /** What the observed record supports, in words. Never an authorization. */ readonly evidence: string | null; /** A value the evidence supports. Still requires an explicit decision to take effect. */ readonly suggested: string | number | null; readonly detail: string; } /** How each canonical field of the after-image was settled. Preparation output is auditable. */ export interface ResolvedField { readonly field: string; readonly source: 'observed' | 'decision'; readonly value: unknown; readonly evidence: string | null; } export interface CanonicalizeDecisions { readonly origin?: unknown; readonly priority?: unknown; readonly targetSprint?: unknown; readonly note?: unknown; } export interface CanonicalizePlanInput { /** The complete observed `debt[]` collection, exactly as read. */ readonly debt: readonly unknown[]; readonly debtId: string; readonly decisions?: CanonicalizeDecisions; readonly reason?: string; readonly operationId?: string; readonly issueIdPrefix?: string; /** Injected so the planner owns no hashing dependency. */ readonly digest: (value: unknown) => string; readonly collectionDigest: (debt: readonly unknown[]) => string; } interface PlanCommon { readonly debtId: string; readonly classification: string | null; readonly resolved: readonly ResolvedField[]; readonly unresolved: readonly UnresolvedDecision[]; readonly retiredKeys: readonly string[]; } export type CanonicalizePlan = (PlanCommon & { readonly status: typeof CANONICALIZE_PLAN_STATUS.READY; readonly operation: CanonicalizeDebtOperation; readonly issues: readonly RemediationIssue[]; readonly debtCollectionSha256: string; readonly detail: null; }) | (PlanCommon & { readonly status: typeof CANONICALIZE_PLAN_STATUS.INPUT_REQUIRED; readonly operation: null; readonly issues: readonly RemediationIssue[]; readonly debtCollectionSha256: string; readonly detail: string; }) | (PlanCommon & { readonly status: typeof CANONICALIZE_PLAN_STATUS.NOT_APPLICABLE; readonly operation: null; readonly issues: readonly []; readonly debtCollectionSha256: string | null; readonly detail: string; }); /** * Plan the canonicalization of one debt record. Total over malformed input: any shape yields a * plan object, never a throw. */ export declare function planDebtCanonicalization(input: CanonicalizePlanInput): CanonicalizePlan; export {}; //# sourceMappingURL=canonicalize-plan.d.ts.map