agentica 0.30.2 → 0.30.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -81,7 +81,7 @@ Expecting one of '${D.join("', '")}'`);return this._lifeCycleHooks[o]?this._life
81
81
  `),this.outputHelp({error:!0}));const D=l||{},f=D.exitCode||1,d=D.code||"commander.error";this._exit(f,d,o)}_parseOptionsEnv(){this.options.forEach(o=>{if(o.envVar&&o.envVar in s.env){const l=o.attributeName();(this.getOptionValue(l)===void 0||["default","config","env"].includes(this.getOptionValueSource(l)))&&(o.required||o.optional?this.emit(`optionEnv:${o.name()}`,s.env[o.envVar]):this.emit(`optionEnv:${o.name()}`))}})}_parseOptionsImplied(){const o=new g(this.options),l=D=>this.getOptionValue(D)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(D));this.options.filter(D=>D.implied!==void 0&&l(D.attributeName())&&o.valueFromOption(this.getOptionValue(D.attributeName()),D)).forEach(D=>{Object.keys(D.implied).filter(f=>!l(f)).forEach(f=>{this.setOptionValueWithSource(f,D.implied[f],"implied")})})}missingArgument(o){const l=`error: missing required argument '${o}'`;this.error(l,{code:"commander.missingArgument"})}optionMissingArgument(o){const l=`error: option '${o.flags}' argument missing`;this.error(l,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(o){const l=`error: required option '${o.flags}' not specified`;this.error(l,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(o,l){const D=p=>{const _=p.attributeName(),O=this.getOptionValue(_),B=this.options.find(P=>P.negate&&_===P.attributeName()),x=this.options.find(P=>!P.negate&&_===P.attributeName());return B&&(B.presetArg===void 0&&O===!1||B.presetArg!==void 0&&O===B.presetArg)?B:x||p},f=p=>{const _=D(p),O=_.attributeName();return this.getOptionValueSource(O)==="env"?`environment variable '${_.envVar}'`:`option '${_.flags}'`},d=`error: ${f(o)} cannot be used with ${f(l)}`;this.error(d,{code:"commander.conflictingOption"})}unknownOption(o){if(this._allowUnknownOption)return;let l="";if(o.startsWith("--")&&this._showSuggestionAfterError){let f=[],d=this;do{const p=d.createHelp().visibleOptions(d).filter(_=>_.long).map(_=>_.long);f=f.concat(p),d=d.parent}while(d&&!d._enablePositionalOptions);l=F(o,f)}const D=`error: unknown option '${o}'${l}`;this.error(D,{code:"commander.unknownOption"})}_excessArguments(o){if(this._allowExcessArguments)return;const l=this.registeredArguments.length,D=l===1?"":"s",d=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${l} argument${D} but got ${o.length}.`;this.error(d,{code:"commander.excessArguments"})}unknownCommand(){const o=this.args[0];let l="";if(this._showSuggestionAfterError){const f=[];this.createHelp().visibleCommands(this).forEach(d=>{f.push(d.name()),d.alias()&&f.push(d.alias())}),l=F(o,f)}const D=`error: unknown command '${o}'${l}`;this.error(D,{code:"commander.unknownCommand"})}version(o,l,D){if(o===void 0)return this._version;this._version=o,l=l||"-V, --version",D=D||"output the version number";const f=this.createOption(l,D);return this._versionOptionName=f.attributeName(),this._registerOption(f),this.on("option:"+f.name(),()=>{this._outputConfiguration.writeOut(`${o}
82
82
  `),this._exit(0,"commander.version",o)}),this}description(o,l){return o===void 0&&l===void 0?this._description:(this._description=o,l&&(this._argsDescription=l),this)}summary(o){return o===void 0?this._summary:(this._summary=o,this)}alias(o){if(o===void 0)return this._aliases[0];let l=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(l=this.commands[this.commands.length-1]),o===l._name)throw new Error("Command alias can't be the same as its name");const D=this.parent?._findCommand(o);if(D){const f=[D.name()].concat(D.aliases()).join("|");throw new Error(`cannot add alias '${o}' to command '${this.name()}' as already have command '${f}'`)}return l._aliases.push(o),this}aliases(o){return o===void 0?this._aliases:(o.forEach(l=>this.alias(l)),this)}usage(o){if(o===void 0){if(this._usage)return this._usage;const l=this.registeredArguments.map(D=>t(D));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?l:[]).join(" ")}return this._usage=o,this}name(o){return o===void 0?this._name:(this._name=o,this)}helpGroup(o){return o===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=o,this)}commandsGroup(o){return o===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=o,this)}optionsGroup(o){return o===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=o,this)}_initOptionGroup(o){this._defaultOptionGroup&&!o.helpGroupHeading&&o.helpGroup(this._defaultOptionGroup)}_initCommandGroup(o){this._defaultCommandGroup&&!o.helpGroup()&&o.helpGroup(this._defaultCommandGroup)}nameFromFilename(o){return this._name=r.basename(o,r.extname(o)),this}executableDir(o){return o===void 0?this._executableDir:(this._executableDir=o,this)}helpInformation(o){const l=this.createHelp(),D=this._getOutputContext(o);l.prepareContext({error:D.error,helpWidth:D.helpWidth,outputHasColors:D.hasColors});const f=l.formatHelp(this,l);return D.hasColors?f:this._outputConfiguration.stripColor(f)}_getOutputContext(o){o=o||{};const l=!!o.error;let D,f,d;return l?(D=_=>this._outputConfiguration.writeErr(_),f=this._outputConfiguration.getErrHasColors(),d=this._outputConfiguration.getErrHelpWidth()):(D=_=>this._outputConfiguration.writeOut(_),f=this._outputConfiguration.getOutHasColors(),d=this._outputConfiguration.getOutHelpWidth()),{error:l,write:_=>(f||(_=this._outputConfiguration.stripColor(_)),D(_)),hasColors:f,helpWidth:d}}outputHelp(o){let l;typeof o=="function"&&(l=o,o=void 0);const D=this._getOutputContext(o),f={error:D.error,write:D.write,command:this};this._getCommandAndAncestors().reverse().forEach(p=>p.emit("beforeAllHelp",f)),this.emit("beforeHelp",f);let d=this.helpInformation({error:D.error});if(l&&(d=l(d),typeof d!="string"&&!Buffer.isBuffer(d)))throw new Error("outputHelp callback must return a string or a Buffer");D.write(d),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",f),this._getCommandAndAncestors().forEach(p=>p.emit("afterAllHelp",f))}helpOption(o,l){return typeof o=="boolean"?(o?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(o??"-h, --help",l??"display help for command"),(o||l)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(o){return this._helpOption=o,this._initOptionGroup(o),this}help(o){this.outputHelp(o);let l=Number(s.exitCode??0);l===0&&o&&typeof o!="function"&&o.error&&(l=1),this._exit(l,"commander.help","(outputHelp)")}addHelpText(o,l){const D=["beforeAll","before","after","afterAll"];if(!D.includes(o))throw new Error(`Unexpected value for position to addHelpText.
83
83
  Expecting one of '${D.join("', '")}'`);const f=`${o}Help`;return this.on(f,d=>{let p;typeof l=="function"?p=l({error:d.error,command:d.command}):p=l,p&&d.write(`${p}
84
- `)}),this}_outputHelpIfRequested(o){const l=this._getHelpOption();l&&o.find(f=>l.is(f))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function b(R){return R.map(o=>{if(!o.startsWith("--inspect"))return o;let l,D="127.0.0.1",f="9229",d;return(d=o.match(/^(--inspect(-brk)?)$/))!==null?l=d[1]:(d=o.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(l=d[1],/^\d+$/.test(d[3])?f=d[3]:D=d[3]):(d=o.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(l=d[1],D=d[3],f=d[4]),l&&f!=="0"?`${l}=${D}:${parseInt(f)+1}`:o})}function A(){if(s.env.NO_COLOR||s.env.FORCE_COLOR==="0"||s.env.FORCE_COLOR==="false")return!1;if(s.env.FORCE_COLOR||s.env.CLICOLOR_FORCE!==void 0)return!0}return ie.Command=w,ie.useColor=A,ie}var mi;function Un(){if(mi)return Ft;mi=1;const{Argument:i}=Se(),{Command:e}=Gn(),{CommanderError:r,InvalidArgumentError:h}=se(),{Help:s}=li(),{Option:n}=Di();return Ft.program=new e,Ft.createCommand=t=>new e(t),Ft.createOption=(t,u)=>new n(t,u),Ft.createArgument=(t,u)=>new i(t,u),Ft.Command=e,Ft.Option=n,Ft.Argument=i,Ft.Help=s,Ft.CommanderError=r,Ft.InvalidArgumentError=h,Ft.InvalidOptionArgumentError=h,Ft}var Wn=Un();const zn=Ps(Wn),{program:Ho,createCommand:jo,createArgument:Go,createOption:Uo,CommanderError:Wo,InvalidArgumentError:zo,InvalidOptionArgumentError:Vo,Command:Vn,Argument:qo,Option:qn,Help:Ko}=zn,Kn="0.30.2";var It={};class Yn extends Error{method;path;expected;value;fake_expected_typed_value_;constructor(e){super(e.message||`Error on ${e.method}(): invalid type${e.path?` on ${e.path}`:""}, expect to be ${e.expected}`);const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.method=e.method,this.path=e.path,this.expected=e.expected,this.value=e.value}}const Zn={__proto__:null,TypeGuardError:Yn},Xn=Xr(Zn);var pi;function Jn(){if(pi)return It;pi=1,Object.defineProperty(It,"__esModule",{value:!0}),It._assertGuard=void 0;const i=Xn,e=(r,h,s)=>{if(r===!0)throw s?s(h):new i.TypeGuardError(h);return!1};return It._assertGuard=e,It}var nt=Jn();const Qn=i=>({start:Q.hrtime.bigint(),command:i.map(e=>tu(xr(e))).join(" "),state:{stdout:"",stderr:"",output:""}}),tu=i=>/[^\w./-]/.test(i)?`'${i.replaceAll("'","'\\''")}'`:i,eu=({stdin:i,stdout:e,stderr:r,stdio:h=[i,e,r],env:s,preferLocal:n,cwd:t=".",...u})=>{const a=t instanceof URL?jr(t):dt.resolve(t),m=s?{...Q.env,...s}:void 0,y=h[0]?.string;return{...u,input:y,stdio:y===void 0?h:["pipe",...h.slice(1)],env:n?su(m??Q.env,a):m,cwd:a}},su=({Path:i="",PATH:e=i,...r},h)=>{const s=e.split(dt.delimiter),n=gi([],dt.resolve(h)).map(t=>dt.join(t,"node_modules/.bin")).filter(t=>!s.includes(t));return{...r,PATH:[...n,e].filter(Boolean).join(dt.delimiter)}},gi=(i,e)=>i.at(-1)===e?i:gi([...i,e],dt.resolve(e,"..")),iu=async(i,e,r)=>await ru(i,r)?[Re(i),e.map(h=>hu(h)),{...r,shell:!0}]:[i,e,r],ru=async(i,{shell:e,cwd:r,env:h=Q.env})=>Q.platform==="win32"&&!e&&!await nu(i,r,h),nu=(i,e,{Path:r="",PATH:h=r})=>Ci.some(s=>i.toLowerCase().endsWith(s))||au(i,e,h),uu={},Ei=i=>(...e)=>uu[e.join("\0")]??=i(...e),ou=Ei(Rt.access),au=Ei(async(i,e,r)=>{const h=r.split(dt.delimiter).filter(Boolean).map(s=>s.replace(/^"(.*)"$/,"$1"));try{await Promise.any([e,...h].flatMap(s=>Ci.map(n=>ou(`${dt.resolve(s,i)}${n}`))))}catch{return!1}return!0}),Ci=[".exe",".com"],hu=i=>Re(Re(`"${i.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),Re=i=>i.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),lu=async(i,{input:e},r)=>{const h=await i;e!==void 0&&h.stdin.end(e);const s=$s(h,"close");try{return await Promise.race([s,...h.stdio.filter(Boolean).map(n=>cu(n))]),Du(r,yi(h)),bi(r)}catch(n){throw await Promise.allSettled([s]),Fi(n,h,r)}},cu=async i=>{for await(const[e]of Lr(i,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(e?.code))throw e},Du=({command:i},{exitCode:e,signalName:r})=>{if(r!==void 0)throw new Bt(`Command was terminated with ${r}: ${i}`);if(e!==void 0)throw new Bt(`Command failed with exit code ${e}: ${i}`)},Fi=(i,e,r)=>Object.assign(du(i,r),yi(e),bi(r)),du=(i,{command:e})=>i instanceof Bt?i:new Bt(`Command failed: ${e}`,{cause:i});class Bt extends Error{name="SubprocessError"}const yi=({exitCode:i,signalCode:e})=>({...i<1?{}:{exitCode:i},...e===null?{}:{signalName:e}}),bi=({state:{stdout:i,stderr:e,output:r},command:h,start:s})=>({stdout:Be(i),stderr:Be(e),output:Be(r),command:h,durationMs:Number(Q.hrtime.bigint()-s)/1e6}),Be=i=>i.at(-1)===`
84
+ `)}),this}_outputHelpIfRequested(o){const l=this._getHelpOption();l&&o.find(f=>l.is(f))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}}function b(R){return R.map(o=>{if(!o.startsWith("--inspect"))return o;let l,D="127.0.0.1",f="9229",d;return(d=o.match(/^(--inspect(-brk)?)$/))!==null?l=d[1]:(d=o.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(l=d[1],/^\d+$/.test(d[3])?f=d[3]:D=d[3]):(d=o.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(l=d[1],D=d[3],f=d[4]),l&&f!=="0"?`${l}=${D}:${parseInt(f)+1}`:o})}function A(){if(s.env.NO_COLOR||s.env.FORCE_COLOR==="0"||s.env.FORCE_COLOR==="false")return!1;if(s.env.FORCE_COLOR||s.env.CLICOLOR_FORCE!==void 0)return!0}return ie.Command=w,ie.useColor=A,ie}var mi;function Un(){if(mi)return Ft;mi=1;const{Argument:i}=Se(),{Command:e}=Gn(),{CommanderError:r,InvalidArgumentError:h}=se(),{Help:s}=li(),{Option:n}=Di();return Ft.program=new e,Ft.createCommand=t=>new e(t),Ft.createOption=(t,u)=>new n(t,u),Ft.createArgument=(t,u)=>new i(t,u),Ft.Command=e,Ft.Option=n,Ft.Argument=i,Ft.Help=s,Ft.CommanderError=r,Ft.InvalidArgumentError=h,Ft.InvalidOptionArgumentError=h,Ft}var Wn=Un();const zn=Ps(Wn),{program:Ho,createCommand:jo,createArgument:Go,createOption:Uo,CommanderError:Wo,InvalidArgumentError:zo,InvalidOptionArgumentError:Vo,Command:Vn,Argument:qo,Option:qn,Help:Ko}=zn,Kn="0.30.3";var It={};class Yn extends Error{method;path;expected;value;fake_expected_typed_value_;constructor(e){super(e.message||`Error on ${e.method}(): invalid type${e.path?` on ${e.path}`:""}, expect to be ${e.expected}`);const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.method=e.method,this.path=e.path,this.expected=e.expected,this.value=e.value}}const Zn={__proto__:null,TypeGuardError:Yn},Xn=Xr(Zn);var pi;function Jn(){if(pi)return It;pi=1,Object.defineProperty(It,"__esModule",{value:!0}),It._assertGuard=void 0;const i=Xn,e=(r,h,s)=>{if(r===!0)throw s?s(h):new i.TypeGuardError(h);return!1};return It._assertGuard=e,It}var nt=Jn();const Qn=i=>({start:Q.hrtime.bigint(),command:i.map(e=>tu(xr(e))).join(" "),state:{stdout:"",stderr:"",output:""}}),tu=i=>/[^\w./-]/.test(i)?`'${i.replaceAll("'","'\\''")}'`:i,eu=({stdin:i,stdout:e,stderr:r,stdio:h=[i,e,r],env:s,preferLocal:n,cwd:t=".",...u})=>{const a=t instanceof URL?jr(t):dt.resolve(t),m=s?{...Q.env,...s}:void 0,y=h[0]?.string;return{...u,input:y,stdio:y===void 0?h:["pipe",...h.slice(1)],env:n?su(m??Q.env,a):m,cwd:a}},su=({Path:i="",PATH:e=i,...r},h)=>{const s=e.split(dt.delimiter),n=gi([],dt.resolve(h)).map(t=>dt.join(t,"node_modules/.bin")).filter(t=>!s.includes(t));return{...r,PATH:[...n,e].filter(Boolean).join(dt.delimiter)}},gi=(i,e)=>i.at(-1)===e?i:gi([...i,e],dt.resolve(e,"..")),iu=async(i,e,r)=>await ru(i,r)?[Re(i),e.map(h=>hu(h)),{...r,shell:!0}]:[i,e,r],ru=async(i,{shell:e,cwd:r,env:h=Q.env})=>Q.platform==="win32"&&!e&&!await nu(i,r,h),nu=(i,e,{Path:r="",PATH:h=r})=>Ci.some(s=>i.toLowerCase().endsWith(s))||au(i,e,h),uu={},Ei=i=>(...e)=>uu[e.join("\0")]??=i(...e),ou=Ei(Rt.access),au=Ei(async(i,e,r)=>{const h=r.split(dt.delimiter).filter(Boolean).map(s=>s.replace(/^"(.*)"$/,"$1"));try{await Promise.any([e,...h].flatMap(s=>Ci.map(n=>ou(`${dt.resolve(s,i)}${n}`))))}catch{return!1}return!0}),Ci=[".exe",".com"],hu=i=>Re(Re(`"${i.replaceAll(/(\\*)"/g,'$1$1\\"').replace(/(\\*)$/,"$1$1")}"`)),Re=i=>i.replaceAll(/([()\][%!^"`<>&|;, *?])/g,"^$1"),lu=async(i,{input:e},r)=>{const h=await i;e!==void 0&&h.stdin.end(e);const s=$s(h,"close");try{return await Promise.race([s,...h.stdio.filter(Boolean).map(n=>cu(n))]),Du(r,yi(h)),bi(r)}catch(n){throw await Promise.allSettled([s]),Fi(n,h,r)}},cu=async i=>{for await(const[e]of Lr(i,"error"))if(!["ERR_STREAM_PREMATURE_CLOSE","EPIPE"].includes(e?.code))throw e},Du=({command:i},{exitCode:e,signalName:r})=>{if(r!==void 0)throw new Bt(`Command was terminated with ${r}: ${i}`);if(e!==void 0)throw new Bt(`Command failed with exit code ${e}: ${i}`)},Fi=(i,e,r)=>Object.assign(du(i,r),yi(e),bi(r)),du=(i,{command:e})=>i instanceof Bt?i:new Bt(`Command failed: ${e}`,{cause:i});class Bt extends Error{name="SubprocessError"}const yi=({exitCode:i,signalCode:e})=>({...i<1?{}:{exitCode:i},...e===null?{}:{signalName:e}}),bi=({state:{stdout:i,stderr:e,output:r},command:h,start:s})=>({stdout:Be(i),stderr:Be(e),output:Be(r),command:h,durationMs:Number(Q.hrtime.bigint()-s)/1e6}),Be=i=>i.at(-1)===`
85
85
  `?i.slice(0,i.at(-2)==="\r"?-2:-1):i,fu=async(i,e,r,h)=>{try{["node","node.exe"].includes(i.toLowerCase())&&(i=Q.execPath,e=[...Q.execArgv.filter(n=>!n.startsWith("--inspect")),...e]),[i,e,r]=await iu(i,e,r),[i,e,r]=mu(i,e,r);const s=Mr(i,e,r);return _i(s.stdout,h,"stdout"),_i(s.stderr,h,"stderr"),s.once("error",()=>{}),await $s(s,"spawn"),s}catch(s){throw Fi(s,{},h)}},mu=(i,e,r)=>r.shell&&e.length>0?[[i,...e].join(" "),[],r]:[i,e,r],_i=(i,{state:e},r)=>{i&&(i.setEncoding("utf8"),e.isIterating||(e.isIterating=!1,i.on("data",h=>{e[r]+=h,e.output+=h})))},pu=async i=>{const[[e,r]]=await Promise.all([Promise.allSettled(i),gu(i)]);if(r.reason)throw r.reason.pipedFrom=e.reason??e.value,r.reason;if(e.reason)throw e.reason;return{...r.value,pipedFrom:e.value}},gu=async i=>{try{const[{stdout:e},{stdin:r}]=await Promise.all(i.map(({nodeChildProcess:h})=>h));if(r===null)throw new Error('The "stdin" option must be set on the first "spawn()" call in the pipeline.');if(e===null)throw new Error('The "stdout" option must be set on the last "spawn()" call in the pipeline.');Gr(e,r).catch(()=>{})}catch(e){throw await Promise.allSettled(i.map(({nodeChildProcess:r})=>Eu(r))),e}},Eu=async i=>{const{stdin:e}=await i;e.end()},wi=async function*(i,{state:e},r){if(e.isIterating===!1)throw new Error(`The subprocess must be iterated right away, for example:
86
86
  for await (const line of spawn(...)) { ... }`);e.isIterating=!0;try{const{[r]:h}=await i.nodeChildProcess;if(!h)return;yield*Ur.createInterface({input:h})}finally{await i}},Cu=async function*(...i){try{let e=[];for(;i.length>0;){e=i.map((t,u)=>e[u]??Fu(t));const[{value:r,done:h},s]=await Promise.race(e.map((t,u)=>Promise.all([t,u]))),[n]=i.splice(s,1);e.splice(s,1),h||(i.push(n),yield r)}}finally{await Promise.all(i.map(e=>e.return()))}},Fu=async i=>{try{return await i.next()}catch(e){await i.throw(e)}};function xe(i,e,r,h){const[s=[],n={}]=Array.isArray(e)?[e,r]:[[],e],t=Qn([i,...s]),u=eu(n),a=fu(i,s,u,t);let m=lu(a,u,t);Object.assign(m,{nodeChildProcess:a}),m=h?pu([h,m]):m;const y=wi(m,t,"stdout"),g=wi(m,t,"stderr");return Object.assign(m,{nodeChildProcess:a,stdout:y,stderr:g,[Symbol.asyncIterator]:()=>Cu(y,g),pipe:(F,w,b)=>xe(F,w,b,m)})}function vi(i){return i.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("")}function Ai(i,e,r){try{const h=Wr(i),s=zr(r,h.amount,{indent:" "});return i.replace(e,s)}catch{return i}}const yu="https://raw.githubusercontent.com/wrtnlabs/connectors/refs/heads/main/connectors-list.json",Te="@wrtnlabs/connector-";function bu(i){return`${Te}${i}`}function _u(i){return i.replace(Te,"")}async function wu(){const i=await(await fetch(yu)).json();return(()=>{const e=u=>Array.isArray(u.connectors)&&u.connectors.every(a=>typeof a=="object"&&a!==null&&r(a))&&typeof u.version=="string",r=u=>typeof u.name=="string"&&RegExp(/^@wrtnlabs\/connector\x2d(.*)/).test(u.name)&&Array.isArray(u.envList)&&u.envList.every(a=>typeof a=="string"),h=(u,a,m=!0)=>((Array.isArray(u.connectors)||nt._assertGuard(m,{method:"typia.assert",path:a+".connectors",expected:"Array<UnwrapTaggedConnectorInfo>",value:u.connectors},t))&&u.connectors.every((y,g)=>(typeof y=="object"&&y!==null||nt._assertGuard(m,{method:"typia.assert",path:a+".connectors["+g+"]",expected:"UnwrapTaggedConnectorInfo",value:y},t))&&s(y,a+".connectors["+g+"]",m)||nt._assertGuard(m,{method:"typia.assert",path:a+".connectors["+g+"]",expected:"UnwrapTaggedConnectorInfo",value:y},t))||nt._assertGuard(m,{method:"typia.assert",path:a+".connectors",expected:"Array<UnwrapTaggedConnectorInfo>",value:u.connectors},t))&&(typeof u.version=="string"||nt._assertGuard(m,{method:"typia.assert",path:a+".version",expected:"string",value:u.version},t)),s=(u,a,m=!0)=>(typeof u.name=="string"&&RegExp(/^@wrtnlabs\/connector\x2d(.*)/).test(u.name)||nt._assertGuard(m,{method:"typia.assert",path:a+".name",expected:"`@wrtnlabs/connector-${string}`",value:u.name},t))&&((Array.isArray(u.envList)||nt._assertGuard(m,{method:"typia.assert",path:a+".envList",expected:"Array<string>",value:u.envList},t))&&u.envList.every((y,g)=>typeof y=="string"||nt._assertGuard(m,{method:"typia.assert",path:a+".envList["+g+"]",expected:"string",value:y},t))||nt._assertGuard(m,{method:"typia.assert",path:a+".envList",expected:"Array<string>",value:u.envList},t)),n=u=>typeof u=="object"&&u!==null&&e(u);let t;return(u,a)=>(n(u)===!1&&(t=a,((m,y,g=!0)=>(typeof m=="object"&&m!==null||nt._assertGuard(!0,{method:"typia.assert",path:y+"",expected:"UnwrapTaggedConnectors",value:m},t))&&h(m,y+"",!0)||nt._assertGuard(!0,{method:"typia.assert",path:y+"",expected:"UnwrapTaggedConnectors",value:m},t))(u,"$input",!0)),u)})()(i)}async function vu(){return(await wu()).connectors.map(({name:i,envList:e})=>{const r=_u(i),h=r.replace("-"," ").toUpperCase();return{packageName:i,serviceName:r,displayName:h,envList:e}})}function $e(i){return i.map(e=>{const r=vi(e);return`{
87
87
  name: "${r} Connector",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentica",
3
3
  "type": "module",
4
- "version": "0.30.2",
4
+ "version": "0.30.3",
5
5
  "description": "Agentic AI Library specialized in LLM Function Calling",
6
6
  "author": "Wrtn Technologies",
7
7
  "license": "MIT",