Documentation / @agentick/core / ExecutionHandleImpl
Class: ExecutionHandleImpl<TResult, TEvent> ​
Defined in: kernel/src/procedure.ts:308
Default implementation of ExecutionHandle.
Creates a handle that wraps a result promise and event stream. Uses EventBuffer for dual consumption - multiple iterators can independently consume all events, and late subscribers receive replayed events.
Type Parameters ​
TResult ​
TResult
The return type of the procedure
TEvent ​
TEvent extends TypedEvent = any
The event type for streaming
Implements ​
ExecutionHandle<TResult,TEvent>
Constructors ​
Constructor ​
new ExecutionHandleImpl<
TResult,TEvent>(result,events,traceId,abortController?):ExecutionHandleImpl<TResult,TEvent>
Defined in: kernel/src/procedure.ts:319
Parameters ​
result ​
Promise<TResult>
events ​
EventBuffer<TEvent>
traceId ​
string
abortController? ​
AbortController
Returns ​
ExecutionHandleImpl<TResult, TEvent>
Properties ​
[ExecutionHandleBrand] ​
readonly[ExecutionHandleBrand]:true
Defined in: kernel/src/procedure.ts:312
Brand identifying this as an ExecutionHandle (not a plain AsyncIterable)
Implementation of ​
ExecutionHandle.[ExecutionHandleBrand]
events ​
readonlyevents:EventBuffer<TEvent>
Defined in: kernel/src/procedure.ts:315
Event buffer for streaming execution events. Supports dual consumption - multiple iterators can independently consume all events. Late subscribers receive replayed events from the start.
API is compatible with EventEmitter: on, once, off, emit, addListener, removeListener. Use on('eventType', handler) to subscribe to specific event types. Use on(handler) or on('*', handler) for wildcard subscription.
Implementation of ​
result ​
readonlyresult:Promise<TResult>
Defined in: kernel/src/procedure.ts:317
Promise that resolves with the final result. Use await handle.result to get the value.
Implementation of ​
traceId ​
readonlytraceId:string
Defined in: kernel/src/procedure.ts:322
Trace ID for distributed tracing correlation
Implementation of ​
Accessors ​
status ​
Get Signature ​
get status():
"running"|"completed"|"error"|"aborted"
Defined in: kernel/src/procedure.ts:364
Current execution status
Returns ​
"running" | "completed" | "error" | "aborted"
Current execution status
Implementation of ​
Methods ​
[asyncIterator]() ​
[asyncIterator]():
AsyncIterator<TEvent>
Defined in: kernel/src/procedure.ts:385
Returns ​
AsyncIterator<TEvent>
Implementation of ​
ExecutionHandle.[asyncIterator]
abort() ​
abort(
reason?):void
Defined in: kernel/src/procedure.ts:368
Abort the execution
Parameters ​
reason? ​
string
Returns ​
void
Implementation of ​
pushEvent() ​
pushEvent(
event):void
Defined in: kernel/src/procedure.ts:380
Push an event to the buffer. This is the primary way to emit events from procedure handlers.
Parameters ​
event ​
TEvent
Returns ​
void