Skip to content

Commit c3e342b

Browse files
tylergibbs1claude
andcommitted
Fix CI: add Symbol.asyncIterator to stream event channel iterator
The async iterator returned by createStreamEventChannel needed Symbol.asyncIterator on the iterator object itself (not just the iterable) to satisfy AsyncIterableIterator<StreamEvent>. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 485575a commit c3e342b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • packages/stratus-sdk/src/core

packages/stratus-sdk/src/core/run.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function createStreamEventChannel(): {
8181
resolve = undefined;
8282
},
8383
[Symbol.asyncIterator]() {
84-
return {
84+
const iter: AsyncIterableIterator<StreamEvent> = {
8585
async next(): Promise<IteratorResult<StreamEvent>> {
8686
while (queue.length === 0 && !finished) {
8787
await new Promise<void>((r) => {
@@ -93,7 +93,11 @@ function createStreamEventChannel(): {
9393
}
9494
return { value: undefined as any, done: true };
9595
},
96+
[Symbol.asyncIterator]() {
97+
return iter;
98+
},
9699
};
100+
return iter;
97101
},
98102
};
99103
}

0 commit comments

Comments
 (0)