pybao-cli 1.4.50 → 1.4.52

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 (152) hide show
  1. package/dist/REPL-5YY25SRP.js +46 -0
  2. package/dist/{acp-KK2TTZQY.js → acp-QYEU24FQ.js} +29 -30
  3. package/dist/{acp-KK2TTZQY.js.map → acp-QYEU24FQ.js.map} +1 -1
  4. package/dist/{agentsValidate-QLHEEXIH.js → agentsValidate-755OIS5R.js} +7 -7
  5. package/dist/{ask-QPP4RXLN.js → ask-DZPBLG26.js} +28 -29
  6. package/dist/{ask-QPP4RXLN.js.map → ask-DZPBLG26.js.map} +1 -1
  7. package/dist/{autoUpdater-4TO2D7ST.js → autoUpdater-TYGW5WLI.js} +3 -3
  8. package/dist/{chunk-S4ZD6CIB.js → chunk-232RVCMQ.js} +3 -3
  9. package/dist/{chunk-OOKJ3YEP.js → chunk-2BHQOW7O.js} +4 -4
  10. package/dist/{chunk-6JSMWPVG.js → chunk-2HMRIM4L.js} +1524 -1423
  11. package/dist/chunk-2HMRIM4L.js.map +7 -0
  12. package/dist/{chunk-XCXUN4XC.js → chunk-4LMBJZXO.js} +1 -1
  13. package/dist/{chunk-E3U4MTTG.js → chunk-BRKYVW3X.js} +3 -3
  14. package/dist/{chunk-QMS564WP.js → chunk-CACSIWAN.js} +1 -1
  15. package/dist/{chunk-O57TU7BN.js → chunk-CIPSRLKQ.js} +1 -1
  16. package/dist/{chunk-AB22WTOW.js → chunk-DWNHYJME.js} +4 -4
  17. package/dist/{chunk-VRJYDMPZ.js → chunk-EBSC7C7P.js} +3 -3
  18. package/dist/{chunk-K7HQMRMK.js → chunk-EF6YCOC4.js} +4 -4
  19. package/dist/{chunk-F4YDJQRG.js → chunk-FTYUYN6L.js} +1 -1
  20. package/dist/{chunk-2QE4GPBW.js → chunk-FVNXJG2K.js} +2 -2
  21. package/dist/{chunk-XPPMTVLO.js → chunk-GFD2DNDU.js} +2 -2
  22. package/dist/{chunk-EJEYT52K.js → chunk-H6QOGXMT.js} +3 -3
  23. package/dist/{chunk-JS7GLW6B.js → chunk-KFQPMAFO.js} +3 -3
  24. package/dist/chunk-KMM3X3B5.js +448 -0
  25. package/dist/chunk-KMM3X3B5.js.map +7 -0
  26. package/dist/{chunk-XY7UAZHR.js → chunk-LHL4VQUV.js} +1 -1
  27. package/dist/{chunk-RW4ITNVB.js → chunk-LTNUANEK.js} +423 -226
  28. package/dist/chunk-LTNUANEK.js.map +7 -0
  29. package/dist/{chunk-7FPCY7TP.js → chunk-NCHARDNR.js} +27 -3
  30. package/dist/chunk-NCHARDNR.js.map +7 -0
  31. package/dist/{chunk-6WBYGMWM.js → chunk-NXAHOIRY.js} +2 -2
  32. package/dist/{chunk-VB7G5DP7.js → chunk-OBAKKVHK.js} +1 -1
  33. package/dist/{chunk-7NJIEGSZ.js → chunk-OMMS565Z.js} +22 -6
  34. package/dist/{chunk-7NJIEGSZ.js.map → chunk-OMMS565Z.js.map} +3 -3
  35. package/dist/{chunk-FN7TY3BC.js → chunk-OX2MB4Q2.js} +3 -3
  36. package/dist/{chunk-SKHJKLQU.js → chunk-R3QXCIEI.js} +1 -1
  37. package/dist/{chunk-AC5SOSXY.js → chunk-RCASKKDU.js} +2 -2
  38. package/dist/{chunk-XLBYKCIE.js → chunk-SEIO7WV7.js} +1 -1
  39. package/dist/{chunk-DY6LXTDU.js → chunk-VSGJTKCW.js} +1 -1
  40. package/dist/{chunk-5DMG6XJO.js → chunk-VTHHH4MB.js} +4 -4
  41. package/dist/{chunk-IMUE6ZJT.js → chunk-WTHNVU5P.js} +3 -3
  42. package/dist/{chunk-THDYF2NK.js → chunk-XDWCDTQK.js} +2 -2
  43. package/dist/{cli-Q6CUQXUW.js → cli-WGYHJPFZ.js} +93 -93
  44. package/dist/{cli-Q6CUQXUW.js.map → cli-WGYHJPFZ.js.map} +2 -2
  45. package/dist/commands-6JEO2KAK.js +50 -0
  46. package/dist/{config-VXOZS327.js → config-AGAJCFQD.js} +4 -4
  47. package/dist/{context-45BMQQBI.js → context-ZOZD4S7X.js} +6 -6
  48. package/dist/{customCommands-YJKDWVLN.js → customCommands-4GSMRRC4.js} +4 -4
  49. package/dist/{env-6I7ZEE2U.js → env-RPUIAXPD.js} +2 -2
  50. package/dist/{file-E5DNNSWV.js → file-HFMWEHAT.js} +4 -4
  51. package/dist/index.js +3 -3
  52. package/dist/{llm-XKWTYXNE.js → llm-CP2G3BZQ.js} +29 -30
  53. package/dist/{llm-XKWTYXNE.js.map → llm-CP2G3BZQ.js.map} +1 -1
  54. package/dist/{llmLazy-VHV6V3FH.js → llmLazy-7GLWRPMO.js} +1 -1
  55. package/dist/{loader-L7DYSPCI.js → loader-RJUX5HRI.js} +4 -4
  56. package/dist/{lsp-AQZ4MHRE.js → lsp-4PS6EN3E.js} +6 -6
  57. package/dist/{lspAnchor-VVWRVWR6.js → lspAnchor-QPHIEGKU.js} +6 -6
  58. package/dist/{mcp-R47AVTKX.js → mcp-Z5GOR6OF.js} +7 -7
  59. package/dist/{mentionProcessor-AAB567RH.js → mentionProcessor-ZPSEF4XC.js} +5 -8
  60. package/dist/{mentionProcessor-AAB567RH.js.map → mentionProcessor-ZPSEF4XC.js.map} +1 -1
  61. package/dist/{messages-6RZPVGYV.js → messages-7PZIS7S6.js} +1 -1
  62. package/dist/{model-XS54COOK.js → model-OMBFATWA.js} +5 -5
  63. package/dist/{openai-36NGQ6WH.js → openai-ZFDYT7H5.js} +5 -6
  64. package/dist/{outputStyles-4Q6RXLFD.js → outputStyles-LK7EH6PS.js} +4 -4
  65. package/dist/{pluginRuntime-X6X2WUUY.js → pluginRuntime-PFAQAL5X.js} +6 -6
  66. package/dist/{pluginValidation-L7QBW3EG.js → pluginValidation-F6UPGXZP.js} +6 -6
  67. package/dist/prompts-3I2J4KDX.js +52 -0
  68. package/dist/{pybAgentSessionLoad-OQZ4472Q.js → pybAgentSessionLoad-PQX3FKEC.js} +4 -4
  69. package/dist/{pybAgentSessionResume-F5USKNP6.js → pybAgentSessionResume-FTGMQQ4B.js} +4 -4
  70. package/dist/{pybAgentStreamJsonSession-3STGT5U7.js → pybAgentStreamJsonSession-GQZLIIQS.js} +1 -1
  71. package/dist/{pybHooks-ZRWKBZYR.js → pybHooks-7SOKY4A3.js} +4 -4
  72. package/dist/query-MZKEYXCU.js +54 -0
  73. package/dist/{registry-KLVCZCUO.js → registry-HEA2CKWA.js} +5 -5
  74. package/dist/{ripgrep-MYJ7I7AT.js → ripgrep-S4IOHQNI.js} +3 -3
  75. package/dist/{skillMarketplace-RUUAPJSB.js → skillMarketplace-GLH5WP4Y.js} +3 -3
  76. package/dist/{state-XDFG3NGH.js → state-DYO5HDW5.js} +2 -2
  77. package/dist/{theme-6NH5WLGE.js → theme-FMEMGZ2J.js} +5 -5
  78. package/dist/{toolPermissionSettings-6YFH2NEA.js → toolPermissionSettings-J2R2EOVJ.js} +6 -6
  79. package/dist/tools-OLRB4MMF.js +51 -0
  80. package/dist/{userInput-XNKXJX2C.js → userInput-IZB262ZP.js} +30 -31
  81. package/dist/{userInput-XNKXJX2C.js.map → userInput-IZB262ZP.js.map} +1 -1
  82. package/package.json +27 -3
  83. package/dist/REPL-VW5R4TZU.js +0 -47
  84. package/dist/chunk-6JSMWPVG.js.map +0 -7
  85. package/dist/chunk-7FPCY7TP.js.map +0 -7
  86. package/dist/chunk-ERMQRV55.js +0 -24
  87. package/dist/chunk-ERMQRV55.js.map +0 -7
  88. package/dist/chunk-INTHXBZY.js +0 -1377
  89. package/dist/chunk-INTHXBZY.js.map +0 -7
  90. package/dist/chunk-RW4ITNVB.js.map +0 -7
  91. package/dist/commands-FSZDEWK7.js +0 -51
  92. package/dist/prompts-FVZABM4B.js +0 -53
  93. package/dist/query-W3ZWVYMU.js +0 -55
  94. package/dist/tools-T6FWIKGI.js +0 -52
  95. /package/dist/{REPL-VW5R4TZU.js.map → REPL-5YY25SRP.js.map} +0 -0
  96. /package/dist/{agentsValidate-QLHEEXIH.js.map → agentsValidate-755OIS5R.js.map} +0 -0
  97. /package/dist/{autoUpdater-4TO2D7ST.js.map → autoUpdater-TYGW5WLI.js.map} +0 -0
  98. /package/dist/{chunk-S4ZD6CIB.js.map → chunk-232RVCMQ.js.map} +0 -0
  99. /package/dist/{chunk-OOKJ3YEP.js.map → chunk-2BHQOW7O.js.map} +0 -0
  100. /package/dist/{chunk-XCXUN4XC.js.map → chunk-4LMBJZXO.js.map} +0 -0
  101. /package/dist/{chunk-E3U4MTTG.js.map → chunk-BRKYVW3X.js.map} +0 -0
  102. /package/dist/{chunk-QMS564WP.js.map → chunk-CACSIWAN.js.map} +0 -0
  103. /package/dist/{chunk-O57TU7BN.js.map → chunk-CIPSRLKQ.js.map} +0 -0
  104. /package/dist/{chunk-AB22WTOW.js.map → chunk-DWNHYJME.js.map} +0 -0
  105. /package/dist/{chunk-VRJYDMPZ.js.map → chunk-EBSC7C7P.js.map} +0 -0
  106. /package/dist/{chunk-K7HQMRMK.js.map → chunk-EF6YCOC4.js.map} +0 -0
  107. /package/dist/{chunk-F4YDJQRG.js.map → chunk-FTYUYN6L.js.map} +0 -0
  108. /package/dist/{chunk-2QE4GPBW.js.map → chunk-FVNXJG2K.js.map} +0 -0
  109. /package/dist/{chunk-XPPMTVLO.js.map → chunk-GFD2DNDU.js.map} +0 -0
  110. /package/dist/{chunk-EJEYT52K.js.map → chunk-H6QOGXMT.js.map} +0 -0
  111. /package/dist/{chunk-JS7GLW6B.js.map → chunk-KFQPMAFO.js.map} +0 -0
  112. /package/dist/{chunk-XY7UAZHR.js.map → chunk-LHL4VQUV.js.map} +0 -0
  113. /package/dist/{chunk-6WBYGMWM.js.map → chunk-NXAHOIRY.js.map} +0 -0
  114. /package/dist/{chunk-VB7G5DP7.js.map → chunk-OBAKKVHK.js.map} +0 -0
  115. /package/dist/{chunk-FN7TY3BC.js.map → chunk-OX2MB4Q2.js.map} +0 -0
  116. /package/dist/{chunk-SKHJKLQU.js.map → chunk-R3QXCIEI.js.map} +0 -0
  117. /package/dist/{chunk-AC5SOSXY.js.map → chunk-RCASKKDU.js.map} +0 -0
  118. /package/dist/{chunk-XLBYKCIE.js.map → chunk-SEIO7WV7.js.map} +0 -0
  119. /package/dist/{chunk-DY6LXTDU.js.map → chunk-VSGJTKCW.js.map} +0 -0
  120. /package/dist/{chunk-5DMG6XJO.js.map → chunk-VTHHH4MB.js.map} +0 -0
  121. /package/dist/{chunk-IMUE6ZJT.js.map → chunk-WTHNVU5P.js.map} +0 -0
  122. /package/dist/{chunk-THDYF2NK.js.map → chunk-XDWCDTQK.js.map} +0 -0
  123. /package/dist/{commands-FSZDEWK7.js.map → commands-6JEO2KAK.js.map} +0 -0
  124. /package/dist/{config-VXOZS327.js.map → config-AGAJCFQD.js.map} +0 -0
  125. /package/dist/{context-45BMQQBI.js.map → context-ZOZD4S7X.js.map} +0 -0
  126. /package/dist/{customCommands-YJKDWVLN.js.map → customCommands-4GSMRRC4.js.map} +0 -0
  127. /package/dist/{env-6I7ZEE2U.js.map → env-RPUIAXPD.js.map} +0 -0
  128. /package/dist/{file-E5DNNSWV.js.map → file-HFMWEHAT.js.map} +0 -0
  129. /package/dist/{llmLazy-VHV6V3FH.js.map → llmLazy-7GLWRPMO.js.map} +0 -0
  130. /package/dist/{loader-L7DYSPCI.js.map → loader-RJUX5HRI.js.map} +0 -0
  131. /package/dist/{lsp-AQZ4MHRE.js.map → lsp-4PS6EN3E.js.map} +0 -0
  132. /package/dist/{lspAnchor-VVWRVWR6.js.map → lspAnchor-QPHIEGKU.js.map} +0 -0
  133. /package/dist/{mcp-R47AVTKX.js.map → mcp-Z5GOR6OF.js.map} +0 -0
  134. /package/dist/{messages-6RZPVGYV.js.map → messages-7PZIS7S6.js.map} +0 -0
  135. /package/dist/{model-XS54COOK.js.map → model-OMBFATWA.js.map} +0 -0
  136. /package/dist/{openai-36NGQ6WH.js.map → openai-ZFDYT7H5.js.map} +0 -0
  137. /package/dist/{outputStyles-4Q6RXLFD.js.map → outputStyles-LK7EH6PS.js.map} +0 -0
  138. /package/dist/{pluginRuntime-X6X2WUUY.js.map → pluginRuntime-PFAQAL5X.js.map} +0 -0
  139. /package/dist/{pluginValidation-L7QBW3EG.js.map → pluginValidation-F6UPGXZP.js.map} +0 -0
  140. /package/dist/{prompts-FVZABM4B.js.map → prompts-3I2J4KDX.js.map} +0 -0
  141. /package/dist/{pybAgentSessionLoad-OQZ4472Q.js.map → pybAgentSessionLoad-PQX3FKEC.js.map} +0 -0
  142. /package/dist/{pybAgentSessionResume-F5USKNP6.js.map → pybAgentSessionResume-FTGMQQ4B.js.map} +0 -0
  143. /package/dist/{pybAgentStreamJsonSession-3STGT5U7.js.map → pybAgentStreamJsonSession-GQZLIIQS.js.map} +0 -0
  144. /package/dist/{pybHooks-ZRWKBZYR.js.map → pybHooks-7SOKY4A3.js.map} +0 -0
  145. /package/dist/{query-W3ZWVYMU.js.map → query-MZKEYXCU.js.map} +0 -0
  146. /package/dist/{registry-KLVCZCUO.js.map → registry-HEA2CKWA.js.map} +0 -0
  147. /package/dist/{ripgrep-MYJ7I7AT.js.map → ripgrep-S4IOHQNI.js.map} +0 -0
  148. /package/dist/{skillMarketplace-RUUAPJSB.js.map → skillMarketplace-GLH5WP4Y.js.map} +0 -0
  149. /package/dist/{state-XDFG3NGH.js.map → state-DYO5HDW5.js.map} +0 -0
  150. /package/dist/{theme-6NH5WLGE.js.map → theme-FMEMGZ2J.js.map} +0 -0
  151. /package/dist/{toolPermissionSettings-6YFH2NEA.js.map → toolPermissionSettings-J2R2EOVJ.js.map} +0 -0
  152. /package/dist/{tools-T6FWIKGI.js.map → tools-OLRB4MMF.js.map} +0 -0
