@within-7/minto 0.4.1 → 0.4.2

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 (391) hide show
  1. package/dist/Tool.js +7 -0
  2. package/dist/Tool.js.map +2 -2
  3. package/dist/commands/agents/AgentsCommand.js +1 -1
  4. package/dist/commands/agents/AgentsCommand.js.map +2 -2
  5. package/dist/commands/agents/constants.js +2 -2
  6. package/dist/commands/agents/constants.js.map +2 -2
  7. package/dist/commands/clear.js +4 -3
  8. package/dist/commands/clear.js.map +2 -2
  9. package/dist/commands/compact.js +2 -2
  10. package/dist/commands/compact.js.map +1 -1
  11. package/dist/commands/context.js +3 -1
  12. package/dist/commands/context.js.map +2 -2
  13. package/dist/commands/login.js +128 -0
  14. package/dist/commands/login.js.map +7 -0
  15. package/dist/commands/memory.js +33 -82
  16. package/dist/commands/memory.js.map +2 -2
  17. package/dist/commands/quit.js +3 -1
  18. package/dist/commands/quit.js.map +2 -2
  19. package/dist/commands/resume.js +39 -239
  20. package/dist/commands/resume.js.map +2 -2
  21. package/dist/commands/tasks.js +1 -1
  22. package/dist/commands/tasks.js.map +2 -2
  23. package/dist/commands/terminalSetup.js +6 -2
  24. package/dist/commands/terminalSetup.js.map +2 -2
  25. package/dist/commands.js +2 -0
  26. package/dist/commands.js.map +2 -2
  27. package/dist/components/AgentDetailView.js +126 -0
  28. package/dist/components/AgentDetailView.js.map +7 -0
  29. package/dist/components/AgentThinkingBlock.js +1 -1
  30. package/dist/components/AgentThinkingBlock.js.map +2 -2
  31. package/dist/components/AgentViewBanner.js +22 -0
  32. package/dist/components/AgentViewBanner.js.map +7 -0
  33. package/dist/components/HeaderBar.js +1 -1
  34. package/dist/components/HeaderBar.js.map +2 -2
  35. package/dist/components/Help.js +8 -1
  36. package/dist/components/Help.js.map +2 -2
  37. package/dist/components/HotkeyHelpPanel.js +26 -8
  38. package/dist/components/HotkeyHelpPanel.js.map +2 -2
  39. package/dist/components/IdleNotificationBar.js +10 -0
  40. package/dist/components/IdleNotificationBar.js.map +7 -0
  41. package/dist/components/ModelSelector/ModelSelector.js +55 -20
  42. package/dist/components/ModelSelector/ModelSelector.js.map +2 -2
  43. package/dist/components/PromptInput.js +186 -115
  44. package/dist/components/PromptInput.js.map +2 -2
  45. package/dist/components/RewindPanel.js +272 -0
  46. package/dist/components/RewindPanel.js.map +7 -0
  47. package/dist/components/Spinner.js +10 -21
  48. package/dist/components/Spinner.js.map +2 -2
  49. package/dist/components/StreamingTextPreview.js +29 -0
  50. package/dist/components/StreamingTextPreview.js.map +7 -0
  51. package/dist/components/SubagentBlock.js +3 -2
  52. package/dist/components/SubagentBlock.js.map +2 -2
  53. package/dist/components/SubagentProgress.js +4 -4
  54. package/dist/components/SubagentProgress.js.map +2 -2
  55. package/dist/components/TabbedListView/SearchInput.js +1 -1
  56. package/dist/components/TabbedListView/SearchInput.js.map +2 -2
  57. package/dist/components/TabbedListView/TabbedListView.js +87 -41
  58. package/dist/components/TabbedListView/TabbedListView.js.map +2 -2
  59. package/dist/components/TaskCard.js +4 -4
  60. package/dist/components/TaskCard.js.map +2 -2
  61. package/dist/components/TeamMemberPanel.js +107 -0
  62. package/dist/components/TeamMemberPanel.js.map +7 -0
  63. package/dist/components/ThinkingSelector.js +84 -0
  64. package/dist/components/ThinkingSelector.js.map +7 -0
  65. package/dist/components/TitledDivider.js +26 -0
  66. package/dist/components/TitledDivider.js.map +7 -0
  67. package/dist/components/TodoPanel.js +31 -30
  68. package/dist/components/TodoPanel.js.map +2 -2
  69. package/dist/components/TokenWarning.js +28 -7
  70. package/dist/components/TokenWarning.js.map +2 -2
  71. package/dist/components/messages/AssistantTextMessage.js +5 -2
  72. package/dist/components/messages/AssistantTextMessage.js.map +2 -2
  73. package/dist/components/messages/AssistantToolUseMessage.js +9 -1
  74. package/dist/components/messages/AssistantToolUseMessage.js.map +2 -2
  75. package/dist/components/messages/DefaultToolResultFallback.js +11 -0
  76. package/dist/components/messages/DefaultToolResultFallback.js.map +7 -0
  77. package/dist/components/messages/ParallelTasksGroupView.js +14 -6
  78. package/dist/components/messages/ParallelTasksGroupView.js.map +2 -2
  79. package/dist/components/messages/TaskInModuleView.js +27 -27
  80. package/dist/components/messages/TaskInModuleView.js.map +2 -2
  81. package/dist/components/messages/UserGuidanceMessage.js +26 -0
  82. package/dist/components/messages/UserGuidanceMessage.js.map +7 -0
  83. package/dist/components/messages/UserPromptMessage.js +2 -1
  84. package/dist/components/messages/UserPromptMessage.js.map +2 -2
  85. package/dist/components/messages/UserTeamNotificationMessage.js +91 -0
  86. package/dist/components/messages/UserTeamNotificationMessage.js.map +7 -0
  87. package/dist/components/messages/UserTextMessage.js +8 -0
  88. package/dist/components/messages/UserTextMessage.js.map +2 -2
  89. package/dist/components/messages/UserToolResultMessage/UserToolRejectMessage.js +4 -2
  90. package/dist/components/messages/UserToolResultMessage/UserToolRejectMessage.js.map +2 -2
  91. package/dist/components/messages/UserToolResultMessage/UserToolResultMessage.js +18 -1
  92. package/dist/components/messages/UserToolResultMessage/UserToolResultMessage.js.map +2 -2
  93. package/dist/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +12 -1
  94. package/dist/components/messages/UserToolResultMessage/UserToolSuccessMessage.js.map +2 -2
  95. package/dist/components/permissions/PermissionRequest.js +4 -0
  96. package/dist/components/permissions/PermissionRequest.js.map +2 -2
  97. package/dist/components/permissions/PlanApprovalRequest.js +164 -0
  98. package/dist/components/permissions/PlanApprovalRequest.js.map +7 -0
  99. package/dist/constants/agentTeams.js +17 -0
  100. package/dist/constants/agentTeams.js.map +7 -0
  101. package/dist/constants/macros.js +2 -1
  102. package/dist/constants/macros.js.map +2 -2
  103. package/dist/constants/prompts/agentPrompt.js +1 -0
  104. package/dist/constants/prompts/agentPrompt.js.map +2 -2
  105. package/dist/constants/prompts/autoMemory.js +39 -0
  106. package/dist/constants/prompts/autoMemory.js.map +7 -0
  107. package/dist/constants/prompts/codeConventions.js +1 -13
  108. package/dist/constants/prompts/codeConventions.js.map +2 -2
  109. package/dist/constants/prompts/doingTasks.js +21 -2
  110. package/dist/constants/prompts/doingTasks.js.map +2 -2
  111. package/dist/constants/prompts/envInfo.js +6 -7
  112. package/dist/constants/prompts/envInfo.js.map +2 -2
  113. package/dist/constants/prompts/index.js +27 -5
  114. package/dist/constants/prompts/index.js.map +2 -2
  115. package/dist/constants/prompts/taskManagement.js +2 -43
  116. package/dist/constants/prompts/taskManagement.js.map +2 -2
  117. package/dist/constants/prompts/teamOverlays.js +50 -0
  118. package/dist/constants/prompts/teamOverlays.js.map +7 -0
  119. package/dist/constants/prompts/toneAndStyle.js +4 -29
  120. package/dist/constants/prompts/toneAndStyle.js.map +2 -2
  121. package/dist/constants/prompts/toolUsagePolicy.js +7 -22
  122. package/dist/constants/prompts/toolUsagePolicy.js.map +2 -2
  123. package/dist/constants/toolInputExamples.js +2 -2
  124. package/dist/constants/toolInputExamples.js.map +2 -2
  125. package/dist/context.js +39 -6
  126. package/dist/context.js.map +2 -2
  127. package/dist/core/backupManager.js +1 -1
  128. package/dist/core/backupManager.js.map +2 -2
  129. package/dist/core/permissions/rules/planModeRule.js +1 -1
  130. package/dist/core/permissions/rules/planModeRule.js.map +1 -1
  131. package/dist/core/permissions/rules/safeModeRule.js +1 -1
  132. package/dist/core/permissions/rules/safeModeRule.js.map +1 -1
  133. package/dist/engine/AgentEngine.js +902 -0
  134. package/dist/engine/AgentEngine.js.map +7 -0
  135. package/dist/engine/EngineRegistry.js +89 -0
  136. package/dist/engine/EngineRegistry.js.map +7 -0
  137. package/dist/engine/foregroundAdapter.js +191 -0
  138. package/dist/engine/foregroundAdapter.js.map +7 -0
  139. package/dist/engine/index.js +15 -0
  140. package/dist/engine/index.js.map +7 -0
  141. package/dist/engine/types.js +1 -0
  142. package/dist/engine/types.js.map +7 -0
  143. package/dist/entrypoints/cli.js +410 -79
  144. package/dist/entrypoints/cli.js.map +3 -3
  145. package/dist/hooks/useAgentEngine.js +129 -0
  146. package/dist/hooks/useAgentEngine.js.map +7 -0
  147. package/dist/hooks/useAgentTokenStats.js +0 -16
  148. package/dist/hooks/useAgentTokenStats.js.map +2 -2
  149. package/dist/hooks/useCanUseTool.js +47 -2
  150. package/dist/hooks/useCanUseTool.js.map +2 -2
  151. package/dist/hooks/useDeferredLoading.js +4 -1
  152. package/dist/hooks/useDeferredLoading.js.map +2 -2
  153. package/dist/hooks/useIdleNotifications.js +66 -0
  154. package/dist/hooks/useIdleNotifications.js.map +7 -0
  155. package/dist/hooks/useSessionTracking.js +9 -7
  156. package/dist/hooks/useSessionTracking.js.map +2 -2
  157. package/dist/hooks/useTeamMembers.js +51 -0
  158. package/dist/hooks/useTeamMembers.js.map +7 -0
  159. package/dist/i18n/locales/en.js +77 -12
  160. package/dist/i18n/locales/en.js.map +2 -2
  161. package/dist/i18n/locales/zh-CN.js +77 -12
  162. package/dist/i18n/locales/zh-CN.js.map +2 -2
  163. package/dist/i18n/types.js.map +1 -1
  164. package/dist/messages.js.map +2 -2
  165. package/dist/permissions.js +113 -7
  166. package/dist/permissions.js.map +2 -2
  167. package/dist/query.js +135 -37
  168. package/dist/query.js.map +2 -2
  169. package/dist/screens/REPL.js +504 -361
  170. package/dist/screens/REPL.js.map +3 -3
  171. package/dist/screens/ResumeConversation.js +199 -14
  172. package/dist/screens/ResumeConversation.js.map +2 -2
  173. package/dist/services/adapters/base.js.map +1 -1
  174. package/dist/services/agentTeams/backends/headless.js +108 -0
  175. package/dist/services/agentTeams/backends/headless.js.map +7 -0
  176. package/dist/services/agentTeams/backends/inProcess.js +102 -0
  177. package/dist/services/agentTeams/backends/inProcess.js.map +7 -0
  178. package/dist/services/agentTeams/backends/resolver.js +18 -0
  179. package/dist/services/agentTeams/backends/resolver.js.map +7 -0
  180. package/dist/services/agentTeams/backends/tmux.js +168 -0
  181. package/dist/services/agentTeams/backends/tmux.js.map +7 -0
  182. package/dist/services/agentTeams/backends/types.js +1 -0
  183. package/dist/services/agentTeams/backends/types.js.map +7 -0
  184. package/dist/services/agentTeams/heartbeat.js +88 -0
  185. package/dist/services/agentTeams/heartbeat.js.map +7 -0
  186. package/dist/services/agentTeams/index.js +42 -2
  187. package/dist/services/agentTeams/index.js.map +2 -2
  188. package/dist/services/agentTeams/injectionChannel.js +105 -0
  189. package/dist/services/agentTeams/injectionChannel.js.map +7 -0
  190. package/dist/services/agentTeams/mailbox.js +410 -30
  191. package/dist/services/agentTeams/mailbox.js.map +2 -2
  192. package/dist/services/agentTeams/messageFormatter.js +80 -0
  193. package/dist/services/agentTeams/messageFormatter.js.map +7 -0
  194. package/dist/services/agentTeams/permissionDelegation.js +71 -0
  195. package/dist/services/agentTeams/permissionDelegation.js.map +7 -0
  196. package/dist/services/agentTeams/teamEvents.js +45 -0
  197. package/dist/services/agentTeams/teamEvents.js.map +7 -0
  198. package/dist/services/agentTeams/teamManager.js +251 -34
  199. package/dist/services/agentTeams/teamManager.js.map +2 -2
  200. package/dist/services/agentTeams/teamTaskStore.js +290 -61
  201. package/dist/services/agentTeams/teamTaskStore.js.map +2 -2
  202. package/dist/services/agentTeams/teammateSpawner.js +99 -18
  203. package/dist/services/agentTeams/teammateSpawner.js.map +2 -2
  204. package/dist/services/hookExecutor.js +51 -8
  205. package/dist/services/hookExecutor.js.map +2 -2
  206. package/dist/services/llm/anthropicProvider.js +56 -59
  207. package/dist/services/llm/anthropicProvider.js.map +2 -2
  208. package/dist/services/llm/dispatch.js +24 -5
  209. package/dist/services/llm/dispatch.js.map +2 -2
  210. package/dist/services/llm/openaiProvider.js +115 -136
  211. package/dist/services/llm/openaiProvider.js.map +3 -3
  212. package/dist/services/llm/types.js +89 -15
  213. package/dist/services/llm/types.js.map +2 -2
  214. package/dist/services/mcpClient.js +80 -4
  215. package/dist/services/mcpClient.js.map +2 -2
  216. package/dist/services/mintoAuth.js +299 -0
  217. package/dist/services/mintoAuth.js.map +7 -0
  218. package/dist/services/oauth.js +3 -3
  219. package/dist/services/oauth.js.map +2 -2
  220. package/dist/services/openai.js +91 -20
  221. package/dist/services/openai.js.map +2 -2
  222. package/dist/services/plugins/pluginRuntime.js +11 -5
  223. package/dist/services/plugins/pluginRuntime.js.map +2 -2
  224. package/dist/services/plugins/pluginValidation.js +4 -2
  225. package/dist/services/plugins/pluginValidation.js.map +2 -2
  226. package/dist/services/sandbox/sandboxController.js +11 -3
  227. package/dist/services/sandbox/sandboxController.js.map +2 -2
  228. package/dist/services/sessionMemoryInjector.js +77 -0
  229. package/dist/services/sessionMemoryInjector.js.map +7 -0
  230. package/dist/services/systemReminder.js +130 -8
  231. package/dist/services/systemReminder.js.map +2 -2
  232. package/dist/services/taskStore.js +199 -8
  233. package/dist/services/taskStore.js.map +3 -3
  234. package/dist/services/topicDetector.js +169 -0
  235. package/dist/services/topicDetector.js.map +7 -0
  236. package/dist/tools/AskExpertModelTool/AskExpertModelTool.js +0 -13
  237. package/dist/tools/AskExpertModelTool/AskExpertModelTool.js.map +2 -2
  238. package/dist/tools/BashTool/BashTool.js +51 -28
  239. package/dist/tools/BashTool/BashTool.js.map +2 -2
  240. package/dist/tools/BashTool/prompt.js +95 -118
  241. package/dist/tools/BashTool/prompt.js.map +2 -2
  242. package/dist/tools/BashTool/utils.js +39 -1
  243. package/dist/tools/BashTool/utils.js.map +2 -2
  244. package/dist/tools/EnterWorktreeTool/EnterWorktreeTool.js +121 -0
  245. package/dist/tools/EnterWorktreeTool/EnterWorktreeTool.js.map +7 -0
  246. package/dist/tools/EnterWorktreeTool/prompt.js +22 -0
  247. package/dist/tools/EnterWorktreeTool/prompt.js.map +7 -0
  248. package/dist/tools/FileEditTool/FileEditTool.js +9 -4
  249. package/dist/tools/FileEditTool/FileEditTool.js.map +2 -2
  250. package/dist/tools/FileEditTool/prompt.js +3 -7
  251. package/dist/tools/FileEditTool/prompt.js.map +2 -2
  252. package/dist/tools/FileReadTool/FileReadTool.js +125 -3
  253. package/dist/tools/FileReadTool/FileReadTool.js.map +2 -2
  254. package/dist/tools/FileReadTool/prompt.js +1 -2
  255. package/dist/tools/FileReadTool/prompt.js.map +2 -2
  256. package/dist/tools/FileWriteTool/prompt.js +3 -5
  257. package/dist/tools/FileWriteTool/prompt.js.map +2 -2
  258. package/dist/tools/GlobTool/GlobTool.js +3 -2
  259. package/dist/tools/GlobTool/GlobTool.js.map +2 -2
  260. package/dist/tools/GrepTool/GrepTool.js +16 -5
  261. package/dist/tools/GrepTool/GrepTool.js.map +2 -2
  262. package/dist/tools/ListMcpResourcesTool/ListMcpResourcesTool.js.map +2 -2
  263. package/dist/tools/MCPSearchTool/MCPSearchTool.js +172 -0
  264. package/dist/tools/MCPSearchTool/MCPSearchTool.js.map +7 -0
  265. package/dist/tools/MCPSearchTool/prompt.js +77 -0
  266. package/dist/tools/MCPSearchTool/prompt.js.map +7 -0
  267. package/dist/tools/MultiEditTool/prompt.js +4 -7
  268. package/dist/tools/MultiEditTool/prompt.js.map +2 -2
  269. package/dist/tools/PlanModeTool/EnterPlanModeTool.js +12 -8
  270. package/dist/tools/PlanModeTool/EnterPlanModeTool.js.map +2 -2
  271. package/dist/tools/PlanModeTool/ExitPlanModeTool.js +54 -1
  272. package/dist/tools/PlanModeTool/ExitPlanModeTool.js.map +2 -2
  273. package/dist/tools/PlanModeTool/prompt.js +23 -74
  274. package/dist/tools/PlanModeTool/prompt.js.map +2 -2
  275. package/dist/tools/SendMessageTool/SendMessageTool.js +341 -0
  276. package/dist/tools/SendMessageTool/SendMessageTool.js.map +7 -0
  277. package/dist/tools/SendMessageTool/prompt.js +44 -0
  278. package/dist/tools/SendMessageTool/prompt.js.map +7 -0
  279. package/dist/tools/TaskCreateTool/prompt.js +15 -4
  280. package/dist/tools/TaskCreateTool/prompt.js.map +2 -2
  281. package/dist/tools/TaskListTool/prompt.js +18 -3
  282. package/dist/tools/TaskListTool/prompt.js.map +2 -2
  283. package/dist/tools/TaskOutputTool/prompt.js +4 -3
  284. package/dist/tools/TaskOutputTool/prompt.js.map +2 -2
  285. package/dist/tools/TaskTool/TaskTool.js +762 -98
  286. package/dist/tools/TaskTool/TaskTool.js.map +3 -3
  287. package/dist/tools/TaskTool/constants.js +8 -2
  288. package/dist/tools/TaskTool/constants.js.map +2 -2
  289. package/dist/tools/TaskTool/prompt.js +74 -70
  290. package/dist/tools/TaskTool/prompt.js.map +2 -2
  291. package/dist/tools/TaskUpdateTool/TaskUpdateTool.js +15 -1
  292. package/dist/tools/TaskUpdateTool/TaskUpdateTool.js.map +2 -2
  293. package/dist/tools/TeamCreateTool/TeamCreateTool.js +129 -0
  294. package/dist/tools/TeamCreateTool/TeamCreateTool.js.map +7 -0
  295. package/dist/tools/TeamCreateTool/prompt.js +58 -0
  296. package/dist/tools/TeamCreateTool/prompt.js.map +7 -0
  297. package/dist/tools/TeamDeleteTool/TeamDeleteTool.js +151 -0
  298. package/dist/tools/TeamDeleteTool/TeamDeleteTool.js.map +7 -0
  299. package/dist/tools/TeamDeleteTool/prompt.js +16 -0
  300. package/dist/tools/TeamDeleteTool/prompt.js.map +7 -0
  301. package/dist/tools/URLFetcherTool/URLFetcherTool.js +106 -15
  302. package/dist/tools/URLFetcherTool/URLFetcherTool.js.map +2 -2
  303. package/dist/tools/URLFetcherTool/prompt.js +3 -2
  304. package/dist/tools/URLFetcherTool/prompt.js.map +2 -2
  305. package/dist/tools/WebSearchTool/WebSearchTool.js +2 -1
  306. package/dist/tools/WebSearchTool/WebSearchTool.js.map +2 -2
  307. package/dist/tools/WebSearchTool/prompt.js +5 -4
  308. package/dist/tools/WebSearchTool/prompt.js.map +2 -2
  309. package/dist/tools.js +100 -20
  310. package/dist/tools.js.map +2 -2
  311. package/dist/types/PermissionMode.js +35 -6
  312. package/dist/types/PermissionMode.js.map +2 -2
  313. package/dist/types/hooks.js +2 -0
  314. package/dist/types/hooks.js.map +2 -2
  315. package/dist/types/plugin.js +2 -0
  316. package/dist/types/plugin.js.map +3 -3
  317. package/dist/utils/CircuitBreaker.js +15 -9
  318. package/dist/utils/CircuitBreaker.js.map +2 -2
  319. package/dist/utils/agentLoader.js +249 -112
  320. package/dist/utils/agentLoader.js.map +2 -2
  321. package/dist/utils/animationManager.js +40 -3
  322. package/dist/utils/animationManager.js.map +2 -2
  323. package/dist/utils/ask.js +7 -6
  324. package/dist/utils/ask.js.map +2 -2
  325. package/dist/utils/atomicWrite.js +23 -0
  326. package/dist/utils/atomicWrite.js.map +7 -0
  327. package/dist/utils/autoCompactCore.js +73 -56
  328. package/dist/utils/autoCompactCore.js.map +2 -2
  329. package/dist/utils/autoMemoryPaths.js +89 -0
  330. package/dist/utils/autoMemoryPaths.js.map +7 -0
  331. package/dist/utils/config.js +63 -38
  332. package/dist/utils/config.js.map +2 -2
  333. package/dist/utils/configSchema.js +13 -8
  334. package/dist/utils/configSchema.js.map +2 -2
  335. package/dist/utils/credentials/index.js +14 -0
  336. package/dist/utils/credentials/index.js.map +2 -2
  337. package/dist/utils/dualPath.js +24 -0
  338. package/dist/utils/dualPath.js.map +7 -0
  339. package/dist/utils/exit.js +66 -7
  340. package/dist/utils/exit.js.map +2 -2
  341. package/dist/utils/externalEditor.js +155 -0
  342. package/dist/utils/externalEditor.js.map +7 -0
  343. package/dist/utils/fileLock.js +67 -0
  344. package/dist/utils/fileLock.js.map +7 -0
  345. package/dist/utils/format.js +24 -14
  346. package/dist/utils/format.js.map +2 -2
  347. package/dist/utils/globalErrorHandler.js +5 -96
  348. package/dist/utils/globalErrorHandler.js.map +3 -3
  349. package/dist/utils/groupHandlers/parallelTasksHandler.js +5 -3
  350. package/dist/utils/groupHandlers/parallelTasksHandler.js.map +2 -2
  351. package/dist/utils/groupHandlers/taskHandler.js +2 -2
  352. package/dist/utils/groupHandlers/taskHandler.js.map +2 -2
  353. package/dist/utils/hookManager.js +64 -6
  354. package/dist/utils/hookManager.js.map +2 -2
  355. package/dist/utils/log.js +6 -2
  356. package/dist/utils/log.js.map +2 -2
  357. package/dist/utils/markdown.js +237 -19
  358. package/dist/utils/markdown.js.map +2 -2
  359. package/dist/utils/messageContextManager.js +18 -5
  360. package/dist/utils/messageContextManager.js.map +2 -2
  361. package/dist/utils/messageGroupManager.js +1 -1
  362. package/dist/utils/messageGroupManager.js.map +2 -2
  363. package/dist/utils/messages.js +104 -46
  364. package/dist/utils/messages.js.map +2 -2
  365. package/dist/utils/model.js +2 -2
  366. package/dist/utils/model.js.map +2 -2
  367. package/dist/utils/pasteCache.js +8 -4
  368. package/dist/utils/pasteCache.js.map +2 -2
  369. package/dist/utils/pluginLoader.js +18 -0
  370. package/dist/utils/pluginLoader.js.map +2 -2
  371. package/dist/utils/secureKeyStorage.js +36 -7
  372. package/dist/utils/secureKeyStorage.js.map +2 -2
  373. package/dist/utils/simpleMode.js +7 -0
  374. package/dist/utils/simpleMode.js.map +7 -0
  375. package/dist/utils/streamingState.js +11 -1
  376. package/dist/utils/streamingState.js.map +2 -2
  377. package/dist/utils/taskDisplayUtils.js +2 -1
  378. package/dist/utils/taskDisplayUtils.js.map +2 -2
  379. package/dist/utils/teamConfig.js +2 -2
  380. package/dist/utils/teamConfig.js.map +2 -2
  381. package/dist/utils/thinking.js +6 -2
  382. package/dist/utils/thinking.js.map +3 -3
  383. package/dist/utils/tokenProgress.js +55 -0
  384. package/dist/utils/tokenProgress.js.map +7 -0
  385. package/dist/utils/toolRiskClassification.js +26 -17
  386. package/dist/utils/toolRiskClassification.js.map +2 -2
  387. package/dist/utils/tooling/toolError.js +12 -0
  388. package/dist/utils/tooling/toolError.js.map +7 -0
  389. package/dist/version.js +2 -2
  390. package/dist/version.js.map +1 -1
  391. package/package.json +10 -8
