import { z } from "zod"; import type { AuditTask } from "../types.js"; import type { GraphBundle } from "audit-tools/shared"; export declare const TaskAffinityEdgeKindSchema: z.ZodEnum<["shared_file", "cross_lens_same_file", "same_flow", "same_unit", "call_adjacent", "same_dir"]>; export type TaskAffinityEdgeKind = z.infer; export declare const TaskAffinityNodeSchema: z.ZodObject<{ task_id: z.ZodString; unit_id: z.ZodString; lens: z.ZodString; file_paths: z.ZodArray; /** Frozen byte-based content-token estimate (from the task). */ token_estimate: z.ZodNumber; /** Frozen audit-risk score in [0,1] (from the task). */ risk_estimate: z.ZodNumber; }, "strict", z.ZodTypeAny, { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }, { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }>; export type TaskAffinityNode = z.infer; export declare const TaskAffinityEdgeSchema: z.ZodObject<{ /** task_id of one endpoint (undirected; emitted once, from < to). */ from: z.ZodString; to: z.ZodString; /** Dominant relatedness kind (the one contributing the max weight). */ kind: z.ZodEnum<["shared_file", "cross_lens_same_file", "same_flow", "same_unit", "call_adjacent", "same_dir"]>; /** Affinity strength in [0,1], retained as explanatory metadata. */ weight: z.ZodNumber; /** All contributing kinds (+ "same_lens" bonus), for transparency. */ reason: z.ZodOptional; }, "strict", z.ZodTypeAny, { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }, { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }>; export type TaskAffinityEdge = z.infer; export declare const TaskAffinityGraphSchema: z.ZodEffects; nodes: z.ZodArray; /** Frozen byte-based content-token estimate (from the task). */ token_estimate: z.ZodNumber; /** Frozen audit-risk score in [0,1] (from the task). */ risk_estimate: z.ZodNumber; }, "strict", z.ZodTypeAny, { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }, { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }>, "many">; edges: z.ZodArray; /** Affinity strength in [0,1], retained as explanatory metadata. */ weight: z.ZodNumber; /** All contributing kinds (+ "same_lens" bonus), for transparency. */ reason: z.ZodOptional; }, "strict", z.ZodTypeAny, { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }, { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }>, "many">; }, "strict", z.ZodTypeAny, { nodes: { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }[]; edges: { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }[]; schema_version: "task-affinity-graph/v1"; }, { nodes: { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }[]; edges: { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }[]; schema_version: "task-affinity-graph/v1"; }>, { nodes: { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }[]; edges: { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }[]; schema_version: "task-affinity-graph/v1"; }, { nodes: { unit_id: string; file_paths: string[]; lens: string; token_estimate: number; task_id: string; risk_estimate: number; }[]; edges: { kind: "shared_file" | "cross_lens_same_file" | "same_unit" | "call_adjacent" | "same_flow" | "same_dir"; from: string; to: string; weight: number; reason?: string | undefined; }[]; schema_version: "task-affinity-graph/v1"; }>; export type TaskAffinityGraph = z.infer; /** * Build the task-affinity graph from frozen tasks. Each task * must already carry `token_estimate` and `risk_estimate` (planning freezes * them); missing values default to 0 so the graph is always well-formed. */ export declare function buildTaskAffinityGraph(tasks: ReadonlyArray, options?: { graphBundle?: GraphBundle; }): TaskAffinityGraph; //# sourceMappingURL=taskAffinityGraph.d.ts.map