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.
Methods
Section titled “Methods”accepts()
Section titled “accepts()”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.
Parameters
Section titled “Parameters”destinationRef
Section titled “destinationRef”string
mediaTypes
Section titled “mediaTypes”readonly string[] | undefined
Returns
Section titled “Returns”Promise<boolean>
write()
Section titled “write()”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.
Parameters
Section titled “Parameters”destinationRef
Section titled “destinationRef”string
artifact
Section titled “artifact”Uint8Array
Returns
Section titled “Returns”Promise<void>
IndeRun — open-source AI execution for cross-platform apps. Built and maintained by Independo GmbH (opens in new tab), supported by netidee (opens in new tab).
MIT-licensed SDK · No SDK usage telemetry.
© 2025–2026 Independo GmbH