import type { CwdGitRunnerFactory, DiscoveredRepository, GitRepository } from "./types.js"; export declare const DEFAULT_EXCLUDES: readonly [".git", ".hg", ".svn", "node_modules", ".history", "dist", "coverage", ".omp", ".next", "build", "out", "target"]; /** Canonical (long-form, symlink-resolved) absolute path. Sync because the * callers that key the store by it are sync, and `fs/promises` has no * `realpath.native` — the native form is what the 8.3 short-path fixes on * Windows depend on. */ declare function canonicalCwd(cwd: string): string; export declare function storeRootDirectory(): string; /** The store git dir for a path: `/repos/.git` — a * workspace (Private-Git) or a repository's `commonDir` (Git mode). * Both inputs are canonicalized here (realpath) so the result is one * deterministic long-form path regardless of how the caller spelled either * argument: a store root or cwd spelled in 8.3 short form * (e.g. `C:\Users\BAYLAR~1.SAD\...`) must name the same store. */ export declare function privateRepositoryPath(storeRoot: string, cwd: string): string; /** Whether `gitDir`'s setup finished, read from its config file without a git * process: true when a setup marker is present, false when absent (a missing * file included), null when the file cannot be read. Only the plain * `[section]` headers and `key = value` lines git writes are recognised. */ export declare function setupFinished(gitDir: string): Promise; export { canonicalCwd }; /** Ensures a private git repository exists for `cwd` under `storeRoot`. * Idempotent: a finished store skips init/config but still gets the exclude * entries. One whose setup was abandoned (see `setupState`) is redone; `git * init` is repeated only when it never finished, because a second one resets * `core.bare`. Returns null when init/config fails for a new store; an * existing one is used as found. */ export declare function ensurePrivateGitRepository(gitRunnerFactory: CwdGitRunnerFactory, cwd: string, storeRoot: string): Promise; /** Config key naming the repository a Git-mode store belongs to (its * `commonDir`); eviction treats the store as abandoned once that path is gone. */ export declare const GIT_STORE_SOURCE_KEY = "omp-undo-redo.commondir"; /** Ensures the bare snapshot store for a Git repository: * `/repos/.git`, shared by linked worktrees the * way their `.git` is. Snapshot commands still run against the user's * repository (its HEAD, config, ignore and attribute rules) with * `GIT_OBJECT_DIRECTORY` pointed here, so new objects land in the store, * and `GIT_ALTERNATE_OBJECT_DIRECTORIES` pointed at the user's objects, * which are borrowed rather than copied (see `snapshotRunnerEnv`). No * `objects/info/alternates` file: a command run without that env sees only * the store's own objects, which is how capture finds what it must copy. * Refs are written with `GIT_DIR` set to the store. A store whose setup was * abandoned is redone (see `setupState`); one that cannot be is used as * found. Returns the store path, or null when a new one cannot be created. */ export declare function ensureGitSnapshotStore(gitRunnerFactory: CwdGitRunnerFactory, repository: DiscoveredRepository, storeRoot: string): Promise;