pybao-cli 1.5.46 → 1.5.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/REPL-QOH5GRZO.js +53 -0
  2. package/dist/{acp-JLRZ5E3I.js → acp-6X7A2AET.js} +30 -30
  3. package/dist/{agentsValidate-3OYN7SNK.js → agentsValidate-GRUUS3WU.js} +7 -7
  4. package/dist/{ask-BHVMWER5.js → ask-HZDW4LTP.js} +30 -30
  5. package/dist/{autoUpdater-27NDSNED.js → autoUpdater-SPEKG26M.js} +3 -3
  6. package/dist/{chunk-ASMQWQTY.js → chunk-3OA76CSA.js} +1 -1
  7. package/dist/{chunk-6WVP4NLC.js → chunk-4DMR3345.js} +366 -717
  8. package/dist/chunk-4DMR3345.js.map +7 -0
  9. package/dist/{chunk-5VQQJFA3.js → chunk-7NJKFUVQ.js} +3 -3
  10. package/dist/{chunk-R6A5OQPH.js → chunk-7OKEXFNZ.js} +3 -3
  11. package/dist/{chunk-PZBMEC3T.js → chunk-AIKGRPJR.js} +2 -2
  12. package/dist/{chunk-4K3MGWZ7.js → chunk-AKDLTQJZ.js} +1 -1
  13. package/dist/{chunk-DS6COGYF.js → chunk-ALMRZ6TK.js} +4 -1
  14. package/dist/chunk-ALMRZ6TK.js.map +7 -0
  15. package/dist/{chunk-EUYHO7FU.js → chunk-C2BMJGBF.js} +1 -1
  16. package/dist/{chunk-QIWBL65U.js → chunk-E5CC5UGF.js} +4 -4
  17. package/dist/{chunk-KDPYN5HT.js → chunk-EPTONOB3.js} +1 -1
  18. package/dist/{chunk-LA6C74RB.js → chunk-F4IOWWDV.js} +3 -3
  19. package/dist/{chunk-HHGV6WKI.js → chunk-I33HG6MZ.js} +1 -1
  20. package/dist/{chunk-J2NQVO6G.js → chunk-JJNZ7WEP.js} +1 -1
  21. package/dist/{chunk-ATYJA674.js → chunk-KH3BWQJI.js} +2 -2
  22. package/dist/{chunk-Q3ND7MXY.js → chunk-KSDMNPM3.js} +3 -3
  23. package/dist/{chunk-WEXG5Q5B.js → chunk-NRGFDG57.js} +2 -2
  24. package/dist/{chunk-D7QIKN3F.js → chunk-NSPAFJYF.js} +3 -3
  25. package/dist/{chunk-C2NMYFPN.js → chunk-NYRCQC7E.js} +3 -3
  26. package/dist/{chunk-KUKOMPLF.js → chunk-OT7EHZKB.js} +1 -1
  27. package/dist/{chunk-VP62JPGI.js → chunk-SCZBEZ4L.js} +2 -2
  28. package/dist/{chunk-AVQJBO3X.js → chunk-SQL5Q5UT.js} +638 -129
  29. package/dist/chunk-SQL5Q5UT.js.map +7 -0
  30. package/dist/{chunk-2GQH5CH7.js → chunk-TBPXZUAE.js} +2 -2
  31. package/dist/{chunk-LSDHJWLA.js → chunk-UEF22EAA.js} +578 -28
  32. package/dist/chunk-UEF22EAA.js.map +7 -0
  33. package/dist/{chunk-BSCFLD7U.js → chunk-V633SD3K.js} +3 -3
  34. package/dist/{chunk-U5OB3CDM.js → chunk-V6B67TTT.js} +3 -3
  35. package/dist/{chunk-5BASSS5Y.js → chunk-VII5ABW7.js} +1 -1
  36. package/dist/{chunk-KPDYWSAZ.js → chunk-X7L2ZXEQ.js} +2 -2
  37. package/dist/{chunk-IOSFLDRK.js → chunk-XGSD7RT6.js} +1 -1
  38. package/dist/{chunk-DIOS332Y.js → chunk-XRHL3B3W.js} +1 -1
  39. package/dist/{chunk-J2UQWSDT.js → chunk-ZBUV2OFZ.js} +1 -1
  40. package/dist/{chunk-KYMBYUI7.js → chunk-ZYI3GZHI.js} +4 -4
  41. package/dist/{cli-TCRA6ARC.js → cli-E24TVQWL.js} +90 -90
  42. package/dist/commands-M75WK3OK.js +57 -0
  43. package/dist/{config-5KMP3FRP.js → config-U5HHXO56.js} +4 -4
  44. package/dist/{context-VPRXOV4W.js → context-5XAWTXIF.js} +6 -6
  45. package/dist/{conversationPersistence-66W5Z6AO.js → conversationPersistence-COKR4DJM.js} +3 -3
  46. package/dist/{conversationTracker-FTAS67VE.js → conversationTracker-CFWPAQJQ.js} +4 -4
  47. package/dist/{customCommands-YQ2A3R6L.js → customCommands-KV4SPPEJ.js} +4 -4
  48. package/dist/{env-BDTFUU2H.js → env-6Z2X4SGO.js} +2 -2
  49. package/dist/{file-N4UK3JJK.js → file-EYJLYMU7.js} +4 -4
  50. package/dist/index.js +3 -3
  51. package/dist/{llm-QTECZGRE.js → llm-JRNCNUVN.js} +31 -31
  52. package/dist/{llmLazy-5OLIOZK2.js → llmLazy-ULKOVGTW.js} +1 -1
  53. package/dist/{loader-ITDKGIKQ.js → loader-YC2J4JQD.js} +4 -4
  54. package/dist/{lsp-DNNS2MO4.js → lsp-YOU3CXAU.js} +7 -6
  55. package/dist/{lspAnchor-HU2YPGDN.js → lspAnchor-XLKJXJ4F.js} +8 -8
  56. package/dist/{mcp-5R4HG2LZ.js → mcp-ZBXWPPEQ.js} +7 -7
  57. package/dist/{mentionProcessor-5DPHU4OP.js → mentionProcessor-D7A5SR2F.js} +5 -5
  58. package/dist/{messages-ZVVMQ3Q6.js → messages-N4BMW6FO.js} +1 -1
  59. package/dist/{model-Q3NJN5MQ.js → model-3R63GBXV.js} +5 -5
  60. package/dist/{openai-HSEUQEKK.js → openai-OE2BXCWW.js} +5 -5
  61. package/dist/{outputStyles-YGD3BAAK.js → outputStyles-7NXCPWAM.js} +4 -4
  62. package/dist/{pluginRuntime-ODOQDPAK.js → pluginRuntime-DUFKGBKI.js} +6 -6
  63. package/dist/{pluginValidation-P52JWV6C.js → pluginValidation-TUI4RWTL.js} +6 -6
  64. package/dist/prompts-VLIUTRIV.js +59 -0
  65. package/dist/{pybAgentSessionLoad-B735OKRY.js → pybAgentSessionLoad-OHCESID3.js} +4 -4
  66. package/dist/{pybAgentSessionResume-YKCKQOJO.js → pybAgentSessionResume-X7TO6VQ7.js} +4 -4
  67. package/dist/{pybAgentStreamJsonSession-7KQJH3YL.js → pybAgentStreamJsonSession-3XCK4MLN.js} +1 -1
  68. package/dist/{pybHooks-27O2F24J.js → pybHooks-WGTXY2KQ.js} +4 -4
  69. package/dist/query-Y332XP4J.js +57 -0
  70. package/dist/{registry-CJLUFMEQ.js → registry-V4XMLWYT.js} +5 -5
  71. package/dist/{ripgrep-TD77KYER.js → ripgrep-ITNB4VGR.js} +3 -3
  72. package/dist/{skillMarketplace-R475NBXV.js → skillMarketplace-YYMKIEEM.js} +3 -3
  73. package/dist/{state-KQVHDJY3.js → state-ZQW77MQC.js} +2 -2
  74. package/dist/{theme-GDAAXHZV.js → theme-L3I3PP7H.js} +5 -5
  75. package/dist/{toolPermissionSettings-ZTEGC7CB.js → toolPermissionSettings-ZHMSXSXS.js} +6 -6
  76. package/dist/tools-CM5X3TT5.js +57 -0
  77. package/dist/{userInput-7HR7YK3T.js → userInput-VSYAOPNU.js} +32 -32
  78. package/package.json +4 -1
  79. package/dist/REPL-OP6NG7VB.js +0 -53
  80. package/dist/chunk-6WVP4NLC.js.map +0 -7
  81. package/dist/chunk-AVQJBO3X.js.map +0 -7
  82. package/dist/chunk-DS6COGYF.js.map +0 -7
  83. package/dist/chunk-LSDHJWLA.js.map +0 -7
  84. package/dist/commands-7FEOAWKL.js +0 -57
  85. package/dist/prompts-VWZICAZT.js +0 -59
  86. package/dist/query-YW4M2CLS.js +0 -57
  87. package/dist/tools-4WVDBE5W.js +0 -57
  88. /package/dist/{REPL-OP6NG7VB.js.map → REPL-QOH5GRZO.js.map} +0 -0
  89. /package/dist/{acp-JLRZ5E3I.js.map → acp-6X7A2AET.js.map} +0 -0
  90. /package/dist/{agentsValidate-3OYN7SNK.js.map → agentsValidate-GRUUS3WU.js.map} +0 -0
  91. /package/dist/{ask-BHVMWER5.js.map → ask-HZDW4LTP.js.map} +0 -0
  92. /package/dist/{autoUpdater-27NDSNED.js.map → autoUpdater-SPEKG26M.js.map} +0 -0
  93. /package/dist/{chunk-ASMQWQTY.js.map → chunk-3OA76CSA.js.map} +0 -0
  94. /package/dist/{chunk-5VQQJFA3.js.map → chunk-7NJKFUVQ.js.map} +0 -0
  95. /package/dist/{chunk-R6A5OQPH.js.map → chunk-7OKEXFNZ.js.map} +0 -0
  96. /package/dist/{chunk-PZBMEC3T.js.map → chunk-AIKGRPJR.js.map} +0 -0
  97. /package/dist/{chunk-4K3MGWZ7.js.map → chunk-AKDLTQJZ.js.map} +0 -0
  98. /package/dist/{chunk-EUYHO7FU.js.map → chunk-C2BMJGBF.js.map} +0 -0
  99. /package/dist/{chunk-QIWBL65U.js.map → chunk-E5CC5UGF.js.map} +0 -0
  100. /package/dist/{chunk-KDPYN5HT.js.map → chunk-EPTONOB3.js.map} +0 -0
  101. /package/dist/{chunk-LA6C74RB.js.map → chunk-F4IOWWDV.js.map} +0 -0
  102. /package/dist/{chunk-HHGV6WKI.js.map → chunk-I33HG6MZ.js.map} +0 -0
  103. /package/dist/{chunk-J2NQVO6G.js.map → chunk-JJNZ7WEP.js.map} +0 -0
  104. /package/dist/{chunk-ATYJA674.js.map → chunk-KH3BWQJI.js.map} +0 -0
  105. /package/dist/{chunk-Q3ND7MXY.js.map → chunk-KSDMNPM3.js.map} +0 -0
  106. /package/dist/{chunk-WEXG5Q5B.js.map → chunk-NRGFDG57.js.map} +0 -0
  107. /package/dist/{chunk-D7QIKN3F.js.map → chunk-NSPAFJYF.js.map} +0 -0
  108. /package/dist/{chunk-C2NMYFPN.js.map → chunk-NYRCQC7E.js.map} +0 -0
  109. /package/dist/{chunk-KUKOMPLF.js.map → chunk-OT7EHZKB.js.map} +0 -0
  110. /package/dist/{chunk-VP62JPGI.js.map → chunk-SCZBEZ4L.js.map} +0 -0
  111. /package/dist/{chunk-2GQH5CH7.js.map → chunk-TBPXZUAE.js.map} +0 -0
  112. /package/dist/{chunk-BSCFLD7U.js.map → chunk-V633SD3K.js.map} +0 -0
  113. /package/dist/{chunk-U5OB3CDM.js.map → chunk-V6B67TTT.js.map} +0 -0
  114. /package/dist/{chunk-5BASSS5Y.js.map → chunk-VII5ABW7.js.map} +0 -0
  115. /package/dist/{chunk-KPDYWSAZ.js.map → chunk-X7L2ZXEQ.js.map} +0 -0
  116. /package/dist/{chunk-IOSFLDRK.js.map → chunk-XGSD7RT6.js.map} +0 -0
  117. /package/dist/{chunk-DIOS332Y.js.map → chunk-XRHL3B3W.js.map} +0 -0
  118. /package/dist/{chunk-J2UQWSDT.js.map → chunk-ZBUV2OFZ.js.map} +0 -0
  119. /package/dist/{chunk-KYMBYUI7.js.map → chunk-ZYI3GZHI.js.map} +0 -0
  120. /package/dist/{cli-TCRA6ARC.js.map → cli-E24TVQWL.js.map} +0 -0
  121. /package/dist/{commands-7FEOAWKL.js.map → commands-M75WK3OK.js.map} +0 -0
  122. /package/dist/{config-5KMP3FRP.js.map → config-U5HHXO56.js.map} +0 -0
  123. /package/dist/{context-VPRXOV4W.js.map → context-5XAWTXIF.js.map} +0 -0
  124. /package/dist/{conversationPersistence-66W5Z6AO.js.map → conversationPersistence-COKR4DJM.js.map} +0 -0
  125. /package/dist/{conversationTracker-FTAS67VE.js.map → conversationTracker-CFWPAQJQ.js.map} +0 -0
  126. /package/dist/{customCommands-YQ2A3R6L.js.map → customCommands-KV4SPPEJ.js.map} +0 -0
  127. /package/dist/{env-BDTFUU2H.js.map → env-6Z2X4SGO.js.map} +0 -0
  128. /package/dist/{file-N4UK3JJK.js.map → file-EYJLYMU7.js.map} +0 -0
  129. /package/dist/{llm-QTECZGRE.js.map → llm-JRNCNUVN.js.map} +0 -0
  130. /package/dist/{llmLazy-5OLIOZK2.js.map → llmLazy-ULKOVGTW.js.map} +0 -0
  131. /package/dist/{loader-ITDKGIKQ.js.map → loader-YC2J4JQD.js.map} +0 -0
  132. /package/dist/{lsp-DNNS2MO4.js.map → lsp-YOU3CXAU.js.map} +0 -0
  133. /package/dist/{lspAnchor-HU2YPGDN.js.map → lspAnchor-XLKJXJ4F.js.map} +0 -0
  134. /package/dist/{mcp-5R4HG2LZ.js.map → mcp-ZBXWPPEQ.js.map} +0 -0
  135. /package/dist/{mentionProcessor-5DPHU4OP.js.map → mentionProcessor-D7A5SR2F.js.map} +0 -0
  136. /package/dist/{messages-ZVVMQ3Q6.js.map → messages-N4BMW6FO.js.map} +0 -0
  137. /package/dist/{model-Q3NJN5MQ.js.map → model-3R63GBXV.js.map} +0 -0
  138. /package/dist/{openai-HSEUQEKK.js.map → openai-OE2BXCWW.js.map} +0 -0
  139. /package/dist/{outputStyles-YGD3BAAK.js.map → outputStyles-7NXCPWAM.js.map} +0 -0
  140. /package/dist/{pluginRuntime-ODOQDPAK.js.map → pluginRuntime-DUFKGBKI.js.map} +0 -0
  141. /package/dist/{pluginValidation-P52JWV6C.js.map → pluginValidation-TUI4RWTL.js.map} +0 -0
  142. /package/dist/{prompts-VWZICAZT.js.map → prompts-VLIUTRIV.js.map} +0 -0
  143. /package/dist/{pybAgentSessionLoad-B735OKRY.js.map → pybAgentSessionLoad-OHCESID3.js.map} +0 -0
  144. /package/dist/{pybAgentSessionResume-YKCKQOJO.js.map → pybAgentSessionResume-X7TO6VQ7.js.map} +0 -0
  145. /package/dist/{pybAgentStreamJsonSession-7KQJH3YL.js.map → pybAgentStreamJsonSession-3XCK4MLN.js.map} +0 -0
  146. /package/dist/{pybHooks-27O2F24J.js.map → pybHooks-WGTXY2KQ.js.map} +0 -0
  147. /package/dist/{query-YW4M2CLS.js.map → query-Y332XP4J.js.map} +0 -0
  148. /package/dist/{registry-CJLUFMEQ.js.map → registry-V4XMLWYT.js.map} +0 -0
  149. /package/dist/{ripgrep-TD77KYER.js.map → ripgrep-ITNB4VGR.js.map} +0 -0
  150. /package/dist/{skillMarketplace-R475NBXV.js.map → skillMarketplace-YYMKIEEM.js.map} +0 -0
  151. /package/dist/{state-KQVHDJY3.js.map → state-ZQW77MQC.js.map} +0 -0
  152. /package/dist/{theme-GDAAXHZV.js.map → theme-L3I3PP7H.js.map} +0 -0
  153. /package/dist/{toolPermissionSettings-ZTEGC7CB.js.map → toolPermissionSettings-ZHMSXSXS.js.map} +0 -0
  154. /package/dist/{tools-4WVDBE5W.js.map → tools-CM5X3TT5.js.map} +0 -0
  155. /package/dist/{userInput-7HR7YK3T.js.map → userInput-VSYAOPNU.js.map} +0 -0
