arela
Version:
AI-powered CTO with multi-agent orchestration, code summarization, visual testing (web + mobile) for blazing fast development.
84 lines • 2.51 kB
TypeScript
import type { GraphStats, ImpactAnalysis } from "./types.js";
/**
* Hexi-005: File node wrapper for graph memory.
*/
export interface GraphFileNode {
path: string;
repoPath: string;
language: string;
size: number;
}
/**
* Hexi-005: Import edge wrapper.
*/
export interface GraphImport {
source: string;
target: string;
type: "internal" | "external";
}
/**
* Hexi-005: Function node wrapper.
*/
export interface GraphFunctionNode {
name: string;
file: string;
lineStart: number;
lineEnd: number;
}
export declare class GraphMemory {
private readonly cwd;
constructor(cwd?: string);
private get dbPath();
/**
* Hexi-005: Initialization wrapper.
* Construction with `cwd` is sufficient today; this simply ensures the directory exists.
*/
init(projectPath: string): Promise<void>;
isReady(): Promise<boolean>;
getStats(): Promise<GraphStats>;
/**
* Existing impact analysis used by Tri-Memory.
*/
impact(filePath: string): Promise<ImpactAnalysis>;
/**
* Hexi-005: Get a single file node by path.
*/
getFile(pathOrIdentifier: string): Promise<GraphFileNode | undefined>;
/**
* Hexi-005: Get all files, optionally filtered by repo path.
*/
getFiles(repoPaths?: string[]): Promise<GraphFileNode[]>;
/**
* Hexi-005: Simple file name search using LIKE on path.
*/
searchFiles(pattern: string): Promise<GraphFileNode[]>;
/**
* Hexi-005: Get direct import edges from a file.
*/
getImports(filePath: string): Promise<GraphImport[]>;
/**
* Hexi-005: Get all files that import the given file.
*/
getImportedBy(filePath: string): Promise<string[]>;
/**
* Hexi-005: Get transitive dependencies (files this file depends on).
*/
getDependencies(filePath: string, depth?: number): Promise<string[]>;
/**
* Hexi-005: Get transitive dependents (files that depend on this file).
*/
getDependents(filePath: string, depth?: number): Promise<string[]>;
/**
* Hexi-005: Get functions in a file.
*/
getFunctions(filePath: string): Promise<GraphFunctionNode[]>;
/**
* Hexi-005: Search functions by name (substring match).
*/
searchFunctions(name: string): Promise<GraphFunctionNode[]>;
findSlice(identifier: string): Promise<string[]>;
private findCandidateFileIds;
private normalizePath;
private walkDependencies;
}
//# sourceMappingURL=graph.d.ts.map