Skip to content

mediaArtifactSchema

const mediaArtifactSchema: object

The JSON Schemas those models were generated from, for runtime use.

readonly $id: "https://schemas.inderun.dev/1.0/media-artifact.schema.json"

readonly $schema: "https://json-schema.org/draft/2020-12/schema"

readonly additionalProperties: true

readonly description: "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."

readonly properties: object

readonly byteLength: object

readonly description: "Size of the media in bytes. Always set for an artifact the engine materialized."

readonly minimum: 0

readonly type: "integer"

readonly destinationRef: object

readonly description: "The request's delivery.destinationRef the bytes were written to. Set exactly when owner is 'application'."

readonly minLength: 1

readonly type: "string"

readonly durationMs: object

readonly description: "Duration of time-based media in milliseconds, where the producer knows it."

readonly minimum: 0

readonly type: "number"

readonly id: object

readonly description: "Opaque, engine-issued identifier. Never a path, URL or provider identifier."

readonly minLength: 1

readonly type: "string"

readonly lifetime: object

readonly description: "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."

readonly enum: readonly ["until_disposed"]

readonly title: "ArtifactLifetime"

readonly mediaType: object

readonly description: "IANA media type of the bytes, e.g. 'audio/wav'. Encoding parameters ride on the media type (e.g. 'audio/L16;rate=22050')."

readonly minLength: 1

readonly type: "string"

readonly owner: object

readonly description: "'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."

readonly enum: readonly ["engine", "application"]

readonly title: "ArtifactOwner"

readonly required: readonly ["id", "mediaType", "owner", "lifetime"]

readonly title: "MediaArtifact"

readonly type: "object"