footprintjs - v11.2.0
    Preparing search index...

    Class ExecutionRuntime

    Index
    • Parameters

      • rootName: string
      • rootId: string
      • OptionaldefaultValues: unknown
      • OptionalinitialState: unknown
      • policy: RunPolicy = DEFAULT_RUN_POLICY

        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.

      • Optionalrecord: RuntimeRecord
      • Optionalsource: {
            address?: LogAddress;
            historyOmitted?: boolean;
            runId: string;
            unavailable?:
                | "custom-scope"
                | "source-history-not-included"
                | "identity-unavailable"
                | "privacy-active"
                | "untracked-read"
                | "child-source-ownership"
                | "source-address-unsupported"
                | "resumed-source-ownership"
                | "sink-source-unsupported"
                | "source-capture-failed"
                | "redacted-source-export";
        }

      Returns ExecutionRuntime

    capture?: NativeCapture

    Present only for the current opted-in root leg. Never inherited by a subflow runtime.

    captureExtent?: NativeExtent
    executionHistory: EventLog
    globalStore: SharedMemory
    readSources?: EngineReadSourceCapture
    redactedStore?: SharedMemory

    Parallel 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 }).

    rootStageContext: StageContext
    • Parameters

      • runId: string
      • extent: boolean = false

      Returns NativeCapture

    • Tell the sink this runtime's log ended. Nothing happens without a sink; never throws.

      Parameters

      • outcome: LogOutcome
      • Optionalmeta: Readonly<Record<string, unknown>>

      Returns void

    • Return the runtime snapshot.

      Parameters

      • Optionaloptions: { redact?: boolean }
        • Optionalredact?: boolean

          When 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.

      Returns Omit<RuntimeSnapshot, "runId" | "correlation">

    • 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.

      Parameters

      • name: string
      • id: string

      Returns StageContext

    • Note something beside this runtime's log, in its sink (a resumed leg). Nothing without a sink; never throws.

      Parameters

      • kind: string
      • data: Meta

      Returns void

    • Preserve the current rootStageContext for snapshots before changing it for resume.

      Returns void

    • 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.

      Parameters

      • mountRuntimeStageId: string
      • Optionalmeta: Readonly<Record<string, unknown>>

      Returns RuntimeRecord | undefined

    • A reused log cannot be retrofitted or relabelled as the new leg's base.

      Parameters

      • runId: string

      Returns void

    • Parameters

      • path: string[]
      • key: string
      • value: unknown

      Returns void

    • 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.

      Parameters

      Returns void