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
@@ -12,14 +12,14 @@
12
12
  // 用 openSync(path,'wx') 原子创建:从不覆盖用户已编辑的文件(避免 existsSync→write 的 TOCTOU)。因此
13
13
  // 语言在「首次创建」时定格,之后换语言不会自动重写——重置/换语言由编辑器「恢复默认」(writeImAppendSystem) 触发。
14
14
  // 对比 server/lib/im-skills.js(内置技能):那边是「受管同步」每次启动按包内版本覆盖内容;本模块相反,wx 创建后永不覆盖。
15
- import { openSync, writeFileSync, closeSync, mkdirSync, readFileSync, unlinkSync, statSync, lstatSync } from 'node:fs';
15
+ import { openSync, writeFileSync, closeSync, mkdirSync, readFileSync, unlinkSync, lstatSync } from 'node:fs';
16
16
  import { join } from 'node:path';
17
17
  import { randomBytes } from 'node:crypto';
18
18
  import { imDir } from './im-lock.js';
19
- import { renameSyncWithRetry } from './file-api.js';
20
- import { IM_PRESET_DIR } from '../_paths.js';
19
+ import { renameSyncWithRetry, isNonEmptyFile } from '../file-api.js';
20
+ import { IM_PRESET_DIR } from '../../_paths.js';
21
21
  import { resolvePrefLang } from './im-lang.js';
22
- import { APPEND_SYSTEM_PROMPT_FILE } from './system-prompt-files.js';
22
+ import { APPEND_SYSTEM_PROMPT_FILE } from '../system-prompt-files.js';
23
23
 
24
24
  // 写入上限(字符数,按 String.length / UTF-16 码元计):远超任何合理人格定义,纯防失控大 body。
25
25
  export const MAX_IM_APPEND_SYSTEM_CHARS = 256 * 1024;
@@ -42,15 +42,7 @@ export function platformLabel(id, lang = resolvePrefLang(DEFAULT_LANG)) {
42
42
  return (typeof lang === 'string' && lang.startsWith('zh')) ? m.zh : m.default;
43
43
  }
44
44
 
45
- // 文件存在、是普通文件且非空(size>0)才算「已有内容」。坏符号链接/目录/不存在 → false。
46
- function isNonEmptyFile(p) {
47
- try {
48
- const st = statSync(p);
49
- return st.isFile() && st.size > 0;
50
- } catch {
51
- return false;
52
- }
53
- }
45
+ // 文件存在、是普通文件且非空(size>0)才算「已有内容」——共享实现:../file-api.js。
54
46
 
55
47
  // 极简兜底:当 server/imPreset/<lang>.md 与 zh.md 都读不到时(理论上不会发生),至少给一份最小约束,避免崩。
56
48
  function fallbackPreset(P, id) {
@@ -21,8 +21,8 @@
21
21
  // a per-instance scratch object (token cache, send client) cleared on reset.
22
22
  import { existsSync, readFileSync, appendFileSync } from 'node:fs';
23
23
  import { join } from 'node:path';
24
- import { LOG_DIR } from '../../findcc.js';
25
- import { t } from '../i18n.js';
24
+ import { LOG_DIR } from '../../../findcc.js';
25
+ import { t } from '../../i18n.js';
26
26
  import { upsertSender } from './im-senders.js';
27
27
 
28
28
  // ─── tunables (shared across platforms; per-platform rate caps come from adapter.rateLimit) ───
@@ -361,9 +361,9 @@ function audit(inst, event, data) {
361
361
  } catch { /* best-effort */ }
362
362
  }
363
363
 
364
- /** Bracketed-paste + submit, matching the frontend's ptyChunkBuilder. Kept local so the core
365
- * never imports pty-manager (which would pull node-pty into the unit test). */
366
- function bracketPasteSubmit(text) {
364
+ /** Bracketed-paste + submit, matching the frontend's ptyChunkBuilder. Exported for
365
+ * chat-queue.js (the chat-composer busy queue shares the exact same inject framing). */
366
+ export function bracketPasteSubmit(text) {
367
367
  return ['\x1b[200~' + text + '\x1b[201~', '\r'];
368
368
  }
369
369
 
@@ -385,13 +385,19 @@ function markOrigin(id, senderId, content) {
385
385
  * Claude TUI. CR is removed too: it is the submit key, so leaving it in inbound text would be a
386
386
  * submit byte smuggled into the paste frame.
387
387
  */
388
- function sanitizeInbound(text) {
388
+ export function sanitizeInbound(text) {
389
389
  return String(text)
390
390
  .replace(/\x1b\[20[01]~/g, '')
391
391
  // eslint-disable-next-line no-control-regex
392
392
  .replace(/[\x00-\x08\x0b-\x1f\x7f]/g, '');
393
393
  }
394
394
 
395
+ /** Cross-module injection mutex probe: chat-queue.js consults this before injecting into the
396
+ * shared PTY so a chat-composer inject and an IM-bridge inject can never interleave. */
397
+ export function anyActiveInjection() {
398
+ return !!activeInjection;
399
+ }
400
+
395
401
  function remember(inst, msgId) {
396
402
  if (!msgId) return false;
397
403
  if (inst.seenMsgIds.includes(msgId)) return true;
@@ -13,7 +13,7 @@
13
13
  // admin API masks secret fields entirely (→ hasSecret).
14
14
  import { existsSync, readFileSync, writeFileSync, mkdirSync, chmodSync } from 'node:fs';
15
15
  import { join, dirname } from 'node:path';
16
- import { LOG_DIR } from '../../findcc.js';
16
+ import { LOG_DIR } from '../../../findcc.js';
17
17
 
18
18
  const MIN_CHUNK = 500;
19
19
  const MAX_CHUNK = 5000;
@@ -0,0 +1,4 @@
1
+ // Back-compat shim: the implementation moved to ../im-deny.js (shared leaf —
2
+ // ask/perm-bridge.js consumes it without a cross-subsystem edge). Existing
3
+ // imports of this path (tests pin it) keep working.
4
+ export { evaluateImDeny } from '../im-deny.js';
@@ -2,7 +2,7 @@
2
2
  // 供 IM 内置技能注入(im-skills.js)与人格预置(im-append-system.js)共用,避免各自重复读 preferences。
3
3
  import { readFileSync } from 'node:fs';
4
4
  import { join } from 'node:path';
5
- import { LOG_DIR } from '../../findcc.js';
5
+ import { LOG_DIR } from '../../../findcc.js';
6
6
 
7
7
  /** 读 preferences.lang;读不到 / 无字段 / 解析失败一律回退 def(默认 zh)。 */
8
8
  export function resolvePrefLang(def = 'zh') {
@@ -12,8 +12,8 @@ import { openSync, closeSync, readFileSync, writeFileSync, unlinkSync, mkdirSync
12
12
  import { join } from 'node:path';
13
13
  import { randomBytes } from 'node:crypto';
14
14
  import { get as httpGet } from 'node:http';
15
- import { LOG_DIR } from '../../findcc.js';
16
- import { renameSyncWithRetry } from './file-api.js';
15
+ import { LOG_DIR } from '../../../findcc.js';
16
+ import { renameSyncWithRetry } from '../file-api.js';
17
17
 
18
18
  // 启动窗:已建锁但尚未回填 port 的进程,在此时间内视为"启动中"(不可被判死/重拉)。
19
19
  export const BOOT_WINDOW_MS = 15000;
@@ -14,7 +14,7 @@ import {
14
14
  imDir, readImLock, clearImLock, isPidAlive, getImLiveness, defaultProbe,
15
15
  } from './im-lock.js';
16
16
 
17
- const CLI_JS = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..', 'cli.js');
17
+ const CLI_JS = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', 'cli.js');
18
18
 
19
19
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
20
20
 
@@ -11,7 +11,7 @@ import { openSync, closeSync, readFileSync, writeFileSync, unlinkSync, mkdirSync
11
11
  import { join } from 'node:path';
12
12
  import { randomBytes } from 'node:crypto';
13
13
  import { imDir } from './im-lock.js';
14
- import { renameSyncWithRetry } from './file-api.js';
14
+ import { renameSyncWithRetry } from '../file-api.js';
15
15
 
16
16
  export const MAX_SENDERS = 500;
17
17
 
@@ -12,9 +12,9 @@
12
12
  import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
13
13
  import { join, dirname } from 'node:path';
14
14
  import { randomBytes } from 'node:crypto';
15
- import { IM_SKILLS_DIR } from '../_paths.js';
15
+ import { IM_SKILLS_DIR } from '../../_paths.js';
16
16
  import { imDir } from './im-lock.js';
17
- import { renameSyncWithRetry } from './file-api.js';
17
+ import { renameSyncWithRetry } from '../file-api.js';
18
18
  import { resolvePrefLang } from './im-lang.js';
19
19
 
20
20
  export const BUILTIN_SKILL_NAME = 'manage-ccv-projects';
@@ -10,8 +10,8 @@ const SUBAGENT_BILLING_RE = /cc_is_subagent=true\b/;
10
10
  // 同进程 Agent/Task 队友(teammate):system prompt 注入团队协作标记,但继承完整 "You are Claude Code"
11
11
  // prompt + Edit/Bash/Task 工具,且不带 --agent-name 进程参数(_isTeammate 认不出),会误中下方 MainAgent
12
12
  // 启发式 → 流式期间被当 mainAgent 开 live-stream,其 thinking 污染主「最新回复」overlay。须显式排除。
13
- // KEEP IN SYNC: server/lib/kv-cache-analyzer.js + src/utils/contentFilter.js(三处判据必须一致)。
14
- // 两处服务端实现(本文件 + kv-cache-analyzer)由 test/interceptor-core-mainagent.test.js 互校防漂移;
13
+ // KEEP IN SYNC: server/lib/kv-cache-analyzer.js + @ccv/core/contentFilter(三处判据必须一致)。
14
+ // 两处服务端实现(本文件 + kv-cache-analyzer)由 packages/app/test/interceptor-core-mainagent.test.js 互校防漂移;
15
15
  // 前端 contentFilter 那份由 test/content-filter-unit.test.js 单测覆盖。
16
16
  const TEAMMATE_SYSTEM_RE = /running as an agent in a team|Agent Teammate Communication/i;
17
17
  // 1.7.0: the last external consumer (teammate-detect.js) retired with the
@@ -21,8 +21,8 @@ export { TEAMMATE_SYSTEM_RE, SUBAGENT_BILLING_RE };
21
21
 
22
22
  // Rotation carry-forward: prompt-prefix → teammate-name pairs extracted from a
23
23
  // mainAgent response body's Agent tool_use blocks. Prefix normalization MUST
24
- // match src/utils/contentFilter.js (trimStart BEFORE slice, length 60) —
25
- // pinned by test/interceptor.test.js parity cases.
24
+ // match @ccv/core/contentFilter (trimStart BEFORE slice, length 60) —
25
+ // pinned by packages/app/test/interceptor.test.js parity cases.
26
26
  export const TEAMMATE_PROMPT_PREFIX_LEN = 60;
27
27
 
28
28
  export function extractAgentSpawnPairs(responseBody) {
@@ -58,7 +58,10 @@ export function isMainAgentRequest(body) {
58
58
  if (TEAMMATE_SYSTEM_RE.test(sysText)) return false;
59
59
  // cc_is_subagent=true ⇒ 子代理,绝非 MainAgent(cc_version 2.1.181+)。从源头让新日志的 mainAgent 字段为 false。
60
60
  if (SUBAGENT_BILLING_RE.test(sysText)) return false;
61
- if (!sysText.includes('You are Claude Code')) return false;
61
+ // SDK 模式(ccv -SDK)主会话 base prompt 是 "...built on Anthropic's Claude Agent SDK.",
62
+ // 非 CLI 的 "You are Claude Code"。SDK 子代理同用该 prompt,由下方工具启发式(缺 Agent/Task)排除;
63
+ // native teammate 已由 TEAMMATE_SYSTEM_RE 排除。用精确子串,勿放宽成 "You are a Claude agent"(误中 teammate)。
64
+ if (!sysText.includes('You are Claude Code') && !sysText.includes("built on Anthropic's Claude Agent SDK")) return false;
62
65
  if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
63
66
 
64
67
  const isSystemArray = Array.isArray(body.system);
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * Server-side KV-Cache content analyzer.
3
- * Ported from src/utils/helpers.js + src/utils/contentFilter.js
3
+ * Ported from apps/web/src/utils/helpers.js + @ccv/core/contentFilter
4
4
  */
5
5
 
6
- import { formatToolAsXml } from './tools-xml-formatter.js';
6
+ import { formatToolAsXml } from '@ccv/core/tools-xml-formatter';
7
7
  export { formatToolAsXml };
8
8
 
9
9
  const SUBAGENT_SYSTEM_RE = /command execution specialist|file search specialist|planning specialist|general-purpose agent|security monitor|performing a web search/i;
10
10
  // cc_version 2.1.181+: billing header marks subagents (cc_is_subagent=true); genuine main omits it (never =false).
11
11
  // Such subagents inherit the full "You are Claude Code" prompt + Edit/Bash/Agent tools and would otherwise hit the
12
- // lightweight heuristic below. \b anchor avoids matching =truex. KEEP IN SYNC with src/utils/contentFilter.js + interceptor-core.js.
12
+ // lightweight heuristic below. \b anchor avoids matching =truex. KEEP IN SYNC with @ccv/core/contentFilter + interceptor-core.js.
13
13
  const SUBAGENT_BILLING_RE = /cc_is_subagent=true\b/;
14
14
  const TEAMMATE_SYSTEM_RE = /running as an agent in a team|Agent Teammate Communication/i;
15
15
 
@@ -47,7 +47,8 @@ export function isMainAgentEntry(entry) {
47
47
  const body = entry.body || {};
48
48
  if (!body.system || !Array.isArray(body.tools)) return false;
49
49
 
50
- if (!sysText.includes('You are Claude Code')) return false;
50
+ // SDK 模式(ccv -SDK)主会话 base prompt 含 "built on Anthropic's Claude Agent SDK."(同 interceptor-core.js 对齐)。
51
+ if (!sysText.includes('You are Claude Code') && !sysText.includes("built on Anthropic's Claude Agent SDK")) return false;
51
52
  if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
52
53
 
53
54
  // New architecture (v2.1.69+): deferred tool loading
@@ -165,7 +166,7 @@ export function extractCachedContent(entry) {
165
166
  // tools: API caches in order tools → system → messages.
166
167
  // Tools are implicitly cached as part of the prefix (no cache_control needed on tools themselves).
167
168
  // Show tools when system has cached content (indicating a cache prefix exists).
168
- // Keep in sync with src/utils/helpers.js extractCachedContent
169
+ // Keep in sync with apps/web/src/utils/helpers.js extractCachedContent
169
170
  if (Array.isArray(body.tools) && body.tools.length > 0 && result.system.length > 0) {
170
171
  for (const tool of body.tools) {
171
172
  result.tools.push(formatToolAsXml(tool));
@@ -0,0 +1,321 @@
1
+ /**
2
+ * launch-config.js — Launch-time configuration shared by the PTY and SDK spawns.
3
+ *
4
+ * Extracted from pty-manager.js so the SDK link (sdk-manager.js / cli.js runSdkMode)
5
+ * produces byte-identical system-prompt injection to the PTY link:
6
+ * - withDefaultThinkingDisplay: inject `--thinking-display summarized` by default
7
+ * - parseResumeArgs: continuation-flag parsing (-c/--continue/-r/--resume/--fork-session)
8
+ * - resolveLaunchSystemPrompt: the full system-prompt pipeline — resume pin
9
+ * (snapshot replay, never re-render variables) or fresh build (CC_SYSTEM.md /
10
+ * CC_APPEND_SYSTEM.md sentinels, model-specific match, ${...} template render),
11
+ * plus the pending record consumed by the wire-side binding (v2-writer Bind A).
12
+ *
13
+ * Everything here is spawn-shape logic only — no PTY, no SDK. Callers own their
14
+ * mode-specific concerns (PTY: rejection self-heal sets, spawn notices; SDK: args →
15
+ * options.extraArgs conversion).
16
+ */
17
+
18
+ import { existsSync, writeFileSync, mkdirSync } from 'node:fs';
19
+ import { join } from 'node:path';
20
+ import { randomBytes } from 'node:crypto';
21
+ import { LOG_DIR } from '../../findcc.js';
22
+ import { reportSwallowed } from '@ccv/core/error-report';
23
+ import {
24
+ buildSystemPromptFileArgs, hasArg, isNonEmptyFile,
25
+ SYSTEM_PROMPT_FILE, APPEND_SYSTEM_PROMPT_FILE,
26
+ } from './system-prompt-files.js';
27
+ import { renderSystemPromptFileArgs, renderedPromptDir } from './system-prompt-render.js';
28
+ import { appendPending, readSnapshot, resolveContinueTargetUuid } from './system-prompt-snapshots.js';
29
+ import { MODEL_PROMPT_DIR, listModelPrompts } from './model-system-prompts.js';
30
+ import { resolveSpawnModel } from './spawn-model-resolver.js';
31
+
32
+ // Opus 4.7 默认不再返回 thinking;为所有非显式覆写的调用加上 summarized。
33
+ // 纯函数:仅根据 args 决定是否注入;用户已显式传入 `--thinking-display` 时原样返回。
34
+ export function withDefaultThinkingDisplay(args) {
35
+ if (!Array.isArray(args)) return args;
36
+ const hasFlag = args.some(a =>
37
+ a === '--thinking-display' || (typeof a === 'string' && a.startsWith('--thinking-display='))
38
+ );
39
+ return hasFlag ? args : [...args, '--thinking-display', 'summarized'];
40
+ }
41
+
42
+ // Parse continuation flags from claude args: -c/--continue, -r/--resume (value as the
43
+ // next token or in = form), --fork-session. Returns null for non-continuation launches;
44
+ // picker=true means a valueless -r (interactive picker — target unknowable at spawn).
45
+ // Same flag set as cli.js markContinueEnv / routes/workspaces.js.
46
+ export function parseResumeArgs(args) {
47
+ if (!Array.isArray(args)) return null;
48
+ let continued = false;
49
+ let resumeValue = null;
50
+ let picker = false;
51
+ let fork = false;
52
+ for (let i = 0; i < args.length; i++) {
53
+ const a = args[i];
54
+ if (a === '-c' || a === '--continue') { continued = true; continue; }
55
+ if (a === '--fork-session') { fork = true; continue; }
56
+ if (a === '-r' || a === '--resume') {
57
+ continued = true;
58
+ const next = args[i + 1];
59
+ if (typeof next === 'string' && next && !next.startsWith('-')) { resumeValue = next; i++; }
60
+ else picker = true;
61
+ continue;
62
+ }
63
+ const m = typeof a === 'string' && a.match(/^(?:-r|--resume)=(.+)$/);
64
+ if (m) { continued = true; resumeValue = m[1]; }
65
+ }
66
+ return continued ? { resumeValue, picker, fork } : null;
67
+ }
68
+
69
+ // Materialize snapshot entries into temp files. Each spawn gets its own subdirectory
70
+ // under renderedPromptDir (per-process): two sequential spawns pinning DIFFERENT
71
+ // conversations would otherwise overwrite the same basename before claude reads it.
72
+ // Returns the same {args, loaded, entries} shape renderSystemPromptFileArgs produces.
73
+ export function materializePinnedEntries(entries) {
74
+ const args = [];
75
+ const loaded = [];
76
+ const out = [];
77
+ for (const e of entries) {
78
+ try {
79
+ const dir = join(renderedPromptDir(), `pin-${randomBytes(4).toString('hex')}`);
80
+ mkdirSync(dir, { recursive: true });
81
+ const target = join(dir, e.basename);
82
+ writeFileSync(target, e.content, 'utf-8');
83
+ args.push(e.flag, target);
84
+ loaded.push(e.basename);
85
+ out.push({ flag: e.flag, basename: e.basename, content: e.content });
86
+ } catch (err) {
87
+ // A dropped entry breaks the byte-identity this feature exists to protect —
88
+ // warn visibly AND report: silent degradation here is a future cache miss.
89
+ console.warn(`[CC Viewer] system-prompt pin materialize failed for ${e?.basename}:`, err?.message || err);
90
+ reportSwallowed('pty-pin.materialize', err);
91
+ }
92
+ }
93
+ return { args, loaded, entries: out };
94
+ }
95
+
96
+ // Manual-first: a user-passed synonymous flag suppresses the matching pinned entry
97
+ // (same semantics as the fresh buildSystemPromptFileArgs path). All entries
98
+ // suppressed → no injection.
99
+ export function suppressManuallyFlaggedPinned(entries, userArgs) {
100
+ return entries.filter(e => {
101
+ const pair = e.flag === '--system-prompt-file'
102
+ ? ['--system-prompt', '--system-prompt-file']
103
+ : ['--append-system-prompt', '--append-system-prompt-file'];
104
+ return !hasArg(userArgs, ...pair);
105
+ });
106
+ }
107
+
108
+ // The F2 no-record notice only matters to users who HAVE injection configured right
109
+ // now (sentinel files or a model-prompt dir) — for everyone else a resume silently
110
+ // injecting nothing is exactly the status quo, and the line would be pure noise.
111
+ export function injectionConfigured(spawnDir, logDir = LOG_DIR) {
112
+ try {
113
+ return isNonEmptyFile(join(spawnDir, SYSTEM_PROMPT_FILE))
114
+ || isNonEmptyFile(join(spawnDir, APPEND_SYSTEM_PROMPT_FILE))
115
+ || existsSync(join(spawnDir, MODEL_PROMPT_DIR))
116
+ || existsSync(join(logDir, MODEL_PROMPT_DIR));
117
+ } catch { return false; }
118
+ }
119
+
120
+ // Default model reader with the NODE_TEST_CONTEXT guard (dev-shell model env vars must
121
+ // not leak into unit tests). pty-manager passes its own test-seam reader instead.
122
+ function _defaultModelReader(spawnDir, env, opts) {
123
+ return env.NODE_TEST_CONTEXT ? null : resolveSpawnModel(spawnDir, env, opts);
124
+ }
125
+
126
+ /**
127
+ * Resolve this launch's system-prompt injection.
128
+ *
129
+ * Resume-pin semantics (see pty-manager header / system-prompt-snapshots.js):
130
+ * target identified + snapshot record → re-inject the recorded bytes verbatim;
131
+ * target identified + no record → inject NOTHING (F2 — never alter the system
132
+ * text an existing context already has);
133
+ * target unidentifiable (picker/-c with no transcripts) → normal fresh pipeline.
134
+ *
135
+ * @param {object} p
136
+ * @param {string} p.spawnDir — directory claude runs with
137
+ * @param {string[]} p.extraArgs — final user args (post settings-merge, post thinking-display);
138
+ * used for synonymous-flag suppression of injected entries
139
+ * @param {object} [p.env] — process env of the launch (model resolution + opt-out checks)
140
+ * @param {object|null} [p.launchSettings] — merged --settings object (model resolution signal)
141
+ * @param {object|null|undefined} [p.resume] — explicit resume intent {resumeValue, picker, fork};
142
+ * `undefined` parses from extraArgs (PTY path); explicit null forces the fresh pipeline
143
+ * @param {function} [p.modelReader] — (spawnDir, env, {launchSettings}) => modelId|null
144
+ * @param {boolean} [p.insideLogDir] — IM-worker spawns skip the whole pin/match machinery
145
+ * @param {string} [p.logDir]
146
+ * @param {boolean} [p.suppressInjection] — caller-side suppression (PTY: rejected-binary
147
+ * set / skip-once token). Zeroes the injection and drops the pending record.
148
+ * @param {boolean} [p.persistPending] — record the effective injection for the wire-side
149
+ * binding (v2-writer Bind A). PTY passes true; SDK also passes true (its wire traffic
150
+ * flows through the same proxy). Set false only for dry-run callers.
151
+ * @returns {{
152
+ * sysPrompt: {args: string[], loaded: string[], model: string|null, entries: object[], suppressed?: string, pinned?: boolean, noRecord?: boolean, noRecordNotice?: boolean},
153
+ * resume: object|null,
154
+ * resolvedModelId: string|null,
155
+ * diagnostic: null|'no-match'|'no-model',
156
+ * }}
157
+ */
158
+ export function resolveLaunchSystemPrompt(p) {
159
+ const {
160
+ spawnDir,
161
+ extraArgs,
162
+ env = process.env,
163
+ launchSettings = null,
164
+ resume: resumeIntent,
165
+ modelReader = _defaultModelReader,
166
+ insideLogDir = false,
167
+ logDir = LOG_DIR,
168
+ suppressInjection = false,
169
+ persistPending = true,
170
+ } = p;
171
+
172
+ const out = {
173
+ sysPrompt: { args: [], loaded: [], model: null, entries: [] },
174
+ resume: null,
175
+ resolvedModelId: null,
176
+ diagnostic: null,
177
+ };
178
+ if (!spawnDir) return out;
179
+
180
+ // Continuation launches (-c/--continue/-r/--resume): pin the resumed conversation's
181
+ // original injection — never re-render variables. IM workers (insideLogDir) skip the
182
+ // whole snapshot machinery: their persona file must be re-read on every launch.
183
+ const resume = insideLogDir ? null : (resumeIntent !== undefined ? resumeIntent : parseResumeArgs(extraArgs));
184
+ out.resume = resume;
185
+ let pendingRec = null;
186
+ let pinned = null;
187
+ if (resume && env.CCV_DISABLE_AUTO_SYSTEM_PROMPT !== '1') {
188
+ const targetUuid = resume.resumeValue ?? resolveContinueTargetUuid(spawnDir);
189
+ if (targetUuid) {
190
+ const snap = readSnapshot(spawnDir, targetUuid);
191
+ if (snap) {
192
+ // Manual-flag suppression BEFORE materialize (suppressed entries never hit disk).
193
+ const kept = suppressManuallyFlaggedPinned(snap.entries, extraArgs);
194
+ const m = materializePinnedEntries(kept);
195
+ pinned = { args: m.args, loaded: m.loaded, model: snap.model, entries: m.entries, pinned: true };
196
+ // The pending carries the SNAPSHOT's entries (post-suppression), not the
197
+ // materialized subset — a transient temp-write failure must not degrade the
198
+ // permanent record via Bind B.
199
+ pendingRec = { entries: kept, model: snap.model, resumeExpected: true, resolvedUuid: targetUuid, fork: resume.fork };
200
+ } else {
201
+ // F2: target identified but no snapshot → inject NOTHING this launch (never
202
+ // alter the system text an existing context already has).
203
+ pinned = { args: [], loaded: [], model: null, entries: [], pinned: true, noRecord: true, noRecordNotice: injectionConfigured(spawnDir, logDir) };
204
+ }
205
+ }
206
+ // Bare -r (picker): the target is unknowable at spawn → normal pipeline, and NO
207
+ // pending. -c with no transcripts (targetUuid null): claude fails and the caller's
208
+ // retry respawns without -c — treat as fresh below.
209
+ }
210
+
211
+ if (pinned) {
212
+ out.sysPrompt = pinned;
213
+ } else {
214
+ // launchSettings is this launch's own live configuration — launchers like cfuse
215
+ // deliver ANTHROPIC_MODEL exclusively inside it, so it must participate in model
216
+ // resolution or model-specific entries silently never match.
217
+ const resolvedModelId = insideLogDir ? null : modelReader(spawnDir, env, { launchSettings });
218
+ out.resolvedModelId = resolvedModelId;
219
+ let sysPrompt = buildSystemPromptFileArgs(spawnDir, extraArgs, env, {
220
+ modelId: resolvedModelId,
221
+ globalModelDir: join(logDir, MODEL_PROMPT_DIR),
222
+ });
223
+ if (suppressInjection) {
224
+ sysPrompt = { args: [], loaded: [], model: null, entries: [] };
225
+ } else if (resolvedModelId && !sysPrompt.model && !sysPrompt.suppressed
226
+ && (existsSync(join(spawnDir, MODEL_PROMPT_DIR)) || existsSync(join(logDir, MODEL_PROMPT_DIR)))) {
227
+ // A system_prompt dir is configured but the resolved model matched no entry
228
+ // (likely a misnamed file).
229
+ out.diagnostic = 'no-match';
230
+ } else if (!resolvedModelId && !sysPrompt.suppressed && !insideLogDir
231
+ && (listModelPrompts(join(spawnDir, MODEL_PROMPT_DIR)).length > 0
232
+ || listModelPrompts(join(logDir, MODEL_PROMPT_DIR)).length > 0)) {
233
+ // Entries exist but NO model signal resolved at all, so matching never ran.
234
+ out.diagnostic = 'no-model';
235
+ }
236
+ // Resolve `${...}` template variables in the injected files. Skipped entirely when
237
+ // suppression zeroed the args (a rejected binary never pays the render cost).
238
+ if (sysPrompt.args.length > 0) {
239
+ sysPrompt = renderSystemPromptFileArgs(sysPrompt, { cwd: spawnDir, modelId: resolvedModelId });
240
+ } else {
241
+ sysPrompt = { ...sysPrompt, entries: [] };
242
+ }
243
+ out.sysPrompt = sysPrompt;
244
+ }
245
+
246
+ // Unified suppression (pin and fresh alike): nothing was injected → nothing can be bound.
247
+ if (suppressInjection) {
248
+ out.sysPrompt = { args: [], loaded: [], model: null, entries: [] };
249
+ pendingRec = null;
250
+ }
251
+
252
+ // Record this launch's effective injection for the binding channels (wire Bind A /
253
+ // SessionStart Bind B). Empty pendings are never queued (see pty-manager history).
254
+ const effectiveEntries = (out.sysPrompt.entries || []).filter(e => e && !e.unavailable);
255
+ if (pendingRec && pendingRec.entries.length === 0) pendingRec = null;
256
+ const rec = pendingRec || (!resume && !pinned && effectiveEntries.length > 0
257
+ ? { entries: effectiveEntries, model: out.sysPrompt.model ?? null, resumeExpected: false, resolvedUuid: null, fork: false }
258
+ : null);
259
+ if (persistPending && rec) {
260
+ try { appendPending(spawnDir, rec, logDir); } catch (err) { reportSwallowed('launch-config.appendPending', err); }
261
+ }
262
+ out.pendingRec = rec;
263
+ return out;
264
+ }
265
+
266
+ /**
267
+ * Convert a flat launch-args array (['--system-prompt-file', path, ...]) into the SDK
268
+ * query() options.extraArgs shape ({ 'system-prompt-file': path, ... }). Boolean flags
269
+ * (no value) map to null. Unknown pairing (trailing flag) maps to null — the SDK
270
+ * appends it bare, mirroring claude argv semantics.
271
+ */
272
+ export function launchArgsToExtraArgs(args) {
273
+ const out = {};
274
+ if (!Array.isArray(args)) return out;
275
+ for (let i = 0; i < args.length; i++) {
276
+ const a = args[i];
277
+ if (typeof a !== 'string' || !a.startsWith('--')) continue;
278
+ const eq = a.indexOf('=');
279
+ if (eq > 2) { out[a.slice(2, eq)] = a.slice(eq + 1); continue; }
280
+ const key = a.slice(2);
281
+ const next = args[i + 1];
282
+ if (typeof next === 'string' && !next.startsWith('--')) { out[key] = next; i++; }
283
+ else out[key] = null;
284
+ }
285
+ return out;
286
+ }
287
+
288
+ /**
289
+ * Split user CLI args for the SDK link: flags with SDK-native options are lifted out
290
+ * (--model / -c / --continue / -r / --resume / --fork-session — also needed at the
291
+ * sdk-manager level for resume-pin semantics); everything else rides along in `rest`
292
+ * (later converted to options.extraArgs verbatim). A valueless `-r` (interactive
293
+ * picker) can't work headless — reported via `pickerResume` so the caller can warn.
294
+ */
295
+ export function splitSdkLaunchArgs(args) {
296
+ const out = { model: null, continue: false, resume: null, forkSession: false, pickerResume: false, rest: [] };
297
+ if (!Array.isArray(args)) return out;
298
+ for (let i = 0; i < args.length; i++) {
299
+ const a = args[i];
300
+ if (typeof a !== 'string') { out.rest.push(a); continue; }
301
+ if (a === '-c' || a === '--continue') { out.continue = true; continue; }
302
+ if (a === '--fork-session') { out.forkSession = true; continue; }
303
+ if (a === '-r' || a === '--resume') {
304
+ const next = args[i + 1];
305
+ if (typeof next === 'string' && next && !next.startsWith('-')) { out.resume = next; i++; }
306
+ else out.pickerResume = true;
307
+ continue;
308
+ }
309
+ let m = a.match(/^(?:-r|--resume)=(.+)$/);
310
+ if (m) { out.resume = m[1]; continue; }
311
+ m = a.match(/^--model=(.+)$/);
312
+ if (m) { out.model = m[1]; continue; }
313
+ if (a === '--model') {
314
+ const next = args[i + 1];
315
+ if (typeof next === 'string' && next && !next.startsWith('-')) { out.model = next; i++; continue; }
316
+ out.rest.push(a); continue; // valueless --model: pass through, claude surfaces its own usage error
317
+ }
318
+ out.rest.push(a);
319
+ }
320
+ return out;
321
+ }
@@ -0,0 +1,21 @@
1
+ // Log-file naming primitives — shared leaf extracted from log-management.js to
2
+ // break the static cycle log-management.js ↔ v2/adapter.js (v2 read/write paths
3
+ // need these primitives but must not import the v1 session listing, which itself
4
+ // imports the v2 adapter). Keep this module dependency-free.
5
+
6
+ export function isLogFileName(name) {
7
+ return name.endsWith('.jsonl');
8
+ }
9
+
10
+ // 解析日志文件名里的时间戳 `YYYYMMDD_HHMMSS`(带不带 `<pid>__` 前缀都适用)。
11
+ // 用于「按时间排序 / 判最新」——文件名整串排序会把 `<pid>__` 前缀('1' < 'c')的最新文件排到最底,
12
+ // 必须按时间戳排。无法解析时返回 ''(排到最后)。v2 convert 消费,防漂移。
13
+ export function parseLogTs(name) {
14
+ const m = name.match(/_(\d{8}_\d{6})\.jsonl$/);
15
+ return m ? m[1] : '';
16
+ }
17
+
18
+ // A session whose journal moved within this window is treated as live and
19
+ // refused by deleteLogFiles (cross-process guard; the in-process guard is the
20
+ // caller's own writer state).
21
+ export const LIVE_SESSION_MTIME_MS = 5 * 60 * 1000;
@@ -1,11 +1,12 @@
1
1
  import { existsSync, realpathSync, readdirSync, readFileSync, statSync, mkdirSync, renameSync } from 'node:fs';
2
2
  import { readFile, stat, readdir } from 'node:fs/promises';
3
3
  import { join, sep, dirname, basename } from 'node:path';
4
- import { reconstructEntries } from './delta-reconstructor.js';
4
+ import { reconstructEntries } from '@ccv/core/delta-reconstructor';
5
5
  import { sanitizePathComponent } from './v2/layout.js';
6
6
  import { listV2Sessions } from './v2/adapter.js';
7
7
  import { summarizeSessionPage } from './v2/session-list.js';
8
8
  import { listSessionIds } from './v2/replay.js';
9
+ import { isLogFileName, LIVE_SESSION_MTIME_MS } from './log-file-utils.js';
9
10
 
10
11
  // wire-v2 S5 addressing (spec §12): 'v2:<project>/<session_id>' in every
11
12
  // existing ?file= parameter slot. Components must survive the same whitelist
@@ -63,17 +64,10 @@ export function validateLogPath(logDir, file) {
63
64
  return realPath;
64
65
  }
65
66
 
66
- export function isLogFileName(name) {
67
- return name.endsWith('.jsonl');
68
- }
69
-
70
- // 解析日志文件名里的时间戳 `YYYYMMDD_HHMMSS`(带不带 `<pid>__` 前缀都适用)。
71
- // 用于「按时间排序 / 判最新」——文件名整串排序会把 `<pid>__` 前缀('1' < 'c')的最新文件排到最底,
72
- // 必须按时间戳排。无法解析时返回 ''(排到最后)。v2 convert 消费,防漂移。
73
- export function parseLogTs(name) {
74
- const m = name.match(/_(\d{8}_\d{6})\.jsonl$/);
75
- return m ? m[1] : '';
76
- }
67
+ // isLogFileName / parseLogTs / LIVE_SESSION_MTIME_MS live in log-file-utils.js
68
+ // (shared leaf, cycle break: v2/* must not import this module). Re-exported here
69
+ // so existing consumers and tests keep their module path.
70
+ export { isLogFileName, parseLogTs, LIVE_SESSION_MTIME_MS } from './log-file-utils.js';
77
71
 
78
72
  // meta.startTs (ISO) → the v1 list's compact local-time stamp 'YYYYMMDD_HHMMSS'
79
73
  // so formatTimestamp / the desc sort work on v2 items unchanged.
@@ -371,8 +365,3 @@ export function deleteLogFiles(logDir, files, opts = {}) {
371
365
  }
372
366
  return results;
373
367
  }
374
-
375
- // A session whose journal moved within this window is treated as live and
376
- // refused by deleteLogFiles (cross-process guard; the in-process guard is the
377
- // caller's own writer state).
378
- export const LIVE_SESSION_MTIME_MS = 5 * 60 * 1000;
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { existsSync, statSync, openSync, readSync, closeSync } from 'node:fs';
14
14
  import { open as fsOpen, stat as fsStat } from 'node:fs/promises';
15
- import { isCheckpointEntry, isDeltaEntry, reconstructSegment } from './delta-reconstructor.js';
15
+ import { isCheckpointEntry, isDeltaEntry, reconstructSegment } from '@ccv/core/delta-reconstructor';
16
16
  import { isV2SessionDir, iterateV2RawEntries, iterateV2RawEntriesAsync, readV2WindowedEntries, streamV2WindowedEntries } from './v2/adapter.js';
17
17
 
18
18
  const READ_CHUNK_SIZE = 1024 * 1024; // 1MB
@@ -1,7 +1,7 @@
1
1
  import { readFileSync, existsSync } from 'node:fs';
2
2
  import { isMainAgentEntry, extractCachedContent } from './kv-cache-analyzer.js';
3
3
  import { buildContextWindowEvent, getContextSizeForModel } from './context-watcher.js';
4
- import { reconstructEntries } from './delta-reconstructor.js';
4
+ import { reconstructEntries } from '@ccv/core/delta-reconstructor';
5
5
  import { enrichEntry } from './enrich-plan-input.js';
6
6
  import { enrichEntry as enrichWorkflowEntry } from './enrich-workflow.js';
7
7
  import { sseWrite } from './wire-compress.js';
@@ -1,6 +1,6 @@
1
1
  import { readdirSync, readFileSync, writeFileSync, rmSync, mkdirSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- import { isNonEmptyFile } from './system-prompt-files.js';
3
+ import { isNonEmptyFile } from './file-api.js';
4
4
 
5
5
  // 「按模型定制 system prompt」的文件夹与文件名语法。
6
6
  // 全局目录 <LOG_DIR>/system_prompt/ 与工作区目录 <workspace>/system_prompt/ 各放一套;