@magic5644/graph-it-live 1.13.1 → 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mcpWorker.js CHANGED
@@ -42786,7 +42786,7 @@ Additional information: BADCLIENT: Bad error code, ${P} not found in range ${u}.
42786
42786
 
42787
42787
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let B of g.seen.entries()){let ne=B[1];if(c===B[0]){I(B);continue}if(g.external){let Xe=g.external.registry.get(B[0])?.id;if(c!==B[0]&&Xe){I(B);continue}}if(g.metadataRegistry.get(B[0])?.id){I(B);continue}if(ne.cycle){I(B);continue}if(ne.count>1&&g.reused==="ref"){I(B);continue}}}function qoe(g,c){let f=g.seen.get(c);if(!f)throw new Error("Unprocessed schema. This is a bug in Zod.");let T=ne=>{let Me=g.seen.get(ne);if(Me.ref===null)return;let Xe=Me.def??Me.schema,ct={...Xe},Rt=Me.ref;if(Me.ref=null,Rt){T(Rt);let Gn=g.seen.get(Rt),Et=Gn.schema;if(Et.$ref&&(g.target==="draft-07"||g.target==="draft-04"||g.target==="openapi-3.0")?(Xe.allOf=Xe.allOf??[],Xe.allOf.push(Et)):Object.assign(Xe,Et),Object.assign(Xe,ct),ne._zod.parent===Rt)for(let go in Xe)go==="$ref"||go==="allOf"||go in ct||delete Xe[go];if(Et.$ref&&Gn.def)for(let go in Xe)go==="$ref"||go==="allOf"||go in Gn.def&&JSON.stringify(Xe[go])===JSON.stringify(Gn.def[go])&&delete Xe[go]}let Te=ne._zod.parent;if(Te&&Te!==Rt){T(Te);let Gn=g.seen.get(Te);if(Gn?.schema.$ref&&(Xe.$ref=Gn.schema.$ref,Gn.def))for(let Et in Xe)Et==="$ref"||Et==="allOf"||Et in Gn.def&&JSON.stringify(Xe[Et])===JSON.stringify(Gn.def[Et])&&delete Xe[Et]}g.override({zodSchema:ne,jsonSchema:Xe,path:Me.path??[]})};for(let ne of[...g.seen.entries()].reverse())T(ne[0]);let b={};if(g.target==="draft-2020-12"?b.$schema="https://json-schema.org/draft/2020-12/schema":g.target==="draft-07"?b.$schema="http://json-schema.org/draft-07/schema#":g.target==="draft-04"?b.$schema="http://json-schema.org/draft-04/schema#":g.target,g.external?.uri){let ne=g.external.registry.get(c)?.id;if(!ne)throw new Error("Schema is missing an `id` property");b.$id=g.external.uri(ne)}Object.assign(b,f.def??f.schema);let I=g.metadataRegistry.get(c)?.id;I!==void 0&&b.id===I&&delete b.id;let B=g.external?.defs??{};for(let ne of g.seen.entries()){let Me=ne[1];Me.def&&Me.defId&&(Me.def.id===Me.defId&&delete Me.def.id,B[Me.defId]=Me.def)}g.external||Object.keys(B).length>0&&(g.target==="draft-2020-12"?b.$defs=B:b.definitions=B);try{let ne=JSON.parse(JSON.stringify(b));return Object.defineProperty(ne,"~standard",{value:{...c["~standard"],jsonSchema:{input:PDe(c,"input",g.processors),output:PDe(c,"output",g.processors)}},enumerable:!1,writable:!1}),ne}catch{throw new Error("Error converting schema to JSON.")}}function YL(g,c){let f=c??{seen:new Set};if(f.seen.has(g))return!1;f.seen.add(g);let T=g._zod.def;if(T.type==="transform")return!0;if(T.type==="array")return YL(T.element,f);if(T.type==="set")return YL(T.valueType,f);if(T.type==="lazy")return YL(T.getter(),f);if(T.type==="promise"||T.type==="optional"||T.type==="nonoptional"||T.type==="nullable"||T.type==="readonly"||T.type==="default"||T.type==="prefault")return YL(T.innerType,f);if(T.type==="intersection")return YL(T.left,f)||YL(T.right,f);if(T.type==="record"||T.type==="map")return YL(T.keyType,f)||YL(T.valueType,f);if(T.type==="pipe")return g._zod.traits.has("$ZodCodec")?!0:YL(T.in,f)||YL(T.out,f);if(T.type==="object"){for(let b in T.shape)if(YL(T.shape[b],f))return!0;return!1}if(T.type==="union"){for(let b of T.options)if(YL(b,f))return!0;return!1}if(T.type==="tuple"){for(let b of T.items)if(YL(b,f))return!0;return!!(T.rest&&YL(T.rest,f))}return!1}var dwt=(g,c={})=>f=>{let T=Joe({...f,processors:c});return t0(g,T),Koe(T,g),qoe(T,g)},PDe=(g,c,f={})=>T=>{let{libraryOptions:b,target:I}=T??{},B=Joe({...b??{},target:I,io:c,processors:f});return t0(g,B),Koe(B,g),qoe(B,g)};var S$t={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fwt=(g,c,f,T)=>{let b=f;b.type="string";let{minimum:I,maximum:B,format:ne,patterns:Me,contentEncoding:Xe}=g._zod.bag;if(typeof I=="number"&&(b.minLength=I),typeof B=="number"&&(b.maxLength=B),ne&&(b.format=S$t[ne]??ne,b.format===""&&delete b.format,ne==="time"&&delete b.format),Xe&&(b.contentEncoding=Xe),Me&&Me.size>0){let ct=[...Me];ct.length===1?b.pattern=ct[0].source:ct.length>1&&(b.allOf=[...ct.map(Rt=>({...c.target==="draft-07"||c.target==="draft-04"||c.target==="openapi-3.0"?{type:"string"}:{},pattern:Rt.source}))])}},pwt=(g,c,f,T)=>{let b=f,{minimum:I,maximum:B,format:ne,multipleOf:Me,exclusiveMaximum:Xe,exclusiveMinimum:ct}=g._zod.bag;typeof ne=="string"&&ne.includes("int")?b.type="integer":b.type="number";let Rt=typeof ct=="number"&&ct>=(I??Number.NEGATIVE_INFINITY),Te=typeof Xe=="number"&&Xe<=(B??Number.POSITIVE_INFINITY),Gn=c.target==="draft-04"||c.target==="openapi-3.0";Rt?Gn?(b.minimum=ct,b.exclusiveMinimum=!0):b.exclusiveMinimum=ct:typeof I=="number"&&(b.minimum=I),Te?Gn?(b.maximum=Xe,b.exclusiveMaximum=!0):b.exclusiveMaximum=Xe:typeof B=="number"&&(b.maximum=B),typeof Me=="number"&&(b.multipleOf=Me)},_wt=(g,c,f,T)=>{f.type="boolean"},mwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},gwt=(g,c,f,T)=>{c.target==="openapi-3.0"?(f.type="string",f.nullable=!0,f.enum=[null]):f.type="null"},ywt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},vwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bwt=(g,c,f,T)=>{f.not={}},Swt=(g,c,f,T)=>{},Twt=(g,c,f,T)=>{},xwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Ewt=(g,c,f,T)=>{let b=g._zod.def,I=Mje(b.entries);I.every(B=>typeof B=="number")&&(f.type="number"),I.every(B=>typeof B=="string")&&(f.type="string"),f.enum=I},Cwt=(g,c,f,T)=>{let b=g._zod.def,I=[];for(let B of b.values)if(B===void 0){if(c.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof B=="bigint"){if(c.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");I.push(Number(B))}else I.push(B);if(I.length!==0)if(I.length===1){let B=I[0];f.type=B===null?"null":typeof B,c.target==="draft-04"||c.target==="openapi-3.0"?f.enum=[B]:f.const=B}else I.every(B=>typeof B=="number")&&(f.type="number"),I.every(B=>typeof B=="string")&&(f.type="string"),I.every(B=>typeof B=="boolean")&&(f.type="boolean"),I.every(B=>B===null)&&(f.type="null"),f.enum=I},Awt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Dwt=(g,c,f,T)=>{let b=f,I=g._zod.pattern;if(!I)throw new Error("Pattern not found in template literal");b.type="string",b.pattern=I.source},Iwt=(g,c,f,T)=>{let b=f,I={type:"string",format:"binary",contentEncoding:"binary"},{minimum:B,maximum:ne,mime:Me}=g._zod.bag;B!==void 0&&(I.minLength=B),ne!==void 0&&(I.maxLength=ne),Me?Me.length===1?(I.contentMediaType=Me[0],Object.assign(b,I)):(Object.assign(b,I),b.anyOf=Me.map(Xe=>({contentMediaType:Xe}))):Object.assign(b,I)},Pwt=(g,c,f,T)=>{f.type="boolean"},kwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Nwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},wwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Rwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Mwt=(g,c,f,T)=>{if(c.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Lwt=(g,c,f,T)=>{let b=f,I=g._zod.def,{minimum:B,maximum:ne}=g._zod.bag;typeof B=="number"&&(b.minItems=B),typeof ne=="number"&&(b.maxItems=ne),b.type="array",b.items=t0(I.element,c,{...T,path:[...T.path,"items"]})},Owt=(g,c,f,T)=>{let b=f,I=g._zod.def;b.type="object",b.properties={};let B=I.shape;for(let Xe in B)b.properties[Xe]=t0(B[Xe],c,{...T,path:[...T.path,"properties",Xe]});let ne=new Set(Object.keys(B)),Me=new Set([...ne].filter(Xe=>{let ct=I.shape[Xe]._zod;return c.io==="input"?ct.optin===void 0:ct.optout===void 0}));Me.size>0&&(b.required=Array.from(Me)),I.catchall?._zod.def.type==="never"?b.additionalProperties=!1:I.catchall?I.catchall&&(b.additionalProperties=t0(I.catchall,c,{...T,path:[...T.path,"additionalProperties"]})):c.io==="output"&&(b.additionalProperties=!1)},Zrt=(g,c,f,T)=>{let b=g._zod.def,I=b.inclusive===!1,B=b.options.map((ne,Me)=>t0(ne,c,{...T,path:[...T.path,I?"oneOf":"anyOf",Me]}));I?f.oneOf=B:f.anyOf=B},Fwt=(g,c,f,T)=>{let b=g._zod.def,I=t0(b.left,c,{...T,path:[...T.path,"allOf",0]}),B=t0(b.right,c,{...T,path:[...T.path,"allOf",1]}),ne=Xe=>"allOf"in Xe&&Object.keys(Xe).length===1,Me=[...ne(I)?I.allOf:[I],...ne(B)?B.allOf:[B]];f.allOf=Me},Wwt=(g,c,f,T)=>{let b=f,I=g._zod.def;b.type="array";let B=c.target==="draft-2020-12"?"prefixItems":"items",ne=c.target==="draft-2020-12"||c.target==="openapi-3.0"?"items":"additionalItems",Me=I.items.map((Te,Gn)=>t0(Te,c,{...T,path:[...T.path,B,Gn]})),Xe=I.rest?t0(I.rest,c,{...T,path:[...T.path,ne,...c.target==="openapi-3.0"?[I.items.length]:[]]}):null;c.target==="draft-2020-12"?(b.prefixItems=Me,Xe&&(b.items=Xe)):c.target==="openapi-3.0"?(b.items={anyOf:Me},Xe&&b.items.anyOf.push(Xe),b.minItems=Me.length,Xe||(b.maxItems=Me.length)):(b.items=Me,Xe&&(b.additionalItems=Xe));let{minimum:ct,maximum:Rt}=g._zod.bag;typeof ct=="number"&&(b.minItems=ct),typeof Rt=="number"&&(b.maxItems=Rt)},Bwt=(g,c,f,T)=>{let b=f,I=g._zod.def;b.type="object";let B=I.keyType,Me=B._zod.bag?.patterns;if(I.mode==="loose"&&Me&&Me.size>0){let ct=t0(I.valueType,c,{...T,path:[...T.path,"patternProperties","*"]});b.patternProperties={};for(let Rt of Me)b.patternProperties[Rt.source]=ct}else(c.target==="draft-07"||c.target==="draft-2020-12")&&(b.propertyNames=t0(I.keyType,c,{...T,path:[...T.path,"propertyNames"]})),b.additionalProperties=t0(I.valueType,c,{...T,path:[...T.path,"additionalProperties"]});let Xe=B._zod.values;if(Xe){let ct=[...Xe].filter(Rt=>typeof Rt=="string"||typeof Rt=="number");ct.length>0&&(b.required=ct)}},zwt=(g,c,f,T)=>{let b=g._zod.def,I=t0(b.innerType,c,T),B=c.seen.get(g);c.target==="openapi-3.0"?(B.ref=b.innerType,f.nullable=!0):f.anyOf=[I,{type:"null"}]},jwt=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType},Gwt=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType,f.default=JSON.parse(JSON.stringify(b.defaultValue))},Vwt=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType,c.io==="input"&&(f._prefault=JSON.parse(JSON.stringify(b.defaultValue)))},Uwt=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType;let B;try{B=b.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}f.default=B},Hwt=(g,c,f,T)=>{let b=g._zod.def,I=b.in._zod.traits.has("$ZodTransform"),B=c.io==="input"?I?b.out:b.in:b.out;t0(B,c,T);let ne=c.seen.get(g);ne.ref=B},Jwt=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType,f.readOnly=!0},Kwt=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType},eit=(g,c,f,T)=>{let b=g._zod.def;t0(b.innerType,c,T);let I=c.seen.get(g);I.ref=b.innerType},qwt=(g,c,f,T)=>{let b=g._zod.innerType;t0(b,c,T);let I=c.seen.get(g);I.ref=b},Qrt={string:fwt,number:pwt,boolean:_wt,bigint:mwt,symbol:hwt,null:gwt,undefined:ywt,void:vwt,never:bwt,any:Swt,unknown:Twt,date:xwt,enum:Ewt,literal:Cwt,nan:Awt,template_literal:Dwt,file:Iwt,success:Pwt,custom:kwt,function:Nwt,transform:wwt,map:Rwt,set:Mwt,array:Lwt,object:Owt,union:Zrt,intersection:Fwt,tuple:Wwt,record:Bwt,nullable:zwt,nonoptional:jwt,default:Gwt,prefault:Vwt,catch:Uwt,pipe:Hwt,readonly:Jwt,promise:Kwt,optional:eit,lazy:qwt};function tit(g,c){if("_idmap"in g){let T=g,b=Joe({...c,processors:Qrt}),I={};for(let Me of T._idmap.entries()){let[Xe,ct]=Me;t0(ct,b)}let B={},ne={registry:T,uri:c?.uri,defs:I};b.external=ne;for(let Me of T._idmap.entries()){let[Xe,ct]=Me;Koe(b,ct),B[Xe]=qoe(b,ct)}if(Object.keys(I).length>0){let Me=b.target==="draft-2020-12"?"$defs":"definitions";B.__shared={[Me]:I}}return{schemas:B}}let f=Joe({...c,processors:Qrt});return t0(g,f),Koe(f,g),qoe(f,g)}var nit=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(c){this.ctx.counter=c}get seen(){return this.ctx.seen}constructor(c){let f=c?.target??"draft-2020-12";f==="draft-4"&&(f="draft-04"),f==="draft-7"&&(f="draft-07"),this.ctx=Joe({processors:Qrt,target:f,...c?.metadata&&{metadata:c.metadata},...c?.unrepresentable&&{unrepresentable:c.unrepresentable},...c?.override&&{override:c.override},...c?.io&&{io:c.io}})}process(c,f={path:[],schemaPath:[]}){return t0(c,this.ctx,f)}emit(c,f){f&&(f.cycles&&(this.ctx.cycles=f.cycles),f.reused&&(this.ctx.reused=f.reused),f.external&&(this.ctx.external=f.external)),Koe(this.ctx,c);let T=qoe(this.ctx,c),{"~standard":b,...I}=T;return I}};var p5t={};var Qje={};EG(Qje,{ZodAny:()=>yRt,ZodArray:()=>TRt,ZodBase64:()=>xit,ZodBase64URL:()=>Eit,ZodBigInt:()=>FDe,ZodBigIntFormat:()=>Dit,ZodBoolean:()=>ODe,ZodCIDRv4:()=>Sit,ZodCIDRv6:()=>Tit,ZodCUID:()=>_it,ZodCUID2:()=>mit,ZodCatch:()=>URt,ZodCodec:()=>uGe,ZodCustom:()=>dGe,ZodCustomStringFormat:()=>MDe,ZodDate:()=>oGe,ZodDefault:()=>WRt,ZodDiscriminatedUnion:()=>ERt,ZodE164:()=>Cit,ZodEmail:()=>dit,ZodEmoji:()=>fit,ZodEnum:()=>wDe,ZodExactOptional:()=>LRt,ZodFile:()=>RRt,ZodFunction:()=>eMt,ZodGUID:()=>eGe,ZodIPv4:()=>vit,ZodIPv6:()=>bit,ZodIntersection:()=>CRt,ZodJWT:()=>Ait,ZodKSUID:()=>yit,ZodLazy:()=>YRt,ZodLiteral:()=>wRt,ZodMAC:()=>dRt,ZodMap:()=>kRt,ZodNaN:()=>JRt,ZodNanoID:()=>pit,ZodNever:()=>bRt,ZodNonOptional:()=>Rit,ZodNull:()=>hRt,ZodNullable:()=>FRt,ZodNumber:()=>LDe,ZodNumberFormat:()=>ESe,ZodObject:()=>sGe,ZodOptional:()=>wit,ZodPipe:()=>lGe,ZodPrefault:()=>zRt,ZodPreprocess:()=>KRt,ZodPromise:()=>ZRt,ZodReadonly:()=>qRt,ZodRecord:()=>NDe,ZodSet:()=>NRt,ZodString:()=>RDe,ZodStringFormat:()=>dS,ZodSuccess:()=>VRt,ZodSymbol:()=>_Rt,ZodTemplateLiteral:()=>XRt,ZodTransform:()=>MRt,ZodTuple:()=>DRt,ZodType:()=>rh,ZodULID:()=>hit,ZodURL:()=>iGe,ZodUUID:()=>bH,ZodUndefined:()=>mRt,ZodUnion:()=>cGe,ZodUnknown:()=>vRt,ZodVoid:()=>SRt,ZodXID:()=>git,ZodXor:()=>xRt,_ZodString:()=>uit,_default:()=>BRt,_function:()=>TWt,any:()=>Z5t,array:()=>aGe,base64:()=>O5t,base64url:()=>F5t,bigint:()=>q5t,boolean:()=>pRt,catch:()=>HRt,check:()=>xWt,cidrv4:()=>M5t,cidrv6:()=>L5t,codec:()=>yWt,cuid:()=>A5t,cuid2:()=>D5t,custom:()=>EWt,date:()=>tWt,describe:()=>CWt,discriminatedUnion:()=>sWt,e164:()=>W5t,email:()=>h5t,emoji:()=>E5t,enum:()=>kit,exactOptional:()=>ORt,file:()=>_Wt,float32:()=>U5t,float64:()=>H5t,function:()=>TWt,guid:()=>g5t,hash:()=>V5t,hex:()=>G5t,hostname:()=>j5t,httpUrl:()=>x5t,instanceof:()=>DWt,int:()=>cit,int32:()=>J5t,int64:()=>$5t,intersection:()=>ARt,invertCodec:()=>vWt,ipv4:()=>N5t,ipv6:()=>R5t,json:()=>PWt,jwt:()=>B5t,keyof:()=>nWt,ksuid:()=>k5t,lazy:()=>QRt,literal:()=>pWt,looseObject:()=>oWt,looseRecord:()=>lWt,mac:()=>w5t,map:()=>uWt,meta:()=>AWt,nan:()=>gWt,nanoid:()=>C5t,nativeEnum:()=>fWt,never:()=>Iit,nonoptional:()=>GRt,null:()=>gRt,nullable:()=>nGe,nullish:()=>mWt,number:()=>fRt,object:()=>rWt,optional:()=>tGe,partialRecord:()=>cWt,pipe:()=>lit,prefault:()=>jRt,preprocess:()=>kWt,promise:()=>SWt,readonly:()=>$Rt,record:()=>PRt,refine:()=>tMt,set:()=>dWt,strictObject:()=>iWt,string:()=>Zje,stringFormat:()=>z5t,stringbool:()=>IWt,success:()=>hWt,superRefine:()=>nMt,symbol:()=>Y5t,templateLiteral:()=>bWt,transform:()=>Nit,tuple:()=>IRt,uint32:()=>K5t,uint64:()=>X5t,ulid:()=>I5t,undefined:()=>Q5t,union:()=>Pit,unknown:()=>xSe,url:()=>T5t,uuid:()=>y5t,uuidv4:()=>v5t,uuidv6:()=>b5t,uuidv7:()=>S5t,void:()=>eWt,xid:()=>P5t,xor:()=>aWt});var rit={};EG(rit,{endsWith:()=>SDe,gt:()=>yH,gte:()=>XL,includes:()=>vDe,length:()=>TSe,lowercase:()=>gDe,lt:()=>gH,lte:()=>F3,maxLength:()=>SSe,maxSize:()=>Hoe,mime:()=>TDe,minLength:()=>Mte,minSize:()=>vH,multipleOf:()=>Uoe,negative:()=>qrt,nonnegative:()=>Xrt,nonpositive:()=>$rt,normalize:()=>xDe,overwrite:()=>MG,positive:()=>Krt,property:()=>Yrt,regex:()=>hDe,size:()=>bSe,slugify:()=>DDe,startsWith:()=>bDe,toLowerCase:()=>CDe,toUpperCase:()=>ADe,trim:()=>EDe,uppercase:()=>yDe});var kDe={};EG(kDe,{ZodISODate:()=>oit,ZodISODateTime:()=>iit,ZodISODuration:()=>sit,ZodISOTime:()=>ait,date:()=>Xwt,datetime:()=>$wt,duration:()=>Qwt,time:()=>Ywt});var iit=$o("ZodISODateTime",(g,c)=>{A2t.init(g,c),dS.init(g,c)});function $wt(g){return kNt(iit,g)}var oit=$o("ZodISODate",(g,c)=>{D2t.init(g,c),dS.init(g,c)});function Xwt(g){return NNt(oit,g)}var ait=$o("ZodISOTime",(g,c)=>{I2t.init(g,c),dS.init(g,c)});function Ywt(g){return wNt(ait,g)}var sit=$o("ZodISODuration",(g,c)=>{P2t.init(g,c),dS.init(g,c)});function Qwt(g){return RNt(sit,g)}var _5t=(g,c)=>{Bje.init(g,c),g.name="ZodError",Object.defineProperties(g,{format:{value:f=>jje(g,f)},flatten:{value:f=>zje(g,f)},addIssue:{value:f=>{g.issues.push(f),g.message=JSON.stringify(g.issues,sDe,2)}},addIssues:{value:f=>{g.issues.push(...f),g.message=JSON.stringify(g.issues,sDe,2)}},isEmpty:{get(){return g.issues.length===0}}})},x$t=$o("ZodError",_5t),SF=$o("ZodError",_5t,{Parent:Error});var Zwt=uDe(SF),eRt=dDe(SF),tRt=fDe(SF),nRt=pDe(SF),rRt=trt(SF),iRt=nrt(SF),oRt=rrt(SF),aRt=irt(SF),sRt=ort(SF),cRt=art(SF),lRt=srt(SF),uRt=crt(SF);var m5t=new WeakMap;function rGe(g,c,f){let T=Object.getPrototypeOf(g),b=m5t.get(T);if(b||(b=new Set,m5t.set(T,b)),!b.has(c)){b.add(c);for(let I in f){let B=f[I];Object.defineProperty(T,I,{configurable:!0,enumerable:!1,get(){let ne=B.bind(this);return Object.defineProperty(this,I,{configurable:!0,writable:!0,enumerable:!0,value:ne}),ne},set(ne){Object.defineProperty(this,I,{configurable:!0,writable:!0,enumerable:!0,value:ne})}})}}}var rh=$o("ZodType",(g,c)=>(tm.init(g,c),Object.assign(g["~standard"],{jsonSchema:{input:PDe(g,"input"),output:PDe(g,"output")}}),g.toJSONSchema=dwt(g,{}),g.def=c,g.type=c.type,Object.defineProperty(g,"_def",{value:c}),g.parse=(f,T)=>Zwt(g,f,T,{callee:g.parse}),g.safeParse=(f,T)=>tRt(g,f,T),g.parseAsync=async(f,T)=>eRt(g,f,T,{callee:g.parseAsync}),g.safeParseAsync=async(f,T)=>nRt(g,f,T),g.spa=g.safeParseAsync,g.encode=(f,T)=>rRt(g,f,T),g.decode=(f,T)=>iRt(g,f,T),g.encodeAsync=async(f,T)=>oRt(g,f,T),g.decodeAsync=async(f,T)=>aRt(g,f,T),g.safeEncode=(f,T)=>sRt(g,f,T),g.safeDecode=(f,T)=>cRt(g,f,T),g.safeEncodeAsync=async(f,T)=>lRt(g,f,T),g.safeDecodeAsync=async(f,T)=>uRt(g,f,T),rGe(g,"ZodType",{check(...f){let T=this.def;return this.clone(il.mergeDefs(T,{checks:[...T.checks??[],...f.map(b=>typeof b=="function"?{_zod:{check:b,def:{check:"custom"},onattach:[]}}:b)]}),{parent:!0})},with(...f){return this.check(...f)},clone(f,T){return qL(this,f,T)},brand(){return this},register(f,T){return f.add(this,T),this},refine(f,T){return this.check(tMt(f,T))},superRefine(f,T){return this.check(nMt(f,T))},overwrite(f){return this.check(MG(f))},optional(){return tGe(this)},exactOptional(){return ORt(this)},nullable(){return nGe(this)},nullish(){return tGe(nGe(this))},nonoptional(f){return GRt(this,f)},array(){return aGe(this)},or(f){return Pit([this,f])},and(f){return ARt(this,f)},transform(f){return lit(this,Nit(f))},default(f){return BRt(this,f)},prefault(f){return jRt(this,f)},catch(f){return HRt(this,f)},pipe(f){return lit(this,f)},readonly(){return $Rt(this)},describe(f){let T=this.clone();return zN.add(T,{description:f}),T},meta(...f){if(f.length===0)return zN.get(this);let T=this.clone();return zN.add(T,f[0]),T},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(f){return f(this)}}),Object.defineProperty(g,"description",{get(){return zN.get(g)?.description},configurable:!0}),g)),uit=$o("_ZodString",(g,c)=>{vSe.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(T,b,I)=>fwt(g,T,b,I);let f=g._zod.bag;g.format=f.format??null,g.minLength=f.minimum??null,g.maxLength=f.maximum??null,rGe(g,"_ZodString",{regex(...T){return this.check(hDe(...T))},includes(...T){return this.check(vDe(...T))},startsWith(...T){return this.check(bDe(...T))},endsWith(...T){return this.check(SDe(...T))},min(...T){return this.check(Mte(...T))},max(...T){return this.check(SSe(...T))},length(...T){return this.check(TSe(...T))},nonempty(...T){return this.check(Mte(1,...T))},lowercase(T){return this.check(gDe(T))},uppercase(T){return this.check(yDe(T))},trim(){return this.check(EDe())},normalize(...T){return this.check(xDe(...T))},toLowerCase(){return this.check(CDe())},toUpperCase(){return this.check(ADe())},slugify(){return this.check(DDe())}})}),RDe=$o("ZodString",(g,c)=>{vSe.init(g,c),uit.init(g,c),g.email=f=>g.check(Drt(dit,f)),g.url=f=>g.check(Yje(iGe,f)),g.jwt=f=>g.check(Jrt(Ait,f)),g.emoji=f=>g.check(wrt(fit,f)),g.guid=f=>g.check(Xje(eGe,f)),g.uuid=f=>g.check(Irt(bH,f)),g.uuidv4=f=>g.check(Prt(bH,f)),g.uuidv6=f=>g.check(krt(bH,f)),g.uuidv7=f=>g.check(Nrt(bH,f)),g.nanoid=f=>g.check(Rrt(pit,f)),g.guid=f=>g.check(Xje(eGe,f)),g.cuid=f=>g.check(Mrt(_it,f)),g.cuid2=f=>g.check(Lrt(mit,f)),g.ulid=f=>g.check(Ort(hit,f)),g.base64=f=>g.check(Vrt(xit,f)),g.base64url=f=>g.check(Urt(Eit,f)),g.xid=f=>g.check(Frt(git,f)),g.ksuid=f=>g.check(Wrt(yit,f)),g.ipv4=f=>g.check(Brt(vit,f)),g.ipv6=f=>g.check(zrt(bit,f)),g.cidrv4=f=>g.check(jrt(Sit,f)),g.cidrv6=f=>g.check(Grt(Tit,f)),g.e164=f=>g.check(Hrt(Cit,f)),g.datetime=f=>g.check($wt(f)),g.date=f=>g.check(Xwt(f)),g.time=f=>g.check(Ywt(f)),g.duration=f=>g.check(Qwt(f))});function Zje(g){return ANt(RDe,g)}var dS=$o("ZodStringFormat",(g,c)=>{uS.init(g,c),uit.init(g,c)}),dit=$o("ZodEmail",(g,c)=>{g2t.init(g,c),dS.init(g,c)});function h5t(g){return Drt(dit,g)}var eGe=$o("ZodGUID",(g,c)=>{m2t.init(g,c),dS.init(g,c)});function g5t(g){return Xje(eGe,g)}var bH=$o("ZodUUID",(g,c)=>{h2t.init(g,c),dS.init(g,c)});function y5t(g){return Irt(bH,g)}function v5t(g){return Prt(bH,g)}function b5t(g){return krt(bH,g)}function S5t(g){return Nrt(bH,g)}var iGe=$o("ZodURL",(g,c)=>{y2t.init(g,c),dS.init(g,c)});function T5t(g){return Yje(iGe,g)}function x5t(g){return Yje(iGe,{protocol:O3.httpProtocol,hostname:O3.domain,...il.normalizeParams(g)})}var fit=$o("ZodEmoji",(g,c)=>{v2t.init(g,c),dS.init(g,c)});function E5t(g){return wrt(fit,g)}var pit=$o("ZodNanoID",(g,c)=>{b2t.init(g,c),dS.init(g,c)});function C5t(g){return Rrt(pit,g)}var _it=$o("ZodCUID",(g,c)=>{S2t.init(g,c),dS.init(g,c)});function A5t(g){return Mrt(_it,g)}var mit=$o("ZodCUID2",(g,c)=>{T2t.init(g,c),dS.init(g,c)});function D5t(g){return Lrt(mit,g)}var hit=$o("ZodULID",(g,c)=>{x2t.init(g,c),dS.init(g,c)});function I5t(g){return Ort(hit,g)}var git=$o("ZodXID",(g,c)=>{E2t.init(g,c),dS.init(g,c)});function P5t(g){return Frt(git,g)}var yit=$o("ZodKSUID",(g,c)=>{C2t.init(g,c),dS.init(g,c)});function k5t(g){return Wrt(yit,g)}var vit=$o("ZodIPv4",(g,c)=>{k2t.init(g,c),dS.init(g,c)});function N5t(g){return Brt(vit,g)}var dRt=$o("ZodMAC",(g,c)=>{w2t.init(g,c),dS.init(g,c)});function w5t(g){return INt(dRt,g)}var bit=$o("ZodIPv6",(g,c)=>{N2t.init(g,c),dS.init(g,c)});function R5t(g){return zrt(bit,g)}var Sit=$o("ZodCIDRv4",(g,c)=>{R2t.init(g,c),dS.init(g,c)});function M5t(g){return jrt(Sit,g)}var Tit=$o("ZodCIDRv6",(g,c)=>{M2t.init(g,c),dS.init(g,c)});function L5t(g){return Grt(Tit,g)}var xit=$o("ZodBase64",(g,c)=>{O2t.init(g,c),dS.init(g,c)});function O5t(g){return Vrt(xit,g)}var Eit=$o("ZodBase64URL",(g,c)=>{F2t.init(g,c),dS.init(g,c)});function F5t(g){return Urt(Eit,g)}var Cit=$o("ZodE164",(g,c)=>{W2t.init(g,c),dS.init(g,c)});function W5t(g){return Hrt(Cit,g)}var Ait=$o("ZodJWT",(g,c)=>{B2t.init(g,c),dS.init(g,c)});function B5t(g){return Jrt(Ait,g)}var MDe=$o("ZodCustomStringFormat",(g,c)=>{z2t.init(g,c),dS.init(g,c)});function z5t(g,c,f={}){return IDe(MDe,g,c,f)}function j5t(g){return IDe(MDe,"hostname",O3.hostname,g)}function G5t(g){return IDe(MDe,"hex",O3.hex,g)}function V5t(g,c){let f=c?.enc??"hex",T=`${g}_${f}`,b=O3[T];if(!b)throw new Error(`Unrecognized hash format: ${T}`);return IDe(MDe,T,b,c)}var LDe=$o("ZodNumber",(g,c)=>{grt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(T,b,I)=>pwt(g,T,b,I),rGe(g,"ZodNumber",{gt(T,b){return this.check(yH(T,b))},gte(T,b){return this.check(XL(T,b))},min(T,b){return this.check(XL(T,b))},lt(T,b){return this.check(gH(T,b))},lte(T,b){return this.check(F3(T,b))},max(T,b){return this.check(F3(T,b))},int(T){return this.check(cit(T))},safe(T){return this.check(cit(T))},positive(T){return this.check(yH(0,T))},nonnegative(T){return this.check(XL(0,T))},negative(T){return this.check(gH(0,T))},nonpositive(T){return this.check(F3(0,T))},multipleOf(T,b){return this.check(Uoe(T,b))},step(T,b){return this.check(Uoe(T,b))},finite(){return this}});let f=g._zod.bag;g.minValue=Math.max(f.minimum??Number.NEGATIVE_INFINITY,f.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,g.maxValue=Math.min(f.maximum??Number.POSITIVE_INFINITY,f.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,g.isInt=(f.format??"").includes("int")||Number.isSafeInteger(f.multipleOf??.5),g.isFinite=!0,g.format=f.format??null});function fRt(g){return MNt(LDe,g)}var ESe=$o("ZodNumberFormat",(g,c)=>{j2t.init(g,c),LDe.init(g,c)});function cit(g){return ONt(ESe,g)}function U5t(g){return FNt(ESe,g)}function H5t(g){return WNt(ESe,g)}function J5t(g){return BNt(ESe,g)}function K5t(g){return zNt(ESe,g)}var ODe=$o("ZodBoolean",(g,c)=>{Hje.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>_wt(g,f,T,b)});function pRt(g){return jNt(ODe,g)}var FDe=$o("ZodBigInt",(g,c)=>{yrt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(T,b,I)=>mwt(g,T,b,I),g.gte=(T,b)=>g.check(XL(T,b)),g.min=(T,b)=>g.check(XL(T,b)),g.gt=(T,b)=>g.check(yH(T,b)),g.gte=(T,b)=>g.check(XL(T,b)),g.min=(T,b)=>g.check(XL(T,b)),g.lt=(T,b)=>g.check(gH(T,b)),g.lte=(T,b)=>g.check(F3(T,b)),g.max=(T,b)=>g.check(F3(T,b)),g.positive=T=>g.check(yH(BigInt(0),T)),g.negative=T=>g.check(gH(BigInt(0),T)),g.nonpositive=T=>g.check(F3(BigInt(0),T)),g.nonnegative=T=>g.check(XL(BigInt(0),T)),g.multipleOf=(T,b)=>g.check(Uoe(T,b));let f=g._zod.bag;g.minValue=f.minimum??null,g.maxValue=f.maximum??null,g.format=f.format??null});function q5t(g){return VNt(FDe,g)}var Dit=$o("ZodBigIntFormat",(g,c)=>{G2t.init(g,c),FDe.init(g,c)});function $5t(g){return HNt(Dit,g)}function X5t(g){return JNt(Dit,g)}var _Rt=$o("ZodSymbol",(g,c)=>{V2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>hwt(g,f,T,b)});function Y5t(g){return KNt(_Rt,g)}var mRt=$o("ZodUndefined",(g,c)=>{U2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>ywt(g,f,T,b)});function Q5t(g){return qNt(mRt,g)}var hRt=$o("ZodNull",(g,c)=>{H2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>gwt(g,f,T,b)});function gRt(g){return $Nt(hRt,g)}var yRt=$o("ZodAny",(g,c)=>{J2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Swt(g,f,T,b)});function Z5t(){return XNt(yRt)}var vRt=$o("ZodUnknown",(g,c)=>{K2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Twt(g,f,T,b)});function xSe(){return YNt(vRt)}var bRt=$o("ZodNever",(g,c)=>{q2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>bwt(g,f,T,b)});function Iit(g){return QNt(bRt,g)}var SRt=$o("ZodVoid",(g,c)=>{$2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>vwt(g,f,T,b)});function eWt(g){return ZNt(SRt,g)}var oGe=$o("ZodDate",(g,c)=>{X2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(T,b,I)=>xwt(g,T,b,I),g.min=(T,b)=>g.check(XL(T,b)),g.max=(T,b)=>g.check(F3(T,b));let f=g._zod.bag;g.minDate=f.minimum?new Date(f.minimum):null,g.maxDate=f.maximum?new Date(f.maximum):null});function tWt(g){return ewt(oGe,g)}var TRt=$o("ZodArray",(g,c)=>{Y2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Lwt(g,f,T,b),g.element=c.element,rGe(g,"ZodArray",{min(f,T){return this.check(Mte(f,T))},nonempty(f){return this.check(Mte(1,f))},max(f,T){return this.check(SSe(f,T))},length(f,T){return this.check(TSe(f,T))},unwrap(){return this.element}})});function aGe(g,c){return rwt(TRt,g,c)}function nWt(g){let c=g._zod.def.shape;return kit(Object.keys(c))}var sGe=$o("ZodObject",(g,c)=>{Q2t.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Owt(g,f,T,b),il.defineLazy(g,"shape",()=>c.shape),rGe(g,"ZodObject",{keyof(){return kit(Object.keys(this._zod.def.shape))},catchall(f){return this.clone({...this._zod.def,catchall:f})},passthrough(){return this.clone({...this._zod.def,catchall:xSe()})},loose(){return this.clone({...this._zod.def,catchall:xSe()})},strict(){return this.clone({...this._zod.def,catchall:Iit()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(f){return il.extend(this,f)},safeExtend(f){return il.safeExtend(this,f)},merge(f){return il.merge(this,f)},pick(f){return il.pick(this,f)},omit(f){return il.omit(this,f)},partial(...f){return il.partial(wit,this,f[0])},required(...f){return il.required(Rit,this,f[0])}})});function rWt(g,c){let f={type:"object",shape:g??{},...il.normalizeParams(c)};return new sGe(f)}function iWt(g,c){return new sGe({type:"object",shape:g,catchall:Iit(),...il.normalizeParams(c)})}function oWt(g,c){return new sGe({type:"object",shape:g,catchall:xSe(),...il.normalizeParams(c)})}var cGe=$o("ZodUnion",(g,c)=>{Jje.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Zrt(g,f,T,b),g.options=c.options});function Pit(g,c){return new cGe({type:"union",options:g,...il.normalizeParams(c)})}var xRt=$o("ZodXor",(g,c)=>{cGe.init(g,c),Z2t.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Zrt(g,f,T,b),g.options=c.options});function aWt(g,c){return new xRt({type:"union",options:g,inclusive:!1,...il.normalizeParams(c)})}var ERt=$o("ZodDiscriminatedUnion",(g,c)=>{cGe.init(g,c),eNt.init(g,c)});function sWt(g,c,f){return new ERt({type:"union",options:c,discriminator:g,...il.normalizeParams(f)})}var CRt=$o("ZodIntersection",(g,c)=>{tNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Fwt(g,f,T,b)});function ARt(g,c){return new CRt({type:"intersection",left:g,right:c})}var DRt=$o("ZodTuple",(g,c)=>{vrt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Wwt(g,f,T,b),g.rest=f=>g.clone({...g._zod.def,rest:f})});function IRt(g,c,f){let T=c instanceof tm,b=T?f:c,I=T?c:null;return new DRt({type:"tuple",items:g,rest:I,...il.normalizeParams(b)})}var NDe=$o("ZodRecord",(g,c)=>{nNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Bwt(g,f,T,b),g.keyType=c.keyType,g.valueType=c.valueType});function PRt(g,c,f){return!c||!c._zod?new NDe({type:"record",keyType:Zje(),valueType:g,...il.normalizeParams(c)}):new NDe({type:"record",keyType:g,valueType:c,...il.normalizeParams(f)})}function cWt(g,c,f){let T=qL(g);return T._zod.values=void 0,new NDe({type:"record",keyType:T,valueType:c,...il.normalizeParams(f)})}function lWt(g,c,f){return new NDe({type:"record",keyType:g,valueType:c,mode:"loose",...il.normalizeParams(f)})}var kRt=$o("ZodMap",(g,c)=>{rNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Rwt(g,f,T,b),g.keyType=c.keyType,g.valueType=c.valueType,g.min=(...f)=>g.check(vH(...f)),g.nonempty=f=>g.check(vH(1,f)),g.max=(...f)=>g.check(Hoe(...f)),g.size=(...f)=>g.check(bSe(...f))});function uWt(g,c,f){return new kRt({type:"map",keyType:g,valueType:c,...il.normalizeParams(f)})}var NRt=$o("ZodSet",(g,c)=>{iNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Mwt(g,f,T,b),g.min=(...f)=>g.check(vH(...f)),g.nonempty=f=>g.check(vH(1,f)),g.max=(...f)=>g.check(Hoe(...f)),g.size=(...f)=>g.check(bSe(...f))});function dWt(g,c){return new NRt({type:"set",valueType:g,...il.normalizeParams(c)})}var wDe=$o("ZodEnum",(g,c)=>{oNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(T,b,I)=>Ewt(g,T,b,I),g.enum=c.entries,g.options=Object.values(c.entries);let f=new Set(Object.keys(c.entries));g.extract=(T,b)=>{let I={};for(let B of T)if(f.has(B))I[B]=c.entries[B];else throw new Error(`Key ${B} not found in enum`);return new wDe({...c,checks:[],...il.normalizeParams(b),entries:I})},g.exclude=(T,b)=>{let I={...c.entries};for(let B of T)if(f.has(B))delete I[B];else throw new Error(`Key ${B} not found in enum`);return new wDe({...c,checks:[],...il.normalizeParams(b),entries:I})}});function kit(g,c){let f=Array.isArray(g)?Object.fromEntries(g.map(T=>[T,T])):g;return new wDe({type:"enum",entries:f,...il.normalizeParams(c)})}function fWt(g,c){return new wDe({type:"enum",entries:g,...il.normalizeParams(c)})}var wRt=$o("ZodLiteral",(g,c)=>{aNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Cwt(g,f,T,b),g.values=new Set(c.values),Object.defineProperty(g,"value",{get(){if(c.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return c.values[0]}})});function pWt(g,c){return new wRt({type:"literal",values:Array.isArray(g)?g:[g],...il.normalizeParams(c)})}var RRt=$o("ZodFile",(g,c)=>{sNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Iwt(g,f,T,b),g.min=(f,T)=>g.check(vH(f,T)),g.max=(f,T)=>g.check(Hoe(f,T)),g.mime=(f,T)=>g.check(TDe(Array.isArray(f)?f:[f],T))});function _Wt(g){return iwt(RRt,g)}var MRt=$o("ZodTransform",(g,c)=>{cNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>wwt(g,f,T,b),g._zod.parse=(f,T)=>{if(T.direction==="backward")throw new Boe(g.constructor.name);f.addIssue=I=>{if(typeof I=="string")f.issues.push(il.issue(I,f.value,c));else{let B=I;B.fatal&&(B.continue=!1),B.code??(B.code="custom"),B.input??(B.input=f.value),B.inst??(B.inst=g),f.issues.push(il.issue(B))}};let b=c.transform(f.value,f);return b instanceof Promise?b.then(I=>(f.value=I,f.fallback=!0,f)):(f.value=b,f.fallback=!0,f)}});function Nit(g){return new MRt({type:"transform",transform:g})}var wit=$o("ZodOptional",(g,c)=>{brt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>eit(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function tGe(g){return new wit({type:"optional",innerType:g})}var LRt=$o("ZodExactOptional",(g,c)=>{lNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>eit(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function ORt(g){return new LRt({type:"optional",innerType:g})}var FRt=$o("ZodNullable",(g,c)=>{uNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>zwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function nGe(g){return new FRt({type:"nullable",innerType:g})}function mWt(g){return tGe(nGe(g))}var WRt=$o("ZodDefault",(g,c)=>{dNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Gwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType,g.removeDefault=g.unwrap});function BRt(g,c){return new WRt({type:"default",innerType:g,get defaultValue(){return typeof c=="function"?c():il.shallowClone(c)}})}var zRt=$o("ZodPrefault",(g,c)=>{fNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Vwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function jRt(g,c){return new zRt({type:"prefault",innerType:g,get defaultValue(){return typeof c=="function"?c():il.shallowClone(c)}})}var Rit=$o("ZodNonOptional",(g,c)=>{pNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>jwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function GRt(g,c){return new Rit({type:"nonoptional",innerType:g,...il.normalizeParams(c)})}var VRt=$o("ZodSuccess",(g,c)=>{_Nt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Pwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function hWt(g){return new VRt({type:"success",innerType:g})}var URt=$o("ZodCatch",(g,c)=>{mNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Uwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType,g.removeCatch=g.unwrap});function HRt(g,c){return new URt({type:"catch",innerType:g,catchValue:typeof c=="function"?c:()=>c})}var JRt=$o("ZodNaN",(g,c)=>{hNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Awt(g,f,T,b)});function gWt(g){return nwt(JRt,g)}var lGe=$o("ZodPipe",(g,c)=>{Srt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Hwt(g,f,T,b),g.in=c.in,g.out=c.out});function lit(g,c){return new lGe({type:"pipe",in:g,out:c})}var uGe=$o("ZodCodec",(g,c)=>{lGe.init(g,c),Kje.init(g,c)});function yWt(g,c,f){return new uGe({type:"pipe",in:g,out:c,transform:f.decode,reverseTransform:f.encode})}function vWt(g){let c=g._zod.def;return new uGe({type:"pipe",in:c.out,out:c.in,transform:c.reverseTransform,reverseTransform:c.transform})}var KRt=$o("ZodPreprocess",(g,c)=>{lGe.init(g,c),gNt.init(g,c)}),qRt=$o("ZodReadonly",(g,c)=>{yNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Jwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function $Rt(g){return new qRt({type:"readonly",innerType:g})}var XRt=$o("ZodTemplateLiteral",(g,c)=>{vNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Dwt(g,f,T,b)});function bWt(g,c){return new XRt({type:"template_literal",parts:g,...il.normalizeParams(c)})}var YRt=$o("ZodLazy",(g,c)=>{TNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>qwt(g,f,T,b),g.unwrap=()=>g._zod.def.getter()});function QRt(g){return new YRt({type:"lazy",getter:g})}var ZRt=$o("ZodPromise",(g,c)=>{SNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Kwt(g,f,T,b),g.unwrap=()=>g._zod.def.innerType});function SWt(g){return new ZRt({type:"promise",innerType:g})}var eMt=$o("ZodFunction",(g,c)=>{bNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>Nwt(g,f,T,b)});function TWt(g){return new eMt({type:"function",input:Array.isArray(g?.input)?IRt(g?.input):g?.input??aGe(xSe()),output:g?.output??xSe()})}var dGe=$o("ZodCustom",(g,c)=>{xNt.init(g,c),rh.init(g,c),g._zod.processJSONSchema=(f,T,b)=>kwt(g,f,T,b)});function xWt(g){let c=new lT({check:"custom"});return c._zod.check=g,c}function EWt(g,c){return owt(dGe,g??(()=>!0),c)}function tMt(g,c={}){return awt(dGe,g,c)}function nMt(g,c){return swt(g,c)}var CWt=cwt,AWt=lwt;function DWt(g,c={}){let f=new dGe({type:"custom",check:"custom",fn:T=>T instanceof g,abort:!0,...il.normalizeParams(c)});return f._zod.bag.Class=g,f._zod.check=T=>{T.value instanceof g||T.issues.push({code:"invalid_type",expected:g.name,input:T.value,inst:f,path:[...f._zod.def.path??[]]})},f}var IWt=(...g)=>uwt({Codec:uGe,Boolean:ODe,String:RDe},...g);function PWt(g){let c=QRt(()=>Pit([Zje(g),fRt(),pRt(),gRt(),aGe(c),PRt(Zje(),c)]));return c}function kWt(g,c){return new KRt({type:"pipe",in:Nit(g),out:c})}var C$t={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"};function A$t(g){PC({customError:g})}function D$t(){return PC().customError}var rMt;rMt||(rMt={});var Gu={...Qje,...rit,iso:kDe},I$t=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"]);function P$t(g,c){let f=g.$schema;return f==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":f==="http://json-schema.org/draft-07/schema#"?"draft-7":f==="http://json-schema.org/draft-04/schema#"?"draft-4":c??"draft-2020-12"}function k$t(g,c){if(!g.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let f=g.slice(1).split("/").filter(Boolean);if(f.length===0)return c.rootSchema;let T=c.version==="draft-2020-12"?"$defs":"definitions";if(f[0]===T){let b=f[1];if(!b||!c.defs[b])throw new Error(`Reference not found: ${g}`);return c.defs[b]}throw new Error(`Reference not found: ${g}`)}function NWt(g,c){if(g.not!==void 0){if(typeof g.not=="object"&&Object.keys(g.not).length===0)return Gu.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(g.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(g.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(g.if!==void 0||g.then!==void 0||g.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(g.dependentSchemas!==void 0||g.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(g.$ref){let b=g.$ref;if(c.refs.has(b))return c.refs.get(b);if(c.processing.has(b))return Gu.lazy(()=>{if(!c.refs.has(b))throw new Error(`Circular reference not resolved: ${b}`);return c.refs.get(b)});c.processing.add(b);let I=k$t(b,c),B=Vw(I,c);return c.refs.set(b,B),c.processing.delete(b),B}if(g.enum!==void 0){let b=g.enum;if(c.version==="openapi-3.0"&&g.nullable===!0&&b.length===1&&b[0]===null)return Gu.null();if(b.length===0)return Gu.never();if(b.length===1)return Gu.literal(b[0]);if(b.every(B=>typeof B=="string"))return Gu.enum(b);let I=b.map(B=>Gu.literal(B));return I.length<2?I[0]:Gu.union([I[0],I[1],...I.slice(2)])}if(g.const!==void 0)return Gu.literal(g.const);let f=g.type;if(Array.isArray(f)){let b=f.map(I=>{let B={...g,type:I};return NWt(B,c)});return b.length===0?Gu.never():b.length===1?b[0]:Gu.union(b)}if(!f)return Gu.any();let T;switch(f){case"string":{let b=Gu.string();if(g.format){let I=g.format;I==="email"?b=b.check(Gu.email()):I==="uri"||I==="uri-reference"?b=b.check(Gu.url()):I==="uuid"||I==="guid"?b=b.check(Gu.uuid()):I==="date-time"?b=b.check(Gu.iso.datetime()):I==="date"?b=b.check(Gu.iso.date()):I==="time"?b=b.check(Gu.iso.time()):I==="duration"?b=b.check(Gu.iso.duration()):I==="ipv4"?b=b.check(Gu.ipv4()):I==="ipv6"?b=b.check(Gu.ipv6()):I==="mac"?b=b.check(Gu.mac()):I==="cidr"?b=b.check(Gu.cidrv4()):I==="cidr-v6"?b=b.check(Gu.cidrv6()):I==="base64"?b=b.check(Gu.base64()):I==="base64url"?b=b.check(Gu.base64url()):I==="e164"?b=b.check(Gu.e164()):I==="jwt"?b=b.check(Gu.jwt()):I==="emoji"?b=b.check(Gu.emoji()):I==="nanoid"?b=b.check(Gu.nanoid()):I==="cuid"?b=b.check(Gu.cuid()):I==="cuid2"?b=b.check(Gu.cuid2()):I==="ulid"?b=b.check(Gu.ulid()):I==="xid"?b=b.check(Gu.xid()):I==="ksuid"&&(b=b.check(Gu.ksuid()))}typeof g.minLength=="number"&&(b=b.min(g.minLength)),typeof g.maxLength=="number"&&(b=b.max(g.maxLength)),g.pattern&&(b=b.regex(new RegExp(g.pattern))),T=b;break}case"number":case"integer":{let b=f==="integer"?Gu.number().int():Gu.number();typeof g.minimum=="number"&&(b=b.min(g.minimum)),typeof g.maximum=="number"&&(b=b.max(g.maximum)),typeof g.exclusiveMinimum=="number"?b=b.gt(g.exclusiveMinimum):g.exclusiveMinimum===!0&&typeof g.minimum=="number"&&(b=b.gt(g.minimum)),typeof g.exclusiveMaximum=="number"?b=b.lt(g.exclusiveMaximum):g.exclusiveMaximum===!0&&typeof g.maximum=="number"&&(b=b.lt(g.maximum)),typeof g.multipleOf=="number"&&(b=b.multipleOf(g.multipleOf)),T=b;break}case"boolean":{T=Gu.boolean();break}case"null":{T=Gu.null();break}case"object":{let b={},I=g.properties||{},B=new Set(g.required||[]);for(let[Me,Xe]of Object.entries(I)){let ct=Vw(Xe,c);b[Me]=B.has(Me)?ct:ct.optional()}if(g.propertyNames){let Me=Vw(g.propertyNames,c),Xe=g.additionalProperties&&typeof g.additionalProperties=="object"?Vw(g.additionalProperties,c):Gu.any();if(Object.keys(b).length===0){T=Gu.record(Me,Xe);break}let ct=Gu.object(b).passthrough(),Rt=Gu.looseRecord(Me,Xe);T=Gu.intersection(ct,Rt);break}if(g.patternProperties){let Me=g.patternProperties,Xe=Object.keys(Me),ct=[];for(let Te of Xe){let Gn=Vw(Me[Te],c),Et=Gu.string().regex(new RegExp(Te));ct.push(Gu.looseRecord(Et,Gn))}let Rt=[];if(Object.keys(b).length>0&&Rt.push(Gu.object(b).passthrough()),Rt.push(...ct),Rt.length===0)T=Gu.object({}).passthrough();else if(Rt.length===1)T=Rt[0];else{let Te=Gu.intersection(Rt[0],Rt[1]);for(let Gn=2;Gn<Rt.length;Gn++)Te=Gu.intersection(Te,Rt[Gn]);T=Te}break}let ne=Gu.object(b);g.additionalProperties===!1?T=ne.strict():typeof g.additionalProperties=="object"?T=ne.catchall(Vw(g.additionalProperties,c)):T=ne.passthrough();break}case"array":{let b=g.prefixItems,I=g.items;if(b&&Array.isArray(b)){let B=b.map(Me=>Vw(Me,c)),ne=I&&typeof I=="object"&&!Array.isArray(I)?Vw(I,c):void 0;ne?T=Gu.tuple(B).rest(ne):T=Gu.tuple(B),typeof g.minItems=="number"&&(T=T.check(Gu.minLength(g.minItems))),typeof g.maxItems=="number"&&(T=T.check(Gu.maxLength(g.maxItems)))}else if(Array.isArray(I)){let B=I.map(Me=>Vw(Me,c)),ne=g.additionalItems&&typeof g.additionalItems=="object"?Vw(g.additionalItems,c):void 0;ne?T=Gu.tuple(B).rest(ne):T=Gu.tuple(B),typeof g.minItems=="number"&&(T=T.check(Gu.minLength(g.minItems))),typeof g.maxItems=="number"&&(T=T.check(Gu.maxLength(g.maxItems)))}else if(I!==void 0){let B=Vw(I,c),ne=Gu.array(B);typeof g.minItems=="number"&&(ne=ne.min(g.minItems)),typeof g.maxItems=="number"&&(ne=ne.max(g.maxItems)),T=ne}else T=Gu.array(Gu.any());break}default:throw new Error(`Unsupported type: ${f}`)}return T}function Vw(g,c){if(typeof g=="boolean")return g?Gu.any():Gu.never();let f=NWt(g,c),T=g.type||g.enum!==void 0||g.const!==void 0;if(g.anyOf&&Array.isArray(g.anyOf)){let ne=g.anyOf.map(Xe=>Vw(Xe,c)),Me=Gu.union(ne);f=T?Gu.intersection(f,Me):Me}if(g.oneOf&&Array.isArray(g.oneOf)){let ne=g.oneOf.map(Xe=>Vw(Xe,c)),Me=Gu.xor(ne);f=T?Gu.intersection(f,Me):Me}if(g.allOf&&Array.isArray(g.allOf))if(g.allOf.length===0)f=T?f:Gu.any();else{let ne=T?f:Vw(g.allOf[0],c),Me=T?0:1;for(let Xe=Me;Xe<g.allOf.length;Xe++)ne=Gu.intersection(ne,Vw(g.allOf[Xe],c));f=ne}g.nullable===!0&&c.version==="openapi-3.0"&&(f=Gu.nullable(f)),g.readOnly===!0&&(f=Gu.readonly(f)),g.default!==void 0&&(f=f.default(g.default));let b={},I=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let ne of I)ne in g&&(b[ne]=g[ne]);let B=["contentEncoding","contentMediaType","contentSchema"];for(let ne of B)ne in g&&(b[ne]=g[ne]);for(let ne of Object.keys(g))I$t.has(ne)||(b[ne]=g[ne]);return Object.keys(b).length>0&&c.registry.add(f,b),g.description&&(f=f.describe(g.description)),f}function wWt(g,c){if(typeof g=="boolean")return g?Gu.any():Gu.never();let f;try{f=JSON.parse(JSON.stringify(g))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let T=P$t(f,c?.defaultTarget),b=f.$defs||f.definitions||{},I={version:T,defs:b,refs:new Map,processing:new Set,rootSchema:f,registry:c?.registry??zN};return Vw(f,I)}var iMt={};EG(iMt,{bigint:()=>M$t,boolean:()=>R$t,date:()=>L$t,number:()=>w$t,string:()=>N$t});function N$t(g){return DNt(RDe,g)}function w$t(g){return LNt(LDe,g)}function R$t(g){return GNt(ODe,g)}function M$t(g){return UNt(FDe,g)}function L$t(g){return twt(oGe,g)}PC(Trt());wE();var BD=jc.enum(["json","toon"]).default("json").describe("Output format: 'json' (default) or 'toon' (Token-Oriented Object Notation for reduced token usage)"),$oe={FILE_PATH:1024,SYMBOL_NAME:500,FILE_CONTENT:1024*1024,GENERIC_STRING:10*1024},FE=jc.string().max($oe.FILE_PATH,`File path exceeds maximum length of ${$oe.FILE_PATH} bytes`).refine(g=>!g.includes("\0"),"File path contains null bytes"),WDe=jc.string().max($oe.SYMBOL_NAME,`Symbol name exceeds maximum length of ${$oe.SYMBOL_NAME} bytes`).refine(g=>!g.includes("\0"),"Symbol name contains null bytes"),RWt=jc.string().max($oe.FILE_CONTENT,`File content exceeds maximum size of ${$oe.FILE_CONTENT} bytes (~1 MB)`).refine(g=>!g.includes("\0"),"File content contains null bytes"),aMt=jc.string().max($oe.GENERIC_STRING,`String exceeds maximum length of ${$oe.GENERIC_STRING} bytes`).refine(g=>!g.includes("\0"),"String contains null bytes"),Mit={MAX_LIMIT:1e4,MAX_OFFSET:1e5,DEFAULT_LIMIT:1e3},O$t=jc.object({hubScore:jc.number().min(0,"hubScore must be >= 0").max(1,"hubScore must be <= 1"),loc:jc.number().int().positive().optional(),fileExtension:jc.string().optional(),communityId:jc.number().int().min(0).optional()}),F$t=jc.object({source:jc.string(),target:jc.string(),relationType:jc.enum(["dependency","call","reference"]).optional()}),Yan=jc.object({nodes:jc.array(jc.string()),edges:jc.array(F$t),nodeLabels:jc.record(jc.string(),jc.string()).optional(),parentCounts:jc.record(jc.string(),jc.number()).optional(),unusedEdges:jc.array(jc.string()).optional(),nodeMetadata:jc.record(jc.string(),O$t).optional()}),W$t=jc.object({workspacePath:FE.describe("Absolute path to the project/workspace directory to analyze"),tsConfigPath:FE.optional().describe("Optional path to tsconfig.json for path alias resolution"),excludeNodeModules:jc.boolean().optional().describe("Whether to exclude node_modules (default: true)"),maxDepth:jc.number().min(1).max(100).optional().describe("Maximum crawl depth (default: 50, min: 1, max: 100)"),format:BD.optional()}),B$t=jc.object({filePath:FE.describe("Absolute path to the file to analyze"),format:BD.optional()}),z$t=jc.object({entryFile:FE.describe("Absolute path to the entry file"),maxDepth:jc.number().min(1).max(100).optional().describe("Maximum depth to crawl (default: from config, min: 1, max: 100)"),limit:jc.number().min(1).max(Mit.MAX_LIMIT).optional().describe(`Maximum number of nodes to return (for pagination, max: ${Mit.MAX_LIMIT})`),offset:jc.number().min(0).max(Mit.MAX_OFFSET).optional().describe(`Number of nodes to skip (for pagination, max: ${Mit.MAX_OFFSET})`),onlyUsed:jc.boolean().optional().describe("If true, only returns edges where symbols are actually used (requires AST analysis, slower)"),format:BD.optional()}),j$t=jc.object({targetPath:FE.describe("Absolute path to the file to find references for"),format:BD.optional()}),G$t=jc.object({filePath:FE.describe("Absolute path to the node to expand"),knownPaths:jc.array(FE).max(5e4).describe("Array of already known file paths to exclude (max: 50000)"),extraDepth:jc.number().min(1).max(100).optional().describe("Additional depth to scan from this node (default: 10, min: 1, max: 100)"),format:BD.optional()}),V$t=jc.object({filePath:FE.describe("Absolute path to the file to parse"),format:BD.optional()}),U$t=jc.object({sourceFile:FE.describe("Absolute path to the source file (the one importing using symbols)"),targetFile:FE.describe("Absolute path to the target file (the one providing symbols)"),format:BD.optional()}),H$t=jc.object({fromFile:FE.describe("Absolute path of the file containing the import"),moduleSpecifier:aMt.describe('The module specifier to resolve (e.g., "./utils", "@/components/Button")'),format:BD.optional()}),J$t=jc.object({}),K$t=jc.object({filePaths:jc.array(FE).max(1e4).describe("Array of absolute file paths to invalidate from the cache (max: 10000). Use this after modifying files to ensure fresh analysis.")}),q$t=jc.object({}),$$t=jc.object({filePath:FE.describe("Absolute path to the file to analyze for symbols"),format:BD.optional()}),X$t=jc.object({filePath:FE.describe("Absolute path to the file to check for unused exported symbols"),format:BD.optional()}),Y$t=jc.object({filePath:FE.describe("Absolute path to the file containing the symbol"),symbolName:WDe.describe("Name of the symbol to find dependents for"),format:BD.optional()}),Q$t=jc.object({filePath:FE.describe("Absolute path to the file containing the root symbol"),symbolName:WDe.describe("Name of the root symbol to trace from"),maxDepth:jc.number().min(1).max(100).optional().describe("Maximum depth to trace the call chain (default: 10, min: 1, max: 100)"),format:BD.optional()}),Z$t=jc.object({filePath:FE.describe("The absolute path to the file containing the target symbol."),symbolName:WDe.describe("The name of the symbol (function, class, method, variable) to find callers for."),includeTypeOnly:jc.boolean().optional().describe("Include type-only usages (interfaces, type aliases). Default is true."),format:BD.optional()}),eXt=jc.object({filePath:FE.describe("Absolute path to the file to analyze"),symbolName:WDe.optional().describe("Optional: Only analyze changes to this specific symbol"),oldContent:RWt.describe("The old version of the file content"),newContent:RWt.optional().describe("The new version of the file content (if not provided, reads current file)"),format:BD.optional()}),tXt=jc.object({baseRef:aMt.describe("Git base ref to compare against, for example origin/main"),headRef:aMt.optional().describe("Optional Git head ref; defaults to the checked-out worktree"),maxFiles:jc.number().int().min(1).max(1e3).optional(),maxDepth:jc.number().int().min(1).max(10).optional(),format:BD.optional()}),nXt=jc.object({filePath:FE.describe("Absolute path to the file being modified"),symbolName:WDe.describe("Name of the symbol being modified"),includeTransitive:jc.boolean().optional().describe("Include transitive dependents (default: false)"),maxDepth:jc.number().min(1).max(20).optional().describe("Maximum depth for transitive analysis (default: 3, min: 1, max: 20)"),format:BD.optional()}),rXt=jc.object({filePath:FE.describe("Absolute path to the file to analyze"),includeExternal:jc.boolean().optional().describe("Include calls to external modules (default: false)"),format:BD.optional()}),iXt=jc.object({filePath:FE.describe("Absolute path to the file to generate a codemap for"),format:BD.optional()}),oXt=jc.object({filePath:FE.describe("Absolute path to the file containing the target symbol."),symbolName:WDe.describe("Name of the symbol to query (function, class, method)."),direction:jc.enum(["callers","callees","both"]).optional().describe("Direction of traversal: 'callers', 'callees', or 'both' (default: 'both')"),depth:jc.number().min(1).max(10).optional().describe("Maximum BFS traversal depth (default: 2, min: 1, max: 10)"),relationTypes:jc.array(jc.enum(["CALLS","INHERITS","IMPLEMENTS","USES"])).optional().describe("Filter by relation types (default: all)"),format:BD.optional()}),aXt=jc.object({question:jc.string().max(1024).describe("Natural language question about the codebase"),depth:jc.number().int().min(1).max(5).default(2).optional().describe("BFS traversal depth from seed nodes (default: 2, min: 1, max: 5)"),tokenBudget:jc.number().int().min(500).max(16e3).default(4e3).optional().describe("Maximum token budget for the output subgraph (default: 4000)"),fileFilter:jc.string().max(256).optional().describe("Glob pattern to restrict search scope"),outputFormat:jc.enum(["toon","json"]).default("toon").optional().describe("Output format: 'toon' (default) or 'json'")}),sXt=jc.object({workspaceRoot:jc.string().optional().describe("Absolute path to workspace root. Defaults to configured workspace."),outputDir:jc.string().optional().describe("Output directory for wiki files (default: wiki)"),topHubsLimit:jc.number().int().min(1).max(50).optional().describe("Number of top hub files to list (max: 50, default: 10)"),scope:jc.string().optional().describe("Relative path within workspace to restrict wiki to (e.g. 'src/')"),exclude:jc.array(jc.string()).optional().describe("Relative glob-like patterns to exclude")}),cXt=jc.object({scopePath:FE.optional().describe("Absolute path to a directory to scope the scan (default: workspace root). Must be inside the workspace."),maxFiles:jc.number().int().min(1).max(1e4).default(500).optional().describe("Maximum number of files to analyse (default: 500). Prevents OOM on very large monorepos."),format:BD.optional()}),lXt={set_workspace:W$t,analyze_dependencies:B$t,crawl_dependency_graph:z$t,find_referencing_files:j$t,expand_node:G$t,parse_imports:V$t,verify_dependency_usage:U$t,resolve_module_path:H$t,get_index_status:J$t,invalidate_files:K$t,rebuild_index:q$t,get_symbol_graph:$$t,find_unused_symbols:X$t,get_symbol_dependents:Y$t,trace_function_execution:Q$t,get_symbol_callers:Z$t,analyze_breaking_changes:eXt,review_pr:tXt,get_impact_analysis:nXt,analyze_file_logic:rXt,generate_codemap:iXt,query_call_graph:oXt,scan_dead_code:cXt,query_natural_language:aXt,generate_wiki:sXt};function MWt(g,c){let f=lXt[g];if(!f)return{success:!1,error:`No schema defined for tool: ${g}`,issues:[]};let T=f.safeParse(c);if(T.success)return{success:!0,data:T.data};let b=T.error.issues;return{success:!1,error:`Invalid parameters: ${b.map(B=>`${B.path.length>0?`${B.path.join(".")}: `:""}${B.message}`).join("; ")}`,issues:b}}var sMt=AAt;function oMt(g,c){let f=sMt(Lit.resolve(c,g)),T=sMt(Lit.resolve(c));return f===T||f.startsWith(T+"/")}function LWt(g,c){let f=sMt(g);if(f.includes("..")&&!oMt(g,c))throw new Error(`Path traversal detected: ${g} resolves outside workspace`);let T=f.startsWith("/"),b=/^[a-z]:/i.test(f);if(T||b){if(!oMt(g,c))throw new Error(`File path is outside workspace: ${g}`)}else{let I=Lit.resolve(c,g);if(!oMt(I,c))throw new Error(`File path is outside workspace: ${g}`)}return!0}function OWt(g,c){let f=uXt(g.path,c),T=g.path.split(".").pop()??"";return{path:g.path,relativePath:f,type:g.type,line:g.line,module:g.module,extension:T}}var uXt=oLt;async function cMt(g){let{filePath:c}=g,f=Ns.getSpider(),T=Ns.getConfig();await IC(c);let b=await f.analyze(c);return{filePath:c,dependencyCount:b.length,dependencies:b.map(I=>OWt(I,T.rootDir))}}async function lMt(g){let{filePath:c}=g,f=Ns.getParser();await IC(c);let T=await FWt.readFile(c,"utf-8"),b=f.parse(T,c);return{filePath:c,importCount:b.length,imports:b.map(I=>({module:I.module,type:I.type,line:I.line}))}}async function uMt(g){let{sourceFile:c,targetFile:f}=g,T=Ns.getSpider();await IC(c),await IC(f);let b=await T.verifyDependencyUsage(c,f);return{sourceFile:c,targetFile:f,isUsed:b,usedSymbolCount:b?void 0:0}}Uit();var $Wt=Mf(require("node:path"));wE();var zDe=class{buildIntraFileGraph(c,f,T=!1){let b=jo(c),I=this.convertLspSymbolsToNodes(b,f.symbols),B=this.buildCallEdges(b,f.outgoingCalls,I),ne=T&&f.incomingCalls?this.buildIncomingCallEdges(b,f.incomingCalls,I):void 0,{hasCycle:Me,cycleNodes:Xe,cycleType:ct}=this.detectCycles(I,B);return{filePath:b,nodes:I,edges:B,incomingEdges:ne,hasCycle:Me,cycleNodes:Me?Xe:void 0,cycleType:Me?ct:void 0}}convertLspSymbolsToNodes(c,f){return f.map(T=>{let b=this.generateSymbolId(c,T.name,T.containerName),I=this.mapKindToType(T.kind),B=this.generateContextualName(T);return{id:b,name:B||T.name,originalName:B?T.name:void 0,kind:T.kind,type:I,range:T.range,isExported:this.isSymbolExported(T),isExternal:!1,parentSymbolId:T.containerName?this.generateSymbolId(c,T.containerName):void 0}})}buildCallEdges(c,f,T){let b=[],I=jo(c),B=new Set(T.map(ne=>ne.id));for(let[ne,Me]of f.entries())for(let Xe of Me){if(jo(Xe.to.uri)!==I)continue;let Rt=this.generateSymbolId(c,Xe.to.name);if(B.has(ne)&&B.has(Rt)){let Te=Xe.fromRanges[0]?.start??0;b.push({source:ne,target:Rt,relation:"calls",direction:"outgoing",line:Te})}}return b}buildIncomingCallEdges(c,f,T){let b=[],I=jo(c),B=new Set(T.map(ne=>ne.id));for(let[ne,Me]of f.entries())for(let Xe of Me){if(jo(Xe.from.uri)!==I)continue;let Rt=this.generateSymbolId(c,Xe.from.name);if(B.has(Rt)&&B.has(ne)){let Te=Xe.fromRanges[0]?.start??0;b.push({source:Rt,target:ne,relation:"calls",direction:"incoming",line:Te})}}return b}detectCycles(c,f){let T=new Map,b=new Set,I=new Set,B=new Set;for(let Xe of f)T.has(Xe.source)||T.set(Xe.source,[]),T.get(Xe.source)?.push(Xe.target);let ne=Xe=>{b.add(Xe),I.add(Xe);let ct=T.get(Xe)||[];for(let Rt of ct)if(b.has(Rt)){if(I.has(Rt)){for(let Te of I)B.add(Te);return B.add(Rt),!0}}else if(ne(Rt))return!0;return I.delete(Xe),!1},Me=!1;for(let Xe of c)b.has(Xe.id)||ne(Xe.id)&&(Me=!0);if(Me){let Xe=this.analyzeCyclePattern(Array.from(B),f);return{hasCycle:Me,cycleNodes:Array.from(B),cycleType:Xe}}return{hasCycle:Me,cycleNodes:[]}}analyzeCyclePattern(c,f){return f.filter(b=>b.source===b.target).length>0&&c.length===1?"self-recursive":c.length===2?"mutual-recursive":"complex"}generateSymbolId(c,f,T){let b=jo(c);return T?`${b}:${T}.${f}`:`${b}:${f}`}mapKindToType(c){return c===12||c===6||c===9?"function":c===5||c===11||c===10||c===2?"class":"variable"}isSymbolExported(c){return!c.containerName}getArrayMethodCallbackName(c){if(c.includes("map"))return"map callback";if(c.includes("filter"))return"filter predicate";if(c.includes("reduce"))return"reduce callback";if(c.includes("foreach"))return"forEach callback";if(c.includes("find"))return"find predicate";if(c.includes("some")||c.includes("every"))return"predicate callback";if(c.includes("sort"))return"sort comparator"}getEventHandlerName(c){if(c.includes("onclick"))return"onClick handler";if(c.includes("onsubmit"))return"onSubmit handler";if(c.includes("onchange"))return"onChange handler";if(c.includes("onload"))return"onLoad handler";if(/on[a-z]+/.exec(c))return`${c} handler`}getPromiseCallbackName(c){if(c.includes("then"))return"then callback";if(c.includes("catch"))return"catch handler";if(c.includes("finally"))return"finally callback"}getTimerCallbackName(c){if(c.includes("settimeout"))return"setTimeout callback";if(c.includes("setinterval"))return"setInterval callback";if(c.includes("requestanimationframe"))return"animation frame callback"}getGenericCallbackName(c){if(c.includes("callback"))return"callback function";if(c.includes("handler"))return"handler function"}generateContextualName(c){let f=c.name.toLowerCase(),T=c.containerName?.toLowerCase()||"";if(!(!f.includes("anonymous")&&!f.includes("arrow")&&!f.includes("<function>")))return this.getArrayMethodCallbackName(T)||this.getEventHandlerName(T)||this.getPromiseCallbackName(T)||this.getTimerCallbackName(T)||this.getGenericCallbackName(T)}};BN();async function yMt(g){let{filePath:c}=g,f=Ns.getSpider(),T=Ns.getConfig(),b=Date.now();await IC(c);let I=$Wt.extname(c).toLowerCase(),B=Xnt(I),ne=cT(c,T.rootDir),ct=(await(await import("node:fs/promises")).readFile(c,"utf-8")).split(`
42788
42788
  `).length,{symbols:Rt,dependencies:Te}=await f.getSymbolGraph(c),Gn=Rt.filter(mr=>mr.isExported).map(qWt),Et=Rt.filter(mr=>!mr.isExported).map(qWt),go=(await f.analyze(c)).map(mr=>({module:mr.module,resolvedPath:mr.path,relativePath:mr.path?cT(mr.path,T.rootDir):null,type:mr.type,line:mr.line})),uo=[];try{uo=(await f.findReferencingFiles(c)).map($n=>({path:$n.path,relativePath:cT($n.path,T.rootDir),type:$n.type,line:$n.line}))}catch{}let xa=[],bc=!1,ol=[];try{let mr=wje({symbols:Rt,dependencies:Te},c),Co=new zDe().buildIntraFileGraph(c,mr);xa=Co.edges.map(zi=>({caller:gMt(zi.source),callee:gMt(zi.target),line:zi.line})),bc=Co.hasCycle,ol=(Co.cycleNodes??[]).map(gMt)}catch{}let tc=Date.now()-b;return{filePath:c,relativePath:ne,language:B,lineCount:ct,exports:Gn,internals:Et,dependencies:go,dependents:uo,callFlow:xa,hasCycle:bc,cycleSymbols:ol,analysisTimeMs:tc}}function qWt(g){return{name:g.name,kind:g.kind,line:g.line,category:g.category}}function gMt(g){let c=g.lastIndexOf(":");return c>=0?g.slice(c+1):g}BN();function NXt(g){return g.includes("Function")?"function":g.includes("Class")?"class":g.includes("Variable")||g.includes("Const")||g.includes("Let")?"variable":g.includes("Interface")?"interface":g.includes("Type")?"type":"other"}async function vMt(g){let c=Ns.getSpider(),f=Ns.getConfig(),{scopePath:T,maxFiles:b}=g,I=T??f.rootDir;M3t(I,f.rootDir);let B=Date.now(),ne=await c.scanDeadCode(I,{maxFiles:b}),Me=Date.now()-B,Xe=ne.entries.map(ct=>{let Rt=ct.unusedSymbols.map(Te=>({...Te,category:NXt(Te.kind)}));return{filePath:ct.filePath,relativePath:cT(ct.filePath,f.rootDir),unusedCount:Rt.length,unusedSymbols:Rt}});return{rootDir:f.rootDir,scopePath:I,scannedFiles:ne.scannedFiles,filesWithDeadCode:Xe.length,totalUnusedSymbols:Xe.reduce((ct,Rt)=>ct+Rt.unusedCount,0),entries:Xe,skippedFiles:ne.skippedFiles,analysisTimeMs:Me}}VA();BN();var Hit=Fh("McpWorker");async function bMt(g){let{filePath:c,symbolName:f,maxDepth:T}=g,b=Ns.getSpider(),I=Ns.getConfig();await IC(c);let B=await b.traceFunctionExecution(c,f,T??10),ne=B.callChain.map(Xe=>({depth:Xe.depth,callerSymbolId:Xe.callerSymbolId,calledSymbolId:Xe.calledSymbolId,calledFilePath:Xe.calledFilePath,resolvedFilePath:Xe.resolvedFilePath,resolvedRelativePath:Xe.resolvedFilePath?cT(Xe.resolvedFilePath,I.rootDir):null})),Me=cT(c,I.rootDir);return{rootSymbol:{id:B.rootSymbol.id,filePath:B.rootSymbol.filePath,relativePath:Me,symbolName:B.rootSymbol.symbolName},maxDepth:T??10,callCount:B.callChain.length,uniqueSymbolCount:B.visitedSymbols.length,maxDepthReached:B.maxDepthReached,callChain:ne,visitedSymbols:B.visitedSymbols}}async function SMt(g){let{filePath:c,symbolName:f,includeTypeOnly:T=!0}=g,b=Ns.getConfig(),I=`${c}:${f}`;Ns.symbolReverseIndex||(Ns.symbolReverseIndex=new HAe(b.rootDir),await wXt());let B=T?Ns.symbolReverseIndex.getCallers(I):Ns.symbolReverseIndex.getRuntimeCallers(I),ne=B.map(ct=>({callerSymbolId:ct.callerSymbolId,callerFilePath:ct.callerFilePath,callerRelativePath:cT(ct.callerFilePath,b.rootDir),isTypeOnly:ct.isTypeOnly})),Me=B.filter(ct=>!ct.isTypeOnly),Xe=B.filter(ct=>ct.isTypeOnly);return{symbolId:I,callerCount:B.length,runtimeCallerCount:Me.length,typeOnlyCallerCount:Xe.length,callers:ne,callerFiles:Ns.symbolReverseIndex.getCallerFiles(I)}}async function wXt(){let g=Ns.spider;if(!g||!Ns.symbolReverseIndex||g.getIndexStatus().state!=="complete")return;if(!g.hasReverseIndex()){Hit.warn("File-level reverse index not enabled. Symbol reverse index will be built incrementally.");return}let T=g.getCacheStats().reverseIndexStats;if(!T||T.indexedFiles===0){Hit.warn("No files in reverse index yet. Symbol reverse index will be built incrementally.");return}Hit.info(`Building symbol reverse index from ${T.indexedFiles} indexed files...`),Hit.info("Symbol reverse index ready (lazy loading mode)")}VA();wE();var QWt=Mf(require("node:path"));wE();var XWt=Mf(require("node:path"));wE();var RXt=new Set(["src","tests","test","lib","app","packages","dist","out"]);function MXt(g){if(!g.length)return 0;let c=g.map(I=>I.split("/").slice(0,-1)),f=Math.min(...c.map(I=>I.length)),T=Math.max(0,f-1),b=0;for(;b<T&&c.every(I=>I[b]===c[0][b]);)b++;return b}function LXt(g,c){let f=c;for(let T=c;T<g.length;T++)RXt.has(g[T])&&(f=T+1);return g[f]}function YWt(g,c){if(g.length===0)return new Map;let f=g.map(jo),T=c?jo(c):(()=>{let Xe=f.map(Te=>Te.split("/")),ct=Math.min(...Xe.map(Te=>Te.length)),Rt=[];for(let Te=0;Te<ct&&Xe.every(Gn=>Gn[Te]===Xe[0][Te]);Te++)Rt.push(Xe[0][Te]);return Rt.join("/")})(),b=f.map(Xe=>T?XWt.relative(T,Xe).replaceAll("\\","/"):Xe),I=MXt(b),B=new Map,ne=new Map,Me=1;for(let Xe=0;Xe<f.length;Xe++){let ct=f[Xe],Rt=b[Xe].split("/").slice(0,-1),Te=LXt(Rt,I);if(!Te){ne.set(ct,0);continue}B.has(Te)||B.set(Te,Me++),ne.set(ct,B.get(Te))}return ne}function ZWt(g,c){let f=g.nodes;if(f.length===0)return;let T=g.parentCounts??{},b=Math.max(...f.map(B=>T[jo(B)]??0),1),I={};for(let B of f){let ne=jo(B),Me=T[ne]??0,Xe=Math.round(Me/b*1e3)/1e3,ct=QWt.extname(B).slice(1).toLowerCase(),Rt={hubScore:Xe};ct&&(Rt.fileExtension=ct),I[ne]=Rt}g.nodeMetadata=I;try{let B=YWt(g.nodes,c);for(let[ne,Me]of B){let Xe=g.nodeMetadata?.[jo(ne)];Xe&&(Xe.communityId=Me)}}catch(B){console.warn("[NodeMetadataBuilder] Community detection failed, skipping:",B)}}BN();async function OXt(g){let c=Ns.getSpider(),f=Fh("McpWorker");return(await Promise.all(g.map(async b=>{try{let I=await c.verifyDependencyUsage(b.source,b.target);return{edge:b,isUsed:I}}catch(I){return f.warn(`Failed to verify usage for edge ${b.source} -> ${b.target}`,I),{edge:b,isUsed:!0}}}))).filter(b=>b.isUsed).map(b=>b.edge)}async function TMt(g){let{entryFile:c,maxDepth:f,limit:T,offset:b,onlyUsed:I}=g,B=Ns.getSpider(),ne=Ns.getConfig();await IC(c);let Me=B.config.maxDepth;f!==void 0&&B.updateConfig({maxDepth:f});try{let Xe=await B.crawl(c);f!==void 0&&B.updateConfig({maxDepth:Me});let{dependencyCount:ct,dependentCount:Rt}=nkt(Xe.edges),Te=w3t(Xe.edges),Gn={};for(let[bc,ol]of Rt)Gn[jo(bc)]=ol;let Et={nodes:Xe.nodes.map(jo),edges:Xe.edges,parentCounts:Gn};ZWt(Et,ne.rootDir);let wt=I3t(Et.nodes,ct,Rt,ne.rootDir,Et.nodeMetadata),go=P3t(Xe.edges,ne.rootDir);I===!0&&(go=await OXt(go),k3t(wt,go));let uo=wt.length,xa=go.length;if(T!==void 0||b!==void 0){let bc=N3t(wt,go,T,b);wt=bc.nodes,go=bc.edges}return{entryFile:c,maxDepth:f??Me??3,nodeCount:uo,edgeCount:xa,nodes:wt,edges:go,circularDependencies:Te}}catch(Xe){throw f!==void 0&&B.updateConfig({maxDepth:Me}),Xe}}async function xMt(g){let{filePath:c,knownPaths:f,extraDepth:T}=g,b=Ns.getSpider(),I=Ns.getConfig();await IC(c);let B=new Set(f),ne=await b.crawlFrom(c,B,T??10);return{expandedNode:c,newNodeCount:ne.nodes.length,newEdgeCount:ne.edges.length,newNodes:ne.nodes,newEdges:ne.edges.map(Me=>({source:Me.source,target:Me.target,sourceRelative:cT(Me.source,I.rootDir),targetRelative:cT(Me.target,I.rootDir)}))}}async function EMt(g){let{targetPath:c}=g,f=Ns.getSpider(),T=Ns.getConfig();await IC(c);let b=await f.findReferencingFiles(c);return{targetPath:c,referencingFileCount:b.length,referencingFiles:b.map(I=>({path:I.path,relativePath:cT(I.path,T.rootDir),type:I.type,line:I.line,module:I.module}))}}var i9t=Mf(require("node:fs/promises"));var n9t=require("node:child_process"),qit=Mf(require("node:fs/promises")),QL=Mf(require("node:path")),r9t=require("node:util");wE();jit();var pGe=Mf(LPt()),Jit=class{project;constructor(){this.project=new pGe.Project({skipAddingFilesFromTsConfig:!0,useInMemoryFileSystem:!0,compilerOptions:{target:99,module:99,strict:!0}})}extractSignatures(c,f){let T=this.getOrCreateSourceFile(c,f),b=[];for(let I of T.getFunctions()){let B=this.extractFunctionSignature(I);B&&b.push(B)}for(let I of T.getClasses()){let B=I.getName()??"Anonymous",ne=I.getConstructors()[0];ne&&b.push({name:`${B}.constructor`,kind:"constructor",isExported:I.isExported(),parameters:this.extractParameters(ne.getParameters()),returnType:B,isAsync:!1,line:ne.getStartLineNumber()});for(let Me of I.getMethods()){let Xe=Me.getName(),ct=this.getVisibility(Me);b.push({name:`${B}.${Xe}`,kind:"method",isExported:I.isExported()&&ct!=="private",parameters:this.extractParameters(Me.getParameters()),returnType:this.safeGetTypeNodeText(Me.getReturnTypeNode(),"void"),isAsync:Me.isAsync(),isStatic:Me.isStatic(),visibility:ct,typeParameters:Me.getTypeParameters().map(Rt=>this.safeGetText(Rt)),line:Me.getStartLineNumber()})}}for(let I of T.getVariableDeclarations()){let B=I.getInitializer();if(B?.getKind()===pGe.SyntaxKind.ArrowFunction){let ne=B.asKindOrThrow(pGe.SyntaxKind.ArrowFunction);b.push({name:I.getName(),kind:"arrow",isExported:I.getVariableStatement()?.isExported()??!1,parameters:this.extractParameters(ne.getParameters()),returnType:this.safeGetTypeNodeText(ne.getReturnTypeNode(),"unknown"),isAsync:ne.isAsync(),line:I.getStartLineNumber()})}}return b}extractInterfaceMembers(c,f){let T=this.getOrCreateSourceFile(c,f),b=new Map;for(let I of T.getInterfaces().filter(B=>B.isExported())){let B=I.getName(),ne=[];for(let Me of I.getProperties())ne.push({name:Me.getName(),kind:"property",type:this.safeGetTypeNodeText(Me.getTypeNode(),"unknown"),isOptional:Me.hasQuestionToken(),isReadonly:Me.isReadonly()});for(let Me of I.getMethods()){let Xe=Me.getParameters().map(Rt=>`${Rt.getName()}: ${this.safeGetTypeNodeText(Rt.getTypeNode(),"unknown")}`).join(", "),ct=this.safeGetTypeNodeText(Me.getReturnTypeNode(),"unknown");ne.push({name:Me.getName(),kind:"method",type:`(${Xe}) => ${ct}`,isOptional:Me.hasQuestionToken(),isReadonly:!1})}b.set(B,ne)}return b}extractTypeAliases(c,f){let T=this.getOrCreateSourceFile(c,f),b=[];for(let I of T.getTypeAliases().filter(B=>B.isExported()))b.push({name:I.getName(),type:this.safeGetTypeNodeText(I.getTypeNode(),"unknown"),typeParameters:I.getTypeParameters().map(B=>this.safeGetText(B))});return b}compareSignatures(c,f){let T=[],b=[];if(this.compareParameters(c,f,T,b),c.returnType!==f.returnType&&T.push({type:"return-type-changed",symbolName:f.name,description:`Return type changed from '${c.returnType}' to '${f.returnType}'`,severity:"error",oldValue:c.returnType,newValue:f.returnType,line:f.line}),c.visibility&&f.visibility){let I={public:3,protected:2,private:1},B=I[c.visibility];I[f.visibility]<B&&T.push({type:"visibility-reduced",symbolName:f.name,description:`Visibility reduced from '${c.visibility}' to '${f.visibility}'`,severity:"error",oldValue:c.visibility,newValue:f.visibility,line:f.line})}return{symbolName:f.name,hasBreakingChanges:T.length>0,breakingChanges:T,nonBreakingChanges:b}}compareInterfaces(c,f,T){let b=[],I=[],B=new Map(f.map(Me=>[Me.name,Me])),ne=new Map(T.map(Me=>[Me.name,Me]));for(let[Me,Xe]of B)ne.has(Me)||b.push({type:"member-removed",symbolName:`${c}.${Me}`,description:`Member '${Me}' was removed from interface '${c}'`,severity:"error",oldValue:Xe.type});for(let[Me,Xe]of ne){let ct=B.get(Me);if(!ct){Xe.isOptional?I.push(`New optional member '${Me}' added`):b.push({type:"member-optional-to-required",symbolName:`${c}.${Me}`,description:`New required member '${Me}' added to interface '${c}'`,severity:"error",newValue:Xe.type});continue}ct.type!==Xe.type&&b.push({type:"member-type-changed",symbolName:`${c}.${Me}`,description:`Type of member '${Me}' changed from '${ct.type}' to '${Xe.type}'`,severity:"error",oldValue:ct.type,newValue:Xe.type}),ct.isOptional&&!Xe.isOptional&&b.push({type:"member-optional-to-required",symbolName:`${c}.${Me}`,description:`Member '${Me}' changed from optional to required`,severity:"error"})}return{symbolName:c,hasBreakingChanges:b.length>0,breakingChanges:b,nonBreakingChanges:I}}compareTypeAliases(c,f){let T=[],b=[];return c.type!==f.type&&T.push({type:"type-alias-changed",symbolName:f.name,description:`Type alias '${f.name}' changed from '${c.type}' to '${f.type}'`,severity:"warning",oldValue:c.type,newValue:f.type}),{symbolName:f.name,hasBreakingChanges:T.length>0,breakingChanges:T,nonBreakingChanges:b}}analyzeBreakingChanges(c,f,T){let b=[];return this.compareFunctions(c,f,T,b),this.compareInterfaceDefinitions(c,f,T,b),this.compareTypeAliasDefinitions(c,f,T,b),b}compareFunctions(c,f,T,b){let I=this.extractSignatures(`${c}.old`,f),B=this.extractSignatures(`${c}.new`,T),ne=new Map(I.map(Xe=>[Xe.name,Xe])),Me=new Map(B.map(Xe=>[Xe.name,Xe]));for(let[Xe,ct]of ne){if(ct.isExported===!1)continue;let Rt=Me.get(Xe);if(Rt){let Te=this.compareSignatures(ct,Rt);(Te.hasBreakingChanges||Te.nonBreakingChanges.length>0)&&b.push(Te)}else b.push(this.createRemovedResult(Xe,"member-removed",`Function '${Xe}' was removed`,ct.line))}}compareInterfaceDefinitions(c,f,T,b){let I=this.extractInterfaceMembers(`${c}.old`,f),B=this.extractInterfaceMembers(`${c}.new`,T);for(let[ne,Me]of I){let Xe=B.get(ne);if(Xe){let ct=this.compareInterfaces(ne,Me,Xe);(ct.hasBreakingChanges||ct.nonBreakingChanges.length>0)&&b.push(ct)}else b.push(this.createRemovedResult(ne,"member-removed",`Interface '${ne}' was removed`))}}compareTypeAliasDefinitions(c,f,T,b){let I=this.extractTypeAliases(`${c}.old`,f),B=this.extractTypeAliases(`${c}.new`,T),ne=new Map(I.map(Xe=>[Xe.name,Xe])),Me=new Map(B.map(Xe=>[Xe.name,Xe]));for(let[Xe,ct]of ne){let Rt=Me.get(Xe);if(Rt){let Te=this.compareTypeAliases(ct,Rt);Te.hasBreakingChanges&&b.push(Te)}else b.push(this.createRemovedResult(Xe,"type-alias-changed",`Type alias '${Xe}' was removed`))}}createRemovedResult(c,f,T,b){return{symbolName:c,hasBreakingChanges:!0,breakingChanges:[{type:f,symbolName:c,description:T,severity:"error",line:b}],nonBreakingChanges:[]}}getOrCreateSourceFile(c,f){let T=this.project.getSourceFile(c);return T&&this.project.removeSourceFile(T),this.project.createSourceFile(c,f)}extractFunctionSignature(c){let f=c.getName();return f?{name:f,kind:"function",isExported:c.isExported(),parameters:this.extractParameters(c.getParameters()),returnType:this.safeGetTypeNodeText(c.getReturnTypeNode(),"void"),isAsync:c.isAsync(),typeParameters:c.getTypeParameters().map(T=>this.safeGetText(T)),line:c.getStartLineNumber()}:null}extractParameters(c){return c.map((f,T)=>({name:f.getName(),type:this.safeGetTypeNodeText(f.getTypeNode(),"unknown"),isOptional:f.isOptional(),hasDefault:f.hasInitializer(),isRest:f.isRestParameter(),position:T}))}safeGetTypeNodeText(c,f){if(!c)return f;try{let T=c.getText?.()??"";return T.length<=200&&T||f}catch{return f}}safeGetText(c){if(!c)return"";try{return c.getText?.()??""}catch{return""}}getVisibility(c){let f=c.getScope?.();if(!f)return"public";let T=f.toString().toLowerCase();return T.includes("private")?"private":T.includes("protected")?"protected":"public"}compareParameters(c,f,T,b){let I=c.parameters,B=f.parameters,ne=new Map(I.map(Xe=>[Xe.name,Xe])),Me=new Map(B.map(Xe=>[Xe.name,Xe]));this.detectRemovedParameters(I,Me,f,T),this.detectNewAndChangedParameters(B,ne,f,T,b),this.detectPositionChanges(I,B,b)}detectRemovedParameters(c,f,T,b){for(let I of c)f.has(I.name)||b.push({type:"parameter-removed",symbolName:T.name,description:`Parameter '${I.name}' was removed`,severity:"error",oldValue:`${I.name}: ${I.type}`,line:T.line})}detectNewAndChangedParameters(c,f,T,b,I){for(let B of c){let ne=f.get(B.name);if(!ne){this.handleNewParameter(B,T,b,I);continue}this.handleChangedParameter(ne,B,T,b)}}handleNewParameter(c,f,T,b){c.isOptional||c.hasDefault?b.push(`New optional parameter '${c.name}' added`):T.push({type:"parameter-added-required",symbolName:f.name,description:`New required parameter '${c.name}' added`,severity:"error",newValue:`${c.name}: ${c.type}`,line:f.line})}handleChangedParameter(c,f,T,b){c.type!==f.type&&b.push({type:"parameter-type-changed",symbolName:T.name,description:`Type of parameter '${f.name}' changed from '${c.type}' to '${f.type}'`,severity:"error",oldValue:c.type,newValue:f.type,line:T.line});let I=c.isOptional||c.hasDefault,B=!f.isOptional&&!f.hasDefault;I&&B&&b.push({type:"parameter-optional-to-required",symbolName:T.name,description:`Parameter '${f.name}' changed from optional to required`,severity:"error",line:T.line})}detectPositionChanges(c,f,T){let b=Math.min(c.length,f.length);for(let I=0;I<b;I++)c[I].name!==f[I].name&&T.push(`Parameter order changed at position ${I}: '${c[I].name}' \u2192 '${f[I].name}'`)}};var e9t=(0,r9t.promisify)(n9t.execFile),FXt=200,WXt=3,BXt=1e3,zXt=10,jXt=new Set([".ts",".tsx",".js",".jsx",".mjs",".cjs"]),Kit=class{constructor(c,f){this.workspaceRoot=c;this.dependents=f;this.normalizedRoot=jo(QL.resolve(c))}workspaceRoot;dependents;normalizedRoot;signatures=new Jit;async analyze(c){let f=this.validateLimit(c.maxFiles,FXt,BXt,"maxFiles"),T=this.validateLimit(c.maxDepth,WXt,zXt,"maxDepth"),b=c.headRef??"HEAD",I=await this.getChangedFiles(c.baseRef,b,f),B=[],ne=[],Me={cycle:!1,unused:!1};I.length===f&&ne.push(`Analysis limited to ${f} changed files.`);for(let ct of I)B.push(...await this.analyzeChangedFile(ct,c.baseRef,b,T,ne,Me));B.sort((ct,Rt)=>Rt.score-ct.score||ct.filePath.localeCompare(Rt.filePath)||ct.name.localeCompare(Rt.name));let Xe=B.reduce((ct,Rt)=>Math.max(ct,Rt.score),0);return{baseRef:c.baseRef,headRef:b,changedFiles:I,symbols:B,score:Xe,risk:t9t(Xe),isPartial:ne.length>0,limitations:ne}}validateLimit(c,f,T,b){let I=c??f;if(!Number.isInteger(I)||I<1||I>T)throw new Error(`${b} must be an integer between 1 and ${T}`);return I}async analyzeChangedFile(c,f,T,b,I,B){if(!jXt.has(QL.extname(c).toLowerCase()))return I.push(`Signature and symbol evidence unavailable for unsupported file type: ${c}.`),[];let ne=this.resolveWorkspacePath(c),[Me,Xe]=await Promise.all([this.gitShow(f,c),this.readHeadContent(T,ne,c)]);if(Me===null||Xe===null)return I.push(`Could not compare ${c}; file was added, deleted, or unreadable.`),[];let ct=await this.collectFileEvidence(ne,c,I,B),Rt=this.analyzeSignatures(ne,c,Me,Xe,I);return Promise.all(Rt.map(Te=>this.createReviewSymbol(Te,ne,c,b,ct)))}analyzeSignatures(c,f,T,b,I){try{return this.signatures.analyzeBreakingChanges(c,T,b)}catch(B){let ne=B instanceof Error?B.message:"unknown parser error";return I.push(`Signature evidence unavailable for ${f}: ${ne}.`),[]}}async createReviewSymbol(c,f,T,b,I){let B=c.breakingChanges.length>0?await this.getImpact(f,c.symbolName,b):{count:0,partial:!1},ne=I.cycleSymbols.has(this.toSymbolId(f,c.symbolName)),Me=I.unusedSymbols.has(c.symbolName),Xe=this.getScoreFactors(c.breakingChanges.length,B,ne,Me,I.testCandidates.length),ct=Math.min(100,Object.values(Xe).reduce((Rt,Te)=>Rt+Te,0));return{name:c.symbolName,filePath:T,score:ct,risk:t9t(ct),breakingChanges:c.breakingChanges,impactedSymbolCount:B.count,cycleEvidence:ne?[c.symbolName]:[],unusedExportEvidence:Me,testCandidates:I.testCandidates,scoreFactors:Xe,evidence:this.getEvidence(c.breakingChanges,B,ne,Me,I.testCandidates)}}getScoreFactors(c,f,T,b,I){return{breakingChanges:c*50,dependents:f.count*5,cycles:T?20:0,unusedExport:b?10:0,missingTestCandidate:I===0?10:0,partialImpact:f.partial?10:0}}getEvidence(c,f,T,b,I){let B=c.map(ne=>({kind:"breaking-change",detail:ne.description}));return f.count>0&&B.push({kind:"impact",detail:`${f.count} known dependent symbol(s).`}),T&&B.push({kind:"cycle",detail:"Changed symbol participates in a detected symbol dependency cycle."}),b&&B.push({kind:"unused-export",detail:"Changed exported symbol is currently reported as unused."}),B.push(I.length>0?{kind:"test-candidate",detail:`Conventional test candidate(s): ${I.join(", ")}.`}:{kind:"test-candidate",detail:"No conventional test candidate found; manual test selection is required."}),f.partial&&B.push({kind:"partial",detail:"Impact traversal reached its configured depth limit."}),B}async getChangedFiles(c,f,T){let b=f==="HEAD"?c:`${c}...${f}`,{stdout:I}=await e9t("git",["diff","--name-only","--diff-filter=ACMR",b],{cwd:this.workspaceRoot,maxBuffer:1024*1024});return I.split(`
42789
- `).filter(Boolean).slice(0,T).map(B=>jo(B)).sort()}resolveWorkspacePath(c){let f=jo(QL.resolve(this.workspaceRoot,c));if(f!==this.normalizedRoot&&!f.startsWith(`${this.normalizedRoot}/`))throw new Error(`Changed path resolves outside workspace: ${c}`);return f}async gitShow(c,f){try{let{stdout:T}=await e9t("git",["show",`${c}:${f}`],{cwd:this.workspaceRoot,maxBuffer:2097152});return T}catch{return null}}async readHeadContent(c,f,T){if(c==="HEAD")try{return await qit.readFile(f,"utf8")}catch{return null}return this.gitShow(c,T)}async getImpact(c,f,T){if(!this.dependents)return{count:0,partial:!1};let b=new Set,I=[{filePath:c,symbolName:f}];for(let B=0;B<T&&I.length>0;B+=1)I=await this.collectDependentFrontier(I,b);return{count:b.size,partial:I.length>0}}async collectDependentFrontier(c,f){let T=[];for(let b of c){let I=await this.dependents.getSymbolDependents(b.filePath,b.symbolName);for(let B of I){let ne=this.parseDependent(B.sourceSymbolId,f);ne&&T.push(ne)}}return T}parseDependent(c,f){let T=c.lastIndexOf(":");if(T<=0)return null;let b=jo(c.slice(0,T)),I=c.slice(T+1),B=`${b}:${I}`;return f.has(B)?null:(f.add(B),{filePath:b,symbolName:I})}async collectFileEvidence(c,f,T,b){let I=await this.findTestCandidates(f),B=await this.collectCycleEvidence(c,f,T,b),ne=await this.collectUnusedEvidence(c,f,T,b);return{cycleSymbols:B,unusedSymbols:ne,testCandidates:I}}async collectCycleEvidence(c,f,T,b){let I=new Set;if(!this.dependents?.getSymbolGraph)return b.cycle||T.push("Cycle evidence unavailable: symbol graph provider is not configured."),I;try{let B=await this.dependents.getSymbolGraph(c),ne=GWt(B.dependencies.map(Me=>({source:Me.sourceSymbolId,target:Me.targetSymbolId})));for(let Me of ne)I.add(this.normalizeSymbolId(Me));b.cycle=!0}catch{T.push(`Cycle evidence unavailable for ${f}.`)}return I}async collectUnusedEvidence(c,f,T,b){let I=new Set;if(!this.dependents?.findUnusedSymbols)return b.unused||T.push("Unused-export evidence unavailable: unused-symbol provider is not configured."),I;try{for(let B of await this.dependents.findUnusedSymbols(c))I.add(B.name);b.unused=!0}catch{T.push(`Unused-export evidence unavailable for ${f}.`)}return I}async findTestCandidates(c){let f=QL.extname(c),T=c.slice(0,-f.length),b=QL.basename(T),I=[`${T}.test${f}`,`${T}.spec${f}`,QL.join("tests",`${c}.test${f}`),QL.join("tests",QL.dirname(c),`${b}.test${f}`),QL.join("tests",QL.dirname(c),`${b}.spec${f}`)].map(jo),B=[];for(let ne of[...new Set(I)].sort((Me,Xe)=>Me.localeCompare(Xe)))try{await qit.access(this.resolveWorkspacePath(ne)),B.push(ne)}catch{}return B}toSymbolId(c,f){return`${jo(c)}:${f}`}normalizeSymbolId(c){let f=c.lastIndexOf(":");return f>0?this.toSymbolId(c.slice(0,f),c.slice(f+1)):c}};function t9t(g){return g>=80?"critical":g>=50?"high":g>=20?"medium":"low"}BN();function GXt(g){return{getSymbolDependents:(c,f)=>g.getSymbolDependents(c,f),getSymbolGraph:c=>g.getSymbolGraph(c),findUnusedSymbols:c=>g.findUnusedSymbols(c)}}async function CMt(g){let c=Ns.getConfig();return new Kit(c.rootDir,GXt(Ns.getSpider())).analyze(g)}async function AMt(g){let{filePath:c,symbolName:f,oldContent:T}=g,b=g.newContent;if(!b)try{b=await i9t.readFile(c,"utf-8")}catch{throw new Error(`Cannot read current file: ${c}`)}let I=Ns.getAstWorkerHost(),B;try{B=await I.analyzeBreakingChanges(c,T,b)}catch(Gn){let Et=Gn instanceof Error?Gn.message:"Unknown error";throw new Error(`Failed to analyze breaking changes: ${Et}`,{cause:Gn})}f&&(B=B.filter(Gn=>Gn.symbolName===f));let ne=[],Me=[],Xe=[],ct=[];for(let Gn of B){for(let Et of Gn.breakingChanges)ne.push({type:Et.type,symbolName:Et.symbolName,description:Et.description,severity:Et.severity,oldValue:Et.oldValue,newValue:Et.newValue,line:Et.line}),Et.type==="member-removed"&&Xe.push(Et.symbolName);Me.push(...Gn.nonBreakingChanges)}let Rt=ne.filter(Gn=>Gn.severity==="error").length,Te=ne.filter(Gn=>Gn.severity==="warning").length;return{filePath:c,breakingChangeCount:ne.length,errorCount:Rt,warningCount:Te,breakingChanges:ne,nonBreakingChanges:Me,removedSymbols:Xe,addedSymbols:ct}}function o9t(g,c,f){return{symbolId:g.sourceSymbolId,filePath:g.targetFilePath,relativePath:cT(g.targetFilePath,f),usageType:g.isTypeOnly?"type-only":"runtime",depth:c}}function VXt(g,c){return g>=10||c>=20?"high":g>=3||c>=5?"medium":"low"}function UXt(g){return{directCount:g.filter(c=>c.depth===1).length,transitiveCount:g.filter(c=>c.depth>1).length,runtimeCount:g.filter(c=>c.usageType==="runtime").length,typeOnlyCount:g.filter(c=>c.usageType==="type-only").length}}function HXt(g){let c=g.split(":");if(c.length<2)return null;let f=c.at(-1);return f?{filePath:c.slice(0,-1).join(":"),symbolName:f}:null}function JXt(g,c,f){f.visitedSymbols.has(g.sourceSymbolId)||(f.impactedItems.push(o9t(g,c,f.rootDir)),f.visitedSymbols.add(g.sourceSymbolId),f.affectedFilesSet.add(g.targetFilePath),c<f.maxDepth&&f.queue.push({symbolId:g.sourceSymbolId,depth:c+1}))}async function KXt(g,c,f,T,b,I){let B=Ns.getSpider(),ne=g.map(Xe=>({symbolId:Xe.sourceSymbolId,depth:2})),Me={maxDepth:c,rootDir:f,visitedSymbols:T,affectedFilesSet:b,impactedItems:I,queue:ne};for(;Me.queue.length>0;){let Xe=Me.queue.shift();if(Xe.depth>c)continue;let ct=HXt(Xe.symbolId);if(ct)try{let Rt=await B.getSymbolDependents(ct.filePath,ct.symbolName);for(let Te of Rt)JXt(Te,Xe.depth,Me)}catch{}}}function qXt(g,c,f,T,b,I){if(c===0)return`Symbol '${g}' has no known dependents. Changes should be safe.`;let B;I==="high"?B="\u{1F534}":I==="medium"?B="\u{1F7E1}":B="\u{1F7E2}";let ne=`${B} Impact Level: ${I.toUpperCase()}
42789
+ `).filter(Boolean).slice(0,T).map(B=>jo(B)).sort((B,ne)=>B.localeCompare(ne))}resolveWorkspacePath(c){let f=jo(QL.resolve(this.workspaceRoot,c));if(f!==this.normalizedRoot&&!f.startsWith(`${this.normalizedRoot}/`))throw new Error(`Changed path resolves outside workspace: ${c}`);return f}async gitShow(c,f){try{let{stdout:T}=await e9t("git",["show",`${c}:${f}`],{cwd:this.workspaceRoot,maxBuffer:2097152});return T}catch{return null}}async readHeadContent(c,f,T){if(c==="HEAD")try{return await qit.readFile(f,"utf8")}catch{return null}return this.gitShow(c,T)}async getImpact(c,f,T){if(!this.dependents)return{count:0,partial:!1};let b=new Set,I=[{filePath:c,symbolName:f}];for(let B=0;B<T&&I.length>0;B+=1)I=await this.collectDependentFrontier(I,b);return{count:b.size,partial:I.length>0}}async collectDependentFrontier(c,f){let T=[];for(let b of c){let I=await this.dependents.getSymbolDependents(b.filePath,b.symbolName);for(let B of I){let ne=this.parseDependent(B.sourceSymbolId,f);ne&&T.push(ne)}}return T}parseDependent(c,f){let T=c.lastIndexOf(":");if(T<=0)return null;let b=jo(c.slice(0,T)),I=c.slice(T+1),B=`${b}:${I}`;return f.has(B)?null:(f.add(B),{filePath:b,symbolName:I})}async collectFileEvidence(c,f,T,b){let I=await this.findTestCandidates(f),B=await this.collectCycleEvidence(c,f,T,b),ne=await this.collectUnusedEvidence(c,f,T,b);return{cycleSymbols:B,unusedSymbols:ne,testCandidates:I}}async collectCycleEvidence(c,f,T,b){let I=new Set;if(!this.dependents?.getSymbolGraph)return b.cycle||T.push("Cycle evidence unavailable: symbol graph provider is not configured."),I;try{let B=await this.dependents.getSymbolGraph(c),ne=GWt(B.dependencies.map(Me=>({source:Me.sourceSymbolId,target:Me.targetSymbolId})));for(let Me of ne)I.add(this.normalizeSymbolId(Me));b.cycle=!0}catch{T.push(`Cycle evidence unavailable for ${f}.`)}return I}async collectUnusedEvidence(c,f,T,b){let I=new Set;if(!this.dependents?.findUnusedSymbols)return b.unused||T.push("Unused-export evidence unavailable: unused-symbol provider is not configured."),I;try{for(let B of await this.dependents.findUnusedSymbols(c))I.add(B.name);b.unused=!0}catch{T.push(`Unused-export evidence unavailable for ${f}.`)}return I}async findTestCandidates(c){let f=QL.extname(c),T=c.slice(0,-f.length),b=QL.basename(T),I=[`${T}.test${f}`,`${T}.spec${f}`,QL.join("tests",`${c}.test${f}`),QL.join("tests",QL.dirname(c),`${b}.test${f}`),QL.join("tests",QL.dirname(c),`${b}.spec${f}`)].map(jo),B=[];for(let ne of[...new Set(I)].sort((Me,Xe)=>Me.localeCompare(Xe)))try{await qit.access(this.resolveWorkspacePath(ne)),B.push(ne)}catch{}return B}toSymbolId(c,f){return`${jo(c)}:${f}`}normalizeSymbolId(c){let f=c.lastIndexOf(":");return f>0?this.toSymbolId(c.slice(0,f),c.slice(f+1)):c}};function t9t(g){return g>=80?"critical":g>=50?"high":g>=20?"medium":"low"}BN();function GXt(g){return{getSymbolDependents:(c,f)=>g.getSymbolDependents(c,f),getSymbolGraph:c=>g.getSymbolGraph(c),findUnusedSymbols:c=>g.findUnusedSymbols(c)}}async function CMt(g){let c=Ns.getConfig();return new Kit(c.rootDir,GXt(Ns.getSpider())).analyze(g)}async function AMt(g){let{filePath:c,symbolName:f,oldContent:T}=g,b=g.newContent;if(!b)try{b=await i9t.readFile(c,"utf-8")}catch{throw new Error(`Cannot read current file: ${c}`)}let I=Ns.getAstWorkerHost(),B;try{B=await I.analyzeBreakingChanges(c,T,b)}catch(Gn){let Et=Gn instanceof Error?Gn.message:"Unknown error";throw new Error(`Failed to analyze breaking changes: ${Et}`,{cause:Gn})}f&&(B=B.filter(Gn=>Gn.symbolName===f));let ne=[],Me=[],Xe=[],ct=[];for(let Gn of B){for(let Et of Gn.breakingChanges)ne.push({type:Et.type,symbolName:Et.symbolName,description:Et.description,severity:Et.severity,oldValue:Et.oldValue,newValue:Et.newValue,line:Et.line}),Et.type==="member-removed"&&Xe.push(Et.symbolName);Me.push(...Gn.nonBreakingChanges)}let Rt=ne.filter(Gn=>Gn.severity==="error").length,Te=ne.filter(Gn=>Gn.severity==="warning").length;return{filePath:c,breakingChangeCount:ne.length,errorCount:Rt,warningCount:Te,breakingChanges:ne,nonBreakingChanges:Me,removedSymbols:Xe,addedSymbols:ct}}function o9t(g,c,f){return{symbolId:g.sourceSymbolId,filePath:g.targetFilePath,relativePath:cT(g.targetFilePath,f),usageType:g.isTypeOnly?"type-only":"runtime",depth:c}}function VXt(g,c){return g>=10||c>=20?"high":g>=3||c>=5?"medium":"low"}function UXt(g){return{directCount:g.filter(c=>c.depth===1).length,transitiveCount:g.filter(c=>c.depth>1).length,runtimeCount:g.filter(c=>c.usageType==="runtime").length,typeOnlyCount:g.filter(c=>c.usageType==="type-only").length}}function HXt(g){let c=g.split(":");if(c.length<2)return null;let f=c.at(-1);return f?{filePath:c.slice(0,-1).join(":"),symbolName:f}:null}function JXt(g,c,f){f.visitedSymbols.has(g.sourceSymbolId)||(f.impactedItems.push(o9t(g,c,f.rootDir)),f.visitedSymbols.add(g.sourceSymbolId),f.affectedFilesSet.add(g.targetFilePath),c<f.maxDepth&&f.queue.push({symbolId:g.sourceSymbolId,depth:c+1}))}async function KXt(g,c,f,T,b,I){let B=Ns.getSpider(),ne=g.map(Xe=>({symbolId:Xe.sourceSymbolId,depth:2})),Me={maxDepth:c,rootDir:f,visitedSymbols:T,affectedFilesSet:b,impactedItems:I,queue:ne};for(;Me.queue.length>0;){let Xe=Me.queue.shift();if(Xe.depth>c)continue;let ct=HXt(Xe.symbolId);if(ct)try{let Rt=await B.getSymbolDependents(ct.filePath,ct.symbolName);for(let Te of Rt)JXt(Te,Xe.depth,Me)}catch{}}}function qXt(g,c,f,T,b,I){if(c===0)return`Symbol '${g}' has no known dependents. Changes should be safe.`;let B;I==="high"?B="\u{1F534}":I==="medium"?B="\u{1F7E1}":B="\u{1F7E2}";let ne=`${B} Impact Level: ${I.toUpperCase()}
42790
42790
 
42791
42791
  `;return ne+=`Modifying '${g}' will affect:
42792
42792
  `,ne+=`- ${c} symbol(s) across ${b} file(s)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@magic5644/graph-it-live",
3
3
  "displayName": "Graph-It-Live",
4
4
  "description": "AI-first dependency graph & code intelligence for VS Code. Visualize file imports, symbol call hierarchies, and cross-file call graphs. Detect circular dependencies, dead code, and breaking changes. Built-in MCP Server with 21 tools for GitHub Copilot, Cursor, Claude, Windsurf, and Antigravity. Generate AI-friendly codemaps. TypeScript, JavaScript, C#, Go, Java, Python, Rust, Vue, Svelte, GraphQL.",
5
- "version": "1.13.1",
5
+ "version": "1.13.2",
6
6
  "publisher": "magic5644",
7
7
  "author": {
8
8
  "name": "magic56"
@@ -1144,9 +1144,9 @@
1144
1144
  "cytoscape": "^3.34.0",
1145
1145
  "cytoscape-fcose": "^2.2.0",
1146
1146
  "ink": "^7.1.1",
1147
- "react": "^19.2.7",
1147
+ "react": "^19.2.8",
1148
1148
  "react-devtools-core": "^6.1.5",
1149
- "react-dom": "^19.2.7",
1149
+ "react-dom": "^19.2.8",
1150
1150
  "reactflow": "^11.11.4",
1151
1151
  "sql.js": "^1.14.1",
1152
1152
  "tree-sitter-wasms": "^0.1.13",
@@ -1174,7 +1174,7 @@
1174
1174
  "fast-check": "^4.9.0",
1175
1175
  "glob": "^13.0.6",
1176
1176
  "globals": "^17.7.0",
1177
- "happy-dom": "^20.11.0",
1177
+ "happy-dom": "^20.11.1",
1178
1178
  "mocha": "^11.7.6",
1179
1179
  "typescript": "^6.0.3",
1180
1180
  "typescript-eslint": "^8.65.0",