@@ -0,0 +1,164 @@
1
+ import { Box, Text, useInput } from "ink";
2
+ import React, { useState } from "react";
3
+ import InkTextInput from "ink-text-input";
4
+ import { Select } from "../CustomSelect/select.js";
5
+ import { getTheme } from "../../utils/theme.js";
6
+ import { PermissionRequestTitle } from "./PermissionRequestTitle.js";
7
+ import { BRAND_GRADIENT, SEMANTIC_COLORS } from "../../constants/colors.js";
8
+ function PlanApprovalRequest({
9
+ toolUseConfirm,
10
+ onDone
11
+ }) {
12
+ const theme = getTheme();
13
+ const planContent = toolUseConfirm.input?.planContent || "No plan content available";
14
+ const [mode, setMode] = useState("select");
15
+ const [feedback, setFeedback] = useState("");
16
+ const [promptsInput, setPromptsInput] = useState("");
17
+ useInput(
18
+ (input, key) => {
19
+ if (key.ctrl && input === "c") {
20
+ onDone();
21
+ toolUseConfirm.onAbort();
22
+ return;
23
+ }
24
+ if (key.escape && (mode === "feedback" || mode === "prompts")) {
25
+ setMode("select");
26
+ setFeedback("");
27
+ setPromptsInput("");
28
+ }
29
+ },
30
+ { isActive: true }
31
+ );
32
+ if (mode === "prompts") {
33
+ return /* @__PURE__ */ React.createElement(
34
+ Box,
35
+ {
36
+ flexDirection: "column",
37
+ borderStyle: "round",
38
+ borderColor: theme.permission,
39
+ marginTop: 1,
40
+ paddingLeft: 1,
41
+ paddingRight: 1,
42
+ paddingBottom: 1
43
+ },
44
+ /* @__PURE__ */ React.createElement(PermissionRequestTitle, { title: "Permitted Commands", riskScore: null }),
45
+ /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.secondaryText }, "Enter comma-separated command patterns to auto-approve during plan execution:"), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Example: bun test, bun run typecheck, git *")),
46
+ /* @__PURE__ */ React.createElement(Box, { paddingX: 2 }, /* @__PURE__ */ React.createElement(Text, { color: BRAND_GRADIENT.START }, "> "), /* @__PURE__ */ React.createElement(
47
+ InkTextInput,
48
+ {
49
+ value: promptsInput,
50
+ onChange: setPromptsInput,
51
+ onSubmit: () => {
52
+ const trimmed = promptsInput.trim();
53
+ if (trimmed) {
54
+ const patterns = trimmed.split(",").map((p) => p.trim()).filter((p) => p.length > 0);
55
+ if (patterns.length > 0 && toolUseConfirm.onAllowWithPrompts) {
56
+ toolUseConfirm.onAllowWithPrompts(patterns);
57
+ onDone();
58
+ } else {
59
+ toolUseConfirm.onAllow("temporary");
60
+ onDone();
61
+ }
62
+ }
63
+ }
64
+ }
65
+ )),
66
+ /* @__PURE__ */ React.createElement(Box, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Enter to submit, Esc to go back"))
67
+ );
68
+ }
69
+ if (mode === "feedback") {
70
+ return /* @__PURE__ */ React.createElement(
71
+ Box,
72
+ {
73
+ flexDirection: "column",
74
+ borderStyle: "round",
75
+ borderColor: theme.permission,
76
+ marginTop: 1,
77
+ paddingLeft: 1,
78
+ paddingRight: 1,
79
+ paddingBottom: 1
80
+ },
81
+ /* @__PURE__ */ React.createElement(PermissionRequestTitle, { title: "Plan Feedback", riskScore: null }),
82
+ /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.secondaryText }, "Provide feedback for plan revision (Esc to go back):")),
83
+ /* @__PURE__ */ React.createElement(Box, { paddingX: 2 }, /* @__PURE__ */ React.createElement(Text, { color: BRAND_GRADIENT.START }, "> "), /* @__PURE__ */ React.createElement(
84
+ InkTextInput,
85
+ {
86
+ value: feedback,
87
+ onChange: setFeedback,
88
+ onSubmit: () => {
89
+ if (feedback.trim()) {
90
+ if (toolUseConfirm.onRejectWithFeedback) {
91
+ toolUseConfirm.onRejectWithFeedback(feedback.trim());
92
+ } else {
93
+ toolUseConfirm.onReject();
94
+ }
95
+ onDone();
96
+ }
97
+ }
98
+ }
99
+ )),
100
+ /* @__PURE__ */ React.createElement(Box, { paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Enter to submit, Esc to go back"))
101
+ );
102
+ }
103
+ const truncatedPlan = planContent.length > 500 ? planContent.substring(0, 500) + "..." : planContent;
104
+ return /* @__PURE__ */ React.createElement(
105
+ Box,
106
+ {
107
+ flexDirection: "column",
108
+ borderStyle: "round",
109
+ borderColor: theme.permission,
110
+ marginTop: 1,
111
+ paddingLeft: 1,
112
+ paddingRight: 1,
113
+ paddingBottom: 1
114
+ },
115
+ /* @__PURE__ */ React.createElement(PermissionRequestTitle, { title: "Plan Approval", riskScore: null }),
116
+ /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true }, "Review plan:"), /* @__PURE__ */ React.createElement(
117
+ Box,
118
+ {
119
+ borderStyle: "round",
120
+ borderColor: "cyan",
121
+ borderDimColor: true,
122
+ paddingX: 1,
123
+ marginY: 1
124
+ },
125
+ /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, truncatedPlan)
126
+ )),
127
+ /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, null, "Choose an action:"), /* @__PURE__ */ React.createElement(
128
+ Select,
129
+ {
130
+ options: [
131
+ { label: "Approve plan", value: "approve" },
132
+ {
133
+ label: "Approve with permitted commands",
134
+ value: "approve-prompts"
135
+ },
136
+ { label: "Reject with feedback", value: "reject-feedback" },
137
+ { label: "Cancel (esc)", value: "cancel" }
138
+ ],
139
+ onChange: (value) => {
140
+ switch (value) {
141
+ case "approve":
142
+ toolUseConfirm.onAllow("temporary");
143
+ onDone();
144
+ break;
145
+ case "approve-prompts":
146
+ setMode("prompts");
147
+ break;
148
+ case "reject-feedback":
149
+ setMode("feedback");
150
+ break;
151
+ case "cancel":
152
+ toolUseConfirm.onAbort();
153
+ onDone();
154
+ break;
155
+ }
156
+ }
157
+ }
158
+ ))
159
+ );
160
+ }
161
+ export {
162
+ PlanApprovalRequest
163
+ };
164
+ //# sourceMappingURL=PlanApprovalRequest.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/permissions/PlanApprovalRequest.tsx"],
4
+ "sourcesContent": ["import { Box, Text, useInput } from 'ink'\nimport React, { useState } from 'react'\nimport InkTextInput from 'ink-text-input'\nimport { Select } from '@components/CustomSelect/select'\nimport { getTheme } from '@utils/theme'\nimport { PermissionRequestTitle } from './PermissionRequestTitle'\nimport { type ToolUseConfirm } from './PermissionRequest'\nimport { BRAND_GRADIENT, SEMANTIC_COLORS } from '@constants/colors'\n\ntype Props = {\n toolUseConfirm: ToolUseConfirm\n onDone(): void\n verbose: boolean\n}\n\nexport function PlanApprovalRequest({\n toolUseConfirm,\n onDone,\n}: Props): React.ReactNode {\n const theme = getTheme()\n const planContent =\n (toolUseConfirm.input as any)?.planContent || 'No plan content available'\n const [mode, setMode] = useState<'select' | 'feedback' | 'prompts'>('select')\n const [feedback, setFeedback] = useState('')\n const [promptsInput, setPromptsInput] = useState('')\n\n // Handle Ctrl+C and Escape in both modes\n useInput(\n (input, key) => {\n if (key.ctrl && input === 'c') {\n onDone()\n toolUseConfirm.onAbort()\n return\n }\n if (key.escape && (mode === 'feedback' || mode === 'prompts')) {\n setMode('select')\n setFeedback('')\n setPromptsInput('')\n }\n },\n { isActive: true },\n )\n\n if (mode === 'prompts') {\n return (\n <Box\n flexDirection=\"column\"\n borderStyle=\"round\"\n borderColor={theme.permission}\n marginTop={1}\n paddingLeft={1}\n paddingRight={1}\n paddingBottom={1}\n >\n <PermissionRequestTitle title=\"Permitted Commands\" riskScore={null} />\n <Box flexDirection=\"column\" paddingX={2} paddingY={1}>\n <Text color={theme.secondaryText}>\n Enter comma-separated command patterns to auto-approve during plan\n execution:\n </Text>\n <Text color={SEMANTIC_COLORS.dim}>\n Example: bun test, bun run typecheck, git *\n </Text>\n </Box>\n <Box paddingX={2}>\n <Text color={BRAND_GRADIENT.START}>&gt; </Text>\n <InkTextInput\n value={promptsInput}\n onChange={setPromptsInput}\n onSubmit={() => {\n const trimmed = promptsInput.trim()\n if (trimmed) {\n const patterns = trimmed\n .split(',')\n .map(p => p.trim())\n .filter(p => p.length > 0)\n if (patterns.length > 0 && toolUseConfirm.onAllowWithPrompts) {\n toolUseConfirm.onAllowWithPrompts(patterns)\n onDone()\n } else {\n // Fallback: approve without specific patterns\n toolUseConfirm.onAllow('temporary')\n onDone()\n }\n }\n }}\n />\n </Box>\n <Box paddingX={2} marginTop={1}>\n <Text color={SEMANTIC_COLORS.dim}>\n Enter to submit, Esc to go back\n </Text>\n </Box>\n </Box>\n )\n }\n\n if (mode === 'feedback') {\n return (\n <Box\n flexDirection=\"column\"\n borderStyle=\"round\"\n borderColor={theme.permission}\n marginTop={1}\n paddingLeft={1}\n paddingRight={1}\n paddingBottom={1}\n >\n <PermissionRequestTitle title=\"Plan Feedback\" riskScore={null} />\n <Box flexDirection=\"column\" paddingX={2} paddingY={1}>\n <Text color={theme.secondaryText}>\n Provide feedback for plan revision (Esc to go back):\n </Text>\n </Box>\n <Box paddingX={2}>\n <Text color={BRAND_GRADIENT.START}>&gt; </Text>\n <InkTextInput\n value={feedback}\n onChange={setFeedback}\n onSubmit={() => {\n if (feedback.trim()) {\n if (toolUseConfirm.onRejectWithFeedback) {\n toolUseConfirm.onRejectWithFeedback(feedback.trim())\n } else {\n toolUseConfirm.onReject()\n }\n onDone()\n }\n }}\n />\n </Box>\n <Box paddingX={2} marginTop={1}>\n <Text color={SEMANTIC_COLORS.dim}>\n Enter to submit, Esc to go back\n </Text>\n </Box>\n </Box>\n )\n }\n\n // Truncate plan for display (first 500 chars)\n const truncatedPlan =\n planContent.length > 500\n ? planContent.substring(0, 500) + '...'\n : planContent\n\n return (\n <Box\n flexDirection=\"column\"\n borderStyle=\"round\"\n borderColor={theme.permission}\n marginTop={1}\n paddingLeft={1}\n paddingRight={1}\n paddingBottom={1}\n >\n <PermissionRequestTitle title=\"Plan Approval\" riskScore={null} />\n <Box flexDirection=\"column\" paddingX={2} paddingY={1}>\n <Text bold>Review plan:</Text>\n <Box\n borderStyle=\"round\"\n borderColor=\"cyan\"\n borderDimColor\n paddingX={1}\n marginY={1}\n >\n <Text color={SEMANTIC_COLORS.dim}>{truncatedPlan}</Text>\n </Box>\n </Box>\n <Box flexDirection=\"column\">\n <Text>Choose an action:</Text>\n <Select\n options={[\n { label: 'Approve plan', value: 'approve' },\n {\n label: 'Approve with permitted commands',\n value: 'approve-prompts',\n },\n { label: 'Reject with feedback', value: 'reject-feedback' },\n { label: 'Cancel (esc)', value: 'cancel' },\n ]}\n onChange={value => {\n switch (value) {\n case 'approve':\n toolUseConfirm.onAllow('temporary')\n onDone()\n break\n case 'approve-prompts':\n setMode('prompts')\n break\n case 'reject-feedback':\n setMode('feedback')\n break\n case 'cancel':\n toolUseConfirm.onAbort()\n onDone()\n break\n }\n }}\n />\n </Box>\n </Box>\n )\n}\n"],
5
+ "mappings": "AAAA,SAAS,KAAK,MAAM,gBAAgB;AACpC,OAAO,SAAS,gBAAgB;AAChC,OAAO,kBAAkB;AACzB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,8BAA8B;AAEvC,SAAS,gBAAgB,uBAAuB;AAQzC,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AACF,GAA2B;AACzB,QAAM,QAAQ,SAAS;AACvB,QAAM,cACH,eAAe,OAAe,eAAe;AAChD,QAAM,CAAC,MAAM,OAAO,IAAI,SAA4C,QAAQ;AAC5E,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAC3C,QAAM,CAAC,cAAc,eAAe,IAAI,SAAS,EAAE;AAGnD;AAAA,IACE,CAAC,OAAO,QAAQ;AACd,UAAI,IAAI,QAAQ,UAAU,KAAK;AAC7B,eAAO;AACP,uBAAe,QAAQ;AACvB;AAAA,MACF;AACA,UAAI,IAAI,WAAW,SAAS,cAAc,SAAS,YAAY;AAC7D,gBAAQ,QAAQ;AAChB,oBAAY,EAAE;AACd,wBAAgB,EAAE;AAAA,MACpB;AAAA,IACF;AAAA,IACA,EAAE,UAAU,KAAK;AAAA,EACnB;AAEA,MAAI,SAAS,WAAW;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAc;AAAA,QACd,aAAY;AAAA,QACZ,aAAa,MAAM;AAAA,QACnB,WAAW;AAAA,QACX,aAAa;AAAA,QACb,cAAc;AAAA,QACd,eAAe;AAAA;AAAA,MAEf,oCAAC,0BAAuB,OAAM,sBAAqB,WAAW,MAAM;AAAA,MACpE,oCAAC,OAAI,eAAc,UAAS,UAAU,GAAG,UAAU,KACjD,oCAAC,QAAK,OAAO,MAAM,iBAAe,+EAGlC,GACA,oCAAC,QAAK,OAAO,gBAAgB,OAAK,6CAElC,CACF;AAAA,MACA,oCAAC,OAAI,UAAU,KACb,oCAAC,QAAK,OAAO,eAAe,SAAO,IAAK,GACxC;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,UACP,UAAU;AAAA,UACV,UAAU,MAAM;AACd,kBAAM,UAAU,aAAa,KAAK;AAClC,gBAAI,SAAS;AACX,oBAAM,WAAW,QACd,MAAM,GAAG,EACT,IAAI,OAAK,EAAE,KAAK,CAAC,EACjB,OAAO,OAAK,EAAE,SAAS,CAAC;AAC3B,kBAAI,SAAS,SAAS,KAAK,eAAe,oBAAoB;AAC5D,+BAAe,mBAAmB,QAAQ;AAC1C,uBAAO;AAAA,cACT,OAAO;AAEL,+BAAe,QAAQ,WAAW;AAClC,uBAAO;AAAA,cACT;AAAA,YACF;AAAA,UACF;AAAA;AAAA,MACF,CACF;AAAA,MACA,oCAAC,OAAI,UAAU,GAAG,WAAW,KAC3B,oCAAC,QAAK,OAAO,gBAAgB,OAAK,iCAElC,CACF;AAAA,IACF;AAAA,EAEJ;AAEA,MAAI,SAAS,YAAY;AACvB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAc;AAAA,QACd,aAAY;AAAA,QACZ,aAAa,MAAM;AAAA,QACnB,WAAW;AAAA,QACX,aAAa;AAAA,QACb,cAAc;AAAA,QACd,eAAe;AAAA;AAAA,MAEf,oCAAC,0BAAuB,OAAM,iBAAgB,WAAW,MAAM;AAAA,MAC/D,oCAAC,OAAI,eAAc,UAAS,UAAU,GAAG,UAAU,KACjD,oCAAC,QAAK,OAAO,MAAM,iBAAe,sDAElC,CACF;AAAA,MACA,oCAAC,OAAI,UAAU,KACb,oCAAC,QAAK,OAAO,eAAe,SAAO,IAAK,GACxC;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,UACP,UAAU;AAAA,UACV,UAAU,MAAM;AACd,gBAAI,SAAS,KAAK,GAAG;AACnB,kBAAI,eAAe,sBAAsB;AACvC,+BAAe,qBAAqB,SAAS,KAAK,CAAC;AAAA,cACrD,OAAO;AACL,+BAAe,SAAS;AAAA,cAC1B;AACA,qBAAO;AAAA,YACT;AAAA,UACF;AAAA;AAAA,MACF,CACF;AAAA,MACA,oCAAC,OAAI,UAAU,GAAG,WAAW,KAC3B,oCAAC,QAAK,OAAO,gBAAgB,OAAK,iCAElC,CACF;AAAA,IACF;AAAA,EAEJ;AAGA,QAAM,gBACJ,YAAY,SAAS,MACjB,YAAY,UAAU,GAAG,GAAG,IAAI,QAChC;AAEN,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAc;AAAA,MACd,aAAY;AAAA,MACZ,aAAa,MAAM;AAAA,MACnB,WAAW;AAAA,MACX,aAAa;AAAA,MACb,cAAc;AAAA,MACd,eAAe;AAAA;AAAA,IAEf,oCAAC,0BAAuB,OAAM,iBAAgB,WAAW,MAAM;AAAA,IAC/D,oCAAC,OAAI,eAAc,UAAS,UAAU,GAAG,UAAU,KACjD,oCAAC,QAAK,MAAI,QAAC,cAAY,GACvB;AAAA,MAAC;AAAA;AAAA,QACC,aAAY;AAAA,QACZ,aAAY;AAAA,QACZ,gBAAc;AAAA,QACd,UAAU;AAAA,QACV,SAAS;AAAA;AAAA,MAET,oCAAC,QAAK,OAAO,gBAAgB,OAAM,aAAc;AAAA,IACnD,CACF;AAAA,IACA,oCAAC,OAAI,eAAc,YACjB,oCAAC,YAAK,mBAAiB,GACvB;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,UACP,EAAE,OAAO,gBAAgB,OAAO,UAAU;AAAA,UAC1C;AAAA,YACE,OAAO;AAAA,YACP,OAAO;AAAA,UACT;AAAA,UACA,EAAE,OAAO,wBAAwB,OAAO,kBAAkB;AAAA,UAC1D,EAAE,OAAO,gBAAgB,OAAO,SAAS;AAAA,QAC3C;AAAA,QACA,UAAU,WAAS;AACjB,kBAAQ,OAAO;AAAA,YACb,KAAK;AACH,6BAAe,QAAQ,WAAW;AAClC,qBAAO;AACP;AAAA,YACF,KAAK;AACH,sBAAQ,SAAS;AACjB;AAAA,YACF,KAAK;AACH,sBAAQ,UAAU;AAClB;AAAA,YACF,KAAK;AACH,6BAAe,QAAQ;AACvB,qBAAO;AACP;AAAA,UACJ;AAAA,QACF;AAAA;AAAA,IACF,CACF;AAAA,EACF;AAEJ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ const TEAMMATE_COLORS = [
2
+ "cyan",
3
+ "magenta",
4
+ "yellow",
5
+ "green",
6
+ "blue",
7
+ "red",
8
+ "white"
9
+ ];
10
+ function getTeammateColor(index) {
11
+ return TEAMMATE_COLORS[index % TEAMMATE_COLORS.length];
12
+ }
13
+ export {
14
+ TEAMMATE_COLORS,
15
+ getTeammateColor
16
+ };
17
+ //# sourceMappingURL=agentTeams.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/constants/agentTeams.ts"],
4
+ "sourcesContent": ["/**\n * Shared constants for Agent Teams\n */\n\n/**\n * Teammate colors for UI differentiation.\n * Used by both TaskTool (in-process registration) and teammateSpawner.\n */\nexport const TEAMMATE_COLORS = [\n 'cyan',\n 'magenta',\n 'yellow',\n 'green',\n 'blue',\n 'red',\n 'white',\n]\n\n/**\n * Get the color for a teammate by index (cycles through TEAMMATE_COLORS).\n */\nexport function getTeammateColor(index: number): string {\n return TEAMMATE_COLORS[index % TEAMMATE_COLORS.length]!\n}\n"],
5
+ "mappings": "AAQO,MAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKO,SAAS,iBAAiB,OAAuB;AACtD,SAAO,gBAAgB,QAAQ,gBAAgB,MAAM;AACvD;",
6
+ "names": []
7
+ }
@@ -3,7 +3,8 @@ const MACRO = {
3
3
  VERSION,
4
4
  README_URL: "https://minto.within-7.com/",
5
5
  PACKAGE_URL: "@within-7/minto",
6
- ISSUES_EXPLAINER: "report the issue to within-7 team"
6
+ ISSUES_EXPLAINER: "report the issue to within-7 team",
7
+ LOGIN_API_URL: "https://api.within-7.com/user/login"
7
8
  };
