@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.
Binary file
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
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/code",
3
- "version": "0.7.3",
3
+ "version": "0.8.0",
4
4
  "description": "A3S Code - Native AI coding agent library for Node.js",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",