@yukino.js/yukino 0.0.3 → 0.0.5

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 (71) hide show
  1. package/README.md +90 -64
  2. package/dist/acp-LOU6R4C7.js +14 -0
  3. package/dist/{agent-D6LSQHAD.js → agent-5NW5ZV5P.js} +1 -1
  4. package/dist/anthropic-UXFSBFXM.js +4 -0
  5. package/dist/{bwrap-MLSZLWHD.js → bwrap-BZ7Q2A5B.js} +1 -1
  6. package/dist/chunk-2HUCPWD6.js +29 -0
  7. package/dist/{chunk-XO7ITAWR.js → chunk-3EQYWNP6.js} +1 -1
  8. package/dist/chunk-3SPUH3TD.js +164 -0
  9. package/dist/chunk-5HF4GLFR.js +865 -0
  10. package/dist/{chunk-QG22QNQJ.js → chunk-BPA7URET.js} +1 -1
  11. package/dist/chunk-HBXZ6MB4.js +4 -0
  12. package/dist/chunk-KILUTRHM.js +4 -0
  13. package/dist/chunk-MQAQBW7F.js +35 -0
  14. package/dist/chunk-NAQRFHUX.js +4 -0
  15. package/dist/chunk-SDXAS44V.js +4 -0
  16. package/dist/chunk-TJVN4NL5.js +5 -0
  17. package/dist/chunk-VM26JJ6N.js +4 -0
  18. package/dist/chunk-VM4YKTHC.js +10 -0
  19. package/dist/chunk-WNHTKUKK.js +4 -0
  20. package/dist/chunk-YVLW4WBA.js +241 -0
  21. package/dist/chunk-ZPYQCXWT.js +5 -0
  22. package/dist/{devtools-YWVUN4HX.js → devtools-UVGRIXO2.js} +1 -1
  23. package/dist/esm-5V3TYPZK.js +229 -0
  24. package/dist/lib/{agent-KNGNHPSW.js → agent-UGEA6EVB.js} +5 -5
  25. package/dist/lib/{anthropic-MSGL4VBM.js → anthropic-UC7XIWCM.js} +5 -4
  26. package/dist/lib/{bwrap-2OL7VPSO.js → bwrap-STOJ4TEH.js} +1 -1
  27. package/dist/lib/{chunk-E6VFL5IO.js → chunk-64Z3SMSG.js} +32 -30
  28. package/dist/lib/{chunk-6AKRDUQF.js → chunk-65EUCQOF.js} +1 -1
  29. package/dist/lib/{chunk-FLKB4BK7.js → chunk-DXUJGZ5F.js} +16 -4
  30. package/dist/lib/{chunk-ENTAZT2J.js → chunk-GAWWN3TY.js} +44 -32
  31. package/dist/lib/{chunk-YIWNQ7OA.js → chunk-MGPT7DWP.js} +1 -0
  32. package/dist/lib/{chunk-BDJLW7U2.js → chunk-NIJXTKNM.js} +342 -184
  33. package/dist/lib/{chunk-MDX24JQ5.js → chunk-OCTB6YMC.js} +23 -17
  34. package/dist/lib/{chunk-24L3QT3J.js → chunk-OYQY3Q45.js} +68 -27
  35. package/dist/lib/chunk-R3NJ2EET.js +540 -0
  36. package/dist/lib/{chunk-7SU77J32.js → chunk-UKINFW65.js} +55 -2
  37. package/dist/lib/chunk-V2EYBIAU.js +323 -0
  38. package/dist/lib/{chunk-K4VUUC44.js → chunk-WDO5MWH2.js} +1 -1
  39. package/dist/lib/index.d.ts +3431 -2269
  40. package/dist/lib/index.js +14801 -12912
  41. package/dist/lib/{openai-DL5VBJR4.js → openai-OL5HXQUU.js} +4 -3
  42. package/dist/lib/{permissions-Q4FBU5VD.js → permissions-EAKP6IZ3.js} +7 -3
  43. package/dist/lib/{providers-VKVMAYIT.js → providers-N35WJDJM.js} +1 -1
  44. package/dist/lib/{seatbelt-WO7YWKLR.js → seatbelt-G5Z5QEDD.js} +1 -1
  45. package/dist/lib/{tool-filter-PY6XY254.js → tool-filter-HUVHJN3O.js} +3 -3
  46. package/dist/main.js +201 -192
  47. package/dist/{openai-AQNX24XU.js → openai-NIBMRDVB.js} +5 -5
  48. package/dist/permissions-5EQWZS7O.js +4 -0
  49. package/dist/{providers-SVAEL2RU.js → providers-TG3LGHNS.js} +1 -1
  50. package/dist/{seatbelt-JOCANLYS.js → seatbelt-IOLIYZZX.js} +1 -1
  51. package/dist/server-7ENYPCYC.js +4 -0
  52. package/dist/tool-filter-XZ7I6KU7.js +4 -0
  53. package/package.json +85 -32
  54. package/dist/acp-5YESBJ7N.js +0 -14
  55. package/dist/anthropic-CEUDAJL2.js +0 -4
  56. package/dist/chunk-6GCU7CRK.js +0 -607
  57. package/dist/chunk-77W2UPS2.js +0 -4
  58. package/dist/chunk-7DLUKIPE.js +0 -5
  59. package/dist/chunk-HLE7243Q.js +0 -4
  60. package/dist/chunk-K4BYVVW7.js +0 -5
  61. package/dist/chunk-L2BWSPCF.js +0 -10
  62. package/dist/chunk-OAFPGTZY.js +0 -164
  63. package/dist/chunk-RCXKUD3Y.js +0 -4
  64. package/dist/chunk-SAJCBGHL.js +0 -4
  65. package/dist/chunk-UPNNYP7M.js +0 -60
  66. package/dist/chunk-YBUSZS75.js +0 -237
  67. package/dist/esm-NCEEJIH3.js +0 -229
  68. package/dist/lib/chunk-BMODZ6SU.js +0 -673
  69. package/dist/permissions-VCDMNX3L.js +0 -4
  70. package/dist/server-UI2ZQVXG.js +0 -4
  71. package/dist/tool-filter-BQZDV3TF.js +0 -4
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __yukinoCreateRequire } from "node:module";
3
+ const require = __yukinoCreateRequire(import.meta.url);
4
+ import{a as d,b as S,c as v,e as _,f as b,i as x}from"./chunk-HBXZ6MB4.js";import{a as g}from"./chunk-MQAQBW7F.js";import{D as i,b as l,c as m}from"./chunk-GYBJR2RB.js";import{randomUUID as j}from"crypto";import{existsSync as k,mkdirSync as z,readFileSync as T,renameSync as E,unlinkSync as L,writeFileSync as O}from"fs";import{dirname as $,join as U}from"path";var w=(e,n,t)=>i.preprocess(r=>r===void 0||typeof r=="string"&&!r.trim()?e:r,i.union([i.number(),i.string().trim().regex(/^\d+$/,"Enter a whole number").transform(Number)]).pipe(i.number().int().min(n).max(t))),C=v.extend({name:i.string().trim().min(1,"Name is required"),base_url:i.url("Enter a valid HTTP(S) URL").refine(e=>/^https?:\/\//i.test(e),"Use an HTTP(S) URL"),api_key:i.string().trim().min(1,"API key is required"),model:i.string().trim().min(1,"Model is required"),thinking:i.enum(S).optional(),context_window:w(_,1e3,1e7),max_output_tokens:w(b,1,1e6)}).refine(e=>e.max_output_tokens<=e.context_window,{path:["max_output_tokens"],message:"Max output tokens must not exceed the context window"}).transform(e=>({...e,thinking:x(e)}));function y(e){if(!k(e))return{};let n;try{n=g.load(T(e,"utf-8"))}catch{throw new Error(`Unable to read existing ${e}; it has not been changed.`)}return i.record(i.string(),i.unknown()).parse(n??{})}function h(e,n){let t=$(e);z(t,{recursive:!0});let r=U(t,`.config-${j()}.tmp`);try{O(r,g.dump(n,{lineWidth:-1,noRefs:!0}),{encoding:"utf-8",mode:384,flag:"wx"}),E(r,e)}finally{k(r)&&L(r)}}function q(e,n){let t=C.parse(e),r=d(),u=y(r),a=[...i.array(i.record(i.string(),i.unknown())).parse(u.providers??[])];for(let f of n)a.some(A=>A.base_url===f.base_url)||a.push({...f});let o=[],c=!1;for(let f of a){if(f.base_url!==t.base_url){o.push(f);continue}c||(c=!0,o.push(t))}c||o.push(t);let P=o.map(f=>v.parse(f));return h(r,{...u,providers:o}),{provider:t,providers:P,replaced:c,path:r}}function H(e,n){let t=d(),r=y(t),u=i.array(i.record(i.string(),i.unknown())).parse(r.providers??[]),s=u.filter(o=>o.base_url===e);if(s.length===0)throw new Error(`Provider with base URL "${e}" not found in ${t}.`);let a=s.filter(o=>o.thinking!==n);if(a.length!==0){for(let o of a)o.thinking=n;h(t,{...r,providers:u})}}function W(e){let n=d(),t=y(n);t.default_provider!==e&&h(n,{...t,default_provider:e})}function p(e){return!!e._zod}function ae(e,n){return p(e)?l(e,n):e.safeParse(n)}async function ce(e,n){return p(e)?await m(e,n):await e.safeParseAsync(n)}function de(e){if(!e)return;let n;if(p(e)?n=e._zod?.def?.shape:n=e.shape,!!n){if(typeof n=="function")try{return n()}catch{return}return n}}function D(e){return e.length===0?"object root":e.reduce((n,t,r)=>r===0?String(t):typeof t=="number"?`${n}[${t}]`:`${n}.${t}`,"")}function pe(e){if(e&&typeof e=="object"){if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0)return e.issues.map(n=>n.path?.length?`${n.message} at ${D(n.path)}`:n.message).join(`
5
+ `);if("message"in e&&typeof e.message=="string")return e.message;try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function le(e){if(p(e)){let s=e._zod?.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let r=e.value;if(r!==void 0)return r}export{ae as a,ce as b,de as c,pe as d,le as e,C as f,q as g,H as h,W as i};
@@ -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{c as t}from"./chunk-L2BWSPCF.js";import"./chunk-7MKA3SHV.js";var n=globalThis;n.WebSocket||=t;n.window||=globalThis;n.self||=globalThis;n.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}];import a from"react-devtools-core";var l=async()=>new Promise(o=>{let e=new t("ws://localhost:8097"),i=setTimeout(()=>{e.terminate(),o(!1)},2e3);i.unref(),e.on("open",()=>{clearTimeout(i),e.terminate(),o(!0)}),e.on("error",()=>{clearTimeout(i),e.terminate(),o(!1)})});await l()?(a.initialize(),a.connectToDevTools()):console.warn(`DEV is set to true, but the React DevTools server is not running. Start it with:
4
+ import{c as t}from"./chunk-VM4YKTHC.js";import"./chunk-7MKA3SHV.js";var n=globalThis;n.WebSocket||=t;n.window||=globalThis;n.self||=globalThis;n.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}];import a from"react-devtools-core";var l=async()=>new Promise(o=>{let e=new t("ws://localhost:8097"),i=setTimeout(()=>{e.terminate(),o(!1)},2e3);i.unref(),e.on("open",()=>{clearTimeout(i),e.terminate(),o(!0)}),e.on("error",()=>{clearTimeout(i),e.terminate(),o(!1)})});await l()?(a.initialize(),a.connectToDevTools()):console.warn(`DEV is set to true, but the React DevTools server is not running. Start it with:
5
5
 
6
6
  $ npx react-devtools
7
7
  `);