pybao-cli 1.4.16 → 1.4.17

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 (145) hide show
  1. package/dist/REPL-2HTMFGA5.js +47 -0
  2. package/dist/{acp-4BY6E74V.js → acp-2LOJ6G5I.js} +29 -29
  3. package/dist/{agentsValidate-ZW4UZ6WJ.js → agentsValidate-JHFP6CBL.js} +7 -7
  4. package/dist/{ask-EZLW4GJR.js → ask-7S7OPAEK.js} +28 -28
  5. package/dist/{autoUpdater-YJD7A6N4.js → autoUpdater-JB2N6XSK.js} +3 -3
  6. package/dist/{chunk-XS2CSGZS.js → chunk-26DNH5MY.js} +2 -2
  7. package/dist/{chunk-DQPO3BVO.js → chunk-26VECGIJ.js} +5 -3
  8. package/dist/{chunk-DQPO3BVO.js.map → chunk-26VECGIJ.js.map} +2 -2
  9. package/dist/{chunk-OYKPAK4T.js → chunk-3H7JCOX7.js} +1 -1
  10. package/dist/{chunk-PDIYFR3M.js → chunk-5IIJ6XQX.js} +4 -4
  11. package/dist/{chunk-6NAGAGUN.js → chunk-5KZB52GW.js} +1 -1
  12. package/dist/{chunk-HBAL4UBJ.js → chunk-7SGVFJWX.js} +1 -1
  13. package/dist/{chunk-5LU4IMRO.js → chunk-AHK3NVAX.js} +3 -3
  14. package/dist/{chunk-NKATIHUV.js → chunk-AHO6SRRR.js} +3 -3
  15. package/dist/{chunk-54BVQTJK.js → chunk-CDKFT2GF.js} +1 -1
  16. package/dist/{chunk-U4K7D5BX.js → chunk-CIUNX2UP.js} +1 -1
  17. package/dist/{chunk-GFFEE5LM.js → chunk-CZRFLOQG.js} +9 -6
  18. package/dist/{chunk-GFFEE5LM.js.map → chunk-CZRFLOQG.js.map} +2 -2
  19. package/dist/{chunk-3WE2Y7IS.js → chunk-DXIIHIJG.js} +1 -1
  20. package/dist/{chunk-YM3LU2U2.js → chunk-EHFY3DA7.js} +1 -1
  21. package/dist/{chunk-KV2VMNNF.js → chunk-JUVESM6V.js} +4 -4
  22. package/dist/{chunk-W4PHX55O.js → chunk-K45LL6PV.js} +2 -2
  23. package/dist/{chunk-X2WFPPZ6.js → chunk-KEBVFZAX.js} +1 -1
  24. package/dist/{chunk-2NZLVZZN.js → chunk-KKILDPBV.js} +2 -2
  25. package/dist/{chunk-GMNQLICU.js → chunk-NSID4TSV.js} +3 -3
  26. package/dist/{chunk-N3LB5QDW.js → chunk-PPTMKZPO.js} +1 -1
  27. package/dist/{chunk-N3LB5QDW.js.map → chunk-PPTMKZPO.js.map} +1 -1
  28. package/dist/{chunk-MBQBME2D.js → chunk-QKOT6XYY.js} +2 -2
  29. package/dist/{chunk-BCVME6IW.js → chunk-QSP2L4AM.js} +3 -3
  30. package/dist/{chunk-RU2QOEST.js → chunk-RJK6AYKB.js} +3 -3
  31. package/dist/{chunk-AYTHH4OG.js → chunk-S4KCBRDZ.js} +50 -40
  32. package/dist/{chunk-AYTHH4OG.js.map → chunk-S4KCBRDZ.js.map} +3 -3
  33. package/dist/{chunk-JANMYCFI.js → chunk-ULOUEAT2.js} +16 -16
  34. package/dist/{chunk-GZCFWOTQ.js → chunk-X6LUQUI4.js} +4 -4
  35. package/dist/{chunk-FXQWQEBJ.js → chunk-XM7MBTOO.js} +2 -2
  36. package/dist/{chunk-BHRSSA7V.js → chunk-XVZ7ZX2L.js} +1 -1
  37. package/dist/{chunk-KNILDMY5.js → chunk-YJWJ5DGO.js} +2 -2
  38. package/dist/{chunk-BN67YCOJ.js → chunk-ZHPKJVUT.js} +3 -3
  39. package/dist/{chunk-EH2JWJOR.js → chunk-ZQ4IZUPH.js} +3 -3
  40. package/dist/{cli-HVIIKEBZ.js → cli-HMY2IU2T.js} +87 -87
  41. package/dist/commands-AAP4MYTL.js +51 -0
  42. package/dist/{config-I3OK6HOR.js → config-A7PN2NDW.js} +4 -4
  43. package/dist/{context-F3UBAWUR.js → context-SXT7XLXT.js} +6 -6
  44. package/dist/{customCommands-CT4UBTJ3.js → customCommands-KXTQJO3S.js} +4 -4
  45. package/dist/{env-SEQVESNX.js → env-MACCQLTW.js} +2 -2
  46. package/dist/{file-OXKLY56G.js → file-HC4EKI7Z.js} +4 -4
  47. package/dist/index.js +3 -3
  48. package/dist/{llm-IOCHHLE3.js → llm-OTFTXTXY.js} +29 -29
  49. package/dist/{llmLazy-RIVBXEHP.js → llmLazy-PQ5HCZ4E.js} +1 -1
  50. package/dist/{loader-5OLPHZPH.js → loader-VHBERR5P.js} +4 -4
  51. package/dist/{lsp-XM7AJFRL.js → lsp-Y5UUXXVU.js} +6 -6
  52. package/dist/{lspAnchor-2GDDRGLD.js → lspAnchor-FJ2SXT5X.js} +6 -6
  53. package/dist/{mcp-UWYF5ZSK.js → mcp-V3E2FBYM.js} +7 -7
  54. package/dist/{mentionProcessor-JYOTYUQB.js → mentionProcessor-FCHEM7NU.js} +5 -5
  55. package/dist/{messages-ZCWO6COZ.js → messages-UYHRONQS.js} +1 -1
  56. package/dist/{model-MECAPV7A.js → model-YPKZ4DQ3.js} +5 -5
  57. package/dist/{openai-J6EXXQCF.js → openai-P2TQWQKC.js} +5 -5
  58. package/dist/{outputStyles-L665IA2S.js → outputStyles-CSGYX64E.js} +4 -4
  59. package/dist/{pluginRuntime-JUC5IBC4.js → pluginRuntime-EP4ATLRC.js} +6 -6
  60. package/dist/{pluginValidation-SCGOD6ES.js → pluginValidation-3ZURFUHM.js} +6 -6
  61. package/dist/prompts-ATUILKIJ.js +53 -0
  62. package/dist/{pybAgentSessionLoad-IYZLFHHD.js → pybAgentSessionLoad-QZIINLCD.js} +4 -4
  63. package/dist/{pybAgentSessionResume-EOHQNKTV.js → pybAgentSessionResume-3XND5AZG.js} +4 -4
  64. package/dist/{pybAgentStreamJsonSession-KL2P62KD.js → pybAgentStreamJsonSession-JQPASPNN.js} +1 -1
  65. package/dist/{pybHooks-TN6MSHW2.js → pybHooks-J3KPSFJI.js} +4 -4
  66. package/dist/query-ID3RUBSI.js +55 -0
  67. package/dist/{registry-KEXYTSWO.js → registry-HBS4R3GL.js} +5 -5
  68. package/dist/{ripgrep-2BKEMATD.js → ripgrep-IDPG6V7P.js} +3 -3
  69. package/dist/{skillMarketplace-GQGXOINV.js → skillMarketplace-VA7VL5D5.js} +3 -3
  70. package/dist/{state-72LIFZIK.js → state-GU2VJXIZ.js} +2 -2
  71. package/dist/{theme-M23WLSPC.js → theme-GZQWHNWP.js} +5 -5
  72. package/dist/{toolPermissionSettings-A5FWQUS2.js → toolPermissionSettings-XJ6CKWDG.js} +6 -6
  73. package/dist/tools-EVR75R24.js +52 -0
  74. package/dist/{userInput-CQF6H7YG.js → userInput-ABKKAHHH.js} +30 -30
  75. package/package.json +1 -1
  76. package/dist/REPL-OP67MYUI.js +0 -47
  77. package/dist/commands-LPHKMDQQ.js +0 -51
  78. package/dist/prompts-T3UK52SE.js +0 -53
  79. package/dist/query-W4AHBITB.js +0 -55
  80. package/dist/tools-GTXU2Z34.js +0 -52
  81. /package/dist/{REPL-OP67MYUI.js.map → REPL-2HTMFGA5.js.map} +0 -0
  82. /package/dist/{acp-4BY6E74V.js.map → acp-2LOJ6G5I.js.map} +0 -0
  83. /package/dist/{agentsValidate-ZW4UZ6WJ.js.map → agentsValidate-JHFP6CBL.js.map} +0 -0
  84. /package/dist/{ask-EZLW4GJR.js.map → ask-7S7OPAEK.js.map} +0 -0
  85. /package/dist/{autoUpdater-YJD7A6N4.js.map → autoUpdater-JB2N6XSK.js.map} +0 -0
  86. /package/dist/{chunk-XS2CSGZS.js.map → chunk-26DNH5MY.js.map} +0 -0
  87. /package/dist/{chunk-OYKPAK4T.js.map → chunk-3H7JCOX7.js.map} +0 -0
  88. /package/dist/{chunk-PDIYFR3M.js.map → chunk-5IIJ6XQX.js.map} +0 -0
  89. /package/dist/{chunk-6NAGAGUN.js.map → chunk-5KZB52GW.js.map} +0 -0
  90. /package/dist/{chunk-HBAL4UBJ.js.map → chunk-7SGVFJWX.js.map} +0 -0
  91. /package/dist/{chunk-5LU4IMRO.js.map → chunk-AHK3NVAX.js.map} +0 -0
  92. /package/dist/{chunk-NKATIHUV.js.map → chunk-AHO6SRRR.js.map} +0 -0
  93. /package/dist/{chunk-54BVQTJK.js.map → chunk-CDKFT2GF.js.map} +0 -0
  94. /package/dist/{chunk-U4K7D5BX.js.map → chunk-CIUNX2UP.js.map} +0 -0
  95. /package/dist/{chunk-3WE2Y7IS.js.map → chunk-DXIIHIJG.js.map} +0 -0
  96. /package/dist/{chunk-YM3LU2U2.js.map → chunk-EHFY3DA7.js.map} +0 -0
  97. /package/dist/{chunk-KV2VMNNF.js.map → chunk-JUVESM6V.js.map} +0 -0
  98. /package/dist/{chunk-W4PHX55O.js.map → chunk-K45LL6PV.js.map} +0 -0
  99. /package/dist/{chunk-X2WFPPZ6.js.map → chunk-KEBVFZAX.js.map} +0 -0
  100. /package/dist/{chunk-2NZLVZZN.js.map → chunk-KKILDPBV.js.map} +0 -0
  101. /package/dist/{chunk-GMNQLICU.js.map → chunk-NSID4TSV.js.map} +0 -0
  102. /package/dist/{chunk-MBQBME2D.js.map → chunk-QKOT6XYY.js.map} +0 -0
  103. /package/dist/{chunk-BCVME6IW.js.map → chunk-QSP2L4AM.js.map} +0 -0
  104. /package/dist/{chunk-RU2QOEST.js.map → chunk-RJK6AYKB.js.map} +0 -0
  105. /package/dist/{chunk-JANMYCFI.js.map → chunk-ULOUEAT2.js.map} +0 -0
  106. /package/dist/{chunk-GZCFWOTQ.js.map → chunk-X6LUQUI4.js.map} +0 -0
  107. /package/dist/{chunk-FXQWQEBJ.js.map → chunk-XM7MBTOO.js.map} +0 -0
  108. /package/dist/{chunk-BHRSSA7V.js.map → chunk-XVZ7ZX2L.js.map} +0 -0
  109. /package/dist/{chunk-KNILDMY5.js.map → chunk-YJWJ5DGO.js.map} +0 -0
  110. /package/dist/{chunk-BN67YCOJ.js.map → chunk-ZHPKJVUT.js.map} +0 -0
  111. /package/dist/{chunk-EH2JWJOR.js.map → chunk-ZQ4IZUPH.js.map} +0 -0
  112. /package/dist/{cli-HVIIKEBZ.js.map → cli-HMY2IU2T.js.map} +0 -0
  113. /package/dist/{commands-LPHKMDQQ.js.map → commands-AAP4MYTL.js.map} +0 -0
  114. /package/dist/{config-I3OK6HOR.js.map → config-A7PN2NDW.js.map} +0 -0
  115. /package/dist/{context-F3UBAWUR.js.map → context-SXT7XLXT.js.map} +0 -0
  116. /package/dist/{customCommands-CT4UBTJ3.js.map → customCommands-KXTQJO3S.js.map} +0 -0
  117. /package/dist/{env-SEQVESNX.js.map → env-MACCQLTW.js.map} +0 -0
  118. /package/dist/{file-OXKLY56G.js.map → file-HC4EKI7Z.js.map} +0 -0
  119. /package/dist/{llm-IOCHHLE3.js.map → llm-OTFTXTXY.js.map} +0 -0
  120. /package/dist/{llmLazy-RIVBXEHP.js.map → llmLazy-PQ5HCZ4E.js.map} +0 -0
  121. /package/dist/{loader-5OLPHZPH.js.map → loader-VHBERR5P.js.map} +0 -0
  122. /package/dist/{lsp-XM7AJFRL.js.map → lsp-Y5UUXXVU.js.map} +0 -0
  123. /package/dist/{lspAnchor-2GDDRGLD.js.map → lspAnchor-FJ2SXT5X.js.map} +0 -0
  124. /package/dist/{mcp-UWYF5ZSK.js.map → mcp-V3E2FBYM.js.map} +0 -0
  125. /package/dist/{mentionProcessor-JYOTYUQB.js.map → mentionProcessor-FCHEM7NU.js.map} +0 -0
  126. /package/dist/{messages-ZCWO6COZ.js.map → messages-UYHRONQS.js.map} +0 -0
  127. /package/dist/{model-MECAPV7A.js.map → model-YPKZ4DQ3.js.map} +0 -0
  128. /package/dist/{openai-J6EXXQCF.js.map → openai-P2TQWQKC.js.map} +0 -0
  129. /package/dist/{outputStyles-L665IA2S.js.map → outputStyles-CSGYX64E.js.map} +0 -0
  130. /package/dist/{pluginRuntime-JUC5IBC4.js.map → pluginRuntime-EP4ATLRC.js.map} +0 -0
  131. /package/dist/{pluginValidation-SCGOD6ES.js.map → pluginValidation-3ZURFUHM.js.map} +0 -0
  132. /package/dist/{prompts-T3UK52SE.js.map → prompts-ATUILKIJ.js.map} +0 -0
  133. /package/dist/{pybAgentSessionLoad-IYZLFHHD.js.map → pybAgentSessionLoad-QZIINLCD.js.map} +0 -0
  134. /package/dist/{pybAgentSessionResume-EOHQNKTV.js.map → pybAgentSessionResume-3XND5AZG.js.map} +0 -0
  135. /package/dist/{pybAgentStreamJsonSession-KL2P62KD.js.map → pybAgentStreamJsonSession-JQPASPNN.js.map} +0 -0
  136. /package/dist/{pybHooks-TN6MSHW2.js.map → pybHooks-J3KPSFJI.js.map} +0 -0
  137. /package/dist/{query-W4AHBITB.js.map → query-ID3RUBSI.js.map} +0 -0
  138. /package/dist/{registry-KEXYTSWO.js.map → registry-HBS4R3GL.js.map} +0 -0
  139. /package/dist/{ripgrep-2BKEMATD.js.map → ripgrep-IDPG6V7P.js.map} +0 -0
  140. /package/dist/{skillMarketplace-GQGXOINV.js.map → skillMarketplace-VA7VL5D5.js.map} +0 -0
  141. /package/dist/{state-72LIFZIK.js.map → state-GU2VJXIZ.js.map} +0 -0
  142. /package/dist/{theme-M23WLSPC.js.map → theme-GZQWHNWP.js.map} +0 -0
  143. /package/dist/{toolPermissionSettings-A5FWQUS2.js.map → toolPermissionSettings-XJ6CKWDG.js.map} +0 -0
  144. /package/dist/{tools-GTXU2Z34.js.map → tools-EVR75R24.js.map} +0 -0
  145. /package/dist/{userInput-CQF6H7YG.js.map → userInput-ABKKAHHH.js.map} +0 -0
