/** * Execution-location-agnostic index operations. * * One implementation, two callers: the index worker thread (production — * synchronous SQLite and the TypeScript parser can never block the main * thread / terminal UI there) and the inline fallback inside the host (tests, * `WRONGSTACK_INDEX_INLINE=1`, or runtimes where the worker file is missing). * * Operations share one warm IndexStore per resolved project/index directory. * The detached server owns write serialization, while worker/inline fallbacks * run on one event loop, so a pooled connection is both safe and substantially * cheaper than re-running schema/FTS drift checks for every edited file. */ import type { ContextResult } from './context-retrieval.js'; import type { CodeMapGraph, IndexResult, IndexStats } from './schema.js'; import type { CallRefsOpArgs, ContextOpArgs, IndexOpArgs, SearchOpArgs, SearchOpResult, StatsOpArgs, VectorSearchOpArgs, VectorSearchOpResult } from './worker-protocol.js'; interface ServiceHooks { signal?: AbortSignal | undefined; onProgress?: ((current: number, total: number) => void) | undefined; } /** Full or per-file index run. */ export declare function indexService(args: IndexOpArgs, hooks?: ServiceHooks): Promise; /** Ranked symbol search (FTS5 inside SQLite; BM25 fallback without FTS5). */ export declare function searchService(args: SearchOpArgs): SearchOpResult; /** * Personalised retrieval: lexical seeds walked through the wiring graph. * * Path relativisation happens here rather than in the retriever so the pure * algorithm stays free of `node:path`, and so the daemon — which knows the * project root it was started for — is the one that decides what "relative" * means. */ export declare function contextService(args: ContextOpArgs): ContextResult; /** * Nearest files to a query vector. The caller embeds; this only compares. */ export declare function vectorSearchService(args: VectorSearchOpArgs): VectorSearchOpResult; /** Index health and statistics. */ export declare function statsService(args: StatsOpArgs): IndexStats; /** Package-level dependency graph. */ export declare function packageGraphService(args: StatsOpArgs): CodeMapGraph; /** File-level dependency graph for a single package. */ export declare function fileGraphService(args: StatsOpArgs & { packageFilter: string; }): CodeMapGraph; /** Symbol-level dependency graph for a single file. */ export declare function symbolGraphService(args: StatsOpArgs & { fileFilter: string; }): CodeMapGraph; import type { IncomingCallsResult, OutgoingCallsResult } from './worker-protocol/contracts.js'; export type { IncomingCallsResult, OutgoingCallsResult }; /** Incoming call sites for a named symbol (who calls/uses this symbol?). */ export declare function incomingCallsService(args: CallRefsOpArgs): IncomingCallsResult; /** Outgoing call sites for a named symbol (what does this symbol call/use?). */ export declare function outgoingCallsService(args: CallRefsOpArgs): OutgoingCallsResult; //# sourceMappingURL=index-service.d.ts.map