UNPKG

socraticode

Version:

SocratiCode — MCP server for local codebase indexing, semantic search, and code dependency graphs. All private, all local via Docker.

43 lines • 2.21 kB
/** * Auto-resume indexed projects on server startup. * * Which projects are resumed is controlled by two opt-in environment * variables (issue #70). Default (both unset) keeps the original behavior: * only the project at process.cwd() is considered. * * - SOCRATICODE_AUTO_RESUME_PROJECTS: comma-separated list of project * paths to resume. Takes precedence over unset/all behavior. * - SOCRATICODE_AUTO_RESUME=all: resume every indexed project that has a * stored path in its Qdrant metadata. * - SOCRATICODE_AUTO_RESUME=off: skip all startup catch-up and interrupted * index recovery. This takes precedence over an explicit project list. * * Multi-project modes resume strictly sequentially: each project's catch-up * (incremental update or interrupted-index recovery) completes before the * next starts, so N projects never stampede the embedding provider. Skipped * projects (missing directory, no stored path, not indexed) are logged at * warn level so misconfiguration is visible. * * Per project, if the index is complete: start the file watcher and run an * incremental update to catch changes made while the MCP was down. If the * index is incomplete (interrupted): resume it via indexProject, which skips * already-hashed files and honours codebase_stop cancellation; the watcher * starts after recovery completes. * * Runs in the background after server startup — non-blocking, non-fatal. * * @param projectPath - Override project path for the default single-project * mode (defaults to process.cwd()). Only used by tests — production always * uses process.cwd(). */ export declare function autoResumeIndexedProjects(projectPath?: string): Promise<void>; /** Wait for any active indexing operations to complete (with timeout). */ export declare function awaitActiveIndexing(timeoutMs?: number): Promise<void>; /** * Execute graceful shutdown: cancel in-flight indexing, wait for completion, * stop watchers, release locks. * * @param closeServer - Optional callback to close the MCP server. */ export declare function gracefulShutdown(signal: string, closeServer?: () => Promise<void>): Promise<void>; //# sourceMappingURL=startup.d.ts.map