/** * Graph Controller * * Orchestration layer for Symbol Graph traversal tools. Today it fronts * trace_path (Phase 4 D2); future graph-walk tools (impact_analysis, * architecture-map) land here too so they share seed-resolution and * result-shaping logic. * * The controller keeps the tool handlers thin: input validation + * result formatting live here, while the BFS traversal is owned by * {@link TracePathService}. */ import type { TracePathResult, TraceDirection, TraceMode } from "../services/symbol/trace-path.js"; import type { EdgeType } from "../services/symbol/symbol-graph.service.js"; import type { ImpactAnalysisOptions, ImpactAnalysisResult, ImpactScope } from "../services/symbol/impact-analysis.js"; import type { DefinitionLookupResult } from "../services/symbol/definition-lookup.js"; import type { SymbolIdentityResolution } from "@massa-th0th/shared"; export interface TracePathInput { projectId: string; function_name?: string; symbol?: string; qualifiedName?: string; direction?: TraceDirection; mode?: TraceMode; depth?: number; include_tests?: boolean; edge_types?: EdgeType[]; } export interface TracePathOutput { projectId: string; symbol: string; mode: TraceMode; direction: TraceDirection; edgeTypes: EdgeType[]; seeds: string[]; truncated: boolean; nodeCount: number; edgeCount: number; chains: string[]; nodes: TracePathResult["nodes"]; edges: TracePathResult["edges"]; identity?: SymbolIdentityResolution; /** Surfaced when the seed did not resolve — agent-actionable hint. */ notFoundHint?: string; } export interface ImpactAnalysisInput { projectId: string; projectPath: string; scope?: ImpactScope; base_branch?: string; since?: string; depth?: number; paths?: string[]; /** Injectable diff runner (tests). */ diffRunner?: ImpactAnalysisOptions["diffRunner"]; } export interface ImpactAnalysisOutput { projectId: string; scope: ImpactScope; baseBranch?: string; since?: string; depth: number; changedFileCount: number; changedFiles: ImpactAnalysisResult["changedFiles"]; impactedCount: number; truncated: boolean; impacted: ImpactAnalysisResult["impacted"]; note?: string; } export declare class GraphController { private static instance; private constructor(); static getInstance(): GraphController; /** * Validate input, run the traversal via {@link TracePathService}, and shape * the result for tool/API consumers. Returns `{ found: false, hint }` when * the seed resolves to nothing (rather than an empty success). */ tracePath(input: TracePathInput): Promise<{ found: true; result: TracePathOutput; } | { found: false; hint: string; symbol: string; projectId: string; identityResolution?: Exclude; }>; /** * Run impact analysis via {@link ImpactAnalysisService}: scoped git diff → * changed files → reverse traversal of importers + references → ranked * impacted symbols. Returns the raw service result shaped for tool/API * consumers. */ analyzeImpact(input: ImpactAnalysisInput): Promise; } //# sourceMappingURL=graph-controller.d.ts.map