8
9
  export {
9
10
  MACRO
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/constants/macros.ts"],
4
- "sourcesContent": ["import { VERSION } from '../version.js'\n\nexport const MACRO = {\n VERSION: VERSION,\n README_URL: 'https://minto.within-7.com/',\n PACKAGE_URL: '@within-7/minto',\n ISSUES_EXPLAINER: 'report the issue to within-7 team',\n}\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAEjB,MAAM,QAAQ;AAAA,EACnB;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB;AACpB;",
4
+ "sourcesContent": ["import { VERSION } from '../version.js'\n\nexport const MACRO = {\n VERSION: VERSION,\n README_URL: 'https://minto.within-7.com/',\n PACKAGE_URL: '@within-7/minto',\n ISSUES_EXPLAINER: 'report the issue to within-7 team',\n LOGIN_API_URL: 'https://api.within-7.com/user/login',\n}\n"],
5
+ "mappings": "AAAA,SAAS,eAAe;AAEjB,MAAM,QAAQ;AAAA,EACnB;AAAA,EACA,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,eAAe;AACjB;",
6
6
  "names": []
7
7
  }
@@ -11,6 +11,7 @@ Your strengths:
11
11
  - Performing multi-step research tasks
12
12
 
13
13
  Guidelines:
14
+ - All operations should be scoped to the current working directory (project) unless explicitly instructed otherwise. When asked to find, search, or analyze files, always search within the project directory, not the entire filesystem.
14
15
  - For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.
15
16
  - For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
16
17
  - Be thorough: Check multiple locations, consider different naming conventions, look for related files.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/prompts/agentPrompt.ts"],
4
- "sourcesContent": ["import { PRODUCT_NAME } from '../product'\nimport { getEnvInfoPrompt } from './envInfo'\n\n/**\n * Enhanced agent prompt aligned with Claude Code's agent-prompt-task-tool.md\n * Provides detailed guidance for subagents including strengths, guidelines,\n * and behavioral rules.\n */\nexport async function getAgentPrompt(): Promise<string[]> {\n return [\n `You are an agent for ${PRODUCT_NAME}. Given the user's prompt, you should use the tools available to you to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup.\n\nYour strengths:\n- Searching for code, configurations, and patterns across large codebases\n- Analyzing multiple files to understand system architecture\n- Investigating complex questions that require exploring many files\n- Performing multi-step research tasks\n\nGuidelines:\n- For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.\n- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.\n- Be thorough: Check multiple locations, consider different naming conventions, look for related files.\n- NEVER create files unless they're absolutely necessary for achieving your goal.\n- NEVER proactively create documentation files (*.md) or README files.\n- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute.\n- Do not use a colon before tool calls. Your tool calls may not be shown directly in the output, so text like \"Let me read the file:\" followed by a read tool call should just be \"Let me read the file.\" with a period.\n- You should be concise, direct, and to the point, since your responses will be displayed on a command line interface.\n- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\n- Agent threads always have their cwd reset between bash calls, so use absolute paths always.`,\n `${await getEnvInfoPrompt()}`,\n ]\n}\n"],
5
- "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAOjC,eAAsB,iBAAoC;AACxD,SAAO;AAAA,IACL,wBAAwB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAmBpC,GAAG,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF;",
4
+ "sourcesContent": ["import { PRODUCT_NAME } from '../product'\nimport { getEnvInfoPrompt } from './envInfo'\n\n/**\n * Enhanced agent prompt aligned with Claude Code's agent-prompt-task-tool.md\n * Provides detailed guidance for subagents including strengths, guidelines,\n * and behavioral rules.\n */\nexport async function getAgentPrompt(): Promise<string[]> {\n return [\n `You are an agent for ${PRODUCT_NAME}. Given the user's prompt, you should use the tools available to you to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup.\n\nYour strengths:\n- Searching for code, configurations, and patterns across large codebases\n- Analyzing multiple files to understand system architecture\n- Investigating complex questions that require exploring many files\n- Performing multi-step research tasks\n\nGuidelines:\n- All operations should be scoped to the current working directory (project) unless explicitly instructed otherwise. When asked to find, search, or analyze files, always search within the project directory, not the entire filesystem.\n- For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.\n- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.\n- Be thorough: Check multiple locations, consider different naming conventions, look for related files.\n- NEVER create files unless they're absolutely necessary for achieving your goal.\n- NEVER proactively create documentation files (*.md) or README files.\n- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute.\n- Do not use a colon before tool calls. Your tool calls may not be shown directly in the output, so text like \"Let me read the file:\" followed by a read tool call should just be \"Let me read the file.\" with a period.\n- You should be concise, direct, and to the point, since your responses will be displayed on a command line interface.\n- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\n- Agent threads always have their cwd reset between bash calls, so use absolute paths always.`,\n `${await getEnvInfoPrompt()}`,\n ]\n}\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AAOjC,eAAsB,iBAAoC;AACxD,SAAO;AAAA,IACL,wBAAwB,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAoBpC,GAAG,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,39 @@
1
+ import { getAutoMemoryDir } from "../../utils/autoMemoryPaths.js";
2
+ function getAutoMemoryPrompt() {
3
+ const memoryDir = getAutoMemoryDir();
4
+ return `# auto memory
5
+
6
+ You have a persistent auto memory directory at \`${memoryDir}\`. Its contents persist across conversations.
7
+
8
+ As you work, consult your memory files to build on previous experience.
9
+
10
+ ## How to save memories:
11
+ - Organize memory semantically by topic, not chronologically
12
+ - Use the Write and Edit tools to update your memory files
13
+ - \`MEMORY.md\` is always loaded into your conversation context \u2014 lines after 200 will be truncated, so keep it concise
14
+ - Create separate topic files (e.g., \`debugging.md\`, \`patterns.md\`) for detailed notes and link to them from MEMORY.md
15
+ - Update or remove memories that turn out to be wrong or outdated
16
+ - Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one.
17
+
18
+ ## What to save:
19
+ - Stable patterns and conventions confirmed across multiple interactions
20
+ - Key architectural decisions, important file paths, and project structure
21
+ - User preferences for workflow, tools, and communication style
22
+ - Solutions to recurring problems and debugging insights
23
+
24
+ ## What NOT to save:
25
+ - Session-specific context (current task details, in-progress work, temporary state)
26
+ - Information that might be incomplete \u2014 verify against project docs before writing
27
+ - Anything that duplicates or contradicts existing CLAUDE.md instructions
28
+ - Speculative or unverified conclusions from reading a single file
29
+
30
+ ## Explicit user requests:
31
+ - When the user asks you to remember something across sessions (e.g., "always use bun", "never auto-commit"), save it \u2014 no need to wait for multiple interactions
32
+ - When the user asks to forget or stop remembering something, find and remove the relevant entries from your memory files
33
+ - When the user corrects you on something you stated from memory, you MUST update or remove the incorrect entry. A correction means the stored memory is wrong \u2014 fix it at the source before continuing, so the same mistake does not repeat in future conversations.
34
+ `;
35
+ }
36
+ export {
37
+ getAutoMemoryPrompt
38
+ };
39
+ //# sourceMappingURL=autoMemory.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/constants/prompts/autoMemory.ts"],
4
+ "sourcesContent": ["/**\n * Auto Memory system prompt block.\n *\n * CC-compatible implementation: instructs the LLM to manage its own\n * persistent memory files using standard Read/Write/Edit tools.\n *\n * Memory directory: ~/.minto/projects/<project-slug>/memory/\n * Index file: MEMORY.md (first 200 lines loaded into every session)\n * Topic files: e.g. debugging.md, patterns.md (linked from MEMORY.md)\n */\n\nimport { getAutoMemoryDir } from '@utils/autoMemoryPaths'\n\nexport function getAutoMemoryPrompt(): string {\n const memoryDir = getAutoMemoryDir()\n\n return `# auto memory\n\nYou have a persistent auto memory directory at \\`${memoryDir}\\`. Its contents persist across conversations.\n\nAs you work, consult your memory files to build on previous experience.\n\n## How to save memories:\n- Organize memory semantically by topic, not chronologically\n- Use the Write and Edit tools to update your memory files\n- \\`MEMORY.md\\` is always loaded into your conversation context \u2014 lines after 200 will be truncated, so keep it concise\n- Create separate topic files (e.g., \\`debugging.md\\`, \\`patterns.md\\`) for detailed notes and link to them from MEMORY.md\n- Update or remove memories that turn out to be wrong or outdated\n- Do not write duplicate memories. First check if there is an existing memory you can update before writing a new one.\n\n## What to save:\n- Stable patterns and conventions confirmed across multiple interactions\n- Key architectural decisions, important file paths, and project structure\n- User preferences for workflow, tools, and communication style\n- Solutions to recurring problems and debugging insights\n\n## What NOT to save:\n- Session-specific context (current task details, in-progress work, temporary state)\n- Information that might be incomplete \u2014 verify against project docs before writing\n- Anything that duplicates or contradicts existing CLAUDE.md instructions\n- Speculative or unverified conclusions from reading a single file\n\n## Explicit user requests:\n- When the user asks you to remember something across sessions (e.g., \"always use bun\", \"never auto-commit\"), save it \u2014 no need to wait for multiple interactions\n- When the user asks to forget or stop remembering something, find and remove the relevant entries from your memory files\n- When the user corrects you on something you stated from memory, you MUST update or remove the incorrect entry. A correction means the stored memory is wrong \u2014 fix it at the source before continuing, so the same mistake does not repeat in future conversations.\n`\n}\n"],
5
+ "mappings": "AAWA,SAAS,wBAAwB;AAE1B,SAAS,sBAA8B;AAC5C,QAAM,YAAY,iBAAiB;AAEnC,SAAO;AAAA;AAAA,mDAE0C,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6B5D;",
6
+ "names": []
7
+ }
@@ -7,19 +7,7 @@ When making changes to files, first understand the file's code conventions. Mimi
7
7
  - Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository.
8
8
 
9
9
  # Code style
10
- - Do not add comments to the code you write, unless the user asks you to, or the code is complex and requires additional context.
11
-
12
- # Code References
13
- When referencing specific functions or pieces of code, include the pattern \`file_path:line_number\` to allow the user to easily navigate to the source code location.
14
-
15
- # Git Safety Protocol
16
- - NEVER update the git config
17
- - NEVER run destructive git commands (push --force, reset --hard, checkout ., restore ., clean -f, branch -D) unless the user explicitly requests these actions
18
- - NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it
19
- - NEVER run force push to main/master, warn the user if they request it
20
- - CRITICAL: Always create NEW commits rather than amending, unless the user explicitly requests a git amend. When a pre-commit hook fails, the commit did NOT happen \u2014 so --amend would modify the PREVIOUS commit, which may result in destroying work or losing previous changes. Instead, after hook failure, fix the issue, re-stage, and create a NEW commit
21
- - When staging files, prefer adding specific files by name rather than using "git add -A" or "git add .", which can accidentally include sensitive files (.env, credentials) or large binaries
22
- - NEVER commit changes unless the user explicitly asks you to`;
10
+ - Do not add comments to the code you write, unless the user asks you to, or the code is complex and requires additional context.`;
23
11
  }
24
12
  export {
25
13
  getCodeConventionsPrompt
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/prompts/codeConventions.ts"],
4
- "sourcesContent": ["export function getCodeConventionsPrompt(): string {\n return `# Following conventions\nWhen making changes to files, first understand the file's code conventions. Mimic code style, use existing libraries and utilities, and follow existing patterns.\n- NEVER assume that a given library is available, even if it is well known. Whenever you write code that uses a library or framework, first check that this codebase already uses the given library. For example, you might look at neighboring files, or check the package.json (or cargo.toml, and so on depending on the language).\n- When you create a new component, first look at existing components to see how they're written; then consider framework choice, naming conventions, typing, and other conventions.\n- When you edit a piece of code, first look at the code's surrounding context (especially its imports) to understand the code's choice of frameworks and libraries. Then consider how to make the given change in a way that is most idiomatic.\n- Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository.\n\n# Code style\n- Do not add comments to the code you write, unless the user asks you to, or the code is complex and requires additional context.\n\n# Code References\nWhen referencing specific functions or pieces of code, include the pattern \\`file_path:line_number\\` to allow the user to easily navigate to the source code location.\n\n# Git Safety Protocol\n- NEVER update the git config\n- NEVER run destructive git commands (push --force, reset --hard, checkout ., restore ., clean -f, branch -D) unless the user explicitly requests these actions\n- NEVER skip hooks (--no-verify, --no-gpg-sign, etc) unless the user explicitly requests it\n- NEVER run force push to main/master, warn the user if they request it\n- CRITICAL: Always create NEW commits rather than amending, unless the user explicitly requests a git amend. When a pre-commit hook fails, the commit did NOT happen \u2014 so --amend would modify the PREVIOUS commit, which may result in destroying work or losing previous changes. Instead, after hook failure, fix the issue, re-stage, and create a NEW commit\n- When staging files, prefer adding specific files by name rather than using \"git add -A\" or \"git add .\", which can accidentally include sensitive files (.env, credentials) or large binaries\n- NEVER commit changes unless the user explicitly asks you to`\n}\n"],
5
- "mappings": "AAAO,SAAS,2BAAmC;AACjD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBT;",
4
+ "sourcesContent": ["export function getCodeConventionsPrompt(): string {\n return `# Following conventions\nWhen making changes to files, first understand the file's code conventions. Mimic code style, use existing libraries and utilities, and follow existing patterns.\n- NEVER assume that a given library is available, even if it is well known. Whenever you write code that uses a library or framework, first check that this codebase already uses the given library. For example, you might look at neighboring files, or check the package.json (or cargo.toml, and so on depending on the language).\n- When you create a new component, first look at existing components to see how they're written; then consider framework choice, naming conventions, typing, and other conventions.\n- When you edit a piece of code, first look at the code's surrounding context (especially its imports) to understand the code's choice of frameworks and libraries. Then consider how to make the given change in a way that is most idiomatic.\n- Always follow security best practices. Never introduce code that exposes or logs secrets and keys. Never commit secrets or keys to the repository.\n\n# Code style\n- Do not add comments to the code you write, unless the user asks you to, or the code is complex and requires additional context.`\n}\n"],
5
+ "mappings": "AAAO,SAAS,2BAAmC;AACjD,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAST;",
6
6
  "names": []
7
7
  }
