/**
 * Launch metadata generation for buildpack-compatible output.
 *
 * Generates the metadata that tells the runtime how to start the application.
 * This is analogous to CNB's launch.toml / Docker CMD.
 */
import type { BuildResult } from '../adapters/types.ts';
import type { DetectedFramework } from '../detect/types.ts';
import type { MonorepoContext } from '../detect/monorepo.ts';
/**
 * Filename the CLI looks for at the project root when a user wants to
 * override or fully supply the launch metadata. Same name as the file
 * we emit into the build output so users can copy/edit one we generated.
 */
export declare const USER_LAUNCH_FILENAME = "launch.json";
/**
 * Partial launch metadata a user can ship at the project root to
 * override what the CLI infers. Every field is optional; provided
 * fields win over the generated ones. `build.{date,duration}` is
 * always machine-generated and ignored here.
 */
export interface UserLaunchOverride {
    processes?: ProcessDefinition[];
    framework?: {
        name?: string;
        version?: string;
    };
    runtime?: {
        name?: string;
        port?: number;
    };
}
/**
 * Read a user-supplied `launch.json` from the project root, if any.
 *
 * Returns `null` when the file is missing. Throws on invalid JSON —
 * a malformed override is a user error worth surfacing rather than
 * silently falling back to inference.
 */
export declare function readUserLaunchOverride(projectDir: string): UserLaunchOverride | null;
/**
 * Process definition for the launch metadata.
 */
export interface ProcessDefinition {
    /** Process type (e.g., 'web', 'worker') */
    type: string;
    /** Command to execute */
    command: string;
    /** Whether this is the default process */
    default: boolean;
    /** Working directory (relative to app root) */
    workingDirectory?: string;
}
/**
 * Complete launch metadata written to the output directory.
 */
export interface LaunchMetadata {
    /** Application processes */
    processes: ProcessDefinition[];
    /** Framework that was detected */
    framework: {
        name: string;
        version?: string;
    };
    /** Runtime information */
    runtime: {
        name: string;
        port?: number;
    };
    /** Build information */
    build: {
        date: string;
        duration: number;
    };
}
/**
 * Generate launch metadata from a build result and detected framework.
 *
 * If a user-supplied override is provided, its fields take precedence:
 * `processes` (whole array replaces ours), `framework.{name,version}`,
 * and `runtime.{name,port}`. `build.{date,duration}` is always emitted
 * from the actual build and cannot be overridden.
 */
export declare function generateLaunchMetadata(framework: DetectedFramework, buildResult: BuildResult, override?: UserLaunchOverride | null, monorepo?: MonorepoContext): LaunchMetadata;
/**
 * Write launch metadata to the output directory.
 *
 * Writes launch.json — machine-readable launch metadata.
 */
export declare function writeLaunchMetadata(outputDir: string, metadata: LaunchMetadata): void;
//# sourceMappingURL=launch.d.ts.map