@shumai-one/shumai 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/bin/{chunk-h82r29wm.js → chunk-04avc4fn.js} +49 -49
  2. package/bin/chunk-0asthrjf.js +2 -0
  3. package/bin/chunk-0ge2mm8j.js +1 -0
  4. package/bin/{chunk-3z20b2hz.js → chunk-0j22699g.js} +2 -2
  5. package/bin/{chunk-j909v9p5.js → chunk-0v9srsdz.js} +1 -1
  6. package/bin/{chunk-exgtwask.js → chunk-0y4zq3y4.js} +1 -1
  7. package/bin/{chunk-5yd9cv7f.js → chunk-15vsw36h.js} +5 -5
  8. package/bin/{chunk-eez1yncf.js → chunk-15w79661.js} +2 -2
  9. package/bin/{chunk-xvdd04gy.js → chunk-19jpn3r6.js} +1 -1
  10. package/bin/{chunk-grsgkkrb.js → chunk-19q13a80.js} +6 -6
  11. package/bin/{chunk-r6gkv98n.js → chunk-1nvj833s.js} +6 -6
  12. package/bin/chunk-23780yj6.js +3 -0
  13. package/bin/chunk-2gf95tj0.js +1 -0
  14. package/bin/{chunk-6vvs18bw.js → chunk-2pw7xcrn.js} +1 -1
  15. package/bin/chunk-2tk5w3jc.js +1 -0
  16. package/bin/chunk-2w6gve12.js +4 -0
  17. package/bin/chunk-301e7g3z.js +2 -0
  18. package/bin/chunk-3kmjbc3m.js +2 -0
  19. package/bin/{chunk-zhe16jvg.js → chunk-3pm6q6kg.js} +1 -1
  20. package/bin/{chunk-zfqz72sd.js → chunk-3q5qkfkc.js} +1 -1
  21. package/bin/chunk-3td60k1m.js +2 -0
  22. package/bin/chunk-42hrvk6k.js +211 -0
  23. package/bin/chunk-4zksqvwj.js +2 -0
  24. package/bin/chunk-5bk16qdp.js +2 -0
  25. package/bin/{chunk-y03z5rrg.js → chunk-5nqvqvqp.js} +3 -3
  26. package/bin/{chunk-e3r1m6rb.js → chunk-5rzxekn4.js} +1 -1
  27. package/bin/{chunk-h9x81yp6.js → chunk-5vqbzsjv.js} +1 -1
  28. package/bin/{chunk-628k58ek.js → chunk-6hzktewz.js} +2 -2
  29. package/bin/{chunk-yfe6hkzk.js → chunk-6jkjx0n2.js} +3 -3
  30. package/bin/{chunk-gy8z8sd7.js → chunk-6rn094yj.js} +1 -1
  31. package/bin/{chunk-3cvbb6kh.js → chunk-7qvvf0yd.js} +2 -2
  32. package/bin/{chunk-35mpp84e.js → chunk-81dawvn4.js} +2 -2
  33. package/bin/chunk-8abhmarc.js +2 -0
  34. package/bin/{chunk-51h2bgpf.js → chunk-8ayz61rc.js} +3 -3
  35. package/bin/{chunk-03bfjh8k.js → chunk-8ny7wvzb.js} +2 -2
  36. package/bin/{chunk-3btc8a0p.js → chunk-8tzfcqtb.js} +2 -2
  37. package/bin/{chunk-5patxztz.js → chunk-8zgq5sav.js} +3 -3
  38. package/bin/{chunk-m1xc3t0p.js → chunk-93p27bbm.js} +6 -6
  39. package/bin/chunk-951r2rx1.js +1 -0
  40. package/bin/chunk-965102pf.js +3 -0
  41. package/bin/{chunk-hr2027z3.js → chunk-98mg3dpd.js} +8 -8
  42. package/bin/{chunk-v42jcex0.js → chunk-9bakwac0.js} +4 -4
  43. package/bin/{chunk-z8mmqfm4.js → chunk-9ggwc289.js} +1 -1
  44. package/bin/{chunk-6bgbx563.js → chunk-9zgqjdx1.js} +2 -2
  45. package/bin/{chunk-kzsdp31a.js → chunk-a8bymrv1.js} +2 -2
  46. package/bin/chunk-acn3r2m2.js +1 -0
  47. package/bin/{chunk-z1r86fna.js → chunk-ae6zgjhd.js} +2 -2
  48. package/bin/{chunk-trndqdaa.js → chunk-asy868kq.js} +1 -1
  49. package/bin/{chunk-r1m4q8vw.js → chunk-b5r0be06.js} +2 -2
  50. package/bin/{chunk-dz33q4v1.js → chunk-bbcmhcvc.js} +2 -2
  51. package/bin/{chunk-myd3wg9a.js → chunk-bpxw19ez.js} +1 -1
  52. package/bin/{chunk-sg7n2g3z.js → chunk-cdk8vqeg.js} +4 -4
  53. package/bin/chunk-ce0bhc72.js +2 -0
  54. package/bin/chunk-ce75dw3k.css +1 -0
  55. package/bin/{chunk-m7dp8rqv.js → chunk-cpj562n6.js} +1 -1
  56. package/bin/{chunk-h153xefb.js → chunk-cx32wsa1.js} +1 -1
  57. package/bin/{chunk-r5rpdhed.js → chunk-d2dgazjj.js} +1 -1
  58. package/bin/{chunk-3zvvct3r.js → chunk-d5hbzp7t.js} +1 -1
  59. package/bin/chunk-d9qpgkek.js +2 -0
  60. package/bin/{chunk-9h6nn1a3.js → chunk-dche0gy0.js} +1 -1
  61. package/bin/{chunk-zcrtr8qd.js → chunk-dppfek34.js} +2 -2
  62. package/bin/chunk-dv6p6n5e.js +1 -0
  63. package/bin/{chunk-hx76pje1.js → chunk-e439kt05.js} +1 -1
  64. package/bin/{chunk-gptzcgte.js → chunk-eqr0znmc.js} +1 -1
  65. package/bin/{chunk-q5mkbnr9.js → chunk-f5z3096k.js} +2 -2
  66. package/bin/{chunk-b9j5575n.js → chunk-ffj9cq9y.js} +2 -2
  67. package/bin/{chunk-80qz30dc.js → chunk-fxg81vtx.js} +2 -2
  68. package/bin/{chunk-5jbx9gqe.js → chunk-ggfx2b0f.js} +1 -1
  69. package/bin/chunk-gnt9gewm.js +2 -0
  70. package/bin/{chunk-czny5thj.js → chunk-grjek810.js} +2 -2
  71. package/bin/chunk-gvas3xkp.js +2 -0
  72. package/bin/{chunk-ghjhyajn.js → chunk-j53sjkxt.js} +2 -2
  73. package/bin/{chunk-0tf15vee.js → chunk-jgfye6nf.js} +2 -2
  74. package/bin/{chunk-tcat7q9p.js → chunk-jt6v15wx.js} +2 -2
  75. package/bin/{chunk-rn9rktp4.js → chunk-k3prp6c6.js} +4 -4
  76. package/bin/{chunk-mqr096rn.js → chunk-k97axrc4.js} +1 -1
  77. package/bin/{chunk-20anqpf1.js → chunk-kvwec0p3.js} +2 -2
  78. package/bin/{chunk-vbbn4hth.js → chunk-kzr6ecke.js} +1 -1
  79. package/bin/{chunk-rkq6jvhb.js → chunk-m6v8vt2b.js} +2 -2
  80. package/bin/{chunk-32japja5.js → chunk-mn108p93.js} +1 -1
  81. package/bin/{chunk-31vx01aw.js → chunk-mn208vrv.js} +2 -2
  82. package/bin/chunk-mneeg71d.js +2 -0
  83. package/bin/{chunk-d7mgjqf8.js → chunk-n76w2wcr.js} +1 -1
  84. package/bin/{chunk-fyssg02c.js → chunk-n9vp9nbg.js} +29 -29
  85. package/bin/{chunk-2g5qdx4s.js → chunk-p0j4wpa5.js} +2 -2
  86. package/bin/chunk-qb178ntp.js +2 -0
  87. package/bin/{chunk-7vd5yajk.js → chunk-qmrg2jhs.js} +7 -7
  88. package/bin/{chunk-d9btz95y.js → chunk-qxscgcn9.js} +2 -2
  89. package/bin/{chunk-0vtk7wrf.js → chunk-r249n1xe.js} +2 -2
  90. package/bin/{chunk-36r20sj7.js → chunk-r776bhsg.js} +1 -1
  91. package/bin/{chunk-1k16xsqq.js → chunk-rmvhyqyb.js} +6 -6
  92. package/bin/{chunk-zwb9kamp.js → chunk-rtaya5wc.js} +2 -2
  93. package/bin/chunk-rw5h0n0s.js +1 -0
  94. package/bin/{chunk-m9sp00a9.js → chunk-ryepy5er.js} +4 -4
  95. package/bin/{chunk-mcd7zas7.js → chunk-rza95y4z.js} +2 -2
  96. package/bin/chunk-s4r6e6ms.js +1 -0
  97. package/bin/{chunk-qgkbxw1k.js → chunk-sbyyn9yw.js} +2 -2
  98. package/bin/chunk-syjjke3f.js +1 -0
  99. package/bin/chunk-t1yamxgk.js +2 -0
  100. package/bin/chunk-tgfxe0sb.js +1 -0
  101. package/bin/chunk-tjretpx8.js +1 -0
  102. package/bin/chunk-tvkekn4z.js +1 -0
  103. package/bin/{chunk-5t05jpna.js → chunk-twpc640e.js} +1 -1
  104. package/bin/{chunk-p5v22g5n.js → chunk-v034sfw8.js} +2 -2
  105. package/bin/{chunk-wydd7sz7.js → chunk-v5hz09a1.js} +2 -2
  106. package/bin/{chunk-j3xaq9s3.js → chunk-vm2pz2hm.js} +2 -2
  107. package/bin/{chunk-mt532a33.js → chunk-vzdgsfkf.js} +1 -1
  108. package/bin/chunk-w4yjgez6.js +14 -0
  109. package/bin/{chunk-0yv0nnmh.js → chunk-w73v578p.js} +2 -2
  110. package/bin/{chunk-edjtb7pk.js → chunk-w9z27p0m.js} +2 -2
  111. package/bin/chunk-wjcebkpb.js +1 -0
  112. package/bin/{chunk-cw8z9w5c.js → chunk-wnqxyqrg.js} +2 -2
  113. package/bin/chunk-ws71fg50.js +2 -0
  114. package/bin/{chunk-g8h1e1kh.js → chunk-wwkhskce.js} +2 -2
  115. package/bin/{chunk-kgfa5y9w.js → chunk-xr2v0d6y.js} +5 -5
  116. package/bin/{chunk-wkxm6yny.js → chunk-y2dhf3p0.js} +2 -2
  117. package/bin/chunk-yfp3q4da.js +1 -0
  118. package/bin/{chunk-f22nrm6r.js → chunk-ypkkfwfb.js} +4 -4
  119. package/bin/chunk-z8e4wc59.js +1 -0
  120. package/bin/{chunk-fhq5m9ya.js → chunk-zckxc8m6.js} +2 -2
  121. package/bin/{chunk-3fjgf7eb.js → chunk-zdzkjp4q.js} +2 -2
  122. package/bin/chunk-zf5cyxnt.js +2 -0
  123. package/bin/shumai-app.html +1 -1
  124. package/bin/shumai-app.js +402 -397
  125. package/package.json +7 -7
  126. package/prisma/migrations/20261008134859_add_transcode_3d/migration.sql +2 -0
  127. package/prisma/schema.prisma +1 -0
  128. package/bin/chunk-12npypek.js +0 -2
  129. package/bin/chunk-13d525jm.js +0 -2
  130. package/bin/chunk-1yt1gsyy.js +0 -2
  131. package/bin/chunk-3ewmtf1c.js +0 -1
  132. package/bin/chunk-3xw70yr4.js +0 -2
  133. package/bin/chunk-5seey9ee.js +0 -2
  134. package/bin/chunk-66hdwm6f.js +0 -2
  135. package/bin/chunk-756mr32b.js +0 -2
  136. package/bin/chunk-7wb3dga5.js +0 -2
  137. package/bin/chunk-9k86d2a3.js +0 -4
  138. package/bin/chunk-9wk11jtz.js +0 -1
  139. package/bin/chunk-a1crhhzy.js +0 -1
  140. package/bin/chunk-axfwh5et.js +0 -2
  141. package/bin/chunk-cgsxyw07.js +0 -2
  142. package/bin/chunk-dckdnqc0.js +0 -2
  143. package/bin/chunk-dx0wz749.js +0 -211
  144. package/bin/chunk-dz4fdrmk.js +0 -1
  145. package/bin/chunk-hz9stgvn.js +0 -1
  146. package/bin/chunk-hzr8100w.js +0 -3
  147. package/bin/chunk-jb6d142z.js +0 -1
  148. package/bin/chunk-k9cgfzgk.js +0 -3
  149. package/bin/chunk-meyvvmgk.js +0 -1
  150. package/bin/chunk-n1b3pt17.js +0 -14
  151. package/bin/chunk-n5v48hz5.js +0 -2
  152. package/bin/chunk-phzemmmy.js +0 -2
  153. package/bin/chunk-qhzat67w.js +0 -2
  154. package/bin/chunk-smcn7ep7.js +0 -2
  155. package/bin/chunk-tf8q7h6b.js +0 -1
  156. package/bin/chunk-tvr5rm1g.js +0 -1
  157. package/bin/chunk-ty88m3yg.js +0 -2
  158. package/bin/chunk-v2x9915x.js +0 -1
  159. package/bin/chunk-vnk2p7mq.css +0 -1
  160. package/bin/chunk-x8hky9td.js +0 -1
  161. package/bin/chunk-y12ah7c6.js +0 -1
  162. package/bin/chunk-y7jz31ay.js +0 -1
  163. package/bin/chunk-ydk3edsw.js +0 -1
  164. package/bin/chunk-zbma2zeh.js +0 -1
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{Zr,oi,hf,e,h,d,x,U,i,r,T,y,l,s}from"./chunk-qmrg2jhs.js";function c(t,n){let o={};if(!Object.keys(n).length)return o=t,o;for(let[u,a]of Object.entries(t)){let m=n[u];if(m===null)continue;o[m??u]=a}return o}function b(t){let n={};for(let[o,u]of Object.entries(t))if(typeof u<"u")n[o]=u;return n}class w extends Error{rawValue;rawMessage;static[Symbol.hasInstance](t){if(!(t instanceof Error))return!1;if(!("rawValue"in t))return!1;if(!("rawMessage"in t))return!1;if(!("pretty"in t))return!1;if(typeof t.pretty!=="function")return!1;return!0}constructor(t,n,o){super(`${t}: ${n}`);this.name="SDKValidationError",this.cause=n,this.rawValue=o,this.rawMessage=t}pretty(){if(this.cause instanceof oi)return`${this.rawMessage}
3
+ ${lf(this.cause)}`;else return this.toString()}}function lf(t){return hf(t)}function ya(t){return{ok:!0,value:t}}function os(t){return{ok:!1,error:t}}async function N(t){let n=await t;if(!n.ok)throw n.error;return n.value}function v(t,n,o){try{return ya(n(t))}catch(u){return os(new w(o,u,t))}}var qo=r({prompt_tokens:h().default(0),completion_tokens:h().default(0),total_tokens:h().default(0),prompt_audio_seconds:s(h()).optional()}).catchall(x()).transform((t)=>c(t,{prompt_tokens:"promptTokens",completion_tokens:"completionTokens",total_tokens:"totalTokens",prompt_audio_seconds:"promptAudioSeconds"})),uc=r({promptTokens:h().default(0),completionTokens:h().default(0),totalTokens:h().default(0),promptAudioSeconds:s(h()).optional()}).catchall(x()).transform((t)=>({...c(t,{promptTokens:"prompt_tokens",completionTokens:"completion_tokens",totalTokens:"total_tokens",promptAudioSeconds:"prompt_audio_seconds"})}));function D(t){return O++,t}var O=0,P=0;function _(){P++;let t=O;return{end:(n)=>{let o=O-t;if(O=t+(n??o),--P===0)O=0;return o}}}function J(t){let n=Object.values(t);return T([...n.map((o)=>l(o)),e().transform((o)=>D(o))])}function Ya(t){let n=Object.values(t).filter((o)=>typeof o==="number");return T([...n.map((o)=>l(o)),h().transform((o)=>D(o))])}function ft(t){return e()}function pm(t){return h()}var M=Symbol("UNKNOWN");function K(t){return typeof t==="object"&&t!==null&&M in t}function We(t,n,o={}){let{unknownValue:u="UNKNOWN",outputPropertyName:a}=o;return U().transform((m)=>{let f=Object.defineProperties({raw:m,[a??t]:u,isUnknown:!0},{[M]:{value:!0,enumerable:!1,configurable:!1}});if(!(typeof m==="object"&&m!==null))return f;let S=m[t];if(typeof S!=="string")return f;if(!(S in n))return f;let j=n[S];if(!j)return f;let g=_(),C=j.safeParse(m);if(!C.success)return g.end(0),f;if(g.end(),a)C.data[a]=S;return C.data})}var Y=/^\d{4}-\d{2}-\d{2}$/;class I{serialized;static today(){return new I(new Date)}constructor(t){if(typeof t==="string"&&!Y.test(t))throw RangeError("RFCDate: date strings must be in the format YYYY-MM-DD: "+t);let n=new Date(t);if(isNaN(+n))throw RangeError("RFCDate: invalid date provided: "+t);if(this.serialized=n.toISOString().slice(0,10),!Y.test(this.serialized))throw TypeError(`RFCDate: failed to build valid date with given value: ${t} serialized to ${this.serialized}`)}toJSON(){return this.toString()}toString(){return this.serialized}}function k(t){return U().transform((n,o)=>{let u=[],a=t.map(()=>[]),m=_();for(let[z,S]of t.entries()){let j=_(),g=S.safeParse(n),C=j.end(),ie=0;if(g.success){u.push({data:g.data,inexactCount:C,zeroDefaultCount:0,fieldCount:-1});continue}a[z].push(...g.error.issues)}if(u.length===0)return m.end(0),o.addIssue({input:n,code:"invalid_union",errors:a}),Zr;let f=u[0];for(let z of u){if(u.length>1)z.fieldCount=ne(z.data);f=te(z,f)}return m.end(f.inexactCount),f.data})}function te(t,n){let o=t.inexactCount===0,u=n.inexactCount===0;if(o!==u)return o?t:n;let a=t.fieldCount-t.zeroDefaultCount,m=n.fieldCount-n.zeroDefaultCount;if(a!==m)return a>m?t:n;return t.inexactCount<n.inexactCount?t:n}function ne(t){let n=0,o=[t],u=0;while(u<o.length){let a=o[u++];if(a===void 0||K(a))continue;let m=typeof a;if(a===null||m==="number"||m==="string"||m==="boolean"||m==="bigint"||a instanceof Date||a instanceof I){n++;continue}if(Array.isArray(a)){o.push(...a);continue}if(m==="object")o.push(...Object.values(a))}return n}var B=r({type:l("input_audio"),input_audio:e()}).transform((t)=>c(t,{input_audio:"inputAudio"})),V=r({type:l("input_audio"),inputAudio:e()}).transform((t)=>c(t,{inputAudio:"input_audio"}));var Fi=r({type:l("document_url").default("document_url"),document_url:e(),document_name:s(e()).optional()}).transform((t)=>c(t,{document_url:"documentUrl",document_name:"documentName"})),Ys=r({type:l("document_url").default("document_url"),documentUrl:e(),documentName:s(e()).optional()}).transform((t)=>c(t,{documentUrl:"document_url",documentName:"document_name"}));var W=r({type:l("file").default("file"),file_id:e()}).transform((t)=>c(t,{file_id:"fileId"})),lc=r({type:l("file").default("file"),fileId:e()}).transform((t)=>c(t,{fileId:"file_id"}));var Z={Low:"low",Auto:"auto",High:"high"},q=J(Z),G=ft(Z);var L=r({url:e(),detail:s(q).optional()}),A=r({url:e(),detail:s(G).optional()});var De=k([L,e()]),Ee=k([A,e()]);var Li=r({type:l("image_url").default("image_url"),image_url:k([L,e()])}).transform((t)=>c(t,{image_url:"imageUrl"})),Js=r({type:l("image_url").default("image_url"),imageUrl:k([A,e()])}).transform((t)=>c(t,{imageUrl:"image_url"}));var Pe=k([h(),e()]),Me=k([h(),e()]);var R=r({type:l("reference").default("reference"),reference_ids:i(k([h(),e()]))}).transform((t)=>c(t,{reference_ids:"referenceIds"})),F=r({type:l("reference").default("reference"),referenceIds:i(k([h(),e()]))}).transform((t)=>c(t,{referenceIds:"reference_ids"}));var ss=r({type:l("text").default("text"),text:e()}),is=r({type:l("text").default("text"),text:e()});var H={WebSearch:"web_search",WebSearchPremium:"web_search_premium",CodeInterpreter:"code_interpreter",ImageGeneration:"image_generation",DocumentLibrary:"document_library"},pn=J(H),Xs=ft(H);var qe=k([pn,e()]),Ge=k([Xs,e()]);var ba=r({type:l("tool_reference").default("tool_reference"),tool:k([pn,e()]),title:e(),url:s(e()).optional(),favicon:s(e()).optional(),description:s(e()).optional()}),cc=r({type:l("tool_reference").default("tool_reference"),tool:k([Xs,e()]),title:e(),url:s(e()).optional(),favicon:s(e()).optional(),description:s(e()).optional()});var nt=k([ba,ss,R]),ot=k([cc,is,F]);var Zi=r({type:l("thinking").default("thinking"),thinking:i(k([ba,ss,R])),signature:s(e()).optional(),closed:d().optional()}),Bi=r({type:l("thinking").default("thinking"),thinking:i(k([cc,is,F])),signature:s(e()).optional(),closed:d().optional()});var Ja=We("type",{image_url:Li.and(r({type:l("image_url")})),document_url:Fi.and(r({type:l("document_url")})),text:ss.and(r({type:l("text")})),reference:R.and(r({type:l("reference")})),file:W.and(r({type:l("file")})),thinking:Zi.and(r({type:l("thinking")})),input_audio:B}),ei=T([Js.and(r({type:l("image_url")})),Ys.and(r({type:l("document_url")})),is.and(r({type:l("text")})),F.and(r({type:l("reference")})),lc.and(r({type:l("file")})),Bi.and(r({type:l("thinking")})),V]);var zt=k([y(e(),x()),e()]),St=k([y(e(),x()),e()]);var Q=r({name:e(),arguments:k([y(e(),x()),e()])}),X=r({name:e(),arguments:k([y(e(),x()),e()])});var vu=r({id:e().default("null"),type:e().optional(),function:Q,index:h().default(0)}),mm=r({id:e().default("null"),type:e().optional(),function:X,index:h().default(0)});var Jt=k([e(),i(Ja)]);var wu=r({role:s(e()).optional(),content:s(k([e(),i(Ja)])).optional(),tool_calls:s(i(vu)).optional(),tool_call_id:s(e()).optional(),index:s(h()).optional(),metadata:s(y(e(),x())).optional()}).transform((t)=>c(t,{tool_calls:"toolCalls",tool_call_id:"toolCallId"}));var oe={Stop:"stop",Length:"length",Error:"error",ToolCalls:"tool_calls"},re=J(oe),ee=r({index:h(),delta:wu,finish_reason:s(re)}).transform((t)=>c(t,{finish_reason:"finishReason"}));var cf=r({id:e(),object:e().optional(),created:h().optional(),model:e(),usage:qo.optional(),choices:i(ee)});function hm(t){return v(t,(n)=>cf.parse(JSON.parse(n)),"Failed to parse 'CompletionChunk' from JSON")}
4
+ export{lf,ya,os,N,v,c,b,J,Ya,ft,pm,We,k,Fi,Ys,lc,Li,Js,ss,is,pn,Xs,ba,cc,Zi,Bi,Ja,ei,vu,mm,wu,qo,uc,cf,hm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import"./chunk-19q13a80.js";import{_f,oM}from"./chunk-5nqvqvqp.js";export{_f as createKyselyAdapter,oM as kyselyAdapter};
@@ -0,0 +1,2 @@
1
+ import{I}from"./chunk-42hrvk6k.js";var e=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ec=I("code",e);
2
+ export{ec};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Xa,el}from"./chunk-3cvbb6kh.js";import{w}from"./chunk-kzsdp31a.js";var j=w(function(v,f){var{defineProperty:i,getOwnPropertyDescriptor:s,getOwnPropertyNames:_}=Object,k=Object.prototype.hasOwnProperty,l=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},u=(t,e,o,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let r of _(e))if(!k.call(t,r)&&r!==o)i(t,r,{get:()=>e[r],enumerable:!(n=s(e,r))||n.enumerable})}return t},d=(t)=>u(i({},"__esModule",{value:!0}),t),p={};l(p,{refreshToken:()=>O});f.exports=d(p);var c=Xa(),a=el();async function O(t){let e=t?.project,o=t?.team;if(!e&&!o){let r=(0,a.findProjectInfo)();e=r.projectId,o=r.teamId}else if(!e||!o){let r=(0,a.findProjectInfo)();e=e??r.projectId,o=o??r.teamId}if(!e)throw new c.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let n=(0,a.loadToken)(e);if(!n||(0,a.isExpired)((0,a.getTokenPayload)(n.token),t?.expirationBufferMs)){let r=await(0,a.getVercelToken)({expirationBufferMs:t?.expirationBufferMs});if(n=await(0,a.getVercelOidcToken)(r,e,o),!n)throw new c.VercelOidcTokenError("Failed to refresh OIDC token");(0,a.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token;return}});export default j();
2
+ import{tl,rl}from"./chunk-7qvvf0yd.js";import{w}from"./chunk-a8bymrv1.js";var j=w(function(v,f){var{defineProperty:i,getOwnPropertyDescriptor:s,getOwnPropertyNames:_}=Object,k=Object.prototype.hasOwnProperty,l=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},u=(t,e,o,n)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let r of _(e))if(!k.call(t,r)&&r!==o)i(t,r,{get:()=>e[r],enumerable:!(n=s(e,r))||n.enumerable})}return t},d=(t)=>u(i({},"__esModule",{value:!0}),t),p={};l(p,{refreshToken:()=>O});f.exports=d(p);var c=tl(),a=rl();async function O(t){let e=t?.project,o=t?.team;if(!e&&!o){let r=(0,a.findProjectInfo)();e=r.projectId,o=r.teamId}else if(!e||!o){let r=(0,a.findProjectInfo)();e=e??r.projectId,o=o??r.teamId}if(!e)throw new c.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let n=(0,a.loadToken)(e);if(!n||(0,a.isExpired)((0,a.getTokenPayload)(n.token),t?.expirationBufferMs)){let r=await(0,a.getVercelToken)({expirationBufferMs:t?.expirationBufferMs});if(n=await(0,a.getVercelOidcToken)(r,e,o),!n)throw new c.VercelOidcTokenError("Failed to refresh OIDC token");(0,a.saveToken)(n,e)}process.env.VERCEL_OIDC_TOKEN=n.token;return}});export default j();
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{wu}from"./chunk-sg7n2g3z.js";import{cr}from"./chunk-r1m4q8vw.js";import"./chunk-5patxztz.js";import{Xs,ei,ti}from"./chunk-5yd9cv7f.js";import{is}from"./chunk-k9cgfzgk.js";import{wn,xn}from"./chunk-qgkbxw1k.js";import{as}from"./chunk-628k58ek.js";import{Qn,Tr}from"./chunk-zcrtr8qd.js";import{pn}from"./chunk-3fjgf7eb.js";import{$r}from"./chunk-z1r86fna.js";import{Jt}from"./chunk-j3xaq9s3.js";var d="v1",A=new Set(["openai","openai-codex","opencode","azure-openai-responses"]),E=16;function R(r){let a=new Map;if(!r)return a;for(let e of r.split(",")){let n=e.trim();if(!n)continue;let[s,t]=n.split("=",2);if(!s||!t)continue;a.set(s.trim(),t.trim())}return a}function h(r,a){if(a?.azureDeploymentName)return a.azureDeploymentName;return R(cr("AZURE_OPENAI_DEPLOYMENT_NAME_MAP",a?.env)).get(r.id)||r.id}function g(r){return xn(wn(r),"Azure OpenAI API error")}var y=(r,a,e)=>{let n=new Jt;return(async()=>{let s=h(r,e),t={role:"assistant",content:[],api:"azure-openai-responses",provider:r.provider,model:r.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let o=e?.apiKey;if(!o)throw Error(`No API key for provider: ${r.provider}`);let i=O(r,o,e),m=Qn(a.tools,r.compat?.supportsOpenAIGrammarTools??!1),p=U(r,a,e,s,m),u=await e?.onPayload?.(p,r);if(u!==void 0)p=u;let f={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:0},{data:l,response:c}=await as(()=>i.responses.create(p,f).withResponse(),{maxRetries:e?.maxRetries,maxRetryDelayMs:e?.maxRetryDelayMs,signal:e?.signal});if(await e?.onResponse?.({status:c.status,headers:pn(c.headers)},r),n.push({type:"start",partial:t}),await ti(l,t,n,r,{grammarToolInputProperties:m}),e?.signal?.aborted)throw Error("Request was aborted");if(t.stopReason==="aborted"||t.stopReason==="error")throw Error("An unknown error occurred");n.push({type:"done",reason:t.stopReason,message:t}),n.end()}catch(o){for(let i of t.content)delete i.index,delete i.partialJson,delete i.customInput;t.stopReason=e?.signal?.aborted?"aborted":"error",t.errorMessage=g(o),n.push({type:"error",reason:t.stopReason,error:t}),n.end()}})(),n},B=(r,a,e)=>{let n=e?.apiKey;if(!n)throw Error(`No API key for provider: ${r.provider}`);let s=Tr(r,a,e,n),t=e?.reasoning?$r(r,e.reasoning):void 0;return y(r,a,{...s,reasoningEffort:t==="off"?void 0:t})};function _(r){let a=r.trim().replace(/\/+$/,""),e;try{e=new URL(a)}catch{throw Error(`Invalid Azure OpenAI base URL: ${r}`)}let n=e.hostname.endsWith(".openai.azure.com")||e.hostname.endsWith(".cognitiveservices.azure.com")||e.hostname.endsWith(".ai.azure.com"),s=e.pathname.replace(/\/+$/,"");if(n&&(s===""||s==="/"||s==="/openai"||s==="/openai/v1/responses"))e.pathname="/openai/v1",e.search="";return e.toString().replace(/\/+$/,"")}function I(r){return`https://${r}.openai.azure.com/openai/v1`}function v(r,a){let e=a?.azureApiVersion||cr("AZURE_OPENAI_API_VERSION",a?.env)||d,n=a?.azureBaseUrl?.trim()||cr("AZURE_OPENAI_BASE_URL",a?.env)?.trim()||void 0,s=a?.azureResourceName||cr("AZURE_OPENAI_RESOURCE_NAME",a?.env),t=n;if(!t&&s)t=I(s);if(!t&&r.baseUrl)t=r.baseUrl;if(!t)throw Error("Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.");return{baseUrl:_(t),apiVersion:e}}function O(r,a,e){let n={...r.headers};if(e?.headers)Object.assign(n,e.headers);let{baseUrl:s,apiVersion:t}=v(r,e);return new wu({apiKey:a,apiVersion:t,dangerouslyAllowBrowser:!0,defaultHeaders:n,baseURL:s})}function U(r,a,e,n,s=Qn(a.tools,r.compat?.supportsOpenAIGrammarTools??!1)){let t=Xs(r,a,A,{grammarToolInputProperties:s}),o={model:n,input:t,stream:!0,prompt_cache_key:is(e?.sessionId),store:!1};if(e?.maxTokens)o.max_output_tokens=Math.max(e.maxTokens,E);if(e?.temperature!==void 0)o.temperature=e?.temperature;if(a.tools&&a.tools.length>0)o.tools=ei(a.tools,{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1});if(r.reasoning){if(e?.reasoningEffort||e?.reasoningSummary){let i=e?.reasoningEffort?r.thinkingLevelMap?.[e.reasoningEffort]??e.reasoningEffort:"medium";o.reasoning={effort:i,summary:e?.reasoningSummary||"auto"},o.include=["reasoning.encrypted_content"]}else if(r.thinkingLevelMap?.off!==null)o.reasoning={effort:r.thinkingLevelMap?.off??"none"}}return o}export{y as stream,B as streamSimple};
2
+ import{xu}from"./chunk-cdk8vqeg.js";import{dr}from"./chunk-b5r0be06.js";import"./chunk-8zgq5sav.js";import{ti,ri,ni}from"./chunk-15vsw36h.js";import{as}from"./chunk-23780yj6.js";import{xn,Sn}from"./chunk-sbyyn9yw.js";import{ls}from"./chunk-6hzktewz.js";import{Wn,Tr}from"./chunk-dppfek34.js";import{mn}from"./chunk-zdzkjp4q.js";import{Gr}from"./chunk-ae6zgjhd.js";import{Jt}from"./chunk-vm2pz2hm.js";var d="v1",A=new Set(["openai","openai-codex","opencode","azure-openai-responses"]),E=16;function R(r){let a=new Map;if(!r)return a;for(let e of r.split(",")){let n=e.trim();if(!n)continue;let[s,t]=n.split("=",2);if(!s||!t)continue;a.set(s.trim(),t.trim())}return a}function h(r,a){if(a?.azureDeploymentName)return a.azureDeploymentName;return R(dr("AZURE_OPENAI_DEPLOYMENT_NAME_MAP",a?.env)).get(r.id)||r.id}function g(r){return Sn(xn(r),"Azure OpenAI API error")}var y=(r,a,e)=>{let n=new Jt;return(async()=>{let s=h(r,e),t={role:"assistant",content:[],api:"azure-openai-responses",provider:r.provider,model:r.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"stop",timestamp:Date.now()};try{let o=e?.apiKey;if(!o)throw Error(`No API key for provider: ${r.provider}`);let i=O(r,o,e),m=Wn(a.tools,r.compat?.supportsOpenAIGrammarTools??!1),p=U(r,a,e,s,m),u=await e?.onPayload?.(p,r);if(u!==void 0)p=u;let f={...e?.signal?{signal:e.signal}:{},...e?.timeoutMs!==void 0?{timeout:e.timeoutMs}:{},maxRetries:0},{data:l,response:c}=await ls(()=>i.responses.create(p,f).withResponse(),{maxRetries:e?.maxRetries,maxRetryDelayMs:e?.maxRetryDelayMs,signal:e?.signal});if(await e?.onResponse?.({status:c.status,headers:mn(c.headers)},r),n.push({type:"start",partial:t}),await ni(l,t,n,r,{grammarToolInputProperties:m}),e?.signal?.aborted)throw Error("Request was aborted");if(t.stopReason==="aborted"||t.stopReason==="error")throw Error("An unknown error occurred");n.push({type:"done",reason:t.stopReason,message:t}),n.end()}catch(o){for(let i of t.content)delete i.index,delete i.partialJson,delete i.customInput;t.stopReason=e?.signal?.aborted?"aborted":"error",t.errorMessage=g(o),n.push({type:"error",reason:t.stopReason,error:t}),n.end()}})(),n},B=(r,a,e)=>{let n=e?.apiKey;if(!n)throw Error(`No API key for provider: ${r.provider}`);let s=Tr(r,a,e,n),t=e?.reasoning?Gr(r,e.reasoning):void 0;return y(r,a,{...s,reasoningEffort:t==="off"?void 0:t})};function _(r){let a=r.trim().replace(/\/+$/,""),e;try{e=new URL(a)}catch{throw Error(`Invalid Azure OpenAI base URL: ${r}`)}let n=e.hostname.endsWith(".openai.azure.com")||e.hostname.endsWith(".cognitiveservices.azure.com")||e.hostname.endsWith(".ai.azure.com"),s=e.pathname.replace(/\/+$/,"");if(n&&(s===""||s==="/"||s==="/openai"||s==="/openai/v1/responses"))e.pathname="/openai/v1",e.search="";return e.toString().replace(/\/+$/,"")}function I(r){return`https://${r}.openai.azure.com/openai/v1`}function v(r,a){let e=a?.azureApiVersion||dr("AZURE_OPENAI_API_VERSION",a?.env)||d,n=a?.azureBaseUrl?.trim()||dr("AZURE_OPENAI_BASE_URL",a?.env)?.trim()||void 0,s=a?.azureResourceName||dr("AZURE_OPENAI_RESOURCE_NAME",a?.env),t=n;if(!t&&s)t=I(s);if(!t&&r.baseUrl)t=r.baseUrl;if(!t)throw Error("Azure OpenAI base URL is required. Set AZURE_OPENAI_BASE_URL or AZURE_OPENAI_RESOURCE_NAME, or pass azureBaseUrl, azureResourceName, or model.baseUrl.");return{baseUrl:_(t),apiVersion:e}}function O(r,a,e){let n={...r.headers};if(e?.headers)Object.assign(n,e.headers);let{baseUrl:s,apiVersion:t}=v(r,e);return new xu({apiKey:a,apiVersion:t,dangerouslyAllowBrowser:!0,defaultHeaders:n,baseURL:s})}function U(r,a,e,n,s=Wn(a.tools,r.compat?.supportsOpenAIGrammarTools??!1)){let t=ti(r,a,A,{grammarToolInputProperties:s}),o={model:n,input:t,stream:!0,prompt_cache_key:as(e?.sessionId),store:!1};if(e?.maxTokens)o.max_output_tokens=Math.max(e.maxTokens,E);if(e?.temperature!==void 0)o.temperature=e?.temperature;if(a.tools&&a.tools.length>0)o.tools=ri(a.tools,{supportsStrictMode:r.compat?.supportsStrictMode??!0,supportsOpenAIGrammarTools:r.compat?.supportsOpenAIGrammarTools??!1});if(r.reasoning){if(e?.reasoningEffort||e?.reasoningSummary){let i=e?.reasoningEffort?r.thinkingLevelMap?.[e.reasoningEffort]??e.reasoningEffort:"medium";o.reasoning={effort:i,summary:e?.reasoningSummary||"auto"},o.include=["reasoning.encrypted_content"]}else if(r.thinkingLevelMap?.off!==null)o.reasoning={effort:r.thinkingLevelMap?.off??"none"}}return o}export{y as stream,B as streamSimple};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{pf,On,pc,mc,hc,gc,Su,Eu,Am,jA,Ms,Ho,qr}from"./chunk-5vqbzsjv.js";export{hc as EncryptJWT,mc as SignJWT,Am as UnsecuredJWT,pf as base64url,gc as calculateJwkThumbprint,Su as createLocalJWKSet,Eu as createRemoteJWKSet,qr as decodeJwt,Ho as decodeProtectedHeader,Ms as importJWK,jA as importPKCS8,pc as jwtDecrypt,On as jwtVerify};