@trigger.dev/sdk 0.0.0-chat-prerelease-20260505140031 → 0.0.0-chat-prerelease-20260506093419

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1188,13 +1188,18 @@ export type ChatAgentOptions<TIdentifier extends string, TClientDataSchema exten
1188
1188
  /**
1189
1189
  * Called when the frontend sends a custom action via `transport.sendAction()`.
1190
1190
  *
1191
- * Fires after message hydration (if set) but before `onTurnStart` and `run()`.
1192
- * Use `chat.history.*` to modify the conversation state the LLM will respond
1193
- * to the modified state.
1191
+ * Actions are not turns. They fire `hydrateMessages` (if configured) and
1192
+ * `onAction` only no `onTurnStart` / `prepareMessages` /
1193
+ * `onBeforeTurnComplete` / `onTurnComplete`, no `run()`. Use
1194
+ * `chat.history.*` inside `onAction` to mutate state.
1195
+ *
1196
+ * To produce a model response from an action, return a
1197
+ * `StreamTextResult` (auto-piped), `string`, or `UIMessage`. Returning
1198
+ * `void` or nothing is the side-effect-only default.
1194
1199
  */
1195
1200
  onAction?: (event: ActionEvent<[
1196
1201
  TActionSchema
1197
- ] extends [TaskSchema] ? inferSchemaOut<TActionSchema> : unknown, inferSchemaOut<TClientDataSchema>, TUIMessage>) => Promise<void> | void;
1202
+ ] extends [TaskSchema] ? inferSchemaOut<TActionSchema> : unknown, inferSchemaOut<TClientDataSchema>, TUIMessage>) => Promise<unknown> | unknown;
1198
1203
  /**
1199
1204
  * The run function for the chat task.
1200
1205
  *