pybao-cli 1.5.21 → 1.5.23

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 (163) hide show
  1. package/dist/REPL-CI5ET6VF.js +50 -0
  2. package/dist/{acp-VH2FWCMR.js → acp-5G7LPADD.js} +32 -32
  3. package/dist/{agentsValidate-4E7AHAMS.js → agentsValidate-BIRAVXBL.js} +7 -7
  4. package/dist/{ask-R3YZ5B44.js → ask-XQZT6WIO.js} +31 -31
  5. package/dist/{autoUpdater-DCNAXD4F.js → autoUpdater-DDJAJPKA.js} +3 -3
  6. package/dist/{chunk-GIXE5FJ2.js → chunk-2GHNW642.js} +1 -1
  7. package/dist/{chunk-NRQHLVJJ.js → chunk-2SVUNNJB.js} +2 -2
  8. package/dist/{chunk-6UNYL6XK.js → chunk-3CC7QXCN.js} +222 -75
  9. package/dist/chunk-3CC7QXCN.js.map +7 -0
  10. package/dist/{chunk-H2ZE5QDY.js → chunk-4ZZYPG6P.js} +4 -4
  11. package/dist/{chunk-TBEA6BY3.js → chunk-5B7UCAYL.js} +1 -1
  12. package/dist/{chunk-ZQR3MM2D.js → chunk-652OMXEE.js} +2 -2
  13. package/dist/{chunk-EP62LHB7.js → chunk-6QGIRDZS.js} +1 -1
  14. package/dist/{chunk-BED7SG2Q.js → chunk-76BOJQUE.js} +1 -1
  15. package/dist/{chunk-TXZ5UTGP.js → chunk-7SYDIES4.js} +1 -1
  16. package/dist/{chunk-TXZ5UTGP.js.map → chunk-7SYDIES4.js.map} +1 -1
  17. package/dist/{chunk-CSONCQLF.js → chunk-A6QEPK5J.js} +2 -2
  18. package/dist/{chunk-X5LLT4P2.js → chunk-ABJT5MG2.js} +1 -1
  19. package/dist/{chunk-56IL2VXC.js → chunk-C2GNLGBM.js} +1 -1
  20. package/dist/{chunk-2OOER4FR.js → chunk-CNMNKSWQ.js} +3 -3
  21. package/dist/{chunk-QE7PZPHW.js → chunk-CT7LWVB7.js} +1 -1
  22. package/dist/{chunk-P5NTGZ5H.js → chunk-CZZKRPE2.js} +1 -1
  23. package/dist/{chunk-P5NTGZ5H.js.map → chunk-CZZKRPE2.js.map} +1 -1
  24. package/dist/chunk-G5MP72ZL.js +515 -0
  25. package/dist/chunk-G5MP72ZL.js.map +7 -0
  26. package/dist/{chunk-25GZITCX.js → chunk-GU4XA76N.js} +3 -3
  27. package/dist/chunk-KQZAS4DO.js +582 -0
  28. package/dist/chunk-KQZAS4DO.js.map +7 -0
  29. package/dist/{chunk-VP5A6FKG.js → chunk-LBDLSBXN.js} +4 -1
  30. package/dist/{chunk-SE7UGQCE.js → chunk-M7FEUIHO.js} +2 -2
  31. package/dist/{chunk-HA7FKBZI.js → chunk-MMW6MLFR.js} +2 -2
  32. package/dist/{chunk-XRLMQN3Q.js → chunk-MN77HNBB.js} +4 -4
  33. package/dist/{chunk-VY5KEHU5.js → chunk-N7GEPTZB.js} +3 -3
  34. package/dist/{chunk-MMMMRMOG.js → chunk-O7LWCCRJ.js} +3 -3
  35. package/dist/{chunk-5VO2CFAL.js → chunk-PUPDIRI6.js} +2 -2
  36. package/dist/{chunk-YQ2RQUQF.js → chunk-QCI5HPTA.js} +1 -1
  37. package/dist/{chunk-KMCUZUZG.js → chunk-QSMZLK7K.js} +3 -3
  38. package/dist/{chunk-4ZGZTWMR.js → chunk-S65MIABQ.js} +4 -4
  39. package/dist/{chunk-3UWTN6DM.js → chunk-V22PQM4W.js} +3 -3
  40. package/dist/{chunk-RQ5X6LFM.js → chunk-VVXC3SNP.js} +4 -4
  41. package/dist/{chunk-LRL3MYKR.js → chunk-W7VIESST.js} +3 -3
  42. package/dist/{chunk-CPYDPN2J.js → chunk-XEVB4WON.js} +15 -15
  43. package/dist/chunk-ZB3ZWD2K.js +96 -0
  44. package/dist/chunk-ZB3ZWD2K.js.map +7 -0
  45. package/dist/{cli-RBMZQ5KF.js → cli-YIANCHDD.js} +130 -103
  46. package/dist/cli-YIANCHDD.js.map +7 -0
  47. package/dist/commands-4YMZW52K.js +54 -0
  48. package/dist/{config-7TO5SQU5.js → config-QVH3VNUQ.js} +4 -4
  49. package/dist/{context-LRA2DKJT.js → context-5VXEWH3G.js} +6 -6
  50. package/dist/{conversationPersistence-Z4QSI5NB.js → conversationPersistence-INUNJHOV.js} +3 -3
  51. package/dist/{conversationTracker-B3DMEHMA.js → conversationTracker-H25IOHBE.js} +4 -4
  52. package/dist/{customCommands-6JZ2VUO2.js → customCommands-7RZHKH2K.js} +4 -4
  53. package/dist/{env-37ALKFXU.js → env-DPJTGHMP.js} +2 -2
  54. package/dist/{file-7EOMBX72.js → file-D7W2FBZP.js} +4 -4
  55. package/dist/index.js +3 -3
  56. package/dist/{llm-3KQG5NEP.js → llm-TOU5REY5.js} +32 -32
  57. package/dist/{llmLazy-ENEH3KAB.js → llmLazy-HSKKIGLC.js} +1 -1
  58. package/dist/{loader-D6V3WFL6.js → loader-YUP6OJTJ.js} +4 -4
  59. package/dist/{lsp-CTPOMI7O.js → lsp-7QKC4DVK.js} +6 -6
  60. package/dist/{lspAnchor-PPPTHRQH.js → lspAnchor-LCRZ23GA.js} +6 -6
  61. package/dist/{mcp-6M34WBA5.js → mcp-KK6BOD6I.js} +7 -7
  62. package/dist/{mentionProcessor-TS4SITI3.js → mentionProcessor-V6JH6HUD.js} +5 -5
  63. package/dist/{messages-BINU6SYX.js → messages-7NVTXWIJ.js} +1 -1
  64. package/dist/{model-6IW224UU.js → model-QSDSUJDB.js} +5 -5
  65. package/dist/{openai-O6CGVMYK.js → openai-JC3KJN3H.js} +5 -5
  66. package/dist/{outputStyles-7PPMLSV6.js → outputStyles-TPH3CCB4.js} +4 -4
  67. package/dist/{pluginRuntime-RU5STQ6F.js → pluginRuntime-7EK4LQDD.js} +6 -6
  68. package/dist/{pluginValidation-JTJTB3TB.js → pluginValidation-BJWCS55I.js} +6 -6
  69. package/dist/prompts-KQNPPEOG.js +56 -0
  70. package/dist/{pybAgentSessionLoad-ZXQAHTQS.js → pybAgentSessionLoad-V3IAJJPS.js} +4 -6
  71. package/dist/{pybAgentSessionResume-R73KFN3V.js → pybAgentSessionResume-WE7ET356.js} +4 -4
  72. package/dist/{pybAgentStreamJsonSession-N4SMTC64.js → pybAgentStreamJsonSession-VWDYV4XL.js} +1 -1
  73. package/dist/{pybHooks-NGJ5OFAI.js → pybHooks-UV7BTIVT.js} +4 -4
  74. package/dist/query-KAZY5LOW.js +54 -0
  75. package/dist/{registry-FKY6JQ3L.js → registry-FK6UGJPV.js} +5 -5
  76. package/dist/{ripgrep-O7MOW25M.js → ripgrep-CXJ4DFPU.js} +3 -3
  77. package/dist/{skillMarketplace-VK3AYR6Q.js → skillMarketplace-QUJXDKZK.js} +3 -3
  78. package/dist/{state-T57IG35V.js → state-GC3XELIE.js} +2 -2
  79. package/dist/{theme-ZEFQIPVH.js → theme-24PLJSPD.js} +5 -5
  80. package/dist/{toolPermissionSettings-ERNXVP7A.js → toolPermissionSettings-S6NJPBKT.js} +6 -6
  81. package/dist/tools-NC5R4I6F.js +55 -0
  82. package/dist/{userInput-JBAUBHGI.js → userInput-4VZSNII7.js} +34 -34
  83. package/package.json +1 -1
  84. package/dist/REPL-64WF5V7K.js +0 -50
  85. package/dist/chunk-6UNYL6XK.js.map +0 -7
  86. package/dist/chunk-BRSPPFSY.js +0 -196
  87. package/dist/chunk-BRSPPFSY.js.map +0 -7
  88. package/dist/chunk-N3T2WAYN.js +0 -138
  89. package/dist/chunk-N3T2WAYN.js.map +0 -7
  90. package/dist/chunk-TSAURYF2.js +0 -81
  91. package/dist/chunk-TSAURYF2.js.map +0 -7
  92. package/dist/cli-RBMZQ5KF.js.map +0 -7
  93. package/dist/commands-WPHK776A.js +0 -54
  94. package/dist/prompts-CAPCICF3.js +0 -56
  95. package/dist/query-CYTIVMQ6.js +0 -54
  96. package/dist/tools-2XLLIKZM.js +0 -55
  97. /package/dist/{REPL-64WF5V7K.js.map → REPL-CI5ET6VF.js.map} +0 -0
  98. /package/dist/{acp-VH2FWCMR.js.map → acp-5G7LPADD.js.map} +0 -0
  99. /package/dist/{agentsValidate-4E7AHAMS.js.map → agentsValidate-BIRAVXBL.js.map} +0 -0
  100. /package/dist/{ask-R3YZ5B44.js.map → ask-XQZT6WIO.js.map} +0 -0
  101. /package/dist/{autoUpdater-DCNAXD4F.js.map → autoUpdater-DDJAJPKA.js.map} +0 -0
  102. /package/dist/{chunk-GIXE5FJ2.js.map → chunk-2GHNW642.js.map} +0 -0
  103. /package/dist/{chunk-NRQHLVJJ.js.map → chunk-2SVUNNJB.js.map} +0 -0
  104. /package/dist/{chunk-H2ZE5QDY.js.map → chunk-4ZZYPG6P.js.map} +0 -0
  105. /package/dist/{chunk-TBEA6BY3.js.map → chunk-5B7UCAYL.js.map} +0 -0
  106. /package/dist/{chunk-ZQR3MM2D.js.map → chunk-652OMXEE.js.map} +0 -0
  107. /package/dist/{chunk-EP62LHB7.js.map → chunk-6QGIRDZS.js.map} +0 -0
  108. /package/dist/{chunk-BED7SG2Q.js.map → chunk-76BOJQUE.js.map} +0 -0
  109. /package/dist/{chunk-CSONCQLF.js.map → chunk-A6QEPK5J.js.map} +0 -0
  110. /package/dist/{chunk-X5LLT4P2.js.map → chunk-ABJT5MG2.js.map} +0 -0
  111. /package/dist/{chunk-56IL2VXC.js.map → chunk-C2GNLGBM.js.map} +0 -0
  112. /package/dist/{chunk-2OOER4FR.js.map → chunk-CNMNKSWQ.js.map} +0 -0
  113. /package/dist/{chunk-QE7PZPHW.js.map → chunk-CT7LWVB7.js.map} +0 -0
  114. /package/dist/{chunk-25GZITCX.js.map → chunk-GU4XA76N.js.map} +0 -0
  115. /package/dist/{chunk-VP5A6FKG.js.map → chunk-LBDLSBXN.js.map} +0 -0
  116. /package/dist/{chunk-SE7UGQCE.js.map → chunk-M7FEUIHO.js.map} +0 -0
  117. /package/dist/{chunk-HA7FKBZI.js.map → chunk-MMW6MLFR.js.map} +0 -0
  118. /package/dist/{chunk-XRLMQN3Q.js.map → chunk-MN77HNBB.js.map} +0 -0
  119. /package/dist/{chunk-VY5KEHU5.js.map → chunk-N7GEPTZB.js.map} +0 -0
  120. /package/dist/{chunk-MMMMRMOG.js.map → chunk-O7LWCCRJ.js.map} +0 -0
  121. /package/dist/{chunk-5VO2CFAL.js.map → chunk-PUPDIRI6.js.map} +0 -0
  122. /package/dist/{chunk-YQ2RQUQF.js.map → chunk-QCI5HPTA.js.map} +0 -0
  123. /package/dist/{chunk-KMCUZUZG.js.map → chunk-QSMZLK7K.js.map} +0 -0
  124. /package/dist/{chunk-4ZGZTWMR.js.map → chunk-S65MIABQ.js.map} +0 -0
  125. /package/dist/{chunk-3UWTN6DM.js.map → chunk-V22PQM4W.js.map} +0 -0
  126. /package/dist/{chunk-RQ5X6LFM.js.map → chunk-VVXC3SNP.js.map} +0 -0
  127. /package/dist/{chunk-LRL3MYKR.js.map → chunk-W7VIESST.js.map} +0 -0
  128. /package/dist/{chunk-CPYDPN2J.js.map → chunk-XEVB4WON.js.map} +0 -0
  129. /package/dist/{commands-WPHK776A.js.map → commands-4YMZW52K.js.map} +0 -0
  130. /package/dist/{config-7TO5SQU5.js.map → config-QVH3VNUQ.js.map} +0 -0
  131. /package/dist/{context-LRA2DKJT.js.map → context-5VXEWH3G.js.map} +0 -0
  132. /package/dist/{conversationPersistence-Z4QSI5NB.js.map → conversationPersistence-INUNJHOV.js.map} +0 -0
  133. /package/dist/{conversationTracker-B3DMEHMA.js.map → conversationTracker-H25IOHBE.js.map} +0 -0
  134. /package/dist/{customCommands-6JZ2VUO2.js.map → customCommands-7RZHKH2K.js.map} +0 -0
  135. /package/dist/{env-37ALKFXU.js.map → env-DPJTGHMP.js.map} +0 -0
  136. /package/dist/{file-7EOMBX72.js.map → file-D7W2FBZP.js.map} +0 -0
  137. /package/dist/{llm-3KQG5NEP.js.map → llm-TOU5REY5.js.map} +0 -0
  138. /package/dist/{llmLazy-ENEH3KAB.js.map → llmLazy-HSKKIGLC.js.map} +0 -0
  139. /package/dist/{loader-D6V3WFL6.js.map → loader-YUP6OJTJ.js.map} +0 -0
  140. /package/dist/{lsp-CTPOMI7O.js.map → lsp-7QKC4DVK.js.map} +0 -0
  141. /package/dist/{lspAnchor-PPPTHRQH.js.map → lspAnchor-LCRZ23GA.js.map} +0 -0
  142. /package/dist/{mcp-6M34WBA5.js.map → mcp-KK6BOD6I.js.map} +0 -0
  143. /package/dist/{mentionProcessor-TS4SITI3.js.map → mentionProcessor-V6JH6HUD.js.map} +0 -0
  144. /package/dist/{messages-BINU6SYX.js.map → messages-7NVTXWIJ.js.map} +0 -0
  145. /package/dist/{model-6IW224UU.js.map → model-QSDSUJDB.js.map} +0 -0
  146. /package/dist/{openai-O6CGVMYK.js.map → openai-JC3KJN3H.js.map} +0 -0
  147. /package/dist/{outputStyles-7PPMLSV6.js.map → outputStyles-TPH3CCB4.js.map} +0 -0
  148. /package/dist/{pluginRuntime-RU5STQ6F.js.map → pluginRuntime-7EK4LQDD.js.map} +0 -0
  149. /package/dist/{pluginValidation-JTJTB3TB.js.map → pluginValidation-BJWCS55I.js.map} +0 -0
  150. /package/dist/{prompts-CAPCICF3.js.map → prompts-KQNPPEOG.js.map} +0 -0
  151. /package/dist/{pybAgentSessionLoad-ZXQAHTQS.js.map → pybAgentSessionLoad-V3IAJJPS.js.map} +0 -0
  152. /package/dist/{pybAgentSessionResume-R73KFN3V.js.map → pybAgentSessionResume-WE7ET356.js.map} +0 -0
  153. /package/dist/{pybAgentStreamJsonSession-N4SMTC64.js.map → pybAgentStreamJsonSession-VWDYV4XL.js.map} +0 -0
  154. /package/dist/{pybHooks-NGJ5OFAI.js.map → pybHooks-UV7BTIVT.js.map} +0 -0
  155. /package/dist/{query-CYTIVMQ6.js.map → query-KAZY5LOW.js.map} +0 -0
  156. /package/dist/{registry-FKY6JQ3L.js.map → registry-FK6UGJPV.js.map} +0 -0
  157. /package/dist/{ripgrep-O7MOW25M.js.map → ripgrep-CXJ4DFPU.js.map} +0 -0
  158. /package/dist/{skillMarketplace-VK3AYR6Q.js.map → skillMarketplace-QUJXDKZK.js.map} +0 -0
  159. /package/dist/{state-T57IG35V.js.map → state-GC3XELIE.js.map} +0 -0
  160. /package/dist/{theme-ZEFQIPVH.js.map → theme-24PLJSPD.js.map} +0 -0
  161. /package/dist/{toolPermissionSettings-ERNXVP7A.js.map → toolPermissionSettings-S6NJPBKT.js.map} +0 -0
  162. /package/dist/{tools-2XLLIKZM.js.map → tools-NC5R4I6F.js.map} +0 -0
  163. /package/dist/{userInput-JBAUBHGI.js.map → userInput-4VZSNII7.js.map} +0 -0
