/**
 * 问题五十二: Local Docker / Browser Acceptance — 本地 Docker 与浏览器验收契约。
 *
 * 强制执行:
 * - 有可运行前端/全栈服务时不得只停在单测、静态检查或报告
 * - 浏览器验收失败必须 capture/classify/map/repair/rebuild/redeploy/rerun
 * - 最终必须给用户本地可访问 URL，否则不得 delivered
 * - 不得用空 errors 数组模拟 passed，必须有真实 HTTP 请求证据
 */
import type { LocalDockerAcceptanceContract, ServiceRuntimeSpec, BrowserAcceptancePlan, RepairLoopPolicy, BrowserAcceptanceEvidence, FinalLocalReviewAccess, LocalAcceptanceStatus } from "./extension_platform_contracts.js";
export interface LocalAcceptanceResult {
    passed: boolean;
    status: LocalAcceptanceStatus;
    blocking_reasons: string[];
}
/** 真实本地验收执行结果 */
export interface RealLocalAcceptanceResult {
    health_check_ok: boolean;
    health_check_output: string;
    target_url: string;
    assertion_results: string[];
    http_status: number | null;
    response_body_sample: string;
    timestamp: string;
    run_hash: string;
}
/**
 * 创建本地验收契约。
 */
export declare function createLocalDockerAcceptanceContract(overrides?: Partial<LocalDockerAcceptanceContract>): LocalDockerAcceptanceContract;
/**
 * 评估是否需要本地验收。
 */
export declare function requiresLocalAcceptance(hasFrontend: boolean, hasBackend: boolean, hasDockerCompose: boolean, hasDockerfile: boolean): {
    required: boolean;
    run_mode: LocalDockerAcceptanceContract["project_run_mode"];
};
/**
 * 创建服务运行规格。
 */
export declare function createServiceRuntimeSpec(overrides: Partial<ServiceRuntimeSpec> & Pick<ServiceRuntimeSpec, "service_name">): ServiceRuntimeSpec;
/**
 * 执行真实本地 HTTP 验收 — 必须有真实 fetch 证据。
 * 对指定 URL 执行 HTTP GET，记录 status、response body 片段、断言结果。
 */
export declare function executeRealHttpAcceptance(targetUrl: string, assertions: Array<{
    name: string;
    check: (status: number, body: string) => boolean;
}>): Promise<RealLocalAcceptanceResult>;
/** fetch-compatible transport 函数类型 */
export type HttpTransport = (url: string) => Promise<{
    status: number;
    text: () => Promise<string>;
}>;
/**
 * 使用可注入 transport 执行 HTTP 验收 — 不依赖端口绑定。
 * transport 是一个 fetch-like 函数: (url) → { status, text() }
 * 用于单元/Release Gate 中验证完整证据链，无需监听端口。
 */
export declare function executeHttpAcceptanceWithTransport(targetUrl: string, assertions: Array<{
    name: string;
    check: (status: number, body: string) => boolean;
}>, transport: HttpTransport): Promise<RealLocalAcceptanceResult>;
/**
 * 将真实验收结果转换为浏览器验收证据。
 */
export declare function realResultToBrowserEvidence(result: RealLocalAcceptanceResult, flowName: string): BrowserAcceptanceEvidence;
/**
 * 执行浏览器验收 — 失败必须 capture/classify/map/repair/rebuild/redeploy/rerun。
 * 注意: 此函数仅分类已知错误，不执行真实 HTTP 请求。
 * 真实验收请使用 executeRealHttpAcceptance + realResultToBrowserEvidence。
 */
export declare function performBrowserAcceptance(plan: BrowserAcceptancePlan, errors: string[], _repairPolicy: RepairLoopPolicy): {
    evidence: BrowserAcceptanceEvidence;
    needsRepair: boolean;
    stopReason?: string;
};
/**
 * 验证最终访问 — 必须给用户本地可访问 URL。
 */
export declare function validateFinalAccess(finalAccess: FinalLocalReviewAccess, projectRunMode: LocalDockerAcceptanceContract["project_run_mode"]): LocalAcceptanceResult;
/**
 * 验证本地验收全量证据 — 检查 health check、browser evidence、build artifacts。
 * 不允许仅靠传入空 errors 数组判定成功。
 */
export declare function validateLocalAcceptanceEvidence(contract: LocalDockerAcceptanceContract): LocalAcceptanceResult;
/**
 * 评估修复循环策略。
 */
export declare function evaluateRepairLoop(iteration: number, policy: RepairLoopPolicy, lastErrors: string[], previousErrors: string[]): {
    continue_repair: boolean;
    reason: string;
};
//# sourceMappingURL=local_docker_acceptance.d.ts.map