pybao-cli 1.3.94 → 1.3.96

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 (147) hide show
  1. package/dist/REPL-3MDUSJEZ.js +47 -0
  2. package/dist/{acp-YO2PAWMA.js → acp-CDGDKTAR.js} +29 -29
  3. package/dist/{agentsValidate-7TTIU4KT.js → agentsValidate-IYMRE5LG.js} +7 -7
  4. package/dist/{ask-5AMDD5YY.js → ask-4LHNV4R4.js} +28 -28
  5. package/dist/{autoUpdater-HRKB5GLO.js → autoUpdater-TPKC6D65.js} +3 -3
  6. package/dist/{chunk-CBTQYVYS.js → chunk-3JFULFWL.js} +2 -2
  7. package/dist/{chunk-IITK54RR.js → chunk-3PVEP4U4.js} +1 -1
  8. package/dist/{chunk-FMK7MTHV.js → chunk-5L2EETQJ.js} +4 -4
  9. package/dist/{chunk-ZPC5H6IJ.js → chunk-5VTWQLNR.js} +1 -1
  10. package/dist/{chunk-5BGDWXLH.js → chunk-727F2HY3.js} +1 -1
  11. package/dist/{chunk-4XVE3R25.js → chunk-73GONZCQ.js} +3 -3
  12. package/dist/{chunk-JXFYURRO.js → chunk-7Y77AFB2.js} +1 -1
  13. package/dist/{chunk-JXFYURRO.js.map → chunk-7Y77AFB2.js.map} +1 -1
  14. package/dist/{chunk-PZ3OA5BR.js → chunk-DJUDMCQ5.js} +2 -2
  15. package/dist/{chunk-LO35EMX6.js → chunk-FGXBREV4.js} +28 -11
  16. package/dist/{chunk-LO35EMX6.js.map → chunk-FGXBREV4.js.map} +2 -2
  17. package/dist/{chunk-HBTCER5K.js → chunk-GYGLYCJZ.js} +46 -43
  18. package/dist/chunk-GYGLYCJZ.js.map +7 -0
  19. package/dist/{chunk-6H74XS5Q.js → chunk-ITZQDGXM.js} +1 -1
  20. package/dist/{chunk-5KRDMLJL.js → chunk-JU34VG53.js} +2 -2
  21. package/dist/{chunk-RQ36RHKE.js → chunk-KBN7GGZA.js} +3 -3
  22. package/dist/{chunk-YDROMLPD.js → chunk-LPJBM43C.js} +3 -3
  23. package/dist/{chunk-FILUPMEY.js → chunk-M5W2AQCV.js} +1 -1
  24. package/dist/{chunk-EUMJ67M4.js → chunk-M6BDZ2J7.js} +3 -3
  25. package/dist/{chunk-XNLDOVUX.js → chunk-MEUJXZX4.js} +1 -1
  26. package/dist/{chunk-44LR7MWS.js → chunk-QMVIGC7T.js} +2 -2
  27. package/dist/{chunk-QULJAEPY.js → chunk-UIPGBESH.js} +123 -45
  28. package/dist/chunk-UIPGBESH.js.map +7 -0
  29. package/dist/{chunk-YOF7G7XX.js → chunk-V5FXLNJM.js} +3 -3
  30. package/dist/{chunk-F3T5A5NU.js → chunk-WPZNGB7K.js} +2 -2
  31. package/dist/{chunk-3EWYCNNT.js → chunk-WRJW7UMS.js} +7 -4
  32. package/dist/chunk-WRJW7UMS.js.map +7 -0
  33. package/dist/{chunk-ABLSL3AG.js → chunk-XPNWP37X.js} +4 -4
  34. package/dist/{chunk-ZCLKXEG7.js → chunk-Y3F72GS2.js} +3 -3
  35. package/dist/{chunk-5ABIX6FW.js → chunk-Y4BCCRR6.js} +2 -2
  36. package/dist/{chunk-WDZX6SSG.js → chunk-YI4BSGKF.js} +2 -2
  37. package/dist/{chunk-UBBFZ6OX.js → chunk-YJ7ZJ55K.js} +3 -3
  38. package/dist/{chunk-ERKC3UO6.js → chunk-YNTDPWTX.js} +1 -1
  39. package/dist/{chunk-NIPMKTRR.js → chunk-YY4TWLH3.js} +1 -1
  40. package/dist/{chunk-DLJADBQV.js → chunk-Z6RFZ5P3.js} +3 -3
  41. package/dist/{cli-N7RCYDCS.js → cli-YXT6AQIO.js} +87 -87
  42. package/dist/commands-LF72PS63.js +51 -0
  43. package/dist/{config-EEZDX6VI.js → config-JUTFAFW2.js} +4 -4
  44. package/dist/{context-Z25FQHJI.js → context-FGLASM6E.js} +7 -5
  45. package/dist/{customCommands-TWRUIICC.js → customCommands-5UNMAYKR.js} +4 -4
  46. package/dist/{env-7QZESNLR.js → env-6NBXIUFS.js} +2 -2
  47. package/dist/{file-PQUXWGXR.js → file-B5UIRTC4.js} +4 -4
  48. package/dist/index.js +3 -3
  49. package/dist/{llm-MQWL2SSO.js → llm-WGWBAB2B.js} +29 -29
  50. package/dist/{llmLazy-DXNSPHUD.js → llmLazy-FAEHDJOL.js} +1 -1
  51. package/dist/{loader-Y5RNCE6H.js → loader-MNXIOWAZ.js} +4 -4
  52. package/dist/{lsp-3SEMIS23.js → lsp-G54BCJBO.js} +6 -6
  53. package/dist/{lspAnchor-ROYOONP6.js → lspAnchor-35G5F6VM.js} +6 -6
  54. package/dist/{mcp-PPHLOLOV.js → mcp-SXZ3YXGF.js} +7 -7
  55. package/dist/{mentionProcessor-6KB4Q3TJ.js → mentionProcessor-XW3BLBNG.js} +5 -5
  56. package/dist/{messages-MHTRDHLR.js → messages-4OYH6E76.js} +1 -1
  57. package/dist/{model-BY6Q3JR2.js → model-DDQAVNG6.js} +5 -5
  58. package/dist/{openai-56DGKVIZ.js → openai-3MLL3JND.js} +5 -5
  59. package/dist/{outputStyles-RSJECVSC.js → outputStyles-6TLKSL5P.js} +4 -4
  60. package/dist/{pluginRuntime-MVYLH6Q3.js → pluginRuntime-VYK7YZQ3.js} +6 -6
  61. package/dist/{pluginValidation-X4CTCTPV.js → pluginValidation-GSRDUKT5.js} +6 -6
  62. package/dist/prompts-FR2SWLFP.js +53 -0
  63. package/dist/{pybAgentSessionLoad-JOK7VUDA.js → pybAgentSessionLoad-XE5RJJ4D.js} +4 -4
  64. package/dist/{pybAgentSessionResume-VELQGXDW.js → pybAgentSessionResume-H6OJG3GA.js} +4 -4
  65. package/dist/{pybAgentStreamJsonSession-2VHKL7TH.js → pybAgentStreamJsonSession-RAPI3ENP.js} +1 -1
  66. package/dist/{pybHooks-54FGEFEZ.js → pybHooks-TJRBAWZV.js} +4 -4
  67. package/dist/{query-72MRKEWG.js → query-LNETXB2C.js} +28 -28
  68. package/dist/{registry-VWFL2E45.js → registry-TG3MLYCX.js} +5 -5
  69. package/dist/{ripgrep-TYXUNA37.js → ripgrep-4V44T5UJ.js} +3 -3
  70. package/dist/{skillMarketplace-GMDZPBPT.js → skillMarketplace-OQSNBIUX.js} +3 -3
  71. package/dist/{state-DZAFEODP.js → state-W7NQEACP.js} +2 -2
  72. package/dist/{theme-LB2G2R3D.js → theme-KCKVNWFY.js} +5 -5
  73. package/dist/{toolPermissionSettings-XR4I6DAX.js → toolPermissionSettings-VM363KSR.js} +6 -6
  74. package/dist/tools-S2C7L5QZ.js +52 -0
  75. package/dist/{userInput-TLJ56H7H.js → userInput-MK7IEHYE.js} +30 -30
  76. package/package.json +1 -1
  77. package/dist/REPL-4BSQD6RV.js +0 -47
  78. package/dist/chunk-3EWYCNNT.js.map +0 -7
  79. package/dist/chunk-HBTCER5K.js.map +0 -7
  80. package/dist/chunk-QULJAEPY.js.map +0 -7
  81. package/dist/commands-WOG57ONZ.js +0 -51
  82. package/dist/prompts-2A4JRRYL.js +0 -53
  83. package/dist/tools-JTIN6KWF.js +0 -52
  84. /package/dist/{REPL-4BSQD6RV.js.map → REPL-3MDUSJEZ.js.map} +0 -0
  85. /package/dist/{acp-YO2PAWMA.js.map → acp-CDGDKTAR.js.map} +0 -0
  86. /package/dist/{agentsValidate-7TTIU4KT.js.map → agentsValidate-IYMRE5LG.js.map} +0 -0
  87. /package/dist/{ask-5AMDD5YY.js.map → ask-4LHNV4R4.js.map} +0 -0
  88. /package/dist/{autoUpdater-HRKB5GLO.js.map → autoUpdater-TPKC6D65.js.map} +0 -0
  89. /package/dist/{chunk-CBTQYVYS.js.map → chunk-3JFULFWL.js.map} +0 -0
  90. /package/dist/{chunk-IITK54RR.js.map → chunk-3PVEP4U4.js.map} +0 -0
  91. /package/dist/{chunk-FMK7MTHV.js.map → chunk-5L2EETQJ.js.map} +0 -0
  92. /package/dist/{chunk-ZPC5H6IJ.js.map → chunk-5VTWQLNR.js.map} +0 -0
  93. /package/dist/{chunk-5BGDWXLH.js.map → chunk-727F2HY3.js.map} +0 -0
  94. /package/dist/{chunk-4XVE3R25.js.map → chunk-73GONZCQ.js.map} +0 -0
  95. /package/dist/{chunk-PZ3OA5BR.js.map → chunk-DJUDMCQ5.js.map} +0 -0
  96. /package/dist/{chunk-6H74XS5Q.js.map → chunk-ITZQDGXM.js.map} +0 -0
  97. /package/dist/{chunk-5KRDMLJL.js.map → chunk-JU34VG53.js.map} +0 -0
  98. /package/dist/{chunk-RQ36RHKE.js.map → chunk-KBN7GGZA.js.map} +0 -0
  99. /package/dist/{chunk-YDROMLPD.js.map → chunk-LPJBM43C.js.map} +0 -0
  100. /package/dist/{chunk-FILUPMEY.js.map → chunk-M5W2AQCV.js.map} +0 -0
  101. /package/dist/{chunk-EUMJ67M4.js.map → chunk-M6BDZ2J7.js.map} +0 -0
  102. /package/dist/{chunk-XNLDOVUX.js.map → chunk-MEUJXZX4.js.map} +0 -0
  103. /package/dist/{chunk-44LR7MWS.js.map → chunk-QMVIGC7T.js.map} +0 -0
  104. /package/dist/{chunk-YOF7G7XX.js.map → chunk-V5FXLNJM.js.map} +0 -0
  105. /package/dist/{chunk-F3T5A5NU.js.map → chunk-WPZNGB7K.js.map} +0 -0
  106. /package/dist/{chunk-ABLSL3AG.js.map → chunk-XPNWP37X.js.map} +0 -0
  107. /package/dist/{chunk-ZCLKXEG7.js.map → chunk-Y3F72GS2.js.map} +0 -0
  108. /package/dist/{chunk-5ABIX6FW.js.map → chunk-Y4BCCRR6.js.map} +0 -0
  109. /package/dist/{chunk-WDZX6SSG.js.map → chunk-YI4BSGKF.js.map} +0 -0
  110. /package/dist/{chunk-UBBFZ6OX.js.map → chunk-YJ7ZJ55K.js.map} +0 -0
  111. /package/dist/{chunk-ERKC3UO6.js.map → chunk-YNTDPWTX.js.map} +0 -0
  112. /package/dist/{chunk-NIPMKTRR.js.map → chunk-YY4TWLH3.js.map} +0 -0
  113. /package/dist/{chunk-DLJADBQV.js.map → chunk-Z6RFZ5P3.js.map} +0 -0
  114. /package/dist/{cli-N7RCYDCS.js.map → cli-YXT6AQIO.js.map} +0 -0
  115. /package/dist/{commands-WOG57ONZ.js.map → commands-LF72PS63.js.map} +0 -0
  116. /package/dist/{config-EEZDX6VI.js.map → config-JUTFAFW2.js.map} +0 -0
  117. /package/dist/{context-Z25FQHJI.js.map → context-FGLASM6E.js.map} +0 -0
  118. /package/dist/{customCommands-TWRUIICC.js.map → customCommands-5UNMAYKR.js.map} +0 -0
  119. /package/dist/{env-7QZESNLR.js.map → env-6NBXIUFS.js.map} +0 -0
  120. /package/dist/{file-PQUXWGXR.js.map → file-B5UIRTC4.js.map} +0 -0
  121. /package/dist/{llm-MQWL2SSO.js.map → llm-WGWBAB2B.js.map} +0 -0
  122. /package/dist/{llmLazy-DXNSPHUD.js.map → llmLazy-FAEHDJOL.js.map} +0 -0
  123. /package/dist/{loader-Y5RNCE6H.js.map → loader-MNXIOWAZ.js.map} +0 -0
  124. /package/dist/{lsp-3SEMIS23.js.map → lsp-G54BCJBO.js.map} +0 -0
  125. /package/dist/{lspAnchor-ROYOONP6.js.map → lspAnchor-35G5F6VM.js.map} +0 -0
  126. /package/dist/{mcp-PPHLOLOV.js.map → mcp-SXZ3YXGF.js.map} +0 -0
  127. /package/dist/{mentionProcessor-6KB4Q3TJ.js.map → mentionProcessor-XW3BLBNG.js.map} +0 -0
  128. /package/dist/{messages-MHTRDHLR.js.map → messages-4OYH6E76.js.map} +0 -0
  129. /package/dist/{model-BY6Q3JR2.js.map → model-DDQAVNG6.js.map} +0 -0
  130. /package/dist/{openai-56DGKVIZ.js.map → openai-3MLL3JND.js.map} +0 -0
  131. /package/dist/{outputStyles-RSJECVSC.js.map → outputStyles-6TLKSL5P.js.map} +0 -0
  132. /package/dist/{pluginRuntime-MVYLH6Q3.js.map → pluginRuntime-VYK7YZQ3.js.map} +0 -0
  133. /package/dist/{pluginValidation-X4CTCTPV.js.map → pluginValidation-GSRDUKT5.js.map} +0 -0
  134. /package/dist/{prompts-2A4JRRYL.js.map → prompts-FR2SWLFP.js.map} +0 -0
  135. /package/dist/{pybAgentSessionLoad-JOK7VUDA.js.map → pybAgentSessionLoad-XE5RJJ4D.js.map} +0 -0
  136. /package/dist/{pybAgentSessionResume-VELQGXDW.js.map → pybAgentSessionResume-H6OJG3GA.js.map} +0 -0
  137. /package/dist/{pybAgentStreamJsonSession-2VHKL7TH.js.map → pybAgentStreamJsonSession-RAPI3ENP.js.map} +0 -0
  138. /package/dist/{pybHooks-54FGEFEZ.js.map → pybHooks-TJRBAWZV.js.map} +0 -0
  139. /package/dist/{query-72MRKEWG.js.map → query-LNETXB2C.js.map} +0 -0
  140. /package/dist/{registry-VWFL2E45.js.map → registry-TG3MLYCX.js.map} +0 -0
  141. /package/dist/{ripgrep-TYXUNA37.js.map → ripgrep-4V44T5UJ.js.map} +0 -0
  142. /package/dist/{skillMarketplace-GMDZPBPT.js.map → skillMarketplace-OQSNBIUX.js.map} +0 -0
  143. /package/dist/{state-DZAFEODP.js.map → state-W7NQEACP.js.map} +0 -0
  144. /package/dist/{theme-LB2G2R3D.js.map → theme-KCKVNWFY.js.map} +0 -0
  145. /package/dist/{toolPermissionSettings-XR4I6DAX.js.map → toolPermissionSettings-VM363KSR.js.map} +0 -0
  146. /package/dist/{tools-JTIN6KWF.js.map → tools-S2C7L5QZ.js.map} +0 -0
  147. /package/dist/{userInput-TLJ56H7H.js.map → userInput-MK7IEHYE.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  getCwd,
6
6
  resolveXdgCachePath,
7
7
  resolveXdgDataPath
8
- } from "./chunk-NIPMKTRR.js";
8
+ } from "./chunk-YY4TWLH3.js";
9
9
 
