RunContext

org.llm4s.agent.graph.RunContext
final class RunContext

What a running task knows: the run's RunConfig, its own RunPosition, and its event channels.

emit records a durable custom event: it is committed with this task's result, given a per-thread sequence number in that commit, delivered only after the commit and replayed to later subscribers. It is discarded if the task fails. progress is live-only, for token deltas and similar high-volume progress: delivered at once to current subscribers, never persisted or replayed. Outside a GraphRuntime both are no-ops.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def emit(name: String, version: Int, payload: Value): Unit

Records a durable custom event; payload is snapshotted at the call, so the node may reuse it.

Records a durable custom event; payload is snapshotted at the call, so the node may reuse it.

Attributes

def isCancelled: Boolean

The task thread's interrupt flag, read without clearing it.

The task thread's interrupt flag, read without clearing it.

Attributes

def progress(payload: Value): Unit

Offers live progress; payload is snapshotted at the call, so the node may reuse it.

Offers live progress; payload is snapshotted at the call, so the node may reuse it.

Attributes

Concrete fields