@cosyte/x12 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -7,10 +7,10 @@ import { Buffer } from 'node:buffer';
7
7
  * warning it emits so messages, payload shape, and positional context stay
8
8
  * consistent across stages.
9
9
  *
10
- * The Phase 1 set is intentionally small (8 codes) - every additional code
10
+ * The envelope set is intentionally small (8 codes) - every additional code
11
11
  * is a public-surface addition that needs a snapshot bump
12
- * (see `test/warning-codes.snapshot.test.ts`). Phase 2+ extends, never
13
- * renames.
12
+ * (see `test/warning-codes.snapshot.test.ts`). Later stages extend, never
13
+ * rename.
14
14
  *
15
15
  * ## A warning message is built from this registry, never from the document
16
16
  *
@@ -299,13 +299,19 @@ interface X12ParseWarning {
299
299
  */
300
300
  declare function controlNumberMismatch(position: X12Position, pair: X12ControlNumberPair): X12ParseWarning;
301
301
  /**
302
- * Build an `X12_PRE_005010` warning. Emitted when ISA-12 declares any version
303
- * other than `00501`, the HIPAA-mandated baseline. The code name reads as a
302
+ * Build an `X12_PRE_005010` warning. Emitted when the twelfth element of the
303
+ * ISA split does not read `00501`, the HIPAA-mandated baseline interchange
304
+ * control version number. The code name reads as a
304
305
  * "pre-005010" test and the guard is an inequality, so a LATER family
305
306
  * (`00602`, `00700`) raises it too. The parser still
306
307
  * accepts the input (Postel's Law: lenient on parse) but flags the
307
308
  * mismatch so consumers know the input may diverge from 005010 semantics.
308
- * The declared version stays on `isa.elements[12]`.
309
+ *
310
+ * The guard reads that element, so raising this code does NOT establish that
311
+ * the header split into `ISA` plus 16 elements and does not assert what ISA-12
312
+ * itself declares. Where `X12_ISA_EXTRA_ELEMENT_SEPARATOR` is also present the
313
+ * element read may be a displaced one; `isa.raw` carries all 106 bytes and with
314
+ * the ISA fixed widths is the route back.
309
315
  *
310
316
  * @example
311
317
  * ```ts
@@ -376,8 +382,7 @@ declare function transactionCountMismatch(position: X12Position): X12ParseWarnin
376
382
  * segments in the transaction set it closes (ST through SE inclusive).
377
383
  * Corrected counts are emitted only on `serializeX12(ix, { specClean: true,
378
384
  * recomputeCounts: true })`. The parser does not emit this code (it leaves
379
- * SE-01 reconciliation to the emit half); it is a Phase-8 serializer
380
- * diagnostic.
385
+ * SE-01 reconciliation to the emit half); it is a serializer diagnostic.
381
386
  *
382
387
  * @example
383
388
  * ```ts
@@ -623,7 +628,7 @@ declare function missingRequiredLoop(position: X12Position, loop: X12RequiredLoo
623
628
  * `submission.implementationConventionReference` is decoded of any `?` release
624
629
  * escape, so on a document that escapes a delimiter inside `ST-03` the two
625
630
  * differ and the model field can hold an identifier this code just said was
626
- * not recognised (`X12-ST03-READ-NOT-RELEASE-AWARE`). A pointer stood here and
631
+ * not recognised. A pointer stood here and
627
632
  * in the message text and is DELETED, not reworded.
628
633
  *
629
634
  * `get837Claims` anchors this at the **ST**, which is `tx.segments[0]` and
@@ -1013,7 +1018,7 @@ declare function amountRowDropped(position: X12Position): X12ParseWarning;
1013
1018
  declare function statedAmountDiscarded(position: X12Position): X12ParseWarning;
1014
1019
 
1015
1020
  /**
1016
- * Type definitions for the `@cosyte/x12` profile subsystem (Phase 9).
1021
+ * Type definitions for the `@cosyte/x12` profile subsystem.
1017
1022
  *
1018
1023
  * A profile captures **trading-partner / companion-guide deviations** as
1019
1024
  * typed, documented, fixture-grounded data - never silent leniency. It
@@ -1185,7 +1190,7 @@ interface X12ProfileSpec {
1185
1190
  * an 835 claim, a dropped decimal is the wrong dollar amount in someone's
1186
1191
  * cash post. `X12Decimal` preserves the inbound lexical form verbatim for
1187
1192
  * byte-exact round-trip and exposes exact `BigInt`-backed arithmetic for
1188
- * balance invariants (Phase 4 acceptance: CLP-04 + CLP-05 + ΣCAS = CLP-03;
1193
+ * balance invariants (CLP-04 + CLP-05 + ΣCAS = CLP-03;
1189
1194
  * ΣSVC paid + ΣCAS = CLP-04; Σclaim CLP-04 + PLB = BPR-02).
1190
1195
  *
1191
1196
  * Internal representation:
@@ -1407,7 +1412,7 @@ declare class X12Decimal {
1407
1412
  }
1408
1413
 
1409
1414
  /**
1410
- * Segment-level decode for the `@cosyte/x12` parser pipeline. Phase 2's
1415
+ * Segment-level decode for the `@cosyte/x12` parser pipeline. The
1411
1416
  * syntactic core: take a raw segment string (terminator already stripped by
1412
1417
  * the envelope walker) and decode it into an immutable {@link X12Segment}
1413
1418
  * carrying its segment id, raw text, and an element array. Element values
@@ -1428,8 +1433,8 @@ declare class X12Decimal {
1428
1433
  * - `"03[2]-1"` → component 1 of repetition 2 of element 3.
1429
1434
  *
1430
1435
  * The parser deliberately does NOT support cross-segment paths at this
1431
- * phase - `Segment.get` operates inside a single segment. Cross-loop
1432
- * traversal arrives with `defineLoopSpec` in Phase 3+ (which authors the
1436
+ * level - `Segment.get` operates inside a single segment. Cross-loop
1437
+ * traversal arrives with `defineLoopSpec` (which authors the
1433
1438
  * built-in transaction loops through the same public API as consumers -
1434
1439
  * the dogfooding gate).
1435
1440
  */
@@ -1813,13 +1818,13 @@ interface X12ParseOptions {
1813
1818
  }
1814
1819
  /**
1815
1820
  * The four X12 delimiter classes discovered from fixed byte positions inside
1816
- * the ISA envelope. Phase 1 detects all four from the ISA itself - they are
1821
+ * the ISA envelope. The parser detects all four from the ISA itself - they are
1817
1822
  * NEVER assumed (in particular, `component` is rarely `:` outside Medicare).
1818
1823
  *
1819
1824
  * - `element` - ISA byte 4 (1-indexed); separates the 16 ISA elements.
1820
1825
  * - `repetition` - ISA-11 (byte 83, 1-indexed); separates repetitions inside
1821
1826
  * an element. Carries the legacy Control Standards Identifier
1822
- * (typically `U`) for pre-005010 inputs; Phase 1 surfaces it verbatim.
1827
+ * (typically `U`) for pre-005010 inputs; the parser surfaces it verbatim.
1823
1828
  * - `component` - ISA-16 (byte 105, 1-indexed); separates sub-elements of a
1824
1829
  * composite. Real-world senders use `:`, `\\`, `^`, `|`, and more.
1825
1830
  * - `segment` - the byte immediately after ISA-16 (byte 106, 1-indexed);
@@ -1844,18 +1849,27 @@ interface Delimiters {
1844
1849
  readonly segment: string;
1845
1850
  }
1846
1851
  /**
1847
- * The decoded ISA interchange header. `raw` preserves the exact 106-byte
1848
- * ISA + terminator string from input so round-trip serialization is
1849
- * byte-exact regardless of any lenient normalization downstream. `elements`
1850
- * is the 16 ISA values, 1-indexed (`elements[0]` is the literal `"ISA"`
1851
- * name placeholder, `elements[1]` is ISA-01, ..., `elements[16]` is ISA-16).
1852
+ * The decoded ISA interchange header. ISA-12 is the interchange control
1853
+ * version number, `00501` being the HIPAA-mandated baseline, and ISA-13 the
1854
+ * interchange control number, which the envelope walker reconciles against
1855
+ * IEA-02.
1856
+ *
1857
+ * `raw` preserves the exact 106-byte ISA + terminator string from input so
1858
+ * round-trip serialization is byte-exact regardless of any lenient
1859
+ * normalization downstream. `elements` is what splitting that span on the
1860
+ * element separator produced, `elements[0]` being the literal `"ISA"` name
1861
+ * placeholder. **Element values are stored RAW**, so an entry is byte text
1862
+ * and not necessarily the value the sender stated. The 1-indexed mapping onto
1863
+ * ISA-01..ISA-16 holds where that split produced exactly 17 entries;
1864
+ * `X12_ISA_EXTRA_ELEMENT_SEPARATOR` reports where it did not, and `raw`
1865
+ * carries all 106 bytes either way.
1852
1866
  *
1853
1867
  * @example
1854
1868
  * ```ts
1855
1869
  * import type { IsaSegment } from "@cosyte/x12";
1856
1870
  * declare const isa: IsaSegment;
1857
- * isa.elements[12]; // ISA-12 - version, expected "00501"
1858
- * isa.elements[13]; // ISA-13 - interchange control number
1871
+ * isa.raw; // verbatim 106-byte header
1872
+ * isa.elements[13]; // raw text at index 13 of the ISA split
1859
1873
  * ```
1860
1874
  */
1861
1875
  interface IsaSegment {
@@ -1949,7 +1963,7 @@ interface GeSegment {
1949
1963
  * pre-`?`-unescape**, so an element is the framed byte text of its slot and
1950
1964
  * not necessarily the value the sender stated.
1951
1965
  *
1952
- * The Phase 3 envelope walker captures TA1 segments here verbatim; the
1966
+ * The envelope walker captures TA1 segments here verbatim; the
1953
1967
  * typed-ack model is built on top by `parseTA1`, whose five decoded fields
1954
1968
  * are POST-`?`-unescape. `parseTA1` decodes the FIRST TA1 on an
1955
1969
  * interchange, so on a multi-TA1 inbound it does not necessarily describe
@@ -1969,7 +1983,7 @@ interface Ta1Segment {
1969
1983
  readonly elements: readonly string[];
1970
1984
  }
1971
1985
  /**
1972
- * A single ST..SE transaction set inside a functional group. Phase 2
1986
+ * A single ST..SE transaction set inside a functional group. The parser
1973
1987
  * decodes every body segment via {@link "./segment.js".decodeSegment} so
1974
1988
  * `segments` carries typed {@link X12Segment} entries (ST through SE,
1975
1989
  * inclusive). `rawSegments` mirrors the same list as the verbatim raw
@@ -1980,7 +1994,7 @@ interface Ta1Segment {
1980
1994
  * time so envelope invariants can be checked (ST-02 ↔ SE-02 control-number
1981
1995
  * reconciliation, SE-01 segment count). **Read "decoded" as element-SPLIT and
1982
1996
  * nothing more: the strings are PRE-`?`-unescape**, and a reader that publishes
1983
- * one to a consumer unescapes it first (`X12-ST03-READ-NOT-RELEASE-AWARE`).
1997
+ * one to a consumer unescapes it first.
1984
1998
  *
1985
1999
  * @example
1986
2000
  * ```ts
@@ -2006,7 +2020,7 @@ interface X12TransactionSet {
2006
2020
  /**
2007
2021
  * A single GS..GE functional group inside an interchange. `transactions`
2008
2022
  * is the ordered list of ST..SE transaction sets inside it (opaque bodies
2009
- * at Phase 1 - see {@link X12TransactionSet}).
2023
+ * at envelope decode - see {@link X12TransactionSet}).
2010
2024
  *
2011
2025
  * @example
2012
2026
  * ```ts
@@ -2221,7 +2235,7 @@ interface X12Interchange {
2221
2235
  }
2222
2236
 
2223
2237
  /**
2224
- * Public entry point for the `@cosyte/x12` parser - composes the Phase 1
2238
+ * Public entry point for the `@cosyte/x12` parser - composes the
2225
2239
  * delimiter-detection + envelope-decode stages and routes every Tier-2
2226
2240
  * warning through a single emission chokepoint. The four Tier-3 fatal codes
2227
2241
  * (`X12_EMPTY_INPUT`, `X12_NO_ISA_HEADER`, `X12_ISA_TOO_SHORT`,
@@ -2245,11 +2259,11 @@ interface X12Interchange {
2245
2259
  * carries an empty `snippet`: the warning it wraps is registry-built and
2246
2260
  * fully located by `position`, so there is nothing to redact.
2247
2261
  *
2248
- * Phase 1 decodes the envelope (ISA / GS / ST / SE / GE / IEA) and
2249
- * detects the four delimiters from fixed ISA byte positions. Transaction-
2250
- * set bodies inside each ST..SE are kept **opaque** at this phase -
2251
- * `tx.segments` carries the raw segment strings (terminator stripped).
2252
- * Phase 2 adds segment/element/composite/repetition decode on top.
2262
+ * The envelope decode reads ISA / GS / ST / SE / GE / IEA and detects the
2263
+ * four delimiters from fixed ISA byte positions. Transaction-set bodies
2264
+ * inside each ST..SE are kept **opaque** there - `tx.segments` carries the
2265
+ * raw segment strings (terminator stripped). Segment decode adds
2266
+ * element/composite/repetition decode on top.
2253
2267
  *
2254
2268
  * @example
2255
2269
  * ```ts
@@ -2341,7 +2355,7 @@ declare const DELIMITER_POSITIONS: {
2341
2355
  * against an input that begins with `"ISA"` followed by structurally
2342
2356
  * wrong bytes (e.g. a tab as element separator with `:` further in).
2343
2357
  *
2344
- * Phase 1 is liberal in what it accepts AFTER the ISA - downstream
2358
+ * The parser is liberal in what it accepts AFTER the ISA - downstream
2345
2359
  * envelope walking emits Tier-2 warnings rather than throwing. But the
2346
2360
  * ISA itself MUST be structurally readable; otherwise no later stage has
2347
2361
  * a delimiter set to work with.
@@ -2360,7 +2374,7 @@ declare function detectDelimiters(raw: string): Delimiters;
2360
2374
 
2361
2375
  /**
2362
2376
  * Fatal error taxonomy for the `@cosyte/x12` parser pipeline. Four Tier-3
2363
- * codes cover every unrecoverable structural failure in Phase 1; anything
2377
+ * codes cover every unrecoverable structural failure; anything
2364
2378
  * less severe is a Tier-2 warning (see `./warnings.ts`). `X12ParseError` is
2365
2379
  * thrown directly; consumers narrow via the `code` discriminant. The set is
2366
2380
  * locked at 4 and is additions-only thereafter - adding a code is a
@@ -2368,8 +2382,8 @@ declare function detectDelimiters(raw: string): Delimiters;
2368
2382
  */
2369
2383
 
2370
2384
  /**
2371
- * Stable string codes for every Tier-3 fatal `parseX12` may throw. Phase 1
2372
- * locks the registry at four codes: anything else MUST be a Tier-2 warning.
2385
+ * Stable string codes for every Tier-3 fatal `parseX12` may throw. The
2386
+ * registry is locked at four codes: anything else MUST be a Tier-2 warning.
2373
2387
  * Consumers narrow on `err.code` to react to specific structural failures.
2374
2388
  *
2375
2389
  * @example
@@ -2480,7 +2494,7 @@ declare class X12ParseError extends Error {
2480
2494
  *
2481
2495
  * The pair `{ unescapeRelease, escapeRelease }` is bijective on inputs that
2482
2496
  * either contain no release-relevant characters OR are already a clean
2483
- * round-trip - this gives the Phase 2 lossless round-trip property: for any
2497
+ * round-trip - this gives the lossless round-trip property: for any
2484
2498
  * value `v` and delimiter set `d`, `unescapeRelease(escapeRelease(v, d), d)`
2485
2499
  * deep-equals `v`.
2486
2500
  */
@@ -2570,9 +2584,9 @@ declare function escapeRelease(value: string, delimiters: Delimiters): string;
2570
2584
  * Public type surface for the `defineLoopSpec()` API. A {@link LoopSpec}
2571
2585
  * is a declarative description of a TR3 loop (e.g. `Loop 2300` in 837P /
2572
2586
  * `Loop 2110` in 835): which segments belong to it, in what order, with
2573
- * what cardinality, and which child loops nest inside it. Phase 2 ships the
2574
- * API and types only - built-in transaction loop specs for the 12 v1
2575
- * transactions are authored through this same public API in Phases 3+
2587
+ * what cardinality, and which child loops nest inside it. This module ships
2588
+ * the API and types only - built-in transaction loop specs for the 12 v1
2589
+ * transactions are authored through this same public API
2576
2590
  * (the dogfooding gate locked in `documentation/repos/x12.md`).
2577
2591
  *
2578
2592
  * Naming convention: `id` is a human-readable loop identifier (`"2300"` for
@@ -2591,7 +2605,7 @@ declare function escapeRelease(value: string, delimiters: Delimiters): string;
2591
2605
  * - `required` - the segment/loop MUST appear at least once.
2592
2606
  * - `situational` - the segment/loop MAY appear when its situational rule
2593
2607
  * triggers; the parser does not enforce the rule itself but loop-walker
2594
- * warnings (Phase 3+) reference it.
2608
+ * warnings reference it.
2595
2609
  * - `optional` - the segment/loop MAY appear in any usage.
2596
2610
  *
2597
2611
  * @example
@@ -2604,8 +2618,8 @@ type LoopUsage = "required" | "situational" | "optional";
2604
2618
  /**
2605
2619
  * Repetition count for a segment or child loop inside its parent. `">1"`
2606
2620
  * means many (TR3 typically writes `>1` to mean "no cap"). A finite max
2607
- * surfaces as the numeric value. Phase 2 stores the value; Phase 3+'s
2608
- * loop walker uses it for over-limit warnings.
2621
+ * surfaces as the numeric value. This module stores the value; the loop
2622
+ * walker uses it for over-limit warnings.
2609
2623
  *
2610
2624
  * @example
2611
2625
  * ```ts
@@ -2618,7 +2632,7 @@ type LoopMax = number | ">1";
2618
2632
  /**
2619
2633
  * A segment slot inside a loop body. Carries the segment id, its TR3
2620
2634
  * usage + cardinality, and an optional position label (e.g. `"Loop 2300
2621
- * #2"`) used by Phase 3+ loop-walker diagnostics. Stored verbatim by
2635
+ * #2"`) used by loop-walker diagnostics. Stored verbatim by
2622
2636
  * `defineLoopSpec`; no validation beyond the structural shape so consumers
2623
2637
  * can author payer-specific segment specs without re-deriving each rule.
2624
2638
  *
@@ -2636,7 +2650,7 @@ interface LoopSegmentSpec {
2636
2650
  readonly description?: string;
2637
2651
  }
2638
2652
  /**
2639
- * A declarative loop description used by Phase 3+ transaction extractors
2653
+ * A declarative loop description used by the transaction extractors
2640
2654
  * and consumer-authored payer profiles alike. Frozen by `defineLoopSpec`
2641
2655
  * so a `LoopSpec` is safe to share across calls.
2642
2656
  *
@@ -2666,12 +2680,12 @@ interface LoopSpec {
2666
2680
  /**
2667
2681
  * Public `defineLoopSpec()` factory for the `@cosyte/x12` loop surface.
2668
2682
  * Returns a frozen {@link LoopSpec} after structural validation - no
2669
- * runtime walker (Phase 3+ owns walking). The DOGFOODING gate: every
2670
- * built-in transaction loop spec shipped in Phases 3+ is authored through
2683
+ * runtime walker (the transaction extractors own walking). The DOGFOODING
2684
+ * gate: every built-in transaction loop spec is authored through
2671
2685
  * this same public API consumers use for payer-specific loops, so a
2672
2686
  * regression in the public surface is impossible to hide.
2673
2687
  *
2674
- * Validation is strictly structural at this phase:
2688
+ * Validation is strictly structural:
2675
2689
  *
2676
2690
  * - `id` and `trigger` are non-empty strings.
2677
2691
  * - `trigger` segment id passes the same `[A-Z][A-Z0-9]{1,2}` shape used
@@ -2778,7 +2792,7 @@ declare function defineLoopSpec(input: DefineLoopSpecInput): LoopSpec;
2778
2792
  *
2779
2793
  * Snapshots are deliberately tiny in v0.0.x - pre-launch initial subsets
2780
2794
  * covering only the codes already exercised by the parser's Tier-1 + Tier-2
2781
- * fixtures. The Phase 10 `pnpm refresh:code-lists` script will regenerate
2795
+ * fixtures. The `pnpm refresh:code-lists` script will regenerate
2782
2796
  * the full WPC-published lists from canonical sources for the first real
2783
2797
  * release; until then `lookup(code)` returns `undefined` for codes outside
2784
2798
  * the subset and consumers receive the **verbatim** inbound code (the
@@ -2868,7 +2882,7 @@ interface CodeListSnapshot {
2868
2882
  * **Pre-launch initial subset.** This snapshot covers the ~30 most
2869
2883
  * commonly observed CARC codes - every value exercised by the Tier-1 /
2870
2884
  * Tier-2 fixtures plus the long-tail codes most cash-posting workflows
2871
- * branch on. The Phase 10 `pnpm refresh:code-lists` script regenerates
2885
+ * branch on. The `pnpm refresh:code-lists` script regenerates
2872
2886
  * the full WPC-published list from the canonical source for the first
2873
2887
  * real publish; until then a CARC absent from the snapshot still parses
2874
2888
  * fine (verbatim) - only its description is unavailable.
@@ -3014,9 +3028,9 @@ declare const lookupClaimStatus: (code: string) => CodeListEntry | undefined;
3014
3028
  *
3015
3029
  * **Initial bundled subset** covers the ~10 most common dispositions.
3016
3030
  * Codes outside the subset still parse (verbatim code preserved on the
3017
- * model); a `X12_UNKNOWN_CLP_STATUS` warning would be a Phase 5+ addition
3018
- * (not bundled at Phase 4 to keep the additions-only warning registry
3019
- * surgical - Phase 4 only adds the codes it actually uses).
3031
+ * model); a `X12_UNKNOWN_CLP_STATUS` warning would be a later addition
3032
+ * (not bundled here, to keep the additions-only warning registry surgical -
3033
+ * this table only carries the codes the readers actually use).
3020
3034
  */
3021
3035
 
3022
3036
  /**
@@ -3288,8 +3302,8 @@ declare const lookupRarc: (code: string) => CodeListEntry | undefined;
3288
3302
  * unknown qualifiers map to `"unknown"` and the verbatim code is still
3289
3303
  * preserved on the parsed diagnosis / procedure.
3290
3304
  *
3291
- * Snapshot date 2026-06-27. This is a curated read-only table - Phase 9
3292
- * (vendor profiles) may LAYER additional qualifiers per payer, but the
3305
+ * Snapshot date 2026-06-27. This is a curated read-only table - the profile
3306
+ * system may LAYER additional qualifiers per payer, but the
3293
3307
  * BASE mapping ships as a frozen artifact so a single CMS change isn't a
3294
3308
  * silent semantic drift.
3295
3309
  */
@@ -4752,7 +4766,7 @@ declare class Remit835BuildError extends Error {
4752
4766
  /**
4753
4767
  * 835 TR3 `005010X221A1` loop specification - authored through the
4754
4768
  * **public** {@link "../../loops/define.js".defineLoopSpec} API. This is
4755
- * the Phase 4 dogfooding gate: the built-in 835 loop hierarchy goes
4769
+ * the dogfooding gate: the built-in 835 loop hierarchy goes
4756
4770
  * through the SAME factory consumers use for payer-specific companion-
4757
4771
  * guide loops. A regression in `defineLoopSpec` cannot hide from the
4758
4772
  * built-in extractors.
@@ -4783,11 +4797,11 @@ declare class Remit835BuildError extends Error {
4783
4797
  * ```
4784
4798
  *
4785
4799
  * @remarks
4786
- * Phase 4 surfaces the loop spec as a frozen artifact (consumers can read
4800
+ * The loop spec is surfaced as a frozen artifact (consumers can read
4787
4801
  * it and assert it matches their companion-guide expectations); the
4788
4802
  * walker in `./get-835.ts` consults the spec to guide its state machine.
4789
- * Phase 9's profile system overlays vendor-specific quirks on top of
4790
- * this baseline.
4803
+ * The profile system overlays vendor-specific quirks on top of this
4804
+ * baseline.
4791
4805
  */
4792
4806
 
4793
4807
  /**
@@ -4822,7 +4836,7 @@ declare const REMIT_835_LOOP_2100: LoopSpec;
4822
4836
  *
4823
4837
  * Cited as Loop 2000 in TR3 X221A1; situational because some payers
4824
4838
  * (notably Medicare FFS) omit the LX header entirely and ship CLP loops
4825
- * directly under the transaction set header. The Phase 4 walker handles
4839
+ * directly under the transaction set header. The walker handles
4826
4840
  * both shapes - claims appear inside Loop 2000 if `LX` is present, at
4827
4841
  * top level otherwise.
4828
4842
  *
@@ -4893,8 +4907,7 @@ declare const REMIT_835_LOOP_1000B: LoopSpec;
4893
4907
  * (reduces BPR-02), negative PLB = credit to provider (increases
4894
4908
  * BPR-02). So subtraction is what makes the equation balance.
4895
4909
  *
4896
- * > Phase 4 implementation note: the cosyte roadmap (`operations/roadmaps/x12.md`
4897
- * > §4) sketched these invariants slightly differently - that sketch was a
4910
+ * > Implementation note: an early internal sketch of these invariants was a
4898
4911
  * > simplification. The implementation here matches the **X12 005010X221A1
4899
4912
  * > TR3 §1.10.2 spec text** directly; the roadmap is updated in the same
4900
4913
  * > slice with a forward-pointer to this module so the contract stays
@@ -5248,7 +5261,7 @@ interface X12ClaimDate {
5248
5261
  * inpatient only. CMS-mandated values: `Y` Yes, `N` No, `U` Insufficient
5249
5262
  * documentation, `W` Clinically undetermined, `1` Exempt from POA
5250
5263
  * reporting. Verbatim - the parser preserves the value, never validates
5251
- * against the spec list (Phase 9 profile may layer enforcement).
5264
+ * against the spec list (a profile may layer enforcement).
5252
5265
  *
5253
5266
  * @example
5254
5267
  * ```ts
@@ -5361,9 +5374,10 @@ interface X12ClaimMember {
5361
5374
  /**
5362
5375
  * Decoded Loop 2320 - Other Subscriber Information. Captures the SBR-01
5363
5376
  * payer responsibility code and the associated other-subscriber / other-
5364
- * payer NM1 entities; Phase 5 records the surface so a consumer knows
5377
+ * payer NM1 entities; this reader records the surface so a consumer knows
5365
5378
  * COB exists. Detailed CAS / OI / MOA breakdown inside Loop 2320 is
5366
- * deferred to Phase 9 (it tracks one payer's specific adjudication and
5379
+ * deferred to the profile system (it tracks one payer's specific
5380
+ * adjudication and
5367
5381
  * is rarely needed for outbound claim creation).
5368
5382
  *
5369
5383
  * @example
@@ -5673,12 +5687,12 @@ interface X12LineAdjudication {
5673
5687
  * (Institutional), `005010X224A2` (Dental); X12 005010 base spec for
5674
5688
  * envelope + cross-cutting segments (NM1, N3, N4, REF, PER, DTP, AMT).
5675
5689
  *
5676
- * Phase 5 known limitations (documented in CHANGELOG):
5690
+ * Known limitations (documented in CHANGELOG):
5677
5691
  * - **Loop 2320/2330 (Other Subscriber / Other Payer)** captured at the
5678
5692
  * surface level only: SBR-01 payer responsibility code and the
5679
5693
  * adjacent NM1*IL / NM1*PR entities. Detailed CAS / OI / MOA
5680
- * breakdown inside Loop 2320 is deferred to Phase 9 (companion-guide
5681
- * tolerance).
5694
+ * breakdown inside Loop 2320 is deferred to the profile system
5695
+ * (companion-guide tolerance).
5682
5696
  * - **Loop 2410 (Drug Identification, 837P)** captures LIN qualifier +
5683
5697
  * code and the optional CTP quantity + UCUM unit. REF inside 2410 is
5684
5698
  * preserved on tx.segments verbatim but not typed onto the model.
@@ -5688,8 +5702,8 @@ interface X12LineAdjudication {
5688
5702
  * - **CN1 contract information** preserved on tx.segments verbatim, not
5689
5703
  * typed onto the model.
5690
5704
  * - **Companion-guide enforcement** (e.g. Availity's required REF*EA at
5691
- * the billing provider) deferred to Phase 9 (profile system).
5692
- * - **Builder** (`build837P`/`I`/`D`) deferred to Phase 8.
5705
+ * the billing provider) deferred to the profile system.
5706
+ * - **Builder** (`build837P`/`I`/`D`) shipped separately.
5693
5707
  *
5694
5708
  * None of these are silent - verbatim segments remain on
5695
5709
  * `tx.segments` so a consumer can drop down to raw element access for
@@ -5722,7 +5736,7 @@ declare const HL_LEVEL_CODES: Readonly<{
5722
5736
  * Loop 2310x / 2420x line-provider verbatim bucket. Frozen for type
5723
5737
  * safety + IntelliSense - consumers should rarely need these (they're a
5724
5738
  * walker-internal vocabulary), but they're exported for tests + the
5725
- * Phase 8 builder API. @example NM1_QUALIFIERS.BILLING_PROVIDER → "85".
5739
+ * builder API. @example NM1_QUALIFIERS.BILLING_PROVIDER → "85".
5726
5740
  */
5727
5741
  declare const NM1_QUALIFIERS: Readonly<{
5728
5742
  readonly SUBMITTER: "41";
@@ -5976,7 +5990,7 @@ interface Build837ReferenceSpec {
5976
5990
  * Note: when used as a claim-level (2310x) or service-line (2420x) provider,
5977
5991
  * only the NM1 fields round-trip through `get837Claims`; an attached
5978
5992
  * `address` / `contacts` / `references` is emitted but the read side does
5979
- * not re-surface it on the provider (a documented Phase 5 read limitation).
5993
+ * not re-surface it on the provider (a documented read limitation).
5980
5994
  *
5981
5995
  * @example
5982
5996
  * ```ts
@@ -6758,8 +6772,8 @@ declare class Claim837BuildError extends Error {
6758
6772
 
6759
6773
  /**
6760
6774
  * 837 TR3 loop specifications - authored through the **public**
6761
- * {@link "../../loops/define.js".defineLoopSpec} API (the Phase 2
6762
- * dogfooding gate: the built-in 837 loop hierarchy goes through the SAME
6775
+ * {@link "../../loops/define.js".defineLoopSpec} API (the dogfooding
6776
+ * gate: the built-in 837 loop hierarchy goes through the SAME
6763
6777
  * factory consumers use for payer-specific companion-guide loops).
6764
6778
  *
6765
6779
  * Three variants share most of the structure; differences are concentrated
@@ -6796,10 +6810,10 @@ declare class Claim837BuildError extends Error {
6796
6810
  * SE
6797
6811
  * ```
6798
6812
  *
6799
- * Phase 5 surfaces the three loop specs as frozen artifacts (consumers can
6813
+ * The three loop specs are surfaced as frozen artifacts (consumers can
6800
6814
  * read them and assert they match their companion-guide expectations); the
6801
6815
  * walker in `./get-837.ts` consults them to guide its state machine.
6802
- * Phase 9's profile system overlays vendor-specific quirks on top.
6816
+ * The profile system overlays vendor-specific quirks on top.
6803
6817
  */
6804
6818
 
6805
6819
  /**
@@ -7318,7 +7332,7 @@ interface X12EligibilityAddress {
7318
7332
  * captured verbatim onto its enclosing subscriber / dependent so a
7319
7333
  * provider can re-associate the response with the 270 request it sent.
7320
7334
  *
7321
- * Phase 6 known limitations (documented in CHANGELOG):
7335
+ * Known limitations (documented in CHANGELOG):
7322
7336
  * - **AAA request-validation segments** (rejection reasons at the source /
7323
7337
  * receiver / subscriber level) are preserved on `tx.segments` verbatim
7324
7338
  * but not yet typed onto the model.
@@ -7929,7 +7943,7 @@ declare class Eligibility271BuildError extends Error {
7929
7943
  /**
7930
7944
  * 271 TR3 `005010X279A1` loop specification - authored through the
7931
7945
  * **public** {@link "../../loops/define.js".defineLoopSpec} API. This is
7932
- * the Phase 6 dogfooding gate: the built-in 271 loop hierarchy goes
7946
+ * the dogfooding gate: the built-in 271 loop hierarchy goes
7933
7947
  * through the SAME factory consumers use for payer-specific companion-
7934
7948
  * guide loops, so a regression in `defineLoopSpec` cannot hide from the
7935
7949
  * built-in extractor.
@@ -7954,7 +7968,7 @@ declare class Eligibility271BuildError extends Error {
7954
7968
  * ```
7955
7969
  *
7956
7970
  * @remarks
7957
- * Phase 6 surfaces the loop spec as a frozen artifact (consumers can read
7971
+ * The loop spec is surfaced as a frozen artifact (consumers can read
7958
7972
  * it and assert it matches their companion-guide expectations); the walker
7959
7973
  * in `./get-271.ts` consults the HL level codes to guide its state
7960
7974
  * machine. Loop 2110C and 2110D share the identical EB-anchored shape - a
@@ -8328,7 +8342,7 @@ interface X12ServiceLineStatus {
8328
8342
  * verbatim value and emit `X12_UNKNOWN_CLAIM_STATUS_CATEGORY` /
8329
8343
  * `X12_UNKNOWN_CLAIM_STATUS`.
8330
8344
  *
8331
- * Phase 6 known limitations (documented in CHANGELOG):
8345
+ * Known limitations (documented in CHANGELOG):
8332
8346
  * - **QTY / AMT** claim-summary segments (claim count / amount roll-ups in
8333
8347
  * a 277CA Loop 2200) are preserved on `tx.segments` verbatim but not yet
8334
8348
  * typed onto the model.
@@ -9028,8 +9042,8 @@ declare class ClaimStatus277BuildError extends Error {
9028
9042
 
9029
9043
  /**
9030
9044
  * 277 / 277CA loop specification - authored through the **public**
9031
- * {@link "../../loops/define.js".defineLoopSpec} API (the Phase 6
9032
- * dogfooding gate). The 277 Claim Status Response (`005010X212`) and the
9045
+ * {@link "../../loops/define.js".defineLoopSpec} API (the dogfooding
9046
+ * gate). The 277 Claim Status Response (`005010X212`) and the
9033
9047
  * 277CA Claim Acknowledgment (`005010X214`) share the same HL spine
9034
9048
  * (`20` Information Source → `21` Information Receiver → `19` Service
9035
9049
  * Provider → `22` Subscriber → `23` Dependent) and the same STC-anchored
@@ -10411,7 +10425,7 @@ interface X12EnrollmentAmount {
10411
10425
  * `tx.segments` up front. The memory win is on the RESULT side - a consumer
10412
10426
  * processing a hundreds-of-MB 834 holds one decoded member at a time, not
10413
10427
  * the whole decoded roster. A true file→iterator streaming parser is a v2
10414
- * item (see roadmap Phase 2 streaming invariant).
10428
+ * item.
10415
10429
  *
10416
10430
  * Spec source: WPC TR3 `005010X220A1`.
10417
10431
  */
@@ -11348,7 +11362,7 @@ interface X12AuthDate {
11348
11362
  * {@link "../shared/hl.js".validateHl}; the `EV` / `SS` event + service
11349
11363
  * levels are intentionally tolerant (omitted from the expected-parent map).
11350
11364
  *
11351
- * Phase 7 known limitations (documented in CHANGELOG):
11365
+ * Known limitations (documented in CHANGELOG):
11352
11366
  * - **Detailed 2010E provider sub-loops** (rendering / attending / operating
11353
11367
  * provider address + secondary IDs) are captured as bare NM1 entities on
11354
11368
  * {@link X12ServiceReview.providers}, not split by role.
@@ -11993,7 +12007,7 @@ declare class ServicesReview278BuildError extends Error {
11993
12007
  /**
11994
12008
  * 278 TR3 `005010X217` (request) / `005010X216` (response) loop
11995
12009
  * specification - authored through the **public** {@link
11996
- * "../../loops/define.js".defineLoopSpec} API (the Phase 7 dogfooding gate).
12010
+ * "../../loops/define.js".defineLoopSpec} API (the dogfooding gate).
11997
12011
  * The built-in 278 HL hierarchy goes through the SAME factory consumers use
11998
12012
  * for payer-specific companion-guide loops.
11999
12013
  *
@@ -12026,7 +12040,7 @@ declare class ServicesReview278BuildError extends Error {
12026
12040
  * warnings. Detailed sub-loops (PWK attachments, the full 2010E provider
12027
12041
  * family, HSD service-delivery, SV1/SV2/SV3 line detail) are preserved
12028
12042
  * verbatim on `tx.segments` but not yet destructured onto the model - a
12029
- * documented Phase 7 limitation.
12043
+ * documented limitation.
12030
12044
  */
12031
12045
 
12032
12046
  /**
@@ -12399,7 +12413,7 @@ type Ta1AckCode = (typeof TA1_ACK_CODES)[keyof typeof TA1_ACK_CODES];
12399
12413
  * are defined by the standard; values past `028` exist in some standard
12400
12414
  * revisions and are accepted on parse (Postel's Law) but not enumerated
12401
12415
  * here - the parsed model carries the un-narrowed string on `noteCodeRaw`,
12402
- * post-`?`-unescape as of `X12-TA1-RESIDUALS`. **A clause here said "verbatim"
12416
+ * post-`?`-unescape as of a later release. **A clause here said "verbatim"
12403
12417
  * and is deleted rather than reworded**; `raw.elements[5]` is the byte surface.
12404
12418
  *
12405
12419
  * `000` is the canonical "no error" note paired with a `TA1-04 == 'A'`
@@ -12480,14 +12494,14 @@ declare const TA1_NOTE_CODES: {
12480
12494
  * `028` (some revisions extend the list); `parseTA1` exposes the
12481
12495
  * un-narrowed string on `noteCodeRaw` in that case, so the value survives
12482
12496
  * even when the union cannot statically type it. **It is post-`?`-unescape
12483
- * as of `X12-TA1-RESIDUALS`, and a clause here calling it VERBATIM is
12497
+ * as of a later release, and a clause here calling it VERBATIM is
12484
12498
  * deleted rather than reworded** - `raw.elements[5]` is the byte surface.
12485
12499
  */
12486
12500
  type Ta1NoteCode = (typeof TA1_NOTE_CODES)[keyof typeof TA1_NOTE_CODES];
12487
12501
 
12488
12502
  /**
12489
12503
  * Typed-model surface for the X12 acknowledgment transactions surfaced
12490
- * by Phase 3 - `005010X231A1` 999 (Implementation Acknowledgment) and the
12504
+ * by this package - `005010X231A1` 999 (Implementation Acknowledgment) and the
12491
12505
  * envelope-level TA1 (Interchange Acknowledgment).
12492
12506
  *
12493
12507
  * Two kinds of types live here:
@@ -12624,7 +12638,7 @@ interface X12Ack999Ik4 {
12624
12638
  * One IK4 element-level error wrapped with its (optional) IK3-paired CTX
12625
12639
  * context strings - surfaced verbatim because CTX uses a composite syntax
12626
12640
  * the X231A1 implementer typically writes as `ELEMENT*NM1*8*1`. The
12627
- * library does not try to over-decompose the CTX value at this phase.
12641
+ * library does not try to over-decompose the CTX value.
12628
12642
  */
12629
12643
  interface X12Ack999ElementNote {
12630
12644
  readonly ik4: X12Ack999Ik4;
@@ -12706,7 +12720,7 @@ interface X12Ack999 {
12706
12720
  * ({@link Ta1NoteCode}); `noteCodeRaw` carries the un-narrowed string
12707
12721
  * alongside so unknown extensions survive. **A clause here said that
12708
12722
  * string is preserved VERBATIM and is deleted, not reworded:**
12709
- * `X12-TA1-RESIDUALS` made it post-unescape, and `raw.elements[5]` is
12723
+ * a later release made it post-unescape, and `raw.elements[5]` is
12710
12724
  * the verbatim surface.
12711
12725
  * - `noteCodeRaw` - the un-narrowed TA1-05 string. Equal to `noteCode` when
12712
12726
  * the value is a known I18 code; equal to the decoded inbound text when
@@ -12715,7 +12729,7 @@ interface X12Ack999 {
12715
12729
  * byte-exact round-trip.
12716
12730
  *
12717
12731
  * **The five decoded fields are POST-`?`-unescape; `raw` is the verbatim
12718
- * byte surface and is not.** `X12-TA1-RESIDUALS` moved the decoded half:
12732
+ * byte surface and is not.** A later release moved the decoded half:
12719
12733
  * before it, a released TA1-01 read back carrying its `?` and matched no
12720
12734
  * ISA-13, while every dot-path read of the same element already unescaped.
12721
12735
  * Read `raw.elements` when you want the bytes.
@@ -12893,7 +12907,7 @@ declare function parse999(raw: string | Buffer, options?: X12ParseOptions): X12A
12893
12907
  * TA1 is NOT a transaction set: per the ASC X12 standard it lives at the
12894
12908
  * envelope level, between ISA and the first GS (or alone inside an
12895
12909
  * ISA..IEA with no GS at all - the "TA1-only interchange" pattern). The
12896
- * Phase 3 envelope walker captures every envelope-level TA1 verbatim onto
12910
+ * envelope walker captures every envelope-level TA1 verbatim onto
12897
12911
  * {@link X12Interchange.ta1Segments}; this function decodes the first
12898
12912
  * one. Multiple TA1 acks for prior interchanges may co-exist on a single
12899
12913
  * inbound - pass `index` to read the Nth, or scan `ta1Segments` directly.
@@ -12979,7 +12993,7 @@ declare function build999(spec: Build999Spec): X12Interchange;
12979
12993
  * safety invariant as `build999`.
12980
12994
  *
12981
12995
  * Returns the typed {@link Ta1Segment} (matching the envelope-level shape
12982
- * the Phase 3 envelope walker surfaces on
12996
+ * the envelope walker surfaces on
12983
12997
  * {@link "../../parser/types.js".X12Interchange.ta1Segments}). Callers that
12984
12998
  * want a complete on-the-wire byte stream concatenate `raw` + a segment
12985
12999
  * terminator, or wrap the segment inside their preferred envelope. The
@@ -13002,7 +13016,7 @@ declare function build999(spec: Build999Spec): X12Interchange;
13002
13016
  * sender never resubmits against.
13003
13017
  *
13004
13018
  * The grounding is inside the package, not in a spec clause, which is the
13005
- * same tiebreak `X12-ENVELOPE-SPLITTER-NOT-RELEASE-AWARE` recorded: one
13019
+ * same tiebreak the envelope splitter fix recorded: one
13006
13020
  * function disagreed with itself. This module emitted bytes that this
13007
13021
  * package's own reader decoded into a different disposition than the one
13008
13022
  * the caller asked for, and every other builder already released the same
@@ -13042,7 +13056,7 @@ declare function build999(spec: Build999Spec): X12Interchange;
13042
13056
  * through it.** No total is published: that is what was measured, not a
13043
13057
  * closed account.
13044
13058
  * **🩺 A CLAUSE NAMING `parseTA1`'s FIELDS AS A THIRD SUCH SURFACE STOOD
13045
- * HERE AND IS DELETED, NOT REWORDED.** `X12-TA1-RESIDUALS` made those
13059
+ * HERE AND IS DELETED, NOT REWORDED.** A later release made those
13046
13060
  * fields post-unescape, so it is measured false; do not restate it.
13047
13061
  * - **A caller who was pre-releasing the value themselves** (the remedy
13048
13062
  * `KNOWN-LIMITATIONS.md` named while this was open) is now escaping
@@ -13054,14 +13068,14 @@ declare function build999(spec: Build999Spec): X12Interchange;
13054
13068
  * **And an EMPTY control number USED to go out unrefused.** `escapeRelease`
13055
13069
  * early-returns on `""` and this module had no required-field guard, so
13056
13070
  * `interchangeControlNumber: ""` emitted `TA1**260601*1200*A*000` with no
13057
- * error, through `0.0.15`. `X12-EMPTY-CONTROL-NUMBER-FABRICATED` closed it:
13071
+ * error, through `0.0.15`. A later release closed it:
13058
13072
  * see {@link "../../builder/caller-control-number.js".requireControlNumber}.
13059
- * `X12-CONTROL-NUMBER-GUARD-NOT-TYPE-CHECKED` then made the same guard
13073
+ * A later one still then made the same guard
13060
13074
  * type-check, so TA1-01 draws a refusal naming TA1-01 rather than the escaper's
13061
13075
  * one naming only the builder - same class, same code, different words. The
13062
13076
  * guard is still byte-strict, so a whitespace-only TA1-01 still builds.
13063
13077
  *
13064
- * **The other four slots were left open by that slice and `X12-TA1-RESIDUALS`
13078
+ * **The other four slots were left open by that change and a later one
13065
13079
  * closes them.** TA1-01's guard was the only required-field guard this module
13066
13080
  * had, so `interchangeDate`, `interchangeTime`, `ackCode` and `noteCode` each
13067
13081
  * emitted an absent element on `""` with `warnings: []`. **TA1-05's cell has to
@@ -13313,7 +13327,7 @@ declare function serializeX12(interchange: X12Interchange, opts?: SerializeOptio
13313
13327
  * counts), so the caller never hand-counts a segment total or a group total.
13314
13328
  *
13315
13329
  * The domain-specific builders (`build835`, `build837P`, …) sit ON TOP of
13316
- * this primitive in a later phase: each maps its typed domain model down to
13330
+ * this primitive: each maps its typed domain model down to
13317
13331
  * {@link TransactionSetSpec} segment arrays and delegates the envelope to
13318
13332
  * `buildInterchange`. This file is the shared floor they all stand on.
13319
13333
  */
@@ -13495,9 +13509,9 @@ declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
13495
13509
  *
13496
13510
  * ## The names say `BUILD_REFUSAL_*` and the scope is wider than that
13497
13511
  *
13498
- * The two exported constants were introduced by `X12-BUILDER-BOUNDS`, which
13499
- * bounded the `build*` sites only, and they are published under those names.
13500
- * `X12-CALLER-VALUE-RESIDUALS` then routed `src/profiles/validate.ts` through
13512
+ * The two exported constants were introduced by a change that bounded the
13513
+ * `build*` sites only, and they are published under those names. A later one
13514
+ * then routed `src/profiles/validate.ts` through
13501
13515
  * the same renderers, so `X12ProfileError` is bounded by the same numbers.
13502
13516
  * **The names were deliberately NOT changed**: one ceiling under one name
13503
13517
  * cannot drift, whereas a second name for the same number is exactly how two
@@ -13552,7 +13566,7 @@ declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
13552
13566
  * newline. A refusal message is therefore bounded but not guaranteed to be a
13553
13567
  * single log line. Escaping was considered and left out: it would expand the
13554
13568
  * rendered length by up to 6x per character for a hazard the caller creates
13555
- * in their own data, and this slice makes the claim it can support and no
13569
+ * in their own data, and this bound makes the claim it can support and no
13556
13570
  * wider.
13557
13571
  *
13558
13572
  * @see `src/parser/errors.ts` for the parse-side `SNIPPET_MAX_INPUT` bound this
@@ -13823,7 +13837,7 @@ interface X12WarningPartition {
13823
13837
  declare function partitionWarnings(warnings: readonly X12ParseWarning[], profile: X12Profile): X12WarningPartition;
13824
13838
 
13825
13839
  /**
13826
- * Error taxonomy for the `@cosyte/x12` profile subsystem (Phase 9).
13840
+ * Error taxonomy for the `@cosyte/x12` profile subsystem.
13827
13841
  *
13828
13842
  * `X12ProfileError` is thrown by `defineProfile()` when a profile definition
13829
13843
  * is structurally invalid - a bad/missing name, an unknown option key, or a
@@ -13912,7 +13926,7 @@ declare const availity: X12Profile;
13912
13926
  declare const bcbsCommon: X12Profile;
13913
13927
 
13914
13928
  /**
13915
- * Public barrel for the `@cosyte/x12` profile subsystem (Phase 9). Assembles
13929
+ * Public barrel for the `@cosyte/x12` profile subsystem. Assembles
13916
13930
  * the `profiles` namespace object and re-exports the public profile API:
13917
13931
  * `defineProfile`, `setDefaultProfile`, `getDefaultProfile`,
13918
13932
  * `partitionWarnings`, the `X12ProfileError` class, and the supporting types.
@@ -13947,15 +13961,15 @@ declare const profiles: {
13947
13961
  };
13948
13962
 
13949
13963
  /**
13950
- * Public entry point for the `@cosyte/x12` package. Phase 1 lands the
13951
- * envelope decoder (ISA / GS / GE / IEA + delimiter detection); Phase 2+
13952
- * adds segment/element/composite decode, the warning-code registry
13953
- * expansion, and the public `defineLoopSpec`. Per-transaction helpers
13954
- * (`get835`, `get837Claims`, ...) arrive in Phases 4+.
13964
+ * Public entry point for the `@cosyte/x12` package. It lands the envelope
13965
+ * decoder (ISA / GS / GE / IEA + delimiter detection), segment/element/
13966
+ * composite decode, the warning-code registry, and the public
13967
+ * `defineLoopSpec`. Per-transaction helpers
13968
+ * (`get835`, `get837Claims`, ...) sit on top of it.
13955
13969
  */
13956
13970
  /**
13957
- * Library version string, synced with `package.json#version` at build
13958
- * time by downstream phases. Exported now so consumers (and the
13971
+ * Library version string, synced with `package.json#version` by the
13972
+ * release's version step. Exported now so consumers (and the
13959
13973
  * type-check pipeline) have at least one symbol to resolve through the
13960
13974
  * `exports` map.
13961
13975
  *