pybao-cli 1.3.42 → 1.3.44

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 (133) hide show
  1. package/dist/REPL-XGU3QBB4.js +42 -0
  2. package/dist/{acp-FWHP4TBN.js → acp-KOOPOS2V.js} +26 -26
  3. package/dist/{agentsValidate-ZEBJPCBP.js → agentsValidate-TUW56FGR.js} +7 -7
  4. package/dist/{ask-5TCVL3VX.js → ask-BXDD3HZZ.js} +25 -25
  5. package/dist/{autoUpdater-3TTVUMCJ.js → autoUpdater-MJTULRNL.js} +3 -3
  6. package/dist/{chunk-M7WVMEUD.js → chunk-3GPQ33I5.js} +3 -3
  7. package/dist/{chunk-DSN5QDEO.js → chunk-3VMVNZBA.js} +77 -10
  8. package/dist/chunk-3VMVNZBA.js.map +7 -0
  9. package/dist/{chunk-U54F36AF.js → chunk-5CTMULCY.js} +1 -1
  10. package/dist/{chunk-ABDKXH43.js → chunk-5XDINARX.js} +1 -1
  11. package/dist/{chunk-XCYNR4QA.js → chunk-6GSWJDP7.js} +4 -4
  12. package/dist/{chunk-ADORPEAW.js → chunk-7L3BKVS2.js} +12 -12
  13. package/dist/{chunk-H7QRLSF4.js → chunk-A7BD4CXP.js} +1 -1
  14. package/dist/{chunk-QAQGPGLD.js → chunk-AIE6TFWI.js} +1 -1
  15. package/dist/{chunk-CCTW7Q7I.js → chunk-AVJMRJOF.js} +2 -2
  16. package/dist/{chunk-FJ5SYR7F.js → chunk-DTDUB7LG.js} +1 -1
  17. package/dist/{chunk-LIPAFDDK.js → chunk-DTLOHNDH.js} +3 -3
  18. package/dist/{chunk-G4BXBJ4S.js → chunk-FBVDMTHQ.js} +2 -2
  19. package/dist/{chunk-7SOGBPYD.js → chunk-FE3MRJ7F.js} +3 -3
  20. package/dist/{chunk-E5AKMKAN.js → chunk-FPSETIH6.js} +3 -3
  21. package/dist/{chunk-MFGMZQ5K.js → chunk-G22THW43.js} +2 -2
  22. package/dist/{chunk-7LAOOICJ.js → chunk-I4OD44YI.js} +1 -1
  23. package/dist/{chunk-ZJRV37OB.js → chunk-KAWPVVO4.js} +3 -3
  24. package/dist/{chunk-UFWHOIFA.js → chunk-LBHF6BS2.js} +4 -4
  25. package/dist/{chunk-P2UA7K7C.js → chunk-LZUURGDV.js} +3 -3
  26. package/dist/{chunk-DLL2KASH.js → chunk-NAEAT6CC.js} +3 -3
  27. package/dist/{chunk-LWQDVWXJ.js → chunk-NBLIMAPB.js} +1 -1
  28. package/dist/{chunk-V6OEXS6Q.js → chunk-NDUV7XH4.js} +189 -32
  29. package/dist/chunk-NDUV7XH4.js.map +7 -0
  30. package/dist/{chunk-RI3CMWN4.js → chunk-QVUJ6WJZ.js} +4 -2
  31. package/dist/{chunk-RI3CMWN4.js.map → chunk-QVUJ6WJZ.js.map} +2 -2
  32. package/dist/{chunk-CRYTR7MS.js → chunk-R5B3QREX.js} +2 -2
  33. package/dist/{chunk-VJJWEHXV.js → chunk-RHOMDJ4W.js} +1 -1
  34. package/dist/{chunk-BWW4W5S3.js → chunk-S5PEPGE4.js} +2 -2
  35. package/dist/{chunk-L3CRUW5N.js → chunk-WZQQI3WY.js} +2 -2
  36. package/dist/{cli-GDYU6HYF.js → cli-6X6S6JUI.js} +77 -77
  37. package/dist/commands-D4K3WP4Q.js +46 -0
  38. package/dist/{config-XQT24WCE.js → config-EAVBRMJZ.js} +4 -4
  39. package/dist/{context-DB6LRXYB.js → context-6ZFVEBNJ.js} +5 -5
  40. package/dist/{customCommands-RN77SRIF.js → customCommands-6QGGYZEX.js} +4 -4
  41. package/dist/{env-OQX6MGZZ.js → env-4VFOICHG.js} +2 -2
  42. package/dist/index.js +3 -3
  43. package/dist/{llm-6NG2NWFG.js → llm-22YH2ZPY.js} +26 -26
  44. package/dist/{llmLazy-7SHYMBDJ.js → llmLazy-NXKJNC2G.js} +1 -1
  45. package/dist/{loader-7NAUG6D6.js → loader-AHVOZTJN.js} +4 -4
  46. package/dist/{mcp-Q6RTTHJD.js → mcp-F4JQTEPJ.js} +7 -7
  47. package/dist/{mentionProcessor-IQQZDOUW.js → mentionProcessor-KR6BJB44.js} +5 -5
  48. package/dist/{messages-FNAIGZTM.js → messages-4SGWZDEN.js} +1 -1
  49. package/dist/{model-IP76FW55.js → model-W6KAPOMM.js} +5 -5
  50. package/dist/{openai-ETZZQV2T.js → openai-5YOQ2GOC.js} +5 -5
  51. package/dist/{outputStyles-V5JRED7X.js → outputStyles-DIT6QLSL.js} +4 -4
  52. package/dist/{pluginRuntime-JCULYGGU.js → pluginRuntime-ULGPYEC2.js} +6 -6
  53. package/dist/{pluginValidation-3WIA2IUE.js → pluginValidation-VMTZMQF4.js} +6 -6
  54. package/dist/prompts-V5GQOXVP.js +48 -0
  55. package/dist/{pybAgentSessionLoad-VWCWWEZK.js → pybAgentSessionLoad-OS3SBDUL.js} +4 -4
  56. package/dist/{pybAgentSessionResume-W4757NLE.js → pybAgentSessionResume-BY2OINUM.js} +4 -4
  57. package/dist/{pybAgentStreamJsonSession-BVEOPLLB.js → pybAgentStreamJsonSession-S2EVD25H.js} +1 -1
  58. package/dist/{pybHooks-7IA4RGWO.js → pybHooks-J4TIBPPX.js} +4 -4
  59. package/dist/query-PEGPPHCH.js +50 -0
  60. package/dist/{ripgrep-O6TUNRCS.js → ripgrep-XJ7BRKLV.js} +3 -3
  61. package/dist/{skillMarketplace-VEQDTI2D.js → skillMarketplace-ADUM7ZZM.js} +3 -3
  62. package/dist/{state-LTYC7FWM.js → state-LIRDPMWY.js} +2 -2
  63. package/dist/{theme-DSMWYVRU.js → theme-VPF6NLPH.js} +5 -5
  64. package/dist/{toolPermissionSettings-KPHYGSEV.js → toolPermissionSettings-G7R7IURS.js} +6 -6
  65. package/dist/tools-LPMBKXBZ.js +47 -0
  66. package/dist/{userInput-MJV7EZ63.js → userInput-FC4VH2WA.js} +27 -27
  67. package/package.json +4 -2
  68. package/dist/REPL-ZCISMY6V.js +0 -42
  69. package/dist/chunk-DSN5QDEO.js.map +0 -7
  70. package/dist/chunk-V6OEXS6Q.js.map +0 -7
  71. package/dist/commands-DEA7LLFV.js +0 -46
  72. package/dist/prompts-AXUYJN3W.js +0 -48
  73. package/dist/query-2WUDCNVP.js +0 -50
  74. package/dist/tools-CB4RN64P.js +0 -47
  75. /package/dist/{REPL-ZCISMY6V.js.map → REPL-XGU3QBB4.js.map} +0 -0
  76. /package/dist/{acp-FWHP4TBN.js.map → acp-KOOPOS2V.js.map} +0 -0
  77. /package/dist/{agentsValidate-ZEBJPCBP.js.map → agentsValidate-TUW56FGR.js.map} +0 -0
  78. /package/dist/{ask-5TCVL3VX.js.map → ask-BXDD3HZZ.js.map} +0 -0
  79. /package/dist/{autoUpdater-3TTVUMCJ.js.map → autoUpdater-MJTULRNL.js.map} +0 -0
  80. /package/dist/{chunk-M7WVMEUD.js.map → chunk-3GPQ33I5.js.map} +0 -0
  81. /package/dist/{chunk-U54F36AF.js.map → chunk-5CTMULCY.js.map} +0 -0
  82. /package/dist/{chunk-ABDKXH43.js.map → chunk-5XDINARX.js.map} +0 -0
  83. /package/dist/{chunk-XCYNR4QA.js.map → chunk-6GSWJDP7.js.map} +0 -0
  84. /package/dist/{chunk-ADORPEAW.js.map → chunk-7L3BKVS2.js.map} +0 -0
  85. /package/dist/{chunk-H7QRLSF4.js.map → chunk-A7BD4CXP.js.map} +0 -0
  86. /package/dist/{chunk-QAQGPGLD.js.map → chunk-AIE6TFWI.js.map} +0 -0
  87. /package/dist/{chunk-CCTW7Q7I.js.map → chunk-AVJMRJOF.js.map} +0 -0
  88. /package/dist/{chunk-FJ5SYR7F.js.map → chunk-DTDUB7LG.js.map} +0 -0
  89. /package/dist/{chunk-LIPAFDDK.js.map → chunk-DTLOHNDH.js.map} +0 -0
  90. /package/dist/{chunk-G4BXBJ4S.js.map → chunk-FBVDMTHQ.js.map} +0 -0
  91. /package/dist/{chunk-7SOGBPYD.js.map → chunk-FE3MRJ7F.js.map} +0 -0
  92. /package/dist/{chunk-E5AKMKAN.js.map → chunk-FPSETIH6.js.map} +0 -0
  93. /package/dist/{chunk-MFGMZQ5K.js.map → chunk-G22THW43.js.map} +0 -0
  94. /package/dist/{chunk-7LAOOICJ.js.map → chunk-I4OD44YI.js.map} +0 -0
  95. /package/dist/{chunk-ZJRV37OB.js.map → chunk-KAWPVVO4.js.map} +0 -0
  96. /package/dist/{chunk-UFWHOIFA.js.map → chunk-LBHF6BS2.js.map} +0 -0
  97. /package/dist/{chunk-P2UA7K7C.js.map → chunk-LZUURGDV.js.map} +0 -0
  98. /package/dist/{chunk-DLL2KASH.js.map → chunk-NAEAT6CC.js.map} +0 -0
  99. /package/dist/{chunk-LWQDVWXJ.js.map → chunk-NBLIMAPB.js.map} +0 -0
  100. /package/dist/{chunk-CRYTR7MS.js.map → chunk-R5B3QREX.js.map} +0 -0
  101. /package/dist/{chunk-VJJWEHXV.js.map → chunk-RHOMDJ4W.js.map} +0 -0
  102. /package/dist/{chunk-BWW4W5S3.js.map → chunk-S5PEPGE4.js.map} +0 -0
  103. /package/dist/{chunk-L3CRUW5N.js.map → chunk-WZQQI3WY.js.map} +0 -0
  104. /package/dist/{cli-GDYU6HYF.js.map → cli-6X6S6JUI.js.map} +0 -0
  105. /package/dist/{commands-DEA7LLFV.js.map → commands-D4K3WP4Q.js.map} +0 -0
  106. /package/dist/{config-XQT24WCE.js.map → config-EAVBRMJZ.js.map} +0 -0
  107. /package/dist/{context-DB6LRXYB.js.map → context-6ZFVEBNJ.js.map} +0 -0
  108. /package/dist/{customCommands-RN77SRIF.js.map → customCommands-6QGGYZEX.js.map} +0 -0
  109. /package/dist/{env-OQX6MGZZ.js.map → env-4VFOICHG.js.map} +0 -0
  110. /package/dist/{llm-6NG2NWFG.js.map → llm-22YH2ZPY.js.map} +0 -0
  111. /package/dist/{llmLazy-7SHYMBDJ.js.map → llmLazy-NXKJNC2G.js.map} +0 -0
  112. /package/dist/{loader-7NAUG6D6.js.map → loader-AHVOZTJN.js.map} +0 -0
  113. /package/dist/{mcp-Q6RTTHJD.js.map → mcp-F4JQTEPJ.js.map} +0 -0
  114. /package/dist/{mentionProcessor-IQQZDOUW.js.map → mentionProcessor-KR6BJB44.js.map} +0 -0
  115. /package/dist/{messages-FNAIGZTM.js.map → messages-4SGWZDEN.js.map} +0 -0
  116. /package/dist/{model-IP76FW55.js.map → model-W6KAPOMM.js.map} +0 -0
  117. /package/dist/{openai-ETZZQV2T.js.map → openai-5YOQ2GOC.js.map} +0 -0
  118. /package/dist/{outputStyles-V5JRED7X.js.map → outputStyles-DIT6QLSL.js.map} +0 -0
  119. /package/dist/{pluginRuntime-JCULYGGU.js.map → pluginRuntime-ULGPYEC2.js.map} +0 -0
  120. /package/dist/{pluginValidation-3WIA2IUE.js.map → pluginValidation-VMTZMQF4.js.map} +0 -0
  121. /package/dist/{prompts-AXUYJN3W.js.map → prompts-V5GQOXVP.js.map} +0 -0
  122. /package/dist/{pybAgentSessionLoad-VWCWWEZK.js.map → pybAgentSessionLoad-OS3SBDUL.js.map} +0 -0
  123. /package/dist/{pybAgentSessionResume-W4757NLE.js.map → pybAgentSessionResume-BY2OINUM.js.map} +0 -0
  124. /package/dist/{pybAgentStreamJsonSession-BVEOPLLB.js.map → pybAgentStreamJsonSession-S2EVD25H.js.map} +0 -0
  125. /package/dist/{pybHooks-7IA4RGWO.js.map → pybHooks-J4TIBPPX.js.map} +0 -0
  126. /package/dist/{query-2WUDCNVP.js.map → query-PEGPPHCH.js.map} +0 -0
  127. /package/dist/{ripgrep-O6TUNRCS.js.map → ripgrep-XJ7BRKLV.js.map} +0 -0
  128. /package/dist/{skillMarketplace-VEQDTI2D.js.map → skillMarketplace-ADUM7ZZM.js.map} +0 -0
  129. /package/dist/{state-LTYC7FWM.js.map → state-LIRDPMWY.js.map} +0 -0
  130. /package/dist/{theme-DSMWYVRU.js.map → theme-VPF6NLPH.js.map} +0 -0
  131. /package/dist/{toolPermissionSettings-KPHYGSEV.js.map → toolPermissionSettings-G7R7IURS.js.map} +0 -0
  132. /package/dist/{tools-CB4RN64P.js.map → tools-LPMBKXBZ.js.map} +0 -0
  133. /package/dist/{userInput-MJV7EZ63.js.map → userInput-FC4VH2WA.js.map} +0 -0