@@ -1,19 +1,15 @@
1
1
  import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
- import {
4
- loadPybAgentSessionMessages
5
- } from "./chunk-N3T2WAYN.js";
6
- import {
7
- listPybAgentSessions
8
- } from "./chunk-BRSPPFSY.js";
9
3
  import {
10
4
  appendSessionCustomTitleRecord,
11
- appendSessionTagRecord
12
- } from "./chunk-TSAURYF2.js";
5
+ appendSessionJsonlFromMessage,
6
+ appendSessionTagRecord,
7
+ listPybAgentSessions
8
+ } from "./chunk-KQZAS4DO.js";
13
9
  import {
14
10
  formatValidationResult,
15
11
  validatePluginOrMarketplacePath
16
- } from "./chunk-LRL3MYKR.js";
12
+ } from "./chunk-W7VIESST.js";
17
13
  import {
18
14
  ConversationTracker,
19
15
  appendFinishState,
@@ -21,13 +17,16 @@ import {
21
17
  getConversationTrackerForContext,
22
18
  isFinishComplete,
23
19
  mapFinishReason
24
- } from "./chunk-GIXE5FJ2.js";
20
+ } from "./chunk-2GHNW642.js";
25
21
  import {
26
22
  FileSystemConversationPersistence
27
- } from "./chunk-EP62LHB7.js";
23
+ } from "./chunk-6QGIRDZS.js";
28
24
  import {
29
25
  beginReplSessionScope
30
26
  } from "./chunk-F4AXICO7.js";
