Interface NodeRuntime


public interface NodeRuntime
Runtime environment for script node execution. Provides minimal API surface for nodes - just what they need to execute their logic. Execution machinery (output storage, cancellation, event listeners) is hidden.
  • Method Summary

    Modifier and Type
    Method
    Description
    default reactor.core.publisher.Mono<Void>
    Triggers downstream execution along a named exec handle.
    default boolean
    Gets and resets the check result flag.
    Gets the SoulFire instance for accessing bots and game state.
    default boolean
    Returns whether this execution is running synchronously on the tick thread.
    void
    log(String level, String message)
    Logs a message from script execution.
    default void
    Pops the current check context after loop iteration completes.
    default void
    Pushes a new check context for nested loop support.
    default reactor.core.scheduler.Scheduler
    Gets the Reactor scheduler for reactive timing operations.
    default void
    Resets all data-only node trigger flags, allowing them to re-execute with fresh upstream values.
    Gets the scheduler for async operations.
    default void
    setCheckResult(boolean value)
    Sets the check result flag for condition-based loops.
    Gets the per-script state store for stateful nodes.
    default boolean
    Returns whether setCheckResult was called since the last reset.
  • Method Details

    • stateStore

      ScriptStateStore stateStore()
      Gets the per-script state store for stateful nodes. State is scoped to the script execution and cleaned up on deactivation.
      Returns:
      the script state store
    • instance

      InstanceManager instance()
      Gets the SoulFire instance for accessing bots and game state.
      Returns:
      the instance manager
    • scheduler

      SoulFireScheduler scheduler()
      Gets the scheduler for async operations.
      Returns:
      the instance scheduler
    • reactorScheduler

      default reactor.core.scheduler.Scheduler reactorScheduler()
      Gets the Reactor scheduler for reactive timing operations.
      Returns:
      the reactor scheduler
    • log

      void log(String level, String message)
      Logs a message from script execution. Used by Print node and other debugging nodes.
      Parameters:
      level - the log level (debug, info, warn, error)
      message - the message to log
    • isTickSynchronous

      default boolean isTickSynchronous()
      Returns whether this execution is running synchronously on the tick thread. When true, action nodes should execute game API calls directly instead of deferring via ControllingTask.
      Returns:
      true if executing synchronously on the tick thread
    • executeDownstream

      default reactor.core.publisher.Mono<Void> executeDownstream(String handle, Map<String, NodeValue> outputs)
      Triggers downstream execution along a named exec handle. Only functional during reactive engine execution; self-driving nodes (LoopNode, ForEachNode, etc.) use this to iterate.
      Parameters:
      handle - the exec output port ID to follow (e.g., "exec_loop")
      outputs - the outputs to merge into the execution context
      Returns:
      a Mono that completes when downstream execution finishes
    • setCheckResult

      default void setCheckResult(boolean value)
      Sets the check result flag for condition-based loops. Called by ResultNode to communicate a boolean back to the enclosing loop.
      Parameters:
      value - the boolean result
    • wasCheckResultSet

      default boolean wasCheckResultSet()
      Returns whether setCheckResult was called since the last reset. Used by RepeatUntilNode to detect missing ResultNode in check chains.
      Returns:
      true if a ResultNode set the check result
    • getAndResetCheckResult

      default boolean getAndResetCheckResult()
      Gets and resets the check result flag. Called by loop nodes (e.g., RepeatUntilNode) after executing a check chain.
      Returns:
      the check result before reset
    • resetDataNodeTriggers

      default void resetDataNodeTriggers()
      Resets all data-only node trigger flags, allowing them to re-execute with fresh upstream values. Called by loop nodes before evaluating check chains so that data-only condition nodes get re-evaluated.
    • pushCheckContext

      default void pushCheckContext()
      Pushes a new check context for nested loop support. Called by loop nodes before starting their check chain evaluation.
    • popCheckContext

      default void popCheckContext()
      Pops the current check context after loop iteration completes. Called by loop nodes when they are done with their check chain.