pybao-cli 1.3.58 → 1.3.59

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 (132) hide show
  1. package/dist/REPL-HEB527L5.js +42 -0
  2. package/dist/{acp-LYCKM2TI.js → acp-XITLIU7Q.js} +26 -26
  3. package/dist/{agentsValidate-EC6END7F.js → agentsValidate-JJ7TRTOQ.js} +7 -7
  4. package/dist/{ask-GI5DRJBL.js → ask-MMUUUT4B.js} +25 -25
  5. package/dist/{autoUpdater-4YVYO24K.js → autoUpdater-ZLQ737K2.js} +3 -3
  6. package/dist/{chunk-GADM3OKI.js → chunk-2GU2JFSX.js} +3 -3
  7. package/dist/{chunk-4CP2V5UB.js → chunk-3FVHZRMZ.js} +2 -2
  8. package/dist/{chunk-O56GBI2I.js → chunk-4LOPGO3B.js} +1 -1
  9. package/dist/{chunk-H3AOUEYZ.js → chunk-4SQMIADE.js} +3 -3
  10. package/dist/{chunk-DSSBD4UT.js → chunk-7T3SDQOM.js} +115 -46
  11. package/dist/{chunk-DSSBD4UT.js.map → chunk-7T3SDQOM.js.map} +2 -2
  12. package/dist/{chunk-DYSHQCXS.js → chunk-BFRI6TO3.js} +3 -3
  13. package/dist/{chunk-BBBJBXZ6.js → chunk-CAEIEVV4.js} +2 -2
  14. package/dist/{chunk-MSPICB55.js → chunk-COW6GXO7.js} +1 -1
  15. package/dist/{chunk-EM5T4YJS.js → chunk-D3HU5ESS.js} +3 -3
  16. package/dist/{chunk-BRCVB4OQ.js → chunk-D43WGGGQ.js} +1 -1
  17. package/dist/{chunk-BRCVB4OQ.js.map → chunk-D43WGGGQ.js.map} +1 -1
  18. package/dist/{chunk-H56BFGRT.js → chunk-D57QJMYF.js} +1 -1
  19. package/dist/{chunk-2M2Y6OLD.js → chunk-GKXOFPYV.js} +1 -1
  20. package/dist/{chunk-32YJDWRZ.js → chunk-GKXPIENR.js} +2 -2
  21. package/dist/{chunk-2HDHGZNP.js → chunk-GMMRCXQX.js} +3 -3
  22. package/dist/{chunk-OS7WEAJM.js → chunk-HQLCQM4K.js} +1 -1
  23. package/dist/{chunk-ULUOA4VY.js → chunk-JQB6ZCIG.js} +3 -3
  24. package/dist/{chunk-DAFI6K22.js → chunk-JWU4GQ2S.js} +1 -1
  25. package/dist/{chunk-7GLJ7VAZ.js → chunk-KT7AFM3Y.js} +1 -1
  26. package/dist/{chunk-RYVUTLVX.js → chunk-L257TPK2.js} +4 -4
  27. package/dist/{chunk-HVP26Z5X.js → chunk-M3AEDKSE.js} +1 -1
  28. package/dist/{chunk-BZKMHEX2.js → chunk-MYP255MC.js} +2 -2
  29. package/dist/{chunk-TGCVWLDI.js → chunk-QZQTOGZM.js} +3 -3
  30. package/dist/{chunk-N67HYK7H.js → chunk-S3WJV47A.js} +2 -2
  31. package/dist/{chunk-BKZ334RO.js → chunk-X7KBX3SQ.js} +4 -4
  32. package/dist/{chunk-HP32GABR.js → chunk-YXGNHIAR.js} +1 -1
  33. package/dist/{chunk-IWH5QOYN.js → chunk-ZHEMMVLC.js} +51 -33
  34. package/dist/chunk-ZHEMMVLC.js.map +7 -0
  35. package/dist/{chunk-2DBHDKLM.js → chunk-ZNMRDNXQ.js} +2 -2
  36. package/dist/{cli-JXW4QLJN.js → cli-ELZD452T.js} +77 -77
  37. package/dist/commands-47J4IZ5B.js +46 -0
  38. package/dist/{config-7IZ34L3S.js → config-A5FS3ITW.js} +4 -4
  39. package/dist/{context-WJHUEGBB.js → context-6BCQFGSS.js} +5 -5
  40. package/dist/{customCommands-I6HIO3CU.js → customCommands-ZKTG4BIB.js} +4 -4
  41. package/dist/{env-PFX2FOIX.js → env-KAOLFIXM.js} +2 -2
  42. package/dist/index.js +3 -3
  43. package/dist/{llm-5HQRDZG7.js → llm-AGDCOH6K.js} +26 -26
  44. package/dist/{llmLazy-F4LFWEUT.js → llmLazy-VBZFVXPO.js} +1 -1
  45. package/dist/{loader-LGQ2KA4C.js → loader-M5FKPUT5.js} +4 -4
  46. package/dist/{mcp-RIYQ64VF.js → mcp-ONDCUJQX.js} +7 -7
  47. package/dist/{mentionProcessor-ET7OEP52.js → mentionProcessor-QWTLWXBL.js} +5 -5
  48. package/dist/{messages-3V3RGTF7.js → messages-NZH4WKUA.js} +1 -1
  49. package/dist/{model-5PVDBI7J.js → model-CUREHPKD.js} +5 -5
  50. package/dist/{openai-OU33FH52.js → openai-SJZZMS6K.js} +5 -5
  51. package/dist/{outputStyles-7HJA7JYF.js → outputStyles-BG6GI36T.js} +4 -4
  52. package/dist/{pluginRuntime-OAP2UR7S.js → pluginRuntime-I3F3K444.js} +6 -6
  53. package/dist/{pluginValidation-6IRCHOJG.js → pluginValidation-L32JDUBR.js} +6 -6
  54. package/dist/prompts-HL2KRZIG.js +48 -0
  55. package/dist/{pybAgentSessionLoad-O5HI5ZQA.js → pybAgentSessionLoad-3JI5P3QM.js} +4 -4
  56. package/dist/{pybAgentSessionResume-KXXOI5BO.js → pybAgentSessionResume-LAKDG73A.js} +4 -4
  57. package/dist/{pybAgentStreamJsonSession-25GKDW65.js → pybAgentStreamJsonSession-TYJWRHSN.js} +1 -1
  58. package/dist/{pybHooks-H74CE7GF.js → pybHooks-UFUN5PON.js} +4 -4
  59. package/dist/query-ZE4CEAEH.js +50 -0
  60. package/dist/{ripgrep-DFRTEML3.js → ripgrep-SQ2A2JPU.js} +3 -3
  61. package/dist/{skillMarketplace-AGLUOUCV.js → skillMarketplace-QN4IY5YS.js} +3 -3
  62. package/dist/{state-K5W2U5V2.js → state-2N5OZQTT.js} +2 -2
  63. package/dist/{theme-RBYITPVQ.js → theme-LPFPU3CC.js} +5 -5
  64. package/dist/{toolPermissionSettings-SZSO3AF2.js → toolPermissionSettings-EN35AC4Y.js} +6 -6
  65. package/dist/tools-PR5LQ74M.js +47 -0
  66. package/dist/{userInput-TAAQ7FYD.js → userInput-FCQ7553D.js} +27 -27
  67. package/package.json +1 -1
  68. package/dist/REPL-HRF7VBFT.js +0 -42
  69. package/dist/chunk-IWH5QOYN.js.map +0 -7
  70. package/dist/commands-KTMIKYCW.js +0 -46
  71. package/dist/prompts-SIYABMNP.js +0 -48
  72. package/dist/query-KQEDRTMJ.js +0 -50
  73. package/dist/tools-BCKNN3G6.js +0 -47
  74. /package/dist/{REPL-HRF7VBFT.js.map → REPL-HEB527L5.js.map} +0 -0
  75. /package/dist/{acp-LYCKM2TI.js.map → acp-XITLIU7Q.js.map} +0 -0
  76. /package/dist/{agentsValidate-EC6END7F.js.map → agentsValidate-JJ7TRTOQ.js.map} +0 -0
  77. /package/dist/{ask-GI5DRJBL.js.map → ask-MMUUUT4B.js.map} +0 -0
  78. /package/dist/{autoUpdater-4YVYO24K.js.map → autoUpdater-ZLQ737K2.js.map} +0 -0
  79. /package/dist/{chunk-GADM3OKI.js.map → chunk-2GU2JFSX.js.map} +0 -0
  80. /package/dist/{chunk-4CP2V5UB.js.map → chunk-3FVHZRMZ.js.map} +0 -0
  81. /package/dist/{chunk-O56GBI2I.js.map → chunk-4LOPGO3B.js.map} +0 -0
  82. /package/dist/{chunk-H3AOUEYZ.js.map → chunk-4SQMIADE.js.map} +0 -0
  83. /package/dist/{chunk-DYSHQCXS.js.map → chunk-BFRI6TO3.js.map} +0 -0
  84. /package/dist/{chunk-BBBJBXZ6.js.map → chunk-CAEIEVV4.js.map} +0 -0
  85. /package/dist/{chunk-MSPICB55.js.map → chunk-COW6GXO7.js.map} +0 -0
  86. /package/dist/{chunk-EM5T4YJS.js.map → chunk-D3HU5ESS.js.map} +0 -0
  87. /package/dist/{chunk-H56BFGRT.js.map → chunk-D57QJMYF.js.map} +0 -0
  88. /package/dist/{chunk-2M2Y6OLD.js.map → chunk-GKXOFPYV.js.map} +0 -0
  89. /package/dist/{chunk-32YJDWRZ.js.map → chunk-GKXPIENR.js.map} +0 -0
  90. /package/dist/{chunk-2HDHGZNP.js.map → chunk-GMMRCXQX.js.map} +0 -0
  91. /package/dist/{chunk-OS7WEAJM.js.map → chunk-HQLCQM4K.js.map} +0 -0
  92. /package/dist/{chunk-ULUOA4VY.js.map → chunk-JQB6ZCIG.js.map} +0 -0
  93. /package/dist/{chunk-DAFI6K22.js.map → chunk-JWU4GQ2S.js.map} +0 -0
  94. /package/dist/{chunk-7GLJ7VAZ.js.map → chunk-KT7AFM3Y.js.map} +0 -0
  95. /package/dist/{chunk-RYVUTLVX.js.map → chunk-L257TPK2.js.map} +0 -0
  96. /package/dist/{chunk-HVP26Z5X.js.map → chunk-M3AEDKSE.js.map} +0 -0
  97. /package/dist/{chunk-BZKMHEX2.js.map → chunk-MYP255MC.js.map} +0 -0
  98. /package/dist/{chunk-TGCVWLDI.js.map → chunk-QZQTOGZM.js.map} +0 -0
  99. /package/dist/{chunk-N67HYK7H.js.map → chunk-S3WJV47A.js.map} +0 -0
  100. /package/dist/{chunk-BKZ334RO.js.map → chunk-X7KBX3SQ.js.map} +0 -0
  101. /package/dist/{chunk-HP32GABR.js.map → chunk-YXGNHIAR.js.map} +0 -0
  102. /package/dist/{chunk-2DBHDKLM.js.map → chunk-ZNMRDNXQ.js.map} +0 -0
  103. /package/dist/{cli-JXW4QLJN.js.map → cli-ELZD452T.js.map} +0 -0
  104. /package/dist/{commands-KTMIKYCW.js.map → commands-47J4IZ5B.js.map} +0 -0
  105. /package/dist/{config-7IZ34L3S.js.map → config-A5FS3ITW.js.map} +0 -0
  106. /package/dist/{context-WJHUEGBB.js.map → context-6BCQFGSS.js.map} +0 -0
  107. /package/dist/{customCommands-I6HIO3CU.js.map → customCommands-ZKTG4BIB.js.map} +0 -0
  108. /package/dist/{env-PFX2FOIX.js.map → env-KAOLFIXM.js.map} +0 -0
  109. /package/dist/{llm-5HQRDZG7.js.map → llm-AGDCOH6K.js.map} +0 -0
  110. /package/dist/{llmLazy-F4LFWEUT.js.map → llmLazy-VBZFVXPO.js.map} +0 -0
  111. /package/dist/{loader-LGQ2KA4C.js.map → loader-M5FKPUT5.js.map} +0 -0
  112. /package/dist/{mcp-RIYQ64VF.js.map → mcp-ONDCUJQX.js.map} +0 -0
  113. /package/dist/{mentionProcessor-ET7OEP52.js.map → mentionProcessor-QWTLWXBL.js.map} +0 -0
  114. /package/dist/{messages-3V3RGTF7.js.map → messages-NZH4WKUA.js.map} +0 -0
  115. /package/dist/{model-5PVDBI7J.js.map → model-CUREHPKD.js.map} +0 -0
  116. /package/dist/{openai-OU33FH52.js.map → openai-SJZZMS6K.js.map} +0 -0
  117. /package/dist/{outputStyles-7HJA7JYF.js.map → outputStyles-BG6GI36T.js.map} +0 -0
  118. /package/dist/{pluginRuntime-OAP2UR7S.js.map → pluginRuntime-I3F3K444.js.map} +0 -0
  119. /package/dist/{pluginValidation-6IRCHOJG.js.map → pluginValidation-L32JDUBR.js.map} +0 -0
  120. /package/dist/{prompts-SIYABMNP.js.map → prompts-HL2KRZIG.js.map} +0 -0
  121. /package/dist/{pybAgentSessionLoad-O5HI5ZQA.js.map → pybAgentSessionLoad-3JI5P3QM.js.map} +0 -0
  122. /package/dist/{pybAgentSessionResume-KXXOI5BO.js.map → pybAgentSessionResume-LAKDG73A.js.map} +0 -0
  123. /package/dist/{pybAgentStreamJsonSession-25GKDW65.js.map → pybAgentStreamJsonSession-TYJWRHSN.js.map} +0 -0
  124. /package/dist/{pybHooks-H74CE7GF.js.map → pybHooks-UFUN5PON.js.map} +0 -0
  125. /package/dist/{query-KQEDRTMJ.js.map → query-ZE4CEAEH.js.map} +0 -0
  126. /package/dist/{ripgrep-DFRTEML3.js.map → ripgrep-SQ2A2JPU.js.map} +0 -0
  127. /package/dist/{skillMarketplace-AGLUOUCV.js.map → skillMarketplace-QN4IY5YS.js.map} +0 -0
  128. /package/dist/{state-K5W2U5V2.js.map → state-2N5OZQTT.js.map} +0 -0
  129. /package/dist/{theme-RBYITPVQ.js.map → theme-LPFPU3CC.js.map} +0 -0
  130. /package/dist/{toolPermissionSettings-SZSO3AF2.js.map → toolPermissionSettings-EN35AC4Y.js.map} +0 -0
  131. /package/dist/{tools-BCKNN3G6.js.map → tools-PR5LQ74M.js.map} +0 -0
  132. /package/dist/{userInput-TAAQ7FYD.js.map → userInput-FCQ7553D.js.map} +0 -0
