@qitqode/qitqode-android-arm64 0.1.20 → 0.1.22

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 (79) hide show
  1. package/bundle/{chunk-rdsae6k4.js → chunk-04ezvjjf.js} +1 -1
  2. package/bundle/{chunk-wmqcz5rb.js → chunk-07b36w5g.js} +1 -1
  3. package/bundle/{chunk-1qw3yh13.js → chunk-0jv8r99k.js} +3 -3
  4. package/bundle/chunk-0qrpg3n8.js +2 -0
  5. package/bundle/{chunk-6tjghyx6.js → chunk-18xhxdsh.js} +1 -1
  6. package/bundle/{chunk-5549c7mb.js → chunk-1zb95qfx.js} +1 -1
  7. package/bundle/{chunk-knwayz0m.js → chunk-2bbvvh0d.js} +1 -1
  8. package/bundle/{chunk-k5vwx1nv.js → chunk-2bxy8zm1.js} +1 -1
  9. package/bundle/{chunk-b2ky15zx.js → chunk-2epf5806.js} +1 -1
  10. package/bundle/{chunk-aej69zjj.js → chunk-2p6w3w8f.js} +1 -1
  11. package/bundle/{chunk-q39h31te.js → chunk-3f6t3wde.js} +3 -3
  12. package/bundle/{chunk-8k1q3g8s.js → chunk-40vz0fhv.js} +1 -1
  13. package/bundle/{chunk-fegrrsfj.js → chunk-50aznc8e.js} +1 -1
  14. package/bundle/{chunk-dvn528qs.js → chunk-5a80qybt.js} +1 -1
  15. package/bundle/{chunk-r2waj5n2.js → chunk-6hkv9411.js} +1 -1
  16. package/bundle/{chunk-9a5nck3f.js → chunk-6pe3xzkk.js} +1 -1
  17. package/bundle/{chunk-w0fg8n1f.js → chunk-73d0dy03.js} +1 -1
  18. package/bundle/{chunk-b49rxw15.js → chunk-7az1bpy8.js} +1 -1
  19. package/bundle/{chunk-c4mxtqyq.js → chunk-8r4xs1q9.js} +1 -1
  20. package/bundle/{chunk-xb031er5.js → chunk-8x6x3g16.js} +1 -1
  21. package/bundle/{chunk-w8rvjbgr.js → chunk-9ac4h2d9.js} +1 -1
  22. package/bundle/{chunk-3makpbng.js → chunk-a3a9bbk7.js} +1 -1
  23. package/bundle/{chunk-1q2vhe78.js → chunk-anqjy235.js} +1 -1
  24. package/bundle/{chunk-0x0a51w3.js → chunk-b5h8vd5n.js} +1 -1
  25. package/bundle/{chunk-3gdqmave.js → chunk-bn6mg34g.js} +2 -2
  26. package/bundle/{chunk-k728fzrr.js → chunk-btjcs9ee.js} +1 -1
  27. package/bundle/{chunk-p77m937s.js → chunk-c6wrjyep.js} +1 -1
  28. package/bundle/{chunk-pn77fh9b.js → chunk-cckshvkb.js} +1 -1
  29. package/bundle/{chunk-gspdrdyq.js → chunk-dcyzpkww.js} +1 -1
  30. package/bundle/{chunk-k6z419yx.js → chunk-dgsg31vm.js} +1 -1
  31. package/bundle/{chunk-jc0wbpjq.js → chunk-ds162xgb.js} +1 -1
  32. package/bundle/{chunk-hjvje9xj.js → chunk-eb0ksh4x.js} +1 -1
  33. package/bundle/{chunk-4pedvzse.js → chunk-f03yje8k.js} +1 -1
  34. package/bundle/{chunk-anse7bd0.js → chunk-fssgbz70.js} +1 -1
  35. package/bundle/{chunk-mpn5qm9j.js → chunk-fyd31m33.js} +1 -1
  36. package/bundle/{chunk-0fwz5r1k.js → chunk-fydd2nmw.js} +1 -1
  37. package/bundle/{chunk-9g4hz1st.js → chunk-g2bw2qf5.js} +1 -1
  38. package/bundle/{chunk-qq48ffjc.js → chunk-h5wh2d49.js} +1 -1
  39. package/bundle/{chunk-0pbpzty2.js → chunk-ha5qct06.js} +1 -1
  40. package/bundle/{chunk-fgqrcjsm.js → chunk-hf0gny5t.js} +1 -1
  41. package/bundle/{chunk-n0y1ea17.js → chunk-ht1hqsaa.js} +1 -1
  42. package/bundle/{chunk-7myavy3p.js → chunk-jee9y4t0.js} +1 -1
  43. package/bundle/{chunk-tp7sfreh.js → chunk-k6eyc1wv.js} +1 -1
  44. package/bundle/{chunk-p41h8naw.js → chunk-k9m536te.js} +1 -1
  45. package/bundle/{chunk-7nas10jx.js → chunk-kv58j3yk.js} +1 -1
  46. package/bundle/{chunk-dp3hqm2m.js → chunk-mbkw9s6e.js} +1 -1
  47. package/bundle/{chunk-1gj0m10e.js → chunk-msqx5bb0.js} +1 -1
  48. package/bundle/{chunk-s2g5989e.js → chunk-n39gqxkz.js} +1 -1
  49. package/bundle/{chunk-vh8w0ea8.js → chunk-nk42gy65.js} +1 -1
  50. package/bundle/{chunk-v7yvnnmr.js → chunk-p20ft5mj.js} +1 -1
  51. package/bundle/{chunk-ej3gmaba.js → chunk-qq9pvscd.js} +1 -1
  52. package/bundle/{chunk-2w154wad.js → chunk-qwf258sw.js} +1 -1
  53. package/bundle/{chunk-zafrxr1q.js → chunk-qy9s3nmy.js} +1 -1
  54. package/bundle/{chunk-dgbvsnqb.js → chunk-r0zsgad8.js} +1 -1
  55. package/bundle/{chunk-1brsnwhv.js → chunk-r4hkkcj4.js} +1 -1
  56. package/bundle/{chunk-28knamc9.js → chunk-rbrkvj3x.js} +1 -1
  57. package/bundle/{chunk-zfvk6zjj.js → chunk-rhgfyvth.js} +1 -1
  58. package/bundle/{chunk-ysxmk1z1.js → chunk-rpy4rgmm.js} +1 -1
  59. package/bundle/{chunk-skjge2wh.js → chunk-rry321tn.js} +1 -1
  60. package/bundle/{chunk-y36ggefa.js → chunk-t8365msg.js} +1 -1
  61. package/bundle/{chunk-ghmctw8s.js → chunk-tcp31yv0.js} +1 -1
  62. package/bundle/{chunk-ckhhm2m8.js → chunk-th189x63.js} +1 -1
  63. package/bundle/{chunk-3fzgbam3.js → chunk-v07wtbmt.js} +1 -1
  64. package/bundle/{chunk-xbxgrwvy.js → chunk-v6kenrks.js} +1 -1
  65. package/bundle/{chunk-471yj527.js → chunk-vmhq6cyz.js} +1 -1
  66. package/bundle/{chunk-gfm4vad7.js → chunk-vpp88hhd.js} +173 -173
  67. package/bundle/{chunk-6bq7rx7m.js → chunk-vvs87e61.js} +1 -1
  68. package/bundle/chunk-wg0849tq.js +2 -0
  69. package/bundle/{chunk-nt07vncv.js → chunk-x4b0ywbs.js} +1 -1
  70. package/bundle/{chunk-c422awkv.js → chunk-x8w2xgx6.js} +1 -1
  71. package/bundle/{chunk-pskkmca2.js → chunk-xj0ba60b.js} +1 -1
  72. package/bundle/{chunk-rmmrnx95.js → chunk-xjdxyeja.js} +1 -1
  73. package/bundle/{chunk-f57rqsby.js → chunk-xtfcdgwe.js} +1 -1
  74. package/bundle/{chunk-wnjg8mmh.js → chunk-zbvf09bm.js} +1 -1
  75. package/bundle/index.js +3 -3
  76. package/bundle/worker.js +1 -1
  77. package/package.json +1 -1
  78. package/bundle/chunk-7pqevqry.js +0 -2
  79. package/bundle/chunk-p4pc1zdd.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Tf as a,Uf as b}from"./chunk-c4mxtqyq.js";import"./chunk-v7yvnnmr.js";import"./chunk-b5x3zghc.js";import"./chunk-t1f7jeat.js";import"./chunk-tk6gjy9d.js";import"./chunk-pkdk0ppc.js";import"./chunk-hrnx60em.js";import"./chunk-bbznk59q.js";import"./chunk-01gtn79f.js";import"./chunk-meaa7wrs.js";import"./chunk-fa03gsff.js";export{a as start,b as Heap};
