/**
 * Ricky Cloud generate endpoint handler.
 *
 * Bounded Cloud generate contract around POST /api/v1/ricky/workflows/generate.
 * Requires explicit auth and workspace context — no implicit credential
 * resolution or ambient Cloud runtime dependency.
 *
 * This module is a pure request→response handler. It does NOT start a server
 * or depend on a live Cloud runtime. Transport binding (Express, Hono, etc.)
 * is the caller's responsibility.
 */
import type { CloudGenerateRequest } from './request-types.js';
import type { CloudAssumption, CloudArtifact, CloudFollowUpAction, CloudGenerateResponse, CloudRunReceipt, CloudValidationStatus, CloudWarning } from './response-types.js';
import type { WorkforcePersonaGenerationMetadata } from '../../product/generation/index.js';
import type { AuthorizedWorkspaceScope } from '../auth/types.js';
export declare const CLOUD_GENERATE_ROUTE: "/api/v1/ricky/workflows/generate";
export declare const CLOUD_GENERATE_METHOD: "POST";
export interface CloudGenerateResult {
    artifacts: CloudArtifact[];
    warnings: CloudWarning[];
    assumptions?: CloudAssumption[];
    validation?: CloudValidationStatus;
    /**
     * Reserved for future queue-backed adapters. This bounded generate endpoint
     * does not surface executor-provided run metadata; it derives an honest
     * skipped/not_requested receipt from the caller's generation mode.
     */
    runReceipt?: Omit<CloudRunReceipt, 'requestId'>;
    generationMetadata?: {
        workforcePersona?: WorkforcePersonaGenerationMetadata;
    };
    followUpActions: CloudFollowUpAction[];
}
/**
 * The executor is the seam between the endpoint handler and actual Cloud work.
 * Inject a fake in tests; wire the real Cloud runtime in production.
 */
export interface CloudExecutor {
    generate(request: CloudGenerateRequest): Promise<CloudGenerateResult>;
}
export interface CloudGenerateEndpointContract {
    method: typeof CLOUD_GENERATE_METHOD;
    path: typeof CLOUD_GENERATE_ROUTE;
    handler: typeof handleCloudGenerate;
}
export declare const defaultCloudExecutor: CloudExecutor;
export interface CloudGenerateEndpointOptions {
    executor?: CloudExecutor;
    /**
     * Workspace scope resolved from the caller's verified token/session.
     *
     * The endpoint fails closed without this scope so executor work only starts
     * after W3-01 authorization scoping has been applied.
     */
    authorizedWorkspaceScope?: AuthorizedWorkspaceScope;
    /** Override request ID generation for deterministic tests. */
    requestIdFactory?: () => string;
}
/**
 * Handle a Cloud generate request.
 *
 * 1. Validates auth, workspace, and body.
 * 2. Delegates to the injected executor.
 * 3. Returns the unified Cloud response contract.
 *
 * This is a pure function — no server, no middleware, no Cloud runtime dependency.
 */
export declare function handleCloudGenerate(request: CloudGenerateRequest, options?: CloudGenerateEndpointOptions): Promise<CloudGenerateResponse>;
export declare const cloudGenerateEndpoint: CloudGenerateEndpointContract;