@@ -0,0 +1,42 @@
1
+ import { createRequire as __pybCreateRequire } from "node:module";
2
+ const require = __pybCreateRequire(import.meta.url);
3
+ import {
4
+ REPL
5
+ } from "./chunk-ZHEMMVLC.js";
6
+ import "./chunk-D57QJMYF.js";
7
+ import "./chunk-L257TPK2.js";
8
+ import "./chunk-2GU2JFSX.js";
9
+ import "./chunk-HQLCQM4K.js";
10
+ import "./chunk-4LOPGO3B.js";
11
+ import "./chunk-MYP255MC.js";
12
+ import "./chunk-5P7HBXTD.js";
13
+ import "./chunk-3DFBSQIT.js";
14
+ import "./chunk-JQB6ZCIG.js";
15
+ import "./chunk-B6IMQJZM.js";
16
+ import "./chunk-ZNMRDNXQ.js";
17
+ import "./chunk-S3WJV47A.js";
18
+ import "./chunk-X7KBX3SQ.js";
19
+ import "./chunk-COW6GXO7.js";
20
+ import "./chunk-CAEIEVV4.js";
21
+ import "./chunk-D3HU5ESS.js";
22
+ import "./chunk-JWU4GQ2S.js";
23
+ import "./chunk-UNNVICVU.js";
24
+ import "./chunk-GKXPIENR.js";
25
+ import "./chunk-ERMQRV55.js";
26
+ import "./chunk-3FVHZRMZ.js";
27
+ import "./chunk-A3BVXXA3.js";
28
+ import "./chunk-BJSWTHRM.js";
29
+ import "./chunk-GKXOFPYV.js";
30
+ import "./chunk-BFRI6TO3.js";
31
+ import "./chunk-QZQTOGZM.js";
32
+ import "./chunk-KT7AFM3Y.js";
33
+ import "./chunk-4SQMIADE.js";
34
+ import "./chunk-RQVLBMP7.js";
35
+ import "./chunk-YXGNHIAR.js";
36
+ import "./chunk-M3AEDKSE.js";
37
+ import "./chunk-D43WGGGQ.js";
38
+ import "./chunk-OUXHGDLH.js";
39
+ import "./chunk-I3J4JYES.js";
40
+ export {
41
+ REPL
42
+ };
@@ -6,60 +6,60 @@ import {
6
6
  } from "./chunk-MWPFU2KU.js";
