@kaitranntt/ccs 7.79.1 → 8.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 (335) hide show
  1. package/README.md +29 -11
  2. package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
  3. package/dist/bin/ccsxp-runtime.js +8 -0
  4. package/dist/bin/ccsxp-runtime.js.map +1 -1
  5. package/dist/bin/codex-runtime-router.d.ts +24 -0
  6. package/dist/bin/codex-runtime-router.d.ts.map +1 -0
  7. package/dist/bin/codex-runtime-router.js +117 -0
  8. package/dist/bin/codex-runtime-router.js.map +1 -0
  9. package/dist/bin/codex-runtime.d.ts +1 -0
  10. package/dist/bin/codex-runtime.js +7 -2
  11. package/dist/bin/codex-runtime.js.map +1 -1
  12. package/dist/ccs.js +2 -1
  13. package/dist/ccs.js.map +1 -1
  14. package/dist/cliproxy/ai-providers/codex-plan-compatibility.js +2 -2
  15. package/dist/cliproxy/ai-providers/codex-plan-compatibility.js.map +1 -1
  16. package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts +2 -2
  17. package/dist/cliproxy/ai-providers/codex-reasoning-proxy.d.ts.map +1 -1
  18. package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js +16 -8
  19. package/dist/cliproxy/ai-providers/codex-reasoning-proxy.js.map +1 -1
  20. package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts +8 -0
  21. package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts.map +1 -1
  22. package/dist/cliproxy/ai-providers/model-id-normalizer.js +19 -2
  23. package/dist/cliproxy/ai-providers/model-id-normalizer.js.map +1 -1
  24. package/dist/cliproxy/ai-providers/service.d.ts.map +1 -1
  25. package/dist/cliproxy/ai-providers/service.js +39 -12
  26. package/dist/cliproxy/ai-providers/service.js.map +1 -1
  27. package/dist/cliproxy/auth/oauth-handler.d.ts +13 -1
  28. package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
  29. package/dist/cliproxy/auth/oauth-handler.js +111 -34
  30. package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
  31. package/dist/cliproxy/auth/oauth-trace/redactor.d.ts.map +1 -1
  32. package/dist/cliproxy/auth/oauth-trace/redactor.js +9 -1
  33. package/dist/cliproxy/auth/oauth-trace/redactor.js.map +1 -1
  34. package/dist/cliproxy/config/generator.d.ts.map +1 -1
  35. package/dist/cliproxy/config/generator.js +5 -2
  36. package/dist/cliproxy/config/generator.js.map +1 -1
  37. package/dist/cliproxy/config/thinking-config.js +6 -6
  38. package/dist/cliproxy/config/thinking-config.js.map +1 -1
  39. package/dist/cliproxy/executor/env-resolver.js +1 -1
  40. package/dist/cliproxy/executor/env-resolver.js.map +1 -1
  41. package/dist/cliproxy/quota/quota-fetcher-claude.d.ts.map +1 -1
  42. package/dist/cliproxy/quota/quota-fetcher-claude.js +35 -4
  43. package/dist/cliproxy/quota/quota-fetcher-claude.js.map +1 -1
  44. package/dist/cliproxy/quota/quota-manager.d.ts +1 -0
  45. package/dist/cliproxy/quota/quota-manager.d.ts.map +1 -1
  46. package/dist/cliproxy/quota/quota-manager.js +53 -2
  47. package/dist/cliproxy/quota/quota-manager.js.map +1 -1
  48. package/dist/cliproxy/services/oauth-usage-log-transformer.d.ts.map +1 -1
  49. package/dist/cliproxy/services/oauth-usage-log-transformer.js +5 -0
  50. package/dist/cliproxy/services/oauth-usage-log-transformer.js.map +1 -1
  51. package/dist/codex-auth/codex-account-identity.d.ts +8 -0
  52. package/dist/codex-auth/codex-account-identity.d.ts.map +1 -0
  53. package/dist/codex-auth/codex-account-identity.js +53 -0
  54. package/dist/codex-auth/codex-account-identity.js.map +1 -0
  55. package/dist/codex-auth/codex-auth-dashboard-service.d.ts +46 -0
  56. package/dist/codex-auth/codex-auth-dashboard-service.d.ts.map +1 -0
  57. package/dist/codex-auth/codex-auth-dashboard-service.js +228 -0
  58. package/dist/codex-auth/codex-auth-dashboard-service.js.map +1 -0
  59. package/dist/codex-auth/codex-auth-help.d.ts +7 -0
  60. package/dist/codex-auth/codex-auth-help.d.ts.map +1 -0
  61. package/dist/codex-auth/codex-auth-help.js +87 -0
  62. package/dist/codex-auth/codex-auth-help.js.map +1 -0
  63. package/dist/codex-auth/codex-auth-router.d.ts +16 -0
  64. package/dist/codex-auth/codex-auth-router.d.ts.map +1 -0
  65. package/dist/codex-auth/codex-auth-router.js +77 -0
  66. package/dist/codex-auth/codex-auth-router.js.map +1 -0
  67. package/dist/codex-auth/codex-config-symlink.d.ts +14 -0
  68. package/dist/codex-auth/codex-config-symlink.d.ts.map +1 -0
  69. package/dist/codex-auth/codex-config-symlink.js +128 -0
  70. package/dist/codex-auth/codex-config-symlink.js.map +1 -0
  71. package/dist/codex-auth/codex-profile-paths.d.ts +5 -0
  72. package/dist/codex-auth/codex-profile-paths.d.ts.map +1 -0
  73. package/dist/codex-auth/codex-profile-paths.js +58 -0
  74. package/dist/codex-auth/codex-profile-paths.js.map +1 -0
  75. package/dist/codex-auth/codex-profile-registry.d.ts +34 -0
  76. package/dist/codex-auth/codex-profile-registry.d.ts.map +1 -0
  77. package/dist/codex-auth/codex-profile-registry.js +360 -0
  78. package/dist/codex-auth/codex-profile-registry.js.map +1 -0
  79. package/dist/codex-auth/codex-profile-resources.d.ts +6 -0
  80. package/dist/codex-auth/codex-profile-resources.d.ts.map +1 -0
  81. package/dist/codex-auth/codex-profile-resources.js +119 -0
  82. package/dist/codex-auth/codex-profile-resources.js.map +1 -0
  83. package/dist/codex-auth/commands/create-command.d.ts +9 -0
  84. package/dist/codex-auth/commands/create-command.d.ts.map +1 -0
  85. package/dist/codex-auth/commands/create-command.js +203 -0
  86. package/dist/codex-auth/commands/create-command.js.map +1 -0
  87. package/dist/codex-auth/commands/import-default-command.d.ts +18 -0
  88. package/dist/codex-auth/commands/import-default-command.d.ts.map +1 -0
  89. package/dist/codex-auth/commands/import-default-command.js +385 -0
  90. package/dist/codex-auth/commands/import-default-command.js.map +1 -0
  91. package/dist/codex-auth/commands/index.d.ts +13 -0
  92. package/dist/codex-auth/commands/index.d.ts.map +1 -0
  93. package/dist/codex-auth/commands/index.js +27 -0
  94. package/dist/codex-auth/commands/index.js.map +1 -0
  95. package/dist/codex-auth/commands/login-command.d.ts +9 -0
  96. package/dist/codex-auth/commands/login-command.d.ts.map +1 -0
  97. package/dist/codex-auth/commands/login-command.js +152 -0
  98. package/dist/codex-auth/commands/login-command.js.map +1 -0
  99. package/dist/codex-auth/commands/remove-command.d.ts +10 -0
  100. package/dist/codex-auth/commands/remove-command.d.ts.map +1 -0
  101. package/dist/codex-auth/commands/remove-command.js +230 -0
  102. package/dist/codex-auth/commands/remove-command.js.map +1 -0
  103. package/dist/codex-auth/commands/show-command.d.ts +10 -0
  104. package/dist/codex-auth/commands/show-command.d.ts.map +1 -0
  105. package/dist/codex-auth/commands/show-command.js +127 -0
  106. package/dist/codex-auth/commands/show-command.js.map +1 -0
  107. package/dist/codex-auth/commands/show-detail-view.d.ts +7 -0
  108. package/dist/codex-auth/commands/show-detail-view.d.ts.map +1 -0
  109. package/dist/codex-auth/commands/show-detail-view.js +134 -0
  110. package/dist/codex-auth/commands/show-detail-view.js.map +1 -0
  111. package/dist/codex-auth/commands/switch-command.d.ts +7 -0
  112. package/dist/codex-auth/commands/switch-command.d.ts.map +1 -0
  113. package/dist/codex-auth/commands/switch-command.js +48 -0
  114. package/dist/codex-auth/commands/switch-command.js.map +1 -0
  115. package/dist/codex-auth/commands/types.d.ts +45 -0
  116. package/dist/codex-auth/commands/types.d.ts.map +1 -0
  117. package/dist/codex-auth/commands/types.js +85 -0
  118. package/dist/codex-auth/commands/types.js.map +1 -0
  119. package/dist/codex-auth/commands/use-command.d.ts +16 -0
  120. package/dist/codex-auth/commands/use-command.d.ts.map +1 -0
  121. package/dist/codex-auth/commands/use-command.js +86 -0
  122. package/dist/codex-auth/commands/use-command.js.map +1 -0
  123. package/dist/codex-auth/decode-id-token.d.ts +12 -0
  124. package/dist/codex-auth/decode-id-token.d.ts.map +1 -0
  125. package/dist/codex-auth/decode-id-token.js +83 -0
  126. package/dist/codex-auth/decode-id-token.js.map +1 -0
  127. package/dist/codex-auth/index.d.ts +9 -0
  128. package/dist/codex-auth/index.d.ts.map +1 -0
  129. package/dist/codex-auth/index.js +22 -0
  130. package/dist/codex-auth/index.js.map +1 -0
  131. package/dist/codex-auth/resolve-active-profile.d.ts +13 -0
  132. package/dist/codex-auth/resolve-active-profile.d.ts.map +1 -0
  133. package/dist/codex-auth/resolve-active-profile.js +161 -0
  134. package/dist/codex-auth/resolve-active-profile.js.map +1 -0
  135. package/dist/codex-auth/shell-detect.d.ts +19 -0
  136. package/dist/codex-auth/shell-detect.d.ts.map +1 -0
  137. package/dist/codex-auth/shell-detect.js +129 -0
  138. package/dist/codex-auth/shell-detect.js.map +1 -0
  139. package/dist/codex-auth/types.d.ts +26 -0
  140. package/dist/codex-auth/types.d.ts.map +1 -0
  141. package/dist/codex-auth/types.js +34 -0
  142. package/dist/codex-auth/types.js.map +1 -0
  143. package/dist/commands/cliproxy/variant-subcommand.js +1 -1
  144. package/dist/commands/cliproxy/variant-subcommand.js.map +1 -1
  145. package/dist/commands/command-catalog.d.ts +1 -1
  146. package/dist/commands/command-catalog.d.ts.map +1 -1
  147. package/dist/commands/command-catalog.js +10 -1
  148. package/dist/commands/command-catalog.js.map +1 -1
  149. package/dist/commands/completion-backend.d.ts.map +1 -1
  150. package/dist/commands/completion-backend.js +2 -0
  151. package/dist/commands/completion-backend.js.map +1 -1
  152. package/dist/commands/config-command.d.ts +2 -0
  153. package/dist/commands/config-command.d.ts.map +1 -1
  154. package/dist/commands/config-command.js +31 -20
  155. package/dist/commands/config-command.js.map +1 -1
  156. package/dist/commands/docker/finalize-key-rotation-subcommand.d.ts +2 -0
  157. package/dist/commands/docker/finalize-key-rotation-subcommand.d.ts.map +1 -0
  158. package/dist/commands/docker/finalize-key-rotation-subcommand.js +79 -0
  159. package/dist/commands/docker/finalize-key-rotation-subcommand.js.map +1 -0
  160. package/dist/commands/docker/help-subcommand.d.ts.map +1 -1
  161. package/dist/commands/docker/help-subcommand.js +6 -0
  162. package/dist/commands/docker/help-subcommand.js.map +1 -1
  163. package/dist/commands/docker/index.d.ts.map +1 -1
  164. package/dist/commands/docker/index.js +4 -0
  165. package/dist/commands/docker/index.js.map +1 -1
  166. package/dist/commands/docker/show-key-subcommand.d.ts +2 -0
  167. package/dist/commands/docker/show-key-subcommand.d.ts.map +1 -0
  168. package/dist/commands/docker/show-key-subcommand.js +96 -0
  169. package/dist/commands/docker/show-key-subcommand.js.map +1 -0
  170. package/dist/commands/docker/up-subcommand.d.ts.map +1 -1
  171. package/dist/commands/docker/up-subcommand.js +4 -0
  172. package/dist/commands/docker/up-subcommand.js.map +1 -1
  173. package/dist/commands/persist-command.d.ts.map +1 -1
  174. package/dist/commands/persist-command.js +77 -5
  175. package/dist/commands/persist-command.js.map +1 -1
  176. package/dist/dispatcher/cli-argument-parser.d.ts +3 -2
  177. package/dist/dispatcher/cli-argument-parser.d.ts.map +1 -1
  178. package/dist/dispatcher/cli-argument-parser.js +37 -7
  179. package/dist/dispatcher/cli-argument-parser.js.map +1 -1
  180. package/dist/dispatcher/pre-dispatch.d.ts.map +1 -1
  181. package/dist/dispatcher/pre-dispatch.js +7 -0
  182. package/dist/dispatcher/pre-dispatch.js.map +1 -1
  183. package/dist/dispatcher/target-executor.d.ts +2 -2
  184. package/dist/dispatcher/target-executor.d.ts.map +1 -1
  185. package/dist/dispatcher/target-executor.js +5 -5
  186. package/dist/dispatcher/target-executor.js.map +1 -1
  187. package/dist/docker/docker-bootstrap.d.ts +1 -1
  188. package/dist/docker/docker-bootstrap.d.ts.map +1 -1
  189. package/dist/docker/docker-bootstrap.js +99 -3
  190. package/dist/docker/docker-bootstrap.js.map +1 -1
  191. package/dist/docker/docker-executor.d.ts +3 -0
  192. package/dist/docker/docker-executor.d.ts.map +1 -1
  193. package/dist/docker/docker-executor.js +53 -0
  194. package/dist/docker/docker-executor.js.map +1 -1
  195. package/dist/docker/docker-key-rotation.d.ts +48 -0
  196. package/dist/docker/docker-key-rotation.d.ts.map +1 -0
  197. package/dist/docker/docker-key-rotation.js +179 -0
  198. package/dist/docker/docker-key-rotation.js.map +1 -0
  199. package/dist/management/checks/config-check.d.ts.map +1 -1
  200. package/dist/management/checks/config-check.js +10 -1
  201. package/dist/management/checks/config-check.js.map +1 -1
  202. package/dist/management/doctor.d.ts +1 -0
  203. package/dist/management/doctor.d.ts.map +1 -1
  204. package/dist/management/doctor.js +23 -0
  205. package/dist/management/doctor.js.map +1 -1
  206. package/dist/proxy/proxy-daemon.d.ts.map +1 -1
  207. package/dist/proxy/proxy-daemon.js +15 -3
  208. package/dist/proxy/proxy-daemon.js.map +1 -1
  209. package/dist/proxy/server/messages-route.d.ts.map +1 -1
  210. package/dist/proxy/server/messages-route.js +27 -1
  211. package/dist/proxy/server/messages-route.js.map +1 -1
  212. package/dist/shared/claude-extension-setup.d.ts.map +1 -1
  213. package/dist/shared/claude-extension-setup.js +21 -1
  214. package/dist/shared/claude-extension-setup.js.map +1 -1
  215. package/dist/shared/stale-codex-translator-settings.d.ts +4 -0
  216. package/dist/shared/stale-codex-translator-settings.d.ts.map +1 -0
  217. package/dist/shared/stale-codex-translator-settings.js +35 -0
  218. package/dist/shared/stale-codex-translator-settings.js.map +1 -0
  219. package/dist/targets/codex-adapter.d.ts.map +1 -1
  220. package/dist/targets/codex-adapter.js +64 -5
  221. package/dist/targets/codex-adapter.js.map +1 -1
  222. package/dist/targets/codex-cliproxy-provider-config.d.ts.map +1 -1
  223. package/dist/targets/codex-cliproxy-provider-config.js +56 -24
  224. package/dist/targets/codex-cliproxy-provider-config.js.map +1 -1
  225. package/dist/ui/assets/Trans-dEd8UC39.js +1 -0
  226. package/dist/ui/assets/accounts-B2THsSu_.js +1 -0
  227. package/dist/ui/assets/{alert-dialog-DC1l1GRX.js → alert-dialog-Vurq1xzV.js} +1 -1
  228. package/dist/ui/assets/api-CjLfG9mL.js +4 -0
  229. package/dist/ui/assets/auth-section-iGkrMaT4.js +1 -0
  230. package/dist/ui/assets/backups-section-DUGG_4KP.js +1 -0
  231. package/dist/ui/assets/channels-CimlCc2d.js +1 -0
  232. package/dist/ui/assets/{charts-CeK2xCSo.js → charts-eIPy2oG6.js} +34 -34
  233. package/dist/ui/assets/{checkbox-Dgd2ucy2.js → checkbox-HiMHasEB.js} +1 -1
  234. package/dist/ui/assets/claude-extension-B2v9bsN9.js +1 -0
  235. package/dist/ui/assets/{cliproxy-ai-providers-DxoCNEaQ.js → cliproxy-ai-providers-2lI5jSHb.js} +6 -6
  236. package/dist/ui/assets/cliproxy-control-panel-63gDI-e5.js +1 -0
  237. package/dist/ui/assets/cliproxy-fai69Vyd.js +4 -0
  238. package/dist/ui/assets/code-highlight-ClSMkeL5.js +1 -0
  239. package/dist/ui/assets/codex-i_hfI4Tv.js +30 -0
  240. package/dist/ui/assets/{confirm-dialog-nDFNrH0F.js → confirm-dialog-B_6SrSxL.js} +1 -1
  241. package/dist/ui/assets/copilot-BgG5x_X6.js +3 -0
  242. package/dist/ui/assets/cursor-DF63lFcy.js +1 -0
  243. package/dist/ui/assets/droid-CqlQmFtN.js +2 -0
  244. package/dist/ui/assets/globalenv-section-CYNmD12i.js +1 -0
  245. package/dist/ui/assets/health-7ZO5PEm9.js +1 -0
  246. package/dist/ui/assets/index-BC5ssPfF.js +1 -0
  247. package/dist/ui/assets/index-BMoGhs28.css +1 -0
  248. package/dist/ui/assets/index-Bgcd4FYK.js +1 -0
  249. package/dist/ui/assets/index-CFu0saCM.js +1 -0
  250. package/dist/ui/assets/index-CqsmdQoA.js +1 -0
  251. package/dist/ui/assets/index-D3kxCuJ7.js +1 -0
  252. package/dist/ui/assets/index-DmV9wJET.js +56 -0
  253. package/dist/ui/assets/index-hHb9o079.js +1 -0
  254. package/dist/ui/assets/logs-Dy-yZhIK.js +1 -0
  255. package/dist/ui/assets/{masked-input-5TJ4LSuz.js → masked-input-BSLeznEs.js} +1 -1
  256. package/dist/ui/assets/proxy-status-widget-hRH1agF9.js +1 -0
  257. package/dist/ui/assets/{raw-json-settings-editor-panel-Fg4WMiuD.js → raw-json-settings-editor-panel-Bs83yILR.js} +1 -1
  258. package/dist/ui/assets/{searchable-select-CPJn5vA1.js → searchable-select-pXUC_0Ih.js} +1 -1
  259. package/dist/ui/assets/{separator-BrQkfpAp.js → separator-FZR_61I9.js} +1 -1
  260. package/dist/ui/assets/shared-BiIwM7--.js +8 -0
  261. package/dist/ui/assets/{table-DRzNRkpJ.js → table-_9IusQ8G.js} +1 -1
  262. package/dist/ui/assets/updates-ButNfJqt.js +1 -0
  263. package/dist/ui/assets/{use-accounts-B6AXtlfF.js → use-accounts-BdtI0lBv.js} +1 -1
  264. package/dist/ui/index.html +3 -3
  265. package/dist/utils/claude-subcommand-detector.d.ts +7 -0
  266. package/dist/utils/claude-subcommand-detector.d.ts.map +1 -1
  267. package/dist/utils/claude-subcommand-detector.js +52 -9
  268. package/dist/utils/claude-subcommand-detector.js.map +1 -1
  269. package/dist/web-server/middleware/auth-middleware.d.ts.map +1 -1
  270. package/dist/web-server/middleware/auth-middleware.js +25 -1
  271. package/dist/web-server/middleware/auth-middleware.js.map +1 -1
  272. package/dist/web-server/routes/claude-extension-routes.d.ts.map +1 -1
  273. package/dist/web-server/routes/claude-extension-routes.js +5 -0
  274. package/dist/web-server/routes/claude-extension-routes.js.map +1 -1
  275. package/dist/web-server/routes/cliproxy-stats-routes.d.ts +8 -0
  276. package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
  277. package/dist/web-server/routes/cliproxy-stats-routes.js +13 -26
  278. package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
  279. package/dist/web-server/routes/codex-routes.d.ts.map +1 -1
  280. package/dist/web-server/routes/codex-routes.js +14 -0
  281. package/dist/web-server/routes/codex-routes.js.map +1 -1
  282. package/dist/web-server/services/cliproxy-dashboard-restart-service.d.ts +21 -0
  283. package/dist/web-server/services/cliproxy-dashboard-restart-service.d.ts.map +1 -0
  284. package/dist/web-server/services/cliproxy-dashboard-restart-service.js +49 -0
  285. package/dist/web-server/services/cliproxy-dashboard-restart-service.js.map +1 -0
  286. package/dist/web-server/services/codex-dashboard-service.d.ts.map +1 -1
  287. package/dist/web-server/services/codex-dashboard-service.js +30 -3
  288. package/dist/web-server/services/codex-dashboard-service.js.map +1 -1
  289. package/dist/web-server/usage/aggregator.d.ts +13 -7
  290. package/dist/web-server/usage/aggregator.d.ts.map +1 -1
  291. package/dist/web-server/usage/aggregator.js +37 -22
  292. package/dist/web-server/usage/aggregator.js.map +1 -1
  293. package/dist/web-server/usage/handlers.d.ts +1 -0
  294. package/dist/web-server/usage/handlers.d.ts.map +1 -1
  295. package/dist/web-server/usage/handlers.js +16 -8
  296. package/dist/web-server/usage/handlers.js.map +1 -1
  297. package/dist/web-server/usage/profile-filter.d.ts +13 -0
  298. package/dist/web-server/usage/profile-filter.d.ts.map +1 -0
  299. package/dist/web-server/usage/profile-filter.js +30 -0
  300. package/dist/web-server/usage/profile-filter.js.map +1 -0
  301. package/dist/web-server/usage/types.d.ts +8 -0
  302. package/dist/web-server/usage/types.d.ts.map +1 -1
  303. package/lib/hooks/websearch-transformer.cjs +12 -3
  304. package/lib/mcp/ccs-browser-server.cjs +217 -12
  305. package/package.json +1 -1
  306. package/scripts/docker-dashboard-sunset-guard.js +171 -0
  307. package/scripts/run-test-bucket.js +1 -0
  308. package/scripts/verify-bundle.js +4 -1
  309. package/dist/ui/assets/accounts-BQu3Aeey.js +0 -1
  310. package/dist/ui/assets/api-BTbrbjic.js +0 -4
  311. package/dist/ui/assets/auth-section-BsSVWOMp.js +0 -1
  312. package/dist/ui/assets/backups-section-BGHYHASS.js +0 -1
  313. package/dist/ui/assets/channels-vJ8L4j-z.js +0 -1
  314. package/dist/ui/assets/claude-extension-B3ern4Ad.js +0 -1
  315. package/dist/ui/assets/cliproxy-CGljI0Or.js +0 -4
  316. package/dist/ui/assets/cliproxy-control-panel-BJ3Mliy1.js +0 -1
  317. package/dist/ui/assets/code-highlight-D4E79GKQ.js +0 -3
  318. package/dist/ui/assets/codex-DBGHPn0v.js +0 -30
  319. package/dist/ui/assets/copilot-CE_Z3NB0.js +0 -3
  320. package/dist/ui/assets/cursor-YzGsSR_d.js +0 -1
  321. package/dist/ui/assets/droid-C-ItViCi.js +0 -2
  322. package/dist/ui/assets/globalenv-section-C9gSGyZ8.js +0 -1
  323. package/dist/ui/assets/health-DEeA97sQ.js +0 -1
  324. package/dist/ui/assets/index-B71yJlMj.css +0 -1
  325. package/dist/ui/assets/index-BPVO-QAw.js +0 -1
  326. package/dist/ui/assets/index-BRZp_Csi.js +0 -72
  327. package/dist/ui/assets/index-BYUwpOeA.js +0 -1
  328. package/dist/ui/assets/index-D2r_fAW5.js +0 -1
  329. package/dist/ui/assets/index-DGiziSVQ.js +0 -1
  330. package/dist/ui/assets/index-DwG6bbUr.js +0 -1
  331. package/dist/ui/assets/index-Dwtj4wGT.js +0 -1
  332. package/dist/ui/assets/logs-Mt2W7M3G.js +0 -1
  333. package/dist/ui/assets/proxy-status-widget-BQOAlYsb.js +0 -1
  334. package/dist/ui/assets/shared-BlkDl2HF.js +0 -8
  335. package/dist/ui/assets/updates-BQNeSzLj.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e}from"./radix-ui-nu4wz29m.js";import{r as d}from"./react-vendor-Bjx91N7w.js";import{a as R,bA as F,bi as b,bk as k,t as L,B as E,L as A,aI as D,I as B,e as K}from"./index-DmV9wJET.js";import{R as M,w as N,x as O,ac as _,au as q,at as Y,aH as H}from"./icons-DzKUh8vG.js";import"./tanstack-bhJxV1h8.js";import"./notifications-B4_o8bcr.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./charts-eIPy2oG6.js";const U={selected:[],unattended:!1};async function S(t,l){try{const a=await t.json();return typeof a.error=="string"&&a.error.trim().length>0?a.error:l}catch{return l}}function J(){const[t,l]=d.useState(U),[a,j]=d.useState(null),[h,v]=d.useState(!0),[y,c]=d.useState(!1),[w,u]=d.useState(null),[C,m]=d.useState(null),f=d.useCallback(n=>{m(n),window.setTimeout(()=>m(null),1500)},[]),x=d.useCallback(async()=>{try{v(!0),u(null);const n=await fetch("/api/channels");if(!n.ok)throw new Error(await S(n,"Failed to load Official Channels settings"));const i=await n.json();return l(i.config??U),j(i.status??null),!0}catch(n){return u(n instanceof Error?n.message:"Unknown error"),!1}finally{v(!1)}},[]),P=d.useCallback(async(n,i="Settings saved")=>{try{c(!0),u(null);const r=await fetch("/api/channels",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok)throw new Error(await S(r,"Failed to save Official Channels settings"));const s=await r.json();return l(o=>s.config??{...o,...n}),f(i),!0}catch(r){return u(r instanceof Error?r.message:"Unknown error"),!1}finally{c(!1)}},[f]),V=d.useCallback(async(n,i)=>{try{c(!0),u(null);const r=await fetch(`/api/channels/${n}/token`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})});if(!r.ok)throw new Error(await S(r,`Failed to save ${n} token`));return await x()?(f(`${n} token saved`),!0):!1}catch(r){return u(r instanceof Error?r.message:"Unknown error"),!1}finally{c(!1)}},[x,f]),T=d.useCallback(async n=>{try{c(!0),u(null);const i=await fetch(`/api/channels/${n}/token`,{method:"DELETE"});if(!i.ok)throw new Error(await S(i,`Failed to clear ${n} token`));return await x()?(f(`${n} token cleared`),!0):!1}catch(i){return u(i instanceof Error?i.message:"Unknown error"),!1}finally{c(!1)}},[x,f]);return{config:t,status:a,loading:h,saving:y,error:w,success:C,fetchConfig:x,updateConfig:P,saveToken:V,clearToken:T}}const z={telegram:"",discord:"",imessage:""};function G(t){return t==="ready"?"border-green-200 bg-green-50 text-green-900 dark:border-green-900/60 dark:bg-green-950/40 dark:text-green-100":t==="limited"?"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900/60 dark:bg-amber-950/40 dark:text-amber-100":"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-900/60 dark:bg-blue-950/40 dark:text-blue-100"}function Q(t){return t==="ready"?"default":t==="not_selected"?"secondary":t==="unavailable"?"destructive":"outline"}function W(t){return t==="ready"?"default":t==="partial"?"outline":t==="blocked"?"destructive":"secondary"}function X(t,l){return t.length===0?"None selected":t.map(a=>l?.find(j=>j.id===a)?.displayName??a).join(", ")}function le(){const{t}=R(),{config:l,status:a,loading:j,saving:h,error:v,success:y,fetchConfig:c,updateConfig:w,saveToken:u,clearToken:C}=J(),{fetchRawConfig:m}=F(),[f,x]=d.useState(z),P=X(l.selected,a?.channels);d.useEffect(()=>{c(),m()},[c,m]);const V=async()=>{await Promise.all([c(),m()])},T=async(s,o)=>{const g=o?[...new Set([...l.selected,s])]:l.selected.filter($=>$!==s);await w({selected:g},o?`${s} selected for auto-enable`:`${s} removed from auto-enable`)&&await Promise.all([c(),m()])},n=(s,o)=>{x(g=>({...g,[s]:o}))},i=async s=>{await u(s,f[s])&&(x(g=>({...g,[s]:""})),await m())},r=async s=>{await C(s)&&(x(g=>({...g,[s]:""})),await m())};return j?e.jsx("div",{className:"flex flex-1 items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(M,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:t("settings.loading")})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${v||y?"translate-y-0 opacity-100":"pointer-events-none -translate-y-2 opacity-0"}`,children:[v&&e.jsxs(b,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx(k,{children:v})]}),y&&e.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 px-3 py-2 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(O,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:y})]})]}),e.jsx(L,{className:"flex-1",children:e.jsxs("div",{className:"space-y-6 p-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:t("settingsPage.channelsSection.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsPage.channelsSection.configureDescription",{defaultValue:"Configure official Claude channels here, then run `ccs` normally on a supported native Claude session."})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t("settingsPage.channelsSection.storageDescription",{defaultValue:"CCS stores only channel selection in `config.yaml`. Claude keeps the machine-level channel state under `~/.claude/channels/`."})})]})]}),a&&e.jsxs("div",{className:`rounded-xl border p-4 ${G(a.summary.state)}`,children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{variant:a.summary.state==="ready"?"default":"outline",children:a.summary.title}),e.jsx("span",{className:"text-sm font-medium",children:P})]}),e.jsx("p",{className:"text-sm",children:a.summary.message}),e.jsx("p",{className:"text-sm opacity-90",children:a.summary.nextStep})]}),e.jsxs("div",{className:"min-w-[220px] rounded-lg border border-current/10 bg-background/60 p-3 text-sm text-foreground",children:[e.jsx("p",{className:"font-medium",children:t("settingsPage.channelsSection.machineChecks",{defaultValue:"Machine checks"})}),e.jsxs("div",{className:"mt-2 space-y-1 text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{children:"Bun"}),e.jsx("span",{children:a.bunInstalled?t("settingsPage.channelsSection.installed",{defaultValue:"Installed"}):t("settingsPage.channelsSection.missing",{defaultValue:"Missing"})})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{children:"Claude Code"}),e.jsx("span",{children:a.claudeVersion.current?`v${a.claudeVersion.current}`:"Unknown"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{children:"Claude auth"}),e.jsx("span",{children:a.auth.authMethod||t("settingsPage.channelsSection.unknown",{defaultValue:"Unknown"})})]})]})]})]}),a.summary.blockers.length>0&&e.jsx("div",{className:"mt-3 space-y-1 text-sm",children:a.summary.blockers.map(s=>e.jsx("p",{children:s},s))})]}),a&&e.jsxs("div",{className:"rounded-lg border bg-muted/20 p-4",children:[e.jsx("p",{className:"font-medium",children:t("settingsPage.channelsSection.fastestPath",{defaultValue:"Fastest path"})}),e.jsxs("div",{className:"mt-3 space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:t("settingsPage.channelsSection.fastestStep1",{defaultValue:"1. Turn on the channels you want below."})}),e.jsx("p",{children:t("settingsPage.channelsSection.fastestStep2",{defaultValue:"2. Save Telegram or Discord bot tokens here if that channel needs one."})}),e.jsx("p",{children:t("settingsPage.channelsSection.fastestStep3",{defaultValue:"3. Run `ccs` or a native Claude account profile. CCS adds `--channels` for you on supported runs."})}),e.jsx("p",{children:a.supportMessage})]}),e.jsxs("details",{className:"mt-3 rounded-lg border bg-background p-4",children:[e.jsx("summary",{className:"cursor-pointer text-sm font-medium",children:t("settingsPage.channelsSection.advancedNotes",{defaultValue:"Advanced notes and scope"})}),e.jsxs("div",{className:"mt-3 space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:a.accountStatusCaveat}),e.jsx("p",{children:a.stateScopeMessage})]})]})]}),a&&e.jsxs("div",{className:"rounded-lg border bg-background p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:t("settingsPage.channelsSection.ifYouRunNow",{defaultValue:"If you run `ccs` now"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a.launchPreview.detail})]}),e.jsx(E,{variant:W(a.launchPreview.state),children:a.launchPreview.title})]}),e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs("div",{className:"rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:t("settingsPage.thinkingSection.youType")})," ",a.launchPreview.command]}),e.jsxs("div",{className:"rounded-md bg-muted px-3 py-2 font-mono text-sm break-all",children:[e.jsx("span",{className:"text-muted-foreground",children:t("settingsPage.thinkingSection.ccsAdds")})," ",a.launchPreview.appendedArgs.length>0?a.launchPreview.appendedArgs.join(" "):t("settingsPage.channelsSection.nothingYet",{defaultValue:"(nothing yet)"})]})]}),a.launchPreview.skippedMessages.length>0&&e.jsx("div",{className:"mt-3 space-y-1 text-sm text-muted-foreground",children:a.launchPreview.skippedMessages.map(s=>e.jsx("p",{children:s},s))})]}),a?.claudeVersion.message&&a.claudeVersion.state!=="supported"&&e.jsxs(b,{children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx(k,{children:a.claudeVersion.message})]}),a?.auth.message&&a.auth.state!=="eligible"&&e.jsxs(b,{children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx(k,{children:a.auth.message})]}),a?.auth.orgRequirementMessage&&e.jsxs(b,{children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx(k,{children:a.auth.orgRequirementMessage})]}),e.jsx("div",{className:"space-y-4",children:a?.channels.map(s=>{const o=l.selected.includes(s.id),g=f[s.id];return e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(A,{className:"text-base font-medium",children:s.displayName}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.summary}),e.jsx("p",{className:"mt-2 font-mono text-xs text-muted-foreground",children:s.pluginSpec})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(E,{variant:Q(s.setup.state),children:s.setup.label}),e.jsx(D,{checked:o,disabled:h||!!s.unavailableReason&&!o,onCheckedChange:p=>void T(s.id,p)})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/30 p-4 text-sm text-muted-foreground space-y-2",children:[e.jsx("p",{children:s.setup.detail}),e.jsx("p",{children:s.setup.nextStep})]}),s.requiresToken&&e.jsxs("div",{className:"space-y-3 rounded-lg bg-muted/30 p-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:!s.tokenConfigured&&s.tokenSource==="process_env"?t("settingsPage.channelsSection.tokenFromProcessEnv",{envKey:s.envKey,defaultValue:"The current CCS process already has {{envKey}}. Save it here only if you want persistent Claude channel state."}):s.tokenConfigured&&s.processEnvAvailable?t("settingsPage.channelsSection.tokenSavedAndProcessEnv",{envKey:s.envKey,defaultValue:"{{envKey}} is saved in Claude channel state, and the current CCS process env also provides it."}):t("settingsPage.channelsSection.tokenSaveHint",{envKey:s.envKey,defaultValue:"Save {{envKey}} in Claude's official channel env file. The dashboard never reads the token value back after save."})}),s.tokenConfigured&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Saving here writes the same ",e.jsx("code",{children:".env"})," file as"," ",e.jsxs("code",{children:["/",s.id,":configure"]}),", so you do not need to run the configure command again after a successful save."]}),e.jsx(B,{type:"password",value:g,onChange:p=>n(s.id,p.target.value),placeholder:s.tokenConfigured?t("settingsPage.channelsSection.tokenConfiguredPlaceholder",{envKey:s.envKey,defaultValue:"Configured. Enter a new {{envKey}} to replace it."}):!s.tokenConfigured&&s.tokenSource==="process_env"?t("settingsPage.channelsSection.tokenProcessEnvPlaceholder",{envKey:s.envKey,defaultValue:"Using current CCS process env. Enter a new {{envKey}} to save it for Claude."}):t("settingsPage.channelsSection.tokenPastePlaceholder",{envKey:s.envKey,defaultValue:"Paste {{envKey}}"}),disabled:h}),s.tokenPath&&s.tokenSource!=="process_env"&&e.jsx("div",{className:"text-xs text-muted-foreground break-all",children:s.tokenPath}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(K,{onClick:()=>void i(s.id),disabled:h||!g.trim(),children:[e.jsx(q,{className:"mr-2 h-4 w-4"}),t("settingsPage.channelsSection.saveToken",{defaultValue:"Save Token"})]}),e.jsxs(K,{variant:"outline",onClick:()=>void r(s.id),disabled:h||!s.tokenConfigured,children:[e.jsx(Y,{className:"mr-2 h-4 w-4"}),t("settingsPage.channelsSection.clearSavedToken",{defaultValue:"Clear Saved Token"})]})]})]}),e.jsxs("details",{className:"rounded-lg border bg-background p-4",children:[e.jsx("summary",{className:"cursor-pointer text-sm font-medium",children:t("settingsPage.channelsSection.claudeSideSetupCommands",{defaultValue:"Claude-side setup commands"})}),e.jsx("div",{className:"mt-3 space-y-2",children:(s.manualSetupCommands??[]).map(p=>e.jsx("div",{className:"rounded-md bg-muted px-3 py-2 font-mono text-sm break-all",children:p},p))})]})]},s.id)})}),e.jsx(b,{children:e.jsx(k,{children:t("settingsPage.channelsSection.injectionDisclaimer",{defaultValue:"CCS injects `--channels` only for the current Claude session. Telegram, Discord, and iMessage stop receiving messages when that Claude session exits."})})}),e.jsx("div",{className:"rounded-lg border p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg bg-muted/30 p-4",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(H,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600"}),e.jsxs("div",{children:[e.jsx(A,{className:"text-sm font-medium",children:t("profileEditorSections.skipPermissionPrompts")}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t("settingsPage.channelsSection.skipPermissionDescription",{defaultValue:"Optional advanced behavior. CCS adds `--dangerously-skip-permissions` only when at least one selected channel is being auto-enabled and you did not already pass a permission flag yourself."})})]})]}),e.jsx(D,{checked:l.unattended,disabled:h,onCheckedChange:s=>void(async()=>{await w({unattended:s},s?"Unattended mode enabled":"Unattended mode disabled")&&await m()})()})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(K,{variant:"outline",onClick:()=>void V(),disabled:h,children:[e.jsx(M,{className:`mr-2 h-4 w-4 ${h?"animate-spin":""}`}),t("settings.refresh")]})})]})})]})}export{le as default};