AIDK API Reference / aidk/component / TickState
Interface: TickState ​
Defined in: packages/core/src/component/component.ts:92
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
channels? | ChannelService | Channel service for bidirectional communication (optional). Components can publish/subscribe to channels for UI integration. | packages/core/src/component/component.ts:152 |
current? | COMOutput | The COMOutput from the last tick (what was produced by model execution and tool execution). Contains new timeline entries, tool calls, and tool results. On tick 1, before model execution, this contains userInput (timeline, sections) to allow components to render purely from previous + current. | packages/core/src/component/component.ts:111 |
error? | EngineError | Error information if an error occurred during execution. Components can use this to handle errors and potentially recover. | packages/core/src/component/component.ts:129 |
previous? | COMInput | The COMInput from the previous tick (what was sent to model.fromEngineState). This is the compiled state that was passed to the model. | packages/core/src/component/component.ts:102 |
queuedMessages | ExecutionMessage[] | Messages queued since the last tick. Messages are delivered immediately to onMessage hooks when they arrive, then queued here for availability during render. This allows components to access all messages received since the last tick in their render logic. The queue is cleared after each tick completes. | packages/core/src/component/component.ts:146 |
stop | (reason: string) => void | Signal the engine to stop execution after this tick. | packages/core/src/component/component.ts:135 |
stopReason? | StopReasonInfo | Stop reason information from the last model execution. Components can use this to handle graceful recovery, retries, etc. | packages/core/src/component/component.ts:117 |
tick | number | Current tick number (1-indexed). | packages/core/src/component/component.ts:96 |
usage? | TokenUsage | Token usage from the last model execution. Contains inputTokens, outputTokens, totalTokens, and optional reasoning/cache tokens. | packages/core/src/component/component.ts:123 |