7
7
  import {
8
8
  getTools
9
- } from "./chunk-DSSBD4UT.js";
9
+ } from "./chunk-7T3SDQOM.js";
10
10
  import {
11
11
  getCommands,
12
12
  getSystemPrompt,
13
13
  grantReadPermissionForOriginalDir,
14
14
  hasPermissionsToUseTool,
15
15
  query
16
- } from "./chunk-IWH5QOYN.js";
17
- import "./chunk-H56BFGRT.js";
16
+ } from "./chunk-ZHEMMVLC.js";
17
+ import "./chunk-D57QJMYF.js";
18
18
  import {
19
19
  getClients
20
- } from "./chunk-RYVUTLVX.js";
21
- import "./chunk-GADM3OKI.js";
22
- import "./chunk-OS7WEAJM.js";
23
- import "./chunk-O56GBI2I.js";
24
- import "./chunk-BZKMHEX2.js";
20
+ } from "./chunk-L257TPK2.js";
21
+ import "./chunk-2GU2JFSX.js";
22
+ import "./chunk-HQLCQM4K.js";
23
+ import "./chunk-4LOPGO3B.js";
24
+ import "./chunk-MYP255MC.js";
25
25
  import "./chunk-5P7HBXTD.js";
26
26
  import "./chunk-3DFBSQIT.js";