@@ -3,13 +3,13 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getGlobalConfig,
5
5
  saveGlobalConfig
6
- } from "./chunk-P2UA7K7C.js";
6
+ } from "./chunk-LZUURGDV.js";
7
7
  import {
8
8
  debug
9
- } from "./chunk-LWQDVWXJ.js";
9
+ } from "./chunk-NBLIMAPB.js";
10
10
  import {
11
11
  logError
12
- } from "./chunk-DSN5QDEO.js";
12
+ } from "./chunk-3VMVNZBA.js";
13
13
 
14
14
  // src/utils/model/index.ts
15
15
  import { memoize } from "lodash-es";
@@ -5,17 +5,17 @@ import {
5
5
  getGlobalConfig,
6
6
  getOrCreateUserID,
7
7
  saveCurrentProjectConfig
8
- } from "./chunk-P2UA7K7C.js";
8
+ } from "./chunk-LZUURGDV.js";
9
9
  import {
10
10
  SESSION_ID,
11
11
  env,
12
12
  execFileNoThrow,
13
13
  getCwd,
14
14
  logError
15
- } from "./chunk-DSN5QDEO.js";
15
+ } from "./chunk-3VMVNZBA.js";
16
16
  import {
17
17
  MACRO
18
- } from "./chunk-RI3CMWN4.js";
18
+ } from "./chunk-QVUJ6WJZ.js";
19
19
  import {
20
20
  __require
21
21
  } from "./chunk-I3J4JYES.js";
