socraticode
Version:
SocratiCode — MCP server for local codebase indexing, semantic search, and code dependency graphs. All private, all local via Docker.
45 lines • 2.11 kB
TypeScript
import { type GitState } from "./git-state.js";
interface Project {
path: string;
registered: boolean;
stopped: boolean;
observed?: GitState;
synchronized?: GitState;
projectId?: string;
pending: boolean;
allowCreate: boolean;
revision: number;
observationError?: string;
refreshError?: string;
retryAt: number;
checking?: Promise<void>;
running?: Promise<void>;
timer?: NodeJS.Timeout;
extraExtensions?: Set<string>;
}
/** Observe without waiting for indexing. Tools can report pending results. */
export declare function checkGitRefresh(projectPath: string, catchUp?: boolean): Promise<void>;
/** Await startup catch-up and return its captured project identity for cleanup. */
export declare function resumeGitRefresh(projectPath: string): Promise<string | undefined>;
/** Capture an explicit operation so its successful result can seed monitoring. */
export declare function prepareGitIndex(projectPath: string, extraExtensions?: Set<string>): Promise<{
state: GitState;
target: import("./git-state.js").GitRefreshTarget;
entry: Project;
revision: number;
} | undefined>;
/** Seed monitoring only from a successful explicit operation on the same checkout state. */
export declare function finishGitIndex(projectPath: string, operation: Awaited<ReturnType<typeof prepareGitIndex>>, result: {
cancelled: boolean;
skipped?: string;
}): Promise<void>;
/** Describe observed freshness without treating pending work as synchronized. */
export declare function gitRefreshStatus(projectPath: string): string;
/** Annotate a read with freshness, including a refresh that completes during the read. */
export declare function withGitRefreshNotice(projectPath: string, read: () => Promise<string>): Promise<string>;
/** Stop polling a checkout and invalidate any in-flight refresh target. */
export declare function stopGitRefresh(projectPath: string): void;
/** Stop every registered Git monitor during server shutdown. */
export declare function stopAllGitRefreshes(): void;
export {};
//# sourceMappingURL=git-refresh.d.ts.map