@@ -2,17 +2,17 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  loadPybAgentSessionMessages
5
- } from "./chunk-KUKOMPLF.js";
5
+ } from "./chunk-OT7EHZKB.js";
6
6
  import {
7
7
  appendSessionCustomTitleRecord,
8
8
  appendSessionJsonlFromMessage,
9
9
  appendSessionTagRecord,
10
10
  listPybAgentSessions
11
- } from "./chunk-BSCFLD7U.js";
11
+ } from "./chunk-V633SD3K.js";
12
12
  import {
13
13
  formatValidationResult,
14
14
  validatePluginOrMarketplacePath
15
- } from "./chunk-R6A5OQPH.js";
15
+ } from "./chunk-7OKEXFNZ.js";
16
16
  import {
17
17
  ConversationTracker,
18
18
  appendFinishState,
@@ -20,10 +20,10 @@ import {
20
20
  getConversationTrackerForContext,
21
21
  isFinishComplete,
22
22
  mapFinishReason
23
- } from "./chunk-DIOS332Y.js";
23
+ } from "./chunk-XRHL3B3W.js";
24
24
  import {
25
25
  FileSystemConversationPersistence
26
- } from "./chunk-KDPYN5HT.js";
26
+ } from "./chunk-EPTONOB3.js";
27
27
  import {
28
28
  beginReplSessionScope
29
29
  } from "./chunk-F4AXICO7.js";
@@ -38,7 +38,7 @@ import {
38
38
  runStopHooks,
39
39
  runUserPromptSubmitHooks,
40
40
  updateHookTranscriptForMessages
41
- } from "./chunk-U5OB3CDM.js";
41
+ } from "./chunk-V6B67TTT.js";
42
42
  import {
43
43
  DEFAULT_OUTPUT_STYLE,
44
44
  getAvailableOutputStyles,
@@ -47,11 +47,11 @@ import {
47
47
  getOutputStyleSystemPromptAdditions,
48
48
  resolveOutputStyleName,
49
49
  setCurrentOutputStyle
50
- } from "./chunk-PZBMEC3T.js";
50
+ } from "./chunk-AIKGRPJR.js";
51
51
  import {
52
52
  fetchCustomModels,
53
53
  getModelFeatures
54
- } from "./chunk-KPDYWSAZ.js";
54
+ } from "./chunk-X7L2ZXEQ.js";
55
55
  import {
56
56
  getCurrentSessionId,
57
57
  getSessionState
@@ -60,13 +60,30 @@ import {
60
60
  queryLLM,
61
61
  queryQuick,
62
62
  verifyApiKey
63
- } from "./chunk-KYMBYUI7.js";
63
+ } from "./chunk-ZYI3GZHI.js";
64
64
  import {
65
65
  DEFAULT_TIMEOUT_MS,
66
+ DESCRIPTION,
67
+ DESCRIPTION2,
68
+ DESCRIPTION3,
69
+ DESCRIPTION4,
70
+ DESCRIPTION5,
71
+ DESCRIPTION6,
66
72
  FallbackToolUseRejectedMessage,
67
73
  MAX_OUTPUT_LENGTH,
68
74
  MCPTool,
69
75
  OutputLine,
76
+ PROMPT,
77
+ PROMPT2,
78
+ PROMPT3,
79
+ TOOL_NAME,
80
+ TOOL_NAME2,
81
+ TOOL_NAME3,
82
+ TOOL_NAME4,
83
+ TOOL_NAME5,
84
+ TOOL_NAME6,
85
+ TOOL_NAME7,
86
+ TOOL_NAME8,
70
87
  getBashToolPrompt,
71
88
  getClients,
72
89
  getMCPCommands,
@@ -75,7 +92,7 @@ import {
75
92
  listMCPServers,
76
93
  loadMergedSettings,
77
94
  normalizeSandboxRuntimeConfigFromSettings
78
- } from "./chunk-LSDHJWLA.js";
95
+ } from "./chunk-UEF22EAA.js";
79
96
  import {
80
97
  addMarketplace,
81
98
  disableSkillPlugin,
@@ -88,11 +105,11 @@ import {
88
105
  refreshMarketplaceAsync,
89
106
  removeMarketplace,
90
107
  uninstallSkillPlugin
91
- } from "./chunk-ASMQWQTY.js";
108
+ } from "./chunk-3OA76CSA.js";
92
109
  import {
93
110
  loadToolPermissionContextFromDisk,
94
111
  persistToolPermissionUpdateToDisk
95
- } from "./chunk-LA6C74RB.js";
112
+ } from "./chunk-F4IOWWDV.js";
96
113
  import {
97
114
  applyToolPermissionContextUpdate,
98
115
  applyToolPermissionContextUpdates,
@@ -103,14 +120,14 @@ import {
103
120
  generateSystemReminders,
104
121
  resetReminderSession,
105
122
  systemReminderService
106
- } from "./chunk-VP62JPGI.js";
123
+ } from "./chunk-SCZBEZ4L.js";
107
124
  import {
108
125
  clearAgentCache,
109
126
  getActiveAgents,
110
127
  getAgentByType,
111
128
  getAllAgents,
112
129
  getAvailableAgentTypes
113
- } from "./chunk-2GQH5CH7.js";
130
+ } from "./chunk-TBPXZUAE.js";
114
131
  import {
115
132
  API_ERROR_MESSAGE_PREFIX,
116
133
  CANCEL_MESSAGE,
@@ -145,7 +162,7 @@ import {
145
162
  reorderMessages,
146
163
  resetAutoCompactTelemetry,
147
164
  stripSystemMessages
148
- } from "./chunk-IOSFLDRK.js";
165
+ } from "./chunk-XGSD7RT6.js";
149
166
  import {
150
167
  getRequestStatus,
151
168
  setRequestStatus,
@@ -177,17 +194,13 @@ import {
177
194
  normalizeFilePath,
178
195
  readTextContent,
179
196
  writeTextContent
180
- } from "./chunk-WEXG5Q5B.js";
197
+ } from "./chunk-NRGFDG57.js";
181
198
  import {
182
199
  parseBlockEdits
183
200
  } from "./chunk-QWIBSCDN.js";
184
201
  import {
185
202
  toLspToolFallbackEvent
186
203
  } from "./chunk-2RXKUCFS.js";
187
- import {
188
- emitTelemetryEvent,
189
- registerTelemetryListener
190
- } from "./chunk-TFHFYID3.js";
191
204
  import {
192
205
  LspAPI,
193
206
  LspFacade,
@@ -195,18 +208,22 @@ import {
195
208
  formatDiagnosticsPretty,
196
209
  initParser,
197
210
  loadLanguage
198
- } from "./chunk-AVQJBO3X.js";
211
+ } from "./chunk-SQL5Q5UT.js";
212
+ import {
213
+ emitTelemetryEvent,
214
+ registerTelemetryListener
215
+ } from "./chunk-TFHFYID3.js";
199
216
  import {
200
217
  getSettingsFileCandidates,
201
218
  loadSettingsWithLegacyFallback,
202
219
  readSettingsFile
203
- } from "./chunk-J2NQVO6G.js";
220
+ } from "./chunk-JJNZ7WEP.js";
204
221
  import {
205
222
  getCustomCommandDirectories,
206
223
  hasCustomCommands,
207
224
  loadCustomCommands,
208
225
  reloadCustomCommands
209
- } from "./chunk-ATYJA674.js";
226
+ } from "./chunk-KH3BWQJI.js";
210
227
  import {
211
228
  getSessionPlugins
212
229
  } from "./chunk-BJSWTHRM.js";
@@ -215,7 +232,7 @@ import {
215
232
  buildModelProfileKey,
216
233
  getModelManager,
217
234
  isDefaultSlowAndCapableModel
218
- } from "./chunk-Q3ND7MXY.js";
235
+ } from "./chunk-KSDMNPM3.js";
219
236
  import {
220
237
  getCodeStyle,
221
238
  getContext,
@@ -223,16 +240,16 @@ import {
223
240
  getIsGit,
224
241
  getProjectDocs,
225
242
  getProjectStructureStatisticsBlock
226
- } from "./chunk-QIWBL65U.js";
243
+ } from "./chunk-E5CC5UGF.js";
227
244
  import {
228
245
  getRipgrepPath,
229
246
  getRipgrepPolicyMode,
230
247
  resolveRipgrepPolicy,
231
248
  ripGrep
232
- } from "./chunk-5BASSS5Y.js";
249
+ } from "./chunk-VII5ABW7.js";
233
250
  import {
234
251
  getTheme
235
- } from "./chunk-4K3MGWZ7.js";
252
+ } from "./chunk-AKDLTQJZ.js";
236
253
  import {
237
254
  DEFAULT_GLOBAL_CONFIG,
238
255
  enableConfigs,
@@ -245,7 +262,7 @@ import {
245
262
  saveGlobalConfig,
246
263
  setAllPointersToModel,
247
264
  setModelPointer
248
- } from "./chunk-C2NMYFPN.js";
265
+ } from "./chunk-NYRCQC7E.js";
249
266
  import {
250
267
  AbortError
251
268
  } from "./chunk-RQVLBMP7.js";
@@ -254,7 +271,7 @@ import {
254
271
  getCurrentRequest,
255
272
  logUserFriendly,
256
273
  markPhase
257
- } from "./chunk-HHGV6WKI.js";
274
+ } from "./chunk-I33HG6MZ.js";
258
275
  import {
259
276
  ASCII_LOGO,
260
277
  BunShell,
@@ -298,10 +315,10 @@ import {
298
315
  setCwd,
299
316
  shouldApplyToolOutputTruncation,
300
317
  truncateToolOutput
301
- } from "./chunk-J2UQWSDT.js";
318
+ } from "./chunk-ZBUV2OFZ.js";
302
319
  import {
303
320
  MACRO
304
- } from "./chunk-DS6COGYF.js";
321
+ } from "./chunk-ALMRZ6TK.js";
305
322
  import {
306
323
  __export
307
324
  } from "./chunk-I3J4JYES.js";
