ReadonlyidStable identifier — used by the dispatcher to scope error
messages and to support detach(id) lookup.
Convention (matches FlowRecorder.id from CLAUDE.md):
'lens-structure',
'agentfootprint-composition', 'trace-explainable')detach(id) removes EVERY recorder with that id — be
intentional about reuse if you rely on selective detachChoose a stable id at module load and don't randomise it across
runs — it lands in StructureBuildError.recorderId so debug
output is greppable.
OptionalonOptionalonOptionalonOptionalonOptionalonNames that landed on a stage after its onStageAdded (the .tag() door).
Optionalon
Pluggable observer for BUILD-TIME chart construction events.
All methods are optional — implement only the hooks you need. Handlers fire SYNCHRONOUSLY during builder operations and
.build(). A throwing handler is caught (see "Error isolation" in the file header); subsequent dispatch continues.Lifecycle: each
StructureRecorderinstance is registered via EITHER theflowChart()options bag ({ structureRecorders: [rec] }) OR the fluent.attachStructureRecorder(rec)chain — see the file header for the trade-offs. Registration after.build()is rejected (chart is sealed).