@@ -1,13 +1,32 @@
1
1
  import { PROJECT_FILE } from "../product.js";
2
2
  function getDoingTasksPrompt() {
3
3
  return `# Doing tasks
4
- The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:
4
+ - The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change "methodName" to snake case, do not reply with just "method_name", instead find the method in the code and modify the code.
5
+ - You are highly capable and often allow users to complete ambitious tasks that would otherwise be too complex or take too long. You should defer to user judgement about whether a task is too large to attempt.
6
+ - In general, do not propose changes to code you haven't read. If a user asks about or wants you to modify a file, read it first. Understand existing code before suggesting modifications.
7
+ - Do not create files unless they're absolutely necessary for achieving your goal. Generally prefer editing an existing file to creating a new one, as this prevents file bloat and builds on existing work more effectively.
8
+ - Avoid giving time estimates or predictions for how long tasks will take, whether for your own work or for users planning projects. Focus on what needs to be done, not how long it might take.
9
+ - If your approach is blocked, do not attempt to brute force your way to the outcome. For example, if an API call or test fails, do not wait and retry the same action repeatedly. Instead, consider alternative approaches or other ways you might unblock yourself, or consider using the AskUserQuestion to align with the user on the right path forward.
10
+ - Be careful not to introduce security vulnerabilities such as command injection, XSS, SQL injection, and other OWASP top 10 vulnerabilities. If you notice that you wrote insecure code, immediately fix it. Prioritize writing safe, secure, and correct code.
11
+ - Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.
12
+ - Don't add features, refactor code, or make "improvements" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Don't add docstrings, comments, or type annotations to code you didn't change. Only add comments where the logic isn't self-evident.
13
+ - Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use feature flags or backwards-compatibility shims when you can just change the code.
14
+ - Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the minimum needed for the current task\u2014three similar lines of code is better than a premature abstraction.
15
+ - Avoid backwards-compatibility hacks like renaming unused _vars, re-exporting types, adding // removed comments for removed code, etc. If you are certain that something is unused, you can delete it completely.
16
+ For these tasks the following steps are recommended:
5
17
  - Use the TodoWrite tool to plan the task if required
6
18
  - Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.
7
19
  - Implement the solution using all tools available to you
8
20
  - Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.
9
21
  - VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to ${PROJECT_FILE} so that you will know to run it next time.
10
- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.`;
22
+ NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.
23
+
24
+ # Real-time user guidance
25
+ The user can inject guidance while you are working by typing messages during your response. These appear as \`<user-guidance>\` tags in the conversation. When you see a \`<user-guidance>\` message:
26
+ - You MUST acknowledge the guidance explicitly in your next response
27
+ - Adjust your current plan to follow the guidance immediately
28
+ - If the guidance conflicts with actions already completed, explain what was already done and offer to redo if needed
29
+ - Never silently ignore user guidance \u2014 the user is actively steering your behavior`;
11
30
  }