@@ -6,12 +6,12 @@ import {
6
6
  } from "./chunk-ERMQRV55.js";
7
7
  import {
8
8
  getGlobalConfig
9
- } from "./chunk-P2UA7K7C.js";
9
+ } from "./chunk-LZUURGDV.js";
10
10
  import {
11
11
  debug,
12
12
  getCurrentRequest,
13
13
  logAPIError
14
- } from "./chunk-LWQDVWXJ.js";
14
+ } from "./chunk-NBLIMAPB.js";
15
15
 
16
16
  // src/services/ai/openai.ts
17
17
  import { ProxyAgent, fetch } from "undici";
@@ -3,7 +3,7 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getCwd,
5
5
  logError
6
- } from "./chunk-DSN5QDEO.js";
6
+ } from "./chunk-3VMVNZBA.js";
7
7
 
8
8
  // src/utils/config/settingsFiles.ts
9
9
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
@@ -5,14 +5,14 @@ import {
5
5
  } from "./chunk-B6IMQJZM.js";
6
6
  import {
7
7
  loadSettingsWithLegacyFallback
8
- } from "./chunk-7LAOOICJ.js";
8
+ } from "./chunk-I4OD44YI.js";
9
9
  import {
10
10
  getSessionPlugins
11
11
  } from "./chunk-BJSWTHRM.js";
