/**
 * Staleness library entrypoint. Aggregates per-resource checkers into the
 * two operations the rest of the codebase needs:
 *
 *   - `buildManifest(agent, version, cwd)` — snapshot current state.
 *   - `isStale(manifest, agent, version, cwd)` — true when any tracked
 *     resource has drifted from its stored fingerprint, or when an artifact
 *     the last full sync wrote (`writtenTargets`) has been deleted from the
 *     version home (#2398).
 *
 * `loadManifest` / `saveManifest` round-trip the on-disk JSON. The format
 * version stays at 1; new optional fields (workflows, plugins) on old files
 * read as empty maps which forces a single re-sync.
 */
import type { AgentId } from '../types.js';
import { type SyncManifest, type FileEntry, type DirEntry, type PluginEntry, type RulesEntry } from './types.js';
export type { SyncManifest } from './types.js';
export { MANIFEST_VERSION } from './types.js';
export declare function loadManifest(agent: AgentId, version: string): SyncManifest | null;
export declare function saveManifest(agent: AgentId, version: string, manifest: SyncManifest): void;
/**
 * Snapshot current resource fingerprints for `agent@version`.
 *
 * When `previous` is supplied (the still-loaded post-guard manifest), any
 * entry whose stored path/mtime/size still match via the checker's `isFresh`
 * is carried forward without re-hashing. Measured: full rebuild ~716 ms →
 * carry-forward near the 5.67 ms `isStale` cost on an unchanged tree
 * (RUSH-2320 #3).
 */
export declare function buildManifest(agent: AgentId, version: string, cwd: string, previous?: SyncManifest | null): SyncManifest;
/**
 * True when any tracked resource has drifted from the stored manifest.
 * Walks every resource type in turn and returns true at the first miss —
 * sync detection should be cheap when nothing changed.
 */
export declare function isStale(manifest: SyncManifest, agent: AgentId, version: string, cwd: string): boolean;
export type { FileEntry, DirEntry, PluginEntry, RulesEntry };