27
- import "./chunk-ULUOA4VY.js";
27
+ import "./chunk-JQB6ZCIG.js";
28
28
  import "./chunk-B6IMQJZM.js";
29
- import "./chunk-2DBHDKLM.js";
30
- import "./chunk-N67HYK7H.js";
31
- import "./chunk-BKZ334RO.js";
32
- import "./chunk-MSPICB55.js";
33
- import "./chunk-BBBJBXZ6.js";
29
+ import "./chunk-ZNMRDNXQ.js";
30
+ import "./chunk-S3WJV47A.js";
31
+ import "./chunk-X7KBX3SQ.js";
32
+ import "./chunk-COW6GXO7.js";
33
+ import "./chunk-CAEIEVV4.js";
34
34
  import {
35
35
  loadToolPermissionContextFromDisk,
36
36
  persistToolPermissionUpdateToDisk
37
- } from "./chunk-EM5T4YJS.js";
38
- import "./chunk-DAFI6K22.js";
37
+ } from "./chunk-D3HU5ESS.js";
38
+ import "./chunk-JWU4GQ2S.js";
39
39
  import {
40
40
  applyToolPermissionContextUpdates
41
41
  } from "./chunk-UNNVICVU.js";
42
- import "./chunk-32YJDWRZ.js";
42
+ import "./chunk-GKXPIENR.js";
43
43
  import "./chunk-ERMQRV55.js";
44
- import "./chunk-4CP2V5UB.js";
44
+ import "./chunk-3FVHZRMZ.js";
45
45
  import "./chunk-A3BVXXA3.js";
46
46
  import "./chunk-BJSWTHRM.js";
47
47
  import {
48
48
  createAssistantMessage,
49
49
  createUserMessage
50
- } from "./chunk-2M2Y6OLD.js";
51
- import "./chunk-DYSHQCXS.js";
50
+ } from "./chunk-GKXOFPYV.js";
51
+ import "./chunk-BFRI6TO3.js";
52
52
  import {
53
53
  getContext
54
- } from "./chunk-TGCVWLDI.js";
55
- import "./chunk-7GLJ7VAZ.js";
54
+ } from "./chunk-QZQTOGZM.js";
55
+ import "./chunk-KT7AFM3Y.js";
56
56
  import {
57
57
  enableConfigs
58
- } from "./chunk-H3AOUEYZ.js";
58
+ } from "./chunk-4SQMIADE.js";
59
59
  import "./chunk-RQVLBMP7.js";