27
+ import {
28
+ loadPybAgentSessionMessages
29
+ } from "./chunk-ZB3ZWD2K.js";
31
30
  import {
32
31
  drainHookSystemPromptAdditions,
33
32
  getHookTranscriptPath,
@@ -39,7 +38,7 @@ import {
39
38
  runStopHooks,
40
39
  runUserPromptSubmitHooks,
41
40
  updateHookTranscriptForMessages
42
- } from "./chunk-2OOER4FR.js";
41
+ } from "./chunk-CNMNKSWQ.js";
43
42
  import {
44
43
  DEFAULT_OUTPUT_STYLE,
45
44
  getAvailableOutputStyles,
@@ -48,11 +47,11 @@ import {
48
47
  getOutputStyleSystemPromptAdditions,
49
48
  resolveOutputStyleName,
50
49
  setCurrentOutputStyle
51
- } from "./chunk-SE7UGQCE.js";
50
+ } from "./chunk-M7FEUIHO.js";
52
51
  import {
53
52
  fetchCustomModels,
54
53
  getModelFeatures
55
- } from "./chunk-CSONCQLF.js";
54
+ } from "./chunk-A6QEPK5J.js";
56
55
  import {
57
56
  getSessionState
58
57
  } from "./chunk-XKYHFZEC.js";
