@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
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{Oj as C,Qj as x,Sf as k,Vf as W,ag as l}from"./chunk-AMO6HY3T.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-RQIV43CR.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-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 E,i as R,p as c,q as T}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{Z as b,a as $}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as y}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";y();import*as S from"node:fs/promises";var h=b("EXIT_WORKTREE"),O=`Exits a worktree previously created by ${c.ENTER_WORKTREE}.
3
+ import{Pj as C,Rj as x,Tf as k,Wf as W,bg as l}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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 E,i as R,p as c,q as T}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{aa as b,b as $}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as y}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";y();import*as S from"node:fs/promises";var h=b("EXIT_WORKTREE"),O=`Exits a worktree previously created by ${c.ENTER_WORKTREE}.
4
4
 
5
5
  ## Behavior
6
6
 
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as k}from"./chunk-ILBTI4K5.js";import{I as w,If as M,lg as $}from"./chunk-AMO6HY3T.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-RQIV43CR.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-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 G,i as R,p as T,q as _}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{Z as f}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as h}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";h();h();h();var E=f("GATE_REVIEW_AGENTS");function L(n){return`You are a Plan Design Reviewer for the Plan Approval Gate. Review the plan across three dimensions:
3
+ import{a as k}from"./chunk-ILBTI4K5.js";import{I as w,Jf as M,mg as $}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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 G,i as R,p as T,q as _}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{aa as f}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as h}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";h();h();h();var E=f("GATE_REVIEW_AGENTS");function L(n){return`You are a Plan Design Reviewer for the Plan Approval Gate. Review the plan across three dimensions:
4
4
 
5
5
  1. **Request Fit** \u2014 Does the plan fulfill every part of the user's original request and respect all explicit constraints? Does it do anything the user explicitly asked NOT to do?
6
6
  2. **System Fit** \u2014 Does the plan align with the codebase structure, file paths, function names, permission model, and integration boundaries found during investigation?
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as g}from"./chunk-SOKNPND5.js";import{g as u}from"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{f as d}from"./chunk-SDTWBD62.js";import"./chunk-SWEYYDZO.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();m();var p=class{googleGenAI;contentGeneratorConfig;constructor(e,t){let r=t?.customHeaders,n=r?(()=>{let i=e.httpOptions,s=i?.headers??{},l=Object.fromEntries(Object.entries(r).filter(([a])=>!d(a)));return{...e,httpOptions:{...i??{},headers:{...s,...l}}}})():e;this.googleGenAI=new u(n),this.contentGeneratorConfig=t}buildGenerateContentConfig(e){let t=this.contentGeneratorConfig?.samplingParams,r=e.config||{},n=(i,s,l)=>{let a=r[s];return i!==void 0?i:a!==void 0?a:l};return{...r,temperature:n(t?.temperature,"temperature",1),topP:n(t?.top_p,"topP",.95),topK:n(t?.top_k,"topK",64),maxOutputTokens:n(t?.max_tokens,"maxOutputTokens"),presencePenalty:n(t?.presence_penalty,"presencePenalty"),frequencyPenalty:n(t?.frequency_penalty,"frequencyPenalty"),thinkingConfig:n(this.buildThinkingConfig(),"thinkingConfig",{includeThoughts:!0,thinkingLevel:"THINKING_LEVEL_UNSPECIFIED"})}}buildThinkingConfig(){let e=this.contentGeneratorConfig?.reasoning;if(e===!1)return{includeThoughts:!1};if(e)return{includeThoughts:!0,thinkingLevel:e.effort==="low"?"LOW":e.effort==="high"||e.effort==="max"?"HIGH":"THINKING_LEVEL_UNSPECIFIED"}}async generateContent(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContent(r)}async generateContentStream(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContentStream(r)}stripUnsupportedFields(e){return!e||typeof e=="string"?e:Array.isArray(e)?e.map(t=>this.stripContentFields(t)):this.stripContentFields(e)}stripContentFields(e){if(typeof e=="string")return e;if(!("role"in e)&&!("parts"in e))return this.stripPartFields(e);let t=e;return t.parts?{...t,parts:t.parts.map(r=>this.stripPartFields(r))}:t}stripPartFields(e){if(typeof e=="string")return e;let t={...e};if(t.inlineData){let{displayName:r,...n}=t.inlineData;t.inlineData=n}if(t.fileData){let{displayName:r,...n}=t.fileData;t.fileData=n}if(t.functionResponse?.parts){let r=t.functionResponse.parts.map(n=>{let i=this.convertUnsupportedMediaToText(n);return this.stripPartFields(i)});t.functionResponse={...t.functionResponse,parts:r}}return t}convertUnsupportedMediaToText(e){if(typeof e=="string")return e;let t=e.inlineData?.mimeType||"",r=e.fileData?.mimeType||"";if(t.startsWith("audio/")||t.startsWith("video/")){let n=e.inlineData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${t}${i}.`}}if(r.startsWith("audio/")||r.startsWith("video/")){let n=e.fileData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${r}${i}.`}}return e}async countTokens(e){return this.googleGenAI.models.countTokens(e)}async embedContent(e){return this.googleGenAI.models.embedContent(e)}useSummarizedThinking(){return!0}};function T(o,e){let i={...{"User-Agent":o.userAgent||`MatildaCode/0.21.5 (${process.platform}; ${process.arch})`}};if(e?.getUsageStatisticsEnabled()){let f=new g().getInstallationId();i={...i,"x-gemini-api-privileged-user-id":`${f}`}}let s=o.baseUrl?{headers:i,baseUrl:o.baseUrl}:{headers:i};return new p({apiKey:o.apiKey===""?void 0:o.apiKey,vertexai:o.vertexai,httpOptions:s},o)}export{p as GeminiContentGenerator,T as createGeminiContentGenerator};
3
+ import{a as g}from"./chunk-Q2I3ARPJ.js";import{g as u}from"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{f as d}from"./chunk-SDTWBD62.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as m}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";m();m();var p=class{googleGenAI;contentGeneratorConfig;constructor(e,t){let r=t?.customHeaders,n=r?(()=>{let i=e.httpOptions,s=i?.headers??{},l=Object.fromEntries(Object.entries(r).filter(([a])=>!d(a)));return{...e,httpOptions:{...i??{},headers:{...s,...l}}}})():e;this.googleGenAI=new u(n),this.contentGeneratorConfig=t}buildGenerateContentConfig(e){let t=this.contentGeneratorConfig?.samplingParams,r=e.config||{},n=(i,s,l)=>{let a=r[s];return i!==void 0?i:a!==void 0?a:l};return{...r,temperature:n(t?.temperature,"temperature",1),topP:n(t?.top_p,"topP",.95),topK:n(t?.top_k,"topK",64),maxOutputTokens:n(t?.max_tokens,"maxOutputTokens"),presencePenalty:n(t?.presence_penalty,"presencePenalty"),frequencyPenalty:n(t?.frequency_penalty,"frequencyPenalty"),thinkingConfig:n(this.buildThinkingConfig(),"thinkingConfig",{includeThoughts:!0,thinkingLevel:"THINKING_LEVEL_UNSPECIFIED"})}}buildThinkingConfig(){let e=this.contentGeneratorConfig?.reasoning;if(e===!1)return{includeThoughts:!1};if(e)return{includeThoughts:!0,thinkingLevel:e.effort==="low"?"LOW":e.effort==="high"||e.effort==="max"?"HIGH":"THINKING_LEVEL_UNSPECIFIED"}}async generateContent(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContent(r)}async generateContentStream(e,t){let r={...e,contents:this.stripUnsupportedFields(e.contents),config:this.buildGenerateContentConfig(e)};return this.googleGenAI.models.generateContentStream(r)}stripUnsupportedFields(e){return!e||typeof e=="string"?e:Array.isArray(e)?e.map(t=>this.stripContentFields(t)):this.stripContentFields(e)}stripContentFields(e){if(typeof e=="string")return e;if(!("role"in e)&&!("parts"in e))return this.stripPartFields(e);let t=e;return t.parts?{...t,parts:t.parts.map(r=>this.stripPartFields(r))}:t}stripPartFields(e){if(typeof e=="string")return e;let t={...e};if(t.inlineData){let{displayName:r,...n}=t.inlineData;t.inlineData=n}if(t.fileData){let{displayName:r,...n}=t.fileData;t.fileData=n}if(t.functionResponse?.parts){let r=t.functionResponse.parts.map(n=>{let i=this.convertUnsupportedMediaToText(n);return this.stripPartFields(i)});t.functionResponse={...t.functionResponse,parts:r}}return t}convertUnsupportedMediaToText(e){if(typeof e=="string")return e;let t=e.inlineData?.mimeType||"",r=e.fileData?.mimeType||"";if(t.startsWith("audio/")||t.startsWith("video/")){let n=e.inlineData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${t}${i}.`}}if(r.startsWith("audio/")||r.startsWith("video/")){let n=e.fileData?.displayName,i=n?` (${n})`:"";return{text:`Unsupported media type for Gemini: ${r}${i}.`}}return e}async countTokens(e){return this.googleGenAI.models.countTokens(e)}async embedContent(e){return this.googleGenAI.models.embedContent(e)}useSummarizedThinking(){return!0}};function T(o,e){let i={...{"User-Agent":o.userAgent||`MatildaCode/0.21.6-nightly.20260910.566d96d64 (${process.platform}; ${process.arch})`}};if(e?.getUsageStatisticsEnabled()){let f=new g().getInstallationId();i={...i,"x-gemini-api-privileged-user-id":`${f}`}}let s=o.baseUrl?{headers:i,baseUrl:o.baseUrl}:{headers:i};return new p({apiKey:o.apiKey===""?void 0:o.apiKey,vertexai:o.vertexai,httpOptions:s},o)}export{p as GeminiContentGenerator,T as createGeminiContentGenerator};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2025 Google LLC
@@ -0,0 +1,22 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{Re as _,Se as j}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./chunk-QKYGQLWC.js";import"./chunk-FRL6KOLY.js";import"./chunk-VWWEEU4V.js";import{b as D}from"./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{g as k}from"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{g as M,i as C,p as N,q as A}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{G as $,J as O,N as v,aa as R,d as x}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();import z from"node:fs";import T from"node:path";var V=R("GLOB"),Y=100,B=2e4,W=15e3,q=500;function K(u,g,t){let e=[...u];return e.sort((r,s)=>{let c=r.mtimeMs??0,a=s.mtimeMs??0,o=g-c<t,l=g-a<t;return o&&l?a-c:o?-1:l?1:r.fullpath().localeCompare(s.fullpath())}),e}var S=class extends M{constructor(t,e){super(e);this.config=t;this.fileService=t.getFileService()}fileService;getDescription(){let t=`'${this.params.pattern}'`;return this.params.path&&(t+=` in path '${this.params.path}'`),t}async getDefaultPermission(){if(!this.params.path)return"allow";let t=this.config.getWorkspaceContext(),e=T.resolve(this.config.getTargetDir(),this.params.path);return t.isPathWithinWorkspace(e)||O(k(),e)?"allow":"ask"}async globInDirectory(t,e,r){let s=e,c=T.join(t,s);z.existsSync(c)&&(s=_(s));let a=j(s,{cwd:t,withFileTypes:!0,nodir:!0,stat:!0,nocase:!0,dot:!0,ignore:this.config.getFileExclusions().getGlobExcludes(),follow:!1,signal:r}),o=[],l=Date.now(),p=null;for await(let n of a){if(o.push(n),o.length>=B){p="count";break}if(Date.now()-l>W){p="time";break}o.length%q===0&&await new Promise(b=>setImmediate(b))}p&&a.destroy?.();let d=this.config.getTargetDir(),P=o.map(n=>T.relative(d,n.fullpath())),{filteredPaths:m}=this.fileService.filterFilesWithReport(P,this.getFileFilteringOptions()),h=n=>process.platform==="win32"||process.platform==="darwin"?n.toLowerCase():n,f=new Set(m.map(n=>h(T.resolve(d,n))));return{entries:o.filter(n=>f.has(h(n.fullpath()))),limited:p}}async execute(t){try{let e=[],r;if(this.params.path){let i=v(this.config,this.params.path,{allowExternalPaths:!0});e.push(i),r=`within ${i}`}else{let i=this.config.getWorkspaceContext().getDirectories();e.push(...i),r=i.length>1?`across ${i.length} workspace directories`:"in the workspace directory"}let s=this.params.pattern,c=[],a=new Set,o=null;for(let i of e){let{entries:F,limited:E}=await this.globInDirectory(i,s,t);E&&(o=E);for(let G of F){let I=G.fullpath();a.has(I)||(a.add(I),c.push(G))}}let l=c,p=o==="time"?`
4
+
5
+ [Search stopped after ${W/1e3}s before scanning the whole tree. Results may be incomplete \u2014 narrow the search by passing a more specific 'path' or pattern.]`:o==="count"?`
6
+
7
+ [Search stopped after scanning ${B} entries. Results may be incomplete \u2014 narrow the search by passing a more specific 'path' or pattern.]`:"";if(!l||l.length===0)return{llmContent:`No files found matching pattern "${this.params.pattern}" ${r}${p}`,returnDisplay:o?"No files found (search truncated)":"No files found"};let d=24*60*60*1e3,P=new Date().getTime(),m=K(l,P,d),h=m.length,f=Math.min(Y,this.config.getTruncateToolOutputLines()),y=h>f,b=(y?m.slice(0,f):m).map(i=>i.fullpath()),X=b.join(`
8
+ `),w=`Found ${h} file(s) matching "${this.params.pattern}" ${r}`;if(w+=`, sorted by modification time (newest first):
9
+ ---
10
+ ${X}`,y){let i=h-f;w+=`
11
+ ---
12
+ [${i} ${i===1?"file":"files"} truncated] ...`}return w+=p,{llmContent:w,returnDisplay:`Found ${h} matching file(s)${y?" (truncated)":""}`,resultFilePaths:b}}catch(e){let r=e instanceof Error?e.message:String(e);V.error(`GlobLogic execute Error: ${r}`,e);let s=`Error during glob search operation: ${r}`;return{llmContent:s,returnDisplay:`Error: ${r||"An unexpected error occurred."}`,error:{message:s,type:"glob_execution_error"}}}}getFileFilteringOptions(){let t=this.config.getFileFilteringOptions?.();return{respectGitIgnore:t?.respectGitIgnore??D.respectGitIgnore,respectMatildaIgnore:t?.respectMatildaIgnore??D.respectMatildaIgnore}}},U=class u extends C{constructor(t){super(u.Name,A.GLOB,`Fast file pattern matching tool that works with any codebase size
13
+ - Supports glob patterns like "**/*.js" or "src/**/*.ts"
14
+ - Returns matching file paths sorted by modification time
15
+ - Use this tool when you need to find files by name patterns
16
+ - When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
17
+ - You have the capability to call multiple tools in a single response. It is always better to speculatively perform multiple searches as a batch that are potentially useful.`,"search",{properties:{pattern:{description:"The glob pattern to match files against",type:"string"},path:{description:'The directory to search in. If not specified, the current working directory will be used. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Must be a valid directory path if provided.',type:"string"}},required:["pattern"],type:"object"});this.config=t}static Name=N.GLOB;validateToolParamValues(t){if(!t.pattern||typeof t.pattern!="string"||t.pattern.trim()==="")return"The 'pattern' parameter cannot be empty.";if(t.path){t.path=$(t.path.trim());try{v(this.config,t.path,{allowExternalPaths:!0})}catch(e){return x(e)}}return null}createInvocation(t){return new S(this.config,t)}};export{U as GlobTool,B as MAX_SCAN_ENTRIES,W as MAX_SCAN_MS,K as sortFileEntries};
18
+ /**
19
+ * @license
20
+ * Copyright 2025 Google LLC
21
+ * SPDX-License-Identifier: Apache-2.0
22
+ */
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{Kj as K,Lj as Y,Re as z,aa as q,fd as F}from"./chunk-AMO6HY3T.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-RQIV43CR.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-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{g as _}from"./chunk-VB4MJSMC.js";import"./chunk-OXHC3R2R.js";import{g as U,i as V,p as H,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{D as O,G as W,K as S,Z as j,a as I,c as P}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as B}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";B();import tt from"node:fs/promises";import y from"node:path";import{EOL as et}from"node:os";import{spawn as X}from"node:child_process";var k=j("GREP"),M=class extends U{constructor(e,s){super(s);this.config=e;this.fileExclusions=e.getFileExclusions()}fileExclusions;async getDefaultPermission(){if(!this.params.path)return"allow";let e=this.config.getWorkspaceContext(),s=y.resolve(this.config.getTargetDir(),this.params.path);return e.isPathWithinWorkspace(s)||W(_(),s)?"allow":"ask"}async execute(e){try{let s=[],i;if(this.params.path){let t=S(this.config,this.params.path,{allowExternalPaths:!0});s.push(t),i=`in path "${this.params.path}"`}else{let t=this.config.getWorkspaceContext().getDirectories();s.push(...t),i=t.length>1?`across ${t.length} workspace directories`:"in the workspace directory"}let l=[];for(let t of s){let o=await this.performGrepSearch({pattern:this.params.pattern,path:t,glob:this.params.glob,signal:e});if(s.length>1)for(let a of o)y.isAbsolute(a.filePath)||(a.filePath=y.resolve(t,a.filePath));l.push(...o)}if(s.length>1){let t=new Set;l=l.filter(o=>{let a=`${o.filePath}:${o.lineNumber}`;return t.has(a)?!1:(t.add(a),!0)})}let f=this.params.glob?` (filter: "${this.params.glob}")`:"";if(l.length===0)return{llmContent:`No matches found for pattern "${this.params.pattern}" ${i}${f}.`,returnDisplay:"No matches found"};let h=this.config.getTruncateToolOutputThreshold(),w=Math.min(this.config.getTruncateToolOutputLines(),this.params.limit??Number.POSITIVE_INFINITY),$=!1,C=l;l.length>w&&(C=l.slice(0,w),$=!0);let E=l.length,x=E===1?"match":"matches",G=`Found ${E} ${x} for pattern "${this.params.pattern}" ${i}${f}:
3
+ import{Lj as K,Mj as Y,Se as z,ba as q,gd as F}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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{g as _}from"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{g as U,i as V,p as H,q as J}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{G as O,J as W,N as S,aa as j,b as I,d as P}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as B}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";B();import tt from"node:fs/promises";import y from"node:path";import{EOL as et}from"node:os";import{spawn as X}from"node:child_process";var k=j("GREP"),M=class extends U{constructor(e,s){super(s);this.config=e;this.fileExclusions=e.getFileExclusions()}fileExclusions;async getDefaultPermission(){if(!this.params.path)return"allow";let e=this.config.getWorkspaceContext(),s=y.resolve(this.config.getTargetDir(),this.params.path);return e.isPathWithinWorkspace(s)||W(_(),s)?"allow":"ask"}async execute(e){try{let s=[],i;if(this.params.path){let t=S(this.config,this.params.path,{allowExternalPaths:!0});s.push(t),i=`in path "${this.params.path}"`}else{let t=this.config.getWorkspaceContext().getDirectories();s.push(...t),i=t.length>1?`across ${t.length} workspace directories`:"in the workspace directory"}let l=[];for(let t of s){let o=await this.performGrepSearch({pattern:this.params.pattern,path:t,glob:this.params.glob,signal:e});if(s.length>1)for(let a of o)y.isAbsolute(a.filePath)||(a.filePath=y.resolve(t,a.filePath));l.push(...o)}if(s.length>1){let t=new Set;l=l.filter(o=>{let a=`${o.filePath}:${o.lineNumber}`;return t.has(a)?!1:(t.add(a),!0)})}let f=this.params.glob?` (filter: "${this.params.glob}")`:"";if(l.length===0)return{llmContent:`No matches found for pattern "${this.params.pattern}" ${i}${f}.`,returnDisplay:"No matches found"};let h=this.config.getTruncateToolOutputThreshold(),w=Math.min(this.config.getTruncateToolOutputLines(),this.params.limit??Number.POSITIVE_INFINITY),$=!1,C=l;l.length>w&&(C=l.slice(0,w),$=!0);let E=l.length,x=E===1?"match":"matches",G=`Found ${E} ${x} for pattern "${this.params.pattern}" ${i}${f}:
4
4
  ---
5
5
  `,v=C.reduce((t,o)=>{let a=o.filePath;return t[a]||(t[a]=[]),t[a].push(o),t[a].sort((L,D)=>L.lineNumber-D.lineNumber),t},{}),n="",g=[],m=!1,c=(t,o)=>Number.isFinite(h)&&n.length+t.length>h?(n+=t.slice(0,Math.max(h-n.length,0)),n+="...",o&&g.push(o),m=!0,!1):(n+=t,o&&g.push(o),!0);for(let t in v){if(!c(`File: ${t}
6
6
  `))break;let o=!1;for(let a of v[t]){let L=a.line.trim();if(!c(`L${a.lineNumber}: ${L}
@@ -1,3 +1,3 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{b as a}from"./chunk-MW3LAIJW.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as KeychainTokenStorage};
3
+ import{b as a}from"./chunk-FWIVFCKF.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as KeychainTokenStorage};
@@ -0,0 +1,15 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{b as d}from"./chunk-RNKDFE2S.js";import{g as N}from"./chunk-32PTAACU.js";import{g as C,i as x,p as w,q as F}from"./chunk-6B5BDE7S.js";import{D as E,E as I,G as S,J as u,K as L,P as R,aa as O}from"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as v}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";v();import y from"node:fs/promises";import s from"node:path";var A=O("LS"),U=100,T=class extends C{constructor(t,e){super(e);this.config=t}shouldIgnore(t,e){if(!e||e.length===0)return!1;for(let i of e){let a=i.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");if(new RegExp(`^${a}$`).test(t))return!0}return!1}getDescription(){let t=I(this.params.path,this.config.getTargetDir());return E(t)}async getDefaultPermission(){let t=s.resolve(this.params.path),e=this.config.getWorkspaceContext(),i=this.config.storage.getUserSkillsDirs(),a=R.getUserExtensionsDir();return e.isPathWithinWorkspace(t)||L(i,t)||u(a,t)||u(N(),t)?"allow":"ask"}errorResult(t,e,i){return{llmContent:t,returnDisplay:`Error: ${e}`,error:{message:t,type:i}}}async execute(t){try{let e=await y.stat(this.params.path);if(!e)return this.errorResult(`Error: Directory not found or inaccessible: ${this.params.path}`,"Directory not found or inaccessible.","file_not_found");if(!e.isDirectory())return this.errorResult(`Error: Path is not a directory: ${this.params.path}`,"Path is not a directory.","path_is_not_a_directory");let i=await y.readdir(this.params.path);if(i.length===0)return{llmContent:`Directory ${this.params.path} is empty.`,returnDisplay:"Directory is empty."};let a=i.map(r=>s.relative(this.config.getTargetDir(),s.join(this.params.path,r))),_=this.config.getFileService(),{filteredPaths:k,gitIgnoredCount:P,matildaIgnoredCount:b}=_.filterFilesWithReport(a,{respectGitIgnore:this.params.file_filtering_options?.respect_git_ignore??this.config.getFileFilteringOptions().respectGitIgnore??d.respectGitIgnore,respectMatildaIgnore:this.params.file_filtering_options?.respect_matilda_ignore??this.config.getFileFilteringOptions().respectMatildaIgnore??d.respectMatildaIgnore}),l=[];for(let r of k){let o=s.resolve(this.config.getTargetDir(),r);if(!this.shouldIgnore(s.basename(o),this.params.ignore))try{let c=await y.stat(o),$=c.isDirectory();l.push({name:s.basename(o),path:o,isDirectory:$,size:$?0:c.size,modifiedTime:c.mtime})}catch(c){A.warn(`Error accessing ${o}: ${c}`)}}l.sort((r,o)=>r.isDirectory&&!o.isDirectory?-1:!r.isDirectory&&o.isDirectory?1:r.name.localeCompare(o.name));let p=l.length,g=Math.min(U,this.config.getTruncateToolOutputLines()),m=p>g,W=(m?l.slice(0,g):l).map(r=>`${r.isDirectory?"[DIR] ":""}${r.name}`).join(`
4
+ `),h=`Listed ${p} item(s) in ${this.params.path}:
5
+ ---
6
+ ${W}`;if(m){let r=p-g;h+=`
7
+ ---
8
+ [${r} ${r===1?"item":"items"} truncated] ...`}let n=[];P>0&&n.push(`${P} git-ignored`),b>0&&n.push(`${b} matilda-ignored`),n.length>0&&(h+=`
9
+
10
+ (${n.join(", ")})`);let f=`Listed ${p} item(s)`;return n.length>0&&(f+=` (${n.join(", ")})`),m&&(f+=" (truncated)"),{llmContent:h,returnDisplay:f}}catch(e){let i=`Error listing directory: ${e instanceof Error?e.message:String(e)}`;return this.errorResult(i,"Failed to list directory.","ls_execution_error")}}},M=class D extends x{constructor(t){super(D.Name,F.LS,"Lists the names of files and subdirectories directly within a specified directory path. Can optionally ignore entries matching provided glob patterns.","search",{properties:{path:{description:"The absolute path to the directory to list (must be absolute, not relative)",type:"string"},ignore:{description:"List of glob patterns to ignore",items:{type:"string"},type:"array"},file_filtering_options:{description:"Optional: Whether to respect ignore patterns from .gitignore or .matildaignore",type:"object",properties:{respect_git_ignore:{description:"Optional: Whether to respect .gitignore patterns when listing files. Only available in git repositories. Defaults to true.",type:"boolean"},respect_matilda_ignore:{description:"Optional: Whether to respect .matildaignore patterns when listing files. Defaults to true.",type:"boolean"}}}},required:["path"],type:"object"});this.config=t}static Name=w.LS;validateToolParamValues(t){return t.path=S(t.path.trim()),s.isAbsolute(t.path)?null:`Path must be absolute: ${t.path}`}createInvocation(t){return new T(this.config,t)}};export{M as LSTool};
11
+ /**
12
+ * @license
13
+ * Copyright 2025 Google LLC
14
+ * SPDX-License-Identifier: Apache-2.0
15
+ */
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{g as b,i as D,p as R,q as N}from"./chunk-BGZJUBRA.js";import{D as P}from"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as S}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";S();import $ from"node:path";import{fileURLToPath as L,pathToFileURL as q}from"node:url";var O=new Set(["goToDefinition","findReferences","hover","goToImplementation","prepareCallHierarchy"]),A=new Set(["documentSymbol","diagnostics"]),E=new Set(["workspaceSymbol"]),U=new Set(["incomingCalls","outgoingCalls"]),W=new Set(["codeActions"]),C=class extends b{constructor(t,e){super(e);this.config=t}getDescription(){let t=this.getOperationLabel();return this.params.operation==="workspaceSymbol"?`LSP ${t} for "${this.params.query??""}"`:this.params.operation==="documentSymbol"?this.params.filePath?`LSP ${t} for ${this.params.filePath}`:`LSP ${t}`:this.params.operation==="incomingCalls"||this.params.operation==="outgoingCalls"?`LSP ${t} for ${this.describeCallHierarchyItemShort()}`:this.params.filePath&&this.params.line!==void 0?`LSP ${t} at ${this.params.filePath}:${this.params.line}:${this.params.character??1}`:this.params.filePath?`LSP ${t} for ${this.params.filePath}`:`LSP ${t}`}async execute(t){let e=this.config.getLspClient();if(!e||!this.config.isLspEnabled()){let r=`LSP ${this.getOperationLabel()} is unavailable (LSP disabled or not initialized).`;return{llmContent:r,returnDisplay:r}}switch(this.params.operation){case"goToDefinition":return this.executeDefinitions(e);case"findReferences":return this.executeReferences(e);case"hover":return this.executeHover(e);case"documentSymbol":return this.executeDocumentSymbols(e);case"workspaceSymbol":return this.executeWorkspaceSymbols(e);case"goToImplementation":return this.executeImplementations(e);case"prepareCallHierarchy":return this.executePrepareCallHierarchy(e);case"incomingCalls":return this.executeIncomingCalls(e);case"outgoingCalls":return this.executeOutgoingCalls(e);case"diagnostics":return this.executeDiagnostics(e);case"workspaceDiagnostics":return this.executeWorkspaceDiagnostics(e);case"codeActions":return this.executeCodeActions(e);default:{let r=`Unsupported LSP operation: ${this.params.operation}`;return{llmContent:r,returnDisplay:r}}}}async executeDefinitions(t){let e=this.resolveLocationTarget();if("error"in e)return{llmContent:e.error,returnDisplay:e.error};let r=this.params.limit??20,i=[];try{i=await t.definitions(e.location,this.params.serverName,r)}catch(n){let c=`LSP go-to-definition failed: ${n?.message||String(n)}`;return{llmContent:c,returnDisplay:c}}if(!i.length){let n=`No definitions found for ${e.description}.`;return{llmContent:n,returnDisplay:n}}let s=this.config.getProjectRoot(),a=i.slice(0,r).map((n,c)=>`${c+1}. ${this.formatLocationWithServer(n,s)}`);return{llmContent:[`Definitions for ${e.description}:`,...a].join(`
3
+ import{g as b,i as D,p as R,q as N}from"./chunk-6B5BDE7S.js";import{G as P}from"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as S}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";S();import $ from"node:path";import{fileURLToPath as L,pathToFileURL as q}from"node:url";var O=new Set(["goToDefinition","findReferences","hover","goToImplementation","prepareCallHierarchy"]),A=new Set(["documentSymbol","diagnostics"]),E=new Set(["workspaceSymbol"]),U=new Set(["incomingCalls","outgoingCalls"]),W=new Set(["codeActions"]),C=class extends b{constructor(t,e){super(e);this.config=t}getDescription(){let t=this.getOperationLabel();return this.params.operation==="workspaceSymbol"?`LSP ${t} for "${this.params.query??""}"`:this.params.operation==="documentSymbol"?this.params.filePath?`LSP ${t} for ${this.params.filePath}`:`LSP ${t}`:this.params.operation==="incomingCalls"||this.params.operation==="outgoingCalls"?`LSP ${t} for ${this.describeCallHierarchyItemShort()}`:this.params.filePath&&this.params.line!==void 0?`LSP ${t} at ${this.params.filePath}:${this.params.line}:${this.params.character??1}`:this.params.filePath?`LSP ${t} for ${this.params.filePath}`:`LSP ${t}`}async execute(t){let e=this.config.getLspClient();if(!e||!this.config.isLspEnabled()){let r=`LSP ${this.getOperationLabel()} is unavailable (LSP disabled or not initialized).`;return{llmContent:r,returnDisplay:r}}switch(this.params.operation){case"goToDefinition":return this.executeDefinitions(e);case"findReferences":return this.executeReferences(e);case"hover":return this.executeHover(e);case"documentSymbol":return this.executeDocumentSymbols(e);case"workspaceSymbol":return this.executeWorkspaceSymbols(e);case"goToImplementation":return this.executeImplementations(e);case"prepareCallHierarchy":return this.executePrepareCallHierarchy(e);case"incomingCalls":return this.executeIncomingCalls(e);case"outgoingCalls":return this.executeOutgoingCalls(e);case"diagnostics":return this.executeDiagnostics(e);case"workspaceDiagnostics":return this.executeWorkspaceDiagnostics(e);case"codeActions":return this.executeCodeActions(e);default:{let r=`Unsupported LSP operation: ${this.params.operation}`;return{llmContent:r,returnDisplay:r}}}}async executeDefinitions(t){let e=this.resolveLocationTarget();if("error"in e)return{llmContent:e.error,returnDisplay:e.error};let r=this.params.limit??20,i=[];try{i=await t.definitions(e.location,this.params.serverName,r)}catch(n){let c=`LSP go-to-definition failed: ${n?.message||String(n)}`;return{llmContent:c,returnDisplay:c}}if(!i.length){let n=`No definitions found for ${e.description}.`;return{llmContent:n,returnDisplay:n}}let s=this.config.getProjectRoot(),a=i.slice(0,r).map((n,c)=>`${c+1}. ${this.formatLocationWithServer(n,s)}`);return{llmContent:[`Definitions for ${e.description}:`,...a].join(`
4
4
  `),returnDisplay:a.join(`
5
5
  `)}}async executeImplementations(t){let e=this.resolveLocationTarget();if("error"in e)return{llmContent:e.error,returnDisplay:e.error};let r=this.params.limit??20,i=[];try{i=await t.implementations(e.location,this.params.serverName,r)}catch(n){let c=`LSP go-to-implementation failed: ${n?.message||String(n)}`;return{llmContent:c,returnDisplay:c}}if(!i.length){let n=`No implementations found for ${e.description}.`;return{llmContent:n,returnDisplay:n}}let s=this.config.getProjectRoot(),a=i.slice(0,r).map((n,c)=>`${c+1}. ${this.formatLocationWithServer(n,s)}`);return{llmContent:[`Implementations for ${e.description}:`,...a].join(`
6
6
  `),returnDisplay:a.join(`
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{b as t}from"./chunk-743LSI67.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"./chunk-BGZJUBRA.js";import"./chunk-3YLXGE6T.js";import"./chunk-SWEYYDZO.js";import"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as n}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";n();function a(e,o){return new t(e,o)}export{t as MatildaAgentContentGenerator,a as createMatildaAgentContentGenerator};
3
+ import{b as t}from"./chunk-CM3HWOOK.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"./chunk-6B5BDE7S.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as n}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";n();function a(e,o){return new t(e,o)}export{t as MatildaAgentContentGenerator,a as createMatildaAgentContentGenerator};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2026 Matilda Team
@@ -0,0 +1,8 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{a as l,i as p}from"./chunk-MLQWXTK6.js";import"./chunk-LIWYWWOK.js";import"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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{d as u}from"./chunk-DC7LAFZZ.js";import"./chunk-S7G6QPEP.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{k as c}from"./chunk-SDTWBD62.js";import"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import"./chunk-6B5BDE7S.js";import{c as h}from"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import{aa as d,s as i,t as a}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as s}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";s();var m=class extends p{debugLogger=d("MATILDA");matildaClient;sharedManager;currentToken;constructor(e,t,n){let r=new l(t,n);super(t,n,r),this.matildaClient=e,this.sharedManager=h.getInstance(),t?.baseUrl&&t?.apiKey&&(this.pipeline.client.baseURL=t?.baseUrl,this.pipeline.client.apiKey=t?.apiKey)}getCurrentEndpoint(e){let t=e||u,n="/v1",r=t.startsWith("http")?t:`https://${t}`;return r.endsWith(n)||r.endsWith("/api/v1")||r.endsWith("/api/v1/code")?r:`${r}${n}`}shouldSuppressErrorLogging(e,t){return this.isAuthError(e)}async getValidToken(){try{let e=await this.sharedManager.getValidCredentials(this.matildaClient);if(!e.access_token)throw new Error("No access token available");return{token:e.access_token,endpoint:this.getCurrentEndpoint(e.resource_url)}}catch(e){throw this.isAuthError(e)?e:(this.debugLogger.warn("Failed to get token from shared manager:",e),new Error("Failed to obtain a valid legacy OAuth access token. Please re-authenticate with Matilda."))}}async executeWithCredentialManagement(e){let t=async()=>{let{token:n,endpoint:r}=await this.getValidToken();this.pipeline.client.apiKey=n,this.pipeline.client.baseURL=r;try{return await e()}catch(o){throw a(o)?new i:o}};try{return await t()}catch(n){if(this.isAuthError(n))return await this.sharedManager.getValidCredentials(this.matildaClient,!0),await c("retry",t);throw n}}async generateContent(e,t){return this.executeWithCredentialManagement(()=>super.generateContent(e,t))}async generateContentStream(e,t){let n=await this.executeWithCredentialManagement(()=>super.generateContentStream(e,t));return async function*(){try{yield*n}catch(r){throw a(r)?new i:r}}()}async countTokens(e){return super.countTokens(e)}async embedContent(e){return this.executeWithCredentialManagement(()=>super.embedContent(e))}isAuthError(e){if(!e||a(e))return!1;let t=e instanceof Error?e.message.toLowerCase():String(e).toLowerCase(),n=e,r=n?.status||n?.code;return Number(r)===403?!1:r===401||r==="401"||t.includes("unauthorized")||t.includes("invalid api key")||t.includes("invalid access token")||t.includes("token expired")||t.includes("authentication")||t.includes("token")&&t.includes("expired")}getCurrentToken(){return this.currentToken?this.currentToken:this.sharedManager.getCurrentCredentials()?.access_token||null}clearToken(){this.currentToken=void 0,this.sharedManager.clearCache()}};export{m as MatildaContentGenerator};
4
+ /**
5
+ * @license
6
+ * Copyright 2025 Matilda
7
+ * SPDX-License-Identifier: Apache-2.0
8
+ */
@@ -1,3 +1,3 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q}from"./chunk-N6BOYL6K.js";import"./chunk-VBOVIARK.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-SWEYYDZO.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{d as CredentialsClearRequiredError,n as MATILDA_CREDENTIAL_FILE_MODE,j as MatildaOAuth2Client,k as MatildaOAuth2Event,e as MatildaOAuthPollError,o as cacheMatildaCredentials,q as clearCachedCredentialFile,p as clearMatildaCredentials,b as generateCodeChallenge,a as generateCodeVerifier,c as generatePKCEPair,m as getMatildaOAuthClient,f as isDeviceAuthorizationSuccess,h as isDeviceTokenPending,g as isDeviceTokenSuccess,i as isErrorResponse,l as matildaOAuth2Events};
3
+ import{d as a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q}from"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{d as CredentialsClearRequiredError,n as MATILDA_CREDENTIAL_FILE_MODE,j as MatildaOAuth2Client,k as MatildaOAuth2Event,e as MatildaOAuthPollError,o as cacheMatildaCredentials,q as clearCachedCredentialFile,p as clearMatildaCredentials,b as generateCodeChallenge,a as generateCodeVerifier,c as generatePKCEPair,m as getMatildaOAuthClient,f as isDeviceAuthorizationSuccess,h as isDeviceTokenPending,g as isDeviceTokenSuccess,i as isErrorResponse,l as matildaOAuth2Events};
@@ -0,0 +1,32 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{Fc as tt,Ke as st,Pe as L,Qc as et,Qe as at,Tc as ot,Uc as A,Zc as C,_c as nt,cd as it,qi as P,si as lt,ze as rt}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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 Z,i as q,p as Y,q as Q}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{K as J,aa as K,d as m}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as H}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";H();import{spawn as ct}from"node:child_process";import mt from"node:path";import{randomUUID as wt}from"node:crypto";var u=K("MONITOR"),Et=1e3,O=1e4,St=3e5,N=6e5,dt=80,R=4096,ut=5,ft=1e3;function pt(l){return l.length>dt?l.slice(0,dt-1)+"\u2026":l}var kt=new Set(["task-notification","task-id","tool-use-id","kind","status","event-count","summary","result"]),xt=/<(\/?)([a-zA-Z][a-zA-Z0-9-]*)>/g;function gt(l){let y="";for(let t=0;t<l.length;t++){let o=l.charCodeAt(t);if(o===9){y+=l[t];continue}o<32||o>=128&&o<=159||(y+=l[t])}return y=y.replace(xt,(t,o,a)=>kt.has(String(a).toLowerCase())?o==="/"?`</\u200B${a}>`:`<\u200B${a}>`:t),y}var U=class extends Z{constructor(t,o){super(o);this.config=t}callId;setCallId(t){this.callId=t}getDescription(){let t=this.params.description||C(this.params.command).spawnCommand;return`Monitor: ${pt(t)}`}async getDefaultPermission(){let t=C(this.params.command).safetyCommand;try{if(await L(t))return"allow"}catch(o){u.warn("AST read-only check failed, falling back to ask:",o)}return"ask"}async getConfirmationDetails(t){let o=C(this.params.command),a=ot(o.safetyCommand),f=[];for(let s of a){let p=!1;try{p=await L(s)}catch(d){u.warn("AST read-only check failed for monitor sub-command, falling back to ask:",d)}p||f.push(s)}let S=f.length>0?f:a,M=[...new Set(S.map(s=>A(s)).filter(s=>!!s))],v=[];try{let s=[];for(let p of S){let d=await at(p);s.push(...d)}v=[...new Set(s)].map(p=>`Monitor(${p})`)}catch(s){u.warn("Failed to extract monitor command rules:",s),v=[`Monitor(${o.safetyCommand})`]}let i=it(o.safetyCommand,this.params.command),c={type:"exec",title:"Monitor",command:o.spawnCommand,rootCommand:M.join(", ")||(A(o.safetyCommand)??o.spawnCommand),permissionRules:v,onConfirm:async(s,p)=>{}};return i&&(c.warnings=i),c}async execute(t){if(t.aborted)return{llmContent:"Monitor was cancelled before it could start.",returnDisplay:"Monitor cancelled."};let o=C(this.params.command),a=o.spawnCommand;o.strippedTrailingAmp&&u.warn("Stripped trailing & from monitor command \u2014 monitor lifecycle handles backgrounding");let f=gt(this.params.description||a),S=pt(f),M=Math.min(this.params.max_events??Et,O),v=Math.min(this.params.idle_timeout_ms??St,N),i=`mon_${wt().replace(/-/g,"").slice(0,16)}`,c=this.config.getMonitorRegistry(),s=tt()??void 0;if(c.getRunning().length>=P)return{llmContent:`Cannot start monitor: maximum concurrent monitors (${P}) reached. Stop an existing monitor first.`,returnDisplay:"Monitor rejected: too many concurrent monitors."};let d=new AbortController,g={monitorId:i,command:a,description:f,status:"running",startTime:Date.now(),abortController:d,toolUseId:this.callId,eventCount:0,lastEventTime:0,maxEvents:M,idleTimeoutMs:v,droppedLines:0,outputFile:lt(this.config.storage.getProjectDir(),this.config.getSessionId(),i),...s?{ownerAgentId:s}:{}},{executable:yt,argsPrefix:vt}=et(),n;try{n=ct(yt,[...vt,a],{cwd:this.params.directory||this.config.getTargetDir(),stdio:["ignore","pipe","pipe"],detached:!0,env:{...process.env,MATILDA_CODE:"1",TERM:"dumb",PAGER:"cat",...st()}})}catch(e){return{llmContent:`Monitor failed to start: ${m(e)}`,returnDisplay:`Monitor failed: ${m(e)}`}}g.pid=n.pid;let b=!1,w,D=e=>{w??=e};n.on("error",D);let B={value:""},G={value:""},k=ut,I=Date.now(),$=e=>{let r=gt(e);if(r.length===0||r.trim().length===0)return;let T=Date.now(),_=T-I;if(_<0)u.warn(`Monitor ${i}: clock moved backwards by ${-_}ms, resetting refill timestamp`),I=T;else{let h=Math.floor(_/ft);h>0&&(k=Math.min(ut,k+h),I+=h*ft)}k>0?(k--,c.emitEvent(i,r)):g.droppedLines++},j=()=>{for(let e of[B,G]){let r=e.value.trim();r.length>0&&$(r),e.value=""}},Tt=()=>{if(!(b||!n.pid))if(process.platform==="win32")ct("taskkill",["/pid",n.pid.toString(),"/f","/t"],{stdio:"ignore"}).on("error",r=>u.warn(`Monitor taskkill failed for pid ${n.pid}: ${m(r)}`));else{try{process.kill(-n.pid,"SIGTERM")}catch(e){u.warn(`Monitor ${i} SIGTERM failed (pid=${n.pid}): ${m(e)}`)}setTimeout(()=>{if(!b&&n.pid)try{process.kill(-n.pid,"SIGKILL")}catch(e){u.warn(`Monitor ${i} SIGKILL escalation failed (pid=${n.pid}): ${m(e)}`)}},200).unref?.()}},E=()=>{j(),Tt()};d.signal.addEventListener("abort",E,{once:!0}),d.signal.aborted&&E();try{c.register(g)}catch(e){return E(),d.signal.removeEventListener("abort",E),n.stdout?.destroy?.(),n.stderr?.destroy?.(),n.removeListener("error",D),n.on("error",()=>{}),{llmContent:`Monitor failed to start: ${m(e)}`,returnDisplay:`Monitor failed: ${m(e)}`}}let z=(e,r)=>{if(g.status!=="running")return;let T=rt(r.toString("utf-8"));if(e.value+=T,!e.value.includes(`
4
+ `)&&e.value.length>R){let h=e.value.trim();h.length>0&&$(h.slice(0,R)+"..."),e.value="";return}let _=e.value.split(`
5
+ `);e.value=_.pop()??"";for(let h of _){let x=h.trim();if(x.length===0)continue;let bt=x.length>R?x.slice(0,R)+"...":x;$(bt)}};n.stdout?.on("data",e=>z(B,e)),n.stderr?.on("data",e=>z(G,e));let F=!1,X=()=>{F||(F=!0,j(),d.signal.removeEventListener("abort",E),g.droppedLines>0&&u.info(`Monitor ${i} dropped ${g.droppedLines} lines due to throttling`))},V=null,_t=(e,r)=>{g.status==="running"&&(d.signal.aborted?c.cancel(i):e!==null&&e!==0?c.fail(i,`Exit code ${e}`):r?c.fail(i,`Killed by signal ${r}`):c.complete(i,e))},Ct=(e,r)=>{b=!0,V={code:e,sig:r}},Mt=(e,r)=>{b=!0,X();let T=V??{code:e,sig:r};_t(T.code,T.sig)},W=e=>{b=!0,X(),g.status==="running"&&c.fail(i,m(e))};return n.on("exit",Ct),n.on("close",Mt),n.on("error",W),n.removeListener("error",D),w?(W(w),{llmContent:`Monitor failed to start: ${m(w)}`,returnDisplay:`Monitor failed: ${m(w)}`}):{llmContent:`Monitor started.
6
+ id: ${i}
7
+ command: ${a}
8
+ description: ${f}
9
+ max_events: ${M}
10
+ idle_timeout: ${v}ms
11
+ Events will be delivered as notifications. The monitor auto-stops after ${M} events or ${v}ms of silence.
12
+ To inspect: /tasks (text) or the interactive Background tasks dialog (focus the footer Background tasks pill, then Enter \u2014 detail view + live updates).`,returnDisplay:`Monitor started: ${S} (${i})`}}},ht=class l extends q{constructor(t){super(l.Name,Q.MONITOR,`Starts a long-running shell command and streams its stdout/stderr as event notifications back to you.
13
+
14
+ Use this tool for:
15
+ - Watching log files: \`tail -f /var/log/app.log\`
16
+ - Monitoring build output: \`npm run build --watch\`
17
+ - Polling for state changes: \`while true; do curl -s http://localhost:8080/health; sleep 1; done\`
18
+ - Watching file changes: \`fswatch -r ./src\`
19
+
20
+ Each output line from the command becomes a notification event delivered to you. The monitor runs in the background \u2014 you can continue working while it streams events.
21
+
22
+ **Auto-stop:** The monitor automatically stops after max_events (default 1000) events or after idle_timeout_ms (default 5 minutes) of silence. The process is killed when the monitor stops.
23
+
24
+ **Do NOT use this tool for:**
25
+ - One-shot commands (use run_shell_command instead)
26
+ - Commands you need the full output from (use run_shell_command instead)
27
+ - Commands with no output (use run_shell_command with is_background: true instead)`,"execute",{type:"object",properties:{command:{type:"string",description:"Shell command to run and monitor. Each output line (stdout and stderr) becomes an event notification."},description:{type:"string",description:'Brief description of what this monitor watches (e.g., "webpack build output"). Truncated to 80 characters in display.'},max_events:{type:"number",description:"Stop the monitor after this many events. Default 1000. Max 10000."},idle_timeout_ms:{type:"number",description:"Stop the monitor if no output for this many milliseconds. Default 300000 (5 min). Max 600000."},directory:{type:"string",description:"(OPTIONAL) The absolute path of the directory to run the command in. If not provided, the project root directory is used. Must be within the workspace."}},required:["command"],additionalProperties:!1},!0,!1,!0,!1,"monitor watch tail log stream background");this.config=t}static Name=Y.MONITOR;validateToolParamValues(t){if(typeof t.command!="string"||!C(t.command).analysisCommand)return"Command cannot be empty.";if(nt(t.command))return'Monitor commands must not contain non-final top-level background operators. Remove "&" and let the monitor manage process lifetime.';if(t.max_events!==void 0){if(typeof t.max_events!="number"||!Number.isInteger(t.max_events)||t.max_events<=0)return"max_events must be a positive integer.";if(t.max_events>O)return`max_events cannot exceed ${O}.`}if(t.idle_timeout_ms!==void 0){if(typeof t.idle_timeout_ms!="number"||!Number.isInteger(t.idle_timeout_ms)||t.idle_timeout_ms<=0)return"idle_timeout_ms must be a positive integer.";if(t.idle_timeout_ms>N)return`idle_timeout_ms cannot exceed ${N}ms (10 minutes).`}if(t.directory){if(!mt.isAbsolute(t.directory))return"Directory must be an absolute path.";let o=mt.resolve(t.directory),a=this.config.storage.getUserSkillsDirs();if(J(a,o))return"Explicitly running monitor commands from within the user skills directory is not allowed. Please use absolute paths for command parameter instead.";if(!this.config.getWorkspaceContext().isPathWithinWorkspace(t.directory))return`Directory '${t.directory}' is not within any of the registered workspace directories.`}return null}createInvocation(t){return new U(this.config,t)}toAutoClassifierInput(t){let o={command:t.command};return t.directory&&(o.directory=t.directory),o}};export{ht as MonitorTool,gt as sanitizeMonitorLine};
28
+ /**
29
+ * @license
30
+ * Copyright 2025 Matilda
31
+ * SPDX-License-Identifier: Apache-2.0
32
+ */
@@ -0,0 +1,17 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{$e as Z,Ne as y,Ye as X,ka as R,se as D,te as Y,vc as Q}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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{J as B,K as k,L as U,Lb as z,M as K,N as q,O as b,P as W,Q as j,R as C,S as J,T as V,U as w,V as M,_c as H,ca as G}from"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{g as $,i as L,p as c,q as x}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{D as _,E as N,G as T,aa as F}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as v}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";v();import*as E from"node:fs";import*as m from"node:path";var ee=F("NOTEBOOK_EDIT");function g(d,r,t){return ee.debug("prior-read-rejected",{path:d,reason:r,type:t.type,displayMessage:t.displayMessage}),t}var u=class extends Error{constructor(t,e){super(t);this.type=e;this.name="NotebookEditError"}};function te(d,r){if(r==="delete")return"";if(typeof d!="string")throw new u(`new_source is required when edit_mode is "${r}".`,"invalid_tool_params");return d}function I(d,r){return d?q(d,r):`cell-${r}`}function oe(d,r,t){if(!r){if(t==="insert")return-1;throw new u("cell_id is required for replace and delete operations.","invalid_tool_params")}if(W(d,r))throw new u(`Cell ID "${r}" is ambiguous in the rendered notebook. Re-read the notebook and target a stable real cell ID before editing.`,"invalid_tool_params");let e=j(d,r);if(e===-1)throw new u(`Cell with ID "${r}" not found in notebook.`,"notebook_cell_not_found");return e}function ie(d,r,t,e){let o={cell_type:r,metadata:{},source:w(t,e)},i=J(d);return i&&(o.id=i),M(o,r),o}function O(d,r){let t;try{t=k(d)}catch(a){throw new u(a instanceof Error?a.message:String(a),"notebook_invalid_json")}let e=r.edit_mode??"replace",o=te(r.new_source,e),i=b(t),n=oe(t,r.cell_id,e),l=C(t),p=U(d),s=(a,f)=>{let h=e==="insert"||e==="delete";return{...f,updatedContent:K(a,p),requiresReadAfterWrite:h&&!(i&&b(a))}};switch(e){case"insert":{let a=r.cell_type??"code",f=n===-1?0:n+1,h=ie(t,a,o,V(t,f));return t.cells.splice(f,0,h),s(t,{editedCellId:I(h,f),editedCellType:a,language:l,mode:e})}case"delete":{let[a]=t.cells.splice(n,1);return s(t,{editedCellId:I(a,n),editedCellType:a?.cell_type,language:l,mode:e})}case"replace":{let a=t.cells[n];if(!a)throw new u(`Cell index ${n} is out of range.`,"notebook_cell_not_found");let f=r.cell_type??a.cell_type;return a.source=w(o,Array.isArray(a.source)),M(a,f),s(t,{editedCellId:I(a,n),editedCellType:f,language:l,mode:e})}default:throw new u(`Unsupported notebook edit mode: ${e}`,"invalid_tool_params")}}function re(d,r,t){let e,o;try{e=k(r),o=k(d)}catch(i){throw new u(i instanceof Error?i.message:String(i),"notebook_invalid_json")}return{updatedContent:r,editedCellId:t.cell_id??"user-modified-notebook",editedCellType:void 0,language:C(e),mode:t.edit_mode??"replace",requiresReadAfterWrite:!b(o)||!b(e)}}async function A(d,r,t={}){if(d.getFileReadCacheDisabled())return{ok:!0};let e;try{e=await E.promises.stat(r)}catch(i){let n=i?.code;return n==="ENOENT"?t.expectExisting?g(r,"missing-after-read",{ok:!1,type:"file_changed_since_read",rawMessage:`Notebook ${r} disappeared after it was read. Re-read it with the ${c.READ_FILE} tool before editing it.`,displayMessage:`notebook disappeared after last read; re-run ${c.READ_FILE} first.`}):{ok:!0}:g(r,"stat-failed",{ok:!1,type:"prior_read_verification_failed",rawMessage:`Could not stat ${r} to verify prior notebook read (${n??"unknown error"}). Re-read it with the ${c.READ_FILE} tool before editing it.`,displayMessage:`cannot verify prior read of ${r}; re-run ${c.READ_FILE} before editing this notebook.`})}if(e.isDirectory())return g(r,"target-is-directory",{ok:!1,type:"target_is_directory",rawMessage:`${r} is a directory. The NotebookEdit tool only operates on .ipynb files.`,displayMessage:"path is a directory; cannot edit as a notebook."});if(!e.isFile())return g(r,"target-not-regular-file",{ok:!1,type:"target_not_regular_file",rawMessage:`${r} is not a regular file. The NotebookEdit tool only operates on .ipynb files.`,displayMessage:"special file; cannot edit as a notebook."});let o=d.getFileReadCache().check(e);return o.state==="fresh"&&o.entry.lastReadAt!==void 0&&o.entry.lastReadWasFull?{ok:!0}:o.state==="fresh"&&o.entry.lastReadAt!==void 0&&!o.entry.lastReadWasFull?g(r,"truncated-cache-entry",{ok:!1,type:"edit_requires_prior_read",rawMessage:`Notebook ${r} is too large for cell-level editing because its rendered output was truncated when read. Reduce the notebook output size or split the notebook before editing cells.`,displayMessage:"notebook too large for cell-level editing."}):o.state==="stale"?g(r,"stale-cache-entry",{ok:!1,type:"file_changed_since_read",rawMessage:`Notebook ${r} has been modified since you last read it. Re-read it with the ${c.READ_FILE} tool before editing it.`,displayMessage:`notebook changed since last read; re-run ${c.READ_FILE} first.`}):g(r,`cache-${o.state}`,{ok:!1,type:"edit_requires_prior_read",rawMessage:`Notebook ${r} has not been fully read in this session. Use the ${c.READ_FILE} tool first, without offset or limit, before editing cells.`,displayMessage:`${c.READ_FILE} required before editing this notebook.`})}var P=class extends ${constructor(t,e,o){super(e);this.config=t;this.modifyMetadata=o}toolLocations(){return[{path:this.params.notebook_path}]}getDescription(){let t=N(this.params.notebook_path,this.config.getTargetDir()),e=this.params.edit_mode??"replace",o=this.params.cell_id??"beginning";return`${e} notebook cell ${o} in ${_(t)}`}async getDefaultPermission(){return"ask"}async getConfirmationDetails(t){let e=await this.prepareEdit(t),o=m.basename(this.params.notebook_path),i=R(o,e.originalContent,e.updatedContent,"Current","Proposed",D);return{type:"edit",title:`Confirm Notebook Edit: ${_(N(this.params.notebook_path,this.config.getTargetDir()))}`,fileName:o,filePath:this.params.notebook_path,fileDiff:i,originalContent:e.originalContent,newContent:e.updatedContent,onConfirm:async l=>{l==="proceed_always"&&this.config.setApprovalMode("auto-edit")}}}async prepareEdit(t){let e=await A(this.config,this.params.notebook_path);if(!e.ok)throw new y(e.rawMessage,e.type);let o,i=!1,n,l="lf";try{let s=await this.config.getFileSystemService().readTextFile({path:this.params.notebook_path});o=s.content,i=s._meta?.bom??!1,n=s._meta?.encoding,l=s._meta?.lineEnding??X(s.content)}catch(s){throw t.aborted?s:s?.code==="ENOENT"?new y(`Notebook file not found: ${this.params.notebook_path}`,"file_not_found"):new y(`Error reading notebook: ${s instanceof Error?s.message:String(s)}`,"read_content_failure")}let p=await A(this.config,this.params.notebook_path,{expectExisting:!0});if(!p.ok)throw new y(p.rawMessage,p.type);try{return this.modifyMetadata?.modifiedNotebookContent!==void 0?{...re(o,this.modifyMetadata.modifiedNotebookContent,this.params),originalContent:o,bom:i,encoding:n,lineEnding:l}:{...O(o,this.params),originalContent:o,bom:i,encoding:n,lineEnding:l}}catch(s){throw s instanceof u?new y(s.message,s.type):s}}async execute(t){let e;try{e=await this.prepareEdit(t)}catch(o){if(t.aborted)throw o;let i=o instanceof y?o.errorType:"notebook_edit_failure",n=o instanceof Error?o.message:String(o);return{llmContent:n,returnDisplay:`Error: ${n}`,error:{message:n,type:i}}}try{try{await this.config.getFileHistoryService().trackEdit(this.params.notebook_path)}catch{}let o=await A(this.config,this.params.notebook_path,{expectExisting:!0});if(!o.ok)return{llmContent:o.rawMessage,returnDisplay:`Error: ${o.displayMessage}`,error:{message:o.rawMessage,type:o.type}};await this.config.getFileSystemService().writeTextFile({path:this.params.notebook_path,content:e.updatedContent,_meta:{bom:e.bom,encoding:e.encoding,lineEnding:e.lineEnding}}),this.modifyMetadata?.modifiedByUser||Q.getInstance().recordEdit(this.params.notebook_path,e.originalContent,e.updatedContent);try{let a=E.statSync(this.params.notebook_path),f=this.config.getFileReadCache();e.requiresReadAfterWrite?f.invalidate(a):f.recordWrite(this.params.notebook_path,a,{cacheable:!1})}catch(a){ee.warn(`[NotebookEdit] post-write cache update failed for ${this.params.notebook_path}: ${a instanceof Error?a.message:String(a)}`)}let i=m.basename(this.params.notebook_path),n=R(i,e.originalContent,e.updatedContent,"Current","Proposed",D),l=Y(i,e.originalContent,this.modifyMetadata?.aiProposedContent??e.updatedContent,e.updatedContent);z(this.config,new H(S.Name,"update",e.updatedContent.split(`
4
+ `).length,G(this.params.notebook_path),".ipynb",e.language));let p={fileDiff:n,fileName:i,originalContent:e.originalContent,newContent:e.updatedContent,diffStat:l},s=this.modifyMetadata?.modifiedNotebookContent!==void 0?`Notebook ${this.params.notebook_path} has been updated. Notebook content was modified by the user before approval; the final saved notebook may differ from the original ${e.mode} cell ${e.editedCellId} proposal.`:`Notebook ${this.params.notebook_path} has been updated. ${e.mode} cell ${e.editedCellId}.${e.mode==="delete"?"":`
5
+
6
+ Updated source:
7
+
8
+ ---
9
+
10
+ ${B(this.params.new_source??"")}`}`;try{let a=await Z(this.config,this.params.notebook_path);a&&(s+=`
11
+
12
+ ${a}`)}catch{}return{llmContent:s,returnDisplay:p,resultFilePaths:[this.params.notebook_path]}}catch(o){let i=o instanceof Error?o.message:String(o);return{llmContent:`Error writing notebook: ${i}`,returnDisplay:`Error writing notebook: ${i}`,error:{message:i,type:"file_write_failure"}}}}},S=class d extends L{constructor(t){super(d.Name,x.NOTEBOOK_EDIT,`Edits a Jupyter notebook (.ipynb) safely at the cell level. Use this instead of ${c.EDIT} or ${c.WRITE_FILE} for notebook cells. Supports replacing, inserting, and deleting cells. Always read the notebook first with ${c.READ_FILE}; then use the cell IDs shown in that output.`,"edit",{properties:{notebook_path:{description:"Absolute path to the Jupyter notebook file to edit. Must end with .ipynb.",type:"string"},cell_id:{description:"Target cell ID from read_file output, or cell-N 0-based fallback. Required for replace and delete. For insert, the new cell is inserted after this cell; if omitted, inserted at the beginning.",type:"string"},new_source:{description:"New source content for replace and insert operations. Not required for delete.",type:"string"},cell_type:{description:"Cell type for inserted cells or type conversion on replace.",type:"string",enum:["code","markdown"]},edit_mode:{description:"Notebook edit operation. Defaults to replace.",type:"string",enum:["replace","insert","delete"]}},required:["notebook_path"],additionalProperties:!1,type:"object"});this.config=t}static Name=c.NOTEBOOK_EDIT;modifyMetadataByParams=new WeakMap;modifyMetadataByKey=new Map;validateToolParamValues(t){if(t.notebook_path=T(t.notebook_path.trim()),!t.notebook_path)return"The 'notebook_path' parameter must be non-empty.";if(!m.isAbsolute(t.notebook_path))return`Notebook path must be absolute: ${t.notebook_path}`;if(m.extname(t.notebook_path).toLowerCase()!==".ipynb")return"File must be a Jupyter notebook (.ipynb). Use the edit tool for other file types.";let e=t.edit_mode??"replace";return["replace","insert","delete"].includes(e)?t.cell_type&&!["code","markdown"].includes(t.cell_type)?"cell_type must be 'code' or 'markdown'.":e!=="insert"&&!t.cell_id?"cell_id is required for replace and delete operations.":e!=="delete"&&typeof t.new_source!="string"?`new_source is required when edit_mode is "${e}".`:this.config.getFileService().shouldMatildaIgnoreFile(t.notebook_path)?`File path '${t.notebook_path}' is ignored by .matildaignore pattern(s).`:null:"edit_mode must be 'replace', 'insert', or 'delete'."}createInvocation(t){return new P(this.config,t,this.consumeModifyMetadata(t))}getModifyMetadataKey(t){return JSON.stringify({notebook_path:T(t.notebook_path.trim()),cell_id:t.cell_id,new_source:t.new_source,cell_type:t.cell_type,edit_mode:t.edit_mode})}rememberModifyMetadata(t,e){this.modifyMetadataByParams.set(t,e);let o=this.getModifyMetadataKey(t),i=this.modifyMetadataByKey.get(o)??[];i.push(e),this.modifyMetadataByKey.set(o,i)}consumeModifyMetadata(t){let e=this.modifyMetadataByParams.get(t);if(e)return this.modifyMetadataByParams.delete(t),this.removeQueuedModifyMetadata(t,e),e;let o=this.getModifyMetadataKey(t),i=this.modifyMetadataByKey.get(o),n=i?.shift();return i&&i.length===0&&this.modifyMetadataByKey.delete(o),n}removeQueuedModifyMetadata(t,e){let o=this.getModifyMetadataKey(t),i=this.modifyMetadataByKey.get(o);if(!i)return;let n=i.indexOf(e);n!==-1&&i.splice(n,1),i.length===0&&this.modifyMetadataByKey.delete(o)}getModifyContext(t){let e=new Map,o=async i=>{let n=e.get(i.notebook_path);if(n!==void 0)return n;let{content:l}=await this.config.getFileSystemService().readTextFile({path:i.notebook_path});return e.set(i.notebook_path,l),l};return{getFilePath:i=>i.notebook_path,getCurrentContent:async i=>o(i),getProposedContent:async i=>{let n=await o(i);return O(n,i).updatedContent},createUpdatedParams:(i,n,l)=>{let p=this.modifyMetadataByParams.get(l)?.aiProposedContent;if(p===void 0)try{p=O(i,l).updatedContent}catch{p=n}let s={...l};return this.rememberModifyMetadata(s,{aiProposedContent:p,modifiedByUser:!0,modifiedNotebookContent:n}),s}}}};export{S as NotebookEditTool,O as applyNotebookEdit};
13
+ /**
14
+ * @license
15
+ * Copyright 2026 Matilda Team
16
+ * SPDX-License-Identifier: Apache-2.0
17
+ */
@@ -1,3 +1,3 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m}from"./chunk-KAOSSAJ7.js";import"./chunk-U3O6TMV7.js";import"./chunk-XITA5WMN.js";import{g as a}from"./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"./chunk-BGZJUBRA.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-SWEYYDZO.js";import"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{h as ContentGenerationPipeline,c as DeepSeekOpenAICompatibleProvider,i as EnhancedErrorHandler,b as MatildaOpenAICompatibleProvider,k as MatildaOpenAIContentGenerator,g as MiMoOpenAICompatibleProvider,e as MiniMaxOpenAICompatibleProvider,f as MistralOpenAICompatibleProvider,a as OpenAIContentConverter,j as OpenAIContentGenerator,d as OpenRouterOpenAICompatibleProvider,l as createOpenAIContentGenerator,m as determineProvider};
3
+ import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m}from"./chunk-MLQWXTK6.js";import"./chunk-LIWYWWOK.js";import"./chunk-QHA3ZBRO.js";import{g as a}from"./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"./chunk-6B5BDE7S.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{h as ContentGenerationPipeline,c as DeepSeekOpenAICompatibleProvider,i as EnhancedErrorHandler,b as MatildaOpenAICompatibleProvider,k as MatildaOpenAIContentGenerator,g as MiMoOpenAICompatibleProvider,e as MiniMaxOpenAICompatibleProvider,f as MistralOpenAICompatibleProvider,a as OpenAIContentConverter,j as OpenAIContentGenerator,d as OpenRouterOpenAICompatibleProvider,l as createOpenAIContentGenerator,m as determineProvider};
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{wc as a}from"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import"./chunk-6B5BDE7S.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as ReadFileTool};
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{Nj as a,Oj as b}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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"./chunk-6B5BDE7S.js";import"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{b as RipGrepTool,a as _resetRipGrepCachesForTest};
@@ -0,0 +1,8 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{b as E}from"./chunk-7ZATDBWL.js";import{xa as P}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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"./chunk-6B5BDE7S.js";import"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import{P as l,aa as c}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as s}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";s();import{stat as V}from"node:fs/promises";import{join as p}from"node:path";s();import{readdir as N,stat as H,rm as F,rmdir as A}from"node:fs/promises";import{join as y}from"node:path";var k=c("HOUSEKEEPING"),U=24*60*60*1e3,$=60*60*1e3,_=20;function T(e){let t=e>0?e*U:$;return new Date(Date.now()-t)}async function b(e){let t={removed:0,errors:0},r=y(l.getGlobalMatildaDir(),P),i=e.excludeSessionIds??new Set,o;try{o=await N(r,{withFileTypes:!0})}catch(n){return G(n)||k.error("readdir failed",n),t}let a=o.filter(n=>n.isDirectory()&&!i.has(n.name)).map(n=>y(r,n.name));for(let n=0;n<a.length;n+=_){let v=a.slice(n,n+_);await Promise.all(v.map(async g=>{try{(await H(g)).mtime<e.cutoffDate&&(await F(g,{recursive:!0,force:!0}),t.removed++)}catch(w){t.errors++,k.error(`failed to sweep ${g}`,w)}}))}return await A(r).catch(()=>{}),t}function G(e){return e?.code==="ENOENT"}s();import{mkdir as Y,open as K,stat as I,unlink as D,writeFile as j}from"node:fs/promises";import{dirname as B}from"node:path";var m=c("HOUSEKEEPING"),q=24*60*60*1e3,J=60*60*1e3;async function R(e,t){let r=e.minIntervalMs??q,i=e.staleLockMs??J;if(await Y(B(e.lockPath),{recursive:!0,mode:448}).catch(()=>{}),await C(e.markerPath,r,e.name))return!1;let o=await h(e.lockPath);if(!o){try{let a=await I(e.lockPath);Date.now()-a.mtimeMs>i&&(await D(e.lockPath).catch(()=>{}),o=await h(e.lockPath))}catch{o=await h(e.lockPath)}if(!o)return m.debug(`${e.name}: skipping, lock held`),!1}try{if(await C(e.markerPath,r,e.name))return!1;let a=!1;try{await t(),a=!0}finally{if(a)try{await j(e.markerPath,new Date().toISOString())}catch(n){m.debug(`${e.name}: marker write failed (cleanup succeeded)`,n)}}return a}finally{await D(e.lockPath).catch(()=>{m.debug(`${e.name}: lock unlink failed (harmless)`)})}}async function C(e,t,r){try{let i=await I(e),o=Date.now()-i.mtimeMs;if(o<t)return m.debug(`${r}: skipping, ran ${o}ms ago`),!0}catch{}return!1}async function h(e){try{return await(await K(e,"wx")).close(),!0}catch(t){if(t?.code==="EEXIST")return!1;throw t}}var u=c("HOUSEKEEPING"),O=10*60*1e3,W=24*60*60*1e3,X=60*1e3,z=7*24*60*60*1e3,Q=60*1e3,f=".file-history-cleanup",d=!1;function pe(e,t){d||(d=!0,Z(e,t).catch(r=>{d=!1,u.error("scheduleFirstPass failed; chain will retry on next start",r)}))}async function Z(e,t){let r=p(l.getGlobalMatildaDir(),f),i=await L(r)?Q:O;u.debug(`first pass in ${i/1e3}s`),setTimeout(()=>S(e,t),i).unref()}async function L(e){try{let t=await V(e);return Date.now()-t.mtimeMs>z}catch{return!0}}async function M(e,t){if(E()<X){u.debug("user active, deferring 10 min"),setTimeout(()=>S(e,t),O).unref();return}try{await x(e,t)}catch(r){u.error("housekeeping pass failed; will retry next cycle",r)}setTimeout(()=>S(e,t),W).unref()}function S(e,t){M(e,t).catch(r=>{u.error("runPass rejected unexpectedly",r)})}async function x(e,t){let r=t.merged.general?.cleanupPeriodDays??30,i=T(r),o=e.getSessionId(),a=l.getGlobalMatildaDir();await R({name:"file-history-cleanup",markerPath:p(a,f),lockPath:p(a,f+".lock")},async()=>{let n=await b({cutoffDate:i,excludeSessionIds:new Set([o])});u.debug(`file-history: removed=${n.removed} errors=${n.errors}`)})}function Se(){d=!1}var we=L,Pe=x,Ee=M,ye=f;export{ye as _FILE_HISTORY_MARKER_FOR_TESTING,we as _needsCatchUpForTesting,Se as _resetForTesting,Pe as _runHousekeepingForTesting,Ee as _runPassForTesting,pe as startBackgroundHousekeeping};
4
+ /**
5
+ * @license
6
+ * Copyright 2025 Google LLC
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{d as n,g as h,l as i}from"./chunk-QKYGQLWC.js";import{g,i as p,p as c,q as l}from"./chunk-BGZJUBRA.js";import"./chunk-5QAKUC2D.js";import"./chunk-FWDMPRKU.js";import{b as d}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";d();var m=class extends g{constructor(s,a){super(a);this.config=s}getDescription(){if(this.params.task_id)return`Send message to task ${this.params.task_id}`;let s=this.params.summary??this.params.message.slice(0,50);return`Send to ${this.params.to}: ${s}`}async getDefaultPermission(){return"ask"}async execute(s){if(this.params.task_id){let e=this.config.getBackgroundTaskRegistry(),t=e.get(this.params.task_id);return t?t.status==="paused"?await this.config.resumeBackgroundAgent(this.params.task_id,this.params.message)?{llmContent:`Background task "${this.params.task_id}" resumed with your message as the first continuation instruction.`,returnDisplay:`Resumed ${t.description}`}:{llmContent:`Error: Background task "${this.params.task_id}" could not be resumed.`,returnDisplay:"Task could not be resumed.",error:{message:`Task could not be resumed: ${this.params.task_id}`,type:"send_message_not_running"}}:t.status!=="running"?{llmContent:`Error: Background task "${this.params.task_id}" is not running (status: ${t.status}). Cannot send messages to stopped tasks.`,returnDisplay:`Task not running (${t.status}).`,error:{message:`Task is ${t.status}: ${this.params.task_id}`,type:"send_message_not_running"}}:(e.queueMessage(this.params.task_id,this.params.message),{llmContent:`Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary.`,returnDisplay:`Message queued for ${t.description}`}):{llmContent:`Error: No background task found with ID "${this.params.task_id}".`,returnDisplay:"Task not found.",error:{message:`Task not found: ${this.params.task_id}`,type:"send_message_not_found"}}}let a=this.config.getTeamManager();if(!a){let e="No active team and no task_id provided. Either create a team first, or pass `task_id` to message a background task.";return{llmContent:e,returnDisplay:e,error:{message:e}}}let o=this.params.to;if(!o){let e='Recipient "to" is required.';return{llmContent:e,returnDisplay:e,error:{message:e}}}try{if(this.params.type==="shutdown_request"){if(h()){let r="Only the team leader can request shutdowns.";return{llmContent:r,returnDisplay:r,error:{message:r}}}await a.requestShutdown(o);let t=`Shutdown requested for "${o}".`;return{llmContent:t,returnDisplay:t}}if(o==="*"){let t=n()??i;await a.broadcast(this.params.message,t);let r="Message broadcast to all teammates.";return{llmContent:r,returnDisplay:r}}await a.sendMessage(o,this.params.message,n()??i,this.params.summary);let e=`Message sent to "${o}".`;return{llmContent:e,returnDisplay:e}}catch(e){let t=e instanceof Error?e.message:String(e);return{llmContent:`Failed to send message: ${t}`,returnDisplay:`Failed to send message: ${t}`,error:{message:t}}}}},k=class u extends p{constructor(s){super(u.Name,l.SEND_MESSAGE,'Send a message to a teammate (use "to") or to a running background task (use "task_id"). For teams, set "to" to a bare teammate name (no @) or "*" to broadcast. For background tasks, set "task_id" to the id from the launch response or a recovered paused task. Running tasks receive it at the next tool-round boundary; paused recovered tasks are resumed with the message as their first continuation instruction. Your text output is NOT visible to other agents \u2014 use this tool to communicate.',"other",{type:"object",properties:{to:{type:"string",description:'Recipient teammate name, or "*" for broadcast.'},task_id:{type:"string",description:"The ID of the background task (from the launch response or a recovered paused task)."},message:{type:"string",description:"Message text to send.",maxLength:65536},summary:{type:"string",description:"Optional 5-10 word summary for UI display."},type:{type:"string",enum:["shutdown_request"],description:"Structured message type for control flow. When set, routes through the mailbox instead of plain text delivery."}},required:["message"],oneOf:[{required:["to"]},{required:["task_id"]}],additionalProperties:!1},!0,!1,!0,!1,"send message task teammate team communicate notify");this.config=s}static Name=c.SEND_MESSAGE;createInvocation(s){return new m(this.config,s)}toAutoClassifierInput(s){return{to:s.to,task_id:s.task_id,message:s.message,type:s.type}}};export{k as SendMessageTool};
3
+ import{d as n,g as h,l as i}from"./chunk-QKYGQLWC.js";import{g,i as p,p as c,q as l}from"./chunk-6B5BDE7S.js";import"./chunk-VLYRNOD3.js";import"./chunk-FWDMPRKU.js";import{b as d}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";d();var m=class extends g{constructor(s,a){super(a);this.config=s}getDescription(){if(this.params.task_id)return`Send message to task ${this.params.task_id}`;let s=this.params.summary??this.params.message.slice(0,50);return`Send to ${this.params.to}: ${s}`}async getDefaultPermission(){return"ask"}async execute(s){if(this.params.task_id){let e=this.config.getBackgroundTaskRegistry(),t=e.get(this.params.task_id);return t?t.status==="paused"?await this.config.resumeBackgroundAgent(this.params.task_id,this.params.message)?{llmContent:`Background task "${this.params.task_id}" resumed with your message as the first continuation instruction.`,returnDisplay:`Resumed ${t.description}`}:{llmContent:`Error: Background task "${this.params.task_id}" could not be resumed.`,returnDisplay:"Task could not be resumed.",error:{message:`Task could not be resumed: ${this.params.task_id}`,type:"send_message_not_running"}}:t.status!=="running"?{llmContent:`Error: Background task "${this.params.task_id}" is not running (status: ${t.status}). Cannot send messages to stopped tasks.`,returnDisplay:`Task not running (${t.status}).`,error:{message:`Task is ${t.status}: ${this.params.task_id}`,type:"send_message_not_running"}}:(e.queueMessage(this.params.task_id,this.params.message),{llmContent:`Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary.`,returnDisplay:`Message queued for ${t.description}`}):{llmContent:`Error: No background task found with ID "${this.params.task_id}".`,returnDisplay:"Task not found.",error:{message:`Task not found: ${this.params.task_id}`,type:"send_message_not_found"}}}let a=this.config.getTeamManager();if(!a){let e="No active team and no task_id provided. Either create a team first, or pass `task_id` to message a background task.";return{llmContent:e,returnDisplay:e,error:{message:e}}}let o=this.params.to;if(!o){let e='Recipient "to" is required.';return{llmContent:e,returnDisplay:e,error:{message:e}}}try{if(this.params.type==="shutdown_request"){if(h()){let r="Only the team leader can request shutdowns.";return{llmContent:r,returnDisplay:r,error:{message:r}}}await a.requestShutdown(o);let t=`Shutdown requested for "${o}".`;return{llmContent:t,returnDisplay:t}}if(o==="*"){let t=n()??i;await a.broadcast(this.params.message,t);let r="Message broadcast to all teammates.";return{llmContent:r,returnDisplay:r}}await a.sendMessage(o,this.params.message,n()??i,this.params.summary);let e=`Message sent to "${o}".`;return{llmContent:e,returnDisplay:e}}catch(e){let t=e instanceof Error?e.message:String(e);return{llmContent:`Failed to send message: ${t}`,returnDisplay:`Failed to send message: ${t}`,error:{message:t}}}}},k=class u extends p{constructor(s){super(u.Name,l.SEND_MESSAGE,'Send a message to a teammate (use "to") or to a running background task (use "task_id"). For teams, set "to" to a bare teammate name (no @) or "*" to broadcast. For background tasks, set "task_id" to the id from the launch response or a recovered paused task. Running tasks receive it at the next tool-round boundary; paused recovered tasks are resumed with the message as their first continuation instruction. Your text output is NOT visible to other agents \u2014 use this tool to communicate.',"other",{type:"object",properties:{to:{type:"string",description:'Recipient teammate name, or "*" for broadcast.'},task_id:{type:"string",description:"The ID of the background task (from the launch response or a recovered paused task)."},message:{type:"string",description:"Message text to send.",maxLength:65536},summary:{type:"string",description:"Optional 5-10 word summary for UI display."},type:{type:"string",enum:["shutdown_request"],description:"Structured message type for control flow. When set, routes through the mailbox instead of plain text delivery."}},required:["message"],oneOf:[{required:["to"]},{required:["task_id"]}],additionalProperties:!1},!0,!1,!0,!1,"send message task teammate team communicate notify");this.config=s}static Name=c.SEND_MESSAGE;createInvocation(s){return new m(this.config,s)}toAutoClassifierInput(s){return{to:s.to,task_id:s.task_id,message:s.message,type:s.type}}};export{k as SendMessageTool};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2025 Matilda
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{a as Cu}from"./chunk-PA6532AY.js";import{a as bv}from"./chunk-XMZIY7XX.js";import{$a as Qi,Aa as Pr,B as ns,Ba as Gi,Ca as or,D as xu,Da as an,Ea as ar,Fa as Mr,Ga as mt,Ha as cr,Ia as Or,Ja as Dr,Ka as cn,La as dn,Ma as un,Na as ot,Oa as Sv,Pa as Ki,Qa as ss,Ra as Ou,Sa as ke,Ta as fe,Ua as Ev,Va as ln,W as _u,Wa as pn,Xa as Du,Y as Tt,Ya as Ji,Za as Xi,_a as Yi,ab as Iv,bb as Zi,cb as Mt,db as Fu,eb as Lu,ha as ku,ia as Tu,ib as Nu,ja as Pt,jb as $u,ka as Pu,la as zi,ma as Ye,na as wt,pa as Mu,qa as ie,ra as nn,sa as sn,ta as sr,ua as Cr,va as on,wa as Tr,x as Ui,xa as bt,ya as St,za as ir}from"./chunk-JELJNWOF.js";import{a as Eu,b as D,d as Iu}from"./chunk-7LZNA4VT.js";import{a as Au,b as rn,d as Ru,e as Vi}from"./chunk-JSFA3NEP.js";import{$a as au,Il as Rr,Ji as wv,Le as pu,Lk as es,Ma as iu,Mk as ts,Na as kr,Nk as rs,Of as Ar,Pf as Ve,Se as fu,Sh as wu,Tj as tt,Uj as Zn,Xe as Hi,Ya as ou,Ye as hu,Ze as mu,ab as cu,bb as du,gg as Qn,ob as Wi,oi as bu,qb as uu,ub as lu,wf as gu,xf as vu,yf as yu}from"./chunk-AMO6HY3T.js";import"./chunk-TZIDSCTF.js";import"./chunk-2HFKTFO5.js";import"./chunk-UHDKX2CR.js";import"./chunk-X4ML2NEE.js";import"./chunk-FQ44TPC5.js";import{e as Su}from"./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"./chunk-QKYGQLWC.js";import"./chunk-LNTO3FNQ.js";import"./chunk-L5ASITMV.js";import"./chunk-RNKDFE2S.js";import"./chunk-SOKNPND5.js";import"./chunk-743LSI67.js";import{b as Yd,e as Qd}from"./chunk-XITA5WMN.js";import{C as Bd,D as qd,E as jd,F as Wd,G as Hd,H as Ud,I as Vd,J as zd,K as Gd,L as Kd,U as Jd,V as Xd,n as Fd,o as $i,p as Bi,q as Yn,s as Ld,u as Nd,v as $d,w as qi,x as _r}from"./chunk-QZWBA3NL.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-O3OUYCSO.js";import"./chunk-4J6DC24J.js";import{b as Rd}from"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import{Cb as Md,Eb as Od,Fb as Dd,Y as Td,da as xr,ea as Pd,j as He,t as Cd}from"./chunk-OVC5Z3EX.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-VB4MJSMC.js";import"./chunk-OXHC3R2R.js";import"./chunk-BGZJUBRA.js";import{f as Zd,h as ji,i as eu,j as tu,k as ru,m as nu,r as su}from"./chunk-N6BOYL6K.js";import"./chunk-VBOVIARK.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-SWEYYDZO.js";import{M as Xn,N as Ad}from"./chunk-5QAKUC2D.js";import{a as ht}from"./chunk-G7R2XEEF.js";import{a as yv}from"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as w}from"./chunk-GZPNIYVZ.js";import{a as se,d as L,f as vv}from"./chunk-OWGSC52X.js";var fn=L((A_,Wu)=>{w();var xv=se("path").relative;Wu.exports=Cv;var _v=process.cwd();function qu(t,e){for(var r=t.split(/[ ,]+/),n=String(e).toLowerCase(),s=0;s<r.length;s++){var i=r[s];if(i&&(i==="*"||i.toLowerCase()===n))return!0}return!1}function kv(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e),s=n.value;return n.get=function(){return s},n.writable&&(n.set=function(o){return s=o}),delete n.value,delete n.writable,Object.defineProperty(t,e,n),n}function Av(t){for(var e="",r=0;r<t;r++)e+=", arg"+r;return e.substr(2)}function Rv(t){var e=this.name+": "+this.namespace;this.message&&(e+=" deprecated "+this.message);for(var r=0;r<t.length;r++)e+=`
3
+ import{a as Cu}from"./chunk-PA6532AY.js";import{a as bv}from"./chunk-XMZIY7XX.js";import{$a as Qi,Aa as Pr,B as ns,Ba as Gi,Ca as or,D as xu,Da as an,Ea as ar,Fa as Mr,Ga as mt,Ha as cr,Ia as Or,Ja as Dr,Ka as cn,La as dn,Ma as un,Na as ot,Oa as Sv,Pa as Ki,Qa as ss,Ra as Ou,Sa as ke,Ta as fe,Ua as Ev,Va as ln,W as _u,Wa as pn,Xa as Du,Y as Tt,Ya as Ji,Za as Xi,_a as Yi,ab as Iv,bb as Zi,cb as Mt,db as Fu,eb as Lu,ha as ku,ia as Tu,ib as Nu,ja as Pt,jb as $u,ka as Pu,la as zi,ma as Ye,na as wt,pa as Mu,qa as ie,ra as nn,sa as sn,ta as sr,ua as Cr,va as on,wa as Tr,x as Ui,xa as bt,ya as St,za as ir}from"./chunk-KKQGIF54.js";import{a as Eu,b as D,d as Iu}from"./chunk-J4OZJXSD.js";import{a as Au,b as rn,d as Ru,e as Vi}from"./chunk-JSFA3NEP.js";import{Jl as Rr,Ki as wv,Me as pu,Mk as es,Na as iu,Nk as ts,Oa as kr,Ok as rs,Pf as Ar,Qf as Ve,Te as fu,Th as wu,Uj as tt,Vj as Zn,Ye as Hi,Za as ou,Ze as hu,_e as mu,ab as au,bb as cu,cb as du,hg as Qn,pb as Wi,pi as bu,rb as uu,vb as lu,xf as gu,yf as vu,zf as yu}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./chunk-5OY5RZSF.js";import"./chunk-LSDMWVW6.js";import{e as Su}from"./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"./chunk-QKYGQLWC.js";import"./chunk-FRL6KOLY.js";import"./chunk-VWWEEU4V.js";import"./chunk-RNKDFE2S.js";import"./chunk-Q2I3ARPJ.js";import"./chunk-CM3HWOOK.js";import{b as Yd,e as Qd}from"./chunk-QHA3ZBRO.js";import{C as Bd,D as qd,E as jd,F as Wd,G as Hd,H as Ud,I as Vd,J as zd,K as Gd,L as Kd,U as Jd,V as Xd,n as Fd,o as $i,p as Bi,q as Yn,s as Ld,u as Nd,v as $d,w as qi,x as _r}from"./chunk-WMPQ67GO.js";import"./chunk-4F4DA5UI.js";import"./chunk-DC7LAFZZ.js";import"./chunk-S7G6QPEP.js";import"./chunk-4J6DC24J.js";import{b as Rd}from"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-SDTWBD62.js";import{Cb as Md,Eb as Od,Fb as Dd,Y as Td,da as xr,ea as Pd,j as He,t as Cd}from"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import"./chunk-6B5BDE7S.js";import{f as Zd,h as ji,i as eu,j as tu,k as ru,m as nu,r as su}from"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import{P as Xn,Q as Ad}from"./chunk-VLYRNOD3.js";import{a as ht}from"./chunk-G7R2XEEF.js";import{a as yv}from"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as w}from"./chunk-GZPNIYVZ.js";import{a as se,d as L,f as vv}from"./chunk-OWGSC52X.js";var fn=L((A_,Wu)=>{w();var xv=se("path").relative;Wu.exports=Cv;var _v=process.cwd();function qu(t,e){for(var r=t.split(/[ ,]+/),n=String(e).toLowerCase(),s=0;s<r.length;s++){var i=r[s];if(i&&(i==="*"||i.toLowerCase()===n))return!0}return!1}function kv(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e),s=n.value;return n.get=function(){return s},n.writable&&(n.set=function(o){return s=o}),delete n.value,delete n.writable,Object.defineProperty(t,e,n),n}function Av(t){for(var e="",r=0;r<t;r++)e+=", arg"+r;return e.substr(2)}function Rv(t){var e=this.name+": "+this.namespace;this.message&&(e+=" deprecated "+this.message);for(var r=0;r<t.length;r++)e+=`
4
4
  at `+t[r].toString();return e}function Cv(t){if(!t)throw new TypeError("argument namespace is required");var e=os(),r=Fr(e[1]),n=r[0];function s(i){is.call(s,i)}return s._file=n,s._ignored=Pv(t),s._namespace=t,s._traced=Mv(t),s._warned=Object.create(null),s.function=Lv,s.property=Nv,s}function Tv(t,e){var r=typeof t.listenerCount!="function"?t.listeners(e).length:t.listenerCount(e);return r>0}function Pv(t){if(process.noDeprecation)return!0;var e=process.env.NO_DEPRECATION||"";return qu(e,t)}function Mv(t){if(process.traceDeprecation)return!0;var e=process.env.TRACE_DEPRECATION||"";return qu(e,t)}function is(t,e){var r=Tv(process,"deprecation");if(!(!r&&this._ignored)){var n,s,i,o,a=0,c=!1,d=os(),u=this._file;for(e?(o=e,i=Fr(d[1]),i.name=o.name,u=i[0]):(a=2,o=Fr(d[a]),i=o);a<d.length;a++)if(n=Fr(d[a]),s=n[0],s===u)c=!0;else if(s===this._file)u=this._file;else if(c)break;var l=n?o.join(":")+"__"+n.join(":"):void 0;if(!(l!==void 0&&l in this._warned)){this._warned[l]=!0;var p=t;if(p||(p=i===o||!i.name?Bu(o):Bu(i)),r){var f=ju(this._namespace,p,d.slice(a));process.emit("deprecation",f);return}var g=process.stderr.isTTY?Dv:Ov,v=g.call(this,p,n,d.slice(a));process.stderr.write(v+`
5
5
  `,"utf8")}}}function Fr(t){var e=t.getFileName()||"<anonymous>",r=t.getLineNumber(),n=t.getColumnNumber();t.isEval()&&(e=t.getEvalOrigin()+", "+e);var s=[e,r,n];return s.callSite=t,s.name=t.getFunctionName(),s}function Bu(t){var e=t.callSite,r=t.name;r||(r="<anonymous@"+eo(t)+">");var n=e.getThis(),s=n&&e.getTypeName();return s==="Object"&&(s=void 0),s==="Function"&&(s=n.name||s),s&&e.getMethodName()?s+"."+r:r}function Ov(t,e,r){var n=new Date().toUTCString(),s=n+" "+this._namespace+" deprecated "+t;if(this._traced){for(var i=0;i<r.length;i++)s+=`
6
6
  at `+r[i].toString();return s}return e&&(s+=" at "+eo(e)),s}function Dv(t,e,r){var n="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+t+"\x1B[39m";if(this._traced){for(var s=0;s<r.length;s++)n+=`
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{af as a,bf as b,cf as c,df as d,ef as e,ff as f,gf as g}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import"./chunk-VVTGOEZG.js";import"./chunk-XBIUAUEW.js";import"./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"./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"./chunk-6B5BDE7S.js";import"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{b as OUTPUT_UPDATE_INTERVAL_MS,g as ShellTool,f as ShellToolInvocation,c as buildLongRunningForegroundHint,d as detectBlockedSleepPattern,a as parseNumstat,e as repairLeakedShellToolArgMarkup};
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{c as p,d as C,f as E,g as I}from"./chunk-LNTO3FNQ.js";import"./chunk-L5ASITMV.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{kc as o,ld as a}from"./chunk-OVC5Z3EX.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-VB4MJSMC.js";import"./chunk-OXHC3R2R.js";import{g as S,i as v,p as y,q as b}from"./chunk-BGZJUBRA.js";import"./chunk-3YLXGE6T.js";import"./chunk-SWEYYDZO.js";import{Z as f}from"./chunk-5QAKUC2D.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as u}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";u();import L from"path";var r=f("SKILL"),$=`Execute a skill within the main conversation
3
+ import{c as p,d as C,f as E,g as I}from"./chunk-FRL6KOLY.js";import"./chunk-VWWEEU4V.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{kc as o,ld as a}from"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{g as S,i as v,p as y,q as b}from"./chunk-6B5BDE7S.js";import"./chunk-3YLXGE6T.js";import"./chunk-EQEQPZLQ.js";import{aa as f}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as u}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";u();import L from"path";var r=f("SKILL"),$=`Execute a skill within the main conversation
4
4
 
5
5
  <skills_instructions>
6
6
  When users ask you to perform tasks, check if any of the available skills can help complete the task more effectively. Skills provide specialized capabilities and domain knowledge.
@@ -0,0 +1,3 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import{$ as ti,$a as tj,$b as xk,$c as ul,$d as um,$f as ho,$g as eq,$h as fr,$i as es,$j as dt,$k as du,A as ah,Aa as Ui,Ab as Uj,Ac as Xk,Ad as Vl,Ae as Pm,Af as xn,Ag as Co,Ah as Gq,Ai as Ir,Aj as Ds,Ak as Et,Al as Du,B as bh,Ba as Vi,Bb as Vj,Bc as Yk,Bd as Wl,Be as Qm,Bf as yn,Bg as Ko,Bh as Hq,Bi as Jr,Bj as Es,Bk as Ft,Bl as Eu,C as ch,Ca as Wi,Cb as Wj,Cc as Zk,Cd as Xl,Ce as Rm,Cf as zn,Cg as Lo,Ch as Iq,Ci as Kr,Cj as Fs,Ck as Gt,Cl as Fu,D as dh,Da as Xi,Db as Xj,Dc as _k,Dd as Yl,De as Sm,Df as An,Dg as Ip,Dh as Jq,Di as Lr,Dj as Gs,Dk as Ht,Dl as Gu,E as eh,Ea as Yi,Eb as Yj,Ec as $k,Ed as Zl,Ee as Tm,Ef as Bn,Eg as Jp,Eh as Kq,Ei as Mr,Ej as Hs,Ek as It,El as Hu,F as fh,Fa as Zi,Fb as Zj,Fd as _l,Fe as Um,Ff as Cn,Fg as Kp,Fh as Lq,Fi as Nr,Fj as Is,Fk as Jt,Fl as Iu,G as gh,Ga as _i,Gb as _j,Gc as al,Gd as $l,Ge as Vm,Gf as Dn,Gg as Lp,Gh as Mq,Gi as Or,Gj as Js,Gk as Kt,Gl as Ju,H as hh,Ha as $i,Hb as $j,Hc as bl,Hd as am,He as Wm,Hf as En,Hg as Mp,Hh as Nq,Hi as Pr,Hj as Ks,Hk as Lt,Hl as Ku,Ia as aj,Ib as ak,Ic as cl,Id as bm,Ie as Xm,If as Fn,Ig as Np,Ih as Oq,Ii as Qr,Ij as Ls,Ik as Mt,Il as Lu,J as ih,Ja as bj,Jb as bk,Jc as dl,Jd as cm,Je as Ym,Jf as Gn,Jg as Op,Jh as Pq,Jj as Ms,Jk as Nt,Jl as Mu,K as jh,Ka as cj,Kb as ck,Kc as el,Kd as dm,Kf as Hn,Kg as Pp,Kh as Qq,Kj as Ns,Kk as Ot,Kl as Nu,L as kh,La as dj,Lb as dk,Lc as fl,Ld as em,Le as Zm,Lf as In,Lg as Qp,Lh as Rq,Li as Rr,Lk as Pt,Ll as Ou,M as ei,Ma as ej,Mb as ek,Mc as gl,Md as fm,Me as _m,Mf as Tn,Mg as Rp,Mh as Sq,Mi as Sr,Mk as Qt,Ml as Pu,N as fi,Na as fj,Nb as fk,Nd as gm,Nf as Un,Ng as Sp,Nh as Tq,Ni as Tr,Nj as Os,Nk as Rt,Nl as Qu,O as gi,Oa as gj,Ob as gk,Oc as hl,Od as hm,Of as Vn,Og as Tp,Oh as Uq,Oi as Ur,Oj as Ps,Ok as St,Ol as Ru,P as hi,Pa as hj,Pb as hk,Pc as il,Pd as im,Pf as Wn,Pg as Up,Ph as Vq,Pi as Vr,Pj as Qs,Pk as Tt,Pl as Su,Q as ii,Qa as ij,Qb as ik,Qc as jl,Qd as jm,Qf as Xn,Qg as Vp,Qh as Wq,Qi as Wr,Qj as Rs,Qk as Ut,Ql as Tu,R as ji,Ra as jj,Rb as jk,Rc as kl,Rd as km,Rf as Yn,Rg as Wp,Rh as Xq,Ri as Xr,Rj as Ss,Rk as Vt,Rl as Uu,S as ki,Sa as kj,Sb as kk,Sc as ll,Sd as lm,Sf as Zn,Sg as Xp,Sh as Yq,Si as Yr,Sj as Ts,Sk as Wt,Sl as Vu,T as li,Ta as lj,Tb as lk,Tc as ml,Td as mm,Tf as _n,Tg as Yp,Th as Zq,Ti as Zr,Tj as Xs,Tk as Xt,Tl as Wu,U as mi,Ua as mj,Ub as ok,Uc as nl,Ud as nm,Ue as $m,Uf as $n,Ug as Zp,Uh as _q,Ui as _r,Uj as Ys,Uk as Yt,V as ni,Va as nj,Vb as rk,Vc as ol,Vd as om,Ve as an,Vf as ao,Vg as _p,Vh as $q,Vi as $r,Vj as Zs,Vk as Zt,W as oi,Wa as oj,Wb as sk,Wc as pl,Wd as pm,We as bn,Wf as bo,Wg as $p,Wh as ar,Wi as as,Wj as _s,Wk as _t,X as pi,Xa as pj,Xb as tk,Xc as ql,Xd as qm,Xe as cn,Xf as co,Xg as aq,Xh as br,Xi as bs,Xj as $s,Xk as $t,Y as qi,Ya as qj,Yb as uk,Yc as rl,Yd as rm,Ye as dn,Yf as eo,Yg as bq,Yh as cr,Yj as at,Yk as au,Z as ri,Za as rj,Zb as vk,Zc as sl,Zd as sm,Ze as en,Zf as fo,Zg as cq,Zh as dr,Zi as cs,Zj as bt,Zk as bu,_ as si,_a as sj,_b as wk,_c as tl,_d as tm,_e as fn,_f as go,_g as dq,_h as er,_i as ds,_j as ct,_k as cu,a as ta,aa as ui,ab as uj,ac as yk,ad as vl,ae as vm,ag as io,ah as fq,ai as gr,aj as fs,ak as et,al as eu,b as ua,ba as vi,bb as vj,bc as zk,bd as wl,be as wm,bg as jo,bh as gq,bi as hr,bj as gs,bk as ft,bl as fu,c as va,ca as wi,cb as wj,cc as Ak,cd as xl,ce as xm,cg as ko,ch as hq,ci as ir,cj as hs,ck as gt,cl as gu,d as wa,da as xi,db as xj,dc as Bk,dd as yl,de as ym,dg as lo,dh as iq,di as jr,dj as is,dk as ht,dl as hu,e as xa,ea as yi,eb as yj,ec as Ck,ed as zl,ee as zm,eg as mo,eh as jq,ei as kr,ek as it,el as iu,f as ya,fa as zi,fb as zj,fc as Dk,fd as Al,fe as Am,fg as no,fh as kq,fi as lr,fk as jt,fl as ju,g as za,ga as Bi,gb as Aj,gc as Ek,gd as Bl,ge as Bm,gg as oo,gh as lq,gi as or,gj as js,gk as kt,gl as ku,h as Aa,ha as Ci,hb as Bj,hc as Fk,hd as Cl,he as Cm,hf as gn,hg as po,hh as mq,hi as pr,hj as ks,hk as lt,hl as lu,i as Ba,ia as Di,ib as Cj,ic as Gk,id as Dl,ie as Dm,if as hn,ih as oq,ii as qr,ij as ls,ik as mt,il as mu,j as Lg,ja as Ei,jb as Dj,jc as Hk,jd as El,je as Em,jf as jn,jh as pq,ji as rr,jj as ms,jk as nt,jl as nu,k as Mg,kb as Ej,kc as Ik,kd as Fl,ke as Fm,kf as kn,kh as qq,ki as sr,kj as ns,kk as ot,kl as ou,l as Ng,la as Fi,lb as Fj,lc as Jk,ld as Gl,le as Gm,lf as ln,lh as rq,li as tr,lj as os,lk as pt,ll as pu,m as Og,ma as Gi,mb as Gj,mc as Kk,md as Hl,me as Hm,mf as mn,mh as sq,mi as ur,mj as ps,mk as qt,ml as qu,n as Pg,na as Hi,nb as Hj,nc as Lk,nd as Il,ne as Im,nf as nn,nh as tq,ni as vr,nj as qs,nk as rt,nl as ru,o as Qg,oa as Ii,ob as Ij,oc as Mk,od as Jl,oe as Jm,of as on,og as qo,oh as uq,oi as wr,oj as rs,ok as st,ol as su,p as Rg,pa as Ji,pb as Jj,pc as Nk,pd as Kl,pe as Km,pf as pn,pg as ro,ph as vq,pi as xr,pj as ss,pk as tt,pl as tu,q as Sg,qa as Ki,qb as Kj,qc as Ok,qd as Ll,qe as Lm,qf as qn,qg as so,qh as wq,qi as yr,qj as ts,qk as ut,ql as uu,r as Tg,ra as Li,rb as Lj,rc as Pk,rd as Ml,re as Mm,rf as rn,rg as to,rh as xq,ri as zr,rj as us,rk as vt,rl as vu,s as Ug,sa as Mi,sb as Mj,sc as Qk,sd as Nl,sf as sn,sg as uo,sh as yq,si as Ar,sj as vs,sk as wt,sl as wu,t as Vg,ta as Ni,tb as Nj,tc as Rk,td as Ol,tf as tn,tg as vo,th as zq,ti as Br,tj as ws,tk as xt,tl as xu,u as Wg,ua as Oi,ub as Oj,uc as Sk,ud as Pl,ue as Nm,uf as un,ug as wo,uh as Aq,ui as Cr,uj as xs,uk as yt,ul as yu,v as Xg,va as Pi,vb as Pj,vd as Ql,ve as Om,vf as vn,vg as xo,vh as Bq,vi as Dr,vj as ys,vk as zt,vl as zu,w as Yg,wa as Qi,wb as Qj,wc as Tk,wd as Rl,wf as wn,wg as yo,wh as Cq,wi as Er,wj as zs,wk as At,wl as Au,x as Zg,xa as Ri,xb as Rj,xc as Uk,xd as Sl,xg as zo,xh as Dq,xi as Fr,xj as As,xk as Bt,xl as Bu,y as _g,ya as Si,yb as Sj,yc as Vk,yd as Tl,yg as Ao,yh as Eq,yi as Gr,yj as Bs,yk as Ct,z as $g,za as Ti,zb as Tj,zc as Wk,zd as Ul,zg as Bo,zh as Fq,zi as Hr,zj as Cs,zk as Dt,zl as Cu}from"./chunk-KIQWWC46.js";import"./chunk-TZIDSCTF.js";import{a as Mo,b as No,c as Oo,d as Po,e as Qo,f as jp,g as kp,h as lp,i as mp,j as np,k as op,l as pp,m as qp}from"./chunk-VVTGOEZG.js";import{a as rp,b as sp,c as tp,d as up,e as vp,f as wp,g as xp,h as yp,i as zp,j as Ap,k as Bp,l as Cp,m as Dp,n as Ep,o as Fp,p as Gp,q as Hp}from"./chunk-XBIUAUEW.js";import{a as Ro,b as So,c as To,d as Uo,e as Vo,f as Wo,g as Xo,h as Yo,i as Zo,j as _o,k as $o,l as ap,m as bp,n as cp,o as dp,p as ep,q as fp,r as gp,s as hp,t as ip}from"./chunk-5OY5RZSF.js";import{a as Ai}from"./chunk-LSDMWVW6.js";import{c as Us,e as Vs,f as Ws}from"./chunk-MTMU7JYZ.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-ZPQ7BBR2.js";import"./chunk-TISQNFB5.js";import{b as lh,c as mh,d as nh,e as oh,f as ph,g as qh,h as rh,i as sh,j as th,k as uh,l as vh,m as wh,n as xh,o as Xh,p as Yh,q as Zh,r as _h,s as $h,t as ai,u as bi,v as ci,w as di}from"./chunk-LZYLZZNI.js";import{a as mr,b as nr}from"./chunk-47XR7IMP.js";import{b as nq}from"./chunk-FWIVFCKF.js";import{a as Jn,b as Kn,c as Ln,d as Mn,e as Nn,f as On,g as Pn,h as Qn,i as Rn,j as Sn,k as Do,l as Eo,m as Fo,n as Go,o as Ho,p as Io,q as Jo}from"./chunk-QKYGQLWC.js";import{c as pk,f as qk}from"./chunk-FRL6KOLY.js";import{a as yh,b as zh,c as Ah,d as Bh,e as Ch,f as Dh,g as Eh,h as Fh,i as Gh,j as Hh,k as Ih,l as Jh,m as Kh,n as Lh,o as Mh,p as Nh,q as Oh,r as Ph,s as Qh,t as Rh,u as Sh,v as Th,w as Uh,x as Vh,y as Wh}from"./chunk-VWWEEU4V.js";import{a as mk,b as nk}from"./chunk-RNKDFE2S.js";import"./chunk-Q2I3ARPJ.js";import"./chunk-CM3HWOOK.js";import{b as gg,d as hg,e as ig,g as jg,h as kg,i as lg,j as mg,k as ng}from"./chunk-QHA3ZBRO.js";import{A as Ue,B as Ve,C as We,D as Xe,E as Ye,F as Ze,G as _e,H as $e,I as af,J as bf,K as cf,L as df,P as sf,Q as tf,T as uf,U as vf,V as wf,X as Pf,Y as Qf,Z as Rf,aa as Sf,b as te,c as ue,ca as Tf,d as ve,da as Uf,e as we,ea as Vf,fa as Yf,ga as Zf,ha as _f,i as xe,ia as $f,j as ye,ja as ag,k as ze,ka as bg,l as Fe,la as cg,m as Ge,ma as dg,n as He,na as eg,o as Ie,oa as fg,p as Je,pa as Gg,q as Ke,qa as Hg,r as Le,ra as Ig,s as Me,sa as Jg,t as Ne,ta as Kg,u as Oe,v as Pe,w as Qe,x as Re,y as Se,z as Te}from"./chunk-WMPQ67GO.js";import{a as xf,b as yf,c as zf,d as Af}from"./chunk-4F4DA5UI.js";import{a as Lf,e as Mf,f as Nf,g as Of}from"./chunk-DC7LAFZZ.js";import{e as Ae,f as Be,g as Ce,h as De,i as Ee,m as Bf,n as Cf,o as Df,p as Ef,q as Ff,r as Gf,s as Hf,t as If,u as Jf,v as Kf}from"./chunk-S7G6QPEP.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{b as ef,c as ff,d as gf,e as hf,f as jf,g as kf,h as lf,i as mf,j as nf,k as of,l as pf,m as qf,n as rf}from"./chunk-SDTWBD62.js";import{$ as fb,A as Ta,Aa as Fb,Ab as xc,B as Ua,Ba as Gb,Bb as yc,C as Va,Ca as Hb,Cb as zc,Cc as Hd,D as Wa,Da as Ib,Db as Ac,Dc as Id,E as Xa,Ea as Jb,Eb as Bc,Ec as Jd,F as Ya,Fa as Kb,Fb as Cc,Fc as Kd,G as Za,Ga as Lb,Gb as Dc,Gc as Ld,H as _a,Ha as Mb,Hb as Ec,Hc as Md,I as $a,Ia as Nb,Ib as Fc,Ic as Nd,Ja as Ob,Jb as Gc,Jc as Od,Ka as Pb,Kb as Hc,Kc as Pd,La as Qb,Lc as Qd,Ma as Rb,Mb as Ic,Mc as Rd,Na as Sb,Nb as Jc,Nc as Sd,Ob as Kc,Oc as Td,Pb as Lc,Pc as Ud,Qa as Tb,Qb as Mc,Rb as Nc,Sc as Vd,Ta as Ub,Tc as Wd,Ua as Vb,Ub as Oc,Uc as Xd,Va as Wb,Vb as Pc,Vc as Yd,W as ab,Wa as Xb,Wb as Qc,Wc as Zd,X as bb,Xa as Yb,Xb as Rc,Xc as _d,Y as cb,Ya as Zb,Yb as Sc,Yc as $d,Z as db,Za as _b,Zb as Tc,Zc as ae,_ as eb,_a as $b,aa as gb,ab as ac,b as ba,ba as hb,bb as bc,c as ca,ca as ib,cb as cc,cc as Uc,cd as be,d as da,da as jb,db as dc,dd as ce,e as qa,ea as kb,eb as ec,ec as Vc,ed as de,fa as lb,fb as fc,fc as Wc,g as ra,ga as mb,gb as gc,gc as Xc,gd as ee,h as sa,ha as nb,hb as hc,hc as Yc,hd as fe,ia as ob,ib as ic,ic as Zc,ja as pb,jb as jc,jc as _c,jd as ge,ka as qb,kb as kc,kc as $c,la as rb,lb as lc,lc as ad,ld as he,ma as sb,mb as mc,mc as bd,md as ie,n as Ga,nb as nc,nc as cd,nd as je,o as Ha,oa as tb,ob as oc,oc as dd,od as ke,p as Ia,pa as ub,pb as pc,pc as ed,pd as le,q as Ja,qa as vb,qb as qc,qc as fd,qd as me,r as Ka,ra as wb,rb as rc,rc as gd,rd as ne,s as La,sa as xb,sb as sc,sc as hd,sd as oe,t as Ma,ta as yb,tc as id,td as pe,u as Na,ua as zb,ud as qe,v as Oa,va as Ab,vd as re,w as Pa,wa as Bb,wb as tc,wc as Gd,wd as se,x as Qa,xa as Cb,xb as uc,y as Ra,ya as Db,yb as vc,z as Sa,za as Eb,zb as wc}from"./chunk-B3NVKOSU.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{a as jd,b as kd,c as ld,d as md,e as nd,f as od,g as pd,h as qd,i as rd,j as sd,k as td,l as ud,m as vd,n as wd,o as xd,p as yd,q as zd,r as Ad,s as Bd,t as Cd,u as Dd,v as Ed,w as Fd}from"./chunk-32PTAACU.js";import"./chunk-32T6RWWT.js";import{a as ea,e as fa,f as ga,g as ha,h as ia,i as ja,j as ka,k as la,l as ma,m as na,n as oa,o as pa,p as Ca,q as Da,r as Ea,s as Fa}from"./chunk-6B5BDE7S.js";import{a as og,b as pg,d as qg,e as rg,f as sg,g as tg,h as ug,i as vg,j as wg,k as xg,l as yg,m as zg,n as Ag,o as Bg,p as Cg,q as Dg,r as Eg,t as Fg}from"./chunk-RJX7DK4Y.js";import"./chunk-XCJYORZX.js";import"./chunk-ESSYHTAZ.js";import{a as Wf,b as Xf}from"./chunk-3YLXGE6T.js";import{a as Y,b as Z,c as _,d as $,e as aa}from"./chunk-EQEQPZLQ.js";import{$ as W,A as z,B as A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,N as M,P as N,Q as O,U as R,V as S,Y as T,Z as U,_ as V,aa as X,b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h,j as i,k as j,l as k,m as l,n as m,o as n,p as o,q as p,r as q,s as r,t as s,u as t,v as u,w as v,x as w,y as x,z as y}from"./chunk-VLYRNOD3.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{c as P,g as Q}from"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{Ha as AGENT_CONTEXT_FILENAME,go as AGENT_WORKTREE_HEX_LENGTH,fo as AGENT_WORKTREE_PREFIX,ho as AGENT_WORKTREE_SLUG_PATTERN,Jj as ALL_PROVIDERS,Ys as APPROVAL_MODES,_s as APPROVAL_MODE_INFO,ta as ARENA_MAX_AGENTS,nd as AUTO_MEMORY_CONSOLIDATION_LOCK_FILENAME,jd as AUTO_MEMORY_DIRNAME,md as AUTO_MEMORY_EXTRACT_CURSOR_FILENAME,kd as AUTO_MEMORY_INDEX_FILENAME,ld as AUTO_MEMORY_METADATA_FILENAME,Uk as AUTO_MEMORY_SCHEMA_VERSION,Tk as AUTO_MEMORY_TYPES,hm as AUTO_MODE_DENIAL_LIMITS,aq as AUTO_SKILL_THRESHOLD,Cu as AbortError,r as AccountRestrictedError,Vn as AgentCore,Fn as AgentEventEmitter,En as AgentEventType,In as AgentHeadless,uo as AgentInteractive,ga as AgentStatistics,xa as AgentStatus,wa as AgentTerminateMode,Vh as AgentType,Qd as ApiCancelEvent,Pd as ApiErrorEvent,Od as ApiRequestEvent,sb as ApiRequestPhase,Rd as ApiResponseEvent,Xs as ApprovalMode,Ba as ArenaAgentClient,yo as ArenaEventEmitter,xo as ArenaEventType,Co as ArenaManager,ua as ArenaSessionStatus,to as AsyncMessageQueue,ge as AuthEvent,gt as AuthProviderType,Gg as AuthType,Lp as BACKGROUND_AGENT_CONCURRENCY_ENV,co as BASELINE_COMMIT_MESSAGE,Wa as BINARY_EXTENSIONS,Oa as BINARY_FILE_PATTERNS,Mu as BTW_MAX_INPUT_LENGTH,Tq as BUNDLE_CHUNK_DIR,Sp as BackgroundAgentResumeService,Er as BackgroundShellRegistry,Qp as BackgroundTaskRegistry,q as BadRequestError,ja as BaseDeclarativeTool,ha as BaseToolInvocation,hr as BudgetExhaustedError,po as BuiltinAgentRegistry,Df as CAPPED_DEFAULT_MAX_TOKENS,eu as CODE_ACTION_KIND_LABELS,vl as COMMAND_SUBSTITUTION_WARNING,Qa as COMMON_DIRECTORY_EXCLUDES,Na as COMMON_IGNORE_PATTERNS,pa as CONCURRENCY_SAFE_KINDS,Gj as CUSTOM_API_KEY_ENV_PREFIX,Wj as ChatRecordingService,wn as CloseDiffRequestSchema,Tm as ColorMode,_j as CompressionStatus,Cs as ConditionalRulesRegistry,ht as Config,t as ContentBlockedError,Gn as ContextState,$d as ConversationFinishedEvent,Dn as CoreToolScheduler,tg as CredentialsClearRequiredError,jq as CronScheduler,Ie as DAEMON_TRACEPARENT_META_KEY,Je as DAEMON_TRACESTATE_META_KEY,bq as DEFAULT_AUTO_DREAM_MIN_HOURS,cq as DEFAULT_AUTO_DREAM_MIN_SESSIONS,Rp as DEFAULT_BACKGROUND_AGENT_CONTINUATION_MESSAGE,oo as DEFAULT_BUILTIN_SUBAGENT_TYPE,Ga as DEFAULT_CONTEXT_FILENAME,ab as DEFAULT_ENCODING,Ta as DEFAULT_FILE_EXCLUDES,nk as DEFAULT_FILE_FILTERING_OPTIONS,Yt as DEFAULT_LSP_COMMAND_CHECK_TIMEOUT_MS,Xt as DEFAULT_LSP_DOCUMENT_OPEN_DELAY_MS,_t as DEFAULT_LSP_DOCUMENT_RETRY_DELAY_MS,$t as DEFAULT_LSP_MAX_RESTARTS,Vt as DEFAULT_LSP_REQUEST_TIMEOUT_MS,bu as DEFAULT_LSP_SOCKET_MAX_RETRY_DELAY_MS,au as DEFAULT_LSP_SOCKET_RETRY_DELAY_MS,Ut as DEFAULT_LSP_STARTUP_TIMEOUT_MS,Wt as DEFAULT_LSP_WARMUP_DELAY_MS,Zt as DEFAULT_LSP_WORKSPACE_SYMBOL_WARMUP_DELAY_MS,zf as DEFAULT_MATILDA_EMBEDDING_MODEL,yf as DEFAULT_MATILDA_FLASH_MODEL,xf as DEFAULT_MATILDA_MODEL,Kp as DEFAULT_MAX_CONCURRENT_BACKGROUND_AGENTS,kt as DEFAULT_MAX_INLINE_MEDIA_BYTES,mk as DEFAULT_MEMORY_FILE_FILTERING_OPTIONS,wf as DEFAULT_OTLP_ENDPOINT,Cf as DEFAULT_OUTPUT_TOKEN_LIMIT,$s as DEFAULT_PR_ATTRIBUTION_MESSAGE,ei as DEFAULT_STOP_HOOK_BLOCK_CAP,vf as DEFAULT_TELEMETRY_TARGET,Bf as DEFAULT_TOKEN_LIMIT,ct as DEFAULT_TOOL_OUTPUT_BATCH_BUDGET,kh as DEFAULT_TOOL_RESULTS_TOTAL_CHARS_THRESHOLD,bt as DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,at as DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,du as DIAGNOSTIC_SEVERITY_LABELS,qo as DISPLAY_MODE,_p as DREAM_TASK_TYPE,ia as DeclarativeTool,Hh as DefaultHookOutput,Hd as DiscoveredMCPTool,kr as DiscoveredTool,Ef as ESCALATED_MAX_TOKENS,ca as EVENT_API_ERROR,da as EVENT_API_RESPONSE,ba as EVENT_TOOL_CALL,Tn as EXCLUDED_TOOLS_FOR_SUBAGENTS,Jr as EXTENSIONS_CONFIG_FILENAME,Ir as EXTENSIONS_DIRECTORY_NAME,Lr as EXTENSION_SETTINGS_FILENAME,Un as EXTERNAL_MESSAGE_PREFIX,Zp as EXTRACT_TASK_TYPE,Kd as EndSessionEvent,ne as ExtensionDisableEvent,ee as ExtensionEnableEvent,be as ExtensionInstallEvent,rs as ExtensionManager,js as ExtensionSettingScope,de as ExtensionUninstallEvent,qs as ExtensionUpdateState,Ri as FILE_HISTORY_DIR,Yn as FORK_SUBAGENT_TYPE,g as FatalAuthenticationError,m as FatalBudgetExceededError,n as FatalCancellationError,j as FatalConfigError,f as FatalError,h as FatalInputError,i as FatalSandboxError,l as FatalToolExecutionError,k as FatalTurnLimitedError,lo as FileDiscoveryService,$m as FileEncoding,Ua as FileExclusions,Ui as FileHistoryService,ob as FileOperation,Hr as FileReadCache,pn as FileSchema,Eu as FileSearchFactory,Sd as FlashFallbackEvent,o as ForbiddenError,$h as GOAL_HOOK_TIMEOUT_MS,_h as GOAL_HOOK_TIMEOUT_SECONDS,w as GOOGLE_ACCOUNTS_FILENAME,Qk as GeminiChat,iq as GeminiClient,Zj as GeminiEventType,ko as GitIgnoreParser,jo as GitWorktreeService,Bh as HOOKS_CONFIG_FIELDS,zh as HookEventName,Ah as HookPhase,ws as HookRegistry,ys as HookSystem,Ch as HookType,yh as HooksConfigSource,xn as IDEConnectionStatus,gn as IDE_DEFINITIONS,kn as IDE_MAX_OPEN_FILES,ln as IDE_MAX_SELECTED_TEXT_LENGTH,mn as IDE_REQUEST_TIMEOUT_MS,xu as IDLE_SPECULATION,Io as INBOXES_DIR,ou as INITIAL_FOLLOWUP_STATE,Kr as INSTALL_METADATA_FILENAME,so as ITermBackend,yn as IdeClient,_d as IdeConnectionEvent,Zd as IdeConnectionType,rn as IdeContextNotificationSchema,qn as IdeContextSchema,nn as IdeContextStore,sn as IdeDiffAcceptedNotificationSchema,un as IdeDiffClosedNotificationSchema,tn as IdeDiffRejectedNotificationSchema,Ws as Ignore,vo as InProcessBackend,mr as InputFormat,er as InvalidMcpConfigError,fj as InvalidSessionListCursorError,Ok as InvalidStreamError,it as JsonFormatter,nq as KeychainTokenStorage,na as Kind,ae as KittySequenceOverflowEvent,Eo as LEADER_NAME,Zi as LITE_READ_BUF_SIZE,Ia as LOCAL_CONTEXT_FILENAME,wt as Logger,Ud as LoopType,fu as LspConfigLoader,gu as LspConnectionFactory,hu as LspResponseNormalizer,iu as LspServerManager,Af as MAINLINE_CODER_MODEL,qa as MAIN_SOURCE,Lf as MATILDA_API_KEY_ENV_KEY,jn as MATILDA_CODE_COMPANION_EXTENSION_NAME,Ot as MATILDA_CODE_SIMPLE_ENV_VAR,Dg as MATILDA_CREDENTIAL_FILE_MODE,v as MATILDA_DIR,Sf as MATILDA_OAUTH_MODELS,uc as MATILDA_SESSION_ID_HASH_ATTR,tc as MATILDA_USER_ID_HASH_ATTR,Np as MAX_CONCURRENT_BACKGROUND_AGENTS,yr as MAX_CONCURRENT_MONITORS,Gi as MAX_DIFF_SIZE_BYTES,Fi as MAX_FILES,Ii as MAX_FILES_FOR_DETAILS,Zh as MAX_GOAL_ITERATIONS,Hi as MAX_LINES_PER_FILE,Cr as MAX_NOTIFICATION_OUTPUT_TAIL_BYTES,Op as MAX_RETAINED_TERMINAL_AGENTS,zr as MAX_RETAINED_TERMINAL_MONITORS,Dr as MAX_RETAINED_TERMINAL_SHELLS,Fr as MAX_RETAINED_TERMINAL_WORKFLOWS,Qi as MAX_SNAPSHOTS,Do as MAX_TEAMMATES,fm as MAX_TRANSCRIPT_MESSAGES,Eh as MAX_USER_PROMPT_EXPANSION_ADDITIONAL_CONTEXT_LENGTH,wq as MCPDiscoveryState,sq as MCPOAuthProvider,oq as MCPOAuthTokenStorage,et as MCPServerConfig,vq as MCPServerStatus,gr as MCP_BUDGET_REARM_FRACTION,fr as MCP_BUDGET_WARN_FRACTION,tq as MCP_DEFAULT_TIMEOUT_MSEC,Pa as MEDIA_FILE_PATTERNS,Ja as MEMORY_SECTION_HEADER,Su as MOCK_TOOL_GET_CONFIRMATION_DETAILS,Ru as MOCK_TOOL_GET_DEFAULT_PERMISSION,Rf as MODEL_GENERATION_CONFIG_FIELDS,oa as MUTATOR_KINDS,zg as MatildaOAuth2Client,Ag as MatildaOAuth2Event,ug as MatildaOAuthPollError,cr as McpBudgetWouldExceedError,xq as McpClient,jr as McpClientManager,dr as McpServerSpawnFailedError,yt as McpTransportPool,re as MemoryDreamEvent,qe as MemoryExtractEvent,dq as MemoryManager,qb as MemoryMetricType,se as MemoryRecallEvent,As as MessageBus,al as MessageBusType,tt as MessageSenderType,Uu as MockModifiableTool,Tu as MockModifiableToolInvocation,Qu as MockTool,Uf as ModelRegistry,fe as ModelSlashCommandEvent,Vf as ModelsConfig,Br as MonitorRegistry,ju as NativeLspClient,ku as NativeLspService,Vd as NextSpeakerCheckEvent,Ph as NotificationType,rq as OAUTH_AUTH_URL_EVENT,qq as OAUTH_DISPLAY_MESSAGE_EVENT,pq as OAuthUtils,Aj as OPENROUTER_BASE_URL,zj as OPENROUTER_ENV_KEY,Ff as OUTPUT_TOKEN_SAFETY_MARGIN,ye as OpenAILogger,vn as OpenDiffRequestSchema,nr as OutputFormat,uu as OverlayFs,z as PATH_ARG_KEYS,$q as POOLED_TRANSPORTS_DEFAULT,qj as PROVIDER_METADATA_NS,Ra as PYTHON_EXCLUDES,pb as PerformanceMetricType,vr as PermissionManager,Rh as PermissionMode,Oh as PermissionRequestHookOutput,Uh as PostCompactTrigger,Mh as PostToolBatchHookOutput,Kh as PostToolUseFailureHookOutput,Jh as PostToolUseHookOutput,Th as PreCompactTrigger,Ih as PreToolUseHookOutput,oe as PromptSuggestionEvent,Oj as ProviderInstallError,rp as RECIPROCAL_CALLER,Rr as REDACTED_URL_CREDENTIAL,hf as REPORTED_ATTEMPT_PURPOSES,ff as REPORTED_ATTEMPT_PURPOSE_HEADER,gf as REPORTED_OPERATION_HEADER_NAMES,ef as REPORTED_OPERATION_ID_HEADER,Pf as RUNTIME_SNAPSHOT_PREFIX,Vi as RUNTIME_STATUS_SCHEMA_VERSION,Gd as ReadFileTool,lf as ReportedOperationTracker,Ps as RipGrepTool,Td as RipgrepFallbackEvent,Be as RuntimeDiagnosticsCollector,sm as SAFE_TOOL_ALLOWLIST,ej as SESSION_TITLE_MAX_LENGTH,y as SHELL_SPECIAL_CHARS,Il as SHELL_TOOL_NAMES,$p as SKILL_REVIEW_TASK_TYPE,fi as STOP_HOOK_BLOCK_CAP_ENV,Vj as STREAM_RECOVERY_PARTIAL_DISPOSITION,Uj as STREAM_RECOVERY_SNAPSHOT_DISPOSITION,qu as SUGGESTION_PROMPT,kg as SUPPORTED_IMAGE_MIME_TYPES,cu as SYMBOL_KIND_LABELS,Sa as SYSTEM_FILE_EXCLUDES,sk as SYSTEM_REMINDER_CLOSE,rk as SYSTEM_REMINDER_OPEN,fa as SchemaValidator,mq as SdkControlClientTransport,Tb as SemanticAttributes,fq as SendMessageType,Sh as SessionEndReason,gj as SessionService,Qh as SessionStartSource,ps as SettingScope,_m as ShellExecutionService,tr as SkillActivationRegistry,qr as SkillError,he as SkillLaunchEvent,ur as SkillManager,Xd as SlashCommandStatus,jk as SleepInhibitor,Q as SpanStatusCode,pe as SpeculationEvent,fn as StandardFileSystemService,Jd as StartSessionEvent,Nh as StopHookOutput,N as Storage,Kk as StreamEventType,Wn as SubagentError,Xn as SubagentErrorCode,xr as SubagentManager,wr as SubagentValidator,Go as TASKS_DIR,Jo as TEAMMATE_COLORS,Fo as TEAMS_DIR,Ho as TEAM_CONFIG_FILENAME,Ci as TERMINAL_CSI_REGEX,Bi as TERMINAL_OSC_REGEX,Di as TERMINAL_SHIFT_DCS_REGEX,Kj as THIRD_PARTY_PROVIDERS,Tj as THOUGHT_ONLY_MAX_TOKENS_DISPOSITION,Hl as TOOL_NAME_ALIASES,Ct as TOOL_USE_SUMMARY_SYSTEM_PROMPT,yp as TaskOwnershipError,Lo as TeamEventEmitter,Ko as TeamEventType,Jp as TeamManager,uf as TelemetryTarget,jg as TextTokenizer,ro as TmuxBackend,Nd as ToolCallEvent,ma as ToolConfirmationOutcome,Da as ToolDisplayNames,Fa as ToolDisplayNamesMigration,ea as ToolErrorType,rb as ToolExecutionPhase,Ca as ToolNames,Ea as ToolNamesMigration,ce as ToolOutputTruncatedEvent,lr as ToolRegistry,Zs as TrustGateError,$j as Turn,od as USER_AUTO_MEMORY_DIRNAME,ra as UiTelemetryService,p as UnauthorizedError,je as UserFeedbackEvent,ie as UserFeedbackRating,Ld as UserPromptEvent,Lh as UserPromptExpansionHookOutput,Md as UserRetryEvent,P as ValueType,eo as WORKTREES_DIR,Zn as WORKTREE_BRANCH_PREFIX,$n as WORKTREE_SESSION_FILE,Gr as WorkflowRunRegistry,mo as WorkspaceContext,zt as WorkspaceMcpBudget,St as WorkspaceMemoryFileTooLargeError,Qt as WorkspaceMemoryWriteTimeoutError,sh as __resetActiveGoalStoreForTests,ki as _recoverObjectsFromLine,zn as _resetCachedIdeServerHost,pi as _resetEnsuredDirsCacheForTest,Os as _resetRipGrepCachesForTest,x as _resetValidatePathCacheForTest,ai as abortGoalForStopHookCap,Au as abortSpeculation,zu as acceptSpeculation,lk as acquireSleepInhibitor,lh as activeGoalEquals,Pe as addDaemonRequestAttribute,zq as addMCPStatusChangeListener,Zb as addModelOutputAttributes,Xb as addSystemPromptAttributes,_b as addToolInputAttributes,$b as addToolResultAttributes,Yb as addToolSchemaAttributes,Wb as addUserPromptAttributes,Nt as aggregateUsage,Jm as allowEditorTypeInSandbox,$g as appendToLastTextPart,xm as applyAutoModeDecision,Pj as applyProviderInstallPlan,qk as applySkillAllowedTools,mt as approxBase64Bytes,sp as assertValidTaskId,Zo as assignTeammateColor,Z as atomicWriteFile,aa as atomicWriteFileSync,_ as atomicWriteJSON,Dp as blockTask,xk as buildAddedMcpToolsReminder,Ak as buildAddedSkillsReminder,hj as buildApiHistoryFromConversation,zk as buildAvailableSkillsReminder,Pp as buildBackgroundEntryLabel,Ou as buildBtwCacheSafeParams,Nu as buildBtwPrompt,wk as buildDeferredToolsReminder,Ao as buildFallbackApproachSummary,Ql as buildHumanReadableRuleLabel,rj as buildInstallPlan,yk as buildMcpServerInstructionsReminder,kq as buildMissedCronNotification,Mg as buildModelIdContext,Yl as buildPermissionCheckContext,Pl as buildPermissionRules,yj as buildProviderTemplate,rf as buildReportedOperationHeaders,xl as buildShellExecWarnings,pk as buildSkillLlmContent,Bk as buildStartupContextReminder,Ip as buildTeammatePromptAddendum,Eg as cacheMatildaCredentials,Zq as canUseRipgrep,Se as captureDaemonTelemetryContext,El as checkArgumentSafety,yl as checkCommandPermissions,_r as checkForExtensionUpdate,Im as checkHasEditorType,Xr as checkNpmUpdate,Ep as claimTask,ot as clampInlineMediaPart,Gf as clampOutputToContextWindow,cp as classifyShutdownResponse,Ft as cleanSummary,Wu as cleanupTmpDir,oh as clearActiveGoal,pp as clearAllInboxes,rd as clearAutoMemoryRootCache,Vp as clearCacheSafeParams,Fg as clearCachedCredentialFile,uh as clearGoalTerminalObserver,op as clearInbox,xc as clearMatildaCorrelationHashes,$f as clearMatildaCredentials,Yi as clearRuntimeStatus,_o as clearTeammateColors,Iu as clearWelcomeBackState,Ss as clearWorktreeSession,Gs as cliSource,Yr as cloneFromGit,lq as collectMemoryDiagnostics,Gk as collectToolCallIdsFromHistory,Dm as commandExists,Mk as compactPendingUserContentToBudget,Lk as compactTextMiddle,sj as computeModelListVersion,ik as computeThresholds,lj as computeUniqueBranchTitle,Ks as computedSource,Kq as connectAndDiscover,Qq as connectToMcpServer,ar as connectionIdOf,np as consumeUnread,es as convertClaudeAgentConfig,gs as convertClaudePluginPackage,fs as convertClaudeToMatildaConfig,Vm as convertColorToHex,Cn as convertToFunctionResponse,cs as convertTomlToMarkdown,ss as copyExtension,fb as countFileLines,ti as countLines,Us as crawlCache,Kg as createContentGenerator,Jg as createContentGeneratorConfig,We as createDaemonBridgeTelemetry,X as createDebugLogger,Wk as createDefaultAutoMemoryExtractCursor,Xk as createDefaultAutoMemoryIndex,Vk as createDefaultAutoMemoryMetadata,im as createDenialState,pu as createFollowupController,Wp as createForkedChat,bi as createGoalStopHookCallback,Gh as createHookOutput,zs as createInstructionsLoadedCallback,uq as createStreamableHttpCompatibilityFetch,wp as createTask,fp as createTeamFile,Vu as createTmpDir,Bt as createToolUseSummaryMessage,Rq as createTransport,Ij as customProvider,cb as decodeBufferWithEncodingInfo,vt as decodeTagName,Ik as dedupeToolCallsById,Cj as deepseekProvider,Js as defaultSource,Ap as deleteTask,hp as deleteTeamDirs,Ti as deserializeSnapshots,bb as detectBOM,wo as detectBackend,ul as detectCommandSubstitution,$a as detectEncodingFromBuffer,hb as detectFileEncoding,lb as detectFileType,hn as detectIdeFromEnv,dn as detectLineEnding,gg as detectRuntime,Wh as detectTodoChanges,Iq as discoverMcpTools,Nq as discoverPrompts,Lq as discoverTools,jp as disposeInboxLocks,il as doesToolInvocationMatch,$r as downloadFromGitHubRelease,Wr as downloadFromNpmRegistry,Em as editorCommands,Re as emitDaemonLog,rt as encodeInsightErrorMessage,pt as encodeInsightProgressMessage,qt as encodeInsightReadyMessage,ut as encodeTagName,en as encodeTextFileContent,oc as endHookSpan,cc as endInteractionSpan,fc as endLLMRequestSpan,rc as endSubagentSpan,mc as endToolBlockedOnUserSpan,kc as endToolExecutionSpan,ic as endToolSpan,Yk as ensureAutoMemoryScaffold,cn as ensureCrlfLineEndings,Yq as ensureMacBinarySigned,Xq as ensureRipgrepHealthy,Bu as ensureToolResultPairing,oi as ensureTrailingNewlineSync,_k as ensureUserAutoMemoryScaffold,nf as enterReportedOperationContext,Ls as envLayer,E as escapePath,ll as escapeShellArg,te as estimateTokensFromChars,Bm as evaluateAutoMode,am as evaluatePermissionFlow,Zl as evaluatePermissionRules,vu as evaluateToolCall,zl as execCommand,xt as executeToolCall,ui as exists,B as expandHomeDir,Ve as extractDaemonTraceContext,Va as extractExtensionsFromPatterns,bs as extractFile,$i as extractJsonStringField,bj as extractLastJsonStringField,aj as extractLastJsonStringFields,gm as extractShellOperations,Bn as extractToolFilePaths,Ji as fetchGitDiff,Ki as fetchGitDiffHunks,nb as fileExists,Du as filter,wi as findGitRoot,ap as findMemberById,bp as findMemberByName,Mj as findProviderByCredentials,Lj as findProviderById,as as findReleaseAsset,fl as fireNotificationHook,gl as firePermissionRequestHook,el as firePostToolUseFailureHook,dl as firePostToolUseHook,cl as firePreToolUseHook,_g as flatMapTextParts,Cc as forceFlushMetrics,Xo as formatAgentId,Am as formatClassifierBlockMessage,tk as formatDateForContext,jm as formatDenialStateLog,Bo as formatLineStats,Wm as formatMemoryUsage,ii as formatStopHookBlockingCapWarning,S as formatTraceparent,Po as forwardApproval,io as generateAgentWorktreeSlug,rg as generateCodeChallenge,qg as generateCodeVerifier,Hj as generateCustomEnvKey,sg as generatePKCEPair,ru as generatePromptSuggestion,At as generateSessionRecap,bl as generateToolUseId,Dt as generateToolUseSummary,Yo as generateUniqueTeammateName,Id as generateValidName,ue as generatedOutputTokens,mh as getActiveGoal,sc as getActiveInteractionSpan,Mn as getAgentName,Hp as getAgentStatuses,Ma as getAllGeminiMdFilenames,Eq as getAllMCPServerStatuses,Nj as getAllProviderBaseUrls,gk as getArenaSystemReminder,xd as getAutoMemoryConsolidationLockPath,wd as getAutoMemoryExtractCursorPath,Ad as getAutoMemoryFilePath,ud as getAutoMemoryIndexPath,vd as getAutoMemoryMetadataPath,sd as getAutoMemoryProjectStateDir,qd as getAutoMemoryRoot,yd as getAutoMemoryTopicFilename,zd as getAutoMemoryTopicPath,zm as getAutoModePermissionDeniedReason,Vq as getBuiltinRipgrep,Up as getCacheSafeParams,Ya as getCachedEncodingForBuffer,nl as getCommandRoot,ol as getCommandRoots,dk as getCompressionPrompt,ck as getCoreSystemPrompt,La as getCurrentGeminiMdFilename,bk as getCustomSystemPrompt,tj as getDefaultBaseUrlForProtocol,vj as getDefaultModelIds,Lm as getDiffCommand,uk as getDirectoryContextString,Fm as getEditorExecutable,cm as getEffectivePermissionForConfirmation,ns as getEnvContents,vk as getEnvironmentContext,c as getErrorMessage,d as getErrorStatus,e as getErrorType,ts as getExtensionId,Hm as getExternalEditorCommand,su as getFilterReason,ok as getFolderStructure,ch as getFunctionCalls,eh as getFunctionCallsAsJson,dh as getFunctionCallsFromParts,fh as getFunctionCallsFromPartsAsJson,xi as getGitBranch,yi as getGitRepoName,Dh as getHookKey,Tt as getIdeInstaller,An as getIdeServerHost,kp as getInboxPath,Uo as getInboxesDir,Ck as getInitialChatHistory,hk as getInsightPrompt,wh as getLastGoalTerminal,No as getLeader,Fq as getMCPDiscoveryState,nu as getMCPServerPrompts,Dq as getMCPServerStatus,Nf as getMatildaAuthBaseUrl,ag as getMatildaAuthStatus,wc as getMatildaCorrelationHashes,Yf as getMatildaCredentialsPath,Cg as getMatildaOAuthClient,lt as getMaxInlineMediaBytes,pd as getMemoryBaseDir,Ar as getMonitorOutputPath,hg as getOrCreateSharedDispatcher,fk as getPlanModeSystemReminder,G as getProjectHash,Ju as getProjectSummaryInfo,ek as getProjectSummaryPrompt,Tg as getRateLimitErrorDetails,Ug as getRateLimitRetryDelayMs,zi as getRecentGitStatus,kf as getReportedOperationContext,Zg as getResponseText,bh as getResponseTextFromParts,jj as getResumePromptTokenCount,kj as getResumeTokenCounts,Ol as getRuleDisplayName,ms as getScopedEnvContents,Zm as getShellAbortReasonKind,jl as getShellConfiguration,ib as getSpecificMimeType,Kl as getSpecifierKind,Dk as getStartupContextLength,gh as getStructuredResponse,hh as getStructuredResponseFromParts,mg as getSupportedImageFormatsString,Za as getSystemEncoding,xp as getTask,tp as getTaskPath,Vo as getTasksDir,So as getTeamDir,To as getTeamFilePath,Nn as getTeamName,Rn as getTeammateColor,Kn as getTeammateContext,Ro as getTeamsRootDir,Yj as getThoughtText,Mt as getTimeRangeBounds,R as getTraceContext,ng as getUnsupportedImageFormatWarning,Cd as getUserAutoMemoryIndexPath,Bd as getUserAutoMemoryRoot,Dd as getUserAutoMemoryTopicPath,cg as getValidMatildaAccessToken,Gu as getWelcomeBackState,eq as globalMemoryManager,Hq as handleAutomaticOAuth,la as hasCycleInSchema,If as hasExplicitOutputLimit,Pq as hasNetworkTransport,rl as hasNonFinalTopLevelBackgroundOperator,wl as hasShellSubstitution,tl as hasUnsafeMonitorBackgroundOperator,Ke as hashDaemonWorkspace,lu as hashMcpServerConfig,us as hashValue,xs as hookEventSupportsMatcher,Nr as hydrateString,on as ideContextStore,Xe as initializeDaemonMetrics,zc as initializeTelemetry,Ue as injectDaemonTraceContext,_l as injectPermissionRulesIfMissing,Oq as invokeMcpPrompt,b as isAbortError,s as isAccountInactiveError,Fd as isAnyAutoMemPath,Ng as isApiError,qm as isApproveOutcome,em as isAutoEditApproved,td as isAutoMemPath,Pt as isBareMode,Qm as isBinary,kb as isBinaryFile,Wf as isBrowserCommandBlocked,is as isClaudePluginConfig,Cl as isCommandAllowed,Bl as isCommandAvailable,Dl as isCommandNeedsPermission,T as isDebugLoggingDegraded,km as isDenialFallbackReason,vg as isDeviceAuthorizationSuccess,xg as isDeviceTokenPending,wg as isDeviceTokenSuccess,Km as isEditorAvailable,Sq as isEnabled,yg as isErrorResponse,dt as isGatedMcpScope,Qg as isGenericQuotaExceededError,vi as isGitRepository,Ln as isInProcessTeammate,tm as isInSafeToolAllowlist,Sk as isInvalidArgumentError,Rg as isMatildaQuotaExceededError,Nm as isModifiableDeclarativeTool,a as isNodeError,no as isPathWithinRoot,Mb as isPerformanceMonitoringActive,dm as isPlanModeBlocked,Pg as isProQuotaExceededError,Sg as isRateLimitError,jf as isReportedOperationHeaderName,Ae as isRuntimeDiagnosticsEnabled,Rk as isSchemaDepthError,Ur as isScopedNpmPackage,ft as isSdkMcpServerConfig,Aa as isSettledStatus,Og as isStructuredError,I as isSubpath,J as isSubpaths,za as isSuccessStatus,lg as isSupportedImageMimeType,Ek as isSystemReminderContent,Qn as isTeamLead,Pn as isTeammate,yc as isTelemetrySdkInitialized,Gm as isTerminalEditor,ya as isTerminalStatus,ds as isTomlFormat,ka as isTool,hl as isToolEnabled,Vg as isTransientCapacityError,Wg as isUnattendedMode,Ed as isUserAutoMemPath,Cm as isValidEditorType,Nk as isValidNonThoughtTextPart,kl as isWindows,jb as isWithinRoot,Xh as judgeGoal,Jf as knownTokenLimit,Ms as layer,Mq as listMcpPrompts,Bp as listTasks,ip as listTeamNames,Vs as loadIgnoreRules,Ds as loadServerHierarchicalMemory,Lt as loadUsageHistory,Mc as logApiCancel,Lc as logApiError,Ic as logApiRequest,Nc as logApiResponse,cd as logArenaAgentCompleted,dd as logArenaSessionEnded,bd as logArenaSessionStarted,_c as logAuth,Sc as logChatCompression,Rc as logConversationFinishedEvent,Zc as logExtensionDisable,Yc as logExtensionEnable,Vc as logExtensionInstallEvent,Wc as logExtensionUninstall,Xc as logExtensionUpdateEvent,Jc as logFlashFallback,Qc as logIdeConnection,Tc as logKittySequenceOverflow,hd as logMemoryDream,gd as logMemoryExtract,id as logMemoryRecall,Uc as logModelSlashCommand,Oc as logNextSpeakerCheck,ed as logPromptSuggestion,Kc as logRipgrepFallback,$c as logSkillLaunch,Pc as logSlashCommand,fd as logSpeculation,Dc as logStartSession,Gc as logToolCall,Hc as logToolOutputTruncated,ad as logUserFeedback,Ec as logUserPrompt,Fc as logUserRetry,Of as loginToMatilda,fg as loginToMatildaWithBrowser,bg as logoutMatilda,le as makeArenaAgentCompletedEvent,me as makeArenaSessionEndedEvent,ke as makeArenaSessionStartedEvent,Yd as makeChatCompressionEvent,Pu as makeFakeConfig,D as makeRelative,Wd as makeSlashCommandEvent,Sl as matchesCommandPattern,Vl as matchesDomainPattern,Wl as matchesMcpPattern,Ul as matchesPathPattern,Xl as matchesRule,Bg as matildaOAuth2Events,Mf as matildaProvider,ks as maybePromptForSettings,yq as mcpServerRequiresOAuth,ir as mcpTransportOf,hs as mergeClaudeConfigs,Ht as metricsToUsageRecord,Dj as minimaxProvider,Is as modelProvidersSource,Tf as modelRegistryKey,Fj as modelscopeProvider,Om as modifyWithEditor,bm as needsConfirmation,an as needsUtf8Bom,Hf as normalize,Rm as normalizeContent,Hk as normalizeModelToolCallIds,sl as normalizeMonitorCommand,Bs as normalizeProxyUrl,rr as normalizeSkillPriority,gi as normalizeStopHookBlockingCap,we as normalizeStoredModelUsage,It as normalizeUsageRecord,vh as notifyGoalTerminal,vp as notifyTasksUpdated,up as onTasksUpdated,og as openBrowserSecurely,Mm as openDiff,Bj as openRouterProvider,ze as openaiLogger,nt as oversizedMediaPlaceholder,or as parse,ji as parseAndFormatApiError,Fe as parseBooleanEnvFlag,br as parseConnectionId,Oi as parseDeletedFromNameStatus,Mi as parseGitDiff,Zr as parseGitHubRepoForReleases,Li as parseGitNumstat,st as parseInsightMessage,mu as parseInstallSource,li as parseLineTolerant,Tr as parseNpmPackageSource,Ml as parseRule,Nl as parseRules,Ni as parseShortstat,Ge as parseTelemetryTargetValue,Xj as parseThought,jt as partListUnionToString,Yg as partToString,wm as passesAcceptEditsFastPath,Qr as performVariableReplacement,$l as persistPermissionOutcome,Gt as persistSessionUsage,Jq as populateMcpServerCommand,ah as prependToFirstTextPart,mb as processSingleFileContent,ls as promptForSetting,Xm as promptIdContext,xj as providerMatchesCredentials,ni as read,Zk as readAutoMemoryIndex,eb as readFileWithEncoding,db as readFileWithEncodingInfo,gb as readFileWithLineAndLimit,lp as readInbox,cj as readLastJsonStringFieldSync,dj as readLastJsonStringFieldsSync,mi as readLines,Ku as readManyFiles,Zf as readMatildaCredentials,Fu as readPathFromWorkspace,Xi as readRuntimeStatus,dp as readTeamFile,$k as readUserAutoMemoryIndex,Qs as readWorktreeSession,bo as readWorktreeSessionMarker,lm as recordAllow,wb as recordApiErrorMetrics,Ib as recordApiRequestBreakdown,vb as recordApiResponseMetrics,Bb as recordApiRetry,Ob as recordArenaAgentCompletedMetrics,Pb as recordArenaSessionEndedMetrics,Nb as recordArenaSessionStartedMetrics,Lb as recordBaselineComparison,mm as recordBlock,zb as recordContentRetry,Ab as recordContentRetryFailure,Eb as recordCpuUsage,cf as recordDaemonBridgeError,df as recordDaemonCancel,$e as recordDaemonChannelLifecycle,Qe as recordDaemonError,Ze as recordDaemonHttpRequest,Oe as recordDaemonHttpResponse,bf as recordDaemonPromptDuration,af as recordDaemonPromptQueueWait,_e as recordDaemonSessionLifecycle,pm as recordFallbackApprove,xb as recordFileOperationMetric,ph as recordGoalIteration,yb as recordInvalidChunk,Rb as recordMemoryDreamMetrics,Qb as recordMemoryExtractMetrics,Sb as recordMemoryRecallMetrics,Db as recordMemoryUsage,Kb as recordPerformanceRegression,Jb as recordPerformanceScore,jh as recordStartupEvent,Cb as recordStartupPerformance,Hb as recordTokenEfficiency,ub as recordTokenUsageMetrics,tb as recordToolCallMetrics,Gb as recordToolExecutionBreakdown,Fb as recordToolQueueDepth,nm as recordUnavailable,Or as recursivelyHydrateStrings,ig as redactProxyCredentials,Jk as redactStructuredOutputArgsForRecording,Sr as redactUrlCredentials,Jt as reestimateUsageFromAssistantRecord,dg as refreshMatildaCredentials,Ac as refreshSessionContext,Ye as registerDaemonGaugeCallbacks,di as registerGoalHook,Mo as registerLeader,Fp as releaseOwnedTask,Cq as removeMCPServerStatus,Aq as removeMCPStatusChangeListener,Y as renameWithRetry,$ as renameWithRetrySync,Pk as repairOrphanedToolUseTurns,ij as replayUiTelemetryFromConversation,tf as reportCliAuthFunnelEvent,sf as reportCliClientEvent,gq as reportedAttemptPurposeForSendMessageType,U as resetDebugLoggingState,rm as resetDenialState,Xa as resetEncodingCache,Cp as resetTaskList,bn as resetUtf8BomCache,On as resolveActiveTeamName,M as resolveAndValidatePath,uj as resolveBaseUrl,Uq as resolveBundleDir,Al as resolveCommandPath,Hg as resolveContentGeneratorConfigWithSources,Es as resolveField,Pi as resolveGitDir,rh as resolveGoalLifecycleStatus,Qj as resolveLocalHistoryAccountScopeId,Rj as resolveLocalHistoryAccountScopeIdForCredentials,Mp as resolveMaxConcurrentBackgroundAgents,pj as resolveMetadataKey,Ns as resolveModelConfig,Lg as resolveModelId,Vr as resolveNpmRegistry,xe as resolveOpenAILogDir,Fs as resolveOptionalField,oj as resolveOwnsModel,K as resolvePath,ak as resolvePathFromEnv,Tl as resolvePathPattern,Wq as resolveRipgrep,hi as resolveStopHookBlockingCap,He as resolveTelemetrySettings,Jl as resolveToolName,Ts as restoreWorktreeContext,Xg as retryWithBackoff,wu as rewritePathArgs,Kt as rewriteUsageHistoryFromChats,pf as runAsyncGeneratorWithReportedOperationContext,Yp as runForkedAgent,qc as runInSubagentSpanContext,hc as runInToolSpanContext,_q as runRipgrep,Ai as runSideQuery,Te as runWithDaemonTelemetryContext,W as runWithDebugLogSession,Xp as runWithForkedChatModel,of as runWithReportedAttemptPurpose,mf as runWithReportedOperationContext,Sn as runWithTeammateIdentity,Ce as runtimeDiagnostics,va as safeAgentId,Pm as safeLiteralReplace,H as sanitizeCwd,Ub as sanitizeHookName,Wo as sanitizeName,nj as sanitizeTitle,Sj as sanitizeToolCallResultForRecording,Fh as sanitizeUserPromptExpansionAdditionalContext,Tp as saveCacheSafeParams,Hu as saveWelcomeBackRestartChoice,qp as sendStructuredMessage,Si as serializeSnapshot,Um as serializeTerminalToObject,Sm as serializeTerminalToText,Ym as sessionIdContext,nh as setActiveGoal,V as setDebugLogSession,Ka as setGeminiMdFilename,th as setGoalTerminalObserver,xh as setLastGoalTerminal,Gq as setMCPDiscoveryState,vc as setMatildaCorrelationHashes,$o as setMemberActive,ih as setStartupEventSink,Hs as settingsSource,C as shortenPath,Xf as shouldAttemptBrowserLaunch,Fl as shouldDefaultToNodePty,om as shouldFallback,tu as shouldFilterSuggestion,ym as shouldFirePermissionDeniedForAutoMode,vm as shouldForceAutoModeReviewForAllow,pg as shouldLaunchBrowser,um as shouldRunAutoModeForCall,wj as shouldShowStep,Bc as shutdownTelemetry,kk as sleepInhibitor,ml as splitCommands,Rl as splitCompoundCommand,sr as splitConditionalSkills,nc as startHookSpan,bc as startInteractionSpan,ec as startLLMRequestSpan,yu as startSpeculation,pc as startSubagentSpan,lc as startToolBlockedOnUserSpan,jc as startToolExecutionSpan,gc as startToolSpan,hq as startsReportedOperation,pr as stringify,Qf as stripRuntimeSnapshotPrefix,pl as stripShellWrapper,Fk as stripStartupContext,Ei as stripTerminalControlSequences,ql as stripTrailingBackgroundAmp,Lu as subagentGenerator,Pr as substituteHookVariables,Ee as summarizeAnthropicWireRequest,De as summarizeOpenAIWireRequest,zo as summarizeUnifiedDiff,Jn as teammateIdentityStore,Hn as templateString,A as tildeifyPath,u as toFriendlyError,Gl as toPosixPath,Kf as tokenLimit,Ll as toolMatchesRuleToolName,ve as totalTokensFromBuckets,Vb as truncateContent,Et as truncateJson,ac as truncateSpanError,mj as tryGenerateSessionTitle,gp as tryReclaimStaleTeam,sa as uiTelemetryService,Gp as unassignTeammateTasks,_i as unescapeJsonString,F as unescapePath,ci as unregisterGoalHook,Oo as unregisterLeader,qh as updateActiveGoalStatus,Yh as updateGoalStatus,Bq as updateMCPServerStatus,os as updateSetting,O as updateSymlink,zp as updateTask,Ig as validateModelConfig,vs as validateName,L as validatePath,Mr as validateVariables,eg as willOpenMatildaAuthBrowser,_a as windowsCodePageToEncoding,Ne as withDaemonBridgeSpan,Me as withDaemonRequestSpan,Le as withDaemonSpan,dc as withInteractionSpan,qf as withReportedAttemptPurpose,_n as worktreeBranchForSlug,Qo as wrapConfirmWithBadge,si as write,qi as writeLine,ri as writeLineSync,_f as writeMatildaCredentials,mp as writeMessage,Wi as writeRuntimeStatus,ep as writeTeamFile,Rt as writeWorkspaceContextFile,Rs as writeWorktreeSession,ao as writeWorktreeSessionMarker,Ej as zaiProvider};