import { type ResultEnvelope } from 'peaks-loop-shared/result'; export type PlanType = 'security' | 'perf'; /** Back-compat env-var. When set to "1", fall back to legacy paths. */ export declare const BACK_COMPAT_FLAG = "PEAKS_PLAN_LEGACY_FALLBACK"; export declare const SESSION_ID_PATTERN: RegExp; export interface ReadPlanArgs { readonly type: PlanType; readonly project: string; readonly sessionId: string; } export interface ReadPlanData { readonly type: PlanType; readonly exists: boolean; readonly path: string; readonly hash: string | null; readonly refreshedAt: string | null; /** `'canonical' | 'legacy' | 'missing'` — surfaced to the slice workflow * so it can warn the user about a back-compat fallback. */ readonly source: 'canonical' | 'legacy' | 'missing'; } /** * Normalize a markdown body for hashing. Sections sorted, blank lines * collapsed, leading/trailing whitespace stripped. Hash is sha256[0:12]. */ export declare function normalizePlanBody(body: string): string; /** Compute the deterministic plan hash on a normalized body. */ export declare function hashNormalizedBody(body: string): string; export declare function readPlan(args: ReadPlanArgs): ResultEnvelope;