cc-viewer 1.7.22 → 1.8.0

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 (939) hide show
  1. package/README.md +19 -0
  2. package/cli.js +92 -11
  3. package/concepts/ar/GlobalSettings.md +2 -2
  4. package/concepts/ar/Tool-Artifact.md +7 -0
  5. package/concepts/ar/Tool-EndConversation.md +35 -0
  6. package/concepts/ar/Tool-LSP.md +6 -1
  7. package/concepts/ar/Tool-ListAgents.md +35 -0
  8. package/concepts/ar/Tool-ListConnectors.md +34 -0
  9. package/concepts/ar/Tool-ListMcpResources.md +35 -0
  10. package/concepts/ar/Tool-ListPlugins.md +35 -0
  11. package/concepts/ar/Tool-ListSkills.md +37 -0
  12. package/concepts/ar/Tool-Monitor.md +7 -0
  13. package/concepts/ar/Tool-Projects.md +46 -0
  14. package/concepts/ar/Tool-ProposeGoal.md +43 -0
  15. package/concepts/ar/Tool-PushNotification.md +6 -0
  16. package/concepts/ar/Tool-REPL.md +47 -0
  17. package/concepts/ar/Tool-ReadMcpResource.md +32 -0
  18. package/concepts/ar/Tool-ReadMcpResourceDir.md +32 -0
  19. package/concepts/ar/Tool-ReadNotifications.md +27 -0
  20. package/concepts/ar/Tool-RemoteTrigger.md +7 -0
  21. package/concepts/ar/Tool-ScheduleWakeup.md +5 -0
  22. package/concepts/ar/Tool-SearchMcpRegistry.md +31 -0
  23. package/concepts/ar/Tool-SendFeedback.md +38 -0
  24. package/concepts/ar/Tool-SendFile.md +36 -0
  25. package/concepts/ar/Tool-SendMessage.md +5 -0
  26. package/concepts/ar/Tool-SendUserFile.md +38 -0
  27. package/concepts/ar/Tool-SendUserMessage.md +38 -0
  28. package/concepts/ar/Tool-SuggestConnectors.md +28 -0
  29. package/concepts/ar/Tool-SuggestPluginInstall.md +39 -0
  30. package/concepts/ar/Tool-SuggestSkills.md +33 -0
  31. package/concepts/ar/Tool-TaskCreate.md +6 -0
  32. package/concepts/ar/Tool-TaskGet.md +6 -0
  33. package/concepts/ar/Tool-TaskList.md +6 -0
  34. package/concepts/ar/Tool-TaskUpdate.md +6 -0
  35. package/concepts/ar/Tool-TodoWrite.md +43 -0
  36. package/concepts/ar/Tool-ToolSearch.md +5 -0
  37. package/concepts/ar/Tool-WebSearch.md +6 -0
  38. package/concepts/ar/Tools.md +26 -4
  39. package/concepts/da/GlobalSettings.md +2 -2
  40. package/concepts/da/Tool-Artifact.md +8 -1
  41. package/concepts/da/Tool-EndConversation.md +35 -0
  42. package/concepts/da/Tool-LSP.md +6 -1
  43. package/concepts/da/Tool-ListAgents.md +35 -0
  44. package/concepts/da/Tool-ListConnectors.md +34 -0
  45. package/concepts/da/Tool-ListMcpResources.md +35 -0
  46. package/concepts/da/Tool-ListPlugins.md +35 -0
  47. package/concepts/da/Tool-ListSkills.md +37 -0
  48. package/concepts/da/Tool-Monitor.md +7 -0
  49. package/concepts/da/Tool-Projects.md +46 -0
  50. package/concepts/da/Tool-ProposeGoal.md +43 -0
  51. package/concepts/da/Tool-PushNotification.md +6 -0
  52. package/concepts/da/Tool-REPL.md +47 -0
  53. package/concepts/da/Tool-ReadMcpResource.md +32 -0
  54. package/concepts/da/Tool-ReadMcpResourceDir.md +32 -0
  55. package/concepts/da/Tool-ReadNotifications.md +27 -0
  56. package/concepts/da/Tool-RemoteTrigger.md +7 -0
  57. package/concepts/da/Tool-ScheduleWakeup.md +5 -0
  58. package/concepts/da/Tool-SearchMcpRegistry.md +31 -0
  59. package/concepts/da/Tool-SendFeedback.md +38 -0
  60. package/concepts/da/Tool-SendFile.md +36 -0
  61. package/concepts/da/Tool-SendMessage.md +5 -0
  62. package/concepts/da/Tool-SendUserFile.md +38 -0
  63. package/concepts/da/Tool-SendUserMessage.md +38 -0
  64. package/concepts/da/Tool-SuggestConnectors.md +28 -0
  65. package/concepts/da/Tool-SuggestPluginInstall.md +39 -0
  66. package/concepts/da/Tool-SuggestSkills.md +33 -0
  67. package/concepts/da/Tool-TaskCreate.md +6 -0
  68. package/concepts/da/Tool-TaskGet.md +6 -0
  69. package/concepts/da/Tool-TaskList.md +6 -0
  70. package/concepts/da/Tool-TaskUpdate.md +6 -0
  71. package/concepts/da/Tool-TodoWrite.md +43 -0
  72. package/concepts/da/Tool-ToolSearch.md +5 -0
  73. package/concepts/da/Tool-WebSearch.md +6 -0
  74. package/concepts/da/Tools.md +26 -4
  75. package/concepts/de/GlobalSettings.md +2 -2
  76. package/concepts/de/Tool-Artifact.md +7 -0
  77. package/concepts/de/Tool-EndConversation.md +35 -0
  78. package/concepts/de/Tool-LSP.md +6 -1
  79. package/concepts/de/Tool-ListAgents.md +35 -0
  80. package/concepts/de/Tool-ListConnectors.md +34 -0
  81. package/concepts/de/Tool-ListMcpResources.md +35 -0
  82. package/concepts/de/Tool-ListPlugins.md +35 -0
  83. package/concepts/de/Tool-ListSkills.md +37 -0
  84. package/concepts/de/Tool-Monitor.md +7 -0
  85. package/concepts/de/Tool-Projects.md +46 -0
  86. package/concepts/de/Tool-ProposeGoal.md +43 -0
  87. package/concepts/de/Tool-PushNotification.md +6 -0
  88. package/concepts/de/Tool-REPL.md +47 -0
  89. package/concepts/de/Tool-ReadMcpResource.md +32 -0
  90. package/concepts/de/Tool-ReadMcpResourceDir.md +32 -0
  91. package/concepts/de/Tool-ReadNotifications.md +27 -0
  92. package/concepts/de/Tool-RemoteTrigger.md +7 -0
  93. package/concepts/de/Tool-ScheduleWakeup.md +5 -0
  94. package/concepts/de/Tool-SearchMcpRegistry.md +30 -0
  95. package/concepts/de/Tool-SendFeedback.md +38 -0
  96. package/concepts/de/Tool-SendFile.md +36 -0
  97. package/concepts/de/Tool-SendMessage.md +5 -0
  98. package/concepts/de/Tool-SendUserFile.md +38 -0
  99. package/concepts/de/Tool-SendUserMessage.md +38 -0
  100. package/concepts/de/Tool-SuggestConnectors.md +28 -0
  101. package/concepts/de/Tool-SuggestPluginInstall.md +39 -0
  102. package/concepts/de/Tool-SuggestSkills.md +33 -0
  103. package/concepts/de/Tool-TaskCreate.md +6 -0
  104. package/concepts/de/Tool-TaskGet.md +6 -0
  105. package/concepts/de/Tool-TaskList.md +6 -0
  106. package/concepts/de/Tool-TaskUpdate.md +6 -0
  107. package/concepts/de/Tool-TodoWrite.md +43 -0
  108. package/concepts/de/Tool-ToolSearch.md +5 -0
  109. package/concepts/de/Tool-WebSearch.md +6 -0
  110. package/concepts/de/Tools.md +26 -4
  111. package/concepts/en/GlobalSettings.md +2 -2
  112. package/concepts/en/Tool-Artifact.md +7 -0
  113. package/concepts/en/Tool-EndConversation.md +35 -0
  114. package/concepts/en/Tool-LSP.md +5 -0
  115. package/concepts/en/Tool-ListAgents.md +35 -0
  116. package/concepts/en/Tool-ListConnectors.md +34 -0
  117. package/concepts/en/Tool-ListMcpResources.md +35 -0
  118. package/concepts/en/Tool-ListPlugins.md +35 -0
  119. package/concepts/en/Tool-ListSkills.md +37 -0
  120. package/concepts/en/Tool-Monitor.md +7 -0
  121. package/concepts/en/Tool-Projects.md +46 -0
  122. package/concepts/en/Tool-ProposeGoal.md +43 -0
  123. package/concepts/en/Tool-PushNotification.md +6 -0
  124. package/concepts/en/Tool-REPL.md +47 -0
  125. package/concepts/en/Tool-ReadMcpResource.md +32 -0
  126. package/concepts/en/Tool-ReadMcpResourceDir.md +32 -0
  127. package/concepts/en/Tool-ReadNotifications.md +27 -0
  128. package/concepts/en/Tool-RemoteTrigger.md +7 -0
  129. package/concepts/en/Tool-ScheduleWakeup.md +5 -0
  130. package/concepts/en/Tool-SearchMcpRegistry.md +31 -0
  131. package/concepts/en/Tool-SendFeedback.md +38 -0
  132. package/concepts/en/Tool-SendFile.md +36 -0
  133. package/concepts/en/Tool-SendMessage.md +5 -0
  134. package/concepts/en/Tool-SendUserFile.md +38 -0
  135. package/concepts/en/Tool-SendUserMessage.md +38 -0
  136. package/concepts/en/Tool-SuggestConnectors.md +28 -0
  137. package/concepts/en/Tool-SuggestPluginInstall.md +39 -0
  138. package/concepts/en/Tool-SuggestSkills.md +33 -0
  139. package/concepts/en/Tool-TaskCreate.md +6 -0
  140. package/concepts/en/Tool-TaskGet.md +6 -0
  141. package/concepts/en/Tool-TaskList.md +6 -0
  142. package/concepts/en/Tool-TaskUpdate.md +6 -0
  143. package/concepts/en/Tool-TodoWrite.md +43 -0
  144. package/concepts/en/Tool-ToolSearch.md +5 -0
  145. package/concepts/en/Tool-WebSearch.md +6 -0
  146. package/concepts/en/Tools.md +26 -4
  147. package/concepts/es/GlobalSettings.md +2 -2
  148. package/concepts/es/Tool-Artifact.md +7 -0
  149. package/concepts/es/Tool-EndConversation.md +35 -0
  150. package/concepts/es/Tool-LSP.md +5 -0
  151. package/concepts/es/Tool-ListAgents.md +35 -0
  152. package/concepts/es/Tool-ListConnectors.md +34 -0
  153. package/concepts/es/Tool-ListMcpResources.md +35 -0
  154. package/concepts/es/Tool-ListPlugins.md +35 -0
  155. package/concepts/es/Tool-ListSkills.md +37 -0
  156. package/concepts/es/Tool-Monitor.md +7 -0
  157. package/concepts/es/Tool-Projects.md +46 -0
  158. package/concepts/es/Tool-ProposeGoal.md +43 -0
  159. package/concepts/es/Tool-PushNotification.md +6 -0
  160. package/concepts/es/Tool-REPL.md +47 -0
  161. package/concepts/es/Tool-ReadMcpResource.md +32 -0
  162. package/concepts/es/Tool-ReadMcpResourceDir.md +32 -0
  163. package/concepts/es/Tool-ReadNotifications.md +27 -0
  164. package/concepts/es/Tool-RemoteTrigger.md +7 -0
  165. package/concepts/es/Tool-ScheduleWakeup.md +5 -0
  166. package/concepts/es/Tool-SearchMcpRegistry.md +31 -0
  167. package/concepts/es/Tool-SendFeedback.md +38 -0
  168. package/concepts/es/Tool-SendFile.md +36 -0
  169. package/concepts/es/Tool-SendMessage.md +5 -0
  170. package/concepts/es/Tool-SendUserFile.md +38 -0
  171. package/concepts/es/Tool-SendUserMessage.md +38 -0
  172. package/concepts/es/Tool-SuggestConnectors.md +28 -0
  173. package/concepts/es/Tool-SuggestPluginInstall.md +39 -0
  174. package/concepts/es/Tool-SuggestSkills.md +33 -0
  175. package/concepts/es/Tool-TaskCreate.md +6 -0
  176. package/concepts/es/Tool-TaskGet.md +6 -0
  177. package/concepts/es/Tool-TaskList.md +6 -0
  178. package/concepts/es/Tool-TaskUpdate.md +6 -0
  179. package/concepts/es/Tool-TodoWrite.md +43 -0
  180. package/concepts/es/Tool-ToolSearch.md +5 -0
  181. package/concepts/es/Tool-WebSearch.md +6 -0
  182. package/concepts/es/Tools.md +26 -4
  183. package/concepts/fr/GlobalSettings.md +2 -2
  184. package/concepts/fr/Tool-Artifact.md +7 -0
  185. package/concepts/fr/Tool-EndConversation.md +35 -0
  186. package/concepts/fr/Tool-LSP.md +5 -0
  187. package/concepts/fr/Tool-ListAgents.md +35 -0
  188. package/concepts/fr/Tool-ListConnectors.md +34 -0
  189. package/concepts/fr/Tool-ListMcpResources.md +35 -0
  190. package/concepts/fr/Tool-ListPlugins.md +35 -0
  191. package/concepts/fr/Tool-ListSkills.md +37 -0
  192. package/concepts/fr/Tool-Monitor.md +7 -0
  193. package/concepts/fr/Tool-Projects.md +46 -0
  194. package/concepts/fr/Tool-ProposeGoal.md +43 -0
  195. package/concepts/fr/Tool-PushNotification.md +6 -0
  196. package/concepts/fr/Tool-REPL.md +47 -0
  197. package/concepts/fr/Tool-ReadMcpResource.md +32 -0
  198. package/concepts/fr/Tool-ReadMcpResourceDir.md +32 -0
  199. package/concepts/fr/Tool-ReadNotifications.md +27 -0
  200. package/concepts/fr/Tool-RemoteTrigger.md +7 -0
  201. package/concepts/fr/Tool-ScheduleWakeup.md +5 -0
  202. package/concepts/fr/Tool-SearchMcpRegistry.md +31 -0
  203. package/concepts/fr/Tool-SendFeedback.md +38 -0
  204. package/concepts/fr/Tool-SendFile.md +36 -0
  205. package/concepts/fr/Tool-SendMessage.md +5 -0
  206. package/concepts/fr/Tool-SendUserFile.md +38 -0
  207. package/concepts/fr/Tool-SendUserMessage.md +38 -0
  208. package/concepts/fr/Tool-SuggestConnectors.md +28 -0
  209. package/concepts/fr/Tool-SuggestPluginInstall.md +39 -0
  210. package/concepts/fr/Tool-SuggestSkills.md +33 -0
  211. package/concepts/fr/Tool-TaskCreate.md +6 -0
  212. package/concepts/fr/Tool-TaskGet.md +6 -0
  213. package/concepts/fr/Tool-TaskList.md +6 -0
  214. package/concepts/fr/Tool-TaskUpdate.md +6 -0
  215. package/concepts/fr/Tool-TodoWrite.md +43 -0
  216. package/concepts/fr/Tool-ToolSearch.md +5 -0
  217. package/concepts/fr/Tool-WebSearch.md +6 -0
  218. package/concepts/fr/Tools.md +26 -4
  219. package/concepts/it/GlobalSettings.md +2 -2
  220. package/concepts/it/Tool-Artifact.md +7 -0
  221. package/concepts/it/Tool-EndConversation.md +35 -0
  222. package/concepts/it/Tool-LSP.md +5 -0
  223. package/concepts/it/Tool-ListAgents.md +35 -0
  224. package/concepts/it/Tool-ListConnectors.md +34 -0
  225. package/concepts/it/Tool-ListMcpResources.md +35 -0
  226. package/concepts/it/Tool-ListPlugins.md +35 -0
  227. package/concepts/it/Tool-ListSkills.md +37 -0
  228. package/concepts/it/Tool-Monitor.md +7 -0
  229. package/concepts/it/Tool-Projects.md +46 -0
  230. package/concepts/it/Tool-ProposeGoal.md +43 -0
  231. package/concepts/it/Tool-PushNotification.md +6 -0
  232. package/concepts/it/Tool-REPL.md +47 -0
  233. package/concepts/it/Tool-ReadMcpResource.md +32 -0
  234. package/concepts/it/Tool-ReadMcpResourceDir.md +32 -0
  235. package/concepts/it/Tool-ReadNotifications.md +27 -0
  236. package/concepts/it/Tool-RemoteTrigger.md +7 -0
  237. package/concepts/it/Tool-ScheduleWakeup.md +5 -0
  238. package/concepts/it/Tool-SearchMcpRegistry.md +31 -0
  239. package/concepts/it/Tool-SendFeedback.md +38 -0
  240. package/concepts/it/Tool-SendFile.md +36 -0
  241. package/concepts/it/Tool-SendMessage.md +5 -0
  242. package/concepts/it/Tool-SendUserFile.md +38 -0
  243. package/concepts/it/Tool-SendUserMessage.md +38 -0
  244. package/concepts/it/Tool-SuggestConnectors.md +28 -0
  245. package/concepts/it/Tool-SuggestPluginInstall.md +39 -0
  246. package/concepts/it/Tool-SuggestSkills.md +33 -0
  247. package/concepts/it/Tool-TaskCreate.md +6 -0
  248. package/concepts/it/Tool-TaskGet.md +6 -0
  249. package/concepts/it/Tool-TaskList.md +6 -0
  250. package/concepts/it/Tool-TaskUpdate.md +6 -0
  251. package/concepts/it/Tool-TodoWrite.md +43 -0
  252. package/concepts/it/Tool-ToolSearch.md +5 -0
  253. package/concepts/it/Tool-WebSearch.md +6 -0
  254. package/concepts/it/Tools.md +26 -4
  255. package/concepts/ja/GlobalSettings.md +2 -2
  256. package/concepts/ja/Tool-Artifact.md +7 -0
  257. package/concepts/ja/Tool-EndConversation.md +35 -0
  258. package/concepts/ja/Tool-LSP.md +5 -0
  259. package/concepts/ja/Tool-ListAgents.md +35 -0
  260. package/concepts/ja/Tool-ListConnectors.md +34 -0
  261. package/concepts/ja/Tool-ListMcpResources.md +35 -0
  262. package/concepts/ja/Tool-ListPlugins.md +35 -0
  263. package/concepts/ja/Tool-ListSkills.md +37 -0
  264. package/concepts/ja/Tool-Monitor.md +7 -0
  265. package/concepts/ja/Tool-Projects.md +46 -0
  266. package/concepts/ja/Tool-ProposeGoal.md +43 -0
  267. package/concepts/ja/Tool-PushNotification.md +6 -0
  268. package/concepts/ja/Tool-REPL.md +47 -0
  269. package/concepts/ja/Tool-ReadMcpResource.md +32 -0
  270. package/concepts/ja/Tool-ReadMcpResourceDir.md +32 -0
  271. package/concepts/ja/Tool-ReadNotifications.md +27 -0
  272. package/concepts/ja/Tool-RemoteTrigger.md +7 -0
  273. package/concepts/ja/Tool-ScheduleWakeup.md +5 -0
  274. package/concepts/ja/Tool-SearchMcpRegistry.md +31 -0
  275. package/concepts/ja/Tool-SendFeedback.md +38 -0
  276. package/concepts/ja/Tool-SendFile.md +36 -0
  277. package/concepts/ja/Tool-SendMessage.md +5 -0
  278. package/concepts/ja/Tool-SendUserFile.md +38 -0
  279. package/concepts/ja/Tool-SendUserMessage.md +38 -0
  280. package/concepts/ja/Tool-SuggestConnectors.md +28 -0
  281. package/concepts/ja/Tool-SuggestPluginInstall.md +39 -0
  282. package/concepts/ja/Tool-SuggestSkills.md +33 -0
  283. package/concepts/ja/Tool-TaskCreate.md +6 -0
  284. package/concepts/ja/Tool-TaskGet.md +6 -0
  285. package/concepts/ja/Tool-TaskList.md +6 -0
  286. package/concepts/ja/Tool-TaskUpdate.md +6 -0
  287. package/concepts/ja/Tool-TodoWrite.md +43 -0
  288. package/concepts/ja/Tool-ToolSearch.md +5 -0
  289. package/concepts/ja/Tool-WebSearch.md +6 -0
  290. package/concepts/ja/Tools.md +26 -4
  291. package/concepts/ko/GlobalSettings.md +2 -2
  292. package/concepts/ko/Tool-Artifact.md +7 -0
  293. package/concepts/ko/Tool-EndConversation.md +35 -0
  294. package/concepts/ko/Tool-LSP.md +5 -0
  295. package/concepts/ko/Tool-ListAgents.md +35 -0
  296. package/concepts/ko/Tool-ListConnectors.md +34 -0
  297. package/concepts/ko/Tool-ListMcpResources.md +35 -0
  298. package/concepts/ko/Tool-ListPlugins.md +35 -0
  299. package/concepts/ko/Tool-ListSkills.md +37 -0
  300. package/concepts/ko/Tool-Monitor.md +7 -0
  301. package/concepts/ko/Tool-Projects.md +46 -0
  302. package/concepts/ko/Tool-ProposeGoal.md +43 -0
  303. package/concepts/ko/Tool-PushNotification.md +6 -0
  304. package/concepts/ko/Tool-REPL.md +47 -0
  305. package/concepts/ko/Tool-ReadMcpResource.md +32 -0
  306. package/concepts/ko/Tool-ReadMcpResourceDir.md +32 -0
  307. package/concepts/ko/Tool-ReadNotifications.md +27 -0
  308. package/concepts/ko/Tool-RemoteTrigger.md +7 -0
  309. package/concepts/ko/Tool-ScheduleWakeup.md +5 -0
  310. package/concepts/ko/Tool-SearchMcpRegistry.md +31 -0
  311. package/concepts/ko/Tool-SendFeedback.md +38 -0
  312. package/concepts/ko/Tool-SendFile.md +36 -0
  313. package/concepts/ko/Tool-SendMessage.md +5 -0
  314. package/concepts/ko/Tool-SendUserFile.md +38 -0
  315. package/concepts/ko/Tool-SendUserMessage.md +38 -0
  316. package/concepts/ko/Tool-SuggestConnectors.md +28 -0
  317. package/concepts/ko/Tool-SuggestPluginInstall.md +39 -0
  318. package/concepts/ko/Tool-SuggestSkills.md +33 -0
  319. package/concepts/ko/Tool-TaskCreate.md +6 -0
  320. package/concepts/ko/Tool-TaskGet.md +6 -0
  321. package/concepts/ko/Tool-TaskList.md +6 -0
  322. package/concepts/ko/Tool-TaskUpdate.md +6 -0
  323. package/concepts/ko/Tool-TodoWrite.md +43 -0
  324. package/concepts/ko/Tool-ToolSearch.md +5 -0
  325. package/concepts/ko/Tool-WebSearch.md +6 -0
  326. package/concepts/ko/Tools.md +26 -4
  327. package/concepts/no/GlobalSettings.md +2 -2
  328. package/concepts/no/Tool-Artifact.md +7 -0
  329. package/concepts/no/Tool-EndConversation.md +35 -0
  330. package/concepts/no/Tool-LSP.md +7 -2
  331. package/concepts/no/Tool-ListAgents.md +35 -0
  332. package/concepts/no/Tool-ListConnectors.md +34 -0
  333. package/concepts/no/Tool-ListMcpResources.md +35 -0
  334. package/concepts/no/Tool-ListPlugins.md +35 -0
  335. package/concepts/no/Tool-ListSkills.md +37 -0
  336. package/concepts/no/Tool-Monitor.md +7 -0
  337. package/concepts/no/Tool-Projects.md +46 -0
  338. package/concepts/no/Tool-ProposeGoal.md +43 -0
  339. package/concepts/no/Tool-PushNotification.md +6 -0
  340. package/concepts/no/Tool-REPL.md +47 -0
  341. package/concepts/no/Tool-ReadMcpResource.md +32 -0
  342. package/concepts/no/Tool-ReadMcpResourceDir.md +32 -0
  343. package/concepts/no/Tool-ReadNotifications.md +27 -0
  344. package/concepts/no/Tool-RemoteTrigger.md +7 -0
  345. package/concepts/no/Tool-ScheduleWakeup.md +5 -0
  346. package/concepts/no/Tool-SearchMcpRegistry.md +31 -0
  347. package/concepts/no/Tool-SendFeedback.md +38 -0
  348. package/concepts/no/Tool-SendFile.md +36 -0
  349. package/concepts/no/Tool-SendMessage.md +5 -0
  350. package/concepts/no/Tool-SendUserFile.md +38 -0
  351. package/concepts/no/Tool-SendUserMessage.md +38 -0
  352. package/concepts/no/Tool-SuggestConnectors.md +28 -0
  353. package/concepts/no/Tool-SuggestPluginInstall.md +39 -0
  354. package/concepts/no/Tool-SuggestSkills.md +33 -0
  355. package/concepts/no/Tool-TaskCreate.md +6 -0
  356. package/concepts/no/Tool-TaskGet.md +6 -0
  357. package/concepts/no/Tool-TaskList.md +6 -0
  358. package/concepts/no/Tool-TaskUpdate.md +6 -0
  359. package/concepts/no/Tool-TodoWrite.md +43 -0
  360. package/concepts/no/Tool-ToolSearch.md +5 -0
  361. package/concepts/no/Tool-WebSearch.md +6 -0
  362. package/concepts/no/Tools.md +26 -4
  363. package/concepts/pl/GlobalSettings.md +2 -2
  364. package/concepts/pl/Tool-Artifact.md +7 -0
  365. package/concepts/pl/Tool-EndConversation.md +35 -0
  366. package/concepts/pl/Tool-LSP.md +5 -0
  367. package/concepts/pl/Tool-ListAgents.md +35 -0
  368. package/concepts/pl/Tool-ListConnectors.md +34 -0
  369. package/concepts/pl/Tool-ListMcpResources.md +35 -0
  370. package/concepts/pl/Tool-ListPlugins.md +35 -0
  371. package/concepts/pl/Tool-ListSkills.md +37 -0
  372. package/concepts/pl/Tool-Monitor.md +7 -0
  373. package/concepts/pl/Tool-Projects.md +46 -0
  374. package/concepts/pl/Tool-ProposeGoal.md +43 -0
  375. package/concepts/pl/Tool-PushNotification.md +6 -0
  376. package/concepts/pl/Tool-REPL.md +47 -0
  377. package/concepts/pl/Tool-ReadMcpResource.md +32 -0
  378. package/concepts/pl/Tool-ReadMcpResourceDir.md +32 -0
  379. package/concepts/pl/Tool-ReadNotifications.md +27 -0
  380. package/concepts/pl/Tool-RemoteTrigger.md +7 -0
  381. package/concepts/pl/Tool-ScheduleWakeup.md +5 -0
  382. package/concepts/pl/Tool-SearchMcpRegistry.md +31 -0
  383. package/concepts/pl/Tool-SendFeedback.md +38 -0
  384. package/concepts/pl/Tool-SendFile.md +36 -0
  385. package/concepts/pl/Tool-SendMessage.md +5 -0
  386. package/concepts/pl/Tool-SendUserFile.md +38 -0
  387. package/concepts/pl/Tool-SendUserMessage.md +38 -0
  388. package/concepts/pl/Tool-SuggestConnectors.md +28 -0
  389. package/concepts/pl/Tool-SuggestPluginInstall.md +39 -0
  390. package/concepts/pl/Tool-SuggestSkills.md +33 -0
  391. package/concepts/pl/Tool-TaskCreate.md +6 -0
  392. package/concepts/pl/Tool-TaskGet.md +6 -0
  393. package/concepts/pl/Tool-TaskList.md +6 -0
  394. package/concepts/pl/Tool-TaskUpdate.md +6 -0
  395. package/concepts/pl/Tool-TodoWrite.md +43 -0
  396. package/concepts/pl/Tool-ToolSearch.md +5 -0
  397. package/concepts/pl/Tool-WebSearch.md +6 -0
  398. package/concepts/pl/Tools.md +26 -4
  399. package/concepts/pt-BR/GlobalSettings.md +2 -2
  400. package/concepts/pt-BR/Tool-Artifact.md +7 -0
  401. package/concepts/pt-BR/Tool-EndConversation.md +35 -0
  402. package/concepts/pt-BR/Tool-LSP.md +5 -0
  403. package/concepts/pt-BR/Tool-ListAgents.md +35 -0
  404. package/concepts/pt-BR/Tool-ListConnectors.md +34 -0
  405. package/concepts/pt-BR/Tool-ListMcpResources.md +35 -0
  406. package/concepts/pt-BR/Tool-ListPlugins.md +35 -0
  407. package/concepts/pt-BR/Tool-ListSkills.md +37 -0
  408. package/concepts/pt-BR/Tool-Monitor.md +7 -0
  409. package/concepts/pt-BR/Tool-Projects.md +46 -0
  410. package/concepts/pt-BR/Tool-ProposeGoal.md +43 -0
  411. package/concepts/pt-BR/Tool-PushNotification.md +6 -0
  412. package/concepts/pt-BR/Tool-REPL.md +47 -0
  413. package/concepts/pt-BR/Tool-ReadMcpResource.md +32 -0
  414. package/concepts/pt-BR/Tool-ReadMcpResourceDir.md +32 -0
  415. package/concepts/pt-BR/Tool-ReadNotifications.md +27 -0
  416. package/concepts/pt-BR/Tool-RemoteTrigger.md +7 -0
  417. package/concepts/pt-BR/Tool-ScheduleWakeup.md +5 -0
  418. package/concepts/pt-BR/Tool-SearchMcpRegistry.md +31 -0
  419. package/concepts/pt-BR/Tool-SendFeedback.md +38 -0
  420. package/concepts/pt-BR/Tool-SendFile.md +36 -0
  421. package/concepts/pt-BR/Tool-SendMessage.md +5 -0
  422. package/concepts/pt-BR/Tool-SendUserFile.md +38 -0
  423. package/concepts/pt-BR/Tool-SendUserMessage.md +38 -0
  424. package/concepts/pt-BR/Tool-SuggestConnectors.md +28 -0
  425. package/concepts/pt-BR/Tool-SuggestPluginInstall.md +39 -0
  426. package/concepts/pt-BR/Tool-SuggestSkills.md +33 -0
  427. package/concepts/pt-BR/Tool-TaskCreate.md +6 -0
  428. package/concepts/pt-BR/Tool-TaskGet.md +6 -0
  429. package/concepts/pt-BR/Tool-TaskList.md +6 -0
  430. package/concepts/pt-BR/Tool-TaskUpdate.md +6 -0
  431. package/concepts/pt-BR/Tool-TodoWrite.md +43 -0
  432. package/concepts/pt-BR/Tool-ToolSearch.md +5 -0
  433. package/concepts/pt-BR/Tool-WebSearch.md +6 -0
  434. package/concepts/pt-BR/Tools.md +26 -4
  435. package/concepts/ru/GlobalSettings.md +2 -2
  436. package/concepts/ru/Tool-Artifact.md +7 -0
  437. package/concepts/ru/Tool-EndConversation.md +35 -0
  438. package/concepts/ru/Tool-LSP.md +5 -0
  439. package/concepts/ru/Tool-ListAgents.md +35 -0
  440. package/concepts/ru/Tool-ListConnectors.md +34 -0
  441. package/concepts/ru/Tool-ListMcpResources.md +35 -0
  442. package/concepts/ru/Tool-ListPlugins.md +35 -0
  443. package/concepts/ru/Tool-ListSkills.md +37 -0
  444. package/concepts/ru/Tool-Monitor.md +7 -0
  445. package/concepts/ru/Tool-Projects.md +46 -0
  446. package/concepts/ru/Tool-ProposeGoal.md +43 -0
  447. package/concepts/ru/Tool-PushNotification.md +6 -0
  448. package/concepts/ru/Tool-REPL.md +47 -0
  449. package/concepts/ru/Tool-ReadMcpResource.md +32 -0
  450. package/concepts/ru/Tool-ReadMcpResourceDir.md +32 -0
  451. package/concepts/ru/Tool-ReadNotifications.md +27 -0
  452. package/concepts/ru/Tool-RemoteTrigger.md +7 -0
  453. package/concepts/ru/Tool-ScheduleWakeup.md +5 -0
  454. package/concepts/ru/Tool-SearchMcpRegistry.md +31 -0
  455. package/concepts/ru/Tool-SendFeedback.md +38 -0
  456. package/concepts/ru/Tool-SendFile.md +36 -0
  457. package/concepts/ru/Tool-SendMessage.md +5 -0
  458. package/concepts/ru/Tool-SendUserFile.md +38 -0
  459. package/concepts/ru/Tool-SendUserMessage.md +38 -0
  460. package/concepts/ru/Tool-SuggestConnectors.md +28 -0
  461. package/concepts/ru/Tool-SuggestPluginInstall.md +39 -0
  462. package/concepts/ru/Tool-SuggestSkills.md +33 -0
  463. package/concepts/ru/Tool-TaskCreate.md +6 -0
  464. package/concepts/ru/Tool-TaskGet.md +6 -0
  465. package/concepts/ru/Tool-TaskList.md +6 -0
  466. package/concepts/ru/Tool-TaskUpdate.md +6 -0
  467. package/concepts/ru/Tool-TodoWrite.md +43 -0
  468. package/concepts/ru/Tool-ToolSearch.md +5 -0
  469. package/concepts/ru/Tool-WebSearch.md +6 -0
  470. package/concepts/ru/Tools.md +26 -4
  471. package/concepts/th/GlobalSettings.md +2 -2
  472. package/concepts/th/Tool-Artifact.md +7 -0
  473. package/concepts/th/Tool-EndConversation.md +35 -0
  474. package/concepts/th/Tool-LSP.md +5 -0
  475. package/concepts/th/Tool-ListAgents.md +35 -0
  476. package/concepts/th/Tool-ListConnectors.md +34 -0
  477. package/concepts/th/Tool-ListMcpResources.md +35 -0
  478. package/concepts/th/Tool-ListPlugins.md +35 -0
  479. package/concepts/th/Tool-ListSkills.md +37 -0
  480. package/concepts/th/Tool-Monitor.md +7 -0
  481. package/concepts/th/Tool-Projects.md +46 -0
  482. package/concepts/th/Tool-ProposeGoal.md +43 -0
  483. package/concepts/th/Tool-PushNotification.md +6 -0
  484. package/concepts/th/Tool-REPL.md +47 -0
  485. package/concepts/th/Tool-ReadMcpResource.md +32 -0
  486. package/concepts/th/Tool-ReadMcpResourceDir.md +32 -0
  487. package/concepts/th/Tool-ReadNotifications.md +27 -0
  488. package/concepts/th/Tool-RemoteTrigger.md +7 -0
  489. package/concepts/th/Tool-ScheduleWakeup.md +5 -0
  490. package/concepts/th/Tool-SearchMcpRegistry.md +31 -0
  491. package/concepts/th/Tool-SendFeedback.md +38 -0
  492. package/concepts/th/Tool-SendFile.md +36 -0
  493. package/concepts/th/Tool-SendMessage.md +5 -0
  494. package/concepts/th/Tool-SendUserFile.md +38 -0
  495. package/concepts/th/Tool-SendUserMessage.md +38 -0
  496. package/concepts/th/Tool-SuggestConnectors.md +28 -0
  497. package/concepts/th/Tool-SuggestPluginInstall.md +39 -0
  498. package/concepts/th/Tool-SuggestSkills.md +33 -0
  499. package/concepts/th/Tool-TaskCreate.md +6 -0
  500. package/concepts/th/Tool-TaskGet.md +6 -0
  501. package/concepts/th/Tool-TaskList.md +6 -0
  502. package/concepts/th/Tool-TaskUpdate.md +6 -0
  503. package/concepts/th/Tool-TodoWrite.md +43 -0
  504. package/concepts/th/Tool-ToolSearch.md +5 -0
  505. package/concepts/th/Tool-WebSearch.md +13 -7
  506. package/concepts/th/Tools.md +26 -4
  507. package/concepts/tr/GlobalSettings.md +2 -2
  508. package/concepts/tr/Tool-Artifact.md +7 -0
  509. package/concepts/tr/Tool-EndConversation.md +35 -0
  510. package/concepts/tr/Tool-LSP.md +5 -0
  511. package/concepts/tr/Tool-ListAgents.md +35 -0
  512. package/concepts/tr/Tool-ListConnectors.md +34 -0
  513. package/concepts/tr/Tool-ListMcpResources.md +35 -0
  514. package/concepts/tr/Tool-ListPlugins.md +35 -0
  515. package/concepts/tr/Tool-ListSkills.md +37 -0
  516. package/concepts/tr/Tool-Monitor.md +7 -0
  517. package/concepts/tr/Tool-Projects.md +46 -0
  518. package/concepts/tr/Tool-ProposeGoal.md +43 -0
  519. package/concepts/tr/Tool-PushNotification.md +6 -0
  520. package/concepts/tr/Tool-REPL.md +47 -0
  521. package/concepts/tr/Tool-ReadMcpResource.md +32 -0
  522. package/concepts/tr/Tool-ReadMcpResourceDir.md +32 -0
  523. package/concepts/tr/Tool-ReadNotifications.md +27 -0
  524. package/concepts/tr/Tool-RemoteTrigger.md +7 -0
  525. package/concepts/tr/Tool-ScheduleWakeup.md +5 -0
  526. package/concepts/tr/Tool-SearchMcpRegistry.md +31 -0
  527. package/concepts/tr/Tool-SendFeedback.md +38 -0
  528. package/concepts/tr/Tool-SendFile.md +36 -0
  529. package/concepts/tr/Tool-SendMessage.md +5 -0
  530. package/concepts/tr/Tool-SendUserFile.md +38 -0
  531. package/concepts/tr/Tool-SendUserMessage.md +38 -0
  532. package/concepts/tr/Tool-SuggestConnectors.md +28 -0
  533. package/concepts/tr/Tool-SuggestPluginInstall.md +39 -0
  534. package/concepts/tr/Tool-SuggestSkills.md +33 -0
  535. package/concepts/tr/Tool-TaskCreate.md +6 -0
  536. package/concepts/tr/Tool-TaskGet.md +6 -0
  537. package/concepts/tr/Tool-TaskList.md +6 -0
  538. package/concepts/tr/Tool-TaskUpdate.md +6 -0
  539. package/concepts/tr/Tool-TodoWrite.md +43 -0
  540. package/concepts/tr/Tool-ToolSearch.md +5 -0
  541. package/concepts/tr/Tool-WebSearch.md +6 -0
  542. package/concepts/tr/Tools.md +26 -4
  543. package/concepts/uk/GlobalSettings.md +2 -2
  544. package/concepts/uk/Tool-Artifact.md +7 -0
  545. package/concepts/uk/Tool-EndConversation.md +35 -0
  546. package/concepts/uk/Tool-LSP.md +5 -0
  547. package/concepts/uk/Tool-ListAgents.md +35 -0
  548. package/concepts/uk/Tool-ListConnectors.md +34 -0
  549. package/concepts/uk/Tool-ListMcpResources.md +35 -0
  550. package/concepts/uk/Tool-ListPlugins.md +35 -0
  551. package/concepts/uk/Tool-ListSkills.md +37 -0
  552. package/concepts/uk/Tool-Monitor.md +7 -0
  553. package/concepts/uk/Tool-Projects.md +46 -0
  554. package/concepts/uk/Tool-ProposeGoal.md +43 -0
  555. package/concepts/uk/Tool-PushNotification.md +6 -0
  556. package/concepts/uk/Tool-REPL.md +47 -0
  557. package/concepts/uk/Tool-ReadMcpResource.md +32 -0
  558. package/concepts/uk/Tool-ReadMcpResourceDir.md +32 -0
  559. package/concepts/uk/Tool-ReadNotifications.md +27 -0
  560. package/concepts/uk/Tool-RemoteTrigger.md +7 -0
  561. package/concepts/uk/Tool-ScheduleWakeup.md +5 -0
  562. package/concepts/uk/Tool-SearchMcpRegistry.md +31 -0
  563. package/concepts/uk/Tool-SendFeedback.md +38 -0
  564. package/concepts/uk/Tool-SendFile.md +36 -0
  565. package/concepts/uk/Tool-SendMessage.md +5 -0
  566. package/concepts/uk/Tool-SendUserFile.md +38 -0
  567. package/concepts/uk/Tool-SendUserMessage.md +38 -0
  568. package/concepts/uk/Tool-SuggestConnectors.md +28 -0
  569. package/concepts/uk/Tool-SuggestPluginInstall.md +39 -0
  570. package/concepts/uk/Tool-SuggestSkills.md +33 -0
  571. package/concepts/uk/Tool-TaskCreate.md +6 -0
  572. package/concepts/uk/Tool-TaskGet.md +6 -0
  573. package/concepts/uk/Tool-TaskList.md +6 -0
  574. package/concepts/uk/Tool-TaskUpdate.md +6 -0
  575. package/concepts/uk/Tool-TodoWrite.md +43 -0
  576. package/concepts/uk/Tool-ToolSearch.md +5 -0
  577. package/concepts/uk/Tool-WebSearch.md +6 -0
  578. package/concepts/uk/Tools.md +26 -4
  579. package/concepts/zh/GlobalSettings.md +2 -2
  580. package/concepts/zh/Tool-Artifact.md +7 -0
  581. package/concepts/zh/Tool-EndConversation.md +35 -0
  582. package/concepts/zh/Tool-LSP.md +5 -0
  583. package/concepts/zh/Tool-ListAgents.md +35 -0
  584. package/concepts/zh/Tool-ListConnectors.md +34 -0
  585. package/concepts/zh/Tool-ListMcpResources.md +35 -0
  586. package/concepts/zh/Tool-ListPlugins.md +35 -0
  587. package/concepts/zh/Tool-ListSkills.md +37 -0
  588. package/concepts/zh/Tool-Monitor.md +7 -0
  589. package/concepts/zh/Tool-Projects.md +46 -0
  590. package/concepts/zh/Tool-ProposeGoal.md +43 -0
  591. package/concepts/zh/Tool-PushNotification.md +6 -0
  592. package/concepts/zh/Tool-REPL.md +47 -0
  593. package/concepts/zh/Tool-ReadMcpResource.md +32 -0
  594. package/concepts/zh/Tool-ReadMcpResourceDir.md +32 -0
  595. package/concepts/zh/Tool-ReadNotifications.md +27 -0
  596. package/concepts/zh/Tool-RemoteTrigger.md +7 -0
  597. package/concepts/zh/Tool-ScheduleWakeup.md +5 -0
  598. package/concepts/zh/Tool-SearchMcpRegistry.md +31 -0
  599. package/concepts/zh/Tool-SendFeedback.md +38 -0
  600. package/concepts/zh/Tool-SendFile.md +36 -0
  601. package/concepts/zh/Tool-SendMessage.md +5 -0
  602. package/concepts/zh/Tool-SendUserFile.md +38 -0
  603. package/concepts/zh/Tool-SendUserMessage.md +38 -0
  604. package/concepts/zh/Tool-SuggestConnectors.md +28 -0
  605. package/concepts/zh/Tool-SuggestPluginInstall.md +39 -0
  606. package/concepts/zh/Tool-SuggestSkills.md +33 -0
  607. package/concepts/zh/Tool-TaskCreate.md +6 -0
  608. package/concepts/zh/Tool-TaskGet.md +6 -0
  609. package/concepts/zh/Tool-TaskList.md +6 -0
  610. package/concepts/zh/Tool-TaskUpdate.md +6 -0
  611. package/concepts/zh/Tool-TodoWrite.md +43 -0
  612. package/concepts/zh/Tool-ToolSearch.md +5 -0
  613. package/concepts/zh/Tool-WebSearch.md +6 -0
  614. package/concepts/zh/Tools.md +26 -4
  615. package/concepts/zh-TW/GlobalSettings.md +2 -2
  616. package/concepts/zh-TW/Tool-Artifact.md +7 -0
  617. package/concepts/zh-TW/Tool-EndConversation.md +35 -0
  618. package/concepts/zh-TW/Tool-LSP.md +5 -0
  619. package/concepts/zh-TW/Tool-ListAgents.md +35 -0
  620. package/concepts/zh-TW/Tool-ListConnectors.md +34 -0
  621. package/concepts/zh-TW/Tool-ListMcpResources.md +35 -0
  622. package/concepts/zh-TW/Tool-ListPlugins.md +35 -0
  623. package/concepts/zh-TW/Tool-ListSkills.md +37 -0
  624. package/concepts/zh-TW/Tool-Monitor.md +7 -0
  625. package/concepts/zh-TW/Tool-Projects.md +46 -0
  626. package/concepts/zh-TW/Tool-ProposeGoal.md +43 -0
  627. package/concepts/zh-TW/Tool-PushNotification.md +6 -0
  628. package/concepts/zh-TW/Tool-REPL.md +47 -0
  629. package/concepts/zh-TW/Tool-ReadMcpResource.md +32 -0
  630. package/concepts/zh-TW/Tool-ReadMcpResourceDir.md +32 -0
  631. package/concepts/zh-TW/Tool-ReadNotifications.md +27 -0
  632. package/concepts/zh-TW/Tool-RemoteTrigger.md +7 -0
  633. package/concepts/zh-TW/Tool-ScheduleWakeup.md +5 -0
  634. package/concepts/zh-TW/Tool-SearchMcpRegistry.md +31 -0
  635. package/concepts/zh-TW/Tool-SendFeedback.md +38 -0
  636. package/concepts/zh-TW/Tool-SendFile.md +36 -0
  637. package/concepts/zh-TW/Tool-SendMessage.md +5 -0
  638. package/concepts/zh-TW/Tool-SendUserFile.md +38 -0
  639. package/concepts/zh-TW/Tool-SendUserMessage.md +38 -0
  640. package/concepts/zh-TW/Tool-SuggestConnectors.md +28 -0
  641. package/concepts/zh-TW/Tool-SuggestPluginInstall.md +39 -0
  642. package/concepts/zh-TW/Tool-SuggestSkills.md +33 -0
  643. package/concepts/zh-TW/Tool-TaskCreate.md +6 -0
  644. package/concepts/zh-TW/Tool-TaskGet.md +6 -0
  645. package/concepts/zh-TW/Tool-TaskList.md +6 -0
  646. package/concepts/zh-TW/Tool-TaskUpdate.md +6 -0
  647. package/concepts/zh-TW/Tool-TodoWrite.md +43 -0
  648. package/concepts/zh-TW/Tool-ToolSearch.md +5 -0
  649. package/concepts/zh-TW/Tool-WebSearch.md +6 -0
  650. package/concepts/zh-TW/Tools.md +26 -4
  651. package/dist/assets/{App-BaKGIW0-.js → App-CCu0y2Cq.js} +2 -2
  652. package/dist/assets/{MdxEditorPanel-DG-UE0PC.js → MdxEditorPanel-BBhgTmDk.js} +1 -1
  653. package/dist/assets/{Mobile-CQaUYdaf.js → Mobile-vN4lyiaz.js} +1 -1
  654. package/dist/assets/{ProxyStatsModal-j-Aty9Lu.js → ProxyStatsModal-BOflqr0R.js} +1 -1
  655. package/dist/assets/index-C3BRHDVF.js +2 -0
  656. package/dist/assets/seqResourceLoaders-DI0G5nu1.css +41 -0
  657. package/dist/assets/seqResourceLoaders-DpYqp6SP.js +2 -0
  658. package/dist/index.html +1 -1
  659. package/findcc.js +17 -8
  660. package/node_modules/@ccv/core/package.json +13 -0
  661. package/{server/lib → node_modules/@ccv/core/src}/approval-modal-prefs.js +1 -1
  662. package/node_modules/@ccv/core/src/clearCheckpoint.js +7 -0
  663. package/{src/utils → node_modules/@ccv/core/src}/contentFilter.js +207 -141
  664. package/{server/lib → node_modules/@ccv/core/src}/context-rules.js +2 -2
  665. package/{server/lib → node_modules/@ccv/core/src}/delta-reconstructor.js +60 -4
  666. package/{server/lib → node_modules/@ccv/core/src}/error-report.js +5 -4
  667. package/{server/lib → node_modules/@ccv/core/src}/session-boundary.js +3 -3
  668. package/{src/utils → node_modules/@ccv/core/src}/teammateDetector.js +9 -0
  669. package/{server/lib → node_modules/@ccv/core/src}/tools-xml-formatter.js +3 -3
  670. package/{server/lib → node_modules/@ccv/core/src}/v2-transcript-normalizer.js +1 -1
  671. package/{server/lib → node_modules/@ccv/core/src}/voice-pack-events.js +2 -2
  672. package/package.json +11 -96
  673. package/server/_paths.js +28 -7
  674. package/server/i18n.js +60 -0
  675. package/server/interceptor.js +36 -11
  676. package/server/lib/adapters/dingtalk-adapter.js +2 -2
  677. package/server/lib/adapters/discord-adapter.js +2 -2
  678. package/server/lib/adapters/feishu-adapter.js +2 -2
  679. package/server/lib/adapters/wecom-adapter.js +2 -2
  680. package/server/lib/approval-policy.js +29 -0
  681. package/server/lib/{ask-store.js → ask/ask-store.js} +3 -3
  682. package/server/lib/{perm-bridge.js → ask/perm-bridge.js} +5 -5
  683. package/server/lib/chat-queue.js +341 -0
  684. package/server/lib/cli-inject.js +1 -1
  685. package/server/lib/context-watcher.js +3 -3
  686. package/server/lib/create_system_prompt.js +0 -9
  687. package/server/lib/enrich-plan-input.js +1 -1
  688. package/server/lib/ensure-hooks.js +2 -2
  689. package/server/lib/file-access-policy.js +6 -1
  690. package/server/lib/file-api.js +17 -1
  691. package/server/lib/{dingtalk-bridge.js → im/dingtalk-bridge.js} +1 -1
  692. package/server/lib/{im-append-system.js → im/im-append-system.js} +5 -13
  693. package/server/lib/{im-bridge-core.js → im/im-bridge-core.js} +12 -6
  694. package/server/lib/{im-config.js → im/im-config.js} +1 -1
  695. package/server/lib/im/im-deny.js +4 -0
  696. package/server/lib/{im-lang.js → im/im-lang.js} +1 -1
  697. package/server/lib/{im-lock.js → im/im-lock.js} +2 -2
  698. package/server/lib/{im-process-manager.js → im/im-process-manager.js} +1 -1
  699. package/server/lib/{im-senders.js → im/im-senders.js} +1 -1
  700. package/server/lib/{im-skills.js → im/im-skills.js} +2 -2
  701. package/server/lib/interceptor-core.js +8 -5
  702. package/server/lib/kv-cache-analyzer.js +6 -5
  703. package/server/lib/launch-config.js +321 -0
  704. package/server/lib/log-file-utils.js +21 -0
  705. package/server/lib/log-management.js +6 -17
  706. package/server/lib/log-stream.js +1 -1
  707. package/server/lib/log-watcher.js +1 -1
  708. package/server/lib/model-system-prompts.js +1 -1
  709. package/server/lib/prefs-store.js +2 -2
  710. package/server/lib/project-prefs.js +6 -6
  711. package/server/lib/project-state.js +15 -0
  712. package/server/lib/{proxy-retry.js → proxy/proxy-retry.js} +2 -2
  713. package/server/lib/{proxy-stats.js → proxy/proxy-stats.js} +3 -3
  714. package/server/lib/sdk-adapter.js +6 -74
  715. package/server/lib/sdk-manager.js +383 -278
  716. package/server/lib/skills-api.js +1 -1
  717. package/server/lib/spawn-model-resolver.js +21 -6
  718. package/server/lib/stats-worker.js +2 -2
  719. package/server/lib/system-prompt-files.js +11 -10
  720. package/server/lib/system-prompt-render.js +23 -7
  721. package/server/lib/system-prompt-snapshots.js +452 -0
  722. package/server/lib/updater.js +63 -3
  723. package/server/lib/user-prompt-extract.js +5 -5
  724. package/server/lib/v2/adapter.js +3 -3
  725. package/server/lib/v2/conversation-store.js +1 -1
  726. package/server/lib/v2/convert.js +3 -3
  727. package/server/lib/v2/jsonl-read.js +1 -1
  728. package/server/lib/v2/live-feed.js +3 -3
  729. package/server/lib/v2/meta-rows.js +3 -3
  730. package/server/lib/v2/replay.js +1 -1
  731. package/server/lib/v2/session-list.js +1 -1
  732. package/server/lib/v2/session-owner.js +1 -1
  733. package/server/lib/v2/v2-writer.js +26 -1
  734. package/server/lib/v2/verify.js +1 -1
  735. package/server/lib/voice-pack-manager.js +4 -5
  736. package/server/lib/wire-compress.js +1 -1
  737. package/server/proxy.js +5 -5
  738. package/server/pty-manager.js +282 -184
  739. package/server/routes/ask-perm.js +1 -1
  740. package/server/routes/dingtalk.js +3 -3
  741. package/server/routes/events.js +2 -2
  742. package/server/routes/im.js +5 -5
  743. package/server/routes/preferences.js +3 -3
  744. package/server/routes/workspaces.js +1 -1
  745. package/server/server.js +207 -58
  746. package/server/system-prompt-templates/systemPromptModel.md +0 -8
  747. package/server/system-prompt-templates/systemPromptVariables.ar.md +0 -7
  748. package/server/system-prompt-templates/systemPromptVariables.da.md +0 -7
  749. package/server/system-prompt-templates/systemPromptVariables.de.md +0 -7
  750. package/server/system-prompt-templates/systemPromptVariables.es.md +0 -7
  751. package/server/system-prompt-templates/systemPromptVariables.fr.md +0 -7
  752. package/server/system-prompt-templates/systemPromptVariables.it.md +0 -7
  753. package/server/system-prompt-templates/systemPromptVariables.ja.md +0 -7
  754. package/server/system-prompt-templates/systemPromptVariables.ko.md +0 -7
  755. package/server/system-prompt-templates/systemPromptVariables.md +0 -7
  756. package/server/system-prompt-templates/systemPromptVariables.no.md +0 -7
  757. package/server/system-prompt-templates/systemPromptVariables.pl.md +0 -7
  758. package/server/system-prompt-templates/systemPromptVariables.pt-BR.md +0 -7
  759. package/server/system-prompt-templates/systemPromptVariables.ru.md +0 -7
  760. package/server/system-prompt-templates/systemPromptVariables.th.md +0 -7
  761. package/server/system-prompt-templates/systemPromptVariables.tr.md +0 -7
  762. package/server/system-prompt-templates/systemPromptVariables.uk.md +0 -7
  763. package/server/system-prompt-templates/systemPromptVariables.zh-TW.md +0 -7
  764. package/server/system-prompt-templates/systemPromptVariables.zh.md +0 -7
  765. package/concepts/ar/Tool-TeamCreate.md +0 -53
  766. package/concepts/ar/Tool-TeamDelete.md +0 -44
  767. package/concepts/ar/Tool-executeCode.md +0 -47
  768. package/concepts/ar/Tool-getDiagnostics.md +0 -44
  769. package/concepts/da/Tool-TeamCreate.md +0 -53
  770. package/concepts/da/Tool-TeamDelete.md +0 -44
  771. package/concepts/da/Tool-executeCode.md +0 -47
  772. package/concepts/da/Tool-getDiagnostics.md +0 -44
  773. package/concepts/de/Tool-TeamCreate.md +0 -53
  774. package/concepts/de/Tool-TeamDelete.md +0 -44
  775. package/concepts/de/Tool-executeCode.md +0 -47
  776. package/concepts/de/Tool-getDiagnostics.md +0 -44
  777. package/concepts/en/Tool-TeamCreate.md +0 -53
  778. package/concepts/en/Tool-TeamDelete.md +0 -44
  779. package/concepts/en/Tool-executeCode.md +0 -47
  780. package/concepts/en/Tool-getDiagnostics.md +0 -44
  781. package/concepts/es/Tool-TeamCreate.md +0 -53
  782. package/concepts/es/Tool-TeamDelete.md +0 -44
  783. package/concepts/es/Tool-executeCode.md +0 -47
  784. package/concepts/es/Tool-getDiagnostics.md +0 -44
  785. package/concepts/fr/Tool-TeamCreate.md +0 -53
  786. package/concepts/fr/Tool-TeamDelete.md +0 -44
  787. package/concepts/fr/Tool-executeCode.md +0 -47
  788. package/concepts/fr/Tool-getDiagnostics.md +0 -44
  789. package/concepts/it/Tool-TeamCreate.md +0 -53
  790. package/concepts/it/Tool-TeamDelete.md +0 -44
  791. package/concepts/it/Tool-executeCode.md +0 -47
  792. package/concepts/it/Tool-getDiagnostics.md +0 -44
  793. package/concepts/ja/Tool-TeamCreate.md +0 -53
  794. package/concepts/ja/Tool-TeamDelete.md +0 -44
  795. package/concepts/ja/Tool-executeCode.md +0 -47
  796. package/concepts/ja/Tool-getDiagnostics.md +0 -44
  797. package/concepts/ko/Tool-TeamCreate.md +0 -53
  798. package/concepts/ko/Tool-TeamDelete.md +0 -44
  799. package/concepts/ko/Tool-executeCode.md +0 -47
  800. package/concepts/ko/Tool-getDiagnostics.md +0 -44
  801. package/concepts/no/Tool-TeamCreate.md +0 -53
  802. package/concepts/no/Tool-TeamDelete.md +0 -44
  803. package/concepts/no/Tool-executeCode.md +0 -47
  804. package/concepts/no/Tool-getDiagnostics.md +0 -44
  805. package/concepts/pl/Tool-TeamCreate.md +0 -53
  806. package/concepts/pl/Tool-TeamDelete.md +0 -44
  807. package/concepts/pl/Tool-executeCode.md +0 -47
  808. package/concepts/pl/Tool-getDiagnostics.md +0 -44
  809. package/concepts/pt-BR/Tool-TeamCreate.md +0 -53
  810. package/concepts/pt-BR/Tool-TeamDelete.md +0 -44
  811. package/concepts/pt-BR/Tool-executeCode.md +0 -47
  812. package/concepts/pt-BR/Tool-getDiagnostics.md +0 -44
  813. package/concepts/ru/Tool-TeamCreate.md +0 -53
  814. package/concepts/ru/Tool-TeamDelete.md +0 -44
  815. package/concepts/ru/Tool-executeCode.md +0 -47
  816. package/concepts/ru/Tool-getDiagnostics.md +0 -44
  817. package/concepts/th/Tool-TeamCreate.md +0 -53
  818. package/concepts/th/Tool-TeamDelete.md +0 -44
  819. package/concepts/th/Tool-executeCode.md +0 -41
  820. package/concepts/th/Tool-getDiagnostics.md +0 -32
  821. package/concepts/tr/Tool-TeamCreate.md +0 -53
  822. package/concepts/tr/Tool-TeamDelete.md +0 -44
  823. package/concepts/tr/Tool-executeCode.md +0 -47
  824. package/concepts/tr/Tool-getDiagnostics.md +0 -44
  825. package/concepts/uk/Tool-TeamCreate.md +0 -53
  826. package/concepts/uk/Tool-TeamDelete.md +0 -44
  827. package/concepts/uk/Tool-executeCode.md +0 -47
  828. package/concepts/uk/Tool-getDiagnostics.md +0 -44
  829. package/concepts/zh/Tool-TeamCreate.md +0 -53
  830. package/concepts/zh/Tool-TeamDelete.md +0 -44
  831. package/concepts/zh/Tool-executeCode.md +0 -47
  832. package/concepts/zh/Tool-getDiagnostics.md +0 -44
  833. package/concepts/zh-TW/Tool-TeamCreate.md +0 -53
  834. package/concepts/zh-TW/Tool-TeamDelete.md +0 -44
  835. package/concepts/zh-TW/Tool-executeCode.md +0 -47
  836. package/concepts/zh-TW/Tool-getDiagnostics.md +0 -44
  837. package/dist/assets/index-CyiyzBfV.js +0 -2
  838. package/dist/assets/seqResourceLoaders-BgD_Rwvc.css +0 -41
  839. package/dist/assets/seqResourceLoaders-XMiEIVyV.js +0 -2
  840. package/src/utils/apiUrl.js +0 -26
  841. package/src/utils/askFallback.js +0 -21
  842. package/src/utils/askOptionDesc.js +0 -55
  843. package/src/utils/askPortalMatcher.js +0 -54
  844. package/src/utils/autoApproveOptions.js +0 -27
  845. package/src/utils/avatarAnimationPostPass.js +0 -49
  846. package/src/utils/builtinPresets.js +0 -18
  847. package/src/utils/clearCheckpoint.js +0 -7
  848. package/src/utils/commandValidator.js +0 -45
  849. package/src/utils/contextRaw.js +0 -18
  850. package/src/utils/contextSidebarNavigation.js +0 -16
  851. package/src/utils/contextTurns.js +0 -117
  852. package/src/utils/displayScaleHelper.js +0 -47
  853. package/src/utils/effectiveModel.js +0 -17
  854. package/src/utils/entry-slim.js +0 -563
  855. package/src/utils/entryCache.js +0 -144
  856. package/src/utils/errorReport.js +0 -6
  857. package/src/utils/fileExpandedPathsStorage.js +0 -70
  858. package/src/utils/fileIcons.jsx +0 -36
  859. package/src/utils/fileOpen.js +0 -37
  860. package/src/utils/formatters.js +0 -48
  861. package/src/utils/gitApi.js +0 -50
  862. package/src/utils/gitTreeBuilder.js +0 -19
  863. package/src/utils/helpers.js +0 -854
  864. package/src/utils/identityHeal.js +0 -108
  865. package/src/utils/imConnState.js +0 -59
  866. package/src/utils/imOrigin.js +0 -24
  867. package/src/utils/imTr.js +0 -7
  868. package/src/utils/imageCompress.js +0 -83
  869. package/src/utils/imageDownscale.js +0 -28
  870. package/src/utils/imageResize.js +0 -112
  871. package/src/utils/ingestPipeline.js +0 -47
  872. package/src/utils/isProxyMode.js +0 -11
  873. package/src/utils/lazyWithReload.js +0 -53
  874. package/src/utils/markdown.js +0 -30
  875. package/src/utils/markdownIncremental.js +0 -39
  876. package/src/utils/markdownProfiler.js +0 -113
  877. package/src/utils/mdExtensionDetect.js +0 -64
  878. package/src/utils/memoryLinkParser.js +0 -44
  879. package/src/utils/modalMask.js +0 -15
  880. package/src/utils/modelSuggestions.js +0 -48
  881. package/src/utils/monotime.js +0 -6
  882. package/src/utils/pinnedMenu.js +0 -55
  883. package/src/utils/presetShortcuts.js +0 -14
  884. package/src/utils/projectAlias.js +0 -135
  885. package/src/utils/promptClassifier.js +0 -112
  886. package/src/utils/promptDetect.js +0 -196
  887. package/src/utils/promptNav.js +0 -60
  888. package/src/utils/ptyChunkBuilder.js +0 -251
  889. package/src/utils/quickMenuHoverIntent.js +0 -35
  890. package/src/utils/rateLimitParser.js +0 -119
  891. package/src/utils/readResultPool.js +0 -106
  892. package/src/utils/refreshCachedItemProp.js +0 -30
  893. package/src/utils/resizeCalc.js +0 -21
  894. package/src/utils/resolveLocalized.js +0 -17
  895. package/src/utils/searchApi.js +0 -47
  896. package/src/utils/searchReplace.js +0 -51
  897. package/src/utils/seqResourceLoaders.js +0 -79
  898. package/src/utils/sessionManager.js +0 -482
  899. package/src/utils/sessionMerge.js +0 -239
  900. package/src/utils/skillModalController.js +0 -111
  901. package/src/utils/skillsParser.js +0 -116
  902. package/src/utils/slashCommandLabels.js +0 -80
  903. package/src/utils/splitDragCalc.js +0 -73
  904. package/src/utils/stickyBottomController.js +0 -643
  905. package/src/utils/svgSanitize.js +0 -48
  906. package/src/utils/systemTags.js +0 -47
  907. package/src/utils/tClaude.js +0 -20
  908. package/src/utils/teamModalBuilder.js +0 -351
  909. package/src/utils/teamSessionParser.js +0 -190
  910. package/src/utils/teammateAvatars.js +0 -194
  911. package/src/utils/termDiag.js +0 -114
  912. package/src/utils/terminalClipboard.js +0 -117
  913. package/src/utils/terminalWriteQueue.js +0 -398
  914. package/src/utils/thinkingMerge.js +0 -49
  915. package/src/utils/toolCatalog.js +0 -29
  916. package/src/utils/toolResultBuilder.js +0 -411
  917. package/src/utils/toolResultClassifier.js +0 -16
  918. package/src/utils/toolResultCore.js +0 -194
  919. package/src/utils/toolsDiff.js +0 -44
  920. package/src/utils/toolsXmlFormatter.js +0 -3
  921. package/src/utils/ultraplanController.js +0 -109
  922. package/src/utils/ultraplanExperts.js +0 -86
  923. package/src/utils/ultraplanTemplates.js +0 -154
  924. package/src/utils/userImageRefs.js +0 -49
  925. package/src/utils/v3Assembler.js +0 -125
  926. package/src/utils/v3Rows.js +0 -49
  927. package/src/utils/voicePackPlayer.js +0 -233
  928. package/src/utils/webSearchGrouping.js +0 -111
  929. package/src/utils/workflowFormat.js +0 -52
  930. package/src/utils/workflowRuns.js +0 -118
  931. package/src/utils/workflowStore.js +0 -94
  932. /package/{src/utils → node_modules/@ccv/core/src}/requestType.js +0 -0
  933. /package/server/lib/{ask-bridge.js → ask/ask-bridge.js} +0 -0
  934. /package/server/lib/{ask-constants.js → ask/ask-constants.js} +0 -0
  935. /package/server/lib/{ask-reaper.js → ask/ask-reaper.js} +0 -0
  936. /package/server/lib/{dingtalk-config.js → im/dingtalk-config.js} +0 -0
  937. /package/server/lib/{im-log-watcher.js → im/im-log-watcher.js} +0 -0
  938. /package/server/lib/{proxy-env.js → proxy/proxy-env.js} +0 -0
  939. /package/server/lib/{proxy-errors.js → proxy/proxy-errors.js} +0 -0
