@yukino.js/yukino 0.0.13 → 0.0.15
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/README.md +13 -11
- package/dist/a2a-ANR7PFD4.js +15 -0
- package/dist/acp-4E7R254I.js +14 -0
- package/dist/{anthropic-74ALYMH2.js → anthropic-ZO73YJFY.js} +1 -1
- package/dist/browser/dist/index.html +44 -0
- package/dist/browser/dist/static/index.css +2 -0
- package/dist/browser/dist/static/index.js +203 -0
- package/dist/bwrap-LVIPV72Q.js +0 -0
- package/dist/chunk-3KKA6537.js +0 -0
- package/dist/chunk-3RH3COZW.js +365 -0
- package/dist/chunk-4JHZPFU6.js +67 -0
- package/dist/chunk-7MKA3SHV.js +0 -0
- package/dist/{chunk-OREDGNI6.js → chunk-B2RNOTT5.js} +1 -1
- package/dist/{chunk-APJAUOF6.js → chunk-C56EKYBO.js} +1 -1
- package/dist/{chunk-WGFROGUC.js → chunk-CKOUBYG6.js} +0 -0
- package/dist/{chunk-6JUOKMSJ.js → chunk-CW6G3RYM.js} +1 -1
- package/dist/{chunk-556TRLPT.js → chunk-CWWRUTF2.js} +1 -1
- package/dist/chunk-DVB57IVG.js +18 -0
- package/dist/chunk-ETZPOVUC.js +4 -0
- package/dist/chunk-F3JTT3TI.js +110 -0
- package/dist/chunk-FC2LG24U.js +4 -0
- package/dist/chunk-FNQMXCCE.js +4 -0
- package/dist/chunk-HWCLMDQF.js +0 -0
- package/dist/chunk-I74AL3PF.js +0 -0
- package/dist/chunk-IOMQY54U.js +967 -0
- package/dist/chunk-IQT2IFSO.js +4 -0
- package/dist/chunk-K45OXLJJ.js +16 -0
- package/dist/chunk-KJJYW5IY.js +0 -0
- package/dist/chunk-LCWNSYZU.js +0 -0
- package/dist/chunk-LR4ZNAAM.js +4 -0
- package/dist/chunk-LTMY67B2.js +5 -0
- package/dist/chunk-MDPSQ6L7.js +0 -0
- package/dist/chunk-MQAQBW7F.js +0 -0
- package/dist/{chunk-NEU4ER5V.js → chunk-NSNTZXFL.js} +1 -1
- package/dist/chunk-P6DHMU7R.js +0 -0
- package/dist/chunk-VCIRD267.js +0 -0
- package/dist/chunk-VM4YKTHC.js +0 -0
- package/dist/chunk-VU3JWAJR.js +0 -0
- package/dist/chunk-W4GMCNWF.js +0 -0
- package/dist/chunk-XY7ZFVZL.js +4 -0
- package/dist/devtools-UVGRIXO2.js +0 -0
- package/dist/{esm-HW2JMFYC.js → esm-2JJG3HR7.js} +1 -1
- package/dist/esm-7DWXO52B.js +4 -0
- package/dist/{esm-6L5BJ5GT.js → esm-EOOB75BT.js} +1 -1
- package/dist/{esm-DIYJ5HX6.js → esm-H73EL6IR.js} +1 -1
- package/dist/{esm-YKAO4ES6.js → esm-IBZKE3IU.js} +1 -1
- package/dist/esm-W4NAAZTQ.js +225 -0
- package/dist/{esm-RPR2GBJ2.js → esm-Y237QNPJ.js} +1 -1
- package/dist/getMachineId-bsd-A3UCSHLE.js +4 -0
- package/dist/getMachineId-bsd-E27XJQLX.js +0 -0
- package/dist/getMachineId-darwin-35UPAIXP.js +0 -0
- package/dist/getMachineId-darwin-MWJEU7OI.js +5 -0
- package/dist/getMachineId-linux-FNSLKUDN.js +4 -0
- package/dist/getMachineId-linux-MKXIYT6A.js +0 -0
- package/dist/getMachineId-unsupported-PKQWB2OJ.js +4 -0
- package/dist/getMachineId-unsupported-ZXVGGFX2.js +0 -0
- package/dist/getMachineId-win-3A667JT3.js +4 -0
- package/dist/getMachineId-win-RNVIYJG5.js +0 -0
- package/dist/lib/{anthropic-EQRUGP2C.js → anthropic-SQBOFRPQ.js} +4 -4
- package/dist/lib/{chunk-EGT7BJRD.js → chunk-AW2577J5.js} +2 -2
- package/dist/lib/{chunk-JYCSWXCR.js → chunk-GPJL4PLE.js} +2 -2
- package/dist/lib/{chunk-UBVKYJFI.js → chunk-IHVYAEY2.js} +1058 -522
- package/dist/lib/{chunk-CDMR25FD.js → chunk-U3OT4POQ.js} +3 -3
- package/dist/lib/{chunk-HUTUNNDX.js → chunk-WNGF7243.js} +0 -1
- package/dist/lib/{chunk-FUJDUZTH.js → chunk-WXR5HNB4.js} +1 -1
- package/dist/lib/{chunk-WWCSFKMR.js → chunk-XS3GONYN.js} +2 -11
- package/dist/lib/index.d.ts +98 -282
- package/dist/lib/index.js +1092 -2409
- package/dist/lib/{openai-B3I5WBFT.js → openai-UV4KFNQV.js} +3 -3
- package/dist/lib/{providers-EJ4VBHNP.js → providers-77VBEX3K.js} +2 -2
- package/dist/lib/{tool-filter-TURPCYFR.js → tool-filter-MLYQGWM5.js} +3 -3
- package/dist/{main-JEEKFCGX.js → main-653YZQHY.js} +228 -232
- package/dist/main.js +2 -2
- package/dist/node-634LOHDX.js +0 -0
- package/dist/{openai-7C6BVQ7M.js → openai-FKLMHNNC.js} +1 -1
- package/dist/providers-4IU7SUEQ.js +4 -0
- package/dist/seatbelt-UO7HGD4Z.js +0 -0
- package/dist/server-4NHV4RJL.js +4 -0
- package/dist/slim-Q56GHZZP.js +0 -0
- package/dist/{src-JBRNH4FA.js → src-DEVJGNXS.js} +1 -1
- package/dist/{src-X6JWWHHT.js → src-EMFESWQS.js} +1 -1
- package/dist/{src-R4BSSIJJ.js → src-GG4YROJH.js} +1 -1
- package/dist/{src-43CPCEK2.js → src-JFAO2DGP.js} +1 -1
- package/dist/tool-filter-LJTLMGFP.js +4 -0
- package/dist/turndown.es-NQ3KDXM7.js +0 -0
- package/package.json +22 -21
- package/dist/a2a-DKWMWGID.js +0 -14
- package/dist/acp-RL6DKS3R.js +0 -14
- package/dist/chunk-2LHY3FND.js +0 -67
- package/dist/chunk-3QL446GD.js +0 -4
- package/dist/chunk-6FSIG63T.js +0 -364
- package/dist/chunk-A5G5NTDB.js +0 -1015
- package/dist/chunk-A7CJPQC5.js +0 -5
- package/dist/chunk-AGSYLE4E.js +0 -16
- package/dist/chunk-CJSMVCUF.js +0 -6
- package/dist/chunk-CU3IISCC.js +0 -4
- package/dist/chunk-HMZQYFYG.js +0 -4
- package/dist/chunk-JFKC4VCA.js +0 -4
- package/dist/chunk-KCMBAHWU.js +0 -4
- package/dist/chunk-SCR7NDDL.js +0 -63
- package/dist/esm-57CJEGGK.js +0 -4
- package/dist/esm-YOQPBF42.js +0 -225
- package/dist/fe/dist/index.html +0 -21
- package/dist/fe/dist/static/index.css +0 -2
- package/dist/fe/dist/static/index.js +0 -203
- package/dist/providers-U23PWAHG.js +0 -4
- package/dist/server-EOSEQPNY.js +0 -4
- package/dist/tool-filter-UDSHRE5F.js +0 -4
package/dist/main.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{a as l,b as f,c as h}from"./chunk-
|
|
4
|
+
import{a as l,b as f,c as h}from"./chunk-NSNTZXFL.js";import{a as s}from"./chunk-CWWRUTF2.js";import{C as g}from"./chunk-W4GMCNWF.js";import"./chunk-7MKA3SHV.js";import{parseArgs as j}from"util";import{execFile as x,spawn as C}from"child_process";import{readFileSync as S,realpathSync as w}from"fs";import{dirname as i,isAbsolute as b,join as A,relative as N,sep as T}from"path";import{fileURLToPath as M}from"url";function y(n,t,o=process.platform){return o!=="win32"?{command:n,args:t}:{command:"powershell.exe",args:["-NoProfile","-NonInteractive","-Command",`$ErrorActionPreference = 'Stop'; [Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false); & ${[n,...t].map(r=>`'${r.replaceAll("'","''")}'`).join(" ")}; exit $LASTEXITCODE`]}}function Y(){let n=i(M(import.meta.url));for(;;){try{let o=JSON.parse(S(A(n,"package.json"),"utf8"));if(g.object({name:g.string()}).safeParse(o).data?.name===l)return n}catch{}let t=i(n);if(t===n)throw new Error("Could not locate the Yukino installation.");n=t}}function I(n,t){try{let o=N(w(t),w(n));return o!==""&&o!==".."&&!o.startsWith(`..${T}`)&&!b(o)}catch{return!1}}async function $(n,t=Y()){let o=t.replaceAll("\\","/").toLowerCase(),e=/\/(?:\.pnpm|pnpm)\//u.test(o)?"pnpm":/\/(?:\.yarn|yarn)\//u.test(o)?"yarn":"npm",r=y(e,e==="yarn"?["global","dir"]:["root","-g"]),a="";try{a=await new Promise((c,v)=>{x(r.command,r.args,{encoding:"utf8",timeout:1e4,windowsHide:!0},(d,E)=>{d?v(new Error(d.message,{cause:d})):c(E.trim())})})}catch{}let m=i(i(t)),p=e==="npm"&&o.endsWith(`/lib/node_modules/${l}`)?i(i(m)):void 0,u=[a,...p?[m]:[]];if(e==="pnpm"&&a&&u.push(i(a)),!u.some(c=>c&&I(t,c)))throw new Error("This Yukino installation is not managed by global npm, yarn, or pnpm. Update the source checkout or reinstall using yukino-code/install.sh or yukino-code/install.ps1.");return{command:e,args:[...e==="yarn"?["global","add"]:["install","-g"],...p?["--prefix",p]:[],`${l}@${n}`,"--registry=https://registry.npmjs.org/"]}}async function k(n){let t=y(n.command,n.args);await new Promise((o,e)=>{let r=C(t.command,t.args,{stdio:"inherit"});r.once("error",e),r.once("close",(a,m)=>{a===0?o():e(new Error(m?`${n.command} was terminated by ${m}.`:`${n.command} exited with code ${a??"unknown"}.`))})})}var U="Usage: yukino update [--tag <tag>]";function L(n){try{return j({args:n,options:{tag:{type:"string"},help:{type:"boolean",short:"h"}},strict:!0,allowPositionals:!1}).values}catch(t){throw new Error(`${t instanceof Error?t.message:String(t)}
|
|
5
5
|
${U}`,{cause:t})}}async function P(n){if(n.length===1&&["--version","-v"].includes(n[0]))return console.log(s),!0;if(n[0]!=="update")return!1;try{let t=L(n.slice(1));if(t.help)return console.log(`${U}
|
|
6
6
|
|
|
7
7
|
Update Yukino from an npm dist-tag.
|
|
@@ -12,4 +12,4 @@ Options:
|
|
|
12
12
|
|
|
13
13
|
Examples:
|
|
14
14
|
yukino update
|
|
15
|
-
yukino update --tag=canary`),!0;let o=await h({tag:t.tag});if(!f(o,s))return console.log(`Yukino is already up to date (v${s}).`),!0;let e=await $(o);console.log(`Updating Yukino from v${s} to v${o} with ${e.command}...`),await k(e),console.log(`Updated Yukino from v${s} to v${o}.`)}catch(t){console.error(`Update failed: ${t instanceof Error?t.message:String(t)}`),process.exitCode=1}return!0}if(!await P(process.argv.slice(2))){let{runCli:n}=await import("./main-
|
|
15
|
+
yukino update --tag=canary`),!0;let o=await h({tag:t.tag});if(!f(o,s))return console.log(`Yukino is already up to date (v${s}).`),!0;let e=await $(o);console.log(`Updating Yukino from v${s} to v${o} with ${e.command}...`),await k(e),console.log(`Updated Yukino from v${s} to v${o}.`)}catch(t){console.error(`Update failed: ${t instanceof Error?t.message:String(t)}`),process.exitCode=1}return!0}if(!await P(process.argv.slice(2))){let{runCli:n}=await import("./main-653YZQHY.js");await n()}
|
package/dist/node-634LOHDX.js
CHANGED
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{a as dn}from"./chunk-P6DHMU7R.js";import{a as ln}from"./chunk-OREDGNI6.js";import{C as pn,D as St,E as Cs,F as io,G as ce,H as ao,I as Ss,J as ks,n as on,p as an,r as un,s as cn,v as Jr}from"./chunk-A7CJPQC5.js";import"./chunk-MQAQBW7F.js";import{k as no,n as Xr,o as $e,p as oo,q as Rs,v as ie}from"./chunk-HWCLMDQF.js";import"./chunk-LCWNSYZU.js";import{C as j}from"./chunk-W4GMCNWF.js";import"./chunk-7MKA3SHV.js";function x(r,e,t,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t}function c(r,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(r):s?s.value:e.get(r)}var Ve=function(){let{crypto:r}=globalThis;if(r?.randomUUID)return Ve=r.randomUUID.bind(r),r.randomUUID();let e=new Uint8Array(1),t=r?()=>r.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,s=>(+s^t()&15>>+s/4).toString(16))};function Vr(r){return typeof r=="object"&&r!==null&&("name"in r&&r.name==="AbortError"||"message"in r&&String(r.message).includes("FetchRequestCanceledException"))}var Gr=r=>{if(r instanceof Error)return r;if(typeof r=="object"&&r!==null){try{if(Object.prototype.toString.call(r)==="[object Error]"){let e=new Error(r.message,r.cause?{cause:r.cause}:{});return r.stack&&(e.stack=r.stack),r.cause&&!e.cause&&(e.cause=r.cause),r.name&&(e.name=r.name),e}}catch{}try{return new Error(JSON.stringify(r))}catch{}}return new Error(r)};var y=class extends Error{},M=class r extends y{constructor(e,t,s,n){super(`${r.makeMessage(e,t,s)}`),this.status=e,this.headers=n,this.requestID=n?.get("x-request-id"),this.error=t;let o=t;this.code=o?.code,this.param=o?.param,this.type=o?.type}static makeMessage(e,t,s){let n=t?.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):s;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,t,s,n){if(!e||!n)return new Ee({message:s,cause:Gr(t)});let o=t?.error;return e===400?new kt(e,o,s,n):e===401?new $t(e,o,s,n):e===403?new Et(e,o,s,n):e===404?new Ot(e,o,s,n):e===409?new vt(e,o,s,n):e===422?new Tt(e,o,s,n):e===429?new Lt(e,o,s,n):e>=500?new jt(e,o,s,n):new r(e,o,s,n)}},K=class extends M{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},Ee=class extends M{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}},Oe=class extends Ee{constructor({message:e}={}){super({message:e??"Request timed out."})}},kt=class extends M{},$t=class extends M{},Et=class extends M{},Ot=class extends M{},vt=class extends M{},Tt=class extends M{},Lt=class extends M{},jt=class extends M{},Ft=class extends y{constructor(){super("Could not parse response content as the length limit was reached")}},Nt=class extends y{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},me=class extends Error{constructor(e){super(e)}},Ge=class extends M{constructor(e,t,s){let n="OAuth2 authentication error",o;if(t&&typeof t=="object"){let a=t;o=a.error;let l=a.error_description;l&&typeof l=="string"?n=l:o&&(n=o)}super(e,t,n,s),this.error_code=o}},Qr=class extends y{constructor(e,t,s){super(e),this.provider=t,this.cause=s}};var $i=/^[a-z][a-z0-9+.-]*:/i,uo=r=>$i.test(r),G=r=>(G=Array.isArray,G(r)),fn=G;function $s(r){return typeof r!="object"?{}:r??{}}function mn(r){if(!r)return!0;for(let e in r)return!1;return!0}function co(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Yr(r){return r!=null&&typeof r=="object"&&!Array.isArray(r)}var lo=(r,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new y(`${r} must be an integer`);if(e<0)throw new y(`${r} must be a positive integer`);return e};var po=r=>{try{return JSON.parse(r)}catch{return}};var he=r=>new Promise(e=>setTimeout(e,r));var ve="6.49.0";var _o=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function Ei(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var Oi=()=>{let r=Ei();if(r==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":mo(Deno.build.os),"X-Stainless-Arch":fo(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(r==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":mo(globalThis.process.platform??"unknown"),"X-Stainless-Arch":fo(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=vi();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function vi(){if(typeof navigator>"u"||!navigator)return null;let r=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:t}of r){let s=t.exec(navigator.userAgent);if(s){let n=s[1]||0,o=s[2]||0,a=s[3]||0;return{browser:e,version:`${n}.${o}.${a}`}}}return null}var fo=r=>r==="x32"?"x32":r==="x86_64"||r==="x64"?"x64":r==="arm"?"arm":r==="aarch64"||r==="arm64"?"arm64":r?`other:${r}`:"unknown",mo=r=>(r=r.toLowerCase(),r.includes("ios")?"iOS":r==="android"?"Android":r==="darwin"?"MacOS":r==="win32"?"Windows":r==="freebsd"?"FreeBSD":r==="openbsd"?"OpenBSD":r==="linux"?"Linux":r?`Other:${r}`:"Unknown"),ho,yo=()=>ho??(ho=Oi());function Es(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function hn(...r){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...r)}function Zr(r){let e=Symbol.asyncIterator in r?r[Symbol.asyncIterator]():r[Symbol.iterator]();return hn({start(){},async pull(t){let{done:s,value:n}=await e.next();s?t.close():t.enqueue(n)},async cancel(){await e.return?.()}})}function Os(r){if(r[Symbol.asyncIterator])return r;let e=r.getReader();return{async next(){try{let t=await e.read();return t?.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){let t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function _n(r){if(r===null||typeof r!="object")return;if(r[Symbol.asyncIterator]){await r[Symbol.asyncIterator]().return?.();return}let e=r.getReader(),t=e.cancel();e.releaseLock(),await t}var Ao=({headers:r,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});var yn="RFC3986",gn=r=>String(r),An={RFC1738:r=>String(r).replace(/%20/g,"+"),RFC3986:gn},bo="RFC1738";var vs=(r,e)=>(vs=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),vs(r,e)),_e=(()=>{let r=[];for(let e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r})();var bn=1024,wo=(r,e,t,s,n)=>{if(r.length===0)return r;let o=r;if(typeof r=="symbol"?o=Symbol.prototype.toString.call(r):typeof r!="string"&&(o=String(r)),t==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});let a="";for(let l=0;l<o.length;l+=bn){let d=o.length>=bn?o.slice(l,l+bn):o,p=[];for(let m=0;m<d.length;++m){let _=d.charCodeAt(m);if(_===45||_===46||_===95||_===126||_>=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122||n===bo&&(_===40||_===41)){p[p.length]=d.charAt(m);continue}if(_<128){p[p.length]=_e[_];continue}if(_<2048){p[p.length]=_e[192|_>>6]+_e[128|_&63];continue}if(_<55296||_>=57344){p[p.length]=_e[224|_>>12]+_e[128|_>>6&63]+_e[128|_&63];continue}m+=1,_=65536+((_&1023)<<10|d.charCodeAt(m)&1023),p[p.length]=_e[240|_>>18]+_e[128|_>>12&63]+_e[128|_>>6&63]+_e[128|_&63]}a+=p.join("")}return a};function Io(r){return!r||typeof r!="object"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))}function wn(r,e){if(G(r)){let t=[];for(let s=0;s<r.length;s+=1)t.push(e(r[s]));return t}return e(r)}var xo={brackets(r){return String(r)+"[]"},comma:"comma",indices(r,e){return String(r)+"["+e+"]"},repeat(r){return String(r)}},Ro=function(r,e){Array.prototype.push.apply(r,G(e)?e:[e])},Po,q={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:wo,encodeValuesOnly:!1,format:yn,formatter:gn,indices:!1,serializeDate(r){return(Po??(Po=Function.prototype.call.bind(Date.prototype.toISOString)))(r)},skipNulls:!1,strictNullHandling:!1};function Li(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="symbol"||typeof r=="bigint"}var In={};function Co(r,e,t,s,n,o,a,l,d,p,m,_,h,w,P,A,I,O){let g=r,$=O,k=0,E=!1;for(;($=$.get(In))!==void 0&&!E;){let F=$.get(r);if(k+=1,typeof F<"u"){if(F===k)throw new RangeError("Cyclic object value");E=!0}typeof $.get(In)>"u"&&(k=0)}if(typeof p=="function"?g=p(e,g):g instanceof Date?g=h?.(g):t==="comma"&&G(g)&&(g=wn(g,function(F){return F instanceof Date?h?.(F):F})),g===null){if(o)return d&&!A?d(e,q.encoder,I,"key",w):e;g=""}if(Li(g)||Io(g)){if(d){let F=A?e:d(e,q.encoder,I,"key",w);return[P?.(F)+"="+P?.(d(g,q.encoder,I,"value",w))]}return[P?.(e)+"="+P?.(String(g))]}let R=[];if(typeof g>"u")return R;let b;if(t==="comma"&&G(g))A&&d&&(g=wn(g,d)),b=[{value:g.length>0?g.join(",")||null:void 0}];else if(G(p))b=p;else{let F=Object.keys(g);b=m?F.sort(m):F}let v=l?String(e).replace(/\./g,"%2E"):String(e),N=s&&G(g)&&g.length===1?v+"[]":v;if(n&&G(g)&&g.length===0)return N+"[]";for(let F=0;F<b.length;++F){let B=b[F],Ct=typeof B=="object"&&typeof B.value<"u"?B.value:g[B];if(a&&Ct===null)continue;let X=_&&l?B.replace(/\./g,"%2E"):B,Ps=G(g)?typeof t=="function"?t(N,X):N:N+(_?"."+X:"["+X+"]");O.set(r,k);let xs=new WeakMap;xs.set(In,O),Ro(R,Co(Ct,Ps,t,s,n,o,a,l,t==="comma"&&A&&G(g)?null:d,p,m,_,h,w,P,A,I,xs))}return R}function ji(r=q){if(typeof r.allowEmptyArrays<"u"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.encodeDotInKeys<"u"&&typeof r.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(r.encoder!==null&&typeof r.encoder<"u"&&typeof r.encoder!="function")throw new TypeError("Encoder has to be a function.");let e=r.charset||q.charset;if(typeof r.charset<"u"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=yn;if(typeof r.format<"u"){if(!vs(An,r.format))throw new TypeError("Unknown format option provided.");t=r.format}let s=An[t],n=q.filter;(typeof r.filter=="function"||G(r.filter))&&(n=r.filter);let o;if(r.arrayFormat&&r.arrayFormat in xo?o=r.arrayFormat:"indices"in r?o=r.indices?"indices":"repeat":o=q.arrayFormat,"commaRoundTrip"in r&&typeof r.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");let a=typeof r.allowDots>"u"?r.encodeDotInKeys?!0:q.allowDots:!!r.allowDots;return{addQueryPrefix:typeof r.addQueryPrefix=="boolean"?r.addQueryPrefix:q.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:q.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:q.charsetSentinel,commaRoundTrip:!!r.commaRoundTrip,delimiter:typeof r.delimiter>"u"?q.delimiter:r.delimiter,encode:typeof r.encode=="boolean"?r.encode:q.encode,encodeDotInKeys:typeof r.encodeDotInKeys=="boolean"?r.encodeDotInKeys:q.encodeDotInKeys,encoder:typeof r.encoder=="function"?r.encoder:q.encoder,encodeValuesOnly:typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:q.encodeValuesOnly,filter:n,format:t,formatter:s,serializeDate:typeof r.serializeDate=="function"?r.serializeDate:q.serializeDate,skipNulls:typeof r.skipNulls=="boolean"?r.skipNulls:q.skipNulls,sort:typeof r.sort=="function"?r.sort:null,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:q.strictNullHandling}}function So(r,e={}){let t=r,s=ji(e),n,o;typeof s.filter=="function"?(o=s.filter,t=o("",t)):G(s.filter)&&(o=s.filter,n=o);let a=[];if(typeof t!="object"||t===null)return"";let l=xo[s.arrayFormat],d=l==="comma"&&s.commaRoundTrip;n||(n=Object.keys(t)),s.sort&&n.sort(s.sort);let p=new WeakMap;for(let h=0;h<n.length;++h){let w=n[h];s.skipNulls&&t[w]===null||Ro(a,Co(t[w],w,l,d,s.allowEmptyArrays,s.strictNullHandling,s.skipNulls,s.encodeDotInKeys,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,p))}let m=a.join(s.delimiter),_=s.addQueryPrefix===!0?"?":"";return s.charsetSentinel&&(s.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),m.length>0?_+m:""}function ko(r){return So(r,{arrayFormat:"brackets"})}function Oo(r){let e=0;for(let n of r)e+=n.length;let t=new Uint8Array(e),s=0;for(let n of r)t.set(n,s),s+=n.length;return t}var $o;function te(r){let e;return($o??(e=new globalThis.TextEncoder,$o=e.encode.bind(e)))(r)}var Eo;function Pn(r){let e;return(Eo??(e=new globalThis.TextDecoder,Eo=e.decode.bind(e)))(r)}var re,se,Qe=class{constructor(){re.set(this,void 0),se.set(this,void 0),x(this,re,new Uint8Array,"f"),x(this,se,null,"f")}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?te(e):e;x(this,re,Oo([c(this,re,"f"),t]),"f");let s=[],n;for(;(n=Ni(c(this,re,"f"),c(this,se,"f")))!=null;){if(n.carriage&&c(this,se,"f")==null){x(this,se,n.index,"f");continue}if(c(this,se,"f")!=null&&(n.index!==c(this,se,"f")+1||n.carriage)){s.push(Pn(c(this,re,"f").subarray(0,c(this,se,"f")-1))),x(this,re,c(this,re,"f").subarray(c(this,se,"f")),"f"),x(this,se,null,"f");continue}let o=c(this,se,"f")!==null?n.preceding-1:n.preceding,a=Pn(c(this,re,"f").subarray(0,o));s.push(a),x(this,re,c(this,re,"f").subarray(n.index),"f"),x(this,se,null,"f")}return s}flush(){return c(this,re,"f").length?this.decode(`
|
|
4
|
+
import{a as dn}from"./chunk-P6DHMU7R.js";import{a as ln}from"./chunk-B2RNOTT5.js";import{C as pn,D as St,E as Cs,F as io,G as ce,H as ao,I as Ss,J as ks,n as on,p as an,r as un,s as cn,v as Jr}from"./chunk-LTMY67B2.js";import"./chunk-MQAQBW7F.js";import{k as no,n as Xr,o as $e,p as oo,q as Rs,v as ie}from"./chunk-HWCLMDQF.js";import"./chunk-LCWNSYZU.js";import{C as j}from"./chunk-W4GMCNWF.js";import"./chunk-7MKA3SHV.js";function x(r,e,t,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t}function c(r,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(r):s?s.value:e.get(r)}var Ve=function(){let{crypto:r}=globalThis;if(r?.randomUUID)return Ve=r.randomUUID.bind(r),r.randomUUID();let e=new Uint8Array(1),t=r?()=>r.getRandomValues(e)[0]:()=>Math.random()*255&255;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,s=>(+s^t()&15>>+s/4).toString(16))};function Vr(r){return typeof r=="object"&&r!==null&&("name"in r&&r.name==="AbortError"||"message"in r&&String(r.message).includes("FetchRequestCanceledException"))}var Gr=r=>{if(r instanceof Error)return r;if(typeof r=="object"&&r!==null){try{if(Object.prototype.toString.call(r)==="[object Error]"){let e=new Error(r.message,r.cause?{cause:r.cause}:{});return r.stack&&(e.stack=r.stack),r.cause&&!e.cause&&(e.cause=r.cause),r.name&&(e.name=r.name),e}}catch{}try{return new Error(JSON.stringify(r))}catch{}}return new Error(r)};var y=class extends Error{},M=class r extends y{constructor(e,t,s,n){super(`${r.makeMessage(e,t,s)}`),this.status=e,this.headers=n,this.requestID=n?.get("x-request-id"),this.error=t;let o=t;this.code=o?.code,this.param=o?.param,this.type=o?.type}static makeMessage(e,t,s){let n=t?.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):s;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,t,s,n){if(!e||!n)return new Ee({message:s,cause:Gr(t)});let o=t?.error;return e===400?new kt(e,o,s,n):e===401?new $t(e,o,s,n):e===403?new Et(e,o,s,n):e===404?new Ot(e,o,s,n):e===409?new vt(e,o,s,n):e===422?new Tt(e,o,s,n):e===429?new Lt(e,o,s,n):e>=500?new jt(e,o,s,n):new r(e,o,s,n)}},K=class extends M{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},Ee=class extends M{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}},Oe=class extends Ee{constructor({message:e}={}){super({message:e??"Request timed out."})}},kt=class extends M{},$t=class extends M{},Et=class extends M{},Ot=class extends M{},vt=class extends M{},Tt=class extends M{},Lt=class extends M{},jt=class extends M{},Ft=class extends y{constructor(){super("Could not parse response content as the length limit was reached")}},Nt=class extends y{constructor(){super("Could not parse response content as the request was rejected by the content filter")}},me=class extends Error{constructor(e){super(e)}},Ge=class extends M{constructor(e,t,s){let n="OAuth2 authentication error",o;if(t&&typeof t=="object"){let a=t;o=a.error;let l=a.error_description;l&&typeof l=="string"?n=l:o&&(n=o)}super(e,t,n,s),this.error_code=o}},Qr=class extends y{constructor(e,t,s){super(e),this.provider=t,this.cause=s}};var $i=/^[a-z][a-z0-9+.-]*:/i,uo=r=>$i.test(r),G=r=>(G=Array.isArray,G(r)),fn=G;function $s(r){return typeof r!="object"?{}:r??{}}function mn(r){if(!r)return!0;for(let e in r)return!1;return!0}function co(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Yr(r){return r!=null&&typeof r=="object"&&!Array.isArray(r)}var lo=(r,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new y(`${r} must be an integer`);if(e<0)throw new y(`${r} must be a positive integer`);return e};var po=r=>{try{return JSON.parse(r)}catch{return}};var he=r=>new Promise(e=>setTimeout(e,r));var ve="6.49.0";var _o=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u";function Ei(){return typeof Deno<"u"&&Deno.build!=null?"deno":typeof EdgeRuntime<"u"?"edge":Object.prototype.toString.call(typeof globalThis.process<"u"?globalThis.process:0)==="[object process]"?"node":"unknown"}var Oi=()=>{let r=Ei();if(r==="deno")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":mo(Deno.build.os),"X-Stainless-Arch":fo(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":globalThis.process.version};if(r==="node")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":mo(globalThis.process.platform??"unknown"),"X-Stainless-Arch":fo(globalThis.process.arch??"unknown"),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":globalThis.process.version??"unknown"};let e=vi();return e?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${e.browser}`,"X-Stainless-Runtime-Version":e.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":ve,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function vi(){if(typeof navigator>"u"||!navigator)return null;let r=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:t}of r){let s=t.exec(navigator.userAgent);if(s){let n=s[1]||0,o=s[2]||0,a=s[3]||0;return{browser:e,version:`${n}.${o}.${a}`}}}return null}var fo=r=>r==="x32"?"x32":r==="x86_64"||r==="x64"?"x64":r==="arm"?"arm":r==="aarch64"||r==="arm64"?"arm64":r?`other:${r}`:"unknown",mo=r=>(r=r.toLowerCase(),r.includes("ios")?"iOS":r==="android"?"Android":r==="darwin"?"MacOS":r==="win32"?"Windows":r==="freebsd"?"FreeBSD":r==="openbsd"?"OpenBSD":r==="linux"?"Linux":r?`Other:${r}`:"Unknown"),ho,yo=()=>ho??(ho=Oi());function Es(){if(typeof fetch<"u")return fetch;throw new Error("`fetch` is not defined as a global; Either pass `fetch` to the client, `new OpenAI({ fetch })` or polyfill the global, `globalThis.fetch = fetch`")}function hn(...r){let e=globalThis.ReadableStream;if(typeof e>"u")throw new Error("`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`");return new e(...r)}function Zr(r){let e=Symbol.asyncIterator in r?r[Symbol.asyncIterator]():r[Symbol.iterator]();return hn({start(){},async pull(t){let{done:s,value:n}=await e.next();s?t.close():t.enqueue(n)},async cancel(){await e.return?.()}})}function Os(r){if(r[Symbol.asyncIterator])return r;let e=r.getReader();return{async next(){try{let t=await e.read();return t?.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){let t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}async function _n(r){if(r===null||typeof r!="object")return;if(r[Symbol.asyncIterator]){await r[Symbol.asyncIterator]().return?.();return}let e=r.getReader(),t=e.cancel();e.releaseLock(),await t}var Ao=({headers:r,body:e})=>({bodyHeaders:{"content-type":"application/json"},body:JSON.stringify(e)});var yn="RFC3986",gn=r=>String(r),An={RFC1738:r=>String(r).replace(/%20/g,"+"),RFC3986:gn},bo="RFC1738";var vs=(r,e)=>(vs=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),vs(r,e)),_e=(()=>{let r=[];for(let e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r})();var bn=1024,wo=(r,e,t,s,n)=>{if(r.length===0)return r;let o=r;if(typeof r=="symbol"?o=Symbol.prototype.toString.call(r):typeof r!="string"&&(o=String(r)),t==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});let a="";for(let l=0;l<o.length;l+=bn){let d=o.length>=bn?o.slice(l,l+bn):o,p=[];for(let m=0;m<d.length;++m){let _=d.charCodeAt(m);if(_===45||_===46||_===95||_===126||_>=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122||n===bo&&(_===40||_===41)){p[p.length]=d.charAt(m);continue}if(_<128){p[p.length]=_e[_];continue}if(_<2048){p[p.length]=_e[192|_>>6]+_e[128|_&63];continue}if(_<55296||_>=57344){p[p.length]=_e[224|_>>12]+_e[128|_>>6&63]+_e[128|_&63];continue}m+=1,_=65536+((_&1023)<<10|d.charCodeAt(m)&1023),p[p.length]=_e[240|_>>18]+_e[128|_>>12&63]+_e[128|_>>6&63]+_e[128|_&63]}a+=p.join("")}return a};function Io(r){return!r||typeof r!="object"?!1:!!(r.constructor&&r.constructor.isBuffer&&r.constructor.isBuffer(r))}function wn(r,e){if(G(r)){let t=[];for(let s=0;s<r.length;s+=1)t.push(e(r[s]));return t}return e(r)}var xo={brackets(r){return String(r)+"[]"},comma:"comma",indices(r,e){return String(r)+"["+e+"]"},repeat(r){return String(r)}},Ro=function(r,e){Array.prototype.push.apply(r,G(e)?e:[e])},Po,q={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:wo,encodeValuesOnly:!1,format:yn,formatter:gn,indices:!1,serializeDate(r){return(Po??(Po=Function.prototype.call.bind(Date.prototype.toISOString)))(r)},skipNulls:!1,strictNullHandling:!1};function Li(r){return typeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r=="symbol"||typeof r=="bigint"}var In={};function Co(r,e,t,s,n,o,a,l,d,p,m,_,h,w,P,A,I,O){let g=r,$=O,k=0,E=!1;for(;($=$.get(In))!==void 0&&!E;){let F=$.get(r);if(k+=1,typeof F<"u"){if(F===k)throw new RangeError("Cyclic object value");E=!0}typeof $.get(In)>"u"&&(k=0)}if(typeof p=="function"?g=p(e,g):g instanceof Date?g=h?.(g):t==="comma"&&G(g)&&(g=wn(g,function(F){return F instanceof Date?h?.(F):F})),g===null){if(o)return d&&!A?d(e,q.encoder,I,"key",w):e;g=""}if(Li(g)||Io(g)){if(d){let F=A?e:d(e,q.encoder,I,"key",w);return[P?.(F)+"="+P?.(d(g,q.encoder,I,"value",w))]}return[P?.(e)+"="+P?.(String(g))]}let R=[];if(typeof g>"u")return R;let b;if(t==="comma"&&G(g))A&&d&&(g=wn(g,d)),b=[{value:g.length>0?g.join(",")||null:void 0}];else if(G(p))b=p;else{let F=Object.keys(g);b=m?F.sort(m):F}let v=l?String(e).replace(/\./g,"%2E"):String(e),N=s&&G(g)&&g.length===1?v+"[]":v;if(n&&G(g)&&g.length===0)return N+"[]";for(let F=0;F<b.length;++F){let B=b[F],Ct=typeof B=="object"&&typeof B.value<"u"?B.value:g[B];if(a&&Ct===null)continue;let X=_&&l?B.replace(/\./g,"%2E"):B,Ps=G(g)?typeof t=="function"?t(N,X):N:N+(_?"."+X:"["+X+"]");O.set(r,k);let xs=new WeakMap;xs.set(In,O),Ro(R,Co(Ct,Ps,t,s,n,o,a,l,t==="comma"&&A&&G(g)?null:d,p,m,_,h,w,P,A,I,xs))}return R}function ji(r=q){if(typeof r.allowEmptyArrays<"u"&&typeof r.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof r.encodeDotInKeys<"u"&&typeof r.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(r.encoder!==null&&typeof r.encoder<"u"&&typeof r.encoder!="function")throw new TypeError("Encoder has to be a function.");let e=r.charset||q.charset;if(typeof r.charset<"u"&&r.charset!=="utf-8"&&r.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");let t=yn;if(typeof r.format<"u"){if(!vs(An,r.format))throw new TypeError("Unknown format option provided.");t=r.format}let s=An[t],n=q.filter;(typeof r.filter=="function"||G(r.filter))&&(n=r.filter);let o;if(r.arrayFormat&&r.arrayFormat in xo?o=r.arrayFormat:"indices"in r?o=r.indices?"indices":"repeat":o=q.arrayFormat,"commaRoundTrip"in r&&typeof r.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");let a=typeof r.allowDots>"u"?r.encodeDotInKeys?!0:q.allowDots:!!r.allowDots;return{addQueryPrefix:typeof r.addQueryPrefix=="boolean"?r.addQueryPrefix:q.addQueryPrefix,allowDots:a,allowEmptyArrays:typeof r.allowEmptyArrays=="boolean"?!!r.allowEmptyArrays:q.allowEmptyArrays,arrayFormat:o,charset:e,charsetSentinel:typeof r.charsetSentinel=="boolean"?r.charsetSentinel:q.charsetSentinel,commaRoundTrip:!!r.commaRoundTrip,delimiter:typeof r.delimiter>"u"?q.delimiter:r.delimiter,encode:typeof r.encode=="boolean"?r.encode:q.encode,encodeDotInKeys:typeof r.encodeDotInKeys=="boolean"?r.encodeDotInKeys:q.encodeDotInKeys,encoder:typeof r.encoder=="function"?r.encoder:q.encoder,encodeValuesOnly:typeof r.encodeValuesOnly=="boolean"?r.encodeValuesOnly:q.encodeValuesOnly,filter:n,format:t,formatter:s,serializeDate:typeof r.serializeDate=="function"?r.serializeDate:q.serializeDate,skipNulls:typeof r.skipNulls=="boolean"?r.skipNulls:q.skipNulls,sort:typeof r.sort=="function"?r.sort:null,strictNullHandling:typeof r.strictNullHandling=="boolean"?r.strictNullHandling:q.strictNullHandling}}function So(r,e={}){let t=r,s=ji(e),n,o;typeof s.filter=="function"?(o=s.filter,t=o("",t)):G(s.filter)&&(o=s.filter,n=o);let a=[];if(typeof t!="object"||t===null)return"";let l=xo[s.arrayFormat],d=l==="comma"&&s.commaRoundTrip;n||(n=Object.keys(t)),s.sort&&n.sort(s.sort);let p=new WeakMap;for(let h=0;h<n.length;++h){let w=n[h];s.skipNulls&&t[w]===null||Ro(a,Co(t[w],w,l,d,s.allowEmptyArrays,s.strictNullHandling,s.skipNulls,s.encodeDotInKeys,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,p))}let m=a.join(s.delimiter),_=s.addQueryPrefix===!0?"?":"";return s.charsetSentinel&&(s.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),m.length>0?_+m:""}function ko(r){return So(r,{arrayFormat:"brackets"})}function Oo(r){let e=0;for(let n of r)e+=n.length;let t=new Uint8Array(e),s=0;for(let n of r)t.set(n,s),s+=n.length;return t}var $o;function te(r){let e;return($o??(e=new globalThis.TextEncoder,$o=e.encode.bind(e)))(r)}var Eo;function Pn(r){let e;return(Eo??(e=new globalThis.TextDecoder,Eo=e.decode.bind(e)))(r)}var re,se,Qe=class{constructor(){re.set(this,void 0),se.set(this,void 0),x(this,re,new Uint8Array,"f"),x(this,se,null,"f")}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?te(e):e;x(this,re,Oo([c(this,re,"f"),t]),"f");let s=[],n;for(;(n=Ni(c(this,re,"f"),c(this,se,"f")))!=null;){if(n.carriage&&c(this,se,"f")==null){x(this,se,n.index,"f");continue}if(c(this,se,"f")!=null&&(n.index!==c(this,se,"f")+1||n.carriage)){s.push(Pn(c(this,re,"f").subarray(0,c(this,se,"f")-1))),x(this,re,c(this,re,"f").subarray(c(this,se,"f")),"f"),x(this,se,null,"f");continue}let o=c(this,se,"f")!==null?n.preceding-1:n.preceding,a=Pn(c(this,re,"f").subarray(0,o));s.push(a),x(this,re,c(this,re,"f").subarray(n.index),"f"),x(this,se,null,"f")}return s}flush(){return c(this,re,"f").length?this.decode(`
|
|
5
5
|
`):[]}};re=new WeakMap,se=new WeakMap;Qe.NEWLINE_CHARS=new Set([`
|
|
6
6
|
`,"\r"]);Qe.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function Ni(r,e){for(let n=e??0;n<r.length;n++){if(r[n]===10)return{preceding:n,index:n+1,carriage:!1};if(r[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function vo(r){for(let s=0;s<r.length-1;s++){if(r[s]===10&&r[s+1]===10||r[s]===13&&r[s+1]===13)return s+2;if(r[s]===13&&r[s+1]===10&&s+3<r.length&&r[s+2]===13&&r[s+3]===10)return s+4}return-1}var Ls={off:0,error:200,warn:300,info:400,debug:500},xn=(r,e,t)=>{if(r){if(co(Ls,r))return r;U(t).warn(`${e} was set to ${JSON.stringify(r)}, expected one of ${JSON.stringify(Object.keys(Ls))}`)}};function es(){}function Ts(r,e,t){return!e||Ls[r]>Ls[t]?es:e[r].bind(e)}var Mi={error:es,warn:es,info:es,debug:es},To=new WeakMap;function U(r){let e=r.logger,t=r.logLevel??"off";if(!e)return Mi;let s=To.get(e);if(s&&s[0]===t)return s[1];let n={error:Ts("error",e,t),warn:Ts("warn",e,t),info:Ts("info",e,t),debug:Ts("debug",e,t)};return To.set(e,[t,n]),n}var be=r=>(r.options&&(r.options={...r.options},delete r.options.headers),r.headers&&(r.headers=Object.fromEntries((r.headers instanceof Headers?[...r.headers]:Object.entries(r.headers)).map(([e,t])=>[e,e.toLowerCase()==="authorization"||e.toLowerCase()==="api-key"||e.toLowerCase()==="x-api-key"||e.toLowerCase()==="x-amz-security-token"||e.toLowerCase()==="cookie"||e.toLowerCase()==="set-cookie"?"***":t]))),"retryOfRequestLogID"in r&&(r.retryOfRequestLogID&&(r.retryOf=r.retryOfRequestLogID),delete r.retryOfRequestLogID),r);var ts,ee=class r{constructor(e,t,s){this.iterator=e,ts.set(this,void 0),this.controller=t,x(this,ts,s,"f")}static fromSSEResponse(e,t,s,n){let o=!1,a=s?U(s):console;async function*l(){if(o)throw new y("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");o=!0;let d=!1;try{for await(let p of Ki(e,t))if(!d){if(p.data.startsWith("[DONE]")){d=!0;continue}if(p.event===null||!p.event.startsWith("thread.")){let m;try{m=JSON.parse(p.data)}catch(_){throw a.error("Could not parse message into JSON:",p.data),a.error("From chunk:",p.raw),_}if(m&&m.error)throw new M(void 0,m.error,void 0,e.headers);yield n?{event:p.event,data:m}:m}else{let m;try{m=JSON.parse(p.data)}catch(_){throw console.error("Could not parse message into JSON:",p.data),console.error("From chunk:",p.raw),_}if(p.event=="error")throw new M(void 0,m.error,m.message,void 0);yield{event:p.event,data:m}}}d=!0}catch(p){if(Vr(p))return;throw p}finally{d||t.abort()}}return new r(l,t,s)}static fromReadableStream(e,t,s){let n=!1;async function*o(){let l=new Qe,d=e.getReader(),p=!1,m,_=()=>{m??(m=d.cancel()),m.catch(()=>{})};t.signal.addEventListener("abort",_,{once:!0});try{if(t.signal.aborted){_();return}for(;;){let{value:h,done:w}=await d.read();if(w){p=!0;break}if(t.signal.aborted)return;for(let P of l.decode(h)){if(t.signal.aborted)return;yield P}}if(t.signal.aborted)return;for(let h of l.flush()){if(t.signal.aborted)return;yield h}}finally{t.signal.removeEventListener("abort",_),p||_(),d.releaseLock()}}async function*a(){if(n)throw new y("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let l=!1;try{for await(let d of o())l||d&&(yield JSON.parse(d));l=!0}catch(d){if(t.signal.aborted||Vr(d))return;throw d}finally{l||t.abort()}}return new r(a,t,s)}[(ts=new WeakMap,Symbol.asyncIterator)](){return this.iterator()}tee(){let e=[],t=[],s=this.iterator(),n=o=>({next:()=>{if(o.length===0){let a=s.next();e.push(a),t.push(a)}return o.shift()}});return[new r(()=>n(e),this.controller,c(this,ts,"f")),new r(()=>n(t),this.controller,c(this,ts,"f"))]}toReadableStream(){let e=this,t;return hn({async start(){t=e[Symbol.asyncIterator]()},async pull(s){try{let{value:n,done:o}=await t.next();if(o)return s.close();let a=te(JSON.stringify(n)+`
|
|
7
7
|
`);s.enqueue(a)}catch(n){s.error(n)}},async cancel(){await t.return?.()}})}};async function*Ki(r,e){if(!r.body)throw e.abort(),typeof globalThis.navigator<"u"&&globalThis.navigator.product==="ReactNative"?new y("The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api"):new y("Attempted to iterate over a response with no body");let t=new Rn,s=new Qe,n=Os(r.body);for await(let o of Ui(n))for(let a of s.decode(o)){let l=t.decode(a);l&&(yield l)}for(let o of s.flush()){let a=t.decode(o);a&&(yield a)}}async function*Ui(r){let e=new Uint8Array;for await(let t of r){if(t==null)continue;let s=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?te(t):t,n=new Uint8Array(e.length+s.length);n.set(e),n.set(s,e.length),e=n;let o;for(;(o=vo(e))!==-1;)yield e.slice(0,o),e=e.slice(o)}e.length>0&&(yield e)}var Rn=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let o={event:this.event,data:this.data.join(`
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
|
+
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
+
import{a,b}from"./chunk-DVB57IVG.js";import"./chunk-HWCLMDQF.js";import"./chunk-LCWNSYZU.js";import"./chunk-XY7ZFVZL.js";import"./chunk-CWWRUTF2.js";import"./chunk-W4GMCNWF.js";import"./chunk-ETZPOVUC.js";import"./chunk-LR4ZNAAM.js";import"./chunk-K45OXLJJ.js";import"./chunk-IQT2IFSO.js";import"./chunk-VCIRD267.js";import"./chunk-7MKA3SHV.js";export{b as createTelemetryRuntime,a as parseExporterTypes};
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
|
+
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
+
import{g as a,h as b}from"./chunk-3RH3COZW.js";import"./chunk-IOMQY54U.js";import"./chunk-KJJYW5IY.js";import"./chunk-I74AL3PF.js";import"./chunk-CW6G3RYM.js";import"./chunk-LTMY67B2.js";import"./chunk-F3JTT3TI.js";import"./chunk-C56EKYBO.js";import"./chunk-MQAQBW7F.js";import"./chunk-CKOUBYG6.js";import"./chunk-VU3JWAJR.js";import"./chunk-DVB57IVG.js";import"./chunk-HWCLMDQF.js";import"./chunk-LCWNSYZU.js";import"./chunk-XY7ZFVZL.js";import"./chunk-CWWRUTF2.js";import"./chunk-W4GMCNWF.js";import"./chunk-VM4YKTHC.js";import"./chunk-ETZPOVUC.js";import"./chunk-LR4ZNAAM.js";import"./chunk-K45OXLJJ.js";import"./chunk-IQT2IFSO.js";import"./chunk-VCIRD267.js";import"./chunk-7MKA3SHV.js";export{b as RemoteServer,a as createRemoteAgent};
|
package/dist/slim-Q56GHZZP.js
CHANGED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{
|
|
4
|
+
import{g as u,h as L}from"./chunk-FC2LG24U.js";import{a as l}from"./chunk-4JHZPFU6.js";import{q as T,r as M}from"./chunk-LR4ZNAAM.js";import"./chunk-K45OXLJJ.js";import"./chunk-IQT2IFSO.js";import"./chunk-VCIRD267.js";import{c as o,f as E}from"./chunk-7MKA3SHV.js";var p=o(r=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_METRIC_EXPORTER=void 0;r.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_METRIC_EXPORTER="otlp_grpc_metric_exporter"});var P=o(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.OTLPMetricExporter=void 0;var R=(L(),E(u)),c=l(),s=(M(),E(T)),O=p(),i=class extends R.OTLPMetricExporterBase{_url;constructor(e){super((0,c.createOtlpGrpcExportDelegate)((0,c.convertLegacyOtlpGrpcOptions)(e??{},"METRICS"),s.ProtobufMetricsSerializer,O.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_METRIC_EXPORTER,s.MetricsExporterMetricsHelper,e?.selfObsMeterProvider,"MetricsExportService","/opentelemetry.proto.collector.metrics.v1.MetricsService/Export"),e),this._url=e?.url}setSelfObsMeterProvider(e){this.setMetrics((0,c.createOtlpGrpcExporterMetrics)(O.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_METRIC_EXPORTER,s.MetricsExporterMetricsHelper,this._url,e))}};t.OTLPMetricExporter=i});var x=o(_=>{Object.defineProperty(_,"__esModule",{value:!0});_.OTLPMetricExporter=void 0;var n=P();Object.defineProperty(_,"OTLPMetricExporter",{enumerable:!0,get:function(){return n.OTLPMetricExporter}})});export default x();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{a as T}from"./chunk-
|
|
4
|
+
import{a as T}from"./chunk-4JHZPFU6.js";import{c as P,d as u,q as l,r as i}from"./chunk-LR4ZNAAM.js";import"./chunk-K45OXLJJ.js";import"./chunk-IQT2IFSO.js";import"./chunk-VCIRD267.js";import{c as o,f as p}from"./chunk-7MKA3SHV.js";var s=o(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_LOG_EXPORTER=void 0;e.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_LOG_EXPORTER="otlp_grpc_log_exporter"});var c=o(r=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.OTLPLogExporter=void 0;var L=T(),E=(i(),p(l)),n=(u(),p(P)),g=s(),_=class extends n.OTLPExporterBase{constructor(O={}){super((0,L.createOtlpGrpcExportDelegate)((0,L.convertLegacyOtlpGrpcOptions)(O,"LOGS"),E.ProtobufLogsSerializer,g.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_LOG_EXPORTER,E.LogsExporterMetricsHelper,O.selfObsMeterProvider,"LogsExportService","/opentelemetry.proto.collector.logs.v1.LogsService/Export"))}};r.OTLPLogExporter=_});var x=o(t=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPLogExporter=void 0;var a=c();Object.defineProperty(t,"OTLPLogExporter",{enumerable:!0,get:function(){return a.OTLPLogExporter}})});export default x();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{a as l}from"./chunk-
|
|
4
|
+
import{a as l}from"./chunk-4JHZPFU6.js";import{c as s,d as a,q as u,r as i}from"./chunk-LR4ZNAAM.js";import"./chunk-K45OXLJJ.js";import"./chunk-IQT2IFSO.js";import"./chunk-VCIRD267.js";import{c as o,f as p}from"./chunk-7MKA3SHV.js";var T=o(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_SPAN_EXPORTER=void 0;e.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_SPAN_EXPORTER="otlp_grpc_span_exporter"});var O=o(r=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.OTLPTraceExporter=void 0;var P=l(),E=(i(),p(u)),n=(a(),p(s)),L=T(),_=class extends n.OTLPExporterBase{constructor(c={}){super((0,P.createOtlpGrpcExportDelegate)((0,P.convertLegacyOtlpGrpcOptions)(c,"TRACES"),E.ProtobufTraceSerializer,L.OTEL_COMPONENT_TYPE_VALUE_OTLP_GRPC_SPAN_EXPORTER,E.TraceExporterMetricsHelper,c.selfObsMeterProvider,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};r.OTLPTraceExporter=_});var v=o(t=>{Object.defineProperty(t,"__esModule",{value:!0});t.OTLPTraceExporter=void 0;var x=O();Object.defineProperty(t,"OTLPTraceExporter",{enumerable:!0,get:function(){return x.OTLPTraceExporter}})});export default v();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
3
|
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
-
import{
|
|
4
|
+
import{o as N,p as z,w as x,x as C}from"./chunk-K45OXLJJ.js";import{k,l as G}from"./chunk-IQT2IFSO.js";import{t as A,u as w}from"./chunk-VCIRD267.js";import{a as L,c as P,f as l}from"./chunk-7MKA3SHV.js";var I=P(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.PrometheusSerializer=void 0;var R=(w(),l(A)),p=(C(),l(x)),H=(z(),l(N)),q=(G(),l(k)),X="otel.scope.schema_url";function S(i){return i.replace(/\\/g,"\\\\").replace(/\n/g,"\\n")}function F(i=""){return typeof i!="string"&&(i=JSON.stringify(i)),S(i).replace(/"/g,'\\"')}var V=/[^a-z0-9_]/gi,Y=/_{2,}/g;function v(i){return i.replace(V,"_").replace(Y,"_")}function B(i,e){return!i.endsWith("_total")&&e.dataPointType===p.DataPointType.SUM&&e.isMonotonic&&(i=i+"_total"),i}function J(i){return i===1/0?"+Inf":i===-1/0?"-Inf":`${i}`}function W(i){switch(i.dataPointType){case p.DataPointType.SUM:return i.isMonotonic?"counter":"gauge";case p.DataPointType.GAUGE:return"gauge";case p.DataPointType.HISTOGRAM:return"histogram";default:return"untyped"}}function E(i,e,t,r,s){let n=!1,o="";for(let[u,a]of Object.entries(e)){let _=v(u);n=!0,o+=`${o.length>0?",":""}${_}="${F(a)}"`}if(s)for(let[u,a]of Object.entries(s)){let _=v(u);n=!0,o+=`${o.length>0?",":""}${_}="${F(a)}"`}return n&&(i+=`{${o}}`),`${i} ${J(t)}${r!==void 0?" "+String(r):""}
|
|
5
5
|
`}var K="# no registered metrics",y=class{_prefix;_appendTimestamp;_additionalAttributes;_withResourceConstantLabels;_withoutScopeInfo;_withoutTargetInfo;constructor(e,t=!1,r,s,n){e&&(this._prefix=e+"_"),this._appendTimestamp=t,this._withResourceConstantLabels=r,this._withoutScopeInfo=!!n,this._withoutTargetInfo=!!s}serialize(e){let t="";this._additionalAttributes=this._filterResourceConstantLabels(e.resource.attributes,this._withResourceConstantLabels);for(let r of e.scopeMetrics)t+=this._serializeScopeMetrics(r);return t===""&&(t+=K),this._serializeResource(e.resource)+t}_filterResourceConstantLabels(e,t){if(t){let r={};for(let[s,n]of Object.entries(e))s.match(t)&&(r[s]=n);return r}}_serializeScopeMetrics(e){let t="";for(let r of e.metrics){let s=this._serializeMetricData(r,e.scope);s&&(t+=s+`
|
|
6
6
|
`)}return t}_serializeMetricData(e,t){let r=v(S(e.descriptor.name));if(this._prefix&&(r=`${this._prefix}${r}`),r==="")return R.diag.error(`Normalization for metric "${e.descriptor.name}" resulted in empty name`),"";if(r==="_")return R.diag.error(`Normalization for metric "${e.descriptor.name}" resulted in an invalid name: "_"`),"";r[0]>="0"&&r[0]<="9"&&(r=`_${r}`);let s=e.dataPointType;r=B(r,e);let n=`# HELP ${r} ${S(e.descriptor.description||"description missing")}`,o=e.descriptor.unit?`
|
|
7
7
|
# UNIT ${r} ${S(e.descriptor.unit)}`:"",u=`# TYPE ${r} ${W(e)}`,a;if(this._withoutScopeInfo)a=this._additionalAttributes;else{let c={[q.ATTR_OTEL_SCOPE_NAME]:t.name};t.schemaUrl&&(c[X]=t.schemaUrl),t.version&&(c[q.ATTR_OTEL_SCOPE_VERSION]=t.version),a=Object.assign(c,this._additionalAttributes)}let _="";switch(s){case p.DataPointType.SUM:case p.DataPointType.GAUGE:{_=e.dataPoints.map(c=>this._serializeSingularDataPoint(r,e,c,a)).join("");break}case p.DataPointType.HISTOGRAM:{_=e.dataPoints.map(c=>this._serializeHistogramDataPoint(r,e,c,a)).join("");break}default:R.diag.error(`Unrecognizable DataPointType: ${s} for metric "${r}"`)}return`${n}${o}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __yukinoCreateRequire } from "node:module";
|
|
3
|
+
const require = __yukinoCreateRequire(import.meta.url);
|
|
4
|
+
import{ja as a,ka as b,la as c,ma as d,na as e,oa as f,pa as g}from"./chunk-F3JTT3TI.js";import"./chunk-C56EKYBO.js";import"./chunk-MQAQBW7F.js";import"./chunk-HWCLMDQF.js";import"./chunk-LCWNSYZU.js";import"./chunk-W4GMCNWF.js";import"./chunk-7MKA3SHV.js";export{c as ASYNC_AGENT_ALLOWED_TOOLS,e as FORK_QUERY_SOURCE,a as MAIN_AGENT_ONLY_TOOLS,b as SUBAGENT_DISALLOWED_TOOLS,g as cloneRegistryForFork,f as cloneRegistryForTeammate,d as filterToolsForAgent};
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yukino.js/yukino",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Yukino is a terminal-based AI coding agent. It provides an interactive UI (terminal user interface) for conversing with large language models, executing code, manipulating files, and orchestrating multi-agent workflows, all from the command line.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"a2a",
|
|
@@ -77,20 +77,20 @@
|
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@a2a-js/sdk": "^1.3.0",
|
|
80
|
-
"@agentclientprotocol/sdk": "^1.
|
|
80
|
+
"@agentclientprotocol/sdk": "^1.8.0",
|
|
81
81
|
"@anthropic-ai/sdk": "^0.104.2",
|
|
82
|
-
"@modelcontextprotocol/sdk": "^1.32.
|
|
82
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
83
83
|
"ansi-escapes": "^7.3.0",
|
|
84
84
|
"ansi-regex": "^6.4.0",
|
|
85
85
|
"chalk": "^5.6.2",
|
|
86
86
|
"cheerio": "^1.2.0",
|
|
87
87
|
"dompurify": "^3.4.16",
|
|
88
|
-
"express": "^5.
|
|
88
|
+
"express": "^5.3.0",
|
|
89
89
|
"fuse.js": "^7.5.0",
|
|
90
90
|
"glob": "^13.0.6",
|
|
91
91
|
"ink": "^7.1.1",
|
|
92
92
|
"js-yaml": "^4.3.2",
|
|
93
|
-
"marked": "^18.0
|
|
93
|
+
"marked": "^18.1.0",
|
|
94
94
|
"minimatch": "^10.2.6",
|
|
95
95
|
"node-emoji": "^2.2.0",
|
|
96
96
|
"openai": "^6.49.0",
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
"zod": "^4.6.5"
|
|
109
109
|
},
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@langfuse/otel": "^5.
|
|
112
|
-
"@langfuse/tracing": "^5.
|
|
111
|
+
"@langfuse/otel": "^5.13.1",
|
|
112
|
+
"@langfuse/tracing": "^5.13.1",
|
|
113
113
|
"@opentelemetry/api": "^1.9.1",
|
|
114
114
|
"@opentelemetry/api-logs": "^0.222.0",
|
|
115
|
-
"@opentelemetry/core": "^2.
|
|
115
|
+
"@opentelemetry/core": "^2.12.0",
|
|
116
116
|
"@opentelemetry/exporter-logs-otlp-grpc": "^0.222.0",
|
|
117
117
|
"@opentelemetry/exporter-logs-otlp-http": "^0.222.0",
|
|
118
118
|
"@opentelemetry/exporter-logs-otlp-proto": "^0.222.0",
|
|
@@ -123,19 +123,19 @@
|
|
|
123
123
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.222.0",
|
|
124
124
|
"@opentelemetry/exporter-trace-otlp-http": "^0.222.0",
|
|
125
125
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.222.0",
|
|
126
|
-
"@opentelemetry/resources": "^2.
|
|
126
|
+
"@opentelemetry/resources": "^2.12.0",
|
|
127
127
|
"@opentelemetry/sdk-logs": "^0.222.0",
|
|
128
|
-
"@opentelemetry/sdk-metrics": "^2.
|
|
129
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
128
|
+
"@opentelemetry/sdk-metrics": "^2.12.0",
|
|
129
|
+
"@opentelemetry/sdk-trace-base": "^2.12.0",
|
|
130
130
|
"@opentelemetry/semantic-conventions": "^1.43.0",
|
|
131
|
-
"@sentry/node": "^10.76.
|
|
131
|
+
"@sentry/node": "^10.76.2"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@eslint/js": "^9.39.5",
|
|
135
135
|
"@tailwindcss/postcss": "^4.3.3",
|
|
136
136
|
"@types/express": "^5.0.6",
|
|
137
137
|
"@types/js-yaml": "^4.0.9",
|
|
138
|
-
"@types/node": "^24.19.
|
|
138
|
+
"@types/node": "^24.19.2",
|
|
139
139
|
"@types/react": "^19.3.0",
|
|
140
140
|
"@types/react-dom": "^19.3.0",
|
|
141
141
|
"@types/turndown": "^5.0.6",
|
|
@@ -149,25 +149,25 @@
|
|
|
149
149
|
"eslint-plugin-react-refresh": "^0.5.7",
|
|
150
150
|
"eslint-plugin-unicorn": "^65.0.1",
|
|
151
151
|
"globals": "^17.13.0",
|
|
152
|
-
"pino-pretty": "^13.
|
|
153
|
-
"postcss": "^8.5.
|
|
152
|
+
"pino-pretty": "^13.2.0",
|
|
153
|
+
"postcss": "^8.5.29",
|
|
154
154
|
"prettier": "^3.9.9",
|
|
155
155
|
"tailwindcss": "^4.3.3",
|
|
156
156
|
"tsup": "^8.5.1",
|
|
157
157
|
"tsx": "^4.23.15",
|
|
158
158
|
"typescript": "^5.9.3",
|
|
159
|
-
"typescript-eslint": "^8.71.
|
|
159
|
+
"typescript-eslint": "^8.71.1",
|
|
160
160
|
"vitest": "^4.1.11"
|
|
161
161
|
},
|
|
162
162
|
"engines": {
|
|
163
163
|
"node": ">=20"
|
|
164
164
|
},
|
|
165
165
|
"scripts": {
|
|
166
|
-
"dev:
|
|
167
|
-
"build:
|
|
168
|
-
"preview:
|
|
169
|
-
"dev": "pnpm build:
|
|
170
|
-
"build": "pnpm build:
|
|
166
|
+
"dev:browser": "cd src/remote/browser && tsup --watch",
|
|
167
|
+
"build:browser": "cd src/remote/browser && rm -rf ./dist && tsup",
|
|
168
|
+
"preview:browser": "pnpm dlx serve src/remote/browser/dist",
|
|
169
|
+
"dev": "pnpm build:browser && tsx ./src/cli.ts",
|
|
170
|
+
"build": "pnpm build:browser && rm -rf ./dist && tsup",
|
|
171
171
|
"lint": "eslint --cache --quiet ./src ./tests",
|
|
172
172
|
"lint:fix": "eslint --cache --fix --quiet ./src ./tests",
|
|
173
173
|
"test": "vitest run --maxWorkers=2",
|
|
@@ -177,6 +177,7 @@
|
|
|
177
177
|
"format": "prettier -w ./ --experimental-cli",
|
|
178
178
|
"happy": "pnpm typecheck && pnpm lint && pnpm build && pnpm test",
|
|
179
179
|
"happy:fix": "pnpm typecheck && pnpm format && pnpm lint:fix && pnpm build && pnpm test",
|
|
180
|
+
"happy:watch": "pnpm typecheck && pnpm format && pnpm lint:fix && pnpm build && pnpm test:watch",
|
|
180
181
|
"add:user": "pnpm adduser --registry=https://registry.npmjs.org/",
|
|
181
182
|
"publish:latest": "pnpm publish --access public --registry=https://registry.npmjs.org/",
|
|
182
183
|
"publish:canary": "pnpm publish --access public --registry=https://registry.npmjs.org/ --tag canary"
|