@oracle-agent/oracle 0.35.25 → 0.35.27

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.
@@ -66,7 +66,7 @@ var vI=Object.defineProperty;var S=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(
66
66
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function Nr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){o(d);let f=e.seen.get(d),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(m)):Object.assign(l,m),Object.assign(l,u),s._zod.parent===d)for(let g in l)g==="$ref"||g==="allOf"||g in u||delete l[g];if(m.$ref&&f.def)for(let g in l)g==="$ref"||g==="allOf"||g in f.def&&JSON.stringify(l[g])===JSON.stringify(f.def[g])&&delete l[g]}let p=s._zod.parent;if(p&&p!==d){o(p);let f=e.seen.get(p);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let m in l)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(l[m])===JSON.stringify(f.def[m])&&delete l[m]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:bo(t,"input",e.processors),output:bo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function De(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return De(o.element,n);if(o.type==="set")return De(o.valueType,n);if(o.type==="lazy")return De(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return De(o.innerType,n);if(o.type==="intersection")return De(o.left,n)||De(o.right,n);if(o.type==="record"||o.type==="map")return De(o.keyType,n)||De(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:De(o.in,n)||De(o.out,n);if(o.type==="object"){for(let r in o.shape)if(De(o.shape[r],n))return!0;return!1}if(o.type==="union"){for(let r of o.options)if(De(r,n))return!0;return!1}if(o.type==="tuple"){for(let r of o.items)if(De(r,n))return!0;return!!(o.rest&&De(o.rest,n))}return!1}var vh,bo,sa=S(()=>{na();vh=(e,t={})=>n=>{let o=Tr({...n,processors:t});return Z(e,o),Cr(o,e),Nr(o,e)},bo=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},a=Tr({...r??{},target:i,io:t,processors:n});return Z(e,a),Cr(a,e),Nr(a,e)}});function vo(e,t){if("_idmap"in e){let o=e,r=Tr({...t,processors:sl}),i={};for(let c of o._idmap.entries()){let[l,u]=c;Z(u,r)}let a={},s={registry:o,uri:t?.uri,defs:i};r.external=s;for(let c of o._idmap.entries()){let[l,u]=c;Cr(r,u),a[l]=Nr(r,u)}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let n=Tr({...t,processors:sl});return Z(e,n),Cr(n,e),Nr(n,e)}var ET,xh,Sh,Eh,kh,_h,Ah,Ih,$h,Oh,Th,Ch,Nh,Rh,Ph,Lh,Dh,zh,Uh,jh,Bh,Fh,Mh,qh,Hh,Vh,cl,Wh,Kh,Gh,Zh,Jh,Yh,Xh,Qh,eg,tg,rg,ll,ng,sl,ca=S(()=>{sa();D();ET={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},xh=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof a=="number"&&(r.maxLength=a),s&&(r.format=ET[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),l&&(r.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Sh=(e,t,n,o)=>{let r=n,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let d=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),p=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof i=="number"&&(r.minimum=i),p?f?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l:typeof a=="number"&&(r.maximum=a),typeof c=="number"&&(r.multipleOf=c)},Eh=(e,t,n,o)=>{n.type="boolean"},kh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},_h=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ah=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Ih=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$h=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Oh=(e,t,n,o)=>{n.not={}},Th=(e,t,n,o)=>{},Ch=(e,t,n,o)=>{},Nh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Rh=(e,t,n,o)=>{let r=e._zod.def,i=Bi(r.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Ph=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Lh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Dh=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source},zh=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(r,i)},Uh=(e,t,n,o)=>{n.type="boolean"},jh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Bh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Fh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Mh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},qh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Hh=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Z(i.element,t,{...o,path:[...o.path,"items"]})},Vh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let a=i.shape;for(let l in a)r.properties[l]=Z(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let u=i.shape[l]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=!1:i.catchall?i.catchall&&(r.additionalProperties=Z(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},cl=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===!1,a=r.options.map((s,c)=>Z(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=a:n.anyOf=a},Wh=(e,t,n,o)=>{let r=e._zod.def,i=Z(r.left,t,{...o,path:[...o.path,"allOf",0]}),a=Z(r.right,t,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=c},Kh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>Z(p,t,{...o,path:[...o.path,a,f]})),l=i.rest?Z(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,l&&(r.items=l)):t.target==="openapi-3.0"?(r.items={anyOf:c},l&&r.items.anyOf.push(l),r.minItems=c.length,l||(r.maxItems=c.length)):(r.items=c,l&&(r.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(r.minItems=u),typeof d=="number"&&(r.maxItems=d)},Gh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let u=Z(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let d of c)r.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Z(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Z(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(r.required=u)}},Zh=(e,t,n,o)=>{let r=e._zod.def,i=Z(r.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Jh=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},Yh=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Xh=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Qh=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},eg=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?r.out:r.in:r.out;Z(a,t,o);let s=t.seen.get(e);s.ref=a},tg=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=!0},rg=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},ll=(e,t,n,o)=>{let r=e._zod.def;Z(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType},ng=(e,t,n,o)=>{let r=e._zod.innerType;Z(r,t,o);let i=t.seen.get(e);i.ref=r},sl={string:xh,number:Sh,boolean:Eh,bigint:kh,symbol:_h,null:Ah,undefined:Ih,void:$h,never:Oh,any:Th,unknown:Ch,date:Nh,enum:Rh,literal:Ph,nan:Lh,template_literal:Dh,file:zh,success:Uh,custom:jh,function:Bh,transform:Fh,map:Mh,set:qh,array:Hh,object:Vh,union:cl,intersection:Wh,tuple:Kh,record:Gh,nullable:Zh,nonoptional:Jh,default:Yh,prefault:Xh,catch:Qh,pipe:eg,readonly:tg,promise:rg,optional:ll,lazy:ng}});var ul,K0=S(()=>{ca();sa();ul=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Tr({processors:sl,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Z(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Cr(this.ctx,t);let o=Nr(this.ctx,t),{"~standard":r,...i}=o;return i}}});var G0={};var Z0=S(()=>{});var At={};Xe(At,{$ZodAny:()=>Qp,$ZodArray:()=>om,$ZodAsyncError:()=>kt,$ZodBase64:()=>qp,$ZodBase64URL:()=>Hp,$ZodBigInt:()=>Rc,$ZodBigIntFormat:()=>Zp,$ZodBoolean:()=>Yi,$ZodCIDRv4:()=>Bp,$ZodCIDRv6:()=>Fp,$ZodCUID:()=>$p,$ZodCUID2:()=>Op,$ZodCatch:()=>Sm,$ZodCheck:()=>oe,$ZodCheckBigIntFormat:()=>rp,$ZodCheckEndsWith:()=>mp,$ZodCheckGreaterThan:()=>Ac,$ZodCheckIncludes:()=>fp,$ZodCheckLengthEquals:()=>cp,$ZodCheckLessThan:()=>_c,$ZodCheckLowerCase:()=>up,$ZodCheckMaxLength:()=>ap,$ZodCheckMaxSize:()=>np,$ZodCheckMimeType:()=>gp,$ZodCheckMinLength:()=>sp,$ZodCheckMinSize:()=>op,$ZodCheckMultipleOf:()=>ep,$ZodCheckNumberFormat:()=>tp,$ZodCheckOverwrite:()=>yp,$ZodCheckProperty:()=>hp,$ZodCheckRegex:()=>lp,$ZodCheckSizeEquals:()=>ip,$ZodCheckStartsWith:()=>pp,$ZodCheckStringFormat:()=>lo,$ZodCheckUpperCase:()=>dp,$ZodCodec:()=>Qi,$ZodCustom:()=>Tm,$ZodCustomStringFormat:()=>Kp,$ZodDate:()=>nm,$ZodDefault:()=>wm,$ZodDiscriminatedUnion:()=>sm,$ZodE164:()=>Vp,$ZodEmail:()=>kp,$ZodEmoji:()=>Ap,$ZodEncodeError:()=>pr,$ZodEnum:()=>fm,$ZodError:()=>Vi,$ZodExactOptional:()=>gm,$ZodFile:()=>mm,$ZodFunction:()=>Im,$ZodGUID:()=>Sp,$ZodIPv4:()=>zp,$ZodIPv6:()=>Up,$ZodISODate:()=>Pp,$ZodISODateTime:()=>Rp,$ZodISODuration:()=>Dp,$ZodISOTime:()=>Lp,$ZodIntersection:()=>cm,$ZodJWT:()=>Wp,$ZodKSUID:()=>Np,$ZodLazy:()=>Om,$ZodLiteral:()=>pm,$ZodMAC:()=>jp,$ZodMap:()=>um,$ZodNaN:()=>Em,$ZodNanoID:()=>Ip,$ZodNever:()=>tm,$ZodNonOptional:()=>vm,$ZodNull:()=>Xp,$ZodNullable:()=>ym,$ZodNumber:()=>Nc,$ZodNumberFormat:()=>Gp,$ZodObject:()=>Zb,$ZodObjectJIT:()=>im,$ZodOptional:()=>Lc,$ZodPipe:()=>Dc,$ZodPrefault:()=>bm,$ZodPreprocess:()=>km,$ZodPromise:()=>$m,$ZodReadonly:()=>_m,$ZodRealError:()=>Ve,$ZodRecord:()=>lm,$ZodRegistry:()=>Bc,$ZodSet:()=>dm,$ZodString:()=>un,$ZodStringFormat:()=>te,$ZodSuccess:()=>xm,$ZodSymbol:()=>Jp,$ZodTemplateLiteral:()=>Am,$ZodTransform:()=>hm,$ZodTuple:()=>Pc,$ZodType:()=>B,$ZodULID:()=>Tp,$ZodURL:()=>_p,$ZodUUID:()=>Ep,$ZodUndefined:()=>Yp,$ZodUnion:()=>Xi,$ZodUnknown:()=>em,$ZodVoid:()=>rm,$ZodXID:()=>Cp,$ZodXor:()=>am,$brand:()=>Ui,$constructor:()=>y,$input:()=>ra,$output:()=>ta,Doc:()=>Ji,JSONSchema:()=>G0,JSONSchemaGenerator:()=>ul,NEVER:()=>zi,TimePrecision:()=>aa,_any:()=>ih,_array:()=>fh,_base64:()=>nl,_base64url:()=>ol,_bigint:()=>Xm,_boolean:()=>Jm,_catch:()=>yT,_check:()=>V0,_cidrv4:()=>tl,_cidrv6:()=>rl,_coercedBigint:()=>Qm,_coercedBoolean:()=>Ym,_coercedDate:()=>uh,_coercedNumber:()=>Hm,_coercedString:()=>zm,_cuid:()=>Gc,_cuid2:()=>Zc,_custom:()=>mh,_date:()=>lh,_decode:()=>hc,_decodeAsync:()=>yc,_default:()=>mT,_discriminatedUnion:()=>rT,_e164:()=>il,_email:()=>Fc,_emoji:()=>Wc,_encode:()=>mc,_encodeAsync:()=>gc,_endsWith:()=>Er,_enum:()=>cT,_file:()=>ph,_float32:()=>Wm,_float64:()=>Km,_gt:()=>lt,_gte:()=>Ae,_guid:()=>oa,_includes:()=>xr,_int:()=>Vm,_int32:()=>Gm,_int64:()=>eh,_intersection:()=>nT,_ipv4:()=>Qc,_ipv6:()=>el,_isoDate:()=>Bm,_isoDateTime:()=>jm,_isoDuration:()=>Mm,_isoTime:()=>Fm,_jwt:()=>al,_ksuid:()=>Xc,_lazy:()=>xT,_length:()=>Xt,_literal:()=>uT,_lowercase:()=>br,_lt:()=>ct,_lte:()=>Le,_mac:()=>Um,_map:()=>aT,_max:()=>Le,_maxLength:()=>Yt,_maxSize:()=>Ut,_mime:()=>kr,_min:()=>Ae,_minLength:()=>_t,_minSize:()=>ut,_multipleOf:()=>zt,_nan:()=>dh,_nanoid:()=>Kc,_nativeEnum:()=>lT,_negative:()=>mo,_never:()=>sh,_nonnegative:()=>go,_nonoptional:()=>hT,_nonpositive:()=>ho,_normalize:()=>_r,_null:()=>oh,_nullable:()=>pT,_number:()=>qm,_optional:()=>fT,_overwrite:()=>et,_parse:()=>io,_parseAsync:()=>ao,_pipe:()=>wT,_positive:()=>po,_promise:()=>ST,_property:()=>yo,_readonly:()=>bT,_record:()=>iT,_refine:()=>hh,_regex:()=>wr,_safeDecode:()=>bc,_safeDecodeAsync:()=>xc,_safeEncode:()=>wc,_safeEncodeAsync:()=>vc,_safeParse:()=>so,_safeParseAsync:()=>co,_set:()=>sT,_size:()=>Jt,_slugify:()=>Or,_startsWith:()=>Sr,_string:()=>Dm,_stringFormat:()=>wo,_stringbool:()=>bh,_success:()=>gT,_superRefine:()=>gh,_symbol:()=>rh,_templateLiteral:()=>vT,_toLowerCase:()=>Ir,_toUpperCase:()=>$r,_transform:()=>dT,_trim:()=>Ar,_tuple:()=>oT,_uint32:()=>Zm,_uint64:()=>th,_ulid:()=>Jc,_undefined:()=>nh,_union:()=>eT,_unknown:()=>ah,_uppercase:()=>vr,_url:()=>ia,_uuid:()=>Mc,_uuidv4:()=>qc,_uuidv6:()=>Hc,_uuidv7:()=>Vc,_void:()=>ch,_xid:()=>Yc,_xor:()=>tT,clone:()=>_e,config:()=>ie,createStandardJSONSchemaMethod:()=>bo,createToJSONSchemaMethod:()=>vh,decode:()=>S$,decodeAsync:()=>k$,describe:()=>yh,encode:()=>x$,encodeAsync:()=>E$,extractDefs:()=>Cr,finalize:()=>Nr,flattenError:()=>sn,formatError:()=>cn,globalConfig:()=>nn,globalRegistry:()=>he,initializeContext:()=>Tr,isValidBase64:()=>Mp,isValidBase64URL:()=>Vb,isValidJWT:()=>Wb,locales:()=>dn,meta:()=>wh,parse:()=>fc,parseAsync:()=>pc,prettifyError:()=>Ki,process:()=>Z,regexes:()=>Pe,registry:()=>fo,safeDecode:()=>A$,safeDecodeAsync:()=>$$,safeEncode:()=>_$,safeEncodeAsync:()=>I$,safeParse:()=>Sf,safeParseAsync:()=>Ef,toDotPath:()=>kb,toJSONSchema:()=>vo,treeifyError:()=>Wi,util:()=>O,version:()=>bp});var tt=S(()=>{on();kf();xf();Cm();Ic();vp();D();kc();Lm();na();wp();W0();sa();ca();K0();Z0()});var dl={};Xe(dl,{endsWith:()=>Er,gt:()=>lt,gte:()=>Ae,includes:()=>xr,length:()=>Xt,lowercase:()=>br,lt:()=>ct,lte:()=>Le,maxLength:()=>Yt,maxSize:()=>Ut,mime:()=>kr,minLength:()=>_t,minSize:()=>ut,multipleOf:()=>zt,negative:()=>mo,nonnegative:()=>go,nonpositive:()=>ho,normalize:()=>_r,overwrite:()=>et,positive:()=>po,property:()=>yo,regex:()=>wr,size:()=>Jt,slugify:()=>Or,startsWith:()=>Sr,toLowerCase:()=>Ir,toUpperCase:()=>$r,trim:()=>Ar,uppercase:()=>vr});var fl=S(()=>{tt()});var Rr={};Xe(Rr,{ZodISODate:()=>So,ZodISODateTime:()=>xo,ZodISODuration:()=>ko,ZodISOTime:()=>Eo,date:()=>ig,datetime:()=>og,duration:()=>sg,time:()=>ag});function og(e){return jm(xo,e)}function ig(e){return Bm(So,e)}function ag(e){return Fm(Eo,e)}function sg(e){return Mm(ko,e)}var xo,So,Eo,ko,la=S(()=>{tt();da();xo=y("ZodISODateTime",(e,t)=>{Rp.init(e,t),J.init(e,t)});So=y("ZodISODate",(e,t)=>{Pp.init(e,t),J.init(e,t)});Eo=y("ZodISOTime",(e,t)=>{Lp.init(e,t),J.init(e,t)});ko=y("ZodISODuration",(e,t)=>{Dp.init(e,t),J.init(e,t)})});var J0,cg,$e,lg=S(()=>{tt();tt();D();J0=(e,t)=>{Vi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>cn(e,n)},flatten:{value:n=>sn(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ro,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ro,2)}},isEmpty:{get(){return e.issues.length===0}}})},cg=y("ZodError",J0),$e=y("ZodError",J0,{Parent:Error})});var fa,pa,ma,ha,ga,ya,wa,ba,va,xa,Sa,Ea,ug=S(()=>{tt();lg();fa=io($e),pa=ao($e),ma=so($e),ha=co($e),ga=mc($e),ya=hc($e),wa=gc($e),ba=yc($e),va=wc($e),xa=bc($e),Sa=vc($e),Ea=xc($e)});var ua={};Xe(ua,{ZodAny:()=>Na,ZodArray:()=>Da,ZodBase64:()=>Bo,ZodBase64URL:()=>Fo,ZodBigInt:()=>Br,ZodBigIntFormat:()=>Ho,ZodBoolean:()=>jr,ZodCIDRv4:()=>Uo,ZodCIDRv6:()=>jo,ZodCUID:()=>Co,ZodCUID2:()=>No,ZodCatch:()=>os,ZodCodec:()=>Sn,ZodCustom:()=>En,ZodCustomStringFormat:()=>zr,ZodDate:()=>yn,ZodDefault:()=>Xa,ZodDiscriminatedUnion:()=>Ua,ZodE164:()=>Mo,ZodEmail:()=>$o,ZodEmoji:()=>Oo,ZodEnum:()=>Lr,ZodExactOptional:()=>Za,ZodFile:()=>Ka,ZodFunction:()=>ms,ZodGUID:()=>pn,ZodIPv4:()=>Do,ZodIPv6:()=>zo,ZodIntersection:()=>ja,ZodJWT:()=>qo,ZodKSUID:()=>Lo,ZodLazy:()=>ds,ZodLiteral:()=>Wa,ZodMAC:()=>_a,ZodMap:()=>Ha,ZodNaN:()=>as,ZodNanoID:()=>To,ZodNever:()=>Pa,ZodNonOptional:()=>Jo,ZodNull:()=>Ta,ZodNullable:()=>Ya,ZodNumber:()=>Ur,ZodNumberFormat:()=>er,ZodObject:()=>bn,ZodOptional:()=>Zo,ZodPipe:()=>xn,ZodPrefault:()=>es,ZodPreprocess:()=>ss,ZodPromise:()=>ps,ZodReadonly:()=>cs,ZodRecord:()=>Pr,ZodSet:()=>Va,ZodString:()=>Dr,ZodStringFormat:()=>J,ZodSuccess:()=>ns,ZodSymbol:()=>$a,ZodTemplateLiteral:()=>us,ZodTransform:()=>Ga,ZodTuple:()=>Fa,ZodType:()=>F,ZodULID:()=>Ro,ZodURL:()=>gn,ZodUUID:()=>dt,ZodUndefined:()=>Oa,ZodUnion:()=>vn,ZodUnknown:()=>Ra,ZodVoid:()=>La,ZodXID:()=>Po,ZodXor:()=>za,_ZodString:()=>Io,_default:()=>Qa,_function:()=>bu,any:()=>Jl,array:()=>wn,base64:()=>Rl,base64url:()=>Pl,bigint:()=>Vl,boolean:()=>Ia,catch:()=>is,check:()=>vu,cidrv4:()=>Cl,cidrv6:()=>Nl,codec:()=>hu,cuid:()=>El,cuid2:()=>kl,custom:()=>xu,date:()=>Xl,describe:()=>Su,discriminatedUnion:()=>ou,e164:()=>Ll,email:()=>pl,emoji:()=>xl,enum:()=>Ko,exactOptional:()=>Ja,file:()=>du,float32:()=>Fl,float64:()=>Ml,function:()=>bu,guid:()=>ml,hash:()=>Bl,hex:()=>jl,hostname:()=>Ul,httpUrl:()=>vl,instanceof:()=>ku,int:()=>_o,int32:()=>ql,int64:()=>Wl,intersection:()=>Ba,invertCodec:()=>gu,ipv4:()=>$l,ipv6:()=>Tl,json:()=>Au,jwt:()=>Dl,keyof:()=>Ql,ksuid:()=>Il,lazy:()=>fs,literal:()=>uu,looseObject:()=>ru,looseRecord:()=>au,mac:()=>Ol,map:()=>su,meta:()=>Eu,nan:()=>mu,nanoid:()=>Sl,nativeEnum:()=>lu,never:()=>Vo,nonoptional:()=>rs,null:()=>Ca,nullable:()=>hn,nullish:()=>fu,number:()=>Aa,object:()=>eu,optional:()=>mn,partialRecord:()=>iu,pipe:()=>Ao,prefault:()=>ts,preprocess:()=>Iu,promise:()=>wu,readonly:()=>ls,record:()=>qa,refine:()=>hs,set:()=>cu,strictObject:()=>tu,string:()=>fn,stringFormat:()=>zl,stringbool:()=>_u,success:()=>pu,superRefine:()=>gs,symbol:()=>Gl,templateLiteral:()=>yu,transform:()=>Go,tuple:()=>Ma,uint32:()=>Hl,uint64:()=>Kl,ulid:()=>_l,undefined:()=>Zl,union:()=>Wo,unknown:()=>Qt,url:()=>bl,uuid:()=>hl,uuidv4:()=>gl,uuidv6:()=>yl,uuidv7:()=>wl,void:()=>Yl,xid:()=>Al,xor:()=>nu});function ka(e,t,n){let o=Object.getPrototypeOf(e),r=Y0.get(o);if(r||(r=new Set,Y0.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}function fn(e){return Dm(Dr,e)}function pl(e){return Fc($o,e)}function ml(e){return oa(pn,e)}function hl(e){return Mc(dt,e)}function gl(e){return qc(dt,e)}function yl(e){return Hc(dt,e)}function wl(e){return Vc(dt,e)}function bl(e){return ia(gn,e)}function vl(e){return ia(gn,{protocol:Pe.httpProtocol,hostname:Pe.domain,...O.normalizeParams(e)})}function xl(e){return Wc(Oo,e)}function Sl(e){return Kc(To,e)}function El(e){return Gc(Co,e)}function kl(e){return Zc(No,e)}function _l(e){return Jc(Ro,e)}function Al(e){return Yc(Po,e)}function Il(e){return Xc(Lo,e)}function $l(e){return Qc(Do,e)}function Ol(e){return Um(_a,e)}function Tl(e){return el(zo,e)}function Cl(e){return tl(Uo,e)}function Nl(e){return rl(jo,e)}function Rl(e){return nl(Bo,e)}function Pl(e){return ol(Fo,e)}function Ll(e){return il(Mo,e)}function Dl(e){return al(qo,e)}function zl(e,t,n={}){return wo(zr,e,t,n)}function Ul(e){return wo(zr,"hostname",Pe.hostname,e)}function jl(e){return wo(zr,"hex",Pe.hex,e)}function Bl(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=Pe[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return wo(zr,o,r,t)}function Aa(e){return qm(Ur,e)}function _o(e){return Vm(er,e)}function Fl(e){return Wm(er,e)}function Ml(e){return Km(er,e)}function ql(e){return Gm(er,e)}function Hl(e){return Zm(er,e)}function Ia(e){return Jm(jr,e)}function Vl(e){return Xm(Br,e)}function Wl(e){return eh(Ho,e)}function Kl(e){return th(Ho,e)}function Gl(e){return rh($a,e)}function Zl(e){return nh(Oa,e)}function Ca(e){return oh(Ta,e)}function Jl(){return ih(Na)}function Qt(){return ah(Ra)}function Vo(e){return sh(Pa,e)}function Yl(e){return ch(La,e)}function Xl(e){return lh(yn,e)}function wn(e,t){return fh(Da,e,t)}function Ql(e){let t=e._zod.def.shape;return Ko(Object.keys(t))}function eu(e,t){let n={type:"object",shape:e??{},...O.normalizeParams(t)};return new bn(n)}function tu(e,t){return new bn({type:"object",shape:e,catchall:Vo(),...O.normalizeParams(t)})}function ru(e,t){return new bn({type:"object",shape:e,catchall:Qt(),...O.normalizeParams(t)})}function Wo(e,t){return new vn({type:"union",options:e,...O.normalizeParams(t)})}function nu(e,t){return new za({type:"union",options:e,inclusive:!1,...O.normalizeParams(t)})}function ou(e,t,n){return new Ua({type:"union",options:t,discriminator:e,...O.normalizeParams(n)})}function Ba(e,t){return new ja({type:"intersection",left:e,right:t})}function Ma(e,t,n){let o=t instanceof B,r=o?n:t,i=o?t:null;return new Fa({type:"tuple",items:e,rest:i,...O.normalizeParams(r)})}function qa(e,t,n){return!t||!t._zod?new Pr({type:"record",keyType:fn(),valueType:e,...O.normalizeParams(t)}):new Pr({type:"record",keyType:e,valueType:t,...O.normalizeParams(n)})}function iu(e,t,n){let o=_e(e);return o._zod.values=void 0,new Pr({type:"record",keyType:o,valueType:t,...O.normalizeParams(n)})}function au(e,t,n){return new Pr({type:"record",keyType:e,valueType:t,mode:"loose",...O.normalizeParams(n)})}function su(e,t,n){return new Ha({type:"map",keyType:e,valueType:t,...O.normalizeParams(n)})}function cu(e,t){return new Va({type:"set",valueType:e,...O.normalizeParams(t)})}function Ko(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Lr({type:"enum",entries:n,...O.normalizeParams(t)})}function lu(e,t){return new Lr({type:"enum",entries:e,...O.normalizeParams(t)})}function uu(e,t){return new Wa({type:"literal",values:Array.isArray(e)?e:[e],...O.normalizeParams(t)})}function du(e){return ph(Ka,e)}function Go(e){return new Ga({type:"transform",transform:e})}function mn(e){return new Zo({type:"optional",innerType:e})}function Ja(e){return new Za({type:"optional",innerType:e})}function hn(e){return new Ya({type:"nullable",innerType:e})}function fu(e){return mn(hn(e))}function Qa(e,t){return new Xa({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():O.shallowClone(t)}})}function ts(e,t){return new es({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():O.shallowClone(t)}})}function rs(e,t){return new Jo({type:"nonoptional",innerType:e,...O.normalizeParams(t)})}function pu(e){return new ns({type:"success",innerType:e})}function is(e,t){return new os({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function mu(e){return dh(as,e)}function Ao(e,t){return new xn({type:"pipe",in:e,out:t})}function hu(e,t,n){return new Sn({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function gu(e){let t=e._zod.def;return new Sn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function ls(e){return new cs({type:"readonly",innerType:e})}function yu(e,t){return new us({type:"template_literal",parts:e,...O.normalizeParams(t)})}function fs(e){return new ds({type:"lazy",getter:e})}function wu(e){return new ps({type:"promise",innerType:e})}function bu(e){return new ms({type:"function",input:Array.isArray(e?.input)?Ma(e?.input):e?.input??wn(Qt()),output:e?.output??Qt()})}function vu(e){let t=new oe({check:"custom"});return t._zod.check=e,t}function xu(e,t){return mh(En,e??(()=>!0),t)}function hs(e,t={}){return hh(En,e,t)}function gs(e,t){return gh(e,t)}function ku(e,t={}){let n=new En({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...O.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Au(e){let t=fs(()=>Wo([fn(e),Aa(),Ia(),Ca(),wn(t),qa(fn(),t)]));return t}function Iu(e,t){return new ss({type:"pipe",in:Go(e),out:t})}var Y0,F,Io,Dr,J,$o,pn,dt,gn,Oo,To,Co,No,Ro,Po,Lo,Do,_a,zo,Uo,jo,Bo,Fo,Mo,qo,zr,Ur,er,jr,Br,Ho,$a,Oa,Ta,Na,Ra,Pa,La,yn,Da,bn,vn,za,Ua,ja,Fa,Pr,Ha,Va,Lr,Wa,Ka,Ga,Zo,Za,Ya,Xa,es,Jo,ns,os,as,xn,Sn,ss,cs,us,ds,ps,ms,En,Su,Eu,_u,da=S(()=>{tt();tt();ca();sa();fl();la();ug();Y0=new WeakMap;F=y("ZodType",(e,t)=>(B.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:bo(e,"input"),output:bo(e,"output")}}),e.toJSONSchema=vh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>fa(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>ma(e,n,o),e.parseAsync=async(n,o)=>pa(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>ha(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>ga(e,n,o),e.decode=(n,o)=>ya(e,n,o),e.encodeAsync=async(n,o)=>wa(e,n,o),e.decodeAsync=async(n,o)=>ba(e,n,o),e.safeEncode=(n,o)=>va(e,n,o),e.safeDecode=(n,o)=>xa(e,n,o),e.safeEncodeAsync=async(n,o)=>Sa(e,n,o),e.safeDecodeAsync=async(n,o)=>Ea(e,n,o),ka(e,"ZodType",{check(...n){let o=this.def;return this.clone(O.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return _e(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(hs(n,o))},superRefine(n,o){return this.check(gs(n,o))},overwrite(n){return this.check(et(n))},optional(){return mn(this)},exactOptional(){return Ja(this)},nullable(){return hn(this)},nullish(){return mn(hn(this))},nonoptional(n){return rs(this,n)},array(){return wn(this)},or(n){return Wo([this,n])},and(n){return Ba(this,n)},transform(n){return Ao(this,Go(n))},default(n){return Qa(this,n)},prefault(n){return ts(this,n)},catch(n){return is(this,n)},pipe(n){return Ao(this,n)},readonly(){return ls(this)},describe(n){let o=this.clone();return he.add(o,{description:n}),o},meta(...n){if(n.length===0)return he.get(this);let o=this.clone();return he.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return he.get(e)?.description},configurable:!0}),e)),Io=y("_ZodString",(e,t)=>{un.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,r,i)=>xh(e,o,r,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ka(e,"_ZodString",{regex(...o){return this.check(wr(...o))},includes(...o){return this.check(xr(...o))},startsWith(...o){return this.check(Sr(...o))},endsWith(...o){return this.check(Er(...o))},min(...o){return this.check(_t(...o))},max(...o){return this.check(Yt(...o))},length(...o){return this.check(Xt(...o))},nonempty(...o){return this.check(_t(1,...o))},lowercase(o){return this.check(br(o))},uppercase(o){return this.check(vr(o))},trim(){return this.check(Ar())},normalize(...o){return this.check(_r(...o))},toLowerCase(){return this.check(Ir())},toUpperCase(){return this.check($r())},slugify(){return this.check(Or())}})}),Dr=y("ZodString",(e,t)=>{un.init(e,t),Io.init(e,t),e.email=n=>e.check(Fc($o,n)),e.url=n=>e.check(ia(gn,n)),e.jwt=n=>e.check(al(qo,n)),e.emoji=n=>e.check(Wc(Oo,n)),e.guid=n=>e.check(oa(pn,n)),e.uuid=n=>e.check(Mc(dt,n)),e.uuidv4=n=>e.check(qc(dt,n)),e.uuidv6=n=>e.check(Hc(dt,n)),e.uuidv7=n=>e.check(Vc(dt,n)),e.nanoid=n=>e.check(Kc(To,n)),e.guid=n=>e.check(oa(pn,n)),e.cuid=n=>e.check(Gc(Co,n)),e.cuid2=n=>e.check(Zc(No,n)),e.ulid=n=>e.check(Jc(Ro,n)),e.base64=n=>e.check(nl(Bo,n)),e.base64url=n=>e.check(ol(Fo,n)),e.xid=n=>e.check(Yc(Po,n)),e.ksuid=n=>e.check(Xc(Lo,n)),e.ipv4=n=>e.check(Qc(Do,n)),e.ipv6=n=>e.check(el(zo,n)),e.cidrv4=n=>e.check(tl(Uo,n)),e.cidrv6=n=>e.check(rl(jo,n)),e.e164=n=>e.check(il(Mo,n)),e.datetime=n=>e.check(og(n)),e.date=n=>e.check(ig(n)),e.time=n=>e.check(ag(n)),e.duration=n=>e.check(sg(n))});J=y("ZodStringFormat",(e,t)=>{te.init(e,t),Io.init(e,t)}),$o=y("ZodEmail",(e,t)=>{kp.init(e,t),J.init(e,t)});pn=y("ZodGUID",(e,t)=>{Sp.init(e,t),J.init(e,t)});dt=y("ZodUUID",(e,t)=>{Ep.init(e,t),J.init(e,t)});gn=y("ZodURL",(e,t)=>{_p.init(e,t),J.init(e,t)});Oo=y("ZodEmoji",(e,t)=>{Ap.init(e,t),J.init(e,t)});To=y("ZodNanoID",(e,t)=>{Ip.init(e,t),J.init(e,t)});Co=y("ZodCUID",(e,t)=>{$p.init(e,t),J.init(e,t)});No=y("ZodCUID2",(e,t)=>{Op.init(e,t),J.init(e,t)});Ro=y("ZodULID",(e,t)=>{Tp.init(e,t),J.init(e,t)});Po=y("ZodXID",(e,t)=>{Cp.init(e,t),J.init(e,t)});Lo=y("ZodKSUID",(e,t)=>{Np.init(e,t),J.init(e,t)});Do=y("ZodIPv4",(e,t)=>{zp.init(e,t),J.init(e,t)});_a=y("ZodMAC",(e,t)=>{jp.init(e,t),J.init(e,t)});zo=y("ZodIPv6",(e,t)=>{Up.init(e,t),J.init(e,t)});Uo=y("ZodCIDRv4",(e,t)=>{Bp.init(e,t),J.init(e,t)});jo=y("ZodCIDRv6",(e,t)=>{Fp.init(e,t),J.init(e,t)});Bo=y("ZodBase64",(e,t)=>{qp.init(e,t),J.init(e,t)});Fo=y("ZodBase64URL",(e,t)=>{Hp.init(e,t),J.init(e,t)});Mo=y("ZodE164",(e,t)=>{Vp.init(e,t),J.init(e,t)});qo=y("ZodJWT",(e,t)=>{Wp.init(e,t),J.init(e,t)});zr=y("ZodCustomStringFormat",(e,t)=>{Kp.init(e,t),J.init(e,t)});Ur=y("ZodNumber",(e,t)=>{Nc.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Sh(e,o,r,i),ka(e,"ZodNumber",{gt(o,r){return this.check(lt(o,r))},gte(o,r){return this.check(Ae(o,r))},min(o,r){return this.check(Ae(o,r))},lt(o,r){return this.check(ct(o,r))},lte(o,r){return this.check(Le(o,r))},max(o,r){return this.check(Le(o,r))},int(o){return this.check(_o(o))},safe(o){return this.check(_o(o))},positive(o){return this.check(lt(0,o))},nonnegative(o){return this.check(Ae(0,o))},negative(o){return this.check(ct(0,o))},nonpositive(o){return this.check(Le(0,o))},multipleOf(o,r){return this.check(zt(o,r))},step(o,r){return this.check(zt(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});er=y("ZodNumberFormat",(e,t)=>{Gp.init(e,t),Ur.init(e,t)});jr=y("ZodBoolean",(e,t)=>{Yi.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Eh(e,n,o,r)});Br=y("ZodBigInt",(e,t)=>{Rc.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,r,i)=>kh(e,o,r,i),e.gte=(o,r)=>e.check(Ae(o,r)),e.min=(o,r)=>e.check(Ae(o,r)),e.gt=(o,r)=>e.check(lt(o,r)),e.gte=(o,r)=>e.check(Ae(o,r)),e.min=(o,r)=>e.check(Ae(o,r)),e.lt=(o,r)=>e.check(ct(o,r)),e.lte=(o,r)=>e.check(Le(o,r)),e.max=(o,r)=>e.check(Le(o,r)),e.positive=o=>e.check(lt(BigInt(0),o)),e.negative=o=>e.check(ct(BigInt(0),o)),e.nonpositive=o=>e.check(Le(BigInt(0),o)),e.nonnegative=o=>e.check(Ae(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(zt(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});Ho=y("ZodBigIntFormat",(e,t)=>{Zp.init(e,t),Br.init(e,t)});$a=y("ZodSymbol",(e,t)=>{Jp.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_h(e,n,o,r)});Oa=y("ZodUndefined",(e,t)=>{Yp.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ih(e,n,o,r)});Ta=y("ZodNull",(e,t)=>{Xp.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ah(e,n,o,r)});Na=y("ZodAny",(e,t)=>{Qp.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Th(e,n,o,r)});Ra=y("ZodUnknown",(e,t)=>{em.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ch(e,n,o,r)});Pa=y("ZodNever",(e,t)=>{tm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Oh(e,n,o,r)});La=y("ZodVoid",(e,t)=>{rm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>$h(e,n,o,r)});yn=y("ZodDate",(e,t)=>{nm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Nh(e,o,r,i),e.min=(o,r)=>e.check(Ae(o,r)),e.max=(o,r)=>e.check(Le(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Da=y("ZodArray",(e,t)=>{om.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hh(e,n,o,r),e.element=t.element,ka(e,"ZodArray",{min(n,o){return this.check(_t(n,o))},nonempty(n){return this.check(_t(1,n))},max(n,o){return this.check(Yt(n,o))},length(n,o){return this.check(Xt(n,o))},unwrap(){return this.element}})});bn=y("ZodObject",(e,t)=>{im.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vh(e,n,o,r),O.defineLazy(e,"shape",()=>t.shape),ka(e,"ZodObject",{keyof(){return Ko(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Qt()})},loose(){return this.clone({...this._zod.def,catchall:Qt()})},strict(){return this.clone({...this._zod.def,catchall:Vo()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return O.extend(this,n)},safeExtend(n){return O.safeExtend(this,n)},merge(n){return O.merge(this,n)},pick(n){return O.pick(this,n)},omit(n){return O.omit(this,n)},partial(...n){return O.partial(Zo,this,n[0])},required(...n){return O.required(Jo,this,n[0])}})});vn=y("ZodUnion",(e,t)=>{Xi.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cl(e,n,o,r),e.options=t.options});za=y("ZodXor",(e,t)=>{vn.init(e,t),am.init(e,t),e._zod.processJSONSchema=(n,o,r)=>cl(e,n,o,r),e.options=t.options});Ua=y("ZodDiscriminatedUnion",(e,t)=>{vn.init(e,t),sm.init(e,t)});ja=y("ZodIntersection",(e,t)=>{cm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wh(e,n,o,r)});Fa=y("ZodTuple",(e,t)=>{Pc.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kh(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});Pr=y("ZodRecord",(e,t)=>{lm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gh(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType});Ha=y("ZodMap",(e,t)=>{um.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Mh(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(ut(...n)),e.nonempty=n=>e.check(ut(1,n)),e.max=(...n)=>e.check(Ut(...n)),e.size=(...n)=>e.check(Jt(...n))});Va=y("ZodSet",(e,t)=>{dm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qh(e,n,o,r),e.min=(...n)=>e.check(ut(...n)),e.nonempty=n=>e.check(ut(1,n)),e.max=(...n)=>e.check(Ut(...n)),e.size=(...n)=>e.check(Jt(...n))});Lr=y("ZodEnum",(e,t)=>{fm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Rh(e,o,r,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Lr({...t,checks:[],...O.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Lr({...t,checks:[],...O.normalizeParams(r),entries:i})}});Wa=y("ZodLiteral",(e,t)=>{pm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ph(e,n,o,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});Ka=y("ZodFile",(e,t)=>{mm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>zh(e,n,o,r),e.min=(n,o)=>e.check(ut(n,o)),e.max=(n,o)=>e.check(Ut(n,o)),e.mime=(n,o)=>e.check(kr(Array.isArray(n)?n:[n],o))});Ga=y("ZodTransform",(e,t)=>{hm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Fh(e,n,o,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new pr(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(O.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(O.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});Zo=y("ZodOptional",(e,t)=>{Lc.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ll(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});Za=y("ZodExactOptional",(e,t)=>{gm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ll(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});Ya=y("ZodNullable",(e,t)=>{ym.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});Xa=y("ZodDefault",(e,t)=>{wm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});es=y("ZodPrefault",(e,t)=>{bm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});Jo=y("ZodNonOptional",(e,t)=>{vm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Jh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ns=y("ZodSuccess",(e,t)=>{xm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Uh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});os=y("ZodCatch",(e,t)=>{Sm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});as=y("ZodNaN",(e,t)=>{Em.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lh(e,n,o,r)});xn=y("ZodPipe",(e,t)=>{Dc.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>eg(e,n,o,r),e.in=t.in,e.out=t.out});Sn=y("ZodCodec",(e,t)=>{xn.init(e,t),Qi.init(e,t)});ss=y("ZodPreprocess",(e,t)=>{xn.init(e,t),km.init(e,t)}),cs=y("ZodReadonly",(e,t)=>{_m.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>tg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});us=y("ZodTemplateLiteral",(e,t)=>{Am.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Dh(e,n,o,r)});ds=y("ZodLazy",(e,t)=>{Om.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ng(e,n,o,r),e.unwrap=()=>e._zod.def.getter()});ps=y("ZodPromise",(e,t)=>{$m.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rg(e,n,o,r),e.unwrap=()=>e._zod.def.innerType});ms=y("ZodFunction",(e,t)=>{Im.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bh(e,n,o,r)});En=y("ZodCustom",(e,t)=>{Tm.init(e,t),F.init(e,t),e._zod.processJSONSchema=(n,o,r)=>jh(e,n,o,r)});Su=yh,Eu=wh;_u=(...e)=>bh({Codec:Sn,Boolean:jr,String:Dr},...e)});function fg(e){ie({customError:e})}function pg(){return ie().customError}var dg,ys,X0=S(()=>{tt();dg={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};ys||(ys={})});function IT(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function $T(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function Q0(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return R.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return R.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=$T(r,t),a=Oe(i,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return R.null();if(r.length===0)return R.never();if(r.length===1)return R.literal(r[0]);if(r.every(a=>typeof a=="string"))return R.enum(r);let i=r.map(a=>R.literal(a));return i.length<2?i[0]:R.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return R.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let a={...e,type:i};return Q0(a,t)});return r.length===0?R.never():r.length===1?r[0]:R.union(r)}if(!n)return R.any();let o;switch(n){case"string":{let r=R.string();if(e.format){let i=e.format;i==="email"?r=r.check(R.email()):i==="uri"||i==="uri-reference"?r=r.check(R.url()):i==="uuid"||i==="guid"?r=r.check(R.uuid()):i==="date-time"?r=r.check(R.iso.datetime()):i==="date"?r=r.check(R.iso.date()):i==="time"?r=r.check(R.iso.time()):i==="duration"?r=r.check(R.iso.duration()):i==="ipv4"?r=r.check(R.ipv4()):i==="ipv6"?r=r.check(R.ipv6()):i==="mac"?r=r.check(R.mac()):i==="cidr"?r=r.check(R.cidrv4()):i==="cidr-v6"?r=r.check(R.cidrv6()):i==="base64"?r=r.check(R.base64()):i==="base64url"?r=r.check(R.base64url()):i==="e164"?r=r.check(R.e164()):i==="jwt"?r=r.check(R.jwt()):i==="emoji"?r=r.check(R.emoji()):i==="nanoid"?r=r.check(R.nanoid()):i==="cuid"?r=r.check(R.cuid()):i==="cuid2"?r=r.check(R.cuid2()):i==="ulid"?r=r.check(R.ulid()):i==="xid"?r=r.check(R.xid()):i==="ksuid"&&(r=r.check(R.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case"number":case"integer":{let r=n==="integer"?R.number().int():R.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case"boolean":{o=R.boolean();break}case"null":{o=R.null();break}case"object":{let r={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let u=Oe(l,t);r[c]=a.has(c)?u:u.optional()}if(e.propertyNames){let c=Oe(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Oe(e.additionalProperties,t):R.any();if(Object.keys(r).length===0){o=R.record(c,l);break}let u=R.object(r).passthrough(),d=R.looseRecord(c,l);o=R.intersection(u,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let p of l){let f=Oe(c[p],t),m=R.string().regex(new RegExp(p));u.push(R.looseRecord(m,f))}let d=[];if(Object.keys(r).length>0&&d.push(R.object(r).passthrough()),d.push(...u),d.length===0)o=R.object({}).passthrough();else if(d.length===1)o=d[0];else{let p=R.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=R.intersection(p,d[f]);o=p}break}let s=R.object(r);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(Oe(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let a=r.map(c=>Oe(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?Oe(i,t):void 0;s?o=R.tuple(a).rest(s):o=R.tuple(a),typeof e.minItems=="number"&&(o=o.check(R.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(R.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>Oe(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?Oe(e.additionalItems,t):void 0;s?o=R.tuple(a).rest(s):o=R.tuple(a),typeof e.minItems=="number"&&(o=o.check(R.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(R.maxLength(e.maxItems)))}else if(i!==void 0){let a=Oe(i,t),s=R.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=R.array(R.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function Oe(e,t){if(typeof e=="boolean")return e?R.any():R.never();let n=Q0(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>Oe(l,t)),c=R.union(s);n=o?R.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>Oe(l,t)),c=R.xor(s);n=o?R.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:R.any();else{let s=o?n:Oe(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=R.intersection(s,Oe(e.allOf[l],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=R.nullable(n)),e.readOnly===!0&&(n=R.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))AT.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function $u(e,t){if(typeof e=="boolean")return e?R.any():R.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=IT(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??he};return Oe(n,i)}var R,AT,ex=S(()=>{na();fl();la();da();R={...ua,...dl,iso:Rr},AT=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var ws={};Xe(ws,{bigint:()=>NT,boolean:()=>CT,date:()=>RT,number:()=>TT,string:()=>OT});function OT(e){return zm(Dr,e)}function TT(e){return Hm(Ur,e)}function CT(e){return Ym(jr,e)}function NT(e){return Qm(Br,e)}function RT(e){return uh(yn,e)}var tx=S(()=>{tt();da()});var kn={};Xe(kn,{$brand:()=>Ui,$input:()=>ra,$output:()=>ta,NEVER:()=>zi,TimePrecision:()=>aa,ZodAny:()=>Na,ZodArray:()=>Da,ZodBase64:()=>Bo,ZodBase64URL:()=>Fo,ZodBigInt:()=>Br,ZodBigIntFormat:()=>Ho,ZodBoolean:()=>jr,ZodCIDRv4:()=>Uo,ZodCIDRv6:()=>jo,ZodCUID:()=>Co,ZodCUID2:()=>No,ZodCatch:()=>os,ZodCodec:()=>Sn,ZodCustom:()=>En,ZodCustomStringFormat:()=>zr,ZodDate:()=>yn,ZodDefault:()=>Xa,ZodDiscriminatedUnion:()=>Ua,ZodE164:()=>Mo,ZodEmail:()=>$o,ZodEmoji:()=>Oo,ZodEnum:()=>Lr,ZodError:()=>cg,ZodExactOptional:()=>Za,ZodFile:()=>Ka,ZodFirstPartyTypeKind:()=>ys,ZodFunction:()=>ms,ZodGUID:()=>pn,ZodIPv4:()=>Do,ZodIPv6:()=>zo,ZodISODate:()=>So,ZodISODateTime:()=>xo,ZodISODuration:()=>ko,ZodISOTime:()=>Eo,ZodIntersection:()=>ja,ZodIssueCode:()=>dg,ZodJWT:()=>qo,ZodKSUID:()=>Lo,ZodLazy:()=>ds,ZodLiteral:()=>Wa,ZodMAC:()=>_a,ZodMap:()=>Ha,ZodNaN:()=>as,ZodNanoID:()=>To,ZodNever:()=>Pa,ZodNonOptional:()=>Jo,ZodNull:()=>Ta,ZodNullable:()=>Ya,ZodNumber:()=>Ur,ZodNumberFormat:()=>er,ZodObject:()=>bn,ZodOptional:()=>Zo,ZodPipe:()=>xn,ZodPrefault:()=>es,ZodPreprocess:()=>ss,ZodPromise:()=>ps,ZodReadonly:()=>cs,ZodRealError:()=>$e,ZodRecord:()=>Pr,ZodSet:()=>Va,ZodString:()=>Dr,ZodStringFormat:()=>J,ZodSuccess:()=>ns,ZodSymbol:()=>$a,ZodTemplateLiteral:()=>us,ZodTransform:()=>Ga,ZodTuple:()=>Fa,ZodType:()=>F,ZodULID:()=>Ro,ZodURL:()=>gn,ZodUUID:()=>dt,ZodUndefined:()=>Oa,ZodUnion:()=>vn,ZodUnknown:()=>Ra,ZodVoid:()=>La,ZodXID:()=>Po,ZodXor:()=>za,_ZodString:()=>Io,_default:()=>Qa,_function:()=>bu,any:()=>Jl,array:()=>wn,base64:()=>Rl,base64url:()=>Pl,bigint:()=>Vl,boolean:()=>Ia,catch:()=>is,check:()=>vu,cidrv4:()=>Cl,cidrv6:()=>Nl,clone:()=>_e,codec:()=>hu,coerce:()=>ws,config:()=>ie,core:()=>At,cuid:()=>El,cuid2:()=>kl,custom:()=>xu,date:()=>Xl,decode:()=>ya,decodeAsync:()=>ba,describe:()=>Su,discriminatedUnion:()=>ou,e164:()=>Ll,email:()=>pl,emoji:()=>xl,encode:()=>ga,encodeAsync:()=>wa,endsWith:()=>Er,enum:()=>Ko,exactOptional:()=>Ja,file:()=>du,flattenError:()=>sn,float32:()=>Fl,float64:()=>Ml,formatError:()=>cn,fromJSONSchema:()=>$u,function:()=>bu,getErrorMap:()=>pg,globalRegistry:()=>he,gt:()=>lt,gte:()=>Ae,guid:()=>ml,hash:()=>Bl,hex:()=>jl,hostname:()=>Ul,httpUrl:()=>vl,includes:()=>xr,instanceof:()=>ku,int:()=>_o,int32:()=>ql,int64:()=>Wl,intersection:()=>Ba,invertCodec:()=>gu,ipv4:()=>$l,ipv6:()=>Tl,iso:()=>Rr,json:()=>Au,jwt:()=>Dl,keyof:()=>Ql,ksuid:()=>Il,lazy:()=>fs,length:()=>Xt,literal:()=>uu,locales:()=>dn,looseObject:()=>ru,looseRecord:()=>au,lowercase:()=>br,lt:()=>ct,lte:()=>Le,mac:()=>Ol,map:()=>su,maxLength:()=>Yt,maxSize:()=>Ut,meta:()=>Eu,mime:()=>kr,minLength:()=>_t,minSize:()=>ut,multipleOf:()=>zt,nan:()=>mu,nanoid:()=>Sl,nativeEnum:()=>lu,negative:()=>mo,never:()=>Vo,nonnegative:()=>go,nonoptional:()=>rs,nonpositive:()=>ho,normalize:()=>_r,null:()=>Ca,nullable:()=>hn,nullish:()=>fu,number:()=>Aa,object:()=>eu,optional:()=>mn,overwrite:()=>et,parse:()=>fa,parseAsync:()=>pa,partialRecord:()=>iu,pipe:()=>Ao,positive:()=>po,prefault:()=>ts,preprocess:()=>Iu,prettifyError:()=>Ki,promise:()=>wu,property:()=>yo,readonly:()=>ls,record:()=>qa,refine:()=>hs,regex:()=>wr,regexes:()=>Pe,registry:()=>fo,safeDecode:()=>xa,safeDecodeAsync:()=>Ea,safeEncode:()=>va,safeEncodeAsync:()=>Sa,safeParse:()=>ma,safeParseAsync:()=>ha,set:()=>cu,setErrorMap:()=>fg,size:()=>Jt,slugify:()=>Or,startsWith:()=>Sr,strictObject:()=>tu,string:()=>fn,stringFormat:()=>zl,stringbool:()=>_u,success:()=>pu,superRefine:()=>gs,symbol:()=>Gl,templateLiteral:()=>yu,toJSONSchema:()=>vo,toLowerCase:()=>Ir,toUpperCase:()=>$r,transform:()=>Go,treeifyError:()=>Wi,trim:()=>Ar,tuple:()=>Ma,uint32:()=>Hl,uint64:()=>Kl,ulid:()=>_l,undefined:()=>Zl,union:()=>Wo,unknown:()=>Qt,uppercase:()=>vr,url:()=>bl,util:()=>O,uuid:()=>hl,uuidv4:()=>gl,uuidv6:()=>yl,uuidv7:()=>wl,void:()=>Yl,xid:()=>Al,xor:()=>nu});var bs=S(()=>{tt();da();fl();lg();ug();X0();tt();Nm();tt();ca();ex();Lm();la();la();tx();ie(zc())});var rx,mg=S(()=>{bs();bs();rx=kn});var nx={};Xe(nx,{$brand:()=>Ui,$input:()=>ra,$output:()=>ta,NEVER:()=>zi,TimePrecision:()=>aa,ZodAny:()=>Na,ZodArray:()=>Da,ZodBase64:()=>Bo,ZodBase64URL:()=>Fo,ZodBigInt:()=>Br,ZodBigIntFormat:()=>Ho,ZodBoolean:()=>jr,ZodCIDRv4:()=>Uo,ZodCIDRv6:()=>jo,ZodCUID:()=>Co,ZodCUID2:()=>No,ZodCatch:()=>os,ZodCodec:()=>Sn,ZodCustom:()=>En,ZodCustomStringFormat:()=>zr,ZodDate:()=>yn,ZodDefault:()=>Xa,ZodDiscriminatedUnion:()=>Ua,ZodE164:()=>Mo,ZodEmail:()=>$o,ZodEmoji:()=>Oo,ZodEnum:()=>Lr,ZodError:()=>cg,ZodExactOptional:()=>Za,ZodFile:()=>Ka,ZodFirstPartyTypeKind:()=>ys,ZodFunction:()=>ms,ZodGUID:()=>pn,ZodIPv4:()=>Do,ZodIPv6:()=>zo,ZodISODate:()=>So,ZodISODateTime:()=>xo,ZodISODuration:()=>ko,ZodISOTime:()=>Eo,ZodIntersection:()=>ja,ZodIssueCode:()=>dg,ZodJWT:()=>qo,ZodKSUID:()=>Lo,ZodLazy:()=>ds,ZodLiteral:()=>Wa,ZodMAC:()=>_a,ZodMap:()=>Ha,ZodNaN:()=>as,ZodNanoID:()=>To,ZodNever:()=>Pa,ZodNonOptional:()=>Jo,ZodNull:()=>Ta,ZodNullable:()=>Ya,ZodNumber:()=>Ur,ZodNumberFormat:()=>er,ZodObject:()=>bn,ZodOptional:()=>Zo,ZodPipe:()=>xn,ZodPrefault:()=>es,ZodPreprocess:()=>ss,ZodPromise:()=>ps,ZodReadonly:()=>cs,ZodRealError:()=>$e,ZodRecord:()=>Pr,ZodSet:()=>Va,ZodString:()=>Dr,ZodStringFormat:()=>J,ZodSuccess:()=>ns,ZodSymbol:()=>$a,ZodTemplateLiteral:()=>us,ZodTransform:()=>Ga,ZodTuple:()=>Fa,ZodType:()=>F,ZodULID:()=>Ro,ZodURL:()=>gn,ZodUUID:()=>dt,ZodUndefined:()=>Oa,ZodUnion:()=>vn,ZodUnknown:()=>Ra,ZodVoid:()=>La,ZodXID:()=>Po,ZodXor:()=>za,_ZodString:()=>Io,_default:()=>Qa,_function:()=>bu,any:()=>Jl,array:()=>wn,base64:()=>Rl,base64url:()=>Pl,bigint:()=>Vl,boolean:()=>Ia,catch:()=>is,check:()=>vu,cidrv4:()=>Cl,cidrv6:()=>Nl,clone:()=>_e,codec:()=>hu,coerce:()=>ws,config:()=>ie,core:()=>At,cuid:()=>El,cuid2:()=>kl,custom:()=>xu,date:()=>Xl,decode:()=>ya,decodeAsync:()=>ba,default:()=>PT,describe:()=>Su,discriminatedUnion:()=>ou,e164:()=>Ll,email:()=>pl,emoji:()=>xl,encode:()=>ga,encodeAsync:()=>wa,endsWith:()=>Er,enum:()=>Ko,exactOptional:()=>Ja,file:()=>du,flattenError:()=>sn,float32:()=>Fl,float64:()=>Ml,formatError:()=>cn,fromJSONSchema:()=>$u,function:()=>bu,getErrorMap:()=>pg,globalRegistry:()=>he,gt:()=>lt,gte:()=>Ae,guid:()=>ml,hash:()=>Bl,hex:()=>jl,hostname:()=>Ul,httpUrl:()=>vl,includes:()=>xr,instanceof:()=>ku,int:()=>_o,int32:()=>ql,int64:()=>Wl,intersection:()=>Ba,invertCodec:()=>gu,ipv4:()=>$l,ipv6:()=>Tl,iso:()=>Rr,json:()=>Au,jwt:()=>Dl,keyof:()=>Ql,ksuid:()=>Il,lazy:()=>fs,length:()=>Xt,literal:()=>uu,locales:()=>dn,looseObject:()=>ru,looseRecord:()=>au,lowercase:()=>br,lt:()=>ct,lte:()=>Le,mac:()=>Ol,map:()=>su,maxLength:()=>Yt,maxSize:()=>Ut,meta:()=>Eu,mime:()=>kr,minLength:()=>_t,minSize:()=>ut,multipleOf:()=>zt,nan:()=>mu,nanoid:()=>Sl,nativeEnum:()=>lu,negative:()=>mo,never:()=>Vo,nonnegative:()=>go,nonoptional:()=>rs,nonpositive:()=>ho,normalize:()=>_r,null:()=>Ca,nullable:()=>hn,nullish:()=>fu,number:()=>Aa,object:()=>eu,optional:()=>mn,overwrite:()=>et,parse:()=>fa,parseAsync:()=>pa,partialRecord:()=>iu,pipe:()=>Ao,positive:()=>po,prefault:()=>ts,preprocess:()=>Iu,prettifyError:()=>Ki,promise:()=>wu,property:()=>yo,readonly:()=>ls,record:()=>qa,refine:()=>hs,regex:()=>wr,regexes:()=>Pe,registry:()=>fo,safeDecode:()=>xa,safeDecodeAsync:()=>Ea,safeEncode:()=>va,safeEncodeAsync:()=>Sa,safeParse:()=>ma,safeParseAsync:()=>ha,set:()=>cu,setErrorMap:()=>fg,size:()=>Jt,slugify:()=>Or,startsWith:()=>Sr,strictObject:()=>tu,string:()=>fn,stringFormat:()=>zl,stringbool:()=>_u,success:()=>pu,superRefine:()=>gs,symbol:()=>Gl,templateLiteral:()=>yu,toJSONSchema:()=>vo,toLowerCase:()=>Ir,toUpperCase:()=>$r,transform:()=>Go,treeifyError:()=>Wi,trim:()=>Ar,tuple:()=>Ma,uint32:()=>Hl,uint64:()=>Kl,ulid:()=>_l,undefined:()=>Zl,union:()=>Wo,unknown:()=>Qt,uppercase:()=>vr,url:()=>bl,util:()=>O,uuid:()=>hl,uuidv4:()=>gl,uuidv6:()=>yl,uuidv7:()=>wl,void:()=>Yl,xid:()=>Al,xor:()=>nu,z:()=>kn});var PT,ox=S(()=>{mg();mg();PT=rx});var ix={};Xe(ix,{$brand:()=>Ui,$input:()=>ra,$output:()=>ta,NEVER:()=>zi,TimePrecision:()=>aa,ZodAny:()=>Na,ZodArray:()=>Da,ZodBase64:()=>Bo,ZodBase64URL:()=>Fo,ZodBigInt:()=>Br,ZodBigIntFormat:()=>Ho,ZodBoolean:()=>jr,ZodCIDRv4:()=>Uo,ZodCIDRv6:()=>jo,ZodCUID:()=>Co,ZodCUID2:()=>No,ZodCatch:()=>os,ZodCodec:()=>Sn,ZodCustom:()=>En,ZodCustomStringFormat:()=>zr,ZodDate:()=>yn,ZodDefault:()=>Xa,ZodDiscriminatedUnion:()=>Ua,ZodE164:()=>Mo,ZodEmail:()=>$o,ZodEmoji:()=>Oo,ZodEnum:()=>Lr,ZodError:()=>cg,ZodExactOptional:()=>Za,ZodFile:()=>Ka,ZodFirstPartyTypeKind:()=>ys,ZodFunction:()=>ms,ZodGUID:()=>pn,ZodIPv4:()=>Do,ZodIPv6:()=>zo,ZodISODate:()=>So,ZodISODateTime:()=>xo,ZodISODuration:()=>ko,ZodISOTime:()=>Eo,ZodIntersection:()=>ja,ZodIssueCode:()=>dg,ZodJWT:()=>qo,ZodKSUID:()=>Lo,ZodLazy:()=>ds,ZodLiteral:()=>Wa,ZodMAC:()=>_a,ZodMap:()=>Ha,ZodNaN:()=>as,ZodNanoID:()=>To,ZodNever:()=>Pa,ZodNonOptional:()=>Jo,ZodNull:()=>Ta,ZodNullable:()=>Ya,ZodNumber:()=>Ur,ZodNumberFormat:()=>er,ZodObject:()=>bn,ZodOptional:()=>Zo,ZodPipe:()=>xn,ZodPrefault:()=>es,ZodPreprocess:()=>ss,ZodPromise:()=>ps,ZodReadonly:()=>cs,ZodRealError:()=>$e,ZodRecord:()=>Pr,ZodSet:()=>Va,ZodString:()=>Dr,ZodStringFormat:()=>J,ZodSuccess:()=>ns,ZodSymbol:()=>$a,ZodTemplateLiteral:()=>us,ZodTransform:()=>Ga,ZodTuple:()=>Fa,ZodType:()=>F,ZodULID:()=>Ro,ZodURL:()=>gn,ZodUUID:()=>dt,ZodUndefined:()=>Oa,ZodUnion:()=>vn,ZodUnknown:()=>Ra,ZodVoid:()=>La,ZodXID:()=>Po,ZodXor:()=>za,_ZodString:()=>Io,_default:()=>Qa,_function:()=>bu,any:()=>Jl,array:()=>wn,base64:()=>Rl,base64url:()=>Pl,bigint:()=>Vl,boolean:()=>Ia,catch:()=>is,check:()=>vu,cidrv4:()=>Cl,cidrv6:()=>Nl,clone:()=>_e,codec:()=>hu,coerce:()=>ws,config:()=>ie,core:()=>At,cuid:()=>El,cuid2:()=>kl,custom:()=>xu,date:()=>Xl,decode:()=>ya,decodeAsync:()=>ba,default:()=>LT,describe:()=>Su,discriminatedUnion:()=>ou,e164:()=>Ll,email:()=>pl,emoji:()=>xl,encode:()=>ga,encodeAsync:()=>wa,endsWith:()=>Er,enum:()=>Ko,exactOptional:()=>Ja,file:()=>du,flattenError:()=>sn,float32:()=>Fl,float64:()=>Ml,formatError:()=>cn,fromJSONSchema:()=>$u,function:()=>bu,getErrorMap:()=>pg,globalRegistry:()=>he,gt:()=>lt,gte:()=>Ae,guid:()=>ml,hash:()=>Bl,hex:()=>jl,hostname:()=>Ul,httpUrl:()=>vl,includes:()=>xr,instanceof:()=>ku,int:()=>_o,int32:()=>ql,int64:()=>Wl,intersection:()=>Ba,invertCodec:()=>gu,ipv4:()=>$l,ipv6:()=>Tl,iso:()=>Rr,json:()=>Au,jwt:()=>Dl,keyof:()=>Ql,ksuid:()=>Il,lazy:()=>fs,length:()=>Xt,literal:()=>uu,locales:()=>dn,looseObject:()=>ru,looseRecord:()=>au,lowercase:()=>br,lt:()=>ct,lte:()=>Le,mac:()=>Ol,map:()=>su,maxLength:()=>Yt,maxSize:()=>Ut,meta:()=>Eu,mime:()=>kr,minLength:()=>_t,minSize:()=>ut,multipleOf:()=>zt,nan:()=>mu,nanoid:()=>Sl,nativeEnum:()=>lu,negative:()=>mo,never:()=>Vo,nonnegative:()=>go,nonoptional:()=>rs,nonpositive:()=>ho,normalize:()=>_r,null:()=>Ca,nullable:()=>hn,nullish:()=>fu,number:()=>Aa,object:()=>eu,optional:()=>mn,overwrite:()=>et,parse:()=>fa,parseAsync:()=>pa,partialRecord:()=>iu,pipe:()=>Ao,positive:()=>po,prefault:()=>ts,preprocess:()=>Iu,prettifyError:()=>Ki,promise:()=>wu,property:()=>yo,readonly:()=>ls,record:()=>qa,refine:()=>hs,regex:()=>wr,regexes:()=>Pe,registry:()=>fo,safeDecode:()=>xa,safeDecodeAsync:()=>Ea,safeEncode:()=>va,safeEncodeAsync:()=>Sa,safeParse:()=>ma,safeParseAsync:()=>ha,set:()=>cu,setErrorMap:()=>fg,size:()=>Jt,slugify:()=>Or,startsWith:()=>Sr,strictObject:()=>tu,string:()=>fn,stringFormat:()=>zl,stringbool:()=>_u,success:()=>pu,superRefine:()=>gs,symbol:()=>Gl,templateLiteral:()=>yu,toJSONSchema:()=>vo,toLowerCase:()=>Ir,toUpperCase:()=>$r,transform:()=>Go,treeifyError:()=>Wi,trim:()=>Ar,tuple:()=>Ma,uint32:()=>Hl,uint64:()=>Kl,ulid:()=>_l,undefined:()=>Zl,union:()=>Wo,unknown:()=>Qt,uppercase:()=>vr,url:()=>bl,util:()=>O,uuid:()=>hl,uuidv4:()=>gl,uuidv6:()=>yl,uuidv7:()=>wl,void:()=>Yl,xid:()=>Al,xor:()=>nu,z:()=>kn});var LT,ax=S(()=>{bs();bs();LT=kn});import{existsSync as fx,readFileSync as qT}from"node:fs";import{dirname as dx,join as gg}from"node:path";import{fileURLToPath as HT}from"node:url";function VT(e){let t=dx(HT(e));for(let n=0;n<8;n+=1){let o=gg(t,"package.json");if(fx(o))try{let i=JSON.parse(qT(o,"utf8"));if(i&&typeof i.version=="string")return t}catch{}let r=dx(t);if(r===t)break;t=r}throw new Error(`oracle: could not resolve package root from ${e}`)}function We(e,t){let n=VT(t),o=gg(n,e);return fx(o)?o:gg(n,"dist","assets",e)}var Mr=S(()=>{});import{createHash as e1,createHmac as t1,timingSafeEqual as SM}from"node:crypto";function wg(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(wg).join(",")}]`:`{${Object.keys(e).sort().map(n=>`${JSON.stringify(n)}:${wg(e[n])}`).join(",")}}`}function hx(e){let t=String(e?.ORACLE_STAMP_HMAC_SECRET||"").trim();return t.length>=16?t:""}function yx(e=process.env){return hx(process.env)||hx(e)}function o1(e){let{prepareHash:t,prepareMac:n,note:o,...r}=e||{};return r}function i1(e){let t=o1(e);return e1("sha256").update(wg(t)).digest("hex")}function a1(e,t=yx()){return t?t1("sha256",t).update(String(e)).digest("hex"):""}function rt(e,{provider:t,kind:n,env:o=process.env,nowMs:r=Date.now(),expiresAtMs:i}={}){if(!e||typeof e!="object")throw new Error("stampPrepared: payload object required");let a=Object.prototype.hasOwnProperty.call(e,"oraclePrepared");if(a&&typeof e.oraclePrepared!="boolean")throw new Error("stampPrepared: oraclePrepared must be boolean");let s={...e,provider:e.provider||t,kind:e.kind||n,requiresUserSignature:e.requiresUserSignature!==!1,signingReady:!1,broadcastReady:!1,executionReady:!1,oraclePrepared:a?e.oraclePrepared:!0};if(!s.provider)throw new Error("stampPrepared: provider required");if(!s.kind)throw new Error("stampPrepared: kind required");let c=Number(r),l=i==null?c+gx:Number(i),u=l-c;if(!Number.isSafeInteger(c)||!Number.isSafeInteger(l)||u<=0||u>n1)throw new Error("stampPrepared: bounded preparedAt/expiresAt required");let p={...s,preparedAt:c,expiresAt:l,prepareVersion:r1},f=i1(p),m=yx(o),h=m?a1(f,m):void 0,g={...p,prepareHash:f};return h&&(g.prepareMac=h),g}var r1,gx,n1,Ke=S(()=>{r1=2,gx=300*1e3,n1=(()=>{let e=Number(process.env.ORACLE_PREPARE_HARD_MAX_AGE_MS);return Number.isFinite(e)&&e>0?e:1800*1e3})()});var Cg={};Xe(Cg,{createOAuthStore:()=>Og,default:()=>G1,getOAuthStore:()=>ri,hasOAuthCredentials:()=>Lx,loginOAuth:()=>Rx,oauthProviderConfig:()=>$g,oauthProviderId:()=>rr,oauthRuntimeConfig:()=>Dx,refreshOAuthCredentials:()=>Tg,resolveOAuthCredentials:()=>Px});import{createHash as L1,randomBytes as Ag,timingSafeEqual as D1}from"node:crypto";import pt from"node:fs";import tr from"node:path";import z1 from"node:readline/promises";import{spawn as U1,spawnSync as j1}from"node:child_process";function Ig(e={}){return typeof e.now=="function"?Number(e.now()):Date.now()}function rr(e){let t=String(e||"").trim().toLowerCase();for(let[n,o]of Object.entries(In))if(o.aliases.includes(t))return n;throw new Error(`unsupported OAuth provider: ${e||"(empty)"}`)}function $g(e){let t=rr(e);return{id:t,...In[t]}}function Ge(e,t={}){if(!pt.existsSync(e))return t;try{let n=JSON.parse(pt.readFileSync(e,"utf8"));if(!n||typeof n!="object"||Array.isArray(n))throw new Error("invalid object");return n}catch{throw new Error(`credential store is unreadable or corrupt: ${tr.basename(e)}`)}}function Nx(e){Xd(e),process.platform!=="win32"&&pt.chmodSync(e,448)}function Hr(e,t){Nx(tr.dirname(e));let n=`${e}.${process.pid}.${Ag(4).toString("hex")}.tmp`;pt.writeFileSync(n,`${JSON.stringify(t,null,2)}
67
67
  `,{mode:384}),pt.renameSync(n,e),process.platform!=="win32"&&pt.chmodSync(e,384)}function B1(e){if(process.platform!=="linux")return!1;let t=e("secret-tool",["--version"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]});return!t.error&&t.status===0}function kg(e){let t=String(e||"").trim().toLowerCase();if(!/^[a-z0-9][a-z0-9._-]*$/.test(t))throw new Error(`invalid API-key provider: ${e||"(empty)"}`);return t}function _n(e={}){let t=String(e.accessToken||e.access_token||"").trim(),n=String(e.refreshToken||e.refresh_token||"").trim(),o=Number(e.expiresAt||e.expires_at||0);if(Number.isFinite(o)&&o>=1e9&&o<1e12&&(o=o*1e3),!t)throw new Error("OAuth credential is missing access token");return{accessToken:t,refreshToken:n,expiresAt:Number.isFinite(o)?o:0,tokenType:String(e.tokenType||e.token_type||"Bearer"),source:String(e.source||"oracle"),...e.discovery?{discovery:e.discovery}:{},...e.scope?{scope:e.scope}:{},...e.idToken||e.id_token?{idToken:String(e.idToken||e.id_token)}:{}}}function Og(e={}){let t=e.file||tr.join(Xn(),"oauth.json"),n=e.metadataFile||tr.join(tr.dirname(t),"oauth-meta.json"),o=e.linksFile||tr.join(tr.dirname(t),"oauth-links.json"),r=()=>typeof e.now=="function"?Number(e.now()):Date.now(),i=e.spawnFn||j1,a=e.keychain!==!1&&process.env.ORACLE_AUTH_FILE_STORE!=="1"&&B1(i),s=a?"linux-secret-service":"private-file",c=`${t}.lock`;async function l(I){Nx(tr.dirname(c));let x;for(let k=0;k<400;k+=1)try{x=pt.openSync(c,"wx",384);break}catch(N){if(N?.code!=="EEXIST")throw N;try{Date.now()-pt.statSync(c).mtimeMs>3e5&&pt.unlinkSync(c)}catch{}await new Promise(P=>setTimeout(P,25))}if(x===void 0)throw new Error("timed out waiting for OAuth credential lock");try{return await I()}finally{try{pt.closeSync(x)}catch{}try{pt.unlinkSync(c)}catch{}}}function u(I,x="oauth"){return["application","oracle","kind",x,"provider",I]}function d(I){if(!pt.existsSync(o))return null;let k=Ge(o,{providers:{}}).providers?.[I];if(!Array.isArray(k))return null;let N=[];for(let P of k)if(tr.isAbsolute(String(P||"")))try{let L=Ge(P,{});if(I==="anthropic-oauth"&&L.claudeAiOauth){let _=_n(L.claudeAiOauth);N.push({..._,refreshToken:"",source:"external-access-only"});continue}let v=L.credential_pool&&typeof L.credential_pool=="object"?L.credential_pool:null;if(v){let _=v[I]||v[I.replace(/-oauth$/,"")]||[],U=Array.isArray(_)?_:_?[_]:[];for(let Q of U)if(!(!Q||typeof Q!="object"))try{let Se=_n(Q);N.push({...Se,refreshToken:"",source:"external-access-only"})}catch{}}}catch{}return N.length?N.find(P=>!P.expiresAt||P.expiresAt>r()+Du)||N[0]:null}function p(I){let x=rr(I);if(a){let P=i("secret-tool",["lookup",...u(x)],{encoding:"utf8",stdio:["ignore","pipe","ignore"]});if(!P.error&&P.status===0&&String(P.stdout||"").trim())try{return _n(JSON.parse(String(P.stdout).trim()))}catch{}return d(x)}let N=Ge(t,{providers:{}}).providers?.[x];if(N)try{return _n(N)}catch{}return d(x)}function f(I,x){let k=rr(I),N=_n(x);if(a){let L=i("secret-tool",["store",`--label=Oracle ${k} OAuth`,...u(k)],{input:JSON.stringify(N),encoding:"utf8",stdio:["pipe","ignore","pipe"]});if(L.error||L.status!==0)throw new Error("OS credential store rejected OAuth credential");let v=Ge(n,{providers:{}});return v.providers||={},v.providers[k]={expiresAt:N.expiresAt,source:N.source},Hr(n,v),N}let P=Ge(t,{providers:{}});return P.providers||={},P.providers[k]=N,Hr(t,P),N}function m(I){let x=rr(I);if(a){let P=i("secret-tool",["clear",...u(x)],{encoding:"utf8",stdio:["ignore","ignore","pipe"]}),L=Ge(n,{providers:{}});return L.providers&&delete L.providers[x],Hr(n,L),!P.error&&P.status===0}let k=Ge(t,{providers:{}}),N=!!k.providers?.[x];return k.providers&&delete k.providers[x],Hr(t,k),N}function h(I){let x=kg(I);if(a){let k=i("secret-tool",["lookup",...u(x,"api-key")],{encoding:"utf8",stdio:["ignore","pipe","ignore"]});return k.error||k.status!==0?"":String(k.stdout||"").trim()}return String(Ge(t,{apiKeys:{}}).apiKeys?.[x]||"").trim()}function g(I,x){let k=kg(I),N=String(x||"").trim();if(!N)throw new Error("API key is empty");if(a){let L=i("secret-tool",["store",`--label=Oracle ${k} API key`,...u(k,"api-key")],{input:N,encoding:"utf8",stdio:["pipe","ignore","pipe"]});if(L.error||L.status!==0)throw new Error("OS credential store rejected API key");let v=Ge(n,{providers:{},apiKeys:{}});return v.apiKeys||={},v.apiKeys[k]={configured:!0},Hr(n,v),!0}let P=Ge(t,{providers:{},apiKeys:{}});return P.apiKeys||={},P.apiKeys[k]=N,Hr(t,P),!0}function b(I){let x=kg(I);if(a){let P=i("secret-tool",["clear",...u(x,"api-key")],{encoding:"utf8",stdio:["ignore","ignore","pipe"]}),L=Ge(n,{providers:{},apiKeys:{}});return L.apiKeys&&delete L.apiKeys[x],Hr(n,L),!P.error&&P.status===0}let k=Ge(t,{providers:{},apiKeys:{}}),N=!!k.apiKeys?.[x];return k.apiKeys&&delete k.apiKeys[x],Hr(t,k),N}function T(){let I={},x={};if(a){let k=Ge(n,{providers:{},apiKeys:{}});for(let[N,P]of Object.entries(k.providers||{}))I[N]={loggedIn:!!p(N),expiresAt:Number(P.expiresAt||0),source:String(P.source||"oracle"),storage:s};for(let N of Object.keys(k.apiKeys||{}))x[N]={configured:!!h(N),storage:s}}else{let k=Ge(t,{providers:{},apiKeys:{}});for(let[N,P]of Object.entries(k.providers||{}))I[N]={loggedIn:!!P?.accessToken,expiresAt:Number(P?.expiresAt||0),source:String(P?.source||"oracle"),storage:s};for(let[N,P]of Object.entries(k.apiKeys||{}))x[N]={configured:!!P,storage:s}}for(let k of Object.keys(In)){if(I[k])continue;let N=d(k);N&&(I[k]={loggedIn:!0,expiresAt:N.expiresAt,source:N.source,storage:"external-access-source"})}return{storage:s,providers:I,apiKeys:x}}return Object.freeze({file:t,storage:s,get:p,set:f,remove:m,getApiKey:h,setApiKey:g,removeApiKey:b,status:T,withLock:l})}function ri(){return Cx||=Og(),Cx}function _g(e){return Buffer.from(e).toString("base64url")}function F1(){let e=_g(Ag(32));return{verifier:e,challenge:_g(L1("sha256").update(e).digest()),state:_g(Ag(24))}}function M1(e,t){let n=Buffer.from(String(e||"")),o=Buffer.from(String(t||""));return n.length===o.length&&D1(n,o)}function q1(e){let t=String(e),n=process.platform==="darwin"?["open",[t]]:process.platform==="win32"?["cmd.exe",["/d","/s","/c","start","",t]]:["xdg-open",[t]];try{return U1(n[0],n[1],{detached:!0,stdio:"ignore"}).unref(),!0}catch{return!1}}function zu(e){return new URLSearchParams(e).toString()}async function nr(e,t){if(!e?.ok){let o="";try{o=String((await e.json())?.error||"")}catch{}throw new Error(`${t} failed (HTTP ${e?.status||"unknown"}${o?`, ${o}`:""})`)}let n=await e.json();if(!n||typeof n!="object")throw new Error(`${t} returned invalid JSON`);return n}async function H1(e){if(e)return String(await e()).trim();let t=z1.createInterface({input:process.stdin,output:process.stdout});try{return String(await t.question("Authorization code: ")).trim()}finally{t.close()}}function Uu(e,t={}){let n=String(e.access_token||"").trim(),o=String(e.refresh_token||t.refreshToken||"").trim();if(!n)throw new Error("OAuth token response is missing access token");let r=Number(e.expires_in||3600);return _n({accessToken:n,refreshToken:o,expiresAt:Ig(t)+Math.max(1,r)*1e3,tokenType:e.token_type||"Bearer",idToken:e.id_token,source:"oracle",...t.discovery?{discovery:t.discovery}:{},...e.scope?{scope:e.scope}:{}})}async function V1(e){let t=In["anthropic-oauth"],n=e.pkce||F1(),o=new URLSearchParams({code:"true",client_id:t.clientId,response_type:"code",redirect_uri:t.redirectUri,scope:t.scope,code_challenge:n.challenge,code_challenge_method:"S256",state:n.state}),r=`${t.authorizeUrl}?${o}`;e.output(`Open: ${r}`),e.openFn(r);let i=await H1(e.inputFn),[a,s]=i.split("#",2);if(!a||!M1(s,n.state))throw new Error("Claude OAuth state mismatch");let c=await e.fetchFn(t.tokenUrl,{method:"POST",headers:{"content-type":"application/json","user-agent":"axios/1.7.9"},body:JSON.stringify({grant_type:"authorization_code",client_id:t.clientId,code:a,state:s,redirect_uri:t.redirectUri,code_verifier:n.verifier})});return Uu(await nr(c,"Claude OAuth token exchange"),e)}async function W1(e){let t=In["openai-codex"],n=await nr(await e.fetchFn(`${t.issuer}/api/accounts/deviceauth/usercode`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:t.clientId})}),"Codex device authorization");if(!n.user_code||!n.device_auth_id)throw new Error("Codex device authorization returned incomplete data");let o=`${t.issuer}/codex/device`;e.output(`Open: ${o}`),e.output(`Code: ${n.user_code}`),e.openFn(o);let r=Math.max(3,Number(n.interval||5)),i;for(let s=0;s<Math.ceil(900/r);s+=1){await e.sleepFn(r*1e3);let c=await e.fetchFn(`${t.issuer}/api/accounts/deviceauth/token`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({device_auth_id:n.device_auth_id,user_code:n.user_code})});if(c.ok){i=await nr(c,"Codex device authorization");break}if(![403,404].includes(c.status))throw new Error(`Codex device authorization failed (HTTP ${c.status})`)}if(!i)throw new Error("Codex device authorization timed out");let a=await e.fetchFn(t.tokenUrl,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:zu({grant_type:"authorization_code",code:i.authorization_code,redirect_uri:`${t.issuer}/deviceauth/callback`,client_id:t.clientId,code_verifier:i.code_verifier})});return Uu(await nr(a,"Codex OAuth token exchange"),e)}function An(e){let t=new URL(String(e)),n=t.hostname.toLowerCase();if(t.protocol!=="https:"||n!=="x.ai"&&!n.endsWith(".x.ai"))throw new Error("xAI OAuth discovery returned an untrusted endpoint");return t.toString()}async function K1(e){let t=In["xai-oauth"],n=await nr(await e.fetchFn(t.discoveryUrl,{headers:{accept:"application/json"}}),"xAI OAuth discovery");An(n.authorization_endpoint);let o=An(n.token_endpoint),r=await nr(await e.fetchFn(t.deviceUrl,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:zu({client_id:t.clientId,scope:t.scope})}),"xAI device authorization");if(!r.device_code||!r.user_code||!r.verification_uri)throw new Error("xAI device authorization returned incomplete data");let i=An(r.verification_uri_complete||r.verification_uri);e.output(`Open: ${i}`),e.output(`Code: ${r.user_code}`),e.openFn(i);let a=Math.max(1,Number(r.interval||5)),s=Math.ceil(Math.max(1,Number(r.expires_in||600))/a);for(let c=0;c<s;c+=1){let l=await e.fetchFn(o,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json"},body:zu({grant_type:"urn:ietf:params:oauth:grant-type:device_code",client_id:t.clientId,device_code:r.device_code})});if(l.ok){let d=await nr(l,"xAI OAuth token exchange");return Uu(d,{...e,discovery:{authorization_endpoint:An(n.authorization_endpoint),token_endpoint:o}})}let u="";try{u=String((await l.json())?.error||"")}catch{}if(u==="slow_down")await e.sleepFn((a+1)*1e3);else if(u==="authorization_pending")await e.sleepFn(a*1e3);else throw new Error(`xAI OAuth token exchange failed (HTTP ${l.status}${u?`, ${u}`:""})`)}throw new Error("xAI device authorization timed out")}async function Rx(e,t={}){let n=rr(e),o={fetchFn:t.fetchFn||globalThis.fetch,inputFn:t.inputFn,sleepFn:t.sleepFn||(r=>new Promise(i=>setTimeout(i,r))),openFn:t.openFn||q1,output:t.output||(r=>process.stdout.write(`${r}
68
68
  `)),now:t.now,pkce:t.pkce};return n==="anthropic-oauth"?V1(o):n==="openai-codex"?W1(o):K1(o)}async function Tg(e,t,n={}){let o=rr(e),r=In[o],i=_n(t);if(!i.refreshToken)throw new Error(`${o} OAuth credential cannot refresh; run oracle auth login`);let a=i.discovery,s,c=n.fetchFn||globalThis.fetch;if(o==="xai-oauth"){if(!a?.token_endpoint){let d=await c(r.discoveryUrl),p=await nr(d,"xAI OAuth discovery");a={...p.authorization_endpoint?{authorization_endpoint:An(p.authorization_endpoint)}:{},token_endpoint:An(p.token_endpoint)}}s=An(a.token_endpoint)}else s=r.tokenUrl;let l=await c(s,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"application/json",...o==="anthropic-oauth"?{"user-agent":"axios/1.7.9"}:{}},body:zu({grant_type:"refresh_token",refresh_token:i.refreshToken,client_id:r.clientId})}),u=await nr(l,`${o} OAuth refresh`);return Uu(u,{...n,refreshToken:i.refreshToken,discovery:a})}async function Px(e,t={}){let n=rr(e),o=t.store||ri(),r=o.get(n);if(!r)throw new Error(`${n} OAuth is not logged in; run oracle auth login ${e}`);let i=Ig(t);if(r.source==="external-access-only"&&r.expiresAt&&r.expiresAt<=i+Du)throw new Error(`${n} external OAuth access source is expired or near expiry; refresh the source authority`);if(!r.expiresAt||r.expiresAt>i+Du)return r;let a=async()=>{let s=o.get(n);if(!s)throw new Error(`${n} OAuth is not logged in; run oracle auth login ${e}`);let c=Ig(t);if(!s.expiresAt||s.expiresAt>c+Du)return s;let l=await Tg(n,s,t);return o.set(n,l),l};return typeof o.withLock=="function"?o.withLock(a):a()}function Lx(e,t={}){try{return!!(t.store||ri()).get(e)?.accessToken}catch{return!1}}function Dx(e){let t=$g(e);return{kind:"standalone",provider:t.id,model:t.model,baseUrl:t.baseUrl,authType:"oauth",protocol:t.protocol}}var In,Du,Cx,G1,ju=S(()=>{Qn();In=Object.freeze({"anthropic-oauth":{aliases:["anthropic-oauth","anthropic","claude","claude-oauth"],clientId:"9d1c250a-e61b-44d9-88ed-5944d1962f5e",authorizeUrl:"https://claude.ai/oauth/authorize",tokenUrl:"https://platform.claude.com/v1/oauth/token",redirectUri:"https://console.anthropic.com/oauth/code/callback",scope:"org:create_api_key user:profile user:inference",baseUrl:"https://api.anthropic.com/v1",model:"claude-sonnet-4-6",protocol:"anthropic-messages"},"openai-codex":{aliases:["openai-codex","openai-oauth","codex","codex-oauth"],clientId:"app_EMoamEEZ73f0CkXaXp7hrann",issuer:"https://auth.openai.com",tokenUrl:"https://auth.openai.com/oauth/token",baseUrl:"https://chatgpt.com/backend-api/codex",model:"gpt-5.6-sol",protocol:"responses"},"xai-oauth":{aliases:["xai-oauth","xai","grok","grok-oauth"],clientId:"b1a00492-073a-47ea-816f-4c329264a828",issuer:"https://auth.x.ai",discoveryUrl:"https://auth.x.ai/.well-known/openid-configuration",deviceUrl:"https://auth.x.ai/oauth2/device/code",scope:"openid profile email offline_access grok-cli:access api:access",baseUrl:"https://api.x.ai/v1",model:"grok-4.6",protocol:"responses"}}),Du=12e4;G1={createOAuthStore:Og,getOAuthStore:ri,hasOAuthCredentials:Lx,loginOAuth:Rx,oauthProviderConfig:$g,oauthProviderId:rr,oauthRuntimeConfig:Dx,refreshOAuthCredentials:Tg,resolveOAuthCredentials:Px}});function Ux(){return zx.filter(e=>e.website)}function jx(){return zx.filter(e=>e.detect!==!1&&(e.bins?.length||e.kind==="oracle"))}var zx,Ng=S(()=>{zx=Object.freeze([{id:"oracle",label:"Oracle Native",kind:"oracle",bins:["oracle"],website:!0,detect:!0},{id:"hermes",label:"Hermes Agent",kind:"mcp",bins:["hermes"],mcpTarget:"generic",configKey:"hermes",website:!0,detect:!0},{id:"claude",label:"Claude Code",kind:"mcp",bins:["claude"],mcpTarget:"claude-code",configKey:"claudeCode",website:!0,detect:!0},{id:"claude-desktop",label:"Claude Desktop",kind:"mcp",bins:[],mcpTarget:"claude-desktop",configKey:"claudeDesktop",website:!0,detect:!1},{id:"chatgpt",label:"ChatGPT",kind:"mcp",bins:[],mcpTarget:"chatgpt",configKey:"chatgpt",website:!0,detect:!1},{id:"codex",label:"OpenAI Codex",kind:"mcp",bins:["codex"],mcpTarget:"codex",configKey:"codex",website:!0,detect:!0},{id:"cursor",label:"Cursor",kind:"mcp",bins:["cursor","cursor-agent"],mcpTarget:"cursor",configKey:"cursor",website:!0,detect:!0},{id:"windsurf",label:"Windsurf",kind:"mcp",bins:["windsurf"],mcpTarget:"vscode",configKey:"windsurf",website:!0,detect:!0},{id:"vscode",label:"VS Code / Copilot",kind:"mcp",bins:["code","code-insiders"],mcpTarget:"vscode",configKey:"vscode",website:!0,detect:!0},{id:"openclaw",label:"OpenClaw",kind:"mcp",bins:["openclaw","claw"],mcpTarget:"generic",configKey:"openclaw",website:!0,detect:!0},{id:"perplexity",label:"Perplexity",kind:"mcp",bins:["perplexity","pplx"],mcpTarget:"generic",configKey:"perplexity",website:!0,detect:!0},{id:"manus",label:"Manus",kind:"mcp",bins:["manus"],mcpTarget:"generic",configKey:"manus",website:!0,detect:!0},{id:"prime",label:"Prime Intellect Agent",kind:"mcp",bins:["prime-agent","prime"],mcpTarget:"generic",configKey:"prime",website:!1,detect:!0},{id:"opencode",label:"OpenCode",kind:"mcp",bins:["opencode"],mcpTarget:"generic",configKey:"opencode",website:!1,detect:!0},{id:"aider",label:"Aider",kind:"mcp",bins:["aider"],mcpTarget:"generic",configKey:"aider",website:!1,detect:!0},{id:"continue",label:"Continue",kind:"mcp",bins:["continue"],mcpTarget:"vscode",configKey:"continue",website:!1,detect:!0},{id:"goose",label:"Goose",kind:"mcp",bins:["goose"],mcpTarget:"generic",configKey:"goose",website:!1,detect:!0},{id:"amp",label:"Amp",kind:"mcp",bins:["amp"],mcpTarget:"generic",configKey:"amp",website:!1,detect:!0},{id:"generic",label:"Generic MCP",kind:"mcp",bins:[],mcpTarget:"generic",configKey:"genericMcp",website:!0,detect:!1}])});import JC from"node:fs";import ES from"node:path";import{homedir as YC}from"node:os";function Nn(e){let t=new Set;if(!Array.isArray(e))return t;for(let n of e){if(typeof n!="string")continue;let o=n.trim();o.length===0||o.length>AS||t.add(o)}return t}function QC(e){try{let t=e instanceof Error?e.message:String(e);return String(t).slice(0,200)}catch{return"unprintable error"}}function Cn(e){return{allow:!1,reason:e}}function kS(e){return{allow:!0,reason:e}}function Gr(e=process.env){return e?.ORACLE_EXECUTION_MODE===eN}function Wu(e,t=process.env){if(!Gr(t))return e;let n=[...Nn(e?.allow)].filter(r=>_S.has(r)),o=new Set([...Nn(e?.deny),...jt.filter(r=>!_S.has(r))]);return Object.freeze({version:1,source:`${String(e?.source||"default")}:extension-prepare-only`,defaultDecision:Ku,allow:Object.freeze(n),deny:Object.freeze([...o])})}function Gu(e,t){try{let n=e&&typeof e=="object"?e.name:void 0;if(typeof n!="string"||n.trim().length===0)return Cn("denied: tool call has no usable name");let o=n.trim();if(o.length>AS)return Cn("denied: tool name exceeds the maximum length");let r=e.args;return r!=null&&(typeof r!="object"||Array.isArray(r))?Cn(`denied: tool "${o}" was called with a non-object arguments payload`):!t||typeof t!="object"||Array.isArray(t)?Cn(`denied: tool "${o}" has no usable policy to authorize it`):Nn(t.deny).has(o)?Cn(`denied: tool "${o}" is on the policy denylist`):Nn(t.allow).has(o)?kS(`allowed: tool "${o}" is on the policy allowlist`):(t.defaultDecision===void 0?Ku:t.defaultDecision)==="allow"?kS(`allowed: tool "${o}" matched the policy default`):Cn(`denied: tool "${o}" is not on the policy allowlist`)}catch(n){return Cn(`denied: tool policy evaluation failed (${QC(n)})`)}}function rN(e=process.env){let t=e&&e.ORACLE_CONFIG_DIR||ES.join(YC(),".config","oracle");return ES.join(t,"tool-policy.json")}function Wg(e=process.env){try{let t=rN(e),n=JC.readFileSync(t,"utf8");if(typeof n!="string"||n.length>XC)return Wu(Vg,e);let o=JSON.parse(n);if(!o||typeof o!="object"||Array.isArray(o))return Wu(Vg,e);let r=Array.isArray(o.allow)?Nn(o.allow):Nn(jt);return Wu(Object.freeze({version:1,source:t,defaultDecision:Ku,allow:Object.freeze([...r]),deny:Object.freeze([...Nn(o.deny)])}),e)}catch{return Wu(Vg,e)}}var jt,Ku,XC,AS,Vg,eN,tN,_S,$s=S(()=>{jt=Object.freeze(["oracle_cli","memory_add","memory_remove","memory_search","skill_load","skill_create","skill_list","cron_add","cron_list","cron_remove","meta_analyze","web_fetch","web_search","file_read","file_write","mcp_list","mcp_call","todo_list","todo_set","session_search","research_delegate","rlm","deep_research","clarify","code_eval","learn_skill","workspace_artifact","research_artifact","portfolio_analyze","tax_lots","position_health","governance_prepare","safety_intelligence","portfolio_risk","trade_lifecycle","signal_score","vault_status","signer_status","signer_execute","signer_disarm","receipt_report","watch_create","watch_list","portfolio_snapshot","vision_analyze","browser_exec","xurl","knowledge_search"]),Ku="deny",XC=256*1024,AS=128,Vg=Object.freeze({version:1,source:"default",defaultDecision:Ku,allow:jt,deny:Object.freeze([])});eN="extension-prepare-only",tN=Object.freeze(["oracle_cli","memory_search","skill_load","skill_list","web_fetch","web_search","todo_list","todo_set","session_search","research_delegate","rlm","deep_research","clarify","code_eval","research_artifact","portfolio_analyze","tax_lots","position_health","governance_prepare","safety_intelligence","portfolio_risk","trade_lifecycle","signal_score","vault_status","signer_status","receipt_report","watch_list","portfolio_snapshot","vision_analyze","knowledge_search"]),_S=new Set(tN)});var Cs=S(()=>{});var fi=S(()=>{});var Ns,Ot=S(()=>{Cs();fi();Ns=100});function A_(e){let t=String(e?.type??e?.surface??e?.kind??"").toLowerCase();return c4[t]??t}function l4(e,t){return String(e?.id??e?.signalId??e?.asset??e?.market??e?.pool??e?.collection??`${A_(e)}:${t}`)}function gt(e,t,n,o=!0){!o||n===null||!Number.isFinite(n)||e.push({feature:t,value:Ad(n)})}function u4(e,t){let n=Je(e.repeatBuys??e.repeat_buys??e.buyCount),o=Je(e.walletWinRate??e.winRate);gt(t,"repeat_buys",n===null?null:Ce((n-1)/4)*.38),gt(t,"wallet_win_rate",o===null?null:(Ce(o)-.5)*.5)}function d4(e,t){let n=Je(e.ageHours??e.poolAgeHours),o=Je(e.liquidityUsd??e.liquidity),r=e.liquidityLocked??e.locked;gt(t,"pool_age",n===null?null:n<24?-.42:Ce(n/720)*.12),gt(t,"liquidity",o===null?null:(Ce(Math.log10(Math.max(1,o))/7)-.5)*.28),gt(t,"liquidity_lock",r==null?null:r?.12:-.28)}function f4(e,t){let n=Je(e.floorChange??e.floorChangePct),o=Je(e.sales??e.saleCount);gt(t,"floor_change",n===null?null:Ce(n,-1,1)*.35),gt(t,"sales_depth",o===null?null:Ce(o/50)*.18)}function p4(e,t){let n=Je(e.flowImbalance??e.imbalance),o=Je(e.fundingRate??e.funding);gt(t,"flow_imbalance",n===null?null:Ce(n,-1,1)*.42),gt(t,"funding",o===null?null:-Ce(o*100,-1,1)*.12)}function m4(e,t){let n=Je(e.marketProbability??e.marketPrice??e.probability),o=Je(e.fairProbability??e.referenceProbability??e.fairValue);gt(t,"probability_mispricing",n===null||o===null?null:Ce(o-n,-1,1)*.65);let r=Je(e.liquidityUsd??e.liquidity);gt(t,"market_liquidity",r===null?null:Ce(Math.log10(Math.max(1,r))/6)*.12)}function g4(e,t,n){let o=n.filter(i=>{let a=i?.signalId??i?.eventId??i?.id??i?.asset??i?.market;return a!=null&&String(a)===t});if(o.length===0)return null;let r=o.map(i=>Je(i.return??i.markout??i.pnl??i.value)).filter(i=>i!==null);return r.length===0?null:r.reduce((i,a)=>i+a,0)/r.length}function Id(e=[],t=[],n={}){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("events and markouts must be arrays");let o=Ce(Je(n.minimumCoverage)??.5);return e.map((r,i)=>{let a=A_(r),s=l4(r,i),c=h4[a],l=[];c&&c(r,l);let u=a==="wallet"?2:a==="pool"?3:2,d=Ad(Ce(l.length/u)),p=l.reduce((I,x)=>I+x.value,0),f=g4(r,s,t),m=f===null?0:Ce(f,-1,1)*.35;f!==null&&gt(l,"shadow_markout",m);let h=Ad(Ce(.5+p+m)),g=f===null?.8:Ce(.85+f*.3,.35,1),b=Ad(Ce(d*g)),T=["COLD_INTELLIGENCE_ONLY","NO_HOT_EXECUTION"];return c||T.push("UNSUPPORTED_SIGNAL_TYPE"),d<o&&T.push("LOW_COVERAGE","NO_TRADE"),b<.5&&T.push("LOW_CONFIDENCE","NO_TRADE"),a==="pool"&&(Je(r.ageHours??r.poolAgeHours)??1/0)<24&&T.push("NEW_POOL_RISK","NO_TRADE"),f!==null&&f<0&&T.push("NEGATIVE_MARKOUT"),{id:s,type:a,score:h,confidence:b,coverage:d,contributions:l,flags:[...new Set(T)],noTrade:T.includes("NO_TRADE"),executionAllowed:!1}}).sort((r,i)=>i.score-r.score||i.confidence-r.confidence||r.id.localeCompare(i.id))}var iw,c4,Ce,Je,Ad,h4,$d=S(()=>{iw=Object.freeze(["wallet","pool","nft_floor","hl_flow","prediction_market"]),c4=Object.freeze({wallets:"wallet",smart_wallet:"wallet",pools:"pool",new_pool:"pool",nft:"nft_floor",nft_floors:"nft_floor",hyperliquid:"hl_flow",prediction:"prediction_market",prediction_markets:"prediction_market"}),Ce=(e,t=0,n=1)=>Math.min(n,Math.max(t,e)),Je=e=>Number.isFinite(Number(e))?Number(e):null,Ad=e=>Math.round(e*1e4)/1e4;h4=Object.freeze({wallet:u4,pool:d4,nft_floor:f4,hl_flow:p4,prediction_market:m4})});var B9,yt=S(()=>{ac();B9=64*1024});var gH,F_=S(()=>{gH=Object.freeze({READ:"read",PREPARE:"prepare",EXECUTE:"execute",AUTONOMOUS:"autonomous"})});var uw=S(()=>{});import{TypedDataEncoder as SH,getAddress as EH,isAddress as kH}from"ethers";var L4,CH,D4,NH,dw=S(()=>{yt();Ot();F_();uw();Ke();L4=Object.freeze({1:"0x9008D19f58AAbD9eD0D60971565AA8510560ab41",100:"0x9008D19f58AAbD9eD0D60971565AA8510560ab41",42161:"0x9008D19f58AAbD9eD0D60971565AA8510560ab41",8453:"0x9008D19f58AAbD9eD0D60971565AA8510560ab41"}),CH=Object.freeze({1:"0xC92E8bdf79f0507f65a392b0ab4667716BFE0110",100:"0xC92E8bdf79f0507f65a392b0ab4667716BFE0110",42161:"0xC92E8bdf79f0507f65a392b0ab4667716BFE0110",8453:"0xC92E8bdf79f0507f65a392b0ab4667716BFE0110"}),D4=Object.freeze({Order:[{name:"sellToken",type:"address"},{name:"buyToken",type:"address"},{name:"receiver",type:"address"},{name:"sellAmount",type:"uint256"},{name:"buyAmount",type:"uint256"},{name:"validTo",type:"uint32"},{name:"appData",type:"bytes32"},{name:"feeAmount",type:"uint256"},{name:"kind",type:"string"},{name:"partiallyFillable",type:"bool"},{name:"sellTokenBalance",type:"string"},{name:"buyTokenBalance",type:"string"}]}),NH=Object.freeze({OrderCancellations:[{name:"orderUids",type:"bytes[]"}]})});function Ys(e=process.env){let t=String(e?.ORACLE_RESEARCH_MODE??e?.ORACLE_RLM_MODE??"").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"||t==="on"||t==="research"}function iA(e=process.env,t=16){let n=Ys(e),o=Number.parseInt(String(e?.ORACLE_MAX_AGENT_STEPS??"").trim(),10),r=Number.isFinite(o)&&o>=1?o:t;return n&&!(Number.isFinite(o)&&o>=1)&&(r=Math.max(r,P6)),Math.min(r,L6)}function aA(e=process.env){return["## Native research attributes (crypto desk)","",`Research mode: ${Ys(e)?"ON":"off (set ORACLE_RESEARCH_MODE=1 for long-horizon)"}. Attributes: ${Rd.join(", ")}.`,"","Long-horizon research:","- Prefer multi-source checks (oracle_cli data + web_fetch) before GO claims.","- Use research_delegate for depth-1 parallel venue/protocol lookups.","- Children are read-only: no file writes, no sign, no further spawn.","","Continual learn:","- memory_add for durable desk facts; skill_create / learn_skill for workflows.","- meta_analyze after repeated successful shapes; never store keys or seeds.","","Evidence-first trading/build:","- research_artifact for cited claims (caller supplies fetchedAt).","- trade_lifecycle for prepare-only chains: intent \u2192 quote \u2192 simulation \u2192 prepared.","- Advancing to prepared or claiming PREPARED requires the in-loop verifier: unsigned, dest allowlist, slippage <= 100 bps.","- skill_create / learn_skill refuse unless this turn recorded a verifier pass. A failed prepare blocks the write.","- /goal pins an objective that is re-injected after context compaction. Compaction summaries cannot replace it.","- signal_score is cold intelligence only (NO_TRADE / executionAllowed:false).","- PROMOTE / research GO is never release GO and never arms execution.","","Prepare-only wall:","- Never claim wallet connection equals authorization.","- Never sign, broadcast, or invent signed/broadcast facts.","- Building: protocol templates + coding harness via MCP; Oracle prepares, wallet signs."].join(`
69
- `)}var Rd,P6,L6,vw=S(()=>{Rd=Object.freeze(["long_horizon","recursive_fanout","continual_learn","evidence_first","prepare_only"]),P6=28,L6=50});var _A,NJ,AA=S(()=>{_A={robinhood:{chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC"],evm:!0},ethereum:{chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],evm:!0},polygon:{chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],evm:!0},arbitrum:{chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],evm:!0},base:{chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],evm:!0},hyperevm:{chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],evm:!0},bsc:{chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],evm:!0},avalanche:{chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],evm:!0},optimism:{chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],evm:!0},abstract:{chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],evm:!0},stable:{chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],evm:!0}},NJ=new Map(Object.values(_A).map(e=>[e.chainId,e]))});import{Interface as Bz,getAddress as BJ}from"ethers";var FJ,dr=S(()=>{yt();AA();FJ=new Bz(["function allowance(address owner,address spender) view returns (uint256)","function balanceOf(address account) view returns (uint256)"])});var zw=S(()=>{});var WJ,Bd=S(()=>{yt();zw();WJ=Object.freeze({1:"ethereum",10:"optimism",56:"bsc",137:"polygon",8453:"base",42161:"arbitrum",43114:"avalanche",999:"hyperevm",4663:"robinhood"})});import{Interface as IA,getAddress as ZJ,isAddress as JJ}from"ethers";var Uw,tY,rY,jw=S(()=>{dr();Bd();Ot();Ke();Uw={1:{name:"ethereum",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",usdc:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},8453:{name:"base",quoter:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",router:"0x2626664c2603336E57B271c5C0b26F421741e481",weth:"0x4200000000000000000000000000000000000006",usdc:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},42161:{name:"arbitrum",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",usdc:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"},4663:{name:"robinhood",quoter:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",router:"0xcaf681a66d020601342297493863e78c959e5cb2",weth:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",usdc:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},999:{name:"hyperevm",weth:"0x5555555555555555555555555555555555555555",usdc:"0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb"},10:{name:"optimism",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0x4200000000000000000000000000000000000006",usdc:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"},56:{name:"bsc",quoter:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",router:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",weth:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",usdc:"0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"},137:{name:"polygon",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",usdc:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},43114:{name:"avalanche",quoter:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",router:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",weth:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",usdc:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"}},tY=new IA(["function quoteExactInputSingle((address tokenIn, address tokenOut, uint256 amountIn, uint24 fee, uint160 sqrtPriceLimitX96) params) returns (uint256 amountOut, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate)","function quoteExactInput(bytes path, uint256 amountIn) returns (uint256 amountOut, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)"]),rY=new IA(["function exactInputSingle((address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountIn,uint256 amountOutMinimum,uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountOut)","function multicall(uint256 deadline,bytes[] data) payable returns (bytes[] results)"])});import{AbiCoder as qz,Interface as Bw,getAddress as aY,isAddress as sY,keccak256 as cY}from"ethers";var pY,Fw,mY,hY,gY,yY,wY,Mw=S(()=>{dr();Bd();Ot();Ke();pY=qz.defaultAbiCoder(),Fw={1:{name:"ethereum",poolManager:"0x000000000004444c5dc75cB358380D2e3dE08A90",quoter:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203",stateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",universalRouter:"0x66a9893cc07d91d95644aedd05d03f95e1dba8af",weth:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",usdc:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},10:{name:"optimism",poolManager:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",quoter:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7",stateView:"0xc18a3169788f4f75a170290584eca6395c75ecdb",universalRouter:"0x851116d9223fabed8e56c0e6b8ad0c31d98b3507",weth:"0x4200000000000000000000000000000000000006",usdc:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"},56:{name:"bsc",poolManager:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",quoter:"0x9f75dd27d6664c475b90e105573e550ff69437b0",stateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",universalRouter:"0x1906c1d672b88cd1b9ac7593301ca990f94eae07",weth:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",usdc:"0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"},137:{name:"polygon",poolManager:"0x67366782805870060151383f4bbff9dab53e5cd6",quoter:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9",stateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",universalRouter:"0x1095692a6237d83c6a72f3f5efedb9a670c49223",weth:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",usdc:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},8453:{name:"base",poolManager:"0x498581fF718922c3f8e6A244956aF099B2652b2b",quoter:"0x0d5e0f971ed27fbff6c2837bf31316121532048d",stateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",universalRouter:"0x6ff5693b99212da76ad316178a184ab56d299b43",weth:"0x4200000000000000000000000000000000000006",usdc:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},42161:{name:"arbitrum",poolManager:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",quoter:"0x3972c00f7ed4885e145823eb7c655375d275a1c5",stateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",universalRouter:"0xa51afafe0263b40edaef0df8781ea9aa03e381a3",weth:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",usdc:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"},43114:{name:"avalanche",poolManager:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",quoter:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2",stateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",universalRouter:"0x94b75331ae8d42c1b61065089b7d48fe14aa73b7",weth:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",usdc:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"},4663:{name:"robinhood",poolManager:"0x8366a39cc670b4001a1121b8f6a443a643e40951",quoter:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",stateView:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b",universalRouter:"0x8876789976dEcBfCbBbe364623C63652db8C0904",weth:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",usdc:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"}},mY=new Bw(["function quoteExactInputSingle(((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey,bool zeroForOne,uint128 exactAmount,bytes hookData) params) returns (uint256 amountOut, uint256 gasEstimate)","function quoteExactOutputSingle(((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey,bool zeroForOne,uint128 exactAmount,bytes hookData) params) returns (uint256 amountIn, uint256 gasEstimate)"]),hY=new Bw(["function execute(bytes commands,bytes[] inputs,uint256 deadline) payable"]),gY=new Bw(["function getSlot0(bytes32 poolId) view returns (uint160 sqrtPriceX96,int24 tick,uint24 protocolFee,uint24 lpFee)","function getLiquidity(bytes32 poolId) view returns (uint128 liquidity)"]),yY=Object.freeze([[13,"beforeInitialize"],[12,"afterInitialize"],[11,"beforeAddLiquidity"],[10,"afterAddLiquidity"],[9,"beforeRemoveLiquidity"],[8,"afterRemoveLiquidity"],[7,"beforeSwap"],[6,"afterSwap"],[5,"beforeDonate"],[4,"afterDonate"],[3,"beforeSwapReturnsDelta"],[2,"afterSwapReturnsDelta"],[1,"afterAddLiquidityReturnsDelta"],[0,"afterRemoveLiquidityReturnsDelta"]]),wY=(1n<<14n)-1n});var xY,$A=S(()=>{dr();xY=Object.freeze({1:"assertion failed",17:"arithmetic overflow or underflow",18:"division or modulo by zero",33:"invalid enum value",34:"invalid storage byte array encoding",49:"pop() on an empty array",50:"array index out of bounds",65:"out of memory",81:"call to an uninitialized function pointer"})});var EY,qw,Hw,Ii=S(()=>{EY=Object.freeze(["blockNumber","nativeBalance","tokenBalance","resolveToken","resolvePools","scanBlocks","scoreRisk","quote","sellSimulation","prepareUnsignedTx"]),qw=Object.freeze({LIVE:"LIVE",CACHED:"CACHED",STALE:"STALE",UNKNOWN:"UNKNOWN",UNAVAILABLE:"UNAVAILABLE"}),Hw=Object.freeze({PASS:"PASS",CAUTION:"CAUTION",FAIL:"FAIL",UNKNOWN:"UNKNOWN"})});var Hz,Vw=S(()=>{Ii();Hz=Object.freeze({FULL:"FULL",NO_GAS:"NO_GAS",FAILED:"FAILED"})});import{Contract as OY,JsonRpcProvider as TY}from"ethers";var OA=S(()=>{});var PY,Md=S(()=>{OA();PY=Object.freeze({swap:5,bridge:5,perps:0,nft:0})});var CA=S(()=>{yt();Ot();uw();Ke();Md()});var NA=S(()=>{yt();Ot();Ke();Md()});var qd=S(()=>{});var LA=S(()=>{yt();Ot();qd();Ke()});var DA=S(()=>{yt();Ot();qd();Ke()});var Ww=S(()=>{yt()});var IX,zA=S(()=>{CA();NA();LA();DA();dw();jw();Mw();Ww();Vw();IX=Object.freeze({across:["across"],relay:["relaychain","relay"],lifi:["jumper-(li.fi-powered)","lifi"],stargate:["stargate-v2","stargate-v1","stargate"],hop:["hop-protocol","hop"],debridge:["debridge"],synapse:["synapse"],connext:["connext"],cbridge:["celer-bridge","celer-cbridge","cbridge"],celer:["celer-bridge","celer-cbridge","cbridge"],squid:["squid"],symbiosis:["symbiosis"],wormhole:["wormhole"],mayan:["mayan"],allbridge:["allbridge"],thorchain:["thorchain"]})});var UA=S(()=>{Vw();zA();Md();Ww();dr()});var KX,GX,ZX,jA=S(()=>{UA();Ke();KX=Object.freeze({TRANSACTION:"unsigned-transaction",TYPED_DATA_ORDER:"typed-data-order"}),GX=new Set(["0x0000000000000000000000000000000000000000","0x000000000000000000000000000000000000dead","0x0000000000000000000000000000000000000001","0x00000000000000000000000000000000000a1ce5"].map(e=>e.toLowerCase())),ZX=Object.freeze(["operation","exactOutput","amountOut","multihop","path","positionManager","modifyLiquidities","commands","actions"])});import{Interface as BA,getAddress as eQ,id as Kz,isAddress as tQ}from"ethers";var FA,aQ,sQ,cQ,lQ,MA=S(()=>{dr();$A();jA();Ke();FA=Object.freeze({1:Object.freeze({name:"ethereum",positionManager:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",venue:"uniswap-v3",source:"https://docs.uniswap.org/contracts/v3/reference/deployments/ethereum-deployments"}),8453:Object.freeze({name:"base",positionManager:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",wrappedNative:"0x4200000000000000000000000000000000000006",venue:"uniswap-v3",source:"https://docs.uniswap.org/contracts/v3/reference/deployments/base-deployments"})}),aQ=new BA(["function ownerOf(uint256 tokenId) view returns (address)","function positions(uint256 tokenId) view returns (uint96 nonce,address operator,address token0,address token1,uint24 fee,int24 tickLower,int24 tickUpper,uint128 liquidity,uint256 feeGrowthInside0LastX128,uint256 feeGrowthInside1LastX128,uint128 tokensOwed0,uint128 tokensOwed1)","function decreaseLiquidity((uint256 tokenId,uint128 liquidity,uint256 amount0Min,uint256 amount1Min,uint256 deadline) params) payable returns (uint256 amount0,uint256 amount1)","function collect((uint256 tokenId,address recipient,uint128 amount0Max,uint128 amount1Max) params) payable returns (uint256 amount0,uint256 amount1)","function multicall(bytes[] data) payable returns (bytes[] results)"]),sQ=new BA(["function withdraw(uint256 wad)"]),cQ=(1n<<128n)-1n,lQ=Kz("Transfer(address,address,uint256)").toLowerCase()});var qA=S(()=>{});import{getAddress as mQ,Interface as Hd,TypedDataEncoder as hQ,parseUnits as gQ}from"ethers";var Zz,xQ,SQ,Jz,EQ,HA,kQ,_Q,AQ,VA=S(()=>{yt();qd();Ke();qA();Zz="fulfillAdvancedOrder(((address offerer,address zone,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount)[] offer,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount,address recipient)[] consideration,uint8 orderType,uint256 startTime,uint256 endTime,bytes32 zoneHash,uint256 salt,bytes32 conduitKey,uint256 totalOriginalConsiderationItems) parameters,uint120 numerator,uint120 denominator,bytes signature,bytes extraData) advancedOrder,(uint256 orderIndex,uint8 side,uint256 index,uint256 identifier,bytes32[] criteriaProof)[] criteriaResolvers,bytes32 fulfillerConduitKey,address recipient)",xQ=new Hd([`function ${Zz}`]),SQ=new Hd(["function mintPublic(address nftContract,address feeRecipient,address minterIfNotPayer,uint256 quantity) payable","function mintAllowList(address nftContract,address feeRecipient,address minterIfNotPayer,uint256 quantity,(uint80 mintPrice,uint48 maxTotalMintableByWallet,uint48 startTime,uint48 endTime,uint48 dropStageIndex,uint32 maxTokenSupplyForStage,uint16 feeBps,bool restrictFeeRecipients) mintParams,bytes32[] proof) payable"]),Jz=Object.freeze(["blast","base","ethereum","zora","arbitrum","sei","avalanche","polygon","optimism","ape_chain","flow","b3","soneium","ronin","bera_chain","solana","shape","unichain","gunzilla","abstract","animechain","hyperevm","somnia","monad","hyperliquid","megaeth","ink","robinhood","stablechain"]),EQ=new Set(Jz),HA=Object.freeze({robinhood:4663,ethereum:1,base:8453,arbitrum:42161,optimism:10,polygon:137,avalanche:43114,zora:7777777,blast:81457,sei:1329,ape_chain:33139,b3:8333,soneium:1868,ronin:2020,bera_chain:80094,shape:360,unichain:130,gunzilla:43419,abstract:2741,animechain:69e3,hyperevm:999,somnia:5031,monad:143,megaeth:4326,ink:57073,stablechain:988}),kQ=Object.freeze({OrderComponents:[{name:"offerer",type:"address"},{name:"zone",type:"address"},{name:"offer",type:"OfferItem[]"},{name:"consideration",type:"ConsiderationItem[]"},{name:"orderType",type:"uint8"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"zoneHash",type:"bytes32"},{name:"salt",type:"uint256"},{name:"conduitKey",type:"bytes32"},{name:"counter",type:"uint256"}],OfferItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"}],ConsiderationItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"},{name:"recipient",type:"address"}]}),_Q=new Hd(["function setApprovalForAll(address operator,bool approved)"]),AQ=new Hd(["function cancel((address offerer,address zone,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount)[] offer,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount,address recipient)[] consideration,uint8 orderType,uint256 startTime,uint256 endTime,bytes32 zoneHash,uint256 salt,bytes32 conduitKey,uint256 counter)[] orders) returns (bool cancelled)"])});var WA=S(()=>{dr();Ii()});var KA=S(()=>{dr();Ii()});var GA=S(()=>{dr();Bd();yt();Ii();WA();KA();zw()});var Kw,ZA=S(()=>{GA();Ii();Kw=Object.freeze([{key:"ethereum",chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://etherscan.io",dexscreenerSlug:"ethereum",venueKind:"uniswap-v3",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",stableQuoteAssets:["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.71 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}}]},{key:"optimism",chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://optimistic.etherscan.io",dexscreenerSlug:"optimism",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1905.23 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}}]},{key:"bsc",chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],nativeCurrency:{symbol:"BNB",decimals:18},explorer:"https://bscscan.com",dexscreenerSlug:"bsc",venueKind:"uniswap-v3",wrappedNative:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",stableQuoteAssets:["0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d","0x55d398326f99059fF775485246999027B3197955"],venues:[{kind:"quoter",address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WBNB->USDC fee 500 quoted 413.86 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}},{kind:"router",address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}}]},{key:"polygon",chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],nativeCurrency:{symbol:"POL",decimals:18},explorer:"https://polygonscan.com",dexscreenerSlug:"polygon",venueKind:"uniswap-v3",wrappedNative:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",stableQuoteAssets:["0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WMATIC->USDC fee 500 quoted 0.0720 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}}]},{key:"stable",chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],nativeCurrency:{symbol:"USDT0",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x5d442b349590a6048Eb2dC0eC346cAA5F47A9ab5",venues:[{kind:"quoter",address:"0xb070179E7032CdA868b53e6C1742F80c9e940d1A",label:"Uniswap V3 QuoterV2 (canonical)",verified:{method:"Stable is on the OFFICIAL Uniswap v3 Deployments List (governance-recognised 2026-05-12, UAC process completed 2026-04, deployed by Protofire), so this is a canonical deployment rather than a fork. eth_getCode returned 8273 bytes, the same size as the canonical quoter on the seven already-verified chains. Functional probe on a live pool (TOAST -> USDT0, fee 10000): 100 in -> 0.000003, 1000 -> 0.000031, 10000 -> 0.000319 USDT0. Output scales monotonically with input, which is a working quoter answering, not a revert. Two of three sampled pools carry non-zero liquidity. NOTE: the pools discovered so far are thin, so real routing size is limited -- the venue is proved, deep liquidity is not.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:988}},{kind:"router",address:"0x32eaf9B5d5F2CD7361c5012890C943D7de84C22a",label:"Uniswap SwapRouter02 (canonical)",verified:{method:"eth_getCode returned 24497 bytes. Cross-checked on-chain rather than trusted from docs: router.factory() returns 0x88f0a512ef09175d456bc9547f914f48c013e4aa, the same v3 core factory that created the pools quoted above, and router.WETH9() returns the wrappedNative recorded on this chain entry. Address published in the Stable docs DEX reference and the Uniswap deployments list.",source:"docs.stable.xyz/en/reference/dexes + on-chain factory()/WETH9() round-trip",date:"2026-08-05",chainId:988}}]},{key:"hyperevm",chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],nativeCurrency:{symbol:"HYPE",decimals:18},dexscreenerSlug:"hyperevm",venueKind:"uniswap-v3",wrappedNative:"0x5555555555555555555555555555555555555555",venues:[{kind:"quoter",address:"0x03A918028f22D9E1473B7959C927AD7425A45C7C",label:"HyperSwap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle(1 WHYPE -> USDT0) returned live output on all four fee tiers (100: 57.3385, 500: 57.4187, 3000: 57.3237, 10000: 56.1963 USDT0). Decimals read on-chain: WHYPE 18, USDT0 6. Best tier checked against an INDEPENDENT control the same minute -- Hyperliquid allMids put HYPE at 57.3205, so the pool is 0.171% from the perp mid, which is the right shape for fee plus impact rather than a wrong contract or a decimals bug.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}},{kind:"router",address:"0x4E2960a8cd19B467b82d26D83fAcb0fAE26b094D",label:"HyperSwap V3 SwapRouter",verified:{method:"eth_getCode returned 12070 bytes, and it is the router paired with the quoter proved above -- the same pair already shipped in UNI_V3_VENUES[999].hyperswap, which is the map the quote/prepare path actually routes through.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}}]},{key:"abstract",chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x3439153EB7AF838Ad19d56E1571FBD09333C2809",venues:[{kind:"quoter",address:"0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693",label:"Uniswap V3 QuoterV2 (Abstract deployment)",verified:{method:"Abstract is a ZK-stack chain, so CREATE2 addresses differ and the canonical Uniswap addresses are NOT valid here -- probing them returns codesize 0, which is what previously made this chain look like it had no V3 at all. Found the real deployment from live traffic instead: scanned recent Swap(...) logs, took the busiest pool, read pool.factory() = 0xa1160e73b63f322ae88cc2d8e700833e71d0b2a1, then enumerated that factory's deployer (0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e) and probed each of its 56 contracts with a real quoteExactInputSingle call. Exactly one answered: 1 WETH -> 1846.475731 USDC.e at fee 500. Independent sanity check: the pool's own slot0() spot price is 1873.11 USDC.e per WETH, so the quoter sits ~1.4% below spot, the right shape for fee plus price impact on this size.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:2741}},{kind:"router",address:"0x7712FA47387542819d4E35A23f8116C90C18767C",label:"Uniswap SwapRouter02 (Abstract deployment)",verified:{method:"eth_getCode returned 167392 bytes and the runtime contains the exactInputSingle selector. router.factory() matches the factory proved above and router.WETH9() matches the wrappedNative on this entry. Chosen over its byte-identical twin (0xfD6257F4...) because this is the address real users actually route through: it appeared as tx.to on live swaps against the WETH/USDC.e pool.",source:"on-chain factory()/WETH9() round-trip + live swap tx.to sampling",date:"2026-08-05",chainId:2741}}]},{key:"robinhood",chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC","ROBINHOOD_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},dexscreenerSlug:"robinhood",venueKind:"uniswap-v3",wrappedNative:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",stableQuoteAssets:["0x5fc5360d0400a0fd4f2af552add042d716f1d168"],venues:[{kind:"quoter",address:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDG fee 100 quoted 1866.58 USDG, and USDG->CASHCAT fee 10000 quoted a live amount). A contract that correctly prices known pairs IS a working V3 quoter",source:"live eth_call against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"router",address:"0xcaf681a66d020601342297493863e78c959e5cb2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode (24497 bytes) on this chain and the paired quoter at the same deployment passed a live functional quote",source:"live eth_getCode against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"factory",address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",label:"Uniswap V3 Factory",verified:{method:"eth_getCode returned real bytecode (24535 bytes) and a PoolCreated log scan over this factory returned 76 pools in ~9000 recent blocks",source:"live eth_getLogs against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}}]},{key:"base",chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://basescan.org",dexscreenerSlug:"base",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],venues:[{kind:"quoter",address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",label:"Uniswap V3 QuoterV2 (Base)",verified:{method:"functional probe: quoteExactInputSingle returned WETH->USDC at fee 500 = 1908.44 USDC, a live sane price. The canonical mainnet quoter address also has bytecode on Base but does NOT price this pair, which is exactly the false positive a codesize-only check accepts",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router",address:"0x2626664c2603336E57B271c5C0b26F421741e481",label:"Uniswap V3 SwapRouter02 (Base)",verified:{method:"eth_getCode returned real bytecode and the paired Base quoter passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router-v2",address:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",label:"Uniswap V2 Router02 (Base)",verified:{method:"eth_getCode returned 17891 bytes; live getAmountsOut on WETH->USDC round-tripped to 98.75% (2x0.30% fee + impact)",source:"https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments",date:"2026-07-30",chainId:8453}}]},{key:"arbitrum",chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://arbiscan.io",dexscreenerSlug:"arbitrum",venueKind:"uniswap-v3",wrappedNative:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",stableQuoteAssets:["0xaf88d065e77c8cC2239327C5EDb3A432268e5831","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.72 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}}]},{key:"avalanche",chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],nativeCurrency:{symbol:"AVAX",decimals:18},explorer:"https://snowtrace.io",dexscreenerSlug:"avalanche",venueKind:"uniswap-v3",wrappedNative:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",stableQuoteAssets:["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],venues:[{kind:"quoter",address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WAVAX->USDC fee 500 quoted 6.48 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}},{kind:"router",address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}}]}])});function YA(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;for(let t of Object.values(e))YA(t);return Object.freeze(e)}function E(e){if(!e?.id)throw new Error("registerProvider requires id");if(!e.venue)throw new Error("registerProvider requires venue");if(!Array.isArray(e.ops))throw new Error("registerProvider requires ops[]");let t=String(e.id);if(JA&&Gw.has(t))throw new Error(`registerProvider refuses to overwrite built-in provider: ${t}`);return Vd.set(t,{chainIds:e.chainIds||[],auth:e.auth||"none",description:e.description||"",baseEnv:e.baseEnv||[],...e,id:t}),Vd.get(t)}function Jw({venue:e,op:t}={}){let n=[...Vd.values()];return e&&(n=n.filter(o=>o.venue===e)),t&&(n=n.filter(o=>o.ops.includes(t))),n}function tU(){Gw.clear();for(let[e,t]of Vd)Gw.add(e),YA(t);JA=!0}var Vd,Yz,Xz,Qz,Zw,eU,Gw,JA,XA=S(()=>{jw();Mw();MA();VA();ZA();Vd=new Map,Yz=Object.keys(Uw).map(Number),Xz=Object.keys(Fw).map(Number),Qz=Object.keys(FA).map(Number),Zw=Kw.map(e=>e.chainId),eU=[...new Set(Object.values(HA))],Gw=new Set,JA=!1;E({id:"hl-info",venue:"hl",chainIds:[],auth:"none",ops:["health","allMids","l2Book","outcomeMeta","clearinghouse","userFills","meta","metaAndAssetCtxs","candleSnapshot","openOrders","frontendOpenOrders","userState","spotMeta"],baseEnv:["HL_INFO_URL","HL_API_URL"],description:"Hyperliquid public /info"});E({id:"hl-vaults",venue:"hyperliquid-vaults",chainIds:[],auth:"none",ops:["health","summaries","details","userEquities","tracker"],execution:"read-only",baseEnv:["HL_INFO_URL","HL_API_URL"],description:"Read-only Hyperliquid vault summaries, vault details, user vault equities, and HLP tracking."});E({id:"hl-precompiles",venue:"hyperliquid",chainIds:[999],auth:"none",ops:["health","read","l1BlockNumber","markPx","oraclePx","spotPx","position","spotBalance","vaultEquity","withdrawable"],execution:"read-only",baseEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],description:"HyperEVM L1Read precompiles (0x800-0x809). eth_call only. Includes HLP vault equity. No CoreWriter."});E({id:"protocol-templates",venue:"protocol-builder",chainIds:[],auth:"none",ops:["health","list","listNative","gate","prepareDeploy","buildNative","eval"],description:"Gated EVM templates plus deterministic Solana program and Bitcoin policy scaffolds. Native bundles require chain-specific compile, tests, and simulation before any unsigned deploy/funding prepare. NOT a firm audit."});E({id:"poly-public",venue:"poly",chainIds:[137],auth:"none",ops:["health","time","markets","book","midpoint","spread","price","events"],execution:"read-only",baseEnv:["POLY_CLOB_URL","POLY_GAMMA_URL"],description:"Polymarket CLOB + Gamma public REST"});E({id:"poly-clob",venue:"poly",chainIds:[137],auth:"none",ops:["health","prepareOrder"],execution:"prepare",localSignerSurfaces:["poly"],description:"Polymarket CLOB unsigned EIP-712 order prepare plus owner-operated local-signer submit. Hosted/keyless remains prepare-only."});E({id:"hl-delta-neutral",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","scan","quote","prepare","loop"],execution:"prepare",localSignerSurfaces:["hl"],description:"Hyperliquid funding carry. Armed through the existing hl signer. Hosted/keyless remains prepare-only. Not automated."});E({id:"lighter-delta-neutral",venue:"lighter",chainIds:[],auth:"none",ops:["health","scan","quote","prepare","loop"],execution:"prepare",localSignerSurfaces:["lighter"],description:"Lighter.xyz funding carry. Armed through the official sendTx local-signer. Hosted/keyless remains prepare-only. Not automated."});E({id:"portfolio",venue:"multichain-wallet",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","balances","snapshot","history","valueGraph"],execution:"read-only",description:"Read-only balance aggregation across configured EVM chains, Solana, Bitcoin, and Hyperliquid, plus profile-local observation snapshots, history, and value graphs with explicit partial coverage."});E({id:"nft-portfolio",venue:"multichain-nft-wallet",chainIds:[1,10,137,988,999,2741,4663,8453,42161,43114],auth:"optionalApiKey",ops:["health","inventory","gallery","pnl","prepareList","traitSnipe"],execution:"prepare",baseEnv:["OPENSEA_API_KEY","MAGICEDEN_API_KEY","SATFLOW_API_KEY"],description:"Normalized EVM, Solana, and Bitcoin NFT inventory, static contact-sheet galleries, explicit PnL coverage, user-confirmed unsigned listing preparation, and evidence-gated trait-snipe buy intents."});E({id:"evm-simulate",venue:"onchain-simulation",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","simulate"],execution:"read",baseEnv:[],description:"Pre-sign EVM transaction simulation: eth_call at pending state to catch reverts, decoded revert reasons (Error(string), Panic codes, custom-error selectors), and a buffered gas estimate. Distinguishes a genuine revert from an unreachable node \u2014 an infra failure is never reported as 'would fail'. A pass reflects current chain state and is explicitly not a guarantee."});E({id:"nft-mint",venue:"onchain-mint",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","discover","prepare","priceGas","createTrigger","checkOpen"],execution:"prepare",localSignerSurfaces:["evm-nft"],baseEnv:[],description:"EVM NFT mints: discover the collection's mint entrypoint from bytecode, price a competitive EIP-1559 bid from fee-history percentiles, enforce gas-war caps, surface contract risk, and hand execution to the local signer after explicit arming and bounded grant."});E({id:"universal-mint-router",venue:"universal-nft-mint",chainIds:[],auth:"optionalApiKey",ops:["health","capabilities","prepare"],execution:"prepare",baseEnv:["OPENSEA_API_KEY"],description:"Prepare-only exact universal mint routing across reviewed EVM and Ordinals adapters. Universal Solana mint is RESEARCH_ONLY and disabled until canonical serialized-message decoding ships; the separate Magic Eden marketplace provider is unchanged. It never signs or broadcasts."});E({id:"universal-nft-lifecycle",venue:"universal-nft-lifecycle",chainIds:[],auth:"optionalApiKey",ops:["health","capabilities","route"],execution:"read",baseEnv:["OPENSEA_API_KEY","MAGICEDEN_API_KEY","SATFLOW_API_KEY"],description:"Read-only NFT lifecycle route discovery. It does not prepare, sign, or broadcast artifacts; callers must invoke and review the selected provider operation separately."});for(let[e,t,n]of[["universal-evm-nft-transfer","evm-nft-transfer","Exact unsigned ERC-721/ERC-1155 safeTransferFrom preparation."],["universal-solana-nft-transfer","solana-nft-transfer","Exact unsigned verified Metaplex NFT/Core transfer preparation."],["universal-ordinals-transfer","bitcoin-nft-transfer","Exact unsigned Ordinals PSBT transfer-plan preparation."]])E({id:e,venue:t,chainIds:[],auth:"none",ops:["health","prepare"],execution:"prepare",description:n});E({id:"contract-risk",venue:"onchain-bytecode",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","scan"],execution:"read",baseEnv:[],description:"Structural contract risk from on-chain bytecode: retained owner powers (mint, blacklist, pause, fee changes) and upgradeability across EIP-1967, legacy zeppelinos, and EIP-1822 proxy slots. Complements behavioural sell simulation. Never reports 'safe' \u2014 a clean scan is weak evidence, not a guarantee."});E({id:"evm-token-sniper",venue:"evm-token-launches",chainIds:Zw,auth:"none",ops:["health","scan"],execution:"prepare",localSignerSurfaces:["evm-swap"],baseEnv:Kw.flatMap(e=>e.rpcEnv),description:"One generic EVM token-sniping path across every configured EVM chain: live identity, pools, structural risk, sell simulation, quote, guarded transaction preparation, and local-signer execution handoff. Robinhood Chain is the default, not a special implementation."});E({id:"evm-rpc",venue:"evm",chainIds:[1,137,42161,8453,10,4663,999],auth:"none",ops:["health","healthAll","blockNumber","chainId","getBalance","call","erc20Allowance","erc20Balance","transactionReceipt"],baseEnv:["ETH_RPC_URL","POLYGON_RPC_URL","RH_CHAIN_RPC","BASE_RPC_URL","ARBITRUM_RPC_URL"],description:"EVM JSON-RPC multi-chain (env RPC or public fallbacks)"});E({id:"solana-rpc",venue:"solana",chainIds:[],auth:"none",ops:["health","latestBlockhash","getBalance","tokenAccounts","simulate"],baseEnv:["SOLANA_RPC_URL"],description:"Solana mainnet JSON-RPC read/prepare surface (no key, no signing, no broadcast)"});E({id:"bitcoin-esplora",venue:"bitcoin",chainIds:[],auth:"none",ops:["health","tipHeight","fees","address","utxos","tx","decode"],execution:"read-only",baseEnv:["BTC_ESPLORA_URL","BTC_NETWORK"],description:"Bitcoin L1 via Esplora (mempool.space/Blockstream). Reads only on data plane. User-signed broadcast is bitcoin_send on exec MCP. No Core RPC, no house keys. Wallets: Xverse/UniSat/Leather/OKX/Phantom"});E({id:"bitcoin-meta",venue:"bitcoin-metaprotocol",chainIds:[],auth:"optionalApiKey",ops:["health","runeBalances","inscriptions","inscriptionInfo","inscriptionChildren","ordBlockInfo"],execution:"read-only",baseEnv:["BTC_META_API_URL","UNISAT_API_KEY","BESTINSLOT_API_KEY"],description:"Bitcoin ordinals/runes reads. Keyless tier via ordinals.com recursive (inscriptionInfo/children/blockInfo); address-indexed ops (inscriptions, runeBalances) need a keyed indexer. Hiro is deprecated (410) and Magic Eden BTC is dead \u2014 use satflow for market."});E({id:"satflow",venue:"bitcoin-marketplace",chainIds:[],auth:"apiKey",ops:["health","collectionFloors","collectionStats","item","walletContents","floorListings","preparePurchase","prepareList"],execution:"prepare",localSignerSurfaces:["btc"],baseEnv:["SATFLOW_API_KEY","SATFLOW_API_URL"],description:"Satflow ordinals+runes marketplace (api.satflow.com). Primary BTC NFT market after Magic Eden BTC sunset. PSBT intents for buy/list; key via x-api-key."});E({id:"jupiter",venue:"solana-dex",chainIds:[],auth:"none",ops:["health","venues","quote","prepare"],execution:"prepare",localSignerSurfaces:["sol"],baseEnv:["JUPITER_SWAP_API_URL","SOLANA_RPC_URL"],description:"Jupiter Swap API v1 quote + local-signer Solana swap handoff"});E({id:"hl-perps",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","assetInfo","prepareOrder","prepareCancel","prepareLeverage","prepareIsolatedMargin","prepareBracket","prepareBuilderApproval"],execution:"prepare",localSignerSurfaces:["hl"],notes:"Hyperliquid perp, HIP-3, and HIP-4 outcome orders through local-signer L1 action handoff."});E({id:"hl-markets",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","markets","leaderboards","coin","spot"],notes:"Joined Hyperliquid market datapoints for the Hyperliquid agent. Read-only."});E({id:"hl-entry-state",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","see","qualify","lock","list","watch"],execution:"read-only",description:"SEE/ENTER/MANAGE for discretionary HL perps: compose sourced /info fields, qualify a side, lock the state only after a fill receipt, and alert_only-diff live vs that lock. Never signs."});E({id:"hl-staking",venue:"hypercore-staking",chainIds:[],auth:"none",ops:["health","validators","delegatorSummary","delegations","rewards","history","preflight","prepareStakeDeposit","prepareStakeWithdraw","prepareDelegate"],execution:"prepare",localSignerSurfaces:["hl"],baseEnv:["HL_INFO_URL","HL_EXCHANGE_URL","HL_TESTNET"],description:"Hyperliquid HyperCore HYPE staking. Public reads plus local-signer EIP-712 execution for cDeposit / cWithdraw / tokenDelegate after arming. Hosted/keyless remains prepare-only."});E({id:"magiceden-sol",venue:"solana-nft",chainIds:[],auth:"optionalApiKey",ops:["health","stats","listings","tokenListings","prepareBuy","prepareList","prepareMint"],execution:"prepare",baseEnv:["MAGICEDEN_API_KEY","MAGICEDEN_API_URL"],description:"Magic Eden Solana NFT market. Reads (stats/listings) are keyless; buy/list/mint instruction builders need MAGICEDEN_API_KEY and return an unsigned base64 transaction for the user's Solana wallet. Never signs or broadcasts."});E({id:"defillama",venue:"prices",chainIds:[],auth:"none",ops:["health","prices","pricesBySymbol","protocols","yields","stablecoins","dexVolumes"],baseEnv:["DEFILLAMA_COINS_URL","DEFILLAMA_API_URL"],description:"DeFiLlama public prices + protocols TVL"});E({id:"lifi",venue:"dex",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","quote","prepare","chains"],execution:"prepare",baseEnv:["LIFI_API_URL"],description:"LI.FI public cross-chain / DEX aggregator quotes (no key)"});E({id:"dexscreener",venue:"dex",chainIds:[],auth:"none",ops:["health","token","search","pair"],baseEnv:["DEXSCREENER_API_URL"],description:"DexScreener public token/pair discovery"});E({id:"uniswap-v3",venue:"dex",chainIds:Yz,auth:"none",ops:["health","quote","prepare","quotePath","ethUsdc","chains"],execution:"prepare",localSignerSurfaces:["evm-swap"],baseEnv:["ETH_RPC_URL","BASE_RPC_URL","ARBITRUM_RPC_URL","OPTIMISM_RPC_URL","BSC_RPC_URL","POLYGON_RPC_URL","AVALANCHE_RPC_URL","RH_CHAIN_RPC"],description:"Uniswap V3 QuoterV2 exact-in quotes via eth_call across official deployments plus Robinhood Chain, no key"});E({id:"lp-exit",venue:"dex",chainIds:Qz,auth:"none",ops:["health","inspect","prepareRemove","prepareSettlement","prepareUnwrap","chains"],execution:"prepare",baseEnv:["ETH_RPC_URL","BASE_RPC_URL"],description:"Receipt-gated Uniswap V3 LP exit into native asset: remove/collect, net-route token legs, then unwrap. Unsigned only."});E({id:"lp-liquidity-ranker",venue:"dex",chainIds:Zw,auth:"none",ops:["health","rank"],execution:"read-only",description:"Cross-chain LP destination analysis: deepest liquidity and net-best migration are separate, exact canonical mappings required."});E({id:"lp-destination-discovery",venue:"dex",chainIds:Zw,auth:"none",ops:["health","discover"],execution:"read-only",description:"Live exact-address LP pool discovery across configured chains; reports deepest liquidity separately from cost-qualified migration evidence."});E({id:"uniswap-v4",venue:"dex",chainIds:Xz,auth:"none",ops:["health","quote","inspectHook","prepare","chains"],execution:"prepare",baseEnv:["ETH_RPC_URL","BASE_RPC_URL","ARBITRUM_RPC_URL","OPTIMISM_RPC_URL","BSC_RPC_URL","POLYGON_RPC_URL","AVALANCHE_RPC_URL","RH_CHAIN_RPC"],description:"Uniswap V4 quotes, hook permission/code/pool-state inspection, and guarded unsigned Universal Router preparation across official deployments plus Robinhood Chain."});E({id:"x402",venue:"payments",chainIds:[],auth:"none",ops:["health","inspect","prepare"],execution:"prepare",description:"x402 v2 PAYMENT-REQUIRED inspection and explicit-cap exact-payment templates. Never signs, calls a facilitator, or retries a paid request."});E({id:"bankr",venue:"wallet-data",chainIds:[],auth:"apiKey",ops:["health","wallet","portfolio","swapQuote"],execution:"read-only",baseEnv:["BANKR_API_KEY","BANKR_API_URL"],description:"Bankr Wallet API read-only identity, portfolio, and swap quotes. Oracle excludes Bankr swap, transfer, sign, submit, agent, and LLM endpoints."});E({id:"aerodrome",venue:"dex",chainIds:[8453],auth:"none",ops:["health","quote","prepare","chains"],execution:"prepare",localSignerSurfaces:["evm-swap"],baseEnv:["BASE_RPC_URL"],description:"Aerodrome Slipstream CL on Base \u2014 QuoterV2 + SwapRouter exact-input via eth_call (tickSpacing, no key)"});E({id:"zerox",venue:"dex",chainIds:[1,10,137,8453,42161],auth:"apiKey",ops:["health","price","quote","prepare"],execution:"prepare",baseEnv:["ZEROX_API_KEY","ZEROX_API_URL"],description:"0x Swap API v2 price/quote/prepare \u2014 requires ZEROX_API_KEY (unconfigured without key; no Oracle key shipped)"});E({id:"across",venue:"bridge",chainIds:[1,10,137,42161,8453],auth:"none",ops:["health","suggestedFees"],baseEnv:["ACROSS_API_URL"],description:"Across bridge suggested-fees (public)"});E({id:"hop",venue:"bridge",chainIds:[1,10,137,42161],auth:"none",ops:["health","quote"],baseEnv:["HOP_API_URL"],description:"Hop Protocol bridge quotes (public)"});E({id:"relay",venue:"bridge",chainIds:[1,10,137,8453,42161],auth:"none",ops:["health","quote","prepare"],execution:"prepare",baseEnv:["RELAY_API_URL"],description:"Relay.link bridge/swap quotes (public)"});E({id:"cowswap",venue:"dex",chainIds:[1,100,42161,8453],auth:"none",ops:["health","quote","prepareOrder","order","status","chains","arm"],execution:"armed-local",localSignerSurfaces:["evm-order"],baseEnv:[],description:"CowSwap batch auction. Quote is public; Allow posts official api.cow.fi orders."});E({id:"oneinch",venue:"dex",chainIds:[1,10,137,8453,42161],auth:"apiKey",ops:["health","quote","prepare","approveSpender"],execution:"prepare",baseEnv:["ONEINCH_API_KEY","ONEINCH_API_URL"],description:"1inch Swap API v6 quote/prepare \u2014 requires ONEINCH_API_KEY (unconfigured without key; no Oracle key shipped)"});E({id:"hl-ws",venue:"hl",chainIds:[],auth:"none",ops:["health","allMids","l2Book","snapshot"],baseEnv:["HL_WS_URL"],description:"Hyperliquid short-lived WS snapshots (allMids/l2Book)"});E({id:"poly-ws",venue:"poly",chainIds:[137],auth:"none",ops:["health","book","snapshot"],baseEnv:["POLY_WS_URL"],description:"Polymarket CLOB short-lived WS market snapshots"});E({id:"anvil-nft",venue:"robinhood-nft",chainIds:[4663],auth:"optionalApiKey",ops:["health","markets","quoteSpecificBuy","quoteSell","scanCollection","scanAllMarkets","scanCrossVenueArb","scanAllMarketsArb","prepareSpecificBuy","prepareSell"],execution:"prepare",localSignerSurfaces:["evm-nft"],baseEnv:["RH_CHAIN_RPC","OPENSEA_API_KEY","OPENSEA_ENV_FILE"],description:"All-market Anvil discovery and exact-token arbitrage, with exact buy and sell execution through the armed owner-local signer after human confirmation"});E({id:"stonkbrokers",venue:"robinhood-nft",chainIds:[4663],auth:"optionalApiKey",ops:["health","quoteBrokerBuy","scanBrokerLoot","prepareBrokerBuy","brokerDesk","clockInStatus","prepareClockIn"],execution:"prepare",baseEnv:["RH_CHAIN_RPC"],description:"Unsigned StonkBrokers Broker Desk discovery, nested-loot verification, and bounded local-only preparations"});E({id:"opensea-nft",venue:"nft",chainIds:eU,auth:"apiKey",ops:["health","collection","floor","bestListings","bestListing","bestOffer","accountNfts","accountPnl","prepareMint","prepareList","prepareCancel"],execution:"prepare",baseEnv:["OPENSEA_API_KEY","OPENSEA_ENV_FILE"],description:"OpenSea multichain NFT inventory, floors, and unsigned bounded mint, listing, and listing-cancellation preparations; opaque buy/sweep fulfillment is disabled"});E({id:"local-marketplace",venue:"local-p2",chainIds:[],auth:"none",ops:["health","createListing","listListings","cancelListing","createOffer","armFill"],execution:"prepare",localSignerSurfaces:["evm-nft"],description:"Owner-local P2 catalog stored under ~/.config/oracle. Additive and isolated from OpenSea, Magic Eden, Satflow, Bisq, Anvil, and Polymarket. Listings are armed for the owner-local signer; sign-and-broadcast is an explicit createLocalMarketplace().instructFill instruction. Generic signHash is refused."});E({id:"local-x402",venue:"local-x402",chainIds:[],auth:"none",ops:["health","createIntent","listIntents","cancelIntent","armPayment"],execution:"prepare",localSignerSurfaces:["evm-swap"],description:"Owner-local x402 payment budgets under ~/.config/oracle. Additive and isolated from OpenSea and Telegram. Intents are armed; sign-and-broadcast is an explicit createLocalX402().instructPay instruction. Generic signHash is refused."});E({id:"local-pack-registry",venue:"local-packs",chainIds:[],auth:"none",ops:["health","registerPack","listPacks","revokePack"],execution:"read-only",description:"Owner-local third-party pack REGISTRY under ~/.config/oracle. Catalog only: packs are never loaded or executed. Isolated from OpenSea and Telegram."});E({id:"erc8004-identity",venue:"agent-identity",chainIds:[],auth:"none",ops:["health","prepareIdentityRegistration","prepareAgentURIUpdate","inspectIdentity","arm"],execution:"armed-local",localSignerSurfaces:["evm"],baseEnv:["ORACLE_ERC8004_CHAIN_ID","ORACLE_ERC8004_IDENTITY_REGISTRY"],description:"Draft ERC-8004 identity. Public prepare is keyless; Allow broadcasts type-2 register/setAgentURI."});E({id:"hyperevm-dex",venue:"hyperevm",chainIds:[999],auth:"none",ops:["health","search","token"],baseEnv:["HYPEREVM_RPC_URL"],description:"HyperEVM pair discovery via DexScreener + optional RPC"});E({id:"geckoterminal",venue:"dex-data",chainIds:[],auth:"none",ops:["health","networks","pool","token","ohlcv"],baseEnv:["GECKOTERMINAL_API_URL"],description:"GeckoTerminal public networks, pools, tokens, and OHLCV"});E({id:"curve",venue:"dex",chainIds:[1,10,56,137,988,999,4663,8453,42161,43114],auth:"none",ops:["health","openapi","pools","quote","prepare"],execution:"prepare",baseEnv:["CURVE_API_URL"],description:"Curve public pool registry API + RouterNG validated single-hop prepare"});E({id:"gmx",venue:"perps-data",chainIds:[42161,43114],auth:"none",ops:["health","tickers","markets","marketsInfo","tokens","prepareOrder","positions","orderStatus","verifyOrder"],execution:"intent",baseEnv:[],description:"GMX v2 public oracle/markets plus guarded async order intents on Arbitrum and Avalanche"});E({id:"morpho",venue:"lending-data",chainIds:[1,10,137,2741,8453,42161,4663,999,988],auth:"none",ops:["health","markets","vaults","prepareVault"],execution:"intent",baseEnv:["MORPHO_API_URL"],description:"Morpho public GraphQL markets/vaults + guarded ERC-4626 vault intents"});E({id:"balancer",venue:"dex",chainIds:[1,10,137,42161,43114,8453],auth:"none",ops:["health","pools","quote","prepare"],execution:"prepare",baseEnv:["BALANCER_API_URL"],description:"Balancer public GraphQL pool data + v3 Router exact-input prepare (Polygon read-only)"});E({id:"pendle",venue:"yield",chainIds:[1,10,56,8453,42161,999],auth:"none",ops:["health","markets","quote","prepare"],execution:"prepare",baseEnv:["PENDLE_API_URL"],description:"Pendle public yield-market API + Hosted SDK direct Convert prepare"});E({id:"odos",venue:"dex",chainIds:[1,10,56,137,8453,42161,43114,4663],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-07-30",reason:"Odos sunset the public SOR API; /sor/quote/v2 and v3 both return 410 Gone",evidence:"sunset: Thu, 30 Jul 2026 12:00:00 GMT response header"},baseEnv:["ODOS_API_URL"],description:"Odos public SOR (DEPRECATED upstream 2026-07-30 -- endpoint returns 410)"});E({id:"blockscout",venue:"explorer",chainIds:[1,10,137,8453,42161],auth:"none",ops:["health","stats","address","token"],baseEnv:[],description:"Verified public Blockscout REST v2 instances"});E({id:"paraswap",venue:"dex",chainIds:[1,10,56,137,8453,42161,43114,4663],auth:"none",ops:["health","tokens","price","quote","prepare"],execution:"prepare",baseEnv:["PARASWAP_API_URL"],description:"ParaSwap/Velora public price routes + validated transaction builder"});E({id:"rfq",venue:"intent-rfq",chainIds:[1,10,56,137,8453,42161,43114,4663],auth:"none",ops:["health","intent","quote"],execution:"prepare",baseEnv:["ZEROX_API_KEY","ONEINCH_API_KEY"],description:"Cross-chain RFQ intent normalizer and firm-quote fanout over reviewed venues. Prepares artifacts only, never signs or broadcasts."});E({id:"execution-strategies",venue:"oracle-native",chainIds:[],auth:"none",ops:["health","plan"],execution:"plan-only",baseEnv:[],description:"Oracle-native TWAP, VWAP, POV, iceberg, and implementation-shortfall planners. No Tread.fi/API dependency. Plans never sign or broadcast; every slice requires a fresh best-execution quote, policy check, simulation, confirmation, wallet signature, and receipt."});E({id:"polygon-staking",venue:"polygon-staking",chainIds:[137],auth:"none",ops:["health","validators","validatorDetail"],baseEnv:["POLYGON_STAKING_API_URL"],description:"Polygon POS staking validators"});E({id:"babylon-staking",venue:"btc-staking",chainIds:[],auth:"none",ops:["health","stats","finalityProviders","delegations"],execution:"read-only",baseEnv:["BABYLON_STAKING_API_URL"],description:"Babylon native BTC staking (staking-api.babylonlabs.io v2). Keyless per-staker positions from a PUBLIC key alone \u2014 APR, TVL, finality-provider roster, and delegations. Read-only; staking/unbonding is user-wallet."});E({id:"mempool-mining",venue:"btc-mining",chainIds:[],auth:"none",ops:["health","difficulty","poolShare","hashrate","rewardStats"],execution:"read-only",baseEnv:["MEMPOOL_API_URL"],description:"Bitcoin mining + network security telemetry via mempool.space /api/v1/mining. Difficulty retarget, pool concentration (top-1/top-3 share), hashrate trend, subsidy-vs-fee split."});E({id:"liquid-esplora",venue:"liquid",chainIds:[],auth:"none",ops:["health","tipHeight","addressInfo","assetInfo"],execution:"read-only",baseEnv:["LIQUID_ESPLORA_URL"],description:"Liquid Network (Blockstream sidechain) via Esplora. Same schema as bitcoin-esplora plus multi-asset issuance/peg stats. Confidential addresses return TXO counts only \u2014 amounts are blinded on chain and reported as such."});E({id:"hiro-stacks",venue:"stacks",chainIds:[],auth:"none",ops:["health","networkInfo","stackingInfo","poxCycles","blocks"],execution:"read-only",baseEnv:["HIRO_API_URL","HIRO_API_KEY"],description:"Stacks (Bitcoin L2) via Hiro public API. Network tip, PoX stacking state (the BTC-yield mechanism), and historical reward cycles. Keyless tier is ~20 rps; HIRO_API_KEY is optional and never required."});E({id:"tron-public",venue:"tron",chainIds:[],auth:"none",ops:["health","account","trc20Balances","trc20Transfers","chainParameters"],execution:"read-only",localSignerSurfaces:[],baseEnv:["TRON_API_URL","TRONGRID_API_KEY"],description:"Tron mainnet via public TronGrid. TRX balance, TRC20 token balances, USDT-TRC20 transfer history, chain parameters. Tron carries the largest USDT float of any chain. Keyless; TRONGRID_API_KEY only raises the rate ceiling and never travels to a non-TronGrid host."});E({id:"ton-public",venue:"ton",chainIds:[],auth:"none",ops:["health","accountState","jettonBalances","transactions"],execution:"read-only",localSignerSurfaces:[],baseEnv:["TON_API_URL","TONCENTER_API_KEY"],description:"TON via public toncenter. Account state + nanoton balance, jetton (TON's ERC20) balances, transaction history. The settlement layer for Telegram-native assets. Keyless; TONCENTER_API_KEY only raises the rate ceiling."});E({id:"cosmos-lcd",venue:"cosmos",chainIds:[],auth:"none",ops:["health","chains","balances","delegations","denomTrace"],execution:"read-only",localSignerSurfaces:[],baseEnv:["COSMOS_LCD_URL","COSMOS_CHAIN"],description:"Cosmos SDK chains via keyless LCD/REST \u2014 one provider, many chains (cosmoshub default, plus osmosis/celestia/injective/neutron/dydx/noble/kava, or any LCD via COSMOS_LCD_URL_<CHAIN>). Bank balances, staking delegations + unbondings + rewards, and IBC denom-trace resolution for ibc/<hash> denoms."});E({id:"sui-public",venue:"sui",chainIds:[],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-08-25",reason:"Sui public fullnodes return JSON-RPC -32601 because the JSON-RPC surface is deprecated",evidence:"Migrate the provider to Sui GraphQL or gRPC before restoring it to the live roster"},localSignerSurfaces:[],baseEnv:["SUI_RPC_URL"],description:"QUARANTINED: Sui public JSON-RPC is deprecated. A GraphQL or gRPC replacement has not shipped."});E({id:"aptos-public",venue:"aptos",chainIds:[],auth:"none",ops:["health","account","resources","coinBalances"],execution:"read-only",localSignerSurfaces:[],baseEnv:["APTOS_FULLNODE_URL","APTOS_API_KEY"],description:"Aptos mainnet via the public fullnode REST API. Ledger info, account sequence/auth key, Move resources, and coin balances (0x1::coin::balance view with a CoinStore resource fallback). Read-only; the transaction submit door is never called."});E({id:"ordinals-runes",venue:"btc-runes",chainIds:[],auth:"none",ops:["health","blockHeight","blockInfo","satInfo","runeInfo"],execution:"read-only",baseEnv:["ORDINALS_BASE_URL"],description:"Runes + sat/block index via a public ord server (ordinals.com). /r/blockheight is PLAIN TEXT; the /runes listing is 406 'JSON API disabled' so only per-rune lookup exists; rune names must drop the bullet spacer (UNCOMMONGOODS)."});E({id:"mempool-lightning",venue:"btc-lightning",chainIds:[],auth:"none",ops:["health","statistics","nodeRankings","nodeCountries"],execution:"read-only",baseEnv:["MEMPOOL_API_URL"],description:"Lightning Network topology via mempool.space. Capacity/channel/node aggregates, node rankings, country distribution. STALE-PRONE: the crawler snapshot has been observed weeks behind, so every response carries ageDays + a stale flag."});E({id:"bob-rootstock",venue:"btc-l2",chainIds:[60808,30],auth:"none",ops:["health","stats","addressInfo","tokenBalances"],execution:"read-only",baseEnv:["BOB_EXPLORER_URL","ROOTSTOCK_EXPLORER_URL"],description:"BOB (60808) and Rootstock (30) \u2014 the EVM Bitcoin L2s \u2014 via their Blockscout v2 instances (identical schema, one code path). Chain stats, gas prices, native balances, token holdings. Pass chainId 'all' to fan out."});E({id:"bisq-markets",venue:"bisq",chainIds:[],auth:"none",ops:["health","markets","ticker","trades"],execution:"read-only",baseEnv:["BISQ_MARKETS_URL"],description:"Bisq non-KYC P2P BTC price discovery (markets.bisq.network). Value is the BASIS against centralized spot, not the absolute print: volume is thin and the last trade can be hours old, so trade age is always reported."});E({id:"social-intel",venue:"oracle-social",chainIds:[],auth:"none",ops:["health","trendingTokens","trendingCas","keywordMentions","smartAccounts","narratives"],execution:"read-only",localSignerSurfaces:[],baseEnv:["ORACLE_SOCIAL_INTEL_STORE","ORACLE_SOCIAL_INTEL_STALE_MIN"],description:"Local curated-account crypto social intelligence. Sample = graded caller list, NOT a firehose; every response reports sample size and snapshot age."});E({id:"magiceden-ordinals",venue:"btc-ordinals-market",chainIds:[],auth:"none",ops:["health","collectionStat"],execution:"read-only",baseEnv:["MAGICEDEN_ORD_API_URL","MAGICEDEN_API_KEY","MAGICEDEN_PROBE_COLLECTION"],description:"Magic Eden ordinals collection stats. DEGRADED UPSTREAM: /v2/ord/btc/* returned 503 'no healthy upstream' on every verification attempt. health() reports ok:false while it is down and collectionStat() returns upstreamDown:true with fallback 'satflow' instead of throwing. Only /stat is wired; 600 req/min documented."});E({id:"braiins-insights",venue:"btc-mining",chainIds:[],auth:"none",ops:["health","priceStats","poolStats"],execution:"read-only",baseEnv:["BRAIINS_INSIGHTS_URL"],description:"Braiins mining insights \u2014 BTC price tick + per-pool block/hashrate distribution. Use insights.braiins.com (302s to learn.braiins.com, followed transparently); pool.braiins.com/api is 403 and is NOT the public API."});E({id:"pyth-price-feeds",venue:"solana-oracle",chainIds:[],auth:"none",ops:["health","latestPrice","latestPrices","feedDirectory"],baseEnv:["PYTH_HERMES_URL"],description:"Pyth Network: Solana price feeds with confidence intervals, real-time updates, zero auth"});E({id:"solend-lending",venue:"solana-lending",chainIds:[],auth:"none",ops:["health","markets","reserves"],baseEnv:["SAVE_API_URL"],description:"Solend/Save lending: markets + per-reserve supply/borrow APY, Solana's Aave equivalent (keyless)"});E({id:"jito-mev",venue:"solana-mev",chainIds:[],auth:"none",ops:["health","recentBundles","tipFloor"],baseEnv:["JITO_API_URL"],description:"Jito MEV: recent bundles, tippers, tip floor \u2014 real-time Solana MEV data (keyless)"});E({id:"sanctum-lst",venue:"solana-staking",chainIds:[],auth:"none",ops:["health","lstList","apyAll","apyIndividual"],baseEnv:["SANCTUM_API_URL"],description:"Sanctum LST: liquid staking tokens with per-token APY \u2014 JitoSOL, mSOL, bSOL, compSOL, pathSOL, etc. (keyless)"});E({id:"kamino-strategies",venue:"solana-yield",chainIds:[],auth:"none",ops:["health","strategies","strategyMetrics"],baseEnv:["KAMINO_API_URL"],description:"Kamino: live yield strategies with APY, TVL, vault balances (keyless)"});E({id:"meteora-dlmm",venue:"solana-dex",chainIds:[],auth:"none",ops:["health","pools","poolSearch"],baseEnv:["METEORA_API_URL"],description:"Meteora DLMM: concentrated liquidity pools via amm-v2 API, distinct from Jupiter DEX routes (keyless)"});E({id:"aave-v3",venue:"evm-lending",chainIds:[1,10,56,137,59144,1088,534352,8453,42161,43114,5e3,1868],auth:"none",ops:["health","markets","marketReserves","chains"],baseEnv:["AAVE_V3_API_URL"],description:"Aave V3 GraphQL: multi-chain lending, full market + reserve schema with supplyInfo/borrowInfo (keyless)"});E({id:"cow-protocol",venue:"evm-intent",chainIds:[1,100,42161],auth:"none",ops:["health","auction","openOrders","recentTrades"],baseEnv:["COW_API_URL"],description:"CoW Protocol: intent/solver auction data, open orders, trades \u2014 intent-based DEX not covered by existing providers (keyless)"});E({id:"relayscan-mev",venue:"evm-mev",chainIds:[1],auth:"none",ops:["health","overview","builderProfit","dailyStats"],baseEnv:["RELAYSCAN_API_URL"],description:"Relayscan: MEV relay overview, builder profit rankings, daily block stats (keyless)"});E({id:"birdeye-tokens",venue:"solana-tokens",chainIds:[],auth:"none",ops:["health","tokenList"],baseEnv:["BIRDEYE_API_URL"],description:"Birdeye public token list: Solana tokens ranked by 24h volume, market cap (keyless)"});E({id:"das-assets",venue:"solana-nft",chainIds:[],auth:"none",ops:["health","assetsByOwner","searchAssets","assetProof"],baseEnv:["SOLANA_RPC_URL"],description:"Digital Asset Standard (DAS): compressed NFT reads via public Solana RPC \u2014 getAssetsByOwner, searchAssets, assetProof. No Helius key needed."});E({id:"symbiotic-restaking",venue:"evm-restaking",chainIds:[1],auth:"none",ops:["health","vaults","vaultDetail"],baseEnv:["SYMBIOTIC_API_URL"],description:"Symbiotic restaking: vaults with collateral data, approved status, operator metadata (keyless)"});E({id:"beefy-yields",venue:"evm-yield",chainIds:[1,10,56,137,8453,42161,43114,250,1088],auth:"none",ops:["health","apy","apyBreakdown"],baseEnv:["BEEFY_API_URL"],description:"Beefy Finance: cross-chain yield aggregator vaults with APY breakdowns (keyless)"});E({id:"across-bridge",venue:"evm-bridge",chainIds:[1,10,42161,8453,324,59144],auth:"none",ops:["health","pools","suggestedFees"],baseEnv:["ACROSS_API_URL"],description:"Across bridge: pool liquidity + APY per bridge pool with suggested fees (keyless)"});E({id:"spark-lend",venue:"evm-lending",chainIds:[1],auth:"none",ops:["health","markets"],baseEnv:["SPARK_API_URL"],description:"Spark Lend / Sky Savings: ERC-4626 vault APY + TVL + user count (keyless)"});E({id:"l2beat-tvl",venue:"evm-l2",chainIds:[],auth:"none",ops:["health","tvl","activity"],baseEnv:["L2BEAT_API_URL"],description:"L2Beat: L2 scaling TVL, project-level breakdowns, activity metrics (keyless)"});E({id:"celestia-da",venue:"evm-da",chainIds:[],auth:"none",ops:["health","stats","blockStats"],baseEnv:["CELENIUM_API_URL"],description:"Celestia DA via Celenium: blob stats, block-level blob counts, network metrics (keyless)"});E({id:"limit-order",venue:"1inch-lop",chainIds:[1,10,56,137,8453,42161],auth:"none",ops:["health","prepare","arm"],execution:"armed-local",localSignerSurfaces:["evm-order"],description:"1inch Limit Order Protocol v4. Queues on the local signer; Allow posts the order."});E({id:"jupiter-dca",venue:"jupiter",chainIds:[],auth:"none",ops:["health","prepare","arm"],execution:"armed-local",localSignerSurfaces:["sol"],description:"Jupiter limit/DCA. Unsigned tx queues on the sol signer; Allow submits."});E({id:"protective-monitors",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health","depeg","oracleDeviation","exploitFeed","goplus","liquidationLadder"],execution:"read-only",description:"Alert-only depeg, oracle deviation, exploit feed, GoPlus second opinion, liquidation ladder."});E({id:"funding-scanner",venue:"perps",chainIds:[],auth:"none",ops:["health","scan"],execution:"read-only",description:"Cross-venue funding carry ranked net of fee drag. Failed venues stay FAILED."});E({id:"perp-universal",venue:"perps",chainIds:[],auth:"none",ops:["health","fundingAll","prepareOrder"],execution:"prepare-only",description:"Live fundingAll across HL/GMX/dYdX + honest FAILED Drift/Vertex. prepareOrder unsigned."});E({id:"onchain-options",venue:"options",chainIds:[],auth:"none",ops:["health","rank"],execution:"read-only",description:"Local Black-Scholes ranking. No arm until official Derive/Lyra domain is pinned."});E({id:"holder-clusters",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health","score"],execution:"read-only",description:"Heuristic holder HHI + common-funding clusters. Not identity."});E({id:"kalshi",venue:"prediction",chainIds:[],auth:"none",ops:["health","markets"],execution:"read-only",description:"Kalshi market catalog read-only. Trading may be US-restricted. Prepare refused."});E({id:"derive-options",venue:"options",chainIds:[],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-08-25",reason:"No official Derive EIP-712 domain or contract is pinned, so prepare remains unavailable",evidence:"prepareOption() in onchain-options.mjs refuses unconditionally"},description:"UNAVAILABLE: Derive execution has no pinned official domain. Use onchain-options for local ranking."});E({id:"limitless",venue:"prediction",chainIds:[],auth:"none",ops:["health","markets"],execution:"read-only",description:"Limitless market catalog. Prepare refused \u2014 no grant-bound decoder."});E({id:"dov-vaults",venue:"options",chainIds:[],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-08-25",reason:"The reviewed DOV vault registry is empty, so every vault read refuses",evidence:"REVIEWED_DOV_VAULTS.length is zero and no reviewed code hash is pinned"},description:"UNAVAILABLE: the reviewed DOV vault registry is empty and every read fails closed."});E({id:"prediction-match",venue:"prediction",chainIds:[],auth:"none",ops:["health","match"],execution:"read-only",description:"Cross-venue event match. Same title is not a match."});E({id:"tee-attestation",venue:"identity",chainIds:[],auth:"none",ops:["health","verify"],execution:"read-only",description:"TEE schema stub. Hardware unavailable. Unknown root unverified."});E({id:"keeper-mirror",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health"],execution:"read-only",description:"Keeper alert-mirror. Off by default. No execute path."});E({id:"erc7715-permissions",venue:"aa",chainIds:[],auth:"none",ops:["health","normalize"],execution:"read-only",description:"ERC-7715 permission normalize. Wildcards refused. aa allowlist empty."});E({id:"erc7710-delegation",venue:"aa",chainIds:[],auth:"none",ops:["health","inspect"],execution:"read-only",description:"ERC-7710 delegation inspect. Missing revocation/expiry fails closed."});E({id:"binance-public",venue:"cex",chainIds:[],auth:"none",ops:["health","ticker","orderbook","funding","markPrice","openInterest","fundingHistory"],execution:"read-only",localSignerSurfaces:[],baseEnv:["BINANCE_API_URL","BINANCE_FAPI_URL"],description:"Binance public spot + USD-M perp market data (ticker, depth, premiumIndex funding, open interest). Keyless reads only; no trading endpoints."});E({id:"okx-public",venue:"cex",chainIds:[],auth:"none",ops:["health","ticker","orderbook","funding","markPrice","openInterest"],execution:"read-only",localSignerSurfaces:[],baseEnv:["OKX_API_URL"],description:"OKX public v5 market data (ticker, books, swap funding-rate, mark-price, open-interest). Keyless reads only; no trading endpoints."});E({id:"bybit-public",venue:"cex",chainIds:[],auth:"none",ops:["health","ticker","orderbook","funding","markPrice","openInterest","fundingHistory"],execution:"read-only",localSignerSurfaces:[],baseEnv:["BYBIT_API_URL"],description:"Bybit public v5 market data (spot/linear tickers, orderbook, funding, open interest). Keyless reads only; no trading endpoints."});E({id:"cex-basis",venue:"cex",chainIds:[],auth:"none",ops:["health","basis","fundingSpread","legs"],execution:"read-only",localSignerSurfaces:[],baseEnv:["BINANCE_API_URL","OKX_API_URL","BYBIT_API_URL","HL_INFO_URL"],description:"Cross-venue perp basis and annualized funding spreads across Binance, OKX, Bybit and Hyperliquid public data. Analysis only, no sizing and no prepare."});E({id:"snapshot-governance",venue:"governance",chainIds:[],auth:"none",ops:["health","spaces","proposals","activeProposals","proposal","votes","votingPower"],execution:"read-only",localSignerSurfaces:[],baseEnv:["SNAPSHOT_API_URL"],description:"Snapshot.org off-chain governance reads: spaces, proposals, proposal detail, an address's votes and voting power. Never signs a vote."});E({id:"tally-governance",venue:"governance",chainIds:[1,10,42161],auth:"none",ops:["health","governors","info","proposals","proposal","voterStatus","tallyProposals"],execution:"read-only",localSignerSurfaces:[],baseEnv:["TALLY_API_URL","TALLY_API_KEY"],description:"Governor Bravo / OZ Governor on-chain proposal state and vote tallies for major DAOs, plus optional keyed Tally metadata. Read-only ABI has no vote/queue/execute selector."});E({id:"stablecoin-peg",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health","scan"],execution:"read-only",localSignerSurfaces:[],baseEnv:[],description:"Peg-deviation scan across major and Hyperliquid-native stables. Ranks by absolute bps from $1 and classifies normal/watch/warn/depeg. Unpriced is unknown, never on-peg. Read-only composition of DefiLlama/Pyth/DexScreener."});tU()});function iU(e={}){return rU.has(e.auth)?(Array.isArray(e.baseEnv)?e.baseEnv:[]).filter(t=>nU.test(t)&&!oU.test(t)):[]}function Wd(e={}){return e.execution==="unavailable"||!!e.deprecated}function aU(e={},t={},{env:n=process.env}={}){let o;if(Wd(e))o="deprecated";else if(t?.ok===!0)o="live";else{let r=iU(e);r.length>0&&!r.some(a=>String(n?.[a]||"").trim())?o="needs_key":e.softFail?o="soft_fail":o="hard_down"}return Object.freeze({provider:e.id||null,class:o,hardDown:o==="hard_down",quarantined:o==="deprecated",probe:t})}function QA(e=[],t=null,{env:n=process.env}={}){let o=t?.providers&&typeof t.providers=="object"?t.providers:{},r={live:0,needs_key:0,deprecated:0,soft_fail:0,hard_down:0,unknown:0},i={},a=[],s=[];for(let c of e){if(!Wd(c)&&!Object.hasOwn(o,c.id)){r.unknown+=1,i[c.id]=Object.freeze({provider:c.id,class:"unknown",hardDown:!1,quarantined:!1});continue}let l=aU(c,o[c.id],{env:n});i[c.id]=l,r[l.class]+=1,l.hardDown&&a.push(c.id),l.quarantined&&s.push(c.id)}return Object.freeze({ok:a.length===0,roster:e.length,probed:t!=null,counts:Object.freeze(r),hardDown:a.length,hardDownIds:Object.freeze(a),quarantined:s.length,quarantinedIds:Object.freeze(s),classifications:Object.freeze(i)})}var aee,rU,nU,oU,eI=S(()=>{aee=Object.freeze(["live","needs_key","deprecated","soft_fail","hard_down"]),rU=new Set(["apiKey","agentKey"]),nU=/(?:API_KEY|ACCESS_KEY|SECRET|TOKEN|CREDENTIAL|AUTH|ENV_FILE)$/i,oU=/(?:URL|URI|HOST|ENDPOINT|RPC)$/i});var iI={};Xe(iI,{default:()=>uU,providerRoster:()=>rI,runAgenticDoctor:()=>oI});import Qs from"node:fs";import Me from"node:path";function tI(e){try{return Qs.existsSync(e)}catch{return!1}}function Yw(e){for(let t of e)if(t&&tI(t))return t;return null}function Xw(e){try{return We(e,import.meta.url)}catch{return null}}function rI(){let e=Jw(),t=e.filter(Wd).map(n=>n.id);return Object.freeze({source:"catalog",count:e.length,live:e.length-t.length,quarantined:t.length,quarantinedIds:Object.freeze(t)})}function nI(){let e=Yw([Xw("skills"),Me.join(se,"skills"),Me.join(se,"dist/assets/skills"),Me.join(se,"assets/skills")]);if(!e)return{count:0,trading:[],building:[]};let t=Qs.readdirSync(e),n=t.filter(r=>/trade|swap|snipe|farm|hyperliquid|poly|best-exec|circuit|meme|token-research|rfq/i.test(r)),o=t.filter(r=>/launch|builder|protocol|nft|dex-launch|token-launch|security|contract/i.test(r));return{count:t.length,trading:n,building:o}}function sU(){let e=Yw([Xw("protocols/templates"),Me.join(se,"protocols/templates"),Me.join(se,"dist/assets/protocols/templates"),Me.join(se,"assets/protocols/templates")]);return e?Qs.readdirSync(e).filter(n=>!n.startsWith(".")):nI().building.some(n=>/protocol-builder|dex-launch|token-launch/i.test(n))?["(via skills: protocol-builder / launch packs)"]:[]}function cU(){let e=Yw([Xw("profiles"),Me.join(se,"profiles"),Me.join(se,"dist/assets/profiles"),Me.join(se,"assets/profiles")]);return e?Qs.readdirSync(e,{withFileTypes:!0}).filter(t=>t.isDirectory()&&!t.name.startsWith("_")).map(t=>t.name):[]}function lU(){try{if(jt.includes("trade_lifecycle")&&!jt.some(t=>/broadcast|wallet_sign/.test(t)))return!0}catch{}let e=[Me.join(se,"src/capability-posture.mjs"),Me.join(se,"dist/capability-posture.mjs"),Me.join(se,"capability-posture.mjs"),Me.join(se,"dist/public-control/policy-schema.mjs"),Me.join(se,"README.md"),Me.join(se,"package.json")];for(let t of e)if(tI(t))try{let n=Qs.readFileSync(t,"utf8");if(/prepare-only|never takes your key|never.*broadcast/i.test(n))return!0}catch{}return!1}function oI(e=process.env,{health:t=null}={}){let n=[],o=(L,v,_,U=1)=>{n.push({id:L,status:v,detail:_,weight:U})},[r,i]=process.versions.node.split(".").map(Number),a=r>20||r===20&&i>=19;o("node",a?"ok":"fail",`node ${process.versions.node}`,2);let c=["oracle_cli","research_delegate","trade_lifecycle","signal_score","skill_load","learn_skill","code_eval","cron_add","web_fetch"].filter(L=>!jt.includes(L));o("agent_tools",c.length===0?"ok":"warn",c.length===0?`safe tools ${jt.length}; signal_score present`:`missing tools: ${c.join(",")}`,3),o("research_attributes","ok",`attrs [${Rd.join(", ")}]; mode=${Ys(e)?"ON":"off"}`,2);let l=rI(),u=l.quarantinedIds.length?`: ${l.quarantinedIds.join(", ")}`:"";o("providers",l.count>=40?"ok":l.count>=10?"warn":"fail",`${l.count} providers from catalog, ${l.live} live, ${l.quarantined} quarantined${u}`,3);let d=QA(Jw(),t,{env:e}),p=d.hardDown>0?"fail":d.quarantined>0||d.counts.needs_key>0||d.counts.unknown>0?"warn":"ok",f=d.hardDownIds.length?`; hard_down_ids=${d.hardDownIds.join(",")}`:"";o("provider_health",p,`live=${d.counts.live} needs_key=${d.counts.needs_key} deprecated=${d.counts.deprecated} soft_fail=${d.counts.soft_fail} hard_down=${d.counts.hard_down} unknown=${d.counts.unknown}${f}`,3);let m=nI();o("skills_trading_build",m.trading.length>=5&&m.building.length>=4?"ok":m.count>=10?"warn":"fail",`${m.count} skills; trading=${m.trading.length} building=${m.building.length}`,3);let h=sU();o("protocol_templates",h.length>=2?"ok":"warn",h.length?h.join(", "):"none",2);let g=cU();o("profiles",g.includes("protocol-builder")&&g.includes("oracle")?"ok":g.length>=1?"warn":"fail",g.join(", ")||"none",2),o("signals_engine",iw.length>=4?"ok":"fail",`types: ${iw.join(", ")} (cold / no hot exec)`,2);let b=Ux();o("harness_roster",b.length>=8?"ok":"warn",`${b.length} supported harnesses; Oracle native default; MCP inbound only`,2),o("custody_prepare_only",lU()?"ok":"fail","public plane prepare-only",4);let T=e.ORACLE_DATA_URL||"http://127.0.0.1:8787";o("data_url","ok",T,1);let I=0,x=0;for(let L of n)x+=L.weight,L.status==="ok"?I+=L.weight:L.status==="warn"&&(I+=L.weight*.5);let k=x?Math.round(I/x*100):0,N=!n.some(L=>L.status==="fail")&&k>=70,P=N?`AGENTIC READY ${k}% \u2014 Oracle is the crypto control plane (prepare-only); pair coding harnesses via MCP for build.`:`AGENTIC GAPS ${k}% \u2014 fix fail/warn checks before calling Oracle the default crypto harness.`;return{ok:N,score:I,max:x,pct:k,summary:P,researchMode:Ys(e),attributes:[...Rd],packageRoot:se,checks:n}}var uU,aI=S(()=>{Qn();Mr();Ng();vw();$s();$d();XA();eI();uU={runAgenticDoctor:oI}});import{spawnSync as Kd}from"node:child_process";import{createHash as dU}from"node:crypto";import tc from"node:fs";import fU from"node:os";import xe from"node:path";import{fileURLToPath as pU,pathToFileURL as mU}from"node:url";Qn();import ub from"node:fs";import db from"node:path";import{spawnSync as II}from"node:child_process";function Qd(e,t=process.env){let n=db.join(se,"bin","oracle.mjs");return II(process.execPath,[n,...e],{encoding:"utf8",env:{...t,ORACLE_TEST_ISOLATE_SECRETS:"1"},maxBuffer:2*1024*1024})}function fb(e={}){let t=e.env||process.env,n=[],o=(u,d,p="")=>n.push({name:u,ok:!!d,detail:p}),r=Qd(["--version"],t);o("version",r.status===0&&/oracle\s+\d/i.test(r.stdout||""),(r.stdout||"").trim());let i=Qd(["--help"],t),a=`${i.stdout||""}
69
+ `)}var Rd,P6,L6,vw=S(()=>{Rd=Object.freeze(["long_horizon","recursive_fanout","continual_learn","evidence_first","prepare_only"]),P6=28,L6=50});var _A,NJ,AA=S(()=>{_A={robinhood:{chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC"],evm:!0},ethereum:{chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],evm:!0},polygon:{chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],evm:!0},arbitrum:{chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],evm:!0},base:{chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],evm:!0},hyperevm:{chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],evm:!0},bsc:{chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],evm:!0},avalanche:{chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],evm:!0},optimism:{chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],evm:!0},abstract:{chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],evm:!0},stable:{chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],evm:!0}},NJ=new Map(Object.values(_A).map(e=>[e.chainId,e]))});import{Interface as Bz,getAddress as BJ}from"ethers";var FJ,dr=S(()=>{yt();AA();FJ=new Bz(["function allowance(address owner,address spender) view returns (uint256)","function balanceOf(address account) view returns (uint256)"])});var zw=S(()=>{});var WJ,Bd=S(()=>{yt();zw();WJ=Object.freeze({1:"ethereum",10:"optimism",56:"bsc",137:"polygon",8453:"base",42161:"arbitrum",43114:"avalanche",999:"hyperevm",4663:"robinhood"})});import{Interface as IA,getAddress as ZJ,isAddress as JJ}from"ethers";var Uw,tY,rY,jw=S(()=>{dr();Bd();Ot();Ke();Uw={1:{name:"ethereum",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",usdc:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},8453:{name:"base",quoter:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",router:"0x2626664c2603336E57B271c5C0b26F421741e481",weth:"0x4200000000000000000000000000000000000006",usdc:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},42161:{name:"arbitrum",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",usdc:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"},4663:{name:"robinhood",quoter:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",router:"0xcaf681a66d020601342297493863e78c959e5cb2",weth:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",usdc:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},999:{name:"hyperevm",weth:"0x5555555555555555555555555555555555555555",usdc:"0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb"},10:{name:"optimism",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0x4200000000000000000000000000000000000006",usdc:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"},56:{name:"bsc",quoter:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",router:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",weth:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",usdc:"0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"},137:{name:"polygon",quoter:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",router:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",weth:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",usdc:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},43114:{name:"avalanche",quoter:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",router:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",weth:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",usdc:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"}},tY=new IA(["function quoteExactInputSingle((address tokenIn, address tokenOut, uint256 amountIn, uint24 fee, uint160 sqrtPriceLimitX96) params) returns (uint256 amountOut, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate)","function quoteExactInput(bytes path, uint256 amountIn) returns (uint256 amountOut, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)"]),rY=new IA(["function exactInputSingle((address tokenIn,address tokenOut,uint24 fee,address recipient,uint256 amountIn,uint256 amountOutMinimum,uint160 sqrtPriceLimitX96) params) payable returns (uint256 amountOut)","function multicall(uint256 deadline,bytes[] data) payable returns (bytes[] results)"])});import{AbiCoder as qz,Interface as Bw,getAddress as aY,isAddress as sY,keccak256 as cY}from"ethers";var pY,Fw,mY,hY,gY,yY,wY,Mw=S(()=>{dr();Bd();Ot();Ke();pY=qz.defaultAbiCoder(),Fw={1:{name:"ethereum",poolManager:"0x000000000004444c5dc75cB358380D2e3dE08A90",quoter:"0x52f0e24d1c21c8a0cb1e5a5dd6198556bd9e1203",stateView:"0x7ffe42c4a5deea5b0fec41c94c136cf115597227",universalRouter:"0x66a9893cc07d91d95644aedd05d03f95e1dba8af",weth:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",usdc:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},10:{name:"optimism",poolManager:"0x9a13f98cb987694c9f086b1f5eb990eea8264ec3",quoter:"0x1f3131a13296fb91c90870043742c3cdbff1a8d7",stateView:"0xc18a3169788f4f75a170290584eca6395c75ecdb",universalRouter:"0x851116d9223fabed8e56c0e6b8ad0c31d98b3507",weth:"0x4200000000000000000000000000000000000006",usdc:"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"},56:{name:"bsc",poolManager:"0x28e2ea090877bf75740558f6bfb36a5ffee9e9df",quoter:"0x9f75dd27d6664c475b90e105573e550ff69437b0",stateView:"0xd13dd3d6e93f276fafc9db9e6bb47c1180aee0c4",universalRouter:"0x1906c1d672b88cd1b9ac7593301ca990f94eae07",weth:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",usdc:"0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d"},137:{name:"polygon",poolManager:"0x67366782805870060151383f4bbff9dab53e5cd6",quoter:"0xb3d5c3dfc3a7aebff71895a7191796bffc2c81b9",stateView:"0x5ea1bd7974c8a611cbab0bdcafcb1d9cc9b3ba5a",universalRouter:"0x1095692a6237d83c6a72f3f5efedb9a670c49223",weth:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",usdc:"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"},8453:{name:"base",poolManager:"0x498581fF718922c3f8e6A244956aF099B2652b2b",quoter:"0x0d5e0f971ed27fbff6c2837bf31316121532048d",stateView:"0xa3c0c9b65bad0b08107aa264b0f3db444b867a71",universalRouter:"0x6ff5693b99212da76ad316178a184ab56d299b43",weth:"0x4200000000000000000000000000000000000006",usdc:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},42161:{name:"arbitrum",poolManager:"0x360e68faccca8ca495c1b759fd9eee466db9fb32",quoter:"0x3972c00f7ed4885e145823eb7c655375d275a1c5",stateView:"0x76fd297e2d437cd7f76d50f01afe6160f86e9990",universalRouter:"0xa51afafe0263b40edaef0df8781ea9aa03e381a3",weth:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",usdc:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831"},43114:{name:"avalanche",poolManager:"0x06380c0e0912312b5150364b9dc4542ba0dbbc85",quoter:"0xbe40675bb704506a3c2ccfb762dcfd1e979845c2",stateView:"0xc3c9e198c735a4b97e3e683f391ccbdd60b69286",universalRouter:"0x94b75331ae8d42c1b61065089b7d48fe14aa73b7",weth:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",usdc:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"},4663:{name:"robinhood",poolManager:"0x8366a39cc670b4001a1121b8f6a443a643e40951",quoter:"0x8dc178efb8111bb0973dd9d722ebeff267c98f94",stateView:"0xf3334192d15450cdd385c8b70e03f9a6bd9e673b",universalRouter:"0x8876789976dEcBfCbBbe364623C63652db8C0904",weth:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",usdc:"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"}},mY=new Bw(["function quoteExactInputSingle(((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey,bool zeroForOne,uint128 exactAmount,bytes hookData) params) returns (uint256 amountOut, uint256 gasEstimate)","function quoteExactOutputSingle(((address currency0,address currency1,uint24 fee,int24 tickSpacing,address hooks) poolKey,bool zeroForOne,uint128 exactAmount,bytes hookData) params) returns (uint256 amountIn, uint256 gasEstimate)"]),hY=new Bw(["function execute(bytes commands,bytes[] inputs,uint256 deadline) payable"]),gY=new Bw(["function getSlot0(bytes32 poolId) view returns (uint160 sqrtPriceX96,int24 tick,uint24 protocolFee,uint24 lpFee)","function getLiquidity(bytes32 poolId) view returns (uint128 liquidity)"]),yY=Object.freeze([[13,"beforeInitialize"],[12,"afterInitialize"],[11,"beforeAddLiquidity"],[10,"afterAddLiquidity"],[9,"beforeRemoveLiquidity"],[8,"afterRemoveLiquidity"],[7,"beforeSwap"],[6,"afterSwap"],[5,"beforeDonate"],[4,"afterDonate"],[3,"beforeSwapReturnsDelta"],[2,"afterSwapReturnsDelta"],[1,"afterAddLiquidityReturnsDelta"],[0,"afterRemoveLiquidityReturnsDelta"]]),wY=(1n<<14n)-1n});var xY,$A=S(()=>{dr();xY=Object.freeze({1:"assertion failed",17:"arithmetic overflow or underflow",18:"division or modulo by zero",33:"invalid enum value",34:"invalid storage byte array encoding",49:"pop() on an empty array",50:"array index out of bounds",65:"out of memory",81:"call to an uninitialized function pointer"})});var EY,qw,Hw,Ii=S(()=>{EY=Object.freeze(["blockNumber","nativeBalance","tokenBalance","resolveToken","resolvePools","scanBlocks","scoreRisk","quote","sellSimulation","prepareUnsignedTx"]),qw=Object.freeze({LIVE:"LIVE",CACHED:"CACHED",STALE:"STALE",UNKNOWN:"UNKNOWN",UNAVAILABLE:"UNAVAILABLE"}),Hw=Object.freeze({PASS:"PASS",CAUTION:"CAUTION",FAIL:"FAIL",UNKNOWN:"UNKNOWN"})});var Hz,Vw=S(()=>{Ii();Hz=Object.freeze({FULL:"FULL",NO_GAS:"NO_GAS",FAILED:"FAILED"})});import{Contract as OY,JsonRpcProvider as TY}from"ethers";var OA=S(()=>{});var PY,Md=S(()=>{OA();PY=Object.freeze({swap:5,bridge:5,perps:0,nft:0})});var CA=S(()=>{yt();Ot();uw();Ke();Md()});var NA=S(()=>{yt();Ot();Ke();Md()});var qd=S(()=>{});var LA=S(()=>{yt();Ot();qd();Ke()});var DA=S(()=>{yt();Ot();qd();Ke()});var Ww=S(()=>{yt()});var IX,zA=S(()=>{CA();NA();LA();DA();dw();jw();Mw();Ww();Vw();IX=Object.freeze({across:["across"],relay:["relaychain","relay"],lifi:["jumper-(li.fi-powered)","lifi"],stargate:["stargate-v2","stargate-v1","stargate"],hop:["hop-protocol","hop"],debridge:["debridge"],synapse:["synapse"],connext:["connext"],cbridge:["celer-bridge","celer-cbridge","cbridge"],celer:["celer-bridge","celer-cbridge","cbridge"],squid:["squid"],symbiosis:["symbiosis"],wormhole:["wormhole"],mayan:["mayan"],allbridge:["allbridge"],thorchain:["thorchain"]})});var UA=S(()=>{Vw();zA();Md();Ww();dr()});var KX,GX,ZX,jA=S(()=>{UA();Ke();KX=Object.freeze({TRANSACTION:"unsigned-transaction",TYPED_DATA_ORDER:"typed-data-order"}),GX=new Set(["0x0000000000000000000000000000000000000000","0x000000000000000000000000000000000000dead","0x0000000000000000000000000000000000000001","0x00000000000000000000000000000000000a1ce5"].map(e=>e.toLowerCase())),ZX=Object.freeze(["operation","exactOutput","amountOut","multihop","path","positionManager","modifyLiquidities","commands","actions"])});import{Interface as BA,getAddress as eQ,id as Kz,isAddress as tQ}from"ethers";var FA,aQ,sQ,cQ,lQ,MA=S(()=>{dr();$A();jA();Ke();FA=Object.freeze({1:Object.freeze({name:"ethereum",positionManager:"0xC36442b4a4522E871399CD717aBDD847Ab11FE88",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",venue:"uniswap-v3",source:"https://docs.uniswap.org/contracts/v3/reference/deployments/ethereum-deployments"}),8453:Object.freeze({name:"base",positionManager:"0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",wrappedNative:"0x4200000000000000000000000000000000000006",venue:"uniswap-v3",source:"https://docs.uniswap.org/contracts/v3/reference/deployments/base-deployments"})}),aQ=new BA(["function ownerOf(uint256 tokenId) view returns (address)","function positions(uint256 tokenId) view returns (uint96 nonce,address operator,address token0,address token1,uint24 fee,int24 tickLower,int24 tickUpper,uint128 liquidity,uint256 feeGrowthInside0LastX128,uint256 feeGrowthInside1LastX128,uint128 tokensOwed0,uint128 tokensOwed1)","function decreaseLiquidity((uint256 tokenId,uint128 liquidity,uint256 amount0Min,uint256 amount1Min,uint256 deadline) params) payable returns (uint256 amount0,uint256 amount1)","function collect((uint256 tokenId,address recipient,uint128 amount0Max,uint128 amount1Max) params) payable returns (uint256 amount0,uint256 amount1)","function multicall(bytes[] data) payable returns (bytes[] results)"]),sQ=new BA(["function withdraw(uint256 wad)"]),cQ=(1n<<128n)-1n,lQ=Kz("Transfer(address,address,uint256)").toLowerCase()});var qA=S(()=>{});import{getAddress as mQ,Interface as Hd,TypedDataEncoder as hQ,parseUnits as gQ}from"ethers";var Zz,xQ,SQ,Jz,EQ,HA,kQ,_Q,AQ,VA=S(()=>{yt();qd();Ke();qA();Zz="fulfillAdvancedOrder(((address offerer,address zone,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount)[] offer,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount,address recipient)[] consideration,uint8 orderType,uint256 startTime,uint256 endTime,bytes32 zoneHash,uint256 salt,bytes32 conduitKey,uint256 totalOriginalConsiderationItems) parameters,uint120 numerator,uint120 denominator,bytes signature,bytes extraData) advancedOrder,(uint256 orderIndex,uint8 side,uint256 index,uint256 identifier,bytes32[] criteriaProof)[] criteriaResolvers,bytes32 fulfillerConduitKey,address recipient)",xQ=new Hd([`function ${Zz}`]),SQ=new Hd(["function mintPublic(address nftContract,address feeRecipient,address minterIfNotPayer,uint256 quantity) payable","function mintAllowList(address nftContract,address feeRecipient,address minterIfNotPayer,uint256 quantity,(uint80 mintPrice,uint48 maxTotalMintableByWallet,uint48 startTime,uint48 endTime,uint48 dropStageIndex,uint32 maxTokenSupplyForStage,uint16 feeBps,bool restrictFeeRecipients) mintParams,bytes32[] proof) payable"]),Jz=Object.freeze(["blast","base","ethereum","zora","arbitrum","sei","avalanche","polygon","optimism","ape_chain","flow","b3","soneium","ronin","bera_chain","solana","shape","unichain","gunzilla","abstract","animechain","hyperevm","somnia","monad","hyperliquid","megaeth","ink","robinhood","stablechain"]),EQ=new Set(Jz),HA=Object.freeze({robinhood:4663,ethereum:1,base:8453,arbitrum:42161,optimism:10,polygon:137,avalanche:43114,zora:7777777,blast:81457,sei:1329,ape_chain:33139,b3:8333,soneium:1868,ronin:2020,bera_chain:80094,shape:360,unichain:130,gunzilla:43419,abstract:2741,animechain:69e3,hyperevm:999,somnia:5031,monad:143,megaeth:4326,ink:57073,stablechain:988}),kQ=Object.freeze({OrderComponents:[{name:"offerer",type:"address"},{name:"zone",type:"address"},{name:"offer",type:"OfferItem[]"},{name:"consideration",type:"ConsiderationItem[]"},{name:"orderType",type:"uint8"},{name:"startTime",type:"uint256"},{name:"endTime",type:"uint256"},{name:"zoneHash",type:"bytes32"},{name:"salt",type:"uint256"},{name:"conduitKey",type:"bytes32"},{name:"counter",type:"uint256"}],OfferItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"}],ConsiderationItem:[{name:"itemType",type:"uint8"},{name:"token",type:"address"},{name:"identifierOrCriteria",type:"uint256"},{name:"startAmount",type:"uint256"},{name:"endAmount",type:"uint256"},{name:"recipient",type:"address"}]}),_Q=new Hd(["function setApprovalForAll(address operator,bool approved)"]),AQ=new Hd(["function cancel((address offerer,address zone,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount)[] offer,(uint8 itemType,address token,uint256 identifierOrCriteria,uint256 startAmount,uint256 endAmount,address recipient)[] consideration,uint8 orderType,uint256 startTime,uint256 endTime,bytes32 zoneHash,uint256 salt,bytes32 conduitKey,uint256 counter)[] orders) returns (bool cancelled)"])});var WA=S(()=>{dr();Ii()});var KA=S(()=>{dr();Ii()});var GA=S(()=>{dr();Bd();yt();Ii();WA();KA();zw()});var Kw,ZA=S(()=>{GA();Ii();Kw=Object.freeze([{key:"ethereum",chainId:1,name:"Ethereum",rpcEnv:["ETH_RPC_URL","ETHEREUM_RPC_URL","MAINNET_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://etherscan.io",dexscreenerSlug:"ethereum",venueKind:"uniswap-v3",wrappedNative:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",stableQuoteAssets:["0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","0xdAC17F958D2ee523a2206206994597C13D831ec7"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.71 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:1}}]},{key:"optimism",chainId:10,name:"OP Mainnet",rpcEnv:["OPTIMISM_RPC_URL","OP_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://optimistic.etherscan.io",dexscreenerSlug:"optimism",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1905.23 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:10}}]},{key:"bsc",chainId:56,name:"BNB Smart Chain",rpcEnv:["BSC_RPC_URL","BNB_RPC_URL"],nativeCurrency:{symbol:"BNB",decimals:18},explorer:"https://bscscan.com",dexscreenerSlug:"bsc",venueKind:"uniswap-v3",wrappedNative:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",stableQuoteAssets:["0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d","0x55d398326f99059fF775485246999027B3197955"],venues:[{kind:"quoter",address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WBNB->USDC fee 500 quoted 413.86 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}},{kind:"router",address:"0xB971eF87ede563556b2ED4b1C0b0019111Dd85d2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:56}}]},{key:"polygon",chainId:137,name:"Polygon",rpcEnv:["POLYGON_RPC_URL","POLYGON_RPC"],nativeCurrency:{symbol:"POL",decimals:18},explorer:"https://polygonscan.com",dexscreenerSlug:"polygon",venueKind:"uniswap-v3",wrappedNative:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",stableQuoteAssets:["0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WMATIC->USDC fee 500 quoted 0.0720 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:137}}]},{key:"stable",chainId:988,name:"Stable Mainnet",rpcEnv:["STABLE_RPC_URL","STABLE_RPC"],nativeCurrency:{symbol:"USDT0",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x5d442b349590a6048Eb2dC0eC346cAA5F47A9ab5",venues:[{kind:"quoter",address:"0xb070179E7032CdA868b53e6C1742F80c9e940d1A",label:"Uniswap V3 QuoterV2 (canonical)",verified:{method:"Stable is on the OFFICIAL Uniswap v3 Deployments List (governance-recognised 2026-05-12, UAC process completed 2026-04, deployed by Protofire), so this is a canonical deployment rather than a fork. eth_getCode returned 8273 bytes, the same size as the canonical quoter on the seven already-verified chains. Functional probe on a live pool (TOAST -> USDT0, fee 10000): 100 in -> 0.000003, 1000 -> 0.000031, 10000 -> 0.000319 USDT0. Output scales monotonically with input, which is a working quoter answering, not a revert. Two of three sampled pools carry non-zero liquidity. NOTE: the pools discovered so far are thin, so real routing size is limited -- the venue is proved, deep liquidity is not.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:988}},{kind:"router",address:"0x32eaf9B5d5F2CD7361c5012890C943D7de84C22a",label:"Uniswap SwapRouter02 (canonical)",verified:{method:"eth_getCode returned 24497 bytes. Cross-checked on-chain rather than trusted from docs: router.factory() returns 0x88f0a512ef09175d456bc9547f914f48c013e4aa, the same v3 core factory that created the pools quoted above, and router.WETH9() returns the wrappedNative recorded on this chain entry. Address published in the Stable docs DEX reference and the Uniswap deployments list.",source:"docs.stable.xyz/en/reference/dexes + on-chain factory()/WETH9() round-trip",date:"2026-08-05",chainId:988}}]},{key:"hyperevm",chainId:999,name:"HyperEVM",rpcEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],nativeCurrency:{symbol:"HYPE",decimals:18},dexscreenerSlug:"hyperevm",venueKind:"uniswap-v3",wrappedNative:"0x5555555555555555555555555555555555555555",venues:[{kind:"quoter",address:"0x03A918028f22D9E1473B7959C927AD7425A45C7C",label:"HyperSwap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle(1 WHYPE -> USDT0) returned live output on all four fee tiers (100: 57.3385, 500: 57.4187, 3000: 57.3237, 10000: 56.1963 USDT0). Decimals read on-chain: WHYPE 18, USDT0 6. Best tier checked against an INDEPENDENT control the same minute -- Hyperliquid allMids put HYPE at 57.3205, so the pool is 0.171% from the perp mid, which is the right shape for fee plus impact rather than a wrong contract or a decimals bug.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}},{kind:"router",address:"0x4E2960a8cd19B467b82d26D83fAcb0fAE26b094D",label:"HyperSwap V3 SwapRouter",verified:{method:"eth_getCode returned 12070 bytes, and it is the router paired with the quoter proved above -- the same pair already shipped in UNI_V3_VENUES[999].hyperswap, which is the map the quote/prepare path actually routes through.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:999}}]},{key:"abstract",chainId:2741,name:"Abstract",rpcEnv:["ABSTRACT_RPC_URL","ABS_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},venueKind:"uniswap-v3",wrappedNative:"0x3439153EB7AF838Ad19d56E1571FBD09333C2809",venues:[{kind:"quoter",address:"0x728BD3eC25D5EDBafebB84F3d67367Cd9EBC7693",label:"Uniswap V3 QuoterV2 (Abstract deployment)",verified:{method:"Abstract is a ZK-stack chain, so CREATE2 addresses differ and the canonical Uniswap addresses are NOT valid here -- probing them returns codesize 0, which is what previously made this chain look like it had no V3 at all. Found the real deployment from live traffic instead: scanned recent Swap(...) logs, took the busiest pool, read pool.factory() = 0xa1160e73b63f322ae88cc2d8e700833e71d0b2a1, then enumerated that factory's deployer (0xf3d63166F0Ca56C3c1A3508FcE03Ff0Cf3Fb691e) and probed each of its 56 contracts with a real quoteExactInputSingle call. Exactly one answered: 1 WETH -> 1846.475731 USDC.e at fee 500. Independent sanity check: the pool's own slot0() spot price is 1873.11 USDC.e per WETH, so the quoter sits ~1.4% below spot, the right shape for fee plus price impact on this size.",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-08-05",chainId:2741}},{kind:"router",address:"0x7712FA47387542819d4E35A23f8116C90C18767C",label:"Uniswap SwapRouter02 (Abstract deployment)",verified:{method:"eth_getCode returned 167392 bytes and the runtime contains the exactInputSingle selector. router.factory() matches the factory proved above and router.WETH9() matches the wrappedNative on this entry. Chosen over its byte-identical twin (0xfD6257F4...) because this is the address real users actually route through: it appeared as tx.to on live swaps against the WETH/USDC.e pool.",source:"on-chain factory()/WETH9() round-trip + live swap tx.to sampling",date:"2026-08-05",chainId:2741}}]},{key:"robinhood",chainId:4663,name:"Robinhood Chain",rpcEnv:["RH_CHAIN_RPC","ROBINHOOD_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},dexscreenerSlug:"robinhood",venueKind:"uniswap-v3",wrappedNative:"0x0bd7d308f8e1639fab988df18a8011f41eacad73",stableQuoteAssets:["0x5fc5360d0400a0fd4f2af552add042d716f1d168"],venues:[{kind:"quoter",address:"0x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDG fee 100 quoted 1866.58 USDG, and USDG->CASHCAT fee 10000 quoted a live amount). A contract that correctly prices known pairs IS a working V3 quoter",source:"live eth_call against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"router",address:"0xcaf681a66d020601342297493863e78c959e5cb2",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode (24497 bytes) on this chain and the paired quoter at the same deployment passed a live functional quote",source:"live eth_getCode against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}},{kind:"factory",address:"0x1f7d7550b1b028f7571e69a784071f0205fd2efa",label:"Uniswap V3 Factory",verified:{method:"eth_getCode returned real bytecode (24535 bytes) and a PoolCreated log scan over this factory returned 76 pools in ~9000 recent blocks",source:"live eth_getLogs against rpc.mainnet.chain.robinhood.com",date:"2026-07-31",chainId:4663}}]},{key:"base",chainId:8453,name:"Base",rpcEnv:["BASE_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://basescan.org",dexscreenerSlug:"base",venueKind:"uniswap-v3",wrappedNative:"0x4200000000000000000000000000000000000006",stableQuoteAssets:["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"],venues:[{kind:"quoter",address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",label:"Uniswap V3 QuoterV2 (Base)",verified:{method:"functional probe: quoteExactInputSingle returned WETH->USDC at fee 500 = 1908.44 USDC, a live sane price. The canonical mainnet quoter address also has bytecode on Base but does NOT price this pair, which is exactly the false positive a codesize-only check accepts",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router",address:"0x2626664c2603336E57B271c5C0b26F421741e481",label:"Uniswap V3 SwapRouter02 (Base)",verified:{method:"eth_getCode returned real bytecode and the paired Base quoter passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:8453}},{kind:"router-v2",address:"0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",label:"Uniswap V2 Router02 (Base)",verified:{method:"eth_getCode returned 17891 bytes; live getAmountsOut on WETH->USDC round-tripped to 98.75% (2x0.30% fee + impact)",source:"https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments",date:"2026-07-30",chainId:8453}}]},{key:"arbitrum",chainId:42161,name:"Arbitrum One",rpcEnv:["ARBITRUM_RPC_URL","ARB_RPC_URL"],nativeCurrency:{symbol:"ETH",decimals:18},explorer:"https://arbiscan.io",dexscreenerSlug:"arbitrum",venueKind:"uniswap-v3",wrappedNative:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",stableQuoteAssets:["0xaf88d065e77c8cC2239327C5EDb3A432268e5831","0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"],venues:[{kind:"quoter",address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WETH->USDC fee 500 quoted 1908.72 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}},{kind:"router",address:"0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:42161}}]},{key:"avalanche",chainId:43114,name:"Avalanche C-Chain",rpcEnv:["AVALANCHE_RPC_URL","AVAX_RPC_URL"],nativeCurrency:{symbol:"AVAX",decimals:18},explorer:"https://snowtrace.io",dexscreenerSlug:"avalanche",venueKind:"uniswap-v3",wrappedNative:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",stableQuoteAssets:["0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E"],venues:[{kind:"quoter",address:"0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F",label:"Uniswap V3 QuoterV2",verified:{method:"functional probe, not a codesize check: quoteExactInputSingle returned a live sane price (WAVAX->USDC fee 500 quoted 6.48 USDC). A contract that correctly prices a known pair IS a working V3 quoter",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}},{kind:"router",address:"0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE",label:"Uniswap V3 SwapRouter02",verified:{method:"eth_getCode returned real bytecode on this chain and the paired quoter at the same deployment passed a live functional quote",source:"scripts/verify-v3-venues.mjs (re-runnable)",date:"2026-07-30",chainId:43114}}]}])});function YA(e){if(!e||typeof e!="object"||Object.isFrozen(e))return e;for(let t of Object.values(e))YA(t);return Object.freeze(e)}function E(e){if(!e?.id)throw new Error("registerProvider requires id");if(!e.venue)throw new Error("registerProvider requires venue");if(!Array.isArray(e.ops))throw new Error("registerProvider requires ops[]");let t=String(e.id);if(JA&&Gw.has(t))throw new Error(`registerProvider refuses to overwrite built-in provider: ${t}`);return Vd.set(t,{chainIds:e.chainIds||[],auth:e.auth||"none",description:e.description||"",baseEnv:e.baseEnv||[],...e,id:t}),Vd.get(t)}function Jw({venue:e,op:t}={}){let n=[...Vd.values()];return e&&(n=n.filter(o=>o.venue===e)),t&&(n=n.filter(o=>o.ops.includes(t))),n}function tU(){Gw.clear();for(let[e,t]of Vd)Gw.add(e),YA(t);JA=!0}var Vd,Yz,Xz,Qz,Zw,eU,Gw,JA,XA=S(()=>{jw();Mw();MA();VA();ZA();Vd=new Map,Yz=Object.keys(Uw).map(Number),Xz=Object.keys(Fw).map(Number),Qz=Object.keys(FA).map(Number),Zw=Kw.map(e=>e.chainId),eU=[...new Set(Object.values(HA))],Gw=new Set,JA=!1;E({id:"hl-info",venue:"hl",chainIds:[],auth:"none",ops:["health","allMids","l2Book","outcomeMeta","clearinghouse","userFills","meta","metaAndAssetCtxs","candleSnapshot","openOrders","frontendOpenOrders","userState","spotMeta"],baseEnv:["HL_INFO_URL","HL_API_URL"],description:"Hyperliquid public /info"});E({id:"hl-vaults",venue:"hyperliquid-vaults",chainIds:[],auth:"none",ops:["health","summaries","details","userEquities","tracker"],execution:"read-only",baseEnv:["HL_INFO_URL","HL_API_URL"],description:"Read-only Hyperliquid vault summaries, vault details, user vault equities, and HLP tracking."});E({id:"hl-precompiles",venue:"hyperliquid",chainIds:[999],auth:"none",ops:["health","read","l1BlockNumber","markPx","oraclePx","spotPx","position","spotBalance","vaultEquity","withdrawable"],execution:"read-only",baseEnv:["HYPEREVM_RPC_URL","HYPER_EVM_RPC"],description:"HyperEVM L1Read precompiles (0x800-0x809). eth_call only. Includes HLP vault equity. No CoreWriter."});E({id:"protocol-templates",venue:"protocol-builder",chainIds:[],auth:"none",ops:["health","list","listNative","gate","prepareDeploy","buildNative","eval"],description:"Gated EVM templates plus deterministic Solana program and Bitcoin policy scaffolds. Native bundles require chain-specific compile, tests, and simulation before any unsigned deploy/funding prepare. NOT a firm audit."});E({id:"poly-public",venue:"poly",chainIds:[137],auth:"none",ops:["health","time","markets","book","midpoint","spread","price","events"],execution:"read-only",baseEnv:["POLY_CLOB_URL","POLY_GAMMA_URL"],description:"Polymarket CLOB + Gamma public REST"});E({id:"poly-clob",venue:"poly",chainIds:[137],auth:"none",ops:["health","prepareOrder"],execution:"prepare",localSignerSurfaces:["poly"],description:"Polymarket CLOB unsigned EIP-712 order prepare plus owner-operated local-signer submit. Hosted/keyless remains prepare-only."});E({id:"hl-delta-neutral",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","scan","quote","prepare","loop"],execution:"prepare",localSignerSurfaces:["hl"],description:"Hyperliquid funding carry. Armed through the existing hl signer. Hosted/keyless remains prepare-only. Not automated."});E({id:"lighter-delta-neutral",venue:"lighter",chainIds:[],auth:"none",ops:["health","scan","quote","prepare","loop"],execution:"prepare",localSignerSurfaces:["lighter"],description:"Lighter.xyz funding carry. Armed through the official sendTx local-signer. Hosted/keyless remains prepare-only. Not automated."});E({id:"portfolio",venue:"multichain-wallet",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","balances","snapshot","history","valueGraph"],execution:"read-only",description:"Read-only balance aggregation across configured EVM chains, Solana, Bitcoin, and Hyperliquid, plus profile-local observation snapshots, history, and value graphs with explicit partial coverage."});E({id:"nft-portfolio",venue:"multichain-nft-wallet",chainIds:[1,10,137,988,999,2741,4663,8453,42161,43114],auth:"optionalApiKey",ops:["health","inventory","gallery","pnl","prepareList","traitSnipe"],execution:"prepare",baseEnv:["OPENSEA_API_KEY","MAGICEDEN_API_KEY","SATFLOW_API_KEY"],description:"Normalized EVM, Solana, and Bitcoin NFT inventory, static contact-sheet galleries, explicit PnL coverage, user-confirmed unsigned listing preparation, and evidence-gated trait-snipe buy intents."});E({id:"evm-simulate",venue:"onchain-simulation",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","simulate"],execution:"read",baseEnv:[],description:"Pre-sign EVM transaction simulation: eth_call at pending state to catch reverts, decoded revert reasons (Error(string), Panic codes, custom-error selectors), and a buffered gas estimate. Distinguishes a genuine revert from an unreachable node \u2014 an infra failure is never reported as 'would fail'. A pass reflects current chain state and is explicitly not a guarantee."});E({id:"nft-mint",venue:"onchain-mint",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","discover","prepare","priceGas","createTrigger","checkOpen"],execution:"prepare",localSignerSurfaces:["evm-nft"],baseEnv:[],description:"EVM NFT mints: discover the collection's mint entrypoint from bytecode, price a competitive EIP-1559 bid from fee-history percentiles, enforce gas-war caps, surface contract risk, and hand execution to the local signer after explicit arming and bounded grant."});E({id:"universal-mint-router",venue:"universal-nft-mint",chainIds:[],auth:"optionalApiKey",ops:["health","capabilities","prepare"],execution:"prepare",baseEnv:["OPENSEA_API_KEY"],description:"Prepare-only exact universal mint routing across reviewed EVM and Ordinals adapters. Universal Solana mint is RESEARCH_ONLY and disabled until canonical serialized-message decoding ships; the separate Magic Eden marketplace provider is unchanged. It never signs or broadcasts."});E({id:"universal-nft-lifecycle",venue:"universal-nft-lifecycle",chainIds:[],auth:"optionalApiKey",ops:["health","capabilities","route"],execution:"read",baseEnv:["OPENSEA_API_KEY","MAGICEDEN_API_KEY","SATFLOW_API_KEY"],description:"Read-only NFT lifecycle route discovery. It does not prepare, sign, or broadcast artifacts; callers must invoke and review the selected provider operation separately."});for(let[e,t,n]of[["universal-evm-nft-transfer","evm-nft-transfer","Exact unsigned ERC-721/ERC-1155 safeTransferFrom preparation."],["universal-solana-nft-transfer","solana-nft-transfer","Exact unsigned verified Metaplex NFT/Core transfer preparation."],["universal-ordinals-transfer","bitcoin-nft-transfer","Exact unsigned Ordinals PSBT transfer-plan preparation."]])E({id:e,venue:t,chainIds:[],auth:"none",ops:["health","prepare"],execution:"prepare",description:n});E({id:"contract-risk",venue:"onchain-bytecode",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","scan"],execution:"read",baseEnv:[],description:"Structural contract risk from on-chain bytecode: retained owner powers (mint, blacklist, pause, fee changes) and upgradeability across EIP-1967, legacy zeppelinos, and EIP-1822 proxy slots. Complements behavioural sell simulation. Never reports 'safe' \u2014 a clean scan is weak evidence, not a guarantee."});E({id:"evm-token-sniper",venue:"evm-token-launches",chainIds:Zw,auth:"none",ops:["health","scan"],execution:"prepare",localSignerSurfaces:["evm-swap"],baseEnv:Kw.flatMap(e=>e.rpcEnv),description:"One generic EVM token-sniping path across every configured EVM chain: live identity, pools, structural risk, sell simulation, quote, guarded transaction preparation, and local-signer execution handoff. Robinhood Chain is the default, not a special implementation."});E({id:"evm-rpc",venue:"evm",chainIds:[1,137,42161,8453,10,4663,999],auth:"none",ops:["health","healthAll","blockNumber","chainId","getBalance","call","erc20Allowance","erc20Balance","transactionReceipt"],baseEnv:["ETH_RPC_URL","POLYGON_RPC_URL","RH_CHAIN_RPC","BASE_RPC_URL","ARBITRUM_RPC_URL"],description:"EVM JSON-RPC multi-chain (env RPC or public fallbacks)"});E({id:"solana-rpc",venue:"solana",chainIds:[],auth:"none",ops:["health","latestBlockhash","getBalance","tokenAccounts","simulate"],baseEnv:["SOLANA_RPC_URL"],description:"Solana mainnet JSON-RPC read/prepare surface (no key, no signing, no broadcast)"});E({id:"bitcoin-esplora",venue:"bitcoin",chainIds:[],auth:"none",ops:["health","tipHeight","fees","address","utxos","tx","decode"],execution:"read-only",baseEnv:["BTC_ESPLORA_URL","BTC_NETWORK"],description:"Bitcoin L1 via Esplora (mempool.space/Blockstream). Reads only on data plane. User-signed broadcast is bitcoin_send on exec MCP. No Core RPC, no house keys. Wallets: Xverse/UniSat/Leather/OKX/Phantom"});E({id:"bitcoin-meta",venue:"bitcoin-metaprotocol",chainIds:[],auth:"optionalApiKey",ops:["health","runeBalances","inscriptions","inscriptionInfo","inscriptionChildren","ordBlockInfo"],execution:"read-only",baseEnv:["BTC_META_API_URL","UNISAT_API_KEY","BESTINSLOT_API_KEY"],description:"Bitcoin ordinals/runes reads. Keyless tier via ordinals.com recursive (inscriptionInfo/children/blockInfo); address-indexed ops (inscriptions, runeBalances) need a keyed indexer. Hiro is deprecated (410) and Magic Eden BTC is dead \u2014 use satflow for market."});E({id:"satflow",venue:"bitcoin-marketplace",chainIds:[],auth:"apiKey",ops:["health","collectionFloors","collectionStats","item","walletContents","floorListings","preparePurchase","prepareList"],execution:"prepare",localSignerSurfaces:["btc"],baseEnv:["SATFLOW_API_KEY","SATFLOW_API_URL"],description:"Satflow ordinals+runes marketplace (api.satflow.com). Primary BTC NFT market after Magic Eden BTC sunset. PSBT intents for buy/list; key via x-api-key."});E({id:"jupiter",venue:"solana-dex",chainIds:[],auth:"none",ops:["health","venues","quote","prepare"],execution:"prepare",localSignerSurfaces:["sol"],baseEnv:["JUPITER_SWAP_API_URL","SOLANA_RPC_URL"],description:"Jupiter Swap API v1 quote + local-signer Solana swap handoff"});E({id:"hl-perps",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","assetInfo","prepareOrder","prepareCancel","prepareLeverage","prepareIsolatedMargin","prepareBracket","prepareBuilderApproval"],execution:"prepare",localSignerSurfaces:["hl"],notes:"Hyperliquid perp, HIP-3, and HIP-4 outcome orders through local-signer L1 action handoff."});E({id:"hl-markets",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","markets","leaderboards","coin","spot"],notes:"Joined Hyperliquid market datapoints for the Hyperliquid agent. Read-only."});E({id:"hl-entry-state",venue:"hyperliquid",chainIds:[],auth:"none",ops:["health","see","qualify","lock","list","watch"],execution:"read-only",description:"SEE/ENTER/MANAGE for discretionary HL perps: compose sourced /info fields, qualify a side, lock the state only after a fill receipt, and alert_only-diff live vs that lock. Never signs."});E({id:"hl-staking",venue:"hypercore-staking",chainIds:[],auth:"none",ops:["health","validators","delegatorSummary","delegations","rewards","history","preflight","prepareStakeDeposit","prepareStakeWithdraw","prepareDelegate"],execution:"prepare",localSignerSurfaces:["hl"],baseEnv:["HL_INFO_URL","HL_EXCHANGE_URL","HL_TESTNET"],description:"Hyperliquid HyperCore HYPE staking. Public reads plus local-signer EIP-712 execution for cDeposit / cWithdraw / tokenDelegate after arming. Hosted/keyless remains prepare-only."});E({id:"magiceden-sol",venue:"solana-nft",chainIds:[],auth:"optionalApiKey",ops:["health","stats","listings","tokenListings","prepareBuy","prepareList","prepareMint"],execution:"prepare",baseEnv:["MAGICEDEN_API_KEY","MAGICEDEN_API_URL"],description:"Magic Eden Solana NFT market. Reads (stats/listings) are keyless; buy/list/mint instruction builders need MAGICEDEN_API_KEY and return an unsigned base64 transaction for the user's Solana wallet. Never signs or broadcasts."});E({id:"defillama",venue:"prices",chainIds:[],auth:"none",ops:["health","prices","pricesBySymbol","protocols","yields","stablecoins","dexVolumes"],baseEnv:["DEFILLAMA_COINS_URL","DEFILLAMA_API_URL"],description:"DeFiLlama public prices + protocols TVL"});E({id:"lifi",venue:"dex",chainIds:[1,10,56,137,988,999,2741,4663,8453,42161,43114],auth:"none",ops:["health","quote","prepare","chains"],execution:"prepare",baseEnv:["LIFI_API_URL"],description:"LI.FI public cross-chain / DEX aggregator quotes (no key)"});E({id:"dexscreener",venue:"dex",chainIds:[],auth:"none",ops:["health","token","search","pair"],baseEnv:["DEXSCREENER_API_URL"],description:"DexScreener public token/pair discovery"});E({id:"uniswap-v3",venue:"dex",chainIds:Yz,auth:"none",ops:["health","quote","prepare","quotePath","ethUsdc","chains"],execution:"prepare",localSignerSurfaces:["evm-swap"],baseEnv:["ETH_RPC_URL","BASE_RPC_URL","ARBITRUM_RPC_URL","OPTIMISM_RPC_URL","BSC_RPC_URL","POLYGON_RPC_URL","AVALANCHE_RPC_URL","RH_CHAIN_RPC"],description:"Uniswap V3 QuoterV2 exact-in quotes via eth_call across official deployments plus Robinhood Chain, no key"});E({id:"lp-exit",venue:"dex",chainIds:Qz,auth:"none",ops:["health","inspect","prepareRemove","prepareSettlement","prepareUnwrap","chains"],execution:"prepare",baseEnv:["ETH_RPC_URL","BASE_RPC_URL"],description:"Receipt-gated Uniswap V3 LP exit into native asset: remove/collect, net-route token legs, then unwrap. Unsigned only."});E({id:"lp-liquidity-ranker",venue:"dex",chainIds:Zw,auth:"none",ops:["health","rank"],execution:"read-only",description:"Cross-chain LP destination analysis: deepest liquidity and net-best migration are separate, exact canonical mappings required."});E({id:"lp-destination-discovery",venue:"dex",chainIds:Zw,auth:"none",ops:["health","discover"],execution:"read-only",description:"Live exact-address LP pool discovery across configured chains; reports deepest liquidity separately from cost-qualified migration evidence."});E({id:"uniswap-v4",venue:"dex",chainIds:Xz,auth:"none",ops:["health","quote","inspectHook","prepare","chains"],execution:"prepare",baseEnv:["ETH_RPC_URL","BASE_RPC_URL","ARBITRUM_RPC_URL","OPTIMISM_RPC_URL","BSC_RPC_URL","POLYGON_RPC_URL","AVALANCHE_RPC_URL","RH_CHAIN_RPC"],description:"Uniswap V4 quotes, hook permission/code/pool-state inspection, and guarded unsigned Universal Router preparation across official deployments plus Robinhood Chain."});E({id:"x402",venue:"payments",chainIds:[],auth:"none",ops:["health","inspect","prepare"],execution:"prepare",description:"x402 v2 PAYMENT-REQUIRED inspection and explicit-cap exact-payment templates. Never signs, calls a facilitator, or retries a paid request."});E({id:"bankr",venue:"wallet-data",chainIds:[],auth:"apiKey",ops:["health","wallet","portfolio","swapQuote"],execution:"read-only",baseEnv:["BANKR_API_KEY","BANKR_API_URL"],description:"Bankr Wallet API read-only identity, portfolio, and swap quotes. Oracle excludes Bankr swap, transfer, sign, submit, agent, and LLM endpoints."});E({id:"aerodrome",venue:"dex",chainIds:[8453],auth:"none",ops:["health","quote","prepare","chains"],execution:"prepare",localSignerSurfaces:["evm-swap"],baseEnv:["BASE_RPC_URL"],description:"Aerodrome Slipstream CL on Base \u2014 QuoterV2 + SwapRouter exact-input via eth_call (tickSpacing, no key)"});E({id:"zerox",venue:"dex",chainIds:[1,10,137,8453,42161],auth:"apiKey",ops:["health","price","quote","prepare"],execution:"prepare",baseEnv:["ZEROX_API_KEY","ZEROX_API_URL"],description:"0x Swap API v2 price/quote/prepare \u2014 requires ZEROX_API_KEY (unconfigured without key; no Oracle key shipped)"});E({id:"across",venue:"bridge",chainIds:[1,10,137,42161,8453],auth:"none",ops:["health","suggestedFees"],baseEnv:["ACROSS_API_URL"],description:"Across bridge suggested-fees (public)"});E({id:"hop",venue:"bridge",chainIds:[1,10,137,42161],auth:"none",ops:["health","quote"],baseEnv:["HOP_API_URL"],description:"Hop Protocol bridge quotes (public)"});E({id:"relay",venue:"bridge",chainIds:[1,10,137,8453,42161],auth:"none",ops:["health","quote","prepare"],execution:"prepare",baseEnv:["RELAY_API_URL"],description:"Relay.link bridge/swap quotes (public)"});E({id:"cowswap",venue:"dex",chainIds:[1,100,42161,8453],auth:"none",ops:["health","quote","prepareOrder","order","status","chains","arm"],execution:"armed-local",localSignerSurfaces:["evm-order"],baseEnv:[],description:"CowSwap batch auction. Quote is public; Allow posts official api.cow.fi orders."});E({id:"oneinch",venue:"dex",chainIds:[1,10,137,8453,42161],auth:"apiKey",ops:["health","quote","prepare","approveSpender"],execution:"prepare",baseEnv:["ONEINCH_API_KEY","ONEINCH_API_URL"],description:"1inch Swap API v6 quote/prepare \u2014 requires ONEINCH_API_KEY (unconfigured without key; no Oracle key shipped)"});E({id:"hl-ws",venue:"hl",chainIds:[],auth:"none",ops:["health","allMids","l2Book","snapshot"],baseEnv:["HL_WS_URL"],description:"Hyperliquid short-lived WS snapshots (allMids/l2Book)"});E({id:"poly-ws",venue:"poly",chainIds:[137],auth:"none",ops:["health","book","snapshot"],baseEnv:["POLY_WS_URL"],description:"Polymarket CLOB short-lived WS market snapshots"});E({id:"anvil-nft",venue:"robinhood-nft",chainIds:[4663],auth:"optionalApiKey",ops:["health","markets","quoteSpecificBuy","quoteSell","scanCollection","scanAllMarkets","scanCrossVenueArb","scanAllMarketsArb","prepareSpecificBuy","prepareSell"],execution:"prepare",localSignerSurfaces:["evm-nft"],baseEnv:["RH_CHAIN_RPC","OPENSEA_API_KEY","OPENSEA_ENV_FILE"],description:"All-market Anvil discovery and exact-token arbitrage, with exact buy and sell execution through the armed owner-local signer after human confirmation"});E({id:"stonkbrokers",venue:"robinhood-nft",chainIds:[4663],auth:"optionalApiKey",ops:["health","quoteBrokerBuy","scanBrokerLoot","prepareBrokerBuy","brokerDesk","clockInStatus","prepareClockIn"],execution:"prepare",baseEnv:["RH_CHAIN_RPC"],description:"Unsigned StonkBrokers Broker Desk discovery, nested-loot verification, and bounded local-only preparations"});E({id:"opensea-nft",venue:"nft",chainIds:eU,auth:"apiKey",ops:["health","collection","floor","bestListings","bestListing","bestOffer","accountNfts","accountPnl","prepareMint","prepareList","prepareCancel"],execution:"prepare",baseEnv:["OPENSEA_API_KEY","OPENSEA_ENV_FILE"],description:"OpenSea multichain NFT inventory, floors, and unsigned bounded mint, listing, and listing-cancellation preparations; opaque buy/sweep fulfillment is disabled"});E({id:"local-marketplace",venue:"local-p2",chainIds:[],auth:"none",ops:["health","createListing","listListings","cancelListing","createOffer","armFill"],execution:"prepare",localSignerSurfaces:["evm-nft"],description:"Owner-local P2 catalog stored under ~/.config/oracle. Additive and isolated from OpenSea, Magic Eden, Satflow, Bisq, Anvil, and Polymarket. Listings are armed for the owner-local signer; sign-and-broadcast is an explicit createLocalMarketplace().instructFill instruction. Generic signHash is refused."});E({id:"local-x402",venue:"local-x402",chainIds:[],auth:"none",ops:["health","createIntent","listIntents","cancelIntent","armPayment"],execution:"prepare",localSignerSurfaces:["evm-swap"],description:"Owner-local x402 payment budgets under ~/.config/oracle. Additive and isolated from OpenSea and Telegram. Intents are armed; sign-and-broadcast is an explicit createLocalX402().instructPay instruction. Generic signHash is refused."});E({id:"local-pack-registry",venue:"local-packs",chainIds:[],auth:"none",ops:["health","registerPack","listPacks","revokePack"],execution:"read-only",description:"Owner-local third-party pack REGISTRY under ~/.config/oracle. Catalog only: packs are never loaded or executed. Isolated from OpenSea and Telegram."});E({id:"erc8004-identity",venue:"agent-identity",chainIds:[],auth:"none",ops:["health","prepareIdentityRegistration","prepareAgentURIUpdate","inspectIdentity","arm"],execution:"armed-local",localSignerSurfaces:["evm"],baseEnv:["ORACLE_ERC8004_CHAIN_ID","ORACLE_ERC8004_IDENTITY_REGISTRY"],description:"Draft ERC-8004 identity. Public prepare is keyless; Allow broadcasts type-2 register/setAgentURI."});E({id:"hyperevm-dex",venue:"hyperevm",chainIds:[999],auth:"none",ops:["health","search","token"],baseEnv:["HYPEREVM_RPC_URL"],description:"HyperEVM pair discovery via DexScreener + optional RPC"});E({id:"geckoterminal",venue:"dex-data",chainIds:[],auth:"none",ops:["health","networks","pool","token","ohlcv"],baseEnv:["GECKOTERMINAL_API_URL"],description:"GeckoTerminal public networks, pools, tokens, and OHLCV"});E({id:"curve",venue:"dex",chainIds:[1,10,56,137,988,999,4663,8453,42161,43114],auth:"none",ops:["health","openapi","pools","quote","prepare"],execution:"prepare",baseEnv:["CURVE_API_URL"],description:"Curve public pool registry API + RouterNG validated single-hop prepare"});E({id:"gmx",venue:"perps-data",chainIds:[42161,43114],auth:"none",ops:["health","tickers","markets","marketsInfo","tokens","prepareOrder","positions","orderStatus","verifyOrder"],execution:"intent",baseEnv:[],description:"GMX v2 public oracle/markets plus guarded async order intents on Arbitrum and Avalanche"});E({id:"morpho",venue:"lending-data",chainIds:[1,10,137,2741,8453,42161,4663,999,988],auth:"none",ops:["health","markets","vaults","prepareVault"],execution:"intent",baseEnv:["MORPHO_API_URL"],description:"Morpho public GraphQL markets/vaults + guarded ERC-4626 vault intents"});E({id:"balancer",venue:"dex",chainIds:[1,10,137,42161,43114,8453],auth:"none",ops:["health","pools","quote","prepare"],execution:"prepare",baseEnv:["BALANCER_API_URL"],description:"Balancer public GraphQL pool data + v3 Router exact-input prepare (Polygon read-only)"});E({id:"pendle",venue:"yield",chainIds:[1,10,56,8453,42161,999],auth:"none",ops:["health","markets","quote","prepare"],execution:"prepare",baseEnv:["PENDLE_API_URL"],description:"Pendle public yield-market API + Hosted SDK direct Convert prepare"});E({id:"odos",venue:"dex",chainIds:[1,10,56,137,8453,42161,43114,4663],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-07-30",reason:"Odos sunset the public SOR API; /sor/quote/v2 and v3 both return 410 Gone",evidence:"sunset: Thu, 30 Jul 2026 12:00:00 GMT response header"},baseEnv:["ODOS_API_URL"],description:"Odos public SOR (DEPRECATED upstream 2026-07-30 -- endpoint returns 410)"});E({id:"blockscout",venue:"explorer",chainIds:[1,10,137,8453,42161],auth:"none",ops:["health","stats","address","token"],baseEnv:[],description:"Verified public Blockscout REST v2 instances"});E({id:"paraswap",venue:"dex",chainIds:[1,10,56,137,8453,42161,43114,4663],auth:"none",ops:["health","tokens","price","quote","prepare"],execution:"prepare",baseEnv:["PARASWAP_API_URL"],description:"ParaSwap/Velora public price routes + validated transaction builder"});E({id:"rfq",venue:"intent-rfq",chainIds:[1,10,56,137,8453,42161,43114,4663],auth:"none",ops:["health","intent","quote"],execution:"prepare",baseEnv:["ZEROX_API_KEY","ONEINCH_API_KEY"],description:"Cross-chain RFQ intent normalizer and firm-quote fanout over reviewed venues. Prepares artifacts only, never signs or broadcasts."});E({id:"execution-strategies",venue:"oracle-native",chainIds:[],auth:"none",ops:["health","plan"],execution:"plan-only",baseEnv:[],description:"Oracle-native TWAP, VWAP, POV, iceberg, and implementation-shortfall planners. No Tread.fi/API dependency. Plans never sign or broadcast; every slice requires a fresh best-execution quote, policy check, simulation, confirmation, wallet signature, and receipt."});E({id:"polygon-staking",venue:"polygon-staking",chainIds:[137],auth:"none",ops:["health","validators","validatorDetail"],baseEnv:["POLYGON_STAKING_API_URL"],description:"Polygon POS staking validators"});E({id:"babylon-staking",venue:"btc-staking",chainIds:[],auth:"none",ops:["health","stats","finalityProviders","delegations"],execution:"read-only",baseEnv:["BABYLON_STAKING_API_URL"],description:"Babylon native BTC staking (staking-api.babylonlabs.io v2). Keyless per-staker positions from a PUBLIC key alone \u2014 APR, TVL, finality-provider roster, and delegations. Read-only; staking/unbonding is user-wallet."});E({id:"mempool-mining",venue:"btc-mining",chainIds:[],auth:"none",ops:["health","difficulty","poolShare","hashrate","rewardStats"],execution:"read-only",baseEnv:["MEMPOOL_API_URL"],description:"Bitcoin mining + network security telemetry via mempool.space /api/v1/mining. Difficulty retarget, pool concentration (top-1/top-3 share), hashrate trend, subsidy-vs-fee split."});E({id:"liquid-esplora",venue:"liquid",chainIds:[],auth:"none",ops:["health","tipHeight","addressInfo","assetInfo"],execution:"read-only",baseEnv:["LIQUID_ESPLORA_URL"],description:"Liquid Network (Blockstream sidechain) via Esplora. Same schema as bitcoin-esplora plus multi-asset issuance/peg stats. Confidential addresses return TXO counts only \u2014 amounts are blinded on chain and reported as such."});E({id:"hiro-stacks",venue:"stacks",chainIds:[],auth:"none",ops:["health","networkInfo","stackingInfo","poxCycles","blocks"],execution:"read-only",baseEnv:["HIRO_API_URL","HIRO_API_KEY"],description:"Stacks (Bitcoin L2) via Hiro public API. Network tip, PoX stacking state (the BTC-yield mechanism), and historical reward cycles. Keyless tier is ~20 rps; HIRO_API_KEY is optional and never required."});E({id:"tron-public",venue:"tron",chainIds:[],auth:"none",ops:["health","account","trc20Balances","trc20Transfers","chainParameters"],execution:"read-only",localSignerSurfaces:[],baseEnv:["TRON_API_URL","TRONGRID_API_KEY"],description:"Tron mainnet via public TronGrid. TRX balance, TRC20 token balances, USDT-TRC20 transfer history, chain parameters. Tron carries the largest USDT float of any chain. Keyless; TRONGRID_API_KEY only raises the rate ceiling and never travels to a non-TronGrid host."});E({id:"ton-public",venue:"ton",chainIds:[],auth:"none",ops:["health","accountState","jettonBalances","transactions"],execution:"read-only",localSignerSurfaces:[],baseEnv:["TON_API_URL","TONCENTER_API_KEY"],description:"TON via public toncenter. Account state + nanoton balance, jetton (TON's ERC20) balances, transaction history. The settlement layer for Telegram-native assets. Keyless; TONCENTER_API_KEY only raises the rate ceiling."});E({id:"cosmos-lcd",venue:"cosmos",chainIds:[],auth:"none",ops:["health","chains","balances","delegations","denomTrace"],execution:"read-only",localSignerSurfaces:[],baseEnv:["COSMOS_LCD_URL","COSMOS_CHAIN"],description:"Cosmos SDK chains via keyless LCD/REST \u2014 one provider, many chains (cosmoshub default, plus osmosis/celestia/injective/neutron/dydx/noble/kava, or any LCD via COSMOS_LCD_URL_<CHAIN>). Bank balances, staking delegations + unbondings + rewards, and IBC denom-trace resolution for ibc/<hash> denoms."});E({id:"sui-public",venue:"sui",chainIds:[],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-08-25",reason:"Sui public fullnodes return JSON-RPC -32601 because the JSON-RPC surface is deprecated",evidence:"Migrate the provider to Sui GraphQL or gRPC before restoring it to the live roster"},localSignerSurfaces:[],baseEnv:["SUI_RPC_URL"],description:"QUARANTINED: Sui public JSON-RPC is deprecated. A GraphQL or gRPC replacement has not shipped."});E({id:"aptos-public",venue:"aptos",chainIds:[],auth:"none",ops:["health","account","resources","coinBalances"],execution:"read-only",localSignerSurfaces:[],baseEnv:["APTOS_FULLNODE_URL","APTOS_API_KEY"],description:"Aptos mainnet via the public fullnode REST API. Ledger info, account sequence/auth key, Move resources, and coin balances (0x1::coin::balance view with a CoinStore resource fallback). Read-only; the transaction submit door is never called."});E({id:"ordinals-runes",venue:"btc-runes",chainIds:[],auth:"none",ops:["health","blockHeight","blockInfo","satInfo","runeInfo"],execution:"read-only",baseEnv:["ORDINALS_BASE_URL"],description:"Runes + sat/block index via a public ord server (ordinals.com). /r/blockheight is PLAIN TEXT; the /runes listing is 406 'JSON API disabled' so only per-rune lookup exists; rune names must drop the bullet spacer (UNCOMMONGOODS)."});E({id:"mempool-lightning",venue:"btc-lightning",chainIds:[],auth:"none",ops:["health","statistics","nodeRankings","nodeCountries"],execution:"read-only",baseEnv:["MEMPOOL_API_URL"],description:"Lightning Network topology via mempool.space. Capacity/channel/node aggregates, node rankings, country distribution. STALE-PRONE: the crawler snapshot has been observed weeks behind, so every response carries ageDays + a stale flag."});E({id:"bob-rootstock",venue:"btc-l2",chainIds:[60808,30],auth:"none",ops:["health","stats","addressInfo","tokenBalances"],execution:"read-only",baseEnv:["BOB_EXPLORER_URL","ROOTSTOCK_EXPLORER_URL"],description:"BOB (60808) and Rootstock (30) \u2014 the EVM Bitcoin L2s \u2014 via their Blockscout v2 instances (identical schema, one code path). Chain stats, gas prices, native balances, token holdings. Pass chainId 'all' to fan out."});E({id:"bisq-markets",venue:"bisq",chainIds:[],auth:"none",ops:["health","markets","ticker","trades"],execution:"read-only",baseEnv:["BISQ_MARKETS_URL"],description:"Bisq non-KYC P2P BTC price discovery (markets.bisq.network). Value is the BASIS against centralized spot, not the absolute print: volume is thin and the last trade can be hours old, so trade age is always reported."});E({id:"social-intel",venue:"oracle-social",chainIds:[],auth:"none",ops:["health","trendingTokens","trendingCas","keywordMentions","smartAccounts","narratives"],execution:"read-only",localSignerSurfaces:[],baseEnv:["ORACLE_SOCIAL_INTEL_STORE","ORACLE_SOCIAL_INTEL_STALE_MIN"],description:"Local curated-account crypto social intelligence. Sample = graded caller list, NOT a firehose; every response reports sample size and snapshot age."});E({id:"magiceden-ordinals",venue:"btc-ordinals-market",chainIds:[],auth:"none",ops:["health","collectionStat"],execution:"read-only",baseEnv:["MAGICEDEN_ORD_API_URL","MAGICEDEN_API_KEY","MAGICEDEN_PROBE_COLLECTION"],description:"Magic Eden ordinals collection stats. DEGRADED UPSTREAM: /v2/ord/btc/* returned 503 'no healthy upstream' on every verification attempt. health() reports ok:false while it is down and collectionStat() returns upstreamDown:true with fallback 'satflow' instead of throwing. Only /stat is wired; 600 req/min documented."});E({id:"braiins-insights",venue:"btc-mining",chainIds:[],auth:"none",ops:["health","priceStats","poolStats"],execution:"read-only",baseEnv:["BRAIINS_INSIGHTS_URL"],description:"Braiins mining insights \u2014 BTC price tick + per-pool block/hashrate distribution. Use insights.braiins.com (302s to learn.braiins.com, followed transparently); pool.braiins.com/api is 403 and is NOT the public API."});E({id:"pyth-price-feeds",venue:"solana-oracle",chainIds:[],auth:"none",ops:["health","latestPrice","latestPrices","feedDirectory"],baseEnv:["PYTH_HERMES_URL"],description:"Pyth Network: Solana price feeds with confidence intervals, real-time updates, zero auth"});E({id:"solend-lending",venue:"solana-lending",chainIds:[],auth:"none",ops:["health","markets","reserves"],baseEnv:["SAVE_API_URL"],description:"Solend/Save lending: markets + per-reserve supply/borrow APY, Solana's Aave equivalent (keyless)"});E({id:"jito-mev",venue:"solana-mev",chainIds:[],auth:"none",ops:["health","recentBundles","tipFloor"],baseEnv:["JITO_API_URL"],description:"Jito MEV: recent bundles, tippers, tip floor \u2014 real-time Solana MEV data (keyless)"});E({id:"sanctum-lst",venue:"solana-staking",chainIds:[],auth:"none",ops:["health","lstList","apyAll","apyIndividual"],baseEnv:["SANCTUM_API_URL"],description:"Sanctum LST: liquid staking tokens with per-token APY \u2014 JitoSOL, mSOL, bSOL, compSOL, pathSOL, etc. (keyless)"});E({id:"kamino-strategies",venue:"solana-yield",chainIds:[],auth:"none",ops:["health","strategies","strategyMetrics"],baseEnv:["KAMINO_API_URL"],description:"Kamino: live yield strategies with APY, TVL, vault balances (keyless)"});E({id:"meteora-dlmm",venue:"solana-dex",chainIds:[],auth:"none",ops:["health","pools","poolSearch"],baseEnv:["METEORA_API_URL"],description:"Meteora DLMM: concentrated liquidity pools via amm-v2 API, distinct from Jupiter DEX routes (keyless)"});E({id:"aave-v3",venue:"evm-lending",chainIds:[1,10,56,137,59144,1088,534352,8453,42161,43114,5e3,1868],auth:"none",ops:["health","markets","marketReserves","chains"],baseEnv:["AAVE_V3_API_URL"],description:"Aave V3 GraphQL: multi-chain lending, full market + reserve schema with supplyInfo/borrowInfo (keyless)"});E({id:"cow-protocol",venue:"evm-intent",chainIds:[1,100,42161],auth:"none",ops:["health","auction","openOrders","recentTrades"],baseEnv:["COW_API_URL"],description:"CoW Protocol: intent/solver auction data, open orders, trades \u2014 intent-based DEX not covered by existing providers (keyless)"});E({id:"relayscan-mev",venue:"evm-mev",chainIds:[1],auth:"none",ops:["health","overview","builderProfit","dailyStats"],baseEnv:["RELAYSCAN_API_URL"],description:"Relayscan: MEV relay overview, builder profit rankings, daily block stats (keyless)"});E({id:"birdeye-tokens",venue:"solana-tokens",chainIds:[],auth:"none",ops:["health","tokenList"],baseEnv:["BIRDEYE_API_URL"],description:"Birdeye public token list: Solana tokens ranked by 24h volume, market cap (keyless)"});E({id:"das-assets",venue:"solana-nft",chainIds:[],auth:"none",ops:["health","assetsByOwner","searchAssets","assetProof"],baseEnv:["SOLANA_RPC_URL"],description:"Digital Asset Standard (DAS): compressed NFT reads via public Solana RPC \u2014 getAssetsByOwner, searchAssets, assetProof. No Helius key needed."});E({id:"symbiotic-restaking",venue:"evm-restaking",chainIds:[1],auth:"none",ops:["health","vaults","vaultDetail"],baseEnv:["SYMBIOTIC_API_URL"],description:"Symbiotic restaking: vaults with collateral data, approved status, operator metadata (keyless)"});E({id:"beefy-yields",venue:"evm-yield",chainIds:[1,10,56,137,8453,42161,43114,250,1088],auth:"none",ops:["health","apy","apyBreakdown"],baseEnv:["BEEFY_API_URL"],description:"Beefy Finance: cross-chain yield aggregator vaults with APY breakdowns (keyless)"});E({id:"across-bridge",venue:"evm-bridge",chainIds:[1,10,42161,8453,324,59144],auth:"none",ops:["health","pools","suggestedFees"],baseEnv:["ACROSS_API_URL"],description:"Across bridge: pool liquidity + APY per bridge pool with suggested fees (keyless)"});E({id:"spark-lend",venue:"evm-lending",chainIds:[1],auth:"none",ops:["health","markets"],baseEnv:["SPARK_API_URL"],description:"Spark Lend / Sky Savings: ERC-4626 vault APY + TVL + user count (keyless)"});E({id:"l2beat-tvl",venue:"evm-l2",chainIds:[],auth:"none",ops:["health","tvl","activity"],baseEnv:["L2BEAT_API_URL"],description:"L2Beat: L2 scaling TVL, project-level breakdowns, activity metrics (keyless)"});E({id:"celestia-da",venue:"evm-da",chainIds:[],auth:"none",ops:["health","stats","blockStats"],baseEnv:["CELENIUM_API_URL"],description:"Celestia DA via Celenium: blob stats, block-level blob counts, network metrics (keyless)"});E({id:"limit-order",venue:"1inch-lop",chainIds:[1,10,56,137,8453,42161],auth:"none",ops:["health","prepare","arm"],execution:"armed-local",localSignerSurfaces:["evm-order"],description:"1inch Limit Order Protocol v4. Queues on the local signer; Allow posts the order."});E({id:"jupiter-dca",venue:"jupiter",chainIds:[],auth:"none",ops:["health","prepare","arm"],execution:"armed-local",localSignerSurfaces:["sol"],description:"Jupiter limit/DCA. Unsigned tx queues on the sol signer; Allow submits."});E({id:"protective-monitors",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health","depeg","oracleDeviation","exploitFeed","goplus","liquidationLadder"],execution:"read-only",description:"Alert-only depeg, oracle deviation, exploit feed, GoPlus second opinion, liquidation ladder."});E({id:"funding-scanner",venue:"perps",chainIds:[],auth:"none",ops:["health","scan"],execution:"read-only",description:"Cross-venue funding carry ranked net of fee drag. Failed venues stay FAILED."});E({id:"perp-universal",venue:"perps",chainIds:[],auth:"none",ops:["health","fundingAll","prepareOrder"],execution:"prepare-only",description:"Live fundingAll across HL/GMX/dYdX + honest FAILED Drift/Vertex. prepareOrder unsigned."});E({id:"onchain-options",venue:"options",chainIds:[],auth:"none",ops:["health","rank"],execution:"read-only",description:"Local Black-Scholes ranking. No arm until official Derive/Lyra domain is pinned."});E({id:"holder-clusters",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health","score"],execution:"read-only",description:"Heuristic holder HHI + common-funding clusters. Not identity."});E({id:"kalshi",venue:"prediction",chainIds:[],auth:"none",ops:["health","markets"],execution:"read-only",description:"Kalshi market catalog read-only. Trading may be US-restricted. Prepare refused."});E({id:"derive-options",venue:"options",chainIds:[],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-08-25",reason:"No official Derive EIP-712 domain or contract is pinned, so prepare remains unavailable",evidence:"prepareOption() in onchain-options.mjs refuses unconditionally"},description:"UNAVAILABLE: Derive execution has no pinned official domain. Use onchain-options for local ranking."});E({id:"limitless",venue:"prediction",chainIds:[],auth:"none",ops:["health","markets"],execution:"read-only",description:"Limitless market catalog. Prepare refused \u2014 no grant-bound decoder."});E({id:"dov-vaults",venue:"options",chainIds:[],auth:"none",ops:["health"],execution:"unavailable",deprecated:{since:"2026-08-25",reason:"The reviewed DOV vault registry is empty, so every vault read refuses",evidence:"REVIEWED_DOV_VAULTS.length is zero and no reviewed code hash is pinned"},description:"UNAVAILABLE: the reviewed DOV vault registry is empty and every read fails closed."});E({id:"prediction-match",venue:"prediction",chainIds:[],auth:"none",ops:["health","match"],execution:"read-only",description:"Cross-venue event match. Same title is not a match."});E({id:"tee-attestation",venue:"identity",chainIds:[],auth:"none",ops:["health","verify"],execution:"read-only",description:"TEE schema stub. Hardware unavailable. Unknown root unverified."});E({id:"keeper-mirror",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health"],execution:"read-only",description:"Keeper alert-mirror. Off by default. No execute path."});E({id:"erc7715-permissions",venue:"aa",chainIds:[],auth:"none",ops:["health","normalize"],execution:"read-only",description:"ERC-7715 permission normalize. Wildcards refused. aa allowlist empty."});E({id:"erc7710-delegation",venue:"aa",chainIds:[],auth:"none",ops:["health","inspect"],execution:"read-only",description:"ERC-7710 delegation inspect. Missing revocation/expiry fails closed."});E({id:"binance-public",venue:"cex",chainIds:[],auth:"none",ops:["health","ticker","orderbook","funding","markPrice","openInterest","fundingHistory"],execution:"read-only",localSignerSurfaces:[],baseEnv:["BINANCE_API_URL","BINANCE_FAPI_URL"],description:"Binance public spot + USD-M perp market data (ticker, depth, premiumIndex funding, open interest). Keyless reads only; no trading endpoints."});E({id:"okx-public",venue:"cex",chainIds:[],auth:"none",ops:["health","ticker","orderbook","funding","markPrice","openInterest"],execution:"read-only",localSignerSurfaces:[],baseEnv:["OKX_API_URL"],description:"OKX public v5 market data (ticker, books, swap funding-rate, mark-price, open-interest). Keyless reads only; no trading endpoints."});E({id:"bybit-public",venue:"cex",chainIds:[],auth:"none",ops:["health","ticker","orderbook","funding","markPrice","openInterest","fundingHistory"],execution:"read-only",localSignerSurfaces:[],baseEnv:["BYBIT_API_URL"],description:"Bybit public v5 market data (spot/linear tickers, orderbook, funding, open interest). Keyless reads only; no trading endpoints."});E({id:"cex-basis",venue:"cex",chainIds:[],auth:"none",ops:["health","basis","fundingSpread","legs"],execution:"read-only",localSignerSurfaces:[],baseEnv:["BINANCE_API_URL","OKX_API_URL","BYBIT_API_URL","HL_INFO_URL"],description:"Cross-venue perp basis and annualized funding spreads across Binance, OKX, Bybit and Hyperliquid public data. Analysis only, no sizing and no prepare."});E({id:"snapshot-governance",venue:"governance",chainIds:[],auth:"none",ops:["health","spaces","proposals","activeProposals","proposal","votes","votingPower"],execution:"read-only",localSignerSurfaces:[],baseEnv:["SNAPSHOT_API_URL"],description:"Snapshot.org off-chain governance reads: spaces, proposals, proposal detail, an address's votes and voting power. Never signs a vote."});E({id:"tally-governance",venue:"governance",chainIds:[1,10,42161],auth:"none",ops:["health","governors","info","proposals","proposal","voterStatus","tallyProposals"],execution:"read-only",localSignerSurfaces:[],baseEnv:["TALLY_API_URL","TALLY_API_KEY"],description:"Governor Bravo / OZ Governor on-chain proposal state and vote tallies for major DAOs, plus optional keyed Tally metadata. Read-only ABI has no vote/queue/execute selector."});E({id:"launch-radar",venue:"launch-radar",chainIds:[],auth:"none",ops:["health","status","snapshot","candidates","rpcHealth","evaluateStrategy"],execution:"read-only",localSignerSurfaces:[],baseEnv:["ORACLE_CONFIG_DIR","LAUNCH_RADAR_STORE_PATH"],description:"Read-only Launch Radar data plane: durable shadow-cycle status/snapshot from local disk, plus pure candidate normalization, RPC-sample ranking, and strategy-policy evaluation over caller-supplied inputs. Shadow-only, unfunded, no signer, no broadcast."});E({id:"stablecoin-peg",venue:"oracle-intel",chainIds:[],auth:"none",ops:["health","scan"],execution:"read-only",localSignerSurfaces:[],baseEnv:[],description:"Peg-deviation scan across major and Hyperliquid-native stables. Ranks by absolute bps from $1 and classifies normal/watch/warn/depeg. Unpriced is unknown, never on-peg. Read-only composition of DefiLlama/Pyth/DexScreener."});tU()});function iU(e={}){return rU.has(e.auth)?(Array.isArray(e.baseEnv)?e.baseEnv:[]).filter(t=>nU.test(t)&&!oU.test(t)):[]}function Wd(e={}){return e.execution==="unavailable"||!!e.deprecated}function aU(e={},t={},{env:n=process.env}={}){let o;if(Wd(e))o="deprecated";else if(t?.ok===!0)o="live";else{let r=iU(e);r.length>0&&!r.some(a=>String(n?.[a]||"").trim())?o="needs_key":e.softFail?o="soft_fail":o="hard_down"}return Object.freeze({provider:e.id||null,class:o,hardDown:o==="hard_down",quarantined:o==="deprecated",probe:t})}function QA(e=[],t=null,{env:n=process.env}={}){let o=t?.providers&&typeof t.providers=="object"?t.providers:{},r={live:0,needs_key:0,deprecated:0,soft_fail:0,hard_down:0,unknown:0},i={},a=[],s=[];for(let c of e){if(!Wd(c)&&!Object.hasOwn(o,c.id)){r.unknown+=1,i[c.id]=Object.freeze({provider:c.id,class:"unknown",hardDown:!1,quarantined:!1});continue}let l=aU(c,o[c.id],{env:n});i[c.id]=l,r[l.class]+=1,l.hardDown&&a.push(c.id),l.quarantined&&s.push(c.id)}return Object.freeze({ok:a.length===0,roster:e.length,probed:t!=null,counts:Object.freeze(r),hardDown:a.length,hardDownIds:Object.freeze(a),quarantined:s.length,quarantinedIds:Object.freeze(s),classifications:Object.freeze(i)})}var aee,rU,nU,oU,eI=S(()=>{aee=Object.freeze(["live","needs_key","deprecated","soft_fail","hard_down"]),rU=new Set(["apiKey","agentKey"]),nU=/(?:API_KEY|ACCESS_KEY|SECRET|TOKEN|CREDENTIAL|AUTH|ENV_FILE)$/i,oU=/(?:URL|URI|HOST|ENDPOINT|RPC)$/i});var iI={};Xe(iI,{default:()=>uU,providerRoster:()=>rI,runAgenticDoctor:()=>oI});import Qs from"node:fs";import Me from"node:path";function tI(e){try{return Qs.existsSync(e)}catch{return!1}}function Yw(e){for(let t of e)if(t&&tI(t))return t;return null}function Xw(e){try{return We(e,import.meta.url)}catch{return null}}function rI(){let e=Jw(),t=e.filter(Wd).map(n=>n.id);return Object.freeze({source:"catalog",count:e.length,live:e.length-t.length,quarantined:t.length,quarantinedIds:Object.freeze(t)})}function nI(){let e=Yw([Xw("skills"),Me.join(se,"skills"),Me.join(se,"dist/assets/skills"),Me.join(se,"assets/skills")]);if(!e)return{count:0,trading:[],building:[]};let t=Qs.readdirSync(e),n=t.filter(r=>/trade|swap|snipe|farm|hyperliquid|poly|best-exec|circuit|meme|token-research|rfq/i.test(r)),o=t.filter(r=>/launch|builder|protocol|nft|dex-launch|token-launch|security|contract/i.test(r));return{count:t.length,trading:n,building:o}}function sU(){let e=Yw([Xw("protocols/templates"),Me.join(se,"protocols/templates"),Me.join(se,"dist/assets/protocols/templates"),Me.join(se,"assets/protocols/templates")]);return e?Qs.readdirSync(e).filter(n=>!n.startsWith(".")):nI().building.some(n=>/protocol-builder|dex-launch|token-launch/i.test(n))?["(via skills: protocol-builder / launch packs)"]:[]}function cU(){let e=Yw([Xw("profiles"),Me.join(se,"profiles"),Me.join(se,"dist/assets/profiles"),Me.join(se,"assets/profiles")]);return e?Qs.readdirSync(e,{withFileTypes:!0}).filter(t=>t.isDirectory()&&!t.name.startsWith("_")).map(t=>t.name):[]}function lU(){try{if(jt.includes("trade_lifecycle")&&!jt.some(t=>/broadcast|wallet_sign/.test(t)))return!0}catch{}let e=[Me.join(se,"src/capability-posture.mjs"),Me.join(se,"dist/capability-posture.mjs"),Me.join(se,"capability-posture.mjs"),Me.join(se,"dist/public-control/policy-schema.mjs"),Me.join(se,"README.md"),Me.join(se,"package.json")];for(let t of e)if(tI(t))try{let n=Qs.readFileSync(t,"utf8");if(/prepare-only|never takes your key|never.*broadcast/i.test(n))return!0}catch{}return!1}function oI(e=process.env,{health:t=null}={}){let n=[],o=(L,v,_,U=1)=>{n.push({id:L,status:v,detail:_,weight:U})},[r,i]=process.versions.node.split(".").map(Number),a=r>20||r===20&&i>=19;o("node",a?"ok":"fail",`node ${process.versions.node}`,2);let c=["oracle_cli","research_delegate","trade_lifecycle","signal_score","skill_load","learn_skill","code_eval","cron_add","web_fetch"].filter(L=>!jt.includes(L));o("agent_tools",c.length===0?"ok":"warn",c.length===0?`safe tools ${jt.length}; signal_score present`:`missing tools: ${c.join(",")}`,3),o("research_attributes","ok",`attrs [${Rd.join(", ")}]; mode=${Ys(e)?"ON":"off"}`,2);let l=rI(),u=l.quarantinedIds.length?`: ${l.quarantinedIds.join(", ")}`:"";o("providers",l.count>=40?"ok":l.count>=10?"warn":"fail",`${l.count} providers from catalog, ${l.live} live, ${l.quarantined} quarantined${u}`,3);let d=QA(Jw(),t,{env:e}),p=d.hardDown>0?"fail":d.quarantined>0||d.counts.needs_key>0||d.counts.unknown>0?"warn":"ok",f=d.hardDownIds.length?`; hard_down_ids=${d.hardDownIds.join(",")}`:"";o("provider_health",p,`live=${d.counts.live} needs_key=${d.counts.needs_key} deprecated=${d.counts.deprecated} soft_fail=${d.counts.soft_fail} hard_down=${d.counts.hard_down} unknown=${d.counts.unknown}${f}`,3);let m=nI();o("skills_trading_build",m.trading.length>=5&&m.building.length>=4?"ok":m.count>=10?"warn":"fail",`${m.count} skills; trading=${m.trading.length} building=${m.building.length}`,3);let h=sU();o("protocol_templates",h.length>=2?"ok":"warn",h.length?h.join(", "):"none",2);let g=cU();o("profiles",g.includes("protocol-builder")&&g.includes("oracle")?"ok":g.length>=1?"warn":"fail",g.join(", ")||"none",2),o("signals_engine",iw.length>=4?"ok":"fail",`types: ${iw.join(", ")} (cold / no hot exec)`,2);let b=Ux();o("harness_roster",b.length>=8?"ok":"warn",`${b.length} supported harnesses; Oracle native default; MCP inbound only`,2),o("custody_prepare_only",lU()?"ok":"fail","public plane prepare-only",4);let T=e.ORACLE_DATA_URL||"http://127.0.0.1:8787";o("data_url","ok",T,1);let I=0,x=0;for(let L of n)x+=L.weight,L.status==="ok"?I+=L.weight:L.status==="warn"&&(I+=L.weight*.5);let k=x?Math.round(I/x*100):0,N=!n.some(L=>L.status==="fail")&&k>=70,P=N?`AGENTIC READY ${k}% \u2014 Oracle is the crypto control plane (prepare-only); pair coding harnesses via MCP for build.`:`AGENTIC GAPS ${k}% \u2014 fix fail/warn checks before calling Oracle the default crypto harness.`;return{ok:N,score:I,max:x,pct:k,summary:P,researchMode:Ys(e),attributes:[...Rd],packageRoot:se,checks:n}}var uU,aI=S(()=>{Qn();Mr();Ng();vw();$s();$d();XA();eI();uU={runAgenticDoctor:oI}});import{spawnSync as Kd}from"node:child_process";import{createHash as dU}from"node:crypto";import tc from"node:fs";import fU from"node:os";import xe from"node:path";import{fileURLToPath as pU,pathToFileURL as mU}from"node:url";Qn();import ub from"node:fs";import db from"node:path";import{spawnSync as II}from"node:child_process";function Qd(e,t=process.env){let n=db.join(se,"bin","oracle.mjs");return II(process.execPath,[n,...e],{encoding:"utf8",env:{...t,ORACLE_TEST_ISOLATE_SECRETS:"1"},maxBuffer:2*1024*1024})}function fb(e={}){let t=e.env||process.env,n=[],o=(u,d,p="")=>n.push({name:u,ok:!!d,detail:p}),r=Qd(["--version"],t);o("version",r.status===0&&/oracle\s+\d/i.test(r.stdout||""),(r.stdout||"").trim());let i=Qd(["--help"],t),a=`${i.stdout||""}
70
70
  ${i.stderr||""}`;o("help-loads",i.status===0),o("help-no-private-key-paste",!/paste your.*private key|import.*private key/i.test(a));let s=Qd(["fees","--help"],t);o("fees-help",s.status===0);let c=db.join(se,"public","oracle-console","bitcoin-wallets.js");if(ub.existsSync(c)){let u=ub.readFileSync(c,"utf8");o("btc-address-only",!/\bsignPsbt\b|\bpushPsbt\b|\bbroadcast\b/i.test(u))}else n.push({name:"btc-address-only",ok:!1,skipped:!0,detail:"missing-guarded-asset"});let l=n.filter(u=>!u.ok).length;return{ok:l===0,total:n.length,pass:n.length-l,fail:l,cases:n}}import Fr from"node:fs";import sx from"node:os";import Ou from"node:path";import WI from"node:fs";import lf from"node:path";import{createHash as gb}from"node:crypto";var $I=(process.env.ORACLE_REDACT_SECRETS??"true").toLowerCase(),pb=["1","true","yes","on"].includes($I),OI=[/sk-[A-Za-z0-9_-]{10,}/g,/sk_live_[A-Za-z0-9]{10,}/g,/sk_test_[A-Za-z0-9]{10,}/g,/ghp_[A-Za-z0-9]{10,}/g,/github_pat_[A-Za-z0-9_]{10,}/g,/gho_[A-Za-z0-9]{10,}/g,/ghs_[A-Za-z0-9]{10,}/g,/xox[baprs]-[A-Za-z0-9-]{10,}/g,/AIza[A-Za-z0-9_-]{30,}/g,/AKIA[A-Z0-9]{16}/g,/pplx-[A-Za-z0-9]{10,}/g,/hf_[A-Za-z0-9]{10,}/g,/xai-[A-Za-z0-9]{30,}/g,/gsk_[A-Za-z0-9]{10,}/g,/npm_[A-Za-z0-9]{10,}/g,/tvly-[A-Za-z0-9]{10,}/g,/Bearer\s+[A-Za-z0-9\-._~+/]+=*/gi],TI=/\b0x[a-fA-F0-9]{64}\b/g,CI=/-----BEGIN (?:RSA |EC |OPENSSH |ENCRYPTED )?PRIVATE KEY-----[\s\S]*?-----END (?:RSA |EC |OPENSSH |ENCRYPTED )?PRIVATE KEY-----/g,NI=/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,RI=/\b([A-Z][A-Z0-9_]{0,40}(?:API_?KEY|TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE_?KEY|MNEMONIC|SEED|AUTH)[A-Z0-9_]{0,20})\s*=\s*(['"]?)(\S+)\2/g,PI=/^(?:export\s+)?((?:api[_-]?key|token|secret|password|private[_-]?key|mnemonic|seed[_-]?phrase|authorization))\s*[:=]\s*(['"]?)([^\s&]+)\2/gim,LI=/("(?:api[_-]?key|apiKey|access[_-]?token|refresh[_-]?token|client[_-]?secret|private[_-]?key|privateKey|secret|password|authorization|bearer|mnemonic|seedPhrase)"\s*:\s*")([^"]{6,})(")/gi,DI=new Set(["access_token","refresh_token","id_token","token","api_key","apikey","client_secret","password","auth","jwt","session","secret","key","code","signature","x-amz-signature","private_key","authorization"]),zI=new Set([...DI].map(e=>e.replace(/[^a-z0-9]/gi,"").toLowerCase()));function UI(e){let t=String(e??"");return t.length<18?"[REDACTED]":`${t.slice(0,6)}\u2026${t.slice(-4)}`}function mb(e){return`\xABredacted:${String(e??"").slice(0,4)}\u2026\xBB`}function K(e,t={}){if(e==null)return e;let n=typeof e=="string"?e:String(e);if(!n||!(t.force||pb))return n;let o=t.fileRead?mb:UI;n=n.replace(CI,"[REDACTED_PRIVATE_KEY]"),n=n.replace(TI,"[REDACTED_EVM_KEY]"),n=n.replace(NI,r=>o(r));for(let r of OI)r.lastIndex=0,n=n.replace(r,i=>o(i));return n=n.replace(RI,(r,i,a,s)=>/^(?:os\.(?:getenv|environ)|process\.env|\$ENV\{)/.test(s)?`${i}=${a||""}${s}${a||""}`:`${i}=${a||""}${o(s)}${a||""}`),n=n.replace(PI,(r,i,a,s)=>r.replace(s,o(s))),n=n.replace(LI,(r,i,a,s)=>`${i}${o(a)}${s}`),n}function eo(e,t={}){if(!(t.force||pb)||e==null)return e;if(typeof e=="string")return K(e,t);if(typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(n=>eo(n,t));if(typeof e=="object"){let n={};for(let[o,r]of Object.entries(e)){let i=/private|secret|password|mnemonic|seed|api[_-]?key|token|authorization|bearer/i.test(o);typeof r=="string"&&i?n[o]=t.fileRead?mb(r):"[REDACTED]":n[o]=eo(r,t)}return n}try{return K(String(e),t)}catch{return"[REDACTED]"}}function Qe(e){let t;try{t=new URL(String(e))}catch{return{ok:!1,error:`not a valid URL: ${String(e).slice(0,120)}`}}(t.username||t.password)&&(t.username="",t.password="");let n=[...t.searchParams.keys()];for(let o of n){let r=String(o).replace(/[^a-z0-9]/gi,"").toLowerCase();zI.has(r)&&t.searchParams.set(o,"[REDACTED]")}return{ok:!0,url:t,href:t.toString()}}ac();var sf=15e3,of=4e5,hb=5,af=2e4;function cf(e){return Ri(e)}function MI(e){return e.replace(/<script[\s\S]*?<\/script>/gi," ").replace(/<style[\s\S]*?<\/style>/gi," ").replace(/<noscript[\s\S]*?<\/noscript>/gi," ").replace(/<[^>]+>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/[ \t\r\f\v]+/g," ").replace(/\n\s*\n\s*\n+/g,`
71
71
 
72
72
  `).trim()}async function qI(e){let t=e.body?.getReader?.();if(!t)return(await e.text()).slice(0,of);let n=[],o=0;for(;o<of;){let{value:r,done:i}=await t.read();if(i)break;r&&(n.push(r),o+=r.length)}try{await t.cancel()}catch{}return Buffer.concat(n.map(r=>Buffer.from(r))).toString("utf8").slice(0,of)}async function sc({url:e,raw:t=!1},n={}){let o=n.lookupFn?{lookupFn:n.lookupFn}:{},r=await to(e,o);if(!r.ok)return{ok:!1,error:r.error};let i=Qe(r.url.toString());if(!i.ok)return{ok:!1,error:i.error};let a=n.fetchImpl?null:await Pi(),s=a?a.fetch:n.fetchImpl||globalThis.fetch,c=(d,p)=>{!a||!d?.addresses?.length||a.pin(new URL(p).hostname,d.addresses[0].address,d.addresses[0].family)};c(r,i.url.toString());let l=new AbortController,u=setTimeout(()=>l.abort(),n.timeoutMs||sf);try{let d=i.url.toString(),p;for(let N=0;;N+=1){p=await s(d,{redirect:"manual",signal:l.signal,headers:{"user-agent":"oracle-agent",accept:"text/html,application/json,text/plain,*/*"}});let P=Number(p.status)||0;if(P<300||P>=400||P===304)break;if(N>=hb)return{ok:!1,error:`too many redirects (> ${hb})`};let L=p.headers?.get?.("location");if(!L)return{ok:!1,error:`redirect ${P} without a location header`};let v;try{v=new URL(String(L),d).toString()}catch{return{ok:!1,error:"redirect to an invalid URL"}}let _=await to(v,o);if(!_.ok)return{ok:!1,error:`refused redirect target: ${_.error}`};let U=Qe(_.url.toString());if(!U.ok)return{ok:!1,error:U.error};d=U.url.toString(),c(_,d)}let f=new URL(d),m=await qI(p);if(!p.ok)return{ok:!1,error:`HTTP ${p.status}`,status:p.status,body:K(m.slice(0,500),{force:!0})};let h=String(p.headers?.get?.("content-type")||""),g=/html/i.test(h)||/^\s*<(?:!doctype|html)/i.test(m),b=t||!g?m:MI(m),T=b.length>af,I=K(T?`${b.slice(0,af)}