/**
 * Canonical graph loader. Per CLAUDE.md Rule 12, every consumer of
 * `.dxkit/reports/graph.json` reads via `loadGraph(cwd)` — never
 * `JSON.parse` directly. Arch-check enforces; this is the only file
 * that may parse the artifact.
 *
 * Throws typed errors so callers can react precisely:
 *   - GraphNotFoundError      → file doesn't exist (suggest --refresh)
 *   - GraphSchemaVersionError → wire-format newer than the loader knows
 *   - GraphCorruptError       → missing/malformed required field
 */
import { GRAPH_REPORT_PATH, type Graph } from './types';
export { GRAPH_REPORT_PATH };
export declare class GraphNotFoundError extends Error {
    readonly absPath: string;
    constructor(absPath: string);
}
export declare class GraphSchemaVersionError extends Error {
    readonly absPath: string;
    readonly found: unknown;
    readonly expected: number;
    constructor(absPath: string, found: unknown, expected: number);
}
export declare class GraphCorruptError extends Error {
    readonly absPath: string;
    readonly detail: string;
    constructor(absPath: string, detail: string);
}
/**
 * Read + validate + index the graph artifact. The returned `Graph`
 * carries convenience indices (`nodeById`, `edgesFromNode`, ...)
 * built once at load time; queries in `./queries.ts` read from these
 * maps for O(1) traversal rather than repeatedly scanning the arrays.
 *
 * Validation is intentionally lightweight — top-level shape + required
 * fields per node/edge. Deep schema validation (every optional field's
 * types, referential integrity of every edge endpoint) would catch
 * more but cost more on every load; instead we trust the producer and
 * surface unexpected shapes as runtime errors at the query layer.
 */
export declare function loadGraph(cwd: string): Graph;
/**
 * Fail-open variant of {@link loadGraph}: returns undefined on ANY
 * error (missing file, parse failure, schema mismatch) instead of
 * throwing. For additive, never-block consumers — the PreToolUse
 * context hook and the finding-enrichment pass — where a missing or
 * stale graph must degrade to "no context", never an error.
 */
export declare function tryLoadGraph(cwd: string): Graph | undefined;
//# sourceMappingURL=load.d.ts.map