@@ -0,0 +1,47 @@
1
+ import { createRequire as __pybCreateRequire } from "node:module";
2
+ const require = __pybCreateRequire(import.meta.url);
3
+ import {
4
+ REPL
5
+ } from "./chunk-S4KCBRDZ.js";
6
+ import "./chunk-ZHPKJVUT.js";
7
+ import "./chunk-3H7JCOX7.js";
8
+ import "./chunk-CIUNX2UP.js";
9
+ import "./chunk-26DNH5MY.js";
10
+ import "./chunk-5P7HBXTD.js";
11
+ import "./chunk-AHO6SRRR.js";
12
+ import "./chunk-XM7MBTOO.js";
13
+ import "./chunk-K45LL6PV.js";
14
+ import "./chunk-JUVESM6V.js";
15
+ import "./chunk-CZRFLOQG.js";
16
+ import "./chunk-7SGVFJWX.js";
17
+ import "./chunk-QSP2L4AM.js";
18
+ import "./chunk-UNNVICVU.js";
19
+ import "./chunk-KKILDPBV.js";
20
+ import "./chunk-ERMQRV55.js";
21
+ import "./chunk-26VECGIJ.js";
22
+ import "./chunk-A3BVXXA3.js";
23
+ import "./chunk-5KZB52GW.js";
24
+ import "./chunk-3DFBSQIT.js";
25
+ import "./chunk-B6IMQJZM.js";
26
+ import "./chunk-OUXHGDLH.js";
27
+ import "./chunk-QKOT6XYY.js";
28
+ import "./chunk-QWIBSCDN.js";
29
+ import "./chunk-5IIJ6XQX.js";
30
+ import "./chunk-AHK3NVAX.js";
31
+ import "./chunk-KEBVFZAX.js";
32
+ import "./chunk-UZ34JEUK.js";
33
+ import "./chunk-YJWJ5DGO.js";
34
+ import "./chunk-BJSWTHRM.js";
35
+ import "./chunk-RJK6AYKB.js";
36
+ import "./chunk-X6LUQUI4.js";
37
+ import "./chunk-XVZ7ZX2L.js";
38
+ import "./chunk-DXIIHIJG.js";
39
+ import "./chunk-NSID4TSV.js";
40
+ import "./chunk-RQVLBMP7.js";
41
+ import "./chunk-EHFY3DA7.js";
42
+ import "./chunk-CDKFT2GF.js";
43
+ import "./chunk-PPTMKZPO.js";
44
+ import "./chunk-I3J4JYES.js";
45
+ export {
46
+ REPL
47
+ };
@@ -6,66 +6,66 @@ import {
6
6
  } from "./chunk-MWPFU2KU.js";
7
7
  import {
8
8
  getTools
9
- } from "./chunk-JANMYCFI.js";
9
+ } from "./chunk-ULOUEAT2.js";
10
10
  import {
11
11
  getCommands,
12
12
  getSystemPrompt,
13
13
  grantReadPermissionForOriginalDir,
14
14
  hasPermissionsToUseTool,
15
15
  query
16
- } from "./chunk-AYTHH4OG.js";
17
- import "./chunk-BN67YCOJ.js";
18
- import "./chunk-OYKPAK4T.js";
19
- import "./chunk-U4K7D5BX.js";
20
- import "./chunk-XS2CSGZS.js";
16
+ } from "./chunk-S4KCBRDZ.js";
17
+ import "./chunk-ZHPKJVUT.js";
18
+ import "./chunk-3H7JCOX7.js";
19
+ import "./chunk-CIUNX2UP.js";
20
+ import "./chunk-26DNH5MY.js";
21
21
  import "./chunk-5P7HBXTD.js";
22
- import "./chunk-NKATIHUV.js";
23
- import "./chunk-FXQWQEBJ.js";
24
- import "./chunk-W4PHX55O.js";
25
- import "./chunk-KV2VMNNF.js";
22
+ import "./chunk-AHO6SRRR.js";
23
+ import "./chunk-XM7MBTOO.js";
24
+ import "./chunk-K45LL6PV.js";
25
+ import "./chunk-JUVESM6V.js";
26
26
  import {
27
27
  getClients
28
- } from "./chunk-GFFEE5LM.js";
29
- import "./chunk-HBAL4UBJ.js";
28
+ } from "./chunk-CZRFLOQG.js";
29
+ import "./chunk-7SGVFJWX.js";
30
30
  import {
31
31
  loadToolPermissionContextFromDisk,
32
32
  persistToolPermissionUpdateToDisk
33
- } from "./chunk-BCVME6IW.js";
33
+ } from "./chunk-QSP2L4AM.js";
34
34
  import {
35
35
  applyToolPermissionContextUpdates
36
36
  } from "./chunk-UNNVICVU.js";
37
- import "./chunk-2NZLVZZN.js";
37
+ import "./chunk-KKILDPBV.js";
38
38
  import "./chunk-ERMQRV55.js";
39
- import "./chunk-DQPO3BVO.js";
39
+ import "./chunk-26VECGIJ.js";
40
40
  import "./chunk-A3BVXXA3.js";
41
41
  import {
42
42
  createAssistantMessage,
43
43
  createUserMessage
44
- } from "./chunk-6NAGAGUN.js";
44
+ } from "./chunk-5KZB52GW.js";
45
45
  import "./chunk-3DFBSQIT.js";
46
46
  import "./chunk-B6IMQJZM.js";
47
47
  import "./chunk-OUXHGDLH.js";
48
- import "./chunk-MBQBME2D.js";
48
+ import "./chunk-QKOT6XYY.js";
49
49
  import "./chunk-QWIBSCDN.js";
50
- import "./chunk-PDIYFR3M.js";
51
- import "./chunk-5LU4IMRO.js";
52
- import "./chunk-X2WFPPZ6.js";
50
+ import "./chunk-5IIJ6XQX.js";
51
+ import "./chunk-AHK3NVAX.js";
52
+ import "./chunk-KEBVFZAX.js";
53
53
  import "./chunk-UZ34JEUK.js";
54
- import "./chunk-KNILDMY5.js";
54
+ import "./chunk-YJWJ5DGO.js";
55
55
  import "./chunk-BJSWTHRM.js";
56
- import "./chunk-RU2QOEST.js";
56
+ import "./chunk-RJK6AYKB.js";
57
57
  import {
58
58
  getContext
59
- } from "./chunk-GZCFWOTQ.js";
60
- import "./chunk-BHRSSA7V.js";
61
- import "./chunk-3WE2Y7IS.js";
59
+ } from "./chunk-X6LUQUI4.js";
60
+ import "./chunk-XVZ7ZX2L.js";
61
+ import "./chunk-DXIIHIJG.js";
62
62
  import {
63
63
  enableConfigs
64
- } from "./chunk-GMNQLICU.js";
64
+ } from "./chunk-NSID4TSV.js";
65
65
  import "./chunk-RQVLBMP7.js";
