socraticode
Version:
SocratiCode — MCP server for local codebase indexing, semantic search, and code dependency graphs. All private, all local via Docker.
82 lines • 4.01 kB
TypeScript
import type { CodeGraph, SymbolEdge, SymbolNode } from "../types.js";
import type { RustUseBinding } from "./graph-symbols.js";
/** Symbol-resolution metadata isolated to one Godot project root. */
export interface GodotSymbolProject {
/** Repository-relative prefix of the directory containing project.godot. */
rootOffset: string;
/** Project-local class_name declarations. */
classNameIndex: ReadonlyMap<string, string>;
/** Project-local autoload names mapped to repository-relative scripts. */
autoloadTable: ReadonlyMap<string, string>;
}
/** Caller-to-project ownership used to prevent cross-project GDScript edges. */
export interface GodotSymbolResolutionContext {
/** Repository-relative file path to its nearest absolute Godot project root. */
projectRootByFile: ReadonlyMap<string, string>;
/** Absolute Godot project root to its isolated resolution metadata. */
projectsByRoot: ReadonlyMap<string, GodotSymbolProject>;
}
/**
* Resolve all call sites for every file in `symbolsByFile`. Mutates the
* passed-in `outgoingCallsByFile` edges in place.
*
*/
export declare function resolveCallSites(fileGraph: CodeGraph, symbolsByFile: Map<string, SymbolNode[]>, outgoingCallsByFile: Map<string, SymbolEdge[]>,
/**
* Rust `use` bindings per file. Absent for every other language, and absent
* when a caller does not have them — resolution then behaves exactly as it
* did, which is what keeps a graph built before this readable.
*/
rustBindingsByFile?: Map<string, RustUseBinding[]>,
/**
* Rust file → the directory prefix of the crate it belongs to, from the
* manifests. Absent for every other language, and absent when a caller does
* not have it — `crate::` then confines nothing, which is what it did before.
*/
rustCrateRootByFile?: Map<string, string>,
/**
* The edges whose qualifier is rooted in an inline `mod`, by identity. That
* scope has no file to name and no spelling this can follow, so the call is
* left unresolved with its qualifier rather than answered out of the file:
* the file holds the sibling inline modules too, and a `helper` declared in
* one of those is not something Rust can reach from the other.
*/
rustInlineScopedCalls?: Set<SymbolEdge>,
/**
* The ids of the Rust symbols declared inside an inline `mod`. A `self`
* qualifier names the file's own module, and from there Rust reaches what
* the file declares at its top level and nothing an inline `mod` encloses —
* so these are dropped from a `self` path's candidates, and the call is
* refused when dropping them leaves none.
*
* Absent for every other language, and absent when a caller does not have
* it: nothing is dropped then, which is what this did before.
*/
rustInlineDeclaredSymbols?: ReadonlyMap<string, string>,
/**
* Rust file → every target root declared by its parsed Cargo manifest.
* This is in-memory build metadata only. Kept optional and last so existing
* callers retain the pre-manifest fallback behaviour.
*/
rustCrateRootsByFile?: ReadonlyMap<string, readonly string[]>,
/** Optional GDScript autoload map from name to project-relative path. */
autoloadTable?: Map<string, string>,
/** GDScript assignment-site type inferences, scoped by source range. */
inferredTypesByFile?: Map<string, Map<string, Array<{
type: string;
startLine: number;
endLine: number;
}>>>,
/** GDScript cross-file member assignment type evidence. */
memberAssignmentsByFile?: Map<string, Array<{
receiver: string;
memberName: string;
valueType: string;
}>>,
/** Godot `res://` path to repository-relative path map. */
resToRepoPathMap?: Map<string, string>,
/** Per-project GDScript resolution metadata for multi-project repositories. */
godotContext?: GodotSymbolResolutionContext): void;
/** Compute the percentage of unresolved edges (0..100). */
export declare function computeUnresolvedPct(outgoingCallsByFile: Map<string, SymbolEdge[]>): number;
//# sourceMappingURL=graph-symbol-resolution.d.ts.map