12
12
  import {
13
13
  getCwd,
14
14
  logError
15
- } from "./chunk-DSN5QDEO.js";
15
+ } from "./chunk-3VMVNZBA.js";
16
16
 
17
17
  // src/utils/session/pybHooks.ts
18
18
  import { spawn } from "child_process";
@@ -496,7 +496,7 @@ async function runPromptHook(args) {
496
496
  fallbackTimeoutMs: args.fallbackTimeoutMs
497
497
  });
498
498
  try {
499
- const { queryQuick } = await import("./llmLazy-7SHYMBDJ.js");
499
+ const { queryQuick } = await import("./llmLazy-NXKJNC2G.js");
500
500
  const systemPrompt = [
501
501
  "You are executing a Pyb prompt hook.",
502
502
  "Return a single JSON object only (no markdown, no prose).",
@@ -3,13 +3,13 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getSettingsFileCandidates,
5
5
  loadSettingsWithLegacyFallback
6
- } from "./chunk-7LAOOICJ.js";
6
+ } from "./chunk-I4OD44YI.js";
7
7
  import {
8
8
  getSessionPlugins
9
9
  } from "./chunk-BJSWTHRM.js";
10
10
  import {
11
11
  getTheme
12
- } from "./chunk-H7QRLSF4.js";
12
+ } from "./chunk-A7BD4CXP.js";
13
13
  import {
14
14
  addMcprcServerForTesting,
15
15
  getCurrentProjectConfig,
@@ -19,13 +19,13 @@ import {
19
19
  safeParseJSON,
20
20
  saveCurrentProjectConfig,
21
21
  saveGlobalConfig
22
- } from "./chunk-P2UA7K7C.js";
22
+ } from "./chunk-LZUURGDV.js";
23
23
  import {
24
24
  PRODUCT_COMMAND,
25
25
  PRODUCT_NAME,
26
26
  getCwd,
27
27
  logMCPError
28
- } from "./chunk-DSN5QDEO.js";
28
+ } from "./chunk-3VMVNZBA.js";
29
29
 
30
30
  // src/services/mcp/client.ts
31
31
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
@@ -5,12 +5,12 @@ import {
5
5
  } from "./chunk-RQVLBMP7.js";
6
6
  import {
7
7
  debug
8
- } from "./chunk-LWQDVWXJ.js";
8
+ } from "./chunk-NBLIMAPB.js";
9
9
  import {
10
10
  getCwd,
11
11
  getGlobalConfigFilePath,
12
12
  logError
13
- } from "./chunk-DSN5QDEO.js";
13
+ } from "./chunk-3VMVNZBA.js";
14
14
 
