run402-mcp
Version:
MCP server for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.
49 lines • 2.18 kB
TypeScript
/**
* "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<Repos, "resolveAddress">, repoDir: string): Promise<RepoOwnVaultTarget | null>;
/**
* 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<Repos, "resolveAddress">, { repoDir, explicitProjectId, explicitRepoId, warn, }?: {
repoDir?: string;
explicitProjectId?: string | null;
explicitRepoId?: string | null;
warn?: (line: string) => void;
}): Promise<VaultTarget>;
//# sourceMappingURL=vault-target.d.ts.map