10
10
  // src/services/plugins/skillMarketplace.ts
11
11
  import {
@@ -7,14 +7,14 @@ import {
7
7
  getSettingsFileCandidates,
8
8
  loadSettingsWithLegacyFallback,
9
9
  saveSettingsToPrimaryAndSyncLegacy
10
- } from "./chunk-IITK54RR.js";
10
+ } from "./chunk-3PVEP4U4.js";
11
11
  import {
12
12
  getSessionPlugins
13
13
  } from "./chunk-BJSWTHRM.js";
14
14
  import {
15
15
  getCwd,
16
16
  getXdgConfigDir
17
- } from "./chunk-NIPMKTRR.js";
17
+ } from "./chunk-YY4TWLH3.js";
18
18
 
19
19
  // src/services/ui/outputStyles.ts
20
20
  import figures from "figures";
@@ -2,13 +2,13 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  MarketplaceManifestSchema
5
- } from "./chunk-6H74XS5Q.js";
5
+ } from "./chunk-ITZQDGXM.js";
6
6
  import {
7
7
  parseFrontmatter
8
- } from "./chunk-F3T5A5NU.js";
8
+ } from "./chunk-WPZNGB7K.js";
9
9
  import {
10
10
  getCwd
11
- } from "./chunk-NIPMKTRR.js";
11
+ } from "./chunk-YY4TWLH3.js";
12
12
 
