@tanstack/ai 0.19.0 → 0.19.1

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.
@@ -968,7 +968,7 @@ export interface CustomEvent extends AGUICustomEvent {
968
968
  * }
969
969
  * ```
970
970
  */
971
- export interface StructuredOutputCompleteEvent<T = unknown> extends Omit<CustomEvent, 'name' | 'value'> {
971
+ export interface StructuredOutputCompleteEvent<T = unknown> extends CustomEvent {
972
972
  name: 'structured-output.complete';
973
973
  value: {
974
974
  object: T;
@@ -984,7 +984,7 @@ export interface StructuredOutputCompleteEvent<T = unknown> extends Omit<CustomE
984
984
  * `messageId` the deltas will be tagged with so the routing decision can be
985
985
  * made per-message rather than globally.
986
986
  */
987
- export interface StructuredOutputStartEvent extends Omit<CustomEvent, 'name' | 'value'> {
987
+ export interface StructuredOutputStartEvent extends CustomEvent {
988
988
  name: 'structured-output.start';
989
989
  value: {
990
990
  messageId: string;
@@ -997,7 +997,7 @@ export interface StructuredOutputStartEvent extends Omit<CustomEvent, 'name' | '
997
997
  * (the agent-loop branch of `runStreamingStructuredOutputImpl` in
998
998
  * `activities/chat/index.ts` forwards CUSTOM events from `TextEngine.run()`).
999
999
  */
1000
- export interface ApprovalRequestedEvent extends Omit<CustomEvent, 'name' | 'value'> {
1000
+ export interface ApprovalRequestedEvent extends CustomEvent {
1001
1001
  name: 'approval-requested';
1002
1002
  value: {
1003
1003
  toolCallId: string;
@@ -1015,7 +1015,7 @@ export interface ApprovalRequestedEvent extends Omit<CustomEvent, 'name' | 'valu
1015
1015
  * will not fire for that run. Shape fixed by the agent-loop forwarding in
1016
1016
  * `runStreamingStructuredOutputImpl` in `activities/chat/index.ts`.
1017
1017
  */
1018
- export interface ToolInputAvailableEvent extends Omit<CustomEvent, 'name' | 'value'> {
1018
+ export interface ToolInputAvailableEvent extends CustomEvent {
1019
1019
  name: 'tool-input-available';
1020
1020
  value: {
1021
1021
  toolCallId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/ai",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Core TanStack AI library - Open source AI SDK",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@ag-ui/core": "^0.0.52",
57
57
  "partial-json": "^0.1.7",
58
- "@tanstack/ai-event-client": "0.3.3"
58
+ "@tanstack/ai-event-client": "0.3.4"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@opentelemetry/api": ">=1.9.0"
package/src/types.ts CHANGED
@@ -1146,10 +1146,9 @@ export interface CustomEvent extends AGUICustomEvent {
1146
1146
  * }
1147
1147
  * ```
1148
1148
  */
1149
- export interface StructuredOutputCompleteEvent<T = unknown> extends Omit<
1150
- CustomEvent,
1151
- 'name' | 'value'
1152
- > {
1149
+ export interface StructuredOutputCompleteEvent<
1150
+ T = unknown,
1151
+ > extends CustomEvent {
1153
1152
  name: 'structured-output.complete'
1154
1153
  value: { object: T; raw: string; reasoning?: string }
1155
1154
  }
@@ -1162,10 +1161,7 @@ export interface StructuredOutputCompleteEvent<T = unknown> extends Omit<
1162
1161
  * `messageId` the deltas will be tagged with so the routing decision can be
1163
1162
  * made per-message rather than globally.
1164
1163
  */
1165
- export interface StructuredOutputStartEvent extends Omit<
1166
- CustomEvent,
1167
- 'name' | 'value'
1168
- > {
1164
+ export interface StructuredOutputStartEvent extends CustomEvent {
1169
1165
  name: 'structured-output.start'
1170
1166
  value: { messageId: string }
1171
1167
  }
@@ -1177,10 +1173,7 @@ export interface StructuredOutputStartEvent extends Omit<
1177
1173
  * (the agent-loop branch of `runStreamingStructuredOutputImpl` in
1178
1174
  * `activities/chat/index.ts` forwards CUSTOM events from `TextEngine.run()`).
1179
1175
  */
1180
- export interface ApprovalRequestedEvent extends Omit<
1181
- CustomEvent,
1182
- 'name' | 'value'
1183
- > {
1176
+ export interface ApprovalRequestedEvent extends CustomEvent {
1184
1177
  name: 'approval-requested'
1185
1178
  value: {
1186
1179
  toolCallId: string
@@ -1196,10 +1189,7 @@ export interface ApprovalRequestedEvent extends Omit<
1196
1189
  * will not fire for that run. Shape fixed by the agent-loop forwarding in
1197
1190
  * `runStreamingStructuredOutputImpl` in `activities/chat/index.ts`.
1198
1191
  */
1199
- export interface ToolInputAvailableEvent extends Omit<
1200
- CustomEvent,
1201
- 'name' | 'value'
1202
- > {
1192
+ export interface ToolInputAvailableEvent extends CustomEvent {
1203
1193
  name: 'tool-input-available'
1204
1194
  value: {
1205
1195
  toolCallId: string