/**
 * Shared preamble for uploading an artifact payload from an `ArtifactWriter`.
 *
 * All three `ArtifactWriter` implementations (direct GCS, API Gateway, batching
 * API Gateway) must apply the same `redact → serialize → bytecount` pipeline so
 * secrets are stripped before leaving the process. Routing each writer through
 * this helper prevents drift — any future writer that skips the helper would
 * fail the contract test in
 * `src/__tests__/artifact-upload-redaction.test.ts`.
 *
 * NDJSON streaming is **not** handled here — each row is redacted independently
 * by the NDJSON writer path before being concatenated into a part body.
 */
import type { ArtifactMime } from "../_vendor/ailf-core/index.d.ts";
export interface PreparedUploadBody {
    readonly body: string;
    readonly bytes: number;
}
/**
 * Redact, serialize, and size `payload` for upload.
 *
 * Serialization branches on `mime`:
 * - `application/json` (and anything else JSON-shaped, including the
 *   single-shot side of `application/x-ndjson`) → `JSON.stringify`.
 * - `text/markdown` / `application/yaml` → coerce to string via `String()`.
 */
export declare function prepareUploadBody(payload: unknown, mime: ArtifactMime): PreparedUploadBody;
