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?
readonlyoptionaldescribe?: () =>string
Multi-line human-readable summary; always present on factory-built profiles.
Returns
string
description?
readonlyoptionaldescription?:string
Optional human-readable description.
lineage
readonlylineage: readonlystring[]
Resolved lineage: [...parents, name], first-occurrence deduped.
name
readonlyname:string
The profile's unique name (registry key / attribution label).
provenance?
readonlyoptionalprovenance?:AstmProfileProvenance
The cited public grounding for this profile's quirks (absent for default).
tolerate
readonlytolerate: readonlyAstmQuirkTolerance[]
The expected, non-safety-critical deviations this profile tolerates.
transport?
readonlyoptionaltransport?: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."