@mochabug/adapt-sdk 0.4.17 → 0.4.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.
- package/dist/cjs/anthropic.cjs +1 -1
- package/dist/cjs/anthropic.cjs.map +3 -3
- package/dist/cjs/cel.cjs +2 -2
- package/dist/cjs/cel.cjs.map +1 -1
- package/dist/cjs/gemini.cjs +1 -1
- package/dist/cjs/gemini.cjs.map +3 -3
- package/dist/cjs/openai.cjs +1 -1
- package/dist/cjs/openai.cjs.map +3 -3
- package/dist/cjs/signals.cjs +2 -2
- package/dist/cjs/signals.cjs.map +3 -3
- package/dist/esm/anthropic.mjs +1 -1
- package/dist/esm/anthropic.mjs.map +3 -3
- package/dist/esm/cel.mjs +2 -2
- package/dist/esm/cel.mjs.map +1 -1
- package/dist/esm/gemini.mjs +1 -1
- package/dist/esm/gemini.mjs.map +3 -3
- package/dist/esm/openai.mjs +1 -1
- package/dist/esm/openai.mjs.map +3 -3
- package/dist/esm/signals.mjs +2 -2
- package/dist/esm/signals.mjs.map +3 -3
- package/dist/signals/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/gemini.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isSchema as ie,isValidSchema as V,validate as _}from"jtd";var L=new Set(["int8","uint8","int16","uint16","int32","uint32"]);function K(e){return e.length===0?"/":e.map(n=>/^\d+$/.test(n)?`[${n}]`:`.${n}`).join("")}function P(e,n){let r=e;for(let s=0;s<n.length-1&&(r&&typeof r=="object"&&n[s]in r);s++)r=r[n[s]];return r}function z(e,n){let r=e;for(let s of n)if(r&&typeof r=="object")r=r[s];else return;return r}function H(e,n,r){let{instancePath:s,schemaPath:o}=e,t=K(s),i=o[o.length-1];if(i==="type"){let a=P(n,o)?.type;return a==="boolean"?`${t}: expected boolean`:a==="string"?`${t}: expected string`:a==="timestamp"?`${t}: expected timestamp string`:L.has(a)?`${t}: expected integer`:`${t}: expected number`}if(i==="enum"){let a=P(n,o)?.enum;return`${t}: expected one of [${a.join(", ")}]`}if(o.length>=2&&o[o.length-2]==="properties"&&i)return`${t==="/"?"":t}.${i}: missing required property`;if(i==="elements")return`${t}: expected array`;if(i==="properties"||i==="optionalProperties"||i==="values")return`${t}: expected object`;if(i==="discriminator")return`${t}: expected string discriminator`;if(i==="mapping"){let c=z(r,s);return`${t}: unknown variant "${c}"`}return o.length===0?`${t}: unexpected property`:`${t}: validation error at /${o.join("/")}`}function N(e,n,r){let s=r??e.definitions,o=s?{...e,definitions:s}:e;return V(o)?_(o,n,{maxDepth:X,maxErrors:Y}).map(i=>H(i,o,n)):e.ref?[`/: unknown ref "${e.ref}"`]:["/: invalid schema"]}var X=32,Y=100;var p=32,D={int8:{minimum:-128,maximum:127},uint8:{minimum:0,maximum:255},int16:{minimum:-32768,maximum:32767},uint16:{minimum:0,maximum:65535},int32:{minimum:-2147483648,maximum:2147483647},uint32:{minimum:0,maximum:4294967295}},v={minimum:-34028235e31,maximum:34028235e31},j=`Must be a valid JSON value encoded as a string. For objects: '{"key": "value"}', for arrays: '[1, 2]', for primitives: '"hello"' or '42' or 'true' or 'null'.`;var G="Array of key-value entries representing a map/dictionary. Each entry has a string 'key' (the property name) and a 'value' (the property value).";function l(e,n){return n?[e,"null"]:e}function O(e){return!e||typeof e!="object"?!0:e.type||e.enum||e.elements||e.values||e.discriminator||e.ref||e.properties&&Object.keys(e.properties).length>0||e.optionalProperties&&Object.keys(e.optionalProperties).length>0?!1:(e.properties!==void 0||e.optionalProperties!==void 0)&&e.additionalProperties===!0?!0:!(e.properties!==void 0||e.optionalProperties!==void 0)}function M(e,n){let r=e,s=0;for(;r.ref&&s<p;){let o=n?.[r.ref];if(!o)return!1;r=o,s++}return s>=p?!1:O(r)}function k(e,n,r){let s=e.definitions,o=r(n,e,s,0),t=N(e,o,s);return t.length>0?{success:!1,errors:t}:{success:!0,kind:"json",data:o}}function R(e,n,r){let s=n?`${n}. `:"",o={type:"object",properties:{kind:{type:"string",enum:["value"]},data:e},required:["kind","data"],description:`${s}Inline value.`},t={type:"object",properties:{kind:{type:"string",enum:["reference"]},ref:{type:"string",description:'A file reference. The referenced file MUST contain data that conforms to the same format described in the "value" variant.'}},required:["kind","ref"],description:`${s}Reference to a file instead of inline data.`};return r!==!1&&(o.additionalProperties=!1,t.additionalProperties=!1),{anyOf:[o,t]}}function W(e,n){let r=e.trim().toLowerCase(),s=n.trim().toLowerCase();return s==="*/*"?!0:s.endsWith("/*")?r.startsWith(s.slice(0,s.indexOf("/")+1)):r===s}function Z(e,n){if(typeof n!="object"||n===null)return{success:!1,errors:[`/: expected object with data and mimeType fields, got ${typeof n}`]};let r=n;if(typeof r.mimeType!="string"||!r.mimeType.includes("/"))return{success:!1,errors:['/mimeType: required concrete MIME type (e.g. "image/png", "application/pdf")']};if(!W(r.mimeType,e))return{success:!1,errors:[`/mimeType: "${r.mimeType}" does not match accepted type "${e}"`]};let s;if(r.data instanceof Uint8Array)s=r.data;else if(typeof r.data=="string")s=new Uint8Array(Buffer.from(r.data,"base64"));else return{success:!1,errors:[`/data: expected base64 string or Uint8Array, got ${typeof r.data}`]};let o={success:!0,kind:"binary",mimeType:r.mimeType,data:s};return typeof r.filename=="string"&&r.filename&&(o.filename=r.filename),o}function A(e,n,r){return e.mimeType?Z(e.mimeType,n):e.jtdSchema?k(e.jtdSchema,n,r):{success:!1,errors:["Signal format has neither jtdSchema nor mimeType"]}}function w(e,n,r){let s=e.formats;if(!s||s.length===0)return{success:!1,errors:["Signal descriptor has no formats"]};if(s.length===1)return A(s[0],n,r);let o=[];for(let t of s){let i=A(t,n,r);if(i.success)return i;o.push(...i.errors)}return{success:!1,errors:[`No format matched for signal '${e.name??"unnamed"}'. Errors: ${o.join("; ")}`]}}function $(e,n,r){if(typeof n!="object"||n===null)return{success:!1,errors:["/: expected object with signal properties, got "+typeof n]};let s=n,o={},t=[];for(let i of e){if(!i.name)continue;let c=s[i.name];if(c==null)continue;let a=w(i,c,r);if(a.success)a.kind==="binary"?o[i.name]={data:a.data,mimeType:a.mimeType,filename:a.filename}:a.kind==="json"&&(o[i.name]=a.data);else for(let u of a.errors)t.push(`/${i.name}${u.startsWith("/")?"":": "}${u}`)}return t.length>0?{success:!1,errors:t}:{success:!0,kind:"signals",signals:o}}function h(e){return!e||typeof e!="object"?"any":e.ref?e.ref:e.type?e.type:e.enum?`one of: ${e.enum.join(", ")}`:e.elements?`array of ${h(e.elements)}`:e.values?`map of ${h(e.values)}`:e.properties||e.optionalProperties?"object":e.discriminator?`union on '${e.discriminator}'`:"any"}function x(e,n){let r=["Recursive nesting. This field accepts the same object structure as its parent with the following shape:"],s=[],o=[];if(n.properties)for(let[t,i]of Object.entries(n.properties))s.push(`${t} (${h(i)})`);if(n.optionalProperties)for(let[t,i]of Object.entries(n.optionalProperties))o.push(`${t} (${h(i)})`);if(s.length>0&&r.push(`Required: ${s.join(", ")}.`),o.length>0){let t=o.slice(0,8),i=o.length>8?`, and ${o.length-8} more`:"";r.push(`Optional: ${t.join(", ")}${i}.`)}return n.elements&&r.push(`Array of ${h(n.elements)}.`),n.values&&r.push(`Map with values of type ${h(n.values)}.`),r.join(" ")}var I=new Set(["title","label","name","description"]);function g(e,n){let r=n.metadata;if(!r)return;typeof r.description=="string"&&r.description.trim()&&(e.description=r.description.trim());let s=typeof r.title=="string"&&r.title.trim()||typeof r.label=="string"&&r.label.trim()||typeof r.name=="string"&&r.name.trim();s&&(e.title=s);let o=[];for(let[t,i]of Object.entries(r))I.has(t)||(typeof i=="string"&&i.trim()?o.push(`[${t}: ${i.trim()}]`):(typeof i=="number"||typeof i=="boolean")&&o.push(`[${t}: ${i}]`));if(o.length>0){let t=o.join(" ");e.description=e.description?`${e.description} ${t}`:t}}function E(e,n,r){if(r>p)throw new Error(`Circular or excessively deep ref chain (exceeded ${p} levels)`);if(!e.ref)return e;let s=n?.[e.ref];if(!s)throw new Error(`Unresolved ref "${e.ref}"`);return E(s,n,r+1)}function b(e,n,r,s){if(r>p)throw new Error(`Schema nesting exceeded ${p} levels`);if(!e||typeof e!="object")return{description:"Any JSON value"};if(e.ref){let i=s??new Set;if(i.has(e.ref)){let u=n?.[e.ref],f={description:u?x(e.ref,u):`Recursive reference to ${e.ref}. Accepts any valid JSON matching the ${e.ref} structure.`};return g(f,e),f}i.add(e.ref);let c=E(e,n,0),a=b(c,n,r+1,i);if(i.delete(e.ref),g(a,e),e.nullable){let u=a.type;a.type=Array.isArray(u)?[...u,"null"]:u?[u,"null"]:["null"]}return a}let o=e.nullable===!0,t={};if(e.type){let i=D[e.type];if(i)t.type=l("integer",o),t.minimum=i.minimum,t.maximum=i.maximum;else switch(e.type){case"boolean":t.type=l("boolean",o);break;case"string":t.type=l("string",o);break;case"timestamp":t.type=l("string",o),t.format="date-time";break;case"float32":t.type=l("number",o),t.minimum=v.minimum,t.maximum=v.maximum;break;case"float64":t.type=l("number",o);break;default:throw new Error(`Unknown JTD type "${e.type}"`)}return g(t,e),t}if(e.enum)return t.type=l("string",o),t.enum=o?[...e.enum,null]:e.enum,g(t,e),t;if(e.elements)return t.type=l("array",o),t.items=b(e.elements,n,r+1,s),g(t,e),t;if(e.properties||e.optionalProperties){t.type=l("object",o),t.properties={};let i=[];if(e.properties)for(let[c,a]of Object.entries(e.properties))t.properties[c]=b(a,n,r+1,s),i.push(c);if(e.optionalProperties)for(let[c,a]of Object.entries(e.optionalProperties))t.properties[c]=b(a,n,r+1,s);return i.length>0&&(t.required=i),e.additionalProperties!==!0&&(t.additionalProperties=!1),g(t,e),t}if(e.values)return t.type=l("object",o),t.additionalProperties=b(e.values,n,r+1,s),g(t,e),t;if(e.discriminator&&e.mapping){let i=e.discriminator,a=Object.keys(e.mapping).map(u=>{let f=e.mapping[u],m=b(f,n,r+1,s);return m.type="object",m.properties={[i]:{type:"string",enum:[u],description:`Must be '${u}'.`},...m.properties??{}},m.required=[i,...m.required??[]],m.additionalProperties=!1,m});if(o&&a.push({type:"null"}),a.length===1){let u=a[0];return g(u,e),u}return t.anyOf=a,g(t,e),t}return t.description="Any JSON value",g(t,e),t}function d(e,n){let r=n.metadata;if(!r)return;typeof r.description=="string"&&r.description.trim()&&(e.description=r.description.trim());let s=typeof r.title=="string"&&r.title.trim()||typeof r.label=="string"&&r.label.trim()||typeof r.name=="string"&&r.name.trim();s&&(e.title=s);let o=[];for(let[t,i]of Object.entries(r))I.has(t)||(typeof i=="string"&&i.trim()?o.push(`[${t}: ${i.trim()}]`):(typeof i=="number"||typeof i=="boolean")&&o.push(`[${t}: ${i}]`));if(o.length>0){let t=o.join(" ");e.description=e.description?`${e.description} ${t}`:t}}function J(e,n,r,s){if(r>p)throw new Error(`Schema nesting exceeded ${p} levels`);if(!e||typeof e!="object")return{type:"string",description:j};if(M(e,n)){let i={type:"string",description:j};return e.nullable&&(i.nullable=!0),d(i,e),i}if(e.ref){let i=s??new Set;if(i.has(e.ref)){let u=n?.[e.ref],f={description:u?x(e.ref,u):`Recursive reference to ${e.ref}. Accepts any valid JSON matching the ${e.ref} structure.`};return d(f,e),f}i.add(e.ref);let c=E(e,n,0),a=J(c,n,r+1,i);return i.delete(e.ref),d(a,e),e.nullable&&(a.nullable=!0),a}let o=e.nullable===!0,t={};if(e.type){let i=D[e.type];if(i)t.type="integer",t.minimum=i.minimum,t.maximum=i.maximum;else switch(e.type){case"boolean":t.type="boolean";break;case"string":t.type="string";break;case"timestamp":t.type="string",t.format="date-time";break;case"float32":t.type="number",t.minimum=v.minimum,t.maximum=v.maximum;break;case"float64":t.type="number";break;default:throw new Error(`Unknown JTD type "${e.type}"`)}return o&&(t.nullable=!0),d(t,e),t}if(e.enum)return t.type="string",t.enum=[...e.enum],o&&(t.nullable=!0),d(t,e),t;if(e.elements)return t.type="array",t.items=J(e.elements,n,r+1,s),o&&(t.nullable=!0),d(t,e),t;if(e.properties||e.optionalProperties){t.type="object",t.properties={};let i=[];if(e.properties)for(let[c,a]of Object.entries(e.properties))t.properties[c]=J(a,n,r+1,s),i.push(c);if(e.optionalProperties)for(let[c,a]of Object.entries(e.optionalProperties))t.properties[c]=J(a,n,r+1,s);return i.length>0&&(t.required=i),o&&(t.nullable=!0),d(t,e),t}if(e.values){let i=J(e.values,n,r+1,s);return t.type="array",t.description=G,t.items={type:"object",properties:{key:{type:"string",description:"The property name."},value:i},required:["key","value"]},o&&(t.nullable=!0),d(t,e),t}if(e.discriminator&&e.mapping){let i=e.discriminator,c=e.mapping,a=[];for(let[f,m]of Object.entries(c)){let T=J(m,n,r+1,s);T.properties??={},T.properties[i]={type:"string",enum:[f]},(T.required??=[]).unshift(i),d(T,m),a.push(T)}o&&a.push({type:"string",nullable:!0});let u={anyOf:a};return d(u,e),u}return t.type="string",t.description=j,o&&(t.nullable=!0),d(t,e),t}var B=new Set(Object.keys(D));function S(e,n,r,s){if(s>p||e==null)return e;if(n.ref){let o=r?.[n.ref];return o?S(e,o,r,s+1):e}if(n.type&&B.has(n.type))return typeof e=="number"&&!Number.isInteger(e)?Math.round(e):e;if(n.elements){let o=n.elements;return(Array.isArray(e)?e:[e]).map(i=>S(i,o,r,s+1))}if((n.properties||n.optionalProperties)&&typeof e=="object"&&e!==null){let o={...e};if(n.properties)for(let[t,i]of Object.entries(n.properties))t in o&&(o[t]=S(o[t],i,r,s+1));if(n.optionalProperties)for(let[t,i]of Object.entries(n.optionalProperties))t in o&&(o[t]=S(o[t],i,r,s+1));return o}if(n.values&&typeof e=="object"&&e!==null){let o={};for(let[t,i]of Object.entries(e))o[t]=S(i,n.values,r,s+1);return o}if(n.discriminator&&n.mapping&&typeof e=="object"&&e!==null){let o=e,t=o[n.discriminator];if(typeof t!="string")return e;let i=n.mapping[t];if(!i)return e;let c=S(o,i,r,s+1);return c[n.discriminator]=t,c}return e}function y(e,n,r,s){if(s>p||e==null)return e;if(n.ref){let o=r?.[n.ref];return o?y(e,o,r,s+1):e}if(O(n)){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}if(n.type&&B.has(n.type))return typeof e=="number"&&!Number.isInteger(e)?Math.round(e):e;if(n.elements){let o=n.elements;return(Array.isArray(e)?e:[e]).map(i=>y(i,o,r,s+1))}if((n.properties||n.optionalProperties)&&typeof e=="object"&&e!==null){let o={...e};if(n.properties)for(let[t,i]of Object.entries(n.properties))t in o&&(o[t]=y(o[t],i,r,s+1));if(n.optionalProperties)for(let[t,i]of Object.entries(n.optionalProperties))t in o&&(o[t]=y(o[t],i,r,s+1));return o}if(n.values&&Array.isArray(e)){let o={};for(let t of e)if(typeof t=="object"&&t!==null){let i=t,c=i.key;o[c]=y(i.value,n.values,r,s+1)}return o}if(n.discriminator&&n.mapping&&typeof e=="object"&&e!==null){let o=e,t=n.discriminator,i=o[t];if(typeof i!="string")return e;let c=n.mapping[i];if(!c)return e;let a={[t]:i};if(c.properties)for(let[u,f]of Object.entries(c.properties))u in o&&(a[u]=y(o[u],f,r,s+1));if(c.optionalProperties)for(let[u,f]of Object.entries(c.optionalProperties))u in o&&(a[u]=y(o[u],f,r,s+1));return a}return e}var C=class e{schema;jtdSchema;descriptor;descriptors;referenceMode;static fromJTD(n){let r=b(n,n.definitions,0);return n.discriminator&&n.mapping&&(r={type:"object",properties:{input:r},required:["input"]}),new e(r,n,void 0)}static fromSignal(n,r){let s=Q(n);if(r){let o=R(s,n.description);return new e(o,void 0,n)}return new e(s,void 0,n)}static fromSignals(n,r,s,o){let t={},i=[];for(let a of n){if(!a.name)continue;let u=e.fromSignal(a,o);t[a.name]=u.schema,a.optional||i.push(a.name)}let c={type:"object",properties:t,required:i.length>0?i:void 0,additionalProperties:!1};return r&&(c.description=r),s&&(c.title=s),new e(c,void 0,void 0,n,o)}static fromJSON(n){let r=typeof n=="string"?JSON.parse(n):n;if(r.descriptors)return e.fromSignals(r.descriptors,r.description,r.label,r.referenceMode);if(r.descriptor)return e.fromSignal(r.descriptor);if(r.jtdSchema)return e.fromJTD(r.jtdSchema);throw new Error("Cannot deserialize: missing jtdSchema, descriptor, or descriptors")}constructor(n,r,s,o,t){this.schema=n,this.jtdSchema=r,this.descriptor=s,this.descriptors=o,this.referenceMode=t??!1}convert=n=>{if(this.descriptors)return $(this.descriptors,n,S);if(this.jtdSchema){let r=n;return this.jtdSchema.discriminator&&this.jtdSchema.mapping&&typeof r=="object"&&r!==null&&"input"in r&&(r=r.input),k(this.jtdSchema,r,S)}return this.descriptor?w(this.descriptor,n,S):{success:!1,errors:["No source schema available"]}};toJSON(){if(this.descriptors){let n={schema:this.schema,descriptors:this.descriptors};return this.schema.description&&(n.description=this.schema.description),this.schema.title&&(n.label=this.schema.title),this.referenceMode&&(n.referenceMode=!0),n}return this.descriptor?{schema:this.schema,descriptor:this.descriptor}:{schema:this.schema,jtdSchema:this.jtdSchema}}};function Q(e){let n=e.formats;if(!n||n.length===0)throw new Error("Signal descriptor has no formats");if(n.length===1){let[t]=n,i=q(t);return e.label&&(i.title=e.label),e.description&&(i.description=e.description),i}let r=[];for(let t of n){let i=q(t);t.jtdSchema&&(i.description=i.description?`Structured JSON data. ${i.description}`:"Structured JSON data."),r.push(i)}let s=e.description??"";return{anyOf:r,description:s||void 0}}function q(e){if(e.jtdSchema)return b(e.jtdSchema,e.jtdSchema.definitions,0);if(e.mimeType)return ee(e.mimeType);throw new Error("Signal format has neither jtdSchema nor mimeType")}function ee(e){return{type:"object",description:`Binary content (accepted MIME type: ${e}).`,properties:{data:{type:"string",description:"The base64-encoded binary content."},filename:{type:"string",description:'Filename for the content (e.g. "report.pdf", "image.png").'},mimeType:{type:"string",description:`The concrete MIME type of the content. Must match: ${e}.`}},required:["data","mimeType","filename"],additionalProperties:!1}}function ne(e){let n=e.formats;if(!n||n.length===0)throw new Error("Signal descriptor has no formats");if(n.length===1){let[t]=n,i=U(t);return e.label&&(i.title=e.label),e.description&&(i.description=e.description),i}let r=[];for(let t of n){let i=U(t);t.jtdSchema&&(i.description=i.description?`Structured JSON data. ${i.description}`:"Structured JSON data."),r.push(i)}let s=e.description??"";return{anyOf:r,description:s||void 0}}function U(e){if(e.jtdSchema)return J(e.jtdSchema,e.jtdSchema.definitions,0);if(e.mimeType)return te(e.mimeType);throw new Error("Signal format has neither jtdSchema nor mimeType")}function te(e){return{type:"object",description:`Binary content (accepted MIME type: ${e}).`,properties:{data:{type:"string",description:"The base64-encoded binary content."},filename:{type:"string",description:'Filename for the content (e.g. "report.pdf", "image.png").'},mimeType:{type:"string",description:`The concrete MIME type of the content. Must match: ${e}.`}},required:["data","mimeType","filename"]}}var F=class e{schema;jtdSchema;descriptor;descriptors;referenceMode;static fromJTD(n){let r=J(n,n.definitions,0);return n.discriminator&&n.mapping&&(r={type:"object",properties:{input:r},required:["input"]}),new e(r,n,void 0)}static fromSignal(n,r){let s=ne(n);if(r){let o=R(s,n.description,!1);return new e(o,void 0,n)}return new e(s,void 0,n)}static fromSignals(n,r,s,o){let t={},i=[];for(let a of n){if(!a.name)continue;let u=e.fromSignal(a,o);t[a.name]=u.schema,a.optional||i.push(a.name)}let c={type:"object",properties:t,required:i.length>0?i:void 0};return r&&(c.description=r),s&&(c.title=s),new e(c,void 0,void 0,n,o)}static fromJSON(n){let r=typeof n=="string"?JSON.parse(n):n;if(r.mode!=="fc")throw new Error('Cannot deserialize as GeminiFunctionCallingConversion: mode is not "fc"');if(r.descriptors)return e.fromSignals(r.descriptors,r.description,r.label,r.referenceMode);if(r.descriptor)return e.fromSignal(r.descriptor);if(r.jtdSchema)return e.fromJTD(r.jtdSchema);throw new Error("Cannot deserialize: missing jtdSchema, descriptor, or descriptors")}constructor(n,r,s,o,t){this.schema=n,this.jtdSchema=r,this.descriptor=s,this.descriptors=o,this.referenceMode=t??!1}convert=n=>{if(this.descriptors)return $(this.descriptors,n,y);if(this.jtdSchema){let r=n;return this.jtdSchema.discriminator&&this.jtdSchema.mapping&&typeof r=="object"&&r!==null&&"input"in r&&(r=r.input),k(this.jtdSchema,r,y)}return this.descriptor?w(this.descriptor,n,y):{success:!1,errors:["No source schema available"]}};toJSON(){if(this.descriptors){let n={mode:"fc",schema:this.schema,descriptors:this.descriptors};return this.schema.description&&(n.description=this.schema.description),this.schema.title&&(n.label=this.schema.title),this.referenceMode&&(n.referenceMode=!0),n}return this.descriptor?{mode:"fc",schema:this.schema,descriptor:this.descriptor}:{mode:"fc",schema:this.schema,jtdSchema:this.jtdSchema}}};function ue(e){return C.fromJTD(e)}function fe(e){return C.fromSignal(e)}function pe(e){return F.fromJTD(e)}export{C as GeminiConversion,F as GeminiFunctionCallingConversion,C as GeminiStructuredOutputConversion,fe as convertSignalToGeminiSchema,pe as convertToGeminiFCSchema,ue as convertToGeminiSchema};
|
|
1
|
+
import{isSchema as ie,isValidSchema as V,validate as L}from"jtd";var _=new Set(["int8","uint8","int16","uint16","int32","uint32"]);function K(e){return e.length===0?"root":`'${e.map((t,s)=>/^\d+$/.test(t)?`[${t}]`:s===0?t:`.${t}`).join("")}'`}function D(e,n){let t=e;for(let s=0;s<n.length-1&&(t&&typeof t=="object"&&n[s]in t);s++)t=t[n[s]];return t}function z(e,n){let t=e;for(let s of n)if(t&&typeof t=="object")t=t[s];else return;return t}function H(e,n,t){let{instancePath:s,schemaPath:o}=e,r=K(s),i=o[o.length-1],c=r==="root"?"root value":`parameter ${r}`;if(i==="type"){let u=D(n,o)?.type;return u==="boolean"?`${c}: expected boolean`:u==="string"?`${c}: expected string`:u==="timestamp"?`${c}: expected timestamp string`:_.has(u)?`${c}: expected integer`:`${c}: expected number`}if(i==="enum"){let u=D(n,o)?.enum;return`${c}: expected one of [${u.join(", ")}]`}if(o.length>=2&&o[o.length-2]==="properties"&&i)return r==="root"?`missing required parameter '${i}'`:`missing required parameter ${r}.${i}`;if(i==="elements")return`${c}: expected array`;if(i==="properties"||i==="optionalProperties"||i==="values")return`${c}: expected object`;if(i==="discriminator"){let u=D(n,o)?.discriminator;return u?`${c}: parameter '${u}' must be a string`:`${c}: expected string discriminator`}if(i==="mapping"){let a=z(t,s),p=D(n,o)?.mapping,f=p?Object.keys(p):[];return f.length>0?`${c}: unknown variant "${a}". Valid values: [${f.join(", ")}]`:`${c}: unknown variant "${a}"`}return o.length===0?`${c}: unexpected property`:`${c}: validation error at /${o.join("/")}`}function N(e,n,t){let s=t??e.definitions,o=s?{...e,definitions:s}:e;return V(o)?L(o,n,{maxDepth:X,maxErrors:Y}).map(i=>H(i,o,n)):e.ref?[`unknown ref "${e.ref}" in schema`]:["invalid schema"]}var X=32,Y=100;var l=32,j={int8:{minimum:-128,maximum:127},uint8:{minimum:0,maximum:255},int16:{minimum:-32768,maximum:32767},uint16:{minimum:0,maximum:65535},int32:{minimum:-2147483648,maximum:2147483647},uint32:{minimum:0,maximum:4294967295}},v={minimum:-34028235e31,maximum:34028235e31},k=`Must be a valid JSON value encoded as a string. For objects: '{"key": "value"}', for arrays: '[1, 2]', for primitives: '"hello"' or '42' or 'true' or 'null'.`;var G="Array of key-value entries representing a map/dictionary. Each entry has a string 'key' (the property name) and a 'value' (the property value).";function d(e,n){return n?[e,"null"]:e}function $(e){return!e||typeof e!="object"?!0:e.type||e.enum||e.elements||e.values||e.discriminator||e.ref||e.properties&&Object.keys(e.properties).length>0||e.optionalProperties&&Object.keys(e.optionalProperties).length>0?!1:(e.properties!==void 0||e.optionalProperties!==void 0)&&e.additionalProperties===!0?!0:!(e.properties!==void 0||e.optionalProperties!==void 0)}function M(e,n){let t=e,s=0;for(;t.ref&&s<l;){let o=n?.[t.ref];if(!o)return!1;t=o,s++}return s>=l?!1:$(t)}function w(e,n,t){let s=e.definitions,o=t(n,e,s,0),r=N(e,o,s);return r.length>0?{success:!1,errors:r}:{success:!0,kind:"json",data:o}}function R(e,n,t){let s=n?`${n}. `:"",o={type:"object",properties:{kind:{type:"string",enum:["value"]},data:e},required:["kind","data"],description:`${s}Inline value.`},r={type:"object",properties:{kind:{type:"string",enum:["reference"]},ref:{type:"string",description:'A file reference. The referenced file MUST contain data that conforms to the same format described in the "value" variant.'}},required:["kind","ref"],description:`${s}Reference to a file instead of inline data.`};return t!==!1&&(o.additionalProperties=!1,r.additionalProperties=!1),{anyOf:[o,r]}}function W(e,n){let t=e.trim().toLowerCase(),s=n.trim().toLowerCase();return s==="*/*"?!0:s.endsWith("/*")?t.startsWith(s.slice(0,s.indexOf("/")+1)):t===s}function Z(e,n){if(typeof n!="object"||n===null)return{success:!1,errors:[`expected object with 'data' and 'mimeType' fields, got ${typeof n}`]};let t=n;if(typeof t.mimeType!="string"||!t.mimeType.includes("/"))return{success:!1,errors:[`parameter 'mimeType': required concrete MIME type (e.g. "image/png", "application/pdf")`]};if(!W(t.mimeType,e))return{success:!1,errors:[`parameter 'mimeType': "${t.mimeType}" does not match accepted type "${e}"`]};let s;if(t.data instanceof Uint8Array)s=t.data;else if(typeof t.data=="string")s=new Uint8Array(Buffer.from(t.data,"base64"));else return{success:!1,errors:[`parameter 'data': expected base64 string or Uint8Array, got ${typeof t.data}`]};let o={success:!0,kind:"binary",mimeType:t.mimeType,data:s};return typeof t.filename=="string"&&t.filename&&(o.filename=t.filename),o}function A(e,n,t){return e.mimeType?Z(e.mimeType,n):e.jtdSchema?w(e.jtdSchema,n,t):{success:!1,errors:["Signal format has neither jtdSchema nor mimeType"]}}function C(e,n,t){let s=e.formats;if(!s||s.length===0)return{success:!1,errors:["Signal descriptor has no formats"]};if(s.length===1)return A(s[0],n,t);let o=[];for(let r of s){let i=A(r,n,t);if(i.success)return i;o.push(...i.errors)}return{success:!1,errors:[`No format matched for signal '${e.name??"unnamed"}'. Errors: ${o.join("; ")}`]}}function x(e,n,t){if(typeof n!="object"||n===null)return{success:!1,errors:["/: expected object with signal properties, got "+typeof n]};let s=n,o={},r=[];for(let i of e){if(!i.name)continue;let c=s[i.name];if(c==null)continue;let a=C(i,c,t);if(a.success)a.kind==="binary"?o[i.name]={data:a.data,mimeType:a.mimeType,filename:a.filename}:a.kind==="json"&&(o[i.name]=a.data);else for(let u of a.errors)r.push(`parameter '${i.name}': ${u}`)}return r.length>0?{success:!1,errors:r}:{success:!0,kind:"signals",signals:o}}function h(e){return!e||typeof e!="object"?"any":e.ref?e.ref:e.type?e.type:e.enum?`one of: ${e.enum.join(", ")}`:e.elements?`array of ${h(e.elements)}`:e.values?`map of ${h(e.values)}`:e.properties||e.optionalProperties?"object":e.discriminator?`union on '${e.discriminator}'`:"any"}function F(e,n){let t=["Recursive nesting. This field accepts the same object structure as its parent with the following shape:"],s=[],o=[];if(n.properties)for(let[r,i]of Object.entries(n.properties))s.push(`${r} (${h(i)})`);if(n.optionalProperties)for(let[r,i]of Object.entries(n.optionalProperties))o.push(`${r} (${h(i)})`);if(s.length>0&&t.push(`Required: ${s.join(", ")}.`),o.length>0){let r=o.slice(0,8),i=o.length>8?`, and ${o.length-8} more`:"";t.push(`Optional: ${r.join(", ")}${i}.`)}return n.elements&&t.push(`Array of ${h(n.elements)}.`),n.values&&t.push(`Map with values of type ${h(n.values)}.`),t.join(" ")}var I=new Set(["title","label","name","description"]);function g(e,n){let t=n.metadata;if(!t)return;typeof t.description=="string"&&t.description.trim()&&(e.description=t.description.trim());let s=typeof t.title=="string"&&t.title.trim()||typeof t.label=="string"&&t.label.trim()||typeof t.name=="string"&&t.name.trim();s&&(e.title=s);let o=[];for(let[r,i]of Object.entries(t))I.has(r)||(typeof i=="string"&&i.trim()?o.push(`[${r}: ${i.trim()}]`):(typeof i=="number"||typeof i=="boolean")&&o.push(`[${r}: ${i}]`));if(o.length>0){let r=o.join(" ");e.description=e.description?`${e.description} ${r}`:r}}function P(e,n,t){if(t>l)throw new Error(`Circular or excessively deep ref chain (exceeded ${l} levels)`);if(!e.ref)return e;let s=n?.[e.ref];if(!s)throw new Error(`Unresolved ref "${e.ref}"`);return P(s,n,t+1)}function b(e,n,t,s){if(t>l)throw new Error(`Schema nesting exceeded ${l} levels`);if(!e||typeof e!="object")return{description:"Any JSON value"};if(e.ref){let i=s??new Set;if(i.has(e.ref)){let u=n?.[e.ref],p={description:u?F(e.ref,u):`Recursive reference to ${e.ref}. Accepts any valid JSON matching the ${e.ref} structure.`};return g(p,e),p}i.add(e.ref);let c=P(e,n,0),a=b(c,n,t+1,i);if(i.delete(e.ref),g(a,e),e.nullable){let u=a.type;a.type=Array.isArray(u)?[...u,"null"]:u?[u,"null"]:["null"]}return a}let o=e.nullable===!0,r={};if(e.type){let i=j[e.type];if(i)r.type=d("integer",o),r.minimum=i.minimum,r.maximum=i.maximum;else switch(e.type){case"boolean":r.type=d("boolean",o);break;case"string":r.type=d("string",o);break;case"timestamp":r.type=d("string",o),r.format="date-time";break;case"float32":r.type=d("number",o),r.minimum=v.minimum,r.maximum=v.maximum;break;case"float64":r.type=d("number",o);break;default:throw new Error(`Unknown JTD type "${e.type}"`)}return g(r,e),r}if(e.enum)return r.type=d("string",o),r.enum=o?[...e.enum,null]:e.enum,g(r,e),r;if(e.elements)return r.type=d("array",o),r.items=b(e.elements,n,t+1,s),g(r,e),r;if(e.properties||e.optionalProperties){r.type=d("object",o),r.properties={};let i=[];if(e.properties)for(let[c,a]of Object.entries(e.properties))r.properties[c]=b(a,n,t+1,s),i.push(c);if(e.optionalProperties)for(let[c,a]of Object.entries(e.optionalProperties))r.properties[c]=b(a,n,t+1,s);return i.length>0&&(r.required=i),e.additionalProperties!==!0&&(r.additionalProperties=!1),g(r,e),r}if(e.values)return r.type=d("object",o),r.additionalProperties=b(e.values,n,t+1,s),g(r,e),r;if(e.discriminator&&e.mapping){let i=e.discriminator,a=Object.keys(e.mapping).map(u=>{let p=e.mapping[u],f=b(p,n,t+1,s);return f.type="object",f.properties={[i]:{type:"string",enum:[u],description:`Must be '${u}'.`},...f.properties??{}},f.required=[i,...f.required??[]],f.additionalProperties=!1,f});if(o&&a.push({type:"null"}),a.length===1){let u=a[0];return g(u,e),u}return r.anyOf=a,g(r,e),r}return r.description="Any JSON value",g(r,e),r}function m(e,n){let t=n.metadata;if(!t)return;typeof t.description=="string"&&t.description.trim()&&(e.description=t.description.trim());let s=typeof t.title=="string"&&t.title.trim()||typeof t.label=="string"&&t.label.trim()||typeof t.name=="string"&&t.name.trim();s&&(e.title=s);let o=[];for(let[r,i]of Object.entries(t))I.has(r)||(typeof i=="string"&&i.trim()?o.push(`[${r}: ${i.trim()}]`):(typeof i=="number"||typeof i=="boolean")&&o.push(`[${r}: ${i}]`));if(o.length>0){let r=o.join(" ");e.description=e.description?`${e.description} ${r}`:r}}function J(e,n,t,s){if(t>l)throw new Error(`Schema nesting exceeded ${l} levels`);if(!e||typeof e!="object")return{type:"string",description:k};if(M(e,n)){let i={type:"string",description:k};return e.nullable&&(i.nullable=!0),m(i,e),i}if(e.ref){let i=s??new Set;if(i.has(e.ref)){let u=n?.[e.ref],p={description:u?F(e.ref,u):`Recursive reference to ${e.ref}. Accepts any valid JSON matching the ${e.ref} structure.`};return m(p,e),p}i.add(e.ref);let c=P(e,n,0),a=J(c,n,t+1,i);return i.delete(e.ref),m(a,e),e.nullable&&(a.nullable=!0),a}let o=e.nullable===!0,r={};if(e.type){let i=j[e.type];if(i)r.type="integer",r.minimum=i.minimum,r.maximum=i.maximum;else switch(e.type){case"boolean":r.type="boolean";break;case"string":r.type="string";break;case"timestamp":r.type="string",r.format="date-time";break;case"float32":r.type="number",r.minimum=v.minimum,r.maximum=v.maximum;break;case"float64":r.type="number";break;default:throw new Error(`Unknown JTD type "${e.type}"`)}return o&&(r.nullable=!0),m(r,e),r}if(e.enum)return r.type="string",r.enum=[...e.enum],o&&(r.nullable=!0),m(r,e),r;if(e.elements)return r.type="array",r.items=J(e.elements,n,t+1,s),o&&(r.nullable=!0),m(r,e),r;if(e.properties||e.optionalProperties){r.type="object",r.properties={};let i=[];if(e.properties)for(let[c,a]of Object.entries(e.properties))r.properties[c]=J(a,n,t+1,s),i.push(c);if(e.optionalProperties)for(let[c,a]of Object.entries(e.optionalProperties))r.properties[c]=J(a,n,t+1,s);return i.length>0&&(r.required=i),o&&(r.nullable=!0),m(r,e),r}if(e.values){let i=J(e.values,n,t+1,s);return r.type="array",r.description=G,r.items={type:"object",properties:{key:{type:"string",description:"The property name."},value:i},required:["key","value"]},o&&(r.nullable=!0),m(r,e),r}if(e.discriminator&&e.mapping){let i=e.discriminator,c=e.mapping,a=[];for(let[p,f]of Object.entries(c)){let T=J(f,n,t+1,s);T.properties??={},T.properties[i]={type:"string",enum:[p]},(T.required??=[]).unshift(i),m(T,f),a.push(T)}o&&a.push({type:"string",nullable:!0});let u={anyOf:a};return m(u,e),u}return r.type="string",r.description=k,o&&(r.nullable=!0),m(r,e),r}var B=new Set(Object.keys(j));function S(e,n,t,s){if(s>l||e==null)return e;if(n.ref){let o=t?.[n.ref];return o?S(e,o,t,s+1):e}if(n.type&&B.has(n.type))return typeof e=="number"&&!Number.isInteger(e)?Math.round(e):e;if(n.elements){let o=n.elements;return(Array.isArray(e)?e:[e]).map(i=>S(i,o,t,s+1))}if((n.properties||n.optionalProperties)&&typeof e=="object"&&e!==null){let o={...e};if(n.properties)for(let[r,i]of Object.entries(n.properties))r in o&&(o[r]=S(o[r],i,t,s+1));if(n.optionalProperties)for(let[r,i]of Object.entries(n.optionalProperties))r in o&&(o[r]=S(o[r],i,t,s+1));return o}if(n.values&&typeof e=="object"&&e!==null){let o={};for(let[r,i]of Object.entries(e))o[r]=S(i,n.values,t,s+1);return o}if(n.discriminator&&n.mapping&&typeof e=="object"&&e!==null){let o=e,r=o[n.discriminator];if(typeof r!="string")return e;let i=n.mapping[r];if(!i)return e;let c=S(o,i,t,s+1);return c[n.discriminator]=r,c}return e}function y(e,n,t,s){if(s>l||e==null)return e;if(n.ref){let o=t?.[n.ref];return o?y(e,o,t,s+1):e}if($(n)){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}if(n.type&&B.has(n.type))return typeof e=="number"&&!Number.isInteger(e)?Math.round(e):e;if(n.elements){let o=n.elements;return(Array.isArray(e)?e:[e]).map(i=>y(i,o,t,s+1))}if((n.properties||n.optionalProperties)&&typeof e=="object"&&e!==null){let o={...e};if(n.properties)for(let[r,i]of Object.entries(n.properties))r in o&&(o[r]=y(o[r],i,t,s+1));if(n.optionalProperties)for(let[r,i]of Object.entries(n.optionalProperties))r in o&&(o[r]=y(o[r],i,t,s+1));return o}if(n.values&&Array.isArray(e)){let o={};for(let r of e)if(typeof r=="object"&&r!==null){let i=r,c=i.key;o[c]=y(i.value,n.values,t,s+1)}return o}if(n.discriminator&&n.mapping&&typeof e=="object"&&e!==null){let o=e,r=n.discriminator,i=o[r];if(typeof i!="string")return e;let c=n.mapping[i];if(!c)return e;let a={[r]:i};if(c.properties)for(let[u,p]of Object.entries(c.properties))u in o&&(a[u]=y(o[u],p,t,s+1));if(c.optionalProperties)for(let[u,p]of Object.entries(c.optionalProperties))u in o&&(a[u]=y(o[u],p,t,s+1));return a}return e}var O=class e{schema;jtdSchema;descriptor;descriptors;referenceMode;static fromJTD(n){let t=b(n,n.definitions,0);return n.discriminator&&n.mapping&&(t={type:"object",properties:{input:t},required:["input"]}),new e(t,n,void 0)}static fromSignal(n,t){let s=Q(n);if(t){let o=R(s,n.description);return new e(o,void 0,n)}return new e(s,void 0,n)}static fromSignals(n,t,s,o){let r={},i=[];for(let a of n){if(!a.name)continue;let u=e.fromSignal(a,o);r[a.name]=u.schema,a.optional||i.push(a.name)}let c={type:"object",properties:r,required:i.length>0?i:void 0,additionalProperties:!1};return t&&(c.description=t),s&&(c.title=s),new e(c,void 0,void 0,n,o)}static fromJSON(n){let t=typeof n=="string"?JSON.parse(n):n;if(t.descriptors)return e.fromSignals(t.descriptors,t.description,t.label,t.referenceMode);if(t.descriptor)return e.fromSignal(t.descriptor);if(t.jtdSchema)return e.fromJTD(t.jtdSchema);throw new Error("Cannot deserialize: missing jtdSchema, descriptor, or descriptors")}constructor(n,t,s,o,r){this.schema=n,this.jtdSchema=t,this.descriptor=s,this.descriptors=o,this.referenceMode=r??!1}convert=n=>{if(this.descriptors)return x(this.descriptors,n,S);if(this.jtdSchema){let t=n;return this.jtdSchema.discriminator&&this.jtdSchema.mapping&&typeof t=="object"&&t!==null&&"input"in t&&(t=t.input),w(this.jtdSchema,t,S)}return this.descriptor?C(this.descriptor,n,S):{success:!1,errors:["No source schema available"]}};toJSON(){if(this.descriptors){let n={schema:this.schema,descriptors:this.descriptors};return this.schema.description&&(n.description=this.schema.description),this.schema.title&&(n.label=this.schema.title),this.referenceMode&&(n.referenceMode=!0),n}return this.descriptor?{schema:this.schema,descriptor:this.descriptor}:{schema:this.schema,jtdSchema:this.jtdSchema}}};function Q(e){let n=e.formats;if(!n||n.length===0)throw new Error("Signal descriptor has no formats");if(n.length===1){let[r]=n,i=q(r);return e.label&&(i.title=e.label),e.description&&(i.description=e.description),i}let t=[];for(let r of n){let i=q(r);r.jtdSchema&&(i.description=i.description?`Structured JSON data. ${i.description}`:"Structured JSON data."),t.push(i)}let s=e.description??"";return{anyOf:t,description:s||void 0}}function q(e){if(e.jtdSchema)return b(e.jtdSchema,e.jtdSchema.definitions,0);if(e.mimeType)return ee(e.mimeType);throw new Error("Signal format has neither jtdSchema nor mimeType")}function ee(e){return{type:"object",description:`Binary content (accepted MIME type: ${e}).`,properties:{data:{type:"string",description:"The base64-encoded binary content."},filename:{type:"string",description:'Filename for the content (e.g. "report.pdf", "image.png").'},mimeType:{type:"string",description:`The concrete MIME type of the content. Must match: ${e}.`}},required:["data","mimeType","filename"],additionalProperties:!1}}function ne(e){let n=e.formats;if(!n||n.length===0)throw new Error("Signal descriptor has no formats");if(n.length===1){let[r]=n,i=U(r);return e.label&&(i.title=e.label),e.description&&(i.description=e.description),i}let t=[];for(let r of n){let i=U(r);r.jtdSchema&&(i.description=i.description?`Structured JSON data. ${i.description}`:"Structured JSON data."),t.push(i)}let s=e.description??"";return{anyOf:t,description:s||void 0}}function U(e){if(e.jtdSchema)return J(e.jtdSchema,e.jtdSchema.definitions,0);if(e.mimeType)return te(e.mimeType);throw new Error("Signal format has neither jtdSchema nor mimeType")}function te(e){return{type:"object",description:`Binary content (accepted MIME type: ${e}).`,properties:{data:{type:"string",description:"The base64-encoded binary content."},filename:{type:"string",description:'Filename for the content (e.g. "report.pdf", "image.png").'},mimeType:{type:"string",description:`The concrete MIME type of the content. Must match: ${e}.`}},required:["data","mimeType","filename"]}}var E=class e{schema;jtdSchema;descriptor;descriptors;referenceMode;static fromJTD(n){let t=J(n,n.definitions,0);return n.discriminator&&n.mapping&&(t={type:"object",properties:{input:t},required:["input"]}),new e(t,n,void 0)}static fromSignal(n,t){let s=ne(n);if(t){let o=R(s,n.description,!1);return new e(o,void 0,n)}return new e(s,void 0,n)}static fromSignals(n,t,s,o){let r={},i=[];for(let a of n){if(!a.name)continue;let u=e.fromSignal(a,o);r[a.name]=u.schema,a.optional||i.push(a.name)}let c={type:"object",properties:r,required:i.length>0?i:void 0};return t&&(c.description=t),s&&(c.title=s),new e(c,void 0,void 0,n,o)}static fromJSON(n){let t=typeof n=="string"?JSON.parse(n):n;if(t.mode!=="fc")throw new Error('Cannot deserialize as GeminiFunctionCallingConversion: mode is not "fc"');if(t.descriptors)return e.fromSignals(t.descriptors,t.description,t.label,t.referenceMode);if(t.descriptor)return e.fromSignal(t.descriptor);if(t.jtdSchema)return e.fromJTD(t.jtdSchema);throw new Error("Cannot deserialize: missing jtdSchema, descriptor, or descriptors")}constructor(n,t,s,o,r){this.schema=n,this.jtdSchema=t,this.descriptor=s,this.descriptors=o,this.referenceMode=r??!1}convert=n=>{if(this.descriptors)return x(this.descriptors,n,y);if(this.jtdSchema){let t=n;return this.jtdSchema.discriminator&&this.jtdSchema.mapping&&typeof t=="object"&&t!==null&&"input"in t&&(t=t.input),w(this.jtdSchema,t,y)}return this.descriptor?C(this.descriptor,n,y):{success:!1,errors:["No source schema available"]}};toJSON(){if(this.descriptors){let n={mode:"fc",schema:this.schema,descriptors:this.descriptors};return this.schema.description&&(n.description=this.schema.description),this.schema.title&&(n.label=this.schema.title),this.referenceMode&&(n.referenceMode=!0),n}return this.descriptor?{mode:"fc",schema:this.schema,descriptor:this.descriptor}:{mode:"fc",schema:this.schema,jtdSchema:this.jtdSchema}}};function ue(e){return O.fromJTD(e)}function pe(e){return O.fromSignal(e)}function fe(e){return E.fromJTD(e)}export{O as GeminiConversion,E as GeminiFunctionCallingConversion,O as GeminiStructuredOutputConversion,pe as convertSignalToGeminiSchema,fe as convertToGeminiFCSchema,ue as convertToGeminiSchema};
|
|
2
2
|
//# sourceMappingURL=gemini.mjs.map
|