12
31
  export {
13
32
  getDoingTasksPrompt
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/prompts/doingTasks.ts"],
4
- "sourcesContent": ["import { PRODUCT_NAME, PROJECT_FILE } from '../product'\nimport { BashTool } from '@tools/BashTool/BashTool'\n\nexport function getDoingTasksPrompt(): string {\n return `# Doing tasks\nThe user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:\n- Use the TodoWrite tool to plan the task if required\n- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.\n- Implement the solution using all tools available to you\n- Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.\n- VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to ${PROJECT_FILE} so that you will know to run it next time.\nNEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.`\n}\n"],
5
- "mappings": "AAAA,SAAuB,oBAAoB;AAGpC,SAAS,sBAA8B;AAC5C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4VAMmV,YAAY;AAAA;AAExW;",
4
+ "sourcesContent": ["import { PRODUCT_NAME, PROJECT_FILE } from '../product'\nimport { BashTool } from '@tools/BashTool/BashTool'\n\nexport function getDoingTasksPrompt(): string {\n return `# Doing tasks\n - The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change \"methodName\" to snake case, do not reply with just \"method_name\", instead find the method in the code and modify the code.\n - You are highly capable and often allow users to complete ambitious tasks that would otherwise be too complex or take too long. You should defer to user judgement about whether a task is too large to attempt.\n - In general, do not propose changes to code you haven't read. If a user asks about or wants you to modify a file, read it first. Understand existing code before suggesting modifications.\n - Do not create files unless they're absolutely necessary for achieving your goal. Generally prefer editing an existing file to creating a new one, as this prevents file bloat and builds on existing work more effectively.\n - Avoid giving time estimates or predictions for how long tasks will take, whether for your own work or for users planning projects. Focus on what needs to be done, not how long it might take.\n - If your approach is blocked, do not attempt to brute force your way to the outcome. For example, if an API call or test fails, do not wait and retry the same action repeatedly. Instead, consider alternative approaches or other ways you might unblock yourself, or consider using the AskUserQuestion to align with the user on the right path forward.\n - Be careful not to introduce security vulnerabilities such as command injection, XSS, SQL injection, and other OWASP top 10 vulnerabilities. If you notice that you wrote insecure code, immediately fix it. Prioritize writing safe, secure, and correct code.\n - Avoid over-engineering. Only make changes that are directly requested or clearly necessary. Keep solutions simple and focused.\n - Don't add features, refactor code, or make \"improvements\" beyond what was asked. A bug fix doesn't need surrounding code cleaned up. A simple feature doesn't need extra configurability. Don't add docstrings, comments, or type annotations to code you didn't change. Only add comments where the logic isn't self-evident.\n - Don't add error handling, fallbacks, or validation for scenarios that can't happen. Trust internal code and framework guarantees. Only validate at system boundaries (user input, external APIs). Don't use feature flags or backwards-compatibility shims when you can just change the code.\n - Don't create helpers, utilities, or abstractions for one-time operations. Don't design for hypothetical future requirements. The right amount of complexity is the minimum needed for the current task\u2014three similar lines of code is better than a premature abstraction.\n - Avoid backwards-compatibility hacks like renaming unused _vars, re-exporting types, adding // removed comments for removed code, etc. If you are certain that something is unused, you can delete it completely.\nFor these tasks the following steps are recommended:\n- Use the TodoWrite tool to plan the task if required\n- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.\n- Implement the solution using all tools available to you\n- Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.\n- VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to ${PROJECT_FILE} so that you will know to run it next time.\nNEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.\n\n# Real-time user guidance\nThe user can inject guidance while you are working by typing messages during your response. These appear as \\`<user-guidance>\\` tags in the conversation. When you see a \\`<user-guidance>\\` message:\n - You MUST acknowledge the guidance explicitly in your next response\n - Adjust your current plan to follow the guidance immediately\n - If the guidance conflicts with actions already completed, explain what was already done and offer to redo if needed\n - Never silently ignore user guidance \u2014 the user is actively steering your behavior`\n}\n"],
5
+ "mappings": "AAAA,SAAuB,oBAAoB;AAGpC,SAAS,sBAA8B;AAC5C,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4VAkBmV,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASxW;",
6
6
  "names": []
7
7
  }
