import type { ToolResult, RegisteredProjectSummary } from '../types/index.js';
/**
 * Resolve projectId from either projectId or projectPath.
 * projectPath takes precedence when both are provided.
 * Returns null when neither is provided.
 *
 * This is the SYNC fast path for callers that always have an explicit param.
 * For zero-config auto-detection use resolveProjectIdOrAutoDetect().
 */
export declare function resolveProjectId(params: {
    projectId?: string;
    projectPath?: string;
}): string | null;
/**
 * Result returned by resolveProjectIdOrAutoDetect.
 * On success: { ok: true, projectId, projectPath, autoDetected }
 * On failure: { ok: false, errorResult } — return errorResult directly to the caller.
 */
export type ResolveResult = {
    ok: true;
    projectId: string;
    projectPath: string;
    autoDetected: boolean;
} | {
    ok: false;
    errorResult: ToolResult;
};
/**
 * Resolve a projectId with full zero-config auto-detection (SPEC-341).
 *
 * Falls back to PLANU_PROJECT_PATH env var and the global project registry
 * when neither projectId nor projectPath is passed explicitly.
 *
 * Returns a discriminated union so callers can early-return on failure:
 *
 * ```ts
 * const resolved = await resolveProjectIdOrAutoDetect(params);
 * if (!resolved.ok) return resolved.errorResult;
 * const { projectId, projectPath, autoDetected } = resolved;
 * ```
 */
export declare function resolveProjectIdOrAutoDetect(params: {
    projectId?: string;
    projectPath?: string;
}): Promise<ResolveResult>;
/**
 * Build a ToolResult error for the "missing project" case.
 * Includes a registeredProjects[] list so the user can see their options.
 */
export declare function buildMissingProjectError(registeredProjects: RegisteredProjectSummary[]): ToolResult;
/**
 * Build a ToolResult error for the "ambiguous project" case (multiple registered).
 * Lists all known projects with their id + path so the user can pick one.
 */
export declare function buildAmbiguousProjectError(registeredProjects: RegisteredProjectSummary[]): ToolResult;
export declare const missingProjectIdError: ToolResult;
//# sourceMappingURL=resolve-project-id.d.ts.map