15
15
  // src/core/config/schema.ts
16
16
  function isAutoUpdaterStatus(value) {
@@ -660,7 +660,7 @@ function setModelPointer(pointer, modelName) {
660
660
  }
661
661
  };
662
662
  saveGlobalConfig(updatedConfig);
663
- import("./model-IP76FW55.js").then(({ reloadModelManager }) => {
663
+ import("./model-W6KAPOMM.js").then(({ reloadModelManager }) => {
664
664
  reloadModelManager();
665
665
  });
666
666
  }
@@ -4,18 +4,18 @@ import {
4
4
  getSettingsFileCandidates,
5
5
  loadSettingsWithLegacyFallback,
6
6
  saveSettingsToPrimaryAndSyncLegacy
7
- } from "./chunk-7LAOOICJ.js";
7
+ } from "./chunk-I4OD44YI.js";
8
8
  import {
9
9
  createDefaultToolPermissionContext,
10
10
  isPersistableToolPermissionDestination
11
11
  } from "./chunk-UNNVICVU.js";
12
12
  import {
13
13
  getCurrentProjectConfig
14
- } from "./chunk-P2UA7K7C.js";
14
+ } from "./chunk-LZUURGDV.js";
15
15
  import {
16
16
  getCwd,
17
17
  logError
18
- } from "./chunk-DSN5QDEO.js";
18
+ } from "./chunk-3VMVNZBA.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
  SESSION_ID
5
- } from "./chunk-DSN5QDEO.js";
5
+ } from "./chunk-3VMVNZBA.js";
6
6
 
7
7
  // src/utils/log/debugLogger.ts
8
8
  import { existsSync, mkdirSync, appendFileSync } from "fs";
@@ -2,7 +2,7 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  listPybAgentSessions
5
- } from "./chunk-FJ5SYR7F.js";
5
+ } from "./chunk-DTDUB7LG.js";
6
6
  import {
7
7
  DEFAULT_TIMEOUT_MS,
8
8
  FallbackToolUseRejectedMessage,
@@ -16,11 +16,11 @@ import {
16
16
  listMCPServers,
17
17
  loadMergedSettings,
18
18
  normalizeSandboxRuntimeConfigFromSettings
19
- } from "./chunk-UFWHOIFA.js";
19
+ } from "./chunk-LBHF6BS2.js";
20
20
  import {
21
21
  formatValidationResult,
22
22
  validatePluginOrMarketplacePath
23
- } from "./chunk-LIPAFDDK.js";
23
+ } from "./chunk-DTLOHNDH.js";
24
24
  import {
25
25
  addMarketplace,
26
26
  disableSkillPlugin,
@@ -33,15 +33,15 @@ import {
33
33
  refreshMarketplaceAsync,
34
34
  removeMarketplace,
35
35
  uninstallSkillPlugin
36
- } from "./chunk-QAQGPGLD.js";
36
+ } from "./chunk-AIE6TFWI.js";
37
37
  import {
38
38
  loadPybAgentSessionMessages
39
- } from "./chunk-ABDKXH43.js";
39
+ } from "./chunk-5XDINARX.js";
40
40
  import {
41
41
  appendSessionCustomTitleRecord,
42
42
  appendSessionJsonlFromMessage,
43
43
  appendSessionTagRecord
44
- } from "./chunk-G4BXBJ4S.js";
44
+ } from "./chunk-FBVDMTHQ.js";
45
45
  import {
46
46
  getRequestStatus,
47
47
  setRequestStatus,
@@ -58,7 +58,7 @@ import {
58
58
  runStopHooks,
59
59
  runUserPromptSubmitHooks,
60
60
  updateHookTranscriptForMessages
61
- } from "./chunk-ZJRV37OB.js";
61
+ } from "./chunk-KAWPVVO4.js";
62
62
  import {
63
63
  getPybAgentSessionId,
64
64
  setPybAgentSessionId
@@ -71,35 +71,35 @@ import {
71
71
  getOutputStyleSystemPromptAdditions,
72
72
  resolveOutputStyleName,
73
73
  setCurrentOutputStyle
74
- } from "./chunk-L3CRUW5N.js";
74
+ } from "./chunk-WZQQI3WY.js";
75
75
  import {
76
76
  fetchCustomModels,
77
77
  getModelFeatures
78
- } from "./chunk-MFGMZQ5K.js";
78
+ } from "./chunk-G22THW43.js";
79
79
  import {
80
80
  queryLLM,
81
81
  queryQuick,
82
82
  verifyApiKey
83
- } from "./chunk-XCYNR4QA.js";
83
+ } from "./chunk-6GSWJDP7.js";
84
84
  import {
85
85
  listAllContentFiles,
86
86
  ripGrep,
87
87
  tree
88
- } from "./chunk-VJJWEHXV.js";
88
+ } from "./chunk-RHOMDJ4W.js";
89
89
  import {
90
90
  getCustomCommandDirectories,
91
91
  hasCustomCommands,
92
92
  loadCustomCommands,
93
93
  reloadCustomCommands
94
- } from "./chunk-CCTW7Q7I.js";
94
+ } from "./chunk-AVJMRJOF.js";
95
95
  import {
96
96
  loadToolPermissionContextFromDisk,
97
97
  persistToolPermissionUpdateToDisk
98
- } from "./chunk-DLL2KASH.js";
98
+ } from "./chunk-NAEAT6CC.js";
99
99
  import {
100
100
  getSettingsFileCandidates,
101
101
  loadSettingsWithLegacyFallback
102
- } from "./chunk-7LAOOICJ.js";
102
+ } from "./chunk-I4OD44YI.js";
103
103
  import {
104
104
  applyToolPermissionContextUpdate,
105
105
  createDefaultToolPermissionContext
@@ -112,7 +112,7 @@ import {
112
112
  resetReminderSession,
113
113
  setTodos,
114
114
  systemReminderService
115
- } from "./chunk-CRYTR7MS.js";
115
+ } from "./chunk-R5B3QREX.js";
116
116
  import {
117
117
  getSessionState
118
118
  } from "./chunk-ERMQRV55.js";
