updateState

fun updateState(key: String, value: Any)

Records a state change so it shows up in state and, on a callback or tool context, flushes on the next event as a delta.

On a node activation, a State.TEMP_PREFIX key is held on this activation alone, reaching no event and no successor node; every other key writes into actions stateDelta via copy-on-write, so a holder of the previous actions instance does not see the write. Under a node's state schema the write must match its declared key, or it fails.