@browserbasehq/orca 3.0.2-zod351 → 3.0.2-zod353

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 +8 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -85,7 +85,7 @@ var __async = (__this, __arguments, generator) => {
85
85
  var STAGEHAND_VERSION;
86
86
  var init_version = __esm({
87
87
  "lib/version.ts"() {
88
- STAGEHAND_VERSION = "3.0.2-zod351";
88
+ STAGEHAND_VERSION = "3.0.2-zod353";
89
89
  }
90
90
  });
91
91
 
@@ -7965,16 +7965,7 @@ var import_v3 = __toESM(require("zod/v3"));
7965
7965
 
7966
7966
  // lib/v3/zodCompat.ts
7967
7967
  var import_zod = require("zod");
7968
- var isZod4Schema = (schema) => {
7969
- if (typeof schema._zod !== "undefined") {
7970
- return true;
7971
- }
7972
- const maybeAny = schema;
7973
- if (typeof maybeAny.isOptional === "function") {
7974
- return false;
7975
- }
7976
- return true;
7977
- };
7968
+ var isZod4Schema = (schema) => typeof schema._zod !== "undefined";
7978
7969
  var isZod3Schema = (schema) => !isZod4Schema(schema);
7979
7970
  function ZodToJsonSchema(schema) {
7980
7971
  const _def = schema._def;
@@ -8226,14 +8217,11 @@ function isRunningInBun() {
8226
8217
  return typeof process !== "undefined" && typeof process.versions !== "undefined" && "bun" in process.versions;
8227
8218
  }
8228
8219
  function decorateGeminiSchema(geminiSchema, zodSchema2) {
8229
- var _a, _b;
8230
8220
  if (geminiSchema.nullable === void 0) {
8231
- const zodType = getZodType(zodSchema2);
8232
- geminiSchema.nullable = zodType === "optional" || zodType === "nullable";
8221
+ geminiSchema.nullable = zodSchema2.isOptional();
8233
8222
  }
8234
- const description = (_b = zodSchema2.description) != null ? _b : (_a = zodSchema2._def) == null ? void 0 : _a.description;
8235
- if (description) {
8236
- geminiSchema.description = description;
8223
+ if (zodSchema2.description) {
8224
+ geminiSchema.description = zodSchema2.description;
8237
8225
  }
8238
8226
  return geminiSchema;
8239
8227
  }
@@ -8364,10 +8352,10 @@ function transformSchema(schema, currentPath) {
8364
8352
  const checks = getStringChecks(schema);
8365
8353
  const format = getStringFormat(schema);
8366
8354
  const hasUrlCheck = checks.some((check) => {
8367
- var _a, _b, _c, _d, _e, _f;
8355
+ var _a, _b, _c, _d;
8368
8356
  const candidate = check;
8369
- return candidate.kind === "url" || candidate.format === "url" || candidate.format === "uri" || ((_b = (_a = candidate._zod) == null ? void 0 : _a.def) == null ? void 0 : _b.check) === "url" || ((_d = (_c = candidate._zod) == null ? void 0 : _c.def) == null ? void 0 : _d.format) === "url" || ((_f = (_e = candidate._zod) == null ? void 0 : _e.def) == null ? void 0 : _f.format) === "uri";
8370
- }) || format === "url" || format === "uri";
8357
+ return candidate.kind === "url" || candidate.format === "url" || ((_b = (_a = candidate._zod) == null ? void 0 : _a.def) == null ? void 0 : _b.check) === "url" || ((_d = (_c = candidate._zod) == null ? void 0 : _c.def) == null ? void 0 : _d.format) === "url";
8358
+ }) || format === "url";
8371
8359
  if (hasUrlCheck) {
8372
8360
  return [makeIdStringSchema(schema), [{ segments: [] }]];
8373
8361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserbasehq/orca",
3
- "version": "3.0.2-zod351",
3
+ "version": "3.0.2-zod353",
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",