@@ -3,13 +3,12 @@ import { getIsGit } from "../../utils/git.js";
3
3
  import { getCwd } from "../../utils/state.js";
4
4
  async function getEnvInfoPrompt() {
5
5
  const isGit = await getIsGit();
6
- return `Here is useful information about the environment you are running in:
7
- <env>
8
- Working directory: ${getCwd()}
9
- Is directory a git repo: ${isGit ? "Yes" : "No"}
10
- Platform: ${env.platform}
11
- Today's date: ${(/* @__PURE__ */ new Date()).toLocaleDateString()}
12
- </env>`;
6
+ return `# Environment
7
+ You have been invoked in the following environment:
8
+ - Primary working directory: ${getCwd()}
9
+ - Is a git repository: ${isGit ? "Yes" : "No"}
10
+ - Platform: ${env.platform}
11
+ - Today's date: ${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}`;
13
12
  }
14
13
  export {
15
14
  getEnvInfoPrompt
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/prompts/envInfo.ts"],
4
- "sourcesContent": ["import { env } from '@utils/env'\nimport { getIsGit } from '@utils/git'\nimport { getCwd } from '@utils/state'\n\nexport async function getEnvInfoPrompt(): Promise<string> {\n const isGit = await getIsGit()\n return `Here is useful information about the environment you are running in:\n<env>\nWorking directory: ${getCwd()}\nIs directory a git repo: ${isGit ? 'Yes' : 'No'}\nPlatform: ${env.platform}\nToday's date: ${new Date().toLocaleDateString()}\n</env>`\n}\n"],
5
- "mappings": "AAAA,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AAEvB,eAAsB,mBAAoC;AACxD,QAAM,QAAQ,MAAM,SAAS;AAC7B,SAAO;AAAA;AAAA,qBAEY,OAAO,CAAC;AAAA,2BACF,QAAQ,QAAQ,IAAI;AAAA,YACnC,IAAI,QAAQ;AAAA,iBACR,oBAAI,KAAK,GAAE,mBAAmB,CAAC;AAAA;AAE/C;",
4
+ "sourcesContent": ["import { env } from '@utils/env'\nimport { getIsGit } from '@utils/git'\nimport { getCwd } from '@utils/state'\n\nexport async function getEnvInfoPrompt(): Promise<string> {\n const isGit = await getIsGit()\n return `# Environment\nYou have been invoked in the following environment:\n - Primary working directory: ${getCwd()}\n - Is a git repository: ${isGit ? 'Yes' : 'No'}\n - Platform: ${env.platform}\n - Today's date: ${new Date().toISOString().split('T')[0]}`\n}\n"],
5
+ "mappings": "AAAA,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AAEvB,eAAsB,mBAAoC;AACxD,QAAM,QAAQ,MAAM,SAAS;AAC7B,SAAO;AAAA;AAAA,gCAEuB,OAAO,CAAC;AAAA,2BACb,QAAQ,QAAQ,IAAI;AAAA,eAChC,IAAI,QAAQ;AAAA,oBACR,oBAAI,KAAK,GAAE,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC,CAAC;AACzD;",
6
6
  "names": []
7
7
  }
