/**
 * Build phase
 * -----------
 *
 * Compiles the user's project, generates deploy metadata, and tells the
 * server which assets we'll be uploading.
 *
 * The phase is exposed as a `Step` factory so it slots straight into the
 * deploy command's `runSteps()` pipeline alongside Discover, Sync Env,
 * Security Scan, etc.
 *
 * What happens here, in order:
 *   1. Typecheck the project (via tsc/tsgo, results funneled into the
 *      build report collector).
 *   2. Resolve the framework + package.json. We prefer the cached value
 *      from the Discover phase (set on `state.discover`); we only re-run
 *      detection in child mode where Discover is skipped.
 *   3. Run the framework adapter's `build()` to produce a buildable output
 *      directory (e.g. `.agentuity/`).
 *   4. Package the build output (writes launch.json).
 *   5. Generate the deploy metadata blob the server uses to mint upload
 *      URLs. Agentuity-native projects already emit this from their Vite
 *      pipeline; everything else gets metadata derived from the build
 *      result.
 *   6. POST the metadata to `projectDeploymentUpdate` to receive
 *      `DeploymentInstructions` (signed PUT URLs for the code zip and
 *      every static asset).
 *
 * The step writes its results back through `state` so the next steps
 * (Encrypt + Upload, Provision Deployment) can consume them without
 * threading more arguments around.
 */
import type { Logger } from '@agentuity/core';
import { type Deployment } from '@agentuity/server';
import type { APIClient } from '../../../api.ts';
import type { BuildReportCollector } from '../../../build-report.ts';
import { type Step } from '../../../steps.ts';
import type { DeployOptions, Project } from '../../../types.ts';
import type { DeployPipelineState } from './types.ts';
export interface BuildStepParams {
    project: Project;
    projectDir: string;
    apiClient: APIClient;
    logger: Logger;
    collector: BuildReportCollector;
    deployment: Deployment | undefined;
    /**
     * Raw deploy options (provider/branch/commit/etc.). Carries the
     * subset of CLI flags the build adapter needs to embed in the
     * generated deploy metadata.
     */
    deployOptions: DeployOptions;
    /** Whether `--report-file` was passed (forces a report write on error). */
    hasReportFile: boolean;
    /** Pipeline state accumulator (shared with other phases). */
    state: DeployPipelineState;
    /**
     * CLI config — used to look up the cached cloud project (populated by
     * the Register phase) so the generated build metadata can pin
     * `project.name` to the cloud's registered name rather than the
     * possibly-renamed package.json `name`.
     */
    config?: {
        name?: string;
    } | null;
}
/**
 * Build the "Build, Verify and Package" step.
 *
 * Errors are returned as `stepError` outcomes (the deploy command's
 * `runSteps()` will halt the pipeline). The build report collector is
 * flushed before returning a failure when `--report-file` is set so CI
 * always gets the diagnostics file even if the deploy aborts here.
 */
export declare function buildBuildStep(params: BuildStepParams): Step;
//# sourceMappingURL=build.d.ts.map