13
13
  // src/services/plugins/pluginValidation.ts
14
14
  import { existsSync, lstatSync, readFileSync } from "node:fs";
@@ -4,13 +4,13 @@ import {
4
4
  LspServerRegistry,
5
5
  findNearestRoot,
6
6
  getInstallNotices
7
- } from "./chunk-UBBFZ6OX.js";
7
+ } from "./chunk-YJ7ZJ55K.js";
8
8
  import {
9
9
  levenshtein
10
10
  } from "./chunk-UZ34JEUK.js";
11
11
  import {
12
12
  getCwd
13
- } from "./chunk-NIPMKTRR.js";
13
+ } from "./chunk-YY4TWLH3.js";
14
14
 
15
15
  // src/lsp/index.ts
16
16
  import { extname as extname2 } from "path";
@@ -529,7 +529,7 @@ var LspClientManager = class _LspClientManager {
529
529
  const safeCwd = /[^\x00-\x7F]/.test(resolvedRoot) ? process.cwd() : resolvedRoot;
530
530
  let initOpts = serverInfo.initializationOptions;
531
531
  if (serverInfo.id === "pyright" || serverInfo.id === "ty") {
532
- const { detectPythonVenv } = await import("./registry-VWFL2E45.js");
532
+ const { detectPythonVenv } = await import("./registry-TG3MLYCX.js");
533
533
  const pythonPath = detectPythonVenv(resolvedRoot);
534
534
  if (pythonPath) {
535
535
  initOpts = { ...initOpts ?? {}, pythonPath };
@@ -3,7 +3,7 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  SESSION_ID,
5
5
  resolveXdgCachePath
6
- } from "./chunk-NIPMKTRR.js";
6
+ } from "./chunk-YY4TWLH3.js";
7
7
 
8
8
  // src/utils/log/debugLogger.ts
9
9
  import { existsSync, mkdirSync, appendFileSync } from "fs";
@@ -8,14 +8,14 @@ import {
8
8
  getSettingsFileCandidates,
9
9
  loadSettingsWithLegacyFallback,
10
10
  saveSettingsToPrimaryAndSyncLegacy
11
- } from "./chunk-IITK54RR.js";
11
+ } from "./chunk-3PVEP4U4.js";
12
12
  import {
13
13
  getCurrentProjectConfig
14
- } from "./chunk-YOF7G7XX.js";
14
+ } from "./chunk-V5FXLNJM.js";
15
15
  import {
16
16
  getCwd,
17
17
  logError
18
- } from "./chunk-NIPMKTRR.js";
18
+ } from "./chunk-YY4TWLH3.js";
19
19
 