@@ -6,7 +6,10 @@ import { getToolUsagePolicyPrompt } from "./toolUsagePolicy.js";
6
6
  import { getTaskManagementPrompt } from "./taskManagement.js";
7
7
  import { getCodeConventionsPrompt } from "./codeConventions.js";
8
8
  import { getEnvInfoPrompt } from "./envInfo.js";
9
+ import { getAutoMemoryPrompt } from "./autoMemory.js";
9
10
  import { emitReminderEvent } from "../../services/systemReminder.js";
11
+ import { getTeamLeadOverlay, getTeammateOverlay } from "./teamOverlays.js";
12
+ import { isAutoMemoryEnabled } from "../../utils/autoMemoryPaths.js";
10
13
  import { getAgentPrompt } from "./agentPrompt.js";
11
14
  import { getEnvInfoPrompt as getEnvInfoPrompt2 } from "./envInfo.js";
12
15
  import { PRODUCT_NAME } from "../product.js";
@@ -35,7 +38,7 @@ ${styleDescriptions}`;
35
38
  return null;
36
39
  }
37
40
  }
38
- async function getSystemPrompt() {
41
+ async function getSystemPrompt(role) {
39
42
  const blocks = [];
40
43
  let keepCoding = true;
41
44
  try {
@@ -55,15 +58,34 @@ async function getSystemPrompt() {
55
58
  blocks.push(getDoingTasksPrompt());
56
59
  }
57
60
  blocks.push(getToolUsagePolicyPrompt());
61
+ if (keepCoding) {
62
+ blocks.push(
63
+ `# Output efficiency
64
+
65
+ IMPORTANT: Go straight to the point. Try the simplest approach first without going in circles. Do not overdo it. Be extra concise.
66
+
67
+ Keep your text output brief and direct. Lead with the answer or action, not the reasoning. Skip filler words, preamble, and unnecessary transitions. Do not restate what the user said \u2014 just do it. When explaining, include only what is necessary for the user to understand.
68
+
69
+ Focus text output on:
70
+ - Decisions that need the user's input
71
+ - High-level status updates at natural milestones
72
+ - Errors or blockers that change the plan
73
+
74
+ If you can say it in one sentence, don't use three. Prefer short, direct sentences over long explanations. This does not apply to code or tool calls.`
75
+ );
76
+ }
58
77
  const outputStyleBlock = await getOutputStylePrompt();
59
78
  if (outputStyleBlock) {
60
79
  blocks.push(outputStyleBlock);
61
80
  emitReminderEvent("output_style:active", { styleName: "active" });
62
81
  }
