ccjk 14.2.1 → 15.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 (526) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +58 -341
  3. package/dist/cli.js +59 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/commands/detect.js +15 -0
  6. package/dist/commands/detect.js.map +1 -0
  7. package/dist/commands/doctor.js +68 -0
  8. package/dist/commands/doctor.js.map +1 -0
  9. package/dist/commands/git-install.js +50 -0
  10. package/dist/commands/git-install.js.map +1 -0
  11. package/dist/commands/init.js +102 -0
  12. package/dist/commands/init.js.map +1 -0
  13. package/dist/commands/mcp.js +66 -0
  14. package/dist/commands/mcp.js.map +1 -0
  15. package/dist/commands/menu.js +33 -0
  16. package/dist/commands/menu.js.map +1 -0
  17. package/dist/core/detect.js +24 -0
  18. package/dist/core/detect.js.map +1 -0
  19. package/dist/core/lint.js +49 -0
  20. package/dist/core/lint.js.map +1 -0
  21. package/dist/core/mcp.js +41 -0
  22. package/dist/core/mcp.js.map +1 -0
  23. package/dist/core/paths.js +9 -0
  24. package/dist/core/paths.js.map +1 -0
  25. package/dist/core/providers.js +53 -0
  26. package/dist/core/providers.js.map +1 -0
  27. package/dist/core/settings.js +31 -0
  28. package/dist/core/settings.js.map +1 -0
  29. package/dist/core/slash-templates.js +56 -0
  30. package/dist/core/slash-templates.js.map +1 -0
  31. package/dist/core/tools.js +27 -0
  32. package/dist/core/tools.js.map +1 -0
  33. package/package.json +43 -164
  34. package/README.HONEST.md +0 -176
  35. package/README.en.md +0 -67
  36. package/README.ja.md +0 -67
  37. package/README.ko.md +0 -67
  38. package/README.zh-CN.md +0 -86
  39. package/bin/ccjk.mjs +0 -5
  40. package/bin/ccjk.ts +0 -222
  41. package/dist/chunks/agent-teams.mjs +0 -145
  42. package/dist/chunks/agent.mjs +0 -1439
  43. package/dist/chunks/agents.mjs +0 -3783
  44. package/dist/chunks/api-cli.mjs +0 -135
  45. package/dist/chunks/api-config-selector.mjs +0 -159
  46. package/dist/chunks/api-providers.mjs +0 -144
  47. package/dist/chunks/api.mjs +0 -115
  48. package/dist/chunks/auto-bootstrap.mjs +0 -358
  49. package/dist/chunks/auto-fixer.mjs +0 -95
  50. package/dist/chunks/auto-updater.mjs +0 -507
  51. package/dist/chunks/banner.mjs +0 -173
  52. package/dist/chunks/bash.mjs +0 -187
  53. package/dist/chunks/boost.mjs +0 -474
  54. package/dist/chunks/brain-config.mjs +0 -75
  55. package/dist/chunks/brain-status.mjs +0 -89
  56. package/dist/chunks/ccjk-agents.mjs +0 -416
  57. package/dist/chunks/ccjk-all.mjs +0 -1046
  58. package/dist/chunks/ccjk-config.mjs +0 -445
  59. package/dist/chunks/ccjk-hooks.mjs +0 -1074
  60. package/dist/chunks/ccjk-mcp.mjs +0 -763
  61. package/dist/chunks/ccjk-setup.mjs +0 -765
  62. package/dist/chunks/ccjk-skills.mjs +0 -518
  63. package/dist/chunks/ccr.mjs +0 -109
  64. package/dist/chunks/ccu.mjs +0 -40
  65. package/dist/chunks/check-updates.mjs +0 -117
  66. package/dist/chunks/claude-code-incremental-manager.mjs +0 -761
  67. package/dist/chunks/claude-config.mjs +0 -606
  68. package/dist/chunks/claude-config2.mjs +0 -62
  69. package/dist/chunks/claude-wrapper.mjs +0 -85
  70. package/dist/chunks/clavue-config.mjs +0 -1390
  71. package/dist/chunks/cleanup-migration.mjs +0 -20
  72. package/dist/chunks/cli-hook.mjs +0 -4096
  73. package/dist/chunks/cloud-sync.mjs +0 -29
  74. package/dist/chunks/code-type-resolver.mjs +0 -880
  75. package/dist/chunks/codex-config-switch.mjs +0 -452
  76. package/dist/chunks/codex-provider-manager.mjs +0 -238
  77. package/dist/chunks/codex-uninstaller.mjs +0 -404
  78. package/dist/chunks/codex.mjs +0 -2141
  79. package/dist/chunks/commands.mjs +0 -108
  80. package/dist/chunks/commands2.mjs +0 -421
  81. package/dist/chunks/commit.mjs +0 -140
  82. package/dist/chunks/completion.mjs +0 -517
  83. package/dist/chunks/config-consolidator.mjs +0 -172
  84. package/dist/chunks/config-switch.mjs +0 -334
  85. package/dist/chunks/config.mjs +0 -558
  86. package/dist/chunks/config2.mjs +0 -484
  87. package/dist/chunks/config3.mjs +0 -486
  88. package/dist/chunks/constants.mjs +0 -323
  89. package/dist/chunks/context-opt.mjs +0 -444
  90. package/dist/chunks/context.mjs +0 -974
  91. package/dist/chunks/dashboard.mjs +0 -481
  92. package/dist/chunks/doctor.mjs +0 -1301
  93. package/dist/chunks/eval.mjs +0 -502
  94. package/dist/chunks/evolution.mjs +0 -322
  95. package/dist/chunks/features.mjs +0 -715
  96. package/dist/chunks/fish.mjs +0 -181
  97. package/dist/chunks/fs-operations.mjs +0 -180
  98. package/dist/chunks/health-alerts.mjs +0 -830
  99. package/dist/chunks/help.mjs +0 -341
  100. package/dist/chunks/hook-installer.mjs +0 -48
  101. package/dist/chunks/impact.mjs +0 -651
  102. package/dist/chunks/index.mjs +0 -23
  103. package/dist/chunks/index10.mjs +0 -19
  104. package/dist/chunks/index11.mjs +0 -1171
  105. package/dist/chunks/index12.mjs +0 -218
  106. package/dist/chunks/index13.mjs +0 -679
  107. package/dist/chunks/index14.mjs +0 -1009
  108. package/dist/chunks/index15.mjs +0 -194
  109. package/dist/chunks/index2.mjs +0 -7637
  110. package/dist/chunks/index3.mjs +0 -171
  111. package/dist/chunks/index4.mjs +0 -26
  112. package/dist/chunks/index5.mjs +0 -19
  113. package/dist/chunks/index6.mjs +0 -19092
  114. package/dist/chunks/index7.mjs +0 -616
  115. package/dist/chunks/index8.mjs +0 -1602
  116. package/dist/chunks/index9.mjs +0 -5384
  117. package/dist/chunks/init.mjs +0 -1911
  118. package/dist/chunks/installer.mjs +0 -757
  119. package/dist/chunks/installer2.mjs +0 -103
  120. package/dist/chunks/interview.mjs +0 -2927
  121. package/dist/chunks/json-config.mjs +0 -60
  122. package/dist/chunks/linux.mjs +0 -3863
  123. package/dist/chunks/macos.mjs +0 -69
  124. package/dist/chunks/main.mjs +0 -635
  125. package/dist/chunks/manager.mjs +0 -1048
  126. package/dist/chunks/marketplace.mjs +0 -265
  127. package/dist/chunks/mcp-cli.mjs +0 -205
  128. package/dist/chunks/mcp-performance.mjs +0 -187
  129. package/dist/chunks/mcp.mjs +0 -667
  130. package/dist/chunks/memory-check.mjs +0 -2973
  131. package/dist/chunks/memory-paths.mjs +0 -259
  132. package/dist/chunks/memory-sync.mjs +0 -209
  133. package/dist/chunks/memory.mjs +0 -354
  134. package/dist/chunks/metrics-display.mjs +0 -153
  135. package/dist/chunks/monitor.mjs +0 -1856
  136. package/dist/chunks/notification.mjs +0 -1864
  137. package/dist/chunks/onboarding.mjs +0 -386
  138. package/dist/chunks/package.mjs +0 -3
  139. package/dist/chunks/paradigm.mjs +0 -74
  140. package/dist/chunks/permission-manager.mjs +0 -250
  141. package/dist/chunks/permissions.mjs +0 -265
  142. package/dist/chunks/persistence-manager.mjs +0 -801
  143. package/dist/chunks/persistence.mjs +0 -707
  144. package/dist/chunks/platform.mjs +0 -395
  145. package/dist/chunks/plugin.mjs +0 -1936
  146. package/dist/chunks/powershell.mjs +0 -213
  147. package/dist/chunks/prompts.mjs +0 -244
  148. package/dist/chunks/providers.mjs +0 -263
  149. package/dist/chunks/quick-actions.mjs +0 -335
  150. package/dist/chunks/quick-provider.mjs +0 -755
  151. package/dist/chunks/quick-setup.mjs +0 -421
  152. package/dist/chunks/remote.mjs +0 -497
  153. package/dist/chunks/research.mjs +0 -1904
  154. package/dist/chunks/rollback.mjs +0 -38
  155. package/dist/chunks/session-manager.mjs +0 -1371
  156. package/dist/chunks/session.mjs +0 -878
  157. package/dist/chunks/sessions.mjs +0 -106
  158. package/dist/chunks/silent-updater.mjs +0 -396
  159. package/dist/chunks/simple-config.mjs +0 -122
  160. package/dist/chunks/skill.mjs +0 -117
  161. package/dist/chunks/skill2.mjs +0 -9052
  162. package/dist/chunks/skills-sync.mjs +0 -1343
  163. package/dist/chunks/skills.mjs +0 -577
  164. package/dist/chunks/slash-commands.mjs +0 -208
  165. package/dist/chunks/smart-guide.mjs +0 -247
  166. package/dist/chunks/snapshot.mjs +0 -58
  167. package/dist/chunks/startup.mjs +0 -487
  168. package/dist/chunks/stats.mjs +0 -191
  169. package/dist/chunks/status.mjs +0 -471
  170. package/dist/chunks/team.mjs +0 -63
  171. package/dist/chunks/thinking.mjs +0 -626
  172. package/dist/chunks/trace.mjs +0 -57
  173. package/dist/chunks/uninstall.mjs +0 -852
  174. package/dist/chunks/update.mjs +0 -174
  175. package/dist/chunks/upgrade-manager.mjs +0 -204
  176. package/dist/chunks/upgrade.mjs +0 -133
  177. package/dist/chunks/version-checker.mjs +0 -891
  178. package/dist/chunks/vim.mjs +0 -903
  179. package/dist/chunks/windows.mjs +0 -14
  180. package/dist/chunks/workflows.mjs +0 -633
  181. package/dist/chunks/wsl.mjs +0 -129
  182. package/dist/chunks/zero-config.mjs +0 -871
  183. package/dist/chunks/zsh.mjs +0 -182
  184. package/dist/cli.d.mts +0 -1
  185. package/dist/cli.d.ts +0 -1
  186. package/dist/cli.mjs +0 -2684
  187. package/dist/i18n/locales/en/agent-teams.json +0 -18
  188. package/dist/i18n/locales/en/agentBrowser.json +0 -80
  189. package/dist/i18n/locales/en/agents.json +0 -135
  190. package/dist/i18n/locales/en/api.json +0 -63
  191. package/dist/i18n/locales/en/ccjk-agents.json +0 -33
  192. package/dist/i18n/locales/en/ccjk-all.json +0 -23
  193. package/dist/i18n/locales/en/ccjk-skills.json +0 -22
  194. package/dist/i18n/locales/en/ccjk.json +0 -276
  195. package/dist/i18n/locales/en/ccr.json +0 -65
  196. package/dist/i18n/locales/en/claude-md.json +0 -73
  197. package/dist/i18n/locales/en/cli.json +0 -148
  198. package/dist/i18n/locales/en/cloud-setup.json +0 -31
  199. package/dist/i18n/locales/en/cloud-sync.json +0 -147
  200. package/dist/i18n/locales/en/cloud.json +0 -40
  201. package/dist/i18n/locales/en/cloudPlugins.json +0 -118
  202. package/dist/i18n/locales/en/codex.json +0 -184
  203. package/dist/i18n/locales/en/cometix.json +0 -29
  204. package/dist/i18n/locales/en/common.json +0 -68
  205. package/dist/i18n/locales/en/config.json +0 -108
  206. package/dist/i18n/locales/en/configuration.json +0 -234
  207. package/dist/i18n/locales/en/context.json +0 -85
  208. package/dist/i18n/locales/en/dashboard.json +0 -78
  209. package/dist/i18n/locales/en/errors.json +0 -26
  210. package/dist/i18n/locales/en/evolution.json +0 -54
  211. package/dist/i18n/locales/en/hooks.json +0 -74
  212. package/dist/i18n/locales/en/hooksSync.json +0 -133
  213. package/dist/i18n/locales/en/installation.json +0 -83
  214. package/dist/i18n/locales/en/interview.json +0 -104
  215. package/dist/i18n/locales/en/language.json +0 -19
  216. package/dist/i18n/locales/en/lsp.json +0 -78
  217. package/dist/i18n/locales/en/marketplace.json +0 -116
  218. package/dist/i18n/locales/en/mcp.json +0 -180
  219. package/dist/i18n/locales/en/memory.json +0 -23
  220. package/dist/i18n/locales/en/menu.json +0 -299
  221. package/dist/i18n/locales/en/multi-config.json +0 -79
  222. package/dist/i18n/locales/en/notification.json +0 -307
  223. package/dist/i18n/locales/en/permissions.json +0 -95
  224. package/dist/i18n/locales/en/persistence.json +0 -127
  225. package/dist/i18n/locales/en/plugins.json +0 -146
  226. package/dist/i18n/locales/en/quick-actions.json +0 -78
  227. package/dist/i18n/locales/en/registry.json +0 -54
  228. package/dist/i18n/locales/en/remote.json +0 -93
  229. package/dist/i18n/locales/en/sandbox.json +0 -44
  230. package/dist/i18n/locales/en/setup.json +0 -44
  231. package/dist/i18n/locales/en/shencha.json +0 -14
  232. package/dist/i18n/locales/en/skills.json +0 -100
  233. package/dist/i18n/locales/en/skillsSync.json +0 -74
  234. package/dist/i18n/locales/en/smartGuide.json +0 -49
  235. package/dist/i18n/locales/en/stats.json +0 -20
  236. package/dist/i18n/locales/en/subagent.json +0 -69
  237. package/dist/i18n/locales/en/superpowers.json +0 -117
  238. package/dist/i18n/locales/en/team.json +0 -7
  239. package/dist/i18n/locales/en/thinking.json +0 -65
  240. package/dist/i18n/locales/en/tools.json +0 -42
  241. package/dist/i18n/locales/en/uninstall.json +0 -56
  242. package/dist/i18n/locales/en/updater.json +0 -29
  243. package/dist/i18n/locales/en/vim.json +0 -169
  244. package/dist/i18n/locales/en/workflow.json +0 -55
  245. package/dist/i18n/locales/en/workspace.json +0 -108
  246. package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
  247. package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -80
  248. package/dist/i18n/locales/zh-CN/agents.json +0 -135
  249. package/dist/i18n/locales/zh-CN/api.json +0 -63
  250. package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
  251. package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
  252. package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
  253. package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
  254. package/dist/i18n/locales/zh-CN/ccr.json +0 -65
  255. package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
  256. package/dist/i18n/locales/zh-CN/cli.json +0 -148
  257. package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
  258. package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
  259. package/dist/i18n/locales/zh-CN/cloud.json +0 -40
  260. package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
  261. package/dist/i18n/locales/zh-CN/codex.json +0 -184
  262. package/dist/i18n/locales/zh-CN/cometix.json +0 -29
  263. package/dist/i18n/locales/zh-CN/common.json +0 -68
  264. package/dist/i18n/locales/zh-CN/config.json +0 -108
  265. package/dist/i18n/locales/zh-CN/configuration.json +0 -232
  266. package/dist/i18n/locales/zh-CN/context.json +0 -85
  267. package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
  268. package/dist/i18n/locales/zh-CN/errors.json +0 -26
  269. package/dist/i18n/locales/zh-CN/evolution.json +0 -54
  270. package/dist/i18n/locales/zh-CN/hooks.json +0 -74
  271. package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
  272. package/dist/i18n/locales/zh-CN/installation.json +0 -83
  273. package/dist/i18n/locales/zh-CN/interview.json +0 -104
  274. package/dist/i18n/locales/zh-CN/language.json +0 -19
  275. package/dist/i18n/locales/zh-CN/lsp.json +0 -78
  276. package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
  277. package/dist/i18n/locales/zh-CN/mcp.json +0 -180
  278. package/dist/i18n/locales/zh-CN/memory.json +0 -23
  279. package/dist/i18n/locales/zh-CN/menu.json +0 -299
  280. package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
  281. package/dist/i18n/locales/zh-CN/notification.json +0 -307
  282. package/dist/i18n/locales/zh-CN/permissions.json +0 -95
  283. package/dist/i18n/locales/zh-CN/persistence.json +0 -127
  284. package/dist/i18n/locales/zh-CN/plugins.json +0 -146
  285. package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
  286. package/dist/i18n/locales/zh-CN/registry.json +0 -54
  287. package/dist/i18n/locales/zh-CN/remote.json +0 -93
  288. package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
  289. package/dist/i18n/locales/zh-CN/setup.json +0 -44
  290. package/dist/i18n/locales/zh-CN/shencha.json +0 -14
  291. package/dist/i18n/locales/zh-CN/skills.json +0 -100
  292. package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
  293. package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
  294. package/dist/i18n/locales/zh-CN/stats.json +0 -20
  295. package/dist/i18n/locales/zh-CN/subagent.json +0 -69
  296. package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
  297. package/dist/i18n/locales/zh-CN/team.json +0 -7
  298. package/dist/i18n/locales/zh-CN/thinking.json +0 -65
  299. package/dist/i18n/locales/zh-CN/tools.json +0 -42
  300. package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
  301. package/dist/i18n/locales/zh-CN/updater.json +0 -29
  302. package/dist/i18n/locales/zh-CN/vim.json +0 -169
  303. package/dist/i18n/locales/zh-CN/workflow.json +0 -55
  304. package/dist/i18n/locales/zh-CN/workspace.json +0 -108
  305. package/dist/index.d.mts +0 -5658
  306. package/dist/index.d.ts +0 -5658
  307. package/dist/index.mjs +0 -3732
  308. package/dist/shared/ccjk.8oaxX4iR.mjs +0 -90
  309. package/dist/shared/ccjk.B2U7DsPy.mjs +0 -31
  310. package/dist/shared/ccjk.B2f-cwUP.mjs +0 -468
  311. package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
  312. package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
  313. package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
  314. package/dist/shared/ccjk.BLsIiTqO.mjs +0 -449
  315. package/dist/shared/ccjk.BXv8aYs1.mjs +0 -170
  316. package/dist/shared/ccjk.BnsY5WxD.mjs +0 -171
  317. package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
  318. package/dist/shared/ccjk.Bq8TqZG_.mjs +0 -189
  319. package/dist/shared/ccjk.BtrioX1Z.mjs +0 -25
  320. package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
  321. package/dist/shared/ccjk.BzPbSEP2.mjs +0 -115
  322. package/dist/shared/ccjk.C1Be3aJN.mjs +0 -254
  323. package/dist/shared/ccjk.C1hANZTu.mjs +0 -19
  324. package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
  325. package/dist/shared/ccjk.C94P8gCY.mjs +0 -283
  326. package/dist/shared/ccjk.CNhnT6uQ.mjs +0 -636
  327. package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
  328. package/dist/shared/ccjk.CTr4yCZ1.mjs +0 -225
  329. package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
  330. package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
  331. package/dist/shared/ccjk.CoCHVXl3.mjs +0 -3951
  332. package/dist/shared/ccjk.CwGZSTAK.mjs +0 -319
  333. package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
  334. package/dist/shared/ccjk.D-magaEx.mjs +0 -763
  335. package/dist/shared/ccjk.D0g2ABGg.mjs +0 -171
  336. package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
  337. package/dist/shared/ccjk.D75wivnp.mjs +0 -142
  338. package/dist/shared/ccjk.DDL-4C-k.mjs +0 -100
  339. package/dist/shared/ccjk.DFRPtmK_.mjs +0 -75
  340. package/dist/shared/ccjk.DMV3x5Sd.mjs +0 -299
  341. package/dist/shared/ccjk.DZ2LLOa-.mjs +0 -2195
  342. package/dist/shared/ccjk.DbigonEQ.mjs +0 -698
  343. package/dist/shared/ccjk.DcMvE7lf.mjs +0 -618
  344. package/dist/shared/ccjk.DeWpAShp.mjs +0 -1828
  345. package/dist/shared/ccjk.DhJ1kyDR.mjs +0 -30
  346. package/dist/shared/ccjk.DlTXS9rP.mjs +0 -224
  347. package/dist/shared/ccjk.DopKzo3z.mjs +0 -305
  348. package/dist/shared/ccjk.DsZsc4LR.mjs +0 -1280
  349. package/dist/shared/ccjk.DuzJZlgj.mjs +0 -418
  350. package/dist/shared/ccjk.Dxgd2vjc.mjs +0 -444
  351. package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
  352. package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
  353. package/dist/shared/ccjk.MwtjAULc.mjs +0 -1447
  354. package/dist/shared/ccjk.OJKHVSOb.mjs +0 -2005
  355. package/dist/shared/ccjk.OTnevPNE.mjs +0 -225
  356. package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
  357. package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
  358. package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
  359. package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
  360. package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
  361. package/dist/shared/ccjk.i_vn-9C3.mjs +0 -317
  362. package/dist/shared/ccjk.lG3ccFjm.mjs +0 -885
  363. package/dist/shared/ccjk.wLJHO0Af.mjs +0 -244
  364. package/dist/shared/ccjk.y-a_1vK4.mjs +0 -5127
  365. package/dist/templates/agents/README.md +0 -78
  366. package/dist/templates/agents/fullstack-developer.json +0 -70
  367. package/dist/templates/agents/go-expert.json +0 -69
  368. package/dist/templates/agents/index.json +0 -64
  369. package/dist/templates/agents/python-expert.json +0 -69
  370. package/dist/templates/agents/react-specialist.json +0 -69
  371. package/dist/templates/agents/testing-automation-expert.json +0 -70
  372. package/dist/templates/agents/typescript-architect.json +0 -69
  373. package/dist/templates/claude-code/common/settings.json +0 -109
  374. package/dist/templates/common/error-prevention.md +0 -267
  375. package/dist/templates/common/karpathy-baseline.md +0 -83
  376. package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
  377. package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
  378. package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
  379. package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
  380. package/dist/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
  381. package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
  382. package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
  383. package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
  384. package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
  385. package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
  386. package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
  387. package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
  388. package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
  389. package/dist/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
  390. package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
  391. package/dist/templates/common/workflow/essential/en/feat.md +0 -92
  392. package/dist/templates/common/workflow/essential/en/goal.md +0 -147
  393. package/dist/templates/common/workflow/essential/en/init-project.md +0 -53
  394. package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
  395. package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
  396. package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
  397. package/dist/templates/common/workflow/essential/zh-CN/feat.md +0 -315
  398. package/dist/templates/common/workflow/essential/zh-CN/goal.md +0 -146
  399. package/dist/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
  400. package/dist/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
  401. package/dist/templates/common/workflow/git/en/git-commit.md +0 -205
  402. package/dist/templates/common/workflow/git/en/git-rollback.md +0 -90
  403. package/dist/templates/common/workflow/git/en/git-worktree.md +0 -276
  404. package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
  405. package/dist/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
  406. package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
  407. package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
  408. package/dist/templates/common/workflow/interview/en/interview.md +0 -67
  409. package/dist/templates/common/workflow/interview/zh-CN/interview.md +0 -67
  410. package/dist/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
  411. package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
  412. package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
  413. package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
  414. package/dist/templates/common/workflow/sixStep/en/workflow.md +0 -83
  415. package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
  416. package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
  417. package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
  418. package/dist/templates/hooks/README.md +0 -212
  419. package/dist/templates/hooks/git-workflow-hooks.md +0 -551
  420. package/dist/templates/hooks/post-test/coverage.json +0 -21
  421. package/dist/templates/hooks/post-test/summary.json +0 -21
  422. package/dist/templates/hooks/post-test-coverage.md +0 -434
  423. package/dist/templates/hooks/pre-commit/eslint.json +0 -22
  424. package/dist/templates/hooks/pre-commit/prettier.json +0 -22
  425. package/dist/templates/hooks/pre-commit-black.md +0 -274
  426. package/dist/templates/hooks/pre-commit-eslint.md +0 -153
  427. package/dist/templates/hooks/pre-commit-gofmt.md +0 -284
  428. package/dist/templates/hooks/pre-commit-prettier.md +0 -212
  429. package/dist/templates/hooks/pre-commit-type-check.md +0 -377
  430. package/dist/templates/skills/ccjk-init.md +0 -154
  431. package/dist/templates/skills/ccjk-mcp-setup.md +0 -205
  432. package/dist/templates/skills/ccjk-troubleshoot.md +0 -228
  433. package/dist/templates/skills/django-patterns.md +0 -1016
  434. package/dist/templates/skills/git-workflow.md +0 -748
  435. package/dist/templates/skills/go-idioms.md +0 -963
  436. package/dist/templates/skills/index.json +0 -132
  437. package/dist/templates/skills/nextjs-optimization.md +0 -694
  438. package/dist/templates/skills/python-pep8.md +0 -852
  439. package/dist/templates/skills/react-patterns.md +0 -686
  440. package/dist/templates/skills/rust-patterns.md +0 -1057
  441. package/dist/templates/skills/security-best-practices.md +0 -1413
  442. package/dist/templates/skills/testing-best-practices.md +0 -1315
  443. package/dist/templates/skills/ts-best-practices.md +0 -354
  444. package/templates/agents/README.md +0 -78
  445. package/templates/agents/fullstack-developer.json +0 -70
  446. package/templates/agents/go-expert.json +0 -69
  447. package/templates/agents/index.json +0 -64
  448. package/templates/agents/python-expert.json +0 -69
  449. package/templates/agents/react-specialist.json +0 -69
  450. package/templates/agents/testing-automation-expert.json +0 -70
  451. package/templates/agents/typescript-architect.json +0 -69
  452. package/templates/claude-code/common/settings.json +0 -109
  453. package/templates/common/error-prevention.md +0 -267
  454. package/templates/common/karpathy-baseline.md +0 -83
  455. package/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
  456. package/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
  457. package/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
  458. package/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
  459. package/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
  460. package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
  461. package/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
  462. package/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
  463. package/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
  464. package/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
  465. package/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
  466. package/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
  467. package/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
  468. package/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
  469. package/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
  470. package/templates/common/workflow/essential/en/feat.md +0 -92
  471. package/templates/common/workflow/essential/en/goal.md +0 -147
  472. package/templates/common/workflow/essential/en/init-project.md +0 -53
  473. package/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
  474. package/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
  475. package/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
  476. package/templates/common/workflow/essential/zh-CN/feat.md +0 -315
  477. package/templates/common/workflow/essential/zh-CN/goal.md +0 -146
  478. package/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
  479. package/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
  480. package/templates/common/workflow/git/en/git-commit.md +0 -205
  481. package/templates/common/workflow/git/en/git-rollback.md +0 -90
  482. package/templates/common/workflow/git/en/git-worktree.md +0 -276
  483. package/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
  484. package/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
  485. package/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
  486. package/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
  487. package/templates/common/workflow/interview/en/interview.md +0 -67
  488. package/templates/common/workflow/interview/zh-CN/interview.md +0 -67
  489. package/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
  490. package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
  491. package/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
  492. package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
  493. package/templates/common/workflow/sixStep/en/workflow.md +0 -83
  494. package/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
  495. package/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
  496. package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
  497. package/templates/hooks/README.md +0 -212
  498. package/templates/hooks/git-workflow-hooks.md +0 -551
  499. package/templates/hooks/post-test/coverage.json +0 -21
  500. package/templates/hooks/post-test/summary.json +0 -21
  501. package/templates/hooks/post-test-coverage.md +0 -434
  502. package/templates/hooks/pre-commit/eslint.json +0 -22
  503. package/templates/hooks/pre-commit/prettier.json +0 -22
  504. package/templates/hooks/pre-commit-black.md +0 -274
  505. package/templates/hooks/pre-commit-eslint.md +0 -153
  506. package/templates/hooks/pre-commit-gofmt.md +0 -284
  507. package/templates/hooks/pre-commit-prettier.md +0 -212
  508. package/templates/hooks/pre-commit-type-check.md +0 -377
  509. package/templates/skills/basic.hbs +0 -72
  510. package/templates/skills/ccjk-init.md +0 -154
  511. package/templates/skills/ccjk-mcp-setup.md +0 -205
  512. package/templates/skills/ccjk-troubleshoot.md +0 -228
  513. package/templates/skills/code-refactor.hbs +0 -133
  514. package/templates/skills/code-review.hbs +0 -141
  515. package/templates/skills/django-patterns.md +0 -1016
  516. package/templates/skills/git-workflow.md +0 -748
  517. package/templates/skills/go-idioms.md +0 -963
  518. package/templates/skills/index.json +0 -132
  519. package/templates/skills/nextjs-optimization.md +0 -694
  520. package/templates/skills/python-pep8.md +0 -852
  521. package/templates/skills/react-patterns.md +0 -686
  522. package/templates/skills/rust-patterns.md +0 -1057
  523. package/templates/skills/security-best-practices.md +0 -1413
  524. package/templates/skills/testing-best-practices.md +0 -1315
  525. package/templates/skills/ts-best-practices.md +0 -354
  526. package/templates/skills/type-fix.hbs +0 -132
@@ -1,1390 +0,0 @@
1
- import { chmodSync } from 'node:fs';
2
- import { ZCF_CONFIG_FILE, ZCF_CONFIG_DIR, CLAVUE_CONFIG_FILE, CLAVUE_CREDENTIALS_FILE, CLAVUE_SETTINGS_FILE } from './constants.mjs';
3
- import { d as dayjs } from '../shared/ccjk.RyizuzOI.mjs';
4
- import { readDefaultTomlConfig, createDefaultTomlConfig, writeTomlConfig } from './ccjk-config.mjs';
5
- import { r as resolveClaudeFamilySettingsTarget, n as normalizeClaudeFamilySettings } from '../shared/ccjk.DDL-4C-k.mjs';
6
- import { h as clearLegacyTopLevelRuntimeSettings, o as overwriteModelSettings } from './config.mjs';
7
- import { ensureDir, exists, copyFile } from './fs-operations.mjs';
8
- import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
9
- import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
10
-
11
- class ClaudeCodeConfigManager {
12
- static CONFIG_FILE = ZCF_CONFIG_FILE;
13
- static LEGACY_CONFIG_FILE = join(ZCF_CONFIG_DIR, "claude-code-configs.json");
14
- /**
15
- * Ensure configuration directory exists
16
- */
17
- static ensureConfigDir() {
18
- ensureDir(ZCF_CONFIG_DIR);
19
- }
20
- /**
21
- * Read TOML configuration
22
- */
23
- static readTomlConfig() {
24
- return readDefaultTomlConfig();
25
- }
26
- /**
27
- * Load TOML configuration, falling back to default when missing
28
- */
29
- static loadTomlConfig() {
30
- const existingConfig = this.readTomlConfig();
31
- if (existingConfig) {
32
- return existingConfig;
33
- }
34
- return createDefaultTomlConfig();
35
- }
36
- /**
37
- * Migrate legacy JSON-based configuration into TOML storage
38
- */
39
- static migrateFromLegacyConfig() {
40
- if (!exists(this.LEGACY_CONFIG_FILE)) {
41
- return null;
42
- }
43
- try {
44
- const legacyConfig = readJsonConfig(this.LEGACY_CONFIG_FILE);
45
- if (!legacyConfig) {
46
- return null;
47
- }
48
- const normalizedProfiles = {};
49
- const existingKeys = /* @__PURE__ */ new Set();
50
- let migratedCurrentKey = "";
51
- Object.entries(legacyConfig.profiles || {}).forEach(([legacyKey, profile]) => {
52
- const sourceProfile = profile;
53
- const name = sourceProfile.name?.trim() || legacyKey;
54
- const baseKey = this.generateProfileId(name);
55
- let uniqueKey = baseKey || legacyKey;
56
- let suffix = 2;
57
- while (existingKeys.has(uniqueKey)) {
58
- uniqueKey = `${baseKey || legacyKey}-${suffix++}`;
59
- }
60
- existingKeys.add(uniqueKey);
61
- const sanitizedProfile = this.sanitizeProfile({
62
- ...sourceProfile,
63
- name
64
- });
65
- normalizedProfiles[uniqueKey] = {
66
- ...sanitizedProfile,
67
- id: uniqueKey
68
- };
69
- if (legacyConfig.currentProfileId === legacyKey || legacyConfig.currentProfileId === sourceProfile.id) {
70
- migratedCurrentKey = uniqueKey;
71
- }
72
- });
73
- if (!migratedCurrentKey && legacyConfig.currentProfileId) {
74
- const fallbackKey = this.generateProfileId(legacyConfig.currentProfileId);
75
- if (existingKeys.has(fallbackKey)) {
76
- migratedCurrentKey = fallbackKey;
77
- }
78
- }
79
- if (!migratedCurrentKey && existingKeys.size > 0) {
80
- migratedCurrentKey = Array.from(existingKeys)[0];
81
- }
82
- const migratedConfig = {
83
- currentProfileId: migratedCurrentKey,
84
- profiles: normalizedProfiles
85
- };
86
- this.writeConfig(migratedConfig);
87
- return migratedConfig;
88
- } catch (error) {
89
- console.error("Failed to migrate legacy Claude Code config:", error);
90
- return null;
91
- }
92
- }
93
- /**
94
- * Read configuration
95
- */
96
- static readConfig() {
97
- try {
98
- const tomlConfig = readDefaultTomlConfig();
99
- if (!tomlConfig || !tomlConfig.claudeCode) {
100
- return this.migrateFromLegacyConfig();
101
- }
102
- const { claudeCode } = tomlConfig;
103
- const rawProfiles = claudeCode.profiles || {};
104
- const sanitizedProfiles = Object.fromEntries(
105
- Object.entries(rawProfiles).map(([key, profile]) => {
106
- const storedProfile = this.sanitizeProfile({
107
- ...profile,
108
- name: profile.name || key
109
- });
110
- return [key, { ...storedProfile, id: key }];
111
- })
112
- );
113
- const configData = {
114
- currentProfileId: claudeCode.currentProfile || "",
115
- profiles: sanitizedProfiles
116
- };
117
- if (Object.keys(configData.profiles).length === 0) {
118
- const migrated = this.migrateFromLegacyConfig();
119
- if (migrated) {
120
- return migrated;
121
- }
122
- }
123
- return configData;
124
- } catch (error) {
125
- console.error("Failed to read Claude Code config:", error);
126
- return null;
127
- }
128
- }
129
- /**
130
- * Write configuration
131
- */
132
- static writeConfig(config) {
133
- try {
134
- this.ensureConfigDir();
135
- const keyMap = /* @__PURE__ */ new Map();
136
- const sanitizedProfiles = Object.fromEntries(
137
- Object.entries(config.profiles).map(([key, profile]) => {
138
- const normalizedName = profile.name?.trim() || key;
139
- const profileKey = this.generateProfileId(normalizedName);
140
- keyMap.set(key, profileKey);
141
- const sanitizedProfile = this.sanitizeProfile({
142
- ...profile,
143
- name: normalizedName
144
- });
145
- return [profileKey, sanitizedProfile];
146
- })
147
- );
148
- const tomlConfig = this.loadTomlConfig();
149
- const nextTomlConfig = {
150
- ...tomlConfig,
151
- claudeCode: {
152
- ...tomlConfig.claudeCode,
153
- currentProfile: keyMap.get(config.currentProfileId) || config.currentProfileId,
154
- profiles: sanitizedProfiles
155
- }
156
- };
157
- writeTomlConfig(this.CONFIG_FILE, nextTomlConfig);
158
- } catch (error) {
159
- console.error("Failed to write Claude Code config:", error);
160
- throw new Error(`Failed to write config: ${error instanceof Error ? error.message : String(error)}`);
161
- }
162
- }
163
- /**
164
- * Create empty configuration
165
- */
166
- static createEmptyConfig() {
167
- return {
168
- currentProfileId: "",
169
- profiles: {}
170
- };
171
- }
172
- static settingsMatchProfile(settings, profile) {
173
- const env = settings?.env || {};
174
- if (!profile) {
175
- return !settings?.model && !env.ANTHROPIC_MODEL && !env.ANTHROPIC_DEFAULT_HAIKU_MODEL && !env.ANTHROPIC_DEFAULT_SONNET_MODEL && !env.ANTHROPIC_DEFAULT_OPUS_MODEL;
176
- }
177
- const expectedPrimary = profile.primaryModel?.trim();
178
- const expectedHaiku = profile.defaultHaikuModel?.trim();
179
- const expectedSonnet = profile.defaultSonnetModel?.trim();
180
- const expectedOpus = profile.defaultOpusModel?.trim();
181
- const hasExplicitModelConfig = Boolean(expectedPrimary || expectedHaiku || expectedSonnet || expectedOpus);
182
- if (!hasExplicitModelConfig) {
183
- return !settings?.model && (env.ANTHROPIC_MODEL === "" || env.ANTHROPIC_MODEL === void 0) && env.ANTHROPIC_DEFAULT_HAIKU_MODEL === void 0 && env.ANTHROPIC_DEFAULT_SONNET_MODEL === void 0 && env.ANTHROPIC_DEFAULT_OPUS_MODEL === void 0;
184
- }
185
- const hasAdaptiveRouting = Boolean(expectedHaiku || expectedSonnet || expectedOpus);
186
- if (hasAdaptiveRouting) {
187
- return !settings?.model && env.ANTHROPIC_MODEL === void 0 && env.ANTHROPIC_DEFAULT_HAIKU_MODEL === expectedHaiku && env.ANTHROPIC_SMALL_FAST_MODEL === expectedHaiku && env.ANTHROPIC_DEFAULT_SONNET_MODEL === expectedSonnet && env.ANTHROPIC_DEFAULT_OPUS_MODEL === expectedOpus;
188
- }
189
- return settings?.model === expectedPrimary && env.ANTHROPIC_MODEL === void 0 && env.ANTHROPIC_DEFAULT_HAIKU_MODEL === expectedHaiku && env.ANTHROPIC_SMALL_FAST_MODEL === expectedHaiku && env.ANTHROPIC_DEFAULT_SONNET_MODEL === expectedSonnet && env.ANTHROPIC_DEFAULT_OPUS_MODEL === expectedOpus;
190
- }
191
- static async syncCurrentProfileToSettings() {
192
- const currentProfile = this.getCurrentProfile();
193
- await this.applyProfileSettings(currentProfile);
194
- }
195
- /**
196
- * Apply profile settings to Claude Code runtime
197
- */
198
- static async applyProfileSettings(profile) {
199
- const { ensureI18nInitialized, i18n } = await import('./index2.mjs');
200
- ensureI18nInitialized();
201
- const target = resolveClaudeFamilySettingsTarget();
202
- try {
203
- if (!profile) {
204
- const { switchToOfficialLogin } = await import('./config.mjs').then(function (n) { return n.k; });
205
- switchToOfficialLogin(target.codeTool);
206
- return;
207
- }
208
- const { readJsonConfig: readJsonConfig2, writeJsonConfig } = await import('./json-config.mjs');
209
- const settings = readJsonConfig2(target.settingsFile) || {};
210
- clearLegacyTopLevelRuntimeSettings(settings);
211
- if (!settings.env)
212
- settings.env = {};
213
- let shouldRestartCcr = false;
214
- if (profile.authType === "api_key") {
215
- settings.env.ANTHROPIC_API_KEY = profile.apiKey;
216
- delete settings.env.ANTHROPIC_AUTH_TOKEN;
217
- } else if (profile.authType === "auth_token") {
218
- settings.env.ANTHROPIC_AUTH_TOKEN = profile.apiKey;
219
- delete settings.env.ANTHROPIC_API_KEY;
220
- } else if (profile.authType === "ccr_proxy") {
221
- const { readCcrConfig } = await import('./config2.mjs');
222
- const ccrConfig = readCcrConfig();
223
- if (!ccrConfig) {
224
- throw new Error(i18n.t("ccr:ccrNotConfigured") || "CCR proxy configuration not found");
225
- }
226
- const host = ccrConfig.HOST || "127.0.0.1";
227
- const port = ccrConfig.PORT || 3456;
228
- const apiKey = ccrConfig.APIKEY || "sk-ccjk-x-ccr";
229
- settings.env.ANTHROPIC_BASE_URL = `http://${host}:${port}`;
230
- settings.env.ANTHROPIC_API_KEY = apiKey;
231
- delete settings.env.ANTHROPIC_AUTH_TOKEN;
232
- shouldRestartCcr = true;
233
- }
234
- if (profile.authType !== "ccr_proxy") {
235
- if (profile.baseUrl)
236
- settings.env.ANTHROPIC_BASE_URL = profile.baseUrl;
237
- else
238
- delete settings.env.ANTHROPIC_BASE_URL;
239
- }
240
- const hasModelConfig = Boolean(
241
- profile.primaryModel || profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel
242
- );
243
- const modelMode = hasModelConfig ? "override" : "reset";
244
- overwriteModelSettings(settings, {
245
- primaryModel: profile.primaryModel,
246
- haikuModel: profile.defaultHaikuModel,
247
- sonnetModel: profile.defaultSonnetModel,
248
- opusModel: profile.defaultOpusModel
249
- }, modelMode);
250
- normalizeClaudeFamilySettings(settings);
251
- writeJsonConfig(target.settingsFile, settings);
252
- const { setPrimaryApiKey, addCompletedOnboarding } = await import('./claude-config.mjs').then(function (n) { return n.n; });
253
- setPrimaryApiKey(target.codeTool);
254
- addCompletedOnboarding(target.codeTool);
255
- let verifiedSettings = readJsonConfig2(target.settingsFile) || {};
256
- if (!this.settingsMatchProfile(verifiedSettings, profile)) {
257
- const repairedSettings = readJsonConfig2(target.settingsFile) || {};
258
- clearLegacyTopLevelRuntimeSettings(repairedSettings);
259
- repairedSettings.env = repairedSettings.env || {};
260
- if (profile?.authType === "api_key") {
261
- repairedSettings.env.ANTHROPIC_API_KEY = profile.apiKey;
262
- delete repairedSettings.env.ANTHROPIC_AUTH_TOKEN;
263
- } else if (profile?.authType === "auth_token") {
264
- repairedSettings.env.ANTHROPIC_AUTH_TOKEN = profile.apiKey;
265
- delete repairedSettings.env.ANTHROPIC_API_KEY;
266
- }
267
- if (profile?.authType !== "ccr_proxy") {
268
- if (profile?.baseUrl)
269
- repairedSettings.env.ANTHROPIC_BASE_URL = profile.baseUrl;
270
- else
271
- delete repairedSettings.env.ANTHROPIC_BASE_URL;
272
- }
273
- overwriteModelSettings(repairedSettings, {
274
- primaryModel: profile?.primaryModel,
275
- haikuModel: profile?.defaultHaikuModel,
276
- sonnetModel: profile?.defaultSonnetModel,
277
- opusModel: profile?.defaultOpusModel
278
- }, profile ? modelMode : "reset");
279
- normalizeClaudeFamilySettings(repairedSettings);
280
- writeJsonConfig(target.settingsFile, repairedSettings);
281
- verifiedSettings = readJsonConfig2(target.settingsFile) || {};
282
- }
283
- if (!this.settingsMatchProfile(verifiedSettings, profile)) {
284
- throw new Error("settings.json verification failed after applying current profile");
285
- }
286
- if (shouldRestartCcr) {
287
- const { runCcrRestart } = await import('./commands.mjs');
288
- await runCcrRestart();
289
- }
290
- } catch (error) {
291
- const reason = error instanceof Error ? error.message : String(error);
292
- throw new Error(`${i18n.t("multi-config:failedToApplySettings")}: ${reason}`);
293
- }
294
- }
295
- static async applyCurrentProfile() {
296
- await this.syncCurrentProfileToSettings();
297
- }
298
- /**
299
- * Remove unsupported fields from profile payload
300
- */
301
- static sanitizeProfile(profile) {
302
- const sanitized = {
303
- name: profile.name,
304
- authType: profile.authType
305
- };
306
- if (profile.provider)
307
- sanitized.provider = profile.provider;
308
- if (profile.apiKey)
309
- sanitized.apiKey = profile.apiKey;
310
- if (profile.baseUrl)
311
- sanitized.baseUrl = profile.baseUrl;
312
- if (profile.primaryModel)
313
- sanitized.primaryModel = profile.primaryModel;
314
- if (profile.defaultHaikuModel)
315
- sanitized.defaultHaikuModel = profile.defaultHaikuModel;
316
- if (profile.defaultSonnetModel)
317
- sanitized.defaultSonnetModel = profile.defaultSonnetModel;
318
- if (profile.defaultOpusModel)
319
- sanitized.defaultOpusModel = profile.defaultOpusModel;
320
- return sanitized;
321
- }
322
- /**
323
- * Backup configuration
324
- */
325
- static backupConfig() {
326
- try {
327
- if (!exists(this.CONFIG_FILE)) {
328
- return null;
329
- }
330
- const timestamp = dayjs().format("YYYY-MM-DD_HH-mm-ss");
331
- const backupPath = join(ZCF_CONFIG_DIR, `config.backup.${timestamp}.toml`);
332
- copyFile(this.CONFIG_FILE, backupPath);
333
- return backupPath;
334
- } catch (error) {
335
- console.error("Failed to backup Claude Code config:", error);
336
- return null;
337
- }
338
- }
339
- /**
340
- * Add configuration
341
- */
342
- static async addProfile(profile) {
343
- try {
344
- const validationErrors = this.validateProfile(profile);
345
- if (validationErrors.length > 0) {
346
- return {
347
- success: false,
348
- error: `Validation failed: ${validationErrors.join(", ")}`
349
- };
350
- }
351
- const backupPath = this.backupConfig();
352
- let config = this.readConfig();
353
- if (!config) {
354
- config = this.createEmptyConfig();
355
- }
356
- if (profile.id && config.profiles[profile.id]) {
357
- return {
358
- success: false,
359
- error: `Profile with ID "${profile.id}" already exists`,
360
- backupPath: backupPath || void 0
361
- };
362
- }
363
- const normalizedName = profile.name.trim();
364
- const profileKey = this.generateProfileId(normalizedName);
365
- const existingNames = Object.values(config.profiles).map((p) => p.name || "");
366
- if (config.profiles[profileKey] || existingNames.some((name) => name.toLowerCase() === normalizedName.toLowerCase())) {
367
- return {
368
- success: false,
369
- error: `Profile with name "${profile.name}" already exists`,
370
- backupPath: backupPath || void 0
371
- };
372
- }
373
- const sanitizedProfile = this.sanitizeProfile({
374
- ...profile,
375
- name: normalizedName
376
- });
377
- const runtimeProfile = {
378
- ...sanitizedProfile,
379
- id: profileKey
380
- };
381
- config.profiles[profileKey] = runtimeProfile;
382
- if (!config.currentProfileId) {
383
- config.currentProfileId = profileKey;
384
- }
385
- this.writeConfig(config);
386
- if (config.currentProfileId === profileKey) {
387
- await this.syncCurrentProfileToSettings();
388
- }
389
- return {
390
- success: true,
391
- backupPath: backupPath || void 0,
392
- addedProfile: runtimeProfile
393
- };
394
- } catch (error) {
395
- return {
396
- success: false,
397
- error: error instanceof Error ? error.message : String(error)
398
- };
399
- }
400
- }
401
- /**
402
- * Update configuration
403
- */
404
- static async updateProfile(id, data) {
405
- try {
406
- const validationErrors = this.validateProfile(data, true);
407
- if (validationErrors.length > 0) {
408
- return {
409
- success: false,
410
- error: `Validation failed: ${validationErrors.join(", ")}`
411
- };
412
- }
413
- const backupPath = this.backupConfig();
414
- const config = this.readConfig();
415
- if (!config || !config.profiles[id]) {
416
- return {
417
- success: false,
418
- error: `Profile with ID "${id}" not found`,
419
- backupPath: backupPath || void 0
420
- };
421
- }
422
- const existingProfile = config.profiles[id];
423
- const nextName = data.name !== void 0 ? data.name.trim() : existingProfile.name;
424
- const nextKey = this.generateProfileId(nextName);
425
- const nameChanged = nextKey !== id;
426
- if (nameChanged) {
427
- const duplicateName = Object.entries(config.profiles).some(([key, profile]) => key !== id && (profile.name || "").toLowerCase() === nextName.toLowerCase());
428
- if (duplicateName || config.profiles[nextKey]) {
429
- return {
430
- success: false,
431
- error: `Profile with name "${data.name}" already exists`,
432
- backupPath: backupPath || void 0
433
- };
434
- }
435
- }
436
- const mergedProfile = this.sanitizeProfile({
437
- ...existingProfile,
438
- ...data,
439
- name: nextName
440
- });
441
- if (nameChanged) {
442
- delete config.profiles[id];
443
- config.profiles[nextKey] = {
444
- ...mergedProfile,
445
- id: nextKey
446
- };
447
- if (config.currentProfileId === id) {
448
- config.currentProfileId = nextKey;
449
- }
450
- } else {
451
- config.profiles[id] = {
452
- ...mergedProfile,
453
- id
454
- };
455
- }
456
- this.writeConfig(config);
457
- if (config.currentProfileId === (nameChanged ? nextKey : id)) {
458
- await this.syncCurrentProfileToSettings();
459
- }
460
- return {
461
- success: true,
462
- backupPath: backupPath || void 0,
463
- updatedProfile: {
464
- ...mergedProfile,
465
- id: nameChanged ? nextKey : id
466
- }
467
- };
468
- } catch (error) {
469
- return {
470
- success: false,
471
- error: error instanceof Error ? error.message : String(error)
472
- };
473
- }
474
- }
475
- /**
476
- * Delete configuration
477
- */
478
- static async deleteProfile(id) {
479
- try {
480
- const backupPath = this.backupConfig();
481
- const config = this.readConfig();
482
- if (!config || !config.profiles[id]) {
483
- return {
484
- success: false,
485
- error: `Profile with ID "${id}" not found`,
486
- backupPath: backupPath || void 0
487
- };
488
- }
489
- const profileCount = Object.keys(config.profiles).length;
490
- if (profileCount === 1) {
491
- return {
492
- success: false,
493
- error: "Cannot delete the last profile. At least one profile must remain.",
494
- backupPath: backupPath || void 0
495
- };
496
- }
497
- delete config.profiles[id];
498
- if (config.currentProfileId === id) {
499
- const remainingIds = Object.keys(config.profiles);
500
- config.currentProfileId = remainingIds[0];
501
- }
502
- this.writeConfig(config);
503
- if (config.currentProfileId) {
504
- await this.syncCurrentProfileToSettings();
505
- }
506
- return {
507
- success: true,
508
- backupPath: backupPath || void 0,
509
- remainingProfiles: Object.entries(config.profiles).map(([key, profile]) => ({
510
- ...profile,
511
- id: key
512
- }))
513
- };
514
- } catch (error) {
515
- return {
516
- success: false,
517
- error: error instanceof Error ? error.message : String(error)
518
- };
519
- }
520
- }
521
- /**
522
- * Delete multiple configurations
523
- */
524
- static async deleteProfiles(ids) {
525
- try {
526
- const backupPath = this.backupConfig();
527
- const config = this.readConfig();
528
- if (!config) {
529
- return {
530
- success: false,
531
- error: "No configuration found",
532
- backupPath: backupPath || void 0
533
- };
534
- }
535
- const missingIds = ids.filter((id) => !config.profiles[id]);
536
- if (missingIds.length > 0) {
537
- return {
538
- success: false,
539
- error: `Profiles not found: ${missingIds.join(", ")}`,
540
- backupPath: backupPath || void 0
541
- };
542
- }
543
- const remainingCount = Object.keys(config.profiles).length - ids.length;
544
- if (remainingCount === 0) {
545
- return {
546
- success: false,
547
- error: "Cannot delete all profiles. At least one profile must remain.",
548
- backupPath: backupPath || void 0
549
- };
550
- }
551
- let newCurrentProfileId;
552
- ids.forEach((id) => {
553
- delete config.profiles[id];
554
- });
555
- if (ids.includes(config.currentProfileId)) {
556
- const remainingIds = Object.keys(config.profiles);
557
- config.currentProfileId = remainingIds[0];
558
- newCurrentProfileId = config.currentProfileId;
559
- }
560
- this.writeConfig(config);
561
- if (config.currentProfileId) {
562
- await this.syncCurrentProfileToSettings();
563
- }
564
- return {
565
- success: true,
566
- backupPath: backupPath || void 0,
567
- newCurrentProfileId,
568
- deletedProfiles: ids,
569
- remainingProfiles: Object.entries(config.profiles).map(([key, profile]) => ({
570
- ...profile,
571
- id: key
572
- }))
573
- };
574
- } catch (error) {
575
- return {
576
- success: false,
577
- error: error instanceof Error ? error.message : String(error)
578
- };
579
- }
580
- }
581
- /**
582
- * Generate profile ID from name
583
- */
584
- static generateProfileId(name) {
585
- return name.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "profile";
586
- }
587
- /**
588
- * Switch configuration
589
- */
590
- static async switchProfile(id) {
591
- try {
592
- const config = this.readConfig();
593
- if (!config || !config.profiles[id]) {
594
- return {
595
- success: false,
596
- error: "Profile not found"
597
- };
598
- }
599
- if (config.currentProfileId === id) {
600
- return { success: true };
601
- }
602
- config.currentProfileId = id;
603
- this.writeConfig(config);
604
- await this.syncCurrentProfileToSettings();
605
- return { success: true };
606
- } catch (error) {
607
- return {
608
- success: false,
609
- error: error instanceof Error ? error.message : String(error)
610
- };
611
- }
612
- }
613
- /**
614
- * List all configurations
615
- */
616
- static listProfiles() {
617
- const config = this.readConfig();
618
- if (!config) {
619
- return [];
620
- }
621
- return Object.values(config.profiles);
622
- }
623
- /**
624
- * Get current configuration
625
- */
626
- static getCurrentProfile() {
627
- const config = this.readConfig();
628
- if (!config || !config.currentProfileId) {
629
- return null;
630
- }
631
- return config.profiles[config.currentProfileId] || null;
632
- }
633
- /**
634
- * Get configuration by ID
635
- */
636
- static getProfileById(id) {
637
- const config = this.readConfig();
638
- if (!config) {
639
- return null;
640
- }
641
- return config.profiles[id] || null;
642
- }
643
- /**
644
- * Get configuration by name
645
- */
646
- static getProfileByName(name) {
647
- const config = this.readConfig();
648
- if (!config) {
649
- return null;
650
- }
651
- return Object.values(config.profiles).find((p) => p.name === name) || null;
652
- }
653
- /**
654
- * Sync CCR configuration
655
- */
656
- static async syncCcrProfile() {
657
- try {
658
- const { readCcrConfig } = await import('./config2.mjs');
659
- const ccrConfig = readCcrConfig();
660
- if (!ccrConfig) {
661
- await this.ensureCcrProfileExists(ccrConfig);
662
- return;
663
- }
664
- await this.ensureCcrProfileExists(ccrConfig);
665
- } catch (error) {
666
- console.error("Failed to sync CCR profile:", error);
667
- }
668
- }
669
- /**
670
- * 确保CCR配置文件存在
671
- */
672
- static async ensureCcrProfileExists(ccrConfig) {
673
- const config = this.readConfig() || this.createEmptyConfig();
674
- const ccrProfileId = "ccr-proxy";
675
- const existingCcrProfile = config.profiles[ccrProfileId];
676
- if (!ccrConfig) {
677
- if (existingCcrProfile) {
678
- delete config.profiles[ccrProfileId];
679
- if (config.currentProfileId === ccrProfileId) {
680
- const remainingIds = Object.keys(config.profiles);
681
- config.currentProfileId = remainingIds[0] || "";
682
- }
683
- this.writeConfig(config);
684
- }
685
- return;
686
- }
687
- const host = ccrConfig.HOST || "127.0.0.1";
688
- const port = ccrConfig.PORT || 3456;
689
- const apiKey = ccrConfig.APIKEY || "sk-ccjk-x-ccr";
690
- const baseUrl = `http://${host}:${port}`;
691
- const ccrProfile = {
692
- name: "CCR Proxy",
693
- authType: "ccr_proxy",
694
- baseUrl,
695
- apiKey
696
- };
697
- config.profiles[ccrProfileId] = {
698
- ...ccrProfile,
699
- id: ccrProfileId
700
- };
701
- if (!config.currentProfileId) {
702
- config.currentProfileId = ccrProfileId;
703
- }
704
- this.writeConfig(config);
705
- }
706
- /**
707
- * Switch to official login
708
- */
709
- static async switchToOfficial() {
710
- try {
711
- const config = this.readConfig();
712
- if (!config) {
713
- return { success: true };
714
- }
715
- config.currentProfileId = "";
716
- this.writeConfig(config);
717
- await this.applyProfileSettings(null);
718
- return { success: true };
719
- } catch (error) {
720
- return {
721
- success: false,
722
- error: error instanceof Error ? error.message : String(error)
723
- };
724
- }
725
- }
726
- /**
727
- * Switch to CCR proxy
728
- */
729
- static async switchToCcr() {
730
- try {
731
- await this.syncCcrProfile();
732
- const config = this.readConfig();
733
- if (!config || !config.profiles["ccr-proxy"]) {
734
- return {
735
- success: false,
736
- error: "CCR proxy configuration not found. Please configure CCR first."
737
- };
738
- }
739
- return await this.switchProfile("ccr-proxy");
740
- } catch (error) {
741
- return {
742
- success: false,
743
- error: error instanceof Error ? error.message : String(error)
744
- };
745
- }
746
- }
747
- /**
748
- * Validate configuration
749
- */
750
- static validateProfile(profile, isUpdate = false) {
751
- const errors = [];
752
- if (!isUpdate && (!profile.name || typeof profile.name !== "string" || profile.name.trim() === "")) {
753
- errors.push("Profile name is required");
754
- }
755
- if (profile.name && typeof profile.name !== "string") {
756
- errors.push("Profile name must be a string");
757
- }
758
- if (profile.authType && !["api_key", "auth_token", "ccr_proxy"].includes(profile.authType)) {
759
- errors.push("Invalid auth type. Must be one of: api_key, auth_token, ccr_proxy");
760
- }
761
- if (profile.authType === "api_key" || profile.authType === "auth_token") {
762
- if (!profile.apiKey || typeof profile.apiKey !== "string" || profile.apiKey.trim() === "") {
763
- errors.push("API key is required for api_key and auth_token types");
764
- }
765
- }
766
- if (profile.baseUrl) {
767
- try {
768
- new URL(profile.baseUrl);
769
- } catch {
770
- errors.push("Invalid base URL format");
771
- }
772
- }
773
- return errors;
774
- }
775
- /**
776
- * 检查是否为最后一个配置
777
- */
778
- static isLastProfile(id) {
779
- const config = this.readConfig();
780
- if (!config || !config.profiles[id]) {
781
- return false;
782
- }
783
- return Object.keys(config.profiles).length === 1;
784
- }
785
- }
786
-
787
- const claudeCodeConfigManager = {
788
- __proto__: null,
789
- ClaudeCodeConfigManager: ClaudeCodeConfigManager
790
- };
791
-
792
- function readClavueConfig() {
793
- return readJsonConfig(CLAVUE_CONFIG_FILE);
794
- }
795
- function writeClavueConfig(config) {
796
- writeJsonConfig(CLAVUE_CONFIG_FILE, config);
797
- }
798
- function normalizeMyclaudeProviderProfile(profile) {
799
- return {
800
- ...profile,
801
- ...describeMyclaudeProviderProfile(profile)
802
- };
803
- }
804
- function normalizeClavueBaseUrl(url) {
805
- if (typeof url !== "string") {
806
- return void 0;
807
- }
808
- const normalized = url.trim().replace(/\/v1(?:\/messages|\/responses)?\/?$/i, "").replace(/\/+$/, "");
809
- return normalized || void 0;
810
- }
811
- function normalizeClavueAuthType(authType) {
812
- return authType === "auth_token" ? "auth_token" : "api_key";
813
- }
814
- function inferClavueProviderId(provider, baseUrl) {
815
- const providerId = typeof provider === "string" ? provider.trim() : "";
816
- if (providerId && providerId !== "ccr_proxy") {
817
- return providerId;
818
- }
819
- if (baseUrl === "https://api.anthropic.com") {
820
- return "anthropic";
821
- }
822
- return "custom";
823
- }
824
- function isOpenAiFamilyModel(model) {
825
- return /^(?:gpt-|o\d|codex|kimi|glm|moonshot|deepseek|qwen|doubao|yi-|minimax)/i.test(model.trim());
826
- }
827
- function inferClavueModelMode(profile) {
828
- if (profile.authType === "ccr_proxy" || profile.mode === "ccr-proxy") {
829
- return "hybrid_compatible";
830
- }
831
- const routedModels = [
832
- profile.primaryModel,
833
- profile.model,
834
- profile.defaultHaikuModel,
835
- profile.fastModel,
836
- profile.defaultSonnetModel,
837
- profile.defaultOpusModel
838
- ].filter((model) => typeof model === "string" && model.trim().length > 0);
839
- if (routedModels.length > 0 && routedModels.every(isOpenAiFamilyModel)) {
840
- return "openai_native";
841
- }
842
- if (routedModels.length > 0 && !routedModels.some(isOpenAiFamilyModel)) {
843
- return "anthropic_native";
844
- }
845
- if (routedModels.length > 0) {
846
- return "hybrid_compatible";
847
- }
848
- if (profile.mode === "openai-native") {
849
- return "openai_native";
850
- }
851
- if (!profile.baseUrl || profile.provider === "anthropic" || profile.mode === "official") {
852
- return "anthropic_native";
853
- }
854
- return routedModels.some(isOpenAiFamilyModel) ? "hybrid_compatible" : "anthropic_native";
855
- }
856
- function getClavueRoutingPresetId(profile) {
857
- const mode = inferClavueModelMode(profile);
858
- if (mode === "openai_native") {
859
- return "gpt_5_4_codex";
860
- }
861
- if (mode === "anthropic_native") {
862
- return "claude_code_heritage";
863
- }
864
- return "custom";
865
- }
866
- function isCcjkClavueProfile(profile) {
867
- return profile.provenance?.kind === "imported" && profile.provenance.sourceId === "ccjk";
868
- }
869
- const CCJK_CLAVUE_PROFILE_ID_PREFIX = "ccjk-";
870
- function getSourceProfileId(profile) {
871
- const id = typeof profile.id === "string" ? profile.id.trim() : "";
872
- if (id) {
873
- return id;
874
- }
875
- const name = typeof profile.name === "string" ? profile.name.trim() : "";
876
- return name || "profile";
877
- }
878
- function getCcjkExternalProfileId(profile) {
879
- const externalProfileId = profile.provenance?.externalProfileId;
880
- if (typeof externalProfileId === "string" && externalProfileId.trim()) {
881
- return externalProfileId.trim();
882
- }
883
- const profileId = typeof profile.id === "string" ? profile.id.trim() : "";
884
- if (profileId.startsWith(CCJK_CLAVUE_PROFILE_ID_PREFIX) && profileId.length > CCJK_CLAVUE_PROFILE_ID_PREFIX.length) {
885
- return profileId.slice(CCJK_CLAVUE_PROFILE_ID_PREFIX.length);
886
- }
887
- return profileId || "profile";
888
- }
889
- function getCcjkClavueProfileId(externalProfileId) {
890
- const cleanExternalId = externalProfileId.trim() || "profile";
891
- return cleanExternalId.startsWith(CCJK_CLAVUE_PROFILE_ID_PREFIX) ? cleanExternalId : `${CCJK_CLAVUE_PROFILE_ID_PREFIX}${cleanExternalId}`;
892
- }
893
- function getUniqueClavueProfileId(baseProfileId, reservedProfileIds) {
894
- if (!reservedProfileIds.has(baseProfileId)) {
895
- return baseProfileId;
896
- }
897
- let index = 2;
898
- let candidate = `${baseProfileId}-${index}`;
899
- while (reservedProfileIds.has(candidate)) {
900
- index += 1;
901
- candidate = `${baseProfileId}-${index}`;
902
- }
903
- return candidate;
904
- }
905
- function buildExistingCcjkProfileByExternalId(existingProfiles) {
906
- const existingByExternalId = /* @__PURE__ */ new Map();
907
- for (const profile of existingProfiles) {
908
- if (!isCcjkClavueProfile(profile)) {
909
- continue;
910
- }
911
- const externalProfileId = getCcjkExternalProfileId(profile);
912
- const current = existingByExternalId.get(externalProfileId);
913
- if (!current || profile.id.startsWith(CCJK_CLAVUE_PROFILE_ID_PREFIX)) {
914
- existingByExternalId.set(externalProfileId, profile);
915
- }
916
- }
917
- return existingByExternalId;
918
- }
919
- function resolveClavueProviderProfiles(profiles, existingProfiles) {
920
- const existingCcjkByExternalId = buildExistingCcjkProfileByExternalId(existingProfiles);
921
- const reservedProfileIds = new Set(existingProfiles.filter((profile) => !isCcjkClavueProfile(profile)).map((profile) => profile.id));
922
- return profiles.map((profile) => {
923
- const externalProfileId = getSourceProfileId(profile);
924
- const existing = existingCcjkByExternalId.get(externalProfileId);
925
- const canReuseExistingManagedId = Boolean(
926
- existing && existing.id.startsWith(CCJK_CLAVUE_PROFILE_ID_PREFIX) && !reservedProfileIds.has(existing.id)
927
- );
928
- const clavueProfileId = canReuseExistingManagedId ? existing.id : getUniqueClavueProfileId(getCcjkClavueProfileId(externalProfileId), reservedProfileIds);
929
- reservedProfileIds.add(clavueProfileId);
930
- return {
931
- source: profile,
932
- clavueProfileId,
933
- existing
934
- };
935
- });
936
- }
937
- function findResolvedClavueProfile(profiles, profileId) {
938
- const requestedProfileId = typeof profileId === "string" ? profileId.trim() : "";
939
- if (!requestedProfileId) {
940
- return void 0;
941
- }
942
- return profiles.find((profile) => {
943
- return profile.clavueProfileId === requestedProfileId || getSourceProfileId(profile.source) === requestedProfileId;
944
- });
945
- }
946
- function resolveClavueActiveProviderProfileId(config, activeProfileId) {
947
- const requestedProfileId = typeof activeProfileId === "string" ? activeProfileId.trim() : "";
948
- if (!requestedProfileId) {
949
- return void 0;
950
- }
951
- const existingProfiles = getClavueProviderProfiles(config);
952
- if (existingProfiles.some((profile) => profile.id === requestedProfileId)) {
953
- return requestedProfileId;
954
- }
955
- return existingProfiles.find((profile) => {
956
- return isCcjkClavueProfile(profile) && getCcjkExternalProfileId(profile) === requestedProfileId;
957
- })?.id || requestedProfileId;
958
- }
959
- function createClavueModelRouting(profile) {
960
- const primaryModel = (profile.primaryModel || profile.model || "").trim();
961
- const haikuModel = (profile.defaultHaikuModel || profile.fastModel || "").trim();
962
- const sonnetModel = (profile.defaultSonnetModel || primaryModel).trim();
963
- const opusModel = (profile.defaultOpusModel || primaryModel).trim();
964
- const executionModel = sonnetModel || primaryModel;
965
- return {
966
- presetId: getClavueRoutingPresetId(profile),
967
- primaryModel,
968
- subagentModel: executionModel && executionModel !== primaryModel ? executionModel : "",
969
- smallFastModel: haikuModel,
970
- planModel: opusModel || primaryModel,
971
- exploreModel: executionModel,
972
- generalModel: executionModel,
973
- teamModel: executionModel,
974
- guideModel: opusModel || primaryModel
975
- };
976
- }
977
- function toClavueProviderProfile(profile, clavueProfileId, existing) {
978
- const now = Date.now();
979
- const normalizedBaseUrl = normalizeClavueBaseUrl(profile.baseUrl);
980
- const createdAt = typeof existing?.createdAt === "number" ? existing.createdAt : now;
981
- return {
982
- id: clavueProfileId,
983
- name: profile.name,
984
- providerId: inferClavueProviderId(profile.provider, normalizedBaseUrl),
985
- modelMode: inferClavueModelMode(profile),
986
- ...normalizedBaseUrl ? { baseUrl: normalizedBaseUrl } : {},
987
- authType: normalizeClavueAuthType(profile.authType),
988
- modelRouting: createClavueModelRouting(profile),
989
- provenance: {
990
- kind: "imported",
991
- sourceId: "ccjk",
992
- importedAt: typeof existing?.provenance?.importedAt === "number" ? existing.provenance.importedAt : createdAt,
993
- externalProfileId: getSourceProfileId(profile)
994
- },
995
- createdAt,
996
- updatedAt: now
997
- };
998
- }
999
- function readClavueCredentialsConfig() {
1000
- return readJsonConfig(CLAVUE_CREDENTIALS_FILE) || {};
1001
- }
1002
- function writeClavueCredentialsConfig(config) {
1003
- writeJsonConfig(CLAVUE_CREDENTIALS_FILE, config);
1004
- try {
1005
- chmodSync(CLAVUE_CREDENTIALS_FILE, 384);
1006
- } catch {
1007
- }
1008
- }
1009
- function syncClavueProviderCredentials(profiles, replaceProfileIds = /* @__PURE__ */ new Set()) {
1010
- const existingCredentials = readClavueCredentialsConfig();
1011
- const providerProfiles = { ...existingCredentials.providerProfiles || {} };
1012
- for (const profileId of replaceProfileIds) {
1013
- delete providerProfiles[profileId];
1014
- }
1015
- for (const profile of profiles) {
1016
- const credential = typeof profile.source.apiKey === "string" ? profile.source.apiKey.trim() : "";
1017
- if (!profile.clavueProfileId || !credential) {
1018
- continue;
1019
- }
1020
- providerProfiles[profile.clavueProfileId] = {
1021
- credential,
1022
- authType: normalizeClavueAuthType(profile.source.authType)
1023
- };
1024
- }
1025
- writeClavueCredentialsConfig({
1026
- ...existingCredentials,
1027
- providerProfiles: Object.keys(providerProfiles).length > 0 ? providerProfiles : void 0
1028
- });
1029
- }
1030
- function getClavueProviderProfiles(config) {
1031
- return Array.isArray(config?.clavueProviderProfiles) ? config.clavueProviderProfiles : [];
1032
- }
1033
- function getLegacyMyclaudeProviderProfiles(config) {
1034
- return Array.isArray(config?.myclaudeProviderProfiles) ? config.myclaudeProviderProfiles : [];
1035
- }
1036
- function toLegacyProviderProfile(profile) {
1037
- const routing = profile.modelRouting || createClavueModelRouting({ id: profile.id, name: profile.name, provider: profile.providerId });
1038
- return {
1039
- id: isCcjkClavueProfile(profile) ? getCcjkExternalProfileId(profile) : profile.id,
1040
- name: profile.name,
1041
- provider: profile.providerId || "custom",
1042
- baseUrl: profile.baseUrl,
1043
- model: routing.primaryModel,
1044
- fastModel: routing.smallFastModel,
1045
- authType: profile.authType,
1046
- primaryModel: routing.primaryModel,
1047
- defaultHaikuModel: routing.smallFastModel,
1048
- defaultSonnetModel: routing.generalModel || routing.subagentModel,
1049
- defaultOpusModel: routing.planModel,
1050
- ...describeMyclaudeProviderProfile({
1051
- authType: profile.authType,
1052
- baseUrl: profile.baseUrl,
1053
- mode: profile.modelMode === "openai_native" ? "openai-native" : profile.modelMode === "hybrid_compatible" ? "ccr-proxy" : "official"
1054
- })
1055
- };
1056
- }
1057
- function normalizeModelSlot(model) {
1058
- return typeof model === "string" && model.trim() ? model.trim() : void 0;
1059
- }
1060
- function resolveClavueModelSelectionSlots(options) {
1061
- if (options.reset) {
1062
- return {};
1063
- }
1064
- const selectedModel = normalizeModelSlot(options.selectedModel);
1065
- if (selectedModel) {
1066
- return {
1067
- primaryModel: selectedModel,
1068
- haikuModel: selectedModel,
1069
- sonnetModel: selectedModel,
1070
- opusModel: selectedModel
1071
- };
1072
- }
1073
- const primaryModel = normalizeModelSlot(options.primaryModel);
1074
- const haikuModel = normalizeModelSlot(options.haikuModel);
1075
- const sonnetModel = normalizeModelSlot(options.sonnetModel);
1076
- const opusModel = normalizeModelSlot(options.opusModel);
1077
- if (primaryModel) {
1078
- return {
1079
- primaryModel,
1080
- haikuModel: haikuModel || primaryModel,
1081
- sonnetModel: sonnetModel || primaryModel,
1082
- opusModel: opusModel || primaryModel
1083
- };
1084
- }
1085
- return {
1086
- haikuModel,
1087
- sonnetModel,
1088
- opusModel
1089
- };
1090
- }
1091
- function getClavueActiveProfile(config) {
1092
- const activeId = config?.clavueActiveProviderProfileId || config?.myclaudeActiveProviderProfileId || "";
1093
- const legacyProfiles = getLegacyMyclaudeProviderProfiles(config);
1094
- const activeLegacyProfile = legacyProfiles.find((profile) => profile.id === activeId);
1095
- if (activeLegacyProfile) {
1096
- return activeLegacyProfile;
1097
- }
1098
- const nativeProfiles = getClavueProviderProfiles(config);
1099
- const activeNativeProfile = nativeProfiles.find((profile) => profile.id === activeId);
1100
- if (activeNativeProfile) {
1101
- return toLegacyProviderProfile(activeNativeProfile);
1102
- }
1103
- return nativeProfiles.map(toLegacyProviderProfile).find((profile) => profile.id === activeId) || null;
1104
- }
1105
- function syncClavueActiveProviderModelSelection(options) {
1106
- const config = readClavueConfig();
1107
- const activeId = config?.clavueActiveProviderProfileId || config?.myclaudeActiveProviderProfileId || "";
1108
- if (!config || !activeId) {
1109
- return false;
1110
- }
1111
- const slots = resolveClavueModelSelectionSlots(options);
1112
- const nativeProfiles = getClavueProviderProfiles(config);
1113
- const nativeProfileIndex = nativeProfiles.findIndex((profile) => profile.id === activeId);
1114
- if (nativeProfileIndex >= 0) {
1115
- const currentProfile = nativeProfiles[nativeProfileIndex];
1116
- const routingProfile = {
1117
- id: currentProfile.id,
1118
- name: currentProfile.name,
1119
- provider: currentProfile.providerId,
1120
- baseUrl: currentProfile.baseUrl,
1121
- authType: currentProfile.authType,
1122
- model: slots.primaryModel,
1123
- fastModel: slots.haikuModel,
1124
- primaryModel: slots.primaryModel,
1125
- defaultHaikuModel: slots.haikuModel,
1126
- defaultSonnetModel: slots.sonnetModel,
1127
- defaultOpusModel: slots.opusModel,
1128
- mode: currentProfile.modelMode === "openai_native" ? "openai-native" : currentProfile.modelMode === "hybrid_compatible" ? "ccr-proxy" : "official"
1129
- };
1130
- const nextProfile = {
1131
- ...currentProfile,
1132
- modelMode: options.reset ? currentProfile.modelMode : inferClavueModelMode(routingProfile),
1133
- modelRouting: createClavueModelRouting(routingProfile),
1134
- updatedAt: Date.now()
1135
- };
1136
- config.clavueProviderProfiles = nativeProfiles.map((profile, index) => index === nativeProfileIndex ? nextProfile : profile);
1137
- delete config.myclaudeProviderProfiles;
1138
- delete config.myclaudeActiveProviderProfileId;
1139
- writeClavueConfig(config);
1140
- syncMyclaudeActiveProfileToSettings(toLegacyProviderProfile(nextProfile));
1141
- return true;
1142
- }
1143
- const legacyProfiles = getLegacyMyclaudeProviderProfiles(config);
1144
- const legacyProfileIndex = legacyProfiles.findIndex((profile) => profile.id === activeId);
1145
- if (legacyProfileIndex < 0) {
1146
- return false;
1147
- }
1148
- const updatedProfiles = legacyProfiles.map((profile, index) => {
1149
- if (index !== legacyProfileIndex) {
1150
- return profile;
1151
- }
1152
- return {
1153
- ...profile,
1154
- model: slots.primaryModel,
1155
- fastModel: slots.haikuModel,
1156
- primaryModel: slots.primaryModel,
1157
- defaultHaikuModel: slots.haikuModel,
1158
- defaultSonnetModel: slots.sonnetModel,
1159
- defaultOpusModel: slots.opusModel
1160
- };
1161
- });
1162
- setMyclaudeProviderProfiles(updatedProfiles, activeId);
1163
- return true;
1164
- }
1165
- function setMyclaudeProviderProfiles(profiles, activeProfileId) {
1166
- const config = readClavueConfig() || { mcpServers: {} };
1167
- const normalizedProfiles = profiles.map(normalizeMyclaudeProviderProfile);
1168
- const existingProfiles = getClavueProviderProfiles(config);
1169
- const resolvedProfiles = resolveClavueProviderProfiles(normalizedProfiles, existingProfiles);
1170
- const selectedProfile = findResolvedClavueProfile(
1171
- resolvedProfiles,
1172
- activeProfileId ?? (normalizedProfiles[0] ? getSourceProfileId(normalizedProfiles[0]) : void 0)
1173
- );
1174
- const nextActiveProfileId = selectedProfile?.clavueProfileId;
1175
- const existingCcjkProfileIds = new Set(existingProfiles.filter(isCcjkClavueProfile).map((profile) => profile.id));
1176
- const preservedProfiles = existingProfiles.filter((profile) => !isCcjkClavueProfile(profile));
1177
- const preservedProfileIds = new Set(preservedProfiles.map((profile) => profile.id));
1178
- const replacedCredentialIds = new Set([...existingCcjkProfileIds].filter((profileId) => !preservedProfileIds.has(profileId)));
1179
- const clavueProfiles = resolvedProfiles.map((profile) => toClavueProviderProfile(
1180
- profile.source,
1181
- profile.clavueProfileId,
1182
- profile.existing
1183
- ));
1184
- config.clavueProviderProfiles = [...preservedProfiles, ...clavueProfiles];
1185
- if (nextActiveProfileId) {
1186
- config.clavueActiveProviderProfileId = nextActiveProfileId;
1187
- } else {
1188
- delete config.clavueActiveProviderProfileId;
1189
- }
1190
- delete config.myclaudeProviderProfiles;
1191
- delete config.myclaudeActiveProviderProfileId;
1192
- writeClavueConfig(config);
1193
- syncClavueProviderCredentials(resolvedProfiles, replacedCredentialIds);
1194
- const activeProfile = selectedProfile?.source || null;
1195
- syncMyclaudeActiveProfileToSettings(activeProfile);
1196
- return nextActiveProfileId;
1197
- }
1198
- function setMyclaudeActiveProviderProfile(activeProfileId) {
1199
- const config = readClavueConfig() || { mcpServers: {} };
1200
- const nextActiveProfileId = resolveClavueActiveProviderProfileId(config, activeProfileId);
1201
- if (nextActiveProfileId) {
1202
- config.clavueActiveProviderProfileId = nextActiveProfileId;
1203
- } else {
1204
- delete config.clavueActiveProviderProfileId;
1205
- }
1206
- delete config.myclaudeActiveProviderProfileId;
1207
- writeClavueConfig(config);
1208
- syncMyclaudeActiveProfileToSettings(getClavueActiveProfile(config));
1209
- }
1210
- function detectMyclaudeProviderMode(profile) {
1211
- if (profile.authType === "ccr_proxy") {
1212
- return "ccr-proxy";
1213
- }
1214
- if (profile.baseUrl) {
1215
- return "openai-native";
1216
- }
1217
- return "official";
1218
- }
1219
- function describeMyclaudeProviderProfile(profile) {
1220
- const mode = profile.mode || detectMyclaudeProviderMode({
1221
- authType: profile.authType,
1222
- baseUrl: profile.baseUrl
1223
- });
1224
- return { mode };
1225
- }
1226
- function buildMyclaudeProviderPresentation(profile) {
1227
- const mode = profile.mode || detectMyclaudeProviderMode({
1228
- authType: profile.authType,
1229
- baseUrl: profile.baseUrl
1230
- });
1231
- const hasAdaptiveRouting = Boolean(profile.defaultHaikuModel || profile.defaultSonnetModel || profile.defaultOpusModel);
1232
- const hasPrimaryModel = Boolean(profile.primaryModel || profile.model);
1233
- const modeLabel = mode === "ccr-proxy" ? "CCR-proxy" : mode === "openai-native" ? "OpenAI-native" : "Anthropic-native";
1234
- const routeLabel = mode === "ccr-proxy" ? profile.baseUrl ? `Claude-family route through CCR \xB7 ${profile.baseUrl}` : "Claude-family route through CCR" : mode === "openai-native" ? profile.baseUrl ? `OpenAI-family route through a compatible gateway \xB7 ${profile.baseUrl}` : "OpenAI-family route through a compatible gateway" : "Official Anthropic route";
1235
- const strategyLabel = hasAdaptiveRouting ? "Custom routing \xB7 Advanced custom routing. Validate carefully when mixing model families." : hasPrimaryModel ? "Single-model override \xB7 Primary model is pinned for the active profile." : "Native runtime default \xB7 Runtime follows the official provider defaults.";
1236
- return {
1237
- modeLabel,
1238
- sourceLabel: "Imported from ccjk \xB7 Reusable profile imported from the compatible ccjk configuration.",
1239
- routeLabel,
1240
- strategyLabel
1241
- };
1242
- }
1243
- function toMyclaudeProviderProfile(profile, existing) {
1244
- return {
1245
- id: profile.id || existing?.id || profile.name,
1246
- name: profile.name,
1247
- provider: profile.provider || existing?.provider || "custom",
1248
- apiKey: profile.apiKey,
1249
- baseUrl: profile.baseUrl,
1250
- model: profile.primaryModel,
1251
- fastModel: profile.defaultHaikuModel,
1252
- authType: profile.authType,
1253
- primaryModel: profile.primaryModel,
1254
- defaultHaikuModel: profile.defaultHaikuModel,
1255
- defaultSonnetModel: profile.defaultSonnetModel,
1256
- defaultOpusModel: profile.defaultOpusModel,
1257
- ...describeMyclaudeProviderProfile({
1258
- authType: profile.authType,
1259
- baseUrl: profile.baseUrl,
1260
- mode: existing?.mode
1261
- })
1262
- };
1263
- }
1264
- function syncMyclaudeActiveProfileToSettings(profile) {
1265
- const settings = readJsonConfig(CLAVUE_SETTINGS_FILE) || {};
1266
- settings.env = settings.env || {};
1267
- clearLegacyTopLevelRuntimeSettings(settings);
1268
- delete settings.env.ANTHROPIC_API_KEY;
1269
- delete settings.env.ANTHROPIC_AUTH_TOKEN;
1270
- if (profile?.baseUrl) {
1271
- settings.env.ANTHROPIC_BASE_URL = normalizeClavueBaseUrl(profile.baseUrl);
1272
- } else {
1273
- delete settings.env.ANTHROPIC_BASE_URL;
1274
- }
1275
- overwriteModelSettings(settings, {
1276
- primaryModel: typeof profile?.primaryModel === "string" ? profile.primaryModel : typeof profile?.model === "string" ? profile.model : void 0,
1277
- haikuModel: typeof profile?.defaultHaikuModel === "string" ? profile.defaultHaikuModel : typeof profile?.fastModel === "string" ? profile.fastModel : void 0,
1278
- sonnetModel: typeof profile?.defaultSonnetModel === "string" ? profile.defaultSonnetModel : void 0,
1279
- opusModel: typeof profile?.defaultOpusModel === "string" ? profile.defaultOpusModel : void 0
1280
- }, profile ? "override" : "reset");
1281
- const primaryModel = typeof profile?.primaryModel === "string" ? profile.primaryModel.trim() : typeof profile?.model === "string" ? profile.model.trim() : "";
1282
- const subagentModel = typeof profile?.defaultSonnetModel === "string" ? profile.defaultSonnetModel.trim() : "";
1283
- const hasAdaptiveRouting = Boolean(
1284
- typeof profile?.defaultHaikuModel === "string" && profile.defaultHaikuModel.trim() || typeof profile?.defaultSonnetModel === "string" && profile.defaultSonnetModel.trim() || typeof profile?.defaultOpusModel === "string" && profile.defaultOpusModel.trim()
1285
- );
1286
- if (primaryModel && !hasAdaptiveRouting) {
1287
- settings.env.ANTHROPIC_MODEL = primaryModel;
1288
- settings.env.ANTHROPIC_CUSTOM_MODEL_OPTION = primaryModel;
1289
- settings.model = primaryModel;
1290
- } else if (primaryModel) {
1291
- settings.env.ANTHROPIC_CUSTOM_MODEL_OPTION = primaryModel;
1292
- delete settings.env.ANTHROPIC_MODEL;
1293
- delete settings.model;
1294
- } else if (profile) {
1295
- delete settings.env.ANTHROPIC_MODEL;
1296
- delete settings.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
1297
- delete settings.model;
1298
- } else {
1299
- delete settings.env.ANTHROPIC_CUSTOM_MODEL_OPTION;
1300
- delete settings.model;
1301
- }
1302
- if (subagentModel) {
1303
- settings.env.CLAUDE_CODE_SUBAGENT_MODEL = subagentModel;
1304
- } else {
1305
- delete settings.env.CLAUDE_CODE_SUBAGENT_MODEL;
1306
- }
1307
- normalizeClaudeFamilySettings(settings);
1308
- writeJsonConfig(CLAVUE_SETTINGS_FILE, settings);
1309
- }
1310
- function syncMyclaudeProviderProfilesFromClaudeConfig(configData) {
1311
- if (!configData) {
1312
- clearMyclaudeProviderProfiles();
1313
- return {
1314
- activeProfileId: "",
1315
- activeProfile: null,
1316
- profiles: []
1317
- };
1318
- }
1319
- const existingConfig = readClavueConfig();
1320
- const existingProfiles = getLegacyMyclaudeProviderProfiles(existingConfig).length > 0 ? getLegacyMyclaudeProviderProfiles(existingConfig) : getClavueProviderProfiles(existingConfig).map(toLegacyProviderProfile);
1321
- const existingById = new Map(existingProfiles.map((profile) => [String(profile.id), profile]));
1322
- const profiles = Object.entries(configData.profiles).map(([id, profile]) => toMyclaudeProviderProfile({ ...profile, id }, existingById.get(id)));
1323
- const activeProfileId = configData.currentProfileId ?? "";
1324
- const activeProfile = profiles.find((profile) => profile.id === activeProfileId) || null;
1325
- const activeClavueProfileId = setMyclaudeProviderProfiles(profiles, activeProfileId);
1326
- return {
1327
- activeProfileId: activeClavueProfileId || "",
1328
- activeProfile,
1329
- profiles
1330
- };
1331
- }
1332
- function syncMyclaudeProviderProfilesFromCurrentClaudeConfig() {
1333
- const configData = ClaudeCodeConfigManager.readConfig();
1334
- return syncMyclaudeProviderProfilesFromClaudeConfig(configData);
1335
- }
1336
- function clearMyclaudeProviderProfiles() {
1337
- const config = readClavueConfig();
1338
- let preservedActiveProfile = null;
1339
- if (config) {
1340
- const existingProfiles = getClavueProviderProfiles(config);
1341
- const removedIds = /* @__PURE__ */ new Set([
1342
- ...existingProfiles.filter(isCcjkClavueProfile).map((profile) => profile.id),
1343
- ...getLegacyMyclaudeProviderProfiles(config).map((profile) => profile.id)
1344
- ]);
1345
- const preservedProfiles = existingProfiles.filter((profile) => !removedIds.has(profile.id));
1346
- const currentActiveId = config.clavueActiveProviderProfileId || config.myclaudeActiveProviderProfileId;
1347
- const nextActiveId = preservedProfiles.some((profile) => profile.id === currentActiveId) ? currentActiveId : preservedProfiles[0]?.id;
1348
- if (preservedProfiles.length > 0) {
1349
- config.clavueProviderProfiles = preservedProfiles;
1350
- config.clavueActiveProviderProfileId = nextActiveId;
1351
- preservedActiveProfile = preservedProfiles.find((profile) => profile.id === nextActiveId) ? toLegacyProviderProfile(preservedProfiles.find((profile) => profile.id === nextActiveId)) : null;
1352
- } else {
1353
- delete config.clavueProviderProfiles;
1354
- delete config.clavueActiveProviderProfileId;
1355
- }
1356
- delete config.myclaudeProviderProfiles;
1357
- delete config.myclaudeActiveProviderProfileId;
1358
- writeClavueConfig(config);
1359
- if (removedIds.size > 0) {
1360
- const credentials = readClavueCredentialsConfig();
1361
- if (credentials.providerProfiles) {
1362
- const nextProviderProfiles = { ...credentials.providerProfiles };
1363
- for (const profileId of removedIds) {
1364
- delete nextProviderProfiles[profileId];
1365
- }
1366
- writeClavueCredentialsConfig({
1367
- ...credentials,
1368
- providerProfiles: Object.keys(nextProviderProfiles).length > 0 ? nextProviderProfiles : void 0
1369
- });
1370
- }
1371
- }
1372
- }
1373
- syncMyclaudeActiveProfileToSettings(preservedActiveProfile);
1374
- }
1375
-
1376
- const clavueConfig = {
1377
- __proto__: null,
1378
- buildMyclaudeProviderPresentation: buildMyclaudeProviderPresentation,
1379
- clearMyclaudeProviderProfiles: clearMyclaudeProviderProfiles,
1380
- describeMyclaudeProviderProfile: describeMyclaudeProviderProfile,
1381
- readClavueConfig: readClavueConfig,
1382
- setMyclaudeActiveProviderProfile: setMyclaudeActiveProviderProfile,
1383
- setMyclaudeProviderProfiles: setMyclaudeProviderProfiles,
1384
- syncClavueActiveProviderModelSelection: syncClavueActiveProviderModelSelection,
1385
- syncMyclaudeProviderProfilesFromClaudeConfig: syncMyclaudeProviderProfilesFromClaudeConfig,
1386
- syncMyclaudeProviderProfilesFromCurrentClaudeConfig: syncMyclaudeProviderProfilesFromCurrentClaudeConfig,
1387
- writeClavueConfig: writeClavueConfig
1388
- };
1389
-
1390
- export { ClaudeCodeConfigManager as C, setMyclaudeActiveProviderProfile as a, syncMyclaudeProviderProfilesFromClaudeConfig as b, setMyclaudeProviderProfiles as c, clearMyclaudeProviderProfiles as d, buildMyclaudeProviderPresentation as e, claudeCodeConfigManager as f, clavueConfig as g, syncClavueActiveProviderModelSelection as s };