import { z } from "zod";
/** Link and production-deployment status for a Vercel project directory. */
export type DeploymentState = "unlinked" | "linked" | "deployed";
/** Vercel project data resolved from local link metadata and the API. */
export interface DeploymentInfo {
    state: DeploymentState;
    projectId?: string;
    orgId?: string;
    productionUrl?: string;
}
declare const VercelProjectReferenceSchema: z.ZodObject<{
    projectId: z.ZodString;
    orgId: z.ZodString;
    projectName: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/** Validated Vercel owner and project identifiers. */
export type VercelProjectReference = z.infer<typeof VercelProjectReferenceSchema>;
/** Parses the complete Vercel owner and project environment pair. */
export declare function projectReferenceFromEnvironment(environment: Readonly<Record<string, string | undefined>>): VercelProjectReference | undefined;
/** Reads a validated Vercel project reference from `.vercel/project.json`. */
export declare function readProjectLink(projectPath: string): Promise<VercelProjectReference | undefined>;
export interface ProjectDetectionOptions {
    signal?: AbortSignal;
}
/**
 * Reads local Vercel link metadata and checks whether the linked project has a production alias.
 */
export declare function detectDeployment(projectPath: string, options?: ProjectDetectionOptions): Promise<DeploymentInfo>;
/** Human-readable identity of a linked Vercel project, for the dashboard status bar. */
export interface ProjectIdentity {
    projectName: string;
    /** The team's display name; absent for a personal-account project. */
    teamName?: string;
}
/**
 * Resolves a linked project's human-readable name and team for the dashboard
 * status bar, from local `.vercel/project.json` plus the Vercel API. A
 * personal-account project (a non-`team_` org) carries no team, so `teamName`
 * is absent; the project name falls back to its id if the API call fails.
 *
 * Returns `undefined` when the directory is not linked. Network-bound: callers
 * render a loading affordance and cache the result.
 *
 * @param projectPath Absolute path of the linked project directory.
 */
export declare function detectProjectIdentity(projectPath: string, options?: ProjectDetectionOptions): Promise<ProjectIdentity | undefined>;
export type ProjectResolution = {
    kind: "unresolved";
} | {
    kind: "linked";
    projectId: string;
} | {
    kind: "deployed";
    projectId: string;
    productionUrl: string;
};
export declare function projectResolutionFromDeployment(deployment: DeploymentInfo): ProjectResolution;
/**
 * Side-effect-free fact gathering after a link: reads `.vercel/project.json`
 * to resolve the project. The on-disk link is the single source of truth.
 */
export declare function detectProjectResolution(projectRoot: string, options?: ProjectDetectionOptions): Promise<ProjectResolution>;
export declare function mergeProjectResolution(current: ProjectResolution, next: ProjectResolution): ProjectResolution;
export declare function projectResolutionFromDeployResult(project: ProjectResolution, deploy: {
    deployed: boolean;
    productionUrl?: string;
}): ProjectResolution;
export declare function isProjectResolved(project: ProjectResolution): boolean;
export declare function projectProductionUrlFromResolution(project: ProjectResolution): string | undefined;
export {};