@@ -60,7 +59,7 @@ import {
60
59
  queryLLM,
61
60
  queryQuick,
62
61
  verifyApiKey
63
- } from "./chunk-4ZGZTWMR.js";
62
+ } from "./chunk-S65MIABQ.js";
64
63
  import {
65
64
  DEFAULT_TIMEOUT_MS,
66
65
  FallbackToolUseRejectedMessage,
@@ -74,7 +73,7 @@ import {
74
73
  listMCPServers,
75
74
  loadMergedSettings,
76
75
  normalizeSandboxRuntimeConfigFromSettings
77
- } from "./chunk-H2ZE5QDY.js";
76
+ } from "./chunk-4ZZYPG6P.js";
78
77
  import {
79
78
  addMarketplace,
80
79
  disableSkillPlugin,
@@ -87,11 +86,11 @@ import {
87
86
  refreshMarketplaceAsync,
88
87
  removeMarketplace,
89
88
  uninstallSkillPlugin
90
- } from "./chunk-QE7PZPHW.js";
89
+ } from "./chunk-CT7LWVB7.js";
91
90
  import {
92
91
  loadToolPermissionContextFromDisk,
93
92
  persistToolPermissionUpdateToDisk
94
- } from "./chunk-KMCUZUZG.js";
93
+ } from "./chunk-QSMZLK7K.js";
95
94
  import {
96
95
  applyToolPermissionContextUpdate,
97
96
  applyToolPermissionContextUpdates,
@@ -102,13 +101,13 @@ import {
102
101
  generateSystemReminders,
103
102
  resetReminderSession,
104
103
  systemReminderService
105
- } from "./chunk-ZQR3MM2D.js";
104
+ } from "./chunk-652OMXEE.js";
106
105
  import {
107
106
  clearAgentCache,
108
107
  getActiveAgents,
109
108
  getAgentByType,
110
109
  getAllAgents
111
- } from "./chunk-NRQHLVJJ.js";
110
+ } from "./chunk-2SVUNNJB.js";
112
111
  import {
113
112
  API_ERROR_MESSAGE_PREFIX,
114
113
  CANCEL_MESSAGE,
@@ -145,7 +144,7 @@ import {
145
144
  reorderMessages,
146
145
  resetAutoCompactTelemetry,
147
146
  stripSystemMessages
148
- } from "./chunk-YQ2RQUQF.js";
147
+ } from "./chunk-QCI5HPTA.js";
149
148
  import {
150
149
  getRequestStatus,
151
150
  setRequestStatus,
@@ -175,7 +174,7 @@ import {
175
174
  normalizeFilePath,
176
175
  readTextContent,
177
176
  writeTextContent
178
- } from "./chunk-HA7FKBZI.js";
177
+ } from "./chunk-MMW6MLFR.js";
179
178
  import {
180
179
  parseBlockEdits
181
180
  } from "./chunk-QWIBSCDN.js";
@@ -185,18 +184,18 @@ import {
185
184
  ParserRegistry,
186
185
  initParser,
187
186
  loadLanguage
188
- } from "./chunk-XRLMQN3Q.js";
187
+ } from "./chunk-MN77HNBB.js";
189
188
  import {
190
189
  getSettingsFileCandidates,
191
190
  loadSettingsWithLegacyFallback,
192
191
  readSettingsFile
193
- } from "./chunk-X5LLT4P2.js";
192
+ } from "./chunk-ABJT5MG2.js";
194
193
  import {
195
194
  getCustomCommandDirectories,
196
195
  hasCustomCommands,
197
196
  loadCustomCommands,
198
197
  reloadCustomCommands
199
- } from "./chunk-5VO2CFAL.js";
198
+ } from "./chunk-PUPDIRI6.js";
200
199
  import {
201
200
  getSessionPlugins
202
201
  } from "./chunk-BJSWTHRM.js";
@@ -205,7 +204,7 @@ import {
205
204
  buildModelProfileKey,
206
205
  getModelManager,
207
206
  isDefaultSlowAndCapableModel
208
- } from "./chunk-25GZITCX.js";
207
+ } from "./chunk-GU4XA76N.js";
209
208
  import {
210
209
  getCodeStyle,
211
210
  getContext,
@@ -213,16 +212,16 @@ import {
213
212
  getIsGit,
214
213
  getProjectDocs,
215
214
  getProjectStructureStatisticsBlock
216
- } from "./chunk-RQ5X6LFM.js";
215
+ } from "./chunk-VVXC3SNP.js";
217
216
  import {
218
217
  getRipgrepPath,
219
218
  getRipgrepPolicyMode,
220
219
  resolveRipgrepPolicy,
221
220
  ripGrep
222
- } from "./chunk-BED7SG2Q.js";
221
+ } from "./chunk-76BOJQUE.js";
223
222
  import {
224
223
  getTheme
225
- } from "./chunk-56IL2VXC.js";
224
+ } from "./chunk-C2GNLGBM.js";
226
225
  import {
227
226
  DEFAULT_GLOBAL_CONFIG,
228
227
  enableConfigs,
@@ -235,7 +234,7 @@ import {
235
234
  saveGlobalConfig,
236
235
  setAllPointersToModel,
237
236
  setModelPointer
238
- } from "./chunk-3UWTN6DM.js";
237
+ } from "./chunk-V22PQM4W.js";
239
238
  import {
240
239
  AbortError
241
240
  } from "./chunk-RQVLBMP7.js";
@@ -244,7 +243,7 @@ import {
244
243
  getCurrentRequest,
245
244
  logUserFriendly,
246
245
  markPhase
247
- } from "./chunk-TBEA6BY3.js";
246
+ } from "./chunk-5B7UCAYL.js";
248
247
  import {
249
248
  ASCII_LOGO,
250
249
  BunShell,
@@ -285,10 +284,10 @@ import {
285
284
  setCwd,
286
285
  shouldApplyToolOutputTruncation,
287
286
  truncateToolOutput
288
- } from "./chunk-VP5A6FKG.js";
287
+ } from "./chunk-LBDLSBXN.js";
289
288
  import {
290
289
  MACRO
291
- } from "./chunk-TXZ5UTGP.js";
290
+ } from "./chunk-7SYDIES4.js";
292
291
  import {
293
292
  __export
294
293
  } from "./chunk-I3J4JYES.js";