66
66
  import {
67
67
  initDebugLogger
68
- } from "./chunk-YM3LU2U2.js";
68
+ } from "./chunk-EHFY3DA7.js";
69
69
  import {
70
70
  PRODUCT_COMMAND,
71
71
  initSentry,
@@ -73,10 +73,10 @@ import {
73
73
  resolveXdgDataPath,
74
74
  setCwd,
75
75
  setOriginalCwd
76
- } from "./chunk-54BVQTJK.js";
76
+ } from "./chunk-CDKFT2GF.js";
77
77
  import {
78
78
  MACRO
79
- } from "./chunk-N3LB5QDW.js";
79
+ } from "./chunk-PPTMKZPO.js";
80
80
  import "./chunk-I3J4JYES.js";
81
81
 
82
82
  // src/acp/jsonrpc.ts
@@ -2,14 +2,14 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getModelManager
5
- } from "./chunk-RU2QOEST.js";
6
- import "./chunk-GMNQLICU.js";
5
+ } from "./chunk-RJK6AYKB.js";
6
+ import "./chunk-NSID4TSV.js";
7
7
  import "./chunk-RQVLBMP7.js";
8
- import "./chunk-YM3LU2U2.js";
8
+ import "./chunk-EHFY3DA7.js";
9
9
  import {
10
10
  getXdgConfigDir
11
- } from "./chunk-54BVQTJK.js";
12
- import "./chunk-N3LB5QDW.js";
11
+ } from "./chunk-CDKFT2GF.js";
12
+ import "./chunk-PPTMKZPO.js";
13
13
  import "./chunk-I3J4JYES.js";
14
14
 
15
15
  // src/entrypoints/cli/agentsValidate.ts
@@ -346,8 +346,8 @@ async function validateAgentTemplates(args) {
346
346
  let knownToolNames;
347
347
  if (args.checkTools) {
348
348
  try {
349
- const { getTools } = await import("./tools-GTXU2Z34.js");
350
- const { getCurrentProjectConfig } = await import("./config-I3OK6HOR.js");
349
+ const { getTools } = await import("./tools-EVR75R24.js");
350
+ const { getCurrentProjectConfig } = await import("./config-A7PN2NDW.js");
351
351
  const allTools = await getTools(getCurrentProjectConfig().enableArchitectTool);
352
352
  knownToolNames = new Set(allTools.map((t) => t.name));
353
353
  } catch {
@@ -3,57 +3,57 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getSystemPrompt,
5
5
  query
6
- } from "./chunk-AYTHH4OG.js";
7
- import "./chunk-BN67YCOJ.js";
8
- import "./chunk-OYKPAK4T.js";
9
- import "./chunk-U4K7D5BX.js";
10
- import "./chunk-XS2CSGZS.js";
6
+ } from "./chunk-S4KCBRDZ.js";
7
+ import "./chunk-ZHPKJVUT.js";
8
+ import "./chunk-3H7JCOX7.js";
9
+ import "./chunk-CIUNX2UP.js";
10
+ import "./chunk-26DNH5MY.js";
11
11
  import "./chunk-5P7HBXTD.js";
12
- import "./chunk-NKATIHUV.js";
13
- import "./chunk-FXQWQEBJ.js";
14
- import "./chunk-W4PHX55O.js";
15
- import "./chunk-KV2VMNNF.js";
16
- import "./chunk-GFFEE5LM.js";
17
- import "./chunk-HBAL4UBJ.js";
18
- import "./chunk-BCVME6IW.js";
12
+ import "./chunk-AHO6SRRR.js";
13
+ import "./chunk-XM7MBTOO.js";
14
+ import "./chunk-K45LL6PV.js";
15
+ import "./chunk-JUVESM6V.js";
16
+ import "./chunk-CZRFLOQG.js";
17
+ import "./chunk-7SGVFJWX.js";
18
+ import "./chunk-QSP2L4AM.js";
19
19
  import "./chunk-UNNVICVU.js";
20
- import "./chunk-2NZLVZZN.js";
20
+ import "./chunk-KKILDPBV.js";
21
21
  import "./chunk-ERMQRV55.js";
22
- import "./chunk-DQPO3BVO.js";
22
+ import "./chunk-26VECGIJ.js";
23
23
  import "./chunk-A3BVXXA3.js";
24
24
  import {
25
25
  createUserMessage
26
- } from "./chunk-6NAGAGUN.js";
26
+ } from "./chunk-5KZB52GW.js";
27
27
  import "./chunk-3DFBSQIT.js";
28
28
  import "./chunk-B6IMQJZM.js";
29
29
  import {
30
30
  getTotalCost
31
31
  } from "./chunk-OUXHGDLH.js";
32
- import "./chunk-MBQBME2D.js";
32
+ import "./chunk-QKOT6XYY.js";
33
33
  import "./chunk-QWIBSCDN.js";
34
- import "./chunk-PDIYFR3M.js";
35
- import "./chunk-5LU4IMRO.js";
36
- import "./chunk-X2WFPPZ6.js";
34
+ import "./chunk-5IIJ6XQX.js";
35
+ import "./chunk-AHK3NVAX.js";
36
+ import "./chunk-KEBVFZAX.js";
37
37
  import "./chunk-UZ34JEUK.js";
38
- import "./chunk-KNILDMY5.js";
38
+ import "./chunk-YJWJ5DGO.js";
39
39
  import "./chunk-BJSWTHRM.js";
40
40
  import {
41
41
  getModelManager
42
- } from "./chunk-RU2QOEST.js";
42
+ } from "./chunk-RJK6AYKB.js";
43
43
  import {
44
44
  getContext
45
- } from "./chunk-GZCFWOTQ.js";
46
- import "./chunk-BHRSSA7V.js";
47
- import "./chunk-3WE2Y7IS.js";
48
- import "./chunk-GMNQLICU.js";
45
+ } from "./chunk-X6LUQUI4.js";
46
+ import "./chunk-XVZ7ZX2L.js";
47
+ import "./chunk-DXIIHIJG.js";
48
+ import "./chunk-NSID4TSV.js";
49
49
  import "./chunk-RQVLBMP7.js";
50
- import "./chunk-YM3LU2U2.js";
50
+ import "./chunk-EHFY3DA7.js";
51
51
  import {
52
52
  getMessagesPath,
53
53
  overwriteLog,
54
54
  setCwd
55
- } from "./chunk-54BVQTJK.js";
56
- import "./chunk-N3LB5QDW.js";
55
+ } from "./chunk-CDKFT2GF.js";
56
+ import "./chunk-PPTMKZPO.js";
57
57
  import "./chunk-I3J4JYES.js";
58
58
 
59
59
  // src/app/ask.ts
@@ -5,9 +5,9 @@ import {
5
5
  checkAndNotifyUpdate,
6
6
  getLatestVersion,
7
7
  getUpdateCommandSuggestions
8
- } from "./chunk-EH2JWJOR.js";
9
- import "./chunk-54BVQTJK.js";
10
- import "./chunk-N3LB5QDW.js";
8
+ } from "./chunk-ZQ4IZUPH.js";
9
+ import "./chunk-CDKFT2GF.js";
10
+ import "./chunk-PPTMKZPO.js";
11
11
  import "./chunk-I3J4JYES.js";
12
12
  export {
13
13
  assertMinVersion,
@@ -9,10 +9,10 @@ import {
9
9
  PLAN_SLUG_VERBS,
10
10
  getCwd,
11
11
  resolveXdgDataPath
12
- } from "./chunk-54BVQTJK.js";
12
+ } from "./chunk-CDKFT2GF.js";
13
13
  import {
14
14
  MACRO
15
- } from "./chunk-N3LB5QDW.js";
15
+ } from "./chunk-PPTMKZPO.js";
16
16
 
17
17
  // src/utils/protocol/pybAgentSessionLog.ts
18
18
  import { execFileSync } from "child_process";
@@ -8,12 +8,12 @@ import {
8
8
  } from "./chunk-BJSWTHRM.js";
9
9
  import {
10
10
  debug
11
- } from "./chunk-YM3LU2U2.js";
11
+ } from "./chunk-EHFY3DA7.js";
12
12
  import {
13
13
  getCwd,
14
14
  getXdgConfigDir,
15
15
  logError
16
- } from "./chunk-54BVQTJK.js";
16
+ } from "./chunk-CDKFT2GF.js";
17
17
 
18
18
  // src/utils/agent/loader.ts
