Record an M600 color-change boundary (DD-009 D2, #147). Position is absolute; rebased like retractions.
Register an object; returns its 1-based index for use in SegmentInput.object.
Record a retraction/unretraction event (DD-009 D1, #148). Position is absolute; the IR stores it origin-relative. Rebased in ToolpathIRBuilder.finalize, so an event recorded before the first segment (which fixes the floating origin) lands in the same frame as the segments.
Accumulates segments and produces a canonical ToolpathIR.
The builder accumulates into plain number arrays and converts to typed arrays in ToolpathIRBuilder.finalize. The canonical IR it returns is already the compact, transferable typed-array contract from DD-001; E2 (the worker parser) will additionally write directly into growable typed buffers to avoid the intermediate arrays.