/**
 * Register phase
 * --------------
 *
 * Resolves and verifies the cloud project that will receive this deployment.
 *
 * Responsibilities:
 *   - Run `reconcileProject` to either confirm access to an existing
 *     `agentuity.json` project or register/import a new one (writes
 *     agentuity.json + .env, syncs env vars to the cloud).
 *   - Handle the region-mismatch case: if local agentuity.json says one
 *     region but the cloud project lives in another, confirm with the user
 *     and update the server.
 *
 * Failure modes are surfaced via `tui.fatal()` so the rest of the deploy
 * pipeline never runs without a real, accessible project. That matches the
 * old behavior under `requires.project: true`, just with the resolution
 * moved into the handler so it can also create a project from scratch in a
 * vanilla JS/TS directory.
 *
 * GitHub auto-deploy linking is intentionally NOT done here — that prompt
 * lives later in the deploy pipeline (after the SDK key check and the
 * abort/handle setup) so it can be cleanly cancelled by the existing
 * DeploymentCancelledError flow.
 */
import type { Logger } from '@agentuity/core';
import type { APIClient } from '../../../api.ts';
import type { AuthData, Config, Project } from '../../../types.ts';
export interface RegisterParams {
    /** Project as resolved by cli.ts (may be undefined if no agentuity.json). */
    project: Project | undefined;
    /** Absolute path to the project root. */
    projectDir: string;
    /** API client (auth resolved). */
    apiClient: APIClient;
    /** Auth data for reconcile (which may need to call listOrganizations etc.). */
    auth: AuthData;
    /** Loaded CLI config (profile, overrides). */
    config: Config;
    /** Logger to thread through. */
    logger: Logger;
    /** Whether the user passed `--confirm` (used in non-TTY registration and region change). */
    confirm: boolean;
    /** Resolved by `isTTY()` at the call site so we don't import auth here. */
    interactive: boolean;
    /** Pre-selected organization ID for auto-registration. */
    orgId?: string;
    /** Pre-selected cloud region for auto-registration. */
    region?: string;
    /** Project name to use when deploy auto-registers this directory. */
    name?: string;
}
export interface RegisterResult {
    /** Project guaranteed to be registered and accessible. */
    project: Project;
    /** Whether the project was freshly registered/imported by this call. */
    imported: boolean;
}
/**
 * Run the register phase. Either resolves an existing project or
 * creates/imports one, then ensures the local region matches the server.
 *
 * The function fatals (via `tui.fatal`) on any unrecoverable problem
 * because deploy cannot continue without a registered project. Callers
 * therefore don't need to handle a `null`/error return.
 */
export declare function runRegister(params: RegisterParams): Promise<RegisterResult>;
//# sourceMappingURL=register.d.ts.map