import type { GraphArtifactStore } from "./artifact-store.js"; export interface SyncResult { indexed: number; } export interface StatusResult { ready: boolean; indexedFileCount: number; tokensaveVersion: string; } /** * Short-lived execa wrapper for `tokensave init/sync/status`. * * Each method spawns a child process and waits for it to exit. * Use `TokensaveMcpClient` for long-lived JSON-RPC calls. * * Constructor pattern mirrors `TokensavePrereqCheck` (src/graph/prereq.ts:7-8). */ export declare class TokensaveCli { private readonly cwd; private readonly store; private readonly binary; constructor(cwd: string, store?: GraphArtifactStore | null, binary?: string); /** * Run `tokensave init` (full index of the project at `cwd`). * * NOTE: tokensave's `init` has no `--tier` flag (that was a pre-6.x API). * `languageTier` is now a bober-level concept recorded in the manifest only, * so it is accepted for caller convenience but NOT forwarded to the binary. * Resolves on exit code 0; throws a structured Error on non-zero. */ init(opts: { cwd?: string; languageTier?: string; }): Promise; /** * Run `tokensave sync ` with a timeout. * Returns `{indexed}` parsed from stdout JSON. * Throws on timeout, non-zero exit, or unparseable output. * * After a successful sync, updates the manifest via the injected * GraphArtifactStore (if provided), setting lastSyncAt and clearing * pendingFiles (evaluator note #10). */ sync(paths: string[], timeoutMs: number): Promise; /** * Run `tokensave status --json`. * Returns `{ready: false, indexedFileCount: 0, tokensaveVersion: ""}` when * tokensave has not been initialised — does NOT throw in that case. * Throws only on binary execution failure (ENOENT etc.). */ status(): Promise; } //# sourceMappingURL=cli.d.ts.map