@@ -121,7 +121,7 @@ import {
121
121
  getActiveAgents,
122
122
  getAgentByType,
123
123
  getAllAgents
124
- } from "./chunk-BWW4W5S3.js";
124
+ } from "./chunk-S5PEPGE4.js";
125
125
  import {
126
126
  getSessionPlugins
127
127
  } from "./chunk-BJSWTHRM.js";
@@ -154,22 +154,22 @@ import {
154
154
  processUserInput,
155
155
  reorderMessages,
156
156
  stripSystemMessages
157
- } from "./chunk-U54F36AF.js";
157
+ } from "./chunk-5CTMULCY.js";
158
158
  import {
159
159
  ModelManager,
160
160
  getModelManager,
161
161
  isDefaultSlowAndCapableModel
162
- } from "./chunk-7SOGBPYD.js";
162
+ } from "./chunk-FE3MRJ7F.js";
163
163
  import {
164
164
  getCodeStyle,
165
165
  getContext,
166
166
  getGitState,
167
167
  getIsGit,
168
168
  getProjectDocs
169
- } from "./chunk-E5AKMKAN.js";
169
+ } from "./chunk-FPSETIH6.js";
170
170
  import {
171
171
  getTheme
172
- } from "./chunk-H7QRLSF4.js";
172
+ } from "./chunk-A7BD4CXP.js";
173
173
  import {
174
174
  DEFAULT_GLOBAL_CONFIG,
175
175
  enableConfigs,
@@ -182,7 +182,7 @@ import {
182
182
  saveGlobalConfig,
183
183
  setAllPointersToModel,
184
184
  setModelPointer
185
- } from "./chunk-P2UA7K7C.js";
185
+ } from "./chunk-LZUURGDV.js";
186
186
  import {
187
187
  AbortError
188
188
  } from "./chunk-RQVLBMP7.js";
