@vybestack/llxprt-code-core 0.1.14 → 0.1.16-hotfix1

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 (465) hide show
  1. package/README.md +90 -2
  2. package/dist/src/code_assist/converter.d.ts +2 -1
  3. package/dist/src/code_assist/converter.js +2 -1
  4. package/dist/src/code_assist/converter.js.map +1 -1
  5. package/dist/src/code_assist/converter.test.js +13 -10
  6. package/dist/src/code_assist/converter.test.js.map +1 -1
  7. package/dist/src/code_assist/oauth2.test.d.ts +1 -1
  8. package/dist/src/code_assist/oauth2.test.js +15 -15
  9. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  10. package/dist/src/code_assist/server.d.ts +2 -2
  11. package/dist/src/code_assist/server.js +4 -4
  12. package/dist/src/code_assist/server.js.map +1 -1
  13. package/dist/src/code_assist/server.test.js +9 -9
  14. package/dist/src/code_assist/server.test.js.map +1 -1
  15. package/dist/src/code_assist/setup.js +1 -1
  16. package/dist/src/code_assist/setup.js.map +1 -1
  17. package/dist/src/code_assist/setup.test.js +2 -2
  18. package/dist/src/code_assist/setup.test.js.map +1 -1
  19. package/dist/src/config/config.d.ts +37 -5
  20. package/dist/src/config/config.js +85 -15
  21. package/dist/src/config/config.js.map +1 -1
  22. package/dist/src/config/config.test.js +33 -0
  23. package/dist/src/config/config.test.js.map +1 -1
  24. package/dist/src/config/flashFallback.test.js +23 -47
  25. package/dist/src/config/flashFallback.test.js.map +1 -1
  26. package/dist/src/config/models.d.ts +1 -0
  27. package/dist/src/config/models.js +1 -0
  28. package/dist/src/config/models.js.map +1 -1
  29. package/dist/src/config/profileManager.d.ts +42 -0
  30. package/dist/src/config/profileManager.js +114 -0
  31. package/dist/src/config/profileManager.js.map +1 -0
  32. package/dist/src/core/client.d.ts +15 -1
  33. package/dist/src/core/client.js +161 -45
  34. package/dist/src/core/client.js.map +1 -1
  35. package/dist/src/core/client.test.js +291 -42
  36. package/dist/src/core/client.test.js.map +1 -1
  37. package/dist/src/core/contentGenerator.d.ts +2 -2
  38. package/dist/src/core/contentGenerator.js +2 -7
  39. package/dist/src/core/contentGenerator.js.map +1 -1
  40. package/dist/src/core/contentGenerator.test.js +6 -2
  41. package/dist/src/core/contentGenerator.test.js.map +1 -1
  42. package/dist/src/core/coreToolScheduler.d.ts +1 -3
  43. package/dist/src/core/coreToolScheduler.js +48 -19
  44. package/dist/src/core/coreToolScheduler.js.map +1 -1
  45. package/dist/src/core/coreToolScheduler.test.js +90 -18
  46. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  47. package/dist/src/core/geminiChat.js +37 -2
  48. package/dist/src/core/geminiChat.js.map +1 -1
  49. package/dist/src/core/geminiChat.test.js +2 -2
  50. package/dist/src/core/geminiChat.test.js.map +1 -1
  51. package/dist/src/core/googleGenAIWrapper.d.ts +21 -0
  52. package/dist/src/core/googleGenAIWrapper.js +36 -0
  53. package/dist/src/core/googleGenAIWrapper.js.map +1 -0
  54. package/dist/src/core/googleGenAIWrapper.test.d.ts +6 -0
  55. package/dist/src/core/googleGenAIWrapper.test.js +104 -0
  56. package/dist/src/core/googleGenAIWrapper.test.js.map +1 -0
  57. package/dist/src/core/logger.d.ts +1 -0
  58. package/dist/src/core/logger.js +22 -8
  59. package/dist/src/core/logger.js.map +1 -1
  60. package/dist/src/core/logger.test.js +60 -9
  61. package/dist/src/core/logger.test.js.map +1 -1
  62. package/dist/src/core/nonInteractiveToolExecutor.js +19 -4
  63. package/dist/src/core/nonInteractiveToolExecutor.js.map +1 -1
  64. package/dist/src/core/nonInteractiveToolExecutor.test.js +8 -3
  65. package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
  66. package/dist/src/core/prompts-async.test.d.ts +6 -0
  67. package/dist/src/core/prompts-async.test.js +115 -0
  68. package/dist/src/core/prompts-async.test.js.map +1 -0
  69. package/dist/src/core/prompts.d.ts +8 -1
  70. package/dist/src/core/prompts.js +97 -377
  71. package/dist/src/core/prompts.js.map +1 -1
  72. package/dist/src/core/prompts.test.js +46 -192
  73. package/dist/src/core/prompts.test.js.map +1 -1
  74. package/dist/src/core/tokenLimits.d.ts +1 -1
  75. package/dist/src/core/tokenLimits.js +6 -1
  76. package/dist/src/core/tokenLimits.js.map +1 -1
  77. package/dist/src/core/turn.d.ts +5 -1
  78. package/dist/src/core/turn.js +7 -2
  79. package/dist/src/core/turn.js.map +1 -1
  80. package/dist/src/core/turn.test.js +2 -2
  81. package/dist/src/core/turn.test.js.map +1 -1
  82. package/dist/src/ide/detect-ide.d.ts +10 -0
  83. package/dist/src/ide/detect-ide.js +24 -0
  84. package/dist/src/ide/detect-ide.js.map +1 -0
  85. package/dist/src/ide/ide-client.d.ts +19 -7
  86. package/dist/src/ide/ide-client.js +110 -37
  87. package/dist/src/ide/ide-client.js.map +1 -1
  88. package/dist/src/ide/ide-installer.d.ts +15 -0
  89. package/dist/src/ide/ide-installer.js +111 -0
  90. package/dist/src/ide/ide-installer.js.map +1 -0
  91. package/dist/src/ide/ide-installer.test.d.ts +6 -0
  92. package/dist/src/ide/ide-installer.test.js +78 -0
  93. package/dist/src/ide/ide-installer.test.js.map +1 -0
  94. package/dist/src/ide/ideContext.d.ts +212 -107
  95. package/dist/src/ide/ideContext.js +45 -44
  96. package/dist/src/ide/ideContext.js.map +1 -1
  97. package/dist/src/ide/ideContext.test.js +254 -100
  98. package/dist/src/ide/ideContext.test.js.map +1 -1
  99. package/dist/src/index.d.ts +16 -0
  100. package/dist/src/index.js +20 -0
  101. package/dist/src/index.js.map +1 -1
  102. package/dist/src/{providers/IProviderConfig.js → integration-tests/todo-system.test.d.ts} +0 -1
  103. package/dist/src/integration-tests/todo-system.test.js +610 -0
  104. package/dist/src/integration-tests/todo-system.test.js.map +1 -0
  105. package/dist/src/mcp/oauth-provider.d.ts +5 -1
  106. package/dist/src/mcp/oauth-provider.js +39 -14
  107. package/dist/src/mcp/oauth-provider.js.map +1 -1
  108. package/dist/src/mcp/oauth-provider.test.js +11 -10
  109. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  110. package/dist/src/mcp/oauth-token-storage.d.ts +3 -1
  111. package/dist/src/mcp/oauth-token-storage.js +3 -1
  112. package/dist/src/mcp/oauth-token-storage.js.map +1 -1
  113. package/dist/src/mcp/oauth-utils.js +14 -6
  114. package/dist/src/mcp/oauth-utils.js.map +1 -1
  115. package/dist/src/mcp/oauth-utils.test.js +1 -1
  116. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  117. package/dist/src/parsers/TextToolCallParser.d.ts +1 -0
  118. package/dist/src/parsers/TextToolCallParser.js +45 -3
  119. package/dist/src/parsers/TextToolCallParser.js.map +1 -1
  120. package/dist/src/parsers/TextToolCallParser.multibyte.test.d.ts +1 -0
  121. package/dist/src/parsers/TextToolCallParser.multibyte.test.js +42 -0
  122. package/dist/src/parsers/TextToolCallParser.multibyte.test.js.map +1 -0
  123. package/dist/src/prompt-config/TemplateEngine.d.ts +35 -0
  124. package/dist/src/prompt-config/TemplateEngine.js +149 -0
  125. package/dist/src/prompt-config/TemplateEngine.js.map +1 -0
  126. package/dist/src/prompt-config/TemplateEngine.test.d.ts +1 -0
  127. package/dist/src/prompt-config/TemplateEngine.test.js +494 -0
  128. package/dist/src/prompt-config/TemplateEngine.test.js.map +1 -0
  129. package/dist/src/prompt-config/defaults/compression.md +58 -0
  130. package/dist/src/prompt-config/defaults/core-defaults.d.ts +5 -0
  131. package/dist/src/prompt-config/defaults/core-defaults.js +332 -0
  132. package/dist/src/prompt-config/defaults/core-defaults.js.map +1 -0
  133. package/dist/src/prompt-config/defaults/core.md +267 -0
  134. package/dist/src/prompt-config/defaults/env/git-repository.md +15 -0
  135. package/dist/src/prompt-config/defaults/env/ide-mode.md +3 -0
  136. package/dist/src/prompt-config/defaults/env/macos-seatbelt.md +3 -0
  137. package/dist/src/prompt-config/defaults/env/outside-of-sandbox.md +3 -0
  138. package/dist/src/prompt-config/defaults/env/sandbox.md +3 -0
  139. package/dist/src/prompt-config/defaults/index.d.ts +14 -0
  140. package/dist/src/prompt-config/defaults/index.js +21 -0
  141. package/dist/src/prompt-config/defaults/index.js.map +1 -0
  142. package/dist/src/prompt-config/defaults/provider-defaults.d.ts +5 -0
  143. package/dist/src/prompt-config/defaults/provider-defaults.js +26 -0
  144. package/dist/src/prompt-config/defaults/provider-defaults.js.map +1 -0
  145. package/dist/src/prompt-config/defaults/providers/gemini/models/gemini-2.5-flash/core.md +10 -0
  146. package/dist/src/prompt-config/defaults/service-defaults.d.ts +5 -0
  147. package/dist/src/prompt-config/defaults/service-defaults.js +52 -0
  148. package/dist/src/prompt-config/defaults/service-defaults.js.map +1 -0
  149. package/dist/src/prompt-config/defaults/tool-defaults.d.ts +5 -0
  150. package/dist/src/prompt-config/defaults/tool-defaults.js +81 -0
  151. package/dist/src/prompt-config/defaults/tool-defaults.js.map +1 -0
  152. package/dist/src/prompt-config/defaults/tools/edit.md +2 -0
  153. package/dist/src/prompt-config/defaults/tools/glob.md +2 -0
  154. package/dist/src/prompt-config/defaults/tools/grep.md +2 -0
  155. package/dist/src/prompt-config/defaults/tools/ls.md +1 -0
  156. package/dist/src/prompt-config/defaults/tools/memory.md +1 -0
  157. package/dist/src/prompt-config/defaults/tools/read-file.md +4 -0
  158. package/dist/src/prompt-config/defaults/tools/read-many-files.md +2 -0
  159. package/dist/src/prompt-config/defaults/tools/shell.md +5 -0
  160. package/dist/src/prompt-config/defaults/tools/todo-read.md +3 -0
  161. package/dist/src/prompt-config/defaults/tools/todo-write.md +50 -0
  162. package/dist/src/prompt-config/defaults/tools/web-fetch.md +3 -0
  163. package/dist/src/prompt-config/defaults/tools/web-search.md +3 -0
  164. package/dist/src/prompt-config/defaults/tools/write-file.md +4 -0
  165. package/dist/src/prompt-config/index.d.ts +16 -0
  166. package/dist/src/prompt-config/index.js +11 -0
  167. package/dist/src/prompt-config/index.js.map +1 -0
  168. package/dist/src/prompt-config/prompt-cache.d.ts +72 -0
  169. package/dist/src/prompt-config/prompt-cache.js +271 -0
  170. package/dist/src/prompt-config/prompt-cache.js.map +1 -0
  171. package/dist/src/prompt-config/prompt-cache.test.d.ts +6 -0
  172. package/dist/src/prompt-config/prompt-cache.test.js +437 -0
  173. package/dist/src/prompt-config/prompt-cache.test.js.map +1 -0
  174. package/dist/src/prompt-config/prompt-installer.d.ts +118 -0
  175. package/dist/src/prompt-config/prompt-installer.js +723 -0
  176. package/dist/src/prompt-config/prompt-installer.js.map +1 -0
  177. package/dist/src/prompt-config/prompt-installer.test.d.ts +7 -0
  178. package/dist/src/prompt-config/prompt-installer.test.js +503 -0
  179. package/dist/src/prompt-config/prompt-installer.test.js.map +1 -0
  180. package/dist/src/prompt-config/prompt-loader.d.ts +49 -0
  181. package/dist/src/prompt-config/prompt-loader.js +331 -0
  182. package/dist/src/prompt-config/prompt-loader.js.map +1 -0
  183. package/dist/src/prompt-config/prompt-loader.test.d.ts +5 -0
  184. package/dist/src/prompt-config/prompt-loader.test.js +413 -0
  185. package/dist/src/prompt-config/prompt-loader.test.js.map +1 -0
  186. package/dist/src/prompt-config/prompt-resolver.d.ts +74 -0
  187. package/dist/src/prompt-config/prompt-resolver.js +600 -0
  188. package/dist/src/prompt-config/prompt-resolver.js.map +1 -0
  189. package/dist/src/prompt-config/prompt-resolver.test.d.ts +1 -0
  190. package/dist/src/prompt-config/prompt-resolver.test.js +529 -0
  191. package/dist/src/prompt-config/prompt-resolver.test.js.map +1 -0
  192. package/dist/src/prompt-config/prompt-service.d.ts +108 -0
  193. package/dist/src/prompt-config/prompt-service.js +435 -0
  194. package/dist/src/prompt-config/prompt-service.js.map +1 -0
  195. package/dist/src/prompt-config/prompt-service.test.d.ts +1 -0
  196. package/dist/src/prompt-config/prompt-service.test.js +811 -0
  197. package/dist/src/prompt-config/prompt-service.test.js.map +1 -0
  198. package/dist/src/prompt-config/types.d.ts +30 -0
  199. package/dist/src/prompt-config/types.js +10 -0
  200. package/dist/src/prompt-config/types.js.map +1 -0
  201. package/dist/src/prompts/mcp-prompts.d.ts +8 -0
  202. package/dist/src/prompts/mcp-prompts.js +13 -0
  203. package/dist/src/prompts/mcp-prompts.js.map +1 -0
  204. package/dist/src/prompts/prompt-registry.d.ts +26 -0
  205. package/dist/src/prompts/prompt-registry.js +47 -0
  206. package/dist/src/prompts/prompt-registry.js.map +1 -0
  207. package/dist/src/providers/IProvider.d.ts +10 -0
  208. package/dist/src/providers/adapters/GeminiCompatibleWrapper.js +24 -9
  209. package/dist/src/providers/adapters/GeminiCompatibleWrapper.js.map +1 -1
  210. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.js +1 -1
  211. package/dist/src/providers/adapters/GeminiCompatibleWrapper.test.js.map +1 -1
  212. package/dist/src/providers/anthropic/AnthropicProvider.d.ts +14 -1
  213. package/dist/src/providers/anthropic/AnthropicProvider.js +28 -2
  214. package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
  215. package/dist/src/providers/anthropic/AnthropicProvider.modelParams.test.d.ts +1 -0
  216. package/dist/src/providers/anthropic/AnthropicProvider.modelParams.test.js +48 -0
  217. package/dist/src/providers/anthropic/AnthropicProvider.modelParams.test.js.map +1 -0
  218. package/dist/src/providers/anthropic/AnthropicProvider.test.js +2 -1
  219. package/dist/src/providers/anthropic/AnthropicProvider.test.js.map +1 -1
  220. package/dist/src/providers/gemini/GeminiProvider.d.ts +11 -2
  221. package/dist/src/providers/gemini/GeminiProvider.integration.test.js +1 -1
  222. package/dist/src/providers/gemini/GeminiProvider.js +42 -25
  223. package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
  224. package/dist/src/providers/openai/OpenAIProvider.d.ts +11 -0
  225. package/dist/src/providers/openai/OpenAIProvider.js +141 -24
  226. package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
  227. package/dist/src/providers/openai/OpenAIProvider.responses.test.js +27 -3
  228. package/dist/src/providers/openai/OpenAIProvider.responses.test.js.map +1 -1
  229. package/dist/src/providers/openai/OpenAIProvider.shouldUseResponses.test.js +2 -1
  230. package/dist/src/providers/openai/OpenAIProvider.shouldUseResponses.test.js.map +1 -1
  231. package/dist/src/providers/openai/OpenAIProvider.stateful.integration.test.js +1 -1
  232. package/dist/src/providers/openai/OpenAIProvider.stateful.integration.test.js.map +1 -1
  233. package/dist/src/providers/openai/OpenAIProvider.test.js +307 -7
  234. package/dist/src/providers/openai/OpenAIProvider.test.js.map +1 -1
  235. package/dist/src/providers/openai/buildResponsesRequest.js +19 -2
  236. package/dist/src/providers/openai/buildResponsesRequest.js.map +1 -1
  237. package/dist/src/providers/test-utils/providerTestConfig.d.ts +21 -0
  238. package/dist/src/providers/test-utils/providerTestConfig.js +23 -0
  239. package/dist/src/providers/test-utils/providerTestConfig.js.map +1 -0
  240. package/dist/src/providers/types/IProviderConfig.d.ts +6 -0
  241. package/dist/src/services/complexity-analyzer.d.ts +92 -0
  242. package/dist/src/services/complexity-analyzer.js +287 -0
  243. package/dist/src/services/complexity-analyzer.js.map +1 -0
  244. package/dist/src/services/fileDiscoveryService.test.js +101 -60
  245. package/dist/src/services/fileDiscoveryService.test.js.map +1 -1
  246. package/dist/src/services/gitService.test.d.ts +1 -1
  247. package/dist/src/services/gitService.test.js +65 -102
  248. package/dist/src/services/gitService.test.js.map +1 -1
  249. package/dist/src/services/index.d.ts +9 -0
  250. package/dist/src/services/index.js +8 -0
  251. package/dist/src/services/index.js.map +1 -0
  252. package/dist/src/services/loopDetectionService.d.ts +12 -0
  253. package/dist/src/services/loopDetectionService.js +62 -12
  254. package/dist/src/services/loopDetectionService.js.map +1 -1
  255. package/dist/src/services/loopDetectionService.test.js +90 -11
  256. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  257. package/dist/src/services/shellExecutionService.d.ts +34 -0
  258. package/dist/src/services/shellExecutionService.js +121 -0
  259. package/dist/src/services/shellExecutionService.js.map +1 -0
  260. package/dist/src/services/shellExecutionService.multibyte.test.d.ts +6 -0
  261. package/dist/src/services/shellExecutionService.multibyte.test.js +72 -0
  262. package/dist/src/services/shellExecutionService.multibyte.test.js.map +1 -0
  263. package/dist/src/services/shellExecutionService.test.d.ts +6 -0
  264. package/dist/src/services/shellExecutionService.test.js +264 -0
  265. package/dist/src/services/shellExecutionService.test.js.map +1 -0
  266. package/dist/src/services/shellExecutionService.windows.multibyte.test.d.ts +6 -0
  267. package/dist/src/services/shellExecutionService.windows.multibyte.test.js +98 -0
  268. package/dist/src/services/shellExecutionService.windows.multibyte.test.js.map +1 -0
  269. package/dist/src/services/shellExecutionService.windows.test.d.ts +6 -0
  270. package/dist/src/services/shellExecutionService.windows.test.js +79 -0
  271. package/dist/src/services/shellExecutionService.windows.test.js.map +1 -0
  272. package/dist/src/services/todo-reminder-service.d.ts +42 -0
  273. package/dist/src/services/todo-reminder-service.js +77 -0
  274. package/dist/src/services/todo-reminder-service.js.map +1 -0
  275. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +4 -2
  276. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +81 -34
  277. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  278. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +6 -1
  279. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +19 -0
  280. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  281. package/dist/src/telemetry/constants.d.ts +2 -1
  282. package/dist/src/telemetry/constants.js +2 -1
  283. package/dist/src/telemetry/constants.js.map +1 -1
  284. package/dist/src/telemetry/file-exporters.d.ts +2 -2
  285. package/dist/src/telemetry/file-exporters.js +47 -20
  286. package/dist/src/telemetry/file-exporters.js.map +1 -1
  287. package/dist/src/telemetry/index.d.ts +2 -2
  288. package/dist/src/telemetry/index.js +2 -2
  289. package/dist/src/telemetry/index.js.map +1 -1
  290. package/dist/src/telemetry/loggers.d.ts +3 -2
  291. package/dist/src/telemetry/loggers.js +30 -6
  292. package/dist/src/telemetry/loggers.js.map +1 -1
  293. package/dist/src/telemetry/loggers.test.circular.js +2 -0
  294. package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
  295. package/dist/src/telemetry/loggers.test.js +13 -3
  296. package/dist/src/telemetry/loggers.test.js.map +1 -1
  297. package/dist/src/telemetry/sdk.d.ts +1 -1
  298. package/dist/src/telemetry/sdk.js +71 -73
  299. package/dist/src/telemetry/sdk.js.map +1 -1
  300. package/dist/src/telemetry/telemetry.test.js +7 -5
  301. package/dist/src/telemetry/telemetry.test.js.map +1 -1
  302. package/dist/src/telemetry/types.d.ts +19 -4
  303. package/dist/src/telemetry/types.js +30 -4
  304. package/dist/src/telemetry/types.js.map +1 -1
  305. package/dist/src/telemetry/uiTelemetry.test.js +3 -0
  306. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
  307. package/dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
  308. package/dist/src/test-utils/mockWorkspaceContext.js +24 -0
  309. package/dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
  310. package/dist/src/tools/edit.js +29 -4
  311. package/dist/src/tools/edit.js.map +1 -1
  312. package/dist/src/tools/edit.test.js +104 -1
  313. package/dist/src/tools/edit.test.js.map +1 -1
  314. package/dist/src/tools/glob.js +53 -17
  315. package/dist/src/tools/glob.js.map +1 -1
  316. package/dist/src/tools/glob.test.js +32 -6
  317. package/dist/src/tools/glob.test.js.map +1 -1
  318. package/dist/src/tools/grep.d.ts +1 -1
  319. package/dist/src/tools/grep.js +81 -29
  320. package/dist/src/tools/grep.js.map +1 -1
  321. package/dist/src/tools/grep.test.js +76 -9
  322. package/dist/src/tools/grep.test.js.map +1 -1
  323. package/dist/src/tools/ls.js +4 -3
  324. package/dist/src/tools/ls.js.map +1 -1
  325. package/dist/src/tools/ls.test.d.ts +6 -0
  326. package/dist/src/tools/ls.test.js +356 -0
  327. package/dist/src/tools/ls.test.js.map +1 -0
  328. package/dist/src/tools/mcp-client.d.ts +26 -2
  329. package/dist/src/tools/mcp-client.js +96 -32
  330. package/dist/src/tools/mcp-client.js.map +1 -1
  331. package/dist/src/tools/mcp-client.test.js +87 -1
  332. package/dist/src/tools/mcp-client.test.js.map +1 -1
  333. package/dist/src/tools/memoryTool.d.ts +17 -2
  334. package/dist/src/tools/memoryTool.js +130 -13
  335. package/dist/src/tools/memoryTool.js.map +1 -1
  336. package/dist/src/tools/memoryTool.test.js +88 -3
  337. package/dist/src/tools/memoryTool.test.js.map +1 -1
  338. package/dist/src/tools/modifiable-tool.test.js +51 -62
  339. package/dist/src/tools/modifiable-tool.test.js.map +1 -1
  340. package/dist/src/tools/read-file.js +8 -6
  341. package/dist/src/tools/read-file.js.map +1 -1
  342. package/dist/src/tools/read-file.test.js +30 -2
  343. package/dist/src/tools/read-file.test.js.map +1 -1
  344. package/dist/src/tools/read-many-files.js +22 -12
  345. package/dist/src/tools/read-many-files.js.map +1 -1
  346. package/dist/src/tools/read-many-files.test.js +35 -2
  347. package/dist/src/tools/read-many-files.test.js.map +1 -1
  348. package/dist/src/tools/shell.d.ts +8 -3
  349. package/dist/src/tools/shell.js +185 -114
  350. package/dist/src/tools/shell.js.map +1 -1
  351. package/dist/src/tools/shell.multibyte.test.d.ts +6 -0
  352. package/dist/src/tools/shell.multibyte.test.js +74 -0
  353. package/dist/src/tools/shell.multibyte.test.js.map +1 -0
  354. package/dist/src/tools/shell.test.d.ts +1 -1
  355. package/dist/src/tools/shell.test.js +323 -138
  356. package/dist/src/tools/shell.test.js.map +1 -1
  357. package/dist/src/tools/todo-read.d.ts +4 -1
  358. package/dist/src/tools/todo-read.js +136 -20
  359. package/dist/src/tools/todo-read.js.map +1 -1
  360. package/dist/src/tools/todo-read.test.js +10 -6
  361. package/dist/src/tools/todo-read.test.js.map +1 -1
  362. package/dist/src/tools/todo-schemas.d.ts +4 -4
  363. package/dist/src/tools/todo-write.d.ts +3 -0
  364. package/dist/src/tools/todo-write.js +96 -9
  365. package/dist/src/tools/todo-write.js.map +1 -1
  366. package/dist/src/tools/todo-write.test.js +17 -13
  367. package/dist/src/tools/todo-write.test.js.map +1 -1
  368. package/dist/src/tools/tool-context.d.ts +14 -0
  369. package/dist/src/tools/tool-context.js +7 -0
  370. package/dist/src/tools/tool-context.js.map +1 -0
  371. package/dist/src/tools/tool-error.d.ts +22 -0
  372. package/dist/src/tools/tool-error.js +27 -0
  373. package/dist/src/tools/tool-error.js.map +1 -0
  374. package/dist/src/tools/tool-registry.d.ts +4 -1
  375. package/dist/src/tools/tool-registry.js +14 -5
  376. package/dist/src/tools/tool-registry.js.map +1 -1
  377. package/dist/src/tools/tool-registry.test.js +10 -2
  378. package/dist/src/tools/tool-registry.test.js.map +1 -1
  379. package/dist/src/tools/tools.d.ts +16 -1
  380. package/dist/src/tools/tools.js +2 -0
  381. package/dist/src/tools/tools.js.map +1 -1
  382. package/dist/src/tools/web-fetch.js +18 -4
  383. package/dist/src/tools/web-fetch.js.map +1 -1
  384. package/dist/src/tools/write-file.js +5 -3
  385. package/dist/src/tools/write-file.js.map +1 -1
  386. package/dist/src/tools/write-file.test.js +36 -2
  387. package/dist/src/tools/write-file.test.js.map +1 -1
  388. package/dist/src/types/modelParams.d.ts +62 -0
  389. package/dist/src/types/modelParams.js +7 -0
  390. package/dist/src/types/modelParams.js.map +1 -0
  391. package/dist/src/utils/bfsFileSearch.js +51 -27
  392. package/dist/src/utils/bfsFileSearch.js.map +1 -1
  393. package/dist/src/utils/bfsFileSearch.test.js +59 -0
  394. package/dist/src/utils/bfsFileSearch.test.js.map +1 -1
  395. package/dist/src/utils/editCorrector.js +2 -2
  396. package/dist/src/utils/editCorrector.js.map +1 -1
  397. package/dist/src/utils/editor.d.ts +1 -1
  398. package/dist/src/utils/editor.js +9 -0
  399. package/dist/src/utils/editor.js.map +1 -1
  400. package/dist/src/utils/editor.test.js +21 -1
  401. package/dist/src/utils/editor.test.js.map +1 -1
  402. package/dist/src/utils/fileUtils.js +12 -1
  403. package/dist/src/utils/fileUtils.js.map +1 -1
  404. package/dist/src/utils/fileUtils.test.js +29 -1
  405. package/dist/src/utils/fileUtils.test.js.map +1 -1
  406. package/dist/src/utils/flashFallback.integration.test.js +8 -0
  407. package/dist/src/utils/flashFallback.integration.test.js.map +1 -1
  408. package/dist/src/utils/formatters.d.ts +6 -0
  409. package/dist/src/utils/formatters.js +16 -0
  410. package/dist/src/utils/formatters.js.map +1 -0
  411. package/dist/src/utils/memoryDiscovery.d.ts +1 -1
  412. package/dist/src/utils/memoryDiscovery.js +61 -73
  413. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  414. package/dist/src/utils/memoryDiscovery.test.js +4 -3
  415. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  416. package/dist/src/utils/memoryImportProcessor.d.ts +19 -12
  417. package/dist/src/utils/memoryImportProcessor.js +241 -82
  418. package/dist/src/utils/memoryImportProcessor.js.map +1 -1
  419. package/dist/src/utils/memoryImportProcessor.test.js +595 -50
  420. package/dist/src/utils/memoryImportProcessor.test.js.map +1 -1
  421. package/dist/src/utils/nextSpeakerChecker.js +12 -27
  422. package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
  423. package/dist/src/utils/nextSpeakerChecker.test.js +8 -4
  424. package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
  425. package/dist/src/utils/retry.d.ts +3 -0
  426. package/dist/src/utils/retry.js.map +1 -1
  427. package/dist/src/utils/retry.test.js.map +1 -1
  428. package/dist/src/utils/sanitization.d.ts +20 -0
  429. package/dist/src/utils/sanitization.js +66 -0
  430. package/dist/src/utils/sanitization.js.map +1 -0
  431. package/dist/src/utils/sanitization.test.d.ts +6 -0
  432. package/dist/src/utils/sanitization.test.js +81 -0
  433. package/dist/src/utils/sanitization.test.js.map +1 -0
  434. package/dist/src/utils/secure-browser-launcher.d.ts +23 -0
  435. package/dist/src/utils/secure-browser-launcher.js +164 -0
  436. package/dist/src/utils/secure-browser-launcher.js.map +1 -0
  437. package/dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
  438. package/dist/src/utils/secure-browser-launcher.test.js +149 -0
  439. package/dist/src/utils/secure-browser-launcher.test.js.map +1 -0
  440. package/dist/src/utils/shell-utils.d.ts +37 -3
  441. package/dist/src/utils/shell-utils.js +110 -47
  442. package/dist/src/utils/shell-utils.js.map +1 -1
  443. package/dist/src/utils/shell-utils.test.js +146 -396
  444. package/dist/src/utils/shell-utils.test.js.map +1 -1
  445. package/dist/src/utils/summarizer.js +2 -2
  446. package/dist/src/utils/summarizer.js.map +1 -1
  447. package/dist/src/utils/textUtils.d.ts +13 -0
  448. package/dist/src/utils/textUtils.js +28 -0
  449. package/dist/src/utils/textUtils.js.map +1 -0
  450. package/dist/src/utils/unicodeUtils.d.ts +44 -0
  451. package/dist/src/utils/unicodeUtils.js +93 -0
  452. package/dist/src/utils/unicodeUtils.js.map +1 -0
  453. package/dist/src/utils/unicodeUtils.test.d.ts +6 -0
  454. package/dist/src/utils/unicodeUtils.test.js +120 -0
  455. package/dist/src/utils/unicodeUtils.test.js.map +1 -0
  456. package/dist/src/utils/workspaceContext.d.ts +47 -0
  457. package/dist/src/utils/workspaceContext.js +106 -0
  458. package/dist/src/utils/workspaceContext.js.map +1 -0
  459. package/dist/src/utils/workspaceContext.test.d.ts +6 -0
  460. package/dist/src/utils/workspaceContext.test.js +209 -0
  461. package/dist/src/utils/workspaceContext.test.js.map +1 -0
  462. package/package.json +3 -2
  463. package/dist/src/providers/IProviderConfig.d.ts +0 -31
  464. package/dist/src/providers/IProviderConfig.js.map +0 -1
  465. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,3 @@