@@ -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-AC5SOSXY.js";
5
+ } from "./chunk-RCASKKDU.js";
6
6
  import {
7
7
  isUuid
8
8
  } from "./chunk-5P7HBXTD.js";
@@ -8,14 +8,14 @@ import {
8
8
  getSettingsFileCandidates,
9
9
  loadSettingsWithLegacyFallback,
10
10
  saveSettingsToPrimaryAndSyncLegacy
11
- } from "./chunk-SKHJKLQU.js";
11
+ } from "./chunk-R3QXCIEI.js";
12
12
  import {
13
13
  getCurrentProjectConfig
14
- } from "./chunk-JS7GLW6B.js";
14
+ } from "./chunk-KFQPMAFO.js";
15
15
  import {
16
16
  getCwd,
17
17
  logError
18
- } from "./chunk-XY7UAZHR.js";
18
+ } from "./chunk-LHL4VQUV.js";
19
19
 
20
20
  // src/utils/permissions/toolPermissionSettings.ts
21
21
  function uniqueStrings(value) {
@@ -3,7 +3,7 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  SESSION_ID,
5
5
  resolveXdgCachePath
6
- } from "./chunk-XY7UAZHR.js";
6
+ } from "./chunk-LHL4VQUV.js";
7
7
 
8
8
  // src/utils/log/debugLogger.ts