60
60
  import {
61
61
  initDebugLogger
62
- } from "./chunk-HP32GABR.js";
62
+ } from "./chunk-YXGNHIAR.js";
63
63
  import {
64
64
  PRODUCT_COMMAND,
65
65
  getPybBaseDir,
@@ -67,10 +67,10 @@ import {
67
67
  logError,
68
68
  setCwd,
69
69
  setOriginalCwd
70
- } from "./chunk-HVP26Z5X.js";
70
+ } from "./chunk-M3AEDKSE.js";
71
71
  import {
72
72
  MACRO
73
- } from "./chunk-BRCVB4OQ.js";
73
+ } from "./chunk-D43WGGGQ.js";
74
74
  import "./chunk-OUXHGDLH.js";
75
75
  import "./chunk-I3J4JYES.js";
76
76
 
@@ -2,12 +2,12 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getModelManager
5
- } from "./chunk-DYSHQCXS.js";
6
- import "./chunk-H3AOUEYZ.js";
5
+ } from "./chunk-BFRI6TO3.js";
6
+ import "./chunk-4SQMIADE.js";
7
7
  import "./chunk-RQVLBMP7.js";
8
- import "./chunk-HP32GABR.js";
9
- import "./chunk-HVP26Z5X.js";
10
- import "./chunk-BRCVB4OQ.js";
8
+ import "./chunk-YXGNHIAR.js";
9
+ import "./chunk-M3AEDKSE.js";
10
+ import "./chunk-D43WGGGQ.js";
11
11
  import "./chunk-I3J4JYES.js";
12
12
 
13
13
  // src/entrypoints/cli/agentsValidate.ts
@@ -344,8 +344,8 @@ async function validateAgentTemplates(args) {
344
344
  let knownToolNames;
345
345
  if (args.checkTools) {
346
346
  try {
347
- const { getTools } = await import("./tools-BCKNN3G6.js");
348
- const { getCurrentProjectConfig } = await import("./config-7IZ34L3S.js");
347
+ const { getTools } = await import("./tools-PR5LQ74M.js");
348
+ const { getCurrentProjectConfig } = await import("./config-A5FS3ITW.js");
349
349
  const allTools = await getTools(getCurrentProjectConfig().enableArchitectTool);
350
350
  knownToolNames = new Set(allTools.map((t) => t.name));
351
351
  } catch {
@@ -3,49 +3,49 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getSystemPrompt,
5
5
  query
6
- } from "./chunk-IWH5QOYN.js";
7
- import "./chunk-H56BFGRT.js";
8
- import "./chunk-RYVUTLVX.js";
9
- import "./chunk-GADM3OKI.js";
10
- import "./chunk-OS7WEAJM.js";
11
- import "./chunk-O56GBI2I.js";
12
- import "./chunk-BZKMHEX2.js";
6
+ } from "./chunk-ZHEMMVLC.js";
7
+ import "./chunk-D57QJMYF.js";
8
+ import "./chunk-L257TPK2.js";
9
+ import "./chunk-2GU2JFSX.js";
10
+ import "./chunk-HQLCQM4K.js";
11
+ import "./chunk-4LOPGO3B.js";
12
+ import "./chunk-MYP255MC.js";
13
13
  import "./chunk-5P7HBXTD.js";
14
14
  import "./chunk-3DFBSQIT.js";
15
- import "./chunk-ULUOA4VY.js";
15
+ import "./chunk-JQB6ZCIG.js";
16
16
  import "./chunk-B6IMQJZM.js";
17
- import "./chunk-2DBHDKLM.js";
18
- import "./chunk-N67HYK7H.js";
19
- import "./chunk-BKZ334RO.js";
20
- import "./chunk-MSPICB55.js";
21
- import "./chunk-BBBJBXZ6.js";
22
- import "./chunk-EM5T4YJS.js";
23
- import "./chunk-DAFI6K22.js";
17
+ import "./chunk-ZNMRDNXQ.js";
18
+ import "./chunk-S3WJV47A.js";
19
+ import "./chunk-X7KBX3SQ.js";
20
+ import "./chunk-COW6GXO7.js";
21
+ import "./chunk-CAEIEVV4.js";
22
+ import "./chunk-D3HU5ESS.js";
23
+ import "./chunk-JWU4GQ2S.js";
24
24
  import "./chunk-UNNVICVU.js";
25
- import "./chunk-32YJDWRZ.js";
25
+ import "./chunk-GKXPIENR.js";
26
26
  import "./chunk-ERMQRV55.js";
27
- import "./chunk-4CP2V5UB.js";
27
+ import "./chunk-3FVHZRMZ.js";
28
28
  import "./chunk-A3BVXXA3.js";
29
29
  import "./chunk-BJSWTHRM.js";
30
30
  import {
31
31
  createUserMessage
32
- } from "./chunk-2M2Y6OLD.js";
32
+ } from "./chunk-GKXOFPYV.js";
33
33
  import {
34
34
  getModelManager
35
- } from "./chunk-DYSHQCXS.js";
35
+ } from "./chunk-BFRI6TO3.js";
36
36
  import {
37
37
  getContext
38
- } from "./chunk-TGCVWLDI.js";
39
- import "./chunk-7GLJ7VAZ.js";
40
- import "./chunk-H3AOUEYZ.js";
38
+ } from "./chunk-QZQTOGZM.js";
39
+ import "./chunk-KT7AFM3Y.js";
40
+ import "./chunk-4SQMIADE.js";
41
41
  import "./chunk-RQVLBMP7.js";