@@ -191,7 +191,7 @@ import {
191
191
  getCurrentRequest,
192
192
  logUserFriendly,
193
193
  markPhase
194
- } from "./chunk-LWQDVWXJ.js";
194
+ } from "./chunk-NBLIMAPB.js";
195
195
  import {
196
196
  ASCII_LOGO,
197
197
  BunShell,
@@ -227,10 +227,10 @@ import {
227
227
  renderBashNotification,
228
228
  setActivePlanConversationKey,
229
229
  setCwd
230
- } from "./chunk-DSN5QDEO.js";
230
+ } from "./chunk-3VMVNZBA.js";
231
231
  import {
232
232
  MACRO
233
- } from "./chunk-RI3CMWN4.js";
233
+ } from "./chunk-QVUJ6WJZ.js";
234
234
  import {
235
235
  formatTotalCost,
236
236
  getTotalAPIDuration,
@@ -418,7 +418,7 @@ var getCommandSubcommandPrefix = memoize(
418
418
  var getCommandPrefix = memoize(
419
419
  async (command4, abortSignal) => {
420
420
  const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
421
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-6NG2NWFG.js");
421
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-22YH2ZPY.js");
422
422
  const response = await queryQuick2({
423
423
  systemPrompt,
424
424
  userPrompt,
@@ -4458,7 +4458,7 @@ function formatParseError(error) {
4458
4458
  return error instanceof Error ? error.message : String(error);
4459
4459
  }
4460
4460
  async function defaultGateQuery(args) {
4461
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-6NG2NWFG.js");
4461
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-22YH2ZPY.js");
4462
4462
  const messages = [
4463
4463
  {
4464
4464
  type: "user",
@@ -11013,7 +11013,7 @@ async function createAndStoreApiKey(accessToken) {
11013
11013
  }
11014
11014
  saveGlobalConfig(config2);
11015
11015
  try {
11016
- const { resetAnthropicClient } = await import("./llm-6NG2NWFG.js");
11016
+ const { resetAnthropicClient } = await import("./llm-22YH2ZPY.js");
11017
11017
  resetAnthropicClient();
11018
11018
  } catch {
11019
11019
  }
@@ -15295,7 +15295,7 @@ async function refreshPluginRuntimeFromInstalls() {
15295
15295
  const existingRoots = getSessionPlugins().map((p) => p.rootDir);
15296
15296
  const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
15297
15297
  if (dirs.length === 0) return [];
15298
- const { configureSessionPlugins } = await import("./pluginRuntime-JCULYGGU.js");
15298
+ const { configureSessionPlugins } = await import("./pluginRuntime-ULGPYEC2.js");
15299
15299
  const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
15300
15300
  return errors;
15301
15301
  }
@@ -15964,7 +15964,7 @@ async function call(onDone, context) {
15964
15964
  ModelConfig,
15965
15965
  {
15966
15966
  onClose: () => {
15967
- import("./model-IP76FW55.js").then(({ reloadModelManager: reloadModelManager2 }) => {
15967
+ import("./model-W6KAPOMM.js").then(({ reloadModelManager: reloadModelManager2 }) => {
15968
15968
  reloadModelManager2();
15969
15969
  triggerModelConfigChange();
15970
15970
  onDone();
@@ -23223,7 +23223,7 @@ function useStatusLine() {
23223
23223
  // src/ui/components/PromptInput.tsx
23224
23224
  async function interpretHashCommand(input) {
23225
23225
  try {
23226
- const { queryQuick: queryQuick2 } = await import("./llm-6NG2NWFG.js");
23226
+ const { queryQuick: queryQuick2 } = await import("./llm-22YH2ZPY.js");
23227
23227
  const systemPrompt = [
23228
23228
  "You're helping the user structure notes that will be added to their PYB.md file.",
23229
23229
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -23536,7 +23536,7 @@ function PromptInput({
23536
23536
  if (messages2.length) {
23537
23537
  if (mode === "bash") {
23538
23538
  onQuery(messages2, newAbortController).then(async () => {
23539
- const { getCwd: getCwd2 } = await import("./state-LTYC7FWM.js");
23539
+ const { getCwd: getCwd2 } = await import("./state-LIRDPMWY.js");
23540
23540
  setCurrentPwd(getCwd2());
23541
23541
  });
23542
23542
  } else {
@@ -26322,7 +26322,7 @@ import { homedir as homedir7 } from "os";
26322
26322
  // src/commands/agents/generation.ts
26323
26323
  import { randomUUID as randomUUID5 } from "crypto";
26324
26324
  async function generateAgentWithClaude(prompt) {
26325
- const { queryModel } = await import("./llm-6NG2NWFG.js");
26325
+ const { queryModel } = await import("./llm-22YH2ZPY.js");
26326
26326
  const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
26327
26327
 
26328
26328
  Return your response as a JSON object with exactly these fields:
@@ -29490,6 +29490,137 @@ function WebFetchPermissionRequest({
29490
29490
  );
29491
29491
  }
29492
29492
 
29493
+ // src/utils/tree-sitter/loader.ts
29494
+ import treeSitterWasm from "web-tree-sitter/web-tree-sitter.wasm";
29495
+ import treeSitterBashWasm from "tree-sitter-bash/tree-sitter-bash.wasm";
29496
+ import { Parser, Language } from "web-tree-sitter";
29497
+
29498
+ // src/utils/tree-sitter/resolve-wasm.ts
29499
+ import { fileURLToPath } from "url";
29500
+ var resolveWasm = (asset) => {
29501
+ if (asset.startsWith("file://")) return fileURLToPath(asset);
29502
+ if (asset.startsWith("/") || /^[a-z]:/i.test(asset)) return asset;
29503
+ const url2 = new URL(asset, import.meta.url);
29504
+ return fileURLToPath(url2);
29505
+ };
29506
+
29507
+ // src/utils/tree-sitter/loader.ts
29508
+ var parserInstance = null;
29509
+ var initParser = async () => {
29510
+ if (parserInstance) return parserInstance;
29511
+ const treeWasmPath = resolveWasm(treeSitterWasm);
29512
+ const bashWasmPath = resolveWasm(treeSitterBashWasm);
29513
+ await Parser.init({
29514
+ locateFile: () => treeWasmPath
29515
+ });
29516
+ const bashLang = await Language.load(bashWasmPath);
29517
+ const parser = new Parser();
29518
+ parser.setLanguage(bashLang);
29519
+ parserInstance = parser;
29520
+ return parser;
29521
+ };
29522
+
29523
+ // src/utils/tree-sitter/parser.ts
29524
+ var BashParser = class {
29525
+ /**
29526
+ * Parse a Bash script using Tree-Sitter.
29527
+ * Ensures the parser is initialized before use.
29528
+ */
29529
+ static async parse(script) {
29530
+ const parser = await initParser();
29531
+ return parser.parse(script);
29532
+ }
29533
+ /**
29534
+ * Validate a Bash script for safety.
29535
+ * Returns true if safe, throws error if unsafe.
29536
+ */
29537
+ static async validate(script) {
29538
+ const tree2 = await this.parse(script);
29539
+ const root = tree2.rootNode;
29540
+ const commands = root.descendantsOfType("command");
29541
+ for (const cmd of commands) {
29542
+ const nameNode = cmd.childForFieldName("name");
29543
+ if (!nameNode) continue;
29544
+ const program = nameNode.text.trim();
29545
+ if (program === "vim" || program === "nano") {
29546
+ throw new Error(`Interactive command '${program}' is not supported.`);
29547
+ }
29548
+ }
29549
+ return true;
29550
+ }
29551
+ };
29552
+
29553
+ // src/utils/bash-parser/validator.ts
29554
+ async function validateSafety(script) {
29555
+ const tree2 = await BashParser.parse(script);
29556
+ const root = tree2.rootNode;
29557
+ validateNode(root, script);
29558
+ }
29559
+ function validateNode(node, script) {
29560
+ if (node.type === "command") {
29561
+ checkCommand(node, script);
29562
+ }
29563
+ for (let i = 0; i < node.childCount; i++) {
29564
+ const child = node.child(i);
29565
+ if (child) validateNode(child, script);
29566
+ }
29567
+ }
29568
+ function checkCommand(node, script) {
29569
+ const nameNode = node.childForFieldName("name");
29570
+ if (!nameNode) return;
29571
+ const commandName = nameNode.text.trim();
29572
+ if (commandName === "rm") {
29573
+ const args = [];
29574
+ for (let i = 0; i < node.childCount; i++) {
29575
+ const child = node.child(i);
29576
+ if (!child) continue;
29577
+ if (child.id === nameNode.id) continue;
29578
+ if (["word", "string", "raw_string"].includes(child.type)) {
29579
+ args.push(child.text);
29580
+ }
29581
+ }
29582
+ const isRecursive = args.some((arg) => /^-.*r/.test(arg));
29583
+ const criticalPaths = [
29584
+ "/",
29585
+ "/*",
29586
+ "/etc",
29587
+ "/var",
29588
+ "/usr",
29589
+ "/bin",
29590
+ "/sbin",
29591
+ "/boot",
29592
+ "/dev",
29593
+ "/sys",
29594
+ "/proc",
29595
+ "/lib",
29596
+ "/lib64",
29597
+ "/opt",
29598
+ "C:\\",
29599
+ "C:/",
29600
+ "C:\\Windows",
29601
+ "C:/Windows",
29602
+ "C:\\Program Files",
29603
+ "C:/Program Files"
29604
+ ];
29605
+ const targetsCritical = args.some((arg) => {
29606
+ return criticalPaths.some(
29607
+ (critical) => arg === critical || arg.startsWith(critical + "/") || arg.startsWith(critical + "\\")
29608
+ ) || arg.startsWith("..");
29609
+ });
29610
+ const originalCommand = node.text;
29611
+ if (isRecursive && targetsCritical) {
29612
+ throw new Error(`Security Alert: Potentially dangerous recursive deletion detected: "${originalCommand}". Execution blocked.`);
29613
+ }
29614
+ const normalizedArgs = args.map((arg) => arg.replace(/\\\\/g, "/").replace(/\\/g, "/"));
29615
+ const isWindowsRoot = normalizedArgs.some(
29616
+ (arg) => /^c:(\/|\\)?$/i.test(arg)
29617
+ );
29618
+ if (normalizedArgs.includes("/") || isWindowsRoot) {
29619
+ throw new Error(`Security Alert: Root deletion detected: "${originalCommand}". Execution blocked.`);
29620
+ }
29621
+ }
29622
+ }
29623
+
29493
29624
  // src/tools/system/BashTool/BashTool.tsx
29494
29625
  function formatDuration(ms) {
29495
29626
  if (ms < 6e4) {
@@ -29585,6 +29716,14 @@ var BashTool = {
29585
29716
  },
29586
29717
  async validateInput({ command: command4, timeout, dangerouslyDisableSandbox, cwd: cwd2 }, context) {
29587
29718
  const trimmed = command4.trim();
29719
+ try {
29720
+ await validateSafety(trimmed);
29721
+ } catch (e) {
29722
+ return {
29723
+ result: false,
29724
+ message: e.message
29725
+ };
29726
+ }
29588
29727
  if (/^ls(\s+|$)/.test(trimmed) && !trimmed.includes("-")) {
29589
29728
  return {
29590
29729
  result: false,
@@ -29724,6 +29863,24 @@ var BashTool = {
29724
29863
  const userPrompt = typeof context?.options?.lastUserPrompt === "string" ? context.options.lastUserPrompt.trim() : "";
29725
29864
  const commandDescription = typeof description2 === "string" ? description2.trim() : "";
29726
29865
  const effectiveCwd = cwd2 ? isAbsolute10(cwd2) ? cwd2 : resolve10(getCwd(), cwd2) : getCwd();
29866
+ try {
29867
+ await validateSafety(command4);
29868
+ } catch (error) {
29869
+ const msg = error instanceof Error ? error.message : String(error);
29870
+ const data = {
29871
+ stdout: "",
29872
+ stdoutLines: 0,
29873
+ stderr: msg,
29874
+ stderrLines: msg.split(/\r?\n/).length,
29875
+ interrupted: false
29876
+ };
29877
+ yield {
29878
+ type: "result",
29879
+ resultForAssistant: this.renderResultForAssistant(data),
29880
+ data
29881
+ };
29882
+ return;
29883
+ }
29727
29884
  const destructiveBlock = getBashDestructiveCommandBlock({
29728
29885
  command: command4,
29729
29886
  cwd: effectiveCwd,