A11 TypeScript API - v0.2.1
    Preparing search index...

    Class SerializationRegistry

    Ordered collection of codecs between application values and A11 chunks.

    AsyncNodes use a registry on every typed put/read. Register domain codecs (model messages, audio frames, tool events) before generic defaults when they need a distinct MIME/tag contract. MIME patterns and stable type tags let consumers constrain what they will decode instead of trusting arbitrary peer data.

    Index
    • Validate MIME/type constraints, select a decoder, and return a typed value.

      Type Parameters

      • T = unknown

      Parameters

      • chunk: Chunk
      • mimetypePatterns: string | readonly string[] = ''
      • OptionalexpectedTag: string

      Returns Promise<StatusOr<T>>

    • Select a matching serializer and produce a tagged, owned Chunk.

      Parameters

      • value: unknown
      • mimetype: string = ''

      Returns Promise<StatusOr<Chunk>>