/**
 * Bun-backed implementation of `S3ClientLike`.
 *
 * Thin wrapper around `Bun.S3Client`. Only resolvable when the consumer
 * is running under Bun — `package.json`'s `"bun"` exports condition
 * routes here automatically; explicit `@agentuity/storage/bun` imports
 * also land here.
 *
 * Falling through to this module under Node will fail at import time
 * because `import { S3Client } from 'bun'` is not satisfiable there.
 * That is intentional and matches the contract of the `bun` exports
 * condition.
 */
import type { BucketConfig, S3Body, S3ClientLike } from './types.ts';
export type { BucketConfig, S3ClientLike } from './types.ts';
export { bucketConfigFromEnv } from './types.ts';
/**
 * Normalize a write body into a shape `Bun.S3Client.write` stores
 * losslessly.
 *
 * Bun 1.3.x's `S3Client.write` does not consume a Web `ReadableStream`:
 * it string-coerces it to the 23-byte literal `"[object ReadableStream]"`
 * and stores that instead of the stream's bytes. Buffer a stream to bytes
 * first (a `Uint8Array` round-trips correctly); every other accepted
 * shape (string/Uint8Array/ArrayBuffer/Blob) is already stored losslessly
 * and passes through untouched.
 *
 * Exported for regression testing: Bun's built-in `bun` module can't be
 * overridden via `mock.module`, so the buffering is verified here rather
 * than through a mocked `write`.
 */
export declare function normalizeWriteBody(body: S3Body): Promise<Exclude<S3Body, ReadableStream<Uint8Array>>>;
/**
 * Create an S3 client backed by `Bun.S3Client`.
 *
 * Endpoints are bucket-scoped (virtual-hosted-style), so we do not pass
 * a bucket parameter on the client itself; the hostname routes to the
 * correct bucket.
 */
export declare function createS3Client(bucket: BucketConfig): S3ClientLike;
//# sourceMappingURL=bun.d.ts.map