42
- import "./chunk-HP32GABR.js";
42
+ import "./chunk-YXGNHIAR.js";
43
43
  import {
44
44
  getMessagesPath,
45
45
  overwriteLog,
46
46
  setCwd
47
- } from "./chunk-HVP26Z5X.js";
48
- import "./chunk-BRCVB4OQ.js";
47
+ } from "./chunk-M3AEDKSE.js";
48
+ import "./chunk-D43WGGGQ.js";
49
49
  import {
50
50
  getTotalCost
51
51
  } from "./chunk-OUXHGDLH.js";
@@ -5,9 +5,9 @@ import {
5
5
  checkAndNotifyUpdate,
6
6
  getLatestVersion,
7
7
  getUpdateCommandSuggestions
8
- } from "./chunk-2HDHGZNP.js";
9
- import "./chunk-HVP26Z5X.js";
10
- import "./chunk-BRCVB4OQ.js";
8
+ } from "./chunk-GMMRCXQX.js";
9
+ import "./chunk-M3AEDKSE.js";
10
+ import "./chunk-D43WGGGQ.js";
11
11
  import "./chunk-I3J4JYES.js";
12
12
  export {
13
13
  assertMinVersion,
@@ -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-OS7WEAJM.js";
5
+ } from "./chunk-HQLCQM4K.js";
6
6
  import {
7
7
  parseFrontmatter
8
- } from "./chunk-BBBJBXZ6.js";
8
+ } from "./chunk-CAEIEVV4.js";
9
9
  import {
10
10
  getCwd
11
- } from "./chunk-HVP26Z5X.js";
11
+ } from "./chunk-M3AEDKSE.js";
12
12
 
13
13
  // src/services/plugins/pluginValidation.ts
14
14
  import { existsSync, lstatSync, readFileSync } from "node:fs";
@@ -8,11 +8,11 @@ import {
8
8
  } from "./chunk-BJSWTHRM.js";
9
9
  import {
10
10
  debug
11
- } from "./chunk-HP32GABR.js";
11
+ } from "./chunk-YXGNHIAR.js";
12
12
  import {
13
13
  getCwd,
14
14
  logError
15
- } from "./chunk-HVP26Z5X.js";
15
+ } from "./chunk-M3AEDKSE.js";
16
16
 
17
17
  // src/utils/agent/loader.ts
18
18
  import {
@@ -2,7 +2,7 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getSessionProjectDir
5
- } from "./chunk-BZKMHEX2.js";
5
+ } from "./chunk-MYP255MC.js";
6
6
  import {
7
7
  isUuid
8
8
  } from "./chunk-5P7HBXTD.js";
@@ -5,12 +5,12 @@ import {
5
5
  } from "./chunk-RQVLBMP7.js";