@@ -469,7 +468,7 @@ var getCommandSubcommandPrefix = memoize(
469
468
  var getCommandPrefix = memoize(
470
469
  async (command4, abortSignal) => {
471
470
  const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
472
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-3KQG5NEP.js");
471
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-TOU5REY5.js");
473
472
  const response = await queryQuick2({
474
473
  systemPrompt,
475
474
  userPrompt,
@@ -4271,7 +4270,7 @@ function formatParseError(error) {
4271
4270
  return error instanceof Error ? error.message : String(error);
4272
4271
  }
4273
4272
  async function defaultGateQuery(args) {
4274
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-3KQG5NEP.js");
4273
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-TOU5REY5.js");
4275
4274
  const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
4276
4275
  const messages = [
4277
4276
  {
@@ -6664,7 +6663,7 @@ var FileEditTool = {
6664
6663
  const originalFileContent = currentFileContent;
6665
6664
  let totalPatch = [];
6666
6665
  const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
6667
- const { findLspAnchor } = await import("./lspAnchor-PPPTHRQH.js");
6666
+ const { findLspAnchor } = await import("./lspAnchor-LCRZ23GA.js");
6668
6667
  for (const op of editOperations) {
6669
6668
  const normalizedSearch = normalizeLineEndings(op.search);
6670
6669
  const normalizedReplace = normalizeLineEndings(op.replace);
@@ -7310,11 +7309,11 @@ function getDirname() {
7310
7309
  function resolveTreeSitterResourceDir() {
7311
7310
  const envDir = process.env.PYB_RESOURCE_DIR?.trim();
7312
7311
  if (envDir) return envDir;
7313
- const dirname12 = getDirname();
7314
- if (dirname12.includes("dist") || dirname12.includes("node_modules")) {
7315
- return path4.resolve(dirname12, "../../../../resources/tree-sitter");
7312
+ const dirname13 = getDirname();
7313
+ if (dirname13.includes("dist") || dirname13.includes("node_modules")) {
7314
+ return path4.resolve(dirname13, "../../../../resources/tree-sitter");
7316
7315
  }
7317
- return path4.resolve(dirname12, "../../../../../resources/tree-sitter");
7316
+ return path4.resolve(dirname13, "../../../../../resources/tree-sitter");
7318
7317
  }
7319
7318
  var REQUIRED_TREE_SITTER_FILES = [
7320
7319
  "tree-sitter.wasm",
@@ -12149,7 +12148,7 @@ async function createAndStoreApiKey(accessToken) {
12149
12148
  }
12150
12149
  saveGlobalConfig(config2);
12151
12150
  try {
12152
- const { resetAnthropicClient } = await import("./llm-3KQG5NEP.js");
12151
+ const { resetAnthropicClient } = await import("./llm-TOU5REY5.js");
12153
12152
  resetAnthropicClient();
12154
12153
  } catch {
12155
12154
  }
@@ -16573,7 +16572,7 @@ async function refreshPluginRuntimeFromInstalls() {
16573
16572
  const existingRoots = getSessionPlugins().map((p) => p.rootDir);
16574
16573
  const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
16575
16574
  if (dirs.length === 0) return [];
16576
- const { configureSessionPlugins } = await import("./pluginRuntime-RU5STQ6F.js");
16575
+ const { configureSessionPlugins } = await import("./pluginRuntime-7EK4LQDD.js");
16577
16576
  const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
16578
16577
  return errors;
16579
16578
  }
@@ -17248,7 +17247,7 @@ async function call(onDone, context) {
17248
17247
  ModelConfig,
17249
17248
  {
17250
17249
  onClose: () => {
17251
- import("./model-6IW224UU.js").then(({ reloadModelManager: reloadModelManager2 }) => {
17250
+ import("./model-QSDSUJDB.js").then(({ reloadModelManager: reloadModelManager2 }) => {
17252
17251
  reloadModelManager2();
17253
17252
  triggerModelConfigChange();
17254
17253
  onDone();
@@ -18443,7 +18442,7 @@ function CostThresholdDialog({ onDone }) {
18443
18442
 
18444
18443
  // src/ui/screens/REPL.tsx
18445
18444
  import * as React97 from "react";
18446
- import { useEffect as useEffect25, useMemo as useMemo27, useRef as useRef13, useState as useState28, useCallback as useCallback16 } from "react";
18445
+ import { useEffect as useEffect25, useMemo as useMemo27, useRef as useRef14, useState as useState28, useCallback as useCallback16 } from "react";
18447
18446
 
18448
18447
  // src/ui/components/Message.tsx
18449
18448
  import { Box as Box51 } from "ink";
@@ -19998,6 +19997,63 @@ import { homedir as homedir7 } from "os";
19998
19997
  import { randomUUID as randomUUID4 } from "crypto";
19999
19998
  import { AsyncLocalStorage } from "async_hooks";
20000
19999
 
20000
+ // src/utils/session/taskBoundaryTelemetrySink.ts
20001
+ function createTaskBoundaryTelemetrySink() {
20002
+ const events = [];
20003
+ return {
20004
+ push(event) {
20005
+ events.push(event);
20006
+ },
20007
+ snapshot() {
20008
+ const phaseCounts = {};
20009
+ for (const event of events) {
20010
+ const phase = event.phase;
20011
+ phaseCounts[phase] = (phaseCounts[phase] ?? 0) + 1;
20012
+ }
20013
+ return {
20014
+ eventCount: events.length,
20015
+ phaseCounts
20016
+ };
20017
+ },
20018
+ clear() {
20019
+ events.length = 0;
20020
+ }
20021
+ };
20022
+ }
20023
+
20024
+ // src/services/telemetry/taskBoundaryTelemetry.ts
20025
+ var TASK_BOUNDARY_LISTENER_ID = "task-boundary-telemetry-sink";
20026
+ var taskBoundarySink = createTaskBoundaryTelemetrySink();
20027
+ var sinkRegistered = false;
20028
+ function ensureTaskBoundaryTelemetryRegistered() {
20029
+ if (sinkRegistered) return;
20030
+ registerTelemetryListener(TASK_BOUNDARY_LISTENER_ID, (event) => {
20031
+ if (event.channel !== "task_boundary") return;
20032
+ taskBoundarySink.push({
20033
+ phase: event.phase,
20034
+ data: event.data
20035
+ });
20036
+ });
20037
+ sinkRegistered = true;
20038
+ }
20039
+ function emitTaskBoundaryTelemetryEvent(phase, data) {
20040
+ ensureTaskBoundaryTelemetryRegistered();
20041
+ emitTelemetryEvent({
20042
+ channel: "task_boundary",
20043
+ phase,
20044
+ data,
20045
+ timestamp: Date.now()
20046
+ });
20047
+ }
20048
+ function getTaskBoundaryTelemetrySnapshot() {
20049
+ ensureTaskBoundaryTelemetryRegistered();
20050
+ return taskBoundarySink.snapshot();
20051
+ }
20052
+ function resetTaskBoundaryTelemetry() {
20053
+ taskBoundarySink.clear();
20054
+ }
20055
+ ensureTaskBoundaryTelemetryRegistered();
20056
+
20001
20057
  // src/utils/session/taskLockNative.ts
20002
20058
  import { createRequire } from "module";
20003
20059
  var require2 = createRequire(import.meta.url);
@@ -20845,6 +20901,11 @@ function updateTask(id, updates, options) {
20845
20901
  (paths) => existsSync10(join8(paths.tasksDir, `${id}.json`))
20846
20902
  );
20847
20903
  if (!target) {
20904
+ emitTaskBoundaryTelemetryEvent("TASK_UPDATE_NOT_FOUND_NO_SIDE_EFFECT", {
20905
+ taskId: id,
20906
+ listId: options?.listId ?? null,
20907
+ noSideEffect: true
20908
+ });
20848
20909
  throw new Error(`Task ${id} not found`);
20849
20910
  }
20850
20911
  return withTaskListLock(target, () => {
@@ -20930,8 +20991,14 @@ function updateTask(id, updates, options) {
20930
20991
  }
20931
20992
  function rebuildTaskBlocks(options) {
20932
20993
  const paths = getTaskListPaths(options?.listId);
20994
+ if (!existsSync10(paths.listDir)) {
20995
+ emitTaskBoundaryTelemetryEvent("TASK_REBUILD_MISSING_LIST_DIR_REJECTED", {
20996
+ listId: paths.listId,
20997
+ noSideEffect: true
20998
+ });
20999
+ throw new Error(`Task list ${paths.listId} not found`);
21000
+ }
20933
21001
  return withTaskListLock(paths, () => {
20934
- ensureTaskListDirs(paths);
20935
21002
  return persistBlocksForPaths(paths);
20936
21003
  });
20937
21004
  }
@@ -25751,7 +25818,7 @@ function useStatusLine() {
25751
25818
  // src/ui/components/PromptInput.tsx
25752
25819
  async function interpretHashCommand(input) {
25753
25820
  try {
25754
- const { queryQuick: queryQuick2 } = await import("./llm-3KQG5NEP.js");
25821
+ const { queryQuick: queryQuick2 } = await import("./llm-TOU5REY5.js");
25755
25822
  const systemPrompt = [
25756
25823
  "You're helping the user structure notes that will be added to their PYB.md file.",
25757
25824
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -26064,7 +26131,7 @@ function PromptInput({
26064
26131
  if (messages2.length) {
26065
26132
  if (mode === "bash") {
26066
26133
  onQuery(messages2, newAbortController).then(async () => {
26067
- const { getCwd: getCwd2 } = await import("./state-T57IG35V.js");
26134
+ const { getCwd: getCwd2 } = await import("./state-GC3XELIE.js");
26068
26135
  setCurrentPwd(getCwd2());
26069
26136
  });
26070
26137
  } else {
@@ -26505,9 +26572,31 @@ function useCanUseTool(setToolUseConfirm) {
26505
26572
  var useCanUseTool_default = useCanUseTool;
26506
26573
 
26507
26574
  // src/ui/hooks/useLogMessages.ts
26508
- import { useEffect as useEffect24 } from "react";
26575
+ import { useEffect as useEffect24, useRef as useRef13 } from "react";
26576
+ function collectSessionPersistCandidates(messages, persistedUuids) {
26577
+ const candidates = [];
26578
+ for (const message of messages) {
26579
+ if (message.type !== "user" && message.type !== "assistant") continue;
26580
+ const uuid = String(message.uuid ?? "").trim();
26581
+ if (!uuid || persistedUuids.has(uuid)) continue;
26582
+ persistedUuids.add(uuid);
26583
+ candidates.push(message);
26584
+ }
26585
+ return candidates;
26586
+ }
26509
26587
  function useLogMessages(messages, messageLogName, forkNumber) {
26588
+ const persistedUuidsRef = useRef13(/* @__PURE__ */ new Set());
26510
26589
  useEffect24(() => {
26590
+ const candidates = collectSessionPersistCandidates(
26591
+ messages,
26592
+ persistedUuidsRef.current
26593
+ );
26594
+ for (const message of candidates) {
26595
+ appendSessionJsonlFromMessage({
26596
+ message,
26597
+ toolUseContext: {}
26598
+ });
26599
+ }
26511
26600
  overwriteLog(
26512
26601
  getMessagesPath(messageLogName, forkNumber, 0),
26513
26602
  messages.filter((_) => _.type !== "progress"),
@@ -27114,7 +27203,7 @@ function resolveReminderChannelFlags(env2 = process.env) {
27114
27203
  }
27115
27204
 
27116
27205
  // src/services/system/taskWatcher.ts
27117
- import { existsSync as existsSync16, mkdirSync as mkdirSync6, statSync as statSync13, watch } from "fs";
27206
+ import { existsSync as existsSync16, statSync as statSync13, watch } from "fs";
27118
27207
 
27119
27208
  // src/utils/session/taskGraph.ts
27120
27209
  function buildTaskGraph(tasks) {
@@ -27205,9 +27294,6 @@ function calculateReadyBlocked(tasks) {
27205
27294
  // src/services/system/taskWatcher.ts
27206
27295
  var getPollIntervalMs = () => Number(process.env.PYB_TASK_WATCHER_POLL_INTERVAL_MS ?? 1e3);
27207
27296
  var taskWatchers = /* @__PURE__ */ new Map();
27208
- function ensureDirs(paths) {
27209
- mkdirSync6(paths.tasksDir, { recursive: true });
27210
- }
27211
27297
  function getLatestMtime(dir) {
27212
27298
  try {
27213
27299
  if (!existsSync16(dir)) return 0;
@@ -27307,7 +27393,16 @@ function startFallbackWatcher(entry) {
27307
27393
  function startWatchingTaskList(listId) {
27308
27394
  const paths = getTaskListPaths(listId);
27309
27395
  if (taskWatchers.has(paths.listId)) return;
27310
- ensureDirs(paths);
27396
+ if (!existsSync16(paths.listDir)) {
27397
+ debug.warn("TASK_WATCHER_SKIP_MISSING_LIST_DIR", {
27398
+ listId: paths.listId,
27399
+ watch_skipped_reason: "list_dir_missing"
27400
+ });
27401
+ emitTaskBoundaryTelemetryEvent("TASK_WATCH_SKIP_MISSING_LIST_DIR", {
27402
+ listId: paths.listId,
27403
+ watch_skipped_reason: "list_dir_missing"
27404
+ });
27405
+ }
27311
27406
  const entry = {
27312
27407
  listId: paths.listId,
27313
27408
  listDir: paths.listDir,
@@ -27826,7 +27921,7 @@ function flushTypedParts(state) {
27826
27921
  }
27827
27922
 
27828
27923
  // src/services/ai/streamTyped/partStore.ts
27829
- import { existsSync as existsSync17, mkdirSync as mkdirSync7 } from "fs";
27924
+ import { existsSync as existsSync17, mkdirSync as mkdirSync6 } from "fs";
27830
27925
  import { dirname as dirname9 } from "path";
27831
27926
  import { createRequire as createRequire2 } from "node:module";
27832
27927
  var requireForSqlite = createRequire2(import.meta.url);
@@ -27899,7 +27994,7 @@ function upsertTypedPartsToDb(options) {
27899
27994
  return { upserted: 0 };
27900
27995
  }
27901
27996
  if (!existsSync17(dirname9(options.dbFilePath))) {
27902
- mkdirSync7(dirname9(options.dbFilePath), { recursive: true });
27997
+ mkdirSync6(dirname9(options.dbFilePath), { recursive: true });
27903
27998
  }
27904
27999
  const Database = getDatabaseCtorOrThrow();
27905
28000
  const db = new Database(options.dbFilePath, { create: true });
@@ -30077,7 +30172,7 @@ function buildToolOutputLifecyclePreGateMetrics(samples) {
30077
30172
  }
30078
30173
 
30079
30174
  // src/services/telemetry/autoCompactTelemetryPersistence.ts
30080
- import { appendFileSync, existsSync as existsSync18, mkdirSync as mkdirSync8 } from "fs";
30175
+ import { appendFileSync, existsSync as existsSync18, mkdirSync as mkdirSync7 } from "fs";
30081
30176
  import { dirname as dirname10 } from "path";
30082
30177
  function getAutoCompactTelemetryOutputFilePath() {
30083
30178
  return resolveXdgCachePath("telemetry/auto-compact-metrics.jsonl");
@@ -30094,7 +30189,7 @@ function flushAutoCompactTelemetrySnapshot(options = {}) {
30094
30189
  metrics: snapshot.metrics
30095
30190
  };
30096
30191
  if (!existsSync18(dirname10(outputFilePath))) {
30097
- mkdirSync8(dirname10(outputFilePath), { recursive: true });
30192
+ mkdirSync7(dirname10(outputFilePath), { recursive: true });
30098
30193
  }
30099
30194
  appendFileSync(outputFilePath, JSON.stringify(record) + "\n");
30100
30195
  if (options.resetAfterFlush !== false) {
@@ -30104,7 +30199,7 @@ function flushAutoCompactTelemetrySnapshot(options = {}) {
30104
30199
  }
30105
30200
 
30106
30201
  // src/services/telemetry/conversationTrackerTelemetryPersistence.ts
30107
- import { appendFileSync as appendFileSync2, existsSync as existsSync19, mkdirSync as mkdirSync9 } from "fs";
30202
+ import { appendFileSync as appendFileSync2, existsSync as existsSync19, mkdirSync as mkdirSync8 } from "fs";
30108
30203
  import { dirname as dirname11 } from "path";
30109
30204
 
30110
30205
  // src/utils/session/conversationTrackerTelemetrySink.ts
@@ -30156,9 +30251,9 @@ function createConversationTrackerTelemetrySink() {
30156
30251
  // src/services/telemetry/conversationTrackerTelemetryCollector.ts
30157
30252
  var CONVERSATION_TRACKER_SINK_LISTENER_ID = "conversation-tracker-telemetry-sink";
30158
30253
  var conversationTrackerSink = createConversationTrackerTelemetrySink();
30159
- var sinkRegistered = false;
30254
+ var sinkRegistered2 = false;
30160
30255
  function ensureConversationTrackerTelemetryRegistered() {
30161
- if (sinkRegistered) return;
30256
+ if (sinkRegistered2) return;
30162
30257
  registerTelemetryListener(CONVERSATION_TRACKER_SINK_LISTENER_ID, (event) => {
30163
30258
  if (event.channel !== "conversation_tracker") return;
30164
30259
  conversationTrackerSink.push({
@@ -30166,7 +30261,7 @@ function ensureConversationTrackerTelemetryRegistered() {
30166
30261
  data: event.data
30167
30262
  });
30168
30263
  });
30169
- sinkRegistered = true;
30264
+ sinkRegistered2 = true;
30170
30265
  }
30171
30266
  function getConversationTrackerTelemetrySnapshot() {
30172
30267
  ensureConversationTrackerTelemetryRegistered();
@@ -30238,7 +30333,7 @@ function flushConversationTrackerTelemetrySnapshot(options = {}) {
30238
30333
  })
30239
30334
  };
30240
30335
  if (!existsSync19(dirname11(outputFilePath))) {
30241
- mkdirSync9(dirname11(outputFilePath), { recursive: true });
30336
+ mkdirSync8(dirname11(outputFilePath), { recursive: true });
30242
30337
  }
30243
30338
  appendFileSync2(outputFilePath, JSON.stringify(record) + "\n");
30244
30339
  if (options.resetAfterFlush !== false) {
@@ -30247,6 +30342,54 @@ function flushConversationTrackerTelemetrySnapshot(options = {}) {
30247
30342
  return record;
30248
30343
  }
30249
30344
 
30345
+ // src/services/telemetry/taskBoundaryTelemetryPersistence.ts
30346
+ import { appendFileSync as appendFileSync3, existsSync as existsSync20, mkdirSync as mkdirSync9 } from "fs";
30347
+ import { dirname as dirname12 } from "path";
30348
+ function getTaskBoundaryTelemetryOutputFilePath() {
30349
+ return resolveXdgCachePath("telemetry/task-boundary-metrics.jsonl");
30350
+ }
30351
+ function asCount(value) {
30352
+ return value ?? 0;
30353
+ }
30354
+ function flushTaskBoundaryTelemetrySnapshot(options = {}) {
30355
+ const snapshot = getTaskBoundaryTelemetrySnapshot();
30356
+ if (snapshot.eventCount <= 0) return null;
30357
+ const outputFilePath = options.outputFilePath ?? getTaskBoundaryTelemetryOutputFilePath();
30358
+ const watchSkipCount = asCount(
30359
+ snapshot.phaseCounts.TASK_WATCH_SKIP_MISSING_LIST_DIR
30360
+ );
30361
+ const updateNotFoundCount = asCount(
30362
+ snapshot.phaseCounts.TASK_UPDATE_NOT_FOUND_NO_SIDE_EFFECT
30363
+ );
30364
+ const rebuildRejectedCount = asCount(
30365
+ snapshot.phaseCounts.TASK_REBUILD_MISSING_LIST_DIR_REJECTED
30366
+ );
30367
+ const autoCreatedCount = asCount(
30368
+ snapshot.phaseCounts.TASK_LIST_DIR_AUTO_CREATED_WITHOUT_CREATE
30369
+ );
30370
+ const record = {
30371
+ timestamp: Date.now(),
30372
+ requestId: options.requestId,
30373
+ agentId: options.agentId ?? "main",
30374
+ eventCount: snapshot.eventCount,
30375
+ phaseCounts: snapshot.phaseCounts,
30376
+ metrics: {
30377
+ watch_skip_due_to_missing_list_dir_count: watchSkipCount,
30378
+ update_not_found_without_side_effect_count: updateNotFoundCount,
30379
+ rebuild_missing_list_dir_rejected_count: rebuildRejectedCount,
30380
+ empty_list_dir_auto_created_count: autoCreatedCount
30381
+ }
30382
+ };
30383
+ if (!existsSync20(dirname12(outputFilePath))) {
30384
+ mkdirSync9(dirname12(outputFilePath), { recursive: true });
30385
+ }
30386
+ appendFileSync3(outputFilePath, JSON.stringify(record) + "\n");
30387
+ if (options.resetAfterFlush !== false) {
30388
+ resetTaskBoundaryTelemetry();
30389
+ }
30390
+ return record;
30391
+ }
30392
+
30250
30393
  // src/services/ai/streamTyped/projector.ts
30251
30394
  function supportsRichToolResultByProvider(provider) {
30252
30395
  return String(provider ?? "").trim().toLowerCase() === "anthropic";
@@ -32646,6 +32789,10 @@ async function* runQuerySessionRuntimeLoop(messages, systemPrompt, context, canU
32646
32789
  requestId: currentRequest?.id,
32647
32790
  agentId: toolUseContext?.agentId
32648
32791
  });
32792
+ flushTaskBoundaryTelemetrySnapshot({
32793
+ requestId: currentRequest?.id,
32794
+ agentId: toolUseContext?.agentId
32795
+ });
32649
32796
  if (Number.isFinite(Number(telemetryRecord?.metrics?.typed_primary_path_rate))) {
32650
32797
  logUserFriendly("SESSION_READ_PATH_METRICS", {
32651
32798
  requestId: currentRequest?.id,
@@ -33130,8 +33277,8 @@ function REPL({
33130
33277
  },
33131
33278
  []
33132
33279
  );
33133
- const readFileTimestamps = useRef13({});
33134
- const conversationTrackersRef = useRef13(
33280
+ const readFileTimestamps = useRef14({});
33281
+ const conversationTrackersRef = useRef14(
33135
33282
  /* @__PURE__ */ new Map()
33136
33283
  );
33137
33284
  const getConversationTrackerForKey = useCallback16(
@@ -33826,7 +33973,7 @@ var resume_default = {
33826
33973
  import React102 from "react";
33827
33974
 
33828
33975
  // src/commands/agents/ui.tsx
33829
- import React101, { useCallback as useCallback17, useEffect as useEffect26, useMemo as useMemo28, useRef as useRef14, useState as useState29 } from "react";
33976
+ import React101, { useCallback as useCallback17, useEffect as useEffect26, useMemo as useMemo28, useRef as useRef15, useState as useState29 } from "react";
33830
33977
  import { Box as Box74, Text as Text78, useInput as useInput28 } from "ink";
33831
33978
  import figures9 from "figures";
33832
33979
  import chalk15 from "chalk";
@@ -33884,7 +34031,7 @@ async function getAvailableTools() {
33884
34031
 
33885
34032
  // src/commands/agents/storage.ts
33886
34033
  import {
33887
- existsSync as existsSync20,
34034
+ existsSync as existsSync21,
33888
34035
  mkdirSync as mkdirSync10,
33889
34036
  renameSync as renameSync3,
33890
34037
  unlinkSync as unlinkSync2,
@@ -33896,7 +34043,7 @@ import { homedir as homedir8 } from "os";
33896
34043
  // src/commands/agents/generation.ts
33897
34044
  import { randomUUID as randomUUID6 } from "crypto";
33898
34045
  async function generateAgentWithClaude(prompt) {
33899
- const { queryModel } = await import("./llm-3KQG5NEP.js");
34046
+ const { queryModel } = await import("./llm-TOU5REY5.js");
33900
34047
  const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
33901
34048
 
33902
34049
  Return your response as a JSON object with exactly these fields:
@@ -34098,7 +34245,7 @@ function getLegacyAgentFilePath(location, agentType) {
34098
34245
  }
34099
34246
  function ensureDirectoryExists(location) {
34100
34247
  const dir = getAgentDirectory(location);
34101
- if (!existsSync20(dir)) {
34248
+ if (!existsSync21(dir)) {
34102
34249
  mkdirSync10(dir, { recursive: true });
34103
34250
  }
34104
34251
  return dir;
@@ -34107,7 +34254,7 @@ async function saveAgent(location, agentType, description3, tools, systemPrompt,
34107
34254
  ensureDirectoryExists(location);
34108
34255
  const filePath = getPrimaryAgentFilePath(location, agentType);
34109
34256
  const legacyPath = getLegacyAgentFilePath(location, agentType);
34110
- if (throwIfExists && (existsSync20(filePath) || existsSync20(legacyPath))) {
34257
+ if (throwIfExists && (existsSync21(filePath) || existsSync21(legacyPath))) {
34111
34258
  throw new Error(`Agent file already exists: ${filePath}`);
34112
34259
  }
34113
34260
  const tempFile = `${filePath}.tmp.${Date.now()}.${Math.random().toString(36).substr(2, 9)}`;
@@ -34122,7 +34269,7 @@ async function saveAgent(location, agentType, description3, tools, systemPrompt,
34122
34269
  );
34123
34270
  try {
34124
34271
  writeFileSync6(tempFile, content, { encoding: "utf-8", flag: "wx" });
34125
- if (throwIfExists && (existsSync20(filePath) || existsSync20(legacyPath))) {
34272
+ if (throwIfExists && (existsSync21(filePath) || existsSync21(legacyPath))) {
34126
34273
  try {
34127
34274
  unlinkSync2(tempFile);
34128
34275
  } catch {
@@ -34132,7 +34279,7 @@ async function saveAgent(location, agentType, description3, tools, systemPrompt,
34132
34279
  renameSync3(tempFile, filePath);
34133
34280
  } catch (error) {
34134
34281
  try {
34135
- if (existsSync20(tempFile)) {
34282
+ if (existsSync21(tempFile)) {
34136
34283
  unlinkSync2(tempFile);
34137
34284
  }
34138
34285
  } catch (cleanupError) {
@@ -34160,7 +34307,7 @@ async function updateAgent(agent, description3, tools, systemPrompt, color, mode
34160
34307
  const location = agent.location;
34161
34308
  const primaryPath = getPrimaryAgentFilePath(location, agent.agentType);
34162
34309
  const legacyPath = getLegacyAgentFilePath(location, agent.agentType);
34163
- const filePath = existsSync20(primaryPath) ? primaryPath : existsSync20(legacyPath) ? legacyPath : primaryPath;
34310
+ const filePath = existsSync21(primaryPath) ? primaryPath : existsSync21(legacyPath) ? legacyPath : primaryPath;
34164
34311
  ensureDirectoryExists(location);
34165
34312
  writeFileSync6(filePath, content, { encoding: "utf-8", flag: "w" });
34166
34313
  }
@@ -34171,10 +34318,10 @@ async function deleteAgent(agent) {
34171
34318
  const location = agent.location;
34172
34319
  const primaryPath = getPrimaryAgentFilePath(location, agent.agentType);
34173
34320
  const legacyPath = getLegacyAgentFilePath(location, agent.agentType);
34174
- if (existsSync20(primaryPath)) {
34321
+ if (existsSync21(primaryPath)) {
34175
34322
  unlinkSync2(primaryPath);
34176
34323
  }
34177
- if (existsSync20(legacyPath)) {
34324
+ if (existsSync21(legacyPath)) {
34178
34325
  unlinkSync2(legacyPath);
34179
34326
  }
34180
34327
  }
@@ -34559,7 +34706,7 @@ function StepGenerationPrompt(props) {
34559
34706
  const [cursorOffset, setCursorOffset] = useState29(value.length);
34560
34707
  const [isGenerating, setIsGenerating] = useState29(false);
34561
34708
  const [error, setError] = useState29(null);
34562
- const abortRef = useRef14(null);
34709
+ const abortRef = useRef15(null);
34563
34710
  const columns = Math.min(80, process.stdout.columns ?? 80);
34564
34711
  useInput28((_input, key) => {
34565
34712
  if (!key.escape) return;