@anthonyhaussman/opencode-agy-auth 1.2.3-alpha.5 → 1.2.3-alpha.7

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/dist/index.js CHANGED
@@ -19612,6 +19612,23 @@ function normalizeToolSchemaTypes(tools, toolMapper) {
19612
19612
  obj.type = t.toUpperCase();
19613
19613
  }
19614
19614
  }
19615
+ if (Array.isArray(obj.enum)) {
19616
+ const sanitizedEnum = Array.from(
19617
+ new Set(
19618
+ obj.enum.filter((v) => v !== null && v !== void 0).map((v) => String(v))
19619
+ )
19620
+ );
19621
+ if (sanitizedEnum.length > 0) {
19622
+ obj.enum = sanitizedEnum;
19623
+ if (obj.type === "BOOLEAN") {
19624
+ obj.type = "STRING";
19625
+ }
19626
+ } else {
19627
+ delete obj.enum;
19628
+ }
19629
+ } else if ("enum" in obj) {
19630
+ delete obj.enum;
19631
+ }
19615
19632
  if (obj.properties && typeof obj.properties === "object") {
19616
19633
  Object.values(obj.properties).forEach(sanitizeSchema);
19617
19634
  }