6
6
  import {
7
7
  debug
8
- } from "./chunk-HP32GABR.js";
8
+ } from "./chunk-YXGNHIAR.js";
9
9
  import {
10
10
  getCwd,
11
11
  getGlobalConfigFilePath,
12
12
  logError
13
- } from "./chunk-HVP26Z5X.js";
13
+ } from "./chunk-M3AEDKSE.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-5PVDBI7J.js").then(({ reloadModelManager }) => {
663
+ import("./model-CUREHPKD.js").then(({ reloadModelManager }) => {
664
664
  reloadModelManager();
665
665
  });
666
666
  }
@@ -3,6 +3,7 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  AskUserQuestionTool,
5
5
  BashTool,
6
+ BlockAnchorReplacer,
6
7
  Cost,
7
8
  EnterPlanModeTool,
8
9
  ExitPlanModeTool,
@@ -12,6 +13,7 @@ import {
12
13
  GlobTool,
13
14
  GrepTool,
14
15
  KillShellTool,
16
+ LineTrimmedReplacer,
15
17
  NotebookEditTool,
16
18
  ParserRegistry,
17
19
  SkillTool,
@@ -19,6 +21,7 @@ import {
19
21
  TodoWriteTool,
20
22
  WebFetchTool,
21
23
  WebSearchTool,
24
+ WhitespaceNormalizedReplacer,
22
25
  applyMarkdown,
23
26
  countTokens,
24
27
  fileExistsBun,
@@ -30,45 +33,45 @@ import {
30
33
  hasWritePermission,
31
34
  loadLanguage,
32
35
  query
33
- } from "./chunk-IWH5QOYN.js";
36
+ } from "./chunk-ZHEMMVLC.js";
34
37
  import {
35
38
  FallbackToolUseRejectedMessage,
36
39
  MCPTool,
37
40
  getClients,
38
41
  getMCPTools
39
- } from "./chunk-RYVUTLVX.js";
42
+ } from "./chunk-L257TPK2.js";
40
43
  import {
41
44
  queryLLM
42
- } from "./chunk-BKZ334RO.js";
45
+ } from "./chunk-X7KBX3SQ.js";
43
46
  import {
44
47
  tree
45
- } from "./chunk-MSPICB55.js";
48
+ } from "./chunk-COW6GXO7.js";
46
49
  import {
47
50
  generateAgentId
48
- } from "./chunk-32YJDWRZ.js";
51
+ } from "./chunk-GKXPIENR.js";
49
52
  import {
50
53
  getActiveAgents,
51
54
  getAgentByType,
52
55
  getAvailableAgentTypes
53
- } from "./chunk-4CP2V5UB.js";
56
+ } from "./chunk-3FVHZRMZ.js";
54
57
  import {
55
58
  INTERRUPT_MESSAGE,
56
59
  createAssistantMessage,
57
60
  createUserMessage,
58
61
  getLastAssistantMessageId
59
- } from "./chunk-2M2Y6OLD.js";
62
+ } from "./chunk-GKXOFPYV.js";
60
63
  import {
61
64
  getModelManager
62
- } from "./chunk-DYSHQCXS.js";
65
+ } from "./chunk-BFRI6TO3.js";
63
66
  import {
64
67
  getContext
65
- } from "./chunk-TGCVWLDI.js";
68
+ } from "./chunk-QZQTOGZM.js";
66
69
  import {
67
70
  getTheme
68
- } from "./chunk-7GLJ7VAZ.js";
71
+ } from "./chunk-KT7AFM3Y.js";
69
72
  import {
70
73
  debug
71
- } from "./chunk-HP32GABR.js";
74
+ } from "./chunk-YXGNHIAR.js";
72
75
  import {
73
76
  BunShell,
74
77
  getCwd,
@@ -77,7 +80,7 @@ import {
77
80
  logError,
78
81
  overwriteLog,
79
82
  readTaskOutput
80
- } from "./chunk-HVP26Z5X.js";
83
+ } from "./chunk-M3AEDKSE.js";
81
84
  import {
82
85
  formatDuration,
83
86
  formatNumber
@@ -3110,6 +3113,54 @@ import { z as z7 } from "zod";
3110
3113
 
3111
3114
  // src/utils/diff/patch-manager.ts
3112
3115
  var PatchManager = class {
3116
+ static applyTransactional(patches, fileContents, options = { strategy: "strict" }) {
3117
+ const result = {
3118
+ success: true,
3119
+ partialSuccess: false,
3120
+ committedFiles: [],
3121
+ failedFiles: [],
3122
+ newContents: /* @__PURE__ */ new Map(),
3123
+ errors: /* @__PURE__ */ new Map()
3124
+ };
3125
+ const tempResults = /* @__PURE__ */ new Map();
3126
+ for (const patch of patches) {
3127
+ const content = fileContents.get(patch.filePath);
3128
+ if (content === void 0) {
3129
+ result.failedFiles.push(patch.filePath);
3130
+ result.errors.set(patch.filePath, "File not found in provided contents");
3131
+ result.success = false;
3132
+ continue;
3133
+ }
3134
+ try {
3135
+ const newContent = this.apply(content, patch.hunks);
3136
+ tempResults.set(patch.filePath, newContent);
3137
+ } catch (error) {
3138
+ result.failedFiles.push(patch.filePath);
3139
+ result.errors.set(patch.filePath, error.message);
3140
+ result.success = false;
3141
+ }
3142
+ }
3143
+ if (options.strategy === "strict") {
3144
+ if (!result.success) {
3145
+ result.committedFiles = [];
3146
+ result.newContents.clear();
3147
+ } else {
3148
+ for (const [file, content] of tempResults) {
3149
+ result.committedFiles.push(file);
3150
+ result.newContents.set(file, content);
3151
+ }
3152
+ }
3153
+ } else {
3154
+ for (const [file, content] of tempResults) {
3155
+ result.committedFiles.push(file);
3156
+ result.newContents.set(file, content);
3157
+ }
3158
+ if (result.failedFiles.length > 0 && result.committedFiles.length > 0) {
3159
+ result.partialSuccess = true;
3160
+ }
3161
+ }
3162
+ return result;
3163
+ }
3113
3164
  static parseMultiFileDiff(diff) {
3114
3165
  const lines = diff.split("\n");
3115
3166
  const patches = [];
@@ -3250,6 +3301,19 @@ var PatchManager = class {
3250
3301
  return i;
3251
3302
  }
3252
3303
  }
3304
+ const contentFromStart = lines.slice(startIndex).join("\n");
3305
+ const contextStr = context.join("\n");
3306
+ const strategies = [LineTrimmedReplacer, WhitespaceNormalizedReplacer, BlockAnchorReplacer];
3307
+ for (const replacer of strategies) {
3308
+ for (const match of replacer(contentFromStart, contextStr)) {
3309
+ const matchIndex = contentFromStart.indexOf(match);
3310
+ if (matchIndex !== -1) {
3311
+ const linesBefore = contentFromStart.substring(0, matchIndex).split("\n");
3312
+ const lineOffset = linesBefore.length - 1;
3313
+ return startIndex + lineOffset;
3314
+ }
3315
+ }
3316
+ }
3253
3317
  return -1;
3254
3318
  }
3255
3319
  };