1
+ # IDE Mode
2
+
3
+ Instructions for IDE companion mode.
@@ -0,0 +1,3 @@
1
+ # macOS Seatbelt
2
+
3
+ You are running under macos seatbelt with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to macOS Seatbelt (e.g. if a command fails with 'Operation not permitted' or similar error), as you report the error to the user, also explain why you think it could be due to macOS Seatbelt, and how the user may need to adjust their Seatbelt profile.
@@ -0,0 +1,3 @@
1
+ # Outside of Sandbox
2
+
3
+ You are running outside of a sandbox container, directly on the user's system. For critical commands that are particularly likely to modify the user's system outside of the project directory or system temp directory, as you explain the command to the user (per the Explain Critical Commands rule above), also remind the user to consider enabling sandboxing.
@@ -0,0 +1,3 @@
1
+ # Sandbox
2
+
3
+ You are running in a sandbox container with limited access to files outside the project directory or system temp directory, and with limited access to host system resources such as ports. If you encounter failures that could be due to sandboxing (e.g. if a command fails with 'Operation not permitted' or similar error), when you report the error to the user, also explain why you think it could be due to sandboxing, and how the user may need to adjust their sandbox configuration.
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Main export for all default prompts
3
+ * Combines core, tool, and provider-specific defaults
4
+ */
5
+ import { CORE_DEFAULTS } from './core-defaults.js';
6
+ import { TOOL_DEFAULTS } from './tool-defaults.js';
7
+ import { PROVIDER_DEFAULTS } from './provider-defaults.js';
8
+ import { SERVICE_DEFAULTS } from './service-defaults.js';
9
+ /**
10
+ * All default prompts combined into a single record
11
+ * Keys are relative paths from ~/.llxprt/prompts/
12
+ */
13
+ export declare const ALL_DEFAULTS: Record<string, string>;
14
+ export { CORE_DEFAULTS, TOOL_DEFAULTS, PROVIDER_DEFAULTS, SERVICE_DEFAULTS };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Main export for all default prompts
3
+ * Combines core, tool, and provider-specific defaults
4
+ */
5
+ import { CORE_DEFAULTS } from './core-defaults.js';
6
+ import { TOOL_DEFAULTS } from './tool-defaults.js';
7
+ import { PROVIDER_DEFAULTS } from './provider-defaults.js';
8
+ import { SERVICE_DEFAULTS } from './service-defaults.js';
9
+ /**
10
+ * All default prompts combined into a single record
11
+ * Keys are relative paths from ~/.llxprt/prompts/
12
+ */
13
+ export const ALL_DEFAULTS = {
14
+ ...CORE_DEFAULTS,
15
+ ...TOOL_DEFAULTS,
16
+ ...PROVIDER_DEFAULTS,
17
+ ...SERVICE_DEFAULTS,
18
+ };
19
+ // Export individual collections for specific use cases
20
+ export { CORE_DEFAULTS, TOOL_DEFAULTS, PROVIDER_DEFAULTS, SERVICE_DEFAULTS };
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,GAAG,aAAa;IAChB,GAAG,aAAa;IAChB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;CACpB,CAAC;AAEF,uDAAuD;AACvD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Provider and model-specific default prompts
3
+ * These constants contain the default content for provider/model overrides
4
+ */
5
+ export declare const PROVIDER_DEFAULTS: Record<string, string>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Provider and model-specific default prompts
3
+ * These constants contain the default content for provider/model overrides
4
+ */
5
+ export const PROVIDER_DEFAULTS = {
6
+ 'providers/gemini/models/gemini-1-5-flash/core.md': `IMPORTANT: You MUST use the provided tools when appropriate. For example:
7
+ - When asked to list files or directories, use the 'Ls' tool
8
+ - When asked to read file contents, use the 'ReadFile' tool
9
+ - When asked to search for patterns in files, use the 'Grep' tool
10
+ - When asked to find files by name, use the 'Glob' tool
11
+ - When asked to create files, use the 'WriteFile' tool
12
+ - When asked to modify files, use the 'Edit' tool
13
+ - When asked to run commands, use the 'Shell' tool
14
+ Do not describe what you would do - actually execute the tool calls.`,
15
+ 'providers/gemini/models/gemini-2-5-flash/core.md': `IMPORTANT: You MUST use the provided tools when appropriate. For example:
16
+ - When asked to list files or directories, use the 'Ls' tool
17
+ - When asked to read file contents, use the 'ReadFile' tool
18
+ - When asked to search for patterns in files, use the 'Grep' tool
19
+ - When asked to find files by name, use the 'Glob' tool
20
+ - When asked to create files, use the 'WriteFile' tool
21
+ - When asked to modify files, use the 'Edit' tool
22
+ - When asked to run commands, use the 'Shell' tool
23
+ Do not describe what you would do - actually execute the tool calls.`,
24
+ // Future provider-specific defaults can be added here
25
+ };
26
+ //# sourceMappingURL=provider-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-defaults.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/provider-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,kDAAkD,EAAE;;;;;;;;qEAQe;IACnE,kDAAkD,EAAE;;;;;;;;qEAQe;IACnE,sDAAsD;CACvD,CAAC"}
@@ -0,0 +1,10 @@
1
+ IMPORTANT: You MUST use the provided tools when appropriate. For example:
2
+
3
+ - When asked to list files or directories, use the '${LSTool.Name}' tool
4
+ - When asked to read file contents, use the '${ReadFileTool.Name}' tool
5
+ - When asked to search for patterns in files, use the '${GrepTool.Name}' tool
6
+ - When asked to find files by name, use the '${GlobTool.Name}' tool
7
+ - When asked to create files, use the '${WriteFileTool.Name}' tool
8
+ - When asked to modify files, use the '${EditTool.Name}' tool
9
+ - When asked to run commands, use the '${ShellTool.Name}' tool
10
+ Do not describe what you would do - actually execute the tool calls.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Service-specific default prompts
3
+ * These contain prompts used by various internal services
4
+ */
5
+ export declare const SERVICE_DEFAULTS: Record<string, string>;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Service-specific default prompts
3
+ * These contain prompts used by various internal services
4
+ */
5
+ export const SERVICE_DEFAULTS = {
6
+ 'services/loop-detection.md': `You are a sophisticated AI diagnostic agent specializing in identifying when a conversational AI is stuck in an unproductive state. Your task is to analyze the provided conversation history and determine if the assistant has ceased to make meaningful progress.
7
+
8
+ An unproductive state is characterized by one or more of the following patterns over the last 5 or more assistant turns:
9
+
10
+ Repetitive Actions: The assistant repeats the same tool calls or conversational responses a decent number of times. This includes simple loops (e.g., tool_A, tool_A, tool_A) and alternating patterns (e.g., tool_A, tool_B, tool_A, tool_B, ...).
11
+
12
+ Cognitive Loop: The assistant seems unable to determine the next logical step. It might express confusion, repeatedly ask the same questions, or generate responses that don't logically follow from the previous turns, indicating it's stuck and not advancing the task.
13
+
14
+ Crucially, differentiate between a true unproductive state and legitimate, incremental progress.
15
+ For example, a series of 'tool_A' or 'tool_B' tool calls that make small, distinct changes to the same file (like adding docstrings to functions one by one) is considered forward progress and is NOT a loop. A loop would be repeatedly replacing the same text with the same content, or cycling between a small set of files with no net change.
16
+
17
+ Please analyze the conversation history to determine the possibility that the conversation is stuck in a repetitive, non-productive state.`,
18
+ 'commands/init-command.md': `You are an AI agent that brings the power of multiple LLM providers directly into the terminal. Your task is to analyze the current directory and generate a comprehensive LLXPRT.md file to be used as instructional context for future interactions.
19
+
20
+ **Analysis Process:**
21
+
22
+ 1. **Initial Exploration:**
23
+ * Start by listing the files and directories to get a high-level overview of the structure.
24
+ * Read the README file (e.g., \`README.md\`, \`README.txt\`) if it exists. This is often the best place to start.
25
+
26
+ 2. **Iterative Deep Dive (up to 10 files):**
27
+ * Based on your initial findings, select a few files that seem most important (e.g., configuration files, main source files, documentation).
28
+ * Read them. As you learn more, refine your understanding and decide which files to read next. You don't need to decide all 10 files at once. Let your discoveries guide your exploration.
29
+
30
+ 3. **Identify Project Type:**
31
+ * **Code Project:** Look for clues like \`package.json\`, \`requirements.txt\`, \`pom.xml\`, \`go.mod\`, \`Cargo.toml\`, \`build.gradle\`, or a \`src\` directory. If you find them, this is likely a software project.
32
+ * **Non-Code Project:** If you don't find code-related files, this might be a directory for documentation, research papers, notes, or something else.
33
+
34
+ **LLXPRT.md Content Generation:**
35
+
36
+ **For a Code Project:**
37
+
38
+ * **Project Overview:** Write a clear and concise summary of the project's purpose, main technologies, and architecture.
39
+ * **Building and Running:** Document the key commands for building, running, and testing the project. Infer these from the files you've read (e.g., \`scripts\` in \`package.json\`, \`Makefile\`, etc.). If you can't find explicit commands, provide a placeholder with a TODO.
40
+ * **Development Conventions:** Describe any coding styles, testing practices, or contribution guidelines you can infer from the codebase.
41
+
42
+ **For a Non-Code Project:**
43
+
44
+ * **Directory Overview:** Describe the purpose and contents of the directory. What is it for? What kind of information does it hold?
45
+ * **Key Files:** List the most important files and briefly explain what they contain.
46
+ * **Usage:** Explain how the contents of this directory are intended to be used.
47
+
48
+ **Final Output:**
49
+
50
+ Write the complete content to the \`LLXPRT.md\` file. The output must be well-formatted Markdown.`,
51
+ };
52
+ //# sourceMappingURL=service-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-defaults.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/service-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,4BAA4B,EAAE;;;;;;;;;;;2IAW2G;IAEzI,0BAA0B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kGAgCoE;CACjG,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tool-specific default prompts
3
+ * These constants contain the default content for tool-related prompts
4
+ */
5
+ export declare const TOOL_DEFAULTS: Record<string, string>;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Tool-specific default prompts
3
+ * These constants contain the default content for tool-related prompts
4
+ */
5
+ export const TOOL_DEFAULTS = {
6
+ 'tools/shell.md': `- Use the '\${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
7
+ - **Explain Critical Commands:** Before executing commands with '\${ShellTool.Name}' that modify the file system, codebase, or system state, you *must* provide a brief explanation of the command's purpose and potential impact. Prioritize user understanding and safety. You should not ask permission to use the tool; the user will be presented with a confirmation dialogue upon use (you do not need to tell them this).
8
+ - **Command Execution:** Use the '\${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
9
+ - **Background Processes:** Use background processes (via \\\`&\\\`) for commands that are unlikely to stop on their own, e.g. \\\`node server.js &\\\`. If unsure, ask the user.
10
+ - **Interactive Commands:** Try to avoid shell commands that are likely to require user interaction (e.g. \\\`git rebase -i\\\`). Use non-interactive versions of commands (e.g. \\\`npm init -y\\\` instead of \\\`npm init\\\`) when available, and otherwise remind the user that interactive shell commands are not supported and may cause hangs until canceled by the user.`,
11
+ 'tools/read-file.md': `- **File Paths:** Always use absolute paths when referring to files with tools like '\${ReadFileTool.Name}' or '\${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
12
+ - **Path Construction:** Before using any file system tool (e.g., \${ReadFileTool.Name}' or '\${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
13
+ - Use '\${ReadFileTool.Name}' and '\${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
14
+ - Never make assumptions about the contents of files; instead use '\${ReadFileTool.Name}' or '\${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.`,
15
+ 'tools/edit.md': `- Use the available tools (e.g., '\${EditTool.Name}', '\${WriteFileTool.Name}' '\${ShellTool.Name}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
16
+ - When asked to modify files, use the '\${EditTool.Name}' tool`,
17
+ 'tools/write-file.md': `- **File Paths:** Always use absolute paths when referring to files with tools like '\${ReadFileTool.Name}' or '\${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
18
+ - **Path Construction:** Before using any file system tool (e.g., \${ReadFileTool.Name}' or '\${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
19
+ - Some tools you may especially find useful are '\${WriteFileTool.Name}', '\${EditTool.Name}' and '\${ShellTool.Name}'.
20
+ - When asked to create files, use the '\${WriteFileTool.Name}' tool`,
21
+ 'tools/grep.md': `- Use '\${GrepTool.Name}' and '\${GlobTool.Name}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
22
+ - When asked to search for patterns in files, use the '\${GrepTool.Name}' tool`,
23
+ 'tools/glob.md': `- Use '\${GrepTool.Name}' and '\${GlobTool.Name}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
24
+ - When asked to find files by name, use the '\${GlobTool.Name}' tool`,
25
+ 'tools/ls.md': `- When asked to list files or directories, use the '\${LSTool.Name}' tool`,
26
+ 'tools/memory.md': `- **Remembering Facts:** Use the '\${MemoryTool.Name}' tool to remember specific, *user-related* facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline *your future interactions with them* (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do *not* use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"`,
27
+ 'tools/read-many-files.md': `- Use '\${ReadFileTool.Name}' and '\${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
28
+ - Never make assumptions about the contents of files; instead use '\${ReadFileTool.Name}' or '\${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.`,
29
+ 'tools/todo-read.md': `# Task Management
30
+ You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.`,
31
+ 'tools/todo-write.md': `# Task Management
32
+ You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
33
+
34
+ ## When to Use This Tool
35
+ Use this tool proactively in these scenarios:
36
+
37
+ 1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
38
+ 2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
39
+ 3. User explicitly requests todo list - When the user directly asks you to use the todo list
40
+ 4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
41
+ 5. After receiving new instructions - Immediately capture user requirements as todos
42
+ 6. When you start working on a task - Mark it as in_progress BEFORE beginning work
43
+ 7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
44
+
45
+ ## When NOT to Use This Tool
46
+ Skip using this tool when:
47
+ 1. There is only a single, straightforward task
48
+ 2. The task is trivial and tracking it provides no organizational benefit
49
+ 3. The task can be completed in less than 3 trivial steps
50
+ 4. The task is purely conversational or informational
51
+
52
+ ## Task States and Management
53
+ 1. **Task States**: Use these states to track progress:
54
+ - pending: Task not yet started
55
+ - in_progress: Currently working on (limit to ONE task at a time)
56
+ - completed: Task finished successfully
57
+
58
+ 2. **Task Management**:
59
+ - Update task status in real-time as you work
60
+ - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
61
+ - Only have ONE task in_progress at any time
62
+ - Complete current tasks before starting new ones
63
+ - Remove tasks that are no longer relevant from the list entirely
64
+
65
+ 3. **Task Completion Requirements**:
66
+ - ONLY mark a task as completed when you have FULLY accomplished it
67
+ - If you encounter errors, blockers, or cannot finish, keep the task as in_progress
68
+ - When blocked, create a new task describing what needs to be resolved
69
+ - Never mark a task as completed if:
70
+ - Tests are failing
71
+ - Implementation is partial
72
+ - You encountered unresolved errors
73
+ - You couldn't find necessary files or dependencies
74
+
75
+ When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.`,
76
+ 'tools/web-fetch.md': `# Web Fetch Tool
77
+ Use this tool to fetch content from URLs when needed.`,
78
+ 'tools/web-search.md': `# Web Search Tool
79
+ Use this tool to search the web when needed.`,
80
+ };
81
+ //# sourceMappingURL=tool-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-defaults.js","sourceRoot":"","sources":["../../../../src/prompt-config/defaults/tool-defaults.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,aAAa,GAA2B;IACnD,gBAAgB,EAAE;;;;kXAI8V;IAEhX,oBAAoB,EAAE;;;yKAGiJ;IAEvK,eAAe,EAAE;+DAC4C;IAE7D,qBAAqB,EAAE;;;oEAG2C;IAElE,eAAe,EAAE;+EAC4D;IAE7E,eAAe,EAAE;qEACkD;IAEnE,aAAa,EAAE,2EAA2E;IAE1F,iBAAiB,EAAE,6lBAA6lB;IAEhnB,0BAA0B,EAAE;yKAC2I;IAEvK,oBAAoB,EAAE;qNAC6L;IAEnN,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sJA4C6H;IAEpJ,oBAAoB,EAAE;sDAC8B;IAEpD,qBAAqB,EAAE;6CACoB;CAC5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ - Use the available tools (e.g., '${EditTool.Name}', '${WriteFileTool.Name}' '${ShellTool.Name}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
2
+ - When asked to modify files, use the '${EditTool.Name}' tool
@@ -0,0 +1,2 @@
1
+ - Use '${GrepTool.Name}' and '${GlobTool.Name}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
2
+ - When asked to find files by name, use the '${GlobTool.Name}' tool
@@ -0,0 +1,2 @@
1
+ - Use '${GrepTool.Name}' and '${GlobTool.Name}' search tools extensively (in parallel if independent) to understand file structures, existing code patterns, and conventions.
2
+ - When asked to search for patterns in files, use the '${GrepTool.Name}' tool
@@ -0,0 +1 @@
1
+ - When asked to list files or directories, use the '${LSTool.Name}' tool
@@ -0,0 +1 @@
1
+ - **Remembering Facts:** Use the '${MemoryTool.Name}' tool to remember specific, _user-related_ facts or preferences when the user explicitly asks, or when they state a clear, concise piece of information that would help personalize or streamline _your future interactions with them_ (e.g., preferred coding style, common project paths they use, personal tool aliases). This tool is for user-specific information that should persist across sessions. Do _not_ use it for general project context or information. If unsure whether to save something, you can ask the user, "Should I remember that for you?"
@@ -0,0 +1,4 @@
1
+ - **File Paths:** Always use absolute paths when referring to files with tools like '${ReadFileTool.Name}' or '${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
2
+ - **Path Construction:** Before using any file system tool (e.g., ${ReadFileTool.Name}' or '${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
3
+ - Use '${ReadFileTool.Name}' and '${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
4
+ - Never make assumptions about the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.
@@ -0,0 +1,2 @@
1
+ - Use '${ReadFileTool.Name}' and '${ReadManyFilesTool.Name}' to understand context and validate any assumptions you may have.
2
+ - Never make assumptions about the contents of files; instead use '${ReadFileTool.Name}' or '${ReadManyFilesTool.Name}' to ensure you aren't making broad assumptions.
@@ -0,0 +1,5 @@
1
+ - Use the '${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
2
+ - **Explain Critical Commands:** Before executing commands with '${ShellTool.Name}' that modify the file system, codebase, or system state, you _must_ provide a brief explanation of the command's purpose and potential impact. Prioritize user understanding and safety. You should not ask permission to use the tool; the user will be presented with a confirmation dialogue upon use (you do not need to tell them this).
3
+ - **Command Execution:** Use the '${ShellTool.Name}' tool for running shell commands, remembering the safety rule to explain modifying commands first.
4
+ - **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`. If unsure, ask the user.
5
+ - **Interactive Commands:** Try to avoid shell commands that are likely to require user interaction (e.g. \`git rebase -i\`). Use non-interactive versions of commands (e.g. \`npm init -y\` instead of \`npm init\`) when available, and otherwise remind the user that interactive shell commands are not supported and may cause hangs until canceled by the user.
@@ -0,0 +1,3 @@
1
+ # Task Management
2
+
3
+ You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
@@ -0,0 +1,50 @@
1
+ # Task Management
2
+
3
+ You have access to the TodoWrite and TodoRead tools to help you manage and plan tasks. Use these tools VERY frequently to ensure that you are tracking your tasks and giving the user visibility into your progress.
4
+
5
+ ## When to Use This Tool
6
+
7
+ Use this tool proactively in these scenarios:
8
+
9
+ 1. Complex multi-step tasks - When a task requires 3 or more distinct steps or actions
10
+ 2. Non-trivial and complex tasks - Tasks that require careful planning or multiple operations
11
+ 3. User explicitly requests todo list - When the user directly asks you to use the todo list
12
+ 4. User provides multiple tasks - When users provide a list of things to be done (numbered or comma-separated)
13
+ 5. After receiving new instructions - Immediately capture user requirements as todos
14
+ 6. When you start working on a task - Mark it as in_progress BEFORE beginning work
15
+ 7. After completing a task - Mark it as completed and add any new follow-up tasks discovered during implementation
16
+
17
+ ## When NOT to Use This Tool
18
+
19
+ Skip using this tool when:
20
+
21
+ 1. There is only a single, straightforward task
22
+ 2. The task is trivial and tracking it provides no organizational benefit
23
+ 3. The task can be completed in less than 3 trivial steps
24
+ 4. The task is purely conversational or informational
25
+
26
+ ## Task States and Management
27
+
28
+ 1. **Task States**: Use these states to track progress:
29
+ - pending: Task not yet started
30
+ - in_progress: Currently working on (limit to ONE task at a time)
31
+ - completed: Task finished successfully
32
+
33
+ 2. **Task Management**:
34
+ - Update task status in real-time as you work
35
+ - Mark tasks complete IMMEDIATELY after finishing (don't batch completions)
36
+ - Only have ONE task in_progress at any time
37
+ - Complete current tasks before starting new ones
38
+ - Remove tasks that are no longer relevant from the list entirely
39
+
40
+ 3. **Task Completion Requirements**:
41
+ - ONLY mark a task as completed when you have FULLY accomplished it
42
+ - If you encounter errors, blockers, or cannot finish, keep the task as in_progress
43
+ - When blocked, create a new task describing what needs to be resolved
44
+ - Never mark a task as completed if:
45
+ - Tests are failing
46
+ - Implementation is partial
47
+ - You encountered unresolved errors
48
+ - You couldn't find necessary files or dependencies
49
+
50
+ When in doubt, use this tool. Being proactive with task management demonstrates attentiveness and ensures you complete all requirements successfully.
@@ -0,0 +1,3 @@
1
+ # Web Fetch Tool
2
+
3
+ Use this tool to fetch content from URLs when needed.
@@ -0,0 +1,3 @@
1
+ # Web Search Tool
2
+
3
+ Use this tool to search the web when needed.
@@ -0,0 +1,4 @@
1
+ - **File Paths:** Always use absolute paths when referring to files with tools like '${ReadFileTool.Name}' or '${WriteFileTool.Name}'. Relative paths are not supported. You must provide an absolute path.
2
+ - **Path Construction:** Before using any file system tool (e.g., ${ReadFileTool.Name}' or '${WriteFileTool.Name}'), you must construct the full absolute path for the file_path argument. Always combine the absolute path of the project's root directory with the file's path relative to the root. For example, if the project root is /path/to/project/ and the file is foo/bar/baz.txt, the final path you must use is /path/to/project/foo/bar/baz.txt. If the user provides a relative path, you must resolve it against the root directory to create an absolute path.
3
+ - Some tools you may especially find useful are '${WriteFileTool.Name}', '${EditTool.Name}' and '${ShellTool.Name}'.
4
+ - When asked to create files, use the '${WriteFileTool.Name}' tool
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Main exports for the prompt-config module
3
+ */
4
+ export { TemplateEngine } from './TemplateEngine.js';
5
+ export { PromptLoader } from './prompt-loader.js';
6
+ export { PromptCache } from './prompt-cache.js';
7
+ export { PromptResolver } from './prompt-resolver.js';
8
+ export { PromptInstaller } from './prompt-installer.js';
9
+ export { PromptService } from './prompt-service.js';
10
+ export type { TemplateVariables, TemplateProcessingOptions, PromptContext, PromptEnvironment, } from './types.js';
11
+ export type { LoadFileResult, EnvironmentInfo, FileWatcher, FileChangeCallback, } from './prompt-loader.js';
12
+ export type { CacheEntry, CacheStats } from './prompt-cache.js';
13
+ export type { ResolveFileResult, ResolvedFile, AvailableFile, ValidationResult, } from './prompt-resolver.js';
14
+ export type { InstallOptions, InstallResult, UninstallOptions, UninstallResult, ValidationResult as InstallerValidationResult, RepairOptions, RepairResult, BackupResult, DefaultsMap, } from './prompt-installer.js';
15
+ export { DEFAULT_BASE_DIR, REQUIRED_DIRECTORIES } from './prompt-installer.js';
16
+ export type { PromptServiceConfig, ValidationResult as PromptServiceValidationResult, } from './prompt-service.js';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Main exports for the prompt-config module
3
+ */
4
+ export { TemplateEngine } from './TemplateEngine.js';
5
+ export { PromptLoader } from './prompt-loader.js';
6
+ export { PromptCache } from './prompt-cache.js';
7
+ export { PromptResolver } from './prompt-resolver.js';
8
+ export { PromptInstaller } from './prompt-installer.js';
9
+ export { PromptService } from './prompt-service.js';
10
+ export { DEFAULT_BASE_DIR, REQUIRED_DIRECTORIES } from './prompt-installer.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompt-config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA+BpD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { PromptContext } from './types.js';
2
+ /**
3
+ * Represents a cached prompt entry with metadata
4
+ */
5
+ export interface CacheEntry {
6
+ assembledPrompt: string;
7
+ metadata: {
8
+ files: string[];
9
+ tokenCount?: number;
10
+ assemblyTimeMs: number;
11
+ };
12
+ }
13
+ /**
14
+ * Statistics about cache usage
15
+ */
16
+ export interface CacheStats {
17
+ entryCount: number;
18
+ totalSizeMB: number;
19
+ maxSizeMB: number;
20
+ utilizationPercent: number;
21
+ averageEntrySizeKB: number;
22
+ totalAccesses: number;
23
+ mostAccessedKey: string | null;
24
+ mostAccessedCount: number;
25
+ }
26
+ /**
27
+ * In-memory prompt cache with LRU eviction
28
+ */
29
+ export declare class PromptCache {
30
+ private cache;
31
+ private totalSize;
32
+ private maxSize;
33
+ private accessOrder;
34
+ private requestedSizeMB;
35
+ constructor(maxSizeMB?: number);
36
+ /**
37
+ * Generate a unique cache key from context
38
+ */
39
+ generateKey(context: PromptContext | null | undefined): string;
40
+ /**
41
+ * Store a prompt in the cache
42
+ */
43
+ set(context: PromptContext, prompt: string, metadata: CacheEntry['metadata']): void;
44
+ /**
45
+ * Retrieve a cached prompt
46
+ */
47
+ get(context: PromptContext): CacheEntry | null;
48
+ /**
49
+ * Check if a prompt exists in cache
50
+ */
51
+ has(context: PromptContext | null | undefined): boolean;
52
+ /**
53
+ * Clear all cached entries
54
+ */
55
+ clear(): void;
56
+ /**
57
+ * Get the number of cached entries
58
+ */
59
+ size(): number;
60
+ /**
61
+ * Remove a specific entry from cache
62
+ */
63
+ remove(key: string | null | undefined): boolean;
64
+ /**
65
+ * Get cache statistics
66
+ */
67
+ getStats(): CacheStats;
68
+ /**
69
+ * Preload cache with multiple contexts
70
+ */
71
+ preload(contexts: PromptContext[] | null | undefined): number;
72
+ }