footprintjs - v11.2.0
    Preparing search index...

    Module footprintjs/advanced

    Engine internals. Use them to extend the engine, not to write a chart.

    This door holds scopes, traversal, frame policy, redaction and contracts. To write a chart, start at the main door, footprintjs.

    ArrayMergeMode

    Controls how array values from outputMapper are merged into parent scope.

    ChildrenExecutor
    ContinuationResolver
    DeciderHandler
    DeciderList

    Fluent helper returned by addDeciderFunction to add branches. end() sets deciderFn = true — the fn IS the decider.

    DiagnosticCollector
    ExecutionRuntime
    FlowchartTraverser
    NodeResolver
    NullControlFlowNarrativeGenerator
    RedactionRule
    ResumeEntry
    RuntimeStructureManager
    ScopeFacade
    SelectorFnList
    SelectorHandler
    StageContext
    StageRunner
    SubflowExecutor
    CombinedNarrativeOptions
    DebugEntry
    DebugRecorderOptions
    EvidenceRule

    What one decide() / select() asks the run's rule, answered live as data (RedactionRule.evidenceRule), so decide/ and filter/ hold neither a rule nor a frame.

    FilterCondition
    FlowChartOptions

    Options-bag argument shape for the flowChart() factory.

    FlowChartSpec
    FlowMessage

    A single flow control narrative entry.

    HandlerDeps

    HandlerDeps — Dependency injection bag passed to all handler modules.

    IControlFlowNarrative
    IExecutionRuntime

    IExecutionRuntime — Interface for the runtime environment.

    ILogger

    Minimal logging contract. Mirrors Console API subset.

    ProviderResolver

    Resolver that can turn an arbitrary input into a ScopeProvider

    QueuedPause

    A parallel sibling's pause, queued at the level of its fan-out: raised again there once the resumed child's chain ends (see raiseQueuedPause).

    ReactiveOptions
    ReactiveTarget
    RecorderContext
    ResumeHop

    One subflow boundary on the way back to a paused stage.

    RunPolicy

    The run's policy: every dial resolved, plus the redaction rule and the mirror flag. Frozen.

    RuntimeStructureMetadata
    ScopeProvider

    Strategy object that creates a scope

    ScopeRuntime
    ScopeRuntimeTarget

    Engine-facing capabilities. Never use a strict user-field proxy as this port.

    SerializedPipelineNode
    SerializedPipelineStructure
    ServedThreshold

    What a condition row keeps of its threshold: the value to store, and whether that value is a hole.

    StageContextLike

    Minimal surface from StageContext (patch-based)

    StageSources

    Where a stage's own code may have copied a value from, as data. The rule cannot see what a string or a threshold was built from, so it asks these instead: the taint law (RedactionRule.retainStageText, RedactionRule.serveThreshold).

    SubflowMountOptions
    SubflowRef
    SubflowResult
    TraverserOptions
    BranchResult
    BranchResults
    DebugVerbosity
    Decider

    Picks exactly ONE child by ID. Conditional branch (if/switch).

    EngineSerializedPipelineStructure

    Alias for SerializedPipelineNode used as full structure

    ExecOptions
    ExecuteNodeFn

    Recursive node execution — avoids circular dep with FlowchartTraverser.

    FlowControlType

    Types of control flow decisions captured by the execution engine.

    NodeResultType
    RedactionVerdict

    What the policy says about the value at one user-level path.

    ResolveOptions

    Options bag passed to resolve()

    RunStageFn

    Run a stage function. Bound to FlowchartTraverser.executeStage, which is also where a stage's declarative retry policy is honoured — so a handler that passes traversalContext gets retry evidence stamped with the right stage automatically. The parameter is optional purely for compatibility with hand-written callers; the engine's own handlers always pass it.

    ScopeProtectionMode

    Scope Protection Types

    SimplifiedParallelSpec
    StageFn

    Relaxed-generic alias for builder ergonomics.

    StageNode
    StageSnapshot

    Serialisable representation of a stage's state (for debugging / visualisation).

    StreamCallback

    Callback that receives tokens during streaming.

    StreamLifecycleHandler
    StreamTokenHandler
    StrictMode

    Optional strictness for schema-backed providers

    TraversalResult
    DEFAULT_MAX_ITERATIONS
    DEFAULT_RUN_POLICY

    Every default, no rule, no mirror — what a bare frame (a unit test's new StageContext) runs under.

    SCOPE_METHOD_NAMES
    applyOutputMapping

    Apply output mapping after subflow completion. Writes mapped values back to parent scope using merge semantics: arrays are appended, objects are shallow-merged, scalars are replaced.

    attachScopeMethods

    Attach standard scope conveniences to an object backed by a real stage context.

    buildNestedPatch

    Converts a path segment array + leaf value into a nested partial object.

    computeNodeType

    Compute the node type from node properties. Used by RuntimeStructureManager for serialization.

    createArrayProxy

    Creates a Proxy over an array that intercepts mutating operations.

    createErrorMessage
    createProtectedScope
    createSubflowHandlerDeps

    Create a new HandlerDeps for subflow execution. Key: sets readOnlyContext to mapped input so StageRunner passes it to ScopeFactory.

    createTypedScopeFactory

    Creates a ScopeFactory that produces TypedScope instances.

    evaluateFilter

    Evaluates a Prisma-style filter against scope values.

    extractParentScopeValues

    Extract values from parent scope using inputMapper.

    getInitialScopeValues

    Get the initial scope values for a subflow. Always isolated — only inputMapper values are included.

    isHandle

    Is value a handle the scope handed out?

    isStageNodeReturn

    Detects if a stage output is a StageNode for dynamic continuation.

    isSubclassOfScopeFacade

    True iff ctor is a class that extends ScopeFacade (checks prototype chain)

    joinPath

    Joins path segments into a dot-notation string for recorder events.

    looksLikeClassCtor

    Heuristic: class constructor vs. plain function

    looksLikeFactory

    Heuristic: factory function (a function that is NOT a class ctor)

    makeClassProvider

    Wrap a class constructor as a ScopeProvider

    makeFactoryProvider

    Wrap an existing factory function as a ScopeProvider

    normalizeSchema
    registerScopeResolver
    registerScopeRuntime

    Register a custom scope's engine-facing port and return the SAME scope. Registration never reads, writes or enumerates properties on scope. Re-registering explicitly replaces its binding. The descriptor is copied and frozen; the target itself remains live and belongs to its provider. Replacing capabilities never retargets an already captured native producer.

    resolveScopeProvider
    runPolicy

    Build a run's policy: absent dials take their default; the result is frozen.

    seedSubflowGlobalStore

    Seed the subflow's GlobalStore with initial values. Called before subflow execution to make inputMapper values available.

    shouldWrapWithProxy

    Returns true if the value should be wrapped in a deep Proxy.

    specToStageNode
    toScopeFactory

    Normalize a factory/class/schema-like input into a ScopeFactory the pipeline expects

    unwrapHandles

    value with every handle inside it replaced by the value behind it.

    valueBehind

    The live value behind a handle; value itself when it is not one. O(1).

    zodToJsonSchema

    Convert a Zod schema object to JSON Schema.

    AggregatedMetrics → AggregatedMetrics
    CombinedNarrativeEntry → CombinedNarrativeEntry
    ReadSummaryMarker → ReadSummaryMarker
    ReadTrackingMode → ReadTrackingMode
    RetentionPolicy → RetentionPolicy
    RuntimeSnapshot → RuntimeSnapshot
    ScopeFactory → ScopeFactory
    StageEvent → StageEvent
    StageFunction → StageHandler
    StageMetrics → StageMetrics
    WriteSummaryMarker → WriteSummaryMarker
    WriteTrackingMode → WriteTrackingMode