Skip to main content
Version: v0.0.4

Interface: AstmProfile

A frozen, immutable vendor/conformance profile. Produced by defineAstmProfile; consumers pass it to parseAstmRecords(raw, { profile }) (or register it as the process default), and feed its AstmProfile.transport to detectFraming(bytes, { override }). Hand-authoring the object literal is supported but discouraged - the factory validates the safety rules and attaches describe().

Example

import { parseAstmRecords, astmProfiles } from "@cosyte/astm";
const msg = parseAstmRecords(raw, { profile: astmProfiles.referenceCorpus });
msg.profile?.name; // "referenceCorpus"

Properties

describe?

readonly optional describe?: () => string

Multi-line human-readable summary; always present on factory-built profiles.

Returns

string


description?

readonly optional description?: string

Optional human-readable description.


lineage

readonly lineage: readonly string[]

Resolved lineage - [...parents, name], first-occurrence deduped.


name

readonly name: string

The profile's unique name (registry key / attribution label).


provenance?

readonly optional provenance?: AstmProfileProvenance

The cited public grounding for this profile's quirks (absent for default).


tolerate

readonly tolerate: readonly AstmQuirkTolerance[]

The expected, non-safety-critical deviations this profile tolerates.


transport?

readonly optional transport?: AstmFraming

The raw-vs-framed-TCP override. When set, a consumer forces this framing via detectFraming(bytes, { override: profile.transport }) - the way a profile that knows a vendor's transport reality (e.g. framing dropped over raw TCP) bypasses leading-byte auto-detection. Absent means "let detection decide."