@maincode-ai/matilda-code 0.22.1 → 0.22.2-nightly.20261107.317646b99
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/README.md +1 -1
- package/chunks/agent-CUHHPELW.js +3 -0
- package/chunks/agent-headless-P2DULOWS.js +3 -0
- package/chunks/{askUserQuestion-A46IDHKS.js → askUserQuestion-DHYKAZWH.js} +1 -1
- package/chunks/ca-3NRDXS7D.js +23 -0
- package/chunks/chunk-355M6IU5.js +80 -0
- package/chunks/chunk-3TTI3ZQT.js +56 -0
- package/chunks/{chunk-CI5CVVGI.js → chunk-42UM7T4B.js} +53 -53
- package/chunks/{chunk-6RK6IJY5.js → chunk-46FFWNRO.js} +1 -1
- package/chunks/chunk-55YW6EUC.js +8 -0
- package/chunks/chunk-BQDEPKIG.js +46 -0
- package/chunks/{chunk-LONWTJOE.js → chunk-BS7Q7KA6.js} +8 -8
- package/chunks/chunk-DZKI2CAC.js +3 -0
- package/chunks/{chunk-TDFF4ZGY.js → chunk-E2KMVG7F.js} +1 -1
- package/chunks/chunk-ECXO253T.js +2580 -0
- package/chunks/chunk-FPGKJJJY.js +13 -0
- package/chunks/chunk-FY3LL4OC.js +8 -0
- package/chunks/chunk-HJK3NKAR.js +8 -0
- package/chunks/{chunk-ZABAV4XA.js → chunk-HRD7WD3P.js} +3 -3
- package/chunks/{chunk-GCMUSGTT.js → chunk-L2FKLLEC.js} +1 -1
- package/chunks/chunk-MZ73LBEY.js +9 -0
- package/chunks/chunk-N2BE647T.js +10 -0
- package/chunks/chunk-O2WOUWDJ.js +121 -0
- package/chunks/{chunk-UICLGQTV.js → chunk-OWEBLTAN.js} +1 -1
- package/chunks/{chunk-KYNP66YS.js → chunk-P24OL22U.js} +8 -8
- package/chunks/chunk-PFXCFIHY.js +8 -0
- package/chunks/{chunk-FI2FSW7J.js → chunk-VWM3GUBH.js} +1 -1
- package/chunks/chunk-WL27X35X.js +44 -0
- package/chunks/chunk-ZUQRP3N6.js +9 -0
- package/chunks/{computer-use-V2DT2IKO.js → computer-use-DIGHVJ7N.js} +7 -7
- package/chunks/{cron-create-JINCFLKY.js → cron-create-5RRFCP36.js} +1 -1
- package/chunks/{cron-delete-RF6JLUAV.js → cron-delete-7DTRWCSV.js} +1 -1
- package/chunks/{cron-list-VXLBAXZ3.js → cron-list-HY6XJD7D.js} +1 -1
- package/chunks/de-MINTIKBC.js +23 -0
- package/chunks/{edit-ZB4SONLT.js → edit-IVOZQDG7.js} +17 -17
- package/chunks/en-V4AM2EKE.js +23 -0
- package/chunks/{enter-worktree-CAFTW46C.js → enter-worktree-LQKNE24C.js} +1 -1
- package/chunks/{enterPlanMode-XSNXJJMC.js → enterPlanMode-AMKRMA4Q.js} +1 -1
- package/chunks/{exit-worktree-U37YLKJC.js → exit-worktree-353X52E6.js} +1 -1
- package/chunks/{exitPlanMode-XKAZCVAV.js → exitPlanMode-FA7FBOPZ.js} +1 -1
- package/chunks/fr-XRDTBTRU.js +23 -0
- package/chunks/{glob-LPIFPVGX.js → glob-OLQLERJP.js} +1 -1
- package/chunks/{goal-tools-VAH424PW.js → goal-tools-POD6LCKM.js} +1 -1
- package/chunks/grep-WCOSLJAC.js +22 -0
- package/chunks/ja-OYFHC7MP.js +23 -0
- package/chunks/{keychain-token-storage-UTWIIKCK.js → keychain-token-storage-BCODB632.js} +1 -1
- package/chunks/ls-JORGCXES.js +15 -0
- package/chunks/{lsp-H4EXPHFD.js → lsp-Y46R5DO5.js} +1 -1
- package/chunks/mcp-client-UUQFLTQ2.js +3 -0
- package/chunks/monitor-S7LII2PV.js +32 -0
- package/chunks/notebook-edit-R35SRELR.js +17 -0
- package/chunks/openaiContentGenerator-7UTX34FH.js +52 -0
- package/chunks/pt-6DJAKXHE.js +23 -0
- package/chunks/read-file-UNA4JSSL.js +3 -0
- package/chunks/ripGrep-LSOMEB27.js +3 -0
- package/chunks/ru-4UMYCMY6.js +23 -0
- package/chunks/scheduler-BCZEO32E.js +8 -0
- package/chunks/{send-message-5XHDGHSN.js → send-message-VY4DP63A.js} +1 -1
- package/chunks/shell-BXOPTHWD.js +3 -0
- package/chunks/{skill-FCVSGCSN.js → skill-3RC6M3O5.js} +4 -4
- package/chunks/symbol-search-YNGX4Z5T.js +19 -0
- package/chunks/{syntheticOutput-OIPRFBVD.js → syntheticOutput-4JANVS4D.js} +1 -1
- package/chunks/{task-create-QP44DKH4.js → task-create-NRBVXURQ.js} +1 -1
- package/chunks/{task-detach-AUTU6C4G.js → task-detach-VHDDAO2K.js} +1 -1
- package/chunks/{task-list-U2WAGMM7.js → task-list-T2IET466.js} +1 -1
- package/chunks/{task-stop-GN5WZ3IA.js → task-stop-OEAEE5R7.js} +1 -1
- package/chunks/{task-update-26N2AUQT.js → task-update-4ANRU74G.js} +1 -1
- package/chunks/{team-create-TN2KN27J.js → team-create-RUBIKSDJ.js} +1 -1
- package/chunks/team-delete-M4ORNSTT.js +8 -0
- package/chunks/{todoWrite-JN3ZV5O2.js → todoWrite-RN2OP46T.js} +1 -1
- package/chunks/{tool-search-VPMEQKAS.js → tool-search-O2ZT6LK7.js} +1 -1
- package/chunks/{web-fetch-CVAOVOZM.js → web-fetch-VA2BZ4VR.js} +1 -1
- package/chunks/{web-search-77CUPTFY.js → web-search-TZUX7I6D.js} +3 -5
- package/chunks/{workflow-JNZRGHJ4.js → workflow-7YOFJC77.js} +2 -2
- package/chunks/write-file-NK4IW2I5.js +15 -0
- package/cli.js +473 -451
- package/locales/ca.js +6 -3
- package/locales/de.js +6 -3
- package/locales/en.js +35 -3
- package/locales/fr.js +6 -3
- package/locales/ja.js +6 -3
- package/locales/pt.js +6 -3
- package/locales/ru.js +6 -3
- package/npm-postinstall.js +1 -1
- package/package.json +2 -2
- package/chunks/agent-JDATO222.js +0 -3
- package/chunks/agent-headless-ZOFNY4CF.js +0 -3
- package/chunks/ca-JKEHLTNL.js +0 -23
- package/chunks/chunk-2LVAK6TV.js +0 -80
- package/chunks/chunk-5JCW6FH6.js +0 -8
- package/chunks/chunk-7AEOFDY3.js +0 -8
- package/chunks/chunk-AEYNMLMW.js +0 -36
- package/chunks/chunk-DEN6RR3B.js +0 -3
- package/chunks/chunk-DUB7JMQV.js +0 -13
- package/chunks/chunk-HRCRNKY2.js +0 -8
- package/chunks/chunk-IV6PS6DB.js +0 -8
- package/chunks/chunk-QNXNECWR.js +0 -2602
- package/chunks/chunk-RH3AEZWO.js +0 -9
- package/chunks/chunk-SMTY6M3W.js +0 -10
- package/chunks/chunk-TKEFJ3O3.js +0 -9
- package/chunks/chunk-V2V3OF76.js +0 -56
- package/chunks/chunk-Y3SZK63U.js +0 -120
- package/chunks/chunk-ZSGBDQXU.js +0 -11
- package/chunks/de-GMGNR5CZ.js +0 -23
- package/chunks/en-3NQMLVKW.js +0 -23
- package/chunks/fr-WS3EBB36.js +0 -23
- package/chunks/grep-IF4GTD5A.js +0 -22
- package/chunks/ja-GBCDQ43R.js +0 -23
- package/chunks/ls-3EEHZY4W.js +0 -15
- package/chunks/mcp-client-EUPXG3VF.js +0 -3
- package/chunks/monitor-KBWRPPZ5.js +0 -32
- package/chunks/notebook-edit-K3KNR6DI.js +0 -17
- package/chunks/openaiContentGenerator-2NF5JGUC.js +0 -47
- package/chunks/pt-VID6J2CM.js +0 -23
- package/chunks/read-file-SRDZKBNS.js +0 -3
- package/chunks/ripGrep-675JNT4W.js +0 -3
- package/chunks/ru-EB6V6EAN.js +0 -23
- package/chunks/scheduler-O36AJTWS.js +0 -8
- package/chunks/shell-A7NRVDCY.js +0 -3
- package/chunks/symbol-search-ZM3HFCUV.js +0 -19
- package/chunks/team-delete-XCKD5FBZ.js +0 -8
- package/chunks/write-file-FJCU2PYT.js +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{
|
|
3
|
+
import{h as P,r as R}from"./chunk-MZ73LBEY.js";import{a as C}from"./chunk-PFXCFIHY.js";import{f as O,g as S,m as A,n as W}from"./chunk-P24OL22U.js";import{P as T,ea as I}from"./chunk-WL27X35X.js";import{b as E}from"./chunk-GZPNIYVZ.js";E();import*as h from"fs/promises";import*as f from"fs";import*as u from"path";var D=I("TODO_WRITE");function U(o){return new P(o.finalOutput).isBlockingDecision()}var q={name:"todo_write",description:"Creates and manages a structured task list for your current coding session. This helps track progress, organize complex tasks, and demonstrate thoroughness.",parametersJsonSchema:{type:"object",properties:{todos:{type:"array",items:{type:"object",properties:{content:{type:"string",minLength:1},status:{type:"string",enum:["pending","in_progress","completed"]},id:{type:"string"}},required:["content","status","id"],additionalProperties:!1},description:"The updated todo list"}},required:["todos"],$schema:"http://json-schema.org/draft-07/schema#"}},H=`
|
|
4
4
|
Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user.
|
|
5
5
|
It also helps the user understand the progress of the task and overall progress of their requests.
|
|
6
6
|
|
|
@@ -182,15 +182,15 @@ When new information changes your understanding of the task, update the todo str
|
|
|
182
182
|
- Use clear, descriptive task names
|
|
183
183
|
|
|
184
184
|
When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
|
|
185
|
-
`,
|
|
185
|
+
`,L="todos";function y(o){let t=u.join(T.getRuntimeBaseDir(),L),e=`${o||"default"}.json`;return u.join(t,e)}async function $(o){try{let t=y(o),e=await h.readFile(t,"utf-8"),r=JSON.parse(e);return Array.isArray(r.todos)?r.todos:[]}catch(t){let e=t;if(!(e instanceof Error)||e.code!=="ENOENT")throw t;return[]}}async function B(o,t){let e=y(t),r=u.dirname(e);await h.mkdir(r,{recursive:!0}),await C(e,JSON.stringify({todos:o,sessionId:t||"default"},null,2),{encoding:"utf-8"})}function N(o,t){return{llmContent:`${o}
|
|
186
186
|
|
|
187
187
|
<system-reminder>
|
|
188
188
|
${t}
|
|
189
|
-
</system-reminder>`,returnDisplay:
|
|
189
|
+
</system-reminder>`,returnDisplay:o}}var w=class extends O{constructor(e,r,l="update"){super(r);this.config=e;this.operationType=l}operationType;getDescription(){return this.operationType==="create"?"Create todos":"Update todos"}async execute(e){let{todos:r,modified_by_user:l,modified_content:i}=this.params,b=this.config.getSessionId();try{let m=await $(b),n;if(l&&i!==void 0){let s=JSON.parse(i);n=Array.isArray(s.todos)?s.todos:[]}else n=r;let d=R(m,n),v=new Map(m.map(s=>[s.id,s])),c=this.config.getHookSystem();if(c&&d.created.length>0){let p=(await Promise.all(d.created.map(a=>c.fireTodoCreatedEvent(a.id,a.content,a.status,n,"validation",e)))).find(U);if(p?.finalOutput){let a=p.finalOutput.reason||"Hook blocked todo creation";return N(`Todo creation blocked: ${a}`,`Todo list was not modified because a TodoCreated hook blocked the operation: ${a}`)}}if(c&&d.completed.length>0){let p=(await Promise.all(d.completed.map(a=>{let z=v.get(a.id)?.status??"pending";return c.fireTodoCompletedEvent(a.id,a.content,z,n,"validation",e)}))).find(U);if(p?.finalOutput){let a=p.finalOutput.reason||"Hook blocked todo completion";return N(`Todo completion blocked: ${a}`,`Todo list was not modified because a TodoCompleted hook blocked the operation: ${a}`)}}await B(n,b);let g;try{c&&d.created.length>0&&await Promise.all(d.created.map(s=>c.fireTodoCreatedEvent(s.id,s.content,s.status,n,"postWrite",e))),c&&d.completed.length>0&&await Promise.all(d.completed.map(s=>{let a=v.get(s.id)?.status??"pending";return c.fireTodoCompletedEvent(s.id,s.content,a,n,"postWrite",e)}))}catch(s){g=s instanceof Error?s:new Error(String(s)),D.error(`[TodoWriteTool] Post-write hooks failed after todos were persisted: ${g.message}`)}let _={type:"todo_list",todos:n,changes:d},j=JSON.stringify(n),k,x=g?`
|
|
190
190
|
|
|
191
191
|
<system-reminder>
|
|
192
192
|
Todos were persisted successfully, but post-write hooks failed with error: ${g.message}. Do not tell the user the write failed; only handle any follow-up hook issues if needed.
|
|
193
|
-
</system-reminder>`:"";return
|
|
193
|
+
</system-reminder>`:"";return n.length===0?k=`Todo list has been cleared.
|
|
194
194
|
|
|
195
195
|
<system-reminder>
|
|
196
196
|
Your todo list is now empty. DO NOT mention this explicitly to the user. You have no pending tasks in your todo list.
|
|
@@ -199,12 +199,12 @@ Your todo list is now empty. DO NOT mention this explicitly to the user. You hav
|
|
|
199
199
|
<system-reminder>
|
|
200
200
|
Your todo list has changed. DO NOT mention this explicitly to the user. Here are the latest contents of your todo list:
|
|
201
201
|
|
|
202
|
-
${
|
|
203
|
-
</system-reminder>${x}`,{llmContent:k,returnDisplay:
|
|
202
|
+
${j}. Continue on with the tasks at hand if applicable.
|
|
203
|
+
</system-reminder>${x}`,{llmContent:k,returnDisplay:_}}catch(m){let n=m instanceof Error?m.message:String(m);return D.error(`[TodoWriteTool] Error executing todo_write: ${n}`),{llmContent:`Failed to modify todos. An error occurred during the operation.
|
|
204
204
|
|
|
205
205
|
<system-reminder>
|
|
206
|
-
Todo list modification failed with error: ${
|
|
207
|
-
</system-reminder>`,returnDisplay:`Error writing todos: ${
|
|
206
|
+
Todo list modification failed with error: ${n}. You may need to retry or handle this error appropriately.
|
|
207
|
+
</system-reminder>`,returnDisplay:`Error writing todos: ${n}`}}}};function ee(o){try{let t=JSON.parse(f.readFileSync(y(o),"utf-8"));return Array.isArray(t.todos)?t.todos:[]}catch(t){let e=t;if(!(e instanceof Error)||e.code!=="ENOENT")throw t;return[]}}async function te(){try{let o=u.join(T.getRuntimeBaseDir(),L);return(await h.readdir(o)).filter(e=>e.endsWith(".json")).map(e=>e.replace(".json",""))}catch(o){let t=o;if(!(t instanceof Error)||t.code!=="ENOENT")throw o;return[]}}var F=class o extends S{constructor(e){super(o.Name,W.TODO_WRITE,H,"think",q.parametersJsonSchema);this.config=e}static Name=A.TODO_WRITE;validateToolParams(e){if(!Array.isArray(e.todos))return'Parameter "todos" must be an array.';for(let i of e.todos){if(!i.id||typeof i.id!="string"||i.id.trim()==="")return'Each todo must have a non-empty "id" string.';if(!i.content||typeof i.content!="string"||i.content.trim()==="")return'Each todo must have a non-empty "content" string.';if(!["pending","in_progress","completed"].includes(i.status))return'Each todo must have a valid "status" (pending, in_progress, completed).'}let r=e.todos.map(i=>i.id),l=new Set(r);return r.length!==l.size?"Todo IDs must be unique within the array.":null}createInvocation(e){let r=this.config.getSessionId(),l=y(r),i=f.existsSync(l)?"update":"create";return new w(this.config,e,i)}};export{ee as a,te as b,F as c};
|
|
208
208
|
/**
|
|
209
209
|
* @license
|
|
210
210
|
* Copyright 2025 Google LLC
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import{a as f}from"./chunk-GT6MSEK4.js";import{b as g}from"./chunk-PFXCFIHY.js";import{H as d,P as m,ea as p}from"./chunk-WL27X35X.js";import{b as u}from"./chunk-GZPNIYVZ.js";u();import*as a from"node:fs/promises";import*as s from"node:path";var x=p("CRON_TASKS_FILE"),T="scheduled_tasks.json",L=`~/.matilda/tmp/<project-hash>/${T}`,E=15,w=2e3,b=3e3,P=0,h=new Map;function C(e){let t=h.get(e);return t||(t=new f,h.set(e,t)),t}function c(e){return s.join(m.getGlobalTempDir(),d(e),T)}async function k(e){let t=c(e),i;try{i=await a.readFile(t,"utf-8")}catch(o){if(o.code==="ENOENT")return[];throw o}let r;try{r=JSON.parse(i)}catch{throw new Error(`Malformed JSON in ${t} \u2014 fix or delete the file; refusing to treat it as an empty schedule.`)}if(!Array.isArray(r))throw new Error(`Expected a JSON array in ${t} \u2014 fix or delete the file; refusing to treat it as an empty schedule.`);let n=r.filter(A);return n.length!==r.length&&x.warn(`Dropped ${r.length-n.length} invalid task entr${r.length-n.length===1?"y":"ies"} from ${t}; a later write will persist without ${r.length-n.length===1?"it":"them"}.`),n}async function D(e,t){let i=c(e);await a.mkdir(s.dirname(i),{recursive:!0}),await g(i,t,{noFollow:!0})}async function _(e){let t=`${e}.lock`;await a.mkdir(s.dirname(t),{recursive:!0});let i=Date.now()+b;for(;;){if(Date.now()>i)throw new Error(`Timed out waiting for scheduled-tasks lock (${t})`);try{return await a.writeFile(t,String(process.pid),{flag:"wx"}),async()=>{await a.unlink(t).catch(()=>{})}}catch(r){if(r.code!=="EEXIST")throw r}try{let r=await a.stat(t);if(Date.now()-r.mtimeMs>w){let n=`${t}.stale.${process.pid}.${P++}`;try{await a.rename(t,n)}catch{continue}let o=await a.stat(n).catch(()=>null);o&&Date.now()-o.mtimeMs<=w&&await a.link(n,t).catch(()=>{}),await a.unlink(n).catch(()=>{});continue}}catch{continue}await new Promise(r=>setTimeout(r,E))}}async function y(e,t){let i=c(e);return C(i).runExclusive(async()=>{let r=await _(i);try{let n=await k(e),o=t(n);o!==n&&await D(e,o)}finally{await r()}})}async function F(e,t){await y(e,i=>[...i,t])}async function J(e,t){let i=new Set(t);if(!(await k(e)).some(o=>i.has(o.id)))return 0;let n=0;return await y(e,o=>{let l=o.filter(S=>!i.has(S.id));return n=o.length-l.length,n===0?o:l}),n}function A(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.id=="string"&&typeof t.cron=="string"&&typeof t.prompt=="string"&&typeof t.recurring=="boolean"&&typeof t.createdAt=="number"&&(t.lastFiredAt===null||typeof t.lastFiredAt=="number")}export{L as a,c as b,k as c,y as d,F as e,J as f};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{l as i}from"./chunk-
|
|
3
|
+
import{l as i}from"./chunk-HJK3NKAR.js";import{b as o}from"./chunk-GZPNIYVZ.js";o();import l from"node:path";function d(t,n){if(t.getApprovalMode()!=="bogan")return null;let r=l.resolve(n),s=t.getProjectRoot?.()??t.getTargetDir();if(i(r,s))return null;let e=t.getWorkspaceContext?.();if(!e||(typeof e.isPathWithinWorkspaceFresh=="function"?e.isPathWithinWorkspaceFresh(r):e.isPathWithinWorkspace(r)))return null;let a=e.getDirectories?.()??[t.getTargetDir()],p=t.getChannel?.()==="desktop"?"Approve the folder from Matilda Desktop, then retry the write.":"Use --include-directories to add extra roots, or a non-BOGAN approval mode for intentional external writes.";return`Refusing out-of-workspace write in BOGAN mode: ${r}. Workspace root(s): ${a.join(", ")}. This blocks path typos (e.g. writing under $HOME when the project is elsewhere). `+p}export{d as a};
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2025 Matilda Team
|