Skip to content

ArtifactDestinationService

Resolves the opaque delivery.destinationRef of an artifact request to a place the application chose — a file it will hand to a player, a cache it manages — and writes the finished artifact there (ADR 017). A request names a reference, never a path, so a request that came from a webview cannot address arbitrary storage.

accepts(destinationRef, mediaTypes): Promise<boolean>

Whether destinationRef names a destination this host can write the requested media to. Called before routing; false refuses the request.

string

readonly string[] | undefined

Promise<boolean>


write(destinationRef, artifact, bytes): Promise<void>

Writes the finished artifact’s bytes to the destination. A failure fails the run: it is committed by then, so it never falls back.

string

MediaArtifact

Uint8Array

Promise<void>