@browserbasehq/stagehand 3.0.6-alpha-35438f1ead12aee0e5cbbad3687df41c6c245e5d → 3.0.6-alpha-34e7e5b292f5e6af6efc0da60118663310c5f718

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.
Files changed (2) hide show
  1. package/dist/index.js +89 -72
  2. package/package.json +7 -1
package/dist/index.js CHANGED
@@ -179,7 +179,7 @@ var __forAwait = (obj, it, method) => (it = obj[__knownSymbol("asyncIterator")])
179
179
  var STAGEHAND_VERSION;
180
180
  var init_version = __esm({
181
181
  "lib/version.ts"() {
182
- STAGEHAND_VERSION = "3.0.6-alpha-35438f1ead12aee0e5cbbad3687df41c6c245e5d";
182
+ STAGEHAND_VERSION = "3.0.6-alpha-34e7e5b292f5e6af6efc0da60118663310c5f718";
183
183
  }
184
184
  });
185
185
 
@@ -5893,7 +5893,7 @@ var require_interceptor = __commonJS({
5893
5893
  var require_helpers = __commonJS({
5894
5894
  "../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports2) {
5895
5895
  "use strict";
5896
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
5896
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5897
5897
  if (k2 === void 0) k2 = k;
5898
5898
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5899
5899
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5902,13 +5902,13 @@ var require_helpers = __commonJS({
5902
5902
  } };
5903
5903
  }
5904
5904
  Object.defineProperty(o, k2, desc);
5905
- } : function(o, m2, k, k2) {
5905
+ }) : (function(o, m2, k, k2) {
5906
5906
  if (k2 === void 0) k2 = k;
5907
5907
  o[k2] = m2[k];
5908
- });
5909
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
5908
+ }));
5909
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
5910
5910
  Object.defineProperty(o, "default", { enumerable: true, value: v });
5911
- } : function(o, v) {
5911
+ }) : function(o, v) {
5912
5912
  o["default"] = v;
5913
5913
  });
5914
5914
  var __importStar = exports2 && exports2.__importStar || function(mod) {
@@ -5979,7 +5979,7 @@ var require_helpers = __commonJS({
5979
5979
  var require_dist = __commonJS({
5980
5980
  "../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports2) {
5981
5981
  "use strict";
5982
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
5982
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
5983
5983
  if (k2 === void 0) k2 = k;
5984
5984
  var desc = Object.getOwnPropertyDescriptor(m2, k);
5985
5985
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -5988,13 +5988,13 @@ var require_dist = __commonJS({
5988
5988
  } };
5989
5989
  }
5990
5990
  Object.defineProperty(o, k2, desc);
5991
- } : function(o, m2, k, k2) {
5991
+ }) : (function(o, m2, k, k2) {
5992
5992
  if (k2 === void 0) k2 = k;
5993
5993
  o[k2] = m2[k];
5994
- });
5995
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
5994
+ }));
5995
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
5996
5996
  Object.defineProperty(o, "default", { enumerable: true, value: v });
5997
- } : function(o, v) {
5997
+ }) : function(o, v) {
5998
5998
  o["default"] = v;
5999
5999
  });
6000
6000
  var __importStar = exports2 && exports2.__importStar || function(mod) {
@@ -6232,7 +6232,7 @@ var require_parse_proxy_response = __commonJS({
6232
6232
  var require_dist2 = __commonJS({
6233
6233
  "../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports2) {
6234
6234
  "use strict";
6235
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
6235
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
6236
6236
  if (k2 === void 0) k2 = k;
6237
6237
  var desc = Object.getOwnPropertyDescriptor(m2, k);
6238
6238
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -6241,13 +6241,13 @@ var require_dist2 = __commonJS({
6241
6241
  } };
6242
6242
  }
6243
6243
  Object.defineProperty(o, k2, desc);
6244
- } : function(o, m2, k, k2) {
6244
+ }) : (function(o, m2, k, k2) {
6245
6245
  if (k2 === void 0) k2 = k;
6246
6246
  o[k2] = m2[k];
6247
- });
6248
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
6247
+ }));
6248
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
6249
6249
  Object.defineProperty(o, "default", { enumerable: true, value: v });
6250
- } : function(o, v) {
6250
+ }) : function(o, v) {
6251
6251
  o["default"] = v;
6252
6252
  });
