testdriverai 7.4.5 → 7.5.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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [7.4.5](https://github.com/testdriverai/testdriverai/compare/v7.3.43...v7.4.5) (2026-02-27)
2
+
3
+
4
+
1
5
  ## [7.3.44](https://github.com/testdriverai/testdriverai/compare/v7.3.43...v7.3.44) (2026-02-26)
2
6
 
3
7
 
package/agent/events.js CHANGED
@@ -101,11 +101,18 @@ const events = {
101
101
  sent: "sandbox:sent",
102
102
  received: "sandbox:received",
103
103
  progress: "sandbox:progress",
104
+ file: "sandbox:file",
104
105
  },
105
106
  redraw: {
106
107
  status: "redraw:status",
107
108
  complete: "redraw:complete",
108
109
  },
110
+ exec: {
111
+ output: "exec:output",
112
+ },
113
+ runner: {
114
+ log: "runner:log",
115
+ },
109
116
  exit: "exit",
110
117
  };
111
118
 
package/agent/index.js CHANGED
@@ -1686,6 +1686,7 @@ ${regression}
1686
1686
  resolution: this.config.TD_RESOLUTION,
1687
1687
  ci: this.config.CI,
1688
1688
  ip: this.ip,
1689
+ instanceId: this.instanceId || undefined,
1689
1690
  });
1690
1691
 
1691
1692
  // Store connection params for reconnection
@@ -1748,28 +1749,34 @@ ${regression}
1748
1749
  " " +
1749
1750
  theme.cyan(`new sandbox...`),
1750
1751
  );
1751
- // We don't have resiliency/retries baked in, so let's at least give it 1 attempt
1752
- // to see if that fixes the issue.
1753
- let newSandbox = await this.createNewSandbox().catch(() => {
1754
- this.emitter.emit(
1755
- events.log.narration,
1756
- theme.dim(`double-checking sandbox availability`),
1757
- );
1758
- return this.createNewSandbox();
1759
- });
1752
+ let newSandbox = await this.createNewSandbox();
1760
1753
 
1761
1754
  // Extract the sandbox ID from the newly created sandbox
1762
1755
  this.sandboxId =
1763
1756
  newSandbox?.sandbox?.sandboxId || newSandbox?.sandbox?.instanceId;
1764
1757
 
1765
- let instance = await this.connectToSandboxDirect(
1766
- this.sandboxId,
1767
- true, // always persist by default
1768
- this.keepAlive, // pass keepAlive TTL
1769
- );
1770
- this.instance = instance;
1771
- await this.renderSandbox(instance, headless);
1772
- await this.runLifecycle("provision");
1758
+ // E2B sandboxes return a url directly from create — no separate
1759
+ // connect step needed (the API proxies commands via Ably).
1760
+ if (newSandbox?.sandbox?.url) {
1761
+ this.sandbox.setConnectionParams({
1762
+ sandboxId: this.sandboxId,
1763
+ persist: true,
1764
+ keepAlive: this.keepAlive,
1765
+ });
1766
+ this.emitter.emit(events.sandbox.connected);
1767
+ this.instance = newSandbox.sandbox;
1768
+ await this.renderSandbox(this.instance, headless);
1769
+ await this.runLifecycle("provision");
1770
+ } else {
1771
+ let instance = await this.connectToSandboxDirect(
1772
+ this.sandboxId,
1773
+ true, // always persist by default
1774
+ this.keepAlive, // pass keepAlive TTL
1775
+ );
1776
+ this.instance = instance;
1777
+ await this.renderSandbox(instance, headless);
1778
+ await this.runLifecycle("provision");
1779
+ }
1773
1780
  }
1774
1781
  }
1775
1782