import type { RuntimeInternalContext } from './internal-context.js';
import type { RuntimeCallOptions } from './types.js';
export interface RuntimeArtifactsReadBytesInput {
    /** Runtime-owned artifact identity (e.g. voice_playback_requested.audio_artifact_id). Required. */
    artifactId: string;
    /**
     * Optional RFC-6838 top-level type prefix (e.g. 'audio/', 'image/',
     * 'video/'). When provided, SDK fail-closes ARTIFACT_MIME_MISMATCH if
     * runtime returns a mime_type not starting with this prefix
     * (case-insensitive). Note: 'music/' is NOT a valid RFC-6838 top-level
     * type — music artifacts use 'audio/*' (e.g. audio/mpeg, audio/aac).
     */
    expectedMimePrefix?: 'audio/' | 'image/' | 'video/' | 'text/' | 'application/' | string;
}
export interface RuntimeArtifactsReadBytesResult {
    /** Full artifact body. Inline-capped at 32 MiB by the runtime contract. */
    bytes: ArrayBuffer;
    /** RFC-6838 media type. Always present (server fills inferred mime if missing). */
    mimeType: string;
    /** Total artifact size in bytes. */
    sizeBytes: number;
    /** True if mime_type was runtime-inferred rather than provider-declared. */
    mimeInferred: boolean;
}
export interface RuntimeArtifactsModule {
    /**
     * Read artifact bytes by runtime-owned artifact_id.
     *
     * Throws NimiError with stable reason codes:
     *   - SDK_INVALID_INPUT: empty/non-string artifactId
     *   - ARTIFACT_NOT_FOUND: id missing in runtime storage (gc / never created)
     *   - ARTIFACT_TOO_LARGE: exceeds 32 MiB inline cap
     *   - ARTIFACT_FORBIDDEN: multi-tenant ACL violation (reserved; current
     *     single-runtime deployment never returns this)
     *   - ARTIFACT_MIME_MISMATCH: client expectedMimePrefix not satisfied by
     *     server-returned mime_type (SDK-side check)
     *
     * Never returns empty bytes / default mime / pretend-success on failure.
     * Per S-RUNTIME-111 fail-close posture. No fallback / retry knobs.
     */
    readBytes(input: RuntimeArtifactsReadBytesInput, options?: RuntimeCallOptions): Promise<RuntimeArtifactsReadBytesResult>;
}
/**
 * Construct the RuntimeArtifactsModule with the Runtime class internal context.
 * Called from Runtime constructor (per S-RUNTIME-111: Runtime class
 * `readonly artifacts` field, NOT a singleton const export).
 */
export declare function createRuntimeArtifactsModule(input: {
    ctx: RuntimeInternalContext;
}): RuntimeArtifactsModule;
//# sourceMappingURL=runtime-artifacts.d.ts.map