@maincode-ai/matilda-code 0.21.4 → 0.21.5-nightly.20260908.0d3c624bb

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 (97) hide show
  1. package/chunks/agent-HVAPKXWX.js +3 -0
  2. package/chunks/agent-headless-PUPP3RC4.js +3 -0
  3. package/chunks/{anthropicContentGenerator-EFVV6ZTA.js → anthropicContentGenerator-EAQDRKHH.js} +1 -1
  4. package/chunks/{askUserQuestion-MFLZ7MGJ.js → askUserQuestion-7II3GVHO.js} +1 -1
  5. package/chunks/{chunk-FUNLOUYI.js → chunk-2HFKTFO5.js} +1 -1
  6. package/chunks/{chunk-2NN5YPDR.js → chunk-4RJUXDH5.js} +1 -1
  7. package/chunks/chunk-5QAKUC2D.js +14 -0
  8. package/chunks/{chunk-3FI7EEYS.js → chunk-6UGZQN4B.js} +466 -465
  9. package/chunks/{chunk-5U3A6KMU.js → chunk-BGZJUBRA.js} +1 -1
  10. package/chunks/{chunk-SUORCDGS.js → chunk-BH56I7SB.js} +1 -1
  11. package/chunks/{chunk-C2ZWB2NT.js → chunk-FQ44TPC5.js} +1 -1
  12. package/chunks/{chunk-LQWORCPO.js → chunk-FW6Z25AA.js} +1 -1
  13. package/chunks/{chunk-ENMM2K4Q.js → chunk-GADNIYGB.js} +1 -1
  14. package/chunks/chunk-I5TKBEKD.js +32 -0
  15. package/chunks/{chunk-LCYHQMKE.js → chunk-JFE3NGGK.js} +2 -2
  16. package/chunks/{chunk-4R2OFVPK.js → chunk-L5ASITMV.js} +1 -1
  17. package/chunks/{chunk-MNGFXISD.js → chunk-LNTO3FNQ.js} +1 -1
  18. package/chunks/{chunk-QEI3OETI.js → chunk-MW3LAIJW.js} +1 -1
  19. package/chunks/{chunk-IMYUVCF7.js → chunk-N6BOYL6K.js} +1 -1
  20. package/chunks/{chunk-QLEJOI4X.js → chunk-O3OUYCSO.js} +1 -1
  21. package/chunks/{chunk-LPWRRSAI.js → chunk-O5WFAAJF.js} +1 -1
  22. package/chunks/{chunk-6QP5C76Y.js → chunk-OVC5Z3EX.js} +1 -1
  23. package/chunks/{chunk-NDR7ZFUA.js → chunk-OXHC3R2R.js} +1 -1
  24. package/chunks/{chunk-FT76AZPN.js → chunk-RQIV43CR.js} +1 -1
  25. package/chunks/{chunk-EMWHQSMS.js → chunk-SOKNPND5.js} +1 -1
  26. package/chunks/{chunk-IOCF4XSR.js → chunk-SWEYYDZO.js} +1 -1
  27. package/chunks/{chunk-QCIDUZV6.js → chunk-U3O6TMV7.js} +1 -1
  28. package/chunks/{chunk-R3H6IWFK.js → chunk-UHDKX2CR.js} +1 -1
  29. package/chunks/{chunk-UY2R3ZQ4.js → chunk-VB4MJSMC.js} +1 -1
  30. package/chunks/{chunk-XKDGRW3K.js → chunk-VBOVIARK.js} +1 -1
  31. package/chunks/{chunk-QRCRXDZ5.js → chunk-VUJBVDPG.js} +2 -2
  32. package/chunks/{chunk-OMZ5SGMK.js → chunk-X4ML2NEE.js} +1 -1
  33. package/chunks/{chunk-S4K76QPI.js → chunk-XITA5WMN.js} +1 -1
  34. package/chunks/{chunk-MJEXA2MA.js → chunk-YTGWPLEA.js} +1 -1
  35. package/chunks/{computer-use-SPPVJT3E.js → computer-use-AU7ESBHR.js} +1 -1
  36. package/chunks/contextCommand-7JB3K3SS.js +3 -0
  37. package/chunks/{cron-create-JHL5JGIM.js → cron-create-HASFXYQL.js} +1 -1
  38. package/chunks/{cron-delete-K2R3KI2W.js → cron-delete-AW4S5IYT.js} +1 -1
  39. package/chunks/{cron-list-R3YHZBHA.js → cron-list-U5U5GO6A.js} +1 -1
  40. package/chunks/{edit-SLOTIPQ6.js → edit-UCNE7J7J.js} +1 -1
  41. package/chunks/{enter-worktree-Y6PQ27LA.js → enter-worktree-XMDJZHYY.js} +1 -1
  42. package/chunks/{enterPlanMode-XXL4BNEQ.js → enterPlanMode-XMH7YSWI.js} +1 -1
  43. package/chunks/{exit-worktree-ZO3CQN6M.js → exit-worktree-66I5GTOI.js} +1 -1
  44. package/chunks/{exitPlanMode-BNBCFLEU.js → exitPlanMode-B53RZAXG.js} +1 -1
  45. package/chunks/{geminiContentGenerator-H3MOBIG3.js → geminiContentGenerator-3QYSDHWO.js} +1 -1
  46. package/chunks/glob-JPWXHPZY.js +22 -0
  47. package/chunks/{grep-MFAMPUHG.js → grep-5RIPV774.js} +1 -1
  48. package/chunks/{keychain-token-storage-EAJ6RT4S.js → keychain-token-storage-5MWTIAEL.js} +1 -1
  49. package/chunks/{ls-4QPI2E7A.js → ls-IBIDQ5NV.js} +1 -1
  50. package/chunks/{lsp-P3GKBOP3.js → lsp-ELR2BGT4.js} +1 -1
  51. package/chunks/matildaAgentContentGenerator-2GOFJGOD.js +8 -0
  52. package/chunks/matildaContentGenerator-CCBXB5RF.js +8 -0
  53. package/chunks/{matildaOAuth2-LKOMJUC6.js → matildaOAuth2-5EYRIK66.js} +1 -1
  54. package/chunks/monitor-4FVSFXU5.js +32 -0
  55. package/chunks/notebook-edit-RTTGOHIQ.js +17 -0
  56. package/chunks/{openaiContentGenerator-CCKR4OUB.js → openaiContentGenerator-PEGNNLRN.js} +1 -1
  57. package/chunks/read-file-4TZCSTH7.js +3 -0
  58. package/chunks/ripGrep-MQNNJXAW.js +3 -0
  59. package/chunks/scheduler-4W7W3FPL.js +8 -0
  60. package/chunks/{send-message-K3T7GVHO.js → send-message-GFPVOTSZ.js} +1 -1
  61. package/chunks/{serve-C7WLVE45.js → serve-46RPFORU.js} +31 -31
  62. package/chunks/shell-VTOAVULB.js +3 -0
  63. package/chunks/{skill-D77VBROC.js → skill-FH6R4ZTW.js} +1 -1
  64. package/chunks/src-DBI2FFHO.js +3 -0
  65. package/chunks/{symbol-search-3A66G4MP.js → symbol-search-ZV6W6DPK.js} +1 -1
  66. package/chunks/{syntheticOutput-LLA4WQR7.js → syntheticOutput-XKGS6F2D.js} +1 -1
  67. package/chunks/task-create-T43QIG2F.js +3 -0
  68. package/chunks/{task-list-6I64SK7E.js → task-list-V27WHHHJ.js} +1 -1
  69. package/chunks/{task-stop-UKRXMCZV.js → task-stop-NON26GAN.js} +1 -1
  70. package/chunks/{task-update-XZWORLJB.js → task-update-DE7CUGPY.js} +1 -1
  71. package/chunks/{team-create-6SK4CNZ5.js → team-create-3NMISCGY.js} +1 -1
  72. package/chunks/{team-delete-DEPXAMUE.js → team-delete-LIEVUGIX.js} +1 -1
  73. package/chunks/{todoWrite-DKJAYA4S.js → todoWrite-YIMKFWIL.js} +1 -1
  74. package/chunks/{tool-search-7D46IF5G.js → tool-search-HFOHXFK5.js} +1 -1
  75. package/chunks/{update-goal-EUJYH23K.js → update-goal-2ZJ53Q3T.js} +1 -1
  76. package/chunks/{web-fetch-UGTFUOQN.js → web-fetch-EVO7GDEB.js} +1 -1
  77. package/chunks/{web-search-FURCBRRK.js → web-search-SJMJGGPE.js} +1 -1
  78. package/chunks/{workflow-DG73Y76U.js → workflow-JD3LGT4M.js} +2 -2
  79. package/chunks/write-file-UUWQNGF2.js +15 -0
  80. package/cli.js +353 -353
  81. package/package.json +2 -2
  82. package/chunks/agent-U4F2PPZK.js +0 -3
  83. package/chunks/agent-headless-HVLXIG5E.js +0 -3
  84. package/chunks/chunk-QWBNNEV2.js +0 -14
  85. package/chunks/contextCommand-B6PO2N2B.js +0 -3
  86. package/chunks/glob-JHSJXAWH.js +0 -22
  87. package/chunks/matildaAgentContentGenerator-TUOJCDZF.js +0 -32
  88. package/chunks/matildaContentGenerator-K32UBTHC.js +0 -8
  89. package/chunks/monitor-LW5DPUYE.js +0 -32
  90. package/chunks/notebook-edit-XQHVR3VY.js +0 -17
  91. package/chunks/read-file-URGJTANM.js +0 -3
  92. package/chunks/ripGrep-WLBUDFPP.js +0 -3
  93. package/chunks/scheduler-KIVES2O5.js +0 -8
  94. package/chunks/shell-FC3JNLXK.js +0 -3
  95. package/chunks/src-JTFAM72X.js +0 -3
  96. package/chunks/task-create-ZZTSVXZN.js +0 -3
  97. package/chunks/write-file-NQP7YPXV.js +0 -15
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{l as we,m as Ae,n as Ge,o as qe,p as Ue,q as ne}from"./chunk-QKYGQLWC.js";import{c as je}from"./chunk-IOCF4XSR.js";import{L as Se,a as ve}from"./chunk-QWBNNEV2.js";import{b as y}from"./chunk-GZPNIYVZ.js";import{a as U,d as k}from"./chunk-OWGSC52X.js";var Ke=k((_r,Ye)=>{y();var $=U("constants"),Ot=process.cwd,oe=null,Ft=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return oe||(oe=Ot.call(process)),oe};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Te=process.chdir,process.chdir=function(e){oe=null,Te.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Te));var Te;Ye.exports=It;function It(e){$.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=u(e.chown),e.fchown=u(e.fchown),e.lchown=u(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=l(e.chownSync),e.fchownSync=l(e.fchownSync),e.lchownSync=l(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=h(e.stat),e.fstat=h(e.fstat),e.lstat=h(e.lstat),e.statSync=T(e.statSync),e.fstatSync=T(e.fstatSync),e.lstatSync=T(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(i,m,c){c&&process.nextTick(c)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(i,m,c,a){a&&process.nextTick(a)},e.lchownSync=function(){}),Ft==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(i){function m(c,a,s){var w=Date.now(),v=0;i(c,a,function E(C){if(C&&(C.code==="EACCES"||C.code==="EPERM"||C.code==="EBUSY")&&Date.now()-w<6e4){setTimeout(function(){e.stat(a,function(R,Z){R&&R.code==="ENOENT"?i(c,a,E):s(C)})},v),v<100&&(v+=10);return}s&&s(C)})}return Object.setPrototypeOf&&Object.setPrototypeOf(m,i),m}(e.rename)),e.read=typeof e.read!="function"?e.read:function(i){function m(c,a,s,w,v,E){var C;if(E&&typeof E=="function"){var R=0;C=function(Z,Ce,ke){if(Z&&Z.code==="EAGAIN"&&R<10)return R++,i.call(e,c,a,s,w,v,C);E.apply(this,arguments)}}return i.call(e,c,a,s,w,v,C)}return Object.setPrototypeOf&&Object.setPrototypeOf(m,i),m}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(i){return function(m,c,a,s,w){for(var v=0;;)try{return i.call(e,m,c,a,s,w)}catch(E){if(E.code==="EAGAIN"&&v<10){v++;continue}throw E}}}(e.readSync);function t(i){i.lchmod=function(m,c,a){i.open(m,$.O_WRONLY|$.O_SYMLINK,c,function(s,w){if(s){a&&a(s);return}i.fchmod(w,c,function(v){i.close(w,function(E){a&&a(v||E)})})})},i.lchmodSync=function(m,c){var a=i.openSync(m,$.O_WRONLY|$.O_SYMLINK,c),s=!0,w;try{w=i.fchmodSync(a,c),s=!1}finally{if(s)try{i.closeSync(a)}catch{}else i.closeSync(a)}return w}}function r(i){$.hasOwnProperty("O_SYMLINK")&&i.futimes?(i.lutimes=function(m,c,a,s){i.open(m,$.O_SYMLINK,function(w,v){if(w){s&&s(w);return}i.futimes(v,c,a,function(E){i.close(v,function(C){s&&s(E||C)})})})},i.lutimesSync=function(m,c,a){var s=i.openSync(m,$.O_SYMLINK),w,v=!0;try{w=i.futimesSync(s,c,a),v=!1}finally{if(v)try{i.closeSync(s)}catch{}else i.closeSync(s)}return w}):i.futimes&&(i.lutimes=function(m,c,a,s){s&&process.nextTick(s)},i.lutimesSync=function(){})}function n(i){return i&&function(m,c,a){return i.call(e,m,c,function(s){I(s)&&(s=null),a&&a.apply(this,arguments)})}}function o(i){return i&&function(m,c){try{return i.call(e,m,c)}catch(a){if(!I(a))throw a}}}function u(i){return i&&function(m,c,a,s){return i.call(e,m,c,a,function(w){I(w)&&(w=null),s&&s.apply(this,arguments)})}}function l(i){return i&&function(m,c,a){try{return i.call(e,m,c,a)}catch(s){if(!I(s))throw s}}}function h(i){return i&&function(m,c,a){typeof c=="function"&&(a=c,c=null);function s(w,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),a&&a.apply(this,arguments)}return c?i.call(e,m,c,s):i.call(e,m,s)}}function T(i){return i&&function(m,c){var a=c?i.call(e,m,c):i.call(e,m);return a&&(a.uid<0&&(a.uid+=4294967296),a.gid<0&&(a.gid+=4294967296)),a}}function I(i){if(!i||i.code==="ENOSYS")return!0;var m=!process.getuid||process.getuid()!==0;return!!(m&&(i.code==="EINVAL"||i.code==="EPERM"))}}});var Qe=k((Er,Be)=>{y();var ze=U("stream").Stream;Be.exports=bt;function bt(e){return{ReadStream:t,WriteStream:r};function t(n,o){if(!(this instanceof t))return new t(n,o);ze.call(this);var u=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,o=o||{};for(var l=Object.keys(o),h=0,T=l.length;h<T;h++){var I=l[h];this[I]=o[I]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){u._read()});return}e.open(this.path,this.flags,this.mode,function(i,m){if(i){u.emit("error",i),u.readable=!1;return}u.fd=m,u.emit("open",m),u._read()})}function r(n,o){if(!(this instanceof r))return new r(n,o);ze.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var u=Object.keys(o),l=0,h=u.length;l<h;l++){var T=u[l];this[T]=o[T]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Xe=k((Or,Je)=>{"use strict";y();Je.exports=Dt;var Mt=Object.getPrototypeOf||function(e){return e.__proto__};function Dt(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Mt(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Fe=k((Ir,Oe)=>{y();var O=U("fs"),Pt=Ke(),Nt=Qe(),Lt=Xe(),ue=U("util"),L,ce;typeof Symbol=="function"&&typeof Symbol.for=="function"?(L=Symbol.for("graceful-fs.queue"),ce=Symbol.for("graceful-fs.previous")):(L="___graceful-fs.queue",ce="___graceful-fs.previous");function Rt(){}function Ze(e,t){Object.defineProperty(e,L,{get:function(){return t}})}var Y=Rt;ue.debuglog?Y=ue.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Y=function(){var e=ue.format.apply(ue,arguments);e="GFS4: "+e.split(/\n/).join(`
3
+ import{l as we,m as Ae,n as Ge,o as qe,p as Ue,q as ne}from"./chunk-QKYGQLWC.js";import{c as je}from"./chunk-SWEYYDZO.js";import{M as Se,a as ve}from"./chunk-5QAKUC2D.js";import{b as y}from"./chunk-GZPNIYVZ.js";import{a as U,d as k}from"./chunk-OWGSC52X.js";var Ke=k((_r,Ye)=>{y();var $=U("constants"),Ot=process.cwd,oe=null,Ft=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return oe||(oe=Ot.call(process)),oe};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Te=process.chdir,process.chdir=function(e){oe=null,Te.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Te));var Te;Ye.exports=It;function It(e){$.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=u(e.chown),e.fchown=u(e.fchown),e.lchown=u(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=l(e.chownSync),e.fchownSync=l(e.fchownSync),e.lchownSync=l(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=h(e.stat),e.fstat=h(e.fstat),e.lstat=h(e.lstat),e.statSync=T(e.statSync),e.fstatSync=T(e.fstatSync),e.lstatSync=T(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(i,m,c){c&&process.nextTick(c)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(i,m,c,a){a&&process.nextTick(a)},e.lchownSync=function(){}),Ft==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:function(i){function m(c,a,s){var w=Date.now(),v=0;i(c,a,function E(C){if(C&&(C.code==="EACCES"||C.code==="EPERM"||C.code==="EBUSY")&&Date.now()-w<6e4){setTimeout(function(){e.stat(a,function(R,Z){R&&R.code==="ENOENT"?i(c,a,E):s(C)})},v),v<100&&(v+=10);return}s&&s(C)})}return Object.setPrototypeOf&&Object.setPrototypeOf(m,i),m}(e.rename)),e.read=typeof e.read!="function"?e.read:function(i){function m(c,a,s,w,v,E){var C;if(E&&typeof E=="function"){var R=0;C=function(Z,Ce,ke){if(Z&&Z.code==="EAGAIN"&&R<10)return R++,i.call(e,c,a,s,w,v,C);E.apply(this,arguments)}}return i.call(e,c,a,s,w,v,C)}return Object.setPrototypeOf&&Object.setPrototypeOf(m,i),m}(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:function(i){return function(m,c,a,s,w){for(var v=0;;)try{return i.call(e,m,c,a,s,w)}catch(E){if(E.code==="EAGAIN"&&v<10){v++;continue}throw E}}}(e.readSync);function t(i){i.lchmod=function(m,c,a){i.open(m,$.O_WRONLY|$.O_SYMLINK,c,function(s,w){if(s){a&&a(s);return}i.fchmod(w,c,function(v){i.close(w,function(E){a&&a(v||E)})})})},i.lchmodSync=function(m,c){var a=i.openSync(m,$.O_WRONLY|$.O_SYMLINK,c),s=!0,w;try{w=i.fchmodSync(a,c),s=!1}finally{if(s)try{i.closeSync(a)}catch{}else i.closeSync(a)}return w}}function r(i){$.hasOwnProperty("O_SYMLINK")&&i.futimes?(i.lutimes=function(m,c,a,s){i.open(m,$.O_SYMLINK,function(w,v){if(w){s&&s(w);return}i.futimes(v,c,a,function(E){i.close(v,function(C){s&&s(E||C)})})})},i.lutimesSync=function(m,c,a){var s=i.openSync(m,$.O_SYMLINK),w,v=!0;try{w=i.futimesSync(s,c,a),v=!1}finally{if(v)try{i.closeSync(s)}catch{}else i.closeSync(s)}return w}):i.futimes&&(i.lutimes=function(m,c,a,s){s&&process.nextTick(s)},i.lutimesSync=function(){})}function n(i){return i&&function(m,c,a){return i.call(e,m,c,function(s){I(s)&&(s=null),a&&a.apply(this,arguments)})}}function o(i){return i&&function(m,c){try{return i.call(e,m,c)}catch(a){if(!I(a))throw a}}}function u(i){return i&&function(m,c,a,s){return i.call(e,m,c,a,function(w){I(w)&&(w=null),s&&s.apply(this,arguments)})}}function l(i){return i&&function(m,c,a){try{return i.call(e,m,c,a)}catch(s){if(!I(s))throw s}}}function h(i){return i&&function(m,c,a){typeof c=="function"&&(a=c,c=null);function s(w,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),a&&a.apply(this,arguments)}return c?i.call(e,m,c,s):i.call(e,m,s)}}function T(i){return i&&function(m,c){var a=c?i.call(e,m,c):i.call(e,m);return a&&(a.uid<0&&(a.uid+=4294967296),a.gid<0&&(a.gid+=4294967296)),a}}function I(i){if(!i||i.code==="ENOSYS")return!0;var m=!process.getuid||process.getuid()!==0;return!!(m&&(i.code==="EINVAL"||i.code==="EPERM"))}}});var Qe=k((Er,Be)=>{y();var ze=U("stream").Stream;Be.exports=bt;function bt(e){return{ReadStream:t,WriteStream:r};function t(n,o){if(!(this instanceof t))return new t(n,o);ze.call(this);var u=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,o=o||{};for(var l=Object.keys(o),h=0,T=l.length;h<T;h++){var I=l[h];this[I]=o[I]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){u._read()});return}e.open(this.path,this.flags,this.mode,function(i,m){if(i){u.emit("error",i),u.readable=!1;return}u.fd=m,u.emit("open",m),u._read()})}function r(n,o){if(!(this instanceof r))return new r(n,o);ze.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var u=Object.keys(o),l=0,h=u.length;l<h;l++){var T=u[l];this[T]=o[T]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var Xe=k((Or,Je)=>{"use strict";y();Je.exports=Dt;var Mt=Object.getPrototypeOf||function(e){return e.__proto__};function Dt(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Mt(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var Fe=k((Ir,Oe)=>{y();var O=U("fs"),Pt=Ke(),Nt=Qe(),Lt=Xe(),ue=U("util"),L,ce;typeof Symbol=="function"&&typeof Symbol.for=="function"?(L=Symbol.for("graceful-fs.queue"),ce=Symbol.for("graceful-fs.previous")):(L="___graceful-fs.queue",ce="___graceful-fs.previous");function Rt(){}function Ze(e,t){Object.defineProperty(e,L,{get:function(){return t}})}var Y=Rt;ue.debuglog?Y=ue.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Y=function(){var e=ue.format.apply(ue,arguments);e="GFS4: "+e.split(/\n/).join(`
4
4
  GFS4: `),console.error(e)});O[L]||(He=globalThis[L]||[],Ze(O,He),O.close=function(e){function t(r,n){return e.call(O,r,function(o){o||Ve(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,ce,{value:e}),t}(O.close),O.closeSync=function(e){function t(r){e.apply(O,arguments),Ve()}return Object.defineProperty(t,ce,{value:e}),t}(O.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Y(O[L]),U("assert").equal(O[L].length,0)}));var He;globalThis[L]||Ze(globalThis,O[L]);Oe.exports=Ee(Lt(O));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!O.__patched&&(Oe.exports=Ee(O),O.__patched=!0);function Ee(e){Pt(e),e.gracefulify=Ee,e.createReadStream=Ce,e.createWriteStream=ke;var t=e.readFile;e.readFile=r;function r(f,d,p){return typeof d=="function"&&(p=d,d=null),D(f,d,p);function D(P,b,x,F){return t(P,b,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?Q([D,[P,b,x],S,F||Date.now(),Date.now()]):typeof x=="function"&&x.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=o;function o(f,d,p,D){return typeof p=="function"&&(D=p,p=null),P(f,d,p,D);function P(b,x,F,S,N){return n(b,x,F,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Q([P,[b,x,F,S],g,N||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var u=e.appendFile;u&&(e.appendFile=l);function l(f,d,p,D){return typeof p=="function"&&(D=p,p=null),P(f,d,p,D);function P(b,x,F,S,N){return u(b,x,F,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Q([P,[b,x,F,S],g,N||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var h=e.copyFile;h&&(e.copyFile=T);function T(f,d,p,D){return typeof p=="function"&&(D=p,p=0),P(f,d,p,D);function P(b,x,F,S,N){return h(b,x,F,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Q([P,[b,x,F,S],g,N||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var I=e.readdir;e.readdir=m;var i=/^v[0-5]\./;function m(f,d,p){typeof d=="function"&&(p=d,d=null);var D=i.test(process.version)?function(x,F,S,N){return I(x,P(x,F,S,N))}:function(x,F,S,N){return I(x,F,P(x,F,S,N))};return D(f,d,p);function P(b,x,F,S){return function(N,g){N&&(N.code==="EMFILE"||N.code==="ENFILE")?Q([D,[b,x,F],N,S||Date.now(),Date.now()]):(g&&g.sort&&g.sort(),typeof F=="function"&&F.call(this,N,g))}}}if(process.version.substr(0,4)==="v0.8"){var c=Nt(e);E=c.ReadStream,R=c.WriteStream}var a=e.ReadStream;a&&(E.prototype=Object.create(a.prototype),E.prototype.open=C);var s=e.WriteStream;s&&(R.prototype=Object.create(s.prototype),R.prototype.open=Z),Object.defineProperty(e,"ReadStream",{get:function(){return E},set:function(f){E=f},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return R},set:function(f){R=f},enumerable:!0,configurable:!0});var w=E;Object.defineProperty(e,"FileReadStream",{get:function(){return w},set:function(f){w=f},enumerable:!0,configurable:!0});var v=R;Object.defineProperty(e,"FileWriteStream",{get:function(){return v},set:function(f){v=f},enumerable:!0,configurable:!0});function E(f,d){return this instanceof E?(a.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function C(){var f=this;ye(f.path,f.flags,f.mode,function(d,p){d?(f.autoClose&&f.destroy(),f.emit("error",d)):(f.fd=p,f.emit("open",p),f.read())})}function R(f,d){return this instanceof R?(s.apply(this,arguments),this):R.apply(Object.create(R.prototype),arguments)}function Z(){var f=this;ye(f.path,f.flags,f.mode,function(d,p){d?(f.destroy(),f.emit("error",d)):(f.fd=p,f.emit("open",p))})}function Ce(f,d){return new e.ReadStream(f,d)}function ke(f,d){return new e.WriteStream(f,d)}var _t=e.open;e.open=ye;function ye(f,d,p,D){return typeof p=="function"&&(D=p,p=null),P(f,d,p,D);function P(b,x,F,S,N){return _t(b,x,F,function(g,tr){g&&(g.code==="EMFILE"||g.code==="ENFILE")?Q([P,[b,x,F,S],g,N||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}return e}function Q(e){Y("ENQUEUE",e[0].name,e[1]),O[L].push(e),xe()}var ae;function Ve(){for(var e=Date.now(),t=0;t<O[L].length;++t)O[L][t].length>2&&(O[L][t][3]=e,O[L][t][4]=e);xe()}function xe(){if(clearTimeout(ae),ae=void 0,O[L].length!==0){var e=O[L].shift(),t=e[0],r=e[1],n=e[2],o=e[3],u=e[4];if(o===void 0)Y("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){Y("TIMEOUT",t.name,r);var l=r.pop();typeof l=="function"&&l.call(null,n)}else{var h=Date.now()-u,T=Math.max(u-o,1),I=Math.min(T*1.2,100);h>=I?(Y("RETRY",t.name,r),t.apply(null,r.concat([o]))):O[L].push(e)}ae===void 0&&(ae=setTimeout(xe,0))}}});var tt=k((Mr,et)=>{y();function A(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}et.exports=A;A.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};A.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};A.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift();else return!1;var n=this,o=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r);return this._options.unref&&o.unref(),!0};A.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};A.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};A.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};A.prototype.start=A.prototype.try;A.prototype.errors=function(){return this._errors};A.prototype.attempts=function(){return this._attempts};A.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var o=this._errors[n],u=o.message,l=(e[u]||0)+1;e[u]=l,l>=r&&(t=o,r=l)}return t}});var rt=k(K=>{y();var Ct=tt();K.operation=function(e){var t=K.timeouts(e);return new Ct(t,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})};K.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],o=0;o<t.retries;o++)n.push(this.createTimeout(o,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(o,t)),n.sort(function(u,l){return u-l}),n};K.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,n=Math.round(r*t.minTimeout*Math.pow(t.factor,e));return n=Math.min(n,t.maxTimeout),n};K.wrap=function(e,t,r){if(t instanceof Array&&(r=t,t=null),!r){r=[];for(var n in e)typeof e[n]=="function"&&r.push(n)}for(var o=0;o<r.length;o++){var u=r[o],l=e[u];e[u]=function(T){var I=K.operation(t),i=Array.prototype.slice.call(arguments,1),m=i.pop();i.push(function(c){I.retry(c)||(c&&(arguments[0]=I.mainError()),m.apply(this,arguments))}),I.attempt(function(){T.apply(e,i)})}.bind(e,l),e[u].options=t}}});var it=k((Lr,nt)=>{y();nt.exports=rt()});var ot=k((Cr,fe)=>{y();fe.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&fe.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&fe.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var st=k((jr,H)=>{y();var _=globalThis.process,z=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};z(_)?(ut=U("assert"),J=ot(),at=/^win/i.test(_.platform),ee=U("events"),typeof ee!="function"&&(ee=ee.EventEmitter),_.__signal_exit_emitter__?M=_.__signal_exit_emitter__:(M=_.__signal_exit_emitter__=new ee,M.count=0,M.emitted={}),M.infinite||(M.setMaxListeners(1/0),M.infinite=!0),H.exports=function(e,t){if(!z(globalThis.process))return function(){};ut.equal(typeof e,"function","a callback must be provided for exit handler"),X===!1&&Ie();var r="exit";t&&t.alwaysLast&&(r="afterexit");var n=function(){M.removeListener(r,e),M.listeners("exit").length===0&&M.listeners("afterexit").length===0&&se()};return M.on(r,e),n},se=function(){!X||!z(globalThis.process)||(X=!1,J.forEach(function(t){try{_.removeListener(t,le[t])}catch{}}),_.emit=me,_.reallyExit=be,M.count-=1)},H.exports.unload=se,B=function(t,r,n){M.emitted[t]||(M.emitted[t]=!0,M.emit(t,r,n))},le={},J.forEach(function(e){le[e]=function(){if(z(globalThis.process)){var r=_.listeners(e);r.length===M.count&&(se(),B("exit",null,e),B("afterexit",null,e),at&&e==="SIGHUP"&&(e="SIGINT"),_.kill(_.pid,e))}}}),H.exports.signals=function(){return J},X=!1,Ie=function(){X||!z(globalThis.process)||(X=!0,M.count+=1,J=J.filter(function(t){try{return _.on(t,le[t]),!0}catch{return!1}}),_.emit=ft,_.reallyExit=ct)},H.exports.load=Ie,be=_.reallyExit,ct=function(t){z(globalThis.process)&&(_.exitCode=t||0,B("exit",_.exitCode,null),B("afterexit",_.exitCode,null),be.call(_,_.exitCode))},me=_.emit,ft=function(t,r){if(t==="exit"&&z(globalThis.process)){r!==void 0&&(_.exitCode=r);var n=me.apply(this,arguments);return B("exit",_.exitCode,null),B("afterexit",_.exitCode,null),n}else return me.apply(this,arguments)}):H.exports=function(){return function(){}};var ut,J,at,ee,M,se,B,le,X,Ie,be,ct,me,ft});var mt=k((Gr,Me)=>{"use strict";y();var lt=Symbol();function kt(e,t,r){let n=t[lt];if(n)return t.stat(e,(u,l)=>{if(u)return r(u);r(null,l.mtime,n)});let o=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,o,o,u=>{if(u)return r(u);t.stat(e,(l,h)=>{if(l)return r(l);let T=h.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(t,lt,{value:T}),r(null,h.mtime,T)})})}function jt(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}Me.exports.probe=kt;Me.exports.getMtime=jt});var vt=k((Ur,re)=>{"use strict";y();var At=U("path"),Ne=Fe(),Gt=it(),qt=st(),ht=mt(),q={};function te(e,t){return t.lockfilePath||`${e}.lock`}function Le(e,t,r){if(!t.realpath)return r(null,At.resolve(e));t.fs.realpath(e,r)}function Pe(e,t,r){let n=te(e,t);t.fs.mkdir(n,o=>{if(!o)return ht.probe(n,t.fs,(u,l,h)=>{if(u)return t.fs.rmdir(n,()=>{}),r(u);r(null,l,h)});if(o.code!=="EEXIST")return r(o);if(t.stale<=0)return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));t.fs.stat(n,(u,l)=>{if(u)return u.code==="ENOENT"?Pe(e,{...t,stale:0},r):r(u);if(!pt(l,t))return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));dt(e,t,h=>{if(h)return r(h);Pe(e,{...t,stale:0},r)})})})}function pt(e,t){return e.mtime.getTime()<Date.now()-t.stale}function dt(e,t,r){t.fs.rmdir(te(e,t),n=>{if(n&&n.code!=="ENOENT")return r(n);r()})}function he(e,t){let r=q[e];r.updateTimeout||(r.updateDelay=r.updateDelay||t.update,r.updateTimeout=setTimeout(()=>{r.updateTimeout=null,t.fs.stat(r.lockfilePath,(n,o)=>{let u=r.lastUpdate+t.stale<Date.now();if(n)return n.code==="ENOENT"||u?De(e,r,Object.assign(n,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,he(e,t));if(!(r.mtime.getTime()===o.mtime.getTime()))return De(e,r,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let h=ht.getMtime(r.mtimePrecision);t.fs.utimes(r.lockfilePath,h,h,T=>{let I=r.lastUpdate+t.stale<Date.now();if(!r.released){if(T)return T.code==="ENOENT"||I?De(e,r,Object.assign(T,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,he(e,t));r.mtime=h,r.lastUpdate=Date.now(),r.updateDelay=null,he(e,t)}})})},r.updateDelay),r.updateTimeout.unref&&r.updateTimeout.unref())}function De(e,t,r){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),q[e]===t&&delete q[e],t.options.onCompromised(r)}function Ut(e,t,r){t={stale:1e4,update:null,realpath:!0,retries:0,fs:Ne,onCompromised:n=>{throw n},...t},t.retries=t.retries||0,t.retries=typeof t.retries=="number"?{retries:t.retries}:t.retries,t.stale=Math.max(t.stale||0,2e3),t.update=t.update==null?t.stale/2:t.update||0,t.update=Math.max(Math.min(t.update,t.stale/2),1e3),Le(e,t,(n,o)=>{if(n)return r(n);let u=Gt.operation(t.retries);u.attempt(()=>{Pe(o,t,(l,h,T)=>{if(u.retry(l))return;if(l)return r(u.mainError());let I=q[o]={lockfilePath:te(o,t),mtime:h,mtimePrecision:T,options:t,lastUpdate:Date.now()};he(o,t),r(null,i=>{if(I.released)return i&&i(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));yt(o,{...t,realpath:!1},i)})})})})}function yt(e,t,r){t={fs:Ne,realpath:!0,...t},Le(e,t,(n,o)=>{if(n)return r(n);let u=q[o];if(!u)return r(Object.assign(new Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));u.updateTimeout&&clearTimeout(u.updateTimeout),u.released=!0,delete q[o],dt(o,t,r)})}function $t(e,t,r){t={stale:1e4,realpath:!0,fs:Ne,...t},t.stale=Math.max(t.stale||0,2e3),Le(e,t,(n,o)=>{if(n)return r(n);t.fs.stat(te(o,t),(u,l)=>u?u.code==="ENOENT"?r(null,!1):r(u):r(null,!pt(l,t)))})}function Wt(){return q}qt(()=>{for(let e in q){let t=q[e].options;try{t.fs.rmdirSync(te(e,t))}catch{}}});re.exports.lock=Ut;re.exports.unlock=yt;re.exports.check=$t;re.exports.getLocks=Wt});var wt=k((Wr,St)=>{"use strict";y();var Yt=Fe();function Kt(e){let t=["mkdir","realpath","stat","rmdir","utimes"],r={...e};return t.forEach(n=>{r[n]=(...o)=>{let u=o.pop(),l;try{l=e[`${n}Sync`](...o)}catch(h){return u(h)}u(null,l)}}),r}function zt(e){return(...t)=>new Promise((r,n)=>{t.push((o,u)=>{o?n(o):r(u)}),e(...t)})}function Bt(e){return(...t)=>{let r,n;if(t.push((o,u)=>{r=o,n=u}),e(...t),r)throw r;return n}}function Qt(e){if(e={...e},e.fs=Kt(e.fs||Yt),typeof e.retries=="number"&&e.retries>0||e.retries&&typeof e.retries.retries=="number"&&e.retries.retries>0)throw Object.assign(new Error("Cannot use retries with the sync api"),{code:"ESYNC"});return e}St.exports={toPromise:zt,toSync:Bt,toSyncOptions:Qt}});var er=k((Kr,W)=>{"use strict";y();var V=vt(),{toPromise:pe,toSync:de,toSyncOptions:Re}=wt();async function gt(e,t){let r=await pe(V.lock)(e,t);return pe(r)}function Jt(e,t){let r=de(V.lock)(e,Re(t));return de(r)}function Xt(e,t){return pe(V.unlock)(e,t)}function Ht(e,t){return de(V.unlock)(e,Re(t))}function Vt(e,t){return pe(V.check)(e,t)}function Zt(e,t){return de(V.check)(e,Re(t))}W.exports=gt;W.exports.lock=gt;W.exports.unlock=Xt;W.exports.lockSync=Jt;W.exports.unlockSync=Ht;W.exports.check=Vt;W.exports.checkSync=Zt});y();import*as j from"node:fs/promises";import*as G from"node:path";function We(){return G.join(Se.getGlobalMatildaDir(),Ae)}function ge(e){return G.join(We(),e)}function _e(e){return G.join(ge(e),qe)}function ur(e){return G.join(ge(e),Ue)}function Tt(e){return G.join(Se.getGlobalMatildaDir(),Ge,e)}function ie(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function ar(e,t){return`${ie(e)}@${ie(t)}`}function cr(e,t){let r=ie(e);if(!r)throw new Error(`Teammate name "${e}" sanitizes to an empty string. Choose a name with at least one alphanumeric character.`);if(r===we)throw new Error(`"${we}" is reserved for the team leader. Choose a different teammate name.`);let n=new Set(t.map(o=>o.name));if(n.has(r)){let o=[...n].join(", ")||"<none>";throw new Error(`A teammate named "${r}" already exists in this team (existing: ${o}). Choose a different name.`)}return r}function fr(e){let t=new Set(e.map(r=>r.color).filter(r=>r!==void 0));for(let r of ne)if(!t.has(r))return r;return ne[e.length%ne.length]}function sr(e){return e.map(t=>{let{color:r,...n}=t;return n})}function lr(e,t,r){return e.map(n=>n.agentId===t?{...n,isActive:r}:n)}function mr(e,t){return e.find(r=>r.agentId===t)}function hr(e,t){let r=ie(t);return e.find(n=>n.name===r)}function pr(e){let t=e.trimStart();if(/^shutdown_approved\b/i.test(t))return"shutdown_approved";if(/^shutdown_rejected\b/i.test(t))return"shutdown_rejected"}async function Et(e){let t=_e(e);try{let r=await j.readFile(t,"utf-8");return JSON.parse(r)}catch(r){if(ve(r)&&r.code==="ENOENT")return;throw r}}async function dr(e,t){let r=_e(e);await j.mkdir(G.dirname(r),{recursive:!0}),await je(r,t)}async function yr(e,t){let r=_e(e);await j.mkdir(G.dirname(r),{recursive:!0}),await j.writeFile(r,JSON.stringify(t,null,2)+`
5
5
  `,{encoding:"utf-8",flag:"wx"})}function xt(e){try{return process.kill(e,0),!0}catch(t){return ve(t)&&t.code==="EPERM"}}async function vr(e){let t;try{t=await Et(e)}catch{return!1}return t?typeof t.leadPid!="number"||t.leadPid<=0||t.leadPid!==process.pid&&xt(t.leadPid)?!1:(await $e(e),!0):(await $e(e),!0)}async function $e(e){let t=ge(e),r=Tt(e);await Promise.allSettled([j.rm(t,{recursive:!0,force:!0}),j.rm(r,{recursive:!0,force:!0})])}async function Sr(){let e=We();try{return(await j.readdir(e,{withFileTypes:!0})).filter(r=>r.isDirectory()).map(r=>r.name)}catch{return[]}}export{We as a,ge as b,_e as c,ur as d,Tt as e,ie as f,ar as g,cr as h,fr as i,sr as j,lr as k,mr as l,hr as m,pr as n,Et as o,dr as p,yr as q,vr as r,$e as s,Sr as t,Fe as u,er as v};
6
6
  /**