9
9
  import { existsSync, mkdirSync, appendFileSync } from "fs";
@@ -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-XNKXJX2C.js");
451
+ const impl = await import("./userInput-IZB262ZP.js");
452
452
  return impl.processUserInput(input, mode, setToolJSX, context, pastedImages);
453
453
  }
454
454
 
@@ -3,13 +3,13 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getSettingsFileCandidates,
5
5
  loadSettingsWithLegacyFallback
6
- } from "./chunk-SKHJKLQU.js";
6
+ } from "./chunk-R3QXCIEI.js";
7
7
  import {
8
8
  getSessionPlugins
9
9
  } from "./chunk-BJSWTHRM.js";
10
10
  import {
11
11
  getTheme
12
- } from "./chunk-F4YDJQRG.js";
12
+ } from "./chunk-FTYUYN6L.js";
13
13
  import {
14
14
  addMcprcServerForTesting,
15
15
  getCurrentProjectConfig,
@@ -19,13 +19,13 @@ import {
19
19
  safeParseJSON,
20
20
  saveCurrentProjectConfig,
21
21
  saveGlobalConfig
22
- } from "./chunk-JS7GLW6B.js";
22
+ } from "./chunk-KFQPMAFO.js";
23
23
  import {
24
24
  PRODUCT_COMMAND,
25
25
  PRODUCT_NAME,
26
26
  getCwd,
27
27
  logMCPError
28
- } from "./chunk-XY7UAZHR.js";
28
+ } from "./chunk-LHL4VQUV.js";
29
29
 