19
19
  import {
@@ -400,7 +400,7 @@ var BUILTIN_EXPLORE = {
400
400
  whenToUse: 'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. "src/components/**/*.tsx"), search code for keywords (eg. "API endpoints"), or answer questions about the codebase (eg. "how do API endpoints work?"). When calling this agent, specify the desired thoroughness level: "quick" for basic searches, "medium" for moderate exploration, or "very thorough" for comprehensive analysis across multiple locations and naming conventions.',
401
401
  tools: "*",
402
402
  disallowedTools: ["Task", "ExitPlanMode", "Edit", "Write", "NotebookEdit"],
403
- model: "haiku",
403
+ model: "inherit",
404
404
  systemPrompt: `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.
405
405
 
406
406
  === CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===
@@ -424,6 +424,8 @@ Guidelines:
424
424
  - Use Glob for broad file pattern matching
425
425
  - Use Grep for searching file contents with regex
426
426
  - Use Read when you know the specific file path you need to read
427
+ - Use LS to understand directory structure and top-level layout quickly
428
+ - Use LSP for symbol-level navigation (definitions/references) after you locate a file
427
429
  - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)
428
430
  - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification
429
431
  - Adapt your search approach based on the thoroughness level specified by the caller
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/utils/agent/loader.ts"],
4
- "sourcesContent": ["\nimport {\n existsSync,\n readFileSync,\n readdirSync,\n statSync,\n watch,\n type FSWatcher,\n} from 'fs'\nimport { basename, dirname, join, resolve } from 'path'\nimport { homedir } from 'os'\nimport matter from 'gray-matter'\nimport yaml from 'js-yaml'\nimport { memoize } from 'lodash-es'\nimport { z } from 'zod'\nimport { getCwd } from '@utils/state'\nimport { getSessionPlugins } from '@utils/session/sessionPlugins'\nimport { isSettingSourceEnabled } from '@utils/config/settingSources'\nimport { debug as debugLogger } from '@utils/log/debugLogger'\nimport { logError } from '@utils/log'\nimport { getXdgConfigDir } from '@utils/config/env'\n\nexport type AgentSource =\n | 'built-in'\n | 'plugin'\n | 'userSettings'\n | 'projectSettings'\n | 'flagSettings'\n | 'policySettings'\n\nexport type AgentLocation = 'built-in' | 'plugin' | 'user' | 'project'\n\nexport type AgentModel = 'inherit' | 'haiku' | 'sonnet' | 'opus' | (string & {})\n\nexport type AgentPermissionMode =\n | 'default'\n | 'acceptEdits'\n | 'plan'\n | 'bypassPermissions'\n | 'dontAsk'\n | 'delegate'\n\nexport interface AgentConfig {\n agentType: string\n whenToUse: string\n tools: string[] | '*'\n disallowedTools?: string[]\n skills?: string[]\n systemPrompt: string\n source: AgentSource\n location: AgentLocation\n baseDir?: string\n filename?: string\n color?: string\n model?: AgentModel\n permissionMode?: AgentPermissionMode\n forkContext?: boolean\n}\n\nfunction getClaudePolicyBaseDir(): string {\n switch (process.platform) {\n case 'darwin':\n return '/Library/Application Support/ClaudeCode'\n case 'win32':\n return existsSync('C:\\\\Program Files\\\\ClaudeCode')\n ? 'C:\\\\Program Files\\\\ClaudeCode'\n : 'C:\\\\ProgramData\\\\ClaudeCode'\n default:\n return '/etc/claude-code'\n }\n}\n\nfunction normalizeOverride(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const trimmed = value.trim()\n return trimmed ? resolve(trimmed) : null\n}\n\nfunction dedupeStrings(values: string[]): string[] {\n const out: string[] = []\n const seen = new Set<string>()\n for (const value of values) {\n if (!value) continue\n if (seen.has(value)) continue\n seen.add(value)\n out.push(value)\n }\n return out\n}\n\nfunction getUserConfigRoots(): string[] {\n const claudeOverride = normalizeOverride(process.env.CLAUDE_CONFIG_DIR)\n const pybOverride = normalizeOverride(process.env.PYB_CONFIG_DIR)\n\n const hasAnyOverride = Boolean(claudeOverride || pybOverride)\n if (hasAnyOverride) {\n return dedupeStrings([claudeOverride ?? '', pybOverride ?? ''])\n }\n\n return dedupeStrings([\n getXdgConfigDir(),\n join(homedir(), '.claude'),\n join(homedir(), '.pyb'),\n ])\n}\n\nfunction findProjectAgentDirs(cwd: string): string[] {\n const result: string[] = []\n const home = resolve(homedir())\n let current = resolve(cwd)\n\n while (current !== home) {\n const claudeDir = join(current, '.claude', 'agents')\n if (existsSync(claudeDir)) result.push(claudeDir)\n\n const pybDir = join(current, '.pyb', 'agents')\n if (existsSync(pybDir)) result.push(pybDir)\n\n const parent = dirname(current)\n if (parent === current) break\n current = parent\n }\n\n return result\n}\n\nfunction listMarkdownFilesRecursively(rootDir: string): string[] {\n const files: string[] = []\n const visitedDirs = new Set<string>()\n\n const walk = (dirPath: string) => {\n let dirStat: ReturnType<typeof statSync>\n try {\n dirStat = statSync(dirPath)\n } catch {\n return\n }\n if (!dirStat.isDirectory()) return\n\n const dirKey = `${dirStat.dev}:${dirStat.ino}`\n if (visitedDirs.has(dirKey)) return\n visitedDirs.add(dirKey)\n\n let entries: Array<{\n name: string\n isDirectory(): boolean\n isFile(): boolean\n isSymbolicLink(): boolean\n }>\n try {\n entries = readdirSync(dirPath, {\n withFileTypes: true,\n encoding: 'utf8',\n }) as any\n } catch {\n return\n }\n\n for (const entry of entries) {\n const name = String(entry.name ?? '')\n const fullPath = join(dirPath, name)\n\n if (entry.isDirectory()) {\n walk(fullPath)\n continue\n }\n\n if (entry.isFile()) {\n if (name.endsWith('.md')) files.push(fullPath)\n continue\n }\n\n if (entry.isSymbolicLink()) {\n try {\n const st = statSync(fullPath)\n if (st.isDirectory()) {\n walk(fullPath)\n } else if (st.isFile() && name.endsWith('.md')) {\n files.push(fullPath)\n }\n } catch {\n continue\n }\n }\n }\n }\n\n if (!existsSync(rootDir)) return []\n walk(rootDir)\n return files\n}\n\nfunction readMarkdownFile(filePath: string): { frontmatter: any; content: string } | null {\n try {\n const raw = readFileSync(filePath, 'utf8')\n const yamlSchema = (yaml as any).JSON_SCHEMA\n const matterOptions = {\n engines: {\n yaml: {\n parse: (input: string) =>\n yaml.load(input, yamlSchema ? { schema: yamlSchema } : undefined) ??\n {},\n },\n },\n }\n const parsed = matter(raw, matterOptions)\n return {\n frontmatter: (parsed.data as any) ?? {},\n content: String(parsed.content ?? ''),\n }\n } catch {\n return null\n }\n}\n\nfunction splitCliList(values: string[]): string[] {\n if (values.length === 0) return []\n const out: string[] = []\n\n for (const value of values) {\n if (!value) continue\n let current = ''\n let inParens = false\n\n for (const ch of value) {\n switch (ch) {\n case '(':\n inParens = true\n current += ch\n break\n case ')':\n inParens = false\n current += ch\n break\n case ',':\n if (inParens) {\n current += ch\n } else {\n const trimmed = current.trim()\n if (trimmed) out.push(trimmed)\n current = ''\n }\n break\n case ' ':\n if (inParens) {\n current += ch\n } else {\n const trimmed = current.trim()\n if (trimmed) out.push(trimmed)\n current = ''\n }\n break\n default:\n current += ch\n }\n }\n\n const trimmed = current.trim()\n if (trimmed) out.push(trimmed)\n }\n\n return out\n}\n\nfunction normalizeToolList(value: unknown): string[] | null {\n if (value === undefined || value === null) return null\n if (!value) return []\n\n let raw: string[] = []\n if (typeof value === 'string') raw = [value]\n else if (Array.isArray(value))\n raw = value.filter((v): v is string => typeof v === 'string')\n\n if (raw.length === 0) return []\n const parsed = splitCliList(raw)\n if (parsed.includes('*')) return ['*']\n return parsed\n}\n\nfunction z2A(value: unknown): string[] | undefined {\n const normalized = normalizeToolList(value)\n if (normalized === null) return value === undefined ? undefined : []\n if (normalized.includes('*')) return undefined\n return normalized\n}\n\nfunction qP(value: unknown): string[] {\n const normalized = normalizeToolList(value)\n if (normalized === null) return []\n return normalized\n}\n\nconst VALID_PERMISSION_MODES = [\n 'default',\n 'acceptEdits',\n 'plan',\n 'bypassPermissions',\n 'dontAsk',\n 'delegate',\n] as const\n\nfunction sourceToLocation(source: AgentSource): AgentLocation {\n switch (source) {\n case 'plugin':\n return 'plugin'\n case 'userSettings':\n return 'user'\n case 'projectSettings':\n return 'project'\n case 'built-in':\n case 'flagSettings':\n case 'policySettings':\n default:\n return 'built-in'\n }\n}\n\nfunction parseAgentFromFile(options: {\n filePath: string\n baseDir: string\n source: Exclude<AgentSource, 'flagSettings' | 'built-in'>\n}): AgentConfig | null {\n const parsed = readMarkdownFile(options.filePath)\n if (!parsed) return null\n\n try {\n const fm = parsed.frontmatter ?? {}\n let name: unknown = fm.name\n let description: unknown = fm.description\n\n if (!name || typeof name !== 'string' || !description || typeof description !== 'string') {\n return null\n }\n\n const whenToUse = description.replace(/\\\\n/g, '\\n')\n const filename = basename(options.filePath, '.md')\n\n const color = typeof fm.color === 'string' ? fm.color : undefined\n\n let modelRaw: unknown = fm.model\n if (typeof modelRaw !== 'string' && typeof fm.model_name === 'string') {\n modelRaw = fm.model_name\n }\n let model =\n typeof modelRaw === 'string' ? modelRaw.trim() : undefined\n if (model === '') model = undefined\n\n const forkContextValue: unknown = fm.forkContext\n if (\n forkContextValue !== undefined &&\n forkContextValue !== 'true' &&\n forkContextValue !== 'false'\n ) {\n debugLogger.warn('AGENT_LOADER_INVALID_FORK_CONTEXT', {\n filePath: options.filePath,\n forkContext: String(forkContextValue),\n })\n }\n const forkContext = forkContextValue === 'true'\n\n if (forkContext && model && model !== 'inherit') {\n debugLogger.warn('AGENT_LOADER_FORK_CONTEXT_MODEL_OVERRIDE', {\n filePath: options.filePath,\n model,\n })\n model = 'inherit'\n }\n\n const permissionModeValue: unknown = fm.permissionMode\n const permissionModeIsValid =\n typeof permissionModeValue === 'string' &&\n VALID_PERMISSION_MODES.includes(permissionModeValue as AgentPermissionMode)\n if (\n typeof permissionModeValue === 'string' &&\n permissionModeValue &&\n !permissionModeIsValid\n ) {\n debugLogger.warn('AGENT_LOADER_INVALID_PERMISSION_MODE', {\n filePath: options.filePath,\n permissionMode: permissionModeValue,\n valid: VALID_PERMISSION_MODES,\n })\n }\n\n const toolsList = z2A(fm.tools)\n const tools: string[] | '*' =\n toolsList === undefined || toolsList.includes('*') ? '*' : toolsList\n\n const disallowedRaw =\n fm.disallowedTools ??\n fm['disallowed-tools'] ??\n fm['disallowed_tools']\n const disallowedTools = disallowedRaw !== undefined ? z2A(disallowedRaw) : undefined\n\n const skills = qP(fm.skills)\n const systemPrompt = parsed.content.trim()\n\n const agent: AgentConfig = {\n agentType: name,\n whenToUse,\n tools,\n ...(disallowedTools !== undefined ? { disallowedTools } : {}),\n ...(skills.length > 0 ? { skills } : { skills: [] }),\n systemPrompt,\n source: options.source,\n location: sourceToLocation(options.source),\n baseDir: options.baseDir,\n filename,\n ...(color ? { color } : {}),\n ...(model ? { model: model as AgentModel } : {}),\n ...(permissionModeIsValid ? { permissionMode: permissionModeValue as AgentPermissionMode } : {}),\n ...(forkContext ? { forkContext: true } : {}),\n }\n\n return agent\n } catch {\n return null\n }\n}\n\nconst agentJsonSchema = z.object({\n description: z.string().min(1, 'Description cannot be empty'),\n tools: z.array(z.string()).optional(),\n disallowedTools: z.array(z.string()).optional(),\n prompt: z.string().min(1, 'Prompt cannot be empty'),\n model: z.string().optional(),\n permissionMode: z.enum(VALID_PERMISSION_MODES).optional(),\n})\n\nconst agentsJsonSchema = z.record(z.string(), agentJsonSchema)\n\nfunction parseAgentFromJson(agentType: string, value: unknown): AgentConfig | null {\n const parsed = agentJsonSchema.safeParse(value)\n if (!parsed.success) return null\n\n const toolsList = z2A(parsed.data.tools)\n const disallowedList =\n parsed.data.disallowedTools !== undefined ? z2A(parsed.data.disallowedTools) : undefined\n const model =\n typeof parsed.data.model === 'string' ? parsed.data.model.trim() : undefined\n\n return {\n agentType,\n whenToUse: parsed.data.description,\n tools: toolsList === undefined || toolsList.includes('*') ? '*' : toolsList,\n ...(disallowedList !== undefined ? { disallowedTools: disallowedList } : {}),\n systemPrompt: parsed.data.prompt,\n source: 'flagSettings',\n location: 'built-in',\n ...(model ? { model: model as AgentModel } : {}),\n ...(parsed.data.permissionMode ? { permissionMode: parsed.data.permissionMode } : {}),\n }\n}\n\nlet FLAG_AGENTS: AgentConfig[] = []\n\nexport function setFlagAgentsFromCliJson(json: string | undefined): void {\n if (!json) {\n FLAG_AGENTS = []\n clearAgentCache()\n return\n }\n\n let raw: unknown\n try {\n raw = JSON.parse(json)\n } catch (err) {\n logError(err)\n debugLogger.warn('AGENT_LOADER_FLAG_AGENTS_JSON_PARSE_FAILED', {\n error: err instanceof Error ? err.message : String(err),\n })\n FLAG_AGENTS = []\n clearAgentCache()\n return\n }\n\n const parsed = agentsJsonSchema.safeParse(raw)\n if (!parsed.success) {\n logError(parsed.error)\n debugLogger.warn('AGENT_LOADER_FLAG_AGENTS_SCHEMA_INVALID', {\n error: parsed.error.message,\n })\n FLAG_AGENTS = []\n clearAgentCache()\n return\n }\n\n FLAG_AGENTS = Object.entries(parsed.data)\n .map(([agentType, value]) => parseAgentFromJson(agentType, value))\n .filter((agent): agent is AgentConfig => agent !== null)\n\n clearAgentCache()\n}\n\nconst BUILTIN_GENERAL_PURPOSE: AgentConfig = {\n agentType: 'general-purpose',\n whenToUse:\n 'General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks',\n tools: '*',\n systemPrompt: `You are a general-purpose agent. Given the user's task, use the tools available to complete it efficiently and thoroughly.\n\nWhen to use your capabilities:\n- Searching for code, configurations, and patterns across large codebases\n- Analyzing multiple files to understand system architecture \n- Investigating complex questions that require exploring many files\n- Performing multi-step research tasks\n\nGuidelines:\n- For file searches: Use Grep or Glob when you need to search broadly. Use FileRead when you know the specific file path.\n- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.\n- Be thorough: Check multiple locations, consider different naming conventions, look for related files.\n- Complete tasks directly using your capabilities.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nconst BUILTIN_EXPLORE: AgentConfig = {\n agentType: 'Explore',\n whenToUse:\n 'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.',\n tools: '*',\n disallowedTools: ['Task', 'ExitPlanMode', 'Edit', 'Write', 'NotebookEdit'],\n model: 'haiku',\n systemPrompt: `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to search and analyze existing code. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYour strengths:\n- Rapidly finding files using glob patterns\n- Searching code and text with powerful regex patterns\n- Reading and analyzing file contents\n\nGuidelines:\n- Use Glob for broad file pattern matching\n- Use Grep for searching file contents with regex\n- Use Read when you know the specific file path you need to read\n- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n- Adapt your search approach based on the thoroughness level specified by the caller\n- Return file paths as absolute paths in your final response\n- For clear communication, avoid using emojis\n- Communicate your final report directly as a regular message - do NOT attempt to create files\n\nNOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:\n- Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations\n- Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files\n\nComplete the user's search request efficiently and report your findings clearly.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nconst BUILTIN_PLAN: AgentConfig = {\n agentType: 'Plan',\n whenToUse:\n 'Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.',\n tools: '*',\n disallowedTools: ['Task', 'ExitPlanMode', 'Edit', 'Write', 'NotebookEdit'],\n model: 'inherit',\n systemPrompt: `You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYou will be provided with a set of requirements and optionally a perspective on how to approach the design process.\n\n## Your Process\n\n1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.\n\n2. **Explore Thoroughly**:\n - Read any files provided to you in the initial prompt\n - Find existing patterns and conventions using Glob, Grep, and Read\n - Understand the current architecture\n - Identify similar features as reference\n - Trace through relevant code paths\n - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n\n3. **Design Solution**:\n - Create implementation approach based on your assigned perspective\n - Consider trade-offs and architectural decisions\n - Follow existing patterns where appropriate\n\n4. **Detail the Plan**:\n - Provide step-by-step implementation strategy\n - Identify dependencies and sequencing\n - Anticipate potential challenges\n\n## Required Output\n\nEnd your response with:\n\n### Critical Files for Implementation\nList 3-5 files most critical for implementing this plan:\n- path/to/file1.ts - [Brief reason: e.g., \"Core logic to modify\"]\n- path/to/file2.ts - [Brief reason: e.g., \"Interfaces to implement\"]\n- path/to/file3.ts - [Brief reason: e.g., \"Pattern to follow\"]\n\nREMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nconst BUILTIN_STATUSLINE_SETUP: AgentConfig = {\n agentType: 'statusline-setup',\n whenToUse:\n 'Set up the CLI status line command (writes to ~/.pyb/settings.json statusLine). Use when the user runs /statusline.',\n tools: ['Read', 'Edit', 'Bash'],\n systemPrompt: `You are the status line setup agent.\n\nYour job is to configure a fast, single-line status command for the CLI UI.\n\nRequirements:\n- Write/update the user's ~/.pyb/settings.json and set the top-level key \"statusLine\" to a shell command string.\n- IMPORTANT: When using Read/Edit tools, use absolute paths (do not pass \"~\" to tool inputs).\n- The command must be quick (ideally <200ms), produce a single line, and be safe to run repeatedly.\n- Prefer using information that is generally available: current directory, git branch/dirty state, etc.\n- If you can't infer the user's preferred status info from their shell config, ask them what they want and propose a reasonable default.\n\nSuggested approach:\n1) Inspect common shell config files (Read):\n - macOS/Linux: ~/.zshrc, ~/.bashrc, ~/.config/fish/config.fish\n - Windows: consider PowerShell profile if the user provides its location\n2) Propose a statusLine command:\n - macOS/Linux: e.g. a small sh snippet that prints cwd basename and git branch if present\n - Windows: e.g. a short PowerShell one-liner that prints similar info\n3) Update ~/.pyb/settings.json:\n - If the file does not exist, create it as a minimal JSON object.\n - Preserve unrelated fields if present.\n4) Reply with the exact command you set and how the user can change/remove it later.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nfunction mergeAgents(allAgents: AgentConfig[]): AgentConfig[] {\n const builtIn = allAgents.filter(a => a.source === 'built-in')\n const plugin = allAgents.filter(a => a.source === 'plugin')\n const user = allAgents.filter(a => a.source === 'userSettings')\n const project = allAgents.filter(a => a.source === 'projectSettings')\n const flag = allAgents.filter(a => a.source === 'flagSettings')\n const policy = allAgents.filter(a => a.source === 'policySettings')\n\n const ordered = [builtIn, plugin, user, project, flag, policy]\n const map = new Map<string, AgentConfig>()\n for (const group of ordered) {\n for (const agent of group) {\n map.set(agent.agentType, agent)\n }\n }\n return Array.from(map.values())\n}\n\nfunction inodeKeyForPath(filePath: string): string | null {\n try {\n const st = statSync(filePath)\n if (typeof (st as any).dev === 'number' && typeof (st as any).ino === 'number') {\n return `${(st as any).dev}:${(st as any).ino}`\n }\n return null\n } catch {\n return null\n }\n}\n\nfunction scanAgentPaths(options: {\n dirPathOrFile: string\n baseDir: string\n source: Exclude<AgentSource, 'built-in' | 'flagSettings'>\n seenInodes: Map<string, AgentSource>\n}): AgentConfig[] {\n const out: AgentConfig[] = []\n\n const addFile = (filePath: string) => {\n if (!filePath.endsWith('.md')) return\n\n const inodeKey = inodeKeyForPath(filePath)\n if (inodeKey) {\n const existing = options.seenInodes.get(inodeKey)\n if (existing) return\n options.seenInodes.set(inodeKey, options.source)\n }\n\n const agent = parseAgentFromFile({\n filePath,\n baseDir: options.baseDir,\n source: options.source,\n })\n if (agent) out.push(agent)\n }\n\n let st: ReturnType<typeof statSync>\n try {\n st = statSync(options.dirPathOrFile)\n } catch {\n return []\n }\n\n if (st.isFile()) {\n addFile(options.dirPathOrFile)\n return out\n }\n\n if (!st.isDirectory()) return []\n\n for (const filePath of listMarkdownFilesRecursively(options.dirPathOrFile)) {\n addFile(filePath)\n }\n\n return out\n}\n\nasync function loadAllAgents(): Promise<{\n activeAgents: AgentConfig[]\n allAgents: AgentConfig[]\n}> {\n const builtinAgents: AgentConfig[] = [\n BUILTIN_GENERAL_PURPOSE,\n BUILTIN_STATUSLINE_SETUP,\n BUILTIN_EXPLORE,\n BUILTIN_PLAN,\n ]\n\n const seenInodes = new Map<string, AgentSource>()\n\n const sessionPlugins = getSessionPlugins()\n const pluginAgentDirs = sessionPlugins.flatMap(p => p.agentsDirs ?? [])\n const pluginAgents = pluginAgentDirs.flatMap(dir =>\n scanAgentPaths({\n dirPathOrFile: dir,\n baseDir: dir,\n source: 'plugin',\n seenInodes,\n }),\n )\n\n const policyAgentsDir = join(getClaudePolicyBaseDir(), '.claude', 'agents')\n const policyAgents = scanAgentPaths({\n dirPathOrFile: policyAgentsDir,\n baseDir: policyAgentsDir,\n source: 'policySettings',\n seenInodes,\n })\n\n const userAgents: AgentConfig[] = []\n if (isSettingSourceEnabled('userSettings')) {\n for (const root of getUserConfigRoots()) {\n const dir = join(root, 'agents')\n userAgents.push(\n ...scanAgentPaths({\n dirPathOrFile: dir,\n baseDir: dir,\n source: 'userSettings',\n seenInodes,\n }),\n )\n }\n }\n\n const projectAgents: AgentConfig[] = []\n if (isSettingSourceEnabled('projectSettings')) {\n const dirs = findProjectAgentDirs(getCwd())\n for (const dir of dirs) {\n projectAgents.push(\n ...scanAgentPaths({\n dirPathOrFile: dir,\n baseDir: dir,\n source: 'projectSettings',\n seenInodes,\n }),\n )\n }\n }\n\n const allAgents: AgentConfig[] = [\n ...builtinAgents,\n ...pluginAgents,\n ...userAgents,\n ...projectAgents,\n ...FLAG_AGENTS,\n ...policyAgents,\n ]\n\n const activeAgents = mergeAgents(allAgents)\n return { activeAgents, allAgents }\n}\n\nexport const getActiveAgents = memoize(async (): Promise<AgentConfig[]> => {\n const { activeAgents } = await loadAllAgents()\n return activeAgents\n})\n\nexport const getAllAgents = memoize(async (): Promise<AgentConfig[]> => {\n const { allAgents } = await loadAllAgents()\n return allAgents\n})\n\nexport const getAgentByType = memoize(\n async (agentType: string): Promise<AgentConfig | undefined> => {\n const agents = await getActiveAgents()\n return agents.find(agent => agent.agentType === agentType)\n },\n)\n\nexport const getAvailableAgentTypes = memoize(async (): Promise<string[]> => {\n const agents = await getActiveAgents()\n return agents.map(agent => agent.agentType)\n})\n\nexport function clearAgentCache(): void {\n getActiveAgents.cache?.clear?.()\n getAllAgents.cache?.clear?.()\n getAgentByType.cache?.clear?.()\n getAvailableAgentTypes.cache?.clear?.()\n}\n\nlet watchers: FSWatcher[] = []\n\nexport async function startAgentWatcher(onChange?: () => void): Promise<void> {\n await stopAgentWatcher()\n\n const watchDirs: string[] = []\n\n watchDirs.push(join(getClaudePolicyBaseDir(), '.claude', 'agents'))\n\n if (isSettingSourceEnabled('userSettings')) {\n for (const root of getUserConfigRoots()) {\n watchDirs.push(join(root, 'agents'))\n }\n }\n\n if (isSettingSourceEnabled('projectSettings')) {\n watchDirs.push(...findProjectAgentDirs(getCwd()))\n }\n\n for (const plugin of getSessionPlugins()) {\n for (const dir of plugin.agentsDirs ?? []) {\n watchDirs.push(dir)\n }\n }\n\n for (const dirPath of dedupeStrings(watchDirs)) {\n if (!existsSync(dirPath)) continue\n try {\n const watcher = watch(\n dirPath,\n { recursive: false },\n async (_eventType, filename) => {\n if (filename && filename.endsWith('.md')) {\n clearAgentCache()\n onChange?.()\n }\n },\n )\n watchers.push(watcher)\n } catch {\n continue\n }\n }\n}\n\nexport async function stopAgentWatcher(): Promise<void> {\n try {\n for (const watcher of watchers) {\n try {\n watcher.close()\n } catch {\n }\n }\n } finally {\n watchers = []\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,UAAU,SAAS,MAAM,eAAe;AACjD,SAAS,eAAe;AACxB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,SAAS,eAAe;AACxB,SAAS,SAAS;AA6ClB,SAAS,yBAAiC;AACxC,UAAQ,QAAQ,UAAU;AAAA,IACxB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO,WAAW,+BAA+B,IAC7C,kCACA;AAAA,IACN;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,kBAAkB,OAA+B;AACxD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,UAAU,MAAM,KAAK;AAC3B,SAAO,UAAU,QAAQ,OAAO,IAAI;AACtC;AAEA,SAAS,cAAc,QAA4B;AACjD,QAAM,MAAgB,CAAC;AACvB,QAAM,OAAO,oBAAI,IAAY;AAC7B,aAAW,SAAS,QAAQ;AAC1B,QAAI,CAAC,MAAO;AACZ,QAAI,KAAK,IAAI,KAAK,EAAG;AACrB,SAAK,IAAI,KAAK;AACd,QAAI,KAAK,KAAK;AAAA,EAChB;AACA,SAAO;AACT;AAEA,SAAS,qBAA+B;AACtC,QAAM,iBAAiB,kBAAkB,QAAQ,IAAI,iBAAiB;AACtE,QAAM,cAAc,kBAAkB,QAAQ,IAAI,cAAc;AAEhE,QAAM,iBAAiB,QAAQ,kBAAkB,WAAW;AAC5D,MAAI,gBAAgB;AAClB,WAAO,cAAc,CAAC,kBAAkB,IAAI,eAAe,EAAE,CAAC;AAAA,EAChE;AAEA,SAAO,cAAc;AA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WAAW,cAAc,SAAS,GAAG;AAC9C,QAAI,CAAC,WAAW,OAAO,EAAG;AAC1B,QAAI;AACF,YAAM,UAAU;AAAA,QACd;AAAA,QACA,EAAE,WAAW,MAAM;AAAA,QACnB,OAAO,YAAY,aAAa;AAC9B,cAAI,YAAY,SAAS,SAAS,KAAK,GAAG;AACxC,4BAAgB;AAChB,uBAAW;AAAA,UACb;AAAA,QACF;AAAA,MACF;AACA,eAAS,KAAK,OAAO;AAAA,IACvB,QAAQ;AACN;AAAA,IACF;AAAA,EACF;AACF;AAEA,eAAsB,mBAAkC;AACtD,MAAI;AACF,eAAW,WAAW,UAAU;AAC9B,UAAI;AACF,gBAAQ,MAAM;AAAA,MAChB,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF,UAAE;AACA,eAAW,CAAC;AAAA,EACd;AACF;",
4
+ "sourcesContent": ["\nimport {\n existsSync,\n readFileSync,\n readdirSync,\n statSync,\n watch,\n type FSWatcher,\n} from 'fs'\nimport { basename, dirname, join, resolve } from 'path'\nimport { homedir } from 'os'\nimport matter from 'gray-matter'\nimport yaml from 'js-yaml'\nimport { memoize } from 'lodash-es'\nimport { z } from 'zod'\nimport { getCwd } from '@utils/state'\nimport { getSessionPlugins } from '@utils/session/sessionPlugins'\nimport { isSettingSourceEnabled } from '@utils/config/settingSources'\nimport { debug as debugLogger } from '@utils/log/debugLogger'\nimport { logError } from '@utils/log'\nimport { getXdgConfigDir } from '@utils/config/env'\n\nexport type AgentSource =\n | 'built-in'\n | 'plugin'\n | 'userSettings'\n | 'projectSettings'\n | 'flagSettings'\n | 'policySettings'\n\nexport type AgentLocation = 'built-in' | 'plugin' | 'user' | 'project'\n\nexport type AgentModel = 'inherit' | 'haiku' | 'sonnet' | 'opus' | (string & {})\n\nexport type AgentPermissionMode =\n | 'default'\n | 'acceptEdits'\n | 'plan'\n | 'bypassPermissions'\n | 'dontAsk'\n | 'delegate'\n\nexport interface AgentConfig {\n agentType: string\n whenToUse: string\n tools: string[] | '*'\n disallowedTools?: string[]\n skills?: string[]\n systemPrompt: string\n source: AgentSource\n location: AgentLocation\n baseDir?: string\n filename?: string\n color?: string\n model?: AgentModel\n permissionMode?: AgentPermissionMode\n forkContext?: boolean\n}\n\nfunction getClaudePolicyBaseDir(): string {\n switch (process.platform) {\n case 'darwin':\n return '/Library/Application Support/ClaudeCode'\n case 'win32':\n return existsSync('C:\\\\Program Files\\\\ClaudeCode')\n ? 'C:\\\\Program Files\\\\ClaudeCode'\n : 'C:\\\\ProgramData\\\\ClaudeCode'\n default:\n return '/etc/claude-code'\n }\n}\n\nfunction normalizeOverride(value: unknown): string | null {\n if (typeof value !== 'string') return null\n const trimmed = value.trim()\n return trimmed ? resolve(trimmed) : null\n}\n\nfunction dedupeStrings(values: string[]): string[] {\n const out: string[] = []\n const seen = new Set<string>()\n for (const value of values) {\n if (!value) continue\n if (seen.has(value)) continue\n seen.add(value)\n out.push(value)\n }\n return out\n}\n\nfunction getUserConfigRoots(): string[] {\n const claudeOverride = normalizeOverride(process.env.CLAUDE_CONFIG_DIR)\n const pybOverride = normalizeOverride(process.env.PYB_CONFIG_DIR)\n\n const hasAnyOverride = Boolean(claudeOverride || pybOverride)\n if (hasAnyOverride) {\n return dedupeStrings([claudeOverride ?? '', pybOverride ?? ''])\n }\n\n return dedupeStrings([\n getXdgConfigDir(),\n join(homedir(), '.claude'),\n join(homedir(), '.pyb'),\n ])\n}\n\nfunction findProjectAgentDirs(cwd: string): string[] {\n const result: string[] = []\n const home = resolve(homedir())\n let current = resolve(cwd)\n\n while (current !== home) {\n const claudeDir = join(current, '.claude', 'agents')\n if (existsSync(claudeDir)) result.push(claudeDir)\n\n const pybDir = join(current, '.pyb', 'agents')\n if (existsSync(pybDir)) result.push(pybDir)\n\n const parent = dirname(current)\n if (parent === current) break\n current = parent\n }\n\n return result\n}\n\nfunction listMarkdownFilesRecursively(rootDir: string): string[] {\n const files: string[] = []\n const visitedDirs = new Set<string>()\n\n const walk = (dirPath: string) => {\n let dirStat: ReturnType<typeof statSync>\n try {\n dirStat = statSync(dirPath)\n } catch {\n return\n }\n if (!dirStat.isDirectory()) return\n\n const dirKey = `${dirStat.dev}:${dirStat.ino}`\n if (visitedDirs.has(dirKey)) return\n visitedDirs.add(dirKey)\n\n let entries: Array<{\n name: string\n isDirectory(): boolean\n isFile(): boolean\n isSymbolicLink(): boolean\n }>\n try {\n entries = readdirSync(dirPath, {\n withFileTypes: true,\n encoding: 'utf8',\n }) as any\n } catch {\n return\n }\n\n for (const entry of entries) {\n const name = String(entry.name ?? '')\n const fullPath = join(dirPath, name)\n\n if (entry.isDirectory()) {\n walk(fullPath)\n continue\n }\n\n if (entry.isFile()) {\n if (name.endsWith('.md')) files.push(fullPath)\n continue\n }\n\n if (entry.isSymbolicLink()) {\n try {\n const st = statSync(fullPath)\n if (st.isDirectory()) {\n walk(fullPath)\n } else if (st.isFile() && name.endsWith('.md')) {\n files.push(fullPath)\n }\n } catch {\n continue\n }\n }\n }\n }\n\n if (!existsSync(rootDir)) return []\n walk(rootDir)\n return files\n}\n\nfunction readMarkdownFile(filePath: string): { frontmatter: any; content: string } | null {\n try {\n const raw = readFileSync(filePath, 'utf8')\n const yamlSchema = (yaml as any).JSON_SCHEMA\n const matterOptions = {\n engines: {\n yaml: {\n parse: (input: string) =>\n yaml.load(input, yamlSchema ? { schema: yamlSchema } : undefined) ??\n {},\n },\n },\n }\n const parsed = matter(raw, matterOptions)\n return {\n frontmatter: (parsed.data as any) ?? {},\n content: String(parsed.content ?? ''),\n }\n } catch {\n return null\n }\n}\n\nfunction splitCliList(values: string[]): string[] {\n if (values.length === 0) return []\n const out: string[] = []\n\n for (const value of values) {\n if (!value) continue\n let current = ''\n let inParens = false\n\n for (const ch of value) {\n switch (ch) {\n case '(':\n inParens = true\n current += ch\n break\n case ')':\n inParens = false\n current += ch\n break\n case ',':\n if (inParens) {\n current += ch\n } else {\n const trimmed = current.trim()\n if (trimmed) out.push(trimmed)\n current = ''\n }\n break\n case ' ':\n if (inParens) {\n current += ch\n } else {\n const trimmed = current.trim()\n if (trimmed) out.push(trimmed)\n current = ''\n }\n break\n default:\n current += ch\n }\n }\n\n const trimmed = current.trim()\n if (trimmed) out.push(trimmed)\n }\n\n return out\n}\n\nfunction normalizeToolList(value: unknown): string[] | null {\n if (value === undefined || value === null) return null\n if (!value) return []\n\n let raw: string[] = []\n if (typeof value === 'string') raw = [value]\n else if (Array.isArray(value))\n raw = value.filter((v): v is string => typeof v === 'string')\n\n if (raw.length === 0) return []\n const parsed = splitCliList(raw)\n if (parsed.includes('*')) return ['*']\n return parsed\n}\n\nfunction z2A(value: unknown): string[] | undefined {\n const normalized = normalizeToolList(value)\n if (normalized === null) return value === undefined ? undefined : []\n if (normalized.includes('*')) return undefined\n return normalized\n}\n\nfunction qP(value: unknown): string[] {\n const normalized = normalizeToolList(value)\n if (normalized === null) return []\n return normalized\n}\n\nconst VALID_PERMISSION_MODES = [\n 'default',\n 'acceptEdits',\n 'plan',\n 'bypassPermissions',\n 'dontAsk',\n 'delegate',\n] as const\n\nfunction sourceToLocation(source: AgentSource): AgentLocation {\n switch (source) {\n case 'plugin':\n return 'plugin'\n case 'userSettings':\n return 'user'\n case 'projectSettings':\n return 'project'\n case 'built-in':\n case 'flagSettings':\n case 'policySettings':\n default:\n return 'built-in'\n }\n}\n\nfunction parseAgentFromFile(options: {\n filePath: string\n baseDir: string\n source: Exclude<AgentSource, 'flagSettings' | 'built-in'>\n}): AgentConfig | null {\n const parsed = readMarkdownFile(options.filePath)\n if (!parsed) return null\n\n try {\n const fm = parsed.frontmatter ?? {}\n let name: unknown = fm.name\n let description: unknown = fm.description\n\n if (!name || typeof name !== 'string' || !description || typeof description !== 'string') {\n return null\n }\n\n const whenToUse = description.replace(/\\\\n/g, '\\n')\n const filename = basename(options.filePath, '.md')\n\n const color = typeof fm.color === 'string' ? fm.color : undefined\n\n let modelRaw: unknown = fm.model\n if (typeof modelRaw !== 'string' && typeof fm.model_name === 'string') {\n modelRaw = fm.model_name\n }\n let model =\n typeof modelRaw === 'string' ? modelRaw.trim() : undefined\n if (model === '') model = undefined\n\n const forkContextValue: unknown = fm.forkContext\n if (\n forkContextValue !== undefined &&\n forkContextValue !== 'true' &&\n forkContextValue !== 'false'\n ) {\n debugLogger.warn('AGENT_LOADER_INVALID_FORK_CONTEXT', {\n filePath: options.filePath,\n forkContext: String(forkContextValue),\n })\n }\n const forkContext = forkContextValue === 'true'\n\n if (forkContext && model && model !== 'inherit') {\n debugLogger.warn('AGENT_LOADER_FORK_CONTEXT_MODEL_OVERRIDE', {\n filePath: options.filePath,\n model,\n })\n model = 'inherit'\n }\n\n const permissionModeValue: unknown = fm.permissionMode\n const permissionModeIsValid =\n typeof permissionModeValue === 'string' &&\n VALID_PERMISSION_MODES.includes(permissionModeValue as AgentPermissionMode)\n if (\n typeof permissionModeValue === 'string' &&\n permissionModeValue &&\n !permissionModeIsValid\n ) {\n debugLogger.warn('AGENT_LOADER_INVALID_PERMISSION_MODE', {\n filePath: options.filePath,\n permissionMode: permissionModeValue,\n valid: VALID_PERMISSION_MODES,\n })\n }\n\n const toolsList = z2A(fm.tools)\n const tools: string[] | '*' =\n toolsList === undefined || toolsList.includes('*') ? '*' : toolsList\n\n const disallowedRaw =\n fm.disallowedTools ??\n fm['disallowed-tools'] ??\n fm['disallowed_tools']\n const disallowedTools = disallowedRaw !== undefined ? z2A(disallowedRaw) : undefined\n\n const skills = qP(fm.skills)\n const systemPrompt = parsed.content.trim()\n\n const agent: AgentConfig = {\n agentType: name,\n whenToUse,\n tools,\n ...(disallowedTools !== undefined ? { disallowedTools } : {}),\n ...(skills.length > 0 ? { skills } : { skills: [] }),\n systemPrompt,\n source: options.source,\n location: sourceToLocation(options.source),\n baseDir: options.baseDir,\n filename,\n ...(color ? { color } : {}),\n ...(model ? { model: model as AgentModel } : {}),\n ...(permissionModeIsValid ? { permissionMode: permissionModeValue as AgentPermissionMode } : {}),\n ...(forkContext ? { forkContext: true } : {}),\n }\n\n return agent\n } catch {\n return null\n }\n}\n\nconst agentJsonSchema = z.object({\n description: z.string().min(1, 'Description cannot be empty'),\n tools: z.array(z.string()).optional(),\n disallowedTools: z.array(z.string()).optional(),\n prompt: z.string().min(1, 'Prompt cannot be empty'),\n model: z.string().optional(),\n permissionMode: z.enum(VALID_PERMISSION_MODES).optional(),\n})\n\nconst agentsJsonSchema = z.record(z.string(), agentJsonSchema)\n\nfunction parseAgentFromJson(agentType: string, value: unknown): AgentConfig | null {\n const parsed = agentJsonSchema.safeParse(value)\n if (!parsed.success) return null\n\n const toolsList = z2A(parsed.data.tools)\n const disallowedList =\n parsed.data.disallowedTools !== undefined ? z2A(parsed.data.disallowedTools) : undefined\n const model =\n typeof parsed.data.model === 'string' ? parsed.data.model.trim() : undefined\n\n return {\n agentType,\n whenToUse: parsed.data.description,\n tools: toolsList === undefined || toolsList.includes('*') ? '*' : toolsList,\n ...(disallowedList !== undefined ? { disallowedTools: disallowedList } : {}),\n systemPrompt: parsed.data.prompt,\n source: 'flagSettings',\n location: 'built-in',\n ...(model ? { model: model as AgentModel } : {}),\n ...(parsed.data.permissionMode ? { permissionMode: parsed.data.permissionMode } : {}),\n }\n}\n\nlet FLAG_AGENTS: AgentConfig[] = []\n\nexport function setFlagAgentsFromCliJson(json: string | undefined): void {\n if (!json) {\n FLAG_AGENTS = []\n clearAgentCache()\n return\n }\n\n let raw: unknown\n try {\n raw = JSON.parse(json)\n } catch (err) {\n logError(err)\n debugLogger.warn('AGENT_LOADER_FLAG_AGENTS_JSON_PARSE_FAILED', {\n error: err instanceof Error ? err.message : String(err),\n })\n FLAG_AGENTS = []\n clearAgentCache()\n return\n }\n\n const parsed = agentsJsonSchema.safeParse(raw)\n if (!parsed.success) {\n logError(parsed.error)\n debugLogger.warn('AGENT_LOADER_FLAG_AGENTS_SCHEMA_INVALID', {\n error: parsed.error.message,\n })\n FLAG_AGENTS = []\n clearAgentCache()\n return\n }\n\n FLAG_AGENTS = Object.entries(parsed.data)\n .map(([agentType, value]) => parseAgentFromJson(agentType, value))\n .filter((agent): agent is AgentConfig => agent !== null)\n\n clearAgentCache()\n}\n\nconst BUILTIN_GENERAL_PURPOSE: AgentConfig = {\n agentType: 'general-purpose',\n whenToUse:\n 'General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks',\n tools: '*',\n systemPrompt: `You are a general-purpose agent. Given the user's task, use the tools available to complete it efficiently and thoroughly.\n\nWhen to use your capabilities:\n- Searching for code, configurations, and patterns across large codebases\n- Analyzing multiple files to understand system architecture \n- Investigating complex questions that require exploring many files\n- Performing multi-step research tasks\n\nGuidelines:\n- For file searches: Use Grep or Glob when you need to search broadly. Use FileRead when you know the specific file path.\n- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.\n- Be thorough: Check multiple locations, consider different naming conventions, look for related files.\n- Complete tasks directly using your capabilities.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nconst BUILTIN_EXPLORE: AgentConfig = {\n agentType: 'Explore',\n whenToUse:\n 'Fast agent specialized for exploring codebases. Use this when you need to quickly find files by patterns (eg. \"src/components/**/*.tsx\"), search code for keywords (eg. \"API endpoints\"), or answer questions about the codebase (eg. \"how do API endpoints work?\"). When calling this agent, specify the desired thoroughness level: \"quick\" for basic searches, \"medium\" for moderate exploration, or \"very thorough\" for comprehensive analysis across multiple locations and naming conventions.',\n tools: '*',\n disallowedTools: ['Task', 'ExitPlanMode', 'Edit', 'Write', 'NotebookEdit'],\n model: 'inherit',\n systemPrompt: `You are a file search specialist. You excel at thoroughly navigating and exploring codebases.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY exploration task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to search and analyze existing code. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYour strengths:\n- Rapidly finding files using glob patterns\n- Searching code and text with powerful regex patterns\n- Reading and analyzing file contents\n\nGuidelines:\n- Use Glob for broad file pattern matching\n- Use Grep for searching file contents with regex\n- Use Read when you know the specific file path you need to read\n- Use LS to understand directory structure and top-level layout quickly\n- Use LSP for symbol-level navigation (definitions/references) after you locate a file\n- Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n- NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n- Adapt your search approach based on the thoroughness level specified by the caller\n- Return file paths as absolute paths in your final response\n- For clear communication, avoid using emojis\n- Communicate your final report directly as a regular message - do NOT attempt to create files\n\nNOTE: You are meant to be a fast agent that returns output as quickly as possible. In order to achieve this you must:\n- Make efficient use of the tools that you have at your disposal: be smart about how you search for files and implementations\n- Wherever possible you should try to spawn multiple parallel tool calls for grepping and reading files\n\nComplete the user's search request efficiently and report your findings clearly.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nconst BUILTIN_PLAN: AgentConfig = {\n agentType: 'Plan',\n whenToUse:\n 'Software architect agent for designing implementation plans. Use this when you need to plan the implementation strategy for a task. Returns step-by-step plans, identifies critical files, and considers architectural trade-offs.',\n tools: '*',\n disallowedTools: ['Task', 'ExitPlanMode', 'Edit', 'Write', 'NotebookEdit'],\n model: 'inherit',\n systemPrompt: `You are a software architect and planning specialist. Your role is to explore the codebase and design implementation plans.\n\n=== CRITICAL: READ-ONLY MODE - NO FILE MODIFICATIONS ===\nThis is a READ-ONLY planning task. You are STRICTLY PROHIBITED from:\n- Creating new files (no Write, touch, or file creation of any kind)\n- Modifying existing files (no Edit operations)\n- Deleting files (no rm or deletion)\n- Moving or copying files (no mv or cp)\n- Creating temporary files anywhere, including /tmp\n- Using redirect operators (>, >>, |) or heredocs to write to files\n- Running ANY commands that change system state\n\nYour role is EXCLUSIVELY to explore the codebase and design implementation plans. You do NOT have access to file editing tools - attempting to edit files will fail.\n\nYou will be provided with a set of requirements and optionally a perspective on how to approach the design process.\n\n## Your Process\n\n1. **Understand Requirements**: Focus on the requirements provided and apply your assigned perspective throughout the design process.\n\n2. **Explore Thoroughly**:\n - Read any files provided to you in the initial prompt\n - Find existing patterns and conventions using Glob, Grep, and Read\n - Understand the current architecture\n - Identify similar features as reference\n - Trace through relevant code paths\n - Use Bash ONLY for read-only operations (ls, git status, git log, git diff, find, cat, head, tail)\n - NEVER use Bash for: mkdir, touch, rm, cp, mv, git add, git commit, npm install, pip install, or any file creation/modification\n\n3. **Design Solution**:\n - Create implementation approach based on your assigned perspective\n - Consider trade-offs and architectural decisions\n - Follow existing patterns where appropriate\n\n4. **Detail the Plan**:\n - Provide step-by-step implementation strategy\n - Identify dependencies and sequencing\n - Anticipate potential challenges\n\n## Required Output\n\nEnd your response with:\n\n### Critical Files for Implementation\nList 3-5 files most critical for implementing this plan:\n- path/to/file1.ts - [Brief reason: e.g., \"Core logic to modify\"]\n- path/to/file2.ts - [Brief reason: e.g., \"Interfaces to implement\"]\n- path/to/file3.ts - [Brief reason: e.g., \"Pattern to follow\"]\n\nREMEMBER: You can ONLY explore and plan. You CANNOT and MUST NOT write, edit, or modify any files. You do NOT have access to file editing tools.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nconst BUILTIN_STATUSLINE_SETUP: AgentConfig = {\n agentType: 'statusline-setup',\n whenToUse:\n 'Set up the CLI status line command (writes to ~/.pyb/settings.json statusLine). Use when the user runs /statusline.',\n tools: ['Read', 'Edit', 'Bash'],\n systemPrompt: `You are the status line setup agent.\n\nYour job is to configure a fast, single-line status command for the CLI UI.\n\nRequirements:\n- Write/update the user's ~/.pyb/settings.json and set the top-level key \"statusLine\" to a shell command string.\n- IMPORTANT: When using Read/Edit tools, use absolute paths (do not pass \"~\" to tool inputs).\n- The command must be quick (ideally <200ms), produce a single line, and be safe to run repeatedly.\n- Prefer using information that is generally available: current directory, git branch/dirty state, etc.\n- If you can't infer the user's preferred status info from their shell config, ask them what they want and propose a reasonable default.\n\nSuggested approach:\n1) Inspect common shell config files (Read):\n - macOS/Linux: ~/.zshrc, ~/.bashrc, ~/.config/fish/config.fish\n - Windows: consider PowerShell profile if the user provides its location\n2) Propose a statusLine command:\n - macOS/Linux: e.g. a small sh snippet that prints cwd basename and git branch if present\n - Windows: e.g. a short PowerShell one-liner that prints similar info\n3) Update ~/.pyb/settings.json:\n - If the file does not exist, create it as a minimal JSON object.\n - Preserve unrelated fields if present.\n4) Reply with the exact command you set and how the user can change/remove it later.`,\n source: 'built-in',\n location: 'built-in',\n baseDir: 'built-in',\n}\n\nfunction mergeAgents(allAgents: AgentConfig[]): AgentConfig[] {\n const builtIn = allAgents.filter(a => a.source === 'built-in')\n const plugin = allAgents.filter(a => a.source === 'plugin')\n const user = allAgents.filter(a => a.source === 'userSettings')\n const project = allAgents.filter(a => a.source === 'projectSettings')\n const flag = allAgents.filter(a => a.source === 'flagSettings')\n const policy = allAgents.filter(a => a.source === 'policySettings')\n\n const ordered = [builtIn, plugin, user, project, flag, policy]\n const map = new Map<string, AgentConfig>()\n for (const group of ordered) {\n for (const agent of group) {\n map.set(agent.agentType, agent)\n }\n }\n return Array.from(map.values())\n}\n\nfunction inodeKeyForPath(filePath: string): string | null {\n try {\n const st = statSync(filePath)\n if (typeof (st as any).dev === 'number' && typeof (st as any).ino === 'number') {\n return `${(st as any).dev}:${(st as any).ino}`\n }\n return null\n } catch {\n return null\n }\n}\n\nfunction scanAgentPaths(options: {\n dirPathOrFile: string\n baseDir: string\n source: Exclude<AgentSource, 'built-in' | 'flagSettings'>\n seenInodes: Map<string, AgentSource>\n}): AgentConfig[] {\n const out: AgentConfig[] = []\n\n const addFile = (filePath: string) => {\n if (!filePath.endsWith('.md')) return\n\n const inodeKey = inodeKeyForPath(filePath)\n if (inodeKey) {\n const existing = options.seenInodes.get(inodeKey)\n if (existing) return\n options.seenInodes.set(inodeKey, options.source)\n }\n\n const agent = parseAgentFromFile({\n filePath,\n baseDir: options.baseDir,\n source: options.source,\n })\n if (agent) out.push(agent)\n }\n\n let st: ReturnType<typeof statSync>\n try {\n st = statSync(options.dirPathOrFile)\n } catch {\n return []\n }\n\n if (st.isFile()) {\n addFile(options.dirPathOrFile)\n return out\n }\n\n if (!st.isDirectory()) return []\n\n for (const filePath of listMarkdownFilesRecursively(options.dirPathOrFile)) {\n addFile(filePath)\n }\n\n return out\n}\n\nasync function loadAllAgents(): Promise<{\n activeAgents: AgentConfig[]\n allAgents: AgentConfig[]\n}> {\n const builtinAgents: AgentConfig[] = [\n BUILTIN_GENERAL_PURPOSE,\n BUILTIN_STATUSLINE_SETUP,\n BUILTIN_EXPLORE,\n BUILTIN_PLAN,\n ]\n\n const seenInodes = new Map<string, AgentSource>()\n\n const sessionPlugins = getSessionPlugins()\n const pluginAgentDirs = sessionPlugins.flatMap(p => p.agentsDirs ?? [])\n const pluginAgents = pluginAgentDirs.flatMap(dir =>\n scanAgentPaths({\n dirPathOrFile: dir,\n baseDir: dir,\n source: 'plugin',\n seenInodes,\n }),\n )\n\n const policyAgentsDir = join(getClaudePolicyBaseDir(), '.claude', 'agents')\n const policyAgents = scanAgentPaths({\n dirPathOrFile: policyAgentsDir,\n baseDir: policyAgentsDir,\n source: 'policySettings',\n seenInodes,\n })\n\n const userAgents: AgentConfig[] = []\n if (isSettingSourceEnabled('userSettings')) {\n for (const root of getUserConfigRoots()) {\n const dir = join(root, 'agents')\n userAgents.push(\n ...scanAgentPaths({\n dirPathOrFile: dir,\n baseDir: dir,\n source: 'userSettings',\n seenInodes,\n }),\n )\n }\n }\n\n const projectAgents: AgentConfig[] = []\n if (isSettingSourceEnabled('projectSettings')) {\n const dirs = findProjectAgentDirs(getCwd())\n for (const dir of dirs) {\n projectAgents.push(\n ...scanAgentPaths({\n dirPathOrFile: dir,\n baseDir: dir,\n source: 'projectSettings',\n seenInodes,\n }),\n )\n }\n }\n\n const allAgents: AgentConfig[] = [\n ...builtinAgents,\n ...pluginAgents,\n ...userAgents,\n ...projectAgents,\n ...FLAG_AGENTS,\n ...policyAgents,\n ]\n\n const activeAgents = mergeAgents(allAgents)\n return { activeAgents, allAgents }\n}\n\nexport const getActiveAgents = memoize(async (): Promise<AgentConfig[]> => {\n const { activeAgents } = await loadAllAgents()\n return activeAgents\n})\n\nexport const getAllAgents = memoize(async (): Promise<AgentConfig[]> => {\n const { allAgents } = await loadAllAgents()\n return allAgents\n})\n\nexport const getAgentByType = memoize(\n async (agentType: string): Promise<AgentConfig | undefined> => {\n const agents = await getActiveAgents()\n return agents.find(agent => agent.agentType === agentType)\n },\n)\n\nexport const getAvailableAgentTypes = memoize(async (): Promise<string[]> => {\n const agents = await getActiveAgents()\n return agents.map(agent => agent.agentType)\n})\n\nexport function clearAgentCache(): void {\n getActiveAgents.cache?.clear?.()\n getAllAgents.cache?.clear?.()\n getAgentByType.cache?.clear?.()\n getAvailableAgentTypes.cache?.clear?.()\n}\n\nlet watchers: FSWatcher[] = []\n\nexport async function startAgentWatcher(onChange?: () => void): Promise<void> {\n await stopAgentWatcher()\n\n const watchDirs: string[] = []\n\n watchDirs.push(join(getClaudePolicyBaseDir(), '.claude', 'agents'))\n\n if (isSettingSourceEnabled('userSettings')) {\n for (const root of getUserConfigRoots()) {\n watchDirs.push(join(root, 'agents'))\n }\n }\n\n if (isSettingSourceEnabled('projectSettings')) {\n watchDirs.push(...findProjectAgentDirs(getCwd()))\n }\n\n for (const plugin of getSessionPlugins()) {\n for (const dir of plugin.agentsDirs ?? []) {\n watchDirs.push(dir)\n }\n }\n\n for (const dirPath of dedupeStrings(watchDirs)) {\n if (!existsSync(dirPath)) continue\n try {\n const watcher = watch(\n dirPath,\n { recursive: false },\n async (_eventType, filename) => {\n if (filename && filename.endsWith('.md')) {\n clearAgentCache()\n onChange?.()\n }\n },\n )\n watchers.push(watcher)\n } catch {\n continue\n }\n }\n}\n\nexport async function stopAgentWatcher(): Promise<void> {\n try {\n for (const watcher of watchers) {\n try {\n watcher.close()\n } catch {\n }\n }\n } finally {\n watchers = []\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,UAAU,SAAS,MAAM,eAAe;AACjD,SAAS,eAAe;AACxB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,SAAS,eAAe;AACxB,SAAS,SAAS;AA6ClB,SAAS,yBAAiC;AACxC,UAAQ,QAAQ,UAAU;AAAA,IACxB,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO,WAAW,+BAA+B,IAC7C,kCACA;AAAA,IACN;AACE,aAAO;AAAA,EACX;AACF;AAEA,SAAS,kBAAkB,OAA+B;AACxD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,QAAM,UAAU,MAAM,KAAK;AAC3B,SAAO,UAAU,QAAQ,OAAO,IAAI;AACtC;AAEA,SAAS,cAAc,QAA4B;AACjD,QAAM,MAAgB,CAAC;AACvB,QAAM,OAAO,oBAAI,IAAY;AAC7B,aAAW,SAAS,QAAQ;AAC1B,QAAI,CAAC,MAAO;AACZ,QAAI,KAAK,IAAI,KAAK,EAAG;AACrB,SAAK,IAAI,KAAK;AACd,QAAI,KAAK,KAAK;AAAA,EAChB;AACA,SAAO;AACT;AAEA,SAAS,qBAA+B;AACtC,QAAM,iBAAiB,kBAAkB,QAAQ,IAAI,iBAAiB;AACtE,QAAM,cAAc,kBAAkB,QAAQ,IAAI,cAAc;AAEhE,QAAM,iBAAiB,QAAQ,kBAAkB,WAAW;AAC5D,MAAI,gBAAgB;AAClB,WAAO,cAAc,CAAC,kBAAkB,IAAI,eAAe,EAAE,CAAC;AAAA,EAChE;AAEA,SAAO,cAAc;AAAA,IACnB,gBAAgB;AAAA,IAChB,KAAK,QAAQ,GAAG,SAAS;AAAA,IACzB,KAAK,QAAQ,GAAG,MAAM;AAA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,UAAU;AAAA,QACd;AAAA,QACA,EAAE,WAAW,MAAM;AAAA,QACnB,OAAO,YAAY,aAAa;AAC9B,cAAI,YAAY,SAAS,SAAS,KAAK,GAAG;AACxC,4BAAgB;AAChB,uBAAW;AAAA,UACb;AAAA,QACF;AAAA,MACF;AACA,eAAS,KAAK,OAAO;AAAA,IACvB,QAAQ;AACN;AAAA,IACF;AAAA,EACF;AACF;AAEA,eAAsB,mBAAkC;AACtD,MAAI;AACF,eAAW,WAAW,UAAU;AAC9B,UAAI;AACF,gBAAQ,MAAM;AAAA,MAChB,QAAQ;AAAA,MACR;AAAA,IACF;AAAA,EACF,UAAE;AACA,eAAW,CAAC;AAAA,EACd;AACF;",
6
6
  "names": ["trimmed"]
7
7
  }
@@ -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-XS2CSGZS.js";
5
+ } from "./chunk-26DNH5MY.js";
6
6
  import {
7
7
  isUuid
8
8
  } from "./chunk-5P7HBXTD.js";
@@ -4,17 +4,17 @@ import {
4
4
  LspServerRegistry,
5
5
  findNearestRoot,
6
6
  getInstallNotices
7
- } from "./chunk-5LU4IMRO.js";
7
+ } from "./chunk-AHK3NVAX.js";
8
8
  import {
9
9
  levenshtein
10
10
  } from "./chunk-UZ34JEUK.js";
11
11
  import {
12
12
  debug
13
- } from "./chunk-YM3LU2U2.js";
13
+ } from "./chunk-EHFY3DA7.js";
14
14
  import {
15
15
  getCwd,
16
16
  getSessionRoot
17
- } from "./chunk-54BVQTJK.js";
17
+ } from "./chunk-CDKFT2GF.js";
18
18
 
