@a3s-lab/code 0.7.3 → 0.8.0
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/index.darwin-arm64.node
CHANGED
|
Binary file
|
package/index.darwin-x64.node
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -310,8 +310,22 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { Agent, Session, builtinSkills } = nativeBinding
|
|
313
|
+
const { Agent, Session, EventStream, builtinSkills } = nativeBinding
|
|
314
|
+
|
|
315
|
+
// Add Symbol.asyncIterator to EventStream for `for await...of` support.
|
|
316
|
+
// Each iteration calls .next() until done === true.
|
|
317
|
+
EventStream.prototype[Symbol.asyncIterator] = async function* () {
|
|
318
|
+
while (true) {
|
|
319
|
+
const { value, done } = await this.next()
|
|
320
|
+
if (done) {
|
|
321
|
+
if (value != null) yield value
|
|
322
|
+
return
|
|
323
|
+
}
|
|
324
|
+
yield value
|
|
325
|
+
}
|
|
326
|
+
}
|
|
314
327
|
|
|
315
328
|
module.exports.Agent = Agent
|
|
316
329
|
module.exports.Session = Session
|
|
330
|
+
module.exports.EventStream = EventStream
|
|
317
331
|
module.exports.builtinSkills = builtinSkills
|
|
Binary file
|
|
Binary file
|
package/index.linux-x64-gnu.node
CHANGED
|
Binary file
|
|
Binary file
|