arela
Version:
AI-powered CTO with multi-agent orchestration, code summarization, visual testing (web + mobile) for blazing fast development.
49 lines • 1.75 kB
TypeScript
import { type BuildIndexOptions } from "../rag/index.js";
import type { SemanticResult, VectorStats } from "./types.js";
/**
* Search result used by the Hexi-004 Vector Memory wrapper.
* This is a thin wrapper over the underlying RAG index results.
*/
export interface VectorSearchResult {
file: string;
chunk: string;
score: number;
lineStart: number;
lineEnd: number;
}
export declare class VectorMemory {
private readonly cwd;
constructor(cwd?: string);
private get indexPath();
/**
* Hexi-004: Initialization wrapper.
* For the current implementation, construction with `cwd` is enough,
* so this is effectively a no-op that verifies the project path.
*/
init(projectPath: string): Promise<void>;
isReady(): Promise<boolean>;
getStats(): Promise<VectorStats>;
rebuildIndex(options?: Partial<BuildIndexOptions>): Promise<VectorStats>;
/**
* Existing semantic query used by Tri-Memory.
*/
query(question: string, topK?: number): Promise<SemanticResult[]>;
/**
* Hexi-004: Wrapper search API that returns full chunks with basic source info.
*/
search(queryText: string, limit?: number): Promise<VectorSearchResult[]>;
/**
* Hexi-004: Search by a pre-computed embedding vector.
* This avoids re-generating embeddings via Ollama for advanced Meta-RAG flows.
*/
searchByEmbedding(embedding: number[], limit?: number): Promise<VectorSearchResult[]>;
/**
* Hexi-004: Convenience helper to get index size in bytes.
*/
getIndexSize(): Promise<number>;
/**
* Hexi-004: Convenience helper to get total chunk count.
*/
getChunkCount(): Promise<number>;
}
//# sourceMappingURL=vector.d.ts.map