import { type CodegraphProcessRunner } from './codegraph-service.js'; export type CodegraphAutorefreshResult = { refreshed: true; } | { refreshed: false; reason: 'no-codegraph-dir' | 'index-failed' | 'unavailable'; note: string; }; /** * The operator-facing line for a refresh that did not happen, or `null` when * there is nothing to report. The ONE place the report/no-report rule lives, * shared by both slice-boundary call sites (`peaks job checkpoint --state * done` and `peaks request transition rd:qa-handoff`) so the two cannot * drift into disagreeing about what counts as visible. * * Returns the result's own `note` verbatim rather than rebuilding a * sentence: that note is where the reason (exit code / upstream error line) * and the remedy live, and a second wording here would be a second truth. * * `no-codegraph-dir` is deliberately SILENT — see the header's A2 note. A * store that exists and did not refresh is a warning; a project that never * set codegraph up is not a defect to report at every slice boundary. */ export declare function codegraphRefreshNotice(result: CodegraphAutorefreshResult): string | null; /** * True when `/.codegraph/` exists and is a directory. * Pure fs probe; never throws. */ export declare function isCodegraphPresent(projectRoot: string): boolean; /** * Run a best-effort `codegraph index` refresh for `projectRoot` after a * slice-complete boundary. NEVER throws — every failure path returns a * non-refreshed result so the caller keeps its ok envelope. * * The optional `runner` is a test seam mirroring * `CodegraphProcessRunner`; when omitted the real process runner is used. */ export declare function refreshCodegraphAfterSlice(projectRoot: string, runner?: CodegraphProcessRunner): Promise;