import { z } from "zod"; import { type GraphNode } from "./graph-node.js"; import { type GraphEdge, type GraphEdgeKind } from "./graph-edge.js"; export declare const PROJECT_GRAPH_SCHEMA_VERSION = 1; export declare const graphDiagnosticSchema: z.ZodObject<{ analyzer: z.ZodString; severity: z.ZodEnum<["info", "warning", "error"]>; message: z.ZodString; path: z.ZodOptional; }, "strip", z.ZodTypeAny, { message: string; analyzer: string; severity: "error" | "info" | "warning"; path?: string | undefined; }, { message: string; analyzer: string; severity: "error" | "info" | "warning"; path?: string | undefined; }>; export declare const projectGraphSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; version: z.ZodString; root: z.ZodString; createdAt: z.ZodString; builderVersion: z.ZodString; nodes: z.ZodDefault>; } & { kind: z.ZodLiteral<"file">; path: z.ZodString; language: z.ZodOptional; sizeBytes: z.ZodNumber; hash: z.ZodString; layer: z.ZodDefault>; exports: z.ZodDefault>; imports: z.ZodDefault>; cyclic: z.ZodDefault; }, "strip", z.ZodTypeAny, { path: string; id: string; imports: string[]; exports: string[]; kind: "file"; label: string; tags: string[]; sizeBytes: number; hash: string; layer: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard"; cyclic: boolean; language?: string | undefined; }, { path: string; id: string; kind: "file"; label: string; sizeBytes: number; hash: string; imports?: string[] | undefined; exports?: string[] | undefined; tags?: string[] | undefined; language?: string | undefined; layer?: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard" | undefined; cyclic?: boolean | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"directory">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; id: string; kind: "directory"; label: string; tags: string[]; }, { path: string; id: string; kind: "directory"; label: string; tags?: string[] | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"module">; rootPath: z.ZodString; layer: z.ZodDefault>; }, "strip", z.ZodTypeAny, { id: string; kind: "module"; label: string; tags: string[]; layer: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard"; rootPath: string; }, { id: string; kind: "module"; label: string; rootPath: string; tags?: string[] | undefined; layer?: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard" | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"command">; name: z.ZodString; command: z.ZodString; source: z.ZodEnum<["package-json", "makefile", "hforge", "config", "detected"]>; cost: z.ZodDefault>; }, "strip", z.ZodTypeAny, { name: string; id: string; source: "config" | "package-json" | "makefile" | "hforge" | "detected"; command: string; cost: "unknown" | "cheap" | "medium" | "expensive"; kind: "command"; label: string; tags: string[]; }, { name: string; id: string; source: "config" | "package-json" | "makefile" | "hforge" | "detected"; command: string; kind: "command"; label: string; cost?: "unknown" | "cheap" | "medium" | "expensive" | undefined; tags?: string[] | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"test">; path: z.ZodString; framework: z.ZodOptional; }, "strip", z.ZodTypeAny, { path: string; id: string; kind: "test"; label: string; tags: string[]; framework?: string | undefined; }, { path: string; id: string; kind: "test"; label: string; tags?: string[] | undefined; framework?: string | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"doc">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; id: string; kind: "doc"; label: string; tags: string[]; }, { path: string; id: string; kind: "doc"; label: string; tags?: string[] | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"decision">; title: z.ZodString; status: z.ZodEnum<["proposed", "accepted", "rejected", "deferred", "superseded", "unknown"]>; sourcePath: z.ZodString; recordType: z.ZodDefault>; }, "strip", z.ZodTypeAny, { sourcePath: string; status: "unknown" | "rejected" | "proposed" | "accepted" | "deferred" | "superseded"; id: string; title: string; kind: "decision"; label: string; tags: string[]; recordType: "asr" | "adr" | "external"; }, { sourcePath: string; status: "unknown" | "rejected" | "proposed" | "accepted" | "deferred" | "superseded"; id: string; title: string; kind: "decision"; label: string; tags?: string[] | undefined; recordType?: "asr" | "adr" | "external" | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"package">; name: z.ZodString; version: z.ZodOptional; dependencyKind: z.ZodDefault>; }, "strip", z.ZodTypeAny, { name: string; id: string; kind: "package"; label: string; tags: string[]; dependencyKind: "direct" | "dev" | "peer" | "optional"; version?: string | undefined; }, { name: string; id: string; kind: "package"; label: string; tags?: string[] | undefined; version?: string | undefined; dependencyKind?: "direct" | "dev" | "peer" | "optional" | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"agent-instruction">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; id: string; kind: "agent-instruction"; label: string; tags: string[]; }, { path: string; id: string; kind: "agent-instruction"; label: string; tags?: string[] | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"runtime-artifact">; path: z.ZodString; }, "strip", z.ZodTypeAny, { path: string; id: string; kind: "runtime-artifact"; label: string; tags: string[]; }, { path: string; id: string; kind: "runtime-artifact"; label: string; tags?: string[] | undefined; }>, z.ZodObject<{ id: z.ZodString; label: z.ZodString; tags: z.ZodDefault>; } & { kind: z.ZodLiteral<"feature">; name: z.ZodString; specPath: z.ZodOptional; }, "strip", z.ZodTypeAny, { name: string; id: string; kind: "feature"; label: string; tags: string[]; specPath?: string | undefined; }, { name: string; id: string; kind: "feature"; label: string; tags?: string[] | undefined; specPath?: string | undefined; }>]>, "many">>; edges: z.ZodDefault; confidence: z.ZodNumber; evidence: z.ZodDefault; ref: z.ZodString; excerpt: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "decision" | "trace" | "file" | "config" | "heuristic" | "user"; ref: string; excerpt?: string | undefined; }, { kind: "decision" | "trace" | "file" | "config" | "heuristic" | "user"; ref: string; excerpt?: string | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { id: string; kind: "imports" | "exports" | "contains" | "tests" | "verifies" | "documents" | "decides" | "generates" | "uses-command" | "belongs-to-feature" | "similar-to" | "recently-changed-with" | "implements"; from: string; to: string; confidence: number; evidence: { kind: "decision" | "trace" | "file" | "config" | "heuristic" | "user"; ref: string; excerpt?: string | undefined; }[]; }, { id: string; kind: "imports" | "exports" | "contains" | "tests" | "verifies" | "documents" | "decides" | "generates" | "uses-command" | "belongs-to-feature" | "similar-to" | "recently-changed-with" | "implements"; from: string; to: string; confidence: number; evidence?: { kind: "decision" | "trace" | "file" | "config" | "heuristic" | "user"; ref: string; excerpt?: string | undefined; }[] | undefined; }>, "many">>; diagnostics: z.ZodDefault; message: z.ZodString; path: z.ZodOptional; }, "strip", z.ZodTypeAny, { message: string; analyzer: string; severity: "error" | "info" | "warning"; path?: string | undefined; }, { message: string; analyzer: string; severity: "error" | "info" | "warning"; path?: string | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { schemaVersion: 1; createdAt: string; version: string; root: string; builderVersion: string; nodes: ({ path: string; id: string; imports: string[]; exports: string[]; kind: "file"; label: string; tags: string[]; sizeBytes: number; hash: string; layer: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard"; cyclic: boolean; language?: string | undefined; } | { path: string; id: string; kind: "directory"; label: string; tags: string[]; } | { id: string; kind: "module"; label: string; tags: string[]; layer: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard"; rootPath: string; } | { name: string; id: string; source: "config" | "package-json" | "makefile" | "hforge" | "detected"; command: string; cost: "unknown" | "cheap" | "medium" | "expensive"; kind: "command"; label: string; tags: string[]; } | { path: string; id: string; kind: "test"; label: string; tags: string[]; framework?: string | undefined; } | { path: string; id: string; kind: "doc"; label: string; tags: string[]; } | { sourcePath: string; status: "unknown" | "rejected" | "proposed" | "accepted" | "deferred" | "superseded"; id: string; title: string; kind: "decision"; label: string; tags: string[]; recordType: "asr" | "adr" | "external"; } | { name: string; id: string; kind: "package"; label: string; tags: string[]; dependencyKind: "direct" | "dev" | "peer" | "optional"; version?: string | undefined; } | { path: string; id: string; kind: "agent-instruction"; label: string; tags: string[]; } | { path: string; id: string; kind: "runtime-artifact"; label: string; tags: string[]; } | { name: string; id: string; kind: "feature"; label: string; tags: string[]; specPath?: string | undefined; })[]; edges: { id: string; kind: "imports" | "exports" | "contains" | "tests" | "verifies" | "documents" | "decides" | "generates" | "uses-command" | "belongs-to-feature" | "similar-to" | "recently-changed-with" | "implements"; from: string; to: string; confidence: number; evidence: { kind: "decision" | "trace" | "file" | "config" | "heuristic" | "user"; ref: string; excerpt?: string | undefined; }[]; }[]; diagnostics: { message: string; analyzer: string; severity: "error" | "info" | "warning"; path?: string | undefined; }[]; }, { schemaVersion: 1; createdAt: string; version: string; root: string; builderVersion: string; nodes?: ({ path: string; id: string; kind: "file"; label: string; sizeBytes: number; hash: string; imports?: string[] | undefined; exports?: string[] | undefined; tags?: string[] | undefined; language?: string | undefined; layer?: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard" | undefined; cyclic?: boolean | undefined; } | { path: string; id: string; kind: "directory"; label: string; tags?: string[] | undefined; } | { id: string; kind: "module"; label: string; rootPath: string; tags?: string[] | undefined; layer?: "unknown" | "cli" | "application" | "domain" | "infrastructure" | "shared" | "dashboard" | undefined; } | { name: string; id: string; source: "config" | "package-json" | "makefile" | "hforge" | "detected"; command: string; kind: "command"; label: string; cost?: "unknown" | "cheap" | "medium" | "expensive" | undefined; tags?: string[] | undefined; } | { path: string; id: string; kind: "test"; label: string; tags?: string[] | undefined; framework?: string | undefined; } | { path: string; id: string; kind: "doc"; label: string; tags?: string[] | undefined; } | { sourcePath: string; status: "unknown" | "rejected" | "proposed" | "accepted" | "deferred" | "superseded"; id: string; title: string; kind: "decision"; label: string; tags?: string[] | undefined; recordType?: "asr" | "adr" | "external" | undefined; } | { name: string; id: string; kind: "package"; label: string; tags?: string[] | undefined; version?: string | undefined; dependencyKind?: "direct" | "dev" | "peer" | "optional" | undefined; } | { path: string; id: string; kind: "agent-instruction"; label: string; tags?: string[] | undefined; } | { path: string; id: string; kind: "runtime-artifact"; label: string; tags?: string[] | undefined; } | { name: string; id: string; kind: "feature"; label: string; tags?: string[] | undefined; specPath?: string | undefined; })[] | undefined; edges?: { id: string; kind: "imports" | "exports" | "contains" | "tests" | "verifies" | "documents" | "decides" | "generates" | "uses-command" | "belongs-to-feature" | "similar-to" | "recently-changed-with" | "implements"; from: string; to: string; confidence: number; evidence?: { kind: "decision" | "trace" | "file" | "config" | "heuristic" | "user"; ref: string; excerpt?: string | undefined; }[] | undefined; }[] | undefined; diagnostics?: { message: string; analyzer: string; severity: "error" | "info" | "warning"; path?: string | undefined; }[] | undefined; }>; export type GraphDiagnostic = z.infer; export type ProjectGraph = z.infer; export declare function parseProjectGraph(value: unknown): ProjectGraph; export declare function neighbors(graph: ProjectGraph, nodeId: string, options?: { readonly direction?: "out" | "in" | "both"; readonly kinds?: readonly GraphEdgeKind[]; }): readonly GraphEdge[]; export declare function findNode(graph: ProjectGraph, nodeId: string): GraphNode | null; export declare function reverseReachable(graph: ProjectGraph, startId: string, options?: { readonly kinds?: readonly GraphEdgeKind[]; readonly maxDepth?: number; }): ReadonlyMap; //# sourceMappingURL=project-graph.d.ts.map