Skip to content

ArtifactChunk

One range of an engine-owned media artifact’s bytes, as readArtifact returns it (ADR 017).

Declared here rather than imported: it is not a generated contract — each SDK declares its own (core/artifacts.d.ts in @independo/inderun-web) — and importing it from the web SDK would make the native platforms’ plugin contract depend on it. The drift guard is in index.ts, which checks that IndeRunCapacitorInstance stays assignable to the web SDK’s IndeRunApi, whose readArtifact returns the web SDK’s chunk.

artifactId: string

The artifact the bytes belong to.


bytes: Uint8Array

The bytes of this range; empty when offset is the artifact’s end.


done: boolean

Whether this range reaches the end of the artifact.


offset: number

Byte offset of bytes within the artifact.


totalBytes: number

Size of the whole artifact in bytes.