@@ -482,7 +499,7 @@ var getCommandSubcommandPrefix = memoize(
482
499
  var getCommandPrefix = memoize(
483
500
  async (command4, abortSignal) => {
484
501
  const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
485
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-QTECZGRE.js");
502
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-JRNCNUVN.js");
486
503
  const response = await queryQuick2({
487
504
  systemPrompt,
488
505
  userPrompt,
@@ -4284,7 +4301,7 @@ function formatParseError(error) {
4284
4301
  return error instanceof Error ? error.message : String(error);
4285
4302
  }
4286
4303
  async function defaultGateQuery(args) {
4287
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-QTECZGRE.js");
4304
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-JRNCNUVN.js");
4288
4305
  const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
4289
4306
  const messages = [
4290
4307
  {
@@ -4678,8 +4695,8 @@ function Cost({ costUSD, durationMs, debug: debug2 }) {
4678
4695
  }
4679
4696
 
4680
4697
  // src/tools/network/WebFetchTool/prompt.ts
4681
- var TOOL_NAME_FOR_PROMPT = "WebFetch";
4682
- var PROMPT = `
4698
+ var TOOL_NAME9 = "WebFetch";
4699
+ var PROMPT4 = `
4683
4700
  - Fetches content from a specified URL
4684
4701
  - Takes a URL and optional prompt/format as input
4685
4702
  - Fetches the URL content, converts HTML to the requested format
@@ -5098,7 +5115,7 @@ async function fetchWithRedirectDetection(url2, signal, connectTimeoutMs) {
5098
5115
  }
5099
5116
  }
5100
5117
  var WebFetchTool = {
5101
- name: TOOL_NAME_FOR_PROMPT,
5118
+ name: TOOL_NAME9,
5102
5119
  async description(input) {
5103
5120
  const url2 = input?.url;
5104
5121
  try {
@@ -5118,7 +5135,7 @@ var WebFetchTool = {
5118
5135
  return true;
5119
5136
  },
5120
5137
  async prompt() {
5121
- return PROMPT;
5138
+ return PROMPT4;
5122
5139
  },
5123
5140
  async validateInput({ url: url2 }) {
5124
5141
  if (url2.length > MAX_URL_LENGTH) {
@@ -6120,8 +6137,9 @@ function HighlightedCode({ code, language }) {
6120
6137
  }
6121
6138
 
6122
6139
  // src/tools/filesystem/NotebookEditTool/prompt.ts
6123
- var DESCRIPTION = "Replace the contents of a specific cell in a Jupyter notebook.";
6124
- var PROMPT2 = `Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.
6140
+ var TOOL_NAME10 = "NotebookEdit";
6141
+ var DESCRIPTION7 = "Replace the contents of a specific cell in a Jupyter notebook.";
6142
+ var PROMPT5 = `Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.
6125
6143
  `.trim();
6126
6144
 
6127
6145
  // src/utils/permissions/filesystem.ts
@@ -6233,12 +6251,12 @@ var inputSchema2 = z2.strictObject({
6233
6251
  )
6234
6252
  });
6235
6253
  var NotebookEditTool = {
6236
- name: "NotebookEdit",
6254
+ name: TOOL_NAME10,
6237
6255
  async description() {
6238
- return DESCRIPTION;
6256
+ return DESCRIPTION7;
6239
6257
  },
6240
6258
  async prompt() {
6241
- return PROMPT2;
6259
+ return PROMPT5;
6242
6260
  },
6243
6261
  inputSchema: inputSchema2,
6244
6262
  userFacingName() {
@@ -6455,71 +6473,6 @@ var NotebookEditTool = {
6455
6473
  }
6456
6474
  };
6457
6475
 
6458
- // src/tools/filesystem/FileEditTool/prompt.ts
6459
- var DESCRIPTION2 = `Performs smart string replacements in files using SEARCH/REPLACE blocks.
6460
-
6461
- Usage:
6462
- 1. **Read First**: You must use your \`Read\` tool at least once before editing.
6463
- 2. **Block Format**: Provide changes as one or more SEARCH/REPLACE blocks.
6464
- \`\`\`
6465
- <<<<<<< SEARCH
6466
- [original code to replace]
6467
- =======
6468
- [new code to insert]
6469
- >>>>>>> REPLACE
6470
- \`\`\`
6471
- 3. **Multiple Edits**: You can provide multiple blocks in a single turn to perform batch edits.
6472
- 4. **Context**: Include enough surrounding lines in the SEARCH block to ensure uniqueness.
6473
- 5. **Indentation**: Preserve the exact indentation (tabs/spaces) of the original file in your SEARCH block.
6474
- 6. **Smart Matching**: The tool uses a fuzzy matching engine. It can locate code even if there are minor differences in whitespace or indentation.
6475
- 7. **Conditional Edit**: Use \`if_not_contains\` to skip the edit if the file already contains a specific string.
6476
- 8. **Thinking**: You can include "thinking" text between blocks; the tool will ignore it.
6477
-
6478
- ## LSP-Integrated Behavior
6479
- - **Semantic Anchor Assist**: Before fuzzy replacement, Edit tries LSP anchor matching to narrow replacement to the most relevant symbol range.
6480
- - **When It Helps**: Especially useful when the same snippet appears multiple times and plain text matching may hit the wrong block.
6481
- - **Fallback**: If LSP anchor is unavailable, Edit falls back to normal SEARCH/REPLACE matching.
6482
- - **Post-Edit Verification**: Set \`verify: true\` to run LSP diagnostics after applying edits.
6483
- - **Verification Guardrail**: If syntax/type diagnostics contain errors after edit, Edit reverts changes and returns a verification failure.
6484
- - **When LSP Is Unavailable**: You may receive verification unavailable; retry with \`verify: false\` only when you have high confidence in edit safety.
6485
-
6486
- Notes:
6487
- - The edit will FAIL if the SEARCH block matches multiple locations(ambiguous). Provide more context.
6488
- - To delete code, leave the REPLACE section empty.
6489
- - To create a new file, use an empty SEARCH block with the desired content in REPLACE.
6490
- - ALWAYS prefer editing existing files. NEVER write new files unless explicitly required.
6491
- - For Jupyter Notebooks (.ipynb), use the NotebookEditTool instead.
6492
-
6493
- ## Typical Usage Examples
6494
- ### Example 1: Ambiguous Duplicate Snippet with LSP Anchor
6495
- <example>
6496
- user: Update the constructor guard in UserService, not the test helper copy
6497
- assistant: [uses Read on UserService file to confirm target block]
6498
- [uses Edit with SEARCH/REPLACE block and verify=true]
6499
- [relies on LSP anchor assist to prefer semantic symbol region when duplicate text exists]
6500
- <reasoning>
6501
- The assistant enabled semantic-safe editing because:
6502
- 1. Duplicate snippets can cause ambiguous fuzzy matches
6503
- 2. LSP anchor narrows replacement to the intended symbol scope
6504
- 3. verify=true adds post-edit diagnostics guardrail and auto-revert on syntax errors
6505
- </reasoning>
6506
- </example>
6507
-
6508
- ### Example 2: Verification-Unavailable Recovery
6509
- <example>
6510
- user: Apply this quick rename in a generated file
6511
- assistant: [uses Read to confirm exact path and block]
6512
- [uses Edit with verify=true]
6513
- [if response says verification unavailable, retries with verify=false and tighter SEARCH context]
6514
- <reasoning>
6515
- The assistant keeps verification first, then degrades safely because:
6516
- 1. LSP verification is preferred for correctness
6517
- 2. Generated or unsupported files may not have active LSP diagnostics
6518
- 3. Retrying with verify=false is acceptable only after narrowing context
6519
- </reasoning>
6520
- </example>
6521
- `.trim();
6522
-
6523
6476
  // src/utils/terminal/paste.ts
6524
6477
  function normalizeLineEndings(text) {
6525
6478
  return text.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
@@ -6581,6 +6534,139 @@ function getPatch({
6581
6534
  }));
6582
6535
  }
6583
6536
 
6537
+ // src/tools/utils/lspFallbackHandler.ts
6538
+ function inferQuality(source) {
6539
+ if (source === "lsp" || source === "hybrid") return "full";
6540
+ if (source === "tree-sitter") return "partial";
6541
+ return "minimal";
6542
+ }
6543
+ function inferConfidence(source) {
6544
+ if (source === "lsp" || source === "hybrid" || source === "tree-sitter") return "high";
6545
+ if (source === "token-scan") return "low";
6546
+ return "low";
6547
+ }
6548
+ function inferSourceFromFormatted(formatted) {
6549
+ const text = String(formatted ?? "").toLowerCase();
6550
+ if (text.includes("no lsp server available") || text.includes("unable to initialize lsp")) {
6551
+ return "none";
6552
+ }
6553
+ if (text.includes("token scan")) return "token-scan";
6554
+ if (text.includes("tree-sitter")) return "tree-sitter";
6555
+ return "lsp";
6556
+ }
6557
+ function inferReason(input) {
6558
+ if (input.fallbackReason) return input.fallbackReason;
6559
+ const text = String(input.formatted ?? "").toLowerCase();
6560
+ if (text.includes("no lsp server available") || text.includes("unable to initialize lsp")) {
6561
+ return "lsp-unavailable";
6562
+ }
6563
+ return "unknown";
6564
+ }
6565
+ function normalizeLspFallbackEvidence(input) {
6566
+ const source = input.source ?? inferSourceFromFormatted(input.formatted);
6567
+ const quality = input.quality ?? inferQuality(source);
6568
+ const confidence = input.confidence ?? inferConfidence(source);
6569
+ return {
6570
+ source,
6571
+ quality,
6572
+ confidence,
6573
+ reason: inferReason(input),
6574
+ suggestion: input.fallbackSuggestion
6575
+ };
6576
+ }
6577
+ function buildMessage(action, severity, evidence) {
6578
+ return `lspFallbackHandler action=${action} severity=${severity} source=${evidence.source} quality=${evidence.quality} confidence=${evidence.confidence} reason=${evidence.reason}`;
6579
+ }
6580
+ function decideLspFallbackAction(input) {
6581
+ const { risk, evidence, verifyMode = false, allowForce = false } = input;
6582
+ if (risk === "high") {
6583
+ if (evidence.source === "none") {
6584
+ return {
6585
+ action: "block",
6586
+ severity: "strong",
6587
+ message: buildMessage("block", "strong", evidence),
6588
+ evidence
6589
+ };
6590
+ }
6591
+ if (verifyMode && evidence.quality === "minimal") {
6592
+ return {
6593
+ action: "block",
6594
+ severity: "strong",
6595
+ message: buildMessage("block", "strong", evidence),
6596
+ evidence
6597
+ };
6598
+ }
6599
+ if (evidence.source === "token-scan" && evidence.quality === "minimal") {
6600
+ if (!allowForce) {
6601
+ return {
6602
+ action: "block",
6603
+ severity: "strong",
6604
+ message: buildMessage("block", "strong", evidence),
6605
+ evidence
6606
+ };
6607
+ }
6608
+ return {
6609
+ action: "warn",
6610
+ severity: "strong",
6611
+ message: buildMessage("warn", "strong", evidence),
6612
+ evidence
6613
+ };
6614
+ }
6615
+ if (evidence.source === "tree-sitter" && evidence.quality === "partial") {
6616
+ return {
6617
+ action: "warn",
6618
+ severity: "normal",
6619
+ message: buildMessage("warn", "normal", evidence),
6620
+ evidence
6621
+ };
6622
+ }
6623
+ return {
6624
+ action: "pass",
6625
+ severity: "note",
6626
+ message: buildMessage("pass", "note", evidence),
6627
+ evidence
6628
+ };
6629
+ }
6630
+ if (risk === "medium") {
6631
+ if (evidence.source === "none" || evidence.quality === "minimal") {
6632
+ return {
6633
+ action: "warn",
6634
+ severity: "strong",
6635
+ message: buildMessage("warn", "strong", evidence),
6636
+ evidence
6637
+ };
6638
+ }
6639
+ if (evidence.source === "tree-sitter" || evidence.source === "token-scan") {
6640
+ return {
6641
+ action: "warn",
6642
+ severity: "normal",
6643
+ message: buildMessage("warn", "normal", evidence),
6644
+ evidence
6645
+ };
6646
+ }
6647
+ return {
6648
+ action: "pass",
6649
+ severity: "note",
6650
+ message: buildMessage("pass", "note", evidence),
6651
+ evidence
6652
+ };
6653
+ }
6654
+ if (evidence.source === "none" || evidence.quality === "minimal") {
6655
+ return {
6656
+ action: "warn",
6657
+ severity: "note",
6658
+ message: buildMessage("warn", "note", evidence),
6659
+ evidence
6660
+ };
6661
+ }
6662
+ return {
6663
+ action: "pass",
6664
+ severity: "note",
6665
+ message: buildMessage("pass", "note", evidence),
6666
+ evidence
6667
+ };
6668
+ }
6669
+
6584
6670
  // src/tools/filesystem/FileEditTool/FileEditTool.tsx
6585
6671
  var inputSchema3 = z3.strictObject({
6586
6672
  file_path: z3.string().describe("The absolute path to the file to modify"),
@@ -6591,7 +6677,7 @@ var inputSchema3 = z3.strictObject({
6591
6677
  )
6592
6678
  });
6593
6679
  var FileEditTool = {
6594
- name: "Edit",
6680
+ name: TOOL_NAME2,
6595
6681
  async description() {
6596
6682
  return "A tool for editing files using SEARCH/REPLACE blocks";
6597
6683
  },
@@ -6714,7 +6800,7 @@ var FileEditTool = {
6714
6800
  const originalFileContent = currentFileContent;
6715
6801
  let totalPatch = [];
6716
6802
  const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
6717
- const { findLspAnchor } = await import("./lspAnchor-HU2YPGDN.js");
6803
+ const { findLspAnchor } = await import("./lspAnchor-XLKJXJ4F.js");
6718
6804
  for (const op of editOperations) {
6719
6805
  const normalizedSearch = normalizeLineEndings(op.search);
6720
6806
  const normalizedReplace = normalizeLineEndings(op.replace);
@@ -6764,7 +6850,24 @@ ${op.search}`);
6764
6850
  timeoutMs: 5e3,
6765
6851
  rootPath: getSessionRoot()
6766
6852
  });
6853
+ const fallbackDecision = decideLspFallbackAction({
6854
+ risk: "high",
6855
+ verifyMode: true,
6856
+ evidence: normalizeLspFallbackEvidence(lspResult)
6857
+ });
6858
+ if (fallbackDecision.action === "block") {
6859
+ writeTextContent(fullFilePath, originalFileContent, enc, endings);
6860
+ if (fallbackDecision.evidence.source === "none") {
6861
+ throw new Error(
6862
+ `Verification Unavailable: Unable to initialize LSP for ${file_path}. source=${fallbackDecision.evidence.source} quality=${fallbackDecision.evidence.quality}. Retry with verify=false or rerun when LSP is available.`
6863
+ );
6864
+ }
6865
+ throw new Error(
6866
+ `Verification Blocked: source=${fallbackDecision.evidence.source} quality=${fallbackDecision.evidence.quality} confidence=${fallbackDecision.evidence.confidence}. Retry with verify=false or rerun with higher-quality LSP evidence.`
6867
+ );
6868
+ }
6767
6869
  if (lspResult.formatted.startsWith("No LSP server available for file type:")) {
6870
+ writeTextContent(fullFilePath, originalFileContent, enc, endings);
6768
6871
  throw new Error(
6769
6872
  `Verification Unavailable: Unable to initialize LSP for ${file_path}. Retry with verify=false or rerun when LSP is available.`
6770
6873
  );
@@ -6822,102 +6925,6 @@ import { extname as extname4, relative as relative6 } from "node:path";
6822
6925
  import * as React13 from "react";
6823
6926
  import { z as z4 } from "zod";
6824
6927
 
6825
- // src/tools/filesystem/FileReadTool/prompt.ts
6826
- var MAX_LINES_TO_READ = 2e3;
6827
- var MAX_LINE_LENGTH = 2e3;
6828
- var DESCRIPTION3 = "Read a file or directory from the local filesystem.";
6829
- var PROMPT3 = `Reads a file or directory from the local filesystem. You can access any file or directory directly by using this tool.Assume this tool is able to read all files on the machine. If the User provides a path to a file assume that path is valid; otherwise, Ensure the path is confirmed by Glob/Grep before reading.
6830
-
6831
- ## Best Practice
6832
- - **Read vs Analyze**: Use this tool when you need to inspect full implementation details.
6833
- - **Workflow**: Locate file (Glob/Grep) -> Read file (FileRead) -> Edit file.
6834
- - **Avoid**: Do not use this to 'search' for code strings; use 'Grep' or 'Glob' for that.
6835
-
6836
- ## When NOT to Use Read Tool
6837
- - **Unverified Paths**: Do NOT read a file if the path was inferred or guessed from context. Always verify the path exists using Glob/Grep first.
6838
- - **Exploration Phase**: When exploring unfamiliar code, do NOT assume file locations. Use Glob/Grep to discover actual paths before reading.
6839
- - It is okay to read a file that does not exist; an error will be returned.
6840
-
6841
- ## Usage Details
6842
- - The file_path parameter must be an absolute path, not a relative path
6843
- - This tool supports both file mode and directory mode
6844
- - In directory mode, offset/limit are 1-based entry pagination and offset>=1 is required
6845
- - In file mode, offset/limit are 1-based line pagination; offset=1 starts from the first line shown in cat -n output
6846
- - By default, file mode reads up to ${MAX_LINES_TO_READ} lines starting from the beginning of the file
6847
- - You can optionally specify a line offset and limit (especially handy for long files). **Smart Truncation is active** only in file mode when \`limit\` is provided and \`symbol_name\` is not provided: if your limit cuts a function or class in the middle, the tool will automatically extend the read range to include the full semantic block (up to 500 extra lines).
6848
- - Smart Truncation is a best-effort semantic boundary repair (Tree-sitter). If semantic parsing fails, Read falls back to the original offset/limit window.
6849
- - symbol_name enables LSP-assisted symbol read: provide an exact symbol name to resolve the symbol range and read that block directly
6850
- - When \`symbol_name\` is provided, Read resolves symbol range via LSP and reads that block directly (offset/limit are ignored for range selection).
6851
- - Use symbol_name only after file path is confirmed and when you need a specific class/function definition; if symbol is missing, unresolved, or LSP is unavailable, fallback to offset/limit or use LspTool for semantic discovery first.
6852
- - Directory mode returns a one-level tree structure using \u251C\u2500\u2500/\u2514\u2500\u2500 and supports pagination continuation hints
6853
- - For large files, iterate in chunks: offset=1 limit=200, then offset=201 limit=200, and so on until the needed region is covered
6854
- - File text truncation is capped at 50KB per result and 2000 lines; 50KB is file text truncation and not a directory access gate
6855
- - Any lines longer than ${MAX_LINE_LENGTH} characters will be truncated
6856
- - Results are returned using cat -n format, with line numbers starting at 1
6857
- - This tool allows reading images (eg PNG, JPG, etc). When reading an image file the contents are presented visually.
6858
- - This tool can read PDF files and return them as document blocks for analysis.
6859
- - This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
6860
- - For wide repository exploration, still prefer Glob first, then use Read for focused file/directory inspection.
6861
- - You can call multiple tools in a single response. It is always better to speculatively read multiple potentially useful files in parallel.
6862
- - You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
6863
- - If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.
6864
-
6865
- ## Typical Usage Examples
6866
- ### Example 1: Exploring Unfamiliar Codebase
6867
- <example>
6868
- user: How does authentication work in this project?
6869
- assistant: [uses Grep tool with pattern="auth|login" to find relevant files]
6870
- [uses Glob tool with pattern="**/auth*.{ts,js}" to locate auth modules]
6871
- [reads the matched files after confirming their paths]
6872
- </example>
6873
-
6874
- ### Example 2: User Mentions a Concept Without Path
6875
- <example>
6876
- user: Check the database configuration
6877
- assistant: [uses Glob tool with pattern="**/config*.{ts,js,json}"]
6878
- [uses Grep tool with pattern="database|db_" to find config files with db settings]
6879
- [reads the confirmed config file]
6880
- </example>
6881
-
6882
- ### Example 3: Read Directory Structure Then Read File
6883
- <example>
6884
- user: Check the API module layout and read router implementation
6885
- assistant: [uses Glob tool with pattern="**/api*"]
6886
- [reads the confirmed api directory path to get one-level tree structure with Read]
6887
- [reads the router file path found in that directory tree]
6888
- </example>
6889
-
6890
- ### Example 4: LSP-Assisted Symbol Read
6891
- <example>
6892
- user: I only need the function that actually executes file reading, not the whole file
6893
- assistant: [uses Glob/Grep to confirm FileReadTool file path]
6894
- [uses Read with file_path="<absolute path>/FileReadTool.tsx" symbol_name="call"]
6895
- [if symbol is missing or unresolved, uses LspTool documentSymbol to discover exact symbol names, then retries]
6896
- [if LSP is unavailable, falls back to offset/limit chunked reads around likely implementation area]
6897
- <reasoning>
6898
- The assistant used symbol_name-based Read because:
6899
- 1. User intent is a specific implementation block, not whole-file browsing
6900
- 2. symbol_name gives precise semantic range selection and avoids noisy context
6901
- 3. LspTool is used only for symbol discovery fallback, while Read remains the code retrieval tool
6902
- </reasoning>
6903
- </example>
6904
-
6905
- ### Example 5: Smart Truncation on Partial Window
6906
- <example>
6907
- user: Please read this file section for me; I do not know where the function ends
6908
- assistant: [uses Read with file_path="<absolute path>/service.ts" offset=120 limit=30]
6909
- [relies on Smart Truncation to auto-extend when the requested window cuts a function/class boundary]
6910
- [checks returned startLine/numLines and continues with adjacent chunks if more context is needed]
6911
- [if semantic parsing fails, falls back to original offset/limit and continues chunked reading]
6912
- <reasoning>
6913
- The assistant used offset/limit Read with Smart Truncation because:
6914
- 1. User asked for a local section without symbol-level knowledge
6915
- 2. Pagination windows can split semantic containers, causing misleading partial code
6916
- 3. Smart Truncation repairs semantic boundaries while preserving pagination workflow
6917
- </reasoning>
6918
- </example>
6919
- `.trim();
6920
-
6921
6928
  // src/utils/fs/secureFile.ts
6922
6929
  import {
6923
6930
  existsSync as existsSync4,
@@ -7552,7 +7559,7 @@ function toSmartTruncationFallbackEvent(input) {
7552
7559
 
7553
7560
  // src/tools/filesystem/FileReadTool/FileReadTool.tsx
7554
7561
  var MAX_LINES_TO_RENDER = 0;
7555
- var MAX_LINE_LENGTH2 = 2e3;
7562
+ var MAX_LINE_LENGTH = 2e3;
7556
7563
  var MAX_TEXT_OUTPUT_BYTES = 50 * 1024;
7557
7564
  var MAX_TEXT_OUTPUT_LINES = 2e3;
7558
7565
  var DIRECTORY_DEFAULT_LIMIT = 200;
@@ -7674,12 +7681,12 @@ var inputSchema4 = z4.strictObject({
7674
7681
  )
7675
7682
  });
7676
7683
  var FileReadTool = {
7677
- name: "Read",
7684
+ name: TOOL_NAME,
7678
7685
  async description() {
7679
- return DESCRIPTION3;
7686
+ return DESCRIPTION;
7680
7687
  },
7681
7688
  async prompt() {
7682
- return PROMPT3;
7689
+ return PROMPT;
7683
7690
  },
7684
7691
  inputSchema: inputSchema4,
7685
7692
  isReadOnly() {
@@ -7963,7 +7970,7 @@ var FileReadTool = {
7963
7970
  finalLimit
7964
7971
  );
7965
7972
  const truncatedLines = content.split(/\r?\n/).map(
7966
- (line) => line.length > MAX_LINE_LENGTH2 ? line.slice(0, MAX_LINE_LENGTH2) : line
7973
+ (line) => line.length > MAX_LINE_LENGTH ? line.slice(0, MAX_LINE_LENGTH) : line
7967
7974
  ).join("\n");
7968
7975
  const textPage = capTextOutput(truncatedLines, {
7969
7976
  startLine,
@@ -8312,19 +8319,6 @@ import { EOL } from "os";
8312
8319
  import { dirname as dirname4, extname as extname5, isAbsolute as isAbsolute5, relative as relative7, resolve as resolve5 } from "path";
8313
8320
  import * as React14 from "react";
8314
8321
  import { z as z5 } from "zod";
8315
-
8316
- // src/tools/filesystem/FileWriteTool/prompt.ts
8317
- var PROMPT4 = `Writes a file to the local filesystem.
8318
-
8319
- Usage:
8320
- - This tool will overwrite the existing file if there is one at the provided path.
8321
- - If this is an existing file, you MUST use the ${FileReadTool.name} tool first to read the file's contents. This tool will fail if you did not read the file first.
8322
- - ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
8323
- - NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.
8324
- - Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.
8325
- `.trim();
8326
-
8327
- // src/tools/filesystem/FileWriteTool/FileWriteTool.tsx
8328
8322
  var MAX_LINES_TO_RENDER2 = 5;
8329
8323
  var MAX_LINES_TO_RENDER_FOR_ASSISTANT = 16e3;
8330
8324
  var TRUNCATED_MESSAGE = "<response clipped><NOTE>To save on context only part of this file has been shown to you. You should retry this tool after you have searched inside the file with Grep in order to find the line numbers of what you are looking for.</NOTE>";
@@ -8335,13 +8329,13 @@ var inputSchema5 = z5.strictObject({
8335
8329
  content: z5.string().describe("The content to write to the file")
8336
8330
  });
8337
8331
  var FileWriteTool = {
8338
- name: "Write",
8332
+ name: TOOL_NAME3,
8339
8333
  async description() {
8340
- return "Write a file to the local filesystem.";
8334
+ return DESCRIPTION3;
8341
8335
  },
8342
8336
  userFacingName: () => "Write",
8343
8337
  async prompt() {
8344
- return PROMPT4;
8338
+ return PROMPT2;
8345
8339
  },
8346
8340
  inputSchema: inputSchema5,
8347
8341
  async isEnabled() {
@@ -8514,116 +8508,6 @@ ${addLineNumbers({
8514
8508
  import { Box as Box14, Text as Text15 } from "ink";
8515
8509
  import React15 from "react";
8516
8510
  import { z as z6 } from "zod";
8517
-
8518
- // src/tools/filesystem/GlobTool/prompt.ts
8519
- var TOOL_NAME_FOR_PROMPT2 = "Glob";
8520
- var DESCRIPTION4 = `Fast file pattern matching tool that works with any codebase size
8521
-
8522
- ## WhenToUse & Best Practice
8523
- - If you have keywords or fuzzy paths, use Glob first to narrow candidates.
8524
- - When you are doing an open ended search that may require multiple rounds of globbing and grepping, use the Agent tool instead
8525
- - You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.
8526
- - This tool is for FINDING files.
8527
-
8528
- ## Directory Structure Guidance
8529
- - For one-level directory structure, use Read directly on the directory path (offset>=1, optional limit)
8530
- - Use Glob for file-path discovery and candidate narrowing, not as the primary one-level directory listing workflow
8531
-
8532
- ## Search Strategy
8533
- - **Broad-to-Narrow Pattern**: Start with a broad pattern, then narrow based on results.
8534
- - Step 1: Use broad patterns like \`**/*.ts\` or \`src/**/*\` to get an overview
8535
- - Step 2: Analyze results and refine with more specific patterns
8536
- - Example: "\`**/*.test.ts\`" \u2192 too many results \u2192 "src/**/auth*.test.ts"
8537
- - **Pattern Selection Guide**:
8538
- - Unknown structure? Start with \`**/*.{ext}\` to discover layout, then use Read on specific directory paths for one-level structure
8539
- - Looking for specific type? Use descriptive names: \`**/test*\`, \`**/config*\`
8540
- - In a specific area? Combine path + pattern: \`src/auth/**/*.ts\`
8541
- - **Discovery Workflow**: For unfamiliar codebases, run these in parallel:
8542
- - \`**/package.json\`, \`**/*.{ts,js,tsx,jsx}\`, \`**/README*\`, \`**/*config*.{ts,js,json}\`
8543
- - Analyze structure \u2192 refine search \u2192 read key files
8544
- - **Tool Collaboration**:
8545
- - Read \`directory_path\` \u2192 Get one-level directory tree structure
8546
- - Grep \u2192 After Glob finds files, use Grep to search content
8547
- - Read \u2192 Read the found file contents
8548
-
8549
- ## Usage Details
8550
- - Supports glob patterns like "**/*.js" or "src/**/*.ts"
8551
- - Returns absolute file paths sorted by modification time (most recent first)
8552
- - Use this tool when you need to find files by name patterns
8553
- - Powered by ripgrep with \`--files\` mode for fast pattern matching
8554
- - \`path\` parameter: Specify the directory to search in. If omitted, uses the current working directory. IMPORTANT: Omit this field to use the default directory. DO NOT enter "undefined" or "null" - simply omit it for the default behavior. Supports both relative and absolute paths.
8555
- - Results are limited to 100 files by default. If truncated, use a more specific path or pattern to narrow results.
8556
- - Search ignores .gitignore rules and includes hidden files by default.
8557
- - **Empty Results**: When no files are found, try broader patterns (e.g., src/**/*) or verify path exists.
8558
- - **Error Handling**: Returns error if \`path\` does not exist or is not a valid directory.
8559
- - **LSP Semantic Mode**: \`semantic: true\` enables workspace symbol fallback when file globbing returns empty.
8560
- - **Semantic search is opt-in**: Only set \`semantic: true\` when you intentionally want LSP-assisted fallback.
8561
- - Semantic output may include:
8562
- - \`semanticNotice\`: human-readable semantic fallback note
8563
- - \`semanticReason\`: structured reason code (e.g., \`SYMBOLS_ADDED\`, \`NO_SYMBOL_MATCH\`, \`LSP_UNAVAILABLE\`)
8564
- - \`semanticSuggestion\`: suggested next action aligned to reason code
8565
- - **Truncated Results**: When results are truncated (limited to 100 files), narrow down using:
8566
- 1. Add a more specific path: \`src/core/**/*.ts\` instead of \`**/*.ts\`
8567
- 2. Use file extension filter: \`src/**/*.test.ts\` instead of \`src/**/*.ts\`
8568
- 3. Use Read on a specific directory path to confirm one-level structure, then target specific directories with Glob
8569
-
8570
- ## Typical Usage Examples
8571
-
8572
- ### Example 1: Project Structure Discovery (Unknown Codebase)
8573
- <example>
8574
- user: I'm new to this project, what's the structure?
8575
- assistant: [uses Glob tool with pattern="**/package.json" to find project roots]
8576
- [reads the confirmed source directory path to inspect one-level tree structure]
8577
- [uses Glob tool with pattern="**/*.{ts,tsx,js,jsx}" to locate major source areas]
8578
- </example>
8579
-
8580
- ### Example 2: Find Files by Type in Specific Area
8581
- <example>
8582
- user: Find all test files in the auth module
8583
- assistant: [uses Glob tool with pattern="src/auth/**/*.test.ts"]
8584
- [uses Read tool to examine specific test files]
8585
- </example>
8586
-
8587
- ### Example 3: Config File Location (Deterministic)
8588
- <example>
8589
- user: Where is the webpack configuration?
8590
- assistant: [uses Glob tool with pattern="**/webpack*.{js,ts,json}"]
8591
- [uses Read tool on the matched config file]
8592
- </example>
8593
-
8594
- ### Example 4: Parallel Discovery for Entry Points
8595
- <example>
8596
- user: What are the main entry points of this application?
8597
- assistant: [uses Glob tool with pattern="**/index.{ts,js}"]
8598
- [uses Glob tool with pattern="**/main.{ts,js}"]
8599
- [uses Glob tool with pattern="**/app.{ts,js}"]
8600
- [uses Read tool to examine the entry point files]
8601
- </example>
8602
-
8603
- ### Example 5: Narrow Down After Broad Results
8604
- <example>
8605
- user: Find all TypeScript files in the project
8606
- assistant: [uses Glob tool with pattern="**/*.ts" - returns 500+ files, truncated]
8607
- [uses Glob tool with pattern="src/**/*.ts" to focus on source code]
8608
- [uses Glob tool with pattern="src/core/**/*.ts" to narrow further if needed]
8609
- </example>
8610
-
8611
- ### Example 6: Semantic Fallback for Unknown File Path
8612
- <example>
8613
- user: Find where AuthService is implemented, I do not know the file name
8614
- assistant: [uses Glob tool with pattern="**/*AuthService*" semantic=false first]
8615
- [if no files found, retries with semantic=true]
8616
- [reads semanticReason and semanticSuggestion to decide next step]
8617
- <reasoning>
8618
- The assistant switches to semantic mode because:
8619
- 1. Filename-based glob failed and user intent is symbol-oriented
8620
- 2. semantic=true allows LSP workspace symbols to recover likely file paths
8621
- 3. semanticReason + semanticSuggestion provide explicit fallback diagnostics
8622
- </reasoning>
8623
- </example>
8624
- `.trim();
8625
-
8626
- // src/tools/filesystem/GlobTool/GlobTool.tsx
8627
8511
  import { existsSync as existsSync6, statSync as statSync9 } from "fs";
8628
8512
  import { isAbsolute as isAbsolute6, join as join5, relative as relative8, resolve as resolve6 } from "path";
8629
8513
  import { fileURLToPath as fileURLToPath2 } from "url";
@@ -8671,7 +8555,7 @@ var inputSchema6 = z6.strictObject({
8671
8555
  });
8672
8556
  var DEFAULT_LIMIT = 100;
8673
8557
  var GlobTool = {
8674
- name: TOOL_NAME_FOR_PROMPT2,
8558
+ name: TOOL_NAME4,
8675
8559
  async description() {
8676
8560
  return DESCRIPTION4;
8677
8561
  },
@@ -8825,130 +8709,6 @@ import React16 from "react";
8825
8709
  import { existsSync as existsSync7 } from "fs";
8826
8710
  import { stat as statAsync } from "fs/promises";
8827
8711
  import { z as z7 } from "zod";
8828
-
8829
- // src/tools/search/GrepTool/prompt.ts
8830
- var TOOL_NAME_FOR_PROMPT3 = "Grep";
8831
- var DESCRIPTION5 = `A powerful fast content search tool that works with any codebase size
8832
-
8833
- ## Best Practice
8834
- - Use Grep as a "Scout" to *find* entry points based on text patterns.
8835
- - STEP 1: Search for a unique string (e.g., error message, URL route, specific variable name).
8836
- - STEP 2: Once you get a match (File + Line Number), STOP grepping.
8837
- - STEP 3: Use Read to get the exact line + character, then call LspTool for definition or references.
8838
- - AVOID: Do not use Grep to trace execution flow (e.g., searching for "functionName" manually). Use LSP for that.
8839
- - Hotspot strategy: narrow the path scope first, then paginate or refine the search; after truncation, focus on high-signal directories to avoid full-repo scans.
8840
-
8841
- ## Search Strategy
8842
- - **Pattern Refinement Workflow**:
8843
- - Start broad: simple keyword first, observe results
8844
- - Narrow down: add constraints (type, glob, path) if too many matches
8845
- - Switch mode: \`files_with_matches\` for discovery, \`content\` for details
8846
- - **From Vague Intent to Precise Pattern**:
8847
- - "How does auth work?" \u2192 Start with Grep("auth", type="ts") \u2192 Analyze results \u2192 Refine pattern
8848
- - "Find the API endpoints" \u2192 Grep("router|route|endpoint", type="ts") \u2192 Read key files
8849
- - "Where is this error from?" \u2192 Grep(exact error message) \u2192 Trace back to source
8850
- - **Iterative Narrowing**:
8851
- - Too many results? Add \`glob\`, \`type\`, or narrower \`path\`
8852
- - No results? Broaden pattern, try case-insensitive (\`-i\`), or try alternative keywords
8853
- - Wrong results? Adjust pattern, check regex syntax, try alternative keywords
8854
- - **Tool Collaboration**:
8855
- - Read "directory_path" \u2192 Confirm one-level directory structure for search scope
8856
- - Glob "file_path" \u2192 Confirm file path existence
8857
- - Read \u2192 Read specific content of matched files
8858
- - LspTool \u2192 Trace definitions and references (replace manual Grep tracing)
8859
-
8860
- ## Usage Details
8861
- - 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.
8862
- - Powered by ripgrep for fast text search with full regex support (e.g., "log.*Error", "function\\s+\\w+")
8863
- - Pattern syntax: Uses ripgrep - literal braces need escaping (use \`interface\\{\\}\` to find \`interface{}\` in Go code)
8864
- - Excludes version control directories (.git, .svn, .hg, .bzr) automatically
8865
- - Includes hidden files by default
8866
-
8867
- **Path & Scope**:
8868
- - \`path\` parameter: File or directory to search in. Defaults to current working directory.
8869
- - \`glob\` parameter: Filter files by glob pattern (e.g., "*.js", "*.{ts,tsx}") - maps to rg --glob
8870
- - \`type\` parameter: Filter by file type (e.g., "js", "py", "rust", "go", "java") - more efficient than glob for standard types
8871
- - Path guidance: If user provides a path, use it directly. If uncertain, confirm with Glob first.
8872
-
8873
- **Output Modes**:
8874
- - \`files_with_matches\` (default): Returns file paths sorted by modification time
8875
- - \`content\`: Shows matching lines with line numbers (supports -A/-B/-C context)
8876
- - \`count\`: Shows match counts per file
8877
-
8878
- **Context & Pagination**:
8879
- - \`-B\`, \`-A\`, \`-C\`: Context lines before/after/around matches (requires output_mode: "content")
8880
- - \`-n\`: Show line numbers (default: true, requires output_mode: "content")
8881
- - \`head_limit\`: Limit output to first N entries (works across all modes)
8882
- - \`offset\`: Skip first N entries before applying head_limit
8883
- - \`multiline\`: Enable multiline mode where . matches newlines (default: false)
8884
-
8885
- **Case Sensitivity**:
8886
- - \`-i\`: Enable case-insensitive search
8887
-
8888
- **Result Handling**:
8889
- - Results are truncated at 20,000 characters if too large
8890
- - Use Task tool for open-ended searches requiring multiple rounds
8891
- - **Semantic Fallback** (\`semantic: true\`): when text grep has no hit (or \`symbol_type\` is provided), Grep can query LSP workspace symbols.
8892
- - Semantic-enhanced outputs may include:
8893
- - \`semanticNotice\`: fallback summary
8894
- - \`semanticReason\`: structured reason code (e.g., \`SYMBOLS_ADDED\`, \`NO_SYMBOL_MATCH\`, \`LSP_UNAVAILABLE\`)
8895
- - \`semanticSuggestion\`: suggested next action by reason code
8896
- - Keep deterministic workflow: text search first, semantic fallback second.
8897
-
8898
- **Typical Usage Examples**:
8899
-
8900
- Example 1: Exact Error Message Tracing (Deterministic)
8901
- <example>
8902
- user: Where does the error "Connection timeout after 30s" come from?
8903
- assistant: [uses Grep tool with pattern="Connection timeout after 30s"output_mode="content"]
8904
- [uses Read tool to examine the error source and surrounding context]
8905
- </example>
8906
-
8907
- Example 2: Precise Function Definition Lookup (Deterministic)
8908
- <example>
8909
- user: Find the implementation of \`calculateCompoundInterest\` function
8910
- assistant: [uses Grep tool with pattern="calculateCompoundInterest" type="ts"output_mode="content"]
8911
- [uses Read tool on the matched file to read the full implementation]
8912
- </example>
8913
-
8914
- Example 3: Iterative Narrowing for Broad Patterns
8915
- <example>
8916
- user: Find all API route definitions
8917
- assistant: [uses Grep tool with pattern="router\\.(get|post|put|delete)" type="ts"]
8918
- [if too many results: adds path="src/routes" to narrow scope]
8919
- [uses Read tool to inspect specific route handlers]
8920
- </example>
8921
-
8922
- Example 4: Handoff to LSP After Entry Point Found
8923
- <example>
8924
- user: Find all usages of the \`PaymentService\` class
8925
- assistant: [uses Grep tool with pattern="class PaymentService" type="ts"output_mode="content"]
8926
- [uses LSP findReferences at the class definition location to get all references]
8927
- </example>
8928
-
8929
- Example 5: Case-Insensitive Search for Config Values
8930
- <example>
8931
- user: Where is the database host configured?
8932
- assistant: [uses Grep tool with pattern="database.*host|db_host|DB_HOST" -i: true]
8933
- [uses Read tool to examine configuration files]
8934
- </example>
8935
-
8936
- Example 6: Semantic Fallback with Structured Reason
8937
- <example>
8938
- user: Find usages of PaymentSrvce (name might be misspelled)
8939
- assistant: [uses Grep tool with pattern="PaymentSrvce" output_mode="files_with_matches"]
8940
- [if no hit, retries with semantic=true]
8941
- [uses semanticReason and semanticSuggestion to decide whether to broaden query or switch to LspTool]
8942
- <reasoning>
8943
- The assistant uses semantic fallback because:
8944
- 1. Text grep may miss typo-tolerant symbol matches
8945
- 2. LSP workspace symbols can recover intended semantic targets
8946
- 3. Structured reason fields make fallback outcomes explicit and actionable
8947
- </reasoning>
8948
- </example>
8949
- `.trim();
8950
-
8951
- // src/tools/search/GrepTool/GrepTool.tsx
8952
8712
  import { isAbsolute as isAbsolute7, relative as relative9, resolve as resolve7 } from "path";
8953
8713
  import { fileURLToPath as fileURLToPath3 } from "url";
8954
8714
  var inputSchema7 = z7.strictObject({
@@ -9038,7 +8798,7 @@ function parseGlobString(glob) {
9038
8798
  return expanded;
9039
8799
  }
9040
8800
  var GrepTool = {
9041
- name: TOOL_NAME_FOR_PROMPT3,
8801
+ name: TOOL_NAME5,
9042
8802
  async description() {
9043
8803
  return DESCRIPTION5;
9044
8804
  },
@@ -9487,7 +9247,7 @@ var TASK_FORK_CONTEXT_POLICY = [
9487
9247
  ].join("\n");
9488
9248
 
9489
9249
  // src/tools/network/WebSearchTool/prompt.ts
9490
- var TOOL_NAME_FOR_PROMPT4 = "WebSearch";
9250
+ var TOOL_NAME11 = "WebSearch";
9491
9251
  function todayISO() {
9492
9252
  const now = /* @__PURE__ */ new Date();
9493
9253
  const year = now.getFullYear();
@@ -9495,7 +9255,7 @@ function todayISO() {
9495
9255
  const day = String(now.getDate()).padStart(2, "0");
9496
9256
  return `${year}-${month}-${day}`;
9497
9257
  }
9498
- var PROMPT5 = `
9258
+ var PROMPT6 = `
9499
9259
  - Allows the assistant to search the web and use the results to inform responses
9500
9260
  - Provides up-to-date information for current events and recent data
9501
9261
  - Returns search result information formatted as search result blocks, including links as markdown hyperlinks
@@ -9650,7 +9410,7 @@ function resolveWebSearchProvider() {
9650
9410
  };
9651
9411
  }
9652
9412
  var WebSearchTool = {
9653
- name: TOOL_NAME_FOR_PROMPT4,
9413
+ name: TOOL_NAME11,
9654
9414
  async description(input) {
9655
9415
  const query2 = input?.query ?? "";
9656
9416
  return `Requesting web search for: ${query2}`;
@@ -9666,7 +9426,7 @@ var WebSearchTool = {
9666
9426
  return true;
9667
9427
  },
9668
9428
  async prompt() {
9669
- return PROMPT5;
9429
+ return PROMPT6;
9670
9430
  },
9671
9431
  renderToolUseMessage({ query: query2, allowed_domains, blocked_domains }, { verbose }) {
9672
9432
  let summary = `"${query2}"`;
@@ -12642,7 +12402,7 @@ async function createAndStoreApiKey(accessToken) {
12642
12402
  }
12643
12403
  saveGlobalConfig(config2);
12644
12404
  try {
12645
- const { resetAnthropicClient } = await import("./llm-QTECZGRE.js");
12405
+ const { resetAnthropicClient } = await import("./llm-JRNCNUVN.js");
12646
12406
  resetAnthropicClient();
12647
12407
  } catch {
12648
12408
  }
@@ -17066,7 +16826,7 @@ async function refreshPluginRuntimeFromInstalls() {
17066
16826
  const existingRoots = getSessionPlugins().map((p) => p.rootDir);
17067
16827
  const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
17068
16828
  if (dirs.length === 0) return [];
17069
- const { configureSessionPlugins } = await import("./pluginRuntime-ODOQDPAK.js");
16829
+ const { configureSessionPlugins } = await import("./pluginRuntime-DUFKGBKI.js");
17070
16830
  const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
17071
16831
  return errors;
17072
16832
  }
@@ -17741,7 +17501,7 @@ async function call(onDone, context) {
17741
17501
  ModelConfig,
17742
17502
  {
17743
17503
  onClose: () => {
17744
- import("./model-Q3NJN5MQ.js").then(({ reloadModelManager: reloadModelManager2 }) => {
17504
+ import("./model-3R63GBXV.js").then(({ reloadModelManager: reloadModelManager2 }) => {
17745
17505
  reloadModelManager2();
17746
17506
  triggerModelConfigChange();
17747
17507
  onDone();
@@ -27083,25 +26843,10 @@ function getListNumber(listDepth, orderedListNumber) {
27083
26843
  }
27084
26844
  }
27085
26845
 
27086
- // src/tools/ai/AskExpertModelTool/AskExpertModelTool.tsx
27087
- var inputSchema9 = z11.strictObject({
27088
- question: z11.string().describe(
27089
- "COMPLETE SELF-CONTAINED QUESTION: Must include full background context, relevant details, and a clear independent question. The expert model will receive ONLY this content with no access to previous conversation or external context. Structure as: 1) Background/Context 2) Specific situation/problem 3) Clear question. Ensure the expert can fully understand and respond without needing additional information."
27090
- ),
27091
- expert_model: z11.string().describe(
27092
- "The expert model to use (e.g., gpt-5, claude-3-5-sonnet-20241022)"
27093
- ),
27094
- chat_session_id: z11.string().describe(
27095
- 'Chat session ID: use "new" for new session or existing session ID'
27096
- )
27097
- });
27098
- var AskExpertModelTool = {
27099
- name: "AskExpertModel",
27100
- async description() {
27101
- return "Consult external AI models for expert opinions and analysis";
27102
- },
27103
- async prompt() {
27104
- return `Ask a question to a specific external AI model for expert analysis.
26846
+ // src/tools/ai/AskExpertModelTool/prompt.ts
26847
+ var TOOL_NAME12 = "AskExpertModel";
26848
+ var DESCRIPTION8 = "Consult external AI models for expert opinions and analysis";
26849
+ var PROMPT7 = `Ask a question to a specific external AI model for expert analysis.
27105
26850
 
27106
26851
  This tool allows you to consult different AI models for their unique perspectives and expertise.
27107
26852
 
@@ -27112,7 +26857,7 @@ The question MUST be completely self-contained and include:
27112
26857
  3. INDEPENDENT QUESTION - What exactly you want the expert to analyze/answer
27113
26858
 
27114
26859
  The expert model receives ONLY your question content with NO access to:
27115
- - Previous conversation history (unless using existing session)
26860
+ - Previous conversation history (unless using existing session)
27116
26861
  - Current codebase or file context
27117
26862
  - User's current task or project details
27118
26863
 
@@ -27123,7 +26868,7 @@ IMPORTANT: This tool is for asking questions to models, not for task execution.
27123
26868
 
27124
26869
  The expert_model parameter accepts:
27125
26870
  - OpenAI: gpt-4, gpt-5, o1-preview
27126
- - Messages API: claude-3-5-sonnet, claude-3-opus
26871
+ - Messages API: claude-3-5-sonnet, claude-3-opus
27127
26872
  - Others: kimi, gemini-pro, mixtral
27128
26873
 
27129
26874
  Example of well-structured question:
@@ -27132,6 +26877,26 @@ Example of well-structured question:
27132
26877
  Current situation: Users report 3-5 second delays when scrolling through the list. The component re-renders the entire list on every state change.
27133
26878
 
27134
26879
  Question: What are the most effective React optimization techniques for handling large lists, and how should I prioritize implementing virtualization vs memoization vs other approaches?"`;
26880
+
26881
+ // src/tools/ai/AskExpertModelTool/AskExpertModelTool.tsx
26882
+ var inputSchema9 = z11.strictObject({
26883
+ question: z11.string().describe(
26884
+ "COMPLETE SELF-CONTAINED QUESTION: Must include full background context, relevant details, and a clear independent question. The expert model will receive ONLY this content with no access to previous conversation or external context. Structure as: 1) Background/Context 2) Specific situation/problem 3) Clear question. Ensure the expert can fully understand and respond without needing additional information."
26885
+ ),
26886
+ expert_model: z11.string().describe(
26887
+ "The expert model to use (e.g., gpt-5, claude-3-5-sonnet-20241022)"
26888
+ ),
26889
+ chat_session_id: z11.string().describe(
26890
+ 'Chat session ID: use "new" for new session or existing session ID'
26891
+ )
26892
+ });
26893
+ var AskExpertModelTool = {
26894
+ name: TOOL_NAME12,
26895
+ async description() {
26896
+ return DESCRIPTION8;
26897
+ },
26898
+ async prompt() {
26899
+ return PROMPT7;
27135
26900
  },
27136
26901
  isReadOnly() {
27137
26902
  return true;
@@ -27479,9 +27244,9 @@ import { z as z12 } from "zod";
27479
27244
  var BLACK_CIRCLE = env.platform === "macos" ? "\u23FA" : "\u25CF";
27480
27245
 
27481
27246
  // src/tools/interaction/AskUserQuestionTool/prompt.ts
27482
- var TOOL_NAME_FOR_PROMPT5 = "AskUserQuestion";
27483
- var DESCRIPTION6 = "Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.";
27484
- var PROMPT6 = `Use this tool when you need to ask the user questions during execution. This allows you to:
27247
+ var TOOL_NAME13 = "AskUserQuestion";
27248
+ var DESCRIPTION9 = "Asks the user multiple choice questions to gather information, clarify ambiguity, understand preferences, make decisions or offer them choices.";
27249
+ var PROMPT8 = `Use this tool when you need to ask the user questions during execution. This allows you to:
27485
27250
  1. Gather user preferences or requirements
27486
27251
  2. Clarify ambiguous instructions
27487
27252
  3. Get decisions on implementation choices as you work
@@ -27521,9 +27286,9 @@ var inputSchema10 = z12.strictObject({
27521
27286
  }
27522
27287
  );
27523
27288
  var AskUserQuestionTool = {
27524
- name: TOOL_NAME_FOR_PROMPT5,
27289
+ name: TOOL_NAME13,
27525
27290
  async description() {
27526
- return DESCRIPTION6;
27291
+ return DESCRIPTION9;
27527
27292
  },
27528
27293
  userFacingName() {
27529
27294
  return "";
@@ -27545,7 +27310,7 @@ var AskUserQuestionTool = {
27545
27310
  return true;
27546
27311
  },
27547
27312
  async prompt() {
27548
- return PROMPT6;
27313
+ return PROMPT8;
27549
27314
  },
27550
27315
  renderToolUseMessage() {
27551
27316
  return null;
@@ -27690,9 +27455,9 @@ function maybeTruncateVerboseToolOutput(text, options) {
27690
27455
  }
27691
27456
 
27692
27457
  // src/tools/system/TaskOutputTool/prompt.ts
27693
- var TOOL_NAME_FOR_PROMPT6 = "TaskOutput";
27694
- var DESCRIPTION7 = "Retrieves output from a running or completed task";
27695
- var PROMPT7 = `- Retrieves output from a running or completed task (background shell, agent, or remote session)
27458
+ var TOOL_NAME14 = "TaskOutput";
27459
+ var DESCRIPTION10 = "Retrieves output from a running or completed task";
27460
+ var PROMPT9 = `- Retrieves output from a running or completed task (background shell, agent, or remote session)
27696
27461
  - Takes a task_id parameter identifying the task
27697
27462
  - Returns the task output along with status information
27698
27463
  - Use block=true (default) to wait for task completion
@@ -27818,7 +27583,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
27818
27583
  if (exitCode !== 0 || errorCount > 0 || warningCount > 0) {
27819
27584
  try {
27820
27585
  const { isAbsolute: isAbsolute11, resolve: resolve16 } = await import("path");
27821
- const { getSessionRoot: getSessionRoot2 } = await import("./state-KQVHDJY3.js");
27586
+ const { getSessionRoot: getSessionRoot2 } = await import("./state-ZQW77MQC.js");
27822
27587
  const lines = output.split("\n");
27823
27588
  const uniqueFiles = /* @__PURE__ */ new Set();
27824
27589
  const lspSuggestions = [];
@@ -27905,9 +27670,9 @@ async function waitForBashTaskCompletion(args) {
27905
27670
  return buildTaskSummary(taskId);
27906
27671
  }
27907
27672
  var TaskOutputTool = {
27908
- name: TOOL_NAME_FOR_PROMPT6,
27673
+ name: TOOL_NAME14,
27909
27674
  async description() {
27910
- return DESCRIPTION7;
27675
+ return DESCRIPTION10;
27911
27676
  },
27912
27677
  userFacingName() {
27913
27678
  return "Task Output";
@@ -27926,7 +27691,7 @@ var TaskOutputTool = {
27926
27691
  return false;
27927
27692
  },
27928
27693
  async prompt() {
27929
- return PROMPT7;
27694
+ return PROMPT9;
27930
27695
  },
27931
27696
  renderToolUseMessage(input) {
27932
27697
  const normalized = normalizeTaskOutputInput(input);
@@ -28093,7 +27858,8 @@ import { z as z14 } from "zod";
28093
27858
  import { isAbsolute as isAbsolute9, relative as relative11, resolve as resolve10 } from "path";
28094
27859
 
28095
27860
  // src/tools/filesystem/DeleteTool/prompt.ts
28096
- var PROMPT8 = `You can use this tool to delete files (regular file or directory), you can delete multi files in one toolcall, and you MUST make sure the files is exist before deleting.
27861
+ var TOOL_NAME15 = "Delete";
27862
+ var PROMPT10 = `You can use this tool to delete files (regular file or directory), you can delete multi files in one toolcall, and you MUST make sure the files is exist before deleting.
28097
27863
  When you need to delete file, you MUST use this tool to delete file instead of using shell.
28098
27864
 
28099
27865
  Usage:
@@ -28164,13 +27930,13 @@ var inputSchema12 = z14.strictObject({
28164
27930
  )
28165
27931
  });
28166
27932
  var DeleteTool = {
28167
- name: "Delete",
27933
+ name: TOOL_NAME15,
28168
27934
  async description() {
28169
27935
  return "Use this tool to delete files or directories. ALWAYS use this tool instead of running shell commands (like 'rm', 'del') to ensure cross-platform compatibility and safety. Supports deleting multiple paths at once.";
28170
27936
  },
28171
27937
  userFacingName: () => "Delete",
28172
27938
  async prompt() {
28173
- return PROMPT8;
27939
+ return PROMPT10;
28174
27940
  },
28175
27941
  inputSchema: inputSchema12,
28176
27942
  async isEnabled() {
@@ -28219,7 +27985,7 @@ var DeleteTool = {
28219
27985
  }
28220
27986
  if (!force) {
28221
27987
  try {
28222
- const { LspFacade: LspFacade2 } = await import("./lsp-DNNS2MO4.js");
27988
+ const { LspFacade: LspFacade2 } = await import("./lsp-YOU3CXAU.js");
28223
27989
  const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
28224
27990
  if (referenceDetail) {
28225
27991
  failedItems.push(
@@ -28229,8 +27995,20 @@ var DeleteTool = {
28229
27995
  }
28230
27996
  } catch (e) {
28231
27997
  if (!force) {
27998
+ const decision = decideLspFallbackAction({
27999
+ risk: "high",
28000
+ allowForce: Boolean(force),
28001
+ evidence: normalizeLspFallbackEvidence({
28002
+ source: "none",
28003
+ quality: "minimal",
28004
+ confidence: "low",
28005
+ fallbackReason: "lsp-runtime-error",
28006
+ fallbackSuggestion: "Use 'force: true' to override when safety checks are unavailable.",
28007
+ formatted: String(e?.message ?? e)
28008
+ })
28009
+ });
28232
28010
  failedItems.push(
28233
- `${rawPath} (Safety Check Failed: Internal LSP Error. Use 'force: true' to override.)`
28011
+ `${rawPath} (Safety Check Failed: Internal LSP Error. source=${decision.evidence.source} quality=${decision.evidence.quality}. Use 'force: true' to override.)`
28234
28012
  );
28235
28013
  continue;
28236
28014
  }
@@ -28270,9 +28048,9 @@ import React51 from "react";
28270
28048
  import { z as z15 } from "zod";
28271
28049
 
28272
28050
  // src/tools/system/KillShellTool/prompt.ts
28273
- var TOOL_NAME_FOR_PROMPT7 = "KillShell";
28274
- var DESCRIPTION8 = "Kill a background bash shell by ID";
28275
- var PROMPT9 = `
28051
+ var TOOL_NAME16 = "KillShell";
28052
+ var DESCRIPTION11 = "Kill a background bash shell by ID";
28053
+ var PROMPT11 = `
28276
28054
  - Kills a running background bash shell by its ID
28277
28055
  - Takes a shell_id parameter identifying the shell to kill
28278
28056
  - Returns a success or failure status
@@ -28285,9 +28063,9 @@ var inputSchema13 = z15.strictObject({
28285
28063
  shell_id: z15.string().describe("The ID of the background shell to kill")
28286
28064
  });
28287
28065
  var KillShellTool = {
28288
- name: TOOL_NAME_FOR_PROMPT7,
28066
+ name: TOOL_NAME16,
28289
28067
  async description() {
28290
- return DESCRIPTION8;
28068
+ return DESCRIPTION11;
28291
28069
  },
28292
28070
  userFacingName() {
28293
28071
  return "Kill Shell";
@@ -28306,7 +28084,7 @@ var KillShellTool = {
28306
28084
  return false;
28307
28085
  },
28308
28086
  async prompt() {
28309
- return PROMPT9;
28087
+ return PROMPT11;
28310
28088
  },
28311
28089
  renderToolUseMessage({ shell_id }) {
28312
28090
  return `Kill shell: ${shell_id}`;
@@ -28362,14 +28140,14 @@ import { z as z16 } from "zod";
28362
28140
  import { ListResourcesResultSchema } from "@modelcontextprotocol/sdk/types.js";
28363
28141
 
28364
28142
  // src/tools/mcp/ListMcpResourcesTool/prompt.ts
28365
- var TOOL_NAME = "ListMcpResourcesTool";
28366
- var DESCRIPTION9 = `Lists available resources from configured MCP servers.
28143
+ var TOOL_NAME17 = "ListMcpResourcesTool";
28144
+ var DESCRIPTION12 = `Lists available resources from configured MCP servers.
28367
28145
  Each resource object includes a 'server' field indicating which server it's from.
28368
28146
 
28369
28147
  Usage examples:
28370
28148
  - List all resources from all servers: \`listMcpResources\`
28371
28149
  - List resources from a specific server: \`listMcpResources({ server: "myserver" })\``;
28372
- var PROMPT10 = `List available resources from configured MCP servers.
28150
+ var PROMPT12 = `List available resources from configured MCP servers.
28373
28151
  Each returned resource will include all standard MCP resource fields plus a 'server' field
28374
28152
  indicating which server the resource belongs to.
28375
28153
 
@@ -28382,12 +28160,12 @@ var inputSchema14 = z16.strictObject({
28382
28160
  server: z16.string().optional().describe("Optional server name to filter resources by")
28383
28161
  });
28384
28162
  var ListMcpResourcesTool = {
28385
- name: TOOL_NAME,
28163
+ name: TOOL_NAME17,
28386
28164
  async description() {
28387
- return DESCRIPTION9;
28165
+ return DESCRIPTION12;
28388
28166
  },
28389
28167
  async prompt() {
28390
- return PROMPT10;
28168
+ return PROMPT12;
28391
28169
  },
28392
28170
  inputSchema: inputSchema14,
28393
28171
  userFacingName() {
@@ -28479,138 +28257,6 @@ import { Box as Box42, Text as Text46 } from "ink";
28479
28257
  import { relative as relative12, resolve as resolve11 } from "path";
28480
28258
  import React53 from "react";
28481
28259
  import { z as z17 } from "zod";
28482
-
28483
- // src/tools/search/LspTool/prompt.ts
28484
- var TOOL_NAME_FOR_PROMPT8 = "LSP";
28485
- var PROMPT11 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.Supports all languages.
28486
-
28487
- ## Capabilities & Scenarios
28488
- This tool acts as your "Code Analyst". Use it to understand the codebase semantically, rather than just matching text.
28489
-
28490
- ### 1. Tracing Logic (Where does this go?)
28491
- - **Scenario**: You see a function call \`calculateTax(amount)\` and need to know its formula.
28492
- - **Action**: Use \`goToDefinition\` on the function name.
28493
- - **Why**: It jumps directly to the implementation, even if it's imported from another file.
28494
-
28495
- ### 2. Impact Analysis (What uses this?)
28496
- - **Scenario**: You are planning to rename or modify the \`User\` class.
28497
- - **Action**: Use \`findReferences\` at the symbol position (line + character) in the file where \`User\` is declared or used.
28498
- - **Why**: It lists every file and line where \`User\` is referenced, ensuring you don't break dependents.
28499
-
28500
- ### 3. Exploring New Files (What's in here?)
28501
- - **Scenario**: You just opened a large file \`utils.ts\` and want a quick overview.
28502
- - **Action**: Use \`documentSymbol\`.
28503
- - **Why**: It returns a structured outline (Classes, Functions, Variables) using LspFacade policy: LSP-first for accuracy, Tree-Sitter fallback for speed when needed.
28504
-
28505
- ### 4. Interface Implementation (Who implements this?)
28506
- - **Scenario**: You see an interface \`IStorage\` and want to find the concrete class (e.g., \`S3Storage\`).
28507
- - **Action**: Use \`goToImplementation\`.
28508
- - **Why**: Grep might just find the import; LSP finds the actual code that implements the interface.
28509
-
28510
- ### 5. Scope Analysis (What is visible here?)
28511
- - **Scenario**: You are debugging a closure or nested function and want to know which variables are captured or locally defined.
28512
- - **Action**: Use \`getScope\`.
28513
- - **Why**: It returns the local variables and closure captures at the current position. Essential for debugging Python closures or JavaScript lexical scopes.
28514
-
28515
- ### 6. Real-time Diagnostics (Is this correct?)
28516
- - **Scenario**: You just edited a file and want to verify if you introduced any syntax errors.
28517
- - **Action**: Use \`diagnostics\` with \`waitForDiagnostics: true\`.
28518
- - **Why**: It waits for the language server to re-analyze the file and returns fresh errors/warnings. This is your "Self-Correction" mechanism.
28519
-
28520
- ### 7. Workspace Symbol Search (Where is this symbol?)
28521
- - **Scenario**: You need to find a class or function across the entire project.
28522
- - **Action**: Use \`workspaceSymbol\` with a query string and a scoped filePath (module or directory).
28523
- - **Why**: It searches across all files in the scope. **Important**: Must provide a scoped path to avoid unbounded full-repo queries.
28524
-
28525
- ## Supported Operations
28526
-
28527
- ### Location-Based Operations (require line + character)
28528
- These 8 operations require precise symbol position:
28529
- - \`goToDefinition\`: Find where a symbol is defined
28530
- - \`findReferences\`: Find all references to a symbol
28531
- - \`hover\`: Get hover information (documentation, type info) for a symbol
28532
- - \`goToImplementation\`: Find implementations of an interface or abstract method
28533
- - \`prepareCallHierarchy\`: Get call hierarchy item at a position (functions/methods)
28534
- - \`incomingCalls\`: Find all functions/methods that call the function at a position
28535
- - \`outgoingCalls\`: Find all functions/methods called by the function at a position
28536
- - \`getScope\`: Get local variables and closure captures at a position
28537
-
28538
- ### Document-Level Operations (no position required)
28539
- - \`documentSymbol\`: Get all symbols (functions, classes, variables) in a document
28540
- - \`diagnostics\`: Get validation errors and warnings for a file (supports waiting for fresh results)
28541
-
28542
- ### Workspace-Level Operations
28543
- - \`workspaceSymbol\`: Search for symbols across the entire workspace (requires query + scoped filePath)
28544
-
28545
- ## Parameters
28546
-
28547
- All operations require:
28548
- - \`filePath\`: The file or directory to operate on
28549
-
28550
- Location-based operations require:
28551
- - \`line\`: The line number (1-based, as shown in editors)
28552
- - \`character\`: The character offset (1-based, as shown in editors)
28553
-
28554
- \`workspaceSymbol\` requires:
28555
- - \`query\`: The symbol name or keyword to search for
28556
-
28557
- Optional:
28558
- - \`waitForDiagnostics\`: If true, wait for fresh diagnostics (used with "diagnostics" operation)
28559
- - \`timeout\`: Timeout in milliseconds for waiting operations (default: 5000)
28560
-
28561
- ## Intelligent Position Handling
28562
-
28563
- **Do not pass a symbol name.** LSPTool works on positions, not names. Use Read to locate the symbol and derive line + character first.
28564
-
28565
- ### Auto-Adjustment Mechanism
28566
- If the specified position is not on a valid symbol, the tool automatically searches for the nearest valid token:
28567
- - **Search scope**: Current line, then previous line, then next line
28568
- - **Priority**: Current line tokens are preferred (lower score)
28569
- - **Skipped tokens**: Keywords (function, class, if, for, return, etc.) and operators (=, =>, +, -, &&, ||, etc.) are automatically skipped
28570
- - **If no valid token found**: Returns an error message
28571
-
28572
- ### Best Practice for Position
28573
- 1. Use Read to open the file and locate the symbol
28574
- 2. Provide accurate 1-based line and character offset
28575
- 3. Position should be on the symbol name itself, not on keywords/operators
28576
- 4. If unsure, position at the start of the symbol name
28577
-
28578
- ## Workflow & Scope Guidelines
28579
- - **Priority order**: documentSymbol \u2192 hotspot detection \u2192 Read \u2192 LSP (ensure line + character)
28580
- - **workspaceSymbol**: Must provide scoped filePath (module or directory), avoid unbounded full-repo queries
28581
- - **documentSymbol**: Uses LspFacade policy (LSP-first for accuracy, Tree-Sitter fallback for speed)
28582
-
28583
- ## Typical Usage Examples
28584
- ### Example 1: Find Symbol Then Read Precise Block
28585
- <example>
28586
- user: Locate JWT validation implementation quickly
28587
- assistant: [uses LSP workspaceSymbol with query="jwt validate" and scoped filePath]
28588
- [uses Read on the discovered file and then LSP documentSymbol/definition as needed]
28589
- <reasoning>
28590
- The assistant starts semantically because:
28591
- 1. User asks for implementation location, not broad text grep
28592
- 2. workspaceSymbol narrows candidate files efficiently
28593
- 3. Read is then used for exact code extraction once target is known
28594
- </reasoning>
28595
- </example>
28596
-
28597
- ### Example 2: Diagnostics-First Debugging
28598
- <example>
28599
- user: Build failed in api package, tell me real code errors
28600
- assistant: [uses LSP diagnostics with waitForDiagnostics=true on scoped filePath]
28601
- [uses goToDefinition/findReferences for follow-up impact tracing]
28602
- <reasoning>
28603
- The assistant prioritizes diagnostics because:
28604
- 1. Diagnostics provide direct semantic errors from language tooling
28605
- 2. Scoped path avoids unbounded workspace queries
28606
- 3. Follow-up LSP ops can trace root-cause dependencies
28607
- </reasoning>
28608
- </example>
28609
-
28610
- Note: LSP servers are automatically managed and installed for most languages. For system-level languages (like C++, Java), ensure the corresponding tools (clangd, jdtls) are in your PATH.`;
28611
- var DESCRIPTION10 = PROMPT11;
28612
-
28613
- // src/tools/search/LspTool/LspTool.tsx
28614
28260
  var inputSchema15 = z17.strictObject({
28615
28261
  operation: z17.enum([
28616
28262
  "goToDefinition",
@@ -28859,12 +28505,12 @@ function summarizeToolResult(operation, resultCount, fileCount) {
28859
28505
  return /* @__PURE__ */ React53.createElement(Text46, null, "Found ", /* @__PURE__ */ React53.createElement(Text46, { bold: true }, resultCount), " ", noun, fileCount > 1 ? /* @__PURE__ */ React53.createElement(React53.Fragment, null, " ", "across ", /* @__PURE__ */ React53.createElement(Text46, { bold: true }, fileCount), " files") : null);
28860
28506
  }
28861
28507
  var LspTool = {
28862
- name: TOOL_NAME_FOR_PROMPT8,
28508
+ name: TOOL_NAME6,
28863
28509
  async description() {
28864
- return DESCRIPTION10;
28510
+ return DESCRIPTION6;
28865
28511
  },
28866
28512
  async prompt() {
28867
- return PROMPT11;
28513
+ return PROMPT3;
28868
28514
  },
28869
28515
  inputSchema: inputSchema15,
28870
28516
  userFacingName() {
@@ -29076,14 +28722,14 @@ import { z as z18 } from "zod";
29076
28722
  import { ReadResourceResultSchema } from "@modelcontextprotocol/sdk/types.js";
29077
28723
 
29078
28724
  // src/tools/mcp/ReadMcpResourceTool/prompt.ts
29079
- var TOOL_NAME2 = "ReadMcpResourceTool";
29080
- var DESCRIPTION11 = `Reads a specific resource from an MCP server.
28725
+ var TOOL_NAME18 = "ReadMcpResourceTool";
28726
+ var DESCRIPTION13 = `Reads a specific resource from an MCP server.
29081
28727
  - server: The name of the MCP server to read from
29082
28728
  - uri: The URI of the resource to read
29083
28729
 
29084
28730
  Usage examples:
29085
28731
  - Read a resource from a server: \`readMcpResource({ server: "myserver", uri: "my-resource-uri" })\``;
29086
- var PROMPT12 = `Reads a specific resource from an MCP server, identified by server name and resource URI.
28732
+ var PROMPT13 = `Reads a specific resource from an MCP server, identified by server name and resource URI.
29087
28733
 
29088
28734
  Parameters:
29089
28735
  - server (required): The name of the MCP server from which to read the resource
@@ -29095,12 +28741,12 @@ var inputSchema16 = z18.strictObject({
29095
28741
  uri: z18.string().describe("The resource URI to read")
29096
28742
  });
29097
28743
  var ReadMcpResourceTool = {
29098
- name: TOOL_NAME2,
28744
+ name: TOOL_NAME18,
29099
28745
  async description() {
29100
- return DESCRIPTION11;
28746
+ return DESCRIPTION13;
29101
28747
  },
29102
28748
  async prompt() {
29103
- return PROMPT12;
28749
+ return PROMPT13;
29104
28750
  },
29105
28751
  inputSchema: inputSchema16,
29106
28752
  userFacingName() {
@@ -29205,7 +28851,7 @@ import { z as z19 } from "zod";
29205
28851
  import * as React55 from "react";
29206
28852
 
29207
28853
  // src/tools/ai/SkillTool/prompt.ts
29208
- var TOOL_NAME_FOR_PROMPT9 = "Skill";
28854
+ var TOOL_NAME19 = "Skill";
29209
28855
 
29210
28856
  // src/tools/ai/SkillTool/SkillTool.tsx
29211
28857
  var inputSchema17 = z19.strictObject({
@@ -29224,7 +28870,7 @@ function normalizeCommandModelName(model) {
29224
28870
  return trimmed;
29225
28871
  }
29226
28872
  var SkillTool = {
29227
- name: TOOL_NAME_FOR_PROMPT9,
28873
+ name: TOOL_NAME19,
29228
28874
  async description({ skill }) {
29229
28875
  return `Execute skill: ${skill}`;
29230
28876
  },
@@ -29326,7 +28972,7 @@ ${availableSkills}${truncatedNotice}
29326
28972
  if (cmd.disableModelInvocation) {
29327
28973
  return {
29328
28974
  result: false,
29329
- message: `Skill ${skillName} cannot be used with ${TOOL_NAME_FOR_PROMPT9} tool due to disable-model-invocation`,
28975
+ message: `Skill ${skillName} cannot be used with ${TOOL_NAME19} tool due to disable-model-invocation`,
29330
28976
  errorCode: 4
29331
28977
  };
29332
28978
  }
@@ -29349,7 +28995,7 @@ ${availableSkills}${truncatedNotice}
29349
28995
  }
29350
28996
  if (cmd.disableModelInvocation) {
29351
28997
  throw new Error(
29352
- `Skill ${skillName} cannot be used with ${TOOL_NAME_FOR_PROMPT9} tool due to disable-model-invocation`
28998
+ `Skill ${skillName} cannot be used with ${TOOL_NAME19} tool due to disable-model-invocation`
29353
28999
  );
29354
29000
  }
29355
29001
  if (cmd.type !== "prompt") {
@@ -29596,9 +29242,6 @@ assistant: "I'm going to use the Task tool to launch the with the greeting-respo
29596
29242
  </example>`;
29597
29243
  }
29598
29244
 
29599
- // src/tools/agent/TaskTool/constants.ts
29600
- var TOOL_NAME3 = "Task";
29601
-
29602
29245
  // src/tools/agent/TaskTool/TaskTool.tsx
29603
29246
  var inputSchema18 = z20.object({
29604
29247
  description: z20.string().describe("A short (3-5 word) description of the task"),
@@ -29759,7 +29402,7 @@ function buildForkContextForAgent(options) {
29759
29402
  };
29760
29403
  }
29761
29404
  var TaskTool = {
29762
- name: TOOL_NAME3,
29405
+ name: TOOL_NAME7,
29763
29406
  inputSchema: inputSchema18,
29764
29407
  async description() {
29765
29408
  return "Delegate complex, multi-step work to specialized agents";
@@ -30225,8 +29868,9 @@ function createTaskToolError(params) {
30225
29868
  }
30226
29869
 
30227
29870
  // src/tools/interaction/TaskCreateTool/prompt.ts
30228
- var DESCRIPTION12 = "Plan and create tasks for complex multi-step work";
30229
- var PROMPT13 = `Use this tool to create a new task in the current task list. It is the entry point for planning multi-step work.
29871
+ var TOOL_NAME20 = "TaskCreate";
29872
+ var DESCRIPTION14 = "Plan and create tasks for complex multi-step work";
29873
+ var PROMPT14 = `Use this tool to create a new task in the current task list. It is the entry point for planning multi-step work.
30230
29874
 
30231
29875
  ## When to Use This Tool
30232
29876
 
@@ -30587,13 +30231,13 @@ var inputSchema19 = z22.strictObject({
30587
30231
  metadata: metadataSchema.optional()
30588
30232
  });
30589
30233
  var TaskCreateTool = {
30590
- name: "TaskCreate",
30591
- cachedDescription: DESCRIPTION12,
30234
+ name: TOOL_NAME20,
30235
+ cachedDescription: DESCRIPTION14,
30592
30236
  async description() {
30593
- return DESCRIPTION12;
30237
+ return DESCRIPTION14;
30594
30238
  },
30595
30239
  async prompt() {
30596
- return PROMPT13;
30240
+ return PROMPT14;
30597
30241
  },
30598
30242
  inputSchema: inputSchema19,
30599
30243
  userFacingName() {
@@ -30663,8 +30307,9 @@ var TaskCreateTool = {
30663
30307
  import { z as z23 } from "zod";
30664
30308
 
30665
30309
  // src/tools/interaction/TaskGetTool/prompt.ts
30666
- var DESCRIPTION13 = "Review planned task details";
30667
- var PROMPT14 = `Use this tool to fetch a single task by id.
30310
+ var TOOL_NAME21 = "TaskGet";
30311
+ var DESCRIPTION15 = "Review planned task details";
30312
+ var PROMPT15 = `Use this tool to fetch a single task by id.
30668
30313
 
30669
30314
  ## When to Use This Tool
30670
30315
  Use this tool proactively in these scenarios:
@@ -30700,13 +30345,13 @@ var inputSchema20 = z23.strictObject({
30700
30345
  taskId: z23.string().min(1)
30701
30346
  });
30702
30347
  var TaskGetTool = {
30703
- name: "TaskGet",
30704
- cachedDescription: DESCRIPTION13,
30348
+ name: TOOL_NAME21,
30349
+ cachedDescription: DESCRIPTION15,
30705
30350
  async description() {
30706
- return DESCRIPTION13;
30351
+ return DESCRIPTION15;
30707
30352
  },
30708
30353
  async prompt() {
30709
- return PROMPT14;
30354
+ return PROMPT15;
30710
30355
  },
30711
30356
  inputSchema: inputSchema20,
30712
30357
  userFacingName() {
@@ -30762,8 +30407,9 @@ var TaskGetTool = {
30762
30407
  import { z as z24 } from "zod";
30763
30408
 
30764
30409
  // src/tools/interaction/TaskListTool/prompt.ts
30765
- var DESCRIPTION14 = "Review planned tasks, readiness, and blockers";
30766
- var PROMPT15 = `Use this tool to list tasks and understand readiness. It returns ready and blocked groupings to help prioritize work. TaskList only returns id/subject/status/blockedBy for summaries; use TaskGet for details.
30410
+ var TOOL_NAME22 = "TaskList";
30411
+ var DESCRIPTION16 = "Review planned tasks, readiness, and blockers";
30412
+ var PROMPT16 = `Use this tool to list tasks and understand readiness. It returns ready and blocked groupings to help prioritize work. TaskList only returns id/subject/status/blockedBy for summaries; use TaskGet for details.
30767
30413
 
30768
30414
  ## When to Use This Tool
30769
30415
  Use this tool proactively in these scenarios:
@@ -30843,13 +30489,13 @@ var getActiveBlockers = (task, tasksById) => {
30843
30489
  return active2;
30844
30490
  };
30845
30491
  var TaskListTool = {
30846
- name: "TaskList",
30847
- cachedDescription: DESCRIPTION14,
30492
+ name: TOOL_NAME22,
30493
+ cachedDescription: DESCRIPTION16,
30848
30494
  async description() {
30849
- return DESCRIPTION14;
30495
+ return DESCRIPTION16;
30850
30496
  },
30851
30497
  async prompt() {
30852
- return PROMPT15;
30498
+ return PROMPT16;
30853
30499
  },
30854
30500
  inputSchema: inputSchema21,
30855
30501
  userFacingName() {
@@ -30915,8 +30561,9 @@ var TaskListTool = {
30915
30561
  import { z as z25 } from "zod";
30916
30562
 
30917
30563
  // src/tools/interaction/TaskUpdateTool/prompt.ts
30918
- var DESCRIPTION15 = "Manage task progress, status, and dependencies";
30919
- var PROMPT16 = `Use this tool to update an existing task. It is the primary way to track progress and adjust task details.
30564
+ var TOOL_NAME23 = "TaskUpdate";
30565
+ var DESCRIPTION17 = "Manage task progress, status, and dependencies";
30566
+ var PROMPT17 = `Use this tool to update an existing task. It is the primary way to track progress and adjust task details.
30920
30567
 
30921
30568
  ## When to Use This Tool
30922
30569
  Use this tool proactively in these scenarios:
@@ -31367,13 +31014,13 @@ var inputSchema22 = z25.strictObject({
31367
31014
  addBlocks: z25.array(z25.string()).optional()
31368
31015
  });
31369
31016
  var TaskUpdateTool = {
31370
- name: "TaskUpdate",
31371
- cachedDescription: DESCRIPTION15,
31017
+ name: TOOL_NAME23,
31018
+ cachedDescription: DESCRIPTION17,
31372
31019
  async description() {
31373
- return DESCRIPTION15;
31020
+ return DESCRIPTION17;
31374
31021
  },
31375
31022
  async prompt() {
31376
- return PROMPT16;
31023
+ return PROMPT17;
31377
31024
  },
31378
31025
  inputSchema: inputSchema22,
31379
31026
  userFacingName() {
@@ -31642,8 +31289,9 @@ import * as React57 from "react";
31642
31289
  import { z as z26 } from "zod";
31643
31290
 
31644
31291
  // src/tools/memory/MemoryReadTool/prompt.ts
31645
- var DESCRIPTION16 = "Read agent memory files from the local filesystem.";
31646
- var PROMPT17 = `Reads agent memory files from the local filesystem.
31292
+ var TOOL_NAME24 = "MemoryRead";
31293
+ var DESCRIPTION18 = "Read agent memory files from the local filesystem.";
31294
+ var PROMPT18 = `Reads agent memory files from the local filesystem.
31647
31295
 
31648
31296
  Usage:
31649
31297
  - The file_path parameter must be a path relative to the agent's memory directory
@@ -31666,12 +31314,12 @@ var inputSchema23 = z26.strictObject({
31666
31314
  file_path: z26.string().optional().describe("Optional path to a specific memory file to read")
31667
31315
  });
31668
31316
  var MemoryReadTool = {
31669
- name: "MemoryRead",
31317
+ name: TOOL_NAME24,
31670
31318
  async description() {
31671
- return DESCRIPTION16;
31319
+ return DESCRIPTION18;
31672
31320
  },
31673
31321
  async prompt() {
31674
- return PROMPT17;
31322
+ return PROMPT18;
31675
31323
  },
31676
31324
  inputSchema: inputSchema23,
31677
31325
  userFacingName() {
@@ -31819,8 +31467,9 @@ function writeMemoryFile(input, deps) {
31819
31467
  }
31820
31468
 
31821
31469
  // src/tools/memory/MemoryWriteTool/prompt.ts
31822
- var DESCRIPTION17 = "Write agent memory files to the local filesystem.";
31823
- var PROMPT18 = `Write agent memory files to the local filesystem.
31470
+ var TOOL_NAME25 = "MemoryWrite";
31471
+ var DESCRIPTION19 = "Write agent memory files to the local filesystem.";
31472
+ var PROMPT19 = `Write agent memory files to the local filesystem.
31824
31473
 
31825
31474
  Usage:
31826
31475
  - The file_path parameter is required and specifies the memory file to write
@@ -31853,12 +31502,12 @@ var inputSchema24 = z27.strictObject({
31853
31502
  mode: z27.enum(["append", "replace"]).optional().describe("Write mode: append adds to existing content, replace overwrites")
31854
31503
  });
31855
31504
  var MemoryWriteTool = {
31856
- name: "MemoryWrite",
31505
+ name: TOOL_NAME25,
31857
31506
  async description() {
31858
- return DESCRIPTION17;
31507
+ return DESCRIPTION19;
31859
31508
  },
31860
31509
  async prompt() {
31861
- return PROMPT18;
31510
+ return PROMPT19;
31862
31511
  },
31863
31512
  inputSchema: inputSchema24,
31864
31513
  userFacingName() {
@@ -38648,7 +38297,7 @@ function useStatusLine() {
38648
38297
  // src/ui/components/PromptInput.tsx
38649
38298
  async function interpretHashCommand(input) {
38650
38299
  try {
38651
- const { queryQuick: queryQuick2 } = await import("./llm-QTECZGRE.js");
38300
+ const { queryQuick: queryQuick2 } = await import("./llm-JRNCNUVN.js");
38652
38301
  const systemPrompt = [
38653
38302
  "You're helping the user structure notes that will be added to their PYB.md file.",
38654
38303
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -38961,7 +38610,7 @@ function PromptInput({
38961
38610
  if (messages2.length) {
38962
38611
  if (mode === "bash") {
38963
38612
  onQuery(messages2, newAbortController).then(async () => {
38964
- const { getCwd: getCwd2 } = await import("./state-KQVHDJY3.js");
38613
+ const { getCwd: getCwd2 } = await import("./state-ZQW77MQC.js");
38965
38614
  setCurrentPwd(getCwd2());
38966
38615
  });
38967
38616
  } else {
@@ -40591,7 +40240,7 @@ import { homedir as homedir8 } from "os";
40591
40240
  // src/commands/agents/generation.ts
40592
40241
  import { randomUUID as randomUUID9 } from "crypto";
40593
40242
  async function generateAgentWithClaude(prompt) {
40594
- const { queryModel } = await import("./llm-QTECZGRE.js");
40243
+ const { queryModel } = await import("./llm-JRNCNUVN.js");
40595
40244
  const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
40596
40245
 
40597
40246
  Return your response as a JSON object with exactly these fields:
@@ -42271,7 +41920,7 @@ function getCommand(commandName, commands) {
42271
41920
  }
42272
41921
 
42273
41922
  // src/tools/interaction/SlashCommandTool/prompt.ts
42274
- var TOOL_NAME_FOR_PROMPT10 = "SlashCommand";
41923
+ var TOOL_NAME26 = "SlashCommand";
42275
41924
 
42276
41925
  // src/tools/interaction/SlashCommandTool/SlashCommandTool.tsx
42277
41926
  var inputSchema26 = z28.strictObject({
@@ -42293,7 +41942,7 @@ function getCharBudget() {
42293
41942
  return Number.isFinite(raw) && raw > 0 ? raw : 15e3;
42294
41943
  }
42295
41944
  var SlashCommandTool = {
42296
- name: TOOL_NAME_FOR_PROMPT10,
41945
+ name: TOOL_NAME26,
42297
41946
  async description({ command: command4 }) {
42298
41947
  return `Execute slash command: ${command4}`;
42299
41948
  },
@@ -42389,14 +42038,14 @@ ${availableLines}${truncatedNotice}
42389
42038
  if (cmd.disableModelInvocation) {
42390
42039
  return {
42391
42040
  result: false,
42392
- message: `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME_FOR_PROMPT10} tool due to disable-model-invocation`,
42041
+ message: `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME26} tool due to disable-model-invocation`,
42393
42042
  errorCode: 4
42394
42043
  };
42395
42044
  }
42396
42045
  if (cmd.disableNonInteractive) {
42397
42046
  return {
42398
42047
  result: false,
42399
- message: `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME_FOR_PROMPT10} tool because it is non-interactive`,
42048
+ message: `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME26} tool because it is non-interactive`,
42400
42049
  errorCode: 6
42401
42050
  };
42402
42051
  }
@@ -42421,12 +42070,12 @@ ${availableLines}${truncatedNotice}
42421
42070
  }
42422
42071
  if (cmd.disableModelInvocation) {
42423
42072
  throw new Error(
42424
- `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME_FOR_PROMPT10} tool due to disable-model-invocation`
42073
+ `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME26} tool due to disable-model-invocation`
42425
42074
  );
42426
42075
  }
42427
42076
  if (cmd.disableNonInteractive) {
42428
42077
  throw new Error(
42429
- `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME_FOR_PROMPT10} tool because it is non-interactive`
42078
+ `Slash command ${parsed.commandName} cannot be used with ${TOOL_NAME26} tool because it is non-interactive`
42430
42079
  );
42431
42080
  }
42432
42081
  if (cmd.type !== "prompt") {
@@ -43459,7 +43108,7 @@ Output: Create directory 'foo'`
43459
43108
  )
43460
43109
  });
43461
43110
  var BashTool = {
43462
- name: "Bash",
43111
+ name: TOOL_NAME8,
43463
43112
  cachedDescription: "Run shell command",
43464
43113
  async description(input) {
43465
43114
  return input?.description || await getBashToolPrompt();
@@ -44111,12 +43760,12 @@ Task records use subject as the single primary name, with activeForm provided by
44111
43760
  It is critical that you mark tasks as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed.
44112
43761
 
44113
43762
  # Cognitive Safety & Sensing
44114
- 1. **Modification Check**: Before editing, you MUST verify if the change is already present (e.g. use \`grep\` or \`read\`). Do not rely on memory from previous turns.
43763
+ 1. **Modification Check**: Before editing, you MUST verify if the change is already present (e.g. use \`Grep\` or \`Read\`). Do not rely on memory from previous turns.
44115
43764
  2. **Precise Targeting**: For code injection, prefer using LSP to find exact function boundaries, or Read the file to get unique context.
44116
- 3. **Artifact Verification**: After completing a complex task, verify the artifacts (e.g. check if files exist using \`glob\`).
44117
- 4. **LSP Instinct**: Before modifying any code, you MUST first build structure context (structure tree \u2192 hotspot \u2192 Read). Use \`LSP documentSymbol\` or \`LSP goToDefinition\` only when you have a precise position and need to confirm exact range. Do NOT rely on line numbers from \`read_file\` alone as they may be outdated.
43765
+ 3. **Artifact Verification**: After completing a complex task, verify the artifacts (e.g. check if files exist using \`Glob\`).
43766
+ 4. **LSP Instinct**: Before modifying any code, you MUST first build structure context (structure tree \u2192 hotspot \u2192 Read). Use \`LSP documentSymbol\` or \`LSP goToDefinition\` only when you have a precise position and need to confirm exact range. Do NOT rely on line numbers from \`Read\` alone as they may be outdated.
44118
43767
  5. **Atomic Verification**: When editing code, especially in critical or complex files, you should strongly consider setting \`verify: true\` in the \`FileEditTool\`. This enables the tool to automatically detect syntax errors and ROLLBACK changes if they are invalid, preventing you from breaking the build.
44119
- 6. **Semantic Search**: When searching for code concepts (e.g. "AuthLogic", "UserHandler") rather than exact filenames, prefer using \`GlobTool\` with \`semantic: true\`. This leverages LSP to find files by their content definitions.
43768
+ 6. **Semantic Search**: When searching for code concepts (e.g. "AuthLogic", "UserHandler") rather than exact filenames, prefer using \`Glob\` with \`semantic: true\`. This leverages LSP to find files by their content definitions.
44120
43769
  7. **Reference Guard**: Be aware that deleting files might be blocked if they are referenced elsewhere. If the \`DeleteTool\` blocks you, check the references it reports. Only use \`force: true\` if you are refactoring and intentionally removing those references.
44121
43770
 
44122
43771
  # Memory