@@ -3262,13 +3326,14 @@ var DESCRIPTION5 = `Apply a unified diff patch to one or more files.
3262
3326
 
3263
3327
  Usage:
3264
3328
  - Provide a standard unified diff string (starting with \`--- a/file\` and \`+++ b/file\`).
3265
- - The tool uses "Smart Patch" logic: it ignores strict line numbers in the diff header (e.g., \`@@ -10,5 +10,5 @@\`) and instead uses the context lines (lines starting with space) to locate the code block.
3266
- - This allows you to apply patches even if the file has changed slightly (e.g., lines shifted), as long as the context matches.
3267
- - Supports applying changes to MULTIPLE files in a single atomic operation. If any file fails to patch, NO files will be changed.
3329
+ - The tool uses "Smart Patch" logic: it ignores strict line numbers in the diff header and uses context lines (starting with space) to locate the code block.
3330
+ - **Smart Context**: It tolerates minor indentation/whitespace differences between the diff context and the actual file (Fuzzy Matching).
3331
+ - **Atomic Transaction**: Supports applying changes to MULTIPLE files in a single atomic operation. If any file fails to patch (even after fuzzy matching), NO files will be changed (Strict Atomicity).
3332
+ - **Rich Feedback**: If a patch fails, the tool provides a detailed report explaining which file failed and why, allowing you to self-correct or fallback to EditTool.
3268
3333
 
3269
3334
  When to use:
3270
- - Complex refactoring involving multiple files.
3271
- - Applying changes where you are confident about the context but unsure about exact line numbers.
3335
+ - Complex refactoring involving multiple files (e.g., changing a function signature in .h and .cpp).
3336
+ - Applying structured changes where context is critical.
3272
3337
  - When you want to ensure atomicity across multiple file edits.
3273
3338
 
3274
3339
  Example:
@@ -3332,39 +3397,43 @@ var PatchTool = {
3332
3397
  if (patches.length === 0) {
3333
3398
  throw new Error("No valid hunks found in patch. Ensure standard Unified Diff format with file headers (---/+++).");
3334
3399
  }
3335
- const plan = [];
3336
- const messages = [];
3337
- let fallbackCandidate = null;
3338
- try {
3339
- for (const p of patches) {
3340
- let filePath = p.filePath.trim();
3341
- if (!fileExistsBun(filePath) && (filePath.startsWith("a/") || filePath.startsWith("b/"))) {
3342
- const stripped = filePath.substring(2);
3343
- if (fileExistsBun(stripped)) {
3344
- filePath = stripped;
3345
- }
3346
- }
3347
- if (!fileExistsBun(filePath)) {
3348
- throw new Error(`Target file not found: ${filePath}`);
3349
- }
3350
- const content = readFileSync4(filePath, "utf-8");
3351
- try {
3352
- const newContent = PatchManager.apply(content, p.hunks);
3353
- plan.push({ filePath, newContent });
3354
- } catch (e) {
3355
- if (patches.length === 1 && p.hunks.length === 1) {
3356
- throw new Error(`Failed to apply patch to ${filePath}. Context mismatch detected. Recommendation: Use 'Edit' tool for this file as it supports fuzzy matching.`);
3357
- }
3358
- throw new Error(`Failed to apply patch to ${filePath}: ${e.message}`);
3400
+ const fileContents = /* @__PURE__ */ new Map();
3401
+ const resolvedPaths = /* @__PURE__ */ new Map();
3402
+ for (const p of patches) {
3403
+ let filePath = p.filePath.trim();
3404
+ if (!fileExistsBun(filePath) && (filePath.startsWith("a/") || filePath.startsWith("b/"))) {
3405
+ const stripped = filePath.substring(2);
3406
+ if (fileExistsBun(stripped)) {
3407
+ filePath = stripped;
3359
3408
  }
3360
3409
  }
3361
- } catch (e) {
3362
- throw e;
3410
+ if (!fileExistsBun(filePath)) {
3411
+ throw new Error(`Target file not found: ${filePath}`);
3412
+ }
3413
+ resolvedPaths.set(p.filePath, filePath);
3414
+ const content = readFileSync4(filePath, "utf-8");
3415
+ fileContents.set(p.filePath, content);
3416
+ }
3417
+ const result = PatchManager.applyTransactional(patches, fileContents, { strategy: "strict" });
3418
+ if (!result.success) {
3419
+ const failures = result.failedFiles.map((f) => {
3420
+ const err = result.errors.get(f) || "Unknown error";
3421
+ return `- ${f}: ${err}`;
3422
+ }).join("\n");
3423
+ throw new Error(
3424
+ `Patch failed (Atomic Rollback). No files were changed.
3425
+ Failures:
3426
+ ${failures}
3427
+ Recommendation: Use 'Edit' tool for failed files or fix the patch context.`
3428
+ );
3363
3429
  }
3364
3430
  const changedFiles = [];
3365
- for (const item of plan) {
3366
- writeFileSync2(item.filePath, item.newContent);
3367
- changedFiles.push(item.filePath);
3431
+ for (const [patchPath, newContent] of result.newContents) {
3432
+ const absPath = resolvedPaths.get(patchPath);
3433
+ if (absPath) {
3434
+ writeFileSync2(absPath, newContent);
3435
+ changedFiles.push(absPath);
3436
+ }
3368
3437
  }
3369
3438
  yield {
3370
3439
  type: "result",