@runlith/tagma 0.1.0 → 0.2.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.
- package/host.d.ts +421 -421
- package/package.json +6 -1
- package/plugin/{Held-6krt6ncs.js → Held-cvetk2wg.js} +1 -1
- package/plugin/{accountKey-tdjj67f5.js → accountKey-t44g9avw.js} +1 -1
- package/plugin/anthropic-messages-svq0svwe.js +2 -0
- package/plugin/anthropic-q1xa9n0j.js +2 -0
- package/plugin/{auth-0w6kk39v.js → auth-cp8wnd0z.js} +1 -1
- package/plugin/authStatus-d6scztz5.js +2 -0
- package/plugin/bundling.d.ts +3 -3
- package/plugin/{callback-server-0wrzmjfx.js → callback-server-q2asby82.js} +1 -1
- package/plugin/{capabilities-n3vfpy41.js → capabilities-jfhf61dt.js} +1 -1
- package/plugin/cli.js +1 -1
- package/plugin/{cliStore-9rhjxtht.js → cliStore-5s0qerr7.js} +1 -1
- package/plugin/{connect-vrdsw05j.js → connect-d7ec6kfh.js} +1 -1
- package/plugin/credential-garn07qc.js +2 -0
- package/plugin/deepseek-sp4vxjqy.js +2 -0
- package/plugin/definition-0h3gqd2z.js +2 -0
- package/plugin/{deviceGrant-vgbscpr4.js → deviceGrant-axpyc7xr.js} +1 -1
- package/plugin/duplex-yexjcpv2.js +2 -0
- package/plugin/endpoint-0b9bsb4q.js +2 -0
- package/plugin/{errors-5t42p4q1.js → errors-kck87dpv.js} +1 -1
- package/plugin/{events-e8vv9hda.js → events-81m69vqz.js} +1 -1
- package/plugin/executor-avear8af.js +2 -0
- package/plugin/failure-ddv4456n.js +2 -0
- package/plugin/framing-jnd2zm0h.js +2 -0
- package/plugin/grant-85r3bbqn.js +2 -0
- package/plugin/{harness-nrh78w4d.js → harness-jm3fhnwg.js} +1 -1
- package/plugin/headers-w6p5sp18.js +2 -0
- package/plugin/{ids-n269hc5k.js → ids-2dndaq8y.js} +1 -1
- package/plugin/images-s2kqebfv.js +2 -0
- package/plugin/{index-cyd7v366.js → index-b3yp4szm.js} +1 -1
- package/plugin/{index-jpmjpmkn.js → index-xs7nfsck.js} +1 -1
- package/plugin/lifecycle-er51apxp.js +2 -0
- package/plugin/{messages-1szh3p3k.js → messages-gmwcg1pq.js} +1 -1
- package/plugin/{metadata-zm1v3ptf.js → metadata-gpazs3f5.js} +1 -1
- package/plugin/muse-g8bc58v8.js +2 -0
- package/plugin/notes-5m0m3pdr.js +2 -0
- package/plugin/{openai-37dne8v0.js → openai-6f50tf64.js} +1 -1
- package/plugin/openai-compatible-chat-eez8hkge.js +2 -0
- package/plugin/openai-images-haszbnft.js +2 -0
- package/plugin/{openai-0z6fy497.js → openai-mfqwg6pa.js} +1 -1
- package/plugin/openai-responses-1gpyp640.js +2 -0
- package/plugin/{opencodeGo-173fz5c5.js → opencodeGo-1wgdjtjz.js} +1 -1
- package/plugin/{options-pxwjpfdk.js → options-476akxaj.js} +1 -1
- package/plugin/{pkce-nrpept7w.js → pkce-y3sh5pk8.js} +1 -1
- package/plugin/{plugin-qpda63gv.js → plugin-0e34qaar.js} +1 -1
- package/plugin/{plugin-521srf94.js → plugin-1zkx860n.js} +1 -1
- package/plugin/{plugin-285exjxd.js → plugin-217mw9ck.js} +1 -1
- package/plugin/{plugin-a4ng6krf.js → plugin-24j9hnc7.js} +1 -1
- package/plugin/{plugin-pkxw1pfs.js → plugin-2s6bq45c.js} +1 -1
- package/plugin/{plugin-q1sqj2tc.js → plugin-3969dy0b.js} +1 -1
- package/plugin/{plugin-7y7ndrk9.js → plugin-3t0qp574.js} +1 -1
- package/plugin/{plugin-je5cfnqn.js → plugin-6vzw5yyr.js} +1 -1
- package/plugin/{plugin-sfdxgkds.js → plugin-7swap1ad.js} +1 -1
- package/plugin/{plugin-zz7yc97m.js → plugin-7te9b50h.js} +1 -1
- package/plugin/{plugin-1x94cj6e.js → plugin-7xmwhj5h.js} +1 -1
- package/plugin/{plugin-vv72e4ah.js → plugin-8g8myq9g.js} +1 -1
- package/plugin/{plugin-3whwpedj.js → plugin-8q44b578.js} +1 -1
- package/plugin/{plugin-v7k9fx92.js → plugin-8v4g0q0b.js} +1 -1
- package/plugin/{plugin-zphe2a5v.js → plugin-8x3c401q.js} +1 -1
- package/plugin/{plugin-zxe49p72.js → plugin-92sxs4r1.js} +1 -1
- package/plugin/{plugin-ff38dxy1.js → plugin-9zbh7788.js} +1 -1
- package/plugin/{plugin-nkb5bb2q.js → plugin-a3vzpk4e.js} +1 -1
- package/plugin/{plugin-g65b14k1.js → plugin-azkzdkpk.js} +1 -1
- package/plugin/{plugin-nqmb78ez.js → plugin-d28d8jar.js} +1 -1
- package/plugin/{plugin-zvyk8bnr.js → plugin-dd951075.js} +1 -1
- package/plugin/{plugin-zew2m18x.js → plugin-dqxdznvd.js} +1 -1
- package/plugin/plugin-dsjq4tye.js +3 -0
- package/plugin/{plugin-3pfrkxg1.js → plugin-e5ybk2a2.js} +1 -1
- package/plugin/{plugin-njh1f7b2.js → plugin-eksq91yp.js} +1 -1
- package/plugin/{plugin-yxgg03s0.js → plugin-er1kc6f6.js} +1 -1
- package/plugin/{plugin-60bdzk1r.js → plugin-fjsmz1vy.js} +1 -1
- package/plugin/{plugin-d6hbav22.js → plugin-fre9hdcg.js} +1 -1
- package/plugin/{plugin-jjm52353.js → plugin-g0zv4vrz.js} +1 -1
- package/plugin/{plugin-ay29ch70.js → plugin-g4hst0jz.js} +1 -1
- package/plugin/{plugin-zw3ywa4b.js → plugin-g7hrtg2p.js} +1 -1
- package/plugin/{plugin-kjtzm2q6.js → plugin-hkjxkgty.js} +1 -1
- package/plugin/{plugin-pfj9nc2e.js → plugin-p6x7emar.js} +1 -1
- package/plugin/{plugin-ba1sv0th.js → plugin-pdww1ma8.js} +1 -1
- package/plugin/{plugin-fhc5q7r3.js → plugin-psj9935q.js} +1 -1
- package/plugin/{plugin-frrvs5yc.js → plugin-q6pvb1xf.js} +1 -1
- package/plugin/{plugin-8230g28p.js → plugin-r342d8zf.js} +1 -1
- package/plugin/{plugin-q1n5kwx0.js → plugin-r7g3vqrm.js} +1 -1
- package/plugin/plugin-t4xrq5q2.js +3 -0
- package/plugin/{plugin-z6hkd9rw.js → plugin-tetj2cr3.js} +1 -1
- package/plugin/{plugin-h66k1zhn.js → plugin-v80m00bq.js} +1 -1
- package/plugin/{plugin-8jf7f360.js → plugin-vqrd05eg.js} +1 -1
- package/plugin/{plugin-e2y95zm5.js → plugin-w3zbkmy6.js} +1 -1
- package/plugin/{plugin-1n46me5n.js → plugin-y9cdpmbv.js} +1 -1
- package/plugin/{plugin-ca4vf4j5.js → plugin-yg0h5k5d.js} +1 -1
- package/plugin/{plugin-gkgs7vfv.js → plugin-yp736z4n.js} +1 -1
- package/plugin/{plugin-q7rk75bs.js → plugin-zrb8bbr4.js} +1 -1
- package/plugin/{plugin-1xze8f5y.js → plugin-zsv7wawc.js} +1 -1
- package/plugin/plugin.d.ts +1 -1
- package/plugin/process.js +1 -1
- package/plugin/protocol-8c26dk6v.js +2 -0
- package/plugin/{quota-vrrmfag6.js → quota-v63yvp13.js} +1 -1
- package/plugin/quotaRead-esmjycnd.js +2 -0
- package/plugin/reasoning-1saw6tds.js +2 -0
- package/plugin/responseFold-xxhqx4sa.js +2 -0
- package/plugin/{settings-vdypzert.js → settings-8xq8dvhp.js} +1 -1
- package/plugin/{shared-a2yyy8ry.js → shared-4jndfh28.js} +1 -1
- package/plugin/stepfun-xp1c5wpk.js +2 -0
- package/plugin/stream-8yrr289z.js +2 -0
- package/plugin/{synthesisDuplex-m2j6pmyv.js → synthesisDuplex-ch9jhqzt.js} +1 -1
- package/plugin/template.js +1 -1
- package/plugin/testing.js +1 -1
- package/plugin/tool-content-vean6rqa.js +2 -0
- package/plugin/tool-stream-fb180jmt.js +2 -0
- package/plugin/transport-j784dsdr.js +2 -0
- package/plugin/ui.generated.d.ts +2 -5
- package/plugin/vendorCall-82evk8b3.js +2 -0
- package/plugin/{vendorPayload-awxqr7t8.js → vendorPayload-458354fv.js} +1 -1
- package/plugin/vendorWeb-cz5t01m7.js +2 -0
- package/plugin/verbatim-2f2d9n02.js +2 -0
- package/plugin/xai-2cqraa99.js +2 -0
- package/plugin/anthropic-messages-7gtja121.js +0 -2
- package/plugin/anthropic-z9xqmm3q.js +0 -2
- package/plugin/authStatus-a1g3eb9p.js +0 -2
- package/plugin/credential-5sgapkh0.js +0 -2
- package/plugin/deepseek-v388d1wv.js +0 -2
- package/plugin/definition-s3xx207f.js +0 -2
- package/plugin/duplex-kpmftvf7.js +0 -2
- package/plugin/endpoint-kvf97tz7.js +0 -2
- package/plugin/executor-q8kp5q8h.js +0 -2
- package/plugin/failure-vr32debc.js +0 -2
- package/plugin/framing-nktw5sts.js +0 -2
- package/plugin/grant-67b10nhx.js +0 -2
- package/plugin/headers-ss3dzznj.js +0 -2
- package/plugin/images-q80x3bt1.js +0 -2
- package/plugin/lifecycle-qf4fh5m8.js +0 -2
- package/plugin/muse-r16jp51z.js +0 -2
- package/plugin/notes-6amdhm6h.js +0 -2
- package/plugin/openai-compatible-chat-tq9w69h4.js +0 -2
- package/plugin/openai-images-x1sj79qh.js +0 -2
- package/plugin/openai-responses-dka6k753.js +0 -2
- package/plugin/plugin-92redty0.js +0 -3
- package/plugin/plugin-ff9hx5a4.js +0 -3
- package/plugin/protocol-hwnfh4h1.js +0 -2
- package/plugin/quotaRead-vj6e90xc.js +0 -2
- package/plugin/reasoning-5nanktp2.js +0 -2
- package/plugin/responseFold-w4526gvb.js +0 -2
- package/plugin/stepfun-bwsz4nrd.js +0 -2
- package/plugin/stream-bt8etfpc.js +0 -2
- package/plugin/tool-content-b9jtprr7.js +0 -2
- package/plugin/tool-stream-gdajdxn0.js +0 -2
- package/plugin/transport-7hfp9sn4.js +0 -2
- package/plugin/vendorCall-hv01nwsp.js +0 -2
- package/plugin/vendorWeb-vnf344r1.js +0 -2
- package/plugin/verbatim-mqt9x4aa.js +0 -2
- package/plugin/xai-z1ysta23.js +0 -2
- /package/plugin/{plugin-6xpcmvm3.js → plugin-xfcgt5ba.js} +0 -0
package/plugin/process.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import{Qd}from"./plugin-cydz2zhy.js";import{wg}from"./plugin-3b8x73y6.js";import"./plugin-6a56xsx3.js";import"./plugin-rrgyjesv.js";import"./plugin-w8f977my.js";import{Hf}from"./plugin-nzacjxf9.js";import{C0,K,F,ei,it,d,f,Wa,co,dt,v,_l}from"./plugin-6xpcmvm3.js";var go=K(function(Tm){Object.defineProperty(Tm,"__esModule",{value:!0});Tm.regexpCode=Tm.getEsmExportName=Tm.getProperty=Tm.safeStringify=Tm.stringify=Tm.strConcat=Tm.addCodeArg=Tm.str=Tm._=Tm.nil=Tm._Code=Tm.Name=Tm.IDENTIFIER=Tm._CodeOrName=void 0;class Ns{}Tm._CodeOrName=Ns;Tm.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class tn extends Ns{constructor(e){super();if(!Tm.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Tm.Name=tn;class ft extends Ns{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof tn)t[r.str]=(t[r.str]||0)+1;return t},{})}}Tm._Code=ft;Tm.nil=new ft("");function Em(e,...t){let r=[e[0]],n=0;while(n<t.length)Eu(r,t[n]),r.push(e[++n]);return new ft(r)}Tm._=Em;var zu=new ft("+");function Pm(e,...t){let r=[ho(e[0])],n=0;while(n<t.length)r.push(zu),Eu(r,t[n]),r.push(zu,ho(e[++n]));return dw(r),new ft(r)}Tm.str=Pm;function Eu(e,t){if(t instanceof ft)e.push(...t._items);else if(t instanceof tn)e.push(t);else e.push(mw(t))}Tm.addCodeArg=Eu;function dw(e){let t=1;while(t<e.length-1){if(e[t]===zu){let r=pw(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function pw(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof tn||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof tn))return`"${e}${t.slice(1)}`;return}function fw(e,t){return t.emptyStr()?e:e.emptyStr()?t:Pm`${e}${t}`}Tm.strConcat=fw;function mw(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ho(Array.isArray(e)?e.join(","):e)}function hw(e){return new ft(ho(e))}Tm.stringify=hw;function ho(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Tm.safeStringify=ho;function gw(e){return typeof e=="string"&&Tm.IDENTIFIER.test(e)?new ft(`.${e}`):Em`[${e}]`}Tm.getProperty=gw;function _w(e){if(typeof e=="string"&&Tm.IDENTIFIER.test(e))return new ft(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Tm.getEsmExportName=_w;function yw(e){return new ft(e.toString())}Tm.regexpCode=yw});var Iu=K(function(Cm){Object.defineProperty(Cm,"__esModule",{value:!0});Cm.ValueScope=Cm.ValueScopeName=Cm.Scope=Cm.varKinds=Cm.UsedValueState=void 0;var ce=go();class Im extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Ms;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ms||(Cm.UsedValueState=Ms={}));Cm.varKinds={const:new ce.Name("const"),let:new ce.Name("let"),var:new ce.Name("var")};class Tu{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ce.Name?e:this.name(e)}name(e){return new ce.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Cm.Scope=Tu;class Ru extends ce.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=ce._`.${new ce.Name(t)}[${r}]`}}Cm.ValueScopeName=Ru;var Iw=ce._`\n`;class Om extends Tu{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Iw:ce.nil}}get(){return this._scope}name(e){return new Ru(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,s=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[o];if(i){let u=i.get(s);if(u)return u}else i=this._values[o]=new Map;i.set(s,n);let a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return ce._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let o=ce.nil;for(let s in e){let i=e[s];if(!i)continue;let a=r[s]=r[s]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,Ms.Started);let u=t(c);if(u){let l=this.opts.es5?Cm.varKinds.var:Cm.varKinds.const;o=ce._`${o}${l} ${c} = ${u};${this.opts._n}`}else if(u=n===null||n===void 0?void 0:n(c))o=ce._`${o}${u}${this.opts._n}`;else throw new Im(c);a.set(c,Ms.Completed)})}return o}}Cm.ValueScope=Om});var X=K(function(Fe){Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var R=go(),$e=Iu(),Xt=go();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Xt._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Xt.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Xt.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Xt.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Xt.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Xt.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Xt.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Xt.Name}});var Fs=Iu();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return Fs.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return Fs.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return Fs.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return Fs.varKinds}});Fe.operators={GT:new R._Code(">"),GTE:new R._Code(">="),LT:new R._Code("<"),LTE:new R._Code("<="),EQ:new R._Code("==="),NEQ:new R._Code("!=="),NOT:new R._Code("!"),OR:new R._Code("||"),AND:new R._Code("&&"),ADD:new R._Code("+")};class Yt{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Am extends Yt{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?$e.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=nn(this.rhs,e,t);return this}get names(){return this.rhs instanceof R._CodeOrName?this.rhs.names:{}}}class Nu extends Yt{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof R.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=nn(this.rhs,e,t),this}get names(){let e=this.lhs instanceof R.Name?{}:{...this.lhs.names};return Ls(e,this.rhs)}}class Mm extends Nu{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class jm extends Yt{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Zm extends Yt{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Dm extends Yt{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class qm extends Yt{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nn(this.code,e,t),this}get names(){return this.code instanceof R._CodeOrName?this.code.names:{}}}class Us extends Yt{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let o=r[n];if(o.optimizeNames(e,t))continue;Aw(e,o.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Tr(e,t.names),{})}}class Qt extends Us{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Lm extends Us{}class _o extends Qt{}_o.kind="else";class jt extends Qt{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new _o(r):r}if(t){if(e===!1)return t instanceof jt?t:t.nodes;if(this.nodes.length)return this;return new jt(Jm(e),t instanceof jt?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=nn(this.condition,e,t),this}get names(){let e=super.names;if(Ls(e,this.condition),this.else)Tr(e,this.else.names);return e}}jt.kind="if";class rn extends Qt{}rn.kind="for";class Fm extends rn{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=nn(this.iteration,e,t),this}get names(){return Tr(super.names,this.iteration.names)}}class Um extends rn{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?$e.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Ls(super.names,this.from);return Ls(e,this.to)}}class Ou extends rn{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=nn(this.iterable,e,t),this}get names(){return Tr(super.names,this.iterable.names)}}class js extends Qt{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}js.kind="func";class Zs extends Us{render(e){return"return "+super.render(e)}}Zs.kind="return";class Vm extends Qt{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Tr(e,this.catch.names);if(this.finally)Tr(e,this.finally.names);return e}}class Ds extends Qt{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Ds.kind="catch";class qs extends Qt{render(e){return"finally"+super.render(e)}}qs.kind="finally";class Hm{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
2
|
+
import"./plugin-v80m00bq.js";import{Qd}from"./plugin-cydz2zhy.js";import{wg}from"./plugin-3b8x73y6.js";import"./plugin-6a56xsx3.js";import"./plugin-rrgyjesv.js";import"./plugin-w8f977my.js";import{Hf}from"./plugin-nzacjxf9.js";import{C0,K,F,ei,it,d,f,Wa,co,dt,v,_l}from"./plugin-xfcgt5ba.js";var go=K(function(Tm){Object.defineProperty(Tm,"__esModule",{value:!0});Tm.regexpCode=Tm.getEsmExportName=Tm.getProperty=Tm.safeStringify=Tm.stringify=Tm.strConcat=Tm.addCodeArg=Tm.str=Tm._=Tm.nil=Tm._Code=Tm.Name=Tm.IDENTIFIER=Tm._CodeOrName=void 0;class Ns{}Tm._CodeOrName=Ns;Tm.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class tn extends Ns{constructor(e){super();if(!Tm.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}Tm.Name=tn;class ft extends Ns{constructor(e){super();this._items=typeof e==="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,r)=>{if(r instanceof tn)t[r.str]=(t[r.str]||0)+1;return t},{})}}Tm._Code=ft;Tm.nil=new ft("");function Em(e,...t){let r=[e[0]],n=0;while(n<t.length)Eu(r,t[n]),r.push(e[++n]);return new ft(r)}Tm._=Em;var zu=new ft("+");function Pm(e,...t){let r=[ho(e[0])],n=0;while(n<t.length)r.push(zu),Eu(r,t[n]),r.push(zu,ho(e[++n]));return dw(r),new ft(r)}Tm.str=Pm;function Eu(e,t){if(t instanceof ft)e.push(...t._items);else if(t instanceof tn)e.push(t);else e.push(mw(t))}Tm.addCodeArg=Eu;function dw(e){let t=1;while(t<e.length-1){if(e[t]===zu){let r=pw(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function pw(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string"){if(t instanceof tn||e[e.length-1]!=='"')return;if(typeof t!="string")return`${e.slice(0,-1)}${t}"`;if(t[0]==='"')return e.slice(0,-1)+t.slice(1);return}if(typeof t=="string"&&t[0]==='"'&&!(e instanceof tn))return`"${e}${t.slice(1)}`;return}function fw(e,t){return t.emptyStr()?e:e.emptyStr()?t:Pm`${e}${t}`}Tm.strConcat=fw;function mw(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ho(Array.isArray(e)?e.join(","):e)}function hw(e){return new ft(ho(e))}Tm.stringify=hw;function ho(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Tm.safeStringify=ho;function gw(e){return typeof e=="string"&&Tm.IDENTIFIER.test(e)?new ft(`.${e}`):Em`[${e}]`}Tm.getProperty=gw;function _w(e){if(typeof e=="string"&&Tm.IDENTIFIER.test(e))return new ft(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Tm.getEsmExportName=_w;function yw(e){return new ft(e.toString())}Tm.regexpCode=yw});var Iu=K(function(Cm){Object.defineProperty(Cm,"__esModule",{value:!0});Cm.ValueScope=Cm.ValueScopeName=Cm.Scope=Cm.varKinds=Cm.UsedValueState=void 0;var ce=go();class Im extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`);this.value=e.value}}var Ms;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ms||(Cm.UsedValueState=Ms={}));Cm.varKinds={const:new ce.Name("const"),let:new ce.Name("let"),var:new ce.Name("var")};class Tu{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ce.Name?e:this.name(e)}name(e){return new ce.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,r;if(((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}Cm.Scope=Tu;class Ru extends ce.Name{constructor(e,t){super(t);this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=ce._`.${new ce.Name(t)}[${r}]`}}Cm.ValueScopeName=Ru;var Iw=ce._`\n`;class Om extends Tu{constructor(e){super(e);this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Iw:ce.nil}}get(){return this._scope}name(e){return new Ru(e,this._newName(e))}value(e,t){var r;if(t.ref===void 0)throw Error("CodeGen: ref must be passed in value");let n=this.toName(e),{prefix:o}=n,s=(r=t.key)!==null&&r!==void 0?r:t.ref,i=this._values[o];if(i){let u=i.get(s);if(u)return u}else i=this._values[o]=new Map;i.set(s,n);let a=this._scope[o]||(this._scope[o]=[]),c=a.length;return a[c]=t.ref,n.setValue(t,{property:o,itemIndex:c}),n}getValue(e,t){let r=this._values[e];if(!r)return;return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(r)=>{if(r.scopePath===void 0)throw Error(`CodeGen: name "${r}" has no value`);return ce._`${e}${r.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,(n)=>{if(n.value===void 0)throw Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,r)}_reduceValues(e,t,r={},n){let o=ce.nil;for(let s in e){let i=e[s];if(!i)continue;let a=r[s]=r[s]||new Map;i.forEach((c)=>{if(a.has(c))return;a.set(c,Ms.Started);let u=t(c);if(u){let l=this.opts.es5?Cm.varKinds.var:Cm.varKinds.const;o=ce._`${o}${l} ${c} = ${u};${this.opts._n}`}else if(u=n===null||n===void 0?void 0:n(c))o=ce._`${o}${u}${this.opts._n}`;else throw new Im(c);a.set(c,Ms.Completed)})}return o}}Cm.ValueScope=Om});var X=K(function(Fe){Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var R=go(),$e=Iu(),Xt=go();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Xt._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Xt.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Xt.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Xt.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Xt.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Xt.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Xt.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Xt.Name}});var Fs=Iu();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return Fs.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return Fs.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return Fs.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return Fs.varKinds}});Fe.operators={GT:new R._Code(">"),GTE:new R._Code(">="),LT:new R._Code("<"),LTE:new R._Code("<="),EQ:new R._Code("==="),NEQ:new R._Code("!=="),NOT:new R._Code("!"),OR:new R._Code("||"),AND:new R._Code("&&"),ADD:new R._Code("+")};class Yt{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Am extends Yt{constructor(e,t,r){super();this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){let r=e?$e.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(!e[this.name.str])return;if(this.rhs)this.rhs=nn(this.rhs,e,t);return this}get names(){return this.rhs instanceof R._CodeOrName?this.rhs.names:{}}}class Nu extends Yt{constructor(e,t,r){super();this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(this.lhs instanceof R.Name&&!e[this.lhs.str]&&!this.sideEffects)return;return this.rhs=nn(this.rhs,e,t),this}get names(){let e=this.lhs instanceof R.Name?{}:{...this.lhs.names};return Ls(e,this.rhs)}}class Mm extends Nu{constructor(e,t,r,n){super(e,r,n);this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class jm extends Yt{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Zm extends Yt{constructor(e){super();this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Dm extends Yt{constructor(e){super();this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class qm extends Yt{constructor(e){super();this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nn(this.code,e,t),this}get names(){return this.code instanceof R._CodeOrName?this.code.names:{}}}class Us extends Yt{constructor(e=[]){super();this.nodes=e}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;while(t--){let r=e[t].optimizeNodes();if(Array.isArray(r))e.splice(t,1,...r);else if(r)e[t]=r;else e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:r}=this,n=r.length;while(n--){let o=r[n];if(o.optimizeNames(e,t))continue;Aw(e,o.names),r.splice(n,1)}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Tr(e,t.names),{})}}class Qt extends Us{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Lm extends Us{}class _o extends Qt{}_o.kind="else";class jt extends Qt{constructor(e,t){super(t);this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);if(this.else)t+="else "+this.else.render(e);return t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let r=t.optimizeNodes();t=this.else=Array.isArray(r)?new _o(r):r}if(t){if(e===!1)return t instanceof jt?t:t.nodes;if(this.nodes.length)return this;return new jt(Jm(e),t instanceof jt?[t]:t.nodes)}if(e===!1||!this.nodes.length)return;return this}optimizeNames(e,t){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,t),!(super.optimizeNames(e,t)||this.else))return;return this.condition=nn(this.condition,e,t),this}get names(){let e=super.names;if(Ls(e,this.condition),this.else)Tr(e,this.else.names);return e}}jt.kind="if";class rn extends Qt{}rn.kind="for";class Fm extends rn{constructor(e){super();this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iteration=nn(this.iteration,e,t),this}get names(){return Tr(super.names,this.iteration.names)}}class Um extends rn{constructor(e,t,r,n){super();this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){let t=e.es5?$e.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){let e=Ls(super.names,this.from);return Ls(e,this.to)}}class Ou extends rn{constructor(e,t,r,n){super();this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(!super.optimizeNames(e,t))return;return this.iterable=nn(this.iterable,e,t),this}get names(){return Tr(super.names,this.iterable.names)}}class js extends Qt{constructor(e,t,r){super();this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}js.kind="func";class Zs extends Us{render(e){return"return "+super.render(e)}}Zs.kind="return";class Vm extends Qt{render(e){let t="try"+super.render(e);if(this.catch)t+=this.catch.render(e);if(this.finally)t+=this.finally.render(e);return t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),(r=this.catch)===null||r===void 0||r.optimizeNames(e,t),(n=this.finally)===null||n===void 0||n.optimizeNames(e,t),this}get names(){let e=super.names;if(this.catch)Tr(e,this.catch.names);if(this.finally)Tr(e,this.finally.names);return e}}class Ds extends Qt{constructor(e){super();this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Ds.kind="catch";class qs extends Qt{render(e){return"finally"+super.render(e)}}qs.kind="finally";class Hm{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
|
|
3
3
|
`:""},this._extScope=e,this._scope=new $e.Scope({parent:e}),this._nodes=[new Lm]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){let o=this._scope.toName(t);if(r!==void 0&&n)this._constants[o.str]=r;return this._leafNode(new Am(e,o,r)),o}const(e,t,r){return this._def($e.varKinds.const,e,t,r)}let(e,t,r){return this._def($e.varKinds.let,e,t,r)}var(e,t,r){return this._def($e.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new Nu(e,t,r))}add(e,t){return this._leafNode(new Mm(e,Fe.operators.ADD,t))}code(e){if(typeof e=="function")e();else if(e!==R.nil)this._leafNode(new qm(e));return this}object(...e){let t=["{"];for(let[r,n]of e){if(t.length>1)t.push(",");if(t.push(r),r!==n||this.opts.es5)t.push(":"),R.addCodeArg(t,n)}return t.push("}"),new R._Code(t)}if(e,t,r){if(this._blockNode(new jt(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new jt(e))}else(){return this._elseNode(new _o)}endIf(){return this._endBlockNode(jt,_o)}_for(e,t){if(this._blockNode(e),t)this.code(t).endFor();return this}for(e,t){return this._for(new Fm(e),t)}forRange(e,t,r,n,o=this.opts.es5?$e.varKinds.var:$e.varKinds.let){let s=this._scope.toName(e);return this._for(new Um(o,s,t,r),()=>n(s))}forOf(e,t,r,n=$e.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let s=t instanceof R.Name?t:this.var("_arr",t);return this.forRange("_i",0,R._`${s}.length`,(i)=>{this.var(o,R._`${s}[${i}]`),r(o)})}return this._for(new Ou("of",n,o,t),()=>r(o))}forIn(e,t,r,n=this.opts.es5?$e.varKinds.var:$e.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,R._`Object.keys(${t})`,r);let o=this._scope.toName(e);return this._for(new Ou("in",n,o,t),()=>r(o))}endFor(){return this._endBlockNode(rn)}label(e){return this._leafNode(new jm(e))}break(e){return this._leafNode(new Zm(e))}return(e){let t=new Zs;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(Zs)}try(e,t,r){if(!t&&!r)throw Error('CodeGen: "try" without "catch" and "finally"');let n=new Vm;if(this._blockNode(n),this.code(e),t){let o=this.name("e");this._currNode=n.catch=new Ds(o),t(o)}if(r)this._currNode=n.finally=new qs,this.code(r);return this._endBlockNode(Ds,qs)}throw(e){return this._leafNode(new Dm(e))}block(e,t){if(this._blockStarts.push(this._nodes.length),e)this.code(e).endBlock(t);return this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||e!==void 0&&r!==e)throw Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=R.nil,r,n){if(this._blockNode(new js(e,t,r)),n)this.code(n).endFunc();return this}endFunc(){return this._endBlockNode(js)}optimize(e=1){while(e-- >0)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof jt))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}Fe.CodeGen=Hm;function Tr(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Ls(e,t){return t instanceof R._CodeOrName?Tr(e,t.names):e}function nn(e,t,r){if(e instanceof R.Name)return n(e);if(!o(e))return e;return new R._Code(e._items.reduce((s,i)=>{if(i instanceof R.Name)i=n(i);if(i instanceof R._Code)s.push(...i._items);else s.push(i);return s},[]));function n(s){let i=r[s.str];if(i===void 0||t[s.str]!==1)return s;return delete t[s.str],i}function o(s){return s instanceof R._Code&&s._items.some((i)=>i instanceof R.Name&&t[i.str]===1&&r[i.str]!==void 0)}}function Aw(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Jm(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:R._`!${Cu(e)}`}Fe.not=Jm;var Mw=Bm(Fe.operators.AND);function jw(...e){return e.reduce(Mw)}Fe.and=jw;var Zw=Bm(Fe.operators.OR);function Dw(...e){return e.reduce(Zw)}Fe.or=Dw;function Bm(e){return(t,r)=>t===R.nil?r:r===R.nil?t:R._`${Cu(t)} ${e} ${Cu(r)}`}function Cu(e){return e instanceof R.Name?e:R._`(${e})`}});var re=K(function(nh){Object.defineProperty(nh,"__esModule",{value:!0});nh.checkStrictMode=nh.getErrorPath=nh.Type=nh.useFunc=nh.setEvaluated=nh.evaluatedPropsToName=nh.mergeEvaluated=nh.eachItem=nh.unescapeJsonPointer=nh.escapeJsonPointer=nh.escapeFragment=nh.unescapeFragment=nh.schemaRefOrVal=nh.schemaHasRulesButRef=nh.schemaHasRules=nh.checkUnknownRules=nh.alwaysValidSchema=nh.toHash=void 0;var L=X(),Xm=go();function Uw(e){let t={};for(let r of e)t[r]=!0;return t}nh.toHash=Uw;function Vw(e,t){if(typeof t=="boolean")return t;if(Object.keys(t).length===0)return!0;return Ym(e,t),!Qm(t,e.self.RULES.all)}nh.alwaysValidSchema=Vw;function Ym(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema)return;if(typeof t==="boolean")return;let o=n.RULES.keywords;for(let s in t)if(!o[s])rh(e,`unknown keyword: "${s}"`)}nh.checkUnknownRules=Ym;function Qm(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}nh.schemaHasRules=Qm;function Hw(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}nh.schemaHasRulesButRef=Hw;function Jw({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return L._`${r}`}return L._`${e}${t}${L.getProperty(n)}`}nh.schemaRefOrVal=Jw;function Bw(e){return eh(decodeURIComponent(e))}nh.unescapeFragment=Bw;function Kw(e){return encodeURIComponent(Mu(e))}nh.escapeFragment=Kw;function Mu(e){if(typeof e=="number")return`${e}`;return e.replace(/~/g,"~0").replace(/\//g,"~1")}nh.escapeJsonPointer=Mu;function eh(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}nh.unescapeJsonPointer=eh;function Gw(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}nh.eachItem=Gw;function Gm({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,s,i,a)=>{let c=i===void 0?s:i instanceof L.Name?(s instanceof L.Name?e(o,s,i):t(o,s,i),i):s instanceof L.Name?(t(o,i,s),s):r(s,i);return a===L.Name&&!(c instanceof L.Name)?n(o,c):c}}nh.mergeEvaluated={props:Gm({mergeNames:(e,t,r)=>e.if(L._`${r} !== true && ${t} !== undefined`,()=>{e.if(L._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,L._`${r} || {}`).code(L._`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if(L._`${r} !== true`,()=>{if(t===!0)e.assign(r,!0);else e.assign(r,L._`${r} || {}`),ju(e,r,t)}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:th}),items:Gm({mergeNames:(e,t,r)=>e.if(L._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,L._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(L._`${r} !== true`,()=>e.assign(r,t===!0?!0:L._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function th(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",L._`{}`);if(t!==void 0)ju(e,r,t);return r}nh.evaluatedPropsToName=th;function ju(e,t,r){Object.keys(r).forEach((n)=>e.assign(L._`${t}${L.getProperty(n)}`,!0))}nh.setEvaluated=ju;var Wm={};function Ww(e,t){return e.scopeValue("func",{ref:t,code:Wm[t.code]||(Wm[t.code]=new Xm._Code(t.code))})}nh.useFunc=Ww;var Au;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Au||(nh.Type=Au={}));function Xw(e,t,r){if(e instanceof L.Name){let n=t===Au.Num;return r?n?L._`"[" + ${e} + "]"`:L._`"['" + ${e} + "']"`:n?L._`"/" + ${e}`:L._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?L.getProperty(e).toString():"/"+Mu(e)}nh.getErrorPath=Xw;function rh(e,t,r=e.opts.strictSchema){if(!r)return;if(t=`strict mode: ${t}`,r===!0)throw Error(t);e.self.logger.warn(t)}nh.checkStrictMode=rh});var Zt=K(function(sh){Object.defineProperty(sh,"__esModule",{value:!0});var se=X(),hS={data:new se.Name("data"),valCxt:new se.Name("valCxt"),instancePath:new se.Name("instancePath"),parentData:new se.Name("parentData"),parentDataProperty:new se.Name("parentDataProperty"),rootData:new se.Name("rootData"),dynamicAnchors:new se.Name("dynamicAnchors"),vErrors:new se.Name("vErrors"),errors:new se.Name("errors"),this:new se.Name("this"),self:new se.Name("self"),scope:new se.Name("scope"),json:new se.Name("json"),jsonPos:new se.Name("jsonPos"),jsonLen:new se.Name("jsonLen"),jsonPart:new se.Name("jsonPart")};sh.default=hS});var yo=K(function(uh){Object.defineProperty(uh,"__esModule",{value:!0});uh.extendErrors=uh.resetErrorsCount=uh.reportExtraError=uh.reportError=uh.keyword$DataError=uh.keywordError=void 0;var O=X(),er=re(),qe=Zt();uh.keywordError={message:({keyword:e})=>O.str`must pass "${e}" keyword validation`};uh.keyword$DataError={message:({keyword:e,schemaType:t})=>t?O.str`"${e}" keyword must be ${t} ($data)`:O.str`"${e}" keyword is invalid ($data)`};function _S(e,t=uh.keywordError,r,n){let{it:o}=e,{gen:s,compositeRule:i,allErrors:a}=o,c=ch(e,t,r);if(n!==null&&n!==void 0?n:i||a)ih(s,c);else ah(o,O._`[${c}]`)}uh.reportError=_S;function yS(e,t=uh.keywordError,r){let{it:n}=e,{gen:o,compositeRule:s,allErrors:i}=n,a=ch(e,t,r);if(ih(o,a),!(s||i))ah(n,qe.default.vErrors)}uh.reportExtraError=yS;function vS(e,t){e.assign(qe.default.errors,t),e.if(O._`${qe.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(O._`${qe.default.vErrors}.length`,t),()=>e.assign(qe.default.vErrors,null)))}uh.resetErrorsCount=vS;function xS({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:s}){if(o===void 0)throw Error("ajv implementation error");let i=e.name("err");e.forRange("i",o,qe.default.errors,(a)=>{if(e.const(i,O._`${qe.default.vErrors}[${a}]`),e.if(O._`${i}.instancePath === undefined`,()=>e.assign(O._`${i}.instancePath`,O.strConcat(qe.default.instancePath,s.errorPath))),e.assign(O._`${i}.schemaPath`,O.str`${s.errSchemaPath}/${t}`),s.opts.verbose)e.assign(O._`${i}.schema`,r),e.assign(O._`${i}.data`,n)})}uh.extendErrors=xS;function ih(e,t){let r=e.const("err",t);e.if(O._`${qe.default.vErrors} === null`,()=>e.assign(qe.default.vErrors,O._`[${r}]`),O._`${qe.default.vErrors}.push(${r})`),e.code(O._`${qe.default.errors}++`)}function ah(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;if(o.$async)r.throw(O._`new ${e.ValidationError}(${t})`);else r.assign(O._`${n}.errors`,t),r.return(!1)}var Rr={keyword:new O.Name("keyword"),schemaPath:new O.Name("schemaPath"),params:new O.Name("params"),propertyName:new O.Name("propertyName"),message:new O.Name("message"),schema:new O.Name("schema"),parentSchema:new O.Name("parentSchema")};function ch(e,t,r){let{createErrors:n}=e.it;if(n===!1)return O._`{}`;return bS(e,t,r)}function bS(e,t,r={}){let{gen:n,it:o}=e,s=[$S(o,r),wS(e,r)];return SS(e,t,s),n.object(...s)}function $S({errorPath:e},{instancePath:t}){let r=t?O.str`${e}${er.getErrorPath(t,er.Type.Str)}`:e;return[qe.default.instancePath,O.strConcat(qe.default.instancePath,r)]}function wS({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:O.str`${t}/${e}`;if(r)o=O.str`${o}${er.getErrorPath(r,er.Type.Str)}`;return[Rr.schemaPath,o]}function SS(e,{params:t,message:r},n){let{keyword:o,data:s,schemaValue:i,it:a}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:p}=a;if(n.push([Rr.keyword,o],[Rr.params,typeof t=="function"?t(e):t||O._`{}`]),c.messages)n.push([Rr.message,typeof r=="function"?r(e):r]);if(c.verbose)n.push([Rr.schema,i],[Rr.parentSchema,O._`${l}${p}`],[qe.default.data,s]);if(u)n.push([Rr.propertyName,u])}});var gh=K(function(mh){Object.defineProperty(mh,"__esModule",{value:!0});mh.boolOrEmptySchema=mh.topBoolOrEmptySchema=void 0;var dh=yo(),ph=X(),TS=Zt(),RS={message:"boolean schema is false"};function IS(e){let{gen:t,schema:r,validateName:n}=e;if(r===!1)fh(e,!1);else if(typeof r=="object"&&r.$async===!0)t.return(TS.default.data);else t.assign(ph._`${n}.errors`,null),t.return(!0)}mh.topBoolOrEmptySchema=IS;function OS(e,t){let{gen:r,schema:n}=e;if(n===!1)r.var(t,!1),fh(e);else r.var(t,!0)}mh.boolOrEmptySchema=OS;function fh(e,t){let{gen:r,data:n}=e;dh.reportError({gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},RS,void 0,t)}});var Du=K(function(_h){Object.defineProperty(_h,"__esModule",{value:!0});_h.getRules=_h.isJSONType=void 0;var NS=["string","number","integer","boolean","null","object","array"],AS=new Set(NS);function MS(e){return typeof e=="string"&&AS.has(e)}_h.isJSONType=MS;function jS(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}_h.getRules=jS});var qu=K(function(bh){Object.defineProperty(bh,"__esModule",{value:!0});bh.shouldUseRule=bh.shouldUseGroup=bh.schemaHasRulesForType=void 0;function DS({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&vh(e,n)}bh.schemaHasRulesForType=DS;function vh(e,t){return t.rules.some((r)=>xh(e,r))}bh.shouldUseGroup=vh;function xh(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some((n)=>e[n]!==void 0))}bh.shouldUseRule=xh});var vo=K(function(Ph){Object.defineProperty(Ph,"__esModule",{value:!0});Ph.reportTypeError=Ph.checkDataTypes=Ph.checkDataType=Ph.coerceAndCheckDataType=Ph.getJSONTypes=Ph.getSchemaTypes=Ph.DataType=void 0;var wh=Du(),Sh=qu(),kh=yo(),E=X(),Hs=re(),on;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(on||(Ph.DataType=on={}));function FS(e){let t=zh(e.type);if(t.includes("null")){if(e.nullable===!1)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw Error('"nullable" cannot be used without "type"');if(e.nullable===!0)t.push("null")}return t}Ph.getSchemaTypes=FS;function zh(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(wh.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}Ph.getJSONTypes=zh;function US(e,t){let{gen:r,data:n,opts:o}=e,s=VS(t,o.coerceTypes),i=t.length>0&&!(s.length===0&&t.length===1&&Sh.schemaHasRulesForType(e,t[0]));if(i){let a=Fu(t,n,o.strictNumbers,on.Wrong);r.if(a,()=>{if(s.length)HS(e,t,s);else Uu(e)})}return i}Ph.coerceAndCheckDataType=US;var Eh=new Set(["string","number","integer","boolean","null"]);function VS(e,t){return t?e.filter((r)=>Eh.has(r)||t==="array"&&r==="array"):[]}function HS(e,t,r){let{gen:n,data:o,opts:s}=e,i=n.let("dataType",E._`typeof ${o}`),a=n.let("coerced",E._`undefined`);if(s.coerceTypes==="array")n.if(E._`${i} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,E._`${o}[0]`).assign(i,E._`typeof ${o}`).if(Fu(t,o,s.strictNumbers),()=>n.assign(a,o)));n.if(E._`${a} !== undefined`);for(let u of r)if(Eh.has(u)||u==="array"&&s.coerceTypes==="array")c(u);n.else(),Uu(e),n.endIf(),n.if(E._`${a} !== undefined`,()=>{n.assign(o,a),JS(e,a)});function c(u){switch(u){case"string":n.elseIf(E._`${i} == "number" || ${i} == "boolean"`).assign(a,E._`"" + ${o}`).elseIf(E._`${o} === null`).assign(a,E._`""`);return;case"number":n.elseIf(E._`${i} == "boolean" || ${o} === null
|
|
4
4
|
|| (${i} == "string" && ${o} && ${o} == +${o})`).assign(a,E._`+${o}`);return;case"integer":n.elseIf(E._`${i} === "boolean" || ${o} === null
|
|
5
5
|
|| (${i} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,E._`+${o}`);return;case"boolean":n.elseIf(E._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf(E._`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf(E._`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf(E._`${i} === "string" || ${i} === "number"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{qk,pc,Bk,Ps,Nm,Ul,Lm,Dm,Tf,ls,Wk,ji,NT}from"./plugin-
|
|
2
|
+
import{qk,pc,Bk,Ps,Nm,Ul,Lm,Dm,Tf,ls,Wk,ji,NT}from"./plugin-g7hrtg2p.js";import"./plugin-v80m00bq.js";export{NT as QuotaFailure,ls as QuotaInvalidResponse,Lm as QuotaMissingScope,Ps as QuotaObservation,Bk as QuotaObservationSource,Nm as QuotaRateLimited,Dm as QuotaServerFailure,Ul as QuotaStaleToken,Tf as QuotaTransportFailure,Wk as QuotaUnavailable,ji as QuotaUnsupported,pc as QuotaWindow,qk as QuotaWindowKind};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{FE,Is,Jw,Kw,Al,W_}from"./plugin-fre9hdcg.js";import"./plugin-g7hrtg2p.js";import"./plugin-e5ybk2a2.js";import"./plugin-8q44b578.js";import"./plugin-p6x7emar.js";import"./plugin-y9cdpmbv.js";import"./plugin-g4hst0jz.js";import"./plugin-3t0qp574.js";import"./plugin-w3zbkmy6.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{Jw as QuotaDoor,FE as quotaFailure,Al as quotaGet,W_ as quotaPost,Is as unsupportedQuota,Kw as withQuotaWire};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Em,vm,wm,sT,iT}from"./plugin-1zkx860n.js";import"./plugin-24j9hnc7.js";import"./plugin-yp736z4n.js";import"./plugin-a3vzpk4e.js";import"./plugin-g7hrtg2p.js";import"./plugin-7te9b50h.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{sT as answer,wm as complete,Em as empty,iT as fromEvents,vm as reduce};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tv,Yg}from"./plugin-
|
|
2
|
+
import{tv,Yg}from"./plugin-r342d8zf.js";import"./plugin-v80m00bq.js";export{Yg as settingFieldSchema,tv as settingLeafSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ql,Zk,xr,Dr,jn,Ie,ds,Ta,Hm,Su,sy,Et,iy,Ls,DT,mi,Gk,jm,Ds,ay,Fs,Jk,Kk,cy,wv,qm,fs,Ra,uy,ps,Bl,xt,Us,Xr,lr,Wl,Ia}from"./plugin-
|
|
2
|
+
import{ql,Zk,xr,Dr,jn,Ie,ds,Ta,Hm,Su,sy,Et,iy,Ls,DT,mi,Gk,jm,Ds,ay,Fs,Jk,Kk,cy,wv,qm,fs,Ra,uy,ps,Bl,xt,Us,Xr,lr,Wl,Ia}from"./plugin-y9cdpmbv.js";import"./plugin-3t0qp574.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{Kk as AUDIO_MIMES,Fs as IMAGE_MIMES,ql as Json,Dr as JsonObject,qm as MAX_MEDIA_DECODED_BYTES,wv as MAX_MEDIA_ENCODED_BYTES,cy as MEDIA_MIMES,Jk as VIDEO_MIMES,Su as causeChain,sy as causeCode,Zk as decodeJson,xr as encodeJson,Et as failureOf,xt as invalidRequest,mi as joinText,Ia as jsonPost,Us as matchToolChoice,jn as optionalArray,Ie as optionalNull,DT as parseJson,Ls as providerStreamFailure,Ta as subtractTokens,Hm as sumTokens,Xr as supportsContent,jm as systemUpdateText,Bl as toolId,ay as toolInput,ps as toolResultText,ds as totalTokens,uy as trimBaseUrl,lr as unsupportedContent,fs as validateMedia,Ra as validateToolFile,Wl as validateWith,iy as withAttempt,Gk as wrapSystemUpdate,Ds as wrappedSystemUpdate};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./plugin-v80m00bq.js";import"./plugin-8q44b578.js";import"./plugin-d28d8jar.js";import"./plugin-72xxqm1t.js";import"./plugin-q6pvb1xf.js";import"./plugin-3t0qp574.js";import"./plugin-me00x60n.js";import"./plugin-7te9b50h.js";import"./plugin-6vzw5yyr.js";import"./plugin-y9cdpmbv.js";import"./plugin-a3vzpk4e.js";import"./plugin-yp736z4n.js";import{ji}from"./plugin-g7hrtg2p.js";import"./plugin-24j9hnc7.js";import"./plugin-g4hst0jz.js";import"./plugin-r7g3vqrm.js";import"./plugin-p6x7emar.js";import"./plugin-w3zbkmy6.js";import"./plugin-krbbb4ts.js";import"./plugin-e5ybk2a2.js";import"./plugin-fjsmz1vy.js";import"./plugin-7xmwhj5h.js";import"./plugin-pdww1ma8.js";import"./plugin-zsv7wawc.js";import"./plugin-psj9935q.js";import"./plugin-2s6bq45c.js";import{Ea,va}from"./plugin-er1kc6f6.js";import{sm,im}from"./plugin-55fbx586.js";import{Hn}from"./plugin-dd951075.js";import{Yn}from"./plugin-g0zv4vrz.js";import"./plugin-kc4z9msd.js";import{r,c}from"./plugin-xfcgt5ba.js";var i="https://api.stepfun.ai/step_plan/v1",t=32000,e={fromHeaders:()=>null,read:()=>c(new ji)};function n(o){return Ea({reasoningEffort:Yn(o.rung),parallelToolCalls:o.parallelToolCalls})}var p={output:{budget:t,sent:!0},model:(o)=>r(va.with({provider:sm,quota:e.fromHeaders,endpoint:{baseURL:i},limits:{output:t},auth:Hn(o.credentials,o.ownerId,sm,o.account).bearer()}).model({id:o.model})),options:n},s={...im,profile:p,quota:e},R=()=>[s];export{i as STEPFUN_BASE_URL,t as STEPFUN_OUTPUT_RESERVATION,e as stepfunQuota,s as stepfunRegistration,R as stepfunRegistrations};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{PE,Pw,$E}from"./plugin-eksq91yp.js";import"./plugin-zsv7wawc.js";import"./plugin-2s6bq45c.js";import"./plugin-pdww1ma8.js";import"./plugin-kc4z9msd.js";import"./plugin-7xmwhj5h.js";import"./plugin-fjsmz1vy.js";import"./plugin-24j9hnc7.js";import"./plugin-yp736z4n.js";import"./plugin-a3vzpk4e.js";import"./plugin-r7g3vqrm.js";import"./plugin-g7hrtg2p.js";import"./plugin-e5ybk2a2.js";import"./plugin-8q44b578.js";import"./plugin-p6x7emar.js";import"./plugin-y9cdpmbv.js";import"./plugin-g4hst0jz.js";import"./plugin-3t0qp574.js";import"./plugin-w3zbkmy6.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{$E as initialState,Pw as initialStateFor,PE as step};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./plugin-
|
|
2
|
+
import"./plugin-v80m00bq.js";import{ur}from"./plugin-8v4g0q0b.js";import{rm,om}from"./plugin-hkjxkgty.js";import"./plugin-t4xrq5q2.js";import{b,T,En,v}from"./plugin-xfcgt5ba.js";var f=(t,a,d)=>{let s=new Uint8Array(t.byteLength+a.byteLength);s.set(t,0),s.set(a,t.byteLength);let n=s.byteLength-s.byteLength%d,i=new DataView(s.buffer,s.byteOffset,n),y=new Int16Array(n/2);for(let e=0;e<y.length;e++)y[e]=i.getInt16(e*2,!0);return{pcm:y,carry:s.slice(n)}},g=v(function*(t){let a=yield*om,d=2*t.format.channels,s=new Uint8Array(0),n=(e)=>{let r=[];for(let p of e.audio){let o=f(s,p,d);if(s=o.carry,o.pcm.length>0)r.push({_tag:"Audio",pcm:o.pcm})}if(e.marks.length>0)r.push({_tag:"Marks",marks:e.marks});if(e.done&&s.byteLength>0)return T(ur.provider("the synthesis ended inside a frame",!1));return b({state:e.state,send:e.send,out:r,done:e.done})},i=yield*rm({request:t.request,init:t.init,initial:t.initial,decode:t.decode,step:(e,r)=>En(t.step(e,r),n),ready:t.ready,keepalive:t.keepalive,readyMs:a.readyMs,bytesPerWeight:1,ended:ur.invalidRequest("the synthesis has ended")});return{format:t.format,say:(e)=>i.act((r)=>n(t.say(r,e))),end:i.act((e)=>n(t.end(e)),!0),audio:i.out}});export{g as synthesisDuplex};
|
package/plugin/template.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{oT,bm,sk,Zg}from"./plugin-
|
|
2
|
+
import{oT,bm,sk,Zg}from"./plugin-8x3c401q.js";export{sk as SDK_DEPENDENCY,oT as SDK_RELEASE_DEFINE,bm as SDK_VERSION,Zg as pluginTemplate};
|
package/plugin/testing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import{Tu,Hs,Ru}from"./plugin-nqmb78ez.js";import{$s}from"./plugin-3whwpedj.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import{Yl,Xl,Ur,ed,Ut,gs}from"./plugin-zz7yc97m.js";import"./plugin-nkb5bb2q.js";import{dn,pi,us}from"./plugin-gkgs7vfv.js";import"./plugin-72xxqm1t.js";import{rn,kr,de}from"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import{Et,Wl}from"./plugin-1n46me5n.js";import"./plugin-zw3ywa4b.js";import{Am}from"./plugin-a4ng6krf.js";import"./plugin-e2y95zm5.js";import{Hl,jl}from"./plugin-pfj9nc2e.js";import"./plugin-krbbb4ts.js";import{Io,xu,Fm,Um,zm}from"./plugin-3pfrkxg1.js";import"./plugin-ay29ch70.js";import"./plugin-q1n5kwx0.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import{xf}from"./plugin-sfdxgkds.js";import{Em,vm,wm}from"./plugin-521srf94.js";import"./plugin-zew2m18x.js";import"./plugin-qpda63gv.js";import{km,_m}from"./plugin-vv72e4ah.js";import"./plugin-z6hkd9rw.js";import{Sf,bf,Ef,vf}from"./plugin-g65b14k1.js";import{gu}from"./plugin-92redty0.js";import"./plugin-8230g28p.js";import"./plugin-ca4vf4j5.js";import"./plugin-6a56xsx3.js";import{Tl,Yd,Ft}from"./plugin-cydz2zhy.js";import{jf}from"./plugin-rrgyjesv.js";import"./plugin-3b8x73y6.js";import"./plugin-w8f977my.js";import{Fv,Hf}from"./plugin-nzacjxf9.js";import{Kt,oe,C,Ct,me,We,N0,or,D0,ne,Mt,bt,dp,mn,ze,r,h,d,y,f,c,Ve,s,Te,tt,ol,i,kn,es,Va,Th,Dt,co,dt,zo,ir,mr,v,ee,pt,hl,is,ga,gr,ig,nc,wo,xn,cw,Qn,Ts,Fi,Ot,un,Ui,oc,ya,sc,fg,lw,Jd,Sg}from"./plugin-6xpcmvm3.js";import{strict as E}from"assert";import{mkdtempSync as he}from"fs";import{tmpdir as Me}from"os";import{join as Le}from"path";var B={tools:!0,system:!0,messages:"latest-message"},W={};var G=(e)=>{if(e===void 0||e==="auto")return B;if(e==="none")return W;return e},V=(e)=>e!==void 0?new gs({type:"ephemeral",ttlSeconds:e}):new gs({type:"ephemeral"}),J=(e,t)=>{if(e.length===0)return e;let o=e.length-1;if(e[o].cache)return e;return e.map((n,a)=>a===o?new pi({...n,cache:t}):n)},K=(e,t)=>{if(e.length===0)return e;let o=e.length-1;if(e[o].cache)return e;return e.map((n,a)=>a===o?{...n,cache:t}:n)},Q=(e,t)=>e.findLastIndex((o)=>o.role===t),A=(e)=>e.content.findLastIndex((t)=>t.type!=="reasoning"),x=(e,t,o)=>{if(t<0||t>=e.length)return e;let n=e[t],a=A(n);if(a<0)return e;let l=n.content[a];if("cache"in l&&l.cache)return e;let m=n.content.map((g,u)=>u===a?{...g,cache:o}:g),L=new dn({...n,content:m}),M=e.slice();return M[t]=L,M},X=(e,t)=>{for(let o=e.length-1;o>=0;o--)if(A(e[o])>=0)return x(e,o,t);return e},Y=(e,t,o)=>{if(e.length===0)return e;if(t==="latest-message")return X(e,o);if(t==="latest-assistant")return x(e,Q(e,"assistant"),o);let n=Math.max(0,e.length-t.tail),a=e;for(let l=n;l<e.length;l++)a=x(a,l,o);return a},I=(e)=>{if(!e.model.route.inlineCacheHints)return e;let t=G(e.cache);if(!t.tools&&!t.system&&!t.messages)return e;let o=V(t.ttlSeconds),n=t.tools?J(e.tools,o):e.tools,a=t.system?K(e.system,o):e.system,l=t.messages?Y(e.messages,t.messages,o):e.messages;if(n===e.tools&&a===e.system&&l===e.messages)return e;return us.update(e,{tools:n,system:a,messages:l})};var O=(e)=>{let t=Ut.of(e.model),o=Z(e.messages,t);if(e.messages.every((m)=>o.some((L)=>Ut.same(m.origin,L))))return e;let n=[],a=new Set,l=[];for(let m of e.messages){let L=n.length;for(let{message:M,historical:g}of te(m,o)){if(g&&a.size>0){l.push(M);continue}let u=n.at(-1);if(n.length>L&&u?.role==="assistant"&&M.role==="assistant")n[n.length-1]=new dn({...u,content:[...u.content,...M.content]});else n.push(M);for(let p of M.content){if(M.role==="assistant"&&p.type==="tool-call"&&p.providerExecuted!==!0)a.add(p.id);if(M.role==="tool"&&p.type==="tool-result")a.delete(p.id)}if(a.size===0)n.push(...l.splice(0))}}return n.push(...l),us.update(e,{messages:n})},Z=(e,t)=>{let o=[t];for(let n=e.length-1;n>=0;n--)for(let a of e[n]?.content??[]){if(a.type!=="model-fallback")continue;if(o.some((l)=>Ut.same(a.to,l))&&!o.some((l)=>Ut.same(a.from,l)))o.push(a.from)}return o},te=(e,t)=>{if(t.some((p)=>Ut.same(e.origin,p)))return[{message:e,historical:!1}];let{native:o,id:n,requestId:a,...l}=e,m=[],L=e.role,M=!1,g=[],u=()=>{if(g.length===0)return;m.push({message:new dn({...l,id:m.length===0?n:void 0,requestId:m.length===0?a:void 0,role:L,content:g}),historical:M}),g=[]};for(let p of e.content){if(p.type==="reasoning"||p.type==="model-fallback")continue;let R=(p.type==="tool-call"||p.type==="tool-result")&&p.providerExecuted===!0,S=R&&p.type==="tool-result",k=S?"user":e.role;if(k!==L||S!==M)u(),L=k,M=S;if(R&&p.type==="tool-call")g.push(dn.text(`Recorded provider tool request: ${JSON.stringify({id:p.id,name:p.name,input:p.input})}`));else if(R&&p.type==="tool-result")if(g.push(dn.text(`Recorded provider tool result: ${JSON.stringify({id:p.id,name:p.name,type:p.result.type})}`)),p.result.type==="content")g.push(...p.result.value.map((b)=>b.type==="text"?dn.text(b.text):{type:"media",mediaType:b.mime,data:b.uri,filename:b.name}));else g.push(dn.text(typeof p.result.value==="string"?p.result.value:JSON.stringify(p.result.value)??"null"));else g.push(re(p))}return u(),m},re=(e)=>{if(e.type==="text"&&e.providerMetadata!==void 0){let{providerMetadata:t,...o}=e;return o}if(e.type==="tool-call"&&e.providerMetadata!==void 0){let{providerMetadata:t,...o}=e;return o}if(e.type==="tool-result"&&e.providerMetadata!==void 0){let{providerMetadata:t,...o}=e;return o}return e};var H=(e,t)=>{let o=e?.open?.()??t,n=!1,a=0;return{decide:(l,m)=>h(()=>{let L={...m,attempt:m.attempt-a};if(l.status===401){if(n)return r({again:!1,stop:"not-retryable",of:1,failure:new de({module:"Auth",method:"recover",reason:new kr({message:"The renewed sign-in was rejected; reconnect this account.",kind:"expired",http:"http"in l.reason?l.reason.http:void 0})})});let M=m.recover??e?.recover;if(M===void 0)return r({again:!1,stop:"not-retryable",of:1});return n=!0,i(o.decide(l,L),(g)=>{if(g.again)return{...g,prepare:g.prepare===void 0?M:Te(M,g.prepare)};return a=1,{again:!0,after:Ct,of:1,attempt:1,prepare:M}})}return o.decide(l,L)})}};class P extends oe()("@runlith/llm/LlmClient"){}var ae=(e)=>{let t=e.model.route.defaults,o=e.model.defaults,n=ed(t.generation,o?.generation,e.generation);return us.update(e,{generation:n??new Ur({}),cache:e.cache??t.cache,providerOptions:Yl(t.providerOptions,o?.providerOptions,e.providerOptions),http:Xl(t.http,o?.http,e.http)})},j=ee("LLM.compile")(function*(e,t={}){let o=e.model.compatibility?.toolChoice,n=e.toolChoice?.type??"auto";if(o!==void 0&&!o.includes(n))return yield*c(new de({module:"LLM",method:"compile",reason:new rn({parameter:"toolChoice",message:`Model ${e.model.provider}/${e.model.id} does not support tool choice "${n}"; allowed modes: ${o.join(", ")}.`})}));let a=ae(e),l=a.model.route.presentation,m=l?.resolve===void 0?void 0:yield*l.resolve(a),L=I(O(m?.request??a)),M=m?.present??l?.present,g=M===void 0?{request:L,receive:r}:yield*M(L,t),u=g.request,p=u.model.route,R=yield*p.body.from(u),S=yield*Wl(pt(p.body.schema))(R),k=g.body===void 0?S:g.body(S),b=yield*p.prepareTransport(k,u,g.encode);return{request:u,route:p,body:k,prepared:b,receive:g.receive,failed:g.failed}}),le=ee("LLMClient.prepare")(function*(e){let t=yield*j(e);return new Am({id:t.request.id??"request",route:t.route.id,protocol:t.route.protocol,model:t.request.model,body:t.body,metadata:{transport:t.route.transport.id}})}),ce=(e)=>(t,o)=>Ot(f(function*(){let n=yield*j(t,{executor:e.http}),a=!1,l=n.route.streamPrepared(n.prepared,n.request,e,o).pipe(un((L)=>L.type==="step-start"?{...L,origin:Ut.of(n.request.model)}:L),Ui(n.receive),ya((L)=>Ts(Array.isArray(L)?L:[L])),oc((L)=>d(()=>{if(L.type==="finish")a=!0})),sc(Ot(d(()=>a?xn:Qn(Et(void 0,{route:`${n.request.model.provider}/${n.route.id}`,family:"clean-eof-no-finish",message:"The stream ended without its terminal finish event"}))))),fg((L)=>n.failed?.(L)??y)),m=pe(n.route,n.body);return m===void 0?l:lw(l,Hl,m)}));function pe(e,t){let o=e.body.cachePrefix;if(o===void 0)return;let n=JSON.stringify(o(t))??"",a=2166136261;for(let l=0;l<n.length;l++)a^=n.charCodeAt(l),a=Math.imul(a,16777619);return(a>>>0).toString(36)}var ue=ee("LLM.fold")(function*(e,t,o){let n=yield*D0(),a=yield*ze,l={events:0,lastEventType:void 0},L=yield*oc(e(n),(u)=>d(()=>{l.events+=1,l.lastEventType=u.type,o?.(u)})).pipe(Sg(()=>Em(Ut.of(t.model)),vm),zo(ne(n,We))),M=wm(L);if(M)return M;let g=yield*ze;return yield*Et(void 0,{route:`${t.model.provider}/${t.model.route.id}`,message:"The stream ended without a terminal finish event",family:"clean-eof-no-finish",elapsedMs:g-a,lastEvent:{type:l.lastEventType,count:l.events}})}),fe=(e)=>e.reason._tag!=="Transport"&&!(("http"in e.reason)&&e.reason.http!==void 0),F=(e,t,o,n=0,a=[],l=H(t.model.route.retry,{decide:(m,L)=>Um(m.family,{attempt:L.attempt-1,remaining:xu-(L.attempt-1),retryAfterMs:m.retryAfterMs}).pipe(i((M)=>M.retry?{again:!0,after:M.after,of:xu}:{again:!1,stop:"not-retryable",of:xu}))}))=>es(Dt(ue(e,t,o),jl,n),"LLM.Error",(m)=>{if(t.model.route.retry?.open===void 0&&m.status!==401&&!fe(m))return c(m);let M=[...a,m];return l.decide(m,{attempt:n+1,failures:M,outputStarted:!1}).pipe(s((u)=>{if(!u.again)return c("failure"in u&&u.failure!==void 0?u.failure:m);return $s({type:"retry-scheduled",transportAttempt:n,delayMs:me(u.after)}).pipe(s(()=>Fm(u.after)),s(()=>u.prepare??y),s(()=>F(e,t,o,n+1,M,l)))}))}),ye=(e)=>(t)=>F((o)=>e(t,o),t);var U=bt(P,f(function*(){let e=ce({http:yield*Io,webSocket:Kt(yield*Th(xf))});return P.of({prepare:le,stream:e,generate:ye(e)})}));var ge=v(function*(e){let t=yield*ga(),o=[],n=0,a=!1,l,m={send:(g)=>h(()=>{if(l!==void 0)return c(l);if(!a)o.push(g);return y}),buffered:d(()=>n),messages:Fi(t),close:d(()=>{a=!0})},L={request:e,sent:o,receive:(g)=>kn(gr(t,g)),hangUp:kn(nc(t)),drop:(g)=>kn(ig(t,g)),setBuffered:(g)=>{n=g},breakSends:(g)=>{l=g},isClosed:()=>a},M=Te(d(()=>{a=!0}),nc(t));return{duplex:m,scripted:L,shut:M}}),z=f(function*(){let e=yield*ga(),t,o=0,n=v(function*(a){if(t!==void 0)yield*or(t);let l=yield*dt(tt(ge(a),()=>d(()=>{o+=1})),(m)=>Te(m.shut,d(()=>{o-=1})));return yield*gr(e,l.scripted),l.duplex});return{layer:Mt(gu,{open:n}),next:wo(e),hold:f(function*(){let a=yield*N0();return t=a,a}),live:()=>o}});var w={kind:"agent",projectId:1,agentId:"tester",ownerId:"tester",thread:null},ve=(e)=>Promise.reject(Error(`${e}: this test gave testPlugin no tagma double`)),Re=(e)=>e.structuredContent===void 0?{text:e.text,isError:e.isError===!0}:{text:e.text,isError:e.isError===!0,structured:e.structuredContent},Xt=(e,t={})=>{let o=t.tagma??ve,n=(u)=>({op:(p,R)=>o(p,R,u),in:(p)=>n(p)}),a=[],l=t.data,m=Hf(e,{get data(){return l??=he(Le(Me(),`${e.id}-data-`)),l},options:Object.fromEntries((e.options??[]).map((u)=>[u.key,t.options?.[u.key]??u.default])),client:n,log:(u)=>process.stderr.write(`${u}
|
|
2
|
+
import"./plugin-v80m00bq.js";import{Tu,Hs,Ru}from"./plugin-d28d8jar.js";import{$s}from"./plugin-8q44b578.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import{Yl,Xl,Ur,ed,Ut,gs}from"./plugin-7te9b50h.js";import"./plugin-a3vzpk4e.js";import{dn,pi,us}from"./plugin-yp736z4n.js";import"./plugin-72xxqm1t.js";import{rn,kr,de}from"./plugin-3t0qp574.js";import"./plugin-6vzw5yyr.js";import{Et,Wl}from"./plugin-y9cdpmbv.js";import"./plugin-g7hrtg2p.js";import{Am}from"./plugin-24j9hnc7.js";import"./plugin-w3zbkmy6.js";import{Hl,jl}from"./plugin-p6x7emar.js";import"./plugin-krbbb4ts.js";import{Io,xu,Fm,Um,zm}from"./plugin-e5ybk2a2.js";import"./plugin-g4hst0jz.js";import"./plugin-r7g3vqrm.js";import"./plugin-fjsmz1vy.js";import"./plugin-7xmwhj5h.js";import{xf}from"./plugin-7swap1ad.js";import{Em,vm,wm}from"./plugin-1zkx860n.js";import"./plugin-dqxdznvd.js";import"./plugin-0e34qaar.js";import{km,_m}from"./plugin-8g8myq9g.js";import"./plugin-tetj2cr3.js";import{Sf,bf,Ef,vf}from"./plugin-azkzdkpk.js";import{gu}from"./plugin-t4xrq5q2.js";import"./plugin-r342d8zf.js";import"./plugin-yg0h5k5d.js";import"./plugin-6a56xsx3.js";import{Tl,Yd,Ft}from"./plugin-cydz2zhy.js";import{jf}from"./plugin-rrgyjesv.js";import"./plugin-3b8x73y6.js";import"./plugin-w8f977my.js";import{Fv,Hf}from"./plugin-nzacjxf9.js";import{Kt,oe,C,Ct,me,We,N0,or,D0,ne,Mt,bt,dp,mn,ze,r,h,d,y,f,c,Ve,s,Te,tt,ol,i,kn,es,Va,Th,Dt,co,dt,zo,ir,mr,v,ee,pt,hl,is,ga,gr,ig,nc,wo,xn,cw,Qn,Ts,Fi,Ot,un,Ui,oc,ya,sc,fg,lw,Jd,Sg}from"./plugin-xfcgt5ba.js";import{strict as E}from"assert";import{mkdtempSync as he}from"fs";import{tmpdir as Me}from"os";import{join as Le}from"path";var B={tools:!0,system:!0,messages:"latest-message"},W={};var G=(e)=>{if(e===void 0||e==="auto")return B;if(e==="none")return W;return e},V=(e)=>e!==void 0?new gs({type:"ephemeral",ttlSeconds:e}):new gs({type:"ephemeral"}),J=(e,t)=>{if(e.length===0)return e;let o=e.length-1;if(e[o].cache)return e;return e.map((n,a)=>a===o?new pi({...n,cache:t}):n)},K=(e,t)=>{if(e.length===0)return e;let o=e.length-1;if(e[o].cache)return e;return e.map((n,a)=>a===o?{...n,cache:t}:n)},Q=(e,t)=>e.findLastIndex((o)=>o.role===t),A=(e)=>e.content.findLastIndex((t)=>t.type!=="reasoning"),x=(e,t,o)=>{if(t<0||t>=e.length)return e;let n=e[t],a=A(n);if(a<0)return e;let l=n.content[a];if("cache"in l&&l.cache)return e;let m=n.content.map((g,u)=>u===a?{...g,cache:o}:g),L=new dn({...n,content:m}),M=e.slice();return M[t]=L,M},X=(e,t)=>{for(let o=e.length-1;o>=0;o--)if(A(e[o])>=0)return x(e,o,t);return e},Y=(e,t,o)=>{if(e.length===0)return e;if(t==="latest-message")return X(e,o);if(t==="latest-assistant")return x(e,Q(e,"assistant"),o);let n=Math.max(0,e.length-t.tail),a=e;for(let l=n;l<e.length;l++)a=x(a,l,o);return a},I=(e)=>{if(!e.model.route.inlineCacheHints)return e;let t=G(e.cache);if(!t.tools&&!t.system&&!t.messages)return e;let o=V(t.ttlSeconds),n=t.tools?J(e.tools,o):e.tools,a=t.system?K(e.system,o):e.system,l=t.messages?Y(e.messages,t.messages,o):e.messages;if(n===e.tools&&a===e.system&&l===e.messages)return e;return us.update(e,{tools:n,system:a,messages:l})};var O=(e)=>{let t=Ut.of(e.model),o=Z(e.messages,t);if(e.messages.every((m)=>o.some((L)=>Ut.same(m.origin,L))))return e;let n=[],a=new Set,l=[];for(let m of e.messages){let L=n.length;for(let{message:M,historical:g}of te(m,o)){if(g&&a.size>0){l.push(M);continue}let u=n.at(-1);if(n.length>L&&u?.role==="assistant"&&M.role==="assistant")n[n.length-1]=new dn({...u,content:[...u.content,...M.content]});else n.push(M);for(let p of M.content){if(M.role==="assistant"&&p.type==="tool-call"&&p.providerExecuted!==!0)a.add(p.id);if(M.role==="tool"&&p.type==="tool-result")a.delete(p.id)}if(a.size===0)n.push(...l.splice(0))}}return n.push(...l),us.update(e,{messages:n})},Z=(e,t)=>{let o=[t];for(let n=e.length-1;n>=0;n--)for(let a of e[n]?.content??[]){if(a.type!=="model-fallback")continue;if(o.some((l)=>Ut.same(a.to,l))&&!o.some((l)=>Ut.same(a.from,l)))o.push(a.from)}return o},te=(e,t)=>{if(t.some((p)=>Ut.same(e.origin,p)))return[{message:e,historical:!1}];let{native:o,id:n,requestId:a,...l}=e,m=[],L=e.role,M=!1,g=[],u=()=>{if(g.length===0)return;m.push({message:new dn({...l,id:m.length===0?n:void 0,requestId:m.length===0?a:void 0,role:L,content:g}),historical:M}),g=[]};for(let p of e.content){if(p.type==="reasoning"||p.type==="model-fallback")continue;let R=(p.type==="tool-call"||p.type==="tool-result")&&p.providerExecuted===!0,S=R&&p.type==="tool-result",k=S?"user":e.role;if(k!==L||S!==M)u(),L=k,M=S;if(R&&p.type==="tool-call")g.push(dn.text(`Recorded provider tool request: ${JSON.stringify({id:p.id,name:p.name,input:p.input})}`));else if(R&&p.type==="tool-result")if(g.push(dn.text(`Recorded provider tool result: ${JSON.stringify({id:p.id,name:p.name,type:p.result.type})}`)),p.result.type==="content")g.push(...p.result.value.map((b)=>b.type==="text"?dn.text(b.text):{type:"media",mediaType:b.mime,data:b.uri,filename:b.name}));else g.push(dn.text(typeof p.result.value==="string"?p.result.value:JSON.stringify(p.result.value)??"null"));else g.push(re(p))}return u(),m},re=(e)=>{if(e.type==="text"&&e.providerMetadata!==void 0){let{providerMetadata:t,...o}=e;return o}if(e.type==="tool-call"&&e.providerMetadata!==void 0){let{providerMetadata:t,...o}=e;return o}if(e.type==="tool-result"&&e.providerMetadata!==void 0){let{providerMetadata:t,...o}=e;return o}return e};var H=(e,t)=>{let o=e?.open?.()??t,n=!1,a=0;return{decide:(l,m)=>h(()=>{let L={...m,attempt:m.attempt-a};if(l.status===401){if(n)return r({again:!1,stop:"not-retryable",of:1,failure:new de({module:"Auth",method:"recover",reason:new kr({message:"The renewed sign-in was rejected; reconnect this account.",kind:"expired",http:"http"in l.reason?l.reason.http:void 0})})});let M=m.recover??e?.recover;if(M===void 0)return r({again:!1,stop:"not-retryable",of:1});return n=!0,i(o.decide(l,L),(g)=>{if(g.again)return{...g,prepare:g.prepare===void 0?M:Te(M,g.prepare)};return a=1,{again:!0,after:Ct,of:1,attempt:1,prepare:M}})}return o.decide(l,L)})}};class P extends oe()("@runlith/llm/LlmClient"){}var ae=(e)=>{let t=e.model.route.defaults,o=e.model.defaults,n=ed(t.generation,o?.generation,e.generation);return us.update(e,{generation:n??new Ur({}),cache:e.cache??t.cache,providerOptions:Yl(t.providerOptions,o?.providerOptions,e.providerOptions),http:Xl(t.http,o?.http,e.http)})},j=ee("LLM.compile")(function*(e,t={}){let o=e.model.compatibility?.toolChoice,n=e.toolChoice?.type??"auto";if(o!==void 0&&!o.includes(n))return yield*c(new de({module:"LLM",method:"compile",reason:new rn({parameter:"toolChoice",message:`Model ${e.model.provider}/${e.model.id} does not support tool choice "${n}"; allowed modes: ${o.join(", ")}.`})}));let a=ae(e),l=a.model.route.presentation,m=l?.resolve===void 0?void 0:yield*l.resolve(a),L=I(O(m?.request??a)),M=m?.present??l?.present,g=M===void 0?{request:L,receive:r}:yield*M(L,t),u=g.request,p=u.model.route,R=yield*p.body.from(u),S=yield*Wl(pt(p.body.schema))(R),k=g.body===void 0?S:g.body(S),b=yield*p.prepareTransport(k,u,g.encode);return{request:u,route:p,body:k,prepared:b,receive:g.receive,failed:g.failed}}),le=ee("LLMClient.prepare")(function*(e){let t=yield*j(e);return new Am({id:t.request.id??"request",route:t.route.id,protocol:t.route.protocol,model:t.request.model,body:t.body,metadata:{transport:t.route.transport.id}})}),ce=(e)=>(t,o)=>Ot(f(function*(){let n=yield*j(t,{executor:e.http}),a=!1,l=n.route.streamPrepared(n.prepared,n.request,e,o).pipe(un((L)=>L.type==="step-start"?{...L,origin:Ut.of(n.request.model)}:L),Ui(n.receive),ya((L)=>Ts(Array.isArray(L)?L:[L])),oc((L)=>d(()=>{if(L.type==="finish")a=!0})),sc(Ot(d(()=>a?xn:Qn(Et(void 0,{route:`${n.request.model.provider}/${n.route.id}`,family:"clean-eof-no-finish",message:"The stream ended without its terminal finish event"}))))),fg((L)=>n.failed?.(L)??y)),m=pe(n.route,n.body);return m===void 0?l:lw(l,Hl,m)}));function pe(e,t){let o=e.body.cachePrefix;if(o===void 0)return;let n=JSON.stringify(o(t))??"",a=2166136261;for(let l=0;l<n.length;l++)a^=n.charCodeAt(l),a=Math.imul(a,16777619);return(a>>>0).toString(36)}var ue=ee("LLM.fold")(function*(e,t,o){let n=yield*D0(),a=yield*ze,l={events:0,lastEventType:void 0},L=yield*oc(e(n),(u)=>d(()=>{l.events+=1,l.lastEventType=u.type,o?.(u)})).pipe(Sg(()=>Em(Ut.of(t.model)),vm),zo(ne(n,We))),M=wm(L);if(M)return M;let g=yield*ze;return yield*Et(void 0,{route:`${t.model.provider}/${t.model.route.id}`,message:"The stream ended without a terminal finish event",family:"clean-eof-no-finish",elapsedMs:g-a,lastEvent:{type:l.lastEventType,count:l.events}})}),fe=(e)=>e.reason._tag!=="Transport"&&!(("http"in e.reason)&&e.reason.http!==void 0),F=(e,t,o,n=0,a=[],l=H(t.model.route.retry,{decide:(m,L)=>Um(m.family,{attempt:L.attempt-1,remaining:xu-(L.attempt-1),retryAfterMs:m.retryAfterMs}).pipe(i((M)=>M.retry?{again:!0,after:M.after,of:xu}:{again:!1,stop:"not-retryable",of:xu}))}))=>es(Dt(ue(e,t,o),jl,n),"LLM.Error",(m)=>{if(t.model.route.retry?.open===void 0&&m.status!==401&&!fe(m))return c(m);let M=[...a,m];return l.decide(m,{attempt:n+1,failures:M,outputStarted:!1}).pipe(s((u)=>{if(!u.again)return c("failure"in u&&u.failure!==void 0?u.failure:m);return $s({type:"retry-scheduled",transportAttempt:n,delayMs:me(u.after)}).pipe(s(()=>Fm(u.after)),s(()=>u.prepare??y),s(()=>F(e,t,o,n+1,M,l)))}))}),ye=(e)=>(t)=>F((o)=>e(t,o),t);var U=bt(P,f(function*(){let e=ce({http:yield*Io,webSocket:Kt(yield*Th(xf))});return P.of({prepare:le,stream:e,generate:ye(e)})}));var ge=v(function*(e){let t=yield*ga(),o=[],n=0,a=!1,l,m={send:(g)=>h(()=>{if(l!==void 0)return c(l);if(!a)o.push(g);return y}),buffered:d(()=>n),messages:Fi(t),close:d(()=>{a=!0})},L={request:e,sent:o,receive:(g)=>kn(gr(t,g)),hangUp:kn(nc(t)),drop:(g)=>kn(ig(t,g)),setBuffered:(g)=>{n=g},breakSends:(g)=>{l=g},isClosed:()=>a},M=Te(d(()=>{a=!0}),nc(t));return{duplex:m,scripted:L,shut:M}}),z=f(function*(){let e=yield*ga(),t,o=0,n=v(function*(a){if(t!==void 0)yield*or(t);let l=yield*dt(tt(ge(a),()=>d(()=>{o+=1})),(m)=>Te(m.shut,d(()=>{o-=1})));return yield*gr(e,l.scripted),l.duplex});return{layer:Mt(gu,{open:n}),next:wo(e),hold:f(function*(){let a=yield*N0();return t=a,a}),live:()=>o}});var w={kind:"agent",projectId:1,agentId:"tester",ownerId:"tester",thread:null},ve=(e)=>Promise.reject(Error(`${e}: this test gave testPlugin no tagma double`)),Re=(e)=>e.structuredContent===void 0?{text:e.text,isError:e.isError===!0}:{text:e.text,isError:e.isError===!0,structured:e.structuredContent},Xt=(e,t={})=>{let o=t.tagma??ve,n=(u)=>({op:(p,R)=>o(p,R,u),in:(p)=>n(p)}),a=[],l=t.data,m=Hf(e,{get data(){return l??=he(Le(Me(),`${e.id}-data-`)),l},options:Object.fromEntries((e.options??[]).map((u)=>[u.key,t.options?.[u.key]??u.default])),client:n,log:(u)=>process.stderr.write(`${u}
|
|
3
3
|
`),changed:(u)=>a.push(u)}),L=(u)=>({...Fv(u),[Yd]:t.projects??[]}),M=async(u,p,R)=>Re(await m.call(u,p,L(R),new AbortController().signal)),g=(u,p)=>({kind:"tagma",projectId:u,reason:p});return{manifest:jf(m.description),call:(u,p={},R=w)=>M(u,p,R),tick:(u,p={})=>{let R=Date.now();return M(Ft.schedule(u),{name:u,scheduledAt:p.scheduledAt??R,startedAt:p.startedAt??R,skipped:p.skipped??0},g(null,Tl.schedule))},end:(u,p=w.projectId)=>M(Ft.ended,u,g(p,Tl.ended)),notify:(u)=>M(Ft.notification,u,g(null,Tl.notification)),build:(u,p,R=w.projectId)=>M(Ft.build(u),p,g(R,Tl.build)),act:(u,p=w.projectId,{threadId:R,args:S=""}={})=>M(Ft.action(u),{args:S},{kind:"operator",projectId:p,view:`action:${u}`,...R===void 0?{}:{threadId:R}}),check:(u,p,R=w.projectId)=>M(Ft.hook(u),p,g(R,Tl.hook)),read:async(u,p=w)=>{let R=await m.read(u,L(p),new AbortController().signal);return"refused"in R?{text:R.refused,isError:!0}:{text:R.text,isError:!1}},changed:a}},Ee=ee("conformance.signIn")(function*(e,t){let o=e.accounts;E(o!==void 0,`Provider ${e.id} declares no subscription accounts`);let n=o.signIns.find((m)=>m.kind===t.kind);E(n!==void 0,`Provider ${e.id} declares no ${t.kind} sign-in`);let a=t.openBrowser??(()=>{throw Error("Supply openBrowser to complete the local sign-in")}),l=n.kind==="loopback"?yield*n.run(a):n.kind==="paste"?yield*f(function*(){let m=yield*n.begin();return a(m.authorizeUrl),yield*m.complete(t.input)}):n.kind==="key"?yield*n.store(t.input):yield*f(function*(){let m=yield*km(n.vendor);return a(m.verificationUriComplete??m.verificationUri),yield*n.store(yield*_m(n.vendor,m))});return yield*pt(o.credential)(l)}),be=async(e,t,o,n)=>{let[a,l]=Object.entries(e.imageModels??{})[0]??[];if(a===void 0||l===void 0)return null;E(e.images!==void 0,`Provider ${e.id} declares image models without an image profile`);let m=e.images,L=(R)=>m.generate({ownerId:"contract",model:a,credentials:t},{model:a,prompt:"contract",images:[],transparent:!1,...R}).pipe(Va(zm(o))),g=(await mr(L({}))).images[0];E(g!==void 0&&g.bytes.byteLength>0,"The stub image response did not reach the consumer"),E(g.mediaType.startsWith("image/"),`The image answer names ${g.mediaType}, not a picture type`);let u=n(),p=await mr(ol(L({images:Array.from({length:l.inputs+1},()=>g)})));return E(C(p)&&p.failure instanceof de,`${a} accepted more input images than it declares`),E.equal(n(),u,`${a} sent a request beyond what it declares instead of refusing it first`),g},Se=async(e,t)=>{let n=bf(e,t.host).providers.find((b)=>b.id===t.provider);E(n?.kind==="wire",`The kit needs a declared wire provider: ${t.provider}`);let a=t.model??n.defaultTextModel;E(n.models[a]!==void 0,`Provider ${n.id} declares no model ${a}`);let l="sign-in",m=0,L=Ru((b)=>d(()=>(m+=1,Tu(b,t.respond(b,l))))),M=t.signIn===void 0?void 0:await mr(Ee(n,t.signIn).pipe(Dt(Hs,L)));if(n.auth==="oauth")E(M!==void 0,"Exercise a declared sign-in for a subscription provider");if(n.auth==="api-key")E(t.key!==void 0,"Supply a local API key fixture");let g={apiKey:async()=>t.key??t.signIn?.input??"",accessToken:async()=>(E(M!==void 0),M.accessToken),credential:async()=>M},u=f(function*(){let b=yield*n.profile.model({ownerId:"contract",model:a,credentials:g}),N=new us({model:b,system:[],messages:[dn.user("contract")],tools:[],providerOptions:n.profile.options({model:a,rung:n.models[a].defaultReasoning,adaptive:!1,reasoningOutput:!1,outputTokens:32,switches:{}})});return yield*P.use((_)=>_.generate(N))}),p=U.pipe(mn(zm(L)));l="model";let R=await mr(u.pipe(Va(p)));E.equal(R.text,t.expectedText,"The stub model response did not reach the consumer"),l="failure";let S=await mr(ol(u).pipe(Va(p)));E(C(S),"The failing stub model call answered success"),E(S.failure instanceof de,"The adapter failure is not the host LLMError class"),l="image";let k=await be(n,g,L,()=>m);return{provider:n.id,model:a,text:R.text,failure:S.failure,image:k}},ke=16000,we=v(function*(e,t,o){let n=e.recognizer,a=t.recognition,l={turns:a.kind==="stream"?a.turns[0]:a.kind==="batch"?"client":"none",rate:a.kind==="file"?ke:a.rates[0],languages:[],detect:!1,speakers:!1,terms:[],tuning:{}},m={rate:l.rate,channels:1},L=new Int16Array(l.rate/10);if(a.kind==="batch")return yield*Jd(n.batch(t,{format:m,pcm:L},l,o));if(a.kind==="file"){let u=new Uint8Array(64),p={mime:a.containers[0],bytes:cw(u),size:u.byteLength,format:m,durationMs:100,reference:"conformance"};return yield*Jd(n.file(t,p,l,o))}let M=yield*n.stream(t,l,o),g=yield*ir(Jd(M.events));return yield*M.send(L),yield*M.finish,yield*is(g)}),Ce=v(function*(e,t,o){let n=t.synthesis,a={voice:n.voices[0].id,rate:n.rates[0],language:n.needsLanguage?n.languages[0]:void 0,timestamps:!1},l=yield*e.synthesizer.open(t,a,o),m=yield*ir(Jd(l.audio));return yield*l.say("contract"),yield*l.end,(yield*is(m)).reduce((L,M)=>L+(M._tag==="Audio"?M.pcm.length:0),0)}),Pe=async(e,t,o)=>{let{faults:n}=Sf([{owner:e,providers:t}]);E.equal(n.length,0,n.map((p)=>`${p.provider??e}: ${p.reason}`).join(`
|
|
4
4
|
`));let a=t.find((p)=>p.id===o.provider);E(a!==void 0,`The folder declares no speech provider ${o.provider}`);let l=[...a.recognizer?.models??[],...a.synthesizer?.models??[]].find((p)=>o.model===void 0||p.id===o.model);E(l!==void 0,`Provider ${a.id} declares no model ${o.model??""}`);let m=a.credential,L=m._tag==="none"?m.value:hl(m.schema)(o.credential),M=Ru((p)=>o.respond===void 0?Ve(Error(`The speech stub gave no respond for ${p.url}`)):d(()=>Tu(p,o.respond(p)))),g=f(function*(){let p=yield*z;if(o.serve!==void 0)yield*ir(s(p.next,o.serve));let R=dp(p.layer,Mt(Hs,M));return yield*("recognition"in l?i(we(a,l,L),(k)=>({heard:k,spokenSamples:0})):i(Ce(a,l,L),(k)=>({heard:[],spokenSamples:k}))).pipe(Va(R))}),u=await mr(co(g));if("recognition"in l)E(u.heard.length>0,`Provider ${a.id} heard nothing from the stub`);else E(u.spokenSamples>0,`Provider ${a.id} spoke nothing from the stub`);return{provider:a.id,model:l.id,...u}},Yt=async(e,t)=>{let o=await Ef(e,await vf(),["--no-install"]);return E(o.models===void 0||t.models!==void 0,"The folder declares models: give the fixture a models stub"),E(o.speech===void 0||t.speech!==void 0,"The folder declares speech: give the fixture a speech stub"),{...o.models===void 0||t.models===void 0?{}:{models:await Se(o.models,t.models)},...o.speech===void 0||t.speech===void 0?{}:{speech:await Pe(o.id,o.speech,t.speech)}}};export{Yt as runConformance,Xt as testPlugin};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Hi,wa,hu,Bg,$l,Nl,Wg,Ll}from"./plugin-2s6bq45c.js";import"./plugin-24j9hnc7.js";import"./plugin-yp736z4n.js";import"./plugin-a3vzpk4e.js";import"./plugin-g7hrtg2p.js";import"./plugin-y9cdpmbv.js";import"./plugin-3t0qp574.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{$l as appendExisting,Bg as appendOrStart,Hi as empty,Nl as finish,Ll as finishAll,Wg as finishWithInput,wa as isError,hu as start};
|
package/plugin/ui.generated.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/// <reference path="../host.d.ts" />
|
|
3
3
|
/// <reference lib="dom" />
|
|
4
4
|
import type { ViewServers, ViewTools } from "@runlith/tagma/plugin";
|
|
5
|
-
import type { Component, Snippet } from "@runlith/tagma/internal
|
|
6
|
-
import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes, HTMLTextareaAttributes } from "@runlith/tagma/internal
|
|
5
|
+
import type { Component, Snippet } from "@runlith/tagma/internal/../node_modules/.bun/svelte@5.57.0/node_modules/svelte/types/index";
|
|
6
|
+
import type { HTMLAnchorAttributes, HTMLAttributes, HTMLButtonAttributes, HTMLInputAttributes, HTMLTextareaAttributes } from "@runlith/tagma/internal/../node_modules/.bun/svelte@5.57.0/node_modules/svelte/elements";
|
|
7
7
|
export type TagmaView<Plugin = unknown> = {
|
|
8
8
|
readonly projectId: number;
|
|
9
9
|
readonly plugin: string;
|
|
@@ -769,7 +769,6 @@ export declare namespace DropdownMenu {
|
|
|
769
769
|
disabled?: boolean;
|
|
770
770
|
closeOnSelect?: boolean;
|
|
771
771
|
textValue?: string;
|
|
772
|
-
unstyled?: boolean;
|
|
773
772
|
children?: Snippet;
|
|
774
773
|
} & {
|
|
775
774
|
readonly icon: Component<{
|
|
@@ -781,7 +780,6 @@ export declare namespace DropdownMenu {
|
|
|
781
780
|
disabled?: boolean;
|
|
782
781
|
closeOnSelect?: boolean;
|
|
783
782
|
textValue?: string;
|
|
784
|
-
unstyled?: boolean;
|
|
785
783
|
children?: Snippet;
|
|
786
784
|
} & {
|
|
787
785
|
readonly icon?: undefined;
|
|
@@ -791,7 +789,6 @@ export declare namespace DropdownMenu {
|
|
|
791
789
|
disabled?: boolean;
|
|
792
790
|
closeOnSelect?: boolean;
|
|
793
791
|
textValue?: string;
|
|
794
|
-
unstyled?: boolean;
|
|
795
792
|
children?: Snippet;
|
|
796
793
|
} & {
|
|
797
794
|
readonly lead: Snippet;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{uk,Gg,lk,Fl}from"./plugin-0e34qaar.js";import"./plugin-dqxdznvd.js";import"./plugin-w3zbkmy6.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{Fl as runFlow,uk as vendorCall,Gg as vendorCallOrFail,lk as vendorWire};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Xn,Jg,ka,uc,dk,gf,yf,Kg}from"./plugin-
|
|
2
|
+
import{Xn,Jg,ka,uc,dk,gf,yf,Kg}from"./plugin-dqxdznvd.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-v80m00bq.js";export{Xn as OAuthFlowFailed,dk as oauthErrorSchema,uc as oauthFailure,yf as parseVendorPayload,Kg as readOAuthError,ka as readableVendorAnswer,gf as vendorSeconds,Jg as withOAuthVendorCallTimeout};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{e_,t_,n_,Ma}from"./plugin-w3zbkmy6.js";import"./plugin-6vzw5yyr.js";import"./plugin-d28d8jar.js";import"./plugin-7te9b50h.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-v80m00bq.js";export{e_ as RequestOptions,t_ as head,Ma as layer,n_ as verbatimHttpClient};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./plugin-v80m00bq.js";import"./plugin-d28d8jar.js";import"./plugin-me00x60n.js";import"./plugin-q6pvb1xf.js";import"./plugin-7te9b50h.js";import"./plugin-6vzw5yyr.js";import"./plugin-3t0qp574.js";import"./plugin-g4hst0jz.js";import"./plugin-8q44b578.js";import"./plugin-72xxqm1t.js";import"./plugin-y9cdpmbv.js";import"./plugin-a3vzpk4e.js";import"./plugin-yp736z4n.js";import"./plugin-g7hrtg2p.js";import"./plugin-24j9hnc7.js";import"./plugin-r7g3vqrm.js";import"./plugin-p6x7emar.js";import"./plugin-w3zbkmy6.js";import"./plugin-krbbb4ts.js";import"./plugin-e5ybk2a2.js";import"./plugin-fjsmz1vy.js";import"./plugin-7xmwhj5h.js";import"./plugin-pdww1ma8.js";import"./plugin-7swap1ad.js";import"./plugin-psj9935q.js";import{Rs,as}from"./plugin-zrb8bbr4.js";import"./plugin-zsv7wawc.js";import"./plugin-2s6bq45c.js";import{am,cm}from"./plugin-ak62rhwz.js";import{Hn}from"./plugin-dd951075.js";import{Is}from"./plugin-fre9hdcg.js";import{Yn}from"./plugin-g0zv4vrz.js";import"./plugin-kc4z9msd.js";import{r}from"./plugin-xfcgt5ba.js";var l="https://api.x.ai/v1",e=32000,t={fromHeaders:()=>null,read:Is},a="The model is currently at capacity due to high demand",p=(o)=>o.code===void 0&&o.message.startsWith(a)?{retryable:!0}:null;function u(o){return Rs({store:!1,reasoningEffort:Yn(o.rung),parallelToolCalls:o.parallelToolCalls})}var m={output:{budget:e,sent:!0},model:(o)=>r(f(o.model,am,Hn(o.credentials,o.ownerId,am,o.account).bearer(),t)),options:u};function f(o,i,s,n){return as.with({provider:i,quota:n.fromHeaders,refusals:p,endpoint:{baseURL:l},limits:{output:e},auth:s}).model({id:o})}var h={...cm,profile:m,quota:t};export{l as XAI_BASE_URL,e as XAI_OUTPUT_RESERVATION,h as xaiConsoleRegistration,f as xaiModel,u as xaiOptions,p as xaiRefusals};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{af,$w,Nw,cf,NE,Lw,Dw,Fw,Uw,zw,Hw,jw,qw,Bw,Ww,LE,ba,DE,Vw,Rl,Il,Zw,Gw,Cl}from"./plugin-njh1f7b2.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ba1sv0th.js";import"./plugin-kc4z9msd.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{af as ADAPTER,qw as AnthropicAssistantBlock,ba as AnthropicEfforts,Vw as AnthropicEvent,zw as AnthropicFallbackBlock,NE as AnthropicImageBlock,Bw as AnthropicMessage,Uw as AnthropicServerToolResultBlock,Fw as AnthropicServerToolResultType,Dw as AnthropicServerToolUseBlock,cf as AnthropicTextBlock,LE as AnthropicThinkingDisplays,Ww as AnthropicTool,Hw as AnthropicToolResultBlock,Lw as AnthropicToolUseBlock,DE as AnthropicUsage,jw as AnthropicUserBlock,$w as DEFAULT_BASE_URL,Nw as PATH,Rl as anthropicMetadata,Zw as headers,Il as options,Gw as protocol,Cl as route};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import"./plugin-nqmb78ez.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import"./plugin-7y7ndrk9.js";import{bu}from"./plugin-ay29ch70.js";import"./plugin-3whwpedj.js";import"./plugin-72xxqm1t.js";import"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import{ba,Il,Cl}from"./plugin-njh1f7b2.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-9gha9fx3.js";import{uf,fm}from"./plugin-vfjhxng8.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Is}from"./plugin-d6hbav22.js";import{Yn,Ml}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{r}from"./plugin-6xpcmvm3.js";var i=32000,n={fromHeaders:()=>null,read:Is},d=(o)=>{if(o.adaptive){let t=ba.find((s)=>s===o.rung);return{thinking:{type:"adaptive"},outputConfig:t===void 0?void 0:{effort:t}}}let e=Ml(Yn(o.rung),o.outputTokens);return{thinking:e===void 0?void 0:{type:"enabled",budgetTokens:e},outputConfig:void 0}},p=(o)=>Il({...d(o),disableParallelToolUse:o.parallelToolCalls===void 0?void 0:!o.parallelToolCalls}),a={output:{budget:i,sent:!0},model:(o)=>r(l(o)),options:p},l=(o)=>Cl.with({provider:uf,quota:n.fromHeaders,limits:{output:i},auth:Hn(o.credentials,o.ownerId,uf,o.account).pipe(bu("x-api-key"))}).model({id:o.model}),u={...fm,profile:a,quota:n},A=()=>[u];export{i as ANTHROPIC_OUTPUT_RESERVATION,u as anthropicConsoleRegistration,A as anthropicConsoleRegistrations,d as thinkingOptions};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hn,mm,hf}from"./plugin-zvyk8bnr.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Hn as consoleKey,hf as subscriptionFact,mm as subscriptionToken};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import"./plugin-3whwpedj.js";import"./plugin-nqmb78ez.js";import"./plugin-72xxqm1t.js";import"./plugin-frrvs5yc.js";import"./plugin-7y7ndrk9.js";import"./plugin-me00x60n.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import{ji}from"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-ay29ch70.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import"./plugin-1xze8f5y.js";import"./plugin-fhc5q7r3.js";import"./plugin-pkxw1pfs.js";import{Ea,va}from"./plugin-yxgg03s0.js";import{gm,ym}from"./plugin-80gqwmjy.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Yn}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{r,c}from"./plugin-6xpcmvm3.js";var n="https://api.deepseek.com/v1",t=32000,i={fromHeaders:()=>null,read:()=>c(new ji)};function p(e){let o=Yn(e.rung);return Ea({...o==="none"?{thinking:{type:"disabled"}}:{reasoningEffort:o},parallelToolCalls:e.parallelToolCalls})}var s={output:{budget:t,sent:!0},model:(e)=>r(va.with({provider:gm,quota:i.fromHeaders,endpoint:{baseURL:n},limits:{output:t},auth:Hn(e.credentials,e.ownerId,gm,e.account).bearer()}).model({id:e.model,compatibility:{reasoningEcho:"required"}})),options:p},a={...ym,profile:s,quota:i},g=()=>[a];export{n as DEEPSEEK_BASE_URL,t as DEEPSEEK_OUTPUT_RESERVATION,i as deepseekQuota,a as deepseekRegistration,g as deepseekRegistrations};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{QE,nk,rk,To}from"./plugin-ba1sv0th.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{To as Route,QE as generationOptions,nk as httpOptions,rk as make};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hk,jk,$m,Lr}from"./plugin-q1n5kwx0.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Lr as Endpoint,jk as merge,Hk as path,$m as render};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Io,xu,_a,Rf,zl,Vk,Fm,Um,If,LT,zm}from"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Io as HttpExecutor,xu as MAX_RETRIES,Vk as RetryHint,zm as doorExecutorLayer,If as httpExecutorLayer,_a as normalizedHeaders,Fm as retryPause,Um as retryPolicy,zl as secretValues,Rf as upstreamRequestId,LT as wireExecutorLayer};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ms,OT}from"./plugin-60bdzk1r.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{OT as json,Ms as sse};
|
package/plugin/grant-67b10nhx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Cs,nn,Vo,Ol,cs,yr,Pl,As}from"./plugin-1xze8f5y.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-zw3ywa4b.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{As as finish,Cs as initial,cs as reasoningDelta,yr as reasoningEnd,Ol as reasoningStart,nn as stepStart,Vo as textDelta,Pl as textEnd};
|
package/plugin/muse-r16jp51z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import"./plugin-nqmb78ez.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import"./plugin-7y7ndrk9.js";import"./plugin-ay29ch70.js";import"./plugin-3whwpedj.js";import"./plugin-72xxqm1t.js";import"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import"./plugin-sfdxgkds.js";import"./plugin-fhc5q7r3.js";import{Rs,as}from"./plugin-q7rk75bs.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-9gha9fx3.js";import{ef,$g,um}from"./plugin-gh857xdd.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Ng}from"./plugin-mqr325kz.js";import{Is}from"./plugin-d6hbav22.js";import{Yn}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{r}from"./plugin-6xpcmvm3.js";var t=32000,i=(o)=>`muse-build/${o.client.name}`;function s(o){let e=o.rung==="none"?void 0:Yn(o.rung);return Rs({store:!1,reasoningEffort:e,reasoningSummary:e!==void 0&&o.reasoningOutput?"auto":void 0,promptCacheKey:o.cacheGroup,parallelToolCalls:o.parallelToolCalls})}var n={fromHeaders:()=>null,read:Is},u=(o)=>({output:{budget:t,sent:!0},model:(e)=>r(as.with({provider:ef,quota:n.fromHeaders,endpoint:{baseURL:$g},limits:{output:t},auth:Hn(e.credentials,e.ownerId,ef,e.account).bearer(),headers:{"user-agent":i(o)}}).model({id:e.model,compatibility:{toolSchema:Ng}})),options:s}),g=(o)=>({...um,profile:u(o),quota:n});export{t as MUSE_OUTPUT_RESERVATION,g as museConsoleRegistration,s as museOptions,i as museUserAgent};
|
package/plugin/notes-6amdhm6h.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ea,tk,va}from"./plugin-yxgg03s0.js";import"./plugin-fhc5q7r3.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ba1sv0th.js";import"./plugin-kc4z9msd.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Ea as options,tk as protocol,va as route};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{yw,xw,Sw,Dg}from"./plugin-zxe49p72.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{xw as EDITS,yw as GENERATIONS,Dg as generateImages,Sw as imagesBody};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{nf,Ew,vw,Rs,Fg,ww,kw,_w,Tw,Rw,ME,Iw,as,Cw,H_}from"./plugin-q7rk75bs.js";import"./plugin-fhc5q7r3.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ba1sv0th.js";import"./plugin-kc4z9msd.js";import"./plugin-sfdxgkds.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{nf as ADAPTER,Ew as DEFAULT_BASE_URL,Rw as OpenAIResponsesEvent,ww as OpenAIResponsesInputItem,Tw as OpenAIResponsesStreamItem,kw as OpenAIResponsesTool,_w as OpenAIResponsesUsage,vw as PATH,Iw as httpTransport,Rs as options,ME as protocol,as as route,Fg as serviceTier,H_ as webSocketRoute,Cw as webSocketTransport};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{FE,Is,Jw,Kw,Al,W_}from"./plugin-d6hbav22.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Jw as QuotaDoor,FE as quotaFailure,Al as quotaGet,W_ as quotaPost,Is as unsupportedQuota,Kw as withQuotaWire};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Em,vm,wm,sT,iT}from"./plugin-521srf94.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-zw3ywa4b.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{sT as answer,wm as complete,Em as empty,iT as fromEvents,vm as reduce};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import"./plugin-3whwpedj.js";import"./plugin-nqmb78ez.js";import"./plugin-72xxqm1t.js";import"./plugin-frrvs5yc.js";import"./plugin-7y7ndrk9.js";import"./plugin-me00x60n.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import{ji}from"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-ay29ch70.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import"./plugin-1xze8f5y.js";import"./plugin-fhc5q7r3.js";import"./plugin-pkxw1pfs.js";import{Ea,va}from"./plugin-yxgg03s0.js";import{sm,im}from"./plugin-55fbx586.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Yn}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{r,c}from"./plugin-6xpcmvm3.js";var i="https://api.stepfun.ai/step_plan/v1",t=32000,e={fromHeaders:()=>null,read:()=>c(new ji)};function n(o){return Ea({reasoningEffort:Yn(o.rung),parallelToolCalls:o.parallelToolCalls})}var p={output:{budget:t,sent:!0},model:(o)=>r(va.with({provider:sm,quota:e.fromHeaders,endpoint:{baseURL:i},limits:{output:t},auth:Hn(o.credentials,o.ownerId,sm,o.account).bearer()}).model({id:o.model})),options:n},s={...im,profile:p,quota:e},R=()=>[s];export{i as STEPFUN_BASE_URL,t as STEPFUN_OUTPUT_RESERVATION,e as stepfunQuota,s as stepfunRegistration,R as stepfunRegistrations};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{PE,Pw,$E}from"./plugin-njh1f7b2.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import"./plugin-ba1sv0th.js";import"./plugin-kc4z9msd.js";import"./plugin-1x94cj6e.js";import"./plugin-60bdzk1r.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-q1n5kwx0.js";import"./plugin-zw3ywa4b.js";import"./plugin-3pfrkxg1.js";import"./plugin-3whwpedj.js";import"./plugin-pfj9nc2e.js";import"./plugin-1n46me5n.js";import"./plugin-ay29ch70.js";import"./plugin-7y7ndrk9.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{$E as initialState,Pw as initialStateFor,PE as step};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Hi,wa,hu,Bg,$l,Nl,Wg,Ll}from"./plugin-pkxw1pfs.js";import"./plugin-a4ng6krf.js";import"./plugin-gkgs7vfv.js";import"./plugin-nkb5bb2q.js";import"./plugin-zw3ywa4b.js";import"./plugin-1n46me5n.js";import"./plugin-7y7ndrk9.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{$l as appendExisting,Bg as appendOrStart,Hi as empty,Nl as finish,Ll as finishAll,Wg as finishWithInput,wa as isError,hu as start};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{uk,Gg,lk,Fl}from"./plugin-qpda63gv.js";import"./plugin-zew2m18x.js";import"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-krbbb4ts.js";import"./plugin-72xxqm1t.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{Fl as runFlow,uk as vendorCall,Gg as vendorCallOrFail,lk as vendorWire};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{e_,t_,n_,Ma}from"./plugin-e2y95zm5.js";import"./plugin-je5cfnqn.js";import"./plugin-nqmb78ez.js";import"./plugin-zz7yc97m.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-h66k1zhn.js";export{e_ as RequestOptions,t_ as head,Ma as layer,n_ as verbatimHttpClient};
|
package/plugin/xai-z1ysta23.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./plugin-h66k1zhn.js";import"./plugin-nqmb78ez.js";import"./plugin-me00x60n.js";import"./plugin-frrvs5yc.js";import"./plugin-zz7yc97m.js";import"./plugin-je5cfnqn.js";import"./plugin-7y7ndrk9.js";import"./plugin-ay29ch70.js";import"./plugin-3whwpedj.js";import"./plugin-72xxqm1t.js";import"./plugin-1n46me5n.js";import"./plugin-nkb5bb2q.js";import"./plugin-gkgs7vfv.js";import"./plugin-zw3ywa4b.js";import"./plugin-a4ng6krf.js";import"./plugin-q1n5kwx0.js";import"./plugin-pfj9nc2e.js";import"./plugin-e2y95zm5.js";import"./plugin-krbbb4ts.js";import"./plugin-3pfrkxg1.js";import"./plugin-60bdzk1r.js";import"./plugin-1x94cj6e.js";import"./plugin-ba1sv0th.js";import"./plugin-sfdxgkds.js";import"./plugin-fhc5q7r3.js";import{Rs,as}from"./plugin-q7rk75bs.js";import"./plugin-1xze8f5y.js";import"./plugin-pkxw1pfs.js";import{am,cm}from"./plugin-ak62rhwz.js";import{Hn}from"./plugin-zvyk8bnr.js";import{Is}from"./plugin-d6hbav22.js";import{Yn}from"./plugin-jjm52353.js";import"./plugin-kc4z9msd.js";import{r}from"./plugin-6xpcmvm3.js";var l="https://api.x.ai/v1",e=32000,t={fromHeaders:()=>null,read:Is},a="The model is currently at capacity due to high demand",p=(o)=>o.code===void 0&&o.message.startsWith(a)?{retryable:!0}:null;function u(o){return Rs({store:!1,reasoningEffort:Yn(o.rung),parallelToolCalls:o.parallelToolCalls})}var m={output:{budget:e,sent:!0},model:(o)=>r(f(o.model,am,Hn(o.credentials,o.ownerId,am,o.account).bearer(),t)),options:u};function f(o,i,s,n){return as.with({provider:i,quota:n.fromHeaders,refusals:p,endpoint:{baseURL:l},limits:{output:e},auth:s}).model({id:o})}var h={...cm,profile:m,quota:t};export{l as XAI_BASE_URL,e as XAI_OUTPUT_RESERVATION,h as xaiConsoleRegistration,f as xaiModel,u as xaiOptions,p as xaiRefusals};
|
|
File without changes
|