@maincode-ai/matilda-code 0.21.10 → 0.21.11-nightly.20261019.07ef6f6a1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/mainy/docs/configuration/settings.md +10 -1
- package/bundled/mainy/docs/matilda-serve.md +6 -6
- package/chunks/agent-PXBLXFNY.js +3 -0
- package/chunks/agent-headless-YWSSHHJ2.js +3 -0
- package/chunks/{anthropicContentGenerator-SFJGSZHT.js → anthropicContentGenerator-IYZILRDW.js} +1 -1
- package/chunks/{askUserQuestion-MJ4FTAOQ.js → askUserQuestion-XWHJY3DM.js} +1 -1
- package/chunks/{ca-H4HPSGTI.js → ca-EUJBUYX5.js} +1 -1
- package/chunks/{chunk-B3NVKOSU.js → chunk-25NCTG5H.js} +63 -54
- package/chunks/{chunk-INAZKGGR.js → chunk-2HQMJ2IU.js} +1 -1
- package/chunks/chunk-46MIUE6Z.js +113 -0
- package/chunks/{todoWrite-7BZMVNBC.js → chunk-4CSSDBOS.js} +2 -2
- package/chunks/{chunk-5PMMY47S.js → chunk-4FVBPNTZ.js} +1 -1
- package/chunks/{chunk-LSDMWVW6.js → chunk-5427BPR2.js} +2 -2
- package/chunks/{chunk-GC2F575A.js → chunk-6GBNB5Z2.js} +1 -1
- package/chunks/chunk-6OM7PU5M.js +2627 -0
- package/chunks/{chunk-EXIO3QHE.js → chunk-7Y4YWLWT.js} +9 -9
- package/chunks/{chunk-32PTAACU.js → chunk-ELH4YHJR.js} +1 -1
- package/chunks/{chunk-3HUM74NZ.js → chunk-EQGA7LH7.js} +2 -2
- package/chunks/{chunk-FWIVFCKF.js → chunk-FFFZ2QMG.js} +1 -1
- package/chunks/chunk-GHBKFIHC.js +35 -0
- package/chunks/{chunk-EQEQPZLQ.js → chunk-GO2GA2GY.js} +1 -1
- package/chunks/{chunk-QHA3ZBRO.js → chunk-GUFIMKF5.js} +1 -1
- package/chunks/{chunk-DJSOHDUB.js → chunk-H44J3WCU.js} +1 -1
- package/chunks/{chunk-RJX7DK4Y.js → chunk-HWOQNYAO.js} +1 -1
- package/chunks/{chunk-K3ELACN2.js → chunk-HXXKWC4R.js} +17 -17
- package/chunks/chunk-HYVP4472.js +8 -0
- package/chunks/chunk-I2UAZHXP.js +39 -0
- package/chunks/{chunk-VWWEEU4V.js → chunk-JXUDKX6D.js} +1 -1
- package/chunks/chunk-M53RP3YP.js +31 -0
- package/chunks/{chunk-VLYRNOD3.js → chunk-MH2P4YXC.js} +10 -10
- package/chunks/{chunk-VYTYYCBR.js → chunk-NYEWHSBL.js} +1 -1
- package/chunks/{chunk-C62LTEOV.js → chunk-O3X6OM5U.js} +2 -2
- package/chunks/{chunk-LIWYWWOK.js → chunk-ODZOYHIC.js} +1 -1
- package/chunks/{chunk-Q2I3ARPJ.js → chunk-QH7736R5.js} +1 -1
- package/chunks/chunk-QN6WSWMM.js +9 -0
- package/chunks/chunk-SNLH42QJ.js +10 -0
- package/chunks/chunk-SPW5DXX4.js +35 -0
- package/chunks/{chunk-S7G6QPEP.js → chunk-SUH3UUWZ.js} +1 -1
- package/chunks/chunk-T2T2UEPY.js +4 -0
- package/chunks/{chunk-6B5BDE7S.js → chunk-T4P4KEDW.js} +8 -8
- package/chunks/chunk-VI74YQQO.js +8 -0
- package/chunks/{chunk-DCQKJTAX.js → chunk-W5CGKUM4.js} +8 -3
- package/chunks/{chunk-32T6RWWT.js → chunk-WHG6N5X2.js} +1 -1
- package/chunks/{chunk-XCJYORZX.js → chunk-XCFLI3OC.js} +1 -1
- package/chunks/{chunk-3ZAMYREW.js → chunk-YMIF2DMT.js} +1 -1
- package/chunks/{computer-use-DJV6HTND.js → computer-use-6HSNUCLB.js} +7 -7
- package/chunks/contextCommand-BZEFZB7M.js +3 -0
- package/chunks/{cron-create-BTTPO3JC.js → cron-create-2UI4AT4Q.js} +1 -1
- package/chunks/{cron-delete-U55RHRID.js → cron-delete-ZB6BOTFF.js} +1 -1
- package/chunks/{cron-list-J4HRR46K.js → cron-list-YYAXNHB6.js} +1 -1
- package/chunks/{de-S7F37S4F.js → de-DNEPG7S7.js} +1 -1
- package/chunks/{dist-SVKXQXJX.js → dist-ME6647DQ.js} +1 -1
- package/chunks/{dist-SCXU6QWY.js → dist-P6SLWL5V.js} +1 -1
- package/chunks/{dist-PVENOVGI.js → dist-VG3ZDJ2A.js} +1 -1
- package/chunks/{dist-N66KF4KX.js → dist-YTCHM57U.js} +1 -1
- package/chunks/{edit-7XEZHXE4.js → edit-QHKHGKM2.js} +1 -1
- package/chunks/{en-S6DMCJQZ.js → en-NOD6KQNM.js} +1 -1
- package/chunks/{enter-worktree-MR64QLS4.js → enter-worktree-PTUIG373.js} +1 -1
- package/chunks/{enterPlanMode-UNWCEVYY.js → enterPlanMode-2A37Q5OW.js} +1 -1
- package/chunks/{exit-worktree-D4BMN6LH.js → exit-worktree-LV2XJ634.js} +1 -1
- package/chunks/{exitPlanMode-AKLFFYT2.js → exitPlanMode-AU7EQHXM.js} +1 -1
- package/chunks/{fr-RFJP3KVL.js → fr-2OE5WLJ4.js} +1 -1
- package/chunks/{geminiContentGenerator-JBASUS2T.js → geminiContentGenerator-QXWIMCG7.js} +1 -1
- package/chunks/glob-XFSH2QKT.js +22 -0
- package/chunks/goal-tools-6QTC3UI7.js +12 -0
- package/chunks/grep-HYFLZADN.js +22 -0
- package/chunks/{ja-UTJHPL3M.js → ja-3B6V5KS7.js} +1 -1
- package/chunks/{keychain-token-storage-HAFQQIXL.js → keychain-token-storage-54BNK6VH.js} +1 -1
- package/chunks/{ls-CLDNF3YS.js → ls-YWZU3FYL.js} +1 -1
- package/chunks/{lsp-7SKRKR5Q.js → lsp-4CJDKEEC.js} +1 -1
- package/chunks/{matildaAgentContentGenerator-GMDJPWES.js → matildaAgentContentGenerator-VOOMYECL.js} +1 -1
- package/chunks/matildaContentGenerator-4NSKMBCF.js +8 -0
- package/chunks/{matildaOAuth2-W2DQO2NK.js → matildaOAuth2-WOY7ZS43.js} +1 -1
- package/chunks/monitor-F3MMAOV2.js +32 -0
- package/chunks/notebook-edit-3N72EDYF.js +17 -0
- package/chunks/{openaiContentGenerator-XDOQRO4G.js → openaiContentGenerator-TIRPXHM2.js} +1 -1
- package/chunks/{pt-KXMOTADP.js → pt-KP2JCPUY.js} +1 -1
- package/chunks/read-file-6EAPS2KG.js +3 -0
- package/chunks/ripGrep-7L45WKPK.js +3 -0
- package/chunks/{ru-EWGWZPQH.js → ru-K7IQQKHC.js} +1 -1
- package/chunks/scheduler-SZNVJELW.js +8 -0
- package/chunks/{send-message-XXRROIL7.js → send-message-OO2HAKCC.js} +1 -1
- package/chunks/{serve-4MDSDWP7.js → serve-2KBVIHAA.js} +31 -31
- package/chunks/shell-JNI7BDC3.js +3 -0
- package/chunks/{skill-JIISRKQN.js → skill-LOWNP4W4.js} +1 -1
- package/chunks/src-O5Z62OHH.js +3 -0
- package/chunks/{symbol-search-3MVTK4KV.js → symbol-search-ALYOX5JN.js} +1 -1
- package/chunks/{syntheticOutput-QEUQIVQJ.js → syntheticOutput-UASKABJH.js} +1 -1
- package/chunks/task-create-EBJD55TB.js +3 -0
- package/chunks/task-detach-I67ZE5MX.js +9 -0
- package/chunks/{task-list-ZEJTNZ2O.js → task-list-5BGX4G5N.js} +1 -1
- package/chunks/{task-stop-JO3CXG2K.js → task-stop-ERI5X4AO.js} +1 -1
- package/chunks/{task-update-3YY37VFN.js → task-update-CD3W556L.js} +1 -1
- package/chunks/{team-create-GMI5DIH7.js → team-create-IGCB4YJX.js} +1 -1
- package/chunks/{team-delete-4YYLUV23.js → team-delete-5U3GBFKJ.js} +1 -1
- package/chunks/todoWrite-YGG6AZ3A.js +3 -0
- package/chunks/{tool-search-OWJC3UTX.js → tool-search-JFCD5W5M.js} +1 -1
- package/chunks/{web-fetch-K575OWZ7.js → web-fetch-REWGIRWQ.js} +1 -1
- package/chunks/{web-search-F6JRBXFV.js → web-search-OX2DPEVN.js} +1 -1
- package/chunks/{workflow-H5DWTI5W.js → workflow-6N3FGOUE.js} +2 -2
- package/chunks/write-file-WJUMYRVH.js +15 -0
- package/cli.js +480 -475
- package/locales/ca.js +8 -2
- package/locales/de.js +9 -2
- package/locales/en.js +15 -8
- package/locales/fr.js +9 -2
- package/locales/ja.js +8 -2
- package/locales/pt.js +8 -2
- package/locales/ru.js +9 -2
- package/package.json +2 -2
- package/sandbox-macos-restrictive-closed.sb +4 -0
- package/sandbox-macos-restrictive-open.sb +4 -0
- package/sandbox-macos-restrictive-proxied.sb +4 -0
- package/chunks/agent-2ZM5WMHY.js +0 -3
- package/chunks/agent-headless-PX4INULZ.js +0 -3
- package/chunks/chunk-2UDXLDSZ.js +0 -34
- package/chunks/chunk-34DXSYJZ.js +0 -34
- package/chunks/chunk-ESSYHTAZ.js +0 -8
- package/chunks/chunk-FRL6KOLY.js +0 -35
- package/chunks/chunk-I7TAYS6D.js +0 -108
- package/chunks/chunk-JSFA3NEP.js +0 -5
- package/chunks/chunk-ROETRE5J.js +0 -9
- package/chunks/chunk-RYLWDCCN.js +0 -2594
- package/chunks/chunk-TZIDSCTF.js +0 -31
- package/chunks/contextCommand-TAFFF6V7.js +0 -3
- package/chunks/glob-3QKPKP7Z.js +0 -22
- package/chunks/grep-6CL6HJ5Y.js +0 -22
- package/chunks/matildaContentGenerator-EFK4QDRS.js +0 -8
- package/chunks/monitor-6W2R25LH.js +0 -32
- package/chunks/notebook-edit-WL6MZ6AW.js +0 -17
- package/chunks/read-file-J5UBJYDO.js +0 -3
- package/chunks/ripGrep-2AMYRBCZ.js +0 -3
- package/chunks/scheduler-LFSCKDU6.js +0 -8
- package/chunks/shell-SMTFAOAE.js +0 -3
- package/chunks/src-OF7NIVIL.js +0 -3
- package/chunks/task-create-AEJQ73GE.js +0 -3
- package/chunks/update-goal-CF6G57J7.js +0 -16
- package/chunks/write-file-RUHYPLKF.js +0 -15
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import{b as d}from"./chunk-GZPNIYVZ.js";d();import{setMaxListeners as b}from"node:events";var f=50;function c(r=f){let t=new AbortController;return b(r,t.signal),t}function m(r){if(r)return r instanceof AbortController?r.signal:r}function v(r,t){let e=c(t),n=m(r);if(!n)return e;if(n.aborted)return e.abort(n.reason),e;let a=new WeakRef(n),i=()=>{e.abort(a.deref()?.reason)};return n.addEventListener("abort",i,{once:!0}),e.signal.addEventListener("abort",()=>{a.deref()?.removeEventListener("abort",i)},{once:!0}),e}function g(r,t){let e=c(t?.maxListeners),n=r.find(o=>o?.aborted);if(n)return e.abort(n.reason),{signal:e.signal,cleanup:()=>{}};let a=[];for(let o of r){if(!o)continue;if(o.aborted){e.abort(o.reason);break}let u=()=>e.abort(o.reason);o.addEventListener("abort",u,{once:!0}),a.push(()=>o.removeEventListener("abort",u))}let i=t?.timeoutMs;if(i!==void 0&&i>0&&!e.signal.aborted){let o=setTimeout(()=>{e.abort(new DOMException("Operation timed out","TimeoutError"))},i);a.push(()=>clearTimeout(o))}let s=!1,l=()=>{if(!s){s=!0;for(let o of a)o()}};return e.signal.aborted?l():e.signal.addEventListener("abort",l,{once:!0}),{signal:e.signal,cleanup:l}}async function E(r,t){t?.throwIfAborted();let e=r();if(!t)return e;let n=()=>{},a=new Promise((i,s)=>{n=()=>s(t.reason),t.addEventListener("abort",n,{once:!0})});try{return await Promise.race([e,a])}finally{t.removeEventListener("abort",n),e.catch(()=>{})}}export{c as a,v as b,g as c,E as d};
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2025 Matilda
|
|
7
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{l as
|
|
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
|
-
`,{encoding:"utf-8",flag:"wx"})}
|
|
3
|
+
import{l as Se,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-GO2GA2GY.js";import{Q as ve,b as ke}from"./chunk-MH2P4YXC.js";import{b as d}from"./chunk-GZPNIYVZ.js";import{a as U,d as k}from"./chunk-OWGSC52X.js";var ze=k((xr,Ke)=>{d();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"&&(_e=process.chdir,process.chdir=function(e){oe=null,_e.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,_e));var _e;Ke.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=p(e.stat),e.fstat=p(e.fstat),e.lstat=p(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,Re,Ce){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 p(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((Fr,Je)=>{d();var Be=U("stream").Stream;Je.exports=bt;function bt(e){return{ReadStream:t,WriteStream:r};function t(n,o){if(!(this instanceof t))return new t(n,o);Be.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),p=0,T=l.length;p<T;p++){var I=l[p];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);Be.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,p=u.length;l<p;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 He=k((br,Xe)=>{"use strict";d();Xe.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 Oe=k((Dr,xe)=>{d();var O=U("fs"),Pt=ze(),Nt=Qe(),Lt=He(),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 et(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
|
+
GFS4: `),console.error(e)});O[L]||(Ve=globalThis[L]||[],et(O,Ve),O.close=function(e){function t(r,n){return e.call(O,r,function(o){o||Ze(),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),Ze()}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 Ve;globalThis[L]||et(globalThis,O[L]);xe.exports=Te(Lt(O));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!O.__patched&&(xe.exports=Te(O),O.__patched=!0);function Te(e){Pt(e),e.gracefulify=Te,e.createReadStream=Re,e.createWriteStream=Ce;var t=e.readFile;e.readFile=r;function r(f,y,h){return typeof y=="function"&&(h=y,y=null),D(f,y,h);function D(P,b,x,F){return t(P,b,function(S){S&&(S.code==="EMFILE"||S.code==="ENFILE")?J([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,y,h,D){return typeof h=="function"&&(D=h,h=null),P(f,y,h,D);function P(b,x,F,S,N){return n(b,x,F,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?J([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,y,h,D){return typeof h=="function"&&(D=h,h=null),P(f,y,h,D);function P(b,x,F,S,N){return u(b,x,F,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?J([P,[b,x,F,S],g,N||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}var p=e.copyFile;p&&(e.copyFile=T);function T(f,y,h,D){return typeof h=="function"&&(D=h,h=0),P(f,y,h,D);function P(b,x,F,S,N){return p(b,x,F,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?J([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,y,h){typeof y=="function"&&(h=y,y=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,y,h);function P(b,x,F,S){return function(N,g){N&&(N.code==="EMFILE"||N.code==="ENFILE")?J([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,y){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(y,h){y?(f.autoClose&&f.destroy(),f.emit("error",y)):(f.fd=h,f.emit("open",h),f.read())})}function R(f,y){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(y,h){y?(f.destroy(),f.emit("error",y)):(f.fd=h,f.emit("open",h))})}function Re(f,y){return new e.ReadStream(f,y)}function Ce(f,y){return new e.WriteStream(f,y)}var Tt=e.open;e.open=ye;function ye(f,y,h,D){return typeof h=="function"&&(D=h,h=null),P(f,y,h,D);function P(b,x,F,S,N){return Tt(b,x,F,function(g,tr){g&&(g.code==="EMFILE"||g.code==="ENFILE")?J([P,[b,x,F,S],g,N||Date.now(),Date.now()]):typeof S=="function"&&S.apply(this,arguments)})}}return e}function J(e){Y("ENQUEUE",e[0].name,e[1]),O[L].push(e),Ee()}var ae;function Ze(){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);Ee()}function Ee(){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 p=Date.now()-u,T=Math.max(u-o,1),I=Math.min(T*1.2,100);p>=I?(Y("RETRY",t.name,r),t.apply(null,r.concat([o]))):O[L].push(e)}ae===void 0&&(ae=setTimeout(Ee,0))}}});var rt=k((Nr,tt)=>{d();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))}tt.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 nt=k(K=>{d();var Ct=rt();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 ot=k((kr,it)=>{d();it.exports=nt()});var ut=k((Ar,fe)=>{d();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 lt=k((qr,H)=>{d();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(_)?(at=U("assert"),Q=ut(),ct=/^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(){};at.equal(typeof e,"function","a callback must be provided for exit handler"),X===!1&&Fe();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,Q.forEach(function(t){try{_.removeListener(t,le[t])}catch{}}),_.emit=me,_.reallyExit=Ie,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={},Q.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),ct&&e==="SIGHUP"&&(e="SIGINT"),_.kill(_.pid,e))}}}),H.exports.signals=function(){return Q},X=!1,Fe=function(){X||!z(globalThis.process)||(X=!0,M.count+=1,Q=Q.filter(function(t){try{return _.on(t,le[t]),!0}catch{return!1}}),_.emit=st,_.reallyExit=ft)},H.exports.load=Fe,Ie=_.reallyExit,ft=function(t){z(globalThis.process)&&(_.exitCode=t||0,B("exit",_.exitCode,null),B("afterexit",_.exitCode,null),Ie.call(_,_.exitCode))},me=_.emit,st=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 at,Q,ct,ee,M,se,B,le,X,Fe,Ie,ft,me,st});var pt=k(($r,be)=>{"use strict";d();var mt=Symbol();function kt(e,t,r){let n=t[mt];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,p)=>{if(l)return r(l);let T=p.mtime.getTime()%1e3===0?"s":"ms";Object.defineProperty(t,mt,{value:T}),r(null,p.mtime,T)})})}function jt(e){let t=Date.now();return e==="s"&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}be.exports.probe=kt;be.exports.getMtime=jt});var St=k((Yr,re)=>{"use strict";d();var At=U("path"),Pe=Oe(),Gt=ot(),qt=lt(),ht=pt(),q={};function te(e,t){return t.lockfilePath||`${e}.lock`}function Ne(e,t,r){if(!t.realpath)return r(null,At.resolve(e));t.fs.realpath(e,r)}function De(e,t,r){let n=te(e,t);t.fs.mkdir(n,o=>{if(!o)return ht.probe(n,t.fs,(u,l,p)=>{if(u)return t.fs.rmdir(n,()=>{}),r(u);r(null,l,p)});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"?De(e,{...t,stale:0},r):r(u);if(!dt(l,t))return r(Object.assign(new Error("Lock file is already being held"),{code:"ELOCKED",file:e}));yt(e,t,p=>{if(p)return r(p);De(e,{...t,stale:0},r)})})})}function dt(e,t){return e.mtime.getTime()<Date.now()-t.stale}function yt(e,t,r){t.fs.rmdir(te(e,t),n=>{if(n&&n.code!=="ENOENT")return r(n);r()})}function pe(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?Me(e,r,Object.assign(n,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,pe(e,t));if(!(r.mtime.getTime()===o.mtime.getTime()))return Me(e,r,Object.assign(new Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let p=ht.getMtime(r.mtimePrecision);t.fs.utimes(r.lockfilePath,p,p,T=>{let I=r.lastUpdate+t.stale<Date.now();if(!r.released){if(T)return T.code==="ENOENT"||I?Me(e,r,Object.assign(T,{code:"ECOMPROMISED"})):(r.updateDelay=1e3,pe(e,t));r.mtime=p,r.lastUpdate=Date.now(),r.updateDelay=null,pe(e,t)}})})},r.updateDelay),r.updateTimeout.unref&&r.updateTimeout.unref())}function Me(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:Pe,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),Ne(e,t,(n,o)=>{if(n)return r(n);let u=Gt.operation(t.retries);u.attempt(()=>{De(o,t,(l,p,T)=>{if(u.retry(l))return;if(l)return r(u.mainError());let I=q[o]={lockfilePath:te(o,t),mtime:p,mtimePrecision:T,options:t,lastUpdate:Date.now()};pe(o,t),r(null,i=>{if(I.released)return i&&i(Object.assign(new Error("Lock is already released"),{code:"ERELEASED"}));vt(o,{...t,realpath:!1},i)})})})})}function vt(e,t,r){t={fs:Pe,realpath:!0,...t},Ne(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],yt(o,t,r)})}function $t(e,t,r){t={stale:1e4,realpath:!0,fs:Pe,...t},t.stale=Math.max(t.stale||0,2e3),Ne(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,!dt(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=vt;re.exports.check=$t;re.exports.getLocks=Wt});var gt=k((zr,wt)=>{"use strict";d();var Yt=Oe();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(p){return u(p)}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 Jt(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}wt.exports={toPromise:zt,toSync:Bt,toSyncOptions:Jt}});var er=k((Jr,W)=>{"use strict";d();var V=St(),{toPromise:he,toSync:de,toSyncOptions:Le}=gt();async function _t(e,t){let r=await he(V.lock)(e,t);return he(r)}function Qt(e,t){let r=de(V.lock)(e,Le(t));return de(r)}function Xt(e,t){return he(V.unlock)(e,t)}function Ht(e,t){return de(V.unlock)(e,Le(t))}function Vt(e,t){return he(V.check)(e,t)}function Zt(e,t){return de(V.check)(e,Le(t))}W.exports=_t;W.exports.lock=_t;W.exports.unlock=Xt;W.exports.lockSync=Qt;W.exports.unlockSync=Ht;W.exports.check=Vt;W.exports.checkSync=Zt});d();function $e(e){try{return process.kill(e,0),!0}catch(t){return t.code==="EPERM"}}d();import*as j from"node:fs/promises";import*as G from"node:path";function Ye(){return G.join(ve.getGlobalMatildaDir(),Ae)}function we(e){return G.join(Ye(),e)}function ge(e){return G.join(we(e),qe)}function fr(e){return G.join(we(e),Ue)}function Et(e){return G.join(ve.getGlobalMatildaDir(),Ge,e)}function ie(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function sr(e,t){return`${ie(e)}@${ie(t)}`}function lr(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===Se)throw new Error(`"${Se}" 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 mr(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 pr(e){return e.map(t=>{let{color:r,...n}=t;return n})}function hr(e,t,r){return e.map(n=>n.agentId===t?{...n,isActive:r}:n)}function dr(e,t){return e.find(r=>r.agentId===t)}function yr(e,t){let r=ie(t);return e.find(n=>n.name===r)}function vr(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 xt(e){let t=ge(e);try{let r=await j.readFile(t,"utf-8");return JSON.parse(r)}catch(r){if(ke(r)&&r.code==="ENOENT")return;throw r}}async function Sr(e,t){let r=ge(e);await j.mkdir(G.dirname(r),{recursive:!0}),await je(r,t)}async function wr(e,t){let r=ge(e);await j.mkdir(G.dirname(r),{recursive:!0}),await j.writeFile(r,JSON.stringify(t,null,2)+`
|
|
5
|
+
`,{encoding:"utf-8",flag:"wx"})}async function gr(e){let t;try{t=await xt(e)}catch{return!1}return t?typeof t.leadPid!="number"||t.leadPid<=0||t.leadPid!==process.pid&&$e(t.leadPid)?!1:(await We(e),!0):(await We(e),!0)}async function We(e){let t=we(e),r=Et(e);await Promise.allSettled([j.rm(t,{recursive:!0,force:!0}),j.rm(r,{recursive:!0,force:!0})])}async function _r(){let e=Ye();try{return(await j.readdir(e,{withFileTypes:!0})).filter(r=>r.isDirectory()).map(r=>r.name)}catch{return[]}}export{Oe as a,er as b,$e as c,Ye as d,we as e,ge as f,fr as g,Et as h,ie as i,sr as j,lr as k,mr as l,pr as m,hr as n,dr as o,yr as p,vr as q,xt as r,Sr as s,wr as t,gr as u,We as v,_r as w};
|
|
6
|
+
/**
|
|
7
|
+
* @license
|
|
8
|
+
* Copyright 2026 Matilda
|
|
9
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
*/
|
|
6
11
|
/**
|
|
7
12
|
* @license
|
|
8
13
|
* Copyright 2025 Matilda
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{g as o,i as a,p as u,q as n}from"./chunk-
|
|
3
|
+
import{g as o,i as a,p as u,q as n}from"./chunk-T4P4KEDW.js";import{b as s}from"./chunk-GZPNIYVZ.js";s();var i=`Submit your final answer as structured JSON that conforms to the provided schema.
|
|
4
4
|
|
|
5
5
|
CRITICAL: In structured-output mode, this is the ONLY way to deliver the final result. Call this tool to deliver the final result; the first call with valid arguments ends the session. Do not emit the final answer as plain text \u2014 it will be discarded. Use other tools (Read, Grep, etc.) to gather the information you need before calling this tool.
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{b as a,d as c}from"./chunk-
|
|
3
|
+
import{b as a,d as c}from"./chunk-MH2P4YXC.js";import{b as E}from"./chunk-GZPNIYVZ.js";E();import{URL as g}from"node:url";var l=[/^10\./,/^127\./,/^172\.(1[6-9]|2[0-9]|3[0-1])\./,/^192\.168\./,/^::1$/,/^fc00:/,/^fe80:/],f=new Set(["UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID"]),T=new Set([...f,"ECONNRESET","ETIMEDOUT","ECONNREFUSED","ENOTFOUND","EAI_AGAIN","EHOSTUNREACH","ENETUNREACH"]),u=class extends Error{constructor(t,o){super(t);this.code=o;this.name="FetchError"}};function S(n){try{let e=new g(n).hostname;return l.some(t=>t.test(e))}catch{return!1}}async function A(n,e,t){let o=new AbortController,r=setTimeout(()=>o.abort(),e);try{return await fetch(n,{signal:o.signal,headers:t})}catch(s){throw a(s)&&s.code==="ABORT_ERR"?new u(`Request timed out after ${e}ms`,"ETIMEDOUT"):new u(c(s))}finally{clearTimeout(r)}}function i(n){if(!(!n||typeof n!="object")&&"code"in n&&typeof n.code=="string")return n.code}function h(n){if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean"||typeof n=="bigint")return String(n);if(n instanceof Error)return n.message;if(!n||typeof n!="object")return;let e=n.message;if(typeof e=="string")return e}function m(n){if(!(n instanceof Error))return;let e=n.cause;if(!e)return;let t=i(e),o=h(e);if(!(!t&&!o))return t&&o&&!o.includes(t)?`${t}: ${o}`:o??t}function N(n,e={}){let t=c(n),o=n instanceof Error?i(n.cause)??i(n):i(n),r=m(n),s=[t,r?`(cause: ${r})`:void 0].filter(Boolean).join(" "),d=t.toLowerCase().includes("fetch failed")||o!=null&&T.has(o),R=o!=null&&f.has(o);if(!d)return s;let _=["","Troubleshooting:",...e.url?[`- Confirm you can reach ${e.url} from this machine.`]:[],"- If you are behind a proxy, pass `--proxy <url>` (or set `proxy` in settings).",...R?["- If your network uses a corporate TLS inspection CA, set `NODE_EXTRA_CA_CERTS` to your CA bundle."]:[]];return`${s}${_.join(`
|
|
4
4
|
`)}`}export{S as a,A as b,N as c};
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{f}from"./chunk-
|
|
3
|
+
import{f}from"./chunk-2HQMJ2IU.js";import{f as u}from"./chunk-QKYGQLWC.js";import{g as m,i as c,p as l,q as p}from"./chunk-T4P4KEDW.js";import{b as n}from"./chunk-GZPNIYVZ.js";n();var o=2e3;function T(e){return e.length<=o?e:`${e.slice(0,o)}
|
|
4
4
|
\u2026 (${e.length-o} more characters)`}var s=class extends m{constructor(t,r){super(r);this.config=t}getDescription(){return`Create task: ${this.params.subject}`}async getDefaultPermission(){return"ask"}getConfirmationDetails(t){let r={type:"info",title:"Confirm TaskCreate",prompt:`Create task: ${this.params.subject}
|
|
5
5
|
|
|
6
6
|
`+T(this.params.description),onConfirm:async()=>{}};return Promise.resolve(r)}async execute(){let t=u(this.config.getTeamContext()?.teamName);if(!t){let a="No active team. Create a team first.";return{llmContent:a,returnDisplay:a,error:{message:a}}}let r=await f(t,{subject:this.params.subject,description:this.params.description,activeForm:this.params.activeForm,metadata:this.params.metadata}),i=`Task #${r.id} created: "${r.subject}"`;return{llmContent:i,returnDisplay:i}}},d=class e extends c{constructor(t){super(e.Name,p.TASK_CREATE,"Create a new task in the team task list. Tasks are automatically assigned to idle teammates.","other",{type:"object",properties:{subject:{type:"string",description:"Short title for the task.",maxLength:200},description:{type:"string",description:"Detailed description of the task.",maxLength:1e4},activeForm:{type:"string",maxLength:200,description:'Present tense label for UI (e.g., "Running tests").'},metadata:{type:"object",description:"Optional arbitrary metadata."}},required:["subject","description"],additionalProperties:!1});this.config=t}static Name=l.TASK_CREATE;createInvocation(t){return new s(this.config,t)}toAutoClassifierInput(t){return{subject:t.subject,description:t.description}}};export{T as a,d as b};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{
|
|
3
|
+
import{If as H,Kf as K,Ue as x,Wi as V}from"./chunk-6OM7PU5M.js";import"./chunk-M53RP3YP.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-NYEWHSBL.js";import"./chunk-QN6WSWMM.js";import"./chunk-2HQMJ2IU.js";import"./chunk-W5CGKUM4.js";import"./chunk-TISQNFB5.js";import"./chunk-MTMU7JYZ.js";import"./chunk-SPW5DXX4.js";import"./chunk-RNKDFE2S.js";import"./chunk-GHBKFIHC.js";import"./chunk-5427BPR2.js";import"./chunk-47XR7IMP.js";import"./chunk-FFFZ2QMG.js";import"./chunk-SNLH42QJ.js";import"./chunk-HYVP4472.js";import"./chunk-QKYGQLWC.js";import"./chunk-QH7736R5.js";import"./chunk-4CSSDBOS.js";import"./chunk-JXUDKX6D.js";import"./chunk-7Y4YWLWT.js";import"./chunk-GUFIMKF5.js";import"./chunk-46MIUE6Z.js";import"./chunk-DC7LAFZZ.js";import"./chunk-4F4DA5UI.js";import"./chunk-SUH3UUWZ.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import{i as S}from"./chunk-25NCTG5H.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-ELH4YHJR.js";import"./chunk-WHG6N5X2.js";import{g as G,i as X}from"./chunk-T4P4KEDW.js";import"./chunk-HWOQNYAO.js";import"./chunk-XCFLI3OC.js";import"./chunk-VI74YQQO.js";import"./chunk-3YLXGE6T.js";import"./chunk-GO2GA2GY.js";import"./chunk-MH2P4YXC.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as d}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";d();d();d();import{homedir as we}from"node:os";d();import{join as R}from"node:path";import{homedir as E}from"node:os";var l="0.5.2",me="https://matilda.maincode.com/assets/computer-use",he="https://github.com/trycua/cua/releases/download";function U(e=process.platform,t=process.arch,o=l){let r=o;if(e==="darwin"){let n=`cua-driver-rs-${r}-${t==="arm64"?"darwin-arm64":"darwin-x86_64"}`;return{asset:`${n}.tar.gz`,extractDir:n,binaryRelPath:"CuaDriver.app/Contents/MacOS/cua-driver",hasApp:!0}}if(e==="linux"){if(t!=="x64")throw new Error(`Computer Use: unsupported Linux arch '${t}' (only x64).`);return{asset:`cua-driver-rs-${r}-linux-x86_64-binary.tar.gz`,extractDir:".",binaryRelPath:"cua-driver",hasApp:!1}}if(e==="win32"){let n=`cua-driver-rs-${r}-${t==="arm64"?"windows-arm64":"windows-x86_64"}`;return{asset:`${n}.zip`,extractDir:n,binaryRelPath:"cua-driver.exe",hasApp:!1}}throw new Error(`Computer Use: unsupported platform '${e}'.`)}function N(e,t=process.env,o=l){let r=[],i=t.MATILDA_COMPUTER_USE_DOWNLOAD_HOST;return i&&r.push(`${ye(i)}/cua-driver-rs/v${o}/${e}`),r.push(`${me}/cua-driver-rs/v${o}/${e}`),r.push(`${he}/cua-driver-rs-v${o}/${e}`),r}function Y(e=process.env,t=l){return N("checksums.txt",e,t)}var fe="MATILDA_COMPUTER_USE_MAX_IMAGE_DIMENSION";function J(e){if(e===void 0||typeof e=="string"&&e.trim()==="")return;let t=typeof e=="number"?e:Number(e);if(!(!Number.isInteger(t)||t<0))return t}function Q(e,t=process.env){let o=J(t[fe]);return o!==void 0?o:J(e)}function ge(e=E()){return R(e,".matilda","computer-use")}function M(e=E(),t=l){return R(ge(e),`cua-driver-rs-${t}`)}function u(e=E(),t=process.platform,o=process.arch,r=l){let i=U(t,o,r);return R(M(e,r),i.extractDir,i.binaryRelPath)}function h(e=l){return`cua-driver-rs@${e}`}function ye(e){return e.endsWith("/")?e.slice(0,-1):e}var f=class e{static singleton;binary;onProgress;maxImageDimension;client;startPromise;constructor(t){this.binary=t.binary,this.onProgress=t.onProgress??(()=>{}),this.maxImageDimension=t.maxImageDimension}setMaxImageDimension(t){this.maxImageDimension=t}static shared(){return e.singleton||(e.singleton=new e({binary:u(we())})),e.singleton}static setSharedForTest(t){e.singleton=t}isStarted(){return this.client!==void 0}async start(t){if(!this.client)return this.startPromise?this.startPromise:(this.startPromise=this.doStart(t).finally(()=>{this.startPromise=void 0}),this.startPromise)}async doStart(t){let o=t??this.onProgress;o("Starting Computer Use driver...");let r=new K({command:this.binary,args:["mcp"],env:x()}),i=new H({name:"matilda-code-computer-use",version:"1.0.0"},{capabilities:{}});await i.connect(r),this.client=i,await this.applyRuntimeConfig(i,o)}async applyRuntimeConfig(t,o){if(this.maxImageDimension!==void 0)try{await t.callTool({name:"set_config",arguments:{max_image_dimension:this.maxImageDimension}})}catch(r){let i=r instanceof Error?r.message:String(r);o(`Computer Use: could not apply max_image_dimension=${this.maxImageDimension} (${i}); using driver default.`)}}async listTools(){if(!this.client)throw new Error("ComputerUseClient not started");return this.client.listTools()}async callTool(t,o){if(!this.client)throw new Error("ComputerUseClient not started");try{return await this.client.callTool({name:t,arguments:o})}catch(r){if(!Z(r))throw r;let i=r;for(let n=0;n<3;n++){if(await this.stop(),await this.start(),!this.client)throw new Error("ComputerUseClient reconnect failed");try{return await this.client.callTool({name:t,arguments:o})}catch(s){if(!Z(s))throw s;i=s,await new Promise(a=>setTimeout(a,1e3))}}throw i}}async stop(){let t=this.client;if(this.client=void 0,t)try{await t.close()}catch{}}};function Z(e){let t=e instanceof Error?e.message:String(e);return/connection closed|not connected|connection refused|daemon transport error|os error 61/i.test(t)}d();var j=["bring_to_front","check_for_update","check_permissions","click","double_click","drag","end_session","get_accessibility_tree","get_agent_cursor_state","get_config","get_cursor_position","get_recording_state","get_screen_size","get_window_state","hotkey","kill_app","launch_app","list_apps","list_windows","move_cursor","page","press_key","replay_trajectory","right_click","scroll","set_agent_cursor_enabled","set_agent_cursor_motion","set_agent_cursor_style","set_config","set_value","start_recording","start_session","stop_recording","type_text","zoom"],g={bring_to_front:{description:'Activate a window so subsequent input tools with `dispatch:"foreground"` land on it without a per-call SetForegroundWindow flash. **Windows-only:** on macOS this tool returns an error pointing to the platform-native `NSRunningApplication.activate` (which the macOS input tools don\'t need because CGEvent.postToPid reaches backgrounded windows). On Linux this tool also stubs out; use `wmctrl -a` or `xdotool windowactivate` if you need explicit activation.',parameterSchema:{additionalProperties:!1,properties:{pid:{type:"integer"},window_id:{type:"integer"}},required:["pid"],type:"object"}},check_for_update:{description:"Check whether a newer cua-driver-rs release is available on GitHub. Returns the current and latest versions, an `update_available` boolean, the install one-liner, and the release notes URL. Read-only \u2014 never installs. Mirror of `cua-driver check-update --json`.",parameterSchema:{additionalProperties:!1,properties:{},type:"object"}},check_permissions:{description:"Report TCC permission status for Accessibility and Screen Recording. By default also raises the system permission dialogs for any missing grants \u2014 Apple's request APIs are no-ops when the grant is already active, so this is safe to call repeatedly. Pass {\"prompt\": false} for a purely read-only status check.\n\nReturns: `accessibility` + `screen_recording` (booleans from the TCC preflight APIs), `screen_recording_capturable` (a live ScreenCaptureKit probe \u2014 if it disagrees with `screen_recording`, the preflight grant belongs to a different process), and `source` (which TCC identity the booleans reflect: the CuaDriver daemon vs the launching terminal/IDE). macOS attributes grants to the responsible process, so a standalone call from a terminal reports the terminal's grants, not the driver's.",parameterSchema:{additionalProperties:!1,properties:{prompt:{description:"Raise the system permission prompts for missing grants. Default true.",type:"boolean"}},type:"object"}},click:{description:`Left-click against a target pid. **Prefer \`element_index\` over pixel coordinates** \u2014 element_index works on backgrounded / minimized / hidden / off-Space windows, surfaces a stable handle that survives rebuilds, and tells you what you're clicking via the cached element's role + label. Reach for \`x, y\` only when the target is a canvas / video / WebGL / custom-drawn surface that doesn't appear in the AX tree.
|
|
4
4
|
|
|
5
5
|
Two addressing modes:
|
|
6
6
|
|
|
@@ -87,15 +87,15 @@ All parameters are optional; omit any you do not want to change.`,parameterSchem
|
|
|
87
87
|
|
|
88
88
|
- **All other elements**: writes AXValue directly (sliders, steppers, date pickers, native text fields that expose settable AXValue).
|
|
89
89
|
|
|
90
|
-
For free-form text entry into web inputs, prefer \`type_text_chars\` which synthesises key events \u2014 AXValue writes are ignored by WebKit.`,parameterSchema:{additionalProperties:!1,properties:{element_index:{type:"integer"},pid:{type:"integer"},session:{description:"Optional session id: declares/uses the agent cursor and per-session state for this run. The same id works over MCP, the CLI, or the raw socket, and follows the run across apps/windows. Omit to run cursor-less.",type:"string"},value:{description:"New value. AX will coerce to the element's native type.",type:"string"},window_id:{description:"CGWindowID for the window whose get_window_state produced the element_index.",type:"integer"}},required:["pid","window_id","element_index","value"],type:"object"}},start_recording:{description:"Start trajectory recording. Every subsequent action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) writes a turn folder under `output_dir`:\n\n- `app_state.json` \u2014 post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` \u2014 post-action per-window screenshot of the target's frontmost on-screen window.\n- `action.json` \u2014 tool name, full input arguments, result summary, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` \u2014 for click-family actions only, `screenshot.png` with a red dot drawn at the click point.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (in-process SCStream + SCRecordingOutput) so video inherits Cua Driver's own Screen Recording grant \u2014 no extra TCC prompt, no ffmpeg subprocess. Requires macOS 15.0+.\n\n**Windows + Linux use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\nState persists for the life of the daemon / MCP session; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",parameterSchema:{additionalProperties:!1,properties:{output_dir:{description:"Absolute or ~-rooted directory where turn folders and (when enabled) the video file are written.",type:"string"},record_video:{description:"Capture the main display to <output_dir>/recording.mp4. Default: false. Set to true to also capture the main display to recording.mp4 (otherwise only the per-turn screenshots + JSON are recorded). On macOS this uses native ScreenCaptureKit (no extra TCC prompt, macOS 15.0+); on Windows + Linux it requires ffmpeg on PATH.",type:"boolean"}},required:["output_dir"],type:"object"}},start_session:{description:"Declare a session \u2014 a named, color-coded identity for THIS agent run. Pass a stable `session` id; the agent cursor, per-session config, and recording all key on it, and it follows the run across any apps/windows. The cursor's color is derived from the id, so distinct runs are visually distinct. A cursor is shown only for a declared session \u2014 call this (or pass `session` on your first action) to opt in. Idempotent: re-calling with the same id just refreshes its idle-TTL. End it with `end_session` (or let the idle-TTL reclaim it). Concurrent runs/subagents each pass their own `session` to get their own cursor.",parameterSchema:{additionalProperties:!0,properties:{session:{description:'Stable session id for this run (e.g. "research-run-1").',type:"string"}},required:["session"],type:"object"}},stop_recording:{description:"Stop trajectory recording. Disables further per-turn capture and, when video was enabled, gracefully terminates the ffmpeg subprocess so the mp4's moov atom is finalized (the file is playable). Calling stop on an already-stopped session is a no-op. The response carries `last_video_path` pointing at the finalized mp4 (when video was on).\n\nA manual `stop_recording` is **unconditional** \u2014 it stops whatever recording is active regardless of which session started it. Ownership-scoped teardown (so one MCP client disconnecting can't stop a recording a later client started) is handled by the daemon's `session_end` lifecycle signal, not by this tool.",parameterSchema:{additionalProperties:!1,properties:{},type:"object"}},type_text:{description:"Insert text into the target pid via `AXSetAttribute(kAXSelectedText)`. Works for standard Cocoa text fields and text views. No keystrokes are synthesized \u2014 special keys (Return / Escape / arrows) go through `press_key` / `hotkey`. For Chromium / Electron inputs that don't implement `kAXSelectedText`, the tool falls back to CGEvent character synthesis automatically.\n\nOptional `element_index` + `window_id` (from the last `get_window_state` snapshot) directs the write to a specific field. Without `element_index`, the write goes to the pid's currently focused element.",parameterSchema:{additionalProperties:!1,properties:{delay_ms:{description:"Milliseconds between characters in the CGEvent fallback path. Default 30. Ignored when the AX path succeeds.",maximum:200,minimum:0,type:"integer"},element_index:{description:"Element index from last get_window_state. Directs the write to a specific field. Requires window_id.",type:"integer"},pid:{description:"Target process ID.",type:"integer"},session:{description:"Optional session id: declares/uses the agent cursor and per-session state for this run. The same id works over MCP, the CLI, or the raw socket, and follows the run across apps/windows. Omit to run cursor-less.",type:"string"},text:{description:"Text to insert at the target's cursor.",type:"string"},window_id:{description:"CGWindowID. Required when element_index is used.",type:"integer"}},required:["pid","text"],type:"object"}},zoom:{description:"Capture a cropped JPEG of a window region (x1,y1)\u2013(x2,y2) in screenshot pixel coordinates, with 20% padding added on each side. The output image is at most 500 px wide.\n\nAfter a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space.",parameterSchema:{additionalProperties:!1,properties:{pid:{description:"Target pid \u2014 required for from_zoom click/type translation.",type:"integer"},window_id:{description:"CGWindowID from list_windows.",type:"integer"},x1:{description:"Left edge of region in screenshot pixels.",type:"number"},x2:{description:"Right edge of region in screenshot pixels.",type:"number"},y1:{description:"Top edge of region in screenshot pixels.",type:"number"},y2:{description:"Bottom edge of region in screenshot pixels.",type:"number"}},required:["window_id","x1","y1","x2","y2"],type:"object"}}};d();import{execFile as
|
|
91
|
-
`)){let r=o.trim().match(/^([0-9a-f]{64})\s+\*?(.+)$/i);r&&t.set(r[2].trim(),r[1].toLowerCase())}return t}async function
|
|
90
|
+
For free-form text entry into web inputs, prefer \`type_text_chars\` which synthesises key events \u2014 AXValue writes are ignored by WebKit.`,parameterSchema:{additionalProperties:!1,properties:{element_index:{type:"integer"},pid:{type:"integer"},session:{description:"Optional session id: declares/uses the agent cursor and per-session state for this run. The same id works over MCP, the CLI, or the raw socket, and follows the run across apps/windows. Omit to run cursor-less.",type:"string"},value:{description:"New value. AX will coerce to the element's native type.",type:"string"},window_id:{description:"CGWindowID for the window whose get_window_state produced the element_index.",type:"integer"}},required:["pid","window_id","element_index","value"],type:"object"}},start_recording:{description:"Start trajectory recording. Every subsequent action-tool invocation (click, right_click, scroll, type_text, press_key, hotkey, set_value) writes a turn folder under `output_dir`:\n\n- `app_state.json` \u2014 post-action AX/UIA snapshot for the target pid.\n- `screenshot.png` \u2014 post-action per-window screenshot of the target's frontmost on-screen window.\n- `action.json` \u2014 tool name, full input arguments, result summary, pid, click point (when applicable), ISO-8601 timestamp.\n- `click.png` \u2014 for click-family actions only, `screenshot.png` with a red dot drawn at the click point.\n\nTurn folders are named `turn-00001/`, `turn-00002/`, etc. Turn numbering restarts at 1 each time recording is (re-)started.\n\n**Video is off by default.** Pass `record_video: true` to also capture the main display to `<output_dir>/recording.mp4` (H.264 / 30 fps) for the lifetime of the session. The recording is torn down automatically when the MCP client disconnects.\n\n**macOS uses native ScreenCaptureKit** (in-process SCStream + SCRecordingOutput) so video inherits Cua Driver's own Screen Recording grant \u2014 no extra TCC prompt, no ffmpeg subprocess. Requires macOS 15.0+.\n\n**Windows + Linux use an ffmpeg subprocess** (`gdigrab` / `x11grab` + libx264). Requires ffmpeg on PATH (winget install Gyan.FFmpeg / apt install ffmpeg); when ffmpeg is missing or fails on startup the per-turn capture (screenshots + action.json) still runs and the session's `last_error` field carries the diagnostic.\n\nState persists for the life of the daemon / MCP session; a restart resets to disabled with no on-disk state. Call `stop_recording` to disable + finalize the mp4.",parameterSchema:{additionalProperties:!1,properties:{output_dir:{description:"Absolute or ~-rooted directory where turn folders and (when enabled) the video file are written.",type:"string"},record_video:{description:"Capture the main display to <output_dir>/recording.mp4. Default: false. Set to true to also capture the main display to recording.mp4 (otherwise only the per-turn screenshots + JSON are recorded). On macOS this uses native ScreenCaptureKit (no extra TCC prompt, macOS 15.0+); on Windows + Linux it requires ffmpeg on PATH.",type:"boolean"}},required:["output_dir"],type:"object"}},start_session:{description:"Declare a session \u2014 a named, color-coded identity for THIS agent run. Pass a stable `session` id; the agent cursor, per-session config, and recording all key on it, and it follows the run across any apps/windows. The cursor's color is derived from the id, so distinct runs are visually distinct. A cursor is shown only for a declared session \u2014 call this (or pass `session` on your first action) to opt in. Idempotent: re-calling with the same id just refreshes its idle-TTL. End it with `end_session` (or let the idle-TTL reclaim it). Concurrent runs/subagents each pass their own `session` to get their own cursor.",parameterSchema:{additionalProperties:!0,properties:{session:{description:'Stable session id for this run (e.g. "research-run-1").',type:"string"}},required:["session"],type:"object"}},stop_recording:{description:"Stop trajectory recording. Disables further per-turn capture and, when video was enabled, gracefully terminates the ffmpeg subprocess so the mp4's moov atom is finalized (the file is playable). Calling stop on an already-stopped session is a no-op. The response carries `last_video_path` pointing at the finalized mp4 (when video was on).\n\nA manual `stop_recording` is **unconditional** \u2014 it stops whatever recording is active regardless of which session started it. Ownership-scoped teardown (so one MCP client disconnecting can't stop a recording a later client started) is handled by the daemon's `session_end` lifecycle signal, not by this tool.",parameterSchema:{additionalProperties:!1,properties:{},type:"object"}},type_text:{description:"Insert text into the target pid via `AXSetAttribute(kAXSelectedText)`. Works for standard Cocoa text fields and text views. No keystrokes are synthesized \u2014 special keys (Return / Escape / arrows) go through `press_key` / `hotkey`. For Chromium / Electron inputs that don't implement `kAXSelectedText`, the tool falls back to CGEvent character synthesis automatically.\n\nOptional `element_index` + `window_id` (from the last `get_window_state` snapshot) directs the write to a specific field. Without `element_index`, the write goes to the pid's currently focused element.",parameterSchema:{additionalProperties:!1,properties:{delay_ms:{description:"Milliseconds between characters in the CGEvent fallback path. Default 30. Ignored when the AX path succeeds.",maximum:200,minimum:0,type:"integer"},element_index:{description:"Element index from last get_window_state. Directs the write to a specific field. Requires window_id.",type:"integer"},pid:{description:"Target process ID.",type:"integer"},session:{description:"Optional session id: declares/uses the agent cursor and per-session state for this run. The same id works over MCP, the CLI, or the raw socket, and follows the run across apps/windows. Omit to run cursor-less.",type:"string"},text:{description:"Text to insert at the target's cursor.",type:"string"},window_id:{description:"CGWindowID. Required when element_index is used.",type:"integer"}},required:["pid","text"],type:"object"}},zoom:{description:"Capture a cropped JPEG of a window region (x1,y1)\u2013(x2,y2) in screenshot pixel coordinates, with 20% padding added on each side. The output image is at most 500 px wide.\n\nAfter a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space.",parameterSchema:{additionalProperties:!1,properties:{pid:{description:"Target pid \u2014 required for from_zoom click/type translation.",type:"integer"},window_id:{description:"CGWindowID from list_windows.",type:"integer"},x1:{description:"Left edge of region in screenshot pixels.",type:"number"},x2:{description:"Right edge of region in screenshot pixels.",type:"number"},y1:{description:"Top edge of region in screenshot pixels.",type:"number"},y2:{description:"Bottom edge of region in screenshot pixels.",type:"number"}},required:["window_id","x1","y1","x2","y2"],type:"object"}}};d();import{execFile as Le,spawnSync as $}from"node:child_process";import{promisify as qe}from"node:util";import{rmSync as ze}from"node:fs";import{homedir as W}from"node:os";import{join as Be}from"node:path";d();import{readFile as _e,writeFile as ve,mkdir as be}from"node:fs/promises";import{homedir as C}from"node:os";import{join as Se,dirname as xe}from"node:path";function ee(e=C()){return Se(e,".matilda","computer-use","installed.json")}async function Ce(e=C()){try{let t=await _e(ee(e),"utf8"),o=JSON.parse(t);return typeof o?.approvedPackageSpec!="string"||typeof o?.approvedAtIso!="string"?void 0:o}catch(t){return t?.code==="ENOENT",void 0}}async function P(e=C(),t){let o=ee(e);await be(xe(o),{recursive:!0}),await ve(o,JSON.stringify(t,null,2),"utf8")}async function k(e=C(),t){return(await Ce(e))?.approvedPackageSpec===t}d();import{createHash as Pe}from"node:crypto";import{createWriteStream as ke}from"node:fs";import{mkdir as te,rm as T,stat as Te,chmod as De,rename as Ae}from"node:fs/promises";import{join as D}from"node:path";import{tmpdir as Oe}from"node:os";import{pipeline as Ie}from"node:stream/promises";import{Readable as Re}from"node:stream";function Ee(e){let t=new Map;for(let o of e.split(`
|
|
91
|
+
`)){let r=o.trim().match(/^([0-9a-f]{64})\s+\*?(.+)$/i);r&&t.set(r[2].trim(),r[1].toLowerCase())}return t}async function Ue(e,t=process.platform,o=process.arch,r=l){let i=u(e,t,o,r);try{if((await Te(i)).isFile())return i}catch{}}async function re(e,t,o){let r;for(let i of e)try{let n=new AbortController,s=setTimeout(()=>{n.abort(new Error(`headers timeout after 30s for ${i}`))},3e4);try{let a=await t(i,{redirect:"follow",signal:n.signal});if(a.ok&&a.body)return{url:i,res:a};await a.body?.cancel(),r=new Error(`HTTP ${a.status} for ${i}`)}finally{clearTimeout(s)}}catch(n){r=n,o?.("Source unreachable, trying fallback\u2026")}throw new Error(`Computer Use: all download sources failed. Last error: ${r instanceof Error?r.message:String(r)}`)}async function se(e){let t=e.platform??process.platform,o=e.arch??process.arch,r=e.version??l,i=e.env??process.env,n=e.fetchImpl??fetch,s=e.onProgress,a=await Ue(e.home,t,o,r);if(a)return a;let p=U(t,o,r);s?.("Downloading Computer Use driver (~20MB, one time)...");let{res:c}=await re(Y(i,r),n),A=Ee(await c.text()).get(p.asset);if(!A)throw new Error(`Computer Use: ${p.asset} missing from checksums.txt.`);let{res:le}=await re(N(p.asset,i,r),n,s);await te(oe(e.home),{recursive:!0});let w=D(oe(e.home),p.asset),L=Pe("sha256"),O=Re.fromWeb(le.body),I,q=()=>{clearTimeout(I),I=setTimeout(()=>{O.destroy(new Error("download stalled: no data for 60s"))},6e4)};O.on("data",b=>{L.update(b),q()}),q();try{await Ie(O,ke(w))}finally{clearTimeout(I)}let z=L.digest("hex");if(z!==A)throw await T(w,{force:!0}),new Error(`Computer Use: checksum mismatch for ${p.asset} (expected ${A.slice(0,12)}\u2026, got ${z.slice(0,12)}\u2026).`);let _=M(e.home,r),v=`${_}.staging`;await T(v,{recursive:!0,force:!0}),await te(v,{recursive:!0}),await $e(w,v,p.asset,e.unzipImpl),await T(w,{force:!0}),await T(_,{recursive:!0,force:!0}),await Ae(v,_);let B=u(e.home,t,o,r);if(t!=="win32"&&await De(B,493),t==="darwin"&&p.hasApp){let b=D(_,p.extractDir),ue=D(b,"CuaDriver.app");await je(b),await Me(ue)}return s?.("Computer Use driver ready."),B}var Ne="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister";async function Me(e){try{let{execFile:t}=await import("node:child_process"),{promisify:o}=await import("node:util");await o(t)(Ne,["-f",e],{timeout:15e3})}catch{}}function oe(e){return D(Oe(),"matilda-computer-use-dl",Buffer.from(e).toString("hex").slice(0,8))}async function je(e){try{let{execFile:t}=await import("node:child_process"),{promisify:o}=await import("node:util");await o(t)("xattr",["-dr","com.apple.quarantine",e],{timeout:1e4})}catch{}}async function $e(e,t,o,r){o.endsWith(".zip")?await(r??We)(e,t):await V({file:e,cwd:t})}async function We(e,t){let{execFile:o}=await import("node:child_process"),{promisify:r}=await import("node:util"),i=r(o),n=`Expand-Archive -LiteralPath ${ie(e)} -DestinationPath ${ie(t)} -Force`,s=[{cmd:"tar",args:["-xf",e,"-C",t]},{cmd:"tar",args:["--force-local","-xf",e,"-C",t]},{cmd:"powershell",args:["-NoProfile","-NonInteractive","-Command",n]}],a=[];for(let{cmd:p,args:c}of s)try{await i(p,c,{timeout:18e4});return}catch(m){a.push(`${p} ${c[0]}: ${Fe(m)}`)}throw new Error(`Computer Use: failed to unzip ${e} on Windows (${a.join("; ")}).`)}function ie(e){return`'${e.replace(/'/g,"''")}'`}function Fe(e){return e instanceof Error?e.message:String(e)}var Ge=qe(Le);function Xe(e){try{let t=JSON.parse(e);return typeof t.accessibility!="boolean"?"unknown":t.accessibility?t.screen_recording?"ok":"screenRecording":"accessibility"}catch{return"unknown"}}var He=()=>Be(W(),"Library","Caches","cua-driver","cua-driver.sock");function ne(){try{$("pkill",["-f","CuaDriver.app/Contents/MacOS/cua-driver serve"],{stdio:"ignore"})}catch{}try{ze(He(),{force:!0})}catch{}}async function Ke(){try{let{stdout:e}=await Ge(u(W()),["permissions","status","--json"],{timeout:1e4,env:x()});return Xe(e)}catch{return"unknown"}}function Ve(){ne();try{$("open",["-n","-g","-a","CuaDriver","--args","serve","--no-permissions-gate"],{stdio:"ignore"})}catch{}return{kill:ne}}function Je(e){let t=e==="accessibility"?"Privacy_Accessibility":"Privacy_ScreenCapture";try{$("open",[`x-apple.systempreferences:com.apple.preference.security?${t}`],{stdio:"ignore"})}catch{}}function Ye(){let e=W();return{homeDir:e,approvalKey:h(),platform:process.platform,promptInstallApproval:async t=>(process.stderr.write(`
|
|
92
92
|
[Computer Use] First-time setup
|
|
93
93
|
Driver: ${t}
|
|
94
94
|
This downloads a ~20MB signed + notarized binary into ~/.matilda/computer-use/.
|
|
95
95
|
Computer Use can click, type, and read your desktop apps in the background.
|
|
96
96
|
On macOS you'll be guided through Accessibility and Screen Recording permissions next.
|
|
97
97
|
Set MATILDA_COMPUTER_USE_AUTO_APPROVE=1 to skip this prompt.
|
|
98
|
-
`),process.env.MATILDA_COMPUTER_USE_AUTO_APPROVE==="1"),install:t=>
|
|
98
|
+
`),process.env.MATILDA_COMPUTER_USE_AUTO_APPROVE==="1"),install:t=>se({home:e,onProgress:t}),startStatusDaemon:Ve,probePermissions:Ke,openPermissionPane:Je}}async function ae(e,t,o){let r={...Ye(),...o},i=r.pollIntervalMs??5e3,n=r.pollTimeoutMs??10*6e4;if(e.isStarted())return;if(!await k(r.homeDir,r.approvalKey)){if(t.autoApproveInstall)t.updateOutput?.("Computer Use install auto-approved (approval mode).");else if(t.updateOutput?.("Computer Use needs a one-time driver download (first use)."),!await r.promptInstallApproval(r.approvalKey))throw new Error("Computer Use install declined by user. Re-invoke the tool to be prompted again.");await P(r.homeDir,{approvedPackageSpec:r.approvalKey,approvedAtIso:new Date().toISOString()})}await r.install(t.updateOutput),r.platform==="darwin"&&await Qe(r,t,i,n),await e.start(t.updateOutput)}async function Qe(e,t,o,r){let i=e.startStatusDaemon(),n=!1,s=!1;try{let a=Date.now();for(;;){if(t.signal.aborted)throw new Error("Computer Use bootstrap aborted.");if(Date.now()-a>r)throw new Error(`Computer Use permission grant timed out after ${Math.round(r/1e3)}s. Re-invoke the tool to retry.`);await Ze(o);let p=await e.probePermissions();if(p==="ok")return;if(p==="unknown"){i.kill(),i=e.startStatusDaemon();let c=Math.round((Date.now()-a)/1e3);t.updateOutput?.(`Bringing up Computer Use permissions check\u2026 (${c}s)`);continue}if(p==="accessibility"){if(!n)n=!0,e.openPermissionPane("accessibility"),t.updateOutput?.("Step 1/2 \u2014 In the System Settings window that opened (Privacy & Security \u2192 Accessibility), turn ON CuaDriver. This continues automatically.");else{let c=Math.round((Date.now()-a)/1e3);t.updateOutput?.(`Waiting for Accessibility\u2026 (${c}s) \u2014 enable CuaDriver in System Settings.`)}continue}if(!s)s=!0,e.openPermissionPane("screenRecording"),t.updateOutput?.("Step 2/2 \u2014 Accessibility granted. Now in System Settings (Privacy & Security \u2192 Screen & System Audio Recording), turn ON CuaDriver. macOS will ask to restart CuaDriver \u2014 allow it; that is expected. This continues automatically.");else{let c=Math.round((Date.now()-a)/1e3);t.updateOutput?.(`Waiting for Screen Recording\u2026 (${c}s) \u2014 enable CuaDriver in System Settings.`)}}}finally{i.kill()}}var Ze=e=>new Promise(t=>setTimeout(t,e));import{homedir as pe}from"node:os";var et="This downloads the Computer Use driver (~20MB, signed + notarized) into ~/.matilda/computer-use/ the first time. Computer Use can click, type, and read your desktop apps in the background. On macOS you'll be guided through Accessibility / Screen Recording permissions next.",de=new Set(["kill_app","launch_app","start_recording","set_config","replay_trajectory"]),tt=new Set(["execute_javascript","enable_javascript_apple_events"]);for(let e of de)if(!(e in g))throw new Error(`HIGH_RISK_TOOLS contains unknown tool: ${e}`);function rt(e,t){return de.has(e)?!0:e==="page"&&tt.has(t.action)}var F=class extends G{constructor(o,r,i){super(r);this.upstreamName=o;this.config=i}getDescription(){return S(this.params)}async getDefaultPermission(){return"ask"}async getConfirmationDetails(o){let r=[`computer_use__${this.upstreamName}`],i=await k(pe(),h()),n=async(p,c)=>{p!=="cancel"&&await P(pe(),{approvedPackageSpec:h(),approvedAtIso:new Date().toISOString()})};if(rt(this.upstreamName,this.params))return{type:"mcp",title:i?`Allow high-risk Computer Use (${this.upstreamName})`:`Allow high-risk Computer Use (${this.upstreamName}) \u2014 first use also downloads the driver`,serverName:"cua-driver",toolName:this.upstreamName,toolDisplayName:`computer_use__${this.upstreamName}`,permissionRules:r,onConfirm:n};let s=S(this.params),a=i?`Tool: computer_use__${this.upstreamName}
|
|
99
99
|
|
|
100
100
|
Args: ${s}
|
|
101
101
|
|
|
@@ -103,9 +103,9 @@ This will act on your desktop via the Computer Use binary.`:`Tool: computer_use_
|
|
|
103
103
|
|
|
104
104
|
Args: ${s}
|
|
105
105
|
|
|
106
|
-
${
|
|
107
|
-
`)}function
|
|
108
|
-
`)}function
|
|
106
|
+
${et}`;return{type:"info",title:`Allow Computer Use (${this.upstreamName})`,prompt:a,permissionRules:r,onConfirm:n}}async execute(o,r){let i=f.shared();i.setMaxImageDimension(Q(this.config?.getComputerUseMaxImageDimension()));let n=!!this.config;await ae(i,{signal:o,updateOutput:r,autoApproveInstall:n});let s;try{s=await i.callTool(this.upstreamName,this.params)}catch(c){let m=c instanceof Error?c.message:String(c);return{llmContent:`Computer Use tool '${this.upstreamName}' failed: ${m}`,returnDisplay:`Error: ${m}`,error:{message:m}}}let a=ot(s.content,this.upstreamName,s.structuredContent),p=it(s.content);if(s.isError){let c=p||`Tool '${this.upstreamName}' returned isError=true`;return{llmContent:a||c,returnDisplay:c,error:{message:c}}}return{llmContent:a,returnDisplay:p}}},y=class extends X{constructor(o,r,i){let n=`computer_use__${o}`;super(n,n,r.description,"other",r.parameterSchema,!0,!0,!0,!1,"computer use desktop click type screenshot mouse keyboard scroll drag automation gui app native");this.upstreamName=o;this.config=i}validateToolParams(o){let r=ce(o,this.parameterSchema);return super.validateToolParams(r)}build(o){let r=ce(o,this.parameterSchema);return super.build(r)}createInvocation(o){return new F(this.upstreamName,o,this.config)}};function ce(e,t){let o=t.properties;if(!o)return e;let r={...e};for(let[i,n]of Object.entries(r)){let s=o[i]?.type;if((s==="integer"||s==="number")&&typeof n=="string"){let a=n.trim();if(/^-?\d+(\.\d+)?$/.test(a)){let p=s==="integer"?parseInt(a,10):parseFloat(a);Number.isFinite(p)&&(r[i]=p)}}else s==="string"&&typeof n=="number"&&(r[i]=String(n))}return r}function ot(e,t,o){let r=[];for(let s of e)s.type==="text"&&s.text?r.push({text:s.text}):(s.type==="image"||s.type==="audio")&&s.mimeType&&s.data&&(r.push({text:`[Tool '${t}' provided the following ${s.type} data with mime-type: ${s.mimeType}]`}),r.push({inlineData:{mimeType:s.mimeType,data:s.data}}));let i=st(o);return i&&r.push({text:`Structured result: ${i}`}),r.some(s=>s.inlineData!==void 0)?r:r.map(s=>s.text??"").filter(Boolean).join(`
|
|
107
|
+
`)}function it(e){return e.map(t=>t.type==="text"?t.text??"":"").filter(Boolean).join(`
|
|
108
|
+
`)}function st(e){if(!e||typeof e!="object")return;let t={};for(let[o,r]of Object.entries(e))o!=="tree_markdown"&&(t[o]=r);if(Object.keys(t).length!==0)return S(t)}async function ar(e,t){for(let o of j){let r=g[o],i=`computer_use__${o}`;await e(i,async()=>new y(o,r,t))}}export{g as COMPUTER_USE_SCHEMAS,j as COMPUTER_USE_TOOL_NAMES,f as ComputerUseClient,y as ComputerUseTool,ar as registerComputerUseTools};
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2025 Matilda Team
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import{c as a,d as b,e as c}from"./chunk-H44J3WCU.js";import"./chunk-O3X6OM5U.js";import"./chunk-6OM7PU5M.js";import"./chunk-M53RP3YP.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-NYEWHSBL.js";import"./chunk-QN6WSWMM.js";import"./chunk-2HQMJ2IU.js";import"./chunk-W5CGKUM4.js";import"./chunk-TISQNFB5.js";import"./chunk-MTMU7JYZ.js";import"./chunk-SPW5DXX4.js";import"./chunk-RNKDFE2S.js";import"./chunk-GHBKFIHC.js";import"./chunk-5427BPR2.js";import"./chunk-47XR7IMP.js";import"./chunk-FFFZ2QMG.js";import"./chunk-SNLH42QJ.js";import"./chunk-HYVP4472.js";import"./chunk-QKYGQLWC.js";import"./chunk-QH7736R5.js";import"./chunk-4CSSDBOS.js";import"./chunk-JXUDKX6D.js";import"./chunk-7Y4YWLWT.js";import"./chunk-GUFIMKF5.js";import"./chunk-46MIUE6Z.js";import"./chunk-DC7LAFZZ.js";import"./chunk-4F4DA5UI.js";import"./chunk-SUH3UUWZ.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import"./chunk-25NCTG5H.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-ELH4YHJR.js";import"./chunk-WHG6N5X2.js";import"./chunk-T4P4KEDW.js";import"./chunk-HWOQNYAO.js";import"./chunk-XCFLI3OC.js";import"./chunk-VI74YQQO.js";import"./chunk-3YLXGE6T.js";import"./chunk-GO2GA2GY.js";import"./chunk-MH2P4YXC.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as collectContextData,c as contextCommand,b as formatContextUsageText};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as p,c as f}from"./chunk-TXMXCR7D.js";import{a as y}from"./chunk-YULUB745.js";import{a as n}from"./chunk-
|
|
3
|
+
import{a as p,c as f}from"./chunk-TXMXCR7D.js";import{a as y}from"./chunk-YULUB745.js";import{a as n}from"./chunk-NYEWHSBL.js";import"./chunk-TISQNFB5.js";import{g as m,i as c,p as d,q as h}from"./chunk-T4P4KEDW.js";import"./chunk-GO2GA2GY.js";import"./chunk-MH2P4YXC.js";import"./chunk-FWDMPRKU.js";import{b as u}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";u();var i=class extends m{constructor(e,t){super(t);this.config=e}getDescription(){return`${this.params.cron}: ${this.params.prompt}`}async getDefaultPermission(){return"ask"}async execute(){let e=this.config.getCronScheduler(),t=this.params.recurring!==!1,s=this.params.durable===!0;try{p(this.params.cron),f(this.params.cron,new Date);let r=s?await e.createDurable(this.params.cron,this.params.prompt,t):e.create(this.params.cron,this.params.prompt,t),o=y(r.cronExpr),w=`Scheduled ${r.id} (${o})${s?" [durable]":""}`,l=s?`Persisted to ${n}`:"Session-only (not written to disk, dies when Matilda exits)";return{llmContent:t?`Scheduled recurring job ${r.id} (${r.cronExpr}). ${l}. Auto-expires after 7 days. Use CronDelete to cancel sooner.`:`Scheduled one-shot task ${r.id} (${r.cronExpr}). ${l}. It will fire once then auto-delete.`,returnDisplay:w}}catch(r){let o=r instanceof Error?r.message:String(r);return{llmContent:`Error creating cron job: ${o}`,returnDisplay:o,error:{message:o}}}}},g=class a extends c{constructor(e){super(a.Name,h.CRON_CREATE,`Schedule a prompt to be enqueued at a future time. Use for both recurring schedules and one-shot reminders.
|
|
4
4
|
|
|
5
5
|
Uses standard 5-field cron in the user's local timezone: minute hour day-of-month month day-of-week. "0 9 * * *" means 9am local \u2014 no timezone conversion needed.
|
|
6
6
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as d,f as u}from"./chunk-
|
|
3
|
+
import{a as d,f as u}from"./chunk-NYEWHSBL.js";import"./chunk-TISQNFB5.js";import{g as l,i as c,p as m,q as p}from"./chunk-T4P4KEDW.js";import"./chunk-GO2GA2GY.js";import{d as n}from"./chunk-MH2P4YXC.js";import"./chunk-FWDMPRKU.js";import{b as i}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";i();var s=class extends l{constructor(r,o){super(o);this.config=r}getDescription(){return this.params.id}async execute(){let r=this.config.getCronScheduler(),o;try{o=await r.delete(this.params.id),o||(o=await u(this.config.getProjectRoot(),[this.params.id])>0)}catch(e){let t=`Failed to cancel job ${this.params.id}: ${n(e)}`;return{llmContent:t,returnDisplay:t,error:{message:t}}}if(o){let e=`Cancelled job ${this.params.id}.`,t=`Cancelled ${this.params.id}`;return{llmContent:e,returnDisplay:t}}else{let e=`Job ${this.params.id} not found.`;return{llmContent:e,returnDisplay:e,error:{message:e}}}}},f=class a extends c{constructor(r){super(a.Name,p.CRON_DELETE,`Cancel a cron job previously scheduled with CronCreate. Removes it from the in-memory session store or from ${d} (durable jobs).`,"other",{type:"object",properties:{id:{type:"string",description:"Job ID returned by CronCreate."}},required:["id"],additionalProperties:!1},!0,!1,!0,!1,"cron delete cancel remove");this.config=r}static Name=m.CRON_DELETE;createInvocation(r){return new s(this.config,r)}};export{f as CronDeleteTool};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{a as m}from"./chunk-YULUB745.js";import{a as d,c as g}from"./chunk-
|
|
3
|
+
import{a as m}from"./chunk-YULUB745.js";import{a as d,c as g}from"./chunk-NYEWHSBL.js";import"./chunk-TISQNFB5.js";import{g as l,i as c,p,q as u}from"./chunk-T4P4KEDW.js";import"./chunk-GO2GA2GY.js";import"./chunk-MH2P4YXC.js";import"./chunk-FWDMPRKU.js";import{b as a}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";a();var s=class extends l{constructor(e,t){super(t);this.config=e}getDescription(){return""}async execute(){let e=this.config.getCronScheduler(),t;try{t=await g(this.config.getProjectRoot())}catch(r){let o=r instanceof Error?r.message:String(r);return{llmContent:`Error listing cron jobs: ${o}`,returnDisplay:o,error:{message:o}}}let n=[...t.map(r=>({id:r.id,cron:r.cron,prompt:r.prompt,recurring:r.recurring,durable:!0})),...e.list().filter(r=>!r.durable).map(r=>({id:r.id,cron:r.cronExpr,prompt:r.prompt,recurring:r.recurring,durable:!1}))];if(n.length===0){let r="No active cron jobs.";return{llmContent:r,returnDisplay:r}}let y=n.map(r=>{let o=r.recurring?"recurring":"one-shot",h=r.durable?"durable":"session-only";return`${r.id} \u2014 ${r.cron} (${o}) [${h}]: ${r.prompt}`}).join(`
|
|
4
4
|
`),T=n.map(r=>`${r.id} ${m(r.cron)} [${r.durable?"durable":"session-only"}]`).join(`
|
|
5
5
|
`);return{llmContent:y,returnDisplay:T}}},f=class i extends c{constructor(e){super(i.Name,u.CRON_LIST,`List all cron jobs scheduled via CronCreate, both session-only and durable (${d}).`,"other",{type:"object",properties:{},additionalProperties:!1},!0,!1,!0,!1,"cron list scheduled jobs");this.config=e}static Name=p.CRON_LIST;createInvocation(e){return new s(this.config,e)}};export{f as CronListTool};
|