@maincode-ai/matilda-code 0.19.2 → 0.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/agent-THT56PAJ.js +3 -0
- package/chunks/agent-headless-MJXXZAJ5.js +3 -0
- package/chunks/{askUserQuestion-QPVUWJCI.js → askUserQuestion-V5YLTC4J.js} +1 -1
- package/chunks/{ca-D7YSARXX.js → ca-UW3G7H5I.js} +1 -1
- package/chunks/{chunk-2MEHZGZJ.js → chunk-2XZIKUB6.js} +1 -1
- package/chunks/{chunk-WQNABJ5R.js → chunk-33FV6XMQ.js} +1 -1
- package/chunks/{chunk-X6DODPXG.js → chunk-5U3A6KMU.js} +1 -1
- package/chunks/{chunk-DY6PIAAY.js → chunk-CFBZKYFB.js} +1 -1
- package/chunks/{chunk-KMU5KAYC.js → chunk-GV5WGCQ4.js} +479 -495
- package/chunks/{chunk-RDNFN7GJ.js → chunk-LDSV6752.js} +1 -1
- package/chunks/{chunk-X2SJJ7RN.js → chunk-NAH2MNUA.js} +2 -2
- package/chunks/{chunk-4M4CUQUR.js → chunk-NDR7ZFUA.js} +1 -1
- package/chunks/{chunk-APVMKC4S.js → chunk-QE7JDD3Q.js} +2 -2
- package/chunks/{chunk-CNHY7623.js → chunk-SUORCDGS.js} +1 -1
- package/chunks/{chunk-S32ZN6LD.js → chunk-T3ERIC7X.js} +1 -1
- package/chunks/{chunk-XKNSVSWD.js → chunk-TVWOSSXE.js} +2 -2
- package/chunks/chunk-YNR4LJMU.js +34 -0
- package/chunks/{computer-use-MJ7WGSXA.js → computer-use-GUYVQIGN.js} +1 -1
- package/chunks/contextCommand-4CKQVKP7.js +3 -0
- package/chunks/{cron-create-K35JKX3K.js → cron-create-JHL5JGIM.js} +1 -1
- package/chunks/{cron-delete-7B65R7JC.js → cron-delete-K2R3KI2W.js} +1 -1
- package/chunks/{cron-list-FCX6HCY7.js → cron-list-R3YHZBHA.js} +1 -1
- package/chunks/{de-ME75AM7Q.js → de-QSFN3SRK.js} +1 -1
- package/chunks/{edit-Y7NFRYDN.js → edit-ZULTS2VM.js} +1 -1
- package/chunks/{en-KVT5FJKO.js → en-77LGBBG5.js} +1 -1
- package/chunks/{enter-worktree-PVVX5BLF.js → enter-worktree-CCLNWZ5Q.js} +1 -1
- package/chunks/{enterPlanMode-VVRE4YBV.js → enterPlanMode-GXBX6ZNF.js} +1 -1
- package/chunks/{exit-worktree-LDIOV4NM.js → exit-worktree-6Q45J7P4.js} +1 -1
- package/chunks/{exitPlanMode-AR4QZ4EF.js → exitPlanMode-SKDXBN5H.js} +1 -1
- package/chunks/{fr-V3O5JG5W.js → fr-FKTJ4COX.js} +2 -2
- package/chunks/{geminiContentGenerator-35P4NFWN.js → geminiContentGenerator-AHPUJXRJ.js} +1 -1
- package/chunks/{glob-6H2PV6X4.js → glob-YQYYXRD6.js} +1 -1
- package/chunks/grep-SEHIGGHQ.js +22 -0
- package/chunks/{ja-ZOFFSG6C.js → ja-GKS4GLZP.js} +1 -1
- package/chunks/{ls-ZSHUDEJV.js → ls-4QPI2E7A.js} +1 -1
- package/chunks/{lsp-DW3UNQQ6.js → lsp-P3GKBOP3.js} +1 -1
- package/chunks/{matildaAgentContentGenerator-B7FZY5QT.js → matildaAgentContentGenerator-O54RMUHJ.js} +1 -1
- package/chunks/matildaContentGenerator-UXLQXYIJ.js +8 -0
- package/chunks/monitor-H5RCPLSV.js +32 -0
- package/chunks/notebook-edit-ZBKC73OA.js +17 -0
- package/chunks/{openaiContentGenerator-A42WRFRC.js → openaiContentGenerator-4D5JS26Z.js} +1 -1
- package/chunks/{pt-K2W3KMTP.js → pt-VIW62ZAE.js} +1 -1
- package/chunks/{read-file-MUUE7CJM.js → read-file-HEVXSNSO.js} +1 -1
- package/chunks/ripGrep-SIK37YV5.js +3 -0
- package/chunks/{ru-KICZRPMQ.js → ru-FSSACF4A.js} +1 -1
- package/chunks/scheduler-OM5HPBCW.js +8 -0
- package/chunks/{send-message-BPTEYK4Y.js → send-message-K3T7GVHO.js} +1 -1
- package/chunks/{serve-DAFPBR3R.js → serve-JLX6G5W2.js} +1 -1
- package/chunks/shell-YYHEBIMO.js +3 -0
- package/chunks/{skill-D23JCWUG.js → skill-YXHHDMLR.js} +1 -1
- package/chunks/src-5RWLWMNE.js +3 -0
- package/chunks/{symbol-search-3E5XK5S6.js → symbol-search-WVNUJRET.js} +1 -1
- package/chunks/{syntheticOutput-NSQJLEEY.js → syntheticOutput-LLA4WQR7.js} +1 -1
- package/chunks/{task-create-TQI5N4YR.js → task-create-ZZTSVXZN.js} +1 -1
- package/chunks/{task-list-DQBF34BK.js → task-list-6I64SK7E.js} +1 -1
- package/chunks/{task-stop-5R44O4NK.js → task-stop-UKRXMCZV.js} +1 -1
- package/chunks/{task-update-PL2JDIF6.js → task-update-XZWORLJB.js} +1 -1
- package/chunks/{team-create-B3K7PIQ5.js → team-create-WNT5JVQS.js} +1 -1
- package/chunks/{team-delete-LWX4LMFZ.js → team-delete-DEPXAMUE.js} +1 -1
- package/chunks/{todoWrite-V4DQMEDR.js → todoWrite-DKJAYA4S.js} +1 -1
- package/chunks/{tool-search-UA3I7UV3.js → tool-search-47TA6SG4.js} +1 -1
- package/chunks/update-goal-6YHKDFDL.js +16 -0
- package/chunks/{web-fetch-XRYT2EOQ.js → web-fetch-KIAE27JH.js} +1 -1
- package/chunks/{web-search-MD3V4NBD.js → web-search-T6JQYRFL.js} +1 -1
- package/chunks/{workflow-A2P7P7KO.js → workflow-S2XCUMV3.js} +2 -2
- package/chunks/write-file-GM4PPNIQ.js +11 -0
- package/chunks/{zh-C5PHBN3U.js → zh-LDF5IJ3D.js} +1 -1
- package/chunks/{zh-TW-IYMR6KR3.js → zh-TW-NAHJGTBA.js} +1 -1
- package/cli.js +417 -416
- package/locales/ca.js +6 -2
- package/locales/de.js +5 -3
- package/locales/en.js +5 -2
- package/locales/fr.js +4 -2
- package/locales/ja.js +6 -2
- package/locales/pt.js +4 -2
- package/locales/ru.js +4 -2
- package/locales/zh-TW.js +5 -2
- package/locales/zh.js +5 -2
- package/package.json +2 -2
- package/chunks/agent-XKRS7SDN.js +0 -3
- package/chunks/agent-headless-5UTXGWJL.js +0 -3
- package/chunks/contextCommand-AGXIRVKU.js +0 -3
- package/chunks/grep-OMYHSNBF.js +0 -22
- package/chunks/matildaContentGenerator-DQOUSFU3.js +0 -8
- package/chunks/monitor-LY6HMAGP.js +0 -32
- package/chunks/notebook-edit-PY3T4RHL.js +0 -17
- package/chunks/ripGrep-BJRH2OAQ.js +0 -3
- package/chunks/scheduler-MFP5BJTP.js +0 -8
- package/chunks/shell-YAP6NQTT.js +0 -3
- package/chunks/src-77YCXW6G.js +0 -3
- package/chunks/write-file-TTOYKZTG.js +0 -11
package/locales/ca.js
CHANGED
|
@@ -1326,7 +1326,10 @@ export default {
|
|
|
1326
1326
|
'Press Ctrl+C again to exit.': 'Premeu Ctrl+C de nou per sortir.',
|
|
1327
1327
|
'Press Ctrl+D again to exit.': 'Premeu Ctrl+D de nou per sortir.',
|
|
1328
1328
|
'Press Esc again to clear.': 'Premeu Esc de nou per esborrar.',
|
|
1329
|
-
'Press
|
|
1329
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1330
|
+
'Premeu ↑ per editar els missatges en cua',
|
|
1331
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1332
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1330
1333
|
|
|
1331
1334
|
// ============================================================================
|
|
1332
1335
|
// Estat MCP
|
|
@@ -1409,7 +1412,8 @@ export default {
|
|
|
1409
1412
|
// ============================================================================
|
|
1410
1413
|
// Pantalla de sortida / Estadístiques
|
|
1411
1414
|
// ============================================================================
|
|
1412
|
-
'
|
|
1415
|
+
'Time for Matilda to sleep. Catchya!':
|
|
1416
|
+
'Hora de que Matilda dormi. Fins aviat!',
|
|
1413
1417
|
'To continue this session, run': 'Per continuar aquesta sessió, executeu',
|
|
1414
1418
|
'Interaction Summary': 'Resum de la interacció',
|
|
1415
1419
|
'Session ID:': 'ID de sessió:',
|
package/locales/de.js
CHANGED
|
@@ -1294,8 +1294,10 @@ export default {
|
|
|
1294
1294
|
'Press Ctrl+C again to exit.': 'Drücken Sie erneut Ctrl+C zum Beenden.',
|
|
1295
1295
|
'Press Ctrl+D again to exit.': 'Drücken Sie erneut Ctrl+D zum Beenden.',
|
|
1296
1296
|
'Press Esc again to clear.': 'Drücken Sie erneut Esc zum Löschen.',
|
|
1297
|
-
'Press ↑ to edit
|
|
1297
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1298
1298
|
'Drücken Sie ↑, um Nachrichten in der Warteschlange zu bearbeiten',
|
|
1299
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1300
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1299
1301
|
|
|
1300
1302
|
// ============================================================================
|
|
1301
1303
|
// MCP Status
|
|
@@ -1344,8 +1346,8 @@ export default {
|
|
|
1344
1346
|
// ============================================================================
|
|
1345
1347
|
// Exit Screen / Stats
|
|
1346
1348
|
// ============================================================================
|
|
1347
|
-
'
|
|
1348
|
-
'
|
|
1349
|
+
'Time for Matilda to sleep. Catchya!':
|
|
1350
|
+
'Zeit für Matilda, schlafen zu gehen. Bis dann!',
|
|
1349
1351
|
'To continue this session, run':
|
|
1350
1352
|
'Um diese Sitzung fortzusetzen, führen Sie aus',
|
|
1351
1353
|
'Interaction Summary': 'Interaktionszusammenfassung',
|
package/locales/en.js
CHANGED
|
@@ -1386,7 +1386,10 @@ export default {
|
|
|
1386
1386
|
'Press Ctrl+C again to exit.': 'Press Ctrl+C again to exit.',
|
|
1387
1387
|
'Press Ctrl+D again to exit.': 'Press Ctrl+D again to exit.',
|
|
1388
1388
|
'Press Esc again to clear.': 'Press Esc again to clear.',
|
|
1389
|
-
'Press
|
|
1389
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1390
|
+
'Press Enter (empty) to send now · ↑ to edit',
|
|
1391
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1392
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1390
1393
|
|
|
1391
1394
|
// ============================================================================
|
|
1392
1395
|
// MCP Status
|
|
@@ -1468,7 +1471,7 @@ export default {
|
|
|
1468
1471
|
// ============================================================================
|
|
1469
1472
|
// Exit Screen / Stats
|
|
1470
1473
|
// ============================================================================
|
|
1471
|
-
'
|
|
1474
|
+
'Time for Matilda to sleep. Catchya!': 'Time for Matilda to sleep. Catchya!',
|
|
1472
1475
|
'To continue this session, run': 'To continue this session, run',
|
|
1473
1476
|
'Interaction Summary': 'Interaction Summary',
|
|
1474
1477
|
'Session ID:': 'Session ID:',
|
package/locales/fr.js
CHANGED
|
@@ -1406,7 +1406,7 @@ export default {
|
|
|
1406
1406
|
// ============================================================================
|
|
1407
1407
|
// Écran de sortie / Stats
|
|
1408
1408
|
// ============================================================================
|
|
1409
|
-
'
|
|
1409
|
+
'Time for Matilda to sleep. Catchya!': 'Matilda va se reposer. À plus !',
|
|
1410
1410
|
'To continue this session, run': 'Pour continuer cette session, exécutez',
|
|
1411
1411
|
'Interaction Summary': "Résumé de l'interaction",
|
|
1412
1412
|
'Session ID:': 'ID de session :',
|
|
@@ -1846,8 +1846,10 @@ export default {
|
|
|
1846
1846
|
'Pas en mode plan. Utilisez "/plan" pour entrer en mode plan d\'abord.',
|
|
1847
1847
|
"Set up Matilda's status line UI":
|
|
1848
1848
|
"Configurer l'interface de la barre de statut de Matilda",
|
|
1849
|
-
'Press ↑ to edit
|
|
1849
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1850
1850
|
'Appuyez sur ↑ pour modifier les messages en file d’attente',
|
|
1851
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1852
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1851
1853
|
'Drop a MATILDA.md in the project so Matilda keeps persistent context.':
|
|
1852
1854
|
'Ajoutez un fichier MATILDA.md pour donner à Matilda un contexte de projet persistant.',
|
|
1853
1855
|
'Duck out of the main thread with /btw — quick side question, same chat.':
|
package/locales/ja.js
CHANGED
|
@@ -1036,7 +1036,10 @@ export default {
|
|
|
1036
1036
|
'Press Ctrl+C again to exit.': 'Ctrl+C をもう一度押すと終了します',
|
|
1037
1037
|
'Press Ctrl+D again to exit.': 'Ctrl+D をもう一度押すと終了します',
|
|
1038
1038
|
'Press Esc again to clear.': 'Esc をもう一度押すとクリアします',
|
|
1039
|
-
'Press
|
|
1039
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1040
|
+
'↑ を押してキュー内のメッセージを編集',
|
|
1041
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1042
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1040
1043
|
// MCP Status
|
|
1041
1044
|
'⏳ MCP servers are starting up ({{count}} initializing)...':
|
|
1042
1045
|
'⏳ MCP servers を起動中({{count}} 初期化中)...',
|
|
@@ -1102,7 +1105,8 @@ export default {
|
|
|
1102
1105
|
'Conversation getting long? /compress rolls it up and frees context.':
|
|
1103
1106
|
'会話が長くなりましたか? /compress は履歴を要約してコンテキストを空けます。',
|
|
1104
1107
|
// Exit Screen / Stats
|
|
1105
|
-
'
|
|
1108
|
+
'Time for Matilda to sleep. Catchya!':
|
|
1109
|
+
'Matilda、おやすみの時間です。またな!',
|
|
1106
1110
|
'To continue this session, run': 'このセッションを続行するには、次を実行:',
|
|
1107
1111
|
'Interaction Summary': 'インタラクション概要',
|
|
1108
1112
|
'Session ID:': 'セッションID:',
|
package/locales/pt.js
CHANGED
|
@@ -1295,8 +1295,10 @@ export default {
|
|
|
1295
1295
|
'Press Ctrl+C again to exit.': 'Pressione Ctrl+C novamente para sair.',
|
|
1296
1296
|
'Press Ctrl+D again to exit.': 'Pressione Ctrl+D novamente para sair.',
|
|
1297
1297
|
'Press Esc again to clear.': 'Pressione Esc novamente para limpar.',
|
|
1298
|
-
'Press ↑ to edit
|
|
1298
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1299
1299
|
'Pressione ↑ para editar mensagens na fila',
|
|
1300
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1301
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1300
1302
|
|
|
1301
1303
|
// ============================================================================
|
|
1302
1304
|
// MCP Status
|
|
@@ -1376,7 +1378,7 @@ export default {
|
|
|
1376
1378
|
// ============================================================================
|
|
1377
1379
|
// Exit Screen / Stats
|
|
1378
1380
|
// ============================================================================
|
|
1379
|
-
'
|
|
1381
|
+
'Time for Matilda to sleep. Catchya!': 'Hora da Matilda dormir. Até logo!',
|
|
1380
1382
|
'To continue this session, run': 'Para continuar esta sessão, execute',
|
|
1381
1383
|
'Interaction Summary': 'Resumo da Interação',
|
|
1382
1384
|
'Session ID:': 'ID da Sessão:',
|
package/locales/ru.js
CHANGED
|
@@ -1241,8 +1241,10 @@ export default {
|
|
|
1241
1241
|
'Press Ctrl+C again to exit.': 'Нажмите Ctrl+C снова для выхода.',
|
|
1242
1242
|
'Press Ctrl+D again to exit.': 'Нажмите Ctrl+D снова для выхода.',
|
|
1243
1243
|
'Press Esc again to clear.': 'Нажмите Esc снова для очистки.',
|
|
1244
|
-
'Press ↑ to edit
|
|
1244
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1245
1245
|
'Нажмите ↑ для редактирования сообщений в очереди',
|
|
1246
|
+
'Steering with queued message…': 'Steering with queued message…',
|
|
1247
|
+
'Request cancelled.': 'Request cancelled.',
|
|
1246
1248
|
|
|
1247
1249
|
// ============================================================================
|
|
1248
1250
|
// Статус MCP
|
|
@@ -1292,7 +1294,7 @@ export default {
|
|
|
1292
1294
|
// ============================================================================
|
|
1293
1295
|
// Экран выхода / Статистика
|
|
1294
1296
|
// ============================================================================
|
|
1295
|
-
'
|
|
1297
|
+
'Time for Matilda to sleep. Catchya!': 'Matilda идёт спать. Пока!',
|
|
1296
1298
|
'To continue this session, run': 'Для продолжения этой сессии, выполните',
|
|
1297
1299
|
'Interaction Summary': 'Сводка взаимодействия',
|
|
1298
1300
|
'Session ID:': 'ID сессии:',
|
package/locales/zh-TW.js
CHANGED
|
@@ -1169,7 +1169,10 @@ export default {
|
|
|
1169
1169
|
'Press Ctrl+C again to exit.': '再次按 Ctrl+C 退出',
|
|
1170
1170
|
'Press Ctrl+D again to exit.': '再次按 Ctrl+D 退出',
|
|
1171
1171
|
'Press Esc again to clear.': '再次按 Esc 清除',
|
|
1172
|
-
'Press
|
|
1172
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1173
|
+
'按 Enter(空)立即發送 · ↑ 編輯',
|
|
1174
|
+
'Steering with queued message…': '正在用佇列訊息轉向…',
|
|
1175
|
+
'Request cancelled.': '請求已取消。',
|
|
1173
1176
|
'No MCP servers configured.': '未配置 MCP servers',
|
|
1174
1177
|
'⏳ MCP servers are starting up ({{count}} initializing)...':
|
|
1175
1178
|
'⏳ MCP servers 正在啟動({{count}} 個正在初始化)...',
|
|
@@ -1237,7 +1240,7 @@ export default {
|
|
|
1237
1240
|
'上下文空間不足,用 /compress 釋放空間。',
|
|
1238
1241
|
'Conversation getting long? /compress rolls it up and frees context.':
|
|
1239
1242
|
'對話變長了?用 /compress 捲起來並釋放上下文。',
|
|
1240
|
-
'
|
|
1243
|
+
'Time for Matilda to sleep. Catchya!': 'Matilda 該睡覺了,下次見!',
|
|
1241
1244
|
'To continue this session, run': '要繼續此會話,請運行',
|
|
1242
1245
|
'Interaction Summary': '交互摘要',
|
|
1243
1246
|
'Session ID:': '會話 ID:',
|
package/locales/zh.js
CHANGED
|
@@ -1317,7 +1317,10 @@ export default {
|
|
|
1317
1317
|
'Press Ctrl+C again to exit.': '再次按 Ctrl+C 退出',
|
|
1318
1318
|
'Press Ctrl+D again to exit.': '再次按 Ctrl+D 退出',
|
|
1319
1319
|
'Press Esc again to clear.': '再次按 Esc 清除',
|
|
1320
|
-
'Press
|
|
1320
|
+
'Press Enter (empty) to send now · ↑ to edit':
|
|
1321
|
+
'按 Enter(空)立即发送 · ↑ 编辑',
|
|
1322
|
+
'Steering with queued message…': '正在用排队消息转向…',
|
|
1323
|
+
'Request cancelled.': '请求已取消。',
|
|
1321
1324
|
|
|
1322
1325
|
// ============================================================================
|
|
1323
1326
|
// MCP Status
|
|
@@ -1398,7 +1401,7 @@ export default {
|
|
|
1398
1401
|
// ============================================================================
|
|
1399
1402
|
// Exit Screen / Stats
|
|
1400
1403
|
// ============================================================================
|
|
1401
|
-
'
|
|
1404
|
+
'Time for Matilda to sleep. Catchya!': 'Matilda 该睡觉了,下次见!',
|
|
1402
1405
|
'To continue this session, run': '要继续此会话,请运行',
|
|
1403
1406
|
'Interaction Summary': '交互摘要',
|
|
1404
1407
|
'Session ID:': '会话 ID:',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maincode-ai/matilda-code",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "cli.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"bundled"
|
|
23
23
|
],
|
|
24
24
|
"config": {
|
|
25
|
-
"sandboxImageUri": "ghcr.io/maincode/matilda-code:0.19.
|
|
25
|
+
"sandboxImageUri": "ghcr.io/maincode/matilda-code:0.19.4"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {},
|
|
28
28
|
"optionalDependencies": {
|
package/chunks/agent-XKRS7SDN.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{Rf as a,Sf as b,Tf as c,Uf as d,Vf as e,Wf as f}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{f as AgentTool,b as TOOL_REGISTRY_REBUILT,e as createApprovalModeOverride,c as hasRebuiltToolRegistry,d as rebuildToolRegistryOnOverride,a as resolveSubagentApprovalMode};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{qf as a,rf as b,sf as c}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{c as AgentHeadless,a as ContextState,b as templateString};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{c as a,d as b,e as c}from"./chunk-RDNFN7GJ.js";import"./chunk-XKNSVSWD.js";import"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{a as collectContextData,c as contextCommand,b as formatContextUsageText};
|
package/chunks/grep-OMYHSNBF.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{Be as Y,Sc as S,pj as z,ta as K}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{g as q}from"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import{g as U,i as V,p as H,q as _}from"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import{C as O,F as W,J as F,Y as j,a as I,c as y}from"./chunk-QWBNNEV2.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 Z from"node:fs/promises";import P from"node:path";import{EOL as tt}from"node:os";import{spawn as J}from"node:child_process";var N=j("GREP"),M=class extends U{constructor(r,s){super(s);this.config=r;this.fileExclusions=r.getFileExclusions()}fileExclusions;async getDefaultPermission(){if(!this.params.path)return"allow";let r=this.config.getWorkspaceContext(),s=P.resolve(this.config.getTargetDir(),this.params.path);return r.isPathWithinWorkspace(s)||W(q(),s)?"allow":"ask"}async execute(r){try{let s=[],i;if(this.params.path){let t=F(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:r});if(s.length>1)for(let a of o)P.isAbsolute(a.filePath)||(a.filePath=P.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,L=l;l.length>w&&(L=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
|
-
---
|
|
5
|
-
`,v=L.reduce((t,o)=>{let a=o.filePath;return t[a]||(t[a]=[]),t[a].push(o),t[a].sort((k,C)=>k.lineNumber-C.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
|
-
`))break;let o=!1;for(let a of v[t]){let k=a.line.trim();if(!c(`L${a.lineNumber}: ${k}
|
|
7
|
-
`,a)){o=!0;break}}if(o||!c(`---
|
|
8
|
-
`))break}let b=n.split(`
|
|
9
|
-
`).filter(t=>t.trim()&&!t.startsWith("File:")&&!t.startsWith("---")).length,p=G+n;if($||m){let t=E-b;p+=` [${t} ${t===1?"line":"lines"} truncated] ...`}let u=`Found ${E} ${x}`;($||m)&&(u+=" (truncated)");let T=Array.from(new Set(g.map(t=>t.absoluteFilePath).filter(t=>t!=="")));return await z(this.config,T),{llmContent:p.trim(),returnDisplay:u,resultFilePaths:T}}catch(s){N.error(`Error during GrepLogic execution: ${s}`);let i=y(s);return{llmContent:`Error during grep search operation: ${i}`,returnDisplay:`Error: ${i}`,error:{message:i,type:"grep_execution_error"}}}}parseGrepOutput(r,s){let i=[];if(!r)return i;let l=r.split(tt);for(let f of l){if(!f.trim())continue;let h=f.indexOf(":");if(h===-1)continue;let w=f.indexOf(":",h+1);if(w===-1)continue;let $=f.substring(0,h),L=f.substring(h+1,w),E=f.substring(w+1),x=parseInt(L,10);if(!isNaN(x)){let G=P.resolve(s,$),v=P.relative(s,G);i.push({filePath:v||P.basename(G),absoluteFilePath:G,lineNumber:x,line:E.replace(/\r$/,"")})}}return i}getDescription(){let r=`'${this.params.pattern}' in path '${this.params.path||"./"}'`;return this.params.glob&&(r+=` (filter: '${this.params.glob}')`),r}async performGrepSearch(r){let{pattern:s,path:i,glob:l}=r,f="none";try{if(K(i)&&S("git").available){f="git grep";let n=["grep","--untracked","-n","-E","--ignore-case",s];l&&n.push("--",l);try{let g=await new Promise((m,c)=>{let e=J("git",n,{cwd:i,windowsHide:!0}),b=[],p=[];e.stdout.on("data",u=>b.push(u)),e.stderr.on("data",u=>p.push(u)),e.on("error",u=>c(new Error(`Failed to start git grep: ${u.message}`))),e.on("close",u=>{let T=Buffer.concat(b).toString("utf8"),t=Buffer.concat(p).toString("utf8");u===0?m(T):u===1?m(""):c(new Error(`git grep exited with code ${u}: ${t}`))})});return this.parseGrepOutput(g,i)}catch(g){N.debug(`GrepLogic: git grep failed: ${y(g)}. Falling back...`)}}let{available:$}=S("grep");if($){f="system grep";let n=["-r","-n","-H","-E"];this.fileExclusions.getGlobExcludes().map(c=>{let e=c;return e.startsWith("**/")&&(e=e.substring(3)),e.endsWith("/**")?e=e.slice(0,-3):e.endsWith("/")&&(e=e.slice(0,-1)),e&&!e.includes("/")&&!e.includes("*")?e:null}).filter(c=>!!c).forEach(c=>n.push(`--exclude-dir=${c}`)),l&&n.push(`--include=${l}`),n.push(s),n.push(".");try{let c=await new Promise((e,b)=>{let p=J("grep",n,{cwd:i,windowsHide:!0}),u=[],T=[],t=d=>u.push(d),o=d=>{let D=d.toString();!D.includes("Permission denied")&&!/grep:.*: Is a directory/i.test(D)&&T.push(d)},a=d=>{C(),b(new Error(`Failed to start system grep: ${d.message}`))},k=d=>{let D=Buffer.concat(u).toString("utf8"),A=Buffer.concat(T).toString("utf8").trim();C(),d===0?e(D):d===1?e(""):A?b(new Error(`System grep exited with code ${d}: ${A}`)):e("")},C=()=>{p.stdout.removeListener("data",t),p.stderr.removeListener("data",o),p.removeListener("error",a),p.removeListener("close",k),p.connected&&p.disconnect()};p.stdout.on("data",t),p.stderr.on("data",o),p.on("error",a),p.on("close",k)});return this.parseGrepOutput(c,i)}catch(c){N.debug(`GrepLogic: System grep failed: ${y(c)}. Falling back...`)}}N.debug("GrepLogic: Falling back to JavaScript grep implementation."),f="javascript fallback";let L=l||"**/*",E=this.fileExclusions.getGlobExcludes(),x=Y(L,{cwd:i,dot:!0,ignore:E,absolute:!0,nodir:!0,signal:r.signal}),G=new RegExp(s,"i"),v=[];for await(let n of x){let g=n;try{(await Z.readFile(g,"utf8")).split(/\r?\n/).forEach((e,b)=>{G.test(e)&&v.push({filePath:P.relative(i,g)||P.basename(g),absoluteFilePath:g,lineNumber:b+1,line:e})})}catch(m){(!I(m)||m.code!=="ENOENT")&&N.debug(`GrepLogic: Could not read/process ${g}: ${y(m)}`)}}return v}catch(h){throw N.error(`GrepLogic: Error in performGrepSearch (Strategy: ${f}): ${y(h)}`),h}}},X=class R extends V{constructor(r){super(R.Name,_.GREP,`A powerful search tool for finding patterns in files
|
|
10
|
-
|
|
11
|
-
Usage:
|
|
12
|
-
- ALWAYS use Grep for search tasks. NEVER invoke \`grep\` or \`rg\` as a Bash command. The Grep tool has been optimized for correct permissions and access.
|
|
13
|
-
- Supports full regex syntax (e.g., "log.*Error", "function\\s+\\w+")
|
|
14
|
-
- Filter files with glob parameter (e.g., "*.js", "**/*.tsx")
|
|
15
|
-
- Case-insensitive by default
|
|
16
|
-
- Use Agent tool for open-ended searches requiring multiple rounds
|
|
17
|
-
`,"search",{properties:{pattern:{type:"string",description:"The regular expression pattern to search for in file contents"},glob:{type:"string",description:'Glob pattern to filter files (e.g. "*.js", "*.{ts,tsx}")'},path:{type:"string",description:"File or directory to search in. Defaults to current working directory."},limit:{type:"number",description:"Limit output to first N matching lines. Optional - shows all matches if not specified."}},required:["pattern"],type:"object"});this.config=r}static Name=H.GREP;get maxOutputChars(){return 2e4}validateToolParamValues(r){try{new RegExp(r.pattern)}catch(s){return`Invalid regular expression pattern: ${r.pattern}. Error: ${y(s)}`}if(r.path){r.path=O(r.path.trim());try{F(this.config,r.path,{allowExternalPaths:!0})}catch(s){return y(s)}}return null}createInvocation(r){return new M(this.config,r)}};export{X as GrepTool};
|
|
18
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2025 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
22
|
-
*/
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{a as s,i as o}from"./chunk-WQNABJ5R.js";import"./chunk-QCIDUZV6.js";import"./chunk-R6YTDM76.js";import"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import{b as u}from"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import{e as d}from"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import{Y as i}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as a}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";a();var c=class extends o{debugLogger=i("MATILDA");matildaClient;sharedManager;currentToken;constructor(e,t,r){let n=new s(t,r);super(t,r,n),this.matildaClient=e,this.sharedManager=d.getInstance(),t?.baseUrl&&t?.apiKey&&(this.pipeline.client.baseURL=t?.baseUrl,this.pipeline.client.apiKey=t?.apiKey)}getCurrentEndpoint(e){let t=e||u,r="/v1",n=t.startsWith("http")?t:`https://${t}`;return n.endsWith(r)||n.endsWith("/api/v1")||n.endsWith("/api/v1/code")?n:`${n}${r}`}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:r,endpoint:n}=await this.getValidToken();return this.pipeline.client.apiKey=r,this.pipeline.client.baseURL=n,await e()};try{return await t()}catch(r){if(this.isAuthError(r))return await this.sharedManager.getValidCredentials(this.matildaClient,!0),await t();throw r}}async generateContent(e,t){return this.executeWithCredentialManagement(()=>super.generateContent(e,t))}async generateContentStream(e,t){return this.executeWithCredentialManagement(()=>super.generateContentStream(e,t))}async countTokens(e){return super.countTokens(e)}async embedContent(e){return this.executeWithCredentialManagement(()=>super.embedContent(e))}isAuthError(e){if(!e)return!1;let t=e instanceof Error?e.message.toLowerCase():String(e).toLowerCase(),r=e,n=r?.status||r?.code;return n===401||n===403||n==="401"||n==="403"||t.includes("unauthorized")||t.includes("forbidden")||t.includes("invalid api key")||t.includes("invalid access token")||t.includes("token expired")||t.includes("authentication")||t.includes("access denied")||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{c as MatildaContentGenerator};
|
|
4
|
-
/**
|
|
5
|
-
* @license
|
|
6
|
-
* Copyright 2025 Matilda
|
|
7
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
-
*/
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{Ac as et,Dc as ot,Ec as A,Jc as C,Kc as nt,Oc as it,Wh as P,Yh as lt,ie as rt,pc as tt,te as st,ye as L,ze as at}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import{g as Z,i as q,p as Y,q as Q}from"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import{G as J,Y as K,c as m}from"./chunk-QWBNNEV2.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
|
-
*/
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{a as Z}from"./chunk-I55PXD4N.js";import{Ca as R,He as X,be as D,ce as Y,fc as Q,we as y}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.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-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import{g as $,i as L,p as c,q as x}from"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import{A as N,C as T,Y as F,z as _}from"./chunk-QWBNNEV2.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 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{qj as a,rj as b}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.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};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{b as E}from"./chunk-7ZATDBWL.js";import{Pa as P}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import{L as l,Y as c}from"./chunk-QWBNNEV2.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
|
-
*/
|
package/chunks/shell-YAP6NQTT.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{Ke as a,Le as b,Me as c,Ne as d,Oe as e,Pe as f}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import"./chunk-QWBNNEV2.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,f as ShellTool,e as ShellToolInvocation,c as buildLongRunningForegroundHint,d as detectBlockedSleepPattern,a as parseNumstat};
|
package/chunks/src-77YCXW6G.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{$ as Dh,$a as Di,$b as Hj,$c as Ek,$d as El,$e as km,$f as mn,$g as rp,$h as tq,$i as or,$j as qs,$k as qt,A as Gg,Aa as di,Ab as cj,Ac as dk,Ad as dl,Af as Sm,Ag as Ro,Ah as Sp,Ai as Sq,Aj as Rr,Ak as Rs,B as Hg,Ba as ei,Bb as dj,Bc as ek,Bd as el,Bf as Tm,Bg as So,Bh as Tp,Bi as Tq,Bj as Sr,Bk as Ss,Bl as Rt,C as Ig,Cb as ej,Cc as fk,Cd as fl,Cf as Um,Cg as To,Ch as Up,Cj as Tr,Ck as Ts,Cl as St,D as Jg,Da as fi,Db as fj,Dc as gk,Dd as gl,De as Ul,Df as Vm,Dg as Uo,Dh as Vp,Di as Uq,Dj as Ur,Dk as Us,Dl as Tt,E as Kg,Ea as gi,Eb as ij,Ec as hk,Ed as hl,Ee as Vl,Ef as Wm,Eg as Vo,Eh as Wp,Ei as Vq,Ej as Vr,Ek as Vs,El as Ut,F as Lg,Fa as hi,Fb as lj,Fc as ik,Fd as il,Fe as Wl,Ff as Xm,Fg as Wo,Fh as Xp,Fi as Wq,Fj as Wr,Fk as Ws,Fl as Vt,G as Mg,Ga as ii,Gb as mj,Gc as jk,Gd as jl,Ge as Xl,Gf as Ym,Gg as Xo,Gh as Yp,Gi as Xq,Gj as Xr,Gk as Xs,Gl as Wt,H as Ng,Ha as ji,Hb as nj,Hc as kk,Hd as kl,He as Yl,Hf as Zm,Hg as Yo,Hh as Zp,Hi as Yq,Hj as Yr,Hk as Ys,Hl as Xt,Ia as ki,Ib as oj,Ic as lk,Id as ll,Ie as Zl,If as _m,Ig as Zo,Ih as _p,Ii as Zq,Ij as Zr,Ik as Zs,Il as Yt,J as Og,Ja as li,Jb as pj,Jc as mk,Jd as ml,Je as _l,Jf as $m,Jg as _o,Jh as $p,Ji as _q,Jj as _r,Jk as _s,Jl as Zt,K as Pg,Ka as mi,Kb as qj,Kc as nk,Kd as nl,Kf as an,Kg as $o,Kh as aq,Kj as $r,Kk as $s,Kl as _t,L as Qg,La as ni,Lb as rj,Lc as ok,Ld as ol,Lf as bn,Lg as ap,Lh as bq,Lj as as,Lk as at,Ll as $t,M as Rg,Ma as oi,Mb as sj,Mc as pk,Md as pl,Mf as cn,Mg as bp,Mh as eq,Mi as $q,Mj as bs,Mk as bt,Ml as au,N as Sg,Na as pi,Nb as tj,Nc as qk,Nd as ql,Nf as dn,Ng as cp,Nh as fq,Ni as ar,Nj as cs,Nk as ct,Nl as bu,O as Tg,Oa as qi,Ob as uj,Oc as rk,Od as rl,Of as en,Og as dp,Oh as gq,Oi as br,Oj as ds,Ok as dt,Ol as cu,P as Ug,Pa as ri,Pb as vj,Pc as sk,Pd as sl,Pf as fn,Pg as fp,Ph as hq,Pi as cr,Pj as es,Pk as et,Pl as du,Q as Vg,Qa as si,Qb as wj,Qc as tk,Qd as tl,Qe as $l,Qf as gn,Qg as gp,Qh as iq,Qi as dr,Qj as fs,Qk as ft,Ql as eu,R as Wg,Ra as ti,Rb as xj,Rc as uk,Rd as ul,Re as am,Rg as hp,Rh as jq,Ri as er,Rj as gs,Rk as gt,Rl as fu,S as Xg,Sa as ui,Sb as yj,Sc as vk,Sd as vl,Se as bm,Sg as ip,Sh as kq,Si as fr,Sj as hs,Sk as ht,Sl as gu,T as Yg,Ta as vi,Tb as zj,Tc as wk,Td as wl,Te as cm,Tg as jp,Th as lq,Ti as gr,Tj as is,Tk as it,Tl as hu,U as Zg,Ua as wi,Ub as Aj,Uc as xk,Ud as xl,Ue as dm,Ug as kp,Uh as mq,Ui as hr,Uj as js,Uk as jt,Ul as iu,V as _g,Va as xi,Vb as Bj,Vc as yk,Vd as yl,Ve as em,Vg as lp,Vh as nq,Vi as ir,Vj as ks,Vk as kt,Vl as ju,W as $g,Wa as yi,Wb as Cj,Wc as zk,Wd as zl,We as fm,Wg as mp,Wh as oq,Wi as jr,Wj as ls,Wk as lt,X as zh,Xa as zi,Xb as Dj,Xc as Ak,Xd as Al,Xe as gm,Xf as hn,Xg as np,Xh as pq,Xi as kr,Xj as ms,Xk as mt,Y as Ah,Ya as Ai,Yb as Ej,Yc as Bk,Yd as Bl,Ye as hm,Yf as jn,Yg as op,Yh as qq,Yi as lr,Yj as ns,Yk as nt,Z as Bh,Za as Bi,Zb as Fj,Zc as Ck,Zd as Cl,Ze as im,Zf as kn,Zg as pp,Zh as rq,Zi as mr,Zj as os,Zk as ot,_ as Ch,_a as Ci,_b as Gj,_c as Dk,_d as Dl,_e as jm,_f as ln,_g as qp,_h as sq,_i as nr,_j as ps,_k as pt,a as qa,aa as Eh,ab as Ei,ac as Ij,ad as Fk,ae as Fl,af as lm,ag as nn,ah as sp,ai as uq,aj as pr,ak as rs,al as rt,b as ra,ba as Fh,bb as Fi,bc as Jj,bd as Gk,bf as mm,bg as on,bh as tp,bi as vq,bj as qr,bk as ss,bl as st,c as sa,ca as Gh,cb as Gi,cc as Kj,cd as Hk,cf as nm,cg as pn,ch as up,ci as wq,cj as rr,ck as ts,cl as tt,d as ta,da as Hh,db as Hi,dc as Lj,dd as Ik,de as Gl,df as om,dg as qn,dh as vp,di as xq,dj as sr,dk as us,dl as ut,e as ua,ea as Ih,eb as Ii,ec as Mj,ed as Jk,ee as Hl,eg as rn,eh as wp,ei as yq,ej as tr,ek as vs,el as vt,f as va,fa as Jh,fb as Ji,fd as Kk,fg as sn,fh as xp,fi as zq,fj as ur,fk as ws,fl as wt,g as wa,ga as Kh,gb as Ki,gc as Nj,gd as Lk,gg as tn,gh as yp,gi as Aq,gj as vr,gk as xs,gl as xt,h as xa,ha as Lh,hb as Li,hc as Oj,hd as Mk,hf as pm,hg as un,hh as zp,hi as Bq,hj as wr,hk as ys,hl as yt,i as ya,ia as Mh,ib as Mi,ic as Pj,id as Nk,if as qm,ig as Cn,ih as Ap,ii as Cq,ij as xr,ik as zs,il as zt,j as pg,ja as Nh,jb as Ni,jc as Qj,jd as Ok,je as Il,jf as rm,jg as Dn,jh as Bp,ji as Dq,jj as yr,jk as As,jl as At,k as qg,ka as Oh,kb as Oi,kc as Rj,kd as Pk,ke as Jl,kf as sm,kg as Bo,kh as Cp,ki as Eq,kj as zr,kk as Bs,kl as Bt,l as rg,la as Ph,lb as Pi,lc as Sj,ld as Qk,le as Kl,lf as tm,lg as Co,lh as Dp,li as Fq,lj as Ar,lk as Cs,ll as Ct,m as sg,ma as Qh,mb as Qi,mc as Tj,md as Rk,me as Ll,mf as um,mg as Do,mh as Ep,mi as Gq,mj as Br,mk as Ds,ml as Dt,n as tg,na as Rh,nb as Ri,nc as Uj,nd as Sk,ne as Ml,nf as vm,ng as Eo,nh as Fp,nj as Cr,nk as Es,nl as Et,o as ug,oa as Sh,ob as Si,oc as Vj,od as Tk,oe as Nl,of as wm,og as Fo,oh as Gp,oj as Dr,ok as Fs,ol as Ft,p as vg,pa as Th,pb as Ti,pd as Uk,pe as Ol,pf as xm,pg as Go,ph as Hp,pi as Hq,pk as Gs,pl as Gt,q as wg,qa as Uh,qb as Ui,qc as Wj,qd as Vk,qe as Pl,qf as ym,qg as Ho,qh as Ip,qi as Iq,qj as Er,qk as Hs,ql as Ht,r as xg,ra as Vh,rb as Vi,rc as Xj,rd as Wk,re as Ql,rf as zm,rg as Io,rh as Jp,ri as Jq,rj as Fr,rk as Is,rl as It,s as yg,sa as Wh,sb as Wi,sc as Yj,sd as Xk,se as Rl,sf as Am,sg as Jo,sh as Kp,si as Kq,sj as Gr,sk as Js,sl as Jt,t as zg,ta as Xh,tb as Xi,tc as Zj,td as Yk,tf as Lm,tg as Ko,th as Lp,ti as Lq,tj as Hr,tk as Ks,tl as Kt,u as Ag,ua as Yh,ub as Yi,uc as _j,ud as Zk,ue as Sl,uf as Mm,ug as Lo,uh as Mp,ui as Mq,uj as Ir,uk as Ls,ul as Lt,v as Bg,va as Zh,vb as Zi,vc as $j,vd as _k,ve as Tl,vf as Nm,vg as Mo,vh as Np,vi as Nq,vj as Jr,vk as Ms,vl as Mt,w as Cg,wa as _h,wb as _i,wc as ak,wd as $k,wf as Om,wg as No,wh as Op,wi as Oq,wj as Nr,wk as Ns,wl as Nt,x as Dg,xa as $h,xb as $i,xd as al,xf as Pm,xg as Oo,xh as Pp,xi as Pq,xj as Or,xk as Os,xl as Ot,y as Eg,ya as bi,yb as aj,yc as bk,yd as bl,yf as Qm,yg as Po,yh as Qp,yi as Qq,yj as Pr,yk as Ps,yl as Pt,z as Fg,za as ci,zb as bj,zc as ck,zd as cl,zf as Rm,zg as Qo,zh as Rp,zi as Rq,zj as Qr,zk as Qs,zl as Qt}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import{a as En,b as Fn,c as Gn,d as Hn,e as In,f as bo,g as co,h as eo,i as fo,j as go,k as ho,l as io,m as jo}from"./chunk-FUNLOUYI.js";import{a as ko,b as lo,c as mo,d as no,e as oo,f as po,g as qo,h as ro,i as so,j as to,k as uo,l as vo,m as wo,n as xo,o as yo,p as zo,q as Ao}from"./chunk-R3H6IWFK.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 Tn,l as Un,m as Vn,n as Wn,o as Xn,p as Yn,q as Zn,r as _n,s as $n,t as ao}from"./chunk-OMZ5SGMK.js";import{a as ai}from"./chunk-S32ZN6LD.js";import{a as gg,c as hg,d as ig,e as jg}from"./chunk-OQ73WWR4.js";import{c as Kr,e as Lr,f as Mr}from"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import{a as cq,b as dq}from"./chunk-47XR7IMP.js";import{b as ep}from"./chunk-QEI3OETI.js";import{a as Bm,b as Cm,c as Dm,d as Em,e as Fm,f as Gm,g as Hm,h as Im,i as Jm,j as Km,k as vn,l as wn,m as xn,n as yn,o as zn,p as An,q as Bn}from"./chunk-QKYGQLWC.js";import{c as jj,f as kj}from"./chunk-MNGFXISD.js";import{a as ah,b as bh,c as ch,d as dh,e as eh,f as fh,g as gh,h as hh,i as ih,j as jh,k as kh,l as lh,m as mh,n as nh,o as oh,p as ph,q as qh,r as rh,s as sh,t as th,u as uh,v as vh,w as wh,x as xh,y as yh}from"./chunk-4R2OFVPK.js";import{a as gj,b as hj}from"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import{b as Gf,d as Hf,e as If,g as Jf,h as Kf,i as Lf,j as Mf,k as Nf}from"./chunk-S4K76QPI.js";import{A as Ff,B as kg,C as lg,D as mg,E as ng,F as og,d as qe,e as re,f as se,i as qf,j as rf,k as sf,n as tf,p as uf,q as vf,r as wf,s as xf,t as yf,u as zf,v as Af,w as Bf,x as Cf,y as Df,z as Ef}from"./chunk-APVMKC4S.js";import{a as bf,b as cf,c as df,d as ef}from"./chunk-4F4DA5UI.js";import{A as Ye,B as Ze,C as _e,D as $e,E as af,a as ye,b as ze,c as Ae,d as Be,e as Ce,f as De,g as Ee,h as Fe,i as Ge,j as He,k as Ie,l as Je,m as Ke,n as Le,o as Me,p as Ne,q as Oe,r as Pe,s as Qe,t as Re,u as Se,v as Te,w as Ue,x as Ve,y as We,z as Xe}from"./chunk-2MEHZGZJ.js";import{c as te,d as ue,e as ve,f as we,g as xe,h as ff,i as gf,j as hf,k as jf,l as kf,m as lf,n as mf,o as nf,p as of,q as pf}from"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{$ as cb,A as Qa,Aa as Cb,Ab as uc,B as Ra,Ba as Db,Bb as vc,C as Sa,Ca as Eb,Cb as wc,Cc as Ed,D as Ta,Da as Fb,Db as xc,Dc as Fd,E as Ua,Ea as Gb,Eb as yc,Ec as Gd,F as Va,Fa as Hb,Fb as zc,Fc as Hd,G as Wa,Ga as Ib,Gb as Ac,Gc as Id,H as Xa,Ha as Jb,Hb as Bc,Hc as Jd,I as Ya,Ia as Kb,Ib as Cc,Ic as Kd,Ja as Lb,Jb as Dc,Jc as Ld,Ka as Mb,Kb as Ec,Kc as Md,La as Nb,Lc as Nd,Ma as Ob,Mb as Fc,Mc as Od,Na as Pb,Nb as Gc,Nc as Pd,Ob as Hc,Oc as Qd,Pb as Ic,Pc as Rd,Qa as Qb,Qb as Jc,Rb as Kc,Sc as Sd,Ta as Rb,Tc as Td,Ua as Sb,Ub as Lc,Uc as Ud,Va as Tb,Vb as Mc,Vc as Vd,W as Za,Wa as Ub,Wb as Nc,Wc as Wd,X as _a,Xa as Vb,Xb as Oc,Xc as Xd,Y as $a,Ya as Wb,Yb as Pc,Yc as Yd,Z as ab,Za as Xb,Zb as Qc,Zc as Zd,_ as bb,_a as Yb,aa as db,ab as Zb,b as _,ba as eb,bb as _b,c as $,ca as fb,cb as $b,cc as Rc,cd as _d,d as aa,da as gb,db as ac,dd as $d,e as na,ea as hb,eb as bc,ec as Sc,ed as ae,fa as ib,fb as cc,fc as Tc,g as oa,ga as jb,gb as dc,gc as Uc,gd as be,h as pa,ha as kb,hb as ec,hc as Vc,hd as ce,ia as lb,ib as fc,ic as Wc,ja as mb,jb as gc,jc as Xc,jd as de,ka as nb,kb as hc,kc as Yc,la as ob,lb as ic,lc as Zc,ld as ee,ma as pb,mb as jc,mc as _c,md as fe,n as Da,nb as kc,nc as $c,nd as ge,o as Ea,oa as qb,ob as lc,oc as ad,od as he,p as Fa,pa as rb,pb as mc,pc as bd,pd as ie,q as Ga,qa as sb,qb as nc,qc as cd,qd as je,r as Ha,ra as tb,rb as oc,rc as dd,rd as ke,s as Ia,sa as ub,sb as pc,sc as ed,sd as le,t as Ja,ta as vb,tc as fd,td as me,u as Ka,ua as wb,ud as ne,v as La,va as xb,vd as oe,w as Ma,wa as yb,wb as qc,wc as Dd,wd as pe,x as Na,xa as zb,xb as rc,y as Oa,ya as Ab,yb as sc,z as Pa,za as Bb,zb as tc}from"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{a as gd,b as hd,c as id,d as jd,e as kd,f as ld,g as md,h as nd,i as od,j as pd,k as qd,l as rd,m as sd,n as td,o as ud,p as vd,q as wd,r as xd,s as yd,t as zd,u as Ad,v as Bd,w as Cd}from"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import{a as ba,e as ca,f as da,g as ea,h as fa,i as ga,j as ha,k as ia,l as ja,m as ka,n as la,o as ma,p as za,q as Aa,r as Ba,s as Ca}from"./chunk-X6DODPXG.js";import{a as Of,b as Pf,c as Qf,d as Rf,f as Sf,g as Tf,h as Uf,i as Vf,j as Wf,k as Xf,l as Yf,m as Zf,n as _f,o as $f,p as ag,q as bg,r as cg,s as dg,t as eg,v as fg}from"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import{a as V,b as W,c as X,d as Y,e as Z}from"./chunk-IOCF4XSR.js";import{A,B,C,D,E,F,G,H,I,J,L as K,M as L,Q as O,R as P,U as Q,V as R,W as S,X as T,Y as U,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import{c as M,g as N}from"./chunk-FWDMPRKU.js";import"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";export{Ea as AGENT_CONTEXT_FILENAME,Zm as AGENT_WORKTREE_HEX_LENGTH,Ym as AGENT_WORKTREE_PREFIX,_m as AGENT_WORKTREE_SLUG_PATTERN,Ls as ALL_PROVIDERS,Or as APPROVAL_MODES,Qr as APPROVAL_MODE_INFO,qa as ARENA_MAX_AGENTS,kd as AUTO_MEMORY_CONSOLIDATION_LOCK_FILENAME,gd as AUTO_MEMORY_DIRNAME,jd as AUTO_MEMORY_EXTRACT_CURSOR_FILENAME,hd as AUTO_MEMORY_INDEX_FILENAME,id as AUTO_MEMORY_METADATA_FILENAME,Oj as AUTO_MEMORY_SCHEMA_VERSION,Nj as AUTO_MEMORY_TYPES,al as AUTO_MODE_DENIAL_LIMITS,Vo as AUTO_SKILL_THRESHOLD,Rt as AbortError,Nm as AgentCore,xm as AgentEventEmitter,wm as AgentEventType,Am as AgentHeadless,mn as AgentInteractive,da as AgentStatistics,ua as AgentStatus,ta as AgentTerminateMode,xh as AgentType,Nd as ApiCancelEvent,Md as ApiErrorEvent,Ld as ApiRequestEvent,pb as ApiRequestPhase,Od as ApiResponseEvent,Nr as ApprovalMode,ya as ArenaAgentClient,qn as ArenaEventEmitter,pn as ArenaEventType,un as ArenaManager,ra as ArenaSessionStatus,ln as AsyncMessageQueue,de as AuthEvent,Yr as AuthProviderType,kg as AuthType,Eo as BACKGROUND_AGENT_CONCURRENCY_ENV,Wm as BASELINE_COMMIT_MESSAGE,Ta as BINARY_EXTENSIONS,La as BINARY_FILE_PATTERNS,$t as BTW_MAX_INPUT_LENGTH,Jp as BUNDLE_CHUNK_DIR,Lo as BackgroundAgentResumeService,uq as BackgroundShellRegistry,Jo as BackgroundTaskRegistry,q as BadRequestError,ga as BaseDeclarativeTool,ea as BaseToolInvocation,Zp as BudgetExhaustedError,gn as BuiltinAgentRegistry,hf as CAPPED_DEFAULT_MAX_TOKENS,tt as CODE_ACTION_KIND_LABELS,pk as COMMAND_SUBSTITUTION_WARNING,Na as COMMON_DIRECTORY_EXCLUDES,Ka as COMMON_IGNORE_PATTERNS,ma as CONCURRENCY_SAFE_KINDS,Is as CUSTOM_API_KEY_ENV_PREFIX,Qi as ChatRecordingService,om as CloseDiffRequestSchema,Ml as ColorMode,Ui as CompressionStatus,sr as ConditionalRulesRegistry,Zr as Config,ym as ContextState,Yd as ConversationFinishedEvent,vm as CoreToolScheduler,Vf as CredentialsClearRequiredError,ap as CronScheduler,Be as DAEMON_TRACEPARENT_META_KEY,Ce as DAEMON_TRACESTATE_META_KEY,Wo as DEFAULT_AUTO_DREAM_MIN_HOURS,Xo as DEFAULT_AUTO_DREAM_MIN_SESSIONS,Ko as DEFAULT_BACKGROUND_AGENT_CONTINUATION_MESSAGE,fn as DEFAULT_BUILTIN_SUBAGENT_TYPE,Da as DEFAULT_CONTEXT_FILENAME,Za as DEFAULT_ENCODING,Qa as DEFAULT_FILE_EXCLUDES,hj as DEFAULT_FILE_FILTERING_OPTIONS,lt as DEFAULT_LSP_COMMAND_CHECK_TIMEOUT_MS,kt as DEFAULT_LSP_DOCUMENT_OPEN_DELAY_MS,nt as DEFAULT_LSP_DOCUMENT_RETRY_DELAY_MS,ot as DEFAULT_LSP_MAX_RESTARTS,it as DEFAULT_LSP_REQUEST_TIMEOUT_MS,qt as DEFAULT_LSP_SOCKET_MAX_RETRY_DELAY_MS,pt as DEFAULT_LSP_SOCKET_RETRY_DELAY_MS,ht as DEFAULT_LSP_STARTUP_TIMEOUT_MS,jt as DEFAULT_LSP_WARMUP_DELAY_MS,mt as DEFAULT_LSP_WORKSPACE_SYMBOL_WARMUP_DELAY_MS,df as DEFAULT_MATILDA_EMBEDDING_MODEL,cf as DEFAULT_MATILDA_FLASH_MODEL,bf as DEFAULT_MATILDA_MODEL,Do as DEFAULT_MAX_CONCURRENT_BACKGROUND_AGENTS,as as DEFAULT_MAX_INLINE_MEDIA_BYTES,gj as DEFAULT_MEMORY_FILE_FILTERING_OPTIONS,af as DEFAULT_OTLP_ENDPOINT,gf as DEFAULT_OUTPUT_TOKEN_LIMIT,Rr as DEFAULT_PR_ATTRIBUTION_MESSAGE,Hh as DEFAULT_STOP_HOOK_BLOCK_CAP,$e as DEFAULT_TELEMETRY_TARGET,ff as DEFAULT_TOKEN_LIMIT,Ur as DEFAULT_TOOL_OUTPUT_BATCH_BUDGET,Qg as DEFAULT_TOOL_RESULTS_TOTAL_CHARS_THRESHOLD,Tr as DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,Sr as DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,st as DIAGNOSTIC_SEVERITY_LABELS,hn as DISPLAY_MODE,To as DREAM_TASK_TYPE,fa as DeclarativeTool,jh as DefaultHookOutput,Ed as DiscoveredMCPTool,aq as DiscoveredTool,jf as ESCALATED_MAX_TOKENS,$ as EVENT_API_ERROR,aa as EVENT_API_RESPONSE,_ as EVENT_TOOL_CALL,Lm as EXCLUDED_TOOLS_FOR_SUBAGENTS,zq as EXTENSIONS_CONFIG_FILENAME,yq as EXTENSIONS_DIRECTORY_NAME,Bq as EXTENSION_SETTINGS_FILENAME,Mm as EXTERNAL_MESSAGE_PREFIX,So as EXTRACT_TASK_TYPE,Hd as EndSessionEvent,ke as ExtensionDisableEvent,be as ExtensionEnableEvent,_d as ExtensionInstallEvent,hr as ExtensionManager,$q as ExtensionSettingScope,ae as ExtensionUninstallEvent,gr as ExtensionUpdateState,ri as FILE_HISTORY_DIR,Qm 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,cn as FileDiscoveryService,Ul as FileEncoding,Ra as FileExclusions,ui as FileHistoryService,lb as FileOperation,xq as FileReadCache,hm as FileSchema,Tt as FileSearchFactory,Pd as FlashFallbackEvent,o as ForbiddenError,Ch as GOAL_HOOK_TIMEOUT_MS,Bh as GOAL_HOOK_TIMEOUT_SECONDS,t as GOOGLE_ACCOUNTS_FILENAME,Kj as GeminiChat,$o as GeminiClient,Ti as GeminiEventType,bn as GitIgnoreParser,an as GitWorktreeService,dh as HOOKS_CONFIG_FIELDS,bh as HookEventName,ch as HookPhase,mr as HookRegistry,or as HookSystem,eh as HookType,ah as HooksConfigSource,pm as IDEConnectionStatus,$l as IDE_DEFINITIONS,cm as IDE_MAX_OPEN_FILES,dm as IDE_MAX_SELECTED_TEXT_LENGTH,em as IDE_REQUEST_TIMEOUT_MS,Mt as IDLE_SPECULATION,An as INBOXES_DIR,Dt as INITIAL_FOLLOWUP_STATE,Aq as INSTALL_METADATA_FILENAME,kn as ITermBackend,qm as IdeClient,Xd as IdeConnectionEvent,Wd as IdeConnectionType,jm as IdeContextNotificationSchema,im as IdeContextSchema,fm as IdeContextStore,km as IdeDiffAcceptedNotificationSchema,mm as IdeDiffClosedNotificationSchema,lm as IdeDiffRejectedNotificationSchema,Mr as Ignore,nn as InProcessBackend,cq as InputFormat,Wp as InvalidMcpConfigError,Ij as InvalidStreamError,_r as JsonFormatter,ep as KeychainTokenStorage,ka as Kind,Zd as KittySequenceOverflowEvent,wn as LEADER_NAME,zi as LITE_READ_BUF_SIZE,Fa as LOCAL_CONTEXT_FILENAME,ms as Logger,Rd as LoopType,ut as LspConfigLoader,vt as LspConnectionFactory,wt as LspResponseNormalizer,xt as LspServerManager,ef as MAINLINE_CODER_MODEL,na as MAIN_SOURCE,gg as MATILDA_API_KEY_ENV_KEY,bm as MATILDA_CODE_COMPANION_EXTENSION_NAME,bt as MATILDA_CODE_SIMPLE_ENV_VAR,dg as MATILDA_CREDENTIAL_FILE_MODE,s as MATILDA_DIR,tf as MATILDA_OAUTH_MODELS,rc as MATILDA_SESSION_ID_HASH_ATTR,qc as MATILDA_USER_ID_HASH_ATTR,Go as MAX_CONCURRENT_BACKGROUND_AGENTS,oq as MAX_CONCURRENT_MONITORS,gi as MAX_DIFF_SIZE_BYTES,fi as MAX_FILES,ii as MAX_FILES_FOR_DETAILS,Ah as MAX_GOAL_ITERATIONS,hi as MAX_LINES_PER_FILE,sq as MAX_NOTIFICATION_OUTPUT_TAIL_BYTES,Ho as MAX_RETAINED_TERMINAL_AGENTS,pq as MAX_RETAINED_TERMINAL_MONITORS,tq as MAX_RETAINED_TERMINAL_SHELLS,vq as MAX_RETAINED_TERMINAL_WORKFLOWS,qi as MAX_SNAPSHOTS,vn as MAX_TEAMMATES,_k as MAX_TRANSCRIPT_MESSAGES,gh as MAX_USER_PROMPT_EXPANSION_ADDITIONAL_CONTEXT_LENGTH,np as MCPDiscoveryState,jp as MCPOAuthProvider,fp as MCPOAuthTokenStorage,Wr as MCPServerConfig,mp as MCPServerStatus,Yp as MCP_BUDGET_REARM_FRACTION,Xp as MCP_BUDGET_WARN_FRACTION,kp as MCP_DEFAULT_TIMEOUT_MSEC,Ma as MEDIA_FILE_PATTERNS,Ga as MEMORY_SECTION_HEADER,fu as MOCK_TOOL_GET_CONFIRMATION_DETAILS,eu as MOCK_TOOL_GET_DEFAULT_PERMISSION,sf as MODEL_GENERATION_CONFIG_FIELDS,la as MUTATOR_KINDS,$f as MatildaOAuth2Client,ag as MatildaOAuth2Event,Wf as MatildaOAuthPollError,Up as McpBudgetWouldExceedError,op as McpClient,$p as McpClientManager,Vp as McpServerSpawnFailedError,os as McpTransportPool,oe as MemoryDreamEvent,ne as MemoryExtractEvent,Yo as MemoryManager,nb as MemoryMetricType,pe as MemoryRecallEvent,qr as MessageBus,Wj as MessageBusType,js as MessageSenderType,hu as MockModifiableTool,gu as MockModifiableToolInvocation,du as MockTool,vf as ModelRegistry,ce as ModelSlashCommandEvent,wf as ModelsConfig,rq as MonitorRegistry,yt as NativeLspClient,zt as NativeLspService,Sd as NextSpeakerCheckEvent,rh as NotificationType,ip as OAUTH_AUTH_URL_EVENT,hp as OAUTH_DISPLAY_MESSAGE_EVENT,gp as OAuthUtils,Cs as OPENROUTER_BASE_URL,Bs as OPENROUTER_ENV_KEY,kf as OUTPUT_TOKEN_SAFETY_MARGIN,re as OpenAILogger,nm as OpenDiffRequestSchema,dq as OutputFormat,Jt as OverlayFs,w as PATH_ARG_KEYS,Rp as POOLED_TRANSPORTS_DEFAULT,ss as PROVIDER_METADATA_NS,Oa as PYTHON_EXCLUDES,mb as PerformanceMetricType,lq as PermissionManager,th as PermissionMode,qh as PermissionRequestHookOutput,wh as PostCompactTrigger,oh as PostToolBatchHookOutput,mh as PostToolUseFailureHookOutput,lh as PostToolUseHookOutput,vh as PreCompactTrigger,kh as PreToolUseHookOutput,le as PromptSuggestionEvent,Qs as ProviderInstallError,ko as RECIPROCAL_CALLER,Hq as REDACTED_URL_CREDENTIAL,qf as RUNTIME_SNAPSHOT_PREFIX,vi as RUNTIME_STATUS_SCHEMA_VERSION,Dd as ReadFileTool,Fr as RipGrepTool,Qd as RipgrepFallbackEvent,ue as RuntimeDiagnosticsCollector,ll as SAFE_TOOL_ALLOWLIST,Gi as SESSION_TITLE_MAX_LENGTH,v as SHELL_SPECIAL_CHARS,Bk as SHELL_TOOL_NAMES,Uo as SKILL_REVIEW_TASK_TYPE,Ih as STOP_HOOK_BLOCK_CAP_ENV,Ft as SUGGESTION_PROMPT,Kf as SUPPORTED_IMAGE_MIME_TYPES,rt as SYMBOL_KIND_LABELS,Pa as SYSTEM_FILE_EXCLUDES,mj as SYSTEM_REMINDER_CLOSE,lj as SYSTEM_REMINDER_OPEN,ca as SchemaValidator,dp as SdkControlClientTransport,Qb as SemanticAttributes,_o as SendMessageType,uh as SessionEndReason,Hi as SessionService,sh as SessionStartSource,fr as SettingScope,Tl as ShellExecutionService,jq as SkillActivationRegistry,gq as SkillError,ee as SkillLaunchEvent,kq as SkillManager,Ud as SlashCommandStatus,dj as SleepInhibitor,N as SpanStatusCode,me as SpeculationEvent,_l as StandardFileSystemService,Gd as StartSessionEvent,ph as StopHookOutput,K as Storage,Ej as StreamEventType,Om as SubagentError,Pm as SubagentErrorCode,nq as SubagentManager,mq as SubagentValidator,yn as TASKS_DIR,Bn as TEAMMATE_COLORS,xn as TEAMS_DIR,zn as TEAM_CONFIG_FILENAME,ci as TERMINAL_CSI_REGEX,bi as TERMINAL_OSC_REGEX,di as TERMINAL_SHIFT_DCS_REGEX,Ms as THIRD_PARTY_PROVIDERS,Ak as TOOL_NAME_ALIASES,Us as TOOL_USE_SUMMARY_SYSTEM_PROMPT,ro as TaskOwnershipError,Dn as TeamEventEmitter,Cn as TeamEventType,Co as TeamManager,_e as TelemetryTarget,Jf as TextTokenizer,jn as TmuxBackend,Kd as ToolCallEvent,ja as ToolConfirmationOutcome,Aa as ToolDisplayNames,Ca as ToolDisplayNamesMigration,ba as ToolErrorType,ob as ToolExecutionPhase,za as ToolNames,Ba as ToolNamesMigration,$d as ToolOutputTruncatedEvent,bq as ToolRegistry,Pr as TrustGateError,Vi as Turn,ld as USER_AUTO_MEMORY_DIRNAME,oa as UiTelemetryService,p as UnauthorizedError,ge as UserFeedbackEvent,fe as UserFeedbackRating,Id as UserPromptEvent,nh as UserPromptExpansionHookOutput,Jd as UserRetryEvent,M as ValueType,Xm as WORKTREES_DIR,Rm as WORKTREE_BRANCH_PREFIX,Tm as WORKTREE_SESSION_FILE,wq as WorkflowRunRegistry,dn as WorkspaceContext,ps as WorkspaceMcpBudget,ft as WorkspaceMemoryFileTooLargeError,dt as WorkspaceMemoryWriteTimeoutError,Wg as __resetActiveGoalStoreForTests,Nh as _recoverObjectsFromLine,rm as _resetCachedIdeServerHost,Rh as _resetEnsuredDirsCacheForTest,Er as _resetRipGrepCachesForTest,u as _resetValidatePathCacheForTest,Dh as abortGoalForStopHookCap,Pt as abortSpeculation,Ot as acceptSpeculation,fj as acquireSleepInhibitor,Rg as activeGoalEquals,Ie as addDaemonRequestAttribute,qp as addMCPStatusChangeListener,Wb as addModelOutputAttributes,Ub as addSystemPromptAttributes,Xb as addToolInputAttributes,Yb as addToolResultAttributes,Vb as addToolSchemaAttributes,Tb as addUserPromptAttributes,at as aggregateUsage,Cl as allowEditorTypeInSandbox,Fg as appendToLastTextPart,ql as applyAutoModeDecision,Rs as applyProviderInstallPlan,kj as applySkillAllowedTools,cs as approxBase64Bytes,lo as assertValidTaskId,Rn as assignTeammateColor,W as atomicWriteFile,Z as atomicWriteFileSync,X as atomicWriteJSON,wo as blockTask,rj as buildAddedMcpToolsReminder,uj as buildAddedSkillsReminder,Ii as buildApiHistoryFromConversation,tj as buildAvailableSkillsReminder,Io as buildBackgroundEntryLabel,bu as buildBtwCacheSafeParams,au as buildBtwPrompt,qj as buildDeferredToolsReminder,sn as buildFallbackApproachSummary,Jk as buildHumanReadableRuleLabel,ts as buildInstallPlan,sj as buildMcpServerInstructionsReminder,bp as buildMissedCronNotification,qg as buildModelIdContext,Rk as buildPermissionCheckContext,Ik as buildPermissionRules,As as buildProviderTemplate,rk as buildShellExecWarnings,jj as buildSkillLlmContent,vj as buildStartupContextReminder,Bo as buildTeammatePromptAddendum,eg as cacheMatildaCredentials,Pp as canUseRipgrep,Le as captureDaemonTelemetryContext,yk as checkArgumentSafety,sk as checkCommandPermissions,Qq as checkForExtensionUpdate,Bl as checkHasEditorType,Nq as checkNpmUpdate,xo as claimTask,es as clampInlineMediaPart,lf as clampOutputToContextWindow,Wn as classifyShutdownResponse,Xs as cleanSummary,ju as cleanupTmpDir,Ug as clearActiveGoal,io as clearAllInboxes,od as clearAutoMemoryRootCache,Oo as clearCacheSafeParams,fg as clearCachedCredentialFile,Yg as clearGoalTerminalObserver,ho as clearInbox,uc as clearMatildaCorrelationHashes,Af as clearMatildaCredentials,yi as clearRuntimeStatus,Sn as clearTeammateColors,Xt as clearWelcomeBackState,Ir as clearWorktreeSession,wr as cliSource,Oq as cloneFromGit,cp as collectMemoryDiagnostics,Aj as collectToolCallIdsFromHistory,wl as commandExists,Gj as compactPendingUserContentToBudget,Fj as compactTextMiddle,us as computeModelListVersion,cj as computeThresholds,Mi as computeUniqueBranchTitle,Ar as computedSource,Ap as connectAndDiscover,Gp as connectToMcpServer,Sp as connectionIdOf,go as consumeUnread,Wq as convertClaudeAgentConfig,Yq as convertClaudePluginPackage,Xq as convertClaudeToMatildaConfig,Ol as convertColorToHex,um as convertToFunctionResponse,Uq as convertTomlToMarkdown,ir as copyExtension,cb as countFileLines,Vh as countLines,Kr as crawlCache,og as createContentGenerator,ng as createContentGeneratorConfig,Pe as createDaemonBridgeTelemetry,U as createDebugLogger,Qj as createDefaultAutoMemoryExtractCursor,Rj as createDefaultAutoMemoryIndex,Pj as createDefaultAutoMemoryMetadata,bl as createDenialState,Et as createFollowupController,Po as createForkedChat,Eh as createGoalStopHookCallback,ih as createHookOutput,pr as createInstructionsLoadedCallback,lp as createStreamableHttpCompatibilityFetch,po as createTask,Zn as createTeamFile,iu as createTmpDir,Ts as createToolUseSummaryMessage,Hp as createTransport,Ks as customProvider,$a as decodeBufferWithEncodingInfo,ls as decodeTagName,Cj as dedupeToolCallsById,Es as deepseekProvider,zr as defaultSource,to as deleteTask,$n as deleteTeamDirs,ti as deserializeSnapshots,_a as detectBOM,on as detectBackend,ok as detectCommandSubstitution,Ya as detectEncodingFromBuffer,eb as detectFileEncoding,ib as detectFileType,am as detectIdeFromEnv,Yl as detectLineEnding,Gf as detectRuntime,yh as detectTodoChanges,yp as discoverMcpTools,Dp as discoverPrompts,Bp as discoverTools,bo as disposeInboxLocks,ck as doesToolInvocationMatch,Rq as downloadFromGitHubRelease,Mq as downloadFromNpmRegistry,xl as editorCommands,Ke as emitDaemonLog,hs as encodeInsightErrorMessage,fs as encodeInsightProgressMessage,gs as encodeInsightReadyMessage,ks as encodeTagName,Zl as encodeTextFileContent,lc as endHookSpan,$b as endInteractionSpan,cc as endLLMRequestSpan,oc as endSubagentSpan,jc as endToolBlockedOnUserSpan,hc as endToolExecutionSpan,fc as endToolSpan,Sj as ensureAutoMemoryScaffold,Xl as ensureCrlfLineEndings,Op as ensureMacBinarySigned,Np as ensureRipgrepHealthy,Qt as ensureToolResultPairing,Uj as ensureUserAutoMemoryScaffold,Br as envLayer,B as escapePath,fk as escapeShellArg,ul as evaluateAutoMode,Vk as evaluatePermissionFlow,Sk as evaluatePermissionRules,Kt as evaluateToolCall,tk as execCommand,ns as executeToolCall,Wh as exists,y as expandHomeDir,Oe as extractDaemonTraceContext,Sa as extractExtensionsFromPatterns,Tq as extractFile,Bi as extractJsonStringField,Di as extractLastJsonStringField,Ci as extractLastJsonStringFields,$k as extractShellOperations,tm as extractToolFilePaths,ji as fetchGitDiff,ki as fetchGitDiffHunks,kb as fileExists,St as filter,Yh as findGitRoot,Un as findMemberById,Vn as findMemberByName,Os as findProviderByCredentials,Ns as findProviderById,Sq as findReleaseAsset,$j as fireNotificationHook,ak as firePermissionRequestHook,_j as firePostToolUseFailureHook,Zj as firePostToolUseHook,Yj as firePreToolUseHook,Eg as flatMapTextParts,zc as forceFlushMetrics,Pn as formatAgentId,tl as formatClassifierBlockMessage,nj as formatDateForContext,cl as formatDenialStateLog,tn as formatLineStats,Pl as formatMemoryUsage,Lh as formatStopHookBlockingCapWarning,P as formatTraceparent,Hn as forwardApproval,$m as generateAgentWorktreeSlug,Tf as generateCodeChallenge,Sf as generateCodeVerifier,Js as generateCustomEnvKey,Uf as generatePKCEPair,Gt as generatePromptSuggestion,Ss as generateSessionRecap,Xj as generateToolUseId,Vs as generateToolUseSummary,Qn as generateUniqueTeammateName,Fd as generateValidName,Sg as getActiveGoal,pc as getActiveInteractionSpan,Em as getAgentName,Ao as getAgentStatuses,Ja as getAllGeminiMdFilenames,vp as getAllMCPServerStatuses,Ps as getAllProviderBaseUrls,aj as getArenaSystemReminder,ud as getAutoMemoryConsolidationLockPath,td as getAutoMemoryExtractCursorPath,xd as getAutoMemoryFilePath,rd as getAutoMemoryIndexPath,sd as getAutoMemoryMetadataPath,pd as getAutoMemoryProjectStateDir,nd as getAutoMemoryRoot,vd as getAutoMemoryTopicFilename,wd as getAutoMemoryTopicPath,sl as getAutoModePermissionDeniedReason,Lp as getBuiltinRipgrep,No as getCacheSafeParams,Va as getCachedEncodingForBuffer,hk as getCommandRoot,ik as getCommandRoots,Zi as getCompressionPrompt,Yi as getCoreSystemPrompt,Ia as getCurrentGeminiMdFilename,Xi as getCustomSystemPrompt,vs as getDefaultBaseUrlForProtocol,xs as getDefaultModelIds,El as getDiffCommand,oj as getDirectoryContextString,yl as getEditorExecutable,Xk as getEffectivePermissionForConfirmation,dr as getEnvContents,pj as getEnvironmentContext,c as getErrorMessage,d as getErrorStatus,e as getErrorType,jr as getExtensionId,Al as getExternalEditorCommand,Ht as getFilterReason,ij as getFolderStructure,Ig as getFunctionCalls,Kg as getFunctionCallsAsJson,Jg as getFunctionCallsFromParts,Lg as getFunctionCallsFromPartsAsJson,Zh as getGitBranch,_h as getGitRepoName,fh as getHookKey,gt as getIdeInstaller,sm as getIdeServerHost,co as getInboxPath,Mn as getInboxesDir,wj as getInitialChatHistory,bj as getInsightPrompt,_g as getLastGoalTerminal,Fn as getLeader,wp as getMCPDiscoveryState,Ct as getMCPServerPrompts,up as getMCPServerStatus,ig as getMatildaAuthBaseUrl,Bf as getMatildaAuthStatus,tc as getMatildaCorrelationHashes,xf as getMatildaCredentialsPath,cg as getMatildaOAuthClient,bs as getMaxInlineMediaBytes,md as getMemoryBaseDir,qq as getMonitorOutputPath,Hf as getOrCreateSharedDispatcher,$i as getPlanModeSystemReminder,D as getProjectHash,Yt as getProjectSummaryInfo,_i as getProjectSummaryPrompt,xg as getRateLimitErrorDetails,yg as getRateLimitRetryDelayMs,$h as getRecentGitStatus,Dg as getResponseText,Hg as getResponseTextFromParts,Ki as getResumePromptTokenCount,Li as getResumeTokenCounts,Hk as getRuleDisplayName,cr as getScopedEnvContents,Sl as getShellAbortReasonKind,dk as getShellConfiguration,fb as getSpecificMimeType,Dk as getSpecifierKind,xj as getStartupContextLength,Mg as getStructuredResponse,Ng as getStructuredResponseFromParts,Mf as getSupportedImageFormatsString,Wa as getSystemEncoding,qo as getTask,mo as getTaskPath,Nn as getTasksDir,Kn as getTeamDir,Ln as getTeamFilePath,Fm as getTeamName,Jm as getTeammateColor,Cm as getTeammateContext,Jn as getTeamsRootDir,Si as getThoughtText,$s as getTimeRangeBounds,O as getTraceContext,Nf as getUnsupportedImageFormatWarning,zd as getUserAutoMemoryIndexPath,yd as getUserAutoMemoryRoot,Ad as getUserAutoMemoryTopicPath,Df as getValidMatildaAccessToken,Vt as getWelcomeBackState,Zo as globalMemoryManager,ia as hasCycleInSchema,nf as hasExplicitOutputLimit,Fp as hasNetworkTransport,lk as hasNonFinalTopLevelBackgroundOperator,qk as hasShellSubstitution,nk as hasUnsafeMonitorBackgroundOperator,De as hashDaemonWorkspace,At as hashMcpServerConfig,kr as hashValue,nr as hookEventSupportsMatcher,Dq as hydrateString,gm as ideContextStore,Qe as initializeDaemonMetrics,wc as initializeTelemetry,Ne as injectDaemonTraceContext,Tk as injectPermissionRulesIfMissing,Ep as invokeMcpPrompt,b as isAbortError,Cd as isAnyAutoMemPath,rg as isApiError,jl as isApproveOutcome,Zk as isAutoEditApproved,qd as isAutoMemPath,ct as isBareMode,Jl as isBinary,hb as isBinaryFile,Of as isBrowserCommandBlocked,_q as isClaudePluginConfig,wk as isCommandAllowed,vk as isCommandAvailable,xk as isCommandNeedsPermission,Q as isDebugLoggingDegraded,dl as isDenialFallbackReason,Xf as isDeviceAuthorizationSuccess,Zf as isDeviceTokenPending,Yf as isDeviceTokenSuccess,Dl as isEditorAvailable,Ip as isEnabled,_f as isErrorResponse,Vr as isGatedMcpScope,ug as isGenericQuotaExceededError,Xh as isGitRepository,Dm as isInProcessTeammate,ml as isInSafeToolAllowlist,Mj as isInvalidArgumentError,vg as isMatildaQuotaExceededError,Gl as isModifiableDeclarativeTool,a as isNodeError,en as isPathWithinRoot,Jb as isPerformanceMonitoringActive,Yk as isPlanModeBlocked,tg as isProQuotaExceededError,wg as isRateLimitError,te as isRuntimeDiagnosticsEnabled,Lj as isSchemaDepthError,Kq as isScopedNpmPackage,Xr as isSdkMcpServerConfig,xa as isSettledStatus,sg as isStructuredError,F as isSubpath,G as isSubpaths,wa as isSuccessStatus,Lf as isSupportedImageMimeType,yj as isSystemReminderContent,Im as isTeamLead,Hm as isTeammate,vc as isTelemetrySdkInitialized,zl as isTerminalEditor,va as isTerminalStatus,Vq as isTomlFormat,ha as isTool,bk as isToolEnabled,zg as isTransientCapacityError,Ag as isUnattendedMode,Bd as isUserAutoMemPath,vl as isValidEditorType,Hj as isValidNonThoughtTextPart,ek as isWindows,gb as isWithinRoot,zh as judgeGoal,of as knownTokenLimit,Cr as layer,Cp as listMcpPrompts,uo as listTasks,ao as listTeamNames,Lr as loadIgnoreRules,tr as loadServerHierarchicalMemory,_s as loadUsageHistory,Jc as logApiCancel,Ic as logApiError,Fc as logApiRequest,Kc as logApiResponse,$c as logArenaAgentCompleted,ad as logArenaSessionEnded,_c as logArenaSessionStarted,Xc as logAuth,Pc as logChatCompression,Oc as logConversationFinishedEvent,Wc as logExtensionDisable,Vc as logExtensionEnable,Sc as logExtensionInstallEvent,Tc as logExtensionUninstall,Uc as logExtensionUpdateEvent,Gc as logFlashFallback,Nc as logIdeConnection,Qc as logKittySequenceOverflow,ed as logMemoryDream,dd as logMemoryExtract,fd as logMemoryRecall,Rc as logModelSlashCommand,Lc as logNextSpeakerCheck,bd as logPromptSuggestion,Hc as logRipgrepFallback,Yc as logSkillLaunch,Mc as logSlashCommand,cd as logSpeculation,Ac as logStartSession,Dc as logToolCall,Ec as logToolOutputTruncated,Zc as logUserFeedback,Bc as logUserPrompt,Cc as logUserRetry,jg as loginToMatilda,Ff as loginToMatildaWithBrowser,Cf as logoutMatilda,ie as makeArenaAgentCompletedEvent,je as makeArenaSessionEndedEvent,he as makeArenaSessionStartedEvent,Vd as makeChatCompressionEvent,cu as makeFakeConfig,A as makeRelative,Td as makeSlashCommandEvent,Lk as matchesCommandPattern,Ok as matchesDomainPattern,Pk as matchesMcpPattern,Nk as matchesPathPattern,Qk as matchesRule,bg as matildaOAuth2Events,hg as matildaProvider,ar as maybePromptForSettings,pp as mcpServerRequiresOAuth,_p as mcpTransportOf,Zq as mergeClaudeConfigs,Zs as metricsToUsageRecord,Fs as minimaxProvider,yr as modelProvidersSource,uf as modelRegistryKey,Hs as modelscopeProvider,Hl as modifyWithEditor,Wk as needsConfirmation,Vl as needsUtf8Bom,mf as normalize,Kl as normalizeContent,Bj as normalizeModelToolCallIds,mk as normalizeMonitorCommand,rr as normalizeProxyUrl,hq as normalizeSkillPriority,Jh as normalizeStopHookBlockingCap,Zg as notifyGoalTerminal,oo as notifyTasksUpdated,no as onTasksUpdated,Qf as openBrowserSecurely,Fl as openDiff,Ds as openRouterProvider,se as openaiLogger,ds as oversizedMediaPlaceholder,eq as parse,Mh as parseAndFormatApiError,ye as parseBooleanEnvFlag,Tp as parseConnectionId,oi as parseDeletedFromNameStatus,mi as parseGitDiff,Pq as parseGitHubRepoForReleases,li as parseGitNumstat,is as parseInsightMessage,Bt as parseInstallSource,Oh as parseLineTolerant,Jq as parseNpmPackageSource,Fk as parseRule,Gk as parseRules,ni as parseShortstat,ze as parseTelemetryTargetValue,Ri as parseThought,$r as partListUnionToString,Cg as partToString,pl as passesAcceptEditsFastPath,Gq as performVariableReplacement,Uk as persistPermissionOutcome,Ys as persistSessionUsage,zp as populateMcpServerCommand,Gg as prependToFirstTextPart,jb as processSingleFileContent,br as promptForSetting,Ql as promptIdContext,zs as providerMatchesCredentials,Qh as read,Tj as readAutoMemoryIndex,bb as readFileWithEncoding,ab as readFileWithEncodingInfo,db as readFileWithLineAndLimit,eo as readInbox,Ei as readLastJsonStringFieldSync,Fi as readLastJsonStringFieldsSync,Ph as readLines,Zt as readManyFiles,yf as readMatildaCredentials,Ut as readPathFromWorkspace,xi as readRuntimeStatus,Xn as readTeamFile,Vj as readUserAutoMemoryIndex,Gr as readWorktreeSession,Vm as readWorktreeSessionMarker,el as recordAllow,tb as recordApiErrorMetrics,Fb as recordApiRequestBreakdown,sb as recordApiResponseMetrics,yb as recordApiRetry,Lb as recordArenaAgentCompletedMetrics,Mb as recordArenaSessionEndedMetrics,Kb as recordArenaSessionStartedMetrics,Ib as recordBaselineComparison,fl as recordBlock,wb as recordContentRetry,xb as recordContentRetryFailure,Bb as recordCpuUsage,Xe as recordDaemonBridgeError,Ye as recordDaemonCancel,Ue as recordDaemonChannelLifecycle,Je as recordDaemonError,Se as recordDaemonHttpRequest,He as recordDaemonHttpResponse,We as recordDaemonPromptDuration,Ve as recordDaemonPromptQueueWait,Te as recordDaemonSessionLifecycle,il as recordFallbackApprove,ub as recordFileOperationMetric,Vg as recordGoalIteration,vb as recordInvalidChunk,Ob as recordMemoryDreamMetrics,Nb as recordMemoryExtractMetrics,Pb as recordMemoryRecallMetrics,Ab as recordMemoryUsage,Hb as recordPerformanceRegression,Gb as recordPerformanceScore,Pg as recordStartupEvent,zb as recordStartupPerformance,Eb as recordTokenEfficiency,rb as recordTokenUsageMetrics,qb as recordToolCallMetrics,Db as recordToolExecutionBreakdown,Cb as recordToolQueueDepth,gl as recordUnavailable,Eq as recursivelyHydrateStrings,If as redactProxyCredentials,Dj as redactStructuredOutputArgsForRecording,Iq as redactUrlCredentials,Ef as refreshMatildaCredentials,xc as refreshSessionContext,Re as registerDaemonGaugeCallbacks,Gh as registerGoalHook,En as registerLeader,yo as releaseOwnedTask,tp as removeMCPServerStatus,rp as removeMCPStatusChangeListener,V as renameWithRetry,Y as renameWithRetrySync,Jj as repairOrphanedToolUseTurns,Ji as replayUiTelemetryFromConversation,Ze as reportCliClientEvent,R as resetDebugLoggingState,kl as resetDenialState,Ua as resetEncodingCache,vo as resetTaskList,Wl as resetUtf8BomCache,Gm as resolveActiveTeamName,J as resolveAndValidatePath,ws as resolveBaseUrl,Kp as resolveBundleDir,uk as resolveCommandPath,lg as resolveContentGeneratorConfigWithSources,ur as resolveField,pi as resolveGitDir,Fo as resolveMaxConcurrentBackgroundAgents,rs as resolveMetadataKey,Dr as resolveModelConfig,pg as resolveModelId,Lq as resolveNpmRegistry,qe as resolveOpenAILogDir,vr as resolveOptionalField,qs as resolveOwnsModel,H as resolvePath,Wi as resolvePathFromEnv,Mk as resolvePathPattern,Mp as resolveRipgrep,Kh as resolveStopHookBlockingCap,Ae as resolveTelemetrySettings,Ck as resolveToolName,Jr as restoreWorktreeContext,Bg as retryWithBackoff,Lt as rewritePathArgs,Ro as runForkedAgent,nc as runInSubagentSpanContext,ec as runInToolSpanContext,Qp as runRipgrep,ai as runSideQuery,Me as runWithDaemonTelemetryContext,T as runWithDebugLogSession,Qo as runWithForkedChatModel,Km as runWithTeammateIdentity,ve as runtimeDiagnostics,sa as safeAgentId,Il as safeLiteralReplace,E as sanitizeCwd,Rb as sanitizeHookName,On as sanitizeName,Oi as sanitizeTitle,Pi as sanitizeToolCallResultForRecording,hh as sanitizeUserPromptExpansionAdditionalContext,Mo as saveCacheSafeParams,Wt as saveWelcomeBackRestartChoice,jo as sendStructuredMessage,si as serializeSnapshot,Nl as serializeTerminalToObject,Ll as serializeTerminalToText,Rl as sessionIdContext,Tg as setActiveGoal,S as setDebugLogSession,Ha as setGeminiMdFilename,Xg as setGoalTerminalObserver,$g as setLastGoalTerminal,xp as setMCPDiscoveryState,sc as setMatildaCorrelationHashes,Tn as setMemberActive,Og as setStartupEventSink,xr as settingsSource,z as shortenPath,Pf as shouldAttemptBrowserLaunch,zk as shouldDefaultToNodePty,hl as shouldFallback,It as shouldFilterSuggestion,rl as shouldFirePermissionDeniedForAutoMode,ol as shouldForceAutoModeReviewForAllow,Rf as shouldLaunchBrowser,nl as shouldRunAutoModeForCall,ys as shouldShowStep,yc as shutdownTelemetry,ej as sleepInhibitor,gk as splitCommands,Kk as splitCompoundCommand,iq as splitConditionalSkills,kc as startHookSpan,_b as startInteractionSpan,bc as startLLMRequestSpan,Nt as startSpeculation,mc as startSubagentSpan,ic as startToolBlockedOnUserSpan,gc as startToolExecutionSpan,dc as startToolSpan,fq as stringify,rf as stripRuntimeSnapshotPrefix,jk as stripShellWrapper,zj as stripStartupContext,ei as stripTerminalControlSequences,kk as stripTrailingBackgroundAmp,_t as subagentGenerator,Fq as substituteHookVariables,xe as summarizeAnthropicWireRequest,we as summarizeOpenAIWireRequest,rn as summarizeUnifiedDiff,Bm as teammateIdentityStore,zm as templateString,x as tildeifyPath,r as toFriendlyError,pf as tokenLimit,Ek as toolMatchesRuleToolName,Sb as truncateContent,Ws as truncateJson,Zb as truncateSpanError,Ni as tryGenerateSessionTitle,_n as tryReclaimStaleTeam,pa as uiTelemetryService,zo as unassignTeammateTasks,Ai as unescapeJsonString,C as unescapePath,Fh as unregisterGoalHook,Gn as unregisterLeader,sp as updateMCPServerStatus,er as updateSetting,L as updateSymlink,so as updateTask,mg as validateModelConfig,lr as validateName,I as validatePath,Cq as validateVariables,Xa as windowsCodePageToEncoding,Ge as withDaemonBridgeSpan,Fe as withDaemonRequestSpan,Ee as withDaemonSpan,ac as withInteractionSpan,Sm as worktreeBranchForSlug,In as wrapConfirmWithBadge,Uh as write,Sh as writeLine,Th as writeLineSync,zf as writeMatildaCredentials,fo as writeMessage,wi as writeRuntimeStatus,Yn as writeTeamFile,et as writeWorkspaceContextFile,Hr as writeWorktreeSession,Um as writeWorktreeSessionMarker,Gs as zaiProvider};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// Force strict mode and setup for ESM
|
|
2
|
-
"use strict";
|
|
3
|
-
import{a as V}from"./chunk-I55PXD4N.js";import{Ca as F,De as G,Ee as H,He as K,be as D,ce as q,fc as B,we as P,xe as p}from"./chunk-KMU5KAYC.js";import"./chunk-TZIDSCTF.js";import"./chunk-FUNLOUYI.js";import"./chunk-R3H6IWFK.js";import"./chunk-OMZ5SGMK.js";import"./chunk-S32ZN6LD.js";import"./chunk-OQ73WWR4.js";import"./chunk-RBG4ERTN.js";import"./chunk-TXMXCR7D.js";import"./chunk-YULUB745.js";import"./chunk-LQWORCPO.js";import"./chunk-TISQNFB5.js";import"./chunk-47XR7IMP.js";import"./chunk-QEI3OETI.js";import"./chunk-QKYGQLWC.js";import"./chunk-MNGFXISD.js";import"./chunk-4R2OFVPK.js";import"./chunk-RNKDFE2S.js";import"./chunk-EMWHQSMS.js";import"./chunk-S4K76QPI.js";import"./chunk-APVMKC4S.js";import"./chunk-4F4DA5UI.js";import"./chunk-2MEHZGZJ.js";import"./chunk-LN2DRVOB.js";import"./chunk-4J6DC24J.js";import"./chunk-LJR4RZZ2.js";import"./chunk-U347OO7S.js";import{Lb as j,Oa as N,_c as U,ca as L,ha as h}from"./chunk-DY6PIAAY.js";import"./chunk-WVY2P6WH.js";import"./chunk-UIRBHC5X.js";import{w as k}from"./chunk-UY2R3ZQ4.js";import"./chunk-4M4CUQUR.js";import{g as $,i as W,p as O,q as A}from"./chunk-X6DODPXG.js";import"./chunk-LLQVLTPB.js";import"./chunk-XKDGRW3K.js";import"./chunk-ESSYHTAZ.js";import"./chunk-IOCF4XSR.js";import{A as C,C as I,Y as M,a as f,c as _,z as w}from"./chunk-QWBNNEV2.js";import"./chunk-G7R2XEEF.js";import"./chunk-OA56BXPD.js";import"./chunk-FWDMPRKU.js";import{b as x}from"./chunk-GZPNIYVZ.js";import"./chunk-OWGSC52X.js";x();import y from"node:fs";import g from"node:path";var u=M("WRITE_FILE"),v=class extends ${constructor(n,t){super(t);this.config=n}toolLocations(){return[{path:this.params.file_path}]}getDescription(){let n=C(this.params.file_path,this.config.getTargetDir());return`Writing to ${w(n)}`}async getDefaultPermission(){let n=this.config.getProjectRoot();return k(g.resolve(this.params.file_path),n)?"allow":"ask"}async getConfirmationDetails(n){let t="",o=await h(this.params.file_path);if(!this.config.getFileReadCacheDisabled()){let i=await p(this.config.getFileReadCache(),this.params.file_path,"overwriting");if(!i.ok)throw new P(i.rawMessage,i.type)}if(o)try{let{content:i}=await this.config.getFileSystemService().readTextFile({path:this.params.file_path});t=i}catch(i){if(f(i)&&i.code==="ENOENT")o=!1;else throw new Error(`Error reading existing file for confirmation: ${_(i)}`)}if(o&&!this.config.getFileReadCacheDisabled()){let i=await p(this.config.getFileReadCache(),this.params.file_path,"overwriting",{expectExisting:!0});if(!i.ok)throw u.warn("post-read TOCTOU rejection (confirmation)",{path:this.params.file_path,reason:i.type}),new P(i.rawMessage,i.type)}let a=C(this.params.file_path,this.config.getTargetDir()),c=g.basename(this.params.file_path),s=F(c,t,this.params.content,"Current","Proposed",D);return{type:"edit",title:`Confirm Write: ${w(a)}`,fileName:c,filePath:this.params.file_path,fileDiff:s,originalContent:t,newContent:this.params.content,onConfirm:async i=>{i==="proceed_always"&&this.config.setApprovalMode("auto-edit")}}}async execute(n){let{file_path:t,content:o,ai_proposed_content:a,modified_by_user:c}=this.params,s=await h(t),m="",i=!1,E,R,z=g.dirname(t);if(!this.config.getFileReadCacheDisabled()){let e=await p(this.config.getFileReadCache(),t,"overwriting");if(!e.ok)return{llmContent:e.rawMessage,returnDisplay:`Error: ${e.displayMessage}`,error:{message:e.rawMessage,type:e.type}}}if(s)try{let e=await this.config.getFileSystemService().readTextFile({path:t});e._meta?.bom!==void 0?i=e._meta.bom:i=e.content.length>0&&e.content.codePointAt(0)===65279,E=e._meta?.encoding||"utf-8",R=K(e.content),m=e.content,s=!0}catch(e){if(f(e)&&e.code==="ENOENT")s=!1;else{let r={message:_(e),code:f(e)?e.code:void 0},l=r.code?`Error checking existing file '${t}': ${r.message} (${r.code})`:`Error checking existing file: ${r.message}`;return{llmContent:l,returnDisplay:l,error:{message:l,type:"file_write_failure"}}}}if(s&&!this.config.getFileReadCacheDisabled()){let e=await p(this.config.getFileReadCache(),t,"overwriting",{expectExisting:!0});if(!e.ok)return u.warn("post-read TOCTOU rejection (execute)",{path:t,reason:e.type}),{llmContent:e.rawMessage,returnDisplay:`Error: ${e.displayMessage}`,error:{message:e.rawMessage,type:e.type}}}if(!s){let e=this.config.getDefaultFileEncoding();e===G.UTF8_BOM?i=!0:e===void 0&&(i=H(t)),E=void 0}try{await this.config.getFileHistoryService().trackEdit(t)}catch{}if(!this.config.getFileReadCacheDisabled()){let e=await p(this.config.getFileReadCache(),t,"overwriting",{expectExisting:s});if(!e.ok)return u.warn("pre-write TOCTOU rejection",{path:t,reason:e.type}),{llmContent:e.rawMessage,returnDisplay:`Error: ${e.displayMessage}`,error:{message:e.rawMessage,type:e.type}}}s||y.mkdirSync(z,{recursive:!0});try{await this.config.getFileSystemService().writeTextFile({path:t,content:o,_meta:{bom:i,encoding:E,lineEnding:R}}),c||B.getInstance().recordEdit(t,s?m:null,o);try{let d=y.statSync(t);this.config.getFileReadCache().recordWrite(t,d)}catch{}let e=g.basename(t),r=m,l=F(e,r,o,"Original","Written",D),J=q(e,r,a||o,o),T=[s?`Successfully overwrote file: ${t}.`:`Successfully created and wrote to new file: ${t}.`];c&&T.push(`User modified the \`content\` to be: ${o}`);let Q=L(t),X=N(t),Z=g.extname(t),ee=s?"update":"create",te=o.split(`
|
|
4
|
-
`).length;j(this.config,new U(b.Name,ee,te,Q,Z,X));let ie={fileDiff:l,fileName:e,originalContent:m,newContent:o,diffStat:J};try{let d=await V(this.config,t);d&&T.push(`
|
|
5
|
-
|
|
6
|
-
${d}`)}catch{}return{llmContent:T.join(" "),returnDisplay:ie}}catch(e){let r,l="file_write_failure";return f(e)?(r=`Error writing to file '${t}': ${e.message} (${e.code})`,e.code==="EACCES"?(r=`Permission denied writing to file: ${t} (${e.code})`,l="permission_denied"):e.code==="ENOSPC"?(r=`No space left on device: ${t} (${e.code})`,l="no_space_left"):e.code==="EISDIR"&&(r=`Target is a directory, not a file: ${t} (${e.code})`,l="target_is_directory"),this.config.getDebugMode()&&e.stack&&u.debug("Write file error stack:",e.stack)):e instanceof Error?r=`Error writing to file: ${e.message}`:r=`Error writing to file: ${String(e)}`,{llmContent:r,returnDisplay:r,error:{message:r,type:l}}}}},b=class S extends W{constructor(n){super(S.Name,A.WRITE_FILE,"Writes content to a specified file in the local filesystem. The file_path argument MUST be an absolute path. Always construct it by combining the project root with the file's relative path (e.g. project root '/path/to/project/' + relative 'foo/bar.txt' = '/path/to/project/foo/bar.txt'). If the user provides a relative path, resolve it against the project root first.\n\nThe user has the ability to modify `content`. If modified, this will be stated in the response.","edit",{properties:{file_path:{description:"The absolute path to the file to write to (e.g., '/home/user/project/file.txt'). Relative paths are not supported.",type:"string"},content:{description:"The content to write to the file.",type:"string"}},required:["file_path","content"],type:"object"});this.config=n}static Name=O.WRITE_FILE;validateToolParamValues(n){let t=I(n.file_path.trim());if(n.file_path=t,!t)return'Missing or empty "file_path"';if(!g.isAbsolute(t))return`File path must be absolute: ${t}`;try{if(y.existsSync(t)&&y.lstatSync(t).isDirectory())return`Path is a directory, not a file: ${t}`}catch(o){return`Error accessing path properties for validation: ${t}. Reason: ${o instanceof Error?o.message:String(o)}`}return null}createInvocation(n){return new v(this.config,n)}toAutoClassifierInput(n){let t=n.content??"";return{file_path:n.file_path,byte_count:Buffer.byteLength(t,"utf8"),content_preview:t.slice(0,300),content_truncated:t.length>300}}getModifyContext(n){return{getFilePath:t=>t.file_path,getCurrentContent:async t=>{if(await h(t.file_path))try{let{content:a}=await this.config.getFileSystemService().readTextFile({path:t.file_path});return a}catch(a){if(!f(a)||a.code!=="ENOENT")throw a;return""}else return""},getProposedContent:async t=>t.content,createUpdatedParams:(t,o,a)=>{let c=a.content;return{...a,ai_proposed_content:c,content:o,modified_by_user:!0}}}}};export{b as WriteFileTool};
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2025 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
11
|
-
*/
|