@ai-sdk/workflow 2.0.8 → 2.0.9
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.
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/normalize-ui-message-stream.ts +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ai-sdk/workflow
|
|
2
2
|
|
|
3
|
+
## 2.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b251584: Preserve active text and reasoning parts when another merged UI message stream finishes a step, and align workflow stream normalization with the explicit part end chunks.
|
|
8
|
+
- Updated dependencies [b251584]
|
|
9
|
+
- Updated dependencies [591d25b]
|
|
10
|
+
- Updated dependencies [9de0baf]
|
|
11
|
+
- ai@7.0.79
|
|
12
|
+
- @ai-sdk/provider@4.0.8
|
|
13
|
+
- @ai-sdk/provider-utils@5.0.30
|
|
14
|
+
|
|
3
15
|
## 2.0.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1188,10 +1188,9 @@ declare class WorkflowChatTransport<UI_MESSAGE extends UIMessage> implements Cha
|
|
|
1188
1188
|
* whole turn. Two properties of the durable streaming model make that error
|
|
1189
1189
|
* reachable:
|
|
1190
1190
|
*
|
|
1191
|
-
* - A workflow run owns a single shared stream
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1194
|
-
* `*-start` across a step boundary orphans the rest of that step's content.
|
|
1191
|
+
* - A workflow run owns a single shared stream. Multi-step turns can reuse the
|
|
1192
|
+
* same part id (commonly `"0"`), so a dropped or duplicated `*-start` can
|
|
1193
|
+
* orphan the rest of that part's content.
|
|
1195
1194
|
* - The same stream is read across reconnects, and a stream-producing step can
|
|
1196
1195
|
* run more than once (retry/redelivery, or the concurrent-worker duplication
|
|
1197
1196
|
* tracked in vercel/workflow#2331 and #2039). Either can interleave or
|
|
@@ -1204,11 +1203,12 @@ declare class WorkflowChatTransport<UI_MESSAGE extends UIMessage> implements Cha
|
|
|
1204
1203
|
*
|
|
1205
1204
|
* ## What it does
|
|
1206
1205
|
*
|
|
1207
|
-
* Mirrors the consumer's part-lifetime state machine
|
|
1208
|
-
* -
|
|
1206
|
+
* Mirrors the consumer's explicit-end part-lifetime state machine per part type:
|
|
1207
|
+
* - keeps open parts active across `finish-step`, while allowing ended ids to
|
|
1208
|
+
* be reused by a later step;
|
|
1209
1209
|
* - synthesizes a missing `*-start` when an orphaned `*-delta`/`*-end` arrives;
|
|
1210
1210
|
* - drops a re-delivered `*-start`/`*-delta`/`*-end` for a part already
|
|
1211
|
-
* open or ended
|
|
1211
|
+
* open or ended since the latest step boundary (reconnect/replay overlap).
|
|
1212
1212
|
*
|
|
1213
1213
|
* A well-formed stream passes through unchanged.
|
|
1214
1214
|
*
|
package/dist/index.js
CHANGED
|
@@ -2350,9 +2350,7 @@ async function* normalizeUIMessageStreamParts(source) {
|
|
|
2350
2350
|
yield chunk;
|
|
2351
2351
|
break;
|
|
2352
2352
|
case "finish-step":
|
|
2353
|
-
text.open.clear();
|
|
2354
2353
|
text.ended.clear();
|
|
2355
|
-
reasoning.open.clear();
|
|
2356
2354
|
reasoning.ended.clear();
|
|
2357
2355
|
yield chunk;
|
|
2358
2356
|
break;
|