footprintjs - v11.2.0
    Preparing search index...

    Interface IExecutionRuntime

    IExecutionRuntime — Interface for the runtime environment.

    Defines the contract that engine handlers need from the runner layer, avoiding circular imports between engine/ and runner/.

    interface IExecutionRuntime {
        executionHistory: { address?: LogAddress; list(): unknown[] };
        globalStore: { getState(): Record<string, unknown> };
        redactedStore?: SharedMemory;
        rootStageContext: StageContext;
        closeRecord?(
            outcome: LogOutcome,
            meta?: Readonly<Record<string, unknown>>,
        ): void;
        getPipelines(): string[];
        getSnapshot(
            options?: { redact?: boolean },
        ): {
            commitLog: unknown[];
            executionTree: unknown;
            initialState?: Record<string, unknown>;
            logAddress?: LogAddress;
            readSources?: EngineReadSources;
            recorders?: { data: unknown; id: string; name: string }[];
            sharedState: Record<string, unknown>;
            subflowResults?: Record<string, unknown>;
        };
        newRoot(name: string, id: string): StageContext;
        recordFor?(
            mountRuntimeStageId: string,
            meta?: Readonly<Record<string, unknown>>,
        ): unknown;
        setRootObject(path: string[], key: string, value: unknown): void;
    }
    Index
    executionHistory: { address?: LogAddress; list(): unknown[] }
    globalStore: { getState(): Record<string, unknown> }
    redactedStore?: SharedMemory

    The redacted mirror of globalStore — present when the run's policy keeps one (RunPolicy.mirror: a run with a redaction policy), else absent. SubflowExecutor reads it to serve a subflow's state (9.20.0).

    rootStageContext: StageContext
    • Tell the sink this runtime's log ended (10.1, P6) — a mount's at its exit. No-op without a sink.

      Parameters

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

      Returns void

    • Parameters

      • Optionaloptions: { redact?: boolean }

      Returns {
          commitLog: unknown[];
          executionTree: unknown;
          initialState?: Record<string, unknown>;
          logAddress?: LogAddress;
          readSources?: EngineReadSources;
          recorders?: { data: unknown; id: string; name: string }[];
          sharedState: Record<string, unknown>;
          subflowResults?: Record<string, unknown>;
      }

      • commitLog: unknown[]
      • executionTree: unknown
      • OptionalinitialState?: Record<string, unknown>

        The commit log's fold base — see RuntimeSnapshot.initialState.

      • Optional ReadonlylogAddress?: LogAddress
      • Optional ReadonlyreadSources?: EngineReadSources
      • Optionalrecorders?: { data: unknown; id: string; name: string }[]
      • sharedState: Record<string, unknown>
      • OptionalsubflowResults?: Record<string, unknown>

        Dual-keyed by subflow path (last iteration) AND per-execution mount runtimeStageId (each iteration) — see RuntimeSnapshot.subflowResults / subflow-commit-visibility.

    • A fresh root frame on this runtime — its store, its log, the run's policy and mirror (ExecutionRuntime.newRoot). SubflowExecutor swaps a subflow's seed frame for the frame its first stage runs on with it.

      Parameters

      • name: string
      • id: string

      Returns StageContext

    • Where a mount's own log writes as it lands (10.1, P6) — the run's sink at this log's address plus the mount's runtimeStageId. undefined when this runtime's log writes to no sink. SubflowExecutor hands it to the nested runtime it constructs.

      Parameters

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

      Returns unknown

    • Parameters

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

      Returns void