19
19
  // src/lsp/index.ts
20
20
  import { extname as extname2 } from "path";
@@ -565,7 +565,7 @@ var LspClientManager = class _LspClientManager {
565
565
  const safeCwd = /[^\x00-\x7F]/.test(resolvedRoot) ? process.cwd() : resolvedRoot;
566
566
  let initOpts = serverInfo.initializationOptions;
567
567
  if (serverInfo.id === "pyright" || serverInfo.id === "ty") {
568
- const { detectPythonVenv } = await import("./registry-KEXYTSWO.js");
568
+ const { detectPythonVenv } = await import("./registry-HBS4R3GL.js");
569
569
  const pythonPath = detectPythonVenv(resolvedRoot);
570
570
  if (pythonPath) {
571
571
  initOpts = { ...initOpts ?? {}, pythonPath };
@@ -448,7 +448,7 @@ function getLastAssistantMessageId(messages) {
448
448
 
449
449
  // src/utils/messages/index.ts
450
450
  async function processUserInput(input, mode, setToolJSX, context, pastedImages) {
451
- const impl = await import("./userInput-CQF6H7YG.js");
451
+ const impl = await import("./userInput-ABKKAHHH.js");
452
452
  return impl.processUserInput(input, mode, setToolJSX, context, pastedImages);
453
453
  }
454
454
 
@@ -5,7 +5,7 @@ import {
5
5
  getCwd,
6
6
  resolveXdgCachePath,
7
7
  resolveXdgDataPath
8
- } from "./chunk-54BVQTJK.js";
8
+ } from "./chunk-CDKFT2GF.js";
9
9
 
10
10
  // src/services/plugins/skillMarketplace.ts
11
11
  import {
@@ -2,15 +2,15 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  loadSettingsWithLegacyFallback
5
- } from "./chunk-X2WFPPZ6.js";
5
+ } from "./chunk-KEBVFZAX.js";
6
6
  import {
7
7
  debug
8
- } from "./chunk-YM3LU2U2.js";
8
+ } from "./chunk-EHFY3DA7.js";
9
9
  import {
10
10
  env,
11
11
  getSessionRoot,
12
12
  resolveXdgDataPath
13
- } from "./chunk-54BVQTJK.js";
13
+ } from "./chunk-CDKFT2GF.js";
14
14
  import {
15
15
  __require
16
16
  } from "./chunk-I3J4JYES.js";