cx-viewer 1.0.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 (864) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +221 -0
  3. package/cli.js +735 -0
  4. package/concepts/ar/BodyDiffJSON.md +32 -0
  5. package/concepts/ar/BodyFields.md +42 -0
  6. package/concepts/ar/CacheRebuild.md +36 -0
  7. package/concepts/ar/GlobalSettings.md +232 -0
  8. package/concepts/ar/KVCacheContent.md +49 -0
  9. package/concepts/ar/MainAgent.md +23 -0
  10. package/concepts/ar/ProxySwitch.md +50 -0
  11. package/concepts/ar/QRCode.md +25 -0
  12. package/concepts/ar/ResponseFields.md +50 -0
  13. package/concepts/ar/SubAgent-Search.md +20 -0
  14. package/concepts/ar/Teammate.md +26 -0
  15. package/concepts/ar/Tool-Agent.md +125 -0
  16. package/concepts/ar/Tool-AskUserQuestion.md +75 -0
  17. package/concepts/ar/Tool-Bash.md +167 -0
  18. package/concepts/ar/Tool-Edit.md +46 -0
  19. package/concepts/ar/Tool-EnterPlanMode.md +128 -0
  20. package/concepts/ar/Tool-EnterWorktree.md +56 -0
  21. package/concepts/ar/Tool-ExitPlanMode.md +62 -0
  22. package/concepts/ar/Tool-Glob.md +39 -0
  23. package/concepts/ar/Tool-Grep.md +57 -0
  24. package/concepts/ar/Tool-NotebookEdit.md +33 -0
  25. package/concepts/ar/Tool-Read.md +56 -0
  26. package/concepts/ar/Tool-SendMessage.md +41 -0
  27. package/concepts/ar/Tool-Skill.md +56 -0
  28. package/concepts/ar/Tool-Task.md +51 -0
  29. package/concepts/ar/Tool-TaskCreate.md +78 -0
  30. package/concepts/ar/Tool-TaskGet.md +56 -0
  31. package/concepts/ar/Tool-TaskList.md +56 -0
  32. package/concepts/ar/Tool-TaskOutput.md +40 -0
  33. package/concepts/ar/Tool-TaskStop.md +32 -0
  34. package/concepts/ar/Tool-TaskUpdate.md +123 -0
  35. package/concepts/ar/Tool-TeamCreate.md +38 -0
  36. package/concepts/ar/Tool-TeamDelete.md +30 -0
  37. package/concepts/ar/Tool-WebFetch.md +55 -0
  38. package/concepts/ar/Tool-WebSearch.md +58 -0
  39. package/concepts/ar/Tool-Write.md +39 -0
  40. package/concepts/ar/Tool-executeCode.md +41 -0
  41. package/concepts/ar/Tool-getDiagnostics.md +32 -0
  42. package/concepts/ar/Tools.md +67 -0
  43. package/concepts/ar/ToolsFirst.md +77 -0
  44. package/concepts/ar/TranslateContextPollution.md +46 -0
  45. package/concepts/ar/UltraPlan.md +55 -0
  46. package/concepts/da/BodyDiffJSON.md +32 -0
  47. package/concepts/da/BodyFields.md +42 -0
  48. package/concepts/da/CacheRebuild.md +36 -0
  49. package/concepts/da/GlobalSettings.md +232 -0
  50. package/concepts/da/KVCacheContent.md +49 -0
  51. package/concepts/da/MainAgent.md +23 -0
  52. package/concepts/da/ProxySwitch.md +50 -0
  53. package/concepts/da/QRCode.md +25 -0
  54. package/concepts/da/ResponseFields.md +50 -0
  55. package/concepts/da/SubAgent-Search.md +20 -0
  56. package/concepts/da/Teammate.md +26 -0
  57. package/concepts/da/Tool-Agent.md +125 -0
  58. package/concepts/da/Tool-AskUserQuestion.md +75 -0
  59. package/concepts/da/Tool-Bash.md +167 -0
  60. package/concepts/da/Tool-Edit.md +46 -0
  61. package/concepts/da/Tool-EnterPlanMode.md +128 -0
  62. package/concepts/da/Tool-EnterWorktree.md +56 -0
  63. package/concepts/da/Tool-ExitPlanMode.md +62 -0
  64. package/concepts/da/Tool-Glob.md +39 -0
  65. package/concepts/da/Tool-Grep.md +57 -0
  66. package/concepts/da/Tool-NotebookEdit.md +33 -0
  67. package/concepts/da/Tool-Read.md +56 -0
  68. package/concepts/da/Tool-SendMessage.md +41 -0
  69. package/concepts/da/Tool-Skill.md +56 -0
  70. package/concepts/da/Tool-Task.md +51 -0
  71. package/concepts/da/Tool-TaskCreate.md +78 -0
  72. package/concepts/da/Tool-TaskGet.md +56 -0
  73. package/concepts/da/Tool-TaskList.md +56 -0
  74. package/concepts/da/Tool-TaskOutput.md +40 -0
  75. package/concepts/da/Tool-TaskStop.md +32 -0
  76. package/concepts/da/Tool-TaskUpdate.md +123 -0
  77. package/concepts/da/Tool-TeamCreate.md +38 -0
  78. package/concepts/da/Tool-TeamDelete.md +30 -0
  79. package/concepts/da/Tool-WebFetch.md +55 -0
  80. package/concepts/da/Tool-WebSearch.md +58 -0
  81. package/concepts/da/Tool-Write.md +39 -0
  82. package/concepts/da/Tool-executeCode.md +41 -0
  83. package/concepts/da/Tool-getDiagnostics.md +32 -0
  84. package/concepts/da/Tools.md +67 -0
  85. package/concepts/da/ToolsFirst.md +77 -0
  86. package/concepts/da/TranslateContextPollution.md +46 -0
  87. package/concepts/da/UltraPlan.md +55 -0
  88. package/concepts/de/BodyDiffJSON.md +32 -0
  89. package/concepts/de/BodyFields.md +42 -0
  90. package/concepts/de/CacheRebuild.md +36 -0
  91. package/concepts/de/GlobalSettings.md +232 -0
  92. package/concepts/de/KVCacheContent.md +49 -0
  93. package/concepts/de/MainAgent.md +23 -0
  94. package/concepts/de/ProxySwitch.md +50 -0
  95. package/concepts/de/QRCode.md +25 -0
  96. package/concepts/de/ResponseFields.md +50 -0
  97. package/concepts/de/SubAgent-Search.md +20 -0
  98. package/concepts/de/Teammate.md +26 -0
  99. package/concepts/de/Tool-Agent.md +125 -0
  100. package/concepts/de/Tool-AskUserQuestion.md +75 -0
  101. package/concepts/de/Tool-Bash.md +167 -0
  102. package/concepts/de/Tool-Edit.md +46 -0
  103. package/concepts/de/Tool-EnterPlanMode.md +128 -0
  104. package/concepts/de/Tool-EnterWorktree.md +56 -0
  105. package/concepts/de/Tool-ExitPlanMode.md +62 -0
  106. package/concepts/de/Tool-Glob.md +39 -0
  107. package/concepts/de/Tool-Grep.md +57 -0
  108. package/concepts/de/Tool-NotebookEdit.md +33 -0
  109. package/concepts/de/Tool-Read.md +56 -0
  110. package/concepts/de/Tool-SendMessage.md +41 -0
  111. package/concepts/de/Tool-Skill.md +56 -0
  112. package/concepts/de/Tool-Task.md +51 -0
  113. package/concepts/de/Tool-TaskCreate.md +78 -0
  114. package/concepts/de/Tool-TaskGet.md +56 -0
  115. package/concepts/de/Tool-TaskList.md +56 -0
  116. package/concepts/de/Tool-TaskOutput.md +40 -0
  117. package/concepts/de/Tool-TaskStop.md +32 -0
  118. package/concepts/de/Tool-TaskUpdate.md +123 -0
  119. package/concepts/de/Tool-TeamCreate.md +38 -0
  120. package/concepts/de/Tool-TeamDelete.md +30 -0
  121. package/concepts/de/Tool-WebFetch.md +55 -0
  122. package/concepts/de/Tool-WebSearch.md +58 -0
  123. package/concepts/de/Tool-Write.md +39 -0
  124. package/concepts/de/Tool-executeCode.md +41 -0
  125. package/concepts/de/Tool-getDiagnostics.md +32 -0
  126. package/concepts/de/Tools.md +67 -0
  127. package/concepts/de/ToolsFirst.md +77 -0
  128. package/concepts/de/TranslateContextPollution.md +46 -0
  129. package/concepts/de/UltraPlan.md +55 -0
  130. package/concepts/en/BodyDiffJSON.md +32 -0
  131. package/concepts/en/BodyFields.md +42 -0
  132. package/concepts/en/CacheRebuild.md +36 -0
  133. package/concepts/en/GlobalSettings.md +232 -0
  134. package/concepts/en/KVCacheContent.md +49 -0
  135. package/concepts/en/MainAgent.md +23 -0
  136. package/concepts/en/ProxySwitch.md +50 -0
  137. package/concepts/en/QRCode.md +29 -0
  138. package/concepts/en/ResponseFields.md +50 -0
  139. package/concepts/en/SubAgent-Search.md +20 -0
  140. package/concepts/en/Teammate.md +26 -0
  141. package/concepts/en/Tool-Agent.md +125 -0
  142. package/concepts/en/Tool-AskUserQuestion.md +75 -0
  143. package/concepts/en/Tool-Bash.md +167 -0
  144. package/concepts/en/Tool-Edit.md +46 -0
  145. package/concepts/en/Tool-EnterPlanMode.md +128 -0
  146. package/concepts/en/Tool-EnterWorktree.md +56 -0
  147. package/concepts/en/Tool-ExitPlanMode.md +62 -0
  148. package/concepts/en/Tool-Glob.md +39 -0
  149. package/concepts/en/Tool-Grep.md +57 -0
  150. package/concepts/en/Tool-NotebookEdit.md +33 -0
  151. package/concepts/en/Tool-Read.md +56 -0
  152. package/concepts/en/Tool-SendMessage.md +41 -0
  153. package/concepts/en/Tool-Skill.md +56 -0
  154. package/concepts/en/Tool-Task.md +51 -0
  155. package/concepts/en/Tool-TaskCreate.md +78 -0
  156. package/concepts/en/Tool-TaskGet.md +56 -0
  157. package/concepts/en/Tool-TaskList.md +56 -0
  158. package/concepts/en/Tool-TaskOutput.md +40 -0
  159. package/concepts/en/Tool-TaskStop.md +32 -0
  160. package/concepts/en/Tool-TaskUpdate.md +123 -0
  161. package/concepts/en/Tool-TeamCreate.md +38 -0
  162. package/concepts/en/Tool-TeamDelete.md +30 -0
  163. package/concepts/en/Tool-WebFetch.md +55 -0
  164. package/concepts/en/Tool-WebSearch.md +58 -0
  165. package/concepts/en/Tool-Write.md +39 -0
  166. package/concepts/en/Tool-executeCode.md +41 -0
  167. package/concepts/en/Tool-getDiagnostics.md +32 -0
  168. package/concepts/en/Tools.md +67 -0
  169. package/concepts/en/ToolsFirst.md +77 -0
  170. package/concepts/en/TranslateContextPollution.md +46 -0
  171. package/concepts/en/UltraPlan.md +55 -0
  172. package/concepts/es/BodyDiffJSON.md +32 -0
  173. package/concepts/es/BodyFields.md +42 -0
  174. package/concepts/es/CacheRebuild.md +36 -0
  175. package/concepts/es/GlobalSettings.md +232 -0
  176. package/concepts/es/KVCacheContent.md +49 -0
  177. package/concepts/es/MainAgent.md +23 -0
  178. package/concepts/es/ProxySwitch.md +50 -0
  179. package/concepts/es/QRCode.md +25 -0
  180. package/concepts/es/ResponseFields.md +50 -0
  181. package/concepts/es/SubAgent-Search.md +20 -0
  182. package/concepts/es/Teammate.md +26 -0
  183. package/concepts/es/Tool-Agent.md +125 -0
  184. package/concepts/es/Tool-AskUserQuestion.md +75 -0
  185. package/concepts/es/Tool-Bash.md +167 -0
  186. package/concepts/es/Tool-Edit.md +46 -0
  187. package/concepts/es/Tool-EnterPlanMode.md +128 -0
  188. package/concepts/es/Tool-EnterWorktree.md +56 -0
  189. package/concepts/es/Tool-ExitPlanMode.md +62 -0
  190. package/concepts/es/Tool-Glob.md +39 -0
  191. package/concepts/es/Tool-Grep.md +57 -0
  192. package/concepts/es/Tool-NotebookEdit.md +33 -0
  193. package/concepts/es/Tool-Read.md +56 -0
  194. package/concepts/es/Tool-SendMessage.md +41 -0
  195. package/concepts/es/Tool-Skill.md +56 -0
  196. package/concepts/es/Tool-Task.md +51 -0
  197. package/concepts/es/Tool-TaskCreate.md +78 -0
  198. package/concepts/es/Tool-TaskGet.md +56 -0
  199. package/concepts/es/Tool-TaskList.md +56 -0
  200. package/concepts/es/Tool-TaskOutput.md +40 -0
  201. package/concepts/es/Tool-TaskStop.md +32 -0
  202. package/concepts/es/Tool-TaskUpdate.md +123 -0
  203. package/concepts/es/Tool-TeamCreate.md +38 -0
  204. package/concepts/es/Tool-TeamDelete.md +30 -0
  205. package/concepts/es/Tool-WebFetch.md +55 -0
  206. package/concepts/es/Tool-WebSearch.md +58 -0
  207. package/concepts/es/Tool-Write.md +39 -0
  208. package/concepts/es/Tool-executeCode.md +41 -0
  209. package/concepts/es/Tool-getDiagnostics.md +32 -0
  210. package/concepts/es/Tools.md +67 -0
  211. package/concepts/es/ToolsFirst.md +77 -0
  212. package/concepts/es/TranslateContextPollution.md +46 -0
  213. package/concepts/es/UltraPlan.md +55 -0
  214. package/concepts/fr/BodyDiffJSON.md +32 -0
  215. package/concepts/fr/BodyFields.md +42 -0
  216. package/concepts/fr/CacheRebuild.md +36 -0
  217. package/concepts/fr/GlobalSettings.md +232 -0
  218. package/concepts/fr/KVCacheContent.md +49 -0
  219. package/concepts/fr/MainAgent.md +23 -0
  220. package/concepts/fr/ProxySwitch.md +50 -0
  221. package/concepts/fr/QRCode.md +25 -0
  222. package/concepts/fr/ResponseFields.md +50 -0
  223. package/concepts/fr/SubAgent-Search.md +20 -0
  224. package/concepts/fr/Teammate.md +26 -0
  225. package/concepts/fr/Tool-Agent.md +125 -0
  226. package/concepts/fr/Tool-AskUserQuestion.md +75 -0
  227. package/concepts/fr/Tool-Bash.md +167 -0
  228. package/concepts/fr/Tool-Edit.md +46 -0
  229. package/concepts/fr/Tool-EnterPlanMode.md +128 -0
  230. package/concepts/fr/Tool-EnterWorktree.md +56 -0
  231. package/concepts/fr/Tool-ExitPlanMode.md +62 -0
  232. package/concepts/fr/Tool-Glob.md +39 -0
  233. package/concepts/fr/Tool-Grep.md +57 -0
  234. package/concepts/fr/Tool-NotebookEdit.md +33 -0
  235. package/concepts/fr/Tool-Read.md +56 -0
  236. package/concepts/fr/Tool-SendMessage.md +41 -0
  237. package/concepts/fr/Tool-Skill.md +56 -0
  238. package/concepts/fr/Tool-Task.md +51 -0
  239. package/concepts/fr/Tool-TaskCreate.md +78 -0
  240. package/concepts/fr/Tool-TaskGet.md +56 -0
  241. package/concepts/fr/Tool-TaskList.md +56 -0
  242. package/concepts/fr/Tool-TaskOutput.md +40 -0
  243. package/concepts/fr/Tool-TaskStop.md +32 -0
  244. package/concepts/fr/Tool-TaskUpdate.md +123 -0
  245. package/concepts/fr/Tool-TeamCreate.md +38 -0
  246. package/concepts/fr/Tool-TeamDelete.md +30 -0
  247. package/concepts/fr/Tool-WebFetch.md +55 -0
  248. package/concepts/fr/Tool-WebSearch.md +58 -0
  249. package/concepts/fr/Tool-Write.md +39 -0
  250. package/concepts/fr/Tool-executeCode.md +41 -0
  251. package/concepts/fr/Tool-getDiagnostics.md +32 -0
  252. package/concepts/fr/Tools.md +67 -0
  253. package/concepts/fr/ToolsFirst.md +77 -0
  254. package/concepts/fr/TranslateContextPollution.md +46 -0
  255. package/concepts/fr/UltraPlan.md +55 -0
  256. package/concepts/it/BodyDiffJSON.md +32 -0
  257. package/concepts/it/BodyFields.md +42 -0
  258. package/concepts/it/CacheRebuild.md +36 -0
  259. package/concepts/it/GlobalSettings.md +232 -0
  260. package/concepts/it/KVCacheContent.md +49 -0
  261. package/concepts/it/MainAgent.md +23 -0
  262. package/concepts/it/ProxySwitch.md +50 -0
  263. package/concepts/it/QRCode.md +25 -0
  264. package/concepts/it/ResponseFields.md +50 -0
  265. package/concepts/it/SubAgent-Search.md +20 -0
  266. package/concepts/it/Teammate.md +26 -0
  267. package/concepts/it/Tool-Agent.md +125 -0
  268. package/concepts/it/Tool-AskUserQuestion.md +75 -0
  269. package/concepts/it/Tool-Bash.md +167 -0
  270. package/concepts/it/Tool-Edit.md +46 -0
  271. package/concepts/it/Tool-EnterPlanMode.md +128 -0
  272. package/concepts/it/Tool-EnterWorktree.md +56 -0
  273. package/concepts/it/Tool-ExitPlanMode.md +62 -0
  274. package/concepts/it/Tool-Glob.md +39 -0
  275. package/concepts/it/Tool-Grep.md +57 -0
  276. package/concepts/it/Tool-NotebookEdit.md +33 -0
  277. package/concepts/it/Tool-Read.md +56 -0
  278. package/concepts/it/Tool-SendMessage.md +41 -0
  279. package/concepts/it/Tool-Skill.md +56 -0
  280. package/concepts/it/Tool-Task.md +51 -0
  281. package/concepts/it/Tool-TaskCreate.md +78 -0
  282. package/concepts/it/Tool-TaskGet.md +56 -0
  283. package/concepts/it/Tool-TaskList.md +56 -0
  284. package/concepts/it/Tool-TaskOutput.md +40 -0
  285. package/concepts/it/Tool-TaskStop.md +32 -0
  286. package/concepts/it/Tool-TaskUpdate.md +123 -0
  287. package/concepts/it/Tool-TeamCreate.md +38 -0
  288. package/concepts/it/Tool-TeamDelete.md +30 -0
  289. package/concepts/it/Tool-WebFetch.md +55 -0
  290. package/concepts/it/Tool-WebSearch.md +58 -0
  291. package/concepts/it/Tool-Write.md +39 -0
  292. package/concepts/it/Tool-executeCode.md +41 -0
  293. package/concepts/it/Tool-getDiagnostics.md +32 -0
  294. package/concepts/it/Tools.md +67 -0
  295. package/concepts/it/ToolsFirst.md +77 -0
  296. package/concepts/it/TranslateContextPollution.md +46 -0
  297. package/concepts/it/UltraPlan.md +55 -0
  298. package/concepts/ja/BodyDiffJSON.md +32 -0
  299. package/concepts/ja/BodyFields.md +42 -0
  300. package/concepts/ja/CacheRebuild.md +36 -0
  301. package/concepts/ja/GlobalSettings.md +232 -0
  302. package/concepts/ja/KVCacheContent.md +49 -0
  303. package/concepts/ja/MainAgent.md +23 -0
  304. package/concepts/ja/ProxySwitch.md +50 -0
  305. package/concepts/ja/QRCode.md +25 -0
  306. package/concepts/ja/ResponseFields.md +50 -0
  307. package/concepts/ja/SubAgent-Search.md +20 -0
  308. package/concepts/ja/Teammate.md +26 -0
  309. package/concepts/ja/Tool-Agent.md +125 -0
  310. package/concepts/ja/Tool-AskUserQuestion.md +75 -0
  311. package/concepts/ja/Tool-Bash.md +167 -0
  312. package/concepts/ja/Tool-Edit.md +46 -0
  313. package/concepts/ja/Tool-EnterPlanMode.md +128 -0
  314. package/concepts/ja/Tool-EnterWorktree.md +56 -0
  315. package/concepts/ja/Tool-ExitPlanMode.md +62 -0
  316. package/concepts/ja/Tool-Glob.md +39 -0
  317. package/concepts/ja/Tool-Grep.md +57 -0
  318. package/concepts/ja/Tool-NotebookEdit.md +33 -0
  319. package/concepts/ja/Tool-Read.md +56 -0
  320. package/concepts/ja/Tool-SendMessage.md +41 -0
  321. package/concepts/ja/Tool-Skill.md +56 -0
  322. package/concepts/ja/Tool-Task.md +51 -0
  323. package/concepts/ja/Tool-TaskCreate.md +78 -0
  324. package/concepts/ja/Tool-TaskGet.md +56 -0
  325. package/concepts/ja/Tool-TaskList.md +56 -0
  326. package/concepts/ja/Tool-TaskOutput.md +40 -0
  327. package/concepts/ja/Tool-TaskStop.md +32 -0
  328. package/concepts/ja/Tool-TaskUpdate.md +123 -0
  329. package/concepts/ja/Tool-TeamCreate.md +38 -0
  330. package/concepts/ja/Tool-TeamDelete.md +30 -0
  331. package/concepts/ja/Tool-WebFetch.md +55 -0
  332. package/concepts/ja/Tool-WebSearch.md +58 -0
  333. package/concepts/ja/Tool-Write.md +39 -0
  334. package/concepts/ja/Tool-executeCode.md +41 -0
  335. package/concepts/ja/Tool-getDiagnostics.md +32 -0
  336. package/concepts/ja/Tools.md +67 -0
  337. package/concepts/ja/ToolsFirst.md +77 -0
  338. package/concepts/ja/TranslateContextPollution.md +46 -0
  339. package/concepts/ja/UltraPlan.md +55 -0
  340. package/concepts/ko/BodyDiffJSON.md +32 -0
  341. package/concepts/ko/BodyFields.md +42 -0
  342. package/concepts/ko/CacheRebuild.md +36 -0
  343. package/concepts/ko/GlobalSettings.md +232 -0
  344. package/concepts/ko/KVCacheContent.md +49 -0
  345. package/concepts/ko/MainAgent.md +23 -0
  346. package/concepts/ko/ProxySwitch.md +50 -0
  347. package/concepts/ko/QRCode.md +25 -0
  348. package/concepts/ko/ResponseFields.md +50 -0
  349. package/concepts/ko/SubAgent-Search.md +20 -0
  350. package/concepts/ko/Teammate.md +26 -0
  351. package/concepts/ko/Tool-Agent.md +125 -0
  352. package/concepts/ko/Tool-AskUserQuestion.md +75 -0
  353. package/concepts/ko/Tool-Bash.md +167 -0
  354. package/concepts/ko/Tool-Edit.md +46 -0
  355. package/concepts/ko/Tool-EnterPlanMode.md +128 -0
  356. package/concepts/ko/Tool-EnterWorktree.md +56 -0
  357. package/concepts/ko/Tool-ExitPlanMode.md +62 -0
  358. package/concepts/ko/Tool-Glob.md +39 -0
  359. package/concepts/ko/Tool-Grep.md +57 -0
  360. package/concepts/ko/Tool-NotebookEdit.md +33 -0
  361. package/concepts/ko/Tool-Read.md +56 -0
  362. package/concepts/ko/Tool-SendMessage.md +41 -0
  363. package/concepts/ko/Tool-Skill.md +56 -0
  364. package/concepts/ko/Tool-Task.md +51 -0
  365. package/concepts/ko/Tool-TaskCreate.md +78 -0
  366. package/concepts/ko/Tool-TaskGet.md +56 -0
  367. package/concepts/ko/Tool-TaskList.md +56 -0
  368. package/concepts/ko/Tool-TaskOutput.md +40 -0
  369. package/concepts/ko/Tool-TaskStop.md +32 -0
  370. package/concepts/ko/Tool-TaskUpdate.md +123 -0
  371. package/concepts/ko/Tool-TeamCreate.md +38 -0
  372. package/concepts/ko/Tool-TeamDelete.md +30 -0
  373. package/concepts/ko/Tool-WebFetch.md +55 -0
  374. package/concepts/ko/Tool-WebSearch.md +58 -0
  375. package/concepts/ko/Tool-Write.md +39 -0
  376. package/concepts/ko/Tool-executeCode.md +41 -0
  377. package/concepts/ko/Tool-getDiagnostics.md +32 -0
  378. package/concepts/ko/Tools.md +67 -0
  379. package/concepts/ko/ToolsFirst.md +77 -0
  380. package/concepts/ko/TranslateContextPollution.md +46 -0
  381. package/concepts/ko/UltraPlan.md +55 -0
  382. package/concepts/no/BodyDiffJSON.md +32 -0
  383. package/concepts/no/BodyFields.md +42 -0
  384. package/concepts/no/CacheRebuild.md +36 -0
  385. package/concepts/no/GlobalSettings.md +232 -0
  386. package/concepts/no/KVCacheContent.md +49 -0
  387. package/concepts/no/MainAgent.md +23 -0
  388. package/concepts/no/ProxySwitch.md +50 -0
  389. package/concepts/no/QRCode.md +25 -0
  390. package/concepts/no/ResponseFields.md +50 -0
  391. package/concepts/no/SubAgent-Search.md +20 -0
  392. package/concepts/no/Teammate.md +26 -0
  393. package/concepts/no/Tool-Agent.md +125 -0
  394. package/concepts/no/Tool-AskUserQuestion.md +75 -0
  395. package/concepts/no/Tool-Bash.md +167 -0
  396. package/concepts/no/Tool-Edit.md +46 -0
  397. package/concepts/no/Tool-EnterPlanMode.md +128 -0
  398. package/concepts/no/Tool-EnterWorktree.md +56 -0
  399. package/concepts/no/Tool-ExitPlanMode.md +62 -0
  400. package/concepts/no/Tool-Glob.md +39 -0
  401. package/concepts/no/Tool-Grep.md +57 -0
  402. package/concepts/no/Tool-NotebookEdit.md +33 -0
  403. package/concepts/no/Tool-Read.md +56 -0
  404. package/concepts/no/Tool-SendMessage.md +41 -0
  405. package/concepts/no/Tool-Skill.md +56 -0
  406. package/concepts/no/Tool-Task.md +51 -0
  407. package/concepts/no/Tool-TaskCreate.md +78 -0
  408. package/concepts/no/Tool-TaskGet.md +56 -0
  409. package/concepts/no/Tool-TaskList.md +56 -0
  410. package/concepts/no/Tool-TaskOutput.md +40 -0
  411. package/concepts/no/Tool-TaskStop.md +32 -0
  412. package/concepts/no/Tool-TaskUpdate.md +123 -0
  413. package/concepts/no/Tool-TeamCreate.md +38 -0
  414. package/concepts/no/Tool-TeamDelete.md +30 -0
  415. package/concepts/no/Tool-WebFetch.md +55 -0
  416. package/concepts/no/Tool-WebSearch.md +58 -0
  417. package/concepts/no/Tool-Write.md +39 -0
  418. package/concepts/no/Tool-executeCode.md +41 -0
  419. package/concepts/no/Tool-getDiagnostics.md +32 -0
  420. package/concepts/no/Tools.md +67 -0
  421. package/concepts/no/ToolsFirst.md +77 -0
  422. package/concepts/no/TranslateContextPollution.md +46 -0
  423. package/concepts/no/UltraPlan.md +55 -0
  424. package/concepts/pl/BodyDiffJSON.md +32 -0
  425. package/concepts/pl/BodyFields.md +42 -0
  426. package/concepts/pl/CacheRebuild.md +36 -0
  427. package/concepts/pl/GlobalSettings.md +232 -0
  428. package/concepts/pl/KVCacheContent.md +49 -0
  429. package/concepts/pl/MainAgent.md +23 -0
  430. package/concepts/pl/ProxySwitch.md +50 -0
  431. package/concepts/pl/QRCode.md +25 -0
  432. package/concepts/pl/ResponseFields.md +50 -0
  433. package/concepts/pl/SubAgent-Search.md +20 -0
  434. package/concepts/pl/Teammate.md +26 -0
  435. package/concepts/pl/Tool-Agent.md +125 -0
  436. package/concepts/pl/Tool-AskUserQuestion.md +75 -0
  437. package/concepts/pl/Tool-Bash.md +167 -0
  438. package/concepts/pl/Tool-Edit.md +46 -0
  439. package/concepts/pl/Tool-EnterPlanMode.md +128 -0
  440. package/concepts/pl/Tool-EnterWorktree.md +56 -0
  441. package/concepts/pl/Tool-ExitPlanMode.md +62 -0
  442. package/concepts/pl/Tool-Glob.md +39 -0
  443. package/concepts/pl/Tool-Grep.md +57 -0
  444. package/concepts/pl/Tool-NotebookEdit.md +33 -0
  445. package/concepts/pl/Tool-Read.md +56 -0
  446. package/concepts/pl/Tool-SendMessage.md +41 -0
  447. package/concepts/pl/Tool-Skill.md +56 -0
  448. package/concepts/pl/Tool-Task.md +51 -0
  449. package/concepts/pl/Tool-TaskCreate.md +78 -0
  450. package/concepts/pl/Tool-TaskGet.md +56 -0
  451. package/concepts/pl/Tool-TaskList.md +56 -0
  452. package/concepts/pl/Tool-TaskOutput.md +40 -0
  453. package/concepts/pl/Tool-TaskStop.md +32 -0
  454. package/concepts/pl/Tool-TaskUpdate.md +123 -0
  455. package/concepts/pl/Tool-TeamCreate.md +38 -0
  456. package/concepts/pl/Tool-TeamDelete.md +30 -0
  457. package/concepts/pl/Tool-WebFetch.md +55 -0
  458. package/concepts/pl/Tool-WebSearch.md +58 -0
  459. package/concepts/pl/Tool-Write.md +39 -0
  460. package/concepts/pl/Tool-executeCode.md +41 -0
  461. package/concepts/pl/Tool-getDiagnostics.md +32 -0
  462. package/concepts/pl/Tools.md +67 -0
  463. package/concepts/pl/ToolsFirst.md +77 -0
  464. package/concepts/pl/TranslateContextPollution.md +46 -0
  465. package/concepts/pl/UltraPlan.md +55 -0
  466. package/concepts/pt-BR/BodyDiffJSON.md +32 -0
  467. package/concepts/pt-BR/BodyFields.md +42 -0
  468. package/concepts/pt-BR/CacheRebuild.md +36 -0
  469. package/concepts/pt-BR/GlobalSettings.md +232 -0
  470. package/concepts/pt-BR/KVCacheContent.md +49 -0
  471. package/concepts/pt-BR/MainAgent.md +23 -0
  472. package/concepts/pt-BR/ProxySwitch.md +50 -0
  473. package/concepts/pt-BR/QRCode.md +25 -0
  474. package/concepts/pt-BR/ResponseFields.md +50 -0
  475. package/concepts/pt-BR/SubAgent-Search.md +20 -0
  476. package/concepts/pt-BR/Teammate.md +26 -0
  477. package/concepts/pt-BR/Tool-Agent.md +125 -0
  478. package/concepts/pt-BR/Tool-AskUserQuestion.md +75 -0
  479. package/concepts/pt-BR/Tool-Bash.md +167 -0
  480. package/concepts/pt-BR/Tool-Edit.md +46 -0
  481. package/concepts/pt-BR/Tool-EnterPlanMode.md +128 -0
  482. package/concepts/pt-BR/Tool-EnterWorktree.md +56 -0
  483. package/concepts/pt-BR/Tool-ExitPlanMode.md +62 -0
  484. package/concepts/pt-BR/Tool-Glob.md +39 -0
  485. package/concepts/pt-BR/Tool-Grep.md +57 -0
  486. package/concepts/pt-BR/Tool-NotebookEdit.md +33 -0
  487. package/concepts/pt-BR/Tool-Read.md +56 -0
  488. package/concepts/pt-BR/Tool-SendMessage.md +41 -0
  489. package/concepts/pt-BR/Tool-Skill.md +56 -0
  490. package/concepts/pt-BR/Tool-Task.md +51 -0
  491. package/concepts/pt-BR/Tool-TaskCreate.md +78 -0
  492. package/concepts/pt-BR/Tool-TaskGet.md +56 -0
  493. package/concepts/pt-BR/Tool-TaskList.md +56 -0
  494. package/concepts/pt-BR/Tool-TaskOutput.md +40 -0
  495. package/concepts/pt-BR/Tool-TaskStop.md +32 -0
  496. package/concepts/pt-BR/Tool-TaskUpdate.md +123 -0
  497. package/concepts/pt-BR/Tool-TeamCreate.md +38 -0
  498. package/concepts/pt-BR/Tool-TeamDelete.md +30 -0
  499. package/concepts/pt-BR/Tool-WebFetch.md +55 -0
  500. package/concepts/pt-BR/Tool-WebSearch.md +58 -0
  501. package/concepts/pt-BR/Tool-Write.md +39 -0
  502. package/concepts/pt-BR/Tool-executeCode.md +41 -0
  503. package/concepts/pt-BR/Tool-getDiagnostics.md +32 -0
  504. package/concepts/pt-BR/Tools.md +67 -0
  505. package/concepts/pt-BR/ToolsFirst.md +77 -0
  506. package/concepts/pt-BR/TranslateContextPollution.md +46 -0
  507. package/concepts/pt-BR/UltraPlan.md +55 -0
  508. package/concepts/ru/BodyDiffJSON.md +32 -0
  509. package/concepts/ru/BodyFields.md +42 -0
  510. package/concepts/ru/CacheRebuild.md +36 -0
  511. package/concepts/ru/GlobalSettings.md +232 -0
  512. package/concepts/ru/KVCacheContent.md +49 -0
  513. package/concepts/ru/MainAgent.md +23 -0
  514. package/concepts/ru/ProxySwitch.md +50 -0
  515. package/concepts/ru/QRCode.md +25 -0
  516. package/concepts/ru/ResponseFields.md +50 -0
  517. package/concepts/ru/SubAgent-Search.md +20 -0
  518. package/concepts/ru/Teammate.md +26 -0
  519. package/concepts/ru/Tool-Agent.md +125 -0
  520. package/concepts/ru/Tool-AskUserQuestion.md +75 -0
  521. package/concepts/ru/Tool-Bash.md +167 -0
  522. package/concepts/ru/Tool-Edit.md +46 -0
  523. package/concepts/ru/Tool-EnterPlanMode.md +128 -0
  524. package/concepts/ru/Tool-EnterWorktree.md +56 -0
  525. package/concepts/ru/Tool-ExitPlanMode.md +62 -0
  526. package/concepts/ru/Tool-Glob.md +39 -0
  527. package/concepts/ru/Tool-Grep.md +57 -0
  528. package/concepts/ru/Tool-NotebookEdit.md +33 -0
  529. package/concepts/ru/Tool-Read.md +56 -0
  530. package/concepts/ru/Tool-SendMessage.md +41 -0
  531. package/concepts/ru/Tool-Skill.md +56 -0
  532. package/concepts/ru/Tool-Task.md +51 -0
  533. package/concepts/ru/Tool-TaskCreate.md +78 -0
  534. package/concepts/ru/Tool-TaskGet.md +56 -0
  535. package/concepts/ru/Tool-TaskList.md +56 -0
  536. package/concepts/ru/Tool-TaskOutput.md +40 -0
  537. package/concepts/ru/Tool-TaskStop.md +32 -0
  538. package/concepts/ru/Tool-TaskUpdate.md +123 -0
  539. package/concepts/ru/Tool-TeamCreate.md +38 -0
  540. package/concepts/ru/Tool-TeamDelete.md +30 -0
  541. package/concepts/ru/Tool-WebFetch.md +55 -0
  542. package/concepts/ru/Tool-WebSearch.md +58 -0
  543. package/concepts/ru/Tool-Write.md +39 -0
  544. package/concepts/ru/Tool-executeCode.md +41 -0
  545. package/concepts/ru/Tool-getDiagnostics.md +32 -0
  546. package/concepts/ru/Tools.md +67 -0
  547. package/concepts/ru/ToolsFirst.md +77 -0
  548. package/concepts/ru/TranslateContextPollution.md +46 -0
  549. package/concepts/ru/UltraPlan.md +55 -0
  550. package/concepts/th/BodyDiffJSON.md +32 -0
  551. package/concepts/th/BodyFields.md +42 -0
  552. package/concepts/th/CacheRebuild.md +36 -0
  553. package/concepts/th/GlobalSettings.md +232 -0
  554. package/concepts/th/KVCacheContent.md +49 -0
  555. package/concepts/th/MainAgent.md +23 -0
  556. package/concepts/th/ProxySwitch.md +50 -0
  557. package/concepts/th/QRCode.md +25 -0
  558. package/concepts/th/ResponseFields.md +50 -0
  559. package/concepts/th/SubAgent-Search.md +20 -0
  560. package/concepts/th/Teammate.md +26 -0
  561. package/concepts/th/Tool-Agent.md +125 -0
  562. package/concepts/th/Tool-AskUserQuestion.md +75 -0
  563. package/concepts/th/Tool-Bash.md +167 -0
  564. package/concepts/th/Tool-Edit.md +46 -0
  565. package/concepts/th/Tool-EnterPlanMode.md +128 -0
  566. package/concepts/th/Tool-EnterWorktree.md +56 -0
  567. package/concepts/th/Tool-ExitPlanMode.md +62 -0
  568. package/concepts/th/Tool-Glob.md +39 -0
  569. package/concepts/th/Tool-Grep.md +57 -0
  570. package/concepts/th/Tool-NotebookEdit.md +33 -0
  571. package/concepts/th/Tool-Read.md +56 -0
  572. package/concepts/th/Tool-SendMessage.md +41 -0
  573. package/concepts/th/Tool-Skill.md +56 -0
  574. package/concepts/th/Tool-Task.md +51 -0
  575. package/concepts/th/Tool-TaskCreate.md +78 -0
  576. package/concepts/th/Tool-TaskGet.md +56 -0
  577. package/concepts/th/Tool-TaskList.md +56 -0
  578. package/concepts/th/Tool-TaskOutput.md +40 -0
  579. package/concepts/th/Tool-TaskStop.md +32 -0
  580. package/concepts/th/Tool-TaskUpdate.md +123 -0
  581. package/concepts/th/Tool-TeamCreate.md +38 -0
  582. package/concepts/th/Tool-TeamDelete.md +30 -0
  583. package/concepts/th/Tool-WebFetch.md +55 -0
  584. package/concepts/th/Tool-WebSearch.md +58 -0
  585. package/concepts/th/Tool-Write.md +39 -0
  586. package/concepts/th/Tool-executeCode.md +41 -0
  587. package/concepts/th/Tool-getDiagnostics.md +32 -0
  588. package/concepts/th/Tools.md +67 -0
  589. package/concepts/th/ToolsFirst.md +77 -0
  590. package/concepts/th/TranslateContextPollution.md +46 -0
  591. package/concepts/th/UltraPlan.md +55 -0
  592. package/concepts/tr/BodyDiffJSON.md +32 -0
  593. package/concepts/tr/BodyFields.md +42 -0
  594. package/concepts/tr/CacheRebuild.md +36 -0
  595. package/concepts/tr/GlobalSettings.md +232 -0
  596. package/concepts/tr/KVCacheContent.md +49 -0
  597. package/concepts/tr/MainAgent.md +23 -0
  598. package/concepts/tr/ProxySwitch.md +50 -0
  599. package/concepts/tr/QRCode.md +25 -0
  600. package/concepts/tr/ResponseFields.md +50 -0
  601. package/concepts/tr/SubAgent-Search.md +20 -0
  602. package/concepts/tr/Teammate.md +26 -0
  603. package/concepts/tr/Tool-Agent.md +125 -0
  604. package/concepts/tr/Tool-AskUserQuestion.md +75 -0
  605. package/concepts/tr/Tool-Bash.md +167 -0
  606. package/concepts/tr/Tool-Edit.md +46 -0
  607. package/concepts/tr/Tool-EnterPlanMode.md +128 -0
  608. package/concepts/tr/Tool-EnterWorktree.md +56 -0
  609. package/concepts/tr/Tool-ExitPlanMode.md +62 -0
  610. package/concepts/tr/Tool-Glob.md +39 -0
  611. package/concepts/tr/Tool-Grep.md +57 -0
  612. package/concepts/tr/Tool-NotebookEdit.md +33 -0
  613. package/concepts/tr/Tool-Read.md +56 -0
  614. package/concepts/tr/Tool-SendMessage.md +41 -0
  615. package/concepts/tr/Tool-Skill.md +56 -0
  616. package/concepts/tr/Tool-Task.md +51 -0
  617. package/concepts/tr/Tool-TaskCreate.md +78 -0
  618. package/concepts/tr/Tool-TaskGet.md +56 -0
  619. package/concepts/tr/Tool-TaskList.md +56 -0
  620. package/concepts/tr/Tool-TaskOutput.md +40 -0
  621. package/concepts/tr/Tool-TaskStop.md +32 -0
  622. package/concepts/tr/Tool-TaskUpdate.md +123 -0
  623. package/concepts/tr/Tool-TeamCreate.md +38 -0
  624. package/concepts/tr/Tool-TeamDelete.md +30 -0
  625. package/concepts/tr/Tool-WebFetch.md +55 -0
  626. package/concepts/tr/Tool-WebSearch.md +58 -0
  627. package/concepts/tr/Tool-Write.md +39 -0
  628. package/concepts/tr/Tool-executeCode.md +41 -0
  629. package/concepts/tr/Tool-getDiagnostics.md +32 -0
  630. package/concepts/tr/Tools.md +67 -0
  631. package/concepts/tr/ToolsFirst.md +77 -0
  632. package/concepts/tr/TranslateContextPollution.md +46 -0
  633. package/concepts/tr/UltraPlan.md +55 -0
  634. package/concepts/uk/BodyDiffJSON.md +32 -0
  635. package/concepts/uk/BodyFields.md +42 -0
  636. package/concepts/uk/CacheRebuild.md +36 -0
  637. package/concepts/uk/GlobalSettings.md +232 -0
  638. package/concepts/uk/KVCacheContent.md +49 -0
  639. package/concepts/uk/MainAgent.md +23 -0
  640. package/concepts/uk/ProxySwitch.md +50 -0
  641. package/concepts/uk/QRCode.md +25 -0
  642. package/concepts/uk/ResponseFields.md +50 -0
  643. package/concepts/uk/SubAgent-Search.md +20 -0
  644. package/concepts/uk/Teammate.md +26 -0
  645. package/concepts/uk/Tool-Agent.md +125 -0
  646. package/concepts/uk/Tool-AskUserQuestion.md +75 -0
  647. package/concepts/uk/Tool-Bash.md +167 -0
  648. package/concepts/uk/Tool-Edit.md +46 -0
  649. package/concepts/uk/Tool-EnterPlanMode.md +128 -0
  650. package/concepts/uk/Tool-EnterWorktree.md +56 -0
  651. package/concepts/uk/Tool-ExitPlanMode.md +62 -0
  652. package/concepts/uk/Tool-Glob.md +39 -0
  653. package/concepts/uk/Tool-Grep.md +57 -0
  654. package/concepts/uk/Tool-NotebookEdit.md +33 -0
  655. package/concepts/uk/Tool-Read.md +56 -0
  656. package/concepts/uk/Tool-SendMessage.md +41 -0
  657. package/concepts/uk/Tool-Skill.md +56 -0
  658. package/concepts/uk/Tool-Task.md +51 -0
  659. package/concepts/uk/Tool-TaskCreate.md +78 -0
  660. package/concepts/uk/Tool-TaskGet.md +56 -0
  661. package/concepts/uk/Tool-TaskList.md +56 -0
  662. package/concepts/uk/Tool-TaskOutput.md +40 -0
  663. package/concepts/uk/Tool-TaskStop.md +32 -0
  664. package/concepts/uk/Tool-TaskUpdate.md +123 -0
  665. package/concepts/uk/Tool-TeamCreate.md +38 -0
  666. package/concepts/uk/Tool-TeamDelete.md +30 -0
  667. package/concepts/uk/Tool-WebFetch.md +55 -0
  668. package/concepts/uk/Tool-WebSearch.md +58 -0
  669. package/concepts/uk/Tool-Write.md +39 -0
  670. package/concepts/uk/Tool-executeCode.md +41 -0
  671. package/concepts/uk/Tool-getDiagnostics.md +32 -0
  672. package/concepts/uk/Tools.md +67 -0
  673. package/concepts/uk/ToolsFirst.md +77 -0
  674. package/concepts/uk/TranslateContextPollution.md +46 -0
  675. package/concepts/uk/UltraPlan.md +55 -0
  676. package/concepts/zh/BodyDiffJSON.md +32 -0
  677. package/concepts/zh/BodyFields.md +42 -0
  678. package/concepts/zh/CacheRebuild.md +36 -0
  679. package/concepts/zh/GlobalSettings.md +232 -0
  680. package/concepts/zh/KVCacheContent.md +49 -0
  681. package/concepts/zh/MainAgent.md +23 -0
  682. package/concepts/zh/ProxySwitch.md +50 -0
  683. package/concepts/zh/QRCode.md +29 -0
  684. package/concepts/zh/ResponseFields.md +50 -0
  685. package/concepts/zh/SubAgent-Search.md +20 -0
  686. package/concepts/zh/Teammate.md +26 -0
  687. package/concepts/zh/Tool-Agent.md +125 -0
  688. package/concepts/zh/Tool-AskUserQuestion.md +75 -0
  689. package/concepts/zh/Tool-Bash.md +167 -0
  690. package/concepts/zh/Tool-Edit.md +46 -0
  691. package/concepts/zh/Tool-EnterPlanMode.md +128 -0
  692. package/concepts/zh/Tool-EnterWorktree.md +56 -0
  693. package/concepts/zh/Tool-ExitPlanMode.md +62 -0
  694. package/concepts/zh/Tool-Glob.md +39 -0
  695. package/concepts/zh/Tool-Grep.md +57 -0
  696. package/concepts/zh/Tool-NotebookEdit.md +33 -0
  697. package/concepts/zh/Tool-Read.md +56 -0
  698. package/concepts/zh/Tool-SendMessage.md +41 -0
  699. package/concepts/zh/Tool-Skill.md +56 -0
  700. package/concepts/zh/Tool-Task.md +51 -0
  701. package/concepts/zh/Tool-TaskCreate.md +78 -0
  702. package/concepts/zh/Tool-TaskGet.md +56 -0
  703. package/concepts/zh/Tool-TaskList.md +56 -0
  704. package/concepts/zh/Tool-TaskOutput.md +40 -0
  705. package/concepts/zh/Tool-TaskStop.md +32 -0
  706. package/concepts/zh/Tool-TaskUpdate.md +123 -0
  707. package/concepts/zh/Tool-TeamCreate.md +38 -0
  708. package/concepts/zh/Tool-TeamDelete.md +30 -0
  709. package/concepts/zh/Tool-WebFetch.md +55 -0
  710. package/concepts/zh/Tool-WebSearch.md +58 -0
  711. package/concepts/zh/Tool-Write.md +39 -0
  712. package/concepts/zh/Tool-executeCode.md +41 -0
  713. package/concepts/zh/Tool-getDiagnostics.md +32 -0
  714. package/concepts/zh/Tools.md +67 -0
  715. package/concepts/zh/ToolsFirst.md +77 -0
  716. package/concepts/zh/TranslateContextPollution.md +46 -0
  717. package/concepts/zh/UltraPlan.md +55 -0
  718. package/concepts/zh-TW/BodyDiffJSON.md +32 -0
  719. package/concepts/zh-TW/BodyFields.md +42 -0
  720. package/concepts/zh-TW/CacheRebuild.md +36 -0
  721. package/concepts/zh-TW/GlobalSettings.md +232 -0
  722. package/concepts/zh-TW/KVCacheContent.md +49 -0
  723. package/concepts/zh-TW/MainAgent.md +23 -0
  724. package/concepts/zh-TW/ProxySwitch.md +50 -0
  725. package/concepts/zh-TW/QRCode.md +25 -0
  726. package/concepts/zh-TW/ResponseFields.md +50 -0
  727. package/concepts/zh-TW/SubAgent-Search.md +20 -0
  728. package/concepts/zh-TW/Teammate.md +26 -0
  729. package/concepts/zh-TW/Tool-Agent.md +125 -0
  730. package/concepts/zh-TW/Tool-AskUserQuestion.md +75 -0
  731. package/concepts/zh-TW/Tool-Bash.md +167 -0
  732. package/concepts/zh-TW/Tool-Edit.md +46 -0
  733. package/concepts/zh-TW/Tool-EnterPlanMode.md +128 -0
  734. package/concepts/zh-TW/Tool-EnterWorktree.md +56 -0
  735. package/concepts/zh-TW/Tool-ExitPlanMode.md +62 -0
  736. package/concepts/zh-TW/Tool-Glob.md +39 -0
  737. package/concepts/zh-TW/Tool-Grep.md +57 -0
  738. package/concepts/zh-TW/Tool-NotebookEdit.md +33 -0
  739. package/concepts/zh-TW/Tool-Read.md +56 -0
  740. package/concepts/zh-TW/Tool-SendMessage.md +41 -0
  741. package/concepts/zh-TW/Tool-Skill.md +56 -0
  742. package/concepts/zh-TW/Tool-Task.md +51 -0
  743. package/concepts/zh-TW/Tool-TaskCreate.md +78 -0
  744. package/concepts/zh-TW/Tool-TaskGet.md +56 -0
  745. package/concepts/zh-TW/Tool-TaskList.md +56 -0
  746. package/concepts/zh-TW/Tool-TaskOutput.md +40 -0
  747. package/concepts/zh-TW/Tool-TaskStop.md +32 -0
  748. package/concepts/zh-TW/Tool-TaskUpdate.md +123 -0
  749. package/concepts/zh-TW/Tool-TeamCreate.md +38 -0
  750. package/concepts/zh-TW/Tool-TeamDelete.md +30 -0
  751. package/concepts/zh-TW/Tool-WebFetch.md +55 -0
  752. package/concepts/zh-TW/Tool-WebSearch.md +58 -0
  753. package/concepts/zh-TW/Tool-Write.md +39 -0
  754. package/concepts/zh-TW/Tool-executeCode.md +41 -0
  755. package/concepts/zh-TW/Tool-getDiagnostics.md +32 -0
  756. package/concepts/zh-TW/Tools.md +67 -0
  757. package/concepts/zh-TW/ToolsFirst.md +77 -0
  758. package/concepts/zh-TW/TranslateContextPollution.md +46 -0
  759. package/concepts/zh-TW/UltraPlan.md +55 -0
  760. package/dist/assets/App-BzrN42Qt.js +41 -0
  761. package/dist/assets/App-fG2r3jFq.css +1 -0
  762. package/dist/assets/AppHeader-B3hrnZr-.css +41 -0
  763. package/dist/assets/AppHeader.module-BMU2vyC4.js +1246 -0
  764. package/dist/assets/Mobile-BnDkLcBv.css +1 -0
  765. package/dist/assets/Mobile-C9wxQTXV.js +10 -0
  766. package/dist/assets/_baseUniq-CXWHShmB.js +1 -0
  767. package/dist/assets/arc-qbol0NJo.js +1 -0
  768. package/dist/assets/architectureDiagram-Q4EWVU46-COZebb1N.js +36 -0
  769. package/dist/assets/blockDiagram-DXYQGD6D-COCgzPKy.js +132 -0
  770. package/dist/assets/c4Diagram-AHTNJAMY-Bs5XvLEo.js +10 -0
  771. package/dist/assets/channel-DvLUZ3Xf.js +1 -0
  772. package/dist/assets/chunk-4BX2VUAB-CyGriz9d.js +1 -0
  773. package/dist/assets/chunk-4TB4RGXK-DlT_q-fl.js +206 -0
  774. package/dist/assets/chunk-55IACEB6-NHN99ZNC.js +1 -0
  775. package/dist/assets/chunk-EDXVE4YY-fK4f9Na9.js +1 -0
  776. package/dist/assets/chunk-FMBD7UC4-DL-dQIq1.js +15 -0
  777. package/dist/assets/chunk-OYMX7WX6-6uruB4VY.js +231 -0
  778. package/dist/assets/chunk-QZHKN3VN-CCWIqLO8.js +1 -0
  779. package/dist/assets/chunk-YZCP3GAM-Cu84DMJo.js +1 -0
  780. package/dist/assets/classDiagram-6PBFFD2Q-ByKhp2Tk.js +1 -0
  781. package/dist/assets/classDiagram-v2-HSJHXN6E-ByKhp2Tk.js +1 -0
  782. package/dist/assets/clone-DZHpE494.js +1 -0
  783. package/dist/assets/cose-bilkent-S5V4N54A-Dqi4iU3-.js +1 -0
  784. package/dist/assets/cytoscape.esm-DxGcaOPV.js +331 -0
  785. package/dist/assets/dagre-KV5264BT-Dl-EJ9rb.js +4 -0
  786. package/dist/assets/default-avatar-CT9tlZjd.svg +1 -0
  787. package/dist/assets/default-model-avatar-DlbUPjyv.svg +1 -0
  788. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  789. package/dist/assets/diagram-5BDNPKRD-BYtyzF0D.js +10 -0
  790. package/dist/assets/diagram-G4DWMVQ6-BuETHFNU.js +24 -0
  791. package/dist/assets/diagram-MMDJMWI5-Z02oZp6I.js +43 -0
  792. package/dist/assets/diagram-TYMM5635-BpGlKv8l.js +24 -0
  793. package/dist/assets/erDiagram-SMLLAGMA-C4YngeQh.js +85 -0
  794. package/dist/assets/flowDiagram-DWJPFMVM-BWddFffg.js +162 -0
  795. package/dist/assets/ganttDiagram-T4ZO3ILL-Bg0jOD4m.js +292 -0
  796. package/dist/assets/gitGraphDiagram-UUTBAWPF-Bz-3sTXZ.js +106 -0
  797. package/dist/assets/graph-XiH8DkIu.js +1 -0
  798. package/dist/assets/html2canvas.esm-QH1iLAAe.js +22 -0
  799. package/dist/assets/index-BuUsWKGZ.js +41 -0
  800. package/dist/assets/index-DCtZ2KSX.css +1 -0
  801. package/dist/assets/infoDiagram-42DDH7IO-DLo-lOCE.js +2 -0
  802. package/dist/assets/init-Gi6I4Gst.js +1 -0
  803. package/dist/assets/ishikawaDiagram-UXIWVN3A-BsIzT5eO.js +70 -0
  804. package/dist/assets/journeyDiagram-VCZTEJTY-C3bOkKqv.js +139 -0
  805. package/dist/assets/kanban-definition-6JOO6SKY-D-rJRNbp.js +89 -0
  806. package/dist/assets/katex-DkKDou_j.js +257 -0
  807. package/dist/assets/layout-Bqp8Hh1c.js +1 -0
  808. package/dist/assets/linear-BWRSipGb.js +1 -0
  809. package/dist/assets/loading-pet-12a9GTQC.gif +0 -0
  810. package/dist/assets/mermaid.core-CJa7klhs.js +308 -0
  811. package/dist/assets/min-CQ_VyzMd.js +1 -0
  812. package/dist/assets/mindmap-definition-QFDTVHPH-Bnj7DDSx.js +96 -0
  813. package/dist/assets/model-deepseek-LDuqTN2N.svg +2 -0
  814. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  815. package/dist/assets/pieDiagram-DEJITSTG-CC8a7Ylw.js +30 -0
  816. package/dist/assets/quadrantDiagram-34T5L4WZ-CrmL1WUV.js +7 -0
  817. package/dist/assets/requirementDiagram-MS252O5E-TfkX4u_6.js +84 -0
  818. package/dist/assets/sankeyDiagram-XADWPNL6-DMwBbND7.js +10 -0
  819. package/dist/assets/sequenceDiagram-FGHM5R23-CFghMYsm.js +157 -0
  820. package/dist/assets/stateDiagram-FHFEXIEX-1H6JIM7l.js +1 -0
  821. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CtXMaKcb.js +1 -0
  822. package/dist/assets/timeline-definition-GMOUNBTQ-DnLMBlVa.js +120 -0
  823. package/dist/assets/vennDiagram-DHZGUBPP-DoIkY_KL.js +34 -0
  824. package/dist/assets/wardley-RL74JXVD-3n5XmOD5.js +162 -0
  825. package/dist/assets/wardleyDiagram-NUSXRM2D-UMOq3ofC.js +20 -0
  826. package/dist/assets/xychartDiagram-5P7HB3ND-CNDuQ5Cg.js +7 -0
  827. package/dist/favicon.ico +0 -0
  828. package/dist/index.html +15 -0
  829. package/findcx.js +204 -0
  830. package/i18n.js +2413 -0
  831. package/interceptor.js +698 -0
  832. package/lib/appserver-bridge.js +584 -0
  833. package/lib/ask-bridge.js +126 -0
  834. package/lib/codex-config.js +146 -0
  835. package/lib/constants.js +26 -0
  836. package/lib/context-watcher.js +85 -0
  837. package/lib/cxv-editor.js +73 -0
  838. package/lib/delta-reconstructor.js +256 -0
  839. package/lib/ensure-hooks.js +88 -0
  840. package/lib/extract-plugin-name.mjs +18 -0
  841. package/lib/file-api.js +128 -0
  842. package/lib/git-diff.js +89 -0
  843. package/lib/interceptor-core.js +270 -0
  844. package/lib/kv-cache-analyzer.js +164 -0
  845. package/lib/log-management.js +198 -0
  846. package/lib/log-stream.js +310 -0
  847. package/lib/log-watcher.js +245 -0
  848. package/lib/otel-adapter.js +251 -0
  849. package/lib/otel-receiver.js +198 -0
  850. package/lib/perm-bridge.js +142 -0
  851. package/lib/plugin-loader.js +161 -0
  852. package/lib/plugin-manager.js +118 -0
  853. package/lib/proxy-env.js +23 -0
  854. package/lib/proxy-errors.js +18 -0
  855. package/lib/sdk-adapter.js +77 -0
  856. package/lib/sdk-manager.js +464 -0
  857. package/lib/stats-worker.js +384 -0
  858. package/lib/updater.js +123 -0
  859. package/lib/user-profile.js +43 -0
  860. package/package.json +115 -0
  861. package/proxy.js +369 -0
  862. package/pty-manager.js +407 -0
  863. package/server.js +3226 -0
  864. package/workspace-registry.js +151 -0
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Codex config.toml management utility
3
+ * Reads/writes openai_base_url in Codex's TOML config files
4
+ * to redirect API traffic through the cxv proxy.
5
+ */
6
+
7
+ import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync, copyFileSync } from 'node:fs';
8
+ import { join } from 'node:path';
9
+ import { homedir } from 'node:os';
10
+
11
+ const BACKUP_SUFFIX = '.cxv-backup';
12
+
13
+ /**
14
+ * Older CX-Viewer versions could leave a loopback proxy URL in Codex's global
15
+ * config.toml. Treat that as stale and fall back to settings.json / env instead.
16
+ * Legit local overrides should be configured in settings.json or OPENAI_BASE_URL.
17
+ */
18
+ export function isStaleLocalCodexBaseUrl(url) {
19
+ if (!url || typeof url !== 'string') return false;
20
+ try {
21
+ const parsed = new URL(url);
22
+ const host = parsed.hostname;
23
+ const isLoopback = host === '127.0.0.1'
24
+ || host === 'localhost'
25
+ || host === '::1'
26
+ || host === '::ffff:127.0.0.1';
27
+ if (!isLoopback) return false;
28
+ return parsed.pathname === '' || parsed.pathname === '/';
29
+ } catch {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Read a simple key = "value" from a TOML file
36
+ */
37
+ function readTomlValue(filePath, key) {
38
+ try {
39
+ if (!existsSync(filePath)) return null;
40
+ const content = readFileSync(filePath, 'utf-8');
41
+ const match = content.match(new RegExp(`^${key}\\s*=\\s*"([^"]*)"`, 'm'));
42
+ return match ? match[1] : null;
43
+ } catch {
44
+ return null;
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Get the original Codex base URL from user-level or system-level config.toml
50
+ * (Skips project-level to avoid reading our own proxy URL)
51
+ */
52
+ export function getOriginalCodexBaseUrl() {
53
+ // User config
54
+ const userUrl = readTomlValue(join(homedir(), '.codex', 'config.toml'), 'openai_base_url');
55
+ if (userUrl && !isStaleLocalCodexBaseUrl(userUrl)) return userUrl;
56
+
57
+ // System config
58
+ const systemUrl = readTomlValue('/etc/codex/config.toml', 'openai_base_url');
59
+ return isStaleLocalCodexBaseUrl(systemUrl) ? null : systemUrl;
60
+ }
61
+
62
+ /**
63
+ * Set openai_base_url in project-level .codex/config.toml to redirect traffic.
64
+ * Backs up existing config and returns a cleanup function to restore it.
65
+ *
66
+ * @param {string} projectDir - workspace/project directory
67
+ * @param {string} proxyUrl - proxy URL (e.g. "http://127.0.0.1:PORT")
68
+ * @returns {() => void} cleanup function to restore original config
69
+ */
70
+ export function setProjectCodexBaseUrl(projectDir, proxyUrl) {
71
+ const configDir = join(projectDir, '.codex');
72
+ const configPath = join(configDir, 'config.toml');
73
+ const backupPath = configPath + BACKUP_SUFFIX;
74
+
75
+ try { mkdirSync(configDir, { recursive: true }); } catch (err) { console.warn('[CX Viewer] mkdirSync failed:', configDir, err.message); }
76
+
77
+ // Backup existing config
78
+ let hadOriginal = false;
79
+ if (existsSync(configPath)) {
80
+ try {
81
+ copyFileSync(configPath, backupPath);
82
+ hadOriginal = true;
83
+ } catch (err) { console.warn('[CX Viewer] Config backup failed:', err.message); }
84
+ }
85
+
86
+ // Read existing content or start fresh
87
+ let content = '';
88
+ try {
89
+ if (existsSync(configPath)) {
90
+ content = readFileSync(configPath, 'utf-8');
91
+ }
92
+ } catch (err) { console.warn('[CX Viewer] Config read failed:', err.message); }
93
+
94
+ // Update or append openai_base_url
95
+ const regex = /^openai_base_url\s*=\s*"[^"]*"/m;
96
+ if (regex.test(content)) {
97
+ content = content.replace(regex, `openai_base_url = "${proxyUrl}"`);
98
+ } else {
99
+ // Append after any existing content
100
+ const trimmed = content.trimEnd();
101
+ content = trimmed ? trimmed + `\nopenai_base_url = "${proxyUrl}"\n` : `openai_base_url = "${proxyUrl}"\n`;
102
+ }
103
+
104
+ try {
105
+ writeFileSync(configPath, content);
106
+ } catch (err) {
107
+ console.error('[CX Viewer] Failed to write Codex config:', err.message);
108
+ }
109
+
110
+ // Return cleanup function
111
+ return function restoreCodexConfig() {
112
+ try {
113
+ if (hadOriginal && existsSync(backupPath)) {
114
+ copyFileSync(backupPath, configPath);
115
+ unlinkSync(backupPath);
116
+ } else if (!hadOriginal) {
117
+ // We created this config — remove our key or the whole file
118
+ if (existsSync(configPath)) {
119
+ const current = readFileSync(configPath, 'utf-8');
120
+ const cleaned = current.replace(/^openai_base_url\s*=\s*"[^"]*"\n?/gm, '').trim();
121
+ if (cleaned) {
122
+ writeFileSync(configPath, cleaned + '\n');
123
+ } else {
124
+ unlinkSync(configPath);
125
+ }
126
+ }
127
+ if (existsSync(backupPath)) unlinkSync(backupPath);
128
+ }
129
+ } catch (err) { console.warn('[CX Viewer] Config restore failed:', err.message); }
130
+ };
131
+ }
132
+
133
+ /**
134
+ * Restore config from backup on startup (in case of previous crash).
135
+ * Call this early in the startup sequence.
136
+ */
137
+ export function restoreCrashBackup(projectDir) {
138
+ const configPath = join(projectDir, '.codex', 'config.toml');
139
+ const backupPath = configPath + BACKUP_SUFFIX;
140
+ try {
141
+ if (existsSync(backupPath)) {
142
+ copyFileSync(backupPath, configPath);
143
+ unlinkSync(backupPath);
144
+ }
145
+ } catch (err) { console.warn('[CX Viewer] Crash backup restore failed:', err.message); }
146
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Shared constants for cx-viewer
3
+ */
4
+
5
+ // Server port range
6
+ export const DEFAULT_START_PORT = 7008;
7
+ export const DEFAULT_MAX_PORT = 7099;
8
+
9
+ // Log management
10
+ export const MAX_LOG_SIZE = 300 * 1024 * 1024; // 300MB — trigger rotation
11
+ export const CHECKPOINT_INTERVAL = 10; // entries between delta checkpoints
12
+
13
+ // HTTP limits
14
+ export const MAX_POST_BODY = 10 * 1024 * 1024; // 10MB
15
+ export const MAX_UPLOAD_SIZE = 100 * 1024 * 1024; // 100MB
16
+
17
+ // Timers
18
+ export const SSE_HEARTBEAT_MS = 30_000; // 30s SSE ping
19
+ export const HOOK_TIMEOUT_MS = 5 * 60 * 1000; // 5min hook execution timeout
20
+ export const EDITOR_SESSION_CLEANUP_MS = 3_600_000; // 1h stale editor session cleanup
21
+
22
+ // Paths
23
+ export const UPLOAD_DIR = '/tmp/cx-viewer-uploads';
24
+
25
+ // API defaults
26
+ export const DEFAULT_API_BASE = 'https://api.openai.com';
@@ -0,0 +1,85 @@
1
+ import { readFileSync, existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { homedir } from 'node:os';
4
+
5
+ export const CONTEXT_WINDOW_FILE = join(homedir(), '.codex', 'context-window.json');
6
+ export const CLAUDE_SETTINGS_FILE = join(homedir(), '.codex', 'settings.json');
7
+
8
+ // Startup cache: read once, never re-read unless model changes
9
+ let _startupModelBase = null; // e.g. 'opus-4-6'
10
+ let _startupContextSize = null; // e.g. 1000000
11
+
12
+ /**
13
+ * Read context-window.json once at startup and cache model→size mapping.
14
+ * Extracts model base name (e.g. 'opus-4-6') and context size from model.id (e.g. 'codex-opus-4-6[1m]').
15
+ * @returns {{ modelId: string|null, contextSize: number }}
16
+ */
17
+ export function readModelContextSize() {
18
+ try {
19
+ if (!existsSync(CONTEXT_WINDOW_FILE)) return { modelId: null, contextSize: 200000 };
20
+ const raw = readFileSync(CONTEXT_WINDOW_FILE, 'utf-8');
21
+ const data = JSON.parse(raw);
22
+ const modelId = data?.model?.id || null;
23
+ let contextSize = 200000;
24
+ if (modelId) {
25
+ const lower = modelId.toLowerCase();
26
+ const sizeMatch = lower.match(/\[(\d+)([km])\]/);
27
+ if (sizeMatch) {
28
+ const num = parseInt(sizeMatch[1], 10);
29
+ contextSize = sizeMatch[2] === 'm' ? num * 1000000 : num * 1000;
30
+ } else if (/opus/i.test(lower)) {
31
+ // Opus models default to 1M context
32
+ contextSize = 1000000;
33
+ }
34
+ // Cache the base name → size mapping
35
+ const base = lower.replace(/^codex-/i, '').replace(/\[.*\]/, '').trim();
36
+ _startupModelBase = base;
37
+ _startupContextSize = contextSize;
38
+ }
39
+ return { modelId, contextSize };
40
+ } catch {
41
+ return { modelId: null, contextSize: 200000 };
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Get context size for a given API model name (e.g. 'codex-opus-4-6-20250514').
47
+ * Uses startup cache to avoid re-reading the file.
48
+ * @param {string} apiModelName - model name from req.body.model
49
+ * @returns {number} context window size in tokens
50
+ */
51
+ export function getContextSizeForModel(apiModelName) {
52
+ if (!apiModelName) return _startupContextSize || 200000;
53
+ const lower = apiModelName.toLowerCase();
54
+ // Extract base: 'codex-opus-4-6-20250514' → 'opus-4-6'
55
+ const base = lower.replace(/^codex-/i, '').replace(/-\d{8}$/, '').trim();
56
+ // Match against startup cache
57
+ if (_startupModelBase && base === _startupModelBase) {
58
+ return _startupContextSize;
59
+ }
60
+ // Opus always has 1M context; other unknown models default to 200K
61
+ if (/opus/i.test(lower)) return 1000000;
62
+ return 200000;
63
+ }
64
+
65
+ /**
66
+ * Build a context_window SSE event payload from API usage data.
67
+ * @param {object} usage - API response usage object
68
+ * @param {number} contextSize - total context window size in tokens
69
+ * @returns {object|null} context_window event data, or null if usage missing
70
+ */
71
+ export function buildContextWindowEvent(usage, contextSize) {
72
+ if (!usage) return null;
73
+ const inputTokens = (usage.input_tokens || 0) + (usage.cache_creation_input_tokens || 0) + (usage.cache_read_input_tokens || 0);
74
+ const outputTokens = usage.output_tokens || 0;
75
+ const totalTokens = inputTokens + outputTokens;
76
+ const usedPct = Math.round((totalTokens / contextSize) * 100);
77
+ return {
78
+ total_input_tokens: inputTokens,
79
+ total_output_tokens: outputTokens,
80
+ context_window_size: contextSize,
81
+ current_usage: usage,
82
+ used_percentage: usedPct,
83
+ remaining_percentage: 100 - usedPct,
84
+ };
85
+ }
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * cxv-editor.js — Custom $EDITOR wrapper for cx-viewer.
5
+ *
6
+ * When Codex spawns $EDITOR (e.g. /memory), this script is invoked instead.
7
+ * It notifies the cx-viewer server to open the file in the built-in FileContentView,
8
+ * then polls until the user closes the editor in the web UI.
9
+ */
10
+
11
+ import { randomUUID } from 'node:crypto';
12
+ import { resolve } from 'node:path';
13
+
14
+ const filePath = resolve(process.argv[2] || '');
15
+ if (!filePath) {
16
+ console.error('Usage: cxv-editor <file>');
17
+ process.exit(1);
18
+ }
19
+
20
+ const port = process.env.CXV_EDITOR_PORT;
21
+ if (!port) {
22
+ console.error('CXV_EDITOR_PORT not set');
23
+ process.exit(1);
24
+ }
25
+
26
+ const sessionId = randomUUID();
27
+ const baseUrl = `http://127.0.0.1:${port}`;
28
+ const POLL_INTERVAL = 500;
29
+ const TIMEOUT = 30 * 60 * 1000; // 30 minutes
30
+
31
+ async function main() {
32
+ // Notify server to open editor
33
+ try {
34
+ const res = await fetch(`${baseUrl}/api/editor-open`, {
35
+ method: 'POST',
36
+ headers: { 'Content-Type': 'application/json' },
37
+ body: JSON.stringify({ sessionId, filePath }),
38
+ });
39
+ if (!res.ok) {
40
+ const err = await res.text();
41
+ console.error('Failed to open editor:', err);
42
+ process.exit(1);
43
+ }
44
+ } catch (err) {
45
+ console.error('Failed to connect to cx-viewer server:', err.message);
46
+ process.exit(1);
47
+ }
48
+
49
+ // Poll until done
50
+ const start = Date.now();
51
+ while (true) {
52
+ if (Date.now() - start > TIMEOUT) {
53
+ console.error('Editor session timed out');
54
+ process.exit(1);
55
+ }
56
+
57
+ await new Promise(r => setTimeout(r, POLL_INTERVAL));
58
+
59
+ try {
60
+ const res = await fetch(`${baseUrl}/api/editor-status?id=${sessionId}`);
61
+ if (!res.ok) continue;
62
+ const data = await res.json();
63
+ if (data.done) {
64
+ process.exit(0);
65
+ }
66
+ } catch {
67
+ // Connection error — server may have restarted, exit
68
+ process.exit(1);
69
+ }
70
+ }
71
+ }
72
+
73
+ main();
@@ -0,0 +1,256 @@
1
+ /**
2
+ * Delta Reconstructor — 增量日志重建模块
3
+ *
4
+ * 将 delta 格式的日志条目重建为完整的 messages 数组。
5
+ * 仅处理 mainAgent 条目,teammate/旧格式条目直接跳过。
6
+ *
7
+ * 提供三种 API:
8
+ * - reconstructEntries(entries): 批量重建,用于 readLogFile() 和 readLocalLog()
9
+ * - reconstructSegment(segment, nextCheckpoint): 段级重建,用于流式分段处理
10
+ * - createIncrementalReconstructor(): 有状态的增量重建器,用于 watcher 逐条重建
11
+ */
12
+
13
+ /**
14
+ * 判断一个条目是否为 checkpoint(应重置累积状态)。
15
+ * 三种情况视为 checkpoint:
16
+ * 1. 无 _deltaFormat 字段 → 旧格式全量条目
17
+ * 2. _isCheckpoint === true → 显式 checkpoint
18
+ * 3. _totalMessageCount === body.messages.length → 隐式 checkpoint(delta 长度 === 总长度)
19
+ */
20
+ export function isCheckpointEntry(entry) {
21
+ // 无 _deltaFormat:旧格式全量条目
22
+ if (!entry._deltaFormat) return true;
23
+ // 显式 checkpoint
24
+ if (entry._isCheckpoint) return true;
25
+ // 隐式 checkpoint:delta 长度等于总长度
26
+ const msgs = entry.body?.messages;
27
+ if (Array.isArray(msgs) && entry._totalMessageCount === msgs.length) return true;
28
+ return false;
29
+ }
30
+
31
+ /**
32
+ * 判断一个条目是否为需要重建的 delta 条目(mainAgent + _deltaFormat)。
33
+ */
34
+ export function isDeltaEntry(entry) {
35
+ return entry._deltaFormat && entry.mainAgent;
36
+ }
37
+
38
+ /**
39
+ * 批量重建 — 用于 readLogFile() 和 readLocalLog()。
40
+ * 输入已去重的条目数组,输出重建后的条目数组(原地修改 body.messages)。
41
+ * 非 mainAgent delta 条目不受影响。
42
+ *
43
+ * @param {Array} entries - 已去重、按时间顺序排列的条目数组
44
+ * @returns {Array} 重建后的条目数组(同一引用,原地修改)
45
+ */
46
+ export function reconstructEntries(entries) {
47
+ // 第一遍:正向重建
48
+ let accumulated = []; // mainAgent 累积 messages
49
+ const broken = []; // 记录重建失败的条目索引(用于第二遍补偿)
50
+
51
+ for (let i = 0; i < entries.length; i++) {
52
+ const entry = entries[i];
53
+ // 跳过 inProgress 条目:孤立的 inProgress(请求超时未完成)在 dedup 后残留,
54
+ // 其 delta 与后续 completed 条目重复,双重累积会导致 accumulated 偏移
55
+ // (与 createIncrementalReconstructor line 209 保持一致)
56
+ if (entry.inProgress) continue;
57
+ if (!isDeltaEntry(entry)) {
58
+ // 非 delta 条目(旧格式 / teammate):如果是 mainAgent 旧格式,重置累积状态
59
+ if (entry.mainAgent && Array.isArray(entry.body?.messages)) {
60
+ accumulated = [...entry.body.messages];
61
+ }
62
+ continue;
63
+ }
64
+
65
+ // delta 条目处理
66
+ const msgs = entry.body?.messages;
67
+ if (!Array.isArray(msgs)) continue;
68
+
69
+ if (isCheckpointEntry(entry)) {
70
+ // checkpoint:用当前 messages 重置累积状态
71
+ accumulated = [...msgs];
72
+ } else {
73
+ // delta:拼接到累积数组
74
+ accumulated = [...accumulated, ...msgs];
75
+ // 挂载重建后的完整 messages(checkpoint/旧格式条目保持不变)
76
+ entry.body.messages = accumulated;
77
+ if (entry._totalMessageCount && accumulated.length !== entry._totalMessageCount) {
78
+ broken.push(i);
79
+ }
80
+ }
81
+ }
82
+
83
+ // 第二遍:补偿修复 — 用后续最近的 checkpoint 回填断裂的条目
84
+ if (broken.length > 0) {
85
+ _compensateBrokenEntries(entries, broken);
86
+ }
87
+
88
+ return entries;
89
+ }
90
+
91
+ /**
92
+ * 补偿修复:对断裂的 delta 条目,从后续最近的 checkpoint 中提取完整 messages 回填。
93
+ * checkpoint 包含截至该点的完整历史,可以据此反推之前条目的 messages。
94
+ */
95
+ function _compensateBrokenEntries(entries, brokenIndices) {
96
+ for (const brokenIdx of brokenIndices) {
97
+ const brokenEntry = entries[brokenIdx];
98
+ const expectedCount = brokenEntry._totalMessageCount;
99
+ if (!expectedCount) continue;
100
+
101
+ // 向后查找最近的 checkpoint 或旧格式全量条目
102
+ for (let j = brokenIdx + 1; j < entries.length; j++) {
103
+ const candidate = entries[j];
104
+ if (!candidate.mainAgent || !Array.isArray(candidate.body?.messages)) continue;
105
+
106
+ const candidateMsgs = candidate.body.messages;
107
+ const candidateTotal = candidate._totalMessageCount || candidateMsgs.length;
108
+
109
+ // 候选条目必须是 checkpoint/旧格式且包含足够的 messages
110
+ const isFullEntry = !candidate._deltaFormat || isCheckpointEntry(candidate);
111
+ if (isFullEntry && candidateTotal >= expectedCount) {
112
+ // 从完整 messages 中截取前 expectedCount 条作为补偿
113
+ brokenEntry.body.messages = candidateMsgs.slice(0, expectedCount);
114
+ break;
115
+ }
116
+ }
117
+ }
118
+ }
119
+
120
+ /**
121
+ * 段级重建 — 用于流式分段处理。
122
+ * 对一个 checkpoint 边界内的段进行正向重建,如有 broken 条目则用 nextCheckpoint 反向修复。
123
+ * 段内条目数通常 ≤ CHECKPOINT_INTERVAL(10),内存开销可控。
124
+ *
125
+ * @param {Array} segment - 段内条目数组(段首应为 checkpoint/旧格式条目)
126
+ * @param {object|null} nextCheckpoint - 下一个 checkpoint 条目(用于反向修复),最后一段可为 null
127
+ * @returns {Array} 重建后的段条目数组(原地修改)
128
+ */
129
+ export function reconstructSegment(segment, nextCheckpoint) {
130
+ let accumulated = [];
131
+ const broken = [];
132
+
133
+ for (let i = 0; i < segment.length; i++) {
134
+ const entry = segment[i];
135
+ if (entry.inProgress) continue;
136
+ if (!isDeltaEntry(entry)) {
137
+ if (entry.mainAgent && Array.isArray(entry.body?.messages)) {
138
+ accumulated = [...entry.body.messages];
139
+ }
140
+ continue;
141
+ }
142
+
143
+ const msgs = entry.body?.messages;
144
+ if (!Array.isArray(msgs)) continue;
145
+
146
+ if (isCheckpointEntry(entry)) {
147
+ accumulated = [...msgs];
148
+ } else {
149
+ accumulated = [...accumulated, ...msgs];
150
+ entry.body.messages = accumulated;
151
+ if (entry._totalMessageCount && accumulated.length !== entry._totalMessageCount) {
152
+ broken.push(i);
153
+ }
154
+ }
155
+ }
156
+
157
+ // 补偿修复:先在段内向后查找,再用 nextCheckpoint
158
+ if (broken.length > 0) {
159
+ for (const brokenIdx of broken) {
160
+ const brokenEntry = segment[brokenIdx];
161
+ const expectedCount = brokenEntry._totalMessageCount;
162
+ if (!expectedCount) continue;
163
+
164
+ let repaired = false;
165
+ // 段内向后查找
166
+ for (let j = brokenIdx + 1; j < segment.length; j++) {
167
+ const candidate = segment[j];
168
+ if (!candidate.mainAgent || !Array.isArray(candidate.body?.messages)) continue;
169
+ const candidateMsgs = candidate.body.messages;
170
+ const candidateTotal = candidate._totalMessageCount || candidateMsgs.length;
171
+ const isFullEntry = !candidate._deltaFormat || isCheckpointEntry(candidate);
172
+ if (isFullEntry && candidateTotal >= expectedCount) {
173
+ brokenEntry.body.messages = candidateMsgs.slice(0, expectedCount);
174
+ repaired = true;
175
+ break;
176
+ }
177
+ }
178
+ // 段内未找到,用 nextCheckpoint 修复
179
+ if (!repaired && nextCheckpoint) {
180
+ const cpMsgs = nextCheckpoint.body?.messages;
181
+ const cpTotal = nextCheckpoint._totalMessageCount || cpMsgs?.length || 0;
182
+ if (Array.isArray(cpMsgs) && cpTotal >= expectedCount) {
183
+ brokenEntry.body.messages = cpMsgs.slice(0, expectedCount);
184
+ }
185
+ }
186
+ }
187
+ }
188
+
189
+ return segment;
190
+ }
191
+
192
+ /**
193
+ * 创建有状态的增量重建器 — 用于 watcher 逐条重建。
194
+ * 每次调用 reconstruct(entry) 处理一条新条目。
195
+ *
196
+ * @returns {{ reconstruct: (entry: object) => object }}
197
+ */
198
+ export function createIncrementalReconstructor() {
199
+ let accumulated = []; // mainAgent 累积 messages
200
+
201
+ return {
202
+ /**
203
+ * 重建单条条目。
204
+ * - 非 delta 条目:如果是 mainAgent 旧格式,更新累积状态,原样返回
205
+ * - checkpoint:重置累积状态,原样返回
206
+ * - delta:拼接重建,修改 body.messages 后返回
207
+ *
208
+ * @param {object} entry - 单条日志条目
209
+ * @returns {object} 重建后的条目(同一引用)
210
+ */
211
+ reconstruct(entry) {
212
+ // inProgress 条目:用 accumulated 副本重建 messages,但不更新 accumulated 本身。
213
+ // 这样客户端收到完整 messages(避免 delta 闪烁),
214
+ // 而后续 completed 条目仍能基于正确的 accumulated 重建。
215
+ if (entry.inProgress) {
216
+ if (isDeltaEntry(entry) && !isCheckpointEntry(entry)) {
217
+ const msgs = entry.body?.messages;
218
+ if (Array.isArray(msgs)) {
219
+ entry.body.messages = [...accumulated, ...msgs];
220
+ }
221
+ }
222
+ return entry;
223
+ }
224
+
225
+ if (!isDeltaEntry(entry)) {
226
+ // 非 delta 条目:如果是 mainAgent 旧格式,更新累积状态
227
+ if (entry.mainAgent && Array.isArray(entry.body?.messages)) {
228
+ accumulated = [...entry.body.messages];
229
+ }
230
+ return entry;
231
+ }
232
+
233
+ const msgs = entry.body?.messages;
234
+ if (!Array.isArray(msgs)) return entry;
235
+
236
+ if (isCheckpointEntry(entry)) {
237
+ // checkpoint:重置累积状态
238
+ accumulated = [...msgs];
239
+ } else {
240
+ // delta:拼接
241
+ accumulated = [...accumulated, ...msgs];
242
+ entry.body.messages = accumulated;
243
+ }
244
+
245
+ return entry;
246
+ },
247
+
248
+ /**
249
+ * 重置累积状态(用于 full_reload 等场景)。
250
+ */
251
+ reset() {
252
+ accumulated = [];
253
+ }
254
+ };
255
+ }
256
+
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Register AskUserQuestion and permission approval hooks into ~/.codex/settings.json.
3
+ * Shared between cli.js and electron/tab-worker.js.
4
+ */
5
+ import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'node:fs';
6
+ import { resolve, dirname } from 'node:path';
7
+ import { homedir } from 'node:os';
8
+ import { fileURLToPath } from 'node:url';
9
+
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = dirname(__filename);
12
+ const rootDir = resolve(__dirname, '..');
13
+
14
+ export function ensureHooks() {
15
+ try {
16
+ const codexDir = resolve(homedir(), '.codex');
17
+ const settingsPath = resolve(codexDir, 'settings.json');
18
+ let settings = {};
19
+ try { if (existsSync(settingsPath)) settings = JSON.parse(readFileSync(settingsPath, 'utf-8')); } catch {
20
+ console.warn('[CX Viewer] ~/.codex/settings.json is malformed, skipping hook injection');
21
+ return;
22
+ }
23
+
24
+ if (!settings.hooks) settings.hooks = {};
25
+ if (!Array.isArray(settings.hooks.PreToolUse)) settings.hooks.PreToolUse = [];
26
+
27
+ let changed = false;
28
+
29
+ // AskUserQuestion hook → ask-bridge.js
30
+ // Guard: only execute when CXVIEWER_PORT is set (i.e. launched by cx-viewer)
31
+ const askBridgePath = resolve(rootDir, 'lib', 'ask-bridge.js');
32
+ const askCmd = `[ -n "$CXVIEWER_PORT" ] && node "${askBridgePath}" || true`;
33
+ const askExisting = settings.hooks.PreToolUse.find(h => h.matcher === 'AskUserQuestion');
34
+ if (askExisting) {
35
+ if ((askExisting.hooks?.[0]?.command || '') !== askCmd) {
36
+ askExisting.hooks = [{ type: 'command', command: askCmd }];
37
+ changed = true;
38
+ }
39
+ } else {
40
+ settings.hooks.PreToolUse.push({
41
+ matcher: 'AskUserQuestion',
42
+ hooks: [{ type: 'command', command: askCmd }]
43
+ });
44
+ changed = true;
45
+ }
46
+
47
+ // Permission approval hook → perm-bridge.js (matcher: "" = match all tools)
48
+ // Guard: only execute when CXVIEWER_PORT is set (i.e. launched by cx-viewer)
49
+ const permBridgePath = resolve(rootDir, 'lib', 'perm-bridge.js');
50
+ const permCmd = `[ -n "$CXVIEWER_PORT" ] && node "${permBridgePath}" || true`;
51
+ const permMatcher = '';
52
+ // Clean up legacy entries
53
+ for (let i = settings.hooks.PreToolUse.length - 1; i >= 0; i--) {
54
+ const h = settings.hooks.PreToolUse[i];
55
+ const cmd = h.hooks?.[0]?.command || '';
56
+ if (cmd.includes('perm-bridge.js') && h.matcher !== permMatcher) {
57
+ settings.hooks.PreToolUse.splice(i, 1);
58
+ changed = true;
59
+ } else if ((h.matcher === null || h.matcher === undefined) && cmd.includes('perm-bridge.js')) {
60
+ settings.hooks.PreToolUse.splice(i, 1);
61
+ changed = true;
62
+ } else if (h.matcher === 'Bash' && cmd.includes('grep') && /git|npm/.test(cmd)) {
63
+ settings.hooks.PreToolUse.splice(i, 1);
64
+ changed = true;
65
+ }
66
+ }
67
+ const permExisting = settings.hooks.PreToolUse.find(h => h.matcher === permMatcher);
68
+ if (permExisting) {
69
+ if ((permExisting.hooks?.[0]?.command || '') !== permCmd) {
70
+ permExisting.hooks = [{ type: 'command', command: permCmd }];
71
+ changed = true;
72
+ }
73
+ } else {
74
+ settings.hooks.PreToolUse.push({
75
+ matcher: permMatcher,
76
+ hooks: [{ type: 'command', command: permCmd }]
77
+ });
78
+ changed = true;
79
+ }
80
+
81
+ if (changed) {
82
+ mkdirSync(codexDir, { recursive: true });
83
+ writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
84
+ }
85
+ } catch (err) {
86
+ console.warn('[CX Viewer] Failed to ensure hooks:', err.message);
87
+ }
88
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 在隔离子进程中提取插件 name,避免不安全的插件代码影响主进程。
3
+ * 用法: node lib/extract-plugin-name.mjs <file-path>
4
+ * 输出: JSON { name: string } 到 stdout
5
+ */
6
+ const filePath = process.argv[2];
7
+ if (!filePath) {
8
+ process.stdout.write(JSON.stringify({ name: '' }));
9
+ process.exit(0);
10
+ }
11
+ try {
12
+ const mod = await import(`file://${filePath}`);
13
+ const plugin = mod.default || mod;
14
+ process.stdout.write(JSON.stringify({ name: plugin.name || '' }));
15
+ } catch {
16
+ process.stdout.write(JSON.stringify({ name: '' }));
17
+ }
18
+ process.exit(0);