2
+ import{Tf as a,Uf as b}from"./chunk-8r4xs1q9.js";import"./chunk-p20ft5mj.js";import"./chunk-b5x3zghc.js";import"./chunk-t1f7jeat.js";import"./chunk-tk6gjy9d.js";import"./chunk-pkdk0ppc.js";import"./chunk-hrnx60em.js";import"./chunk-bbznk59q.js";import"./chunk-01gtn79f.js";import"./chunk-meaa7wrs.js";import"./chunk-fa03gsff.js";export{a as start,b as Heap};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Wg as D,ch as E,qh as x}from"./chunk-1qw3yh13.js";import{Pl as w}from"./chunk-7myavy3p.js";import{mt as z}from"./chunk-v7yvnnmr.js";var H=z.create({service:"cli.bootstrap"});async function P(F,G){return w.provide({directory:F,init:()=>x.runPromise(D),fn:async()=>{try{return await G()}finally{await x.runPromise(E.Service.use((q)=>q.drainWriters())).catch((q)=>H.warn("checkpoint drain failed",{error:String(q)})),await w.dispose()}}})}
2
+ import{Wg as D,ch as E,qh as x}from"./chunk-0jv8r99k.js";import{Pl as w}from"./chunk-jee9y4t0.js";import{mt as z}from"./chunk-p20ft5mj.js";var H=z.create({service:"cli.bootstrap"});async function P(F,G){return w.provide({directory:F,init:()=>x.runPromise(D),fn:async()=>{try{return await G()}finally{await x.runPromise(E.Service.use((q)=>q.drainWriters())).catch((q)=>H.warn("checkpoint drain failed",{error:String(q)})),await w.dispose()}}})}
3
3
  export{P as Bd};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{rh as hM,sh as DR,th as B_,uh as H_,vh as j_,wh as O_,xh as vX,yh as U_,zh as S_}from"./chunk-ckhhm2m8.js";import{Ah as sP,Fh as M0}from"./chunk-tp7sfreh.js";import{xi as vW}from"./chunk-prrrw8t8.js";import{$j as LY,$k as QB,Ak as QU,Bk as XU,Cj as e,Ck as VU,Dj as x1,Ek as _A,Fk as zj,Gk as o4,Hj as sJ,Hk as W_,Ik as P0,Jj as i5,Kj as vE,Lj as aD,Mj as _9,Mk as kO,Nj as yB,Nk as KU,Ok as zM,Pk as oX,Qj as M$,Qk as K2,Rj as p7,Rk as $Y,Sj as g0,Sk as n0,Tj as W2,Tk as Q$,Uj as m0,Vk as s0,Wj as qV,Wk as $C,Xj as I2,Xk as O0,Yj as cZ,Yk as $y,_k as C2,ak as SY,al as pX,bk as q6,bl as LW,ck as p4,cl as E2,dk as W1,dl as D1,ek as n1,el as b0,fk as b1,fl as B0,gk as K_,hk as AX,ik as IX,jk as G_,kk as WQ,lk as BQ,mk as SO,nk as jf,ok as Of,pk as zQ,qk as o1,rk as oZ,sk as dK,tk as _7,uk as _Q,vk as lO,wk as rO,xk as aO,yk as tO,zk as eO}from"./chunk-q39h31te.js";import{gl as GQ,hl as ew}from"./chunk-0x0a51w3.js";import{Al as P9,Cl as f9,Fl as w0,Gl as U1,Hl as wJ,Il as A6,Jl as A8,Ml as $w,Nl as V6,Pl as q0,Ql as u,Rl as kw,Sl as L2,Tl as dz,sl as H3,tl as Rj,vl as yw,wl as MB,xl as V2,yl as k2,zl as p1}from"./chunk-7myavy3p.js";import{$l as S0,Ul as wY,Vl as m8,Wl as m$,Xl as u1,_l as Yw}from"./chunk-fegrrsfj.js";import{Gn as W8,Hn as I8,Im as d8,cn as j$,dn as o0,en as w$,fn as G8,gn as hO,hm as gO,in as z0,kn as i2,ln as F7,nn as QQ,qn as FM,rn as DM,tn as pZ}from"./chunk-c4x99ayd.js";import{Qo as mZ}from"./chunk-0pbpzty2.js";import{ip as e9,jp as s4,kp as $7,mp as V8}from"./chunk-tq258v8s.js";import{rp as Z9}from"./chunk-jfy6bfvv.js";import{sp as H2}from"./chunk-aej69zjj.js";import{eq as T8,fq as wM,qq as A9,rq as UP}from"./chunk-t7v8wzr9.js";import{Tq as $M,Uq as uP}from"./chunk-er5q8nhp.js";import{mr as m7}from"./chunk-351wfvhp.js";import{qr as w1,vr as tw,wr as X7}from"./chunk-k5vwx1nv.js";import{Cr as B3,yr as N1,zr as W3}from"./chunk-ej3gmaba.js";import{Or as o2,Pr as VX,Vr as P$,Wr as w8}from"./chunk-3nc9wy1m.js";import{Ds as q2}from"./chunk-56cty7nr.js";import{Fs as Tj}from"./chunk-thbjhgw0.js";import{Gs as S1,Is as BX,Ns as ZH,Qs as lY,Rs as kX,Ws as lw,Zs as Z$,bt as FJ,ct as a0,dt as h0,mt as Y0}from"./chunk-v7yvnnmr.js";import{Bt as g8,Ct as V0,Gt as z2,nt as mY,pt as t8,rt as V7,vt as K7,yt as Z7}from"./chunk-b5x3zghc.js";import{Ht as av}from"./chunk-t1f7jeat.js";import{It as F}from"./chunk-tk6gjy9d.js";import{Jt as wX,Mt as Ez,Nt as gz,Pt as U6,_t as J_}from"./chunk-pkdk0ppc.js";import{Au as LP,Bu as SP,Cu as B2,fu as d_,hu as m,iu as IP,ju as F2,ku as A2,lu as cW,mu as NP,nu as X$,ou as W0,pu as H0,qu as q$,ru as x2,su as uW,tu as lW,uu as v2,vu as k1,wu as A0,xu as V$,yu as c_,zu as pW}from"./chunk-hrnx60em.js";import{Du as AP,Zu as M5}from"./chunk-bbznk59q.js";import{Iz as G3,Tz as hW}from"./chunk-01gtn79f.js";import{$H as V,$N as X_,AG as ey,AH as PB,AO as f0,BN as K0,FC as Y_,GE as p0,IJ as k8,KJ as rY,MO as XX,NE as H$,TF as MJ,UE as u0,ZF as ry,_N as Q_,aO as V_,bC as CX,bO as v7,cO as XO,dO as I_,eC as N2,eG as ay,fO as f7,hO as tY,iF as w2,iO as N_,jD as X0,jG as ty,oJ as y8,sO as n9,tO as $B,vD as h8,vO as L_,wH as _B,wO as Q3,yF as b}from"./chunk-meaa7wrs.js";import{fP as CK}from"./chunk-0ddhkapd.js";import{lP as a6,mP as D0,nP as R0,pP as d2,qP as i9,rP as s9}from"./chunk-fa03gsff.js";var DH=D0((Sc,IY)=>{function GH($){return Array.isArray($)?$:[$]}var sC=void 0,c3="",VH=" ",d3="\\",nC=/^\s+$/,rC=/(?:[^\\]|^)\\$/,aC=/^\\!/,tC=/^\\#/,eC=/\r?\n/g,$A=/^\.{0,2}\/|^\.{1,2}$/,ZA=/\/$/,p9="/",WH="node-ignore";if(typeof Symbol<"u")WH=Symbol.for("node-ignore");var BH=WH,o9=($,Z,J)=>{return Object.defineProperty($,Z,{value:J}),J},JA=/([0-z])-([0-z])/g,HH=()=>!1,YA=($)=>$.replace(JA,(Z,J,Y)=>J.charCodeAt(0)<=Y.charCodeAt(0)?Z:c3),QA=($)=>{let{length:Z}=$;return $.slice(0,Z-Z%2)},XA=[[/^\uFEFF/,()=>c3],[/((?:\\\\)*?)(\\?\s+)$/,($,Z,J)=>Z+(J.indexOf("\\")===0?VH:c3)],[/(\\+?)\s/g,($,Z)=>{let{length:J}=Z;return Z.slice(0,J-J%2)+VH}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,Z,J)=>Z+6<J.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,Z,J)=>{let Y=J.replace(/\\\*/g,"[^\\/]*");return Z+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>d3],[/\\\\/g,()=>d3],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,Z,J,Y,Q)=>Z===d3?`\\[${J}${QA(Y)}${Q}`:Q==="]"?Y.length%2===0?`[${YA(J)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],VA=/(^|\\\/)?\\\*$/,LZ="regex",CY="checkRegex",KH="_",KA={[LZ]($,Z){return`${Z?`${Z}[^/]+`:"[^/]*"}(?=$|\\/$)`},[CY]($,Z){return`${Z?`${Z}[^/]*`:"[^/]*"}(?=$|\\/$)`}},GA=($)=>XA.reduce((Z,[J,Y])=>Z.replace(J,Y.bind($)),$),AY=($)=>typeof $==="string",WA=($)=>$&&AY($)&&!nC.test($)&&!rC.test($)&&$.indexOf("#")!==0,BA=($)=>$.split(eC).filter(Boolean);class jH{constructor($,Z,J,Y,Q,X){this.pattern=$,this.mark=Z,this.negative=Q,o9(this,"body",J),o9(this,"ignoreCase",Y),o9(this,"regexPrefix",X)}get regex(){let $=KH+LZ;if(this[$])return this[$];return this._make(LZ,$)}get checkRegex(){let $=KH+CY;if(this[$])return this[$];return this._make(CY,$)}_make($,Z){let J=this.regexPrefix.replace(VA,KA[$]),Y=this.ignoreCase?new RegExp(J,"i"):new RegExp(J);return o9(this,Z,Y)}}var HA=({pattern:$,mark:Z},J)=>{let Y=!1,Q=$;if(Q.indexOf("!")===0)Y=!0,Q=Q.substr(1);Q=Q.replace(aC,"!").replace(tC,"#");let X=GA(Q);return new jH($,Z,Q,J,Y,X)};class OH{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[BH]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(AY($))$={pattern:$};if(WA($.pattern)){let Z=HA($,this._ignoreCase);this._added=!0,this._rules.push(Z)}}add($){return this._added=!1,GH(AY($)?BA($):$).forEach(this._add,this),this._added}test($,Z,J){let Y=!1,Q=!1,X;this._rules.forEach((G)=>{let{negative:B}=G;if(Q===B&&Y!==Q||B&&!Y&&!Q&&!Z)return;if(!G[J].test($))return;Y=!B,Q=B,X=B?sC:G});let K={ignored:Y,unignored:Q};if(X)K.rule=X;return K}}var jA=($,Z)=>{throw new Z($)},E8=($,Z,J)=>{if(!AY($))return J(`path must be a string, but got \`${Z}\``,TypeError);if(!$)return J("path must not be empty",TypeError);if(E8.isNotRelative($))return J(`path should be a \`path.relative()\`d string, but got "${Z}"`,RangeError);return!0},UH=($)=>$A.test($);E8.isNotRelative=UH;E8.convert=($)=>$;class qH{constructor({ignorecase:$=!0,ignoreCase:Z=$,allowRelativePaths:J=!1}={}){o9(this,BH,!0),this._rules=new OH(Z),this._strictPathCheck=!J,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,Z,J,Y){let Q=$&&E8.convert($);return E8(Q,$,this._strictPathCheck?jA:HH),this._t(Q,Z,J,Y)}checkIgnore($){if(!ZA.test($))return this.test($);let Z=$.split(p9).filter(Boolean);if(Z.pop(),Z.length){let J=this._t(Z.join(p9)+p9,this._testCache,!0,Z);if(J.ignored)return J}return this._rules.test($,!1,CY)}_t($,Z,J,Y){if($ in Z)return Z[$];if(!Y)Y=$.split(p9).filter(Boolean);if(Y.pop(),!Y.length)return Z[$]=this._rules.test($,J,LZ);let Q=this._t(Y.join(p9)+p9,Z,J,Y);return Z[$]=Q.ignored?Q:this._rules.test($,J,LZ)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return GH($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var u3=($)=>new qH($),OA=($)=>E8($&&E8.convert($),$,HH),FH=()=>{let $=(J)=>/^\\\\\?\\/.test(J)||/["<>|\u0000-\u001F]+/u.test(J)?J:J.replace(/\\/g,"/");E8.convert=$;let Z=/^[a-z]:\//i;E8.isNotRelative=(J)=>Z.test(J)||UH(J)};if(typeof process<"u"&&process.platform==="win32")FH();IY.exports=u3;u3.default=u3;IY.exports.isPathValid=OA;o9(IY.exports,Symbol.for("setupWindows"),FH)});var RY=D0((vA)=>{vA.isInteger=($)=>{if(typeof $==="number")return Number.isInteger($);if(typeof $==="string"&&$.trim()!=="")return Number.isInteger(Number($));return!1};vA.find=($,Z)=>$.nodes.find((J)=>J.type===Z);vA.exceedsLimit=($,Z,J=1,Y)=>{if(Y===!1)return!1;if(!vA.isInteger($)||!vA.isInteger(Z))return!1;return(Number(Z)-Number($))/Number(J)>=Y};vA.escapeNode=($,Z=0,J)=>{let Y=$.nodes[Z];if(!Y)return;if(J&&Y.type===J||Y.type==="open"||Y.type==="close"){if(Y.escaped!==!0)Y.value="\\"+Y.value,Y.escaped=!0}};vA.encloseBrace=($)=>{if($.type!=="brace")return!1;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;return!1};vA.isInvalidBrace=($)=>{if($.type!=="brace")return!1;if($.invalid===!0||$.dollar)return!0;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;if($.open!==!0||$.close!==!0)return $.invalid=!0,!0;return!1};vA.isOpenOrClose=($)=>{if($.type==="open"||$.type==="close")return!0;return $.open===!0||$.close===!0};vA.reduce=($)=>$.reduce((Z,J)=>{if(J.type==="text")Z.push(J.value);if(J.type==="range")J.type="text";return Z},[]);vA.flatten=(...$)=>{let Z=[],J=(Y)=>{for(let Q=0;Q<Y.length;Q++){let X=Y[Q];if(Array.isArray(X)){J(X);continue}if(X!==void 0)Z.push(X)}return Z};return J($),Z}});var TY=D0((ic,NH)=>{var IH=RY();NH.exports=($,Z={})=>{let J=(Y,Q={})=>{let X=Z.escapeInvalid&&IH.isInvalidBrace(Q),K=Y.invalid===!0&&Z.escapeInvalid===!0,G="";if(Y.value){if((X||K)&&IH.isOpenOrClose(Y))return"\\"+Y.value;return Y.value}if(Y.value)return Y.value;if(Y.nodes)for(let B of Y.nodes)G+=J(B);return G};return J($)}});var SH=D0((sc,LH)=>{/*!
2
+ import{rh as hM,sh as DR,th as B_,uh as H_,vh as j_,wh as O_,xh as vX,yh as U_,zh as S_}from"./chunk-th189x63.js";import{Ah as sP,Fh as M0}from"./chunk-k6eyc1wv.js";import{xi as vW}from"./chunk-prrrw8t8.js";import{$j as LY,$k as QB,Ak as QU,Bk as XU,Cj as e,Ck as VU,Dj as x1,Ek as _A,Fk as zj,Gk as o4,Hj as sJ,Hk as W_,Ik as P0,Jj as i5,Kj as vE,Lj as aD,Mj as _9,Mk as kO,Nj as yB,Nk as KU,Ok as zM,Pk as oX,Qj as M$,Qk as K2,Rj as p7,Rk as $Y,Sj as g0,Sk as n0,Tj as W2,Tk as Q$,Uj as m0,Vk as s0,Wj as qV,Wk as $C,Xj as I2,Xk as O0,Yj as cZ,Yk as $y,_k as C2,ak as SY,al as pX,bk as q6,bl as LW,ck as p4,cl as E2,dk as W1,dl as D1,ek as n1,el as b0,fk as b1,fl as B0,gk as K_,hk as AX,ik as IX,jk as G_,kk as WQ,lk as BQ,mk as SO,nk as jf,ok as Of,pk as zQ,qk as o1,rk as oZ,sk as dK,tk as _7,uk as _Q,vk as lO,wk as rO,xk as aO,yk as tO,zk as eO}from"./chunk-3f6t3wde.js";import{gl as GQ,hl as ew}from"./chunk-b5h8vd5n.js";import{Al as P9,Cl as f9,Fl as w0,Gl as U1,Hl as wJ,Il as A6,Jl as A8,Ml as $w,Nl as V6,Pl as q0,Ql as u,Rl as kw,Sl as L2,Tl as dz,sl as H3,tl as Rj,vl as yw,wl as MB,xl as V2,yl as k2,zl as p1}from"./chunk-jee9y4t0.js";import{$l as S0,Ul as wY,Vl as m8,Wl as m$,Xl as u1,_l as Yw}from"./chunk-50aznc8e.js";import{Gn as W8,Hn as I8,Im as d8,cn as j$,dn as o0,en as w$,fn as G8,gn as hO,hm as gO,in as z0,kn as i2,ln as F7,nn as QQ,qn as FM,rn as DM,tn as pZ}from"./chunk-c4x99ayd.js";import{Qo as mZ}from"./chunk-ha5qct06.js";import{ip as e9,jp as s4,kp as $7,mp as V8}from"./chunk-tq258v8s.js";import{rp as Z9}from"./chunk-jfy6bfvv.js";import{sp as H2}from"./chunk-2p6w3w8f.js";import{eq as T8,fq as wM,qq as A9,rq as UP}from"./chunk-t7v8wzr9.js";import{Tq as $M,Uq as uP}from"./chunk-er5q8nhp.js";import{mr as m7}from"./chunk-351wfvhp.js";import{qr as w1,vr as tw,wr as X7}from"./chunk-2bxy8zm1.js";import{Cr as B3,yr as N1,zr as W3}from"./chunk-qq9pvscd.js";import{Or as o2,Pr as VX,Vr as P$,Wr as w8}from"./chunk-3nc9wy1m.js";import{Ds as q2}from"./chunk-56cty7nr.js";import{Fs as Tj}from"./chunk-thbjhgw0.js";import{Gs as S1,Is as BX,Ns as ZH,Qs as lY,Rs as kX,Ws as lw,Zs as Z$,bt as FJ,ct as a0,dt as h0,mt as Y0}from"./chunk-p20ft5mj.js";import{Bt as g8,Ct as V0,Gt as z2,nt as mY,pt as t8,rt as V7,vt as K7,yt as Z7}from"./chunk-b5x3zghc.js";import{Ht as av}from"./chunk-t1f7jeat.js";import{It as F}from"./chunk-tk6gjy9d.js";import{Jt as wX,Mt as Ez,Nt as gz,Pt as U6,_t as J_}from"./chunk-pkdk0ppc.js";import{Au as LP,Bu as SP,Cu as B2,fu as d_,hu as m,iu as IP,ju as F2,ku as A2,lu as cW,mu as NP,nu as X$,ou as W0,pu as H0,qu as q$,ru as x2,su as uW,tu as lW,uu as v2,vu as k1,wu as A0,xu as V$,yu as c_,zu as pW}from"./chunk-hrnx60em.js";import{Du as AP,Zu as M5}from"./chunk-bbznk59q.js";import{Iz as G3,Tz as hW}from"./chunk-01gtn79f.js";import{$H as V,$N as X_,AG as ey,AH as PB,AO as f0,BN as K0,FC as Y_,GE as p0,IJ as k8,KJ as rY,MO as XX,NE as H$,TF as MJ,UE as u0,ZF as ry,_N as Q_,aO as V_,bC as CX,bO as v7,cO as XO,dO as I_,eC as N2,eG as ay,fO as f7,hO as tY,iF as w2,iO as N_,jD as X0,jG as ty,oJ as y8,sO as n9,tO as $B,vD as h8,vO as L_,wH as _B,wO as Q3,yF as b}from"./chunk-meaa7wrs.js";import{fP as CK}from"./chunk-0ddhkapd.js";import{lP as a6,mP as D0,nP as R0,pP as d2,qP as i9,rP as s9}from"./chunk-fa03gsff.js";var DH=D0((Sc,IY)=>{function GH($){return Array.isArray($)?$:[$]}var sC=void 0,c3="",VH=" ",d3="\\",nC=/^\s+$/,rC=/(?:[^\\]|^)\\$/,aC=/^\\!/,tC=/^\\#/,eC=/\r?\n/g,$A=/^\.{0,2}\/|^\.{1,2}$/,ZA=/\/$/,p9="/",WH="node-ignore";if(typeof Symbol<"u")WH=Symbol.for("node-ignore");var BH=WH,o9=($,Z,J)=>{return Object.defineProperty($,Z,{value:J}),J},JA=/([0-z])-([0-z])/g,HH=()=>!1,YA=($)=>$.replace(JA,(Z,J,Y)=>J.charCodeAt(0)<=Y.charCodeAt(0)?Z:c3),QA=($)=>{let{length:Z}=$;return $.slice(0,Z-Z%2)},XA=[[/^\uFEFF/,()=>c3],[/((?:\\\\)*?)(\\?\s+)$/,($,Z,J)=>Z+(J.indexOf("\\")===0?VH:c3)],[/(\\+?)\s/g,($,Z)=>{let{length:J}=Z;return Z.slice(0,J-J%2)+VH}],[/[\\$.|*+(){^]/g,($)=>`\\${$}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,($,Z,J)=>Z+6<J.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,($,Z,J)=>{let Y=J.replace(/\\\*/g,"[^\\/]*");return Z+Y}],[/\\\\\\(?=[$.|*+(){^])/g,()=>d3],[/\\\\/g,()=>d3],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,($,Z,J,Y,Q)=>Z===d3?`\\[${J}${QA(Y)}${Q}`:Q==="]"?Y.length%2===0?`[${YA(J)}${Y}]`:"[]":"[]"],[/(?:[^*])$/,($)=>/\/$/.test($)?`${$}$`:`${$}(?=$|\\/$)`]],VA=/(^|\\\/)?\\\*$/,LZ="regex",CY="checkRegex",KH="_",KA={[LZ]($,Z){return`${Z?`${Z}[^/]+`:"[^/]*"}(?=$|\\/$)`},[CY]($,Z){return`${Z?`${Z}[^/]*`:"[^/]*"}(?=$|\\/$)`}},GA=($)=>XA.reduce((Z,[J,Y])=>Z.replace(J,Y.bind($)),$),AY=($)=>typeof $==="string",WA=($)=>$&&AY($)&&!nC.test($)&&!rC.test($)&&$.indexOf("#")!==0,BA=($)=>$.split(eC).filter(Boolean);class jH{constructor($,Z,J,Y,Q,X){this.pattern=$,this.mark=Z,this.negative=Q,o9(this,"body",J),o9(this,"ignoreCase",Y),o9(this,"regexPrefix",X)}get regex(){let $=KH+LZ;if(this[$])return this[$];return this._make(LZ,$)}get checkRegex(){let $=KH+CY;if(this[$])return this[$];return this._make(CY,$)}_make($,Z){let J=this.regexPrefix.replace(VA,KA[$]),Y=this.ignoreCase?new RegExp(J,"i"):new RegExp(J);return o9(this,Z,Y)}}var HA=({pattern:$,mark:Z},J)=>{let Y=!1,Q=$;if(Q.indexOf("!")===0)Y=!0,Q=Q.substr(1);Q=Q.replace(aC,"!").replace(tC,"#");let X=GA(Q);return new jH($,Z,Q,J,Y,X)};class OH{constructor($){this._ignoreCase=$,this._rules=[]}_add($){if($&&$[BH]){this._rules=this._rules.concat($._rules._rules),this._added=!0;return}if(AY($))$={pattern:$};if(WA($.pattern)){let Z=HA($,this._ignoreCase);this._added=!0,this._rules.push(Z)}}add($){return this._added=!1,GH(AY($)?BA($):$).forEach(this._add,this),this._added}test($,Z,J){let Y=!1,Q=!1,X;this._rules.forEach((G)=>{let{negative:B}=G;if(Q===B&&Y!==Q||B&&!Y&&!Q&&!Z)return;if(!G[J].test($))return;Y=!B,Q=B,X=B?sC:G});let K={ignored:Y,unignored:Q};if(X)K.rule=X;return K}}var jA=($,Z)=>{throw new Z($)},E8=($,Z,J)=>{if(!AY($))return J(`path must be a string, but got \`${Z}\``,TypeError);if(!$)return J("path must not be empty",TypeError);if(E8.isNotRelative($))return J(`path should be a \`path.relative()\`d string, but got "${Z}"`,RangeError);return!0},UH=($)=>$A.test($);E8.isNotRelative=UH;E8.convert=($)=>$;class qH{constructor({ignorecase:$=!0,ignoreCase:Z=$,allowRelativePaths:J=!1}={}){o9(this,BH,!0),this._rules=new OH(Z),this._strictPathCheck=!J,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add($){if(this._rules.add($))this._initCache();return this}addPattern($){return this.add($)}_test($,Z,J,Y){let Q=$&&E8.convert($);return E8(Q,$,this._strictPathCheck?jA:HH),this._t(Q,Z,J,Y)}checkIgnore($){if(!ZA.test($))return this.test($);let Z=$.split(p9).filter(Boolean);if(Z.pop(),Z.length){let J=this._t(Z.join(p9)+p9,this._testCache,!0,Z);if(J.ignored)return J}return this._rules.test($,!1,CY)}_t($,Z,J,Y){if($ in Z)return Z[$];if(!Y)Y=$.split(p9).filter(Boolean);if(Y.pop(),!Y.length)return Z[$]=this._rules.test($,J,LZ);let Q=this._t(Y.join(p9)+p9,Z,J,Y);return Z[$]=Q.ignored?Q:this._rules.test($,J,LZ)}ignores($){return this._test($,this._ignoreCache,!1).ignored}createFilter(){return($)=>!this.ignores($)}filter($){return GH($).filter(this.createFilter())}test($){return this._test($,this._testCache,!0)}}var u3=($)=>new qH($),OA=($)=>E8($&&E8.convert($),$,HH),FH=()=>{let $=(J)=>/^\\\\\?\\/.test(J)||/["<>|\u0000-\u001F]+/u.test(J)?J:J.replace(/\\/g,"/");E8.convert=$;let Z=/^[a-z]:\//i;E8.isNotRelative=(J)=>Z.test(J)||UH(J)};if(typeof process<"u"&&process.platform==="win32")FH();IY.exports=u3;u3.default=u3;IY.exports.isPathValid=OA;o9(IY.exports,Symbol.for("setupWindows"),FH)});var RY=D0((vA)=>{vA.isInteger=($)=>{if(typeof $==="number")return Number.isInteger($);if(typeof $==="string"&&$.trim()!=="")return Number.isInteger(Number($));return!1};vA.find=($,Z)=>$.nodes.find((J)=>J.type===Z);vA.exceedsLimit=($,Z,J=1,Y)=>{if(Y===!1)return!1;if(!vA.isInteger($)||!vA.isInteger(Z))return!1;return(Number(Z)-Number($))/Number(J)>=Y};vA.escapeNode=($,Z=0,J)=>{let Y=$.nodes[Z];if(!Y)return;if(J&&Y.type===J||Y.type==="open"||Y.type==="close"){if(Y.escaped!==!0)Y.value="\\"+Y.value,Y.escaped=!0}};vA.encloseBrace=($)=>{if($.type!=="brace")return!1;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;return!1};vA.isInvalidBrace=($)=>{if($.type!=="brace")return!1;if($.invalid===!0||$.dollar)return!0;if($.commas>>0+$.ranges>>0===0)return $.invalid=!0,!0;if($.open!==!0||$.close!==!0)return $.invalid=!0,!0;return!1};vA.isOpenOrClose=($)=>{if($.type==="open"||$.type==="close")return!0;return $.open===!0||$.close===!0};vA.reduce=($)=>$.reduce((Z,J)=>{if(J.type==="text")Z.push(J.value);if(J.type==="range")J.type="text";return Z},[]);vA.flatten=(...$)=>{let Z=[],J=(Y)=>{for(let Q=0;Q<Y.length;Q++){let X=Y[Q];if(Array.isArray(X)){J(X);continue}if(X!==void 0)Z.push(X)}return Z};return J($),Z}});var TY=D0((ic,NH)=>{var IH=RY();NH.exports=($,Z={})=>{let J=(Y,Q={})=>{let X=Z.escapeInvalid&&IH.isInvalidBrace(Q),K=Y.invalid===!0&&Z.escapeInvalid===!0,G="";if(Y.value){if((X||K)&&IH.isOpenOrClose(Y))return"\\"+Y.value;return Y.value}if(Y.value)return Y.value;if(Y.nodes)for(let B of Y.nodes)G+=J(B);return G};return J($)}});var SH=D0((sc,LH)=>{/*!
3
3
  * is-number <https://github.com/jonschlinkert/is-number>
4
4
  *
5
5
  * Copyright (c) 2014-present, Jon Schlinkert.
@@ -7531,7 +7531,7 @@ For full type signatures, all available fields, and more examples:
7531
7531
  - Cannot modify the permission system
7532
7532
  - Tool output truncated at 50KB / 2000 lines
7533
7533
  - Prefer small, composable extensions over monolithic ones
7534
- `}}}catch($){if($ instanceof ReferenceError)return Zz();throw $}}var pE=lE(),oE=Y0.create({service:"skill.builtin"}),Yz=V.fn("Skill.extractBuiltinBundle")(function*($){let Z=Jz.join(FJ.data,"builtin_skills",S1),J=Jz.join(Z,".extracted");return yield*GX({fsys:$,bundle:pE,root:Z,marker:J,markerContent:S1,skipIfPresent:!BX,onExtracted:(Y)=>oE.info("extracted builtin skills",{root:Y})})});var DJ=Y0.create({service:"skill"}),nE=[".claude",".agents",".codex",".opencode"],Qz="skills/**/SKILL.md",rE="{skill,skills}/**/SKILL.md",HX="**/SKILL.md",Xz=F.object({name:F.string(),description:F.string(),location:F.string(),content:F.string(),hidden:F.boolean().optional()}),aE=q2.create("SkillInvalidError",F.object({path:F.string(),message:F.string().optional(),issues:F.custom().optional()})),tE=q2.create("SkillNameMismatchError",F.object({path:F.string(),expected:F.string(),actual:F.string()})),eE=V.fnUntraced(function*($,Z,J){let Y=yield*V.tryPromise({try:()=>_9.parse(Z),catch:(X)=>X}).pipe(V.catch(V.fnUntraced(function*(X){let K=_9.FrontmatterError.isInstance(X)?X.data.message:`Failed to parse skill ${Z}`,{Session:G}=yield*V.promise(()=>import("./chunk-7pqevqry.js"));yield*J.publish(G.Event.Error,{error:new q2.Unknown({message:K}).toObject()}),DJ.error("failed to load skill",{skill:Z,err:X});return})));if(!Y)return;let Q=Xz.pick({name:!0,description:!0,hidden:!0}).safeParse(Y.data);if(!Q.success)return;if($.skills[Q.data.name])DJ.warn("duplicate skill name",{name:Q.data.name,existing:$.skills[Q.data.name].location,duplicate:Z});$.dirs.add(h7.dirname(Z)),$.skills[Q.data.name]={name:Q.data.name,description:Q.data.description,location:Z,content:Y.content,hidden:Q.data.hidden}}),z9=V.fnUntraced(function*($,Z,J,Y){let Q=yield*V.tryPromise({try:()=>g8.scan(J,{cwd:Z,absolute:!0,include:"file",symlink:!0,dot:Y?.dot}),catch:(X)=>X}).pipe(V.catch((X)=>{if(!Y?.scope)return V.die(X);return DJ.error(`failed to scan ${Y.scope} skills`,{dir:Z,error:X}),V.succeed([])}));for(let X of Q)$.matches.add(X),$.dirs.add(h7.dirname(X))}),$g=V.fnUntraced(function*($,Z,J,Y,Q){let X={matches:new Set,dirs:new Set};if(!h0.QITQODE_DISABLE_BUILTIN_SKILLS){let B=yield*Yz(J).pipe(V.catch(()=>V.succeed(void 0)));if(B&&(yield*J.isDir(B)))yield*z9(X,B,HX,{scope:"builtin"})}if(!h0.QITQODE_DISABLE_COMPOSE_SKILLS){let B=yield*eD(J).pipe(V.catch(()=>V.succeed(void 0)));if(B&&(yield*J.isDir(B)))yield*z9(X,B,HX,{scope:"compose"})}if(!h0.QITQODE_DISABLE_EXTERNAL_SKILLS){let B=nE.filter((W)=>{if(W===".claude"&&h0.QITQODE_DISABLE_CLAUDE_CODE_SKILLS)return!1;if(W===".codex"&&h0.QITQODE_DISABLE_CODEX_SKILLS)return!1;if(W===".opencode"&&h0.QITQODE_DISABLE_OPENCODE_SKILLS)return!1;return!0});for(let W of B){let O=h7.join(a0.Path.home,W);if(!(yield*J.isDir(O)))continue;yield*z9(X,O,Qz,{dot:!0,scope:"global"})}let H=yield*J.up({targets:B,start:Y,stop:Q}).pipe(V.catch(()=>V.succeed([])));for(let W of H)yield*z9(X,W,Qz,{dot:!0,scope:"project"})}let K=yield*$.directories();for(let B of K)yield*z9(X,B,rE);let G=yield*$.get();for(let B of G.skills?.paths??[]){let H=B.startsWith("~/")?h7.join(iE.homedir(),B.slice(2)):B,W=h7.isAbsolute(H)?H:h7.join(Y,H);if(!(yield*J.isDir(W))){DJ.warn("skill path not found",{path:W});continue}yield*z9(X,W,HX)}for(let B of G.skills?.urls??[]){let H=yield*Z.pull(B);for(let W of H)yield*z9(X,W,HX)}return{matches:Array.from(X.matches),dirs:Array.from(X.dirs)}}),Zg=V.fnUntraced(function*($,Z,J){yield*V.forEach(Z.matches,(Y)=>eE($,Y,J),{concurrency:16,discard:!0}),DJ.info("init",{count:Object.keys($.skills).length})});class jX extends X0.Service()("@qitqode/Skill"){}var Vz=b.effect(jX,V.gen(function*(){let $=yield*y6.Service,Z=yield*B0.Service,J=yield*e.Service,Y=yield*V0.Service,Q=yield*u.make(V.fn("Skill.discovery")(function*(O){return yield*$g(Z,$,Y,O.directory,O.worktree)})),X=yield*u.make(V.fn("Skill.state")(function*(O){let j={skills:{},dirs:new Set};return yield*Zg(j,yield*u.get(Q),J),j})),K=V.fn("Skill.get")(function*(O){return(yield*u.get(X)).skills[O]}),G=V.fn("Skill.all")(function*(){let O=yield*u.get(X);return Object.values(O.skills)}),B=V.fn("Skill.dirs")(function*(){return(yield*u.get(Q)).dirs}),H=V.fn("Skill.available")(function*(O){let j=yield*u.get(X),U=Object.values(j.skills).filter((q)=>!q.hidden);if(U=U.toSorted((q,z)=>q.name.localeCompare(z.name)),!O)return U;return U.filter((q)=>P0.evaluate("skill",q.name,O.permission).action!=="deny")}),W=V.fn("Skill.reload")(function*(){yield*u.invalidate(Q),yield*u.invalidate(X)});return jX.of({get:K,all:G,dirs:B,available:H,reload:W})})),Jg=Vz.pipe(b.provide(y6.defaultLayer),b.provide(B0.defaultLayer),b.provide(e.layer),b.provide(V0.defaultLayer));function Yg($,Z){if($.length===0)return"No skills are currently available.";if(Z.verbose)return["<available_skills>",...$.sort((J,Y)=>J.name.localeCompare(Y.name)).flatMap((J)=>[" <skill>",` <name>${J.name}</name>`,` <description>${J.description}</description>`,` <location>${sE(J.location).href}</location>`," </skill>"]),"</available_skills>"].join(`
7534
+ `}}}catch($){if($ instanceof ReferenceError)return Zz();throw $}}var pE=lE(),oE=Y0.create({service:"skill.builtin"}),Yz=V.fn("Skill.extractBuiltinBundle")(function*($){let Z=Jz.join(FJ.data,"builtin_skills",S1),J=Jz.join(Z,".extracted");return yield*GX({fsys:$,bundle:pE,root:Z,marker:J,markerContent:S1,skipIfPresent:!BX,onExtracted:(Y)=>oE.info("extracted builtin skills",{root:Y})})});var DJ=Y0.create({service:"skill"}),nE=[".claude",".agents",".codex",".opencode"],Qz="skills/**/SKILL.md",rE="{skill,skills}/**/SKILL.md",HX="**/SKILL.md",Xz=F.object({name:F.string(),description:F.string(),location:F.string(),content:F.string(),hidden:F.boolean().optional()}),aE=q2.create("SkillInvalidError",F.object({path:F.string(),message:F.string().optional(),issues:F.custom().optional()})),tE=q2.create("SkillNameMismatchError",F.object({path:F.string(),expected:F.string(),actual:F.string()})),eE=V.fnUntraced(function*($,Z,J){let Y=yield*V.tryPromise({try:()=>_9.parse(Z),catch:(X)=>X}).pipe(V.catch(V.fnUntraced(function*(X){let K=_9.FrontmatterError.isInstance(X)?X.data.message:`Failed to parse skill ${Z}`,{Session:G}=yield*V.promise(()=>import("./chunk-0qrpg3n8.js"));yield*J.publish(G.Event.Error,{error:new q2.Unknown({message:K}).toObject()}),DJ.error("failed to load skill",{skill:Z,err:X});return})));if(!Y)return;let Q=Xz.pick({name:!0,description:!0,hidden:!0}).safeParse(Y.data);if(!Q.success)return;if($.skills[Q.data.name])DJ.warn("duplicate skill name",{name:Q.data.name,existing:$.skills[Q.data.name].location,duplicate:Z});$.dirs.add(h7.dirname(Z)),$.skills[Q.data.name]={name:Q.data.name,description:Q.data.description,location:Z,content:Y.content,hidden:Q.data.hidden}}),z9=V.fnUntraced(function*($,Z,J,Y){let Q=yield*V.tryPromise({try:()=>g8.scan(J,{cwd:Z,absolute:!0,include:"file",symlink:!0,dot:Y?.dot}),catch:(X)=>X}).pipe(V.catch((X)=>{if(!Y?.scope)return V.die(X);return DJ.error(`failed to scan ${Y.scope} skills`,{dir:Z,error:X}),V.succeed([])}));for(let X of Q)$.matches.add(X),$.dirs.add(h7.dirname(X))}),$g=V.fnUntraced(function*($,Z,J,Y,Q){let X={matches:new Set,dirs:new Set};if(!h0.QITQODE_DISABLE_BUILTIN_SKILLS){let B=yield*Yz(J).pipe(V.catch(()=>V.succeed(void 0)));if(B&&(yield*J.isDir(B)))yield*z9(X,B,HX,{scope:"builtin"})}if(!h0.QITQODE_DISABLE_COMPOSE_SKILLS){let B=yield*eD(J).pipe(V.catch(()=>V.succeed(void 0)));if(B&&(yield*J.isDir(B)))yield*z9(X,B,HX,{scope:"compose"})}if(!h0.QITQODE_DISABLE_EXTERNAL_SKILLS){let B=nE.filter((W)=>{if(W===".claude"&&h0.QITQODE_DISABLE_CLAUDE_CODE_SKILLS)return!1;if(W===".codex"&&h0.QITQODE_DISABLE_CODEX_SKILLS)return!1;if(W===".opencode"&&h0.QITQODE_DISABLE_OPENCODE_SKILLS)return!1;return!0});for(let W of B){let O=h7.join(a0.Path.home,W);if(!(yield*J.isDir(O)))continue;yield*z9(X,O,Qz,{dot:!0,scope:"global"})}let H=yield*J.up({targets:B,start:Y,stop:Q}).pipe(V.catch(()=>V.succeed([])));for(let W of H)yield*z9(X,W,Qz,{dot:!0,scope:"project"})}let K=yield*$.directories();for(let B of K)yield*z9(X,B,rE);let G=yield*$.get();for(let B of G.skills?.paths??[]){let H=B.startsWith("~/")?h7.join(iE.homedir(),B.slice(2)):B,W=h7.isAbsolute(H)?H:h7.join(Y,H);if(!(yield*J.isDir(W))){DJ.warn("skill path not found",{path:W});continue}yield*z9(X,W,HX)}for(let B of G.skills?.urls??[]){let H=yield*Z.pull(B);for(let W of H)yield*z9(X,W,HX)}return{matches:Array.from(X.matches),dirs:Array.from(X.dirs)}}),Zg=V.fnUntraced(function*($,Z,J){yield*V.forEach(Z.matches,(Y)=>eE($,Y,J),{concurrency:16,discard:!0}),DJ.info("init",{count:Object.keys($.skills).length})});class jX extends X0.Service()("@qitqode/Skill"){}var Vz=b.effect(jX,V.gen(function*(){let $=yield*y6.Service,Z=yield*B0.Service,J=yield*e.Service,Y=yield*V0.Service,Q=yield*u.make(V.fn("Skill.discovery")(function*(O){return yield*$g(Z,$,Y,O.directory,O.worktree)})),X=yield*u.make(V.fn("Skill.state")(function*(O){let j={skills:{},dirs:new Set};return yield*Zg(j,yield*u.get(Q),J),j})),K=V.fn("Skill.get")(function*(O){return(yield*u.get(X)).skills[O]}),G=V.fn("Skill.all")(function*(){let O=yield*u.get(X);return Object.values(O.skills)}),B=V.fn("Skill.dirs")(function*(){return(yield*u.get(Q)).dirs}),H=V.fn("Skill.available")(function*(O){let j=yield*u.get(X),U=Object.values(j.skills).filter((q)=>!q.hidden);if(U=U.toSorted((q,z)=>q.name.localeCompare(z.name)),!O)return U;return U.filter((q)=>P0.evaluate("skill",q.name,O.permission).action!=="deny")}),W=V.fn("Skill.reload")(function*(){yield*u.invalidate(Q),yield*u.invalidate(X)});return jX.of({get:K,all:G,dirs:B,available:H,reload:W})})),Jg=Vz.pipe(b.provide(y6.defaultLayer),b.provide(B0.defaultLayer),b.provide(e.layer),b.provide(V0.defaultLayer));function Yg($,Z){if($.length===0)return"No skills are currently available.";if(Z.verbose)return["<available_skills>",...$.sort((J,Y)=>J.name.localeCompare(Y.name)).flatMap((J)=>[" <skill>",` <name>${J.name}</name>`,` <description>${J.description}</description>`,` <location>${sE(J.location).href}</location>`," </skill>"]),"</available_skills>"].join(`
7535
7535
  `);return["## Available Skills",...$.toSorted((J,Y)=>J.name.localeCompare(Y.name)).map((J)=>`- **${J.name}**: ${J.description}`)].join(`
7536
7536
  `)}var _W=i0("skill",V.gen(function*(){let $=(yield*M0.toolDescriptionEffect("skill"))??"",Z=yield*Y$.Service,J=yield*d$.Service;return{description:$,parameters:Kj,execute:(Y,Q)=>V.gen(function*(){let X=yield*Z.get(Y.name);if(!X){let O=(yield*Z.all()).map((j)=>j.name).join(", ");throw Error(`Skill "${Y.name}" not found. Available skills: ${O||"none"}`)}yield*Q.ask({permission:"skill",patterns:[Y.name],always:[Y.name],metadata:{}});let K=Kz.dirname(X.location),G=Qg(K).href,B=10,H=yield*J.files({cwd:K,follow:!1,hidden:!0,signal:Q.abort}).pipe(f7((W)=>!W.includes("SKILL.md")),v7((W)=>Kz.resolve(K,W)),tY(B),n9,V.map((W)=>[...W].map((O)=>`<file>${O}</file>`).join(`
7537
7537
  `)));return{title:`Loaded skill: ${X.name}`,output:[`<skill_content name="${X.name}">`,`# Skill: ${X.name}`,"",X.content.trim(),"",`Base directory for this skill: ${G}`,"Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.","Note: file list is sampled.","","<skill_files>",H,"</skill_files>","</skill_content>"].join(`
@@ -8089,7 +8089,7 @@ If you repeat the same output again, the session will be terminated.
8089
8089
  `)})});function qy($){if(!$.lastFinished)return;let Z=[];for(let Q=$.msgs.length-1;Q>=0&&Z.length<KB;Q--){let X=$.msgs[Q];if(X.info.role!=="assistant"||!X.info.finish)continue;let K=oJ(X.parts);if(K===void 0)break;Z.push(K)}if(!(Z.length===KB&&Z.every((Q)=>Q===Z[0])))return;let Y=$.msgs.findLast((Q)=>Q.info.role==="user");if(!Y||Y.parts.some((Q)=>Q.type==="text"&&Q.text?.includes("repeating the same action")))return;Y.parts.push({id:m0.ascending(),messageID:Y.info.id,sessionID:$.sessionID,type:"text",synthetic:!0,text:["<system-reminder>",`Your last ${KB} steps have been identical \u2014 you appear to be`,"repeating the same action without making progress. Stop and reconsider:","the current approach is not working. Try a different strategy, use a","different tool, or if you are blocked, explain the blocker to the user","instead of repeating the same step again.","</system-reminder>"].join(`
8090
8090
  `)})}var GB=Y0.create({service:"auto-dream"}),WB=86400000,km=7,Em=30,zy=1e4,BB="Auto Dream",HB="Auto Distill",Fy=0,Dy=0,_y=["Run one automatic dream memory consolidation pass for the current project.","","Use the memory files as the working index and the raw qitqode trajectory database as the source of truth.","Use bash for read-only SQLite and filesystem inspection. Do not modify the database.","Consolidate only durable, verified information into project memory."].join(`
8091
8091
  `),Py=["Run one automatic distill pass for the current project.","","Review the past month of sessions and identify repeated manual workflows worth packaging.","Use the raw qitqode trajectory database as the source of truth and memory files to spot cross-session patterns.","Inventory existing skills, agents, and commands first so you reuse or extend instead of duplicating.","Use bash for read-only SQLite and filesystem inspection. Do not modify the database.","Produce a compact shortlist, then create only the high-confidence missing assets."].join(`
8092
- `);function My($){return V.gen(function*(){if(!$.enabled)return!1;let Z=$.intervalDays*WB,J=yield*V.sync(()=>w0.use((X)=>X.select({time_created:V2.time_created}).from(V2).where(z0(V2.title,$.title)).orderBy(I8(V2.time_created)).limit(1).get())),Y=Date.now(),Q=J?Y-J.time_created:1/0;if(!J){let X=yield*V.sync(()=>w0.use((K)=>K.select({time_created:V2.time_created}).from(V2).where(pZ(V2.parent_id)).orderBy(W8(V2.time_created)).limit(1).get()));if(!X||Y-X.time_created<Z)return GB.info(`auto-${$.label} skipped \u2014 project too young`,{projectAge:X?Math.round((Y-X.time_created)/WB)+"d":"empty",interval:$.intervalDays+"d"}),!1}if(Q<Z)return GB.info(`auto-${$.label} skipped \u2014 last run too recent`,{lastRunAgo:Math.round(Q/WB)+"d",interval:$.intervalDays+"d"}),!1;return GB.info(`auto-${$.label} triggering`,{lastRun:J?new Date(J.time_created).toISOString():"never",interval:$.intervalDays+"d"}),!0})}function yy($){let Z=$.dream?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-Fy<zy)return V.succeed(!1);Fy=J;let Y=$.dream?.interval_days??km;return My({enabled:Z,intervalDays:Y,title:BB,label:"dream"})}function wy($){let Z=$.distill?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-Dy<zy)return V.succeed(!1);Dy=J;let Y=$.distill?.interval_days??Em;return My({enabled:Z,intervalDays:Y,title:HB,label:"distill"})}var Cy=V.fnUntraced(function*($){let Z=yield*$.config.get(),J=yield*yy(Z).pipe(V.catch(()=>V.succeed(!1))),Y=yield*wy(Z).pipe(V.catch(()=>V.succeed(!1))),Q={providerID:$.lastUser.model.providerID,modelID:$.lastUser.model.modelID};if(!J&&!Y)return;let{AppRuntime:X}=yield*V.promise(()=>import("./chunk-zafrxr1q.js"));if(J)X.runPromise(E2.use((K)=>V.gen(function*(){let G=yield*K.create({title:BB});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"dream",model:Q,parts:[{type:"text",text:_y}]})}))).catch((K)=>$.log.error("auto-dream prompt failed",{error:String(K)}));if(Y)X.runPromise(E2.use((K)=>V.gen(function*(){let G=yield*K.create({title:HB});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"distill",model:Q,parts:[{type:"text",text:Py}]})}))).catch((K)=>$.log.error("auto-distill prompt failed",{error:String(K)}))});var hm=($)=>$.pipe(V.catchDefect((Z)=>Z instanceof M0.BackendAuthRejectedError?V.succeed(void 0):V.die(Z))),jB=($)=>hm(V.promise(()=>M0.resolvePrompt($))).pipe(V.map((Z)=>Z??"")),Ay=V.gen(function*(){let $=yield*jB("session/build-switch"),Z=yield*jB("session/max-steps"),J=yield*jB("session/compose");return{buildSwitch:$,maxSteps:Z,promptCompose:J}});var Iy=N1.create({service:"session.prompt"}),vm=Y0.create({service:"session.prompt"});function Ny($,Z,J,Y){return V.gen(function*(){let{bus:Q,status:X,sessions:K,agents:G,provider:B,processor:H,prune:W,checkpoint:O,compaction:j,config:U,plugin:q,permission:z,fsys:A,registry:D,scope:_,instruction:w,state:P,goal:N,taskGateState:L,taskRegistry:T,revert:h,summary:x,sys:v,llm:I,actorRegistry:S,inbox:E}=yield*rV,y=yield*Ay,R=y.buildSwitch,k=y.maxSteps,i=y.promptCompose,d=(G0,Q0,s)=>iM(B,Q,G0,Q0,s),c=(G0,Q0)=>nM(K,G0,Q0),o=VB(K),p=1024,J0=new class extends Set{add(G0){if(super.add(G0),this.size>1024){let Q0=this.values().next().value;if(Q0!==void 0)this.delete(Q0)}return this}},t=(G0)=>ZB({getOps:$,...G0}),f=tM({agents:G,provider:B,llm:I,sessions:K,elog:Iy}),a=eM({sessions:K,fsys:A,buildSwitch:R,promptCompose:i});return{runLoop:V.fn("SessionPrompt.run")(function*(G0,Q0,s){let j0=yield*u.context,r=Iy.with({sessionID:G0}),Z0,_0=0,C0=yield*K.get(G0),L0,$2,O2=Q0??"main",e2=lM({sessionID:G0,agentID:O2,task_id:s,plugin:q,bus:Q,prune:W,scope:_}),{cancellation:L$,agentMetrics:r$,publishAgentRequest:f$,schedulePrune:K$}=e2,e0=uM({sessionID:G0,agentID:O2,task_id:s,session:C0,cancellation:L$,plugin:q});return yield*V.gen(function*(){yield*e2.before;let C1=(y0,c0)=>eV(SM(y0,c0,O0.parts(c0.id))),G$=!1,v1=jy({sessionID:G0,bus:Q,appendSyntheticUserTurn:o,slog:r}),D$=Hy({sessionID:G0,sessions:K,bus:Q,appendSyntheticUserTurn:o,slog:r}),{autoContinueOutputLength:Z8,autoContinueInvalidOutput:VY,autoRetryStructuredOutput:J8,handleTextRepeat:y3,writeContentFilterError:KY,writeModelError:G2}=D$,l0=rM({sessionID:G0,agentID:Q0,agents:G,taskGateState:L,taskRegistry:T,appendSyntheticUserTurn:o,slog:r}),b2=aM({sessionID:G0,agentID:Q0,session:C0,goal:N,bus:Q,appendSyntheticUserTurn:o,slog:r});while(!0){if(!Q0||Q0==="main")yield*X.set(G0,{type:"busy"});yield*E.drain(G0,Q0??"main").pipe(V.ignore),yield*r.info("loop",{step:_0});let y0=yield*O0.filterCompactedEffect(G0,{contextFrom:C0.contextFrom,contextWatermark:C0.contextWatermark,agentID:Q0??"main"}),c0,d9,O1,G6,W$,u6=[];for(let t0=y0.length-1;t0>=0;t0--){let _$=y0[t0];if(!c0&&_$.info.role==="user")c0=_$.info,d9=_$;if(!O1&&_$.info.role==="assistant")O1=_$.info,G6=_$;if(!W$&&_$.info.role==="assistant"&&_$.info.finish)W$=_$.info;if(c0&&W$)break;if(!W$){let c9=_$.parts.filter((_8)=>_8.type==="subtask");u6.push(...c9)}}if(!c0)throw Error("No user message found in stream. This should never happen.");yield*Oy({sessionID:G0,msgs:y0,checkpoint:O,config:U});let w3=G6?.parts.some((t0)=>t0.type==="tool"&&!t0.metadata?.providerExecuted)??!1;if(O1?.finish==="length"&&!w3&&c0.id<O1.id&&(yield*Z8({lastUser:c0,assistant:O1})))continue;if(O1){let t0=a5({phase:"existing-assistant",lastUser:c0,assistant:O1,parts:G6?.parts??[]});if(t0.type==="filtered"){yield*KY({assistant:O1}),yield*r.info("exiting loop",{classification:t0.type});break}if(t0.type==="failed"){yield*G2({assistant:O1,reason:t0.reason}),yield*r.info("exiting loop",{classification:t0.type,reason:t0.reason});break}if(t0.type==="think-only"||t0.type==="invalid"){let _$=t0.type==="invalid"?t0.reason:"think-only";if(yield*VY({lastUser:c0,assistant:O1,reason:_$}))continue;yield*r.info("exiting loop",{classification:t0.type});break}if(t0.type==="final"&&t0.degraded)yield*r.warn("degraded final on abnormal finish",{finish:O1.finish});if(t0.type!=="continue"){if(yield*l0(c0))continue;if(yield*b2(c0))continue;yield*r.info("exiting loop",{classification:t0.type});break}}if(_0++,_0===1)yield*f({session:C0,modelID:c0.model.modelID,providerID:c0.model.providerID,history:y0}).pipe(V.ignore,V.forkIn(_));if(_0===1&&!C0.parentID)yield*Cy({config:U,lastUser:c0,promptServiceTag:Y,log:vm});let t$=yield*d(c0.model.providerID,c0.model.modelID,G0);$2=t$,L0=W$;let z$=u6.pop();if(z$?.type==="subtask"){yield*t({task:z$,model:t$,lastUser:c0,sessionID:G0,session:C0,msgs:y0});continue}let l6=d9;if(l6?.parts.some((t0)=>t0.type==="compaction")){let t0=l6.parts.find((_8)=>_8.type==="compaction"),_$=yield*K.messages({sessionID:G0,agentID:c0.agentID??"main"});if((yield*j.process({parentID:c0.id,messages:_$,sessionID:G0,auto:t0?.auto??!1,overflow:t0?.overflow,agentID:c0.agentID}))==="stop")break;continue}yield*Uy({sessionID:G0,msgs:y0,lastFinished:W$,model:t$,config:U}),qy({sessionID:G0,msgs:y0,lastFinished:W$});let z8=yield*G.get(c0.agent),MZ=z8?.native===!0&&z8?.hidden===!0;if(!G$&&!MZ&&W$&&W$.tokens){let t0=yield*$();yield*W.fireCheckpoints({sessionID:G0,model:t$,tokens:W$.tokens,promptOps:t0,agentID:c0.agentID}).pipe(V.ignore)}if(!G$&&W$&&W$.tokens){if(yield*dM({config:U,checkpoint:O,compaction:j,prune:W},{sessionID:G0,lastFinished:W$,lastUser:c0,model:t$,msgs:y0,isBoundedComputation:MZ})){G$=!0;continue}}if(G$=!1,!z8)throw yield*t5(G,Q,c0.agent,G0);let x8=z8.steps??1/0,I0=_0>=x8;y0=yield*a({messages:y0,agent:z8,session:C0});let r0=J3({sessionID:G0,parentID:c0.id,agentID:c0.agentID,agent:z8.name,variant:c0.model.variant,cwd:j0.directory,root:j0.worktree,modelID:t$.id,providerID:t$.providerID});yield*K.updateMessage(r0);let y2=yield*H.create({assistantMessage:r0,sessionID:G0,model:t$,agentMetrics:r$}),p6=yield*V.gen(function*(){let t0={value:Z0},_$=yield*RM({sessionID:G0,resolvedAgentID:O2,step:_0,task_id:s,lastUser:c0,lastFinished:W$,msgs:y0,agent:z8,session:C0,model:t$,handle:y2,structured:t0,resolveTools:Z,createStructuredOutputTool:J,summary:x,scope:_,plugin:q}),{tools:c9,format:_8,query:C3}=_$,{cancelledByPlugin:A3,withUserQueryPost:I3}=TM({sessionID:G0,agentID:O2,step:_0,lastUser:c0,msgs:y0,query:C3,handle:y2,plugin:q,sessions:K,cancellation:L$,trajectoryForStep:C1}),N3=V.fnUntraced(function*(u9){if(u9==="continue"&&(yield*Z8({lastUser:c0,assistant:y2.message})))return"continue";if(u9==="text-repeat"){if(yield*y3({lastUser:c0}))return"continue";return"break"}if(t0.value!==void 0)return Z0=t0.value,y2.message.structured=t0.value,y2.message.finish=y2.message.finish??"stop",yield*K.updateMessage(y2.message),"break";let m1=a5({phase:"after-process",lastUser:c0,assistant:y2.message,parts:O0.parts(y2.message.id),processResult:u9});if(m1.type==="filtered")return yield*KY({assistant:y2.message}),"break";if(m1.type==="failed")return yield*G2({assistant:y2.message,reason:m1.reason}),"break";if(m1.type!=="continue"&&!y2.message.error&&_8.type==="json_schema"){if(yield*J8({lastUser:c0,assistant:y2.message}))return"continue";return"break"}if((m1.type==="think-only"||m1.type==="invalid")&&_8.type!=="json_schema"){let L3=m1.type==="invalid"?m1.reason:"think-only";if(yield*VY({lastUser:c0,assistant:y2.message,reason:L3}))return"continue";return"break"}if(m1.type==="final"&&m1.degraded)yield*r.warn("degraded final on abnormal finish",{finish:y2.message.finish});if(u9==="stop")return"break";return}),yZ=yield*vM({sessionID:G0,lastUser:c0,agent:z8,session:C0,model:t$,msgs:y0,tools:c9,format:_8,handle:y2,isLastStep:I0,task_id:s,instructionsNotified:J0,maxStepsText:k,actorRegistry:S,bus:Q,config:U,instruction:w,llm:I,registry:D,status:X,sys:v,cancelledByPlugin:A3,withUserQueryPost:I3,slog:r});if(yZ.kind==="break")return"break";let GY=yield*N3(yZ.result);if(GY)return GY;if(yZ.result==="overflow")yield*cM({config:U,checkpoint:O,compaction:j,prune:W},{sessionID:G0,lastUser:c0,model:t$,msgs:y0,isBoundedComputation:MZ});return"continue"}).pipe(V.ensuring(w.clear(y2.message.id))),Q8=yield*v1.check({lastUser:c0,completedParts:O0.parts(y2.message.id)});if(Q8==="terminate")break;if(Q8==="recovered")continue;if(p6==="break"){if(yield*l0(c0))continue;if(yield*b2(c0))continue;break}continue}let f1=yield*$();if($2&&L0)yield*K$({model:$2,lastFinished:L0,promptOps:f1});let a$=yield*c(G0,Q0),c6=a$.info.role==="assistant"&&!!a$.info.error,Y8=yield*K.findMessage(G0,(y0)=>y0.info.role==="user",{agentID:"*"});return yield*f$(c6?"error":"completed",N2.isSome(Y8)?Y8.value.info.agent:a$.info.agent),a$}).pipe((C1)=>e5(G0,Q,C1),V.onExit(e0),V.orDie)}),lastAssistant:c}})}import Ly from"path";var fm=new TextEncoder,OB=new TextDecoder,mm=($)=>`
8092
+ `);function My($){return V.gen(function*(){if(!$.enabled)return!1;let Z=$.intervalDays*WB,J=yield*V.sync(()=>w0.use((X)=>X.select({time_created:V2.time_created}).from(V2).where(z0(V2.title,$.title)).orderBy(I8(V2.time_created)).limit(1).get())),Y=Date.now(),Q=J?Y-J.time_created:1/0;if(!J){let X=yield*V.sync(()=>w0.use((K)=>K.select({time_created:V2.time_created}).from(V2).where(pZ(V2.parent_id)).orderBy(W8(V2.time_created)).limit(1).get()));if(!X||Y-X.time_created<Z)return GB.info(`auto-${$.label} skipped \u2014 project too young`,{projectAge:X?Math.round((Y-X.time_created)/WB)+"d":"empty",interval:$.intervalDays+"d"}),!1}if(Q<Z)return GB.info(`auto-${$.label} skipped \u2014 last run too recent`,{lastRunAgo:Math.round(Q/WB)+"d",interval:$.intervalDays+"d"}),!1;return GB.info(`auto-${$.label} triggering`,{lastRun:J?new Date(J.time_created).toISOString():"never",interval:$.intervalDays+"d"}),!0})}function yy($){let Z=$.dream?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-Fy<zy)return V.succeed(!1);Fy=J;let Y=$.dream?.interval_days??km;return My({enabled:Z,intervalDays:Y,title:BB,label:"dream"})}function wy($){let Z=$.distill?.auto!==!1;if(!Z)return V.succeed(!1);let J=Date.now();if(J-Dy<zy)return V.succeed(!1);Dy=J;let Y=$.distill?.interval_days??Em;return My({enabled:Z,intervalDays:Y,title:HB,label:"distill"})}var Cy=V.fnUntraced(function*($){let Z=yield*$.config.get(),J=yield*yy(Z).pipe(V.catch(()=>V.succeed(!1))),Y=yield*wy(Z).pipe(V.catch(()=>V.succeed(!1))),Q={providerID:$.lastUser.model.providerID,modelID:$.lastUser.model.modelID};if(!J&&!Y)return;let{AppRuntime:X}=yield*V.promise(()=>import("./chunk-qy9s3nmy.js"));if(J)X.runPromise(E2.use((K)=>V.gen(function*(){let G=yield*K.create({title:BB});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"dream",model:Q,parts:[{type:"text",text:_y}]})}))).catch((K)=>$.log.error("auto-dream prompt failed",{error:String(K)}));if(Y)X.runPromise(E2.use((K)=>V.gen(function*(){let G=yield*K.create({title:HB});yield*(yield*$.promptServiceTag).prompt({sessionID:G.id,agent:"distill",model:Q,parts:[{type:"text",text:Py}]})}))).catch((K)=>$.log.error("auto-distill prompt failed",{error:String(K)}))});var hm=($)=>$.pipe(V.catchDefect((Z)=>Z instanceof M0.BackendAuthRejectedError?V.succeed(void 0):V.die(Z))),jB=($)=>hm(V.promise(()=>M0.resolvePrompt($))).pipe(V.map((Z)=>Z??"")),Ay=V.gen(function*(){let $=yield*jB("session/build-switch"),Z=yield*jB("session/max-steps"),J=yield*jB("session/compose");return{buildSwitch:$,maxSteps:Z,promptCompose:J}});var Iy=N1.create({service:"session.prompt"}),vm=Y0.create({service:"session.prompt"});function Ny($,Z,J,Y){return V.gen(function*(){let{bus:Q,status:X,sessions:K,agents:G,provider:B,processor:H,prune:W,checkpoint:O,compaction:j,config:U,plugin:q,permission:z,fsys:A,registry:D,scope:_,instruction:w,state:P,goal:N,taskGateState:L,taskRegistry:T,revert:h,summary:x,sys:v,llm:I,actorRegistry:S,inbox:E}=yield*rV,y=yield*Ay,R=y.buildSwitch,k=y.maxSteps,i=y.promptCompose,d=(G0,Q0,s)=>iM(B,Q,G0,Q0,s),c=(G0,Q0)=>nM(K,G0,Q0),o=VB(K),p=1024,J0=new class extends Set{add(G0){if(super.add(G0),this.size>1024){let Q0=this.values().next().value;if(Q0!==void 0)this.delete(Q0)}return this}},t=(G0)=>ZB({getOps:$,...G0}),f=tM({agents:G,provider:B,llm:I,sessions:K,elog:Iy}),a=eM({sessions:K,fsys:A,buildSwitch:R,promptCompose:i});return{runLoop:V.fn("SessionPrompt.run")(function*(G0,Q0,s){let j0=yield*u.context,r=Iy.with({sessionID:G0}),Z0,_0=0,C0=yield*K.get(G0),L0,$2,O2=Q0??"main",e2=lM({sessionID:G0,agentID:O2,task_id:s,plugin:q,bus:Q,prune:W,scope:_}),{cancellation:L$,agentMetrics:r$,publishAgentRequest:f$,schedulePrune:K$}=e2,e0=uM({sessionID:G0,agentID:O2,task_id:s,session:C0,cancellation:L$,plugin:q});return yield*V.gen(function*(){yield*e2.before;let C1=(y0,c0)=>eV(SM(y0,c0,O0.parts(c0.id))),G$=!1,v1=jy({sessionID:G0,bus:Q,appendSyntheticUserTurn:o,slog:r}),D$=Hy({sessionID:G0,sessions:K,bus:Q,appendSyntheticUserTurn:o,slog:r}),{autoContinueOutputLength:Z8,autoContinueInvalidOutput:VY,autoRetryStructuredOutput:J8,handleTextRepeat:y3,writeContentFilterError:KY,writeModelError:G2}=D$,l0=rM({sessionID:G0,agentID:Q0,agents:G,taskGateState:L,taskRegistry:T,appendSyntheticUserTurn:o,slog:r}),b2=aM({sessionID:G0,agentID:Q0,session:C0,goal:N,bus:Q,appendSyntheticUserTurn:o,slog:r});while(!0){if(!Q0||Q0==="main")yield*X.set(G0,{type:"busy"});yield*E.drain(G0,Q0??"main").pipe(V.ignore),yield*r.info("loop",{step:_0});let y0=yield*O0.filterCompactedEffect(G0,{contextFrom:C0.contextFrom,contextWatermark:C0.contextWatermark,agentID:Q0??"main"}),c0,d9,O1,G6,W$,u6=[];for(let t0=y0.length-1;t0>=0;t0--){let _$=y0[t0];if(!c0&&_$.info.role==="user")c0=_$.info,d9=_$;if(!O1&&_$.info.role==="assistant")O1=_$.info,G6=_$;if(!W$&&_$.info.role==="assistant"&&_$.info.finish)W$=_$.info;if(c0&&W$)break;if(!W$){let c9=_$.parts.filter((_8)=>_8.type==="subtask");u6.push(...c9)}}if(!c0)throw Error("No user message found in stream. This should never happen.");yield*Oy({sessionID:G0,msgs:y0,checkpoint:O,config:U});let w3=G6?.parts.some((t0)=>t0.type==="tool"&&!t0.metadata?.providerExecuted)??!1;if(O1?.finish==="length"&&!w3&&c0.id<O1.id&&(yield*Z8({lastUser:c0,assistant:O1})))continue;if(O1){let t0=a5({phase:"existing-assistant",lastUser:c0,assistant:O1,parts:G6?.parts??[]});if(t0.type==="filtered"){yield*KY({assistant:O1}),yield*r.info("exiting loop",{classification:t0.type});break}if(t0.type==="failed"){yield*G2({assistant:O1,reason:t0.reason}),yield*r.info("exiting loop",{classification:t0.type,reason:t0.reason});break}if(t0.type==="think-only"||t0.type==="invalid"){let _$=t0.type==="invalid"?t0.reason:"think-only";if(yield*VY({lastUser:c0,assistant:O1,reason:_$}))continue;yield*r.info("exiting loop",{classification:t0.type});break}if(t0.type==="final"&&t0.degraded)yield*r.warn("degraded final on abnormal finish",{finish:O1.finish});if(t0.type!=="continue"){if(yield*l0(c0))continue;if(yield*b2(c0))continue;yield*r.info("exiting loop",{classification:t0.type});break}}if(_0++,_0===1)yield*f({session:C0,modelID:c0.model.modelID,providerID:c0.model.providerID,history:y0}).pipe(V.ignore,V.forkIn(_));if(_0===1&&!C0.parentID)yield*Cy({config:U,lastUser:c0,promptServiceTag:Y,log:vm});let t$=yield*d(c0.model.providerID,c0.model.modelID,G0);$2=t$,L0=W$;let z$=u6.pop();if(z$?.type==="subtask"){yield*t({task:z$,model:t$,lastUser:c0,sessionID:G0,session:C0,msgs:y0});continue}let l6=d9;if(l6?.parts.some((t0)=>t0.type==="compaction")){let t0=l6.parts.find((_8)=>_8.type==="compaction"),_$=yield*K.messages({sessionID:G0,agentID:c0.agentID??"main"});if((yield*j.process({parentID:c0.id,messages:_$,sessionID:G0,auto:t0?.auto??!1,overflow:t0?.overflow,agentID:c0.agentID}))==="stop")break;continue}yield*Uy({sessionID:G0,msgs:y0,lastFinished:W$,model:t$,config:U}),qy({sessionID:G0,msgs:y0,lastFinished:W$});let z8=yield*G.get(c0.agent),MZ=z8?.native===!0&&z8?.hidden===!0;if(!G$&&!MZ&&W$&&W$.tokens){let t0=yield*$();yield*W.fireCheckpoints({sessionID:G0,model:t$,tokens:W$.tokens,promptOps:t0,agentID:c0.agentID}).pipe(V.ignore)}if(!G$&&W$&&W$.tokens){if(yield*dM({config:U,checkpoint:O,compaction:j,prune:W},{sessionID:G0,lastFinished:W$,lastUser:c0,model:t$,msgs:y0,isBoundedComputation:MZ})){G$=!0;continue}}if(G$=!1,!z8)throw yield*t5(G,Q,c0.agent,G0);let x8=z8.steps??1/0,I0=_0>=x8;y0=yield*a({messages:y0,agent:z8,session:C0});let r0=J3({sessionID:G0,parentID:c0.id,agentID:c0.agentID,agent:z8.name,variant:c0.model.variant,cwd:j0.directory,root:j0.worktree,modelID:t$.id,providerID:t$.providerID});yield*K.updateMessage(r0);let y2=yield*H.create({assistantMessage:r0,sessionID:G0,model:t$,agentMetrics:r$}),p6=yield*V.gen(function*(){let t0={value:Z0},_$=yield*RM({sessionID:G0,resolvedAgentID:O2,step:_0,task_id:s,lastUser:c0,lastFinished:W$,msgs:y0,agent:z8,session:C0,model:t$,handle:y2,structured:t0,resolveTools:Z,createStructuredOutputTool:J,summary:x,scope:_,plugin:q}),{tools:c9,format:_8,query:C3}=_$,{cancelledByPlugin:A3,withUserQueryPost:I3}=TM({sessionID:G0,agentID:O2,step:_0,lastUser:c0,msgs:y0,query:C3,handle:y2,plugin:q,sessions:K,cancellation:L$,trajectoryForStep:C1}),N3=V.fnUntraced(function*(u9){if(u9==="continue"&&(yield*Z8({lastUser:c0,assistant:y2.message})))return"continue";if(u9==="text-repeat"){if(yield*y3({lastUser:c0}))return"continue";return"break"}if(t0.value!==void 0)return Z0=t0.value,y2.message.structured=t0.value,y2.message.finish=y2.message.finish??"stop",yield*K.updateMessage(y2.message),"break";let m1=a5({phase:"after-process",lastUser:c0,assistant:y2.message,parts:O0.parts(y2.message.id),processResult:u9});if(m1.type==="filtered")return yield*KY({assistant:y2.message}),"break";if(m1.type==="failed")return yield*G2({assistant:y2.message,reason:m1.reason}),"break";if(m1.type!=="continue"&&!y2.message.error&&_8.type==="json_schema"){if(yield*J8({lastUser:c0,assistant:y2.message}))return"continue";return"break"}if((m1.type==="think-only"||m1.type==="invalid")&&_8.type!=="json_schema"){let L3=m1.type==="invalid"?m1.reason:"think-only";if(yield*VY({lastUser:c0,assistant:y2.message,reason:L3}))return"continue";return"break"}if(m1.type==="final"&&m1.degraded)yield*r.warn("degraded final on abnormal finish",{finish:y2.message.finish});if(u9==="stop")return"break";return}),yZ=yield*vM({sessionID:G0,lastUser:c0,agent:z8,session:C0,model:t$,msgs:y0,tools:c9,format:_8,handle:y2,isLastStep:I0,task_id:s,instructionsNotified:J0,maxStepsText:k,actorRegistry:S,bus:Q,config:U,instruction:w,llm:I,registry:D,status:X,sys:v,cancelledByPlugin:A3,withUserQueryPost:I3,slog:r});if(yZ.kind==="break")return"break";let GY=yield*N3(yZ.result);if(GY)return GY;if(yZ.result==="overflow")yield*cM({config:U,checkpoint:O,compaction:j,prune:W},{sessionID:G0,lastUser:c0,model:t$,msgs:y0,isBoundedComputation:MZ});return"continue"}).pipe(V.ensuring(w.clear(y2.message.id))),Q8=yield*v1.check({lastUser:c0,completedParts:O0.parts(y2.message.id)});if(Q8==="terminate")break;if(Q8==="recovered")continue;if(p6==="break"){if(yield*l0(c0))continue;if(yield*b2(c0))continue;break}continue}let f1=yield*$();if($2&&L0)yield*K$({model:$2,lastFinished:L0,promptOps:f1});let a$=yield*c(G0,Q0),c6=a$.info.role==="assistant"&&!!a$.info.error,Y8=yield*K.findMessage(G0,(y0)=>y0.info.role==="user",{agentID:"*"});return yield*f$(c6?"error":"completed",N2.isSome(Y8)?Y8.value.info.agent:a$.info.agent),a$}).pipe((C1)=>e5(G0,Q,C1),V.onExit(e0),V.orDie)}),lastAssistant:c}})}import Ly from"path";var fm=new TextEncoder,OB=new TextDecoder,mm=($)=>`
8093
8093
 
8094
8094
  [... QitQode truncated ${$} bytes of shell output ...]
8095
8095
 
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{el as a}from"./chunk-3f6t3wde.js";import"./chunk-b5h8vd5n.js";import"./chunk-jee9y4t0.js";import"./chunk-50aznc8e.js";import"./chunk-c4x99ayd.js";import"./chunk-73d0dy03.js";import"./chunk-ha5qct06.js";import"./chunk-w8xaw2dv.js";import"./chunk-tq258v8s.js";import"./chunk-ds162xgb.js";import"./chunk-jfy6bfvv.js";import"./chunk-2p6w3w8f.js";import"./chunk-98nh88th.js";import"./chunk-t7v8wzr9.js";import"./chunk-er5q8nhp.js";import"./chunk-cqtkxwd8.js";import"./chunk-h6htvj2y.js";import"./chunk-2qy62cv4.js";import"./chunk-t2n6fmpy.js";import"./chunk-x1naayst.js";import"./chunk-ng85b73s.js";import"./chunk-2bxy8zm1.js";import"./chunk-qq9pvscd.js";import"./chunk-3nc9wy1m.js";import"./chunk-r8ddb02d.js";import"./chunk-dhvwrrqx.js";import"./chunk-56cty7nr.js";import"./chunk-thbjhgw0.js";import"./chunk-p20ft5mj.js";import"./chunk-b5x3zghc.js";import"./chunk-t1f7jeat.js";import"./chunk-tk6gjy9d.js";import"./chunk-pkdk0ppc.js";import"./chunk-hrnx60em.js";import"./chunk-bbznk59q.js";import"./chunk-01gtn79f.js";import"./chunk-meaa7wrs.js";import"./chunk-gvj8qg7x.js";import"./chunk-fa03gsff.js";export{a as Session};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Gs as X}from"./chunk-v7yvnnmr.js";function D(j){return j.parserConfiguration({"populate--":!0}).scriptName("qitqode").wrap(100).help("help","show help").alias("help","h").version("version","show version number",X).alias("version","v").option("print-logs",{describe:"print logs to stderr",type:"boolean"}).option("log-level",{describe:"log level",type:"string",choices:["DEBUG","INFO","WARN","ERROR"]}).option("pure",{describe:"run without external plugins",type:"boolean"})}var H={port:{type:"number",describe:"port to listen on",default:0},hostname:{type:"string",describe:"hostname to listen on",default:"127.0.0.1"},mdns:{type:"boolean",describe:"enable mDNS service discovery (defaults hostname to 0.0.0.0)",default:!1},"mdns-domain":{type:"string",describe:"custom domain name for mDNS service (default: qitqode.local)",default:"qitqode.local"},cors:{type:"string",array:!0,describe:"additional domains to allow for CORS",default:[]},"no-auth":{type:"boolean",describe:"allow starting without authentication on non-loopback addresses (DANGEROUS)",default:!1}};function u(j){return j.options(H)}function F(j,z=process.argv){return z.some((B)=>B===j||B.startsWith(`${j}=`))}function P(j,z=process.argv){return F("--port",z)||F("--hostname",z)||F("--mdns",z)||!!j.mdns||j.port!==0||j.hostname!=="127.0.0.1"}function _(j,z,B=process.argv){let J=F("--port",B),Z=F("--hostname",B),$=F("--mdns",B),q=F("--mdns-domain",B),K=$?j.mdns:z?.server?.mdns??j.mdns,M=q?j["mdns-domain"]:z?.server?.mdnsDomain??j["mdns-domain"],N=J?j.port:z?.server?.port??j.port,U=Z?j.hostname:K&&!z?.server?.hostname?"0.0.0.0":z?.server?.hostname??j.hostname,V=z?.server?.cors??[],Y=Array.isArray(j.cors)?j.cors:j.cors?[j.cors]:[],b=[...V,...Y],A=j["no-auth"];return{hostname:U,port:N,mdns:K,mdnsDomain:M,cors:b,noAuth:A}}var k={model:{type:"string",alias:["m"],describe:"model to use in the format of provider/model"},continue:{alias:["c"],describe:"continue the last session",type:"boolean"},session:{alias:["s"],type:"string",describe:"session id to continue"},fork:{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"},prompt:{type:"string",describe:"prompt to use"},agent:{type:"string",describe:"agent to use"},dark:{type:"boolean",describe:"start in dark theme (overrides saved theme preference for this launch)"},light:{type:"boolean",describe:"start in light theme (overrides saved theme preference for this launch)"},monochrome:{type:"boolean",describe:"start in monochrome accessible rendering \u2014 no color, plain terminal, screen-reader friendly"},headless:{type:"boolean",describe:"headless permissionless mode for AI subagent use \u2014 auto-approves all tool permissions, implies --never-ask"},"api-key":{type:"string",describe:"Qlex API key for non-interactive authentication in headless mode (can also be set via $QLEX_API_KEY)"},sso:{type:"boolean",describe:"sign in via SSO device-code flow before starting a headless session \u2014 prints a URL and code, waits for browser approval (requires --headless)"},free:{type:"boolean",describe:"start in Free tier (no cost) \u2014 shorthand for the Free model tier"},default:{type:"boolean",describe:"start in Default tier \u2014 shorthand for the Default model tier"},fast:{type:"boolean",describe:"start in Fast tier \u2014 shorthand for the Fast model tier"},economy:{type:"boolean",describe:"start in Economy tier \u2014 shorthand for the Economy model tier"},power:{type:"boolean",describe:"start in Power tier \u2014 shorthand for the Power model tier"}},L=36,W="\x1B[38;5;214m",I="\x1B[0;2m",Q="\x1B[0m";function G(j,z){let B=Math.round(j/100*L),J=`${"\u25A0".repeat(B)}${"\uFF65".repeat(L-B)}`;return`\r${W}${J} ${j.toString().padStart(3)}%${Q} ${I}${z}${Q}`}
2
+ import{Gs as X}from"./chunk-p20ft5mj.js";function D(j){return j.parserConfiguration({"populate--":!0}).scriptName("qitqode").wrap(100).help("help","show help").alias("help","h").version("version","show version number",X).alias("version","v").option("print-logs",{describe:"print logs to stderr",type:"boolean"}).option("log-level",{describe:"log level",type:"string",choices:["DEBUG","INFO","WARN","ERROR"]}).option("pure",{describe:"run without external plugins",type:"boolean"})}var H={port:{type:"number",describe:"port to listen on",default:0},hostname:{type:"string",describe:"hostname to listen on",default:"127.0.0.1"},mdns:{type:"boolean",describe:"enable mDNS service discovery (defaults hostname to 0.0.0.0)",default:!1},"mdns-domain":{type:"string",describe:"custom domain name for mDNS service (default: qitqode.local)",default:"qitqode.local"},cors:{type:"string",array:!0,describe:"additional domains to allow for CORS",default:[]},"no-auth":{type:"boolean",describe:"allow starting without authentication on non-loopback addresses (DANGEROUS)",default:!1}};function u(j){return j.options(H)}function F(j,z=process.argv){return z.some((B)=>B===j||B.startsWith(`${j}=`))}function P(j,z=process.argv){return F("--port",z)||F("--hostname",z)||F("--mdns",z)||!!j.mdns||j.port!==0||j.hostname!=="127.0.0.1"}function _(j,z,B=process.argv){let J=F("--port",B),Z=F("--hostname",B),$=F("--mdns",B),q=F("--mdns-domain",B),K=$?j.mdns:z?.server?.mdns??j.mdns,M=q?j["mdns-domain"]:z?.server?.mdnsDomain??j["mdns-domain"],N=J?j.port:z?.server?.port??j.port,U=Z?j.hostname:K&&!z?.server?.hostname?"0.0.0.0":z?.server?.hostname??j.hostname,V=z?.server?.cors??[],Y=Array.isArray(j.cors)?j.cors:j.cors?[j.cors]:[],b=[...V,...Y],A=j["no-auth"];return{hostname:U,port:N,mdns:K,mdnsDomain:M,cors:b,noAuth:A}}var k={model:{type:"string",alias:["m"],describe:"model to use in the format of provider/model"},continue:{alias:["c"],describe:"continue the last session",type:"boolean"},session:{alias:["s"],type:"string",describe:"session id to continue"},fork:{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"},prompt:{type:"string",describe:"prompt to use"},agent:{type:"string",describe:"agent to use"},dark:{type:"boolean",describe:"start in dark theme (overrides saved theme preference for this launch)"},light:{type:"boolean",describe:"start in light theme (overrides saved theme preference for this launch)"},monochrome:{type:"boolean",describe:"start in monochrome accessible rendering \u2014 no color, plain terminal, screen-reader friendly"},headless:{type:"boolean",describe:"headless permissionless mode for AI subagent use \u2014 auto-approves all tool permissions, implies --never-ask"},"api-key":{type:"string",describe:"Qlex API key for non-interactive authentication in headless mode (can also be set via $QLEX_API_KEY)"},sso:{type:"boolean",describe:"sign in via SSO device-code flow before starting a headless session \u2014 prints a URL and code, waits for browser approval (requires --headless)"},free:{type:"boolean",describe:"start in Free tier (no cost) \u2014 shorthand for the Free model tier"},default:{type:"boolean",describe:"start in Default tier \u2014 shorthand for the Default model tier"},fast:{type:"boolean",describe:"start in Fast tier \u2014 shorthand for the Fast model tier"},economy:{type:"boolean",describe:"start in Economy tier \u2014 shorthand for the Economy model tier"},power:{type:"boolean",describe:"start in Power tier \u2014 shorthand for the Power model tier"}},L=36,W="\x1B[38;5;214m",I="\x1B[0;2m",Q="\x1B[0m";function G(j,z){let B=Math.round(j/100*L),J=`${"\u25A0".repeat(B)}${"\uFF65".repeat(L-B)}`;return`\r${W}${J} ${j.toString().padStart(3)}%${Q} ${I}${z}${Q}`}
3
3
  export{D as Jf,H as Kf,u as Lf,P as Mf,_ as Nf,k as Of,G as Pf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{rh as r}from"./chunk-ckhhm2m8.js";import{Sj as e}from"./chunk-q39h31te.js";import{$l as t}from"./chunk-fegrrsfj.js";import{mp as l}from"./chunk-tq258v8s.js";import{It as a}from"./chunk-tk6gjy9d.js";import{BN as o}from"./chunk-meaa7wrs.js";var S={PromptAppend:t.define("tui.prompt.append",a.object({text:a.string()})),CommandExecute:t.define("tui.command.execute",a.object({command:a.union([a.enum(["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]),a.string()])})),ToastShow:t.define("tui.toast.show",a.object({title:a.string().optional(),message:a.string(),variant:a.enum(["info","success","warning","error"]),duration:a.number().default(5000).optional().describe("Duration in milliseconds")})),SessionSelect:t.define("tui.session.select",a.object({sessionID:e.zod.describe("Session ID to navigate to")})),InstructionsLoaded:r};class m extends o.Class("ConsoleState")({consoleManagedProviders:o.mutable(o.Array(o.String)),activeOrgName:o.optional(o.String),switchableOrgCount:o.Number}){static zod=l(this)}var f=m.make({consoleManagedProviders:[],activeOrgName:void 0,switchableOrgCount:0});
2
+ import{rh as r}from"./chunk-th189x63.js";import{Sj as e}from"./chunk-3f6t3wde.js";import{$l as t}from"./chunk-50aznc8e.js";import{mp as l}from"./chunk-tq258v8s.js";import{It as a}from"./chunk-tk6gjy9d.js";import{BN as o}from"./chunk-meaa7wrs.js";var S={PromptAppend:t.define("tui.prompt.append",a.object({text:a.string()})),CommandExecute:t.define("tui.command.execute",a.object({command:a.union([a.enum(["session.list","session.new","session.share","session.interrupt","session.compact","session.page.up","session.page.down","session.line.up","session.line.down","session.half.page.up","session.half.page.down","session.first","session.last","prompt.clear","prompt.submit","agent.cycle"]),a.string()])})),ToastShow:t.define("tui.toast.show",a.object({title:a.string().optional(),message:a.string(),variant:a.enum(["info","success","warning","error"]),duration:a.number().default(5000).optional().describe("Duration in milliseconds")})),SessionSelect:t.define("tui.session.select",a.object({sessionID:e.zod.describe("Session ID to navigate to")})),InstructionsLoaded:r};class m extends o.Class("ConsoleState")({consoleManagedProviders:o.mutable(o.Array(o.String)),activeOrgName:o.optional(o.String),switchableOrgCount:o.Number}){static zod=l(this)}var f=m.make({consoleManagedProviders:[],activeOrgName:void 0,switchableOrgCount:0});
3
3
  export{S as mg,m as ng,f as og};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{G as x}from"./chunk-wnjg8mmh.js";import{Sf as D}from"./chunk-ntmn6epc.js";import{Bg as N,sg as B,vg as H,xg as M,yg as A}from"./chunk-pn77fh9b.js";import{Dj as C}from"./chunk-q39h31te.js";import{$H as q}from"./chunk-meaa7wrs.js";var L="forgewise";function W(j){if(!j||j.type!=="api")return"skip";if(j.method==="api-key")return"skip";if(H(j.expiresAt))return"skip";return"probe"}function Y(j){if(j===null)return"skipped";if(!j)return"revoked";return"valid"}function b(j){if(!j||j.type!=="api")return{kind:"skip"};if(j.method==="api-key")return{kind:"skip"};if(!H(j.expiresAt))return{kind:"skip"};if(j.refreshToken)return{kind:"refresh-token",refreshToken:j.refreshToken};return{kind:"browser"}}function G(j){if(j==="invalid_grant")return{kind:"revoked"};if(j===null)return{kind:"transient"};return{kind:"persist",credential:x(j,{rotateRefreshToken:!0})}}var O=1e4;function P(j){if(!j)return;if(j.type!=="api")return{type:j.type,expiresAt:0};return{type:j.type,method:j.metadata?.method,expiresAt:Number(j.metadata?.expires_at??0),refreshToken:j.metadata?.refresh_token}}function k(){if(process.platform==="linux")return Boolean(process.env.DISPLAY||process.env.WAYLAND_DISPLAY);return process.platform==="win32"||process.platform==="darwin"}var V=()=>q.gen(function*(){let j=yield*C.Service,z=yield*q.orElseSucceed(j.get(L),()=>{return});if(W(P(z))==="skip")return"skipped";if(!z||z.type!=="api")return"skipped";let J=yield*q.orElseSucceed(q.tryPromise({try:()=>B(),catch:()=>{return}}).pipe(q.map((Z)=>Z.issuer)),()=>{return});if(!J)return"skipped";let Q=yield*q.promise(()=>M(J,z.key)),X=Y(Q);if(X==="revoked")yield*q.orElseSucceed(j.remove(L),()=>{return});return X}).pipe(q.withSpan("forgewise.validateStoredToken")),y=()=>q.gen(function*(){let j=yield*C.Service,z=yield*q.orElseSucceed(j.get(L),()=>{return}),J=b(P(z));if(J.kind==="skip")return"skipped";if(J.kind==="refresh-token"){let K=yield*q.promise(()=>A(J.refreshToken).catch(()=>null)),$=G(K);if($.kind==="revoked")return yield*q.orElseSucceed(j.remove(L),()=>{return}),"failed";if($.kind==="persist")return(yield*j.set(L,$.credential).pipe(q.map(()=>!0),q.catch(()=>q.succeed(!1))))?"ok":"failed"}if(!k())return"skipped";let Q=new AbortController,X=setTimeout(()=>Q.abort(),O),Z=yield*q.promise(()=>N({signal:Q.signal}).catch(()=>null).finally(()=>clearTimeout(X)));if(!Z)return"failed";let v=x(Z,{rotateRefreshToken:!1});return(yield*j.set(L,v).pipe(q.map(()=>!0),q.catch(()=>q.succeed(!1))))?"ok":"failed"}).pipe(q.withSpan("forgewise.refreshIfNeeded"));var p=()=>q.gen(function*(){if((yield*V())==="revoked")return yield*q.sync(()=>D.println(D.Style.TEXT_DANGER+"Your session was revoked (signed out from another device or by an admin action). Run `qitqode auth login` to sign in again."+D.Style.TEXT_NORMAL)),"revoked";if((yield*y())==="failed")yield*q.sync(()=>D.println(D.Style.TEXT_DIM+"(Session refresh failed \u2014 run `qitqode auth login` to re-authenticate)"+D.Style.TEXT_NORMAL));return"ok"});
2
+ import{G as x}from"./chunk-zbvf09bm.js";import{Sf as D}from"./chunk-ntmn6epc.js";import{Bg as N,sg as B,vg as H,xg as M,yg as A}from"./chunk-cckshvkb.js";import{Dj as C}from"./chunk-3f6t3wde.js";import{$H as q}from"./chunk-meaa7wrs.js";var L="forgewise";function W(j){if(!j||j.type!=="api")return"skip";if(j.method==="api-key")return"skip";if(H(j.expiresAt))return"skip";return"probe"}function Y(j){if(j===null)return"skipped";if(!j)return"revoked";return"valid"}function b(j){if(!j||j.type!=="api")return{kind:"skip"};if(j.method==="api-key")return{kind:"skip"};if(!H(j.expiresAt))return{kind:"skip"};if(j.refreshToken)return{kind:"refresh-token",refreshToken:j.refreshToken};return{kind:"browser"}}function G(j){if(j==="invalid_grant")return{kind:"revoked"};if(j===null)return{kind:"transient"};return{kind:"persist",credential:x(j,{rotateRefreshToken:!0})}}var O=1e4;function P(j){if(!j)return;if(j.type!=="api")return{type:j.type,expiresAt:0};return{type:j.type,method:j.metadata?.method,expiresAt:Number(j.metadata?.expires_at??0),refreshToken:j.metadata?.refresh_token}}function k(){if(process.platform==="linux")return Boolean(process.env.DISPLAY||process.env.WAYLAND_DISPLAY);return process.platform==="win32"||process.platform==="darwin"}var V=()=>q.gen(function*(){let j=yield*C.Service,z=yield*q.orElseSucceed(j.get(L),()=>{return});if(W(P(z))==="skip")return"skipped";if(!z||z.type!=="api")return"skipped";let J=yield*q.orElseSucceed(q.tryPromise({try:()=>B(),catch:()=>{return}}).pipe(q.map((Z)=>Z.issuer)),()=>{return});if(!J)return"skipped";let Q=yield*q.promise(()=>M(J,z.key)),X=Y(Q);if(X==="revoked")yield*q.orElseSucceed(j.remove(L),()=>{return});return X}).pipe(q.withSpan("forgewise.validateStoredToken")),y=()=>q.gen(function*(){let j=yield*C.Service,z=yield*q.orElseSucceed(j.get(L),()=>{return}),J=b(P(z));if(J.kind==="skip")return"skipped";if(J.kind==="refresh-token"){let K=yield*q.promise(()=>A(J.refreshToken).catch(()=>null)),$=G(K);if($.kind==="revoked")return yield*q.orElseSucceed(j.remove(L),()=>{return}),"failed";if($.kind==="persist")return(yield*j.set(L,$.credential).pipe(q.map(()=>!0),q.catch(()=>q.succeed(!1))))?"ok":"failed"}if(!k())return"skipped";let Q=new AbortController,X=setTimeout(()=>Q.abort(),O),Z=yield*q.promise(()=>N({signal:Q.signal}).catch(()=>null).finally(()=>clearTimeout(X)));if(!Z)return"failed";let v=x(Z,{rotateRefreshToken:!1});return(yield*j.set(L,v).pipe(q.map(()=>!0),q.catch(()=>q.succeed(!1))))?"ok":"failed"}).pipe(q.withSpan("forgewise.refreshIfNeeded"));var p=()=>q.gen(function*(){if((yield*V())==="revoked")return yield*q.sync(()=>D.println(D.Style.TEXT_DANGER+"Your session was revoked (signed out from another device or by an admin action). Run `qitqode auth login` to sign in again."+D.Style.TEXT_NORMAL)),"revoked";if((yield*y())==="failed")yield*q.sync(()=>D.println(D.Style.TEXT_DIM+"(Session refresh failed \u2014 run `qitqode auth login` to re-authenticate)"+D.Style.TEXT_NORMAL));return"ok"});
3
3
  export{p as g};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Cr as B,zr as z}from"./chunk-ej3gmaba.js";import{Us as D}from"./chunk-v7yvnnmr.js";import{Iz as r}from"./chunk-01gtn79f.js";import{$H as W,jD as x,yF as R}from"./chunk-meaa7wrs.js";var w=x.Reference("~qitqode/InstanceRef",{defaultValue:()=>{return}}),C=x.Reference("~qitqode/WorkspaceRef",{defaultValue:()=>{return}});var V=D.create("instance"),y={async provide(p){return V.provide({workspaceID:p.workspaceID},()=>p.fn())},restore(p,o){return V.provide({workspaceID:p},o)},get workspaceID(){try{return V.use().workspaceID}catch{return}}};var j;function U(p){j=p}function P(){if(!j)throw new D.NotFound("instance");return j()}function H(p,o){if(!o.instance&&!o.workspace)return p;if(!o.instance)return p.pipe(W.provideService(C,o.workspace));if(!o.workspace)return p.pipe(W.provideService(w,o.instance));return p.pipe(W.provideService(w,o.instance),W.provideService(C,o.workspace))}function d(p){try{return H(p,{instance:P(),workspace:y.workspaceID})}catch(o){if(!(o instanceof D.NotFound))throw o}return p}function F(p,o){let G,I=()=>G??=r.make(R.provideMerge(o,z),{memoMap:B});return{runSync:(k)=>I().runSync(d(p.use(k))),runPromiseExit:(k,q)=>I().runPromiseExit(d(p.use(k)),q),runPromise:(k,q)=>I().runPromise(d(p.use(k)),q),runFork:(k)=>I().runFork(d(p.use(k))),runCallback:(k)=>I().runCallback(d(p.use(k)))}}
2
+ import{Cr as B,zr as z}from"./chunk-qq9pvscd.js";import{Us as D}from"./chunk-p20ft5mj.js";import{Iz as r}from"./chunk-01gtn79f.js";import{$H as W,jD as x,yF as R}from"./chunk-meaa7wrs.js";var w=x.Reference("~qitqode/InstanceRef",{defaultValue:()=>{return}}),C=x.Reference("~qitqode/WorkspaceRef",{defaultValue:()=>{return}});var V=D.create("instance"),y={async provide(p){return V.provide({workspaceID:p.workspaceID},()=>p.fn())},restore(p,o){return V.provide({workspaceID:p},o)},get workspaceID(){try{return V.use().workspaceID}catch{return}}};var j;function U(p){j=p}function P(){if(!j)throw new D.NotFound("instance");return j()}function H(p,o){if(!o.instance&&!o.workspace)return p;if(!o.instance)return p.pipe(W.provideService(C,o.workspace));if(!o.workspace)return p.pipe(W.provideService(w,o.instance));return p.pipe(W.provideService(w,o.instance),W.provideService(C,o.workspace))}function d(p){try{return H(p,{instance:P(),workspace:y.workspaceID})}catch(o){if(!(o instanceof D.NotFound))throw o}return p}function F(p,o){let G,I=()=>G??=r.make(R.provideMerge(o,z),{memoMap:B});return{runSync:(k)=>I().runSync(d(p.use(k))),runPromiseExit:(k,q)=>I().runPromiseExit(d(p.use(k)),q),runPromise:(k,q)=>I().runPromise(d(p.use(k)),q),runFork:(k)=>I().runFork(d(p.use(k))),runCallback:(k)=>I().runCallback(d(p.use(k)))}}
3
3
  export{w as qr,C as rr,y as sr,U as tr,H as ur,d as vr,F as wr};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Nf as r}from"./chunk-6tjghyx6.js";import{qh as n}from"./chunk-1qw3yh13.js";import{fl as e}from"./chunk-q39h31te.js";async function a(o){let t=await n.runPromise(e.Service.use((i)=>i.getGlobal()));return r(o,t)}function s(o){return o==="127.0.0.1"||o==="localhost"||o==="::1"}function c(o,t){return!s(o.hostname)&&!t&&!o.noAuth}
2
+ import{Nf as r}from"./chunk-18xhxdsh.js";import{qh as n}from"./chunk-0jv8r99k.js";import{fl as e}from"./chunk-3f6t3wde.js";async function a(o){let t=await n.runPromise(e.Service.use((i)=>i.getGlobal()));return r(o,t)}function s(o){return o==="127.0.0.1"||o==="localhost"||o==="::1"}function c(o,t){return!s(o.hostname)&&!t&&!o.noAuth}
3
3
  export{a as zd,c as Ad};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Bs as i}from"./chunk-dhvwrrqx.js";import{ct as o}from"./chunk-v7yvnnmr.js";import{lP as c}from"./chunk-fa03gsff.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
2
+ import{Bs as i}from"./chunk-dhvwrrqx.js";import{ct as o}from"./chunk-p20ft5mj.js";import{lP as c}from"./chunk-fa03gsff.js";var e=c(i(),1);import p from"path";function l(n,t){let r=t?.PATH??t?.Path??process.env.PATH??process.env.Path??"",h=r?r+p.delimiter+o.Path.bin:o.Path.bin,s=e.default.sync(n,{nothrow:!0,path:h,pathExt:t?.PATHEXT??t?.PathExt??process.env.PATHEXT??process.env.PathExt});return typeof s==="string"?s:null}
3
3
  export{l as sp};