OptionaldefaultValues: unknownOptionalinitialState: unknownOptionalrecord: RuntimeRecordOptionalsource: {OptionalcapturePresent only for the current opted-in root leg. Never inherited by a subflow runtime.
OptionalcaptureOptionalreadOptionalredactedParallel redacted mirror of globalStore. Populated by every commit that
staged a write (memory/recordCommit.ts · recordCommit), with the already-computed redacted patches.
Only exists when the run's policy keeps a mirror (RunPolicy.mirror —
FlowChartExecutor sets it when a RedactionPolicy is configured).
Otherwise undefined and zero cost.
Read via getSnapshot({ redact: true }).
Tell the sink this runtime's log ended. Nothing happens without a sink; never throws.
Optionalmeta: Readonly<Record<string, unknown>>Return the runtime snapshot.
Optionaloptions: { redact?: boolean }
Optionalredact?: booleanWhen true, returns sharedState from the
parallel redacted mirror (if one was enabled). This is the safe view
for sharing traces externally — paste into a viewer, ship to support,
etc. When the mirror was never enabled, falls back to raw globalStore.
Default false preserves the runtime view — necessary for pause /
resume (resumption must replay against the real values, not
'[REDACTED]').
Other fields (executionTree, commitLog) are the same either way —
the commit log is already redacted at write-time, and the execution
tree only carries structural metadata.
initialState (the fold base) is OMITTED under redact: true. It is the
run's raw pre-run seed — initialContext merged with
defaultValuesForContext — and it never passed through a redaction
policy: the policy scrubs WRITES at the scope facade, and the base was
never written by a stage. Serving it on the redacted surface would hand
back the original value of a seeded secret that a later commit had
scrubbed. A consumer folding without it gets basis: 'log-only' from
stateAt, which is the honest signal that the base did not travel with
this log — a partial answer that says it is partial, never a silent one.
Returns Omit<RuntimeSnapshot, 'runId' | 'correlation'>: the runtime is the memory
container and doesn't know which run it serves — runId is per-run
executor state, stamped by FlowchartTraverser.getSnapshot() (which
owns the run's id and already stamps it on every event). Subflows'
nested runtimes deliberately have NO runId of their own (a subflow is
part of the parent's logical run). correlation is the traverser's for
the same reason.
A fresh root frame for this runtime — globalStore, executionHistory,
the run's policy and (when kept) the mirror. Also how SubflowExecutor
replaces a subflow's seed frame with the frame its first stage runs on.
Note something beside this runtime's log, in its sink (a resumed leg). Nothing without a sink; never throws.
Preserve the current rootStageContext for snapshots before changing it for resume.
Where a mount's log writes (10.1, P6): the same sink, at this log's address plus the mount's runtimeStageId
(drillPath: [...parent, mount], the address law RuntimeSnapshot.logAddress states). Absent when this log
writes to no sink — a mount of a plain log is plain too.
Optionalmeta: Readonly<Record<string, unknown>>A reused log cannot be retrofitted or relabelled as the new leg's base.
Install the run's policy on the CURRENT root frame — a same-executor
resume, whose continuation root (leaf.createNext) is advanced before
the executor builds this leg's policy (a fresh rule per leg). Every
descendant takes the reference from there.
The run's policy (
runPolicy.ts, F5) — the four dials, the redaction rule, the mirror flag. Installed on the root frame here, so the FIRST commit (a subflow's seed,history[0]) already runs under it; every frame after inherits the same reference. Default: every dial at its default, no rule, no mirror.