Interface: ReaderDescriptor
Defined in: src/lib/contracts/reader_descriptor.ts:40
A tagged, serialisable description of where a reader's bytes live — never the bytes themselves.
Remarks
Reader-backed primitives (@nhtio/adk!Media, @nhtio/adk!SpooledArtifact) serialise as handles. On encode(), the reader emits this descriptor via its optional describe() method; on decode(), the registered resolver for tag re-binds the locator to a live reader (re-injecting the ambient Disk/OPFS root/fetch the locator alone cannot carry).
tag— the resolver key (e.g."spool:flydrive","media:in-memory","media:fetch"). Namespacedmedia:/spool:so the two reader families never collide in their respective registries.locator— the JSON pointer the resolver needs: a storage key, a URL, or (for in-memory readers that own their bytes) the buffer itself, base64-encoded.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
locator | LocatorValue | JSON-expressible pointer the resolver consumes to re-open the byte source. | src/lib/contracts/reader_descriptor.ts:44 |
tag | string | Resolver key identifying which registered resolver re-binds this handle on decode. | src/lib/contracts/reader_descriptor.ts:42 |