20
20
  // src/utils/permissions/toolPermissionSettings.ts
21
21
  function uniqueStrings(value) {
@@ -2,7 +2,7 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getGlobalConfig
5
- } from "./chunk-YOF7G7XX.js";
5
+ } from "./chunk-V5FXLNJM.js";
6
6
 
7
7
  // src/utils/theme/index.ts
8
8
  var lightTheme = {
@@ -8,12 +8,12 @@ import {
8
8
  } from "./chunk-BJSWTHRM.js";
9
9
  import {
10
10
  debug
11
- } from "./chunk-FILUPMEY.js";
11
+ } from "./chunk-M5W2AQCV.js";
12
12
  import {
13
13
  getCwd,
14
14
  getXdgConfigDir,
15
15
  logError
16
- } from "./chunk-NIPMKTRR.js";
16
+ } from "./chunk-YY4TWLH3.js";
17
17
 
18
18
  // src/utils/agent/loader.ts
19
19
  import {
@@ -25,61 +25,62 @@ import {
25
25
  hasReadPermission,
26
26
  hasWritePermission,
27
27
  query
28
- } from "./chunk-HBTCER5K.js";
28
+ } from "./chunk-GYGLYCJZ.js";
29
29
  import {
30
30
  getHookTranscriptPath,
31
31
  queueHookAdditionalContexts,
32
32
  queueHookSystemMessages,
33
33
  runPostToolUseHooks,
34
34
  runPreToolUseHooks
35
- } from "./chunk-ZCLKXEG7.js";
35
+ } from "./chunk-Y3F72GS2.js";
36
36
  import {
37
37
  queryLLM
38
- } from "./chunk-ABLSL3AG.js";
38
+ } from "./chunk-XPNWP37X.js";
39
39
  import {
40
40
  FallbackToolUseRejectedMessage,
41
41
  MCPTool,
42
42
  getClients,
43
43
  getMCPTools
44
- } from "./chunk-FMK7MTHV.js";
44
+ } from "./chunk-5L2EETQJ.js";
45
45
  import {
46
46
  generateAgentId
47
- } from "./chunk-WDZX6SSG.js";
47
+ } from "./chunk-YI4BSGKF.js";
48
48
  import {
49
49
  getActiveAgents,
50
50
  getAgentByType,
51
51
  getAvailableAgentTypes
52
- } from "./chunk-44LR7MWS.js";
52
+ } from "./chunk-QMVIGC7T.js";
53
53
  import {
54
54
  INTERRUPT_MESSAGE,
55
55
  createAssistantMessage,
56
56
  createUserMessage,
57
57
  getLastAssistantMessageId
58
- } from "./chunk-ZPC5H6IJ.js";
58
+ } from "./chunk-5VTWQLNR.js";
59
59
  import {
60
60
  getAbsolutePath
61
- } from "./chunk-5ABIX6FW.js";
61
+ } from "./chunk-Y4BCCRR6.js";
62
62
  import {
63
63
  filesToTree,
64
64
  ripGrepWithStatus
65
- } from "./chunk-3EWYCNNT.js";
65
+ } from "./chunk-WRJW7UMS.js";
66
66
  import {
67
67
  LspAPI,
68
68
  LspFacade,
69
69
  formatDiagnosticsPretty
70
- } from "./chunk-YDROMLPD.js";
70
+ } from "./chunk-LPJBM43C.js";
71
71
  import {
72
72
  getModelManager
73
- } from "./chunk-4XVE3R25.js";
73
+ } from "./chunk-73GONZCQ.js";
74
74
  import {
75
- getContext
76
- } from "./chunk-LO35EMX6.js";
75
+ getContext,
76
+ renderTopLevelTree
77
+ } from "./chunk-FGXBREV4.js";
77
78
  import {
78
79
  getTheme
79
- } from "./chunk-XNLDOVUX.js";
80
+ } from "./chunk-MEUJXZX4.js";
80
81
  import {
81
82
  debug
82
- } from "./chunk-FILUPMEY.js";
83
+ } from "./chunk-M5W2AQCV.js";
83
84
  import {
84
85
  BunShell,
85
86
  getCwd,
@@ -89,7 +90,7 @@ import {
89
90
  overwriteLog,
90
91
  readTaskOutput,
91
92
  resolveXdgDataPath
92
- } from "./chunk-NIPMKTRR.js";
93
+ } from "./chunk-YY4TWLH3.js";
93
94
  import {
94
95
  formatDuration,
95
96
  formatNumber
@@ -588,6 +589,7 @@ Rules:
588
589
  Input format:
589
590
  {
590
591
  "tool_calls": [
592
+ { "tool": "LS", "parameters": { "path": "D:/repo/docs" } },
591
593
  { "tool": "Read", "parameters": { "file_path": "/abs/path.txt" } },
592
594
  { "tool": "Grep", "parameters": { "pattern": "foo" } }
593
595
  ]
@@ -1221,7 +1223,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
1221
1223
  if (exitCode !== 0) {
1222
1224
  try {
1223
1225
  const { isAbsolute: isAbsolute3, resolve: resolve4 } = await import("path");
1224
- const { getCwd: getCwd2 } = await import("./state-DZAFEODP.js");
1226
+ const { getCwd: getCwd2 } = await import("./state-W7NQEACP.js");
1225
1227
  const lines = output.split("\n");
1226
1228
  const uniqueFiles = /* @__PURE__ */ new Set();
1227
1229
  const lspSuggestions = [];
@@ -1579,7 +1581,7 @@ var DeleteTool = {
1579
1581
  }
1580
1582
  if (!force) {
1581
1583
  try {
1582
- const { LspFacade: LspFacade2 } = await import("./lsp-3SEMIS23.js");
1584
+ const { LspFacade: LspFacade2 } = await import("./lsp-G54BCJBO.js");
1583
1585
  const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
1584
1586
  if (referenceDetail) {
1585
1587
  failedItems.push(
@@ -1745,34 +1747,85 @@ var ListMcpResourcesTool = {
1745
1747
  // src/tools/search/lsTool/lsTool.tsx
1746
1748
  import { Box as Box6, Text as Text6 } from "ink";
1747
1749
  import { isAbsolute as isAbsolute2, relative as relative2, resolve as resolve2, sep as sep2 } from "path";
1750
+ import { readdirSync } from "fs";
1748
1751
  import * as React6 from "react";
1749
1752
  import { z as z6 } from "zod";
1750
- import { minimatch } from "minimatch";
1751
1753
 
1752
1754
  // src/tools/search/lsTool/prompt.ts
1753
- var DESCRIPTION4 = `Lists files and directories in a given path. The path parameter must be absolute; omit it to use the current workspace directory. You can optionally provide an array of glob patterns to ignore with the ignore parameter. You should generally prefer the Glob and Grep tools if you know which directories to search.`;
1755
+ var DESCRIPTION4 = `Lists files and directories as a breadth-first tree with minimal metadata.`;
1754
1756
  var PROMPT5 = `
1755
1757
  Usage:
1756
- 1. **Scope**: Use LS for a quick snapshot of a directory.
1757
- 2. **Ignore Rules**: Use \`ignore\` to exclude noisy paths and reduce output size.
1758
- 3. **Metadata Lines**: \`[LS META]\` includes \`count\` and \`truncated\`.
1759
- 4. **Truncation**: If \`truncated=true\`, treat the output as partial.
1758
+ 1. **Structure First**: Use LS to understand the repository layout quickly or build a verifiable index tree before any matching or searching.
1759
+ 3. **Ignore Rules**: Use \`ignore\` to exclude noisy paths and reduce output size.
1760
+ 4. **Metadata Lines**: \`[LS META]\` includes \`count\` and \`truncated\`.
1761
+ 5. **Truncation**: If \`truncated=true\`, treat the output as partial and only use it as a navigation hint.
1762
+ 6. **Layered Confirmation**: When truncated, use the top-level supplement + Glob to confirm paths before Grep/Read.
1760
1763
 
1761
1764
  Notes:
1762
- - The path parameter must be absolute; omit it to use the current workspace directory.
1763
- - You can provide an array of glob patterns to ignore with the ignore parameter.
1764
- - You should generally prefer the Glob and Grep tools if you know which directories to search.
1765
+ - First step when exploring and analyzing a new project.
1766
+ - When you need a reliable view of the structure.
1767
+ - When you feel lost in the file system.
1768
+ - The path parameter must be absolute.
1765
1769
  `.trim();
1766
1770
 
1767
1771
  // src/tools/search/lsTool/lsTool.tsx
1768
- var MAX_FILES_LIMIT = 100;
1772
+ var MAX_FILES_LIMIT = 1500;
1773
+ var TOP_LEVEL_LIMIT = 2e3;
1774
+ var TOP_LEVEL_HEADER = "TOP-LEVEL DIRECTORY STRUCTURE (non-recursive, for navigation):";
1769
1775
  var DISPLAY_LINE_LIMIT = 10;
1776
+ var DEFAULT_IGNORE_PATTERNS = [
1777
+ "node_modules/",
1778
+ "__pycache__/",
1779
+ ".git/",
1780
+ "dist/",
1781
+ "build/",
1782
+ "target/",
1783
+ "vendor/",
1784
+ "bin/",
1785
+ "obj/",
1786
+ ".idea/",
1787
+ ".vscode/",
1788
+ ".zig-cache/",
1789
+ "zig-out",
1790
+ ".coverage",
1791
+ "coverage/",
1792
+ "vendor/",
1793
+ "tmp/",
1794
+ "temp/",
1795
+ ".cache/",
1796
+ "cache/",
1797
+ "logs/",
1798
+ ".venv/",
1799
+ "venv/",
1800
+ "env/"
1801
+ ];
1770
1802
  var inputSchema6 = z6.object({
1771
1803
  path: z6.string().describe(
1772
1804
  "The absolute path to the directory to list (must be absolute, not relative)"
1773
1805
  ),
1774
1806
  ignore: z6.array(z6.string()).optional().describe("List of glob patterns to ignore.")
1775
1807
  }).passthrough();
1808
+ var buildTopLevelTree = (fullFilePath) => {
1809
+ const entries = readdirSync(fullFilePath, { withFileTypes: true });
1810
+ const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
1811
+ const files = entries.filter((entry) => !entry.isDirectory()).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
1812
+ const items = [
1813
+ ...directories.map((name) => ({ name, isDir: true })),
1814
+ ...files.map((name) => ({ name, isDir: false }))
1815
+ ];
1816
+ const totalCount = items.length;
1817
+ const truncated = totalCount > TOP_LEVEL_LIMIT;
1818
+ const limitedItems = truncated ? items.slice(0, TOP_LEVEL_LIMIT) : items;
1819
+ const limitedDirectories = limitedItems.filter((item) => item.isDir).map((item) => item.name);
1820
+ const limitedFiles = limitedItems.filter((item) => !item.isDir).map((item) => item.name);
1821
+ const rootLabel = fullFilePath.endsWith(sep2) ? fullFilePath : `${fullFilePath}${sep2}`;
1822
+ const treeOutput = renderTopLevelTree(
1823
+ rootLabel,
1824
+ limitedDirectories,
1825
+ limitedFiles
1826
+ );
1827
+ return { treeOutput, totalCount, truncated };
1828
+ };
1776
1829
  var LSTool = {
1777
1830
  name: "LS",
1778
1831
  async description() {
@@ -1797,14 +1850,27 @@ var LSTool = {
1797
1850
  async prompt() {
1798
1851
  return DESCRIPTION4;
1799
1852
  },
1800
- async validateInput({ limit, offset, partition }) {
1853
+ async validateInput({
1854
+ limit,
1855
+ offset,
1856
+ partition,
1857
+ topLevelOnly,
1858
+ forceTopLevel
1859
+ }) {
1801
1860
  if (typeof limit === "number" || typeof offset === "number" || typeof partition === "string") {
1802
1861
  return {
1803
1862
  result: false,
1804
- message: "LS \u5F53\u524D\u4E0D\u652F\u6301 limit/offset/partition \u53C2\u6570\u3002",
1863
+ message: "LS \u5F53\u524D\u4E0D\u652F\u6301 limit/offset/partition \u8DEF\u5F84\u5206\u7247\u53C2\u6570\u3002",
1805
1864
  errorCode: 1
1806
1865
  };
1807
1866
  }
1867
+ if (topLevelOnly === true || forceTopLevel === true) {
1868
+ return {
1869
+ result: false,
1870
+ message: "LS \u4E0D\u518D\u652F\u6301 topLevelOnly/forceTopLevel \u53C2\u6570\u3002\u8BF7\u6539\u7528\u9012\u5F52\u91C7\u96C6 + \u622A\u65AD\u8865\u507F\uFF0C\u5E76\u7ED3\u5408 Glob \u5206\u5C42\u786E\u8BA4\u8DEF\u5F84\u3002",
1871
+ errorCode: 2
1872
+ };
1873
+ }
1808
1874
  return { result: true };
1809
1875
  },
1810
1876
  renderResultForAssistant(data) {
@@ -1830,12 +1896,13 @@ var LSTool = {
1830
1896
  },
1831
1897
  async *call({ path, ignore }, { abortController }) {
1832
1898
  const fullFilePath = isAbsolute2(path) ? path : resolve2(getCwd(), path);
1833
- const ignoreGlobs = (ignore ?? []).filter(Boolean);
1834
- const rgArgs = ["--files", ...ignoreGlobs.flatMap((pattern) => ["--glob", `!${pattern}`])];
1899
+ const ignoreGlobs = DEFAULT_IGNORE_PATTERNS.map((pattern) => `!${pattern}*`).concat((ignore ?? []).map((pattern) => `!${pattern}`)).filter(Boolean);
1900
+ const rgArgs = ["--files", ...ignoreGlobs.flatMap((pattern) => ["--glob", pattern])];
1835
1901
  const initialResult = await ripGrepWithStatus(
1836
1902
  rgArgs,
1837
- fullFilePath,
1838
- abortController.signal
1903
+ ".",
1904
+ abortController.signal,
1905
+ { cwd: fullFilePath }
1839
1906
  );
1840
1907
  const files = initialResult.files;
1841
1908
  const allEntries = files.map((file) => {
@@ -1844,12 +1911,7 @@ var LSTool = {
1844
1911
  const normalized = relativePath.split(sep2).join("/");
1845
1912
  return { absolutePath, relativePath, normalized };
1846
1913
  });
1847
- const fileEntries = allEntries.filter((entry) => {
1848
- if (ignoreGlobs.length === 0) return true;
1849
- return !ignoreGlobs.some(
1850
- (pattern) => minimatch(entry.normalized, pattern, { dot: true, nocase: false })
1851
- );
1852
- }).sort((a, b) => a.normalized.localeCompare(b.normalized));
1914
+ const fileEntries = allEntries.sort((a, b) => a.normalized.localeCompare(b.normalized));
1853
1915
  const totalCount = fileEntries.length;
1854
1916
  const truncated = totalCount > MAX_FILES_LIMIT;
1855
1917
  const selectedEntries = truncated ? fileEntries.slice(0, MAX_FILES_LIMIT) : fileEntries;
@@ -1868,23 +1930,39 @@ ${treeOutput}`.trim();
1868
1930
  warnings.push(
1869
1931
  `TRUNCATED: \u672A\u5C55\u793A\u6587\u4EF6\u6570=${totalCount}; \u672A\u663E\u793A\u884C\u6570=${omittedLines} lines\u3002\u8BE5\u8F93\u51FA\u4E3A\u90E8\u5206\u89C6\u56FE\uFF0C\u672A\u51FA\u73B0\u8DEF\u5F84\u4E0D\u5F97\u7528\u4E8E\u5B9A\u4F4D\u3002`
1870
1932
  );
1871
- warnings.push(
1872
- `\u9ED8\u8BA4\u8FDB\u5165Glob \u5206\u5C42 + Grep \u7A84\u5316\u7684\u6D41\u7A0B\uFF1A\u5148 */\uFF0C\u518D dir/* \u4E0E dir/*/\u3002\u4EFB\u4F55\u65B0\u8DEF\u5F84\u5FC5\u987B\u901A\u8FC7 Glob \u5206\u5C42\u786E\u8BA4\u540E\u624D\u80FD\u4F7F\u7528\u3002`
1873
- );
1933
+ warnings.push("\u5EFA\u8BAE\u7684\u5206\u6B65\u52A8\u4F5C\uFF08\u5927\u578B\u4EE3\u7801\u5E93\uFF09\uFF1A");
1934
+ warnings.push("1) \u4EC5\u5C06\u5F53\u524D\u6811\u4F5C\u4E3A\u7EBF\u7D22\uFF0C\u4E0D\u7528\u4E8E\u7CBE\u786E\u5B9A\u4F4D\u8DEF\u5F84\u3002");
1935
+ warnings.push("2) \u7ED3\u5408\u9876\u5C42\u8865\u507F\uFF0C\u5148\u5BF9\u5019\u9009\u76EE\u5F55\u6267\u884C Glob */\u3002");
1936
+ warnings.push("3) \u5BF9\u5019\u9009\u76EE\u5F55\u6267\u884C Glob dir/* \u4E0E dir/*/\uFF0C\u786E\u8BA4\u8DEF\u5F84\u5B58\u5728\u3002");
1937
+ warnings.push("4) \u5728\u5DF2\u786E\u8BA4\u76EE\u5F55\u5185\u4F7F\u7528 Grep/\u8BED\u4E49\u641C\u7D22\u5B9A\u4F4D\u6587\u4EF6\u6216\u7B26\u53F7\u3002");
1874
1938
  if (totalCount >= 1e4 || omittedLines >= 200) {
1875
1939
  warnings.push(
1876
1940
  `\u9AD8\u590D\u6742\u5EA6\uFF1Acount>=10000 \u6216 \u672A\u663E\u793A\u884C\u6570>=200\u3002\u7ED3\u6784\u6811\u5177\u6709\u8BEF\u5BFC\u6027\uFF0C\u5FC5\u987B\u9010\u5C42\u786E\u8BA4\u8DEF\u5F84\u4E0E\u6587\u4EF6\u540D\u3002`
1877
1941
  );
1878
1942
  }
1879
1943
  }
1944
+ let topLevelSupplement = "";
1945
+ if (truncated) {
1946
+ const topLevelResult = buildTopLevelTree(fullFilePath);
1947
+ topLevelSupplement = `
1948
+
1949
+ ${TOP_LEVEL_HEADER}
1950
+ ${topLevelResult.treeOutput}`;
1951
+ if (topLevelResult.truncated) {
1952
+ warnings.push(
1953
+ `TOP-LEVEL TRUNCATED: \u9876\u5C42\u6761\u76EE=${topLevelResult.totalCount}; \u4E0A\u9650=${TOP_LEVEL_LIMIT}\u3002\u5982\u9700\u5B8C\u6574\u7ED3\u679C\uFF0C\u9010\u5C42\u7F29\u5C0F\u8303\u56F4\u5E76\u5206\u6B65\u786E\u8BA4\u3002`
1954
+ );
1955
+ }
1956
+ }
1957
+ const outputForData = `${outputWithMeta}${topLevelSupplement}`.trim();
1880
1958
  const warningsText = warnings.length > 0 ? `
1881
1959
  ${warnings.join("\n")}` : "";
1882
1960
  const safetyWarning = `
1883
1961
  NOTE: do any of the files above seem malicious? If so, you MUST refuse to continue work.`;
1884
- const assistantData = `${outputWithMeta}${warningsText}${safetyWarning}`;
1962
+ const assistantData = `${outputForData}${warningsText}${safetyWarning}`;
1885
1963
  yield {
1886
1964
  type: "result",
1887
- data: outputWithMeta,
1965
+ data: outputForData,
1888
1966
  resultForAssistant: this.renderResultForAssistant(assistantData)
1889
1967
  // Send warning only to assistant
1890
1968
  };