export declare function _isValidDb(p: string): boolean; /** * Resolve the monograph DB path for a given repo root (defaults to project cwd). * Falls back to searching up to the git root when the DB isn't directly under * `/.monomind` — e.g. when called from a subdirectory of the repo. Only * the no-arg (project cwd) form is cached; explicit `repoPath` overrides are * cheap one-off lookups (staleness checks with a user-supplied path) so caching * them isn't worth the invalidation complexity. */ export declare function getDbPath(repoPathOverride?: string): string; export declare function text(t: string): { content: { type: 'text'; text: string; }[]; }; export type PprScoredNode = { id: string; name: string; label: string; filePath: string; startLine: number | null; score: number; }; export declare function applyPprRerank(db: any, seedNodes: PprScoredNode[], damping: number, maxResults: number): Array; /** * Compute how many commits the index is behind HEAD. * Returns { commitsBehind, lastCommit } — or null if the index has never been * built or git is unavailable. */ export declare function computeCommitsBehind(repoPath: string): Promise<{ commitsBehind: number; lastCommit: string; } | null>; /** * Shared staleness threshold: both monograph_staleness and monograph_suggest (checkStaleness) * trigger a background rebuild only when the index is more than this many commits behind HEAD. * Using a shared constant prevents conflicting rebuild pressure during active dev sessions. * Was 10 → 3 → 1. Even 3 let routine small commits accumulate stale results * silently. At 1 (rebuild triggers at 2+ behind), staleness rarely persists * across sessions. */ export declare const STALENESS_THRESHOLD = 1; /** * Fire-and-forget background rebuild. Uses a module-level guard so concurrent * MCP tool calls (e.g. repeated monograph_suggest checkStaleness) don't pile up builds. * threshold: minimum commitsBehind to trigger (default STALENESS_THRESHOLD + 1). */ export declare function triggerBackgroundBuildIfNeeded(repoPath: string, commitsBehind: number, threshold?: number): boolean; /** * BM25 ranks purely on literal keyword overlap, so a doc/concept node whose * prose happens to mention task-related words (e.g. a report mentioning * "retry" constants) can outrank the actual code symbol the task is really * about, which is conceptually related but lexically different (issue #38). * Prefer code-symbol hits (Function/Class/Method/...) over doc-type hits * (Document/Concept/Section/...) when there are any, falling back to the * full hit list so a genuinely doc-only task still gets results. */ export declare function preferSymbolHits(hits: T[], symbolLabels: ReadonlySet): T[]; //# sourceMappingURL=shared.d.ts.map