30
30
  // src/services/mcp/client.ts
31
31
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
@@ -4,10 +4,10 @@ import {
4
4
  PRODUCT_NAME,
5
5
  execFileNoThrow,
6
6
  logError
7
- } from "./chunk-XY7UAZHR.js";
7
+ } from "./chunk-LHL4VQUV.js";
8
8
  import {
9
9
  MACRO
10
- } from "./chunk-7FPCY7TP.js";
10
+ } from "./chunk-NCHARDNR.js";
11
11
 
12
12
  // src/utils/session/autoUpdater.ts
13
13
  async function getSemver() {
@@ -82,7 +82,7 @@ async function checkAndNotifyUpdate() {
82
82
  const [
83
83
  { isAutoUpdaterDisabled, getGlobalConfig, saveGlobalConfig },
84
84
  { env }
85
- ] = await Promise.all([import("./config-VXOZS327.js"), import("./env-6I7ZEE2U.js")]);
85
+ ] = await Promise.all([import("./config-AGAJCFQD.js"), import("./env-RPUIAXPD.js")]);
86
86
  if (await isAutoUpdaterDisabled()) return;
87
87
  if (await env.getIsDocker()) return;
88
88
  if (!await env.hasInternetAccess()) return;
@@ -3,7 +3,7 @@ const require = __pybCreateRequire(import.meta.url);
3
3
 
4
4
  // src/services/ai/llmLazy.ts
5
5
  async function queryLLM(messages, systemPrompt, maxThinkingTokens, tools, signal, options) {
6
- const { queryLLM: inner } = await import("./llm-XKWTYXNE.js");
6
+ const { queryLLM: inner } = await import("./llm-CP2G3BZQ.js");
7
7
  return inner(
8
8
  messages,
9
9
  systemPrompt,
@@ -14,15 +14,15 @@ async function queryLLM(messages, systemPrompt, maxThinkingTokens, tools, signal
14
14
  );
15
15
  }
16
16
  async function queryQuick(args) {
17
- const { queryQuick: inner } = await import("./llm-XKWTYXNE.js");
17
+ const { queryQuick: inner } = await import("./llm-CP2G3BZQ.js");
18
18
  return inner(args);
19
19
  }
20
20
  async function verifyApiKey(apiKey, baseURL, provider) {
21
- const { verifyApiKey: inner } = await import("./llm-XKWTYXNE.js");
21
+ const { verifyApiKey: inner } = await import("./llm-CP2G3BZQ.js");
22
22
  return inner(apiKey, baseURL, provider);
23
23
  }
24
24
  async function fetchAnthropicModels(apiKey, baseURL) {
25
- const { fetchAnthropicModels: inner } = await import("./llm-XKWTYXNE.js");
25
+ const { fetchAnthropicModels: inner } = await import("./llm-CP2G3BZQ.js");
26
26
  return inner(apiKey, baseURL);
27
27
  }
28
28
 
@@ -2,7 +2,7 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  getGlobalConfig
5
- } from "./chunk-JS7GLW6B.js";
5
+ } from "./chunk-KFQPMAFO.js";
6
6
 
