@orkestrel/agent 0.0.17 → 0.0.18

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