/**
 * 0770 -- Pure regex parser. Normalizes any github.com origin remote
 * (SSH, HTTPS, ssh://) to its canonical `https://github.com/owner/repo`
 * form (no `.git` suffix, no trailing path). Returns null for non-github
 * hosts, malformed input, empty/whitespace strings.
 */
export declare function parseGithubRemote(remote: string | null | undefined): string | null;
/**
 * 0770 -- Walk parent directories from `startDir` looking for a `.git` entry
 * (directory OR file -- git worktrees use a `.git` file). Bails at the
 * filesystem root or after `maxLevels` iterations. Returns the absolute
 * path of the discovered git root, or null.
 */
export declare function walkUpForGitRoot(startDir: string, maxLevels?: number): string | null;
/**
 * 0770 -- Test-only helper to clear the module-level memoization cache so
 * tests can isolate detection runs across `beforeEach`.
 */
export declare function resetAuthoredSourceLinkCache(): void;
/**
 * 0770 -- Detect source-repo provenance for a locally-authored skill (no
 * lockfile entry). Walks for `.git`, reads `origin` remote, normalizes via
 * `parseGithubRemote`, and computes `skillPath` from `git ls-files` (with a
 * filesystem fallback for untracked SKILL.md files). Memoized per absolute
 * skill dir for the eval-server process lifetime.
 *
 * All git invocations use `execFileSync` with explicit argv (no shell), a
 * 1500ms hard timeout, and silenced stderr. Any error converts to
 * `{null, null}` -- `buildSkillMetadata` never throws because of git.
 */
export declare function detectAuthoredSourceLink(skillDir: string): {
    repoUrl: string | null;
    skillPath: string | null;
};
/**
 * 0809 -- Test-only helper to clear the sidecar memoization cache.
 */
export declare function resetCopiedSkillSidecarCache(): void;
/**
 * 0809 -- Read `<skillDir>/.vskill-source.json` and return the snapshotted
 * {repoUrl, skillPath}. Returns {null, null} on missing file, JSON parse
 * error, missing/invalid `repoUrl`, or non-github host. Memoized per
 * absolute skill dir for the eval-server lifetime.
 */
export declare function readCopiedSkillSidecar(skillDir: string): {
    repoUrl: string | null;
    skillPath: string | null;
};
/**
 * 0737 -- Resolve the source-repo provenance (repoUrl + skillPath) for a
 * skill. Three precedences:
 *   1. Lockfile receipt with explicit `sourceRepoUrl` (set by recent
 *      `vskill install` after 0737 shipped).
 *   2. Lockfile receipt with legacy `source: github:owner/repo` (every
 *      pre-0737 install -- 0743 derives skillPath safely).
 *   3. (0809, NEW) `.vskill-source.json` sidecar -- written by the Studio
 *      Copy / scope-transfer flow at copy time.
 *   4. (0770) Authored-skill detector -- walks parent `.git` and reads
 *      origin remote.
 *
 * Lockfile entries are keyed by plugin name; for nested-layout plugins the
 * skill dir basename and the lockfile key differ -- fall back to the parent
 * directory's basename when no exact match exists.
 *
 * Sidecar beats authored because the studio's CWD git remote (umbrella's
 * repo) is the wrong source of truth for a skill that was COPIED from
 * elsewhere. Lockfile beats sidecar because an explicit install receipt
 * is more authoritative than a copy-time snapshot.
 */
export declare function resolveSourceLink(skillDir: string, root: string): {
    repoUrl: string | null;
    skillPath: string | null;
};