7
7
  // src/utils/theme/index.ts
8
8
  var lightTheme = {
@@ -7,14 +7,14 @@ import {
7
7
  getSettingsFileCandidates,
8
8
  loadSettingsWithLegacyFallback,
9
9
  saveSettingsToPrimaryAndSyncLegacy
10
- } from "./chunk-SKHJKLQU.js";
10
+ } from "./chunk-R3QXCIEI.js";
11
11
  import {
12
12
  getSessionPlugins
13
13
  } from "./chunk-BJSWTHRM.js";
14
14
  import {
15
15
  getCwd,
16
16
  getXdgConfigDir
17
- } from "./chunk-XY7UAZHR.js";
17
+ } from "./chunk-LHL4VQUV.js";
18
18
 
19
19
  // src/services/ui/outputStyles.ts
20
20
  import figures from "figures";
@@ -2,11 +2,11 @@ import { createRequire as __pybCreateRequire } from "node:module";
2
2
  const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  listAllContentFiles
5
- } from "./chunk-DY6LXTDU.js";
5
+ } from "./chunk-VSGJTKCW.js";
6
6
  import {
7
7
  getCwd,
8
8
  logError
9
- } from "./chunk-XY7UAZHR.js";
9
+ } from "./chunk-LHL4VQUV.js";
10
10
 
11
11
  // src/utils/fs/file.ts
12
12
  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-SKHJKLQU.js";
5
+ } from "./chunk-R3QXCIEI.js";
6
6
  import {
7
7
  debug
8
- } from "./chunk-QMS564WP.js";
8
+ } from "./chunk-CACSIWAN.js";
9
9
  import {
10
10
  env,
11
11
  getSessionRoot,
12
12
  resolveXdgDataPath
13
- } from "./chunk-XY7UAZHR.js";
13
+ } from "./chunk-LHL4VQUV.js";
14
14
  import {
15
15
  __require
16
16
  } from "./chunk-I3J4JYES.js";
@@ -5,13 +5,13 @@ import {
5
5
  } from "./chunk-RQVLBMP7.js";
6
6
  import {
7
7
  debug
8
- } from "./chunk-QMS564WP.js";
8
+ } from "./chunk-CACSIWAN.js";
9
9
  import {
10
10
  getCwd,
11
11
  getGlobalConfigFilePath,
12
12
  getLegacyGlobalConfigFilePath,
13
13
  logError
14
- } from "./chunk-XY7UAZHR.js";
14
+ } from "./chunk-LHL4VQUV.js";
15
15
 
16
16
  // src/core/config/schema.ts
17
17
  function isAutoUpdaterStatus(value) {
@@ -688,7 +688,7 @@ function setModelPointer(pointer, modelName) {
688
688
  }
689
689
  };
690
690
  saveGlobalConfig(updatedConfig);
