@orkestrel/agent 0.0.17 → 0.0.19

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.
@@ -1307,7 +1307,7 @@ var Channel = class {
1307
1307
  #closed = false;
1308
1308
  #failure;
1309
1309
  push(value) {
1310
- this.#buffer.push(value);
1310
+ this.#buffer.push({ value });
1311
1311
  this.#signal();
1312
1312
  }
1313
1313
  close() {
@@ -1321,10 +1321,7 @@ var Channel = class {
1321
1321
  }
1322
1322
  async *drain() {
1323
1323
  for (;;) {
1324
- while (this.#buffer.length > 0) {
1325
- const next = this.#buffer.shift();
1326
- if (next !== void 0) yield next;
1327
- }
1324
+ for (let cell = this.#buffer.shift(); cell !== void 0; cell = this.#buffer.shift()) yield cell.value;
1328
1325
  if (this.#failure !== void 0) throw this.#failure.error;
1329
1326
  if (this.#closed) return;
1330
1327
  await this.#parked();