6253
6253
  var __importStar = exports2 && exports2.__importStar || function(mod) {
@@ -6428,7 +6428,7 @@ var require_ponyfill_es2018 = __commonJS({
6428
6428
  "../../node_modules/.pnpm/web-streams-polyfill@3.3.3/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js"(exports2, module2) {
6429
6429
  (function(global2, factory6) {
6430
6430
  typeof exports2 === "object" && typeof module2 !== "undefined" ? factory6(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory6) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory6(global2.WebStreamsPolyfill = {}));
6431
- })(exports2, function(exports3) {
6431
+ })(exports2, (function(exports3) {
6432
6432
  "use strict";
6433
6433
  function noop3() {
6434
6434
  return void 0;
@@ -7035,11 +7035,11 @@ var require_ponyfill_es2018 = __commonJS({
7035
7035
  const syncIterable = {
7036
7036
  [Symbol.iterator]: () => syncIteratorRecord.iterator
7037
7037
  };
7038
- const asyncIterator = function() {
7038
+ const asyncIterator = (function() {
7039
7039
  return __asyncGenerator(this, null, function* () {
7040
7040
  return yield* __yieldStar(syncIterable);
7041
7041
  });
7042
- }();
7042
+ })();
7043
7043
  const nextMethod = asyncIterator.next;
7044
7044
  return { iterator: asyncIterator, nextMethod, done: false };
7045
7045
  }
@@ -10698,7 +10698,7 @@ var require_ponyfill_es2018 = __commonJS({
10698
10698
  exports3.WritableStream = WritableStream;
10699
10699
  exports3.WritableStreamDefaultController = WritableStreamDefaultController;
10700
10700
  exports3.WritableStreamDefaultWriter = WritableStreamDefaultWriter;
10701
- });
10701
+ }));
10702
10702
  }
10703
10703
  });
10704
10704
 
@@ -13450,7 +13450,7 @@ Content-Type: ${partContentType}\r
13450
13450
  var require_src2 = __commonJS({
13451
13451
  "../../node_modules/.pnpm/gaxios@7.1.3/node_modules/gaxios/build/cjs/src/index.js"(exports2) {
13452
13452
  "use strict";
13453
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
13453
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
13454
13454
  if (k2 === void 0) k2 = k;
13455
13455
  var desc = Object.getOwnPropertyDescriptor(m2, k);
13456
13456
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -13459,10 +13459,10 @@ var require_src2 = __commonJS({
13459
13459
  } };
13460
13460
  }
13461
13461
  Object.defineProperty(o, k2, desc);
13462
- } : function(o, m2, k, k2) {
13462
+ }) : (function(o, m2, k, k2) {
13463
13463
  if (k2 === void 0) k2 = k;
13464
13464
  o[k2] = m2[k];
13465
- });
13465
+ }));
13466
13466
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
13467
13467
  for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
13468
13468
  };