691
- import("./model-XS54COOK.js").then(({ reloadModelManager }) => {
691
+ import("./model-OMBFATWA.js").then(({ reloadModelManager }) => {
692
692
  reloadModelManager();
693
693
  });
694
694
  }
@@ -0,0 +1,448 @@
1
+ import { createRequire as __pybCreateRequire } from "node:module";
2
+ const require = __pybCreateRequire(import.meta.url);
3
+ import {
4
+ debug
5
+ } from "./chunk-CACSIWAN.js";
6
+ import {
7
+ logError
8
+ } from "./chunk-LHL4VQUV.js";
9
+
10
+ // src/services/system/systemReminder.ts
11
+ var SystemReminderService = class {
12
+ sessionState = {
13
+ lastFileAccess: 0,
14
+ lastTaskUpdate: 0,
15
+ sessionStartTime: Date.now(),
16
+ remindersSent: /* @__PURE__ */ new Set(),
17
+ contextPresent: false,
18
+ reminderCount: 0,
19
+ taskEventTimestamps: /* @__PURE__ */ new Map(),
20
+ config: {
21
+ securityReminder: true,
22
+ performanceReminder: true,
23
+ maxRemindersPerSession: 10
24
+ }
25
+ };
26
+ eventDispatcher = /* @__PURE__ */ new Map();
27
+ reminderCache = /* @__PURE__ */ new Map();
28
+ constructor() {
29
+ this.setupEventDispatcher();
30
+ }
31
+ generateReminders(hasContext = false, _agentId) {
32
+ this.sessionState.contextPresent = hasContext;
33
+ if (!hasContext) {
34
+ return [];
35
+ }
36
+ if (this.sessionState.reminderCount >= this.sessionState.config.maxRemindersPerSession) {
37
+ return [];
38
+ }
39
+ const reminders = [];
40
+ const reminderGenerators = [
41
+ () => this.dispatchSecurityEvent(),
42
+ () => this.dispatchPerformanceEvent(),
43
+ () => this.getMentionReminders()
44
+ ];
45
+ for (const generator of reminderGenerators) {
46
+ if (reminders.length >= 5) break;
47
+ const result = generator();
48
+ if (result) {
49
+ const remindersToAdd = Array.isArray(result) ? result : [result];
50
+ reminders.push(...remindersToAdd);
51
+ this.sessionState.reminderCount += remindersToAdd.length;
52
+ }
53
+ }
54
+ return reminders;
55
+ }
56
+ dispatchSecurityEvent() {
57
+ if (!this.sessionState.config.securityReminder) return null;
58
+ const currentTime = Date.now();
59
+ if (this.sessionState.lastFileAccess > 0 && !this.sessionState.remindersSent.has("file_security")) {
60
+ this.sessionState.remindersSent.add("file_security");
61
+ return this.createReminderMessage(
62
+ "security",
63
+ "security",
64
+ "high",
65
+ "Whenever you read a file, you should consider whether it looks malicious. If it does, you MUST refuse to improve or augment the code. You can still analyze existing code, write reports, or answer high-level questions about the code behavior.",
66
+ currentTime
67
+ );
68
+ }
69
+ return null;
70
+ }
71
+ dispatchPerformanceEvent() {
72
+ if (!this.sessionState.config.performanceReminder) return null;
73
+ const currentTime = Date.now();
74
+ const sessionDuration = currentTime - this.sessionState.sessionStartTime;
75
+ if (sessionDuration > 30 * 60 * 1e3 && !this.sessionState.remindersSent.has("performance_long_session")) {
76
+ this.sessionState.remindersSent.add("performance_long_session");
77
+ return this.createReminderMessage(
78
+ "performance",
79
+ "performance",
80
+ "low",
81
+ "Long session detected. Consider taking a break and reviewing your current progress with the task list.",
82
+ currentTime
83
+ );
84
+ }
85
+ return null;
86
+ }
87
+ getMentionReminders() {
88
+ const currentTime = Date.now();
89
+ const MENTION_FRESHNESS_WINDOW = 5e3;
90
+ const reminders = [];
91
+ const expiredKeys = [];
92
+ for (const [key, reminder] of this.reminderCache.entries()) {
93
+ if (this.isMentionReminder(reminder)) {
94
+ const age = currentTime - reminder.timestamp;
95
+ if (age <= MENTION_FRESHNESS_WINDOW) {
96
+ reminders.push(reminder);
97
+ } else {
98
+ expiredKeys.push(key);
99
+ }
100
+ }
101
+ }
102
+ expiredKeys.forEach((key) => this.reminderCache.delete(key));
103
+ return reminders;
104
+ }
105
+ isMentionReminder(reminder) {
106
+ const mentionTypes = ["agent_mention", "file_mention", "ask_model_mention"];
107
+ return mentionTypes.includes(reminder.type);
108
+ }
109
+ generateFileChangeReminder(context) {
110
+ const { agentId, filePath, reminder } = context;
111
+ if (!reminder) {
112
+ return null;
113
+ }
114
+ const currentTime = Date.now();
115
+ const reminderKey = `file_changed_${agentId}_${filePath}_${currentTime}`;
116
+ if (this.sessionState.remindersSent.has(reminderKey)) {
117
+ return null;
118
+ }
119
+ this.sessionState.remindersSent.add(reminderKey);
120
+ return this.createReminderMessage(
121
+ "file_changed",
122
+ "general",
123
+ "medium",
124
+ reminder,
125
+ currentTime
126
+ );
127
+ }
128
+ createReminderMessage(type, category, priority, content, timestamp) {
129
+ return {
130
+ role: "system",
131
+ content: `<system-reminder>
132
+ ${content}
133
+ </system-reminder>`,
134
+ isMeta: true,
135
+ timestamp,
136
+ type,
137
+ priority,
138
+ category
139
+ };
140
+ }
141
+ shouldEmitTaskReminder(key, throttleMs) {
142
+ const now = Date.now();
143
+ const last = this.sessionState.taskEventTimestamps.get(key) ?? 0;
144
+ if (now - last < throttleMs) {
145
+ return false;
146
+ }
147
+ this.sessionState.taskEventTimestamps.set(key, now);
148
+ return true;
149
+ }
150
+ createTaskListReminder(context) {
151
+ const { listId, summary } = context;
152
+ if (!summary || !listId) return null;
153
+ const reminderKey = `task_list_${listId}_${summary.total}_${summary.ready}_${summary.blocked}_${summary.inProgress}_${summary.pending}_${summary.done}_${summary.archived}`;
154
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
155
+ this.sessionState.remindersSent.add(reminderKey);
156
+ return this.createReminderMessage(
157
+ "task_list_changed",
158
+ "task",
159
+ "medium",
160
+ `Your task list changed. Ready: ${summary.ready}, Blocked: ${summary.blocked}, In progress: ${summary.inProgress}, Pending: ${summary.pending}, Done: ${summary.done}, Archived: ${summary.archived}.`,
161
+ Date.now()
162
+ );
163
+ }
164
+ createTaskReadyReminder(context) {
165
+ const { listId, readyIds } = context;
166
+ if (!listId || !Array.isArray(readyIds)) return null;
167
+ const limited = readyIds.slice(0, 5).join(", ");
168
+ const reminderKey = `task_ready_${listId}_${readyIds.length}_${limited}`;
169
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
170
+ this.sessionState.remindersSent.add(reminderKey);
171
+ return this.createReminderMessage(
172
+ "task_ready_changed",
173
+ "task",
174
+ "medium",
175
+ `Task readiness changed. Ready count: ${readyIds.length}. Ready ids: ${limited || "none"}.`,
176
+ Date.now()
177
+ );
178
+ }
179
+ createTaskConflictReminder(context) {
180
+ const { listId, taskId } = context;
181
+ if (!listId || !taskId) return null;
182
+ const reminderKey = `task_conflict_${listId}_${taskId}`;
183
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
184
+ this.sessionState.remindersSent.add(reminderKey);
185
+ return this.createReminderMessage(
186
+ "task_conflict",
187
+ "task",
188
+ "high",
189
+ `Task update conflict detected for ${taskId}. Refresh task data and retry updates with the latest baseVersion.`,
190
+ Date.now()
191
+ );
192
+ }
193
+ createTaskCreatedReminder(context) {
194
+ const { listId, taskId, task } = context;
195
+ if (!listId || !taskId) return null;
196
+ const reminderKey = `task_created_${listId}_${taskId}`;
197
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
198
+ this.sessionState.remindersSent.add(reminderKey);
199
+ const subject = task?.subject || taskId;
200
+ return this.createReminderMessage(
201
+ "task_created",
202
+ "task",
203
+ "medium",
204
+ `Task created: ${subject} (${taskId}). Review details and adjust status if needed.`,
205
+ Date.now()
206
+ );
207
+ }
208
+ createTaskUpdatedReminder(context) {
209
+ const { listId, taskId, task } = context;
210
+ if (!listId || !taskId) return null;
211
+ const reminderKey = `task_updated_${listId}_${taskId}_${task?.baseVersion ?? ""}`;
212
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
213
+ this.sessionState.remindersSent.add(reminderKey);
214
+ const subject = task?.subject || taskId;
215
+ return this.createReminderMessage(
216
+ "task_updated",
217
+ "task",
218
+ "medium",
219
+ `Task updated: ${subject} (${taskId}). Confirm dependencies and status are correct.`,
220
+ Date.now()
221
+ );
222
+ }
223
+ createTaskStatusReminder(context) {
224
+ const { listId, taskId, previousStatus, status } = context;
225
+ if (!listId || !taskId) return null;
226
+ const reminderKey = `task_status_${listId}_${taskId}_${previousStatus}_${status}`;
227
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
228
+ this.sessionState.remindersSent.add(reminderKey);
229
+ return this.createReminderMessage(
230
+ "task_status_changed",
231
+ "task",
232
+ "medium",
233
+ `Task status changed for ${taskId}: ${previousStatus} \u2192 ${status}. Review dependent tasks if needed.`,
234
+ Date.now()
235
+ );
236
+ }
237
+ createTaskDepsReminder(context) {
238
+ const { listId, taskId, deps } = context;
239
+ if (!listId || !taskId) return null;
240
+ const reminderKey = `task_deps_${listId}_${taskId}_${JSON.stringify(deps ?? {})}`;
241
+ if (this.sessionState.remindersSent.has(reminderKey)) return null;
242
+ this.sessionState.remindersSent.add(reminderKey);
243
+ return this.createReminderMessage(
244
+ "task_deps_changed",
245
+ "task",
246
+ "medium",
247
+ `Task dependencies changed for ${taskId}. Recheck readiness and blockers.`,
248
+ Date.now()
249
+ );
250
+ }
251
+ setupEventDispatcher() {
252
+ this.addEventListener("session:startup", (context) => {
253
+ this.resetSession();
254
+ this.sessionState.sessionStartTime = Date.now();
255
+ this.sessionState.contextPresent = Object.keys(context.context || {}).length > 0;
256
+ });
257
+ this.addEventListener("task:list_changed", (context) => {
258
+ const key = `task_list_${context.listId}`;
259
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
260
+ this.sessionState.lastTaskUpdate = Date.now();
261
+ const reminder = this.createTaskListReminder(context);
262
+ if (reminder) {
263
+ this.emitEvent("reminder:inject", {
264
+ reminder: reminder.content,
265
+ listId: context.listId,
266
+ type: "task_list_changed",
267
+ timestamp: Date.now()
268
+ });
269
+ }
270
+ });
271
+ this.addEventListener("task:ready_changed", (context) => {
272
+ const key = `task_ready_${context.listId}`;
273
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
274
+ const reminder = this.createTaskReadyReminder(context);
275
+ if (reminder) {
276
+ this.emitEvent("reminder:inject", {
277
+ reminder: reminder.content,
278
+ listId: context.listId,
279
+ type: "task_ready_changed",
280
+ timestamp: Date.now()
281
+ });
282
+ }
283
+ });
284
+ this.addEventListener("task:conflict_detected", (context) => {
285
+ const key = `task_conflict_${context.listId}_${context.taskId}`;
286
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
287
+ const reminder = this.createTaskConflictReminder(context);
288
+ if (reminder) {
289
+ this.emitEvent("reminder:inject", {
290
+ reminder: reminder.content,
291
+ listId: context.listId,
292
+ type: "task_conflict",
293
+ timestamp: Date.now()
294
+ });
295
+ }
296
+ });
297
+ this.addEventListener("task.created", (context) => {
298
+ const key = `task_created_${context.listId}_${context.taskId}`;
299
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
300
+ const reminder = this.createTaskCreatedReminder(context);
301
+ if (reminder) {
302
+ this.emitEvent("reminder:inject", {
303
+ reminder: reminder.content,
304
+ listId: context.listId,
305
+ type: reminder.type,
306
+ timestamp: reminder.timestamp
307
+ });
308
+ }
309
+ });
310
+ this.addEventListener("task.updated", (context) => {
311
+ const key = `task_updated_${context.listId}_${context.taskId}`;
312
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
313
+ const reminder = this.createTaskUpdatedReminder(context);
314
+ if (reminder) {
315
+ this.emitEvent("reminder:inject", {
316
+ reminder: reminder.content,
317
+ listId: context.listId,
318
+ type: reminder.type,
319
+ timestamp: reminder.timestamp
320
+ });
321
+ }
322
+ });
323
+ this.addEventListener("task.status_changed", (context) => {
324
+ const key = `task_status_${context.listId}_${context.taskId}`;
325
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
326
+ const reminder = this.createTaskStatusReminder(context);
327
+ if (reminder) {
328
+ this.emitEvent("reminder:inject", {
329
+ reminder: reminder.content,
330
+ listId: context.listId,
331
+ type: reminder.type,
332
+ timestamp: reminder.timestamp
333
+ });
334
+ }
335
+ });
336
+ this.addEventListener("task.deps_changed", (context) => {
337
+ const key = `task_deps_${context.listId}_${context.taskId}`;
338
+ if (!this.shouldEmitTaskReminder(key, 2e3)) return;
339
+ const reminder = this.createTaskDepsReminder(context);
340
+ if (reminder) {
341
+ this.emitEvent("reminder:inject", {
342
+ reminder: reminder.content,
343
+ listId: context.listId,
344
+ type: reminder.type,
345
+ timestamp: reminder.timestamp
346
+ });
347
+ }
348
+ });
349
+ this.addEventListener("file:read", (context) => {
350
+ this.sessionState.lastFileAccess = Date.now();
351
+ });
352
+ this.addEventListener("file:edited", (context) => {
353
+ });
354
+ this.addEventListener("agent:mentioned", (context) => {
355
+ this.createMentionReminder({
356
+ type: "agent_mention",
357
+ key: `agent_mention_${context.agentType}_${context.timestamp}`,
358
+ category: "task",
359
+ priority: "high",
360
+ content: `The user mentioned @${context.originalMention}. You MUST use the Task tool with subagent_type="${context.agentType}" to delegate this task to the specified agent. Provide a detailed, self-contained task description that fully captures the user's intent for the ${context.agentType} agent to execute.`,
361
+ timestamp: context.timestamp
362
+ });
363
+ });
364
+ this.addEventListener("file:mentioned", (context) => {
365
+ this.createMentionReminder({
366
+ type: "file_mention",
367
+ key: `file_mention_${context.filePath}_${context.timestamp}`,
368
+ category: "general",
369
+ priority: "high",
370
+ content: `The user mentioned @${context.originalMention}. You MUST read the entire content of the file at path: ${context.filePath} using the Read tool to understand the full context before proceeding with the user's request.`,
371
+ timestamp: context.timestamp
372
+ });
373
+ });
374
+ this.addEventListener("ask-model:mentioned", (context) => {
375
+ this.createMentionReminder({
376
+ type: "ask_model_mention",
377
+ key: `ask_model_mention_${context.modelName}_${context.timestamp}`,
378
+ category: "task",
379
+ priority: "high",
380
+ content: `The user mentioned @${context.modelName}. You MUST use the AskExpertModelTool to consult this specific model for expert opinions and analysis. Provide the user's question or context clearly to get the most relevant response from ${context.modelName}.`,
381
+ timestamp: context.timestamp
382
+ });
383
+ });
384
+ }
385
+ addEventListener(event, callback) {
386
+ if (!this.eventDispatcher.has(event)) {
387
+ this.eventDispatcher.set(event, []);
388
+ }
389
+ this.eventDispatcher.get(event).push(callback);
390
+ }
391
+ emitEvent(event, context) {
392
+ const listeners = this.eventDispatcher.get(event) || [];
393
+ listeners.forEach((callback) => {
394
+ try {
395
+ callback(context);
396
+ } catch (error) {
397
+ logError(error);
398
+ debug.warn("SYSTEM_REMINDER_LISTENER_ERROR", {
399
+ event,
400
+ error: error instanceof Error ? error.message : String(error)
401
+ });
402
+ }
403
+ });
404
+ }
405
+ createMentionReminder(params) {
406
+ if (!this.sessionState.remindersSent.has(params.key)) {
407
+ this.sessionState.remindersSent.add(params.key);
408
+ const reminder = this.createReminderMessage(
409
+ params.type,
410
+ params.category,
411
+ params.priority,
412
+ params.content,
413
+ params.timestamp
414
+ );
415
+ this.reminderCache.set(params.key, reminder);
416
+ }
417
+ }
418
+ resetSession() {
419
+ this.sessionState = {
420
+ lastFileAccess: 0,
421
+ lastTaskUpdate: 0,
422
+ sessionStartTime: Date.now(),
423
+ remindersSent: /* @__PURE__ */ new Set(),
424
+ contextPresent: false,
425
+ reminderCount: 0,
426
+ taskEventTimestamps: /* @__PURE__ */ new Map(),
427
+ config: { ...this.sessionState.config }
428
+ };
429
+ this.reminderCache.clear();
430
+ }
431
+ updateConfig(config) {
432
+ this.sessionState.config = { ...this.sessionState.config, ...config };
433
+ }
434
+ getSessionState() {
435
+ return { ...this.sessionState };
436
+ }
437
+ };
438
+ var systemReminderService = new SystemReminderService();
439
+ var generateSystemReminders = (hasContext = false, agentId) => systemReminderService.generateReminders(hasContext, agentId);
440
+ var emitReminderEvent = (event, context) => systemReminderService.emitEvent(event, context);
441
+ var resetReminderSession = () => systemReminderService.resetSession();
442
+
443
+ export {
444
+ systemReminderService,
445
+ generateSystemReminders,
446
+ emitReminderEvent,
447
+ resetReminderSession
448
+ };