@@ -1,44 +1,57 @@
1
- // 内容分类与过滤规则
2
- // ChatView(对话模式)和 AppHeader(用户 Prompt 弹窗)共用此模块,确保过滤逻辑一致。
3
- // MainAgent / Teammate 判断也收敛于此,供全局统一调用。
1
+ // Content classification and filtering rules.
2
+ // ChatView (chat mode) and AppHeader (user Prompt popup) share this module so the
3
+ // filtering logic stays consistent. MainAgent / Teammate detection also converges here for
4
+ // unified global use.
4
5
 
5
- // ============== 请求体辅助 ==============
6
+ // ============== request body helpers ==============
6
7
 
7
8
  const SUBAGENT_SYSTEM_RE = /command execution specialist|file search specialist|planning specialist|general-purpose agent|security monitor|performing a web search/i;
8
9
 
9
- // cc_version 2.1.181+:CLI billing header 显式标注子代理(cc_is_subagent=true);真·主代理省略此字段(从不为 =false)。
10
- // 这类子代理继承完整 "You are Claude Code" prompt + Edit/Bash/Agent 工具,会误中轻量 MainAgent 启发式,故须显式排除。
11
- // 结尾 \b 锚定:仅匹配 `=true`(其后为 `;` / 空白 / 串尾),避免 `=truex` 之类误匹配。
10
+ // cc_version 2.1.181+: the CLI marks subagents explicitly in the billing header
11
+ // (cc_is_subagent=true); a true main agent omits this field (never =false). Such subagents
12
+ // inherit the full "You are Claude Code" prompt plus Edit/Bash/Agent tools, so they would
13
+ // trip the lightweight MainAgent heuristic — hence the explicit exclusion.
14
+ // Trailing \b anchor: only matches `=true` (followed by `;` / whitespace / end of string),
15
+ // avoiding false matches like `=truex`.
12
16
  const SUBAGENT_BILLING_RE = /cc_is_subagent=true\b/;
13
17
 
14
- // Teammate 检测:system prompt 中包含 Agent Teammate Communication 标记(外部进程 teammate)
18
+ // Teammate detection: system prompt contains the Agent Teammate Communication marker
19
+ // (external-process teammate)
15
20
  const TEAMMATE_SYSTEM_RE = /running as an agent in a team|Agent Teammate Communication/i;
16
21
 
17
- // Native teammate 检测(同进程内 Agent 子代理),独立模块便于版本兼容
22
+ // Native teammate detection (in-process Agent subagent); separate module for version
23
+ // compatibility
18
24
  // Extensioned for server-side reuse (see requestType.js header note).
19
25
  import { isNativeTeammate, extractNativeTeammateName } from './teammateDetector.js';
20
26
 
21
- // ============== 跨会话 / teammate「协议通知」识别 ==============
22
- // harness 把跨会话 / teammate 通知作为 role=user 文本注入主会话。既有逻辑只认 <teammate-message>
23
- // 包裹形态与 "Another Claude session sent a message:" 前缀;这里补「裸协议 JSON」形态 + 新版 caveat 文案,
24
- // 统一归类为 teammate 状态气泡(非用户手输)。type 白名单与 ChatMessage ui.teammate.${type} 渲染一致。
27
+ // ============== cross-session / teammate "protocol notification" detection ==============
28
+ // The harness injects cross-session / teammate notifications into the main session as
29
+ // role=user text. Existing logic only recognized the <teammate-message> wrapper and the
30
+ // "Another Claude session sent a message:" prefix; this adds the "bare protocol JSON" form
31
+ // plus the newer caveat wording, classifying both as teammate status bubbles (not
32
+ // user-typed input). The type whitelist matches ChatMessage's ui.teammate.${type}
33
+ // rendering.
25
34
  export const INTER_SESSION_NOTIFICATION_TYPES = new Set([
26
35
  'idle_notification', 'shutdown_request', 'shutdown_response',
27
36
  'shutdown_approved', 'teammate_terminated',
28
37
  'plan_approval_request', 'plan_approval_response',
29
38
  ]);
30
39
 
31
- // harness 注入的「跨会话包裹文本」标记(英文固定)。
40
+ // The harness-injected "cross-session wrapped text" marker (fixed English wording).
32
41
  const INTER_SESSION_LEAD_RE = /^Another Claude session sent a message:/i;
33
- // 尾部 caveat(新旧两种措辞)。刻意不用 /m:`(^|\n)` 提供行首锚定,`$` 表整串结尾——多行 caveat 会一并
34
- // 剥到空行 / 串尾,不会因 lazy + /m 只剥首行;行首锚定避免误伤用户正文中段引用此句。
42
+ // Trailing caveat (both old and new wordings). Deliberately not using /m: `(^|\n)` anchors
43
+ // at the start of a line and `$` marks the whole-string end — a multi-line caveat is
44
+ // stripped all the way to a blank line / end of string, not just the first line as lazy +
45
+ // /m would; the line-start anchor avoids stripping mid-body user quotes of this sentence.
35
46
  const INTER_SESSION_CAVEAT_RES = [
36
47
  /(^|\n)This came from another Claude session[\s\S]*?(?=\n\n|$)/i,
37
48
  /(^|\n)IMPORTANT: This is NOT from your user[\s\S]*?(?=\n\n|$)/i,
38
49
  ];
39
50
 
40
- // 花括号配对扫描出顶层 {...} 候选 JSON 段(跳过字符串字面量内的花括号 / 转义),返回 { raw, start, end }
41
- // 区间,供调用方一次性区间拼接剔除(不逐个 replace,避免 O(n²))。用配对而非 [^{}]* 正则以正确处理嵌套。
51
+ // Braces-pairing scan to find top-level {...} candidate JSON segments (skipping braces
52
+ // inside string literals / escapes), returning { raw, start, end } ranges for the caller to
53
+ // strip in one pass (not one replace each, avoiding O(n²)). Pairing is used instead of a
54
+ // [^{}]* regex to correctly handle nesting.
42
55
  function scanTopLevelJsonObjects(s) {
43
56
  if (typeof s !== 'string' || s.indexOf('{') === -1) return [];
44
57
  const out = [];
@@ -58,9 +71,11 @@ function scanTopLevelJsonObjects(s) {
58
71
  return out;
59
72
  }
60
73
 
61
- // 识别 s 中的白名单协议通知 JSON:返回 { statuses:[{type,from}], rest },rest = 剔除这些 JSON 后的剩余文本。
62
- // 单次扫描 + 区间拼接(O(n)):避免对每个命中 JSON 做整串 replace 造成 O(n²)(评审 S1),同时统一原先
63
- // replace/split-join 两套剔除写法。非白名单 / 解析失败的 {...} 原样保留在 rest 中。
74
+ // Identify whitelisted protocol-notification JSON in s, returning { statuses:[{type,from}],
75
+ // rest }, where rest = the remaining text after those JSON segments are removed. A single
76
+ // scan + range splicing (O(n)) avoids the O(n²) of a whole-string replace per hit (review
77
+ // S1) and unifies the two former replace/split-join strip implementations. Non-whitelisted
78
+ // or parse-failed {...} segments are kept as-is in rest.
64
79
  function extractProtocolNotifications(s) {
65
80
  const statuses = [];
66
81
  let rest = '', cursor = 0;
@@ -77,13 +92,16 @@ function extractProtocolNotifications(s) {
77
92
  return { statuses, rest };
78
93
  }
79
94
 
80
- // 解析「裸协议通知」文本块(不含 <teammate-message> 包裹——包裹形态由 classifyUserContent 主路径处理)。
81
- // 返回 { statuses:[{type,from}], rest } null。必须带 harness 标记(前缀 / caveat)才认定为通知(见下)。
95
+ // Parse a "bare protocol notification" text block (no <teammate-message> wrapper the
96
+ // wrapped form is handled by the classifyUserContent main path). Returns
97
+ // { statuses:[{type,from}], rest } or null. It is only recognized as a notification if it
98
+ // carries a harness marker (lead / caveat) — see below.
82
99
  export function parseInterSessionNotification(text) {
83
100
  if (typeof text !== 'string') return null;
84
101
  let body = text.trim();
85
102
  if (!body) return null;
86
- // <teammate-message> 包裹,避免与 classifyUserContent 主路径重复计入
103
+ // Strip the <teammate-message> wrapper to avoid double counting with the
104
+ // classifyUserContent main path
87
105
  body = body.replace(/<teammate-message[\s\S]*?<\/teammate-message>/gi, '').trim();
88
106
  if (!body) return null;
89
107
 
@@ -93,9 +111,12 @@ export function parseInterSessionNotification(text) {
93
111
  for (const cr of INTER_SESSION_CAVEAT_RES) {
94
112
  if (cr.test(work)) { hadCaveat = true; work = work.replace(cr, ''); }
95
113
  }
96
- // 必须带 harness 标记("Another Claude session…" 前缀 caveat 段)才认定为通知。真实跨会话通知一定
97
- // 带其一(裸 <teammate-message> 包裹形态由 classifyUserContent 主路径单独处理);据此,用户「整段粘贴一坨
98
- // 协议形 JSON」绝不会被误判隐藏——彻底消除 over-filter 向量(评审 S2/F2,对齐用户「别过滤正常请求」诉求)。
114
+ // Only recognized as a notification if it carries a harness marker (the "Another Claude
115
+ // session…" lead or a caveat segment). A real cross-session notification always has one
116
+ // of them (the bare <teammate-message> wrapper is handled separately by the
117
+ // classifyUserContent main path); accordingly, a user pasting a chunk of protocol-like
118
+ // JSON is never misclassified as hidden — fully removing the over-filter vector (review
119
+ // S2/F2, aligning with the user's "don't filter normal requests" request).
99
120
  if (!hadLead && !hadCaveat) return null;
100
121
 
101
122
  const { statuses, rest } = extractProtocolNotifications(work);
@@ -104,7 +125,7 @@ export function parseInterSessionNotification(text) {
104
125
  }
105
126
 
106
127
  /**
107
- * 提取请求体中的 system prompt 文本
128
+ * Extract the system prompt text from a request body
108
129
  */
109
130
  export function getSystemText(body) {
110
131
  const system = body?.system;
@@ -119,20 +140,23 @@ export function getSystemText(body) {
119
140
  const _isTeammateCache = new WeakMap();
120
141
 
121
142
  /**
122
- * 判断请求是否为 Teammate 子进程的请求。
123
- * 支持两种检测:interceptor ���式(req.teammate 字段)和 proxy 模式(system prompt 标记)。
124
- * 全局唯一入口,与 isMainAgent 同级。
143
+ * Determine whether a request comes from a Teammate subprocess.
144
+ * Supports two detection modes: interceptor mode (req.teammate field) and proxy mode
145
+ * (system prompt marker). The single global entry point, alongside isMainAgent.
125
146
  */
126
147
  export function isTeammate(req) {
127
148
  if (!req) return false;
128
149
  const cached = _isTeammateCache.get(req);
129
150
  if (cached !== undefined) return cached;
130
- // 【最高优先级】wire agent 身份信号(x-claude-code-agent-id / cc_is_subagent,
131
- // agent-id.js)。自 Claude Code 2.1.199 起普通 subagent 也被授予 SendMessage
132
- // 工具,isNativeTeammate SendMessage 判据不再可靠——这两个信号是硬判据:
133
- // - 持久化 agent 命名形态(name@session-…)→ 一定是 Teammate;
134
- // - 持久化 agent 匿名 hex 形态 一定是 SubAgent(否决下方 SendMessage 判据);
135
- // - cc_is_subagent=true(CLI 自报 billing 标记,2.1.181+)→ 一定是 SubAgent
151
+ // [Highest priority] wire agent identity signals (x-claude-code-agent-id /
152
+ // cc_is_subagent, see agent-id.js). Since Claude Code 2.1.199 ordinary subagents are
153
+ // also granted the SendMessage tool, so isNativeTeammate's SendMessage criterion is no
154
+ // longer reliable these two signals are hard criteria:
155
+ // - persistent named agent form (name@session-…)always a Teammate;
156
+ // - persistent anonymous hex form always a SubAgent (overrides the SendMessage
157
+ // criterion below);
158
+ // - cc_is_subagent=true (CLI self-reported billing marker, 2.1.181+) → always a
159
+ // SubAgent.
136
160
  const agent = req.agent;
137
161
  if (agent) {
138
162
  if (agent.named) { _isTeammateCache.set(req, true); return true; }
@@ -140,20 +164,22 @@ export function isTeammate(req) {
140
164
  }
141
165
  const sysText = getSystemText(req.body || {});
142
166
  if (SUBAGENT_BILLING_RE.test(sysText)) { _isTeammateCache.set(req, false); return false; }
143
- // interceptor 模式:通过 process.argv 写入的 teammate 字段
167
+ // interceptor mode: teammate field written via process.argv
144
168
  if (req.teammate) { _isTeammateCache.set(req, true); return true; }
145
- // native teammate:同进程内 Agent 子代理(system prompt 包含 "You are a Claude agent")
169
+ // native teammate: in-process Agent subagent (system prompt contains "You are a Claude
170
+ // agent")
146
171
  if (isNativeTeammate(req)) {
147
- // 注入 teammate 字段供下游 requestType.js formatTeammateLabel 使用。
148
- // 持久化的 wire agent 名(x-claude-code-agent-id,见 agent-id.js)优先——
149
- // 它不依赖窗口内的注册表,冷加载/时序缺失时名字仍可靠。
172
+ // Inject the teammate field for downstream requestType.js formatTeammateLabel use.
173
+ // The persistent wire agent name (x-claude-code-agent-id, see agent-id.js) takes
174
+ // priority — it does not depend on the in-window registry, so the name stays reliable
175
+ // on cold load / timing gaps.
150
176
  if (!req.teammate) {
151
177
  req.teammate = req.agent?.agentName || extractNativeTeammateName(req) || null;
152
178
  }
153
179
  _isTeammateCache.set(req, true);
154
180
  return true;
155
181
  }
156
- // proxy 模式:通过 system prompt 检测(外部进程 teammate
182
+ // proxy mode: detect via system prompt (external-process teammate)
157
183
  const result = TEAMMATE_SYSTEM_RE.test(sysText);
158
184
  _isTeammateCache.set(req, result);
159
185
  return result;
@@ -163,8 +189,9 @@ export function isTeammate(req) {
163
189
  const _isMainAgentCache = new WeakMap();
164
190
 
165
191
  /**
166
- * 判断请求是否为 MainAgent 请求。
167
- * 包含 interceptor 标记校验 + 新旧架构检测,全局唯一入口。
192
+ * Determine whether a request is a MainAgent request.
193
+ * Combines interceptor-marker validation + old/new architecture detection; the single
194
+ * global entry point.
168
195
  */
169
196
  export function isMainAgent(req) {
170
197
  if (!req) return false;
@@ -178,38 +205,42 @@ export function isMainAgent(req) {
178
205
  function _isMainAgentImpl(req) {
179
206
  if (!req) return false;
180
207
 
181
- // Teammate 子进程的请求不是 MainAgent,避免污染主会话视图
208
+ // A Teammate subprocess request is not a MainAgent, avoiding pollution of the main
209
+ // session view
182
210
  if (isTeammate(req)) return false;
183
211
 
184
- // cc_is_subagent=true ⇒ 子代理,绝非 MainAgentcc_version 2.1.181+)。须早于下方 req.mainAgent 短路,
185
- // 以覆盖「已落盘旧日志」里被服务端标成 mainAgent=true 的记录(向后兼容:旧日志/真·主代理无此 token)。
212
+ // cc_is_subagent=true ⇒ subagent, never a MainAgent (cc_version 2.1.181+). Must precede
213
+ // the req.mainAgent short-circuit below to cover on-disk old logs whose records were
214
+ // tagged mainAgent=true by the server (backward compat: old logs / true main agents do
215
+ // not carry this token).
186
216
  if (SUBAGENT_BILLING_RE.test(getSystemText(req.body || {}))) return false;
187
217
 
188
218
  if (req.mainAgent) {
189
- // 排除被误标记的 SubAgent(旧日志兼容)
219
+ // Exclude SubAgents that were mis-tagged (old-log compatibility)
190
220
  const sysText = getSystemText(req.body || {});
191
221
  if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
192
222
  return true;
193
223
  }
194
224
 
195
- // 统一检测逻辑:支持新旧架构
225
+ // Unified detection logic: supports old and new architectures
196
226
  const body = req.body || {};
197
227
  if (!body.system || !Array.isArray(body.tools)) return false;
198
228
 
199
229
  const sysText = getSystemText(body);
200
230
 
201
- // 必须包含 MainAgent 身份标识
202
- if (!sysText.includes('You are Claude Code')) return false;
231
+ // Must contain a MainAgent identity marker (SDK-mode base prompt includes "built on
232
+ // Anthropic's Claude Agent SDK.")
233
+ if (!sysText.includes('You are Claude Code') && !sysText.includes("built on Anthropic's Claude Agent SDK")) return false;
203
234
 
204
- // 排除 SubAgent
235
+ // Exclude SubAgents
205
236
  if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
206
237
 
207
- // 新架构检测(v2.1.69+):延迟工具加载机制
238
+ // New architecture detection (v2.1.69+): deferred tool loading
208
239
  const isSystemArray = Array.isArray(body.system);
209
240
  const hasToolSearch = body.tools.some(t => t.name === 'ToolSearch');
210
241
 
211
242
  if (isSystemArray && hasToolSearch) {
212
- // 检查第一条消息是否包含 <available-deferred-tools>
243
+ // Check whether the first message contains <available-deferred-tools>
213
244
  const messages = body.messages || [];
214
245
  const firstMsgContent = messages.length > 0 ?
215
246
  (typeof messages[0].content === 'string' ? messages[0].content :
@@ -219,7 +250,8 @@ function _isMainAgentImpl(req) {
219
250
  }
220
251
  }
221
252
 
222
- // v2.1.81+: 轻量 MainAgent 初始请求工具数可能 < 10,降低阈值兼容
253
+ // v2.1.81+: a lightweight MainAgent initial request may have < 10 tools; lower the
254
+ // threshold for compatibility
223
255
  if (body.tools.length > 5) {
224
256
  const hasEdit = body.tools.some(t => t.name === 'Edit');
225
257
  const hasShell = body.tools.some(t => t.name === 'Bash' || t.name === 'PowerShell');
@@ -232,13 +264,14 @@ function _isMainAgentImpl(req) {
232
264
  return false;
233
265
  }
234
266
 
235
- // /clear checkpoint 检测:抽到独立无依赖模块,便于 node --test 直接 import。
267
+ // /clear checkpoint detection: extracted into a standalone dependency-free module so it can
268
+ // be imported directly by node --test.
236
269
  export { isPostClearCheckpoint, isCompactContinuation, isSessionBoundary } from './clearCheckpoint.js';
237
270
 
238
- // ============== 文本内容过滤 ==============
271
+ // ============== text content filtering ==============
239
272
 
240
273
  /**
241
- * 判断文本是否为 Skill 加载内容
274
+ * Determine whether text is Skill-loading content
242
275
  */
243
276
  export function isSkillText(text) {
244
277
  if (!text) return false;
@@ -246,7 +279,7 @@ export function isSkillText(text) {
246
279
  }
247
280
 
248
281
  /**
249
- * 判断文本是否为系统注入文本(不应作为用户消息展示)
282
+ * Determine whether text is system-injected text (should not be shown as a user message)
250
283
  */
251
284
  /**
252
285
  * Strip known system/command tags from a text block, returning only user-authored content.
@@ -263,24 +296,32 @@ function stripSystemTags(text) {
263
296
  .replace(/<command-args>[\s\S]*?<\/command-args>/gi, '')
264
297
  .replace(/<teammate-message[\s\S]*?<\/teammate-message>/gi, '')
265
298
  .replace(/<task-notification>[\s\S]*?<\/task-notification>/gi, '')
266
- // harness 注入队友消息轮的包裹文本:前缀行 + 尾部 IMPORTANT 免责段。
267
- // 尾段用 ^...m 多行锚定——段落必须起行才剥,用户正文中段引用该句不受影响;
268
- // 只锚定句首短语、不绑定其后的破折号/措辞(harness 微调标点不致尾段泄漏成 user 气泡)
299
+ // harness-injected wrapper text for a teammate-message round: leading line + trailing
300
+ // IMPORTANT disclaimer segment. The trailing segment uses ^...m multiline anchoring —
301
+ // a paragraph must start at a line to be stripped, so mid-body user quotes of the
302
+ // sentence are unaffected; only the opening phrase is anchored, not the dash/wording
303
+ // after it (harness punctuation tweaks must not leak the trailing segment into a user
304
+ // bubble)
269
305
  .replace(/^Another Claude session sent a message:\s*/i, '')
270
306
  .replace(/^IMPORTANT: This is NOT from your user\b[\s\S]*?(?=\n\n|$)/im, '');
271
- // 新版跨会话 caveat(多行安全:行首锚定,剥到空行 / 串尾)
307
+ // Newer cross-session caveat (multi-line safe: line-start anchored, stripped to a blank
308
+ // line / end of string)
272
309
  out = out.replace(/(^|\n)This came from another Claude session[\s\S]*?(?=\n\n|$)/i, '');
273
- // 裸协议通知 JSONidle / shutdown_* / teammate_terminated / plan_approval_*,含嵌套)——单次扫描剔除
274
- // O(n),评审 S1)。与 <teammate-message> 包裹的协议 JSON 同类,剥离后二次回收只剩用户追加正文(无则空)
310
+ // Bare protocol-notification JSON (idle / shutdown_* / teammate_terminated /
311
+ // plan_approval_*, including nesting) — stripped in a single scan (O(n), review S1).
312
+ // Same kind as the protocol JSON in a <teammate-message> wrapper; after stripping, the
313
+ // second pass recovers only the user-appended body (empty if none)
275
314
  out = extractProtocolNotifications(out).rest;
276
315
  return out.trim();
277
316
  }
278
317
 
279
- // Claude Code 内部合成 prompt 白名单(CLI 在主会话里合成的 recap/title/compact/topic/summary 查询,
280
- // HTTP role=user 但不是用户手输)。与 requestType.js Synthetic 分类共用同一白名单,
281
- // isSystemText 里统一过滤 ChatView / Mobile / DetailPanel / teamModalBuilder 全链路隐藏。
282
- // 匹配 last user message 的起首(`^` 锚定 + trim),避免误伤用户引用原文。
283
- // KEEP IN SYNC: test/synthetic-classification.test.js inline 副本。
318
+ // Claude Code internal synthetic-prompt whitelist (recap/title/compact/topic/summary
319
+ // queries the CLI synthesizes in the main session — role=user over HTTP but not
320
+ // user-typed). Shares the same whitelist as requestType.js's Synthetic classification and
321
+ // is filtered uniformly in isSystemText hidden across ChatView / Mobile / DetailPanel /
322
+ // teamModalBuilder. Matches the start of the last user message (`^` anchor + trim) to avoid
323
+ // harming user-quoted originals.
324
+ // KEEP IN SYNC: packages/core/test/synthetic-classification.test.js has an inline copy.
284
325
  export const SYNTHETIC_PROMPTS = [
285
326
  { subType: 'Recap', pattern: /^The user stepped away and is coming back\. Recap in under/i },
286
327
  { subType: 'Title', pattern: /^(Based on the above conversation, generate a|Please write a)\s+(short|concise)\s+title/i },
@@ -299,12 +340,14 @@ export function isSyntheticPromptText(text) {
299
340
  return false;
300
341
  }
301
342
 
302
- // UltraPlan 输入识别:UltraPlanModal / CLI /ultraplan 都会把 ultraplanTemplates.js
303
- // 组装的 <system-reminder>[SCOPED INSTRUCTION]…</system-reminder> 模板前置到用户 prompt。
304
- // marker 仅由 ultraplanTemplates.js 产出,故可作为「本轮是 UltraPlan 输入」的可靠信号。
305
- // stripSystemTags 会剥掉该块,所以必须在原始(未剥离)文本上判断;用负向前瞻确保 marker
306
- // 出现在同一个 <system-reminder>…</system-reminder> 块内部(不跨过闭合标签),避免用户正文里
307
- // 在某个无关 reminder 之后只是「提到」该短语时误判。
343
+ // UltraPlan input detection: UltraPlanModal / the CLI /ultraplan both prepend the
344
+ // <system-reminder>[SCOPED INSTRUCTION]…</system-reminder> template assembled by
345
+ // ultraplanTemplates.js to the user prompt. Only ultraplanTemplates.js produces this
346
+ // marker, so it is a reliable "this round is UltraPlan input" signal. stripSystemTags would
347
+ // strip the block, so detection must run on the raw (unstripped) text; a negative
348
+ // lookahead ensures the marker sits inside the same <system-reminder>…</system-reminder>
349
+ // block (without crossing the closing tag), avoiding a false positive when the user body
350
+ // merely "mentions" the phrase after some unrelated reminder.
308
351
  export function isUltraplanText(text) {
309
352
  if (!text || typeof text !== 'string') return false;
310
353
  return /<system-reminder>(?:(?!<\/system-reminder>)[\s\S])*?\[SCOPED INSTRUCTION\]/i.test(text);
@@ -314,53 +357,66 @@ export function isSystemText(text) {
314
357
  if (!text) return true;
315
358
  const trimmed = text.trim();
316
359
  if (!trimmed) return true;
317
- // 包含 plan 内容的文本块不应被过滤(即使开头有系统标签)
360
+ // A text block containing plan content should not be filtered (even with system tags at
361
+ // the start)
318
362
  if (/Implement the following plan:/i.test(trimmed)) return false;
319
363
  if (/^<[a-zA-Z_][\w-]*[\s>]/i.test(trimmed)) return true;
320
364
  if (/^\[SUGGESTION MODE:/i.test(trimmed)) return true;
321
- // Claude Code 输出截断时注入的系统消息
365
+ // System message injected when Claude Code truncates its output
322
366
  if (/^Your response was cut off because it exceeded the output token limit/i.test(trimmed)) return true;
323
- // Skill 加载的文档内容
367
+ // Skill-loaded document content
324
368
  if (/^Base directory for this skill:/i.test(trimmed)) return true;
325
- // CLI 内部合成 prompt(Recap/Title/Compact/Topic/Summary
369
+ // CLI-internal synthetic prompts (Recap/Title/Compact/Topic/Summary)
326
370
  if (isSyntheticPromptText(trimmed)) return true;
327
- // harness 注入的队友消息轮:包裹文本(前缀 + 尾部 IMPORTANT 段)非用户手输,
328
- // teammate 内容本身经 classifyUserContent 提取为 teammateBlocks 独立渲染
371
+ // harness-injected teammate-message round: the wrapped text (lead + trailing IMPORTANT
372
+ // segment) is not user-typed; the teammate content itself is extracted by
373
+ // classifyUserContent into teammateBlocks and rendered separately
329
374
  if (/^Another Claude session sent a message:/i.test(trimmed)) return true;
330
- // 裸协议通知(直接以协议 JSON 起头、无 "Another Claude session" 前缀):必须 parseInterSessionNotification
331
- // 命中白名单协议 JSON 才算系统文本——粘贴非协议 JSON / 含追加正文不会被误吞。caveat 是尾部 chrome
332
- // (真实形态总是 JSON 在前、caveat 在后),故「起头即 caveat」的块视为用户正文,防整段消失(评审 F1);
333
- // caveat chrome 在确为通知的块内由 parse / stripSystemTags 处理。
375
+ // Bare protocol notification (starts directly with protocol JSON, no "Another Claude
376
+ // session" lead): only counted as system text when parseInterSessionNotification matches
377
+ // whitelisted protocol JSON pasted non-protocol JSON / bodies with appended text are
378
+ // not swallowed. The caveat is trailing chrome (the real form always has JSON first,
379
+ // caveat after), so a block that "starts with a caveat" is treated as user body to
380
+ // prevent the whole block from disappearing (review F1); its caveat chrome is handled by
381
+ // parse / stripSystemTags within blocks confirmed as notifications.
334
382
  if (trimmed.startsWith('{') && parseInterSessionNotification(trimmed)) return true;
335
- // 用户拒绝 tool / 中断 Claude CLI 注入的占位 user message —— 与上方 "✗ 已拒绝" badge 语义重复
336
- // 涵盖历史变体:"[Request interrupted by user for tool use]"、"[Request interrupted by user]"、"[Request interrupted...]"
383
+ // Placeholder user message the CLI injects when the user rejects a tool / interrupts
384
+ // Claude semantically duplicates the "✗ rejected" badge above. Covers the historical
385
+ // variants: "[Request interrupted by user for tool use]", "[Request interrupted by
386
+ // user]", "[Request interrupted...]"
337
387
  if (/^\[Request interrupted/i.test(trimmed)) return true;
338
388
  return false;
339
389
  }
340
390
 
341
- // 字符串型 user/assistant message 的「可显示正文」。忠实镜像 classifyUserContent 的两段语义
342
- // classifyUserContent 内「首过滤 + stripSystemTags 二次回收」两步),只是作用于字符串:
343
- // Pass1:非系统文本 原样返回(保留用户正文中段引用的成对标签,与当前行为逐字一致,零回归);
344
- // Pass2:系统块(以 chrome 标签起首等被 isSystemText 判真)→ 剥掉已知 chrome 后再判,仍是真实正文则
345
- // 返回剥离后正文,否则 ''(应隐藏)。
346
- // 解决「系统标签起首 + 真实正文」字符串被 isSystemText 整条吞掉(数组路径有此回收,字符串路径原先没有)。
347
- // 注意:用户手打未闭合 <system-reminder>(无配对)仍判系统文本而隐藏——沿用当前行为,本函数不改变它。
391
+ // The "displayable body" of a string-typed user/assistant message. Faithfully mirrors the
392
+ // two-pass semantics of classifyUserContent (its "first filter + stripSystemTags second
393
+ // recovery" steps), but operating on a string:
394
+ // Pass1: non-system text returned as-is (preserving paired tags quoted mid-body by the
395
+ // user, word-for-word identical to current behavior, zero regression);
396
+ // Pass2: system blocks (judged true by isSystemText, e.g. starting with chrome tags) →
397
+ // strip known chrome, then re-judge; return the stripped body if it is still real
398
+ // body, otherwise '' (should be hidden).
399
+ // Fixes the case where a "system-tag-prefixed + real body" string was fully swallowed by
400
+ // isSystemText (the array path had this recovery; the string path previously did not).
401
+ // Note: a user-typed unclosed <system-reminder> (no pairing) is still judged system text
402
+ // and hidden — that current behavior is preserved; this function does not change it.
348
403
  export function extractDisplayText(str) {
349
404
  if (typeof str !== 'string' || !str.trim()) return '';
350
- if (!isSystemText(str)) return str; // Pass1:已是用户文本,原样
351
- const recovered = stripSystemTags(str); // Pass2:二次回收
405
+ if (!isSystemText(str)) return str; // Pass1: already user text, as-is
406
+ const recovered = stripSystemTags(str); // Pass2: second-pass recovery
352
407
  return (recovered && !isSystemText(recovered)) ? recovered : '';
353
408
  }
354
409
 
355
410
  /**
356
- * user message content 数组中分类提取各类文本块。
357
- * @param {Array} content — message.content 数组
411
+ * Classify and extract the various text blocks from a user message's content array.
412
+ * @param {Array} content — the message.content array
358
413
  * @returns {{ commands: string[], textBlocks: Array, skillBlocks: Array, teammateBlocks: Array, taskNotificationBlocks: Array }}
359
- * commands — 提取到的 slash command 名称(如 "/clear"
360
- * textBlocks — 过滤后的普通用户文本块(不含系统文本、command 块、skill 块)
361
- * skillBlocks — skill 加载的文本块
362
- * teammateBlocks teammate-message 解析块
363
- * taskNotificationBlocks task-notification 解析块
414
+ * commands — extracted slash command names (e.g. "/clear")
415
+ * textBlocks — filtered plain user text blocks (no system text, command
416
+ * blocks, or skill blocks)
417
+ * skillBlocks skill-loaded text blocks
418
+ * teammateBlocks parsed teammate-message blocks
419
+ * taskNotificationBlocks — parsed task-notification blocks
364
420
  */
365
421
  export function classifyUserContent(content) {
366
422
  if (!Array.isArray(content)) return { commands: [], textBlocks: [], skillBlocks: [], teammateBlocks: [], taskNotificationBlocks: [] };
@@ -401,17 +457,22 @@ export function classifyUserContent(content) {
401
457
  }
402
458
  }
403
459
 
404
- // 裸协议通知(未包 <teammate-message>):harness 注入的 idle / shutdown_* / teammate_terminated /
405
- // plan_approval_* 等,提取为 teammate 状态气泡(与包裹形态同渲染)。按 status|from 去重,避免与上面
406
- // 包裹形态在「同块既有包裹又有裸 JSON」的极端场景下重复出气泡。
460
+ // Bare protocol notification (not wrapped in <teammate-message>): harness-injected idle /
461
+ // shutdown_* / teammate_terminated / plan_approval_* etc., extracted as teammate status
462
+ // bubbles (rendered the same as the wrapped form). Deduped by status|from to avoid a
463
+ // duplicate bubble alongside the wrapped form in the extreme case where one block has
464
+ // both a wrapper and bare JSON.
407
465
  const seenStatus = new Set(teammateBlocks.filter(t => t.status).map(t => `${t.status}|${t.statusFrom}`));
408
466
  for (const b of content) {
409
467
  if (b.type !== 'text') continue;
410
468
  const txt = b.text || '';
411
- if (!txt.includes('"type"')) continue; // 廉价早退:协议通知必含 JSON "type"
412
- // 仅对「通知起头」的块出状态气泡(与 isSystemText 的隐藏条件对齐:前缀 lead 或 裸 JSON 起头)。
413
- // 用户在正文里引用 / 转贴整条通知(caveat 起头、prose 起头)→ 该块仍是 user 气泡,不再额外塞一个
414
- // 幽灵状态气泡,也不会双重渲染(评审 qa-A / auditor-F1)。
469
+ if (!txt.includes('"type"')) continue; // cheap early exit: a protocol notification must
470
+ // contain JSON's "type"
471
+ // Only emit a status bubble for blocks that "start with a notification" (aligned with
472
+ // isSystemText's hide condition: lead prefix or bare-JSON start). A user quoting /
473
+ // reposting a whole notification in their body (caveat-start, prose-start) keeps that
474
+ // block as a user bubble — no extra ghost status bubble, no double rendering (review
475
+ // qa-A / auditor-F1).
415
476
  const head = txt.trimStart();
416
477
  if (!head.startsWith('{') && !INTER_SESSION_LEAD_RE.test(head)) continue;
417
478
  const note = parseInterSessionNotification(txt);
@@ -456,7 +517,7 @@ export function classifyUserContent(content) {
456
517
 
457
518
  const hasCommand = content.some(b => b.type === 'text' && /<command-message>/i.test(b.text || ''));
458
519
 
459
- // 提取 slash command 名称
520
+ // Extract slash command names
460
521
  const commands = [];
461
522
  if (hasCommand) {
462
523
  for (const b of content) {
@@ -469,13 +530,14 @@ export function classifyUserContent(content) {
469
530
  }
470
531
  }
471
532
 
472
- // 过滤出非系统文本块
533
+ // Filter out non-system text blocks
473
534
  let textBlocks = content.filter(b => b.type === 'text' && !isSystemText(b.text));
474
535
 
475
- // 二次提取:从被过滤的系统块中提取嵌入的用户文本
476
- // (e.g., /ultraplan skill 指令和用户输入合并在同一 <system-reminder> 块中)
477
- // stripSystemTags 后再过一次 isSystemText —— 避免对 [Request interrupted ...] 这种纯标记
478
- // 文本(无可剥离 XML)误回收成用户气泡
536
+ // Second-pass extraction: recover user text embedded in filtered system blocks
537
+ // (e.g., /ultraplan merges the skill instruction and the user input into the same
538
+ // <system-reminder> block). Run isSystemText once more after stripSystemTags to avoid
539
+ // wrongly recovering pure-marker text like [Request interrupted ...] (nothing stripable)
540
+ // back into a user bubble
479
541
  for (const b of content) {
480
542
  if (b.type !== 'text' || !isSystemText(b.text)) continue;
481
543
  const userText = stripSystemTags(b.text);
@@ -484,18 +546,21 @@ export function classifyUserContent(content) {
484
546
  }
485
547
  }
486
548
 
487
- // 过滤掉 command 相关块
549
+ // Filter out command-related blocks
488
550
  if (hasCommand) {
489
551
  textBlocks = textBlocks.filter(b => !/<command-message>/i.test(b.text || ''));
490
552
  }
491
553
 
492
- // skill 文本(isSkillText)必然先被 isSystemText 的同一正则("Base directory for this skill:")
493
- // 过滤,textBlocks 两条进入路径(初次过滤/二次回收)都要求 !isSystemText,故 skill 块不可能
494
- // 出现在 textBlocks 中;保留 skillBlocks 键以维持返回 shape(ChatView/ImConversationModal 消费)。
554
+ // Skill text (isSkillText) is necessarily filtered first by the same regex in isSystemText
555
+ // ("Base directory for this skill:"), and both textBlocks entry paths (initial filter /
556
+ // second-pass recovery) require !isSystemText, so a skill block can never appear in
557
+ // textBlocks; the skillBlocks key is kept to preserve the returned shape (consumed by
558
+ // ChatView/ImConversationModal).
495
559
  const skillBlocks = [];
496
560
 
497
- // 本轮是否为 UltraPlan 输入(原始文本仍含 <system-reminder>[SCOPED INSTRUCTION] marker,
498
- // 此时尚未被 stripSystemTags 剥离)。消费方(ChatView)据此在用户气泡上方渲染 [UltraPlan] 标签。
561
+ // Whether this round is UltraPlan input (the raw text still contains the
562
+ // <system-reminder>[SCOPED INSTRUCTION] marker, not yet stripped by stripSystemTags).
563
+ // Consumers (ChatView) use this to render an [UltraPlan] tag above the user bubble.
499
564
  const ultraplan = Array.isArray(content)
500
565
  && content.some(b => b && b.type === 'text' && isUltraplanText(b.text));
501
566
 
@@ -503,8 +568,8 @@ export function classifyUserContent(content) {
503
568
  }
504
569
 
505
570
  /**
506
- * teammate 请求的 messages 中提取名字。
507
- * 扫描 SendMessage tool_result,查找 routing.sender 字段。
571
+ * Extract a name from a teammate request's messages.
572
+ * Scans the SendMessage tool_result for the routing.sender field.
508
573
  */
509
574
  export function extractTeammateName(body) {
510
575
  const msgs = body?.messages;
@@ -528,9 +593,9 @@ export function extractTeammateName(body) {
528
593
  return null;
529
594
  }
530
595
 
531
- // ============== Teammate 名称解析(prompt 内容匹配)==============
596
+ // ============== Teammate name resolution (prompt content matching) ==============
532
597
 
533
- // 持久化注册表:Agent tool_use prompt 前缀 → teammate name
598
+ // Persistent registry: Agent tool_use prompt prefix → teammate name
534
599
  const _promptRegistry = new Map();
535
600
  // Requests whose response has been scanned for Agent tool_use blocks. A request
536
601
  // is only added once its response is present, so a spawn turn that completes
@@ -539,14 +604,14 @@ const _promptRegistry = new Map();
539
604
  // cursor skipped it forever. WeakSet cannot be cleared, so it is recreated on
540
605
  // session switch.
541
606
  let _registryScanned = new WeakSet();
542
- // 用首条请求的 timestamp 标识会话,切换时自动 reset
607
+ // Identify the session by the first request's timestamp; auto-reset on switch
543
608
  let _registrySessionKey = null;
544
609
 
545
610
  const PROMPT_PREFIX_LEN = 60;
546
611
  const TM_TAG_RE = /<teammate-message[^>]*>/;
547
612
 
548
613
  /**
549
- * teammate 首条 user message 中提取 <teammate-message> 后的 prompt 内容。
614
+ * Extract the prompt content after <teammate-message> from a teammate's first user message.
550
615
  */
551
616
  function _extractSpawnPrompt(req) {
552
617
  const msgs = req.body?.messages;
@@ -570,8 +635,9 @@ function _extractSpawnPrompt(req) {
570
635
  }
571
636
 
572
637
  /**
573
- * v2.1.90+ Agent 模式:native teammate 的首条 user message raw prompt(无 <teammate-message> 包装)。
574
- * 直接提取首条 user message 文本内容用于 prompt prefix 匹配。
638
+ * v2.1.90+ Agent mode: a native teammate's first user message is a raw prompt (no
639
+ * <teammate-message> wrapper). Extract the first user message's text directly for prompt
640
+ * prefix matching.
575
641
  */
576
642
  function _extractRawPrompt(req) {
577
643
  const msgs = req.body?.messages;
@@ -588,16 +654,16 @@ function _extractRawPrompt(req) {
588
654
  }
589
655
 
590
656
  /**
591
- * 预扫描 requests,通过匹配 MainAgent Agent tool_use prompt
592
- * native teammate 的首条消息内容,注入 req.teammate 名字。
657
+ * Pre-scan requests and inject req.teammate names by matching the MainAgent's Agent
658
+ * tool_use prompt against a native teammate's first message content.
593
659
  *
594
- * 必须在 classifyRequest 之前调用(classifyRequest 结果有 WeakMap 缓存)。
595
- * 版本兼容:已有 req.teammateinterceptor 模式)的请求不受影响。
660
+ * Must be called before classifyRequest (its result is WeakMap-cached). Version compatible:
661
+ * requests that already have req.teammate (interceptor mode) are unaffected.
596
662
  */
597
663
  export function resolveTeammateNames(requests) {
598
664
  if (!Array.isArray(requests) || requests.length === 0) return;
599
665
 
600
- // 通过首条请求的 timestamp 检测会话切换,自动 reset
666
+ // Detect session switch via the first request's timestamp; auto-reset
601
667
  const sessionKey = requests[0]?.timestamp || null;
602
668
  if (sessionKey !== _registrySessionKey) {
603
669
  _promptRegistry.clear();
@@ -628,22 +694,22 @@ export function resolveTeammateNames(requests) {
628
694
 
629
695
  if (_promptRegistry.size === 0) return;
630
696
 
631
- // Step 2: 为缺少名字的 native/proxy teammate 注入 req.teammate
697
+ // Step 2: inject req.teammate for native/proxy teammates that lack a name
632
698
  for (const req of requests) {
633
699
  if (req.teammate) continue;
634
700
  if (!isNativeTeammate(req) && !TEAMMATE_SYSTEM_RE.test(getSystemText(req.body || {}))) continue;
635
701
 
636
702
  let prompt = _extractSpawnPrompt(req);
637
- // v2.1.90+ Agent 模式 fallback:无 <teammate-message> 时尝试 raw prompt
703
+ // v2.1.90+ Agent mode fallback: try the raw prompt when there is no <teammate-message>
638
704
  if (!prompt && isNativeTeammate(req)) prompt = _extractRawPrompt(req);
639
705
  if (!prompt) continue;
640
706
  const prefix = prompt.slice(0, PROMPT_PREFIX_LEN);
641
707
 
642
- // 精确前缀匹配
708
+ // Exact prefix match
643
709
  const name = _promptRegistry.get(prefix);
644
710
  if (name) {
645
711
  req.teammate = name;
646
- // 清除可能已缓存的 classifyRequest 结果(subType null 的旧缓存)
712
+ // Clear any possibly-cached classifyRequest result (the old cache with subType null)
647
713
  if (req._cachedTeammateName === null) req._cachedTeammateName = name;
648
714
  }
649
715
  }