@@ -13760,7 +13760,7 @@ var require_bignumber = __commonJS({
13760
13760
  BigNumber2.minimum = BigNumber2.min = function() {
13761
13761
  return maxOrMin(arguments, 1);
13762
13762
  };
13763
- BigNumber2.random = function() {
13763
+ BigNumber2.random = (function() {
13764
13764
  var pow2_53 = 9007199254740992;
13765
13765
  var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
13766
13766
  return mathfloor(Math.random() * pow2_53);
@@ -13828,13 +13828,13 @@ var require_bignumber = __commonJS({
13828
13828
  rand.c = c;
13829
13829
  return rand;
13830
13830
  };
13831
- }();
13831
+ })();
13832
13832
  BigNumber2.sum = function() {
13833
13833
  var i2 = 1, args = arguments, sum = new BigNumber2(args[0]);
13834
13834
  for (; i2 < args.length; ) sum = sum.plus(args[i2++]);
13835
13835
  return sum;
13836
13836
  };
13837
- convertBase = /* @__PURE__ */ function() {
13837
+ convertBase = /* @__PURE__ */ (function() {
13838
13838
  var decimal = "0123456789";
13839
13839
  function toBaseOut(str, baseIn, baseOut, alphabet) {
13840
13840
  var j, arr = [0], arrL, i2 = 0, len = str.length;
@@ -13907,8 +13907,8 @@ var require_bignumber = __commonJS({
13907
13907
  }
13908
13908
  return str;
13909
13909
  };
13910
- }();
13911
- div = /* @__PURE__ */ function() {
13910
+ })();
13911
+ div = /* @__PURE__ */ (function() {
13912
13912
  function multiply(x2, k, base) {
13913
13913
  var m2, temp, xlo, xhi, carry = 0, i2 = x2.length, klo = k % SQRT_BASE, khi = k / SQRT_BASE | 0;
13914
13914
  for (x2 = x2.slice(); i2--; ) {
@@ -14049,7 +14049,7 @@ var require_bignumber = __commonJS({
14049
14049
  }
14050
14050
  return q;
14051
14051
  };
14052
- }();
14052
+ })();
14053
14053
  function format(n, i2, rm, id) {
14054
14054
  var c0, e2, ne, len, str;
14055
14055
  if (rm == null) rm = ROUNDING_MODE;
@@ -14108,7 +14108,7 @@ var require_bignumber = __commonJS({
14108
14108
  }
14109
14109
  return n;
14110
14110
  }
14111
- parseNumeric = /* @__PURE__ */ function() {
14111
+ parseNumeric = /* @__PURE__ */ (function() {
14112
14112
  var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
14113
14113
  return function(x2, str, isNum, b) {
14114
14114
  var base, s2 = isNum ? str : str.replace(whitespaceOrPlus, "");
@@ -14133,7 +14133,7 @@ var require_bignumber = __commonJS({
14133
14133
  }
14134
14134
  x2.c = x2.e = null;
14135
14135
  };
14136
- }();
14136
+ })();
14137
14137
  function round(x2, sd, rm, r2) {
14138
14138
  var d, i2, j, k, n, ni, rd, xc = x2.c, pows10 = POWS_TEN;
14139
14139
  if (xc) {
@@ -15211,7 +15211,7 @@ var require_parse = __commonJS({
15211
15211
  if (ch) {
15212
15212
  error("Syntax error");
15213
15213
  }
15214
- return typeof reviver === "function" ? function walk(holder, key) {
15214
+ return typeof reviver === "function" ? (function walk(holder, key) {
15215
15215
  var k, v, value2 = holder[key];
15216
15216
  if (value2 && typeof value2 === "object") {
15217
15217
  Object.keys(value2).forEach(function(k2) {
@@ -15224,7 +15224,7 @@ var require_parse = __commonJS({
15224
15224
  });
15225
15225
  }
15226
15226
  return reviver.call(holder, key, value2);
15227
- }({ "": result }, "") : result;
15227
+ })({ "": result }, "") : result;
15228
15228
  };
15229
15229
  };
15230
15230
  module2.exports = json_parse;
@@ -15367,7 +15367,7 @@ var require_colours = __commonJS({
15367
15367
  var require_logging_utils = __commonJS({
15368
15368
  "../../node_modules/.pnpm/google-logging-utils@1.1.3/node_modules/google-logging-utils/build/src/logging-utils.js"(exports2) {
15369
15369
  "use strict";
15370
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
15370
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
15371
15371
  if (k2 === void 0) k2 = k;
15372
15372
  var desc = Object.getOwnPropertyDescriptor(m2, k);
15373
15373
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -15376,16 +15376,16 @@ var require_logging_utils = __commonJS({
15376
15376
  } };
15377
15377
  }
15378
15378
  Object.defineProperty(o, k2, desc);
15379
- } : function(o, m2, k, k2) {
15379
+ }) : (function(o, m2, k, k2) {
15380
15380
  if (k2 === void 0) k2 = k;
15381
15381
  o[k2] = m2[k];
15382
- });
15383
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
15382
+ }));
15383
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
15384
15384
  Object.defineProperty(o, "default", { enumerable: true, value: v });
15385
- } : function(o, v) {
15385
+ }) : function(o, v) {
15386
15386
  o["default"] = v;
15387
15387
  });
15388
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
15388
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
15389
15389
  var ownKeys = function(o) {
15390
15390
  ownKeys = Object.getOwnPropertyNames || function(o2) {
15391
15391
  var ar = [];
@@ -15403,7 +15403,7 @@ var require_logging_utils = __commonJS({
15403
15403
  __setModuleDefault(result, mod);
15404
15404
  return result;
15405
15405
  };
15406
- }();
15406
+ })();
15407
15407
  Object.defineProperty(exports2, "__esModule", { value: true });
15408
15408
  exports2.env = exports2.DebugLogBackendBase = exports2.placeholder = exports2.AdhocDebugLogger = exports2.LogSeverity = void 0;
15409
15409
  exports2.getNodeBackend = getNodeBackend;
@@ -15656,7 +15656,7 @@ var require_logging_utils = __commonJS({
15656
15656
  var require_src3 = __commonJS({
15657
15657
  "../../node_modules/.pnpm/google-logging-utils@1.1.3/node_modules/google-logging-utils/build/src/index.js"(exports2) {
15658
15658
  "use strict";
15659
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
15659
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
15660
15660
  if (k2 === void 0) k2 = k;
15661
15661
  var desc = Object.getOwnPropertyDescriptor(m2, k);
15662
15662
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -15665,10 +15665,10 @@ var require_src3 = __commonJS({
15665
15665
  } };
15666
15666
  }
15667
15667
  Object.defineProperty(o, k2, desc);
15668
- } : function(o, m2, k, k2) {
15668
+ }) : (function(o, m2, k, k2) {
15669
15669
  if (k2 === void 0) k2 = k;
15670
15670
  o[k2] = m2[k];
15671
- });
15671
+ }));
15672
15672
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
15673
15673
  for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
15674
15674
  };
@@ -15681,7 +15681,7 @@ var require_src3 = __commonJS({
15681
15681
  var require_src4 = __commonJS({
15682
15682
  "../../node_modules/.pnpm/gcp-metadata@8.1.2/node_modules/gcp-metadata/build/src/index.js"(exports2) {
15683
15683
  "use strict";
15684
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
15684
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
15685
15685
  if (k2 === void 0) k2 = k;
15686
15686
  var desc = Object.getOwnPropertyDescriptor(m2, k);
15687
15687
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -15690,16 +15690,16 @@ var require_src4 = __commonJS({
15690
15690
  } };
15691
15691
  }
15692
15692
  Object.defineProperty(o, k2, desc);
15693
- } : function(o, m2, k, k2) {
15693
+ }) : (function(o, m2, k, k2) {
15694
15694
  if (k2 === void 0) k2 = k;
15695
15695
  o[k2] = m2[k];
15696
- });
15697
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
15696
+ }));
15697
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
15698
15698
  Object.defineProperty(o, "default", { enumerable: true, value: v });
15699
- } : function(o, v) {
15699
+ }) : function(o, v) {
15700
15700
  o["default"] = v;
15701
15701
  });
15702
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ function() {
15702
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
15703
15703
  var ownKeys = function(o) {
15704
15704
  ownKeys = Object.getOwnPropertyNames || function(o2) {
15705
15705
  var ar = [];
@@ -15717,7 +15717,7 @@ var require_src4 = __commonJS({
15717
15717
  __setModuleDefault(result, mod);
15718
15718
  return result;
15719
15719
  };
15720
- }();
15720
+ })();
15721
15721
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
15722
15722
  for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
15723
15723
  };
@@ -16241,7 +16241,7 @@ var require_crypto2 = __commonJS({
16241
16241
  var require_crypto3 = __commonJS({
16242
16242
  "../../node_modules/.pnpm/google-auth-library@10.5.0/node_modules/google-auth-library/build/src/crypto/crypto.js"(exports2) {
16243
16243
  "use strict";
16244
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m2, k, k2) {
16244
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m2, k, k2) {
16245
16245
  if (k2 === void 0) k2 = k;
16246
16246
  var desc = Object.getOwnPropertyDescriptor(m2, k);
16247
16247
  if (!desc || ("get" in desc ? !m2.__esModule : desc.writable || desc.configurable)) {
@@ -16250,10 +16250,10 @@ var require_crypto3 = __commonJS({
16250
16250
  } };
16251
16251
  }
16252
16252
  Object.defineProperty(o, k2, desc);
16253
- } : function(o, m2, k, k2) {
16253
+ }) : (function(o, m2, k, k2) {
16254
16254
  if (k2 === void 0) k2 = k;
16255
16255
  o[k2] = m2[k];
16256
- });
16256
+ }));
16257
16257
  var __exportStar = exports2 && exports2.__exportStar || function(m2, exports3) {
16258
16258
  for (var p in m2) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m2, p);
16259
16259
  };
@@ -18631,7 +18631,7 @@ var require_src5 = __commonJS({
18631
18631
  var e2, t2, r2 = "function" == typeof Symbol ? Symbol : {}, n = r2.iterator || "@@iterator", o = r2.toStringTag || "@@toStringTag";
18632
18632
  function i2(r3, n2, o2, i3) {
18633
18633
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
18634
- return _regeneratorDefine2(u2, "_invoke", function(r4, n3, o3) {
18634
+ return _regeneratorDefine2(u2, "_invoke", (function(r4, n3, o3) {
18635
18635
  var i4, c3, u3, f4 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e2, a: d, f: d.bind(e2, 4), d: function d2(t3, r5) {
18636
18636
  return i4 = t3, c3 = 0, u3 = e2, G.n = r5, a;
18637
18637
  } };
@@ -18664,7 +18664,7 @@ var require_src5 = __commonJS({
18664
18664
  }
18665
18665
  return { value: t2, done: y };
18666
18666
  };
18667
- }(r3, o2, i3), true), u2;
18667
+ })(r3, o2, i3), true), u2;
18668
18668
  }
18669
18669
  var a = {};
18670
18670
  function Generator() {
@@ -18742,7 +18742,7 @@ var require_src5 = __commonJS({
18742
18742
  }));
18743
18743
  var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
18744
18744
  var GOOGLE_REVOKE_TOKEN_URL = "https://oauth2.googleapis.com/revoke?token=";
18745
- var ErrorWithCode = /* @__PURE__ */ function(_Error) {
18745
+ var ErrorWithCode = /* @__PURE__ */ (function(_Error) {
18746
18746
  function ErrorWithCode2(message, code) {
18747
18747
  var _this;
18748
18748
  _classCallCheck(this, ErrorWithCode2);
@@ -18753,10 +18753,10 @@ var require_src5 = __commonJS({
18753
18753
  }
18754
18754
  _inherits(ErrorWithCode2, _Error);
18755
18755
  return _createClass(ErrorWithCode2);
18756
- }(/* @__PURE__ */ _wrapNativeSuper(Error));
18756
+ })(/* @__PURE__ */ _wrapNativeSuper(Error));
18757
18757
  var _inFlightRequest = /* @__PURE__ */ new WeakMap();
18758
18758
  var _GoogleToken_brand = /* @__PURE__ */ new WeakSet();
18759
- var GoogleToken = exports2.GoogleToken = /* @__PURE__ */ function() {
18759
+ var GoogleToken = exports2.GoogleToken = /* @__PURE__ */ (function() {
18760
18760
  function GoogleToken2(_options) {
18761
18761
  _classCallCheck(this, GoogleToken2);
18762
18762
  _classPrivateMethodInitSpec(this, _GoogleToken_brand);
@@ -18858,7 +18858,7 @@ var require_src5 = __commonJS({
18858
18858
  */
18859
18859
  }, {
18860
18860
  key: "getCredentials",
18861
- value: function() {
18861
+ value: (function() {
18862
18862
  var _getCredentials = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2(keyFile) {
18863
18863
  var ext, key, body, privateKey, clientEmail, _privateKey, _t;
18864
18864
  return _regenerator().w(function(_context2) {
@@ -18907,7 +18907,7 @@ var require_src5 = __commonJS({
18907
18907
  return _getCredentials.apply(this, arguments);
18908
18908
  }
18909
18909
  return getCredentials;
18910
- }()
18910
+ })()
18911
18911
  }, {
18912
18912
  key: "revokeToken",
18913
18913
  value: function revokeToken(callback) {
@@ -18920,7 +18920,7 @@ var require_src5 = __commonJS({
18920
18920
  return _assertClassBrand(_GoogleToken_brand, this, _revokeTokenAsync).call(this);
18921
18921
  }
18922
18922
  }]);
18923
- }();
18923
+ })();
18924
18924
  function _getTokenAsync(_x2) {
18925
18925
  return _getTokenAsync2.apply(this, arguments);
18926
18926
  }
@@ -20536,14 +20536,14 @@ var require_filesubjecttokensupplier = __commonJS({
20536
20536
  var util_1 = require("util");
20537
20537
  var fs12 = require("fs");
20538
20538
  var _a4;
20539
- var readFile = (0, util_1.promisify)((_a4 = fs12.readFile) != null ? _a4 : () => {
20540
- });
20539
+ var readFile = (0, util_1.promisify)((_a4 = fs12.readFile) != null ? _a4 : (() => {
20540
+ }));
20541
20541
  var _a5;
20542
- var realpath = (0, util_1.promisify)((_a5 = fs12.realpath) != null ? _a5 : () => {
20543
- });
20542
+ var realpath = (0, util_1.promisify)((_a5 = fs12.realpath) != null ? _a5 : (() => {
20543
+ }));
20544
20544
  var _a6;
20545
- var lstat = (0, util_1.promisify)((_a6 = fs12.lstat) != null ? _a6 : () => {
20546
- });
20545
+ var lstat = (0, util_1.promisify)((_a6 = fs12.lstat) != null ? _a6 : (() => {
20546
+ }));
20547
20547
  var FileSubjectTokenSupplier = class {
20548
20548
  /**
20549
20549
  * Instantiates a new file based subject token supplier.
@@ -24300,9 +24300,9 @@ var init_networkManager = __esm({
24300
24300
  const timeoutMs = options.timeoutMs;
24301
24301
  const remainingBudgetMs = Number.isFinite(timeoutMs) ? timeoutMs : void 0;
24302
24302
  const originalBudgetMs = Number.isFinite((_c = options.totalBudgetMs) != null ? _c : NaN) ? options.totalBudgetMs : remainingBudgetMs;
24303
- const filter3 = (_d2 = options.filter) != null ? _d2 : (info) => {
24303
+ const filter3 = (_d2 = options.filter) != null ? _d2 : ((info) => {
24304
24304
  return !IGNORED_RESOURCE_TYPES.has(info.resourceType);
24305
- };
24305
+ });
24306
24306
  const tracked = /* @__PURE__ */ new Set();
24307
24307
  let idleTimer = null;
24308
24308
  let timeoutTimer = null;
@@ -28309,7 +28309,7 @@ var AgentCache = class {
28309
28309
  options: context.options,
28310
28310
  configSignature: context.configSignature,
28311
28311
  steps: cloneForCache(steps),
28312
- result: cloneForCache(result),
28312
+ result: this.pruneAgentResult(result),
28313
28313
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
28314
28314
  };
28315
28315
  const { error, path: path8 } = yield this.storage.writeJson(
@@ -28338,6 +28338,23 @@ var AgentCache = class {
28338
28338
  });
28339
28339
  });
28340
28340
  }
28341
+ /**
28342
+ * Clone the agent result and prune bulky fields (e.g. screenshot base64 blobs)
28343
+ * before persisting it to disk. This keeps cache entries compact without
28344
+ * mutating the live AgentResult returned to callers.
28345
+ */
28346
+ pruneAgentResult(result) {
28347
+ const cloned = cloneForCache(result);
28348
+ if (!Array.isArray(cloned.actions)) {
28349
+ return cloned;
28350
+ }
28351
+ for (const action of cloned.actions) {
28352
+ if ((action == null ? void 0 : action.type) === "screenshot") {
28353
+ delete action.base64;
28354
+ }
28355
+ }
28356
+ return cloned;
28357
+ }
28341
28358
  beginRecording() {
28342
28359
  this.recording = [];
28343
28360
  }
@@ -63484,12 +63501,12 @@ var V3Context = class _V3Context {
63484
63501
  if (!owner) {
63485
63502
  for (const p of this.pagesByTarget.values()) {
63486
63503
  const tree = p.asProtocolFrameTree(p.mainFrameId());
63487
- const has = function find(n) {
63504
+ const has = (function find(n) {
63488
63505
  var _a5;
63489
63506
  if (n.frame.id === childMainId) return true;
63490
63507
  for (const c of (_a5 = n.childFrames) != null ? _a5 : []) if (find(c)) return true;
63491
63508
  return false;
63492
- }(tree);
63509
+ })(tree);
63493
63510
  if (has) {
63494
63511
  owner = p;
63495
63512
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserbasehq/stagehand",
3
- "version": "3.0.6-alpha-35438f1ead12aee0e5cbbad3687df41c6c245e5d",
3
+ "version": "3.0.6-alpha-34e7e5b292f5e6af6efc0da60118663310c5f718",
4
4
  "description": "An AI web browsing framework focused on simplicity and extensibility.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -67,6 +67,12 @@
67
67
  },
68
68
  "devDependencies": {
69
69
  "@playwright/test": "^1.42.1",
70
+ "@types/adm-zip": "^0.5.7",
71
+ "@types/node": "^20.11.30",
72
+ "@types/ws": "^8.5.13",
73
+ "adm-zip": "^0.5.16",
74
+ "chalk": "^5.4.1",
75
+ "esbuild": "^0.21.4",
70
76
  "eslint": "^9.16.0",
71
77
  "prettier": "^3.2.5",
72
78
  "tsup": "^8.2.1",