agentix-cli 0.137.1 → 0.137.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{board-dashboard-VXQYQY22.js → board-dashboard-2A6VSQ7V.js} +2 -2
  2. package/dist/{chunk-BWXRAPTX.js → chunk-5HLD66CW.js} +2 -2
  3. package/dist/chunk-A5GYG56I.js +2 -0
  4. package/dist/chunk-A5GYG56I.js.map +1 -0
  5. package/dist/{chunk-ADQUFEPJ.js → chunk-ID4DCD2T.js} +67 -67
  6. package/dist/chunk-ID4DCD2T.js.map +1 -0
  7. package/dist/chunk-IS2IWRP7.js +4 -0
  8. package/dist/chunk-IS2IWRP7.js.map +1 -0
  9. package/dist/{chunk-LK4YO2FE.js → chunk-PNITKKDR.js} +2 -2
  10. package/dist/{chunk-K6UV4A2T.js → chunk-QY5YUHGW.js} +2 -2
  11. package/dist/{chunk-Z5OD225A.js → chunk-TEM7IIDC.js} +2 -2
  12. package/dist/{chunk-36HFRKIH.js → chunk-VDG6Y5L3.js} +1 -1
  13. package/dist/cli.js +1 -1
  14. package/dist/cli.js.map +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/net-family-X2P3OVDP.js +2 -0
  18. package/dist/ntfy-Q4YHFKWW.js +2 -0
  19. package/dist/{program-MJ6S6X6T.js → program-3TO4YAY7.js} +5 -5
  20. package/dist/{program-MJ6S6X6T.js.map → program-3TO4YAY7.js.map} +1 -1
  21. package/dist/push-PRFZMCIK.js +2 -0
  22. package/dist/push-bridge-HNQG2TOI.js +2 -0
  23. package/dist/wiki-enrich-6776OMUB.js +2 -0
  24. package/dist/wiki-enrich-6776OMUB.js.map +1 -0
  25. package/package.json +1 -1
  26. package/dist/chunk-ADQUFEPJ.js.map +0 -1
  27. package/dist/chunk-KQ7KWFZY.js +0 -4
  28. package/dist/chunk-KQ7KWFZY.js.map +0 -1
  29. package/dist/ntfy-ZDNBUEIX.js +0 -2
  30. package/dist/push-HVGOC4VN.js +0 -2
  31. package/dist/push-bridge-NAQ7WQJX.js +0 -2
  32. package/dist/wiki-enrich-6CSUPULH.js +0 -2
  33. /package/dist/{board-dashboard-VXQYQY22.js.map → board-dashboard-2A6VSQ7V.js.map} +0 -0
  34. /package/dist/{chunk-BWXRAPTX.js.map → chunk-5HLD66CW.js.map} +0 -0
  35. /package/dist/{chunk-LK4YO2FE.js.map → chunk-PNITKKDR.js.map} +0 -0
  36. /package/dist/{chunk-K6UV4A2T.js.map → chunk-QY5YUHGW.js.map} +0 -0
  37. /package/dist/{chunk-Z5OD225A.js.map → chunk-TEM7IIDC.js.map} +0 -0
  38. /package/dist/{chunk-36HFRKIH.js.map → chunk-VDG6Y5L3.js.map} +0 -0
  39. /package/dist/{ntfy-ZDNBUEIX.js.map → net-family-X2P3OVDP.js.map} +0 -0
  40. /package/dist/{push-HVGOC4VN.js.map → ntfy-Q4YHFKWW.js.map} +0 -0
  41. /package/dist/{push-bridge-NAQ7WQJX.js.map → push-PRFZMCIK.js.map} +0 -0
  42. /package/dist/{wiki-enrich-6CSUPULH.js.map → push-bridge-HNQG2TOI.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import{C as Ot,D as ro,E as oo,F as so,H as io,I as lo,a as qr,b as zr,c as Fr,d as Ur,e as Ae,f as Wr,g as Gr,h as jt,j as Xr,p as Kr,q as Jr,r as Vr,s as Yr,t as Qr,x as Zr,y as eo}from"./chunk-K6UV4A2T.js";import"./chunk-H4NSB54D.js";import"./chunk-MTX4UPNB.js";import{a as to}from"./chunk-5NTWGUSJ.js";import{a as ao,b as no}from"./chunk-NZQBS7GN.js";import"./chunk-QAWKN2N4.js";import{a as Br}from"./chunk-BKHIR2YJ.js";import{a as qe,b as z,c as I,h as pe,i as Pt,j as se,k as K,l as $t,m as Nr,n as Dr,o as Hr}from"./chunk-B2QYMUTD.js";import{a as C}from"./chunk-GIQKQD2B.js";import{a as Or}from"./chunk-LNY6N73E.js";import{$a as Pr,A as ur,B as St,Ba as Tr,C as mr,Ca as Ar,D as Et,Da as Cr,E as Tt,F as At,G as fr,H as gr,K as xr,L as br,La as Ir,M as vr,Na as Te,Sa as Mr,T as U,U as yr,Ua as Be,V as wr,Va as Ct,Wa as It,Xa as Mt,Ya as Lt,Za as Lr,_a as Rr,a as er,ab as Rt,c as bt,cb as $r,d as _a,e as tr,fb as jr,i as vt,l as Ze,n as ar,z as _t,za as Er}from"./chunk-LK4YO2FE.js";import{h as Qn,i as Zn}from"./chunk-Z2QOQBUS.js";import"./chunk-GTJIKXDB.js";import{a as H,b as kr,c as _r,g as Sr}from"./chunk-7LN4VKDU.js";import{a as hr}from"./chunk-IMLAPB7G.js";import{p as nr,t as rr}from"./chunk-S2GAEH2F.js";import{a as ir,b as yt,d as lr,e as dr,f as wt}from"./chunk-WCXXXAHV.js";import{b as sr}from"./chunk-JWDJMFU6.js";import{g as kt}from"./chunk-LQE73AZR.js";import{b as cr,c as pr}from"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-AKWBDCMU.js";import"./chunk-635B6SXI.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import{b as G,c as Ee,d as or,e as Sa}from"./chunk-EMGB23H5.js";import{F as Vn,W as ht,X as gt,Y as xt,Z as ce,_ as Yn,a as Fn,f as Un,g as wa,h as ka,l as Wn,n as Gn,o as Xn,z as Jn}from"./chunk-3K3LRLZX.js";import"./chunk-QSKG754X.js";import"./chunk-MEFPXHQJ.js";import"./chunk-Y4CYQV7G.js";import"./chunk-SHEUCITK.js";import"./chunk-5RHCM3L7.js";import"./chunk-SZDACK6O.js";import"./chunk-AFRHKA7B.js";import"./chunk-23LWLYOK.js";import{a as Kn}from"./chunk-BXXP6DTB.js";import"./chunk-3UOTLMXD.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-RWMDDMYX.js";import"./chunk-MXDWLBIA.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import{g as zn}from"./chunk-E3AEOQMK.js";import"./chunk-WPNRDEHW.js";import"./chunk-SQ37I2MD.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-6TURWSMN.js";import"./chunk-QD6IICK7.js";import"./chunk-QOYAX2FT.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import{A as ba,Aa as ft,E as nc,L as Nn,O as va,R as Dn,T as mt,U as Hn,W as Bn,Y as qn,a as Mn,aa as ya,b as Ln,c as ec,sa as X,x as ct,y as tc,z as xa}from"./chunk-KHYF6KTY.js";import{a as Rn,b as pt,c as ga,d as Pn,h as $n}from"./chunk-BRK6M6LA.js";import{d as jn,e as ac,f as ut,n as On}from"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";function Ea(t,e,a=Date.now()){let n=Math.max(0,a-(t.updatedAt||a)),r=t.clientId?e[t.clientId]:void 0;if(!r)return{score:n/864e5,ageMs:n,rising:!1,overdue:!1};let o=n/(r*6e4);return{score:1e3+o,ageMs:n,rising:!0,overdue:o>=1}}function co(t,e,a=Date.now()){return t.map((n,r)=>({i:r,s:Ea(n,e,a).score})).sort((n,r)=>r.s-n.s||n.i-r.i).map(n=>n.i)}var ie={refresh:'<path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/>',clock:'<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>',alert:'<path d="M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"/><path d="M12 9v4"/><path d="M12 17h.01"/>',gavel:'<path d="M12 3 6 9"/><path d="m9 6 6 6"/><path d="M15 9 9 15"/><path d="m12 12 6 6"/><path d="M4 21h10"/>',loop:'<path d="M17 2l4 4-4 4"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><path d="M7 22l-4-4 4-4"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/>',broom:'<path d="M3 21h18"/><path d="M12 3v9"/><path d="m7 12 5-3 5 3-1.5 6h-7Z"/>',server:'<rect x="2" y="3" width="20" height="7" rx="2"/><rect x="2" y="14" width="20" height="7" rx="2"/><path d="M6 6.5h.01"/><path d="M6 17.5h.01"/>',inbox:'<path d="M21 12h-6l-2 3h-2l-2-3H3"/><path d="M5 5h14l2 7v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Z"/>',cross:'<circle cx="12" cy="12" r="9"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',file:'<path d="M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z"/><path d="M14 2v5h5"/>',search:'<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>',chev:'<path d="m6 9 6 6 6-6"/>',chevr:'<path d="m9 6 6 6-6 6"/>',ext:'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',pulse:'<path d="M3 12h4l3-8 4 16 3-8h4"/>',plug:'<path d="M9 2v6"/><path d="M15 2v6"/><path d="M6 8h12v3a6 6 0 0 1-12 0Z"/><path d="M12 17v5"/>',check:'<path d="M20 6 9 17l-5-5"/>',route:'<circle cx="6" cy="19" r="3"/><circle cx="18" cy="5" r="3"/><path d="M9 19h6a4 4 0 0 0 0-8H9a4 4 0 0 1 0-8h6"/>',branch:'<circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="8" r="3"/><path d="M18 11v1a3 3 0 0 1-3 3H9"/><path d="M6 9v6"/>',send:'<path d="M22 2 11 13"/><path d="M22 2l-7 20-4-9-9-4Z"/>',msg:'<path d="M21 11.5a8.4 8.4 0 0 1-12.9 7.5L3 21l2-5.1A8.4 8.4 0 1 1 21 11.5Z"/>',code:'<path d="m9 18-6-6 6-6"/><path d="m15 6 6 6-6 6"/>',hash:'<path d="M4 9h16"/><path d="M4 15h16"/><path d="M10 3 8 21"/><path d="M16 3l-2 18"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',trace:'<path d="M4 4v16h16"/><path d="m7 15 4-4 3 3 5-6"/>'},Ce=(t,e=14)=>'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="'+e+'" height="'+e+'" aria-hidden="true">'+t+"</svg>",Nt=(t,e,a,n="")=>'<div class="ax-sec-label"><h3>'+Ce(t,13)+e+(a?'<span class="ax-sec-label__n" id="'+a+'"></span>':"")+"</h3>"+n+"</div>";function po(t={}){return I({title:"AgentX \xB7 Monitor",activeTab:"monitor",subtitle:"Monitor",peers:t.peers,body:`<div class="bf">
1
+ import{C as Ot,D as ro,E as oo,F as so,H as io,I as lo,a as qr,b as zr,c as Fr,d as Ur,e as Ae,f as Wr,g as Gr,h as jt,j as Xr,p as Kr,q as Jr,r as Vr,s as Yr,t as Qr,x as Zr,y as eo}from"./chunk-QY5YUHGW.js";import"./chunk-H4NSB54D.js";import"./chunk-MTX4UPNB.js";import{a as to}from"./chunk-5NTWGUSJ.js";import{a as ao,b as no}from"./chunk-NZQBS7GN.js";import"./chunk-QAWKN2N4.js";import{a as Br}from"./chunk-BKHIR2YJ.js";import{a as qe,b as z,c as I,h as pe,i as Pt,j as se,k as K,l as $t,m as Nr,n as Dr,o as Hr}from"./chunk-B2QYMUTD.js";import{a as C}from"./chunk-GIQKQD2B.js";import{a as Or}from"./chunk-LNY6N73E.js";import{$a as Pr,A as ur,B as St,Ba as Tr,C as mr,Ca as Ar,D as Et,Da as Cr,E as Tt,F as At,G as fr,H as gr,K as xr,L as br,La as Ir,M as vr,Na as Te,Sa as Mr,T as U,U as yr,Ua as Be,V as wr,Va as Ct,Wa as It,Xa as Mt,Ya as Lt,Za as Lr,_a as Rr,a as er,ab as Rt,c as bt,cb as $r,d as _a,e as tr,fb as jr,i as vt,l as Ze,n as ar,z as _t,za as Er}from"./chunk-PNITKKDR.js";import"./chunk-GTJIKXDB.js";import{h as Qn,i as Zn}from"./chunk-Z2QOQBUS.js";import{a as H,b as kr,c as _r,g as Sr}from"./chunk-7LN4VKDU.js";import{a as hr}from"./chunk-IMLAPB7G.js";import{p as nr,t as rr}from"./chunk-S2GAEH2F.js";import"./chunk-AKWBDCMU.js";import{b as G,c as Ee,d as or,e as Sa}from"./chunk-EMGB23H5.js";import{a as ir,b as yt,d as lr,e as dr,f as wt}from"./chunk-WCXXXAHV.js";import{b as sr}from"./chunk-JWDJMFU6.js";import{g as kt}from"./chunk-LQE73AZR.js";import{b as cr,c as pr}from"./chunk-2D3RYIDU.js";import"./chunk-MRIVENBY.js";import"./chunk-635B6SXI.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import{F as Vn,W as ht,X as gt,Y as xt,Z as ce,_ as Yn,a as Fn,f as Un,g as wa,h as ka,l as Wn,n as Gn,o as Xn,z as Jn}from"./chunk-3K3LRLZX.js";import"./chunk-QSKG754X.js";import"./chunk-MEFPXHQJ.js";import"./chunk-Y4CYQV7G.js";import"./chunk-SHEUCITK.js";import"./chunk-5RHCM3L7.js";import"./chunk-SZDACK6O.js";import"./chunk-AFRHKA7B.js";import"./chunk-23LWLYOK.js";import{a as Kn}from"./chunk-BXXP6DTB.js";import"./chunk-3UOTLMXD.js";import"./chunk-PE5V2LI7.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-RWMDDMYX.js";import"./chunk-MXDWLBIA.js";import"./chunk-OWNQ2FD4.js";import"./chunk-KEXBEUSU.js";import"./chunk-ROLSSYXE.js";import{g as zn}from"./chunk-E3AEOQMK.js";import"./chunk-WPNRDEHW.js";import"./chunk-SQ37I2MD.js";import"./chunk-72SZI2UW.js";import"./chunk-FCPTN6NF.js";import"./chunk-MCI3DIWW.js";import"./chunk-6TURWSMN.js";import"./chunk-QD6IICK7.js";import"./chunk-QOYAX2FT.js";import"./chunk-2PJKGZWP.js";import"./chunk-7I7IEX4S.js";import{A as ba,Aa as ft,E as nc,L as Nn,O as va,R as Dn,T as mt,U as Hn,W as Bn,Y as qn,a as Mn,aa as ya,b as Ln,c as ec,sa as X,x as ct,y as tc,z as xa}from"./chunk-KHYF6KTY.js";import{a as Rn,b as pt,c as ga,d as Pn,h as $n}from"./chunk-BRK6M6LA.js";import{d as jn,e as ac,f as ut,n as On}from"./chunk-UIBUZ2N3.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";function Ea(t,e,a=Date.now()){let n=Math.max(0,a-(t.updatedAt||a)),r=t.clientId?e[t.clientId]:void 0;if(!r)return{score:n/864e5,ageMs:n,rising:!1,overdue:!1};let o=n/(r*6e4);return{score:1e3+o,ageMs:n,rising:!0,overdue:o>=1}}function co(t,e,a=Date.now()){return t.map((n,r)=>({i:r,s:Ea(n,e,a).score})).sort((n,r)=>r.s-n.s||n.i-r.i).map(n=>n.i)}var ie={refresh:'<path d="M21 2v6h-6"/><path d="M3 12a9 9 0 0 1 15-6.7L21 8"/><path d="M3 22v-6h6"/><path d="M21 12a9 9 0 0 1-15 6.7L3 16"/>',clock:'<circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>',alert:'<path d="M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z"/><path d="M12 9v4"/><path d="M12 17h.01"/>',gavel:'<path d="M12 3 6 9"/><path d="m9 6 6 6"/><path d="M15 9 9 15"/><path d="m12 12 6 6"/><path d="M4 21h10"/>',loop:'<path d="M17 2l4 4-4 4"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><path d="M7 22l-4-4 4-4"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/>',broom:'<path d="M3 21h18"/><path d="M12 3v9"/><path d="m7 12 5-3 5 3-1.5 6h-7Z"/>',server:'<rect x="2" y="3" width="20" height="7" rx="2"/><rect x="2" y="14" width="20" height="7" rx="2"/><path d="M6 6.5h.01"/><path d="M6 17.5h.01"/>',inbox:'<path d="M21 12h-6l-2 3h-2l-2-3H3"/><path d="M5 5h14l2 7v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Z"/>',cross:'<circle cx="12" cy="12" r="9"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/>',file:'<path d="M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z"/><path d="M14 2v5h5"/>',search:'<circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/>',chev:'<path d="m6 9 6 6 6-6"/>',chevr:'<path d="m9 6 6 6-6 6"/>',ext:'<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',pulse:'<path d="M3 12h4l3-8 4 16 3-8h4"/>',plug:'<path d="M9 2v6"/><path d="M15 2v6"/><path d="M6 8h12v3a6 6 0 0 1-12 0Z"/><path d="M12 17v5"/>',check:'<path d="M20 6 9 17l-5-5"/>',route:'<circle cx="6" cy="19" r="3"/><circle cx="18" cy="5" r="3"/><path d="M9 19h6a4 4 0 0 0 0-8H9a4 4 0 0 1 0-8h6"/>',branch:'<circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="8" r="3"/><path d="M18 11v1a3 3 0 0 1-3 3H9"/><path d="M6 9v6"/>',send:'<path d="M22 2 11 13"/><path d="M22 2l-7 20-4-9-9-4Z"/>',msg:'<path d="M21 11.5a8.4 8.4 0 0 1-12.9 7.5L3 21l2-5.1A8.4 8.4 0 1 1 21 11.5Z"/>',code:'<path d="m9 18-6-6 6-6"/><path d="m15 6 6 6-6 6"/>',hash:'<path d="M4 9h16"/><path d="M4 15h16"/><path d="M10 3 8 21"/><path d="M16 3l-2 18"/>',x:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',trace:'<path d="M4 4v16h16"/><path d="m7 15 4-4 3 3 5-6"/>'},Ce=(t,e=14)=>'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="'+e+'" height="'+e+'" aria-hidden="true">'+t+"</svg>",Nt=(t,e,a,n="")=>'<div class="ax-sec-label"><h3>'+Ce(t,13)+e+(a?'<span class="ax-sec-label__n" id="'+a+'"></span>':"")+"</h3>"+n+"</div>";function po(t={}){return I({title:"AgentX \xB7 Monitor",activeTab:"monitor",subtitle:"Monitor",peers:t.peers,body:`<div class="bf">
2
2
 
3
3
  <div class="bf-head">
4
4
  <div>
@@ -20920,4 +20920,4 @@ data: ${g.replace(/\n/g," ")}
20920
20920
  `)}catch{}}};s.stdout?.on("data",l),s.stderr?.on("data",l);let d=setInterval(()=>{try{e.write(`: hb
20921
20921
 
20922
20922
  `)}catch{}},15e3),c=()=>{clearInterval(d);try{s.kill()}catch{}try{e.end()}catch{}};t.on("close",c),s.on("exit",c),s.on("error",c)}async function Ud(t,e,a,n){let r=a.url+n,o=(t.method||"GET").toUpperCase(),i=o!=="GET"&&o!=="HEAD"?await new Promise((p,m)=>{let g=[];t.on("data",_=>g.push(_)),t.on("end",()=>p(Buffer.concat(g))),t.on("error",m)}):void 0,l={},d=t.headers["content-type"];d&&(l["Content-Type"]=Array.isArray(d)?d[0]:d);let c=t.headers["x-requested-with"];c&&(l["X-Requested-With"]=Array.isArray(c)?c[0]:c),a.token&&(l.Authorization=`Bearer ${a.token}`),l["X-Agentx-Peer"]="primary";try{let p=await fetch(r,{method:o,headers:l,body:i&&i.length>0?i:void 0}),m=Buffer.from(await p.arrayBuffer());e.writeHead(p.status,{"Content-Type":p.headers.get("content-type")||"application/json","Cache-Control":"no-store"}),e.end(m)}catch(p){w(e,502,{error:`proxy to peer failed: ${p?.message||p}`,target:r})}}function lt(t,e){let a=t.replace(/\/+$/,""),n=(e.dashboard?.daemons||[]).find(r=>r.url.replace(/\/+$/,"")===a);return n?{url:Jd(n),token:n.dashboardToken||n.token}:null}export{Gh as applyAttachSessions,Hh as fetchDaemonAgents,Ph as handleBoardRequest,W0 as resetLiveCaches,Se as resolveNodeTargets,U0 as startBoardDashboard,Wh as withLastGood};
20923
- //# sourceMappingURL=board-dashboard-VXQYQY22.js.map
20923
+ //# sourceMappingURL=board-dashboard-2A6VSQ7V.js.map
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-KQ7KWFZY.js";function f(n,e){return`${n}:${e}`}function m(n){return n.includes(":")}var P="/app#alerts",h=3e3,x=2,w=40,A=120,k=1e3;function M(n,e="AgentX"){let o=c(n.text||""),r=(n.buttons??[]).filter(t=>t.url&&t.url.length<=k).slice(0,x).map((t,d)=>({action:`b${d}`,title:g(t.label,w),url:t.url})),s={title:g(o.title||e,A),body:o.body,url:r[0]?.url??P,actions:r},a=()=>Buffer.byteLength(JSON.stringify(s),"utf8");if(a()>h){let t=[...s.body],d=a()-h;for(t=t.slice(0,Math.max(0,t.length-d-1)),s.body=t.join("")+"\u2026";a()>h&&t.length>0;)t=t.slice(0,Math.max(0,t.length-32)),s.body=t.join("")+"\u2026"}return s}function g(n,e){let o=[...n];return o.length>e?o.slice(0,e-1).join("")+"\u2026":n}var y=class{constructor(e){this.deps=e;this.log=e.log??console.error.bind(console,"[push]")}name="push";log;async start(){let e=this.deps.store.list().length;this.log(`push: ready (${e} subscribed phone${e===1?"":"s"})${this.deps.keys()?"":" \u2014 no keys yet, run: agentx app push-keys"}`)}async stop(){}onMessage(e){}async send(e){let o=this.deps.keys();if(!o)throw new Error("push: no keys \u2014 run `agentx app push-keys` on this node");let r=(e.chatId||"").trim(),s=r&&r!=="default"?r:void 0;s&&e.origin&&!m(s)&&(s=f(e.origin,s));let a=[];for(let i of this.deps.store.list(s))this.deps.deviceActive(i.deviceId)&&i.publicKey===o.publicKey?a.push(i):this.deps.store.unsubscribe(i.endpoint);if(a.length===0)throw new Error(s?`push: phone ${s} has not turned on notifications`:"push: no phone has turned on notifications \u2014 open Alerts in the phone app");let t=M(e),d=JSON.stringify(t),v={vapidDetails:{subject:this.deps.subject,publicKey:o.publicKey,privateKey:o.privateKey},TTL:this.deps.ttlSeconds},u=0,l=[];if(await Promise.all(a.map(async i=>{try{await this.deps.sender({endpoint:i.endpoint,keys:{p256dh:i.p256dh,auth:i.auth}},d,v),u++}catch(p){p?.statusCode===404||p?.statusCode===410?(this.deps.store.unsubscribe(i.endpoint),this.log(`push: removed expired subscription for ${i.deviceName}`)):l.push(`${i.deviceName}: ${p?.statusCode?`HTTP ${p.statusCode} `:""}${p?.body||p?.message||p}`.slice(0,200))}})),u===0)throw new Error(`push: not delivered \u2014 ${l.join("; ")||"every subscription had expired"}`);return l.length&&this.log(`push: ${l.length} phone(s) failed: ${l.join("; ")}`),this.deps.store.log({title:t.title,body:t.body,url:t.url,delivered:u,deviceId:s??null},this.deps.keepRecent),String(u)}},b=class{constructor(e,o,r=console.error.bind(console,"[push]"),s){this.peer=e;this.forward=o;this.log=r;this.origin=s}name="push";async start(){this.log(`push: relaying to ${this.peer}`)}async stop(){}onMessage(e){}async send(e){if(e.relayed)throw new Error(`push: this node relays too (channels.push.relayTo = ${this.peer}); set relayTo only on nodes that don't host the phone app`);return this.forward(this.peer,{channel:"push",chatId:e.chatId||"default",text:e.text,...e.buttons?.length?{buttons:e.buttons}:{},relayed:!0,...this.origin?{origin:this.origin}:{}})}};export{f as a,m as b,P as c,h as d,M as e,y as f,b as g};
2
- //# sourceMappingURL=chunk-BWXRAPTX.js.map
1
+ import{b as c}from"./chunk-IS2IWRP7.js";function f(n,e){return`${n}:${e}`}function m(n){return n.includes(":")}var P="/app#alerts",h=3e3,x=2,w=40,A=120,k=1e3;function M(n,e="AgentX"){let o=c(n.text||""),r=(n.buttons??[]).filter(t=>t.url&&t.url.length<=k).slice(0,x).map((t,d)=>({action:`b${d}`,title:g(t.label,w),url:t.url})),s={title:g(o.title||e,A),body:o.body,url:r[0]?.url??P,actions:r},a=()=>Buffer.byteLength(JSON.stringify(s),"utf8");if(a()>h){let t=[...s.body],d=a()-h;for(t=t.slice(0,Math.max(0,t.length-d-1)),s.body=t.join("")+"\u2026";a()>h&&t.length>0;)t=t.slice(0,Math.max(0,t.length-32)),s.body=t.join("")+"\u2026"}return s}function g(n,e){let o=[...n];return o.length>e?o.slice(0,e-1).join("")+"\u2026":n}var y=class{constructor(e){this.deps=e;this.log=e.log??console.error.bind(console,"[push]")}name="push";log;async start(){let e=this.deps.store.list().length;this.log(`push: ready (${e} subscribed phone${e===1?"":"s"})${this.deps.keys()?"":" \u2014 no keys yet, run: agentx app push-keys"}`)}async stop(){}onMessage(e){}async send(e){let o=this.deps.keys();if(!o)throw new Error("push: no keys \u2014 run `agentx app push-keys` on this node");let r=(e.chatId||"").trim(),s=r&&r!=="default"?r:void 0;s&&e.origin&&!m(s)&&(s=f(e.origin,s));let a=[];for(let i of this.deps.store.list(s))this.deps.deviceActive(i.deviceId)&&i.publicKey===o.publicKey?a.push(i):this.deps.store.unsubscribe(i.endpoint);if(a.length===0)throw new Error(s?`push: phone ${s} has not turned on notifications`:"push: no phone has turned on notifications \u2014 open Alerts in the phone app");let t=M(e),d=JSON.stringify(t),v={vapidDetails:{subject:this.deps.subject,publicKey:o.publicKey,privateKey:o.privateKey},TTL:this.deps.ttlSeconds},u=0,l=[];if(await Promise.all(a.map(async i=>{try{await this.deps.sender({endpoint:i.endpoint,keys:{p256dh:i.p256dh,auth:i.auth}},d,v),u++}catch(p){p?.statusCode===404||p?.statusCode===410?(this.deps.store.unsubscribe(i.endpoint),this.log(`push: removed expired subscription for ${i.deviceName}`)):l.push(`${i.deviceName}: ${p?.statusCode?`HTTP ${p.statusCode} `:""}${p?.body||p?.message||p}`.slice(0,200))}})),u===0)throw new Error(`push: not delivered \u2014 ${l.join("; ")||"every subscription had expired"}`);return l.length&&this.log(`push: ${l.length} phone(s) failed: ${l.join("; ")}`),this.deps.store.log({title:t.title,body:t.body,url:t.url,delivered:u,deviceId:s??null},this.deps.keepRecent),String(u)}},b=class{constructor(e,o,r=console.error.bind(console,"[push]"),s){this.peer=e;this.forward=o;this.log=r;this.origin=s}name="push";async start(){this.log(`push: relaying to ${this.peer}`)}async stop(){}onMessage(e){}async send(e){if(e.relayed)throw new Error(`push: this node relays too (channels.push.relayTo = ${this.peer}); set relayTo only on nodes that don't host the phone app`);return this.forward(this.peer,{channel:"push",chatId:e.chatId||"default",text:e.text,...e.buttons?.length?{buttons:e.buttons}:{},relayed:!0,...this.origin?{origin:this.origin}:{}})}};export{f as a,m as b,P as c,h as d,M as e,y as f,b as g};
2
+ //# sourceMappingURL=chunk-5HLD66CW.js.map
@@ -0,0 +1,2 @@
1
+ import u from"node:net";import{existsSync as f,readFileSync as s}from"node:fs";import{resolve as i}from"node:path";function p(e){let t=u.getDefaultAutoSelectFamilyAttemptTimeout,n=u.setDefaultAutoSelectFamilyAttemptTimeout;if(typeof t!="function"||typeof n!="function")return;let o=t();return e>o&&n(e),t()}var c=5e3;function g(e=process.cwd(),t){let n=t?[i(e,t)]:[i(e,"agentx.json"),i(e,".agentx/config.json")];for(let o of n)if(f(o)){try{let r=JSON.parse(s(o,"utf-8"))?.node?.connectAttemptTimeoutMs;if(Number.isInteger(r)&&r>=250&&r<=6e4)return r}catch{}break}return c}function l(e){for(let t=0;t<e.length;t++){let n=e[t];if(n==="--")break;if(n.startsWith("--config="))return n.slice(9)||void 0;let o=e[t+1];if(n==="--config"&&o||n==="-c"&&o?.endsWith(".json"))return o}}export{p as a,c as b,g as c,l as d};
2
+ //# sourceMappingURL=chunk-A5GYG56I.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/daemon/net-family.ts"],"sourcesContent":["import net from \"node:net\"\nimport { existsSync, readFileSync } from \"node:fs\"\nimport { resolve } from \"node:path\"\n\n// --- Connect attempt timeout for dual-stack hosts (#930) ---\n//\n// Node 20+ turns on `autoSelectFamily` (happy eyeballs) for every outbound\n// connection, fetch included, and gives each address only 250 ms to connect\n// before moving to the next. On a host that resolves both A and AAAA but has\n// no IPv6 route, the IPv6 attempt fails at once and the IPv4 attempt is then\n// abandoned after 250 ms. A slow uplink whose TCP connect takes longer fails\n// every request with ETIMEDOUT about 300 ms in, while curl from the same\n// host succeeds. Raising the per-attempt timeout keeps happy eyeballs and\n// lets a slow but working link connect.\n\n/**\n * Raise Node's per-address connect attempt timeout to `ms`. Never lowers a\n * larger value already set (for example with\n * `--network-family-autoselection-attempt-timeout`). Returns the value in\n * effect afterwards, or undefined when this Node has no such setting.\n */\nexport function applyConnectAttemptTimeout(ms: number): number | undefined {\n const get = (net as any).getDefaultAutoSelectFamilyAttemptTimeout as (() => number) | undefined\n const set = (net as any).setDefaultAutoSelectFamilyAttemptTimeout as ((v: number) => void) | undefined\n if (typeof get !== \"function\" || typeof set !== \"function\") return undefined\n const current = get()\n if (ms > current) set(ms)\n return get()\n}\n\nexport const DEFAULT_CONNECT_ATTEMPT_TIMEOUT_MS = 5000\n\n/**\n * `node.connectAttemptTimeoutMs` read straight from the config file, for CLI\n * commands that call out on their own and never load the full daemon config.\n * Falls back to the default when there is no file or no valid value.\n */\nexport function readConnectAttemptTimeout(cwd: string = process.cwd(), configPath?: string): number {\n const candidates = configPath\n ? [resolve(cwd, configPath)]\n : [resolve(cwd, \"agentx.json\"), resolve(cwd, \".agentx/config.json\")]\n for (const p of candidates) {\n if (!existsSync(p)) continue\n try {\n const v = JSON.parse(readFileSync(p, \"utf-8\"))?.node?.connectAttemptTimeoutMs\n if (Number.isInteger(v) && v >= 250 && v <= 60_000) return v\n } catch { /* an invalid file is reported by whatever loads it in full */ }\n break\n }\n return DEFAULT_CONNECT_ATTEMPT_TIMEOUT_MS\n}\n\n/**\n * The config path given on the command line (`--config <path>`,\n * `--config=<path>`, or `-c <path>` naming a `.json` file), read before\n * commander parses anything. `-c` alone also means `--cwd` for some\n * commands, which names a folder, hence the `.json` check.\n */\nexport function configPathFromArgv(argv: string[]): string | undefined {\n for (let i = 0; i < argv.length; i++) {\n const a = argv[i]\n if (a === \"--\") break\n if (a.startsWith(\"--config=\")) return a.slice(\"--config=\".length) || undefined\n const next = argv[i + 1]\n if (a === \"--config\" && next) return next\n if (a === \"-c\" && next?.endsWith(\".json\")) return next\n }\n return undefined\n}\n"],"mappings":"AAAA,OAAOA,MAAS,WAChB,OAAS,cAAAC,EAAY,gBAAAC,MAAoB,UACzC,OAAS,WAAAC,MAAe,YAmBjB,SAASC,EAA2BC,EAAgC,CACzE,IAAMC,EAAON,EAAY,yCACnBO,EAAOP,EAAY,yCACzB,GAAI,OAAOM,GAAQ,YAAc,OAAOC,GAAQ,WAAY,OAC5D,IAAMC,EAAUF,EAAI,EACpB,OAAID,EAAKG,GAASD,EAAIF,CAAE,EACjBC,EAAI,CACb,CAEO,IAAMG,EAAqC,IAO3C,SAASC,EAA0BC,EAAc,QAAQ,IAAI,EAAGC,EAA6B,CAClG,IAAMC,EAAaD,EACf,CAACT,EAAQQ,EAAKC,CAAU,CAAC,EACzB,CAACT,EAAQQ,EAAK,aAAa,EAAGR,EAAQQ,EAAK,qBAAqB,CAAC,EACrE,QAAWG,KAAKD,EACd,GAAKZ,EAAWa,CAAC,EACjB,IAAI,CACF,IAAMC,EAAI,KAAK,MAAMb,EAAaY,EAAG,OAAO,CAAC,GAAG,MAAM,wBACtD,GAAI,OAAO,UAAUC,CAAC,GAAKA,GAAK,KAAOA,GAAK,IAAQ,OAAOA,CAC7D,MAAE,CAAuE,CACzE,MAEF,OAAON,CACT,CAQO,SAASO,EAAmBC,EAAoC,CACrE,QAASC,EAAI,EAAGA,EAAID,EAAK,OAAQC,IAAK,CACpC,IAAMC,EAAIF,EAAKC,CAAC,EAChB,GAAIC,IAAM,KAAM,MAChB,GAAIA,EAAE,WAAW,WAAW,EAAG,OAAOA,EAAE,MAAM,CAAkB,GAAK,OACrE,IAAMC,EAAOH,EAAKC,EAAI,CAAC,EAEvB,GADIC,IAAM,YAAcC,GACpBD,IAAM,MAAQC,GAAM,SAAS,OAAO,EAAG,OAAOA,EAGtD","names":["net","existsSync","readFileSync","resolve","applyConnectAttemptTimeout","ms","get","set","current","DEFAULT_CONNECT_ATTEMPT_TIMEOUT_MS","readConnectAttemptTimeout","cwd","configPath","candidates","p","v","configPathFromArgv","argv","i","a","next"]}