/** * "Which vault does this repository mean": the targeting chain `run402 repos` * verbs and `doctor`'s vault check share. A verb run standing inside a * repository that already names its own vault acts on THAT repository, not on * the profile's active project — git muscle memory. * * Order, highest first: * 1. an explicit repo id / project id (the caller's `--repo` / `--project`) * 2. the pinned `r402.repoId` in local git config (no network) * 3. the repository's `run402` / `origin` remote address — id-form parsed * from the string, slug-form resolved with one read-only * `repos.resolveAddress` (never a pin, never a push-to-create) * 4. `RUN402_PROJECT_ID` * 5. the profile's active project * * Outside a repository only tiers 4 and 5 apply. The protocol reads it * composes (`readPinnedVaultRepo`, `resolveAddress`) live in the SDK already; * this adds only the precedence. */ import { type Repos } from "../namespaces/repos.js"; export interface RepoOwnVaultTarget { repo_id: string | null; project_id: string | null; source: "pin" | "remote"; remote_name?: string; } export interface VaultTarget { repo_id?: string; project_id?: string | null; } /** * The repository's OWN target, independent of any flag: the pin, then the * `run402`/`origin` remote. Null when there is neither, when this is not a * repository, or when a slug-form remote fails to resolve — a miss is * ordinary, never thrown. */ export declare function repoOwnVaultTarget(repos: Pick, repoDir: string): Promise; /** * Resolve `{ repo_id?, project_id? }` for a vault verb. An explicit value * wins; `warn` receives one line when it disagrees with the repository's own * target (the pin for a repo id, the remote for a project id). */ export declare function resolveVaultTarget(repos: Pick, { repoDir, explicitProjectId, explicitRepoId, warn, }?: { repoDir?: string; explicitProjectId?: string | null; explicitRepoId?: string | null; warn?: (line: string) => void; }): Promise; //# sourceMappingURL=vault-target.d.ts.map