/**
 * SCM detection and config-driven runtime resolution.
 *
 * `detectScm()` runs at init time — try jj, fall back to git. The result is
 * written once to `.indusk/config.json` as the `scm` field.
 *
 * `getScm()` runs everywhere else — reads the config field. **Default for
 * pre-existing projects without the field is `"jj"`** (preserves pre-1.28.x
 * behavior so projects scaffolded before this plan keep working until
 * `indusk update` migrates them).
 *
 * See `.indusk/planning/git-or-jj-substrate/` for design rationale.
 */
export type ScmKind = "jj" | "git";
export declare class NoScmDetectedError extends Error {
    constructor(cwd: string);
}
/**
 * Detect which SCM is in use at `projectRoot`. Tries jj first (preserves
 * historical default for any project that has both); falls back to git.
 * Throws `NoScmDetectedError` if neither responds.
 *
 * Called once at `indusk init` and `indusk update` time. Don't call this on
 * the hot path — use `getScm(projectRoot)` to read the cached config field.
 */
export declare function detectScm(projectRoot: string): Promise<ScmKind>;
/**
 * Read the `scm` field from `.indusk/config.json`. Returns `"jj"` when the
 * field is missing or the config doesn't exist yet — preserving the
 * pre-1.28.x default so projects scaffolded before this plan keep working
 * until `indusk update` migrates them.
 *
 * This is the runtime source of truth — call this everywhere that previously
 * called `getCurrentChangeId(cwd)` directly. `detectScm()` is for init/update
 * only.
 */
export declare function getScm(projectRoot: string): ScmKind;
