Перейти к содержанию
SoulFire LogoSoulFire

State

Inputs, outputs, and defaults of the 2 built-in nodes in the State category.

Это руководство доступно только на английском.

Generated from the pinned SoulFire source. Regenerate these pages with bun run generate-node-reference.

Cache

state.cache

In-memory key-value cache with optional TTL

Also called: store, memory, ttl, temporary.

Inputs

PortTypeRequired / defaultDescription
operation (Operation)string"get"Operation: get, set, delete, clear, has
key (Key)string""Cache key
value (Value)anynullValue to store (for set)
ttlMs (TTL (ms))number0Time-to-live (0 = no expiry)
namespace (Namespace)string"default"Cache namespace

Outputs

PortTypeDescription
value (Value)anyRetrieved value
found (Found)booleanWhether key was found
success (Success)booleanWhether operation succeeded

Implementation

State Machine

state.state_machine

Simple state machine for bot behavior management

Also called: state, machine, fsm, behavior, mode, transition.

Inputs

PortTypeRequired / defaultDescription
in (In)execOptionalExecution input
bot (Bot)botOptionalOptional override of the bot in execution context
stateId (State ID)string"main"State machine identifier
operation (Operation)string"get"Operation: get, set, transition
newState (New State)string""New state (for set/transition)
allowedTransitions (Allowed Transitions)string"{}"JSON map of allowed transitions

Outputs

PortTypeDescription
out (Out)execExecution output
currentState (Current State)stringCurrent state value
previousState (Previous State)stringPrevious state (after transition)
transitionAllowed (Transition Allowed)booleanWhether transition was allowed

Implementation

Последнее обновление:

Полезна ли эта страница?