/**
 * remote-results.ts — Write output artifacts from a remote evaluation.
 *
 * Produces the same file layout as local mode so downstream tools
 * (workflow PR comments, score comparison, baseline save) work unchanged:
 *
 *   <outputDir>/score-summary.json  — scores by area + overall
 *   <outputDir>/report.md           — rendered markdown report
 *   <outputDir>/job-metadata.json   — job ID, timing, API URL
 *
 * @see packages/eval/src/commands/remote-pipeline.ts — caller
 */
import type { ApiClient } from "../adapters/api-client/api-client.js";
import type { JobResponse } from "../adapters/api-client/types.js";
/** Options for writing remote results. */
export interface WriteResultsOptions {
    /** Base directory for output artifacts. */
    outputDir: string;
    /** Optional output path override (--output flag). */
    outputPath?: string;
    /** API base URL (for metadata). */
    apiUrl: string;
}
/** Outcome flags so the caller can decide the process exit code. */
export interface WriteResultsOutcome {
    /** True when `job.error` was set on a completed job (DOC-2121 RC-3). */
    degraded: boolean;
}
/**
 * Fetch report artifacts from the API and write them to disk.
 *
 * Writes:
 * - `<outputDir>/score-summary.json` — score data from job response
 * - `<outputDir>/report.md` — full markdown report (if reportId present)
 * - `<outputDir>/job-metadata.json` — job tracking info
 * - `--output` path — markdown report (if specified)
 *
 * Returns an outcome the caller uses to choose an exit code: a `completed`
 * job that carries `job.error` is treated as a *degraded* completion (a
 * configured optional step failed end-to-end; see DOC-2121 RC-3) and the
 * caller should exit non-zero so external `--remote` consumers don't read
 * a clean completion as success.
 */
export declare function writeRemoteResults(client: ApiClient, job: JobResponse, options: WriteResultsOptions): Promise<WriteResultsOutcome>;
