import type { ResourceKind } from "../core.js"; import type { State, StateEntry } from "./compile.js"; export type LiveRead = { exists: boolean; fingerprint?: string; }; export type LiveReader = (entry: StateEntry) => Promise; export type LiveReaders = Record; export type DriftStatus = "unchanged" | "modified" | "deleted" | "unknown"; export type DriftEntry = { id: string; kind: ResourceKind; status: DriftStatus; }; /** Hash an arbitrary projection of a resource into a comparable fingerprint. */ export declare function fingerprint(value: unknown): string; /** * Read every state-tracked resource live and classify drift: * - deleted — gone from the workspace (re-deploy would recreate it) * - modified — its live fingerprint differs from the one captured at apply * - unchanged — live matches the last apply * - unknown — no baseline fingerprint, or the kind has no live reader */ export declare function detectDrift(state: State, readers: LiveReaders): Promise; /** * Return a copy of `state` adjusted so the next compile re-applies drifted * resources: a `modified` resource gets its code-hash invalidated (→ update, * overwriting the out-of-band edit); a `deleted` one is dropped (→ create). * `unchanged`/`unknown` are left as-is. */ export declare function reconcileDrift(state: State, drift: DriftEntry[]): State; //# sourceMappingURL=refresh.d.ts.map