63
- if (keepCoding) {
64
- blocks.push(
65
- `You MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.`
66
- );
82
+ if (role === "team-lead") {
83
+ blocks.push(getTeamLeadOverlay());
84
+ } else if (role === "teammate") {
85
+ blocks.push(getTeammateOverlay());
86
+ }
87
+ if (isAutoMemoryEnabled()) {
88
+ blocks.push(getAutoMemoryPrompt());
67
89
  }
68
90
  blocks.push(`
69
91
  ${await getEnvInfoPrompt()}`);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/constants/prompts/index.ts"],
4
- "sourcesContent": ["/**\n * Modular system prompt assembly\n *\n * Each module is a self-contained prompt section that can be conditionally\n * included. The first few blocks are kept stable for cache hit optimization.\n */\n\nimport { getIdentityPrompt } from './identity'\nimport { getDoingTasksPrompt } from './doingTasks'\nimport { getExecutingWithCarePrompt } from './executingWithCare'\nimport { getToneAndStylePrompt } from './toneAndStyle'\nimport { getToolUsagePolicyPrompt } from './toolUsagePolicy'\nimport { getTaskManagementPrompt } from './taskManagement'\nimport { getCodeConventionsPrompt } from './codeConventions'\nimport { getEnvInfoPrompt } from './envInfo'\nimport { emitReminderEvent } from '@services/systemReminder'\n\n// Re-export submodules for direct access\nexport { getAgentPrompt } from './agentPrompt'\nexport { getEnvInfoPrompt as getEnvInfo } from './envInfo'\n\n// Re-export for backward compat with getCLISyspromptPrefix\nimport { PRODUCT_NAME } from '../product'\nexport function getCLISyspromptPrefix(): string {\n return `You are ${PRODUCT_NAME}, ShareAI-lab's Agent AI CLI for terminal & coding.`\n}\n\n/**\n * Get the output style prompt block if any output styles are active.\n * When active, modifies the assistant's behavior per the style definition.\n *\n * Uses dynamic import() to avoid circular dependency:\n * BashTool \u2192 claude.ts \u2192 prompts/index.ts \u2192 outputStyles.ts\n */\nasync function getOutputStylePrompt(): Promise<string | null> {\n try {\n const { getSelectedOutputStyle, loadAllOutputStyles } = await import(\n '@services/outputStyles'\n )\n\n // If a specific style is selected, only use that one\n const selected = getSelectedOutputStyle()\n if (selected && selected.content) {\n return `# Output Style\nYou have an active output style \"${selected.name}\" that modifies how you format responses. Follow these style instructions:\n${selected.content}`\n }\n\n // Fallback: check for any enabled styles from plugins\n const styles = loadAllOutputStyles()\n const activeStyles = styles.filter(\n s => s.config.enabled !== false && s.content && s.source !== 'builtin',\n )\n if (activeStyles.length === 0) return null\n\n const styleDescriptions = activeStyles\n .map(s => `- \"${s.name}\": ${s.content}`)\n .join('\\n')\n\n return `# Output Style\nYou have active output style(s) that modify how you format responses. Follow these style instructions:\n${styleDescriptions}`\n } catch {\n return null\n }\n}\n\n/**\n * Assembles the full system prompt from modular blocks.\n *\n * Block ordering matters for prompt caching:\n * - Static blocks (identity, safety) come first for maximum cache hits\n * - Dynamic blocks (env info, output style) come last\n *\n * When output style has keepCodingInstructions: false, coding-specific\n * blocks are omitted and only identity + tools + style + env are included.\n */\nexport async function getSystemPrompt(): Promise<string[]> {\n const blocks: string[] = []\n\n // Check if selected output style wants to skip coding instructions\n // Dynamic import to avoid circular dependency\n let keepCoding = true\n try {\n const { getSelectedOutputStyle } = await import('@services/outputStyles')\n const selectedStyle = getSelectedOutputStyle()\n keepCoding = selectedStyle?.config.keepCodingInstructions !== false\n } catch {\n // outputStyles not yet loaded, keep default behavior\n }\n\n // Core identity + security (always included, high cache value)\n blocks.push(getIdentityPrompt())\n\n if (keepCoding) {\n // Task management (stable)\n blocks.push(getTaskManagementPrompt())\n }\n\n // Tone and style (always included)\n blocks.push(getToneAndStylePrompt())\n\n // Executing with care - CRITICAL SAFETY MODULE (always included)\n blocks.push(getExecutingWithCarePrompt())\n\n if (keepCoding) {\n // Code conventions + Git safety (stable)\n blocks.push(getCodeConventionsPrompt())\n\n // Doing tasks (stable)\n blocks.push(getDoingTasksPrompt())\n }\n\n // Tool usage policy (always included)\n blocks.push(getToolUsagePolicyPrompt())\n\n // Conditional: Output Style (when plugins define styles or user selected one)\n const outputStyleBlock = await getOutputStylePrompt()\n if (outputStyleBlock) {\n blocks.push(outputStyleBlock)\n emitReminderEvent('output_style:active', { styleName: 'active' })\n }\n\n if (keepCoding) {\n // Conciseness reminder (final emphasis)\n blocks.push(\n `You MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.`,\n )\n }\n\n // Environment info (dynamic, last for cache reasons)\n blocks.push(`\\n${await getEnvInfoPrompt()}`)\n\n return blocks\n}\n"],
5
- "mappings": "AAOA,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AACpC,SAAS,kCAAkC;AAC3C,SAAS,6BAA6B;AACtC,SAAS,gCAAgC;AACzC,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAGlC,SAAS,sBAAsB;AAC/B,SAA6B,oBAApBA,yBAAsC;AAG/C,SAAS,oBAAoB;AACtB,SAAS,wBAAgC;AAC9C,SAAO,WAAW,YAAY;AAChC;AASA,eAAe,uBAA+C;AAC5D,MAAI;AACF,UAAM,EAAE,wBAAwB,oBAAoB,IAAI,MAAM,OAC5D,wBACF;AAGA,UAAM,WAAW,uBAAuB;AACxC,QAAI,YAAY,SAAS,SAAS;AAChC,aAAO;AAAA,mCACsB,SAAS,IAAI;AAAA,EAC9C,SAAS,OAAO;AAAA,IACd;AAGA,UAAM,SAAS,oBAAoB;AACnC,UAAM,eAAe,OAAO;AAAA,MAC1B,OAAK,EAAE,OAAO,YAAY,SAAS,EAAE,WAAW,EAAE,WAAW;AAAA,IAC/D;AACA,QAAI,aAAa,WAAW,EAAG,QAAO;AAEtC,UAAM,oBAAoB,aACvB,IAAI,OAAK,MAAM,EAAE,IAAI,MAAM,EAAE,OAAO,EAAE,EACtC,KAAK,IAAI;AAEZ,WAAO;AAAA;AAAA,EAET,iBAAiB;AAAA,EACjB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAYA,eAAsB,kBAAqC;AACzD,QAAM,SAAmB,CAAC;AAI1B,MAAI,aAAa;AACjB,MAAI;AACF,UAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,wBAAwB;AACxE,UAAM,gBAAgB,uBAAuB;AAC7C,iBAAa,eAAe,OAAO,2BAA2B;AAAA,EAChE,QAAQ;AAAA,EAER;AAGA,SAAO,KAAK,kBAAkB,CAAC;AAE/B,MAAI,YAAY;AAEd,WAAO,KAAK,wBAAwB,CAAC;AAAA,EACvC;AAGA,SAAO,KAAK,sBAAsB,CAAC;AAGnC,SAAO,KAAK,2BAA2B,CAAC;AAExC,MAAI,YAAY;AAEd,WAAO,KAAK,yBAAyB,CAAC;AAGtC,WAAO,KAAK,oBAAoB,CAAC;AAAA,EACnC;AAGA,SAAO,KAAK,yBAAyB,CAAC;AAGtC,QAAM,mBAAmB,MAAM,qBAAqB;AACpD,MAAI,kBAAkB;AACpB,WAAO,KAAK,gBAAgB;AAC5B,sBAAkB,uBAAuB,EAAE,WAAW,SAAS,CAAC;AAAA,EAClE;AAEA,MAAI,YAAY;AAEd,WAAO;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAGA,SAAO,KAAK;AAAA,EAAK,MAAM,iBAAiB,CAAC,EAAE;AAE3C,SAAO;AACT;",
4
+ "sourcesContent": ["/**\n * Modular system prompt assembly\n *\n * Each module is a self-contained prompt section that can be conditionally\n * included. The first few blocks are kept stable for cache hit optimization.\n */\n\nimport { getIdentityPrompt } from './identity'\nimport { getDoingTasksPrompt } from './doingTasks'\nimport { getExecutingWithCarePrompt } from './executingWithCare'\nimport { getToneAndStylePrompt } from './toneAndStyle'\nimport { getToolUsagePolicyPrompt } from './toolUsagePolicy'\nimport { getTaskManagementPrompt } from './taskManagement'\nimport { getCodeConventionsPrompt } from './codeConventions'\nimport { getEnvInfoPrompt } from './envInfo'\nimport { getAutoMemoryPrompt } from './autoMemory'\nimport { emitReminderEvent } from '@services/systemReminder'\nimport { getTeamLeadOverlay, getTeammateOverlay } from './teamOverlays'\nimport { isAutoMemoryEnabled } from '@utils/autoMemoryPaths'\nimport type { AgentRole } from '../../engine/types'\n\n// Re-export submodules for direct access\nexport { getAgentPrompt } from './agentPrompt'\nexport { getEnvInfoPrompt as getEnvInfo } from './envInfo'\n\n// Re-export for backward compat with getCLISyspromptPrefix\nimport { PRODUCT_NAME } from '../product'\nexport function getCLISyspromptPrefix(): string {\n return `You are ${PRODUCT_NAME}, ShareAI-lab's Agent AI CLI for terminal & coding.`\n}\n\n/**\n * Get the output style prompt block if any output styles are active.\n * When active, modifies the assistant's behavior per the style definition.\n *\n * Uses dynamic import() to avoid circular dependency:\n * BashTool \u2192 claude.ts \u2192 prompts/index.ts \u2192 outputStyles.ts\n */\nasync function getOutputStylePrompt(): Promise<string | null> {\n try {\n const { getSelectedOutputStyle, loadAllOutputStyles } = await import(\n '@services/outputStyles'\n )\n\n // If a specific style is selected, only use that one\n const selected = getSelectedOutputStyle()\n if (selected && selected.content) {\n return `# Output Style\nYou have an active output style \"${selected.name}\" that modifies how you format responses. Follow these style instructions:\n${selected.content}`\n }\n\n // Fallback: check for any enabled styles from plugins\n const styles = loadAllOutputStyles()\n const activeStyles = styles.filter(\n s => s.config.enabled !== false && s.content && s.source !== 'builtin',\n )\n if (activeStyles.length === 0) return null\n\n const styleDescriptions = activeStyles\n .map(s => `- \"${s.name}\": ${s.content}`)\n .join('\\n')\n\n return `# Output Style\nYou have active output style(s) that modify how you format responses. Follow these style instructions:\n${styleDescriptions}`\n } catch {\n return null\n }\n}\n\n/**\n * Assembles the full system prompt from modular blocks.\n *\n * Block ordering matters for prompt caching:\n * - Static blocks (identity, safety) come first for maximum cache hits\n * - Dynamic blocks (env info, output style) come last\n *\n * When output style has keepCodingInstructions: false, coding-specific\n * blocks are omitted and only identity + tools + style + env are included.\n */\nexport async function getSystemPrompt(role?: AgentRole): Promise<string[]> {\n const blocks: string[] = []\n\n // Check if selected output style wants to skip coding instructions\n // Dynamic import to avoid circular dependency\n let keepCoding = true\n try {\n const { getSelectedOutputStyle } = await import('@services/outputStyles')\n const selectedStyle = getSelectedOutputStyle()\n keepCoding = selectedStyle?.config.keepCodingInstructions !== false\n } catch {\n // outputStyles not yet loaded, keep default behavior\n }\n\n // Core identity + security (always included, high cache value)\n blocks.push(getIdentityPrompt())\n\n if (keepCoding) {\n // Task management (stable)\n blocks.push(getTaskManagementPrompt())\n }\n\n // Tone and style (always included)\n blocks.push(getToneAndStylePrompt())\n\n // Executing with care - CRITICAL SAFETY MODULE (always included)\n blocks.push(getExecutingWithCarePrompt())\n\n if (keepCoding) {\n // Code conventions + Git safety (stable)\n blocks.push(getCodeConventionsPrompt())\n\n // Doing tasks (stable)\n blocks.push(getDoingTasksPrompt())\n }\n\n // Tool usage policy (always included)\n blocks.push(getToolUsagePolicyPrompt())\n\n if (keepCoding) {\n // Conciseness reminder \u2014 placed before outputStyle for cache stability\n // (outputStyle is dynamic/conditional, conciseness is static)\n blocks.push(\n `# Output efficiency\n\nIMPORTANT: Go straight to the point. Try the simplest approach first without going in circles. Do not overdo it. Be extra concise.\n\nKeep your text output brief and direct. Lead with the answer or action, not the reasoning. Skip filler words, preamble, and unnecessary transitions. Do not restate what the user said \u2014 just do it. When explaining, include only what is necessary for the user to understand.\n\nFocus text output on:\n- Decisions that need the user's input\n- High-level status updates at natural milestones\n- Errors or blockers that change the plan\n\nIf you can say it in one sentence, don't use three. Prefer short, direct sentences over long explanations. This does not apply to code or tool calls.`,\n )\n }\n\n // Conditional: Output Style (when plugins define styles or user selected one)\n const outputStyleBlock = await getOutputStylePrompt()\n if (outputStyleBlock) {\n blocks.push(outputStyleBlock)\n emitReminderEvent('output_style:active', { styleName: 'active' })\n }\n\n // Role overlay \u2014 after outputStyle/conciseness, before envInfo\n if (role === 'team-lead') {\n blocks.push(getTeamLeadOverlay())\n } else if (role === 'teammate') {\n blocks.push(getTeammateOverlay())\n }\n\n // Auto memory (CC-compatible LLM-driven persistent memory)\n if (isAutoMemoryEnabled()) {\n blocks.push(getAutoMemoryPrompt())\n }\n\n // Environment info (dynamic, last for cache reasons)\n blocks.push(`\\n${await getEnvInfoPrompt()}`)\n\n return blocks\n}\n"],
5
+ "mappings": "AAOA,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AACpC,SAAS,kCAAkC;AAC3C,SAAS,6BAA6B;AACtC,SAAS,gCAAgC;AACzC,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAClC,SAAS,oBAAoB,0BAA0B;AACvD,SAAS,2BAA2B;AAIpC,SAAS,sBAAsB;AAC/B,SAA6B,oBAApBA,yBAAsC;AAG/C,SAAS,oBAAoB;AACtB,SAAS,wBAAgC;AAC9C,SAAO,WAAW,YAAY;AAChC;AASA,eAAe,uBAA+C;AAC5D,MAAI;AACF,UAAM,EAAE,wBAAwB,oBAAoB,IAAI,MAAM,OAC5D,wBACF;AAGA,UAAM,WAAW,uBAAuB;AACxC,QAAI,YAAY,SAAS,SAAS;AAChC,aAAO;AAAA,mCACsB,SAAS,IAAI;AAAA,EAC9C,SAAS,OAAO;AAAA,IACd;AAGA,UAAM,SAAS,oBAAoB;AACnC,UAAM,eAAe,OAAO;AAAA,MAC1B,OAAK,EAAE,OAAO,YAAY,SAAS,EAAE,WAAW,EAAE,WAAW;AAAA,IAC/D;AACA,QAAI,aAAa,WAAW,EAAG,QAAO;AAEtC,UAAM,oBAAoB,aACvB,IAAI,OAAK,MAAM,EAAE,IAAI,MAAM,EAAE,OAAO,EAAE,EACtC,KAAK,IAAI;AAEZ,WAAO;AAAA;AAAA,EAET,iBAAiB;AAAA,EACjB,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAYA,eAAsB,gBAAgB,MAAqC;AACzE,QAAM,SAAmB,CAAC;AAI1B,MAAI,aAAa;AACjB,MAAI;AACF,UAAM,EAAE,uBAAuB,IAAI,MAAM,OAAO,wBAAwB;AACxE,UAAM,gBAAgB,uBAAuB;AAC7C,iBAAa,eAAe,OAAO,2BAA2B;AAAA,EAChE,QAAQ;AAAA,EAER;AAGA,SAAO,KAAK,kBAAkB,CAAC;AAE/B,MAAI,YAAY;AAEd,WAAO,KAAK,wBAAwB,CAAC;AAAA,EACvC;AAGA,SAAO,KAAK,sBAAsB,CAAC;AAGnC,SAAO,KAAK,2BAA2B,CAAC;AAExC,MAAI,YAAY;AAEd,WAAO,KAAK,yBAAyB,CAAC;AAGtC,WAAO,KAAK,oBAAoB,CAAC;AAAA,EACnC;AAGA,SAAO,KAAK,yBAAyB,CAAC;AAEtC,MAAI,YAAY;AAGd,WAAO;AAAA,MACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYF;AAAA,EACF;AAGA,QAAM,mBAAmB,MAAM,qBAAqB;AACpD,MAAI,kBAAkB;AACpB,WAAO,KAAK,gBAAgB;AAC5B,sBAAkB,uBAAuB,EAAE,WAAW,SAAS,CAAC;AAAA,EAClE;AAGA,MAAI,SAAS,aAAa;AACxB,WAAO,KAAK,mBAAmB,CAAC;AAAA,EAClC,WAAW,SAAS,YAAY;AAC9B,WAAO,KAAK,mBAAmB,CAAC;AAAA,EAClC;AAGA,MAAI,oBAAoB,GAAG;AACzB,WAAO,KAAK,oBAAoB,CAAC;AAAA,EACnC;AAGA,SAAO,KAAK;AAAA,EAAK,MAAM,iBAAiB,CAAC,EAAE;AAE3C,SAAO;AACT;",
6
6
  "names": ["getEnvInfoPrompt"]
7
7
  }