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,482 +0,0 @@
1
- // Wire format 协议详见 docs/WIRE_FORMAT.md(applyInPlaceLastMsgReplace 信号驱动短路是其客户端唯一消费方)
2
- import { isSessionBoundary, isPostClearCheckpoint } from './clearCheckpoint.js';
3
- import { getEffectiveModel } from './effectiveModel.js';
4
-
5
- /**
6
- * 给一组 messages 赋 `_timestamp` 和 `_generatedTs`。
7
- *
8
- * 背景:cc-viewer 通过下一次 API 请求的 body.messages 才能感知到上一次的 assistant 响应。
9
- * 旧逻辑给所有新增 message 统一赋 `entry.timestamp`,导致 assistant msg 的 _timestamp 是
10
- * "下一次 request 的 ts",bubble 显示时间晚一拍。helpers.js:resolveProducerModelInfo 用
11
- * `idx-1` hack 修了 model icon,但 bubble 时间标签没修。
12
- *
13
- * 修法:保留 `_timestamp` 语义不变(仍然是 "carrier entry's ts",所有现有消费者依赖此),
14
- * 给 assistant 角色的新增 message 额外赋 `_generatedTs = prevMainAgentTs`(生成时 entry 的 ts),
15
- * ChatMessage 显示 bubble 时优先用 `_generatedTs ?? _timestamp`。
16
- *
17
- * @param {Array} messages 当前 entry 的 messages 数组(in-place mutate)
18
- * @param {Array} prevMessages 上一次 mainAgentSessions 的 last session.messages
19
- * @param {boolean} isNewSession 是否触发新 session(postClearCheckpoint / 用户切换 / 长度骤降)
20
- * @param {number} prevCount prevMessages.length(缓存)
21
- * @param {string} currentTs 当前 entry.timestamp
22
- * @param {string|null} prevMainAgentTs 上一次 mainAgent entry 的 timestamp,无则 null
23
- * @returns {Array} messages(原数组引用)
24
- */
25
- export function assignMessageTimestamps(messages, prevMessages, isNewSession, prevCount, currentTs, prevMainAgentTs) {
26
- if (!Array.isArray(messages)) return messages;
27
- for (let i = 0; i < messages.length; i++) {
28
- const m = messages[i];
29
- if (!m) continue;
30
- if (!isNewSession && i < prevCount && prevMessages[i] && prevMessages[i]._timestamp) {
31
- // 历史 message:继承 prev 的 _timestamp 和 _generatedTs(如有)
32
- m._timestamp = prevMessages[i]._timestamp;
33
- if (prevMessages[i]._generatedTs) {
34
- m._generatedTs = prevMessages[i]._generatedTs;
35
- }
36
- } else if (!m._timestamp) {
37
- // 新增 message:赋 currentTs;assistant 角色额外赋 _generatedTs
38
- m._timestamp = currentTs;
39
- if (m.role === 'assistant' && prevMainAgentTs) {
40
- m._generatedTs = prevMainAgentTs;
41
- }
42
- } else if (m.role === 'assistant' && !m._generatedTs && prevMainAgentTs) {
43
- // 已有 _timestamp 但缺 _generatedTs(混合输入:部分 entry 来自旧版本):补 _generatedTs
44
- // Synthetic v2 messages carry their own _generatedTs (stamped by the
45
- // normalizer), so they never reach this branch.
46
- m._generatedTs = prevMainAgentTs;
47
- }
48
- }
49
- return messages;
50
- }
51
-
52
- /**
53
- * 解析 bubble 对应的"生产请求 ts" —— 双向映射 msg ↔ request 的 lookup key。
54
- *
55
- * 语义对齐:
56
- * - assistant msg:体现"哪次 API 调用 *生成* 此 response" → `_generatedTs` (= 上一次 mainAgent ts,
57
- * 即真正产出该 content 的 request 的 ts)。fallback 到 `_timestamp` 兼容旧 cache / 首条 entry。
58
- * - user / 其他 role:体现"哪次 API 调用 *承载* 此 input" → `_timestamp` (carrier,本就 = 该请求自身 ts)。
59
- *
60
- * 用途:
61
- * - ChatView reqIdx = tsToIndex[resolveBubbleProducerTs(msg)] —— "查看请求"按钮跳到 producer
62
- * - ChatView 网络报文→对话反向跳转 highlight 的 tsItemMap key 走 m.props.displayTs || m.props.timestamp
63
- * (assistant bubble 已收 displayTs={msg._generatedTs},等价 producer ts)
64
- *
65
- * 不影响:`_timestamp` 作 carrier 语义(resolveModelInfo / 时间排序 / dedup key 等消费者保持不变)。
66
- *
67
- * @param {object} msg lastSession.messages[i]
68
- * @returns {string|null}
69
- */
70
- export function resolveBubbleProducerTs(msg) {
71
- if (!msg) return null;
72
- if (msg.role === 'assistant') return msg._generatedTs || msg._timestamp || null;
73
- return msg._timestamp || null;
74
- }
75
-
76
- /**
77
- * 取会话的「稳定 id」—— 一致的会话身份。
78
- *
79
- * 首条消息的 `_timestamp`(= 会话起点 ts,首次赋值后不再变),它同时等于
80
- * `entry._sessionId` / `AppBase._currentSessionId`(该会话为当前会话时)。
81
- *
82
- * 注意:**不要用 `session.entryTimestamp`** —— 它在每次 mergeMainAgentSessions 时被改写为
83
- * 最新 entry 的 ts(sessionMerge.js),会漂移,不能作身份。仅作 messages 缺失时的兜底。
84
- *
85
- * @param {object} session
86
- * @returns {string|null}
87
- */
88
- export function getSessionStableId(session) {
89
- if (!session) return null;
90
- const first = session.messages && session.messages[0];
91
- return (first && first._timestamp) || session.sessionId || null;
92
- }
93
-
94
- /**
95
- * Latest-ACTIVITY timestamp of a session — the counterpart of getSessionStableId.
96
- * Stable id answers "which session is this?"; activity ts answers "when did this
97
- * session last receive an entry?". `entryTimestamp` is rewritten to the newest
98
- * merged entry's ts on every mergeMainAgentSessions call — that drift makes it
99
- * unusable as identity but exactly right for recency.
100
- *
101
- * ISO-8601 strings from toISOString() compare correctly with `<`/`>` (fixed-width
102
- * UTC).
103
- *
104
- * @param {object} session
105
- * @returns {string|null}
106
- */
107
- export function getSessionActivityTs(session) {
108
- if (!session) return null;
109
- if (session.entryTimestamp) return session.entryTimestamp;
110
- const msgs = session.messages;
111
- const last = msgs && msgs.length ? msgs[msgs.length - 1] : null;
112
- return (last && last._timestamp) || getSessionStableId(session);
113
- }
114
-
115
- /**
116
- * Pick the session with the newest activity.
117
- *
118
- * Used by the "only show current session" pin to decide what "current" means.
119
- * mainAgentSessions is ordered by insertion, never by time — with interleaved
120
- * multi-terminal sessions or a truncated reconnect replay, the LAST list element
121
- * is frequently an old session, so "last element == current" does not hold.
122
- *
123
- * A null activity ts never wins over a real timestamp (a session missing every
124
- * timestamp source must not hijack the pick from a genuinely newer session).
125
- * Ties resolve to the LATER list position. When NO session has a usable
126
- * timestamp, degrade to the last element.
127
- *
128
- * @param {Array} sessions - mainAgentSessions
129
- * @returns {object|null}
130
- */
131
- export function getLatestSessionByActivity(sessions) {
132
- if (!Array.isArray(sessions) || sessions.length === 0) return null;
133
- let best = null;
134
- let bestTs = null;
135
- for (const s of sessions) {
136
- if (!s) continue;
137
- const ts = getSessionActivityTs(s);
138
- if (ts === null) continue;
139
- if (bestTs === null || ts >= bestTs) {
140
- best = s;
141
- bestTs = ts;
142
- }
143
- }
144
- if (best) return best;
145
- return sessions[sessions.length - 1] || null;
146
- }
147
-
148
- /**
149
- * Pure decision for adopting a server-side pin during hydrate (page load, project
150
- * switch, SSE reconnect) or a `session_pin` broadcast.
151
- *
152
- * The server pin is just a persisted pointer — after idle/restart it can point at
153
- * an older logical session (or have been poisoned by a client that derived a wrong
154
- * latest). When "only show current session" is ON and we can already derive the
155
- * latest session locally, the derived value is authoritative and a mismatching
156
- * remote value is rejected. When the toggle is off, or sessions haven't loaded yet
157
- * (no derived id), the remote value is adopted as-is.
158
- *
159
- * @param {*} remoteId - raw pinnedSessionId from the server (string|null|undefined)
160
- * @param {string|null} derivedLatestId - getSessionStableId(getLatestSessionByActivity(...))
161
- * @param {boolean} onlyCurrentSession - effective toggle value
162
- * @returns {{adopt: boolean, value: string|null}} adopt=false means "keep/derive
163
- * locally"; value is then the derived latest for reference.
164
- */
165
- export function resolveHydratedPin(remoteId, derivedLatestId, onlyCurrentSession) {
166
- const remote = (typeof remoteId === 'string' && remoteId) ? remoteId : null;
167
- if (!onlyCurrentSession) return { adopt: true, value: remote };
168
- if (!derivedLatestId) return { adopt: true, value: remote };
169
- return remote === derivedLatestId
170
- ? { adopt: true, value: remote }
171
- : { adopt: false, value: derivedLatestId };
172
- }
173
-
174
- /**
175
- * Async orchestration of one pin-hydrate round, extracted from AppBase._hydratePin
176
- * so the race-sensitive ordering is unit-testable without React:
177
- *
178
- * 1. Await the server pin; if this round was superseded (isCurrent() false —
179
- * a newer hydrate started, e.g. project switch or another reconnect), bail
180
- * out WITHOUT touching the gate: the newer round owns it.
181
- * 2. Decide via resolveHydratedPin. Adopt → adopt(value) only on change.
182
- * Reject with the local pin ALREADY at the derived latest → persistLocal():
183
- * the follow-latest self-heal below won't change state in that case, so it
184
- * would never POST, and a poisoned server-side pin file would survive.
185
- * 3. finally (still current): clearGate() BEFORE selfHeal() — follow-latest
186
- * early-outs while the gate is up, so the inverted order is a silent no-op
187
- * and a stale pin would stick until the next stream activity.
188
- *
189
- * @param {object} deps
190
- * @param {() => Promise<*>} deps.fetchPin - resolves to raw remote pinnedSessionId
191
- * @param {() => boolean} deps.isCurrent - false when a newer hydrate superseded this one
192
- * @param {() => string|null} deps.getDerived - derived latest stable id (at resolve time)
193
- * @param {() => boolean} deps.effOnly - effective "only show current session" toggle
194
- * @param {() => string|null} deps.getLocalPin - current local pin state
195
- * @param {(value: string|null) => void} deps.adopt - apply a remote pin value locally
196
- * @param {() => void} deps.persistLocal - POST the current local pin to the server
197
- * @param {() => void} deps.clearGate - clear the "hydrate in flight" gate
198
- * @param {() => void} deps.selfHeal - re-run follow-latest (AppBase._maintainPinState)
199
- * @returns {Promise<void>}
200
- */
201
- export async function runPinHydration({ fetchPin, isCurrent, getDerived, effOnly, getLocalPin, adopt, persistLocal, clearGate, selfHeal }) {
202
- try {
203
- const remote = await fetchPin();
204
- if (!isCurrent()) return;
205
- const r = resolveHydratedPin(remote, getDerived(), effOnly());
206
- if (r.adopt) {
207
- if (r.value !== getLocalPin()) adopt(r.value);
208
- } else if (getLocalPin() === r.value) {
209
- persistLocal();
210
- }
211
- } catch {
212
- // Network/JSON errors: nothing to adopt; fall through so the gate is cleared.
213
- } finally {
214
- if (isCurrent()) {
215
- clearGate();
216
- selfHeal();
217
- }
218
- }
219
- }
220
-
221
- /**
222
- * Batch-path boundary + timestamp state machine, extracted from
223
- * AppBase._processOneEntry so the session-segmentation logic is unit-testable
224
- * and shares isSessionBoundary with the live SSE path (_flushPendingEntries).
225
- * Two deliberate deltas vs the old inlined block: the shared predicate adds the
226
- * /compact exclusion the batch path lacked, and a truncation branch (below)
227
- * realigns the positional accumulators after a compact rewrite.
228
- *
229
- * Mutates `st` in place (same contract as before extraction):
230
- * st.timestamps / st.generatedTimestamps - positional ts accumulators
231
- * st.currentSessionId - stable id of the session being accumulated
232
- * st.prevUserId / st.prevMainAgentTs - carry-over between entries
233
- * and stamps `_timestamp` / `_generatedTs` onto entry.body.messages.
234
- *
235
- * @param {object} st - batch accumulator state
236
- * @param {object} entry - mainAgent entry with body.messages array
237
- * @returns {void}
238
- */
239
- export function applyBatchEntryTimestamps(st, entry) {
240
- const messages = entry.body.messages;
241
- const count = entry._messageCount || messages.length;
242
- const userId = entry.body.metadata?.user_id || null;
243
- const timestamp = entry.timestamp || new Date().toISOString();
244
-
245
- const prevCount = st.timestamps.length;
246
- // Post-/clear checkpoints must always start a new session (bypass the transient
247
- // filter below), otherwise the first count=1 entry after a delta rebuild would
248
- // be swallowed and its _timestamp stolen by the next count>4 entry.
249
- const postClearCheckpoint = isPostClearCheckpoint(entry, prevCount);
250
- // V2 transcript synthetic entries pre-stamp per-message _timestamp/_generatedTs
251
- // with the real row timestamps; the positional overwrites below would flatten
252
- // every message to entry.timestamp, so they become protective for synthetics.
253
- const isSyntheticV2 = entry._syntheticV2 === true;
254
- const epoch = entry._seqEpoch || null;
255
- const epochChanged = !!(epoch && st.prevEpoch && epoch !== st.prevEpoch);
256
- // A synthetic v2 entry is a complete /clear-segmented session — always a new
257
- // session (its _seqEpoch is a definitive boundary marker), even when the
258
- // count-based heuristics would call it a continuation.
259
- const isNewSession = isSyntheticV2 || isSessionBoundary(entry, { prevCount, count, prevUserId: st.prevUserId, userId, prevEpoch: st.prevEpoch, epoch });
260
- // Transient protection: very short entries (<=4 msgs) after a long conversation
261
- // are usually in-flight requests (request body only, no response yet) and must
262
- // not reset the accumulated timestamps. Real /clear starts AND epoch changes
263
- // (task B: a definitive new session, even when short) are exempt.
264
- // A synthetic v2 entry is never transient — it is a complete /clear-segmented
265
- // session, so it must start a session even right after a long legacy one.
266
- const isTransient = !isSyntheticV2 && isNewSession && !postClearCheckpoint && !epochChanged && count <= 4 && prevCount > 4 && count < prevCount * 0.5;
267
- if (isNewSession && !isTransient) {
268
- st.currentSessionId = timestamp;
269
- st.timestamps = [];
270
- st.generatedTimestamps = [];
271
- st.prevMainAgentTs = null; // new session start: reset to avoid cross-session bleed
272
- } else if (st.currentSessionId === null) {
273
- st.currentSessionId = timestamp;
274
- } else if (entry._compactContinuation === true && count < st.timestamps.length) {
275
- // /compact continuation (same session, NOT a boundary): the conversation was
276
- // rewritten to a shorter message list. Truncate the positional accumulators so
277
- // messages appended after the compact get fresh timestamps — mirroring the live
278
- // path, where merge rebuilds lastSession.messages to the compact entry's list.
279
- // Without this, positions beyond `count` keep inheriting hours-old ts until the
280
- // conversation regrows past the pre-compact length.
281
- st.timestamps.length = count;
282
- st.generatedTimestamps.length = count;
283
- }
284
- // Extend the two parallel arrays; new positions take this entry's ts and record
285
- // the previous mainAgent ts as their "generated at" ts.
286
- // Note: role-gating happens in the inner loop (not at push time) — in the offline
287
- // batch path this entry may be _slimmed (body.messages=[]) with only _messageCount,
288
- // so messages[j] can be undefined here.
289
- for (let j = st.timestamps.length; j < count; j++) {
290
- st.timestamps.push(timestamp);
291
- st.generatedTimestamps.push(st.prevMainAgentTs || null);
292
- }
293
- if (messages.length > 0) {
294
- for (let j = 0; j < messages.length; j++) {
295
- const m = messages[j];
296
- if (!m) continue;
297
- if (!isSyntheticV2 || m._timestamp == null) m._timestamp = st.timestamps[j];
298
- if (m.role === 'assistant' && st.generatedTimestamps[j] && (!isSyntheticV2 || m._generatedTs == null)) {
299
- m._generatedTs = st.generatedTimestamps[j];
300
- }
301
- }
302
- }
303
- st.prevUserId = userId;
304
- st.prevEpoch = epoch; // carry v2 session epoch for the next entry's boundary check
305
- // Remember this entry's ts as the next entry's prevMainAgentTs.
306
- st.prevMainAgentTs = timestamp;
307
- }
308
-
309
- /**
310
- * 解析「仅展示当前会话」锁定下,实际传给 ChatView 的会话切片。
311
- *
312
- * 策略:把 mainAgentSessions 切到「以 pin 会话结尾」(`slice(0, idx+1)`),让 pin 会话从
313
- * ChatView 视角就是最后一个会话 —— 所有 `si === length-1` 的既有逻辑(Last Response 卡片、
314
- * Ask/ExitPlanMode 审批 modal、分隔线)原样可用。常见情形(pin == 最新 / 未命中 / 未开)
315
- * 直接原样返回,行为与今天逐字节一致。
316
- *
317
- * @param {Array} mainAgentSessions
318
- * @param {string|null} pinnedTs - 记住的会话稳定 id;null = 未锁定
319
- * @param {boolean} onlyCurrentSession - 生效的「仅展示当前会话」开关
320
- * @returns {{ sessions: Array, upperBoundTs: (string|null) }}
321
- * upperBoundTs:pin 在中段时为下一个会话的起点 ts(供 ChatView 截断更晚会话的 sub-agent /
322
- * 抑制 streaming 浮层);其余情形为 null。
323
- * Exception: a mid-list pinned session that is itself the latest-by-ACTIVITY is
324
- * the CURRENT session (the pin follows recency, and list order is insertion
325
- * order, not time order) — there is no strictly-newer session to bound against,
326
- * so upperBoundTs is null. A non-null bound here would invert ChatView's
327
- * "pin is on an older session" interpretation: it would suppress the live
328
- * streaming overlay and truncate trailing sub-agents on the very session the
329
- * user is watching.
330
- */
331
- export function resolveDisplaySessions(mainAgentSessions, pinnedTs, onlyCurrentSession) {
332
- const sessions = Array.isArray(mainAgentSessions) ? mainAgentSessions : [];
333
- if (!onlyCurrentSession || pinnedTs == null || sessions.length === 0) {
334
- return { sessions, upperBoundTs: null };
335
- }
336
- const idx = sessions.findIndex(s => getSessionStableId(s) === pinnedTs);
337
- // 未命中(pin 会话已不在)/ 命中末尾 → 原样(回退到展示最新)
338
- if (idx === -1 || idx === sessions.length - 1) {
339
- return { sessions, upperBoundTs: null };
340
- }
341
- // 命中中段 → 切到「以 pin 会话结尾」;上界 = 下一个会话起点 ts,
342
- // 除非 pin 会话本身就是活动最新(= 当前会话,无更新会话可作上界)。
343
- const pinnedIsCurrent = getLatestSessionByActivity(sessions) === sessions[idx];
344
- return {
345
- sessions: sessions.slice(0, idx + 1),
346
- upperBoundTs: pinnedIsCurrent ? null : getSessionStableId(sessions[idx + 1]),
347
- };
348
- }
349
-
350
- /**
351
- * 信号驱动的 in-place last-msg replace 短路。
352
- *
353
- * 协议合同详见 `docs/WIRE_FORMAT.md` §3.3 SUGGESTION MODE 末位替换 + §2 关键字段词典
354
- * (`_inPlaceReplaceDetected` / `_isCheckpoint` 双信号必须齐发)。该文件是单一真理源,
355
- * 字段重命名 / 语义变更必须同时更新文档 + interceptor.js 写入点 + 本 helper + 双端回归测试
356
- * (`test/session-manager.test.js` + `test/session-manager.test.js`)。
357
- *
358
- * 双端 fp 函数互相独立、用途不同,**不要试图共用**:
359
- * - 服务端 `server/lib/interceptor-core.js::fingerprintMsg` 用于 Plan C 检测末位 tail fp 异
360
- * - 客户端 `src/utils/sessionMerge.js::messageFingerprint` 已升级为 `length + first32 + last32`
361
- * 三元组(旧格式 `slice(0,64)` 单条 fp 已淘汰);用于反向锚点对齐时的多块 fp 等价校验。
362
- *
363
- * 客户端反向锚点算法(`src/utils/sessionMerge.js::findReverseAnchor`)在 newLen===currentLen
364
- * 且末位 fp 异时若 anchor 未命中会走整段 append(Plan Mode 全替换语义),这是合理的;本 helper
365
- * 是为了在服务端**已知是 in-place replace** 时跳过启发式合并直接替末位、保留前 N-1 条引用稳定,
366
- * 让 ChatView 的 WeakMap 缓存继续命中。
367
- *
368
- * 修法:直接消费服务端明确信号,不走 sessionMerge 启发式算法。命中时构造新 lastSession,前
369
- * N-1 条 message 元素引用复用(保留 _timestamp / _generatedTs 等所有 metadata),末位用
370
- * entry.body.messages[N-1]。返回 `{ applied: true, sessions }` 表示已短路;未命中返回
371
- * `{ applied: false }`,调用方走原 mergeMainAgentSessions 路径。
372
- *
373
- * 防回归(避开 1.6.249 拆 Layer 2 的两个坑):
374
- * - 不靠客户端 fp 启发式判断(直接看服务端明确信号 _inPlaceReplaceDetected:true)
375
- * - 不覆盖整个 lastSession.messages(只替末位,保留前 N-1 引用)
376
- *
377
- * 守卫顺序(异常入参逐级 fallback 给 mergeMainAgentSessions 处理):
378
- * 1. 信号未命中(_inPlaceReplaceDetected/_isCheckpoint 非 true)
379
- * 2. isNewSession(新 session 起点不应原地替换旧 session 末位)
380
- * 3. prevSessions / lastSession.messages 异常
381
- * 4. entry.body.messages 缺失
382
- * 5. N < 2(只有 1 条消息时 "前 N-1 条" 退化为空,等价完全替换 → 让原路径处理更安全)
383
- * 6. messages.length 与 lastSession.messages.length 不等
384
- * 7. entry.response 缺失(inProgress 状态不应被信号触发;服务端 Plan C 仅在 completed 写信号,
385
- * 此守卫是 belt+suspenders 防协议变化导致丢失 response 字段污染下游 ChatView Last Response)
386
- *
387
- * @param {Array} prevSessions
388
- * @param {object} entry — mainAgent entry,需含 _inPlaceReplaceDetected / _isCheckpoint / body.messages
389
- * @param {string} timestamp — entry 的 timestamp(用于赋新末位 message 的 _timestamp)
390
- * @param {boolean} isNewSession — 是否新 session 起点(true 时不短路,让原路径处理)
391
- * @returns {{ applied: boolean, sessions?: Array }}
392
- */
393
- export function applyInPlaceLastMsgReplace(prevSessions, entry, timestamp, isNewSession) {
394
- // 诊断挂钩:守卫拒绝路径计数 + verbose trace(gated by globalThis.__CCV_SESSIONMERGE_TRACE__)。
395
- // 用户报告"复制翻车"再现时打开 trace 即可定位是信号缺失 / 哪条守卫拦了。计数挂在函数对象上,
396
- // 控制台直接读 applyInPlaceLastMsgReplace.fallbackCount / .appliedCount 拿快照;
397
- // 也可通过 globalThis.__CCV_DIAGNOSTICS__.sessionMerge 拿到统一 namespace 视图(与未来其他诊断挂钩共存)。
398
- const _trace = (typeof globalThis !== 'undefined' && globalThis.__CCV_SESSIONMERGE_TRACE__ === true);
399
- // 整体 try-catch 包裹:诊断挂钩永不应抛(fallbackCount 若被外部 Object.freeze、
400
- // entry getter 抛错、console 在 SSR 不可用 等异常都不应污染主路径)。
401
- const _bumpFb = (reason) => {
402
- try {
403
- const _fb = applyInPlaceLastMsgReplace.fallbackCount;
404
- // 加 cap 防 attacker 故意触发 fallback 让计数器无界膨胀(见 perf-security review P1)。
405
- // 9999 已足够区分"罕见 vs 频发";超过 cap 的精确计数对诊断价值有限。
406
- const cur = _fb[reason] || 0;
407
- if (cur < 9999) _fb[reason] = cur + 1;
408
- if (_trace) {
409
- // eslint-disable-next-line no-console
410
- console.warn(`[sessionMerge.trace] applyInPlaceLastMsgReplace fallback: ${reason}`, {
411
- ts: entry && entry.timestamp,
412
- hasSignal: entry && entry._inPlaceReplaceDetected === true,
413
- isCheckpoint: entry && entry._isCheckpoint === true,
414
- msgLen: entry && entry.body && Array.isArray(entry.body.messages) ? entry.body.messages.length : null,
415
- lastSessionLen: Array.isArray(prevSessions) && prevSessions.length > 0 && prevSessions[prevSessions.length - 1] && Array.isArray(prevSessions[prevSessions.length - 1].messages) ? prevSessions[prevSessions.length - 1].messages.length : null,
416
- });
417
- }
418
- } catch { /* never throw from diagnostic path */ }
419
- };
420
-
421
- // 老 jsonl 兼容策略:1.6.250 之前 / 1.6.250 ship 后 interceptor 漏检 race 期间写入的
422
- // entry 不会带 `_inPlaceReplaceDetected` 字段,本 helper 直接 fallback。客户端不做"事后
423
- // 回填"——已污染的 mainAgentSessions 内存翻倍只能靠用户刷新浏览器重读 jsonl 全量重建
424
- // 来清理(重建路径用 sessionMerge prefix-overlap,此时旧 entry 都已乱序到位,不会再翻倍)。
425
- // 注意:这条早返回(无信号)是绝大多数 entry 的正常路径,不计入 fallbackCount,
426
- // 否则计数器会被 SSE 高频流量淹没,掩盖真正"信号到达但守卫拒绝"的异常路径。
427
- if (!entry || entry._inPlaceReplaceDetected !== true || entry._isCheckpoint !== true) {
428
- return { applied: false };
429
- }
430
- if (isNewSession) { _bumpFb('new-session'); return { applied: false }; }
431
- if (!Array.isArray(prevSessions) || prevSessions.length === 0) { _bumpFb('no-prev-sessions'); return { applied: false }; }
432
- const lastSession = prevSessions[prevSessions.length - 1];
433
- if (!lastSession || !Array.isArray(lastSession.messages)) { _bumpFb('no-last-session-messages'); return { applied: false }; }
434
- const messages = entry.body && Array.isArray(entry.body.messages) ? entry.body.messages : null;
435
- if (!messages || messages.length < 2) { _bumpFb('messages-too-short'); return { applied: false }; }
436
- if (messages.length !== lastSession.messages.length) { _bumpFb('length-mismatch'); return { applied: false }; }
437
- // entry.response 缺失(inProgress 等异常)→ fallback,避免 newLastSession.response=undefined
438
- // 污染下游 ChatView Last Response 渲染。服务端 Plan C 仅在 completed 写信号,正常情况这条守卫
439
- // 不会命中;保留作为协议变更时的防御层。
440
- if (!entry.response) { _bumpFb('response-missing'); return { applied: false }; }
441
-
442
- const N = messages.length;
443
- const stitched = lastSession.messages.slice(0, N - 1);
444
- const newLastMsg = messages[N - 1];
445
- if (newLastMsg && !newLastMsg._timestamp) newLastMsg._timestamp = timestamp;
446
- stitched.push(newLastMsg);
447
- const newLastSession = {
448
- userId: lastSession.userId,
449
- messages: stitched,
450
- response: entry.response,
451
- entryTimestamp: timestamp,
452
- // Carry the session-level model stamp (see mergeMainAgentSessions): this path bypasses the
453
- // merge and rebuilds the session object — dropping the stamp would re-bake the whole session
454
- // with the "MainAgent" fallback. entry.response is guaranteed by the guard above, so
455
- // getEffectiveModel is authoritative here; fall back to the previous stamp.
456
- model: getEffectiveModel(entry) || lastSession.model || null,
457
- // Preserve the v2 session epoch (task B) — this path clones the session, and
458
- // dropping it would make the next entry's epoch-boundary check read undefined.
459
- _seqEpoch: lastSession._seqEpoch,
460
- };
461
- // 末位替换:返回新 sessions 数组保持原顺序、prev 长度不变。
462
- // 下游 ChatView _sessionItemCache[last] 按 index 索引该 session,依赖 index 恒定不能错位。
463
- // appliedCount 加 cap 防长期累积溢出(实际 9999 远超调试需要)。
464
- if (applyInPlaceLastMsgReplace.appliedCount < 9999) applyInPlaceLastMsgReplace.appliedCount++;
465
- return { applied: true, sessions: [...prevSessions.slice(0, -1), newLastSession] };
466
- }
467
-
468
- // 诊断计数:信号到达但守卫拒绝时分类累加;apply 成功时单独累加。
469
- // 调试时直接在 console 读:applyInPlaceLastMsgReplace.fallbackCount / .appliedCount。
470
- // 各计数器加 cap=9999 防 attacker 故意触发 fallback 让计数器无界膨胀。
471
- applyInPlaceLastMsgReplace.fallbackCount = Object.create(null);
472
- applyInPlaceLastMsgReplace.appliedCount = 0;
473
-
474
- // 统一 namespace(perf-security review P2):未来其他诊断挂钩可挂到 __CCV_DIAGNOSTICS__
475
- // 而不是直接污染 globalThis 命名空间。当前仅暴露 sessionMerge 路径,避免与其他库冲突。
476
- if (typeof globalThis !== 'undefined') {
477
- if (!globalThis.__CCV_DIAGNOSTICS__) globalThis.__CCV_DIAGNOSTICS__ = Object.create(null);
478
- globalThis.__CCV_DIAGNOSTICS__.sessionMerge = {
479
- get fallbackCount() { return applyInPlaceLastMsgReplace.fallbackCount; },
480
- get appliedCount() { return applyInPlaceLastMsgReplace.appliedCount; },
481
- };
482
- }