Skip to content
1 min read · 177 words

@nhtio/adk/batteries/artifacts/toon

TOON artifact battery — structured queries over TOON format artifacts.

Remarks

Adds SpooledToonArtifact, a @nhtio/adk!SpooledArtifact specialisation for structured TOON queries. TOON encodes the JSON data model in a compact text format; parsing produces the same values as decoding JSON, so queries use JSONPath-Plus for path navigation, exactly as @nhtio/adk!SpooledJsonArtifact does.

Requires the optional peer @toon-format/toon (version ^4.1.1). If it is not installed, methods requiring it throw E_TOON_PEER_MISSING with installation instructions.

Export note: registerArtifactEncodables must be called before any attempt to decode() a spooled TOON artifact. Call it once at startup:

ts
import { registerArtifactEncodables } from "@nhtio/adk/batteries/artifacts";
await registerArtifactEncodables();

Classes

ClassDescription
SpooledToonArtifactA @nhtio/adk!SpooledArtifact specialisation that adds TOON-aware read operations.

Interfaces

InterfaceDescription
ToonDecodeOptionsTOON decode options.

Variables

VariableDescription
jsonToToonToolConverter tool: JSON to TOON.
toonToJsonToolConverter tool: TOON to JSON.

References

E_TOON_DECODE_FAILED

Re-exports E_TOON_DECODE_FAILED


E_TOON_PEER_MISSING

Re-exports E_TOON_PEER_MISSING