@maincode-ai/matilda-code 0.21.5 → 0.21.6-nightly.20260910.566d96d64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/chunks/agent-JCBLO7B5.js +3 -0
  2. package/chunks/agent-headless-P6ZOVAC4.js +3 -0
  3. package/chunks/{anthropicContentGenerator-EAQDRKHH.js → anthropicContentGenerator-SFJGSZHT.js} +1 -1
  4. package/chunks/{askUserQuestion-7II3GVHO.js → askUserQuestion-MJ4FTAOQ.js} +1 -1
  5. package/chunks/{chunk-VB4MJSMC.js → chunk-32PTAACU.js} +1 -1
  6. package/chunks/{chunk-OXHC3R2R.js → chunk-32T6RWWT.js} +1 -1
  7. package/chunks/{chunk-X4ML2NEE.js → chunk-5OY5RZSF.js} +1 -1
  8. package/chunks/{chunk-YTGWPLEA.js → chunk-5PMMY47S.js} +1 -1
  9. package/chunks/{chunk-BGZJUBRA.js → chunk-6B5BDE7S.js} +1 -1
  10. package/chunks/{chunk-OVC5Z3EX.js → chunk-B3NVKOSU.js} +1 -1
  11. package/chunks/{chunk-BH56I7SB.js → chunk-CG7MWHAI.js} +1 -1
  12. package/chunks/{chunk-743LSI67.js → chunk-CM3HWOOK.js} +11 -11
  13. package/chunks/chunk-EQEQPZLQ.js +8 -0
  14. package/chunks/{chunk-LNTO3FNQ.js → chunk-FRL6KOLY.js} +1 -1
  15. package/chunks/chunk-FWIVFCKF.js +8 -0
  16. package/chunks/{chunk-7LZNA4VT.js → chunk-J4OZJXSD.js} +1 -1
  17. package/chunks/{chunk-AMO6HY3T.js → chunk-KIQWWC46.js} +595 -594
  18. package/chunks/{chunk-JELJNWOF.js → chunk-KKQGIF54.js} +2 -2
  19. package/chunks/chunk-LIWYWWOK.js +8 -0
  20. package/chunks/{chunk-FQ44TPC5.js → chunk-LSDMWVW6.js} +3 -3
  21. package/chunks/chunk-LZYLZZNI.js +34 -0
  22. package/chunks/chunk-MLQWXTK6.js +34 -0
  23. package/chunks/chunk-Q2I3ARPJ.js +8 -0
  24. package/chunks/{chunk-XITA5WMN.js → chunk-QHA3ZBRO.js} +1 -1
  25. package/chunks/chunk-RJX7DK4Y.js +27 -0
  26. package/chunks/{chunk-O3OUYCSO.js → chunk-S7G6QPEP.js} +1 -1
  27. package/chunks/{chunk-46QIOR55.js → chunk-SQFBYP6N.js} +1 -1
  28. package/chunks/chunk-VLYRNOD3.js +36 -0
  29. package/chunks/chunk-VVTGOEZG.js +9 -0
  30. package/chunks/chunk-VWWEEU4V.js +9 -0
  31. package/chunks/{chunk-QZWBA3NL.js → chunk-WMPQ67GO.js} +3 -3
  32. package/chunks/chunk-XBIUAUEW.js +8 -0
  33. package/chunks/chunk-XCJYORZX.js +9 -0
  34. package/chunks/chunk-ZPQ7BBR2.js +3 -0
  35. package/chunks/{computer-use-Y37T64HM.js → computer-use-L3TVVLPW.js} +1 -1
  36. package/chunks/contextCommand-RG42M24B.js +3 -0
  37. package/chunks/{cron-create-HASFXYQL.js → cron-create-KKBZ2TLF.js} +1 -1
  38. package/chunks/{cron-delete-AW4S5IYT.js → cron-delete-PIS2HJAO.js} +1 -1
  39. package/chunks/{cron-list-U5U5GO6A.js → cron-list-STI7ZA3D.js} +1 -1
  40. package/chunks/{edit-UNGTXCQO.js → edit-DRT3G2PC.js} +1 -1
  41. package/chunks/{enter-worktree-3TAVEEPT.js → enter-worktree-CIRH2A63.js} +1 -1
  42. package/chunks/{enterPlanMode-YXMV3Y43.js → enterPlanMode-Q7KHPF7E.js} +1 -1
  43. package/chunks/{exit-worktree-NSBJWQOO.js → exit-worktree-DYLJVU2A.js} +1 -1
  44. package/chunks/{exitPlanMode-QZBHXDLX.js → exitPlanMode-S5FL2NSZ.js} +1 -1
  45. package/chunks/{geminiContentGenerator-MWV3AGI5.js → geminiContentGenerator-EEOIPEJI.js} +1 -1
  46. package/chunks/glob-NACXQ5JR.js +22 -0
  47. package/chunks/{grep-C6J3EAKZ.js → grep-BDZLAGX5.js} +1 -1
  48. package/chunks/{keychain-token-storage-5MWTIAEL.js → keychain-token-storage-HAFQQIXL.js} +1 -1
  49. package/chunks/ls-CLDNF3YS.js +15 -0
  50. package/chunks/{lsp-ELR2BGT4.js → lsp-7SKRKR5Q.js} +1 -1
  51. package/chunks/{matildaAgentContentGenerator-2E676SBT.js → matildaAgentContentGenerator-GFREHNII.js} +1 -1
  52. package/chunks/matildaContentGenerator-XZAO5ZIZ.js +8 -0
  53. package/chunks/{matildaOAuth2-5EYRIK66.js → matildaOAuth2-W2DQO2NK.js} +1 -1
  54. package/chunks/monitor-73553SNY.js +32 -0
  55. package/chunks/notebook-edit-ACVY7GLS.js +17 -0
  56. package/chunks/{openaiContentGenerator-4WFRCSV4.js → openaiContentGenerator-ZPAZTRZ3.js} +1 -1
  57. package/chunks/read-file-J5UBJYDO.js +3 -0
  58. package/chunks/ripGrep-GSG2XKMV.js +3 -0
  59. package/chunks/scheduler-RIVUK5YG.js +8 -0
  60. package/chunks/{send-message-GFPVOTSZ.js → send-message-XXRROIL7.js} +1 -1
  61. package/chunks/{serve-YVF7UBR3.js → serve-X5DL5ZWF.js} +1 -1
  62. package/chunks/shell-EVKDQKQB.js +3 -0
  63. package/chunks/{skill-6HSCMWQ4.js → skill-K2A5F5X3.js} +1 -1
  64. package/chunks/src-4B52VAKV.js +3 -0
  65. package/chunks/symbol-search-3MVTK4KV.js +19 -0
  66. package/chunks/{syntheticOutput-XKGS6F2D.js → syntheticOutput-QEUQIVQJ.js} +1 -1
  67. package/chunks/task-create-A267CAOE.js +3 -0
  68. package/chunks/{task-list-V27WHHHJ.js → task-list-OWWQLPBL.js} +1 -1
  69. package/chunks/{task-stop-NON26GAN.js → task-stop-JO3CXG2K.js} +1 -1
  70. package/chunks/{task-update-DE7CUGPY.js → task-update-TIVEADJ5.js} +1 -1
  71. package/chunks/{team-create-WNVHF2H6.js → team-create-HUK4PWDT.js} +1 -1
  72. package/chunks/team-delete-2GF5JTRL.js +8 -0
  73. package/chunks/{todoWrite-YIMKFWIL.js → todoWrite-7BZMVNBC.js} +1 -1
  74. package/chunks/{tool-search-HFOHXFK5.js → tool-search-OWJC3UTX.js} +1 -1
  75. package/chunks/{update-goal-2ZJ53Q3T.js → update-goal-6YARVWV6.js} +2 -2
  76. package/chunks/{web-fetch-EVO7GDEB.js → web-fetch-K575OWZ7.js} +1 -1
  77. package/chunks/{web-search-SJMJGGPE.js → web-search-F6JRBXFV.js} +1 -1
  78. package/chunks/{workflow-Q2MVABFH.js → workflow-JQQ3XVVE.js} +2 -2
  79. package/chunks/write-file-SBL2KGCB.js +15 -0
  80. package/cli.js +399 -396
  81. package/package.json +2 -2
  82. package/chunks/agent-3BUOSY5Q.js +0 -3
  83. package/chunks/agent-headless-NYPWOHZH.js +0 -3
  84. package/chunks/chunk-2HFKTFO5.js +0 -9
  85. package/chunks/chunk-5QAKUC2D.js +0 -14
  86. package/chunks/chunk-FW6Z25AA.js +0 -3
  87. package/chunks/chunk-KAOSSAJ7.js +0 -56
  88. package/chunks/chunk-L5ASITMV.js +0 -9
  89. package/chunks/chunk-MW3LAIJW.js +0 -8
  90. package/chunks/chunk-N6BOYL6K.js +0 -27
  91. package/chunks/chunk-RQIV43CR.js +0 -34
  92. package/chunks/chunk-SOKNPND5.js +0 -8
  93. package/chunks/chunk-SWEYYDZO.js +0 -8
  94. package/chunks/chunk-U3O6TMV7.js +0 -8
  95. package/chunks/chunk-UHDKX2CR.js +0 -8
  96. package/chunks/chunk-VBOVIARK.js +0 -9
  97. package/chunks/contextCommand-2QR4G3UT.js +0 -3
  98. package/chunks/glob-HEEVR5Z3.js +0 -22
  99. package/chunks/ls-IBIDQ5NV.js +0 -15
  100. package/chunks/matildaContentGenerator-PV6ESWMY.js +0 -8
  101. package/chunks/monitor-G7537IPA.js +0 -32
  102. package/chunks/notebook-edit-HZSJ3P7O.js +0 -17
  103. package/chunks/read-file-4TZCSTH7.js +0 -3
  104. package/chunks/ripGrep-XIBOQFPB.js +0 -3
  105. package/chunks/scheduler-OMSSFPH3.js +0 -8
  106. package/chunks/shell-UPYPV7S3.js +0 -3
  107. package/chunks/src-UQAE4MM3.js +0 -3
  108. package/chunks/symbol-search-ZV6W6DPK.js +0 -19
  109. package/chunks/task-create-T43QIG2F.js +0 -3
  110. package/chunks/team-delete-LIEVUGIX.js +0 -8
  111. package/chunks/write-file-AT6NPYC3.js +0 -15
@@ -0,0 +1,19 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{d as w,e as A}from"./chunk-MTMU7JYZ.js";import{g as h,i as x,p as d,q as S}from"./chunk-6B5BDE7S.js";import{aa as g}from"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as u}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";u();import C from"node:path";u();import k from"node:fs/promises";import f from"node:path";u();var D={".ts":"typescript",".tsx":"typescript",".js":"javascript",".jsx":"javascript",".mjs":"javascript",".cjs":"javascript",".py":"python",".go":"go",".rs":"rust",".java":"java"},T={typescript:[{kind:"interface",re:/^\s*(?:export\s+)?interface\s+([A-Za-z_$][\w$]*)/},{kind:"type",re:/^\s*(?:export\s+)?type\s+([A-Za-z_$][\w$]*)\s*=/},{kind:"enum",re:/^\s*(?:export\s+)?enum\s+([A-Za-z_$][\w$]*)/},{kind:"class",re:/^\s*(?:export\s+)?(?:abstract\s+)?class\s+([A-Za-z_$][\w$]*)/},{kind:"function",re:/^\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/},{kind:"const",re:/^\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:\(|function\b)/},{kind:"method",re:/^\s+(?:public|private|protected|async|static|readonly|\s)*([A-Za-z_$][\w$]*)\s*\([^;]*\)\s*[:{]/}],javascript:[{kind:"class",re:/^\s*(?:export\s+)?class\s+([A-Za-z_$][\w$]*)/},{kind:"function",re:/^\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([A-Za-z_$][\w$]*)/},{kind:"const",re:/^\s*(?:export\s+)?(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:async\s*)?(?:\(|function\b)/}],python:[{kind:"class",re:/^\s*class\s+([A-Za-z_][\w]*)\s*[(:]/},{kind:"function",re:/^\s*(?:async\s+)?def\s+([A-Za-z_][\w]*)\s*\(/}],go:[{kind:"function",re:/^func\s+(?:\([^)]+\)\s+)?([A-Za-z_][\w]*)\s*\(/},{kind:"type",re:/^type\s+([A-Za-z_][\w]*)\s+(?:struct|interface|func|=)/}],rust:[{kind:"function",re:/^\s*(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?fn\s+([A-Za-z_][\w]*)/},{kind:"class",re:/^\s*(?:pub(?:\([^)]*\))?\s+)?(?:struct|enum|trait)\s+([A-Za-z_][\w]*)/}],java:[{kind:"class",re:/^\s*(?:public|private|protected)?\s*(?:abstract|final)?\s*class\s+([A-Za-z_][\w]*)/},{kind:"interface",re:/^\s*(?:public|private|protected)?\s*interface\s+([A-Za-z_][\w]*)/},{kind:"method",re:/^\s+(?:public|private|protected)\s+(?:static\s+)?[\w<>,\s[\]]+\s+([A-Za-z_][\w]*)\s*\(/}]};function y(m){let i=m.toLowerCase(),t=i.lastIndexOf(".");if(!(t<0))return D[i.slice(t)]}function _(m,i){let t=y(m);if(!t)return[];let o=T[t];if(!o)return[];let a=[],r=i.split(/\r?\n/);for(let e=0;e<r.length;e++){let s=r[e];for(let{kind:c,re:n}of o){let l=n.exec(s);if(l?.[1]&&!(l[1]==="if"||l[1]==="for"||l[1]==="while"||l[1]==="switch")){a.push({name:l[1],kind:c,filePath:m,line:e+1,snippet:s.trim().slice(0,200)});break}}}return a}var z=2e3,E=512*1024,p=class{constructor(i,t,o={}){this.rootDir=i;this.filePaths=t;this.opts=o}symbols=[];built=!1;async build(i){let t=this.opts.maxFiles??z,o=this.opts.maxFileBytes??E,a=[],r=0;for(let e of this.filePaths){if(i?.aborted||r>=t)break;let s=f.isAbsolute(e)?e:f.join(this.rootDir,e);if(!y(s))continue;let c;try{let l=await k.stat(s);if(!l.isFile()||l.size>o)continue;c=await k.readFile(s,"utf8")}catch{continue}let n=f.relative(this.rootDir,s)||s;a.push(..._(n,c)),r+=1}return this.symbols=a,this.built=!0,this.symbols.length}isBuilt(){return this.built}size(){return this.symbols.length}search(i){let t=i.query.trim().toLowerCase();if(!t)return[];let o=i.maxResults??25,a=i.pathPrefix?.replace(/\\/g,"/").toLowerCase(),r=[];for(let e of this.symbols){if(i.kind&&e.kind!==i.kind||a&&!e.filePath.replace(/\\/g,"/").toLowerCase().includes(a))continue;let s=e.name.toLowerCase(),c=0;if(s===t)c=100;else if(s.startsWith(t))c=80;else if(s.includes(t))c=50;else if(e.snippet.toLowerCase().includes(t))c=20;else continue;r.push({s:e,score:c})}return r.sort((e,s)=>s.score-e.score||e.s.filePath.localeCompare(s.s.filePath)),r.slice(0,o).map(e=>e.s)}};var $=g("SYMBOL_SEARCH"),v=new Map,F=6e4,b=class extends h{constructor(t,o){super(o);this.config=t}async getDefaultPermission(){return"allow"}getDescription(){return`Find symbol \`${this.params.query}\``}async execute(t){let o=this.params.query?.trim();if(!o)return{llmContent:"Error: query is required",returnDisplay:"Error: query is required",error:{message:"query is required",type:"invalid_tool_params"}};let a=this.config.getTargetDir();try{let r=await this.getOrBuildIndex(a,t),e=r.search({query:o,pathPrefix:this.params.path,kind:this.params.kind,maxResults:this.params.max_results??25});if(e.length===0)return{llmContent:`No symbols matching "${o}". Try grep_search for textual matches.`,returnDisplay:"No symbols found"};let s=e.map(n=>`${n.kind} ${n.name} \u2014 ${n.filePath}:${n.line}
4
+ ${n.snippet}`);return{llmContent:[`Found ${e.length} symbol(s) for "${o}" (index size ${r.size()}):`,...s].join(`
5
+ `),returnDisplay:`Found ${e.length} symbol(s)`}}catch(r){let e=r instanceof Error?r.message:String(r);return $.debug(`symbol_search failed: ${e}`),{llmContent:`symbol_search failed: ${e}`,returnDisplay:"symbol_search failed",error:{message:e,type:"execution_failed"}}}}async getOrBuildIndex(t,o){let a=v.get(t);if(a&&Date.now()-a.builtAt<F&&a.index.isBuilt())return a.index;let r=A({projectRoot:t,useGitignore:!0,useMatildaignore:!0,ignoreDirs:["node_modules","dist",".git","coverage","vendor"]}),e=[];try{e=await w({crawlDirectory:t,cwd:t,ignore:r,useGitignore:!0,maxDepth:12,maxFiles:5e3,cache:!0,cacheTtl:60})}catch(n){$.debug(`crawl failed, indexing empty: ${n instanceof Error?n.message:String(n)}`),e=[]}if(o.aborted)throw new Error("symbol_search aborted");let s=e.map(n=>C.isAbsolute(n)&&C.relative(t,n)||n),c=new p(t,s);return await c.build(o),v.set(t,{index:c,builtAt:Date.now()}),c}},P=class extends x{constructor(t){super(d.SYMBOL_SEARCH,S.SYMBOL_SEARCH,"Search the workspace for code symbols (functions, classes, types, methods) by name. Prefer this over blind grep when looking for definitions. Falls back gracefully when a language is not indexed.","search",{type:"object",properties:{query:{type:"string",description:"Symbol name or substring to find"},path:{type:"string",description:"Optional path prefix to limit the search"},kind:{type:"string",enum:["function","class","method","interface","type","const","enum"],description:"Optional symbol kind filter"},max_results:{type:"number",description:"Maximum results to return (default 25)"}},required:["query"]});this.config=t}static Name=d.SYMBOL_SEARCH;createInvocation(t){return new b(this.config,t)}};export{P as SymbolSearchTool};
6
+ /**
7
+ * @license
8
+ * Copyright 2026 Matilda Team
9
+ * SPDX-License-Identifier: Apache-2.0
10
+ *
11
+ * Lightweight symbol extraction for the symbol_search tool.
12
+ * Regex-based MVP — tree-sitter grammars can replace per language later
13
+ * without changing the CodeIndex / tool surface.
14
+ */
15
+ /**
16
+ * @license
17
+ * Copyright 2026 Matilda Team
18
+ * SPDX-License-Identifier: Apache-2.0
19
+ */
@@ -1,3 +1,3 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a,b}from"./chunk-OXHC3R2R.js";import"./chunk-BGZJUBRA.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as STRUCTURED_OUTPUT_REDACTED_ARGS,b as SyntheticOutputTool};
3
+ import{a,b}from"./chunk-32T6RWWT.js";import"./chunk-6B5BDE7S.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as STRUCTURED_OUTPUT_REDACTED_ARGS,b as SyntheticOutputTool};
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{a,b}from"./chunk-CG7MWHAI.js";import"./chunk-XBIUAUEW.js";import"./chunk-5OY5RZSF.js";import"./chunk-TISQNFB5.js";import"./chunk-QKYGQLWC.js";import"./chunk-6B5BDE7S.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{b as TaskCreateTool,a as truncateForConfirmation};
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{k as d}from"./chunk-UHDKX2CR.js";import"./chunk-X4ML2NEE.js";import"./chunk-TISQNFB5.js";import{e as u,f as g}from"./chunk-QKYGQLWC.js";import{g as l,i as m,p,q as c}from"./chunk-BGZJUBRA.js";import"./chunk-SWEYYDZO.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as n}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";n();var r=class extends l{constructor(t,a){super(a);this.config=t}getDescription(){let t=[];return this.params.status&&t.push(`status=${this.params.status}`),this.params.owner&&t.push(`owner=${this.params.owner}`),this.params.blockedBy&&t.push(`blockedBy=${this.params.blockedBy}`),t.length>0?`List tasks (${t.join(", ")})`:"List all tasks"}async execute(){let t=g(this.config.getTeamContext()?.teamName);if(!t){let s="No active team. Create a team first.";return{llmContent:s,returnDisplay:s,error:{message:s}}}let a=await d(t,{status:this.params.status,owner:this.params.owner,blockedBy:this.params.blockedBy});if(a.length===0){let s="No tasks found.";return{llmContent:s,returnDisplay:s}}let e=a.map(s=>`#${s.id} [${s.status}]`+(s.owner?` @${s.owner}`:"")+` \u2014 ${s.subject}`),o=this.config.getTeamManager();if(o&&!u()){try{let s=await o.getLeaderMessages();if(s.length>0){e.push(""),e.push("--- Teammate messages ---");for(let y of o.formatLeaderEnvelope(s))e.push(y)}}catch{}o.hasActiveTeammates()&&(e.push(""),e.push("NOTE: Teammates are still working. Their results will be delivered as messages \u2014 do NOT call task_list again to check. End your turn and wait for teammate messages."))}let h=e.join(`
3
+ import{k as d}from"./chunk-XBIUAUEW.js";import"./chunk-5OY5RZSF.js";import"./chunk-TISQNFB5.js";import{e as u,f as g}from"./chunk-QKYGQLWC.js";import{g as l,i as m,p,q as c}from"./chunk-6B5BDE7S.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as n}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";n();var r=class extends l{constructor(t,a){super(a);this.config=t}getDescription(){let t=[];return this.params.status&&t.push(`status=${this.params.status}`),this.params.owner&&t.push(`owner=${this.params.owner}`),this.params.blockedBy&&t.push(`blockedBy=${this.params.blockedBy}`),t.length>0?`List tasks (${t.join(", ")})`:"List all tasks"}async execute(){let t=g(this.config.getTeamContext()?.teamName);if(!t){let s="No active team. Create a team first.";return{llmContent:s,returnDisplay:s,error:{message:s}}}let a=await d(t,{status:this.params.status,owner:this.params.owner,blockedBy:this.params.blockedBy});if(a.length===0){let s="No tasks found.";return{llmContent:s,returnDisplay:s}}let e=a.map(s=>`#${s.id} [${s.status}]`+(s.owner?` @${s.owner}`:"")+` \u2014 ${s.subject}`),o=this.config.getTeamManager();if(o&&!u()){try{let s=await o.getLeaderMessages();if(s.length>0){e.push(""),e.push("--- Teammate messages ---");for(let y of o.formatLeaderEnvelope(s))e.push(y)}}catch{}o.hasActiveTeammates()&&(e.push(""),e.push("NOTE: Teammates are still working. Their results will be delivered as messages \u2014 do NOT call task_list again to check. End your turn and wait for teammate messages."))}let h=e.join(`
4
4
  `),k={type:"task_list",tasks:a.map(s=>({id:s.id,subject:s.subject,status:s.status,owner:s.owner}))};return{llmContent:h,returnDisplay:k}}},f=class i extends m{constructor(t){super(i.Name,c.TASK_LIST,"List tasks in the team task list. All filter parameters are optional.","read",{type:"object",properties:{status:{type:"string",enum:["pending","in_progress","completed"],description:"Filter by task status."},owner:{type:"string",description:"Filter by owner agent name."},blockedBy:{type:"string",description:"Filter for tasks blocked by this task ID."}},additionalProperties:!1});this.config=t}static Name=p.TASK_LIST;createInvocation(t){return new r(this.config,t)}};export{f as TaskListTool};
5
5
  /**
6
6
  * @license
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{g as T,i as y,p as h,q as $}from"./chunk-BGZJUBRA.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as f}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";f();var u=class extends T{constructor(e,t){super(t);this.config=e}getDescription(){return`Stop background task ${this.params.task_id}`}async execute(e){let t=this.params.task_id,d=this.config.getBackgroundTaskRegistry(),a=d.get(t);if(a){if(a.status==="paused"){if(!this.config.abandonBackgroundAgent(t))return{llmContent:`Error: Background agent "${t}" could not be cancelled from paused state.`,returnDisplay:"Task could not be cancelled.",error:{message:`Task could not be cancelled: ${t}`,type:"task_stop_not_running"}};let k=a.description;return{llmContent:`Cancelled paused background agent "${t}".
3
+ import{g as T,i as y,p as h,q as $}from"./chunk-6B5BDE7S.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as f}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";f();var u=class extends T{constructor(e,t){super(t);this.config=e}getDescription(){return`Stop background task ${this.params.task_id}`}async execute(e){let t=this.params.task_id,d=this.config.getBackgroundTaskRegistry(),a=d.get(t);if(a){if(a.status==="paused"){if(!this.config.abandonBackgroundAgent(t))return{llmContent:`Error: Background agent "${t}" could not be cancelled from paused state.`,returnDisplay:"Task could not be cancelled.",error:{message:`Task could not be cancelled: ${t}`,type:"task_stop_not_running"}};let k=a.description;return{llmContent:`Cancelled paused background agent "${t}".
4
4
  Description: ${k}`,returnDisplay:`Cancelled: ${k}`}}if(a.status!=="running")return l("agent",t,a.status);d.cancel(t);let c=a.description;return{llmContent:`Cancellation requested for background agent "${t}". A final task-notification carrying the agent's last result will follow.
5
5
  Description: ${c}`,returnDisplay:`Cancelled: ${c}`}}let g=this.config.getBackgroundShellRegistry(),r=g.get(t);if(r)return r.status!=="running"?l("shell",t,r.status):(g.requestCancel(t),{llmContent:`Cancellation requested for background shell "${t}". Final status will be visible via /tasks (text) or the interactive Background tasks dialog (focus the footer Background tasks pill, then Enter) once the process drains; captured output remains at ${r.outputPath}.
6
6
  Command: ${r.command}`,returnDisplay:`Cancelled shell: ${r.command}`});let m=this.config.getMonitorRegistry(),s=m.get(t);if(s)return s.status!=="running"?l("monitor",t,s.status):(m.cancel(t),{llmContent:`Monitor "${t}" cancelled. Status is visible via /tasks (text) or the interactive Background tasks dialog (focus the footer Background tasks pill, then Enter).
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as N}from"./chunk-BH56I7SB.js";import{a as h,b as f,g as $,h as y,i as g,j as v,k as I}from"./chunk-UHDKX2CR.js";import"./chunk-X4ML2NEE.js";import"./chunk-TISQNFB5.js";import{d as k,f as j,g as P}from"./chunk-QKYGQLWC.js";import{g as T,i as C,p as b,q as D}from"./chunk-BGZJUBRA.js";import"./chunk-SWEYYDZO.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as w}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";w();async function A(u,n,e,s){let i=await I(u),d=new Map,l=(t,r)=>{let a=d.get(t);a||(a=new Set,d.set(t,a)),a.add(r)};for(let t of i){for(let r of t.blocks)l(t.id,r);for(let r of t.blockedBy)l(r,t.id)}for(let t of e)l(n,t);for(let t of s)l(t,n);let o=[],c=new Set,p=t=>{o.push(t);for(let r of d.get(t)??[]){if(r===n)return[...o,n];if(c.has(r))continue;c.add(r);let a=p(r);if(a)return a}return o.pop(),null};return c.add(n),p(n)}var B=class extends T{constructor(e,s){super(s);this.config=e}getDescription(){let e=[`Task #${this.params.taskId}`];return this.params.status&&e.push(`\u2192 ${this.params.status}`),this.params.owner&&e.push(`owner: ${this.params.owner}`),e.join(" ")}async getDefaultPermission(){return"ask"}getConfirmationDetails(e){let s=[this.getDescription()];this.params.subject!==void 0&&s.push(`subject: ${this.params.subject}`),this.params.addBlocks?.length&&s.push(`blocks: ${this.params.addBlocks.join(", ")}`),this.params.addBlockedBy?.length&&s.push(`blocked by: ${this.params.addBlockedBy.join(", ")}`),this.params.description!==void 0&&s.push("",N(this.params.description));let i={type:"info",title:"Confirm TaskUpdate",prompt:s.join(`
3
+ import{a as N}from"./chunk-CG7MWHAI.js";import{a as h,b as f,g as $,h as y,i as g,j as v,k as I}from"./chunk-XBIUAUEW.js";import"./chunk-5OY5RZSF.js";import"./chunk-TISQNFB5.js";import{d as k,f as j,g as P}from"./chunk-QKYGQLWC.js";import{g as T,i as C,p as b,q as D}from"./chunk-6B5BDE7S.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as w}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";w();async function A(u,n,e,s){let i=await I(u),d=new Map,l=(t,r)=>{let a=d.get(t);a||(a=new Set,d.set(t,a)),a.add(r)};for(let t of i){for(let r of t.blocks)l(t.id,r);for(let r of t.blockedBy)l(r,t.id)}for(let t of e)l(n,t);for(let t of s)l(t,n);let o=[],c=new Set,p=t=>{o.push(t);for(let r of d.get(t)??[]){if(r===n)return[...o,n];if(c.has(r))continue;c.add(r);let a=p(r);if(a)return a}return o.pop(),null};return c.add(n),p(n)}var B=class extends T{constructor(e,s){super(s);this.config=e}getDescription(){let e=[`Task #${this.params.taskId}`];return this.params.status&&e.push(`\u2192 ${this.params.status}`),this.params.owner&&e.push(`owner: ${this.params.owner}`),e.join(" ")}async getDefaultPermission(){return"ask"}getConfirmationDetails(e){let s=[this.getDescription()];this.params.subject!==void 0&&s.push(`subject: ${this.params.subject}`),this.params.addBlocks?.length&&s.push(`blocks: ${this.params.addBlocks.join(", ")}`),this.params.addBlockedBy?.length&&s.push(`blocked by: ${this.params.addBlockedBy.join(", ")}`),this.params.description!==void 0&&s.push("",N(this.params.description));let i={type:"info",title:"Confirm TaskUpdate",prompt:s.join(`
4
4
  `),onConfirm:async()=>{}};return Promise.resolve(i)}async execute(){let e=j(this.config.getTeamContext()?.teamName);if(!e){let t="No active team. Create a team first.";return{llmContent:t,returnDisplay:t,error:{message:t}}}let{taskId:s}=this.params;try{f(s);for(let t of this.params.addBlocks??[])f(t);for(let t of this.params.addBlockedBy??[])f(t)}catch(t){let r=t instanceof Error?t.message:String(t);return{llmContent:r,returnDisplay:r,error:{message:r}}}let i=P()?k():void 0;if(this.params.status==="deleted"){let t;try{t=await v(e,s,i!==void 0?{callerName:i}:void 0)}catch(a){if(a instanceof y)return{llmContent:a.message,returnDisplay:a.message,error:{message:a.message}};throw a}if(!t){let a=`Task #${s} not found.`;return{llmContent:a,returnDisplay:a,error:{message:a}}}let r=`Task #${s} deleted.`;return{llmContent:r,returnDisplay:r}}if(this.params.addBlocks?.includes(s)||this.params.addBlockedBy?.includes(s)){let t=`Cannot update task #${s}: a task cannot block or be blocked by itself.`;return{llmContent:t,returnDisplay:t,error:{message:t}}}let d=new Set;for(let t of this.params.addBlocks??[])t!==s&&d.add(t);for(let t of this.params.addBlockedBy??[])t!==s&&d.add(t);if(d.size>0){let t=[];if(await Promise.all(Array.from(d).map(async a=>{await $(e,a)||t.push(a)})),t.length>0){let a=t.sort().map(U=>`#${U}`).join(", "),m=`Cannot update task #${s}: referenced task${t.length===1?"":"s"} ${a} not found.`;return{llmContent:m,returnDisplay:m,error:{message:m}}}let r=await A(e,s,this.params.addBlocks??[],this.params.addBlockedBy??[]);if(r){let a=`Cannot update task #${s}: this would create a dependency cycle (${r.map(m=>`#${m}`).join(" \u2192 ")}).`;return{llmContent:a,returnDisplay:a,error:{message:a}}}}let l=this.params.status==="in_progress"&&this.params.owner===void 0?k():void 0;if(this.params.status==="in_progress"&&!this.params.owner&&!l){let t=`Cannot move task #${s} to in_progress without an owner. Specify the "owner" parameter.`;return{llmContent:t,returnDisplay:t,error:{message:t}}}let o;try{o=await g(e,s,{status:this.params.status,owner:this.params.owner??l,subject:this.params.subject,description:this.params.description,activeForm:this.params.activeForm,metadata:this.params.metadata,addBlocks:this.params.addBlocks,addBlockedBy:this.params.addBlockedBy},i!==void 0?{callerName:i}:void 0)}catch(t){if(t instanceof y)return{llmContent:t.message,returnDisplay:t.message,error:{message:t.message}};throw t}if(!o){let t=`Task #${s} not found.`;return{llmContent:t,returnDisplay:t,error:{message:t}}}let c=[];if(this.params.addBlocks?.length&&this.params.status!=="completed")for(let t of this.params.addBlocks)t!==s&&c.push(g(e,t,{addBlockedBy:[s]},{callerName:h}));if(this.params.addBlockedBy?.length)for(let t of this.params.addBlockedBy)t!==s&&c.push(g(e,t,{addBlocks:[s]},{callerName:h}));c.length>0&&await Promise.all(c);let p=`Task #${s} updated (status: ${o.status}`+(o.owner?`, owner: ${o.owner}`:"")+").";return{llmContent:p,returnDisplay:p}}},S=class u extends C{constructor(e){super(u.Name,D.TASK_UPDATE,'Update an existing task. Can change status, owner, subject, description, and blocking relationships. Set status to "deleted" to remove a task. Setting status to "in_progress" auto-assigns you as owner if no owner is set.',"other",{type:"object",properties:{taskId:{type:"string",description:"ID of the task to update."},status:{type:"string",enum:["pending","in_progress","completed","deleted"],description:"New task status."},owner:{type:"string",description:"New owner agent name. Set to empty string to unassign."},subject:{type:"string",maxLength:200,description:"Updated task title."},description:{type:"string",maxLength:1e4,description:"Updated task description."},activeForm:{type:"string",maxLength:200,description:"Present tense label for UI."},metadata:{type:"object",description:"Metadata to merge. Set a key to null to delete it."},addBlocks:{type:"array",items:{type:"string"},description:"Task IDs that this task blocks."},addBlockedBy:{type:"array",items:{type:"string"},description:"Task IDs that block this task."}},required:["taskId"],additionalProperties:!1});this.config=e}static Name=b.TASK_UPDATE;createInvocation(e){return new B(this.config,e)}toAutoClassifierInput(e){return{taskId:e.taskId,status:e.status,owner:e.owner,subject:e.subject,description:e.description,addBlocks:e.addBlocks,addBlockedBy:e.addBlockedBy}}};export{S as TaskUpdateTool};
5
5
  /**
6
6
  * @license
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{Dg as D,sg as u}from"./chunk-AMO6HY3T.js";import"./chunk-TZIDSCTF.js";import{l as A}from"./chunk-2HFKTFO5.js";import{l as C}from"./chunk-UHDKX2CR.js";import{b as w,e as T,f as k,g as b,q as o,r as v}from"./chunk-X4ML2NEE.js";import"./chunk-FQ44TPC5.js";import"./chunk-MTMU7JYZ.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-FW6Z25AA.js";import"./chunk-TISQNFB5.js";import"./chunk-RQIV43CR.js";import"./chunk-47XR7IMP.js";import"./chunk-MW3LAIJW.js";import{k as f,l as y}from"./chunk-QKYGQLWC.js";import"./chunk-LNTO3FNQ.js";import"./chunk-L5ASITMV.js";import"./chunk-RNKDFE2S.js";import"./chunk-SOKNPND5.js";import"./chunk-743LSI67.js";import"./chunk-XITA5WMN.js";import"./chunk-QZWBA3NL.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-O3OUYCSO.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import"./chunk-OVC5Z3EX.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-VB4MJSMC.js";import"./chunk-OXHC3R2R.js";import{g as c,i as g,p as h,q as p}from"./chunk-BGZJUBRA.js";import"./chunk-N6BOYL6K.js";import"./chunk-VBOVIARK.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-SWEYYDZO.js";import{a as d}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as l}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";l();var i=class extends c{constructor(e,a){super(a);this.config=e}getDescription(){return`Create team "${this.params.team_name}"`}async execute(){let e=k(this.params.team_name);if(!e){let t="Team name is required.";return{llmContent:t,returnDisplay:t,error:{message:t}}}if(this.config.getArenaManager()){let t="Cannot create a team while an Arena session is active. End the Arena session first.";return{llmContent:t,returnDisplay:t,error:{message:t}}}if(this.config.getTeamManager()){let t="A team is already active. Delete it before creating a new one.";return{llmContent:t,returnDisplay:t,error:{message:t}}}let a=b(y,e),s={name:e,description:this.params.description,createdAt:Date.now(),leadAgentId:a,leadSessionId:this.config.getSessionId(),leadPid:process.pid,members:[]};try{await o(e,s)}catch(t){if(d(t)&&t.code==="EEXIST"){if(!await v(e)){let n=`Team "${e}" already exists and appears to be owned by a live matilda-code session. Pick a different name, or \u2014 if you're sure no other session is using it \u2014 remove the on-disk artifacts manually:
3
+ import{Eg as D,tg as u}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import{l as A}from"./chunk-VVTGOEZG.js";import{l as C}from"./chunk-XBIUAUEW.js";import{b as w,e as T,f as k,g as b,q as o,r as v}from"./chunk-5OY5RZSF.js";import"./chunk-LSDMWVW6.js";import"./chunk-MTMU7JYZ.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-ZPQ7BBR2.js";import"./chunk-TISQNFB5.js";import"./chunk-LZYLZZNI.js";import"./chunk-47XR7IMP.js";import"./chunk-FWIVFCKF.js";import{k as f,l as y}from"./chunk-QKYGQLWC.js";import"./chunk-FRL6KOLY.js";import"./chunk-VWWEEU4V.js";import"./chunk-RNKDFE2S.js";import"./chunk-Q2I3ARPJ.js";import"./chunk-CM3HWOOK.js";import"./chunk-QHA3ZBRO.js";import"./chunk-WMPQ67GO.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-S7G6QPEP.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{g as c,i as g,p as h,q as p}from"./chunk-6B5BDE7S.js";import"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import{b as d}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as l}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";l();var i=class extends c{constructor(e,a){super(a);this.config=e}getDescription(){return`Create team "${this.params.team_name}"`}async execute(){let e=k(this.params.team_name);if(!e){let t="Team name is required.";return{llmContent:t,returnDisplay:t,error:{message:t}}}if(this.config.getArenaManager()){let t="Cannot create a team while an Arena session is active. End the Arena session first.";return{llmContent:t,returnDisplay:t,error:{message:t}}}if(this.config.getTeamManager()){let t="A team is already active. Delete it before creating a new one.";return{llmContent:t,returnDisplay:t,error:{message:t}}}let a=b(y,e),s={name:e,description:this.params.description,createdAt:Date.now(),leadAgentId:a,leadSessionId:this.config.getSessionId(),leadPid:process.pid,members:[]};try{await o(e,s)}catch(t){if(d(t)&&t.code==="EEXIST"){if(!await v(e)){let n=`Team "${e}" already exists and appears to be owned by a live matilda-code session. Pick a different name, or \u2014 if you're sure no other session is using it \u2014 remove the on-disk artifacts manually:
4
4
  rm -rf "${w(e)}" "${T(e)}"`;return{llmContent:n,returnDisplay:n,error:{message:n}}}await o(e,s)}else throw t}await C(e),await A(e);let m=new u(this.config);await m.init();let x=new D(m,s,this.config.getSubagentManager(),{maxTeammates:this.config.getAgentsSettings().team?.maxTeammates});this.config.setTeamManager(x);let N={teamName:e,leadAgentId:a,teammates:{}};this.config.setTeamContext(N);let E={type:"team_result",teamName:e,action:"created"};return{llmContent:`Team "${e}" created.`+(this.params.description?` Description: ${this.params.description}`:""),returnDisplay:E}}},I=class r extends g{constructor(e){super(r.Name,p.TEAM_CREATE,`# TeamCreate
5
5
 
6
6
  ## When to Use
@@ -0,0 +1,8 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{c as T,f}from"./chunk-VVTGOEZG.js";import{s as o}from"./chunk-5OY5RZSF.js";import"./chunk-TISQNFB5.js";import{g}from"./chunk-QKYGQLWC.js";import{g as l,i as c,p,q as u}from"./chunk-6B5BDE7S.js";import"./chunk-EQEQPZLQ.js";import{aa as i}from"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();var E=i("TEAM_DELETE"),r=class extends l{constructor(t,n){super(n);this.config=t}getDescription(){return"Delete current team"}async execute(){if(g()){let e="Only the team leader can delete the team.";return{llmContent:e,returnDisplay:e,error:{message:e}}}let t=this.config.getTeamManager();if(!t){let e="No active team to delete.";return{llmContent:e,returnDisplay:e,error:{message:e}}}let a=t.getTeamFile().name;try{await t.cleanup()}catch(e){E.warn("Team cleanup failed; resetting team state anyway:",e)}await o(a),await new Promise(e=>setTimeout(e,250)),await o(a),f(a),this.config.setTeamManager(null),this.config.setTeamContext(null),T();let y={type:"team_result",teamName:a,action:"deleted"};return{llmContent:`Team "${a}" deleted.`,returnDisplay:y}}},d=class s extends c{constructor(t){super(s.Name,u.TEAM_DELETE,"Delete the current team. Stops all teammates, cleans up team files, tasks, and inboxes. Only the team leader can use this.","delete",{type:"object",properties:{},additionalProperties:!1});this.config=t}static Name=p.TEAM_DELETE;createInvocation(t){return new r(this.config,t)}};export{d as TeamDeleteTool};
4
+ /**
5
+ * @license
6
+ * Copyright 2025 Matilda
7
+ * SPDX-License-Identifier: Apache-2.0
8
+ */
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{y as S}from"./chunk-L5ASITMV.js";import{g as E,i as O,p as P,q as W}from"./chunk-BGZJUBRA.js";import{b as C}from"./chunk-SWEYYDZO.js";import{M as y,Z as I}from"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as x}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";x();import*as h from"fs/promises";import*as U from"fs";import*as u from"path";var R=I("TODO_WRITE"),j={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#"}},q=`
3
+ import{y as S}from"./chunk-VWWEEU4V.js";import{g as E,i as O,p as P,q as W}from"./chunk-6B5BDE7S.js";import{b as C}from"./chunk-EQEQPZLQ.js";import{P as y,aa as I}from"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as x}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";x();import*as h from"fs/promises";import*as U from"fs";import*as u from"path";var R=I("TODO_WRITE"),j={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#"}},q=`
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
 
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{Cc as N}from"./chunk-OVC5Z3EX.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-VB4MJSMC.js";import"./chunk-OXHC3R2R.js";import{g as v,i as R,p as E,q as L}from"./chunk-BGZJUBRA.js";import"./chunk-SWEYYDZO.js";import{Z as S}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as C}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";C();var y=S("TOOL_SEARCH"),D=5,A=20,b=10,x=5,$=4,k=2,q=12,M=6,P=`Fetches function declarations for deferred tools and registers them with the active session so subsequent turns can call them.
3
+ import{Cc as N}from"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{g as v,i as R,p as E,q as L}from"./chunk-6B5BDE7S.js";import"./chunk-EQEQPZLQ.js";import{aa as S}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as C}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";C();var y=S("TOOL_SEARCH"),D=5,A=20,b=10,x=5,$=4,k=2,q=12,M=6,P=`Fetches function declarations for deferred tools and registers them with the active session so subsequent turns can call them.
4
4
 
5
5
  Deferred tools appear by name in the deferred-tools startup reminder. Until fetched, only the name is known \u2014 there is no parameter schema, so the tool cannot be invoked. This tool takes a query, matches it against the deferred tool list, and returns the matched tools' function declarations (name + description + parameter schema) inside a <functions> block.
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{c as g,g as f,h as y,l as h,u as v}from"./chunk-RQIV43CR.js";import"./chunk-L5ASITMV.js";import"./chunk-SDTWBD62.js";import{g as u,i as p,p as i,q as d}from"./chunk-BGZJUBRA.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();var G=`Update the lifecycle status of the session's active /goal.
3
+ import{c as g,h as f,l as y,p as h,v}from"./chunk-LZYLZZNI.js";import"./chunk-VWWEEU4V.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import{g as u,i as p,p as i,q as d}from"./chunk-6B5BDE7S.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();var G=`Update the lifecycle status of the session's active /goal.
4
4
 
5
5
  Use when:
6
6
  - You finished the goal and want to mark it complete (do not only claim success in prose).
@@ -8,7 +8,7 @@ Use when:
8
8
  - You are pausing mid-work intentionally \u2192 status "paused".
9
9
  - The user asked you to resume \u2192 status "active".
10
10
 
11
- Requires an active goal set via /goal. Does not create a new goal.`,P={name:i.UPDATE_GOAL,description:G,parametersJsonSchema:{type:"object",properties:{status:{type:"string",enum:["active","paused","blocked","complete"],description:"Lifecycle status. complete clears the goal as achieved; paused/blocked keep it without auto-continue."},message:{type:"string",description:"Optional note (progress, block reason, or completion summary)."}},required:["status"],additionalProperties:!1}},n=class extends u{constructor(e,t){super(t);this.config=e}getDescription(){let e=this.params.message?.trim();return e?`update_goal \u2192 ${this.params.status}: ${e.slice(0,80)}`:`update_goal \u2192 ${this.params.status}`}async shouldConfirmExecute(){return!1}async execute(e){let t=this.config.getSessionId(),o=g(t);if(!o)return{llmContent:"No active goal in this session. The user can set one with `/goal <condition>`.",returnDisplay:"No active goal",error:{message:"No active goal",type:"invalid_tool_params"}};let l=this.params.status,s=this.params.message?.trim();if(l==="complete")return h(t,{kind:"achieved",condition:o.condition,iterations:o.iterations,durationMs:Date.now()-o.setAt,lastReason:s||"Marked complete via update_goal"}),v(this.config,t),{llmContent:`Goal marked complete: ${o.condition}${s?` \u2014 ${s}`:""}`,returnDisplay:"Goal complete"};let a=f(t,l,s);if(!a)return{llmContent:"No active goal.",returnDisplay:"No active goal"};let c=y(a),k=a.statusNote?` (${a.statusNote})`:"";return{llmContent:`Goal status is now "${c}"${k}. Condition: ${a.condition}`,returnDisplay:`Goal ${c}`}}},T=class r extends p{constructor(e){super(r.Name,d.UPDATE_GOAL,G,"think",P.parametersJsonSchema);this.config=e}static Name=i.UPDATE_GOAL;createInvocation(e){return new n(this.config,e)}};export{T as UpdateGoalTool};
11
+ Requires an active goal set via /goal. Does not create a new goal.`,P={name:i.UPDATE_GOAL,description:G,parametersJsonSchema:{type:"object",properties:{status:{type:"string",enum:["active","paused","blocked","complete"],description:"Lifecycle status. complete clears the goal as achieved; paused/blocked keep it without auto-continue."},message:{type:"string",description:"Optional note (progress, block reason, or completion summary)."}},required:["status"],additionalProperties:!1}},n=class extends u{constructor(e,t){super(t);this.config=e}getDescription(){let e=this.params.message?.trim();return e?`update_goal \u2192 ${this.params.status}: ${e.slice(0,80)}`:`update_goal \u2192 ${this.params.status}`}async shouldConfirmExecute(){return!1}async execute(e){let t=this.config.getSessionId(),o=g(t);if(!o)return{llmContent:"No active goal in this session. The user can set one with `/goal <condition>`.",returnDisplay:"No active goal",error:{message:"No active goal",type:"invalid_tool_params"}};let l=this.params.status,s=this.params.message?.trim();if(l==="complete")return y(t,{kind:"achieved",condition:o.condition,iterations:o.iterations,durationMs:Date.now()-o.setAt,lastReason:s||"Marked complete via update_goal"}),v(this.config,t),{llmContent:`Goal marked complete: ${o.condition}${s?` \u2014 ${s}`:""}`,returnDisplay:"Goal complete"};let a=h(this.config,t,l,s);if(!a)return{llmContent:"No active goal.",returnDisplay:"No active goal"};let c=f(a),k=a.statusNote?` (${a.statusNote})`:"";return{llmContent:`Goal status is now "${c}"${k}. Condition: ${a.condition}`,returnDisplay:`Goal ${c}`}}},T=class r extends p{constructor(e){super(r.Name,d.UPDATE_GOAL,G,"think",P.parametersJsonSchema);this.config=e}static Name=i.UPDATE_GOAL;createInvocation(e){return new n(this.config,e)}};export{T as UpdateGoalTool};
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2026 Matilda Team