@maincode-ai/matilda-code 0.21.6 → 0.21.7-nightly.20260920.d953e31d2
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/chunks/agent-OW4AMLGE.js +3 -0
- package/chunks/agent-headless-CXL5LO2G.js +3 -0
- package/chunks/{anthropicContentGenerator-EAQDRKHH.js → anthropicContentGenerator-SFJGSZHT.js} +1 -1
- package/chunks/{askUserQuestion-7II3GVHO.js → askUserQuestion-MJ4FTAOQ.js} +1 -1
- package/chunks/{chunk-VB4MJSMC.js → chunk-32PTAACU.js} +1 -1
- package/chunks/{chunk-OXHC3R2R.js → chunk-32T6RWWT.js} +1 -1
- package/chunks/{chunk-QF6BOPQB.js → chunk-34DXSYJZ.js} +2 -2
- package/chunks/chunk-3RD5BHRX.js +34 -0
- package/chunks/{chunk-BH56I7SB.js → chunk-3ZAMYREW.js} +1 -1
- package/chunks/{chunk-YTGWPLEA.js → chunk-5PMMY47S.js} +1 -1
- package/chunks/{chunk-BGZJUBRA.js → chunk-6B5BDE7S.js} +1 -1
- package/chunks/{chunk-IPL3QW4D.js → chunk-7PNIGVSD.js} +1 -1
- package/chunks/{chunk-OVC5Z3EX.js → chunk-B3NVKOSU.js} +1 -1
- package/chunks/{chunk-EU5CK2VJ.js → chunk-BUCTEJSK.js} +509 -509
- package/chunks/{chunk-4Z6HQEVC.js → chunk-DAFUAZBW.js} +2 -2
- package/chunks/{chunk-X4ML2NEE.js → chunk-DCQKJTAX.js} +2 -2
- package/chunks/chunk-EQEQPZLQ.js +8 -0
- package/chunks/{chunk-LNTO3FNQ.js → chunk-FRL6KOLY.js} +1 -1
- package/chunks/chunk-FWIVFCKF.js +8 -0
- package/chunks/chunk-INAZKGGR.js +8 -0
- package/chunks/chunk-LIWYWWOK.js +8 -0
- package/chunks/{chunk-FQ44TPC5.js → chunk-LSDMWVW6.js} +3 -3
- package/chunks/{chunk-AICUGYJK.js → chunk-MQUGY4PQ.js} +1 -1
- package/chunks/chunk-Q2I3ARPJ.js +8 -0
- package/chunks/{chunk-XITA5WMN.js → chunk-QHA3ZBRO.js} +1 -1
- package/chunks/chunk-RJX7DK4Y.js +27 -0
- package/chunks/chunk-ROETRE5J.js +9 -0
- package/chunks/{chunk-O3OUYCSO.js → chunk-S7G6QPEP.js} +1 -1
- package/chunks/chunk-VLYRNOD3.js +36 -0
- package/chunks/{chunk-C7L2FDS6.js → chunk-VPMGPS4S.js} +3 -3
- package/chunks/chunk-VWWEEU4V.js +9 -0
- package/chunks/chunk-VYTYYCBR.js +3 -0
- package/chunks/chunk-XCJYORZX.js +9 -0
- package/chunks/{chunk-UTS2D2OV.js → chunk-YNQQIE2C.js} +11 -11
- package/chunks/{computer-use-X7US5CFC.js → computer-use-75G7W4CF.js} +1 -1
- package/chunks/contextCommand-5AEUXP6K.js +3 -0
- package/chunks/{cron-create-HASFXYQL.js → cron-create-BTTPO3JC.js} +1 -1
- package/chunks/{cron-delete-AW4S5IYT.js → cron-delete-U55RHRID.js} +1 -1
- package/chunks/{cron-list-U5U5GO6A.js → cron-list-J4HRR46K.js} +1 -1
- package/chunks/{edit-CVHLH32T.js → edit-L42KW7KG.js} +1 -1
- package/chunks/{enter-worktree-DOV462JZ.js → enter-worktree-F7L46TR7.js} +1 -1
- package/chunks/{enterPlanMode-4Z32XTSV.js → enterPlanMode-SYIYUOBN.js} +1 -1
- package/chunks/{exit-worktree-SZWLWCNF.js → exit-worktree-44PVOBH5.js} +1 -1
- package/chunks/{exitPlanMode-MG7QZYZ7.js → exitPlanMode-RAZXQ7FT.js} +1 -1
- package/chunks/{geminiContentGenerator-S4NNKSEQ.js → geminiContentGenerator-24YINMHK.js} +1 -1
- package/chunks/glob-3733NSQF.js +22 -0
- package/chunks/{grep-CB6P3VIR.js → grep-X6BSJJ4L.js} +1 -1
- package/chunks/{keychain-token-storage-5MWTIAEL.js → keychain-token-storage-HAFQQIXL.js} +1 -1
- package/chunks/ls-CLDNF3YS.js +15 -0
- package/chunks/{lsp-ELR2BGT4.js → lsp-7SKRKR5Q.js} +1 -1
- package/chunks/{matildaAgentContentGenerator-GHIMPOOE.js → matildaAgentContentGenerator-AAMXNN4G.js} +1 -1
- package/chunks/matildaContentGenerator-ARMO2LGC.js +8 -0
- package/chunks/{matildaOAuth2-5EYRIK66.js → matildaOAuth2-W2DQO2NK.js} +1 -1
- package/chunks/monitor-LJJFUT55.js +32 -0
- package/chunks/notebook-edit-TXRMUCSL.js +17 -0
- package/chunks/{openaiContentGenerator-O5Q5FHFD.js → openaiContentGenerator-QHSC43AC.js} +1 -1
- package/chunks/read-file-J5UBJYDO.js +3 -0
- package/chunks/ripGrep-ET7IOM4A.js +3 -0
- package/chunks/scheduler-KVTQ6P2T.js +8 -0
- package/chunks/{send-message-GFPVOTSZ.js → send-message-XXRROIL7.js} +1 -1
- package/chunks/{serve-VW4UWSX4.js → serve-ABWSIR7B.js} +21 -21
- package/chunks/shell-CLFIQYYM.js +3 -0
- package/chunks/{skill-JFIJEIFA.js → skill-T3MGV3F6.js} +1 -1
- package/chunks/src-3H56WVFR.js +3 -0
- package/chunks/symbol-search-3MVTK4KV.js +19 -0
- package/chunks/{syntheticOutput-XKGS6F2D.js → syntheticOutput-QEUQIVQJ.js} +1 -1
- package/chunks/task-create-AEJQ73GE.js +3 -0
- package/chunks/{task-list-V27WHHHJ.js → task-list-ZEJTNZ2O.js} +1 -1
- package/chunks/{task-stop-NON26GAN.js → task-stop-JO3CXG2K.js} +1 -1
- package/chunks/{task-update-DE7CUGPY.js → task-update-3YY37VFN.js} +1 -1
- package/chunks/{team-create-JEC4ZSNE.js → team-create-KX646U6L.js} +1 -1
- package/chunks/team-delete-4YYLUV23.js +8 -0
- package/chunks/{todoWrite-YIMKFWIL.js → todoWrite-7BZMVNBC.js} +1 -1
- package/chunks/{tool-search-HFOHXFK5.js → tool-search-OWJC3UTX.js} +1 -1
- package/chunks/{update-goal-IDTG4LI6.js → update-goal-CF6G57J7.js} +1 -1
- package/chunks/{web-fetch-EVO7GDEB.js → web-fetch-K575OWZ7.js} +1 -1
- package/chunks/{web-search-SJMJGGPE.js → web-search-F6JRBXFV.js} +1 -1
- package/chunks/{workflow-2H6H2FR4.js → workflow-UE6CXBGG.js} +2 -2
- package/chunks/write-file-OAKHVSC6.js +15 -0
- package/cli.js +444 -441
- package/package.json +2 -2
- package/chunks/agent-OP5PDZKJ.js +0 -3
- package/chunks/agent-headless-GLMZVYOK.js +0 -3
- package/chunks/chunk-2HFKTFO5.js +0 -9
- package/chunks/chunk-5QAKUC2D.js +0 -14
- package/chunks/chunk-EPA3A73R.js +0 -56
- package/chunks/chunk-FW6Z25AA.js +0 -3
- package/chunks/chunk-L5ASITMV.js +0 -9
- package/chunks/chunk-MW3LAIJW.js +0 -8
- package/chunks/chunk-N6BOYL6K.js +0 -27
- package/chunks/chunk-SOKNPND5.js +0 -8
- package/chunks/chunk-SWEYYDZO.js +0 -8
- package/chunks/chunk-U3O6TMV7.js +0 -8
- package/chunks/chunk-UHDKX2CR.js +0 -8
- package/chunks/chunk-VBOVIARK.js +0 -9
- package/chunks/contextCommand-F34RZJU6.js +0 -3
- package/chunks/glob-T2SHBIJY.js +0 -22
- package/chunks/ls-IBIDQ5NV.js +0 -15
- package/chunks/matildaContentGenerator-FI2P7XPI.js +0 -8
- package/chunks/monitor-O46CPAVO.js +0 -32
- package/chunks/notebook-edit-M4XPR4X3.js +0 -17
- package/chunks/read-file-4TZCSTH7.js +0 -3
- package/chunks/ripGrep-FTFD4K7L.js +0 -3
- package/chunks/scheduler-PRAGNX3C.js +0 -8
- package/chunks/shell-YO6J22BF.js +0 -3
- package/chunks/src-EYWD2F72.js +0 -3
- package/chunks/symbol-search-ZV6W6DPK.js +0 -19
- package/chunks/task-create-T43QIG2F.js +0 -3
- package/chunks/team-delete-LIEVUGIX.js +0 -8
- package/chunks/write-file-6A7X7F5R.js +0 -15
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{c as T,f}from"./chunk-2HFKTFO5.js";import{s as o}from"./chunk-X4ML2NEE.js";import"./chunk-TISQNFB5.js";import{g}from"./chunk-QKYGQLWC.js";import{g as l,i as c,p,q as u}from"./chunk-BGZJUBRA.js";import"./chunk-SWEYYDZO.js";import{Z as i}from"./chunk-5QAKUC2D.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,15 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{a as _}from"./chunk-YTGWPLEA.js";import{$e as Y,Ne as C,Oe as u,Ue as G,Ve as Q,Ye as V,ka as S,se as k,te as q,vc as Z}from"./chunk-EU5CK2VJ.js";import"./chunk-TZIDSCTF.js";import"./chunk-2HFKTFO5.js";import"./chunk-UHDKX2CR.js";import"./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-QF6BOPQB.js";import"./chunk-47XR7IMP.js";import"./chunk-MW3LAIJW.js";import"./chunk-QKYGQLWC.js";import"./chunk-LNTO3FNQ.js";import"./chunk-L5ASITMV.js";import"./chunk-RNKDFE2S.js";import"./chunk-SOKNPND5.js";import"./chunk-UTS2D2OV.js";import"./chunk-XITA5WMN.js";import"./chunk-4Z6HQEVC.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{Lb as z,Oa as B,_c as K,ca as U,ha as w}from"./chunk-OVC5Z3EX.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{w as H}from"./chunk-VB4MJSMC.js";import"./chunk-OXHC3R2R.js";import{g as $,i as N,p as L,q as j}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 R,B as b,D as O,Z as M,a as d,c as D}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as I}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";I();import P from"node:fs";import y from"node:path";var F=M("WRITE_FILE"),ae=["filePath","filepath","path","file","filename"];function le(f){if(!(typeof f.file_path=="string"&&f.file_path.trim()))for(let a of ae){let o=f[a];if(typeof o=="string"&&o.trim()){f.file_path=o,delete f[a];return}}}function ce(f){let a=f.content;if(typeof a!="string"||!a.includes("<arg_")&&!a.includes("</arg_"))return;let o={},e=/<arg_key>\s*([A-Za-z_][\w]*)\s*<\/arg_key>\s*<arg_value>\s*([\s\S]+?)(?:<\/arg_value>|(?=<arg_key\b)|$)/gi,r;for(;(r=e.exec(a))!==null;){let i=r[1].toLowerCase(),n=r[2].trim();n&&(o[i]=n)}let l=/(?:^|[^>])([A-Za-z_][\w]*)\s*<\/arg_key>\s*<arg_value>\s*([\s\S]+?)(?:<\/arg_value>|(?=<arg_key\b)|(?=[A-Za-z_][\w]*\s*<\/arg_key>)|$)/gi;for(;(r=l.exec(a))!==null;){let i=r[1].toLowerCase(),n=r[2].trim();(n&&!o[i]||n&&n.length>=(o[i]?.length??0))&&(o[i]=n)}let h=[a.search(/<arg_key\b/i),a.search(/<\/arg_key\b/i),a.search(/<arg_value\b/i)].filter(i=>i>=0),g=h.length>0?Math.min(...h):-1;if(g>=0&&a.slice(g,g+10).startsWith("</arg_key")){let i=a.slice(0,g),n=/([A-Za-z_][\w]*)\s*$/.exec(i);n&&(g=n.index)}let c=g>=0?a.slice(0,g).trimEnd():a;c=c.replace(/<\/?arg_(?:key|value)\b[^>]*>/gi,"").trimEnd(),f.content=c;let m=new Set(["file_path","filepath","path","file","filename"]);for(let[i,n]of Object.entries(o))!m.has(i)||!n||!n.startsWith("/")&&!/^[A-Za-z]:[\\/]/.test(n)||(typeof f.file_path!="string"||!String(f.file_path).trim()||n.length>String(f.file_path).length)&&(f.file_path=n)}var A=class extends ${constructor(o,e){super(e);this.config=o}toolLocations(){return[{path:this.params.file_path}]}getDescription(){let o=b(this.params.file_path,this.config.getTargetDir());return`Writing to ${R(o)}`}async getDefaultPermission(){let o=this.config.getProjectRoot();return H(y.resolve(this.params.file_path),o)?"allow":"ask"}async getConfirmationDetails(o){let e=_(this.config,this.params.file_path);if(e)throw new C(e,"path_not_in_workspace");let r="",l=await w(this.params.file_path);if(!this.config.getFileReadCacheDisabled()){let i=await u(this.config.getFileReadCache(),this.params.file_path,"overwriting");if(!i.ok)throw new C(i.rawMessage,i.type)}if(l)try{let{content:i}=await this.config.getFileSystemService().readTextFile({path:this.params.file_path});r=i}catch(i){if(d(i)&&i.code==="ENOENT")l=!1;else throw new Error(`Error reading existing file for confirmation: ${D(i)}`)}if(l&&!this.config.getFileReadCacheDisabled()){let i=await u(this.config.getFileReadCache(),this.params.file_path,"overwriting",{expectExisting:!0});if(!i.ok)throw F.warn("post-read TOCTOU rejection (confirmation)",{path:this.params.file_path,reason:i.type}),new C(i.rawMessage,i.type)}let h=b(this.params.file_path,this.config.getTargetDir()),g=y.basename(this.params.file_path),c=S(g,r,this.params.content,"Current","Proposed",k);return{type:"edit",title:`Confirm Write: ${R(h)}`,fileName:g,filePath:this.params.file_path,fileDiff:c,originalContent:r,newContent:this.params.content,onConfirm:async i=>{i==="proceed_always"&&this.config.setApprovalMode("auto-edit")}}}async execute(o){let{file_path:e,content:r,ai_proposed_content:l,modified_by_user:h}=this.params,g=_(this.config,e);if(g)return{llmContent:g,returnDisplay:g,error:{message:g,type:"path_not_in_workspace"}};let c=await w(e),m="",i=!1,n,W,J=y.dirname(e);if(!this.config.getFileReadCacheDisabled()){let t=await u(this.config.getFileReadCache(),e,"overwriting");if(!t.ok)return{llmContent:t.rawMessage,returnDisplay:`Error: ${t.displayMessage}`,error:{message:t.rawMessage,type:t.type}}}if(c)try{let t=await this.config.getFileSystemService().readTextFile({path:e});t._meta?.bom!==void 0?i=t._meta.bom:i=t.content.length>0&&t.content.codePointAt(0)===65279,n=t._meta?.encoding||"utf-8",W=V(t.content),m=t.content,c=!0}catch(t){if(d(t)&&t.code==="ENOENT")c=!1;else{let s={message:D(t),code:d(t)?t.code:void 0},p=s.code?`Error checking existing file '${e}': ${s.message} (${s.code})`:`Error checking existing file: ${s.message}`;return{llmContent:p,returnDisplay:p,error:{message:p,type:"file_write_failure"}}}}if(c&&!this.config.getFileReadCacheDisabled()){let t=await u(this.config.getFileReadCache(),e,"overwriting",{expectExisting:!0});if(!t.ok)return F.warn("post-read TOCTOU rejection (execute)",{path:e,reason:t.type}),{llmContent:t.rawMessage,returnDisplay:`Error: ${t.displayMessage}`,error:{message:t.rawMessage,type:t.type}}}if(!c){let t=this.config.getDefaultFileEncoding();t===G.UTF8_BOM?i=!0:t===void 0&&(i=Q(e)),n=void 0}try{await this.config.getFileHistoryService().trackEdit(e)}catch{}if(!this.config.getFileReadCacheDisabled()){let t=await u(this.config.getFileReadCache(),e,"overwriting",{expectExisting:c});if(!t.ok)return F.warn("pre-write TOCTOU rejection",{path:e,reason:t.type}),{llmContent:t.rawMessage,returnDisplay:`Error: ${t.displayMessage}`,error:{message:t.rawMessage,type:t.type}}}let E=_(this.config,e);if(E)return{llmContent:E,returnDisplay:E,error:{message:E,type:"path_not_in_workspace"}};c||P.mkdirSync(J,{recursive:!0});try{let t=_(this.config,e);if(t)return{llmContent:t,returnDisplay:t,error:{message:t,type:"path_not_in_workspace"}};await this.config.getFileSystemService().writeTextFile({path:e,content:r,_meta:{bom:i,encoding:n,lineEnding:W}}),h||Z.getInstance().recordEdit(e,c?m:null,r);try{let T=P.statSync(e);this.config.getFileReadCache().recordWrite(e,T)}catch{}let s=y.basename(e),p=m,X=S(s,p,r,"Original","Written",k),ee=q(s,p,l||r,r),v=[c?`Successfully overwrote file: ${e}.`:`Successfully created and wrote to new file: ${e}.`];h&&v.push(`User modified the \`content\` to be: ${r}`);let te=U(e),ie=B(e),oe=y.extname(e),re=c?"update":"create",ne=r.split(`
|
|
4
|
-
`).length;z(this.config,new K(x.Name,re,ne,te,oe,ie));let se={fileDiff:X,fileName:s,originalContent:m,newContent:r,diffStat:ee};try{let T=await Y(this.config,e);T&&v.push(`
|
|
5
|
-
|
|
6
|
-
${T}`)}catch{}return{llmContent:v.join(" "),returnDisplay:se}}catch(t){let s,p="file_write_failure";return d(t)?(s=`Error writing to file '${e}': ${t.message} (${t.code})`,t.code==="EACCES"?(s=`Permission denied writing to file: ${e} (${t.code})`,p="permission_denied"):t.code==="ENOSPC"?(s=`No space left on device: ${e} (${t.code})`,p="no_space_left"):t.code==="EISDIR"&&(s=`Target is a directory, not a file: ${e} (${t.code})`,p="target_is_directory"),this.config.getDebugMode()&&t.stack&&F.debug("Write file error stack:",t.stack)):t instanceof Error?s=`Error writing to file: ${t.message}`:s=`Error writing to file: ${String(t)}`,{llmContent:s,returnDisplay:s,error:{message:s,type:p}}}}},x=class f extends N{constructor(o){super(f.Name,j.WRITE_FILE,`Writes content to a specified file in the local filesystem.
|
|
7
|
-
|
|
8
|
-
CRITICAL: Always emit file_path FIRST (absolute path), then content. Never omit file_path. Construct absolute paths from the project root + relative path (e.g. '/path/to/project/' + 'foo/bar.txt'). Relative paths are not supported.
|
|
9
|
-
|
|
10
|
-
The user has the ability to modify \`content\`. If modified, this will be stated in the response.`,"edit",{properties:{file_path:{description:"REQUIRED. Absolute path to write (e.g. '/home/user/project/src/auth.ts'). Emit this BEFORE content.",type:"string"},content:{description:"The full file contents to write. Only after file_path is set.",type:"string"}},required:["file_path","content"],type:"object"});this.config=o}static Name=L.WRITE_FILE;validateToolParams(o){let e=o;return ce(e),le(e),(typeof o.file_path!="string"||!o.file_path.trim())&&typeof o.content=="string"&&o.content.length>0?'WriteFile requires absolute "file_path" (emit file_path first, then content). Retry with both file_path and content.':super.validateToolParams(o)}validateToolParamValues(o){let e=O(o.file_path.trim());if(o.file_path=e,!e)return'Missing or empty "file_path"';if(!y.isAbsolute(e))return`File path must be absolute: ${e}`;try{if(P.existsSync(e)&&P.lstatSync(e).isDirectory())return`Path is a directory, not a file: ${e}`}catch(r){return`Error accessing path properties for validation: ${e}. Reason: ${r instanceof Error?r.message:String(r)}`}return null}createInvocation(o){return new A(this.config,o)}toAutoClassifierInput(o){let e=o.content??"";return{file_path:o.file_path,byte_count:Buffer.byteLength(e,"utf8"),content_preview:e.slice(0,300),content_truncated:e.length>300}}getModifyContext(o){return{getFilePath:e=>e.file_path,getCurrentContent:async e=>{if(await w(e.file_path))try{let{content:l}=await this.config.getFileSystemService().readTextFile({path:e.file_path});return l}catch(l){if(!d(l)||l.code!=="ENOENT")throw l;return""}else return""},getProposedContent:async e=>e.content,createUpdatedParams:(e,r,l)=>{let h=l.content;return{...l,ai_proposed_content:h,content:r,modified_by_user:!0}}}}};export{x as WriteFileTool,le as normalizeWriteFilePathAliases,ce as repairLeakedWriteFileToolArgMarkup};
|
|
11
|
-
/**
|
|
12
|
-
* @license
|
|
13
|
-
* Copyright 2025 Google LLC
|
|
14
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
15
|
-
*/
|