Skip to content

MediaArtifact

MediaArtifact = object

A reference to retrievable media a run produced (ADR 017). It carries no bytes and no location: an engine-owned artifact is read through the engine by id, and an application-owned one was written to an application destination. Media-neutral: audio, images and video share this shape and differ only in mediaType.

[property: string]: unknown

optional byteLength?: number

Size of the media in bytes. Always set for an artifact the engine materialized.


optional destinationRef?: string

The request’s delivery.destinationRef the bytes were written to. Set exactly when owner is ‘application’.


optional durationMs?: number

Duration of time-based media in milliseconds, where the producer knows it.


id: string

Opaque, engine-issued identifier. Never a path, URL or provider identifier.


lifetime: "until_disposed"

How long the engine keeps the bytes. ‘until_disposed’: until the application disposes the artifact or the process ends; the artifact outlives the run that produced it.


mediaType: string

IANA media type of the bytes, e.g. ‘audio/wav’. Encoding parameters ride on the media type (e.g. ‘audio/L16;rate=22050’).


owner: ArtifactOwner

‘engine’: the engine holds the bytes and the application reads them by id until it disposes the artifact. ‘application’: the bytes were written to the application destination named by destinationRef and the engine holds nothing.