ccjk 12.0.7 → 12.0.8

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 (299) hide show
  1. package/package.json +1 -1
  2. package/dist/chunks/agent-teams.mjs +0 -136
  3. package/dist/chunks/agent.mjs +0 -1439
  4. package/dist/chunks/agents.mjs +0 -3778
  5. package/dist/chunks/api-cli.mjs +0 -132
  6. package/dist/chunks/api-providers.mjs +0 -129
  7. package/dist/chunks/api.mjs +0 -112
  8. package/dist/chunks/auto-bootstrap.mjs +0 -358
  9. package/dist/chunks/auto-init.mjs +0 -7584
  10. package/dist/chunks/auto-updater.mjs +0 -410
  11. package/dist/chunks/banner.mjs +0 -188
  12. package/dist/chunks/bash.mjs +0 -187
  13. package/dist/chunks/boost.mjs +0 -397
  14. package/dist/chunks/ccjk-agents.mjs +0 -414
  15. package/dist/chunks/ccjk-all.mjs +0 -1028
  16. package/dist/chunks/ccjk-config.mjs +0 -261
  17. package/dist/chunks/ccjk-hooks.mjs +0 -1074
  18. package/dist/chunks/ccjk-mcp.mjs +0 -761
  19. package/dist/chunks/ccjk-setup.mjs +0 -763
  20. package/dist/chunks/ccjk-skills.mjs +0 -514
  21. package/dist/chunks/ccr.mjs +0 -98
  22. package/dist/chunks/ccu.mjs +0 -40
  23. package/dist/chunks/check-updates.mjs +0 -108
  24. package/dist/chunks/claude-code-config-manager.mjs +0 -750
  25. package/dist/chunks/claude-code-incremental-manager.mjs +0 -623
  26. package/dist/chunks/claude-config.mjs +0 -236
  27. package/dist/chunks/claude-wrapper.mjs +0 -85
  28. package/dist/chunks/cleanup-migration.mjs +0 -20
  29. package/dist/chunks/cli-hook.mjs +0 -2285
  30. package/dist/chunks/cloud-sync.mjs +0 -29
  31. package/dist/chunks/codex-config-switch.mjs +0 -451
  32. package/dist/chunks/codex-provider-manager.mjs +0 -236
  33. package/dist/chunks/codex-uninstaller.mjs +0 -404
  34. package/dist/chunks/codex.mjs +0 -2077
  35. package/dist/chunks/commands.mjs +0 -108
  36. package/dist/chunks/commands2.mjs +0 -413
  37. package/dist/chunks/commit.mjs +0 -138
  38. package/dist/chunks/completion.mjs +0 -515
  39. package/dist/chunks/config-consolidator.mjs +0 -172
  40. package/dist/chunks/config-switch.mjs +0 -317
  41. package/dist/chunks/config.mjs +0 -379
  42. package/dist/chunks/config2.mjs +0 -477
  43. package/dist/chunks/config3.mjs +0 -470
  44. package/dist/chunks/constants.mjs +0 -133
  45. package/dist/chunks/context-loader.mjs +0 -343
  46. package/dist/chunks/context.mjs +0 -372
  47. package/dist/chunks/convoy-manager.mjs +0 -880
  48. package/dist/chunks/dashboard.mjs +0 -476
  49. package/dist/chunks/doctor.mjs +0 -964
  50. package/dist/chunks/evolution.mjs +0 -382
  51. package/dist/chunks/features.mjs +0 -698
  52. package/dist/chunks/fish.mjs +0 -181
  53. package/dist/chunks/fs-operations.mjs +0 -192
  54. package/dist/chunks/health-alerts.mjs +0 -304
  55. package/dist/chunks/health-check.mjs +0 -532
  56. package/dist/chunks/help.mjs +0 -340
  57. package/dist/chunks/hook-installer.mjs +0 -45
  58. package/dist/chunks/index.mjs +0 -24
  59. package/dist/chunks/index10.mjs +0 -1171
  60. package/dist/chunks/index11.mjs +0 -1008
  61. package/dist/chunks/index12.mjs +0 -193
  62. package/dist/chunks/index13.mjs +0 -218
  63. package/dist/chunks/index14.mjs +0 -663
  64. package/dist/chunks/index2.mjs +0 -19
  65. package/dist/chunks/index3.mjs +0 -19092
  66. package/dist/chunks/index4.mjs +0 -8
  67. package/dist/chunks/index5.mjs +0 -7600
  68. package/dist/chunks/index6.mjs +0 -171
  69. package/dist/chunks/index7.mjs +0 -3583
  70. package/dist/chunks/index8.mjs +0 -19
  71. package/dist/chunks/index9.mjs +0 -616
  72. package/dist/chunks/init.mjs +0 -1606
  73. package/dist/chunks/installer.mjs +0 -690
  74. package/dist/chunks/installer2.mjs +0 -179
  75. package/dist/chunks/interview.mjs +0 -2927
  76. package/dist/chunks/json-config.mjs +0 -60
  77. package/dist/chunks/linux.mjs +0 -3863
  78. package/dist/chunks/macos.mjs +0 -69
  79. package/dist/chunks/main.mjs +0 -635
  80. package/dist/chunks/manager.mjs +0 -1048
  81. package/dist/chunks/marketplace.mjs +0 -949
  82. package/dist/chunks/mcp-cli.mjs +0 -204
  83. package/dist/chunks/mcp-performance.mjs +0 -187
  84. package/dist/chunks/mcp.mjs +0 -1231
  85. package/dist/chunks/menu.mjs +0 -652
  86. package/dist/chunks/metrics-display.mjs +0 -153
  87. package/dist/chunks/migrator.mjs +0 -178
  88. package/dist/chunks/monitor.mjs +0 -1856
  89. package/dist/chunks/notification.mjs +0 -1864
  90. package/dist/chunks/onboarding.mjs +0 -385
  91. package/dist/chunks/package.mjs +0 -3
  92. package/dist/chunks/paradigm.mjs +0 -74
  93. package/dist/chunks/permission-manager.mjs +0 -132
  94. package/dist/chunks/permissions.mjs +0 -265
  95. package/dist/chunks/persistence-manager.mjs +0 -794
  96. package/dist/chunks/persistence.mjs +0 -667
  97. package/dist/chunks/platform.mjs +0 -391
  98. package/dist/chunks/plugin.mjs +0 -1936
  99. package/dist/chunks/powershell.mjs +0 -213
  100. package/dist/chunks/prompts.mjs +0 -241
  101. package/dist/chunks/providers.mjs +0 -260
  102. package/dist/chunks/quick-actions.mjs +0 -320
  103. package/dist/chunks/quick-provider.mjs +0 -682
  104. package/dist/chunks/quick-setup.mjs +0 -412
  105. package/dist/chunks/remote.mjs +0 -497
  106. package/dist/chunks/session.mjs +0 -878
  107. package/dist/chunks/sessions.mjs +0 -106
  108. package/dist/chunks/silent-updater.mjs +0 -396
  109. package/dist/chunks/simple-config.mjs +0 -98
  110. package/dist/chunks/skill.mjs +0 -117
  111. package/dist/chunks/skill2.mjs +0 -9003
  112. package/dist/chunks/skills-sync.mjs +0 -6460
  113. package/dist/chunks/skills.mjs +0 -567
  114. package/dist/chunks/slash-commands.mjs +0 -207
  115. package/dist/chunks/smart-defaults.mjs +0 -412
  116. package/dist/chunks/smart-guide.mjs +0 -194
  117. package/dist/chunks/startup.mjs +0 -487
  118. package/dist/chunks/stats.mjs +0 -410
  119. package/dist/chunks/status.mjs +0 -289
  120. package/dist/chunks/team.mjs +0 -63
  121. package/dist/chunks/thinking.mjs +0 -626
  122. package/dist/chunks/trace.mjs +0 -57
  123. package/dist/chunks/uninstall.mjs +0 -849
  124. package/dist/chunks/update.mjs +0 -167
  125. package/dist/chunks/upgrade-manager.mjs +0 -204
  126. package/dist/chunks/version-checker.mjs +0 -881
  127. package/dist/chunks/vim.mjs +0 -903
  128. package/dist/chunks/windows.mjs +0 -14
  129. package/dist/chunks/workflows.mjs +0 -633
  130. package/dist/chunks/wsl.mjs +0 -129
  131. package/dist/chunks/zero-config.mjs +0 -374
  132. package/dist/chunks/zsh.mjs +0 -182
  133. package/dist/cli.d.mts +0 -1
  134. package/dist/cli.d.ts +0 -1
  135. package/dist/cli.mjs +0 -2199
  136. package/dist/i18n/locales/en/agent-teams.json +0 -18
  137. package/dist/i18n/locales/en/agentBrowser.json +0 -79
  138. package/dist/i18n/locales/en/agents.json +0 -135
  139. package/dist/i18n/locales/en/api.json +0 -63
  140. package/dist/i18n/locales/en/ccjk-agents.json +0 -33
  141. package/dist/i18n/locales/en/ccjk-all.json +0 -23
  142. package/dist/i18n/locales/en/ccjk-skills.json +0 -22
  143. package/dist/i18n/locales/en/ccjk.json +0 -276
  144. package/dist/i18n/locales/en/ccr.json +0 -65
  145. package/dist/i18n/locales/en/claude-md.json +0 -73
  146. package/dist/i18n/locales/en/cli.json +0 -152
  147. package/dist/i18n/locales/en/cloud-setup.json +0 -31
  148. package/dist/i18n/locales/en/cloud-sync.json +0 -147
  149. package/dist/i18n/locales/en/cloud.json +0 -40
  150. package/dist/i18n/locales/en/cloudPlugins.json +0 -118
  151. package/dist/i18n/locales/en/codex.json +0 -127
  152. package/dist/i18n/locales/en/cometix.json +0 -29
  153. package/dist/i18n/locales/en/common.json +0 -68
  154. package/dist/i18n/locales/en/config.json +0 -108
  155. package/dist/i18n/locales/en/configuration.json +0 -226
  156. package/dist/i18n/locales/en/context.json +0 -85
  157. package/dist/i18n/locales/en/dashboard.json +0 -78
  158. package/dist/i18n/locales/en/errors.json +0 -26
  159. package/dist/i18n/locales/en/evolution.json +0 -54
  160. package/dist/i18n/locales/en/hooks.json +0 -74
  161. package/dist/i18n/locales/en/hooksSync.json +0 -133
  162. package/dist/i18n/locales/en/installation.json +0 -83
  163. package/dist/i18n/locales/en/interview.json +0 -104
  164. package/dist/i18n/locales/en/language.json +0 -19
  165. package/dist/i18n/locales/en/lsp.json +0 -78
  166. package/dist/i18n/locales/en/marketplace.json +0 -116
  167. package/dist/i18n/locales/en/mcp.json +0 -178
  168. package/dist/i18n/locales/en/memory.json +0 -92
  169. package/dist/i18n/locales/en/menu.json +0 -143
  170. package/dist/i18n/locales/en/multi-config.json +0 -79
  171. package/dist/i18n/locales/en/notification.json +0 -307
  172. package/dist/i18n/locales/en/permissions.json +0 -95
  173. package/dist/i18n/locales/en/persistence.json +0 -127
  174. package/dist/i18n/locales/en/plugins.json +0 -146
  175. package/dist/i18n/locales/en/quick-actions.json +0 -78
  176. package/dist/i18n/locales/en/registry.json +0 -54
  177. package/dist/i18n/locales/en/remote.json +0 -93
  178. package/dist/i18n/locales/en/sandbox.json +0 -44
  179. package/dist/i18n/locales/en/setup.json +0 -44
  180. package/dist/i18n/locales/en/shencha.json +0 -14
  181. package/dist/i18n/locales/en/skills.json +0 -100
  182. package/dist/i18n/locales/en/skillsSync.json +0 -74
  183. package/dist/i18n/locales/en/smartGuide.json +0 -49
  184. package/dist/i18n/locales/en/stats.json +0 -20
  185. package/dist/i18n/locales/en/subagent.json +0 -69
  186. package/dist/i18n/locales/en/superpowers.json +0 -117
  187. package/dist/i18n/locales/en/team.json +0 -7
  188. package/dist/i18n/locales/en/thinking.json +0 -65
  189. package/dist/i18n/locales/en/tools.json +0 -42
  190. package/dist/i18n/locales/en/uninstall.json +0 -56
  191. package/dist/i18n/locales/en/updater.json +0 -29
  192. package/dist/i18n/locales/en/vim.json +0 -169
  193. package/dist/i18n/locales/en/workflow.json +0 -55
  194. package/dist/i18n/locales/en/workspace.json +0 -108
  195. package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
  196. package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -79
  197. package/dist/i18n/locales/zh-CN/agents.json +0 -135
  198. package/dist/i18n/locales/zh-CN/api.json +0 -63
  199. package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
  200. package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
  201. package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
  202. package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
  203. package/dist/i18n/locales/zh-CN/ccr.json +0 -65
  204. package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
  205. package/dist/i18n/locales/zh-CN/cli.json +0 -152
  206. package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
  207. package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
  208. package/dist/i18n/locales/zh-CN/cloud.json +0 -40
  209. package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
  210. package/dist/i18n/locales/zh-CN/codex.json +0 -127
  211. package/dist/i18n/locales/zh-CN/cometix.json +0 -29
  212. package/dist/i18n/locales/zh-CN/common.json +0 -68
  213. package/dist/i18n/locales/zh-CN/config.json +0 -108
  214. package/dist/i18n/locales/zh-CN/configuration.json +0 -224
  215. package/dist/i18n/locales/zh-CN/context.json +0 -85
  216. package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
  217. package/dist/i18n/locales/zh-CN/errors.json +0 -26
  218. package/dist/i18n/locales/zh-CN/evolution.json +0 -54
  219. package/dist/i18n/locales/zh-CN/hooks.json +0 -74
  220. package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
  221. package/dist/i18n/locales/zh-CN/installation.json +0 -83
  222. package/dist/i18n/locales/zh-CN/interview.json +0 -104
  223. package/dist/i18n/locales/zh-CN/language.json +0 -19
  224. package/dist/i18n/locales/zh-CN/lsp.json +0 -78
  225. package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
  226. package/dist/i18n/locales/zh-CN/mcp.json +0 -178
  227. package/dist/i18n/locales/zh-CN/memory.json +0 -92
  228. package/dist/i18n/locales/zh-CN/menu.json +0 -143
  229. package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
  230. package/dist/i18n/locales/zh-CN/notification.json +0 -307
  231. package/dist/i18n/locales/zh-CN/permissions.json +0 -95
  232. package/dist/i18n/locales/zh-CN/persistence.json +0 -127
  233. package/dist/i18n/locales/zh-CN/plugins.json +0 -146
  234. package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
  235. package/dist/i18n/locales/zh-CN/registry.json +0 -54
  236. package/dist/i18n/locales/zh-CN/remote.json +0 -93
  237. package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
  238. package/dist/i18n/locales/zh-CN/setup.json +0 -44
  239. package/dist/i18n/locales/zh-CN/shencha.json +0 -14
  240. package/dist/i18n/locales/zh-CN/skills.json +0 -100
  241. package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
  242. package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
  243. package/dist/i18n/locales/zh-CN/stats.json +0 -20
  244. package/dist/i18n/locales/zh-CN/subagent.json +0 -69
  245. package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
  246. package/dist/i18n/locales/zh-CN/team.json +0 -7
  247. package/dist/i18n/locales/zh-CN/thinking.json +0 -65
  248. package/dist/i18n/locales/zh-CN/tools.json +0 -42
  249. package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
  250. package/dist/i18n/locales/zh-CN/updater.json +0 -29
  251. package/dist/i18n/locales/zh-CN/vim.json +0 -169
  252. package/dist/i18n/locales/zh-CN/workflow.json +0 -55
  253. package/dist/i18n/locales/zh-CN/workspace.json +0 -108
  254. package/dist/index.d.mts +0 -5295
  255. package/dist/index.d.ts +0 -5295
  256. package/dist/index.mjs +0 -4941
  257. package/dist/shared/ccjk.B364Fu0N.mjs +0 -1819
  258. package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
  259. package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
  260. package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
  261. package/dist/shared/ccjk.BFxsJM0k.mjs +0 -599
  262. package/dist/shared/ccjk.BIxuVL3_.mjs +0 -25
  263. package/dist/shared/ccjk.BRZ9ww8S.mjs +0 -142
  264. package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
  265. package/dist/shared/ccjk.BrPUmTqm.mjs +0 -266
  266. package/dist/shared/ccjk.BtB1e5jm.mjs +0 -171
  267. package/dist/shared/ccjk.BwfbSKN2.mjs +0 -1051
  268. package/dist/shared/ccjk.BxSmJ8B7.mjs +0 -243
  269. package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
  270. package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
  271. package/dist/shared/ccjk.CL4Yat0G.mjs +0 -303
  272. package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
  273. package/dist/shared/ccjk.CePkJq2S.mjs +0 -223
  274. package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
  275. package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
  276. package/dist/shared/ccjk.Cjj8SVrn.mjs +0 -54
  277. package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
  278. package/dist/shared/ccjk.D5MFQT7w.mjs +0 -400
  279. package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
  280. package/dist/shared/ccjk.D8ZLYSZZ.mjs +0 -299
  281. package/dist/shared/ccjk.DG_o24cZ.mjs +0 -88
  282. package/dist/shared/ccjk.DLLw-h4Y.mjs +0 -460
  283. package/dist/shared/ccjk.DOwtZMk8.mjs +0 -4019
  284. package/dist/shared/ccjk.DS7UESmF.mjs +0 -2451
  285. package/dist/shared/ccjk.DTdjs-qK.mjs +0 -1447
  286. package/dist/shared/ccjk.DXRAZcix.mjs +0 -66
  287. package/dist/shared/ccjk.DsYaCCx4.mjs +0 -317
  288. package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
  289. package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
  290. package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
  291. package/dist/shared/ccjk.SPoXMvZD.mjs +0 -1242
  292. package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
  293. package/dist/shared/ccjk.UIvifqNE.mjs +0 -1486
  294. package/dist/shared/ccjk._dESH4Rk.mjs +0 -111
  295. package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
  296. package/dist/shared/ccjk.c-ETfBZ_.mjs +0 -617
  297. package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
  298. package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
  299. package/dist/shared/ccjk.waa2ikKJ.mjs +0 -351
@@ -1,108 +0,0 @@
1
- import { exec } from 'node:child_process';
2
- import { promisify } from 'node:util';
3
- import a from './index2.mjs';
4
- import { ensureI18nInitialized, i18n } from './index5.mjs';
5
- import '../shared/ccjk.BAGoDD49.mjs';
6
- import 'node:fs';
7
- import 'node:process';
8
- import 'node:url';
9
- import '../shared/ccjk.bQ7Dh1g4.mjs';
10
-
11
- const execAsync = promisify(exec);
12
- async function runCcrUi(apiKey) {
13
- ensureI18nInitialized();
14
- console.log(a.green(`
15
- \u{1F5A5}\uFE0F ${i18n.t("ccr:startingCcrUi")}`));
16
- if (apiKey) {
17
- console.log(a.bold.green(`
18
- \u{1F511} ${i18n.t("ccr:ccrUiApiKey") || "CCR UI API Key"}: ${apiKey}`));
19
- console.log(a.gray(` ${i18n.t("ccr:ccrUiApiKeyHint") || "Use this API key to login to CCR UI"}
20
- `));
21
- }
22
- try {
23
- const { stdout, stderr } = await execAsync("ccr ui");
24
- if (stdout)
25
- console.log(stdout);
26
- if (stderr)
27
- console.error(a.yellow(stderr));
28
- console.log(a.green(`\u2714 ${i18n.t("ccr:ccrUiStarted")}`));
29
- } catch (error) {
30
- console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
31
- throw error;
32
- }
33
- }
34
- async function runCcrStatus() {
35
- ensureI18nInitialized();
36
- console.log(a.green(`
37
- \u{1F4CA} ${i18n.t("ccr:checkingCcrStatus")}`));
38
- try {
39
- const { stdout, stderr } = await execAsync("ccr status");
40
- if (stdout) {
41
- console.log(`
42
- ${a.bold(i18n.t("ccr:ccrStatusTitle"))}`);
43
- console.log(stdout);
44
- }
45
- if (stderr)
46
- console.error(a.yellow(stderr));
47
- } catch (error) {
48
- console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
49
- throw error;
50
- }
51
- }
52
- async function runCcrRestart() {
53
- ensureI18nInitialized();
54
- console.log(a.green(`
55
- \u{1F504} ${i18n.t("ccr:restartingCcr")}`));
56
- try {
57
- const { stdout, stderr } = await execAsync("ccr restart");
58
- if (stdout)
59
- console.log(stdout);
60
- if (stderr)
61
- console.error(a.yellow(stderr));
62
- console.log(a.green(`\u2714 ${i18n.t("ccr:ccrRestarted")}`));
63
- } catch (error) {
64
- console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
65
- throw error;
66
- }
67
- }
68
- async function runCcrStart() {
69
- ensureI18nInitialized();
70
- console.log(a.green(`
71
- \u25B6\uFE0F ${i18n.t("ccr:startingCcr")}`));
72
- try {
73
- const { stdout, stderr } = await execAsync("ccr start");
74
- if (stdout)
75
- console.log(stdout);
76
- if (stderr)
77
- console.error(a.yellow(stderr));
78
- console.log(a.green(`\u2714 ${i18n.t("ccr:ccrStarted")}`));
79
- } catch (error) {
80
- if (error.stdout && error.stdout.includes("Loaded JSON config from:")) {
81
- console.log(error.stdout);
82
- if (error.stderr)
83
- console.error(a.yellow(error.stderr));
84
- console.log(a.green(`\u2714 ${i18n.t("ccr:ccrStarted")}`));
85
- } else {
86
- console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
87
- throw error;
88
- }
89
- }
90
- }
91
- async function runCcrStop() {
92
- ensureI18nInitialized();
93
- console.log(a.green(`
94
- \u23F9\uFE0F ${i18n.t("ccr:stoppingCcr")}`));
95
- try {
96
- const { stdout, stderr } = await execAsync("ccr stop");
97
- if (stdout)
98
- console.log(stdout);
99
- if (stderr)
100
- console.error(a.yellow(stderr));
101
- console.log(a.green(`\u2714 ${i18n.t("ccr:ccrStopped")}`));
102
- } catch (error) {
103
- console.error(a.red(`\u2716 ${i18n.t("ccr:ccrCommandFailed")}: ${error instanceof Error ? error.message : String(error)}`));
104
- throw error;
105
- }
106
- }
107
-
108
- export { runCcrRestart, runCcrStart, runCcrStatus, runCcrStop, runCcrUi };
@@ -1,413 +0,0 @@
1
- import process__default from 'node:process';
2
- import a from './index2.mjs';
3
- import { checkAgentBrowserInstalled, getInstallPath } from './installer2.mjs';
4
- import '../shared/ccjk.BAGoDD49.mjs';
5
- import 'node:fs';
6
- import 'node:os';
7
- import 'node:path';
8
-
9
- const { cyan: _cyan, yellow: yellow$1, gray: _gray, green: green$1, red: _red, blue: _blue$1, bold: _bold, dim: _dim$1 } = a;
10
- class AgentBrowserSession {
11
- options;
12
- isRunning = false;
13
- sessionId = null;
14
- constructor(options = {}) {
15
- this.options = {
16
- headless: true,
17
- verbose: false,
18
- timeout: 3e4,
19
- browser: "chromium",
20
- ...options
21
- };
22
- }
23
- /**
24
- * 启动浏览器会话
25
- */
26
- async start() {
27
- if (this.isRunning) {
28
- if (this.options.verbose) {
29
- console.log(`${yellow$1("!")} Session already running`);
30
- }
31
- return;
32
- }
33
- try {
34
- const { execSync } = await import('node:child_process');
35
- this.sessionId = `session-${Date.now()}`;
36
- const headlessFlag = this.options.headless ? "" : "--headed";
37
- execSync(`agent-browser start ${headlessFlag} 2>/dev/null || true`, {
38
- encoding: "utf-8",
39
- stdio: "pipe"
40
- });
41
- this.isRunning = true;
42
- if (this.options.verbose) {
43
- console.log(`${green$1("\u2713")} Browser session started: ${this.sessionId}`);
44
- }
45
- } catch (error) {
46
- this.isRunning = false;
47
- throw new Error(`Failed to start browser session: ${error instanceof Error ? error.message : "Unknown error"}`);
48
- }
49
- }
50
- /**
51
- * 导航到 URL
52
- */
53
- async navigate(url) {
54
- this.ensureRunning();
55
- try {
56
- const { execSync } = await import('node:child_process');
57
- const fullUrl = url.startsWith("http") ? url : `https://${url}`;
58
- execSync(`agent-browser open "${fullUrl}"`, {
59
- encoding: "utf-8",
60
- stdio: this.options.verbose ? "inherit" : "pipe",
61
- timeout: this.options.timeout
62
- });
63
- if (this.options.verbose) {
64
- console.log(`${green$1("\u2713")} Navigated to: ${fullUrl}`);
65
- }
66
- } catch (error) {
67
- throw new Error(`Failed to navigate: ${error instanceof Error ? error.message : "Unknown error"}`);
68
- }
69
- }
70
- /**
71
- * 获取页面快照
72
- */
73
- async snapshot(options = {}) {
74
- this.ensureRunning();
75
- try {
76
- const { execSync } = await import('node:child_process');
77
- const flags = [];
78
- if (options.interactive)
79
- flags.push("-i");
80
- if (options.compact)
81
- flags.push("-c");
82
- if (options.depth)
83
- flags.push(`-d ${options.depth}`);
84
- if (options.json)
85
- flags.push("--json");
86
- const result = execSync(`agent-browser snapshot ${flags.join(" ")}`, {
87
- encoding: "utf-8",
88
- timeout: this.options.timeout
89
- });
90
- return result.trim();
91
- } catch (error) {
92
- throw new Error(`Failed to get snapshot: ${error instanceof Error ? error.message : "Unknown error"}`);
93
- }
94
- }
95
- /**
96
- * 点击元素
97
- */
98
- async click(ref) {
99
- this.ensureRunning();
100
- try {
101
- const { execSync } = await import('node:child_process');
102
- const refId = ref.startsWith("@") ? ref : `@${ref}`;
103
- execSync(`agent-browser click ${refId}`, {
104
- encoding: "utf-8",
105
- stdio: this.options.verbose ? "inherit" : "pipe",
106
- timeout: this.options.timeout
107
- });
108
- if (this.options.verbose) {
109
- console.log(`${green$1("\u2713")} Clicked: ${refId}`);
110
- }
111
- } catch (error) {
112
- throw new Error(`Failed to click: ${error instanceof Error ? error.message : "Unknown error"}`);
113
- }
114
- }
115
- /**
116
- * 填充输入框
117
- */
118
- async fill(ref, text) {
119
- this.ensureRunning();
120
- try {
121
- const { execSync } = await import('node:child_process');
122
- const refId = ref.startsWith("@") ? ref : `@${ref}`;
123
- execSync(`agent-browser fill ${refId} "${text.replace(/"/g, '\\"')}"`, {
124
- encoding: "utf-8",
125
- stdio: this.options.verbose ? "inherit" : "pipe",
126
- timeout: this.options.timeout
127
- });
128
- if (this.options.verbose) {
129
- console.log(`${green$1("\u2713")} Filled ${refId}: ${text}`);
130
- }
131
- } catch (error) {
132
- throw new Error(`Failed to fill: ${error instanceof Error ? error.message : "Unknown error"}`);
133
- }
134
- }
135
- /**
136
- * 获取元素文本
137
- */
138
- async getText(ref) {
139
- this.ensureRunning();
140
- try {
141
- const { execSync } = await import('node:child_process');
142
- const refId = ref.startsWith("@") ? ref : `@${ref}`;
143
- const result = execSync(`agent-browser get text ${refId}`, {
144
- encoding: "utf-8",
145
- timeout: this.options.timeout
146
- });
147
- return result.trim();
148
- } catch (error) {
149
- throw new Error(`Failed to get text: ${error instanceof Error ? error.message : "Unknown error"}`);
150
- }
151
- }
152
- /**
153
- * 截图
154
- */
155
- async screenshot(path, fullPage = false) {
156
- this.ensureRunning();
157
- try {
158
- const { execSync } = await import('node:child_process');
159
- const flags = [];
160
- if (fullPage)
161
- flags.push("--full");
162
- if (path)
163
- flags.push(path);
164
- const result = execSync(`agent-browser screenshot ${flags.join(" ")}`, {
165
- encoding: "utf-8",
166
- timeout: this.options.timeout
167
- });
168
- if (this.options.verbose) {
169
- console.log(`${green$1("\u2713")} Screenshot saved: ${path || "screenshot.png"}`);
170
- }
171
- return result.trim();
172
- } catch (error) {
173
- throw new Error(`Failed to take screenshot: ${error instanceof Error ? error.message : "Unknown error"}`);
174
- }
175
- }
176
- /**
177
- * 等待
178
- */
179
- async wait(condition) {
180
- this.ensureRunning();
181
- try {
182
- const { execSync } = await import('node:child_process');
183
- let cmd;
184
- if (typeof condition === "number") {
185
- cmd = `agent-browser wait ${condition}`;
186
- } else if (condition.startsWith("@")) {
187
- cmd = `agent-browser wait ${condition}`;
188
- } else {
189
- cmd = `agent-browser wait --text "${condition}"`;
190
- }
191
- execSync(cmd, {
192
- encoding: "utf-8",
193
- stdio: this.options.verbose ? "inherit" : "pipe",
194
- timeout: this.options.timeout
195
- });
196
- } catch (error) {
197
- throw new Error(`Failed to wait: ${error instanceof Error ? error.message : "Unknown error"}`);
198
- }
199
- }
200
- /**
201
- * 关闭会话
202
- */
203
- async close() {
204
- if (!this.isRunning) {
205
- return;
206
- }
207
- try {
208
- const { execSync } = await import('node:child_process');
209
- execSync("agent-browser close 2>/dev/null || true", {
210
- encoding: "utf-8",
211
- stdio: "pipe"
212
- });
213
- this.isRunning = false;
214
- this.sessionId = null;
215
- if (this.options.verbose) {
216
- console.log(`${green$1("\u2713")} Browser session closed`);
217
- }
218
- } catch {
219
- this.isRunning = false;
220
- this.sessionId = null;
221
- }
222
- }
223
- /**
224
- * 获取会话状态
225
- */
226
- getStatus() {
227
- return {
228
- running: this.isRunning,
229
- sessionId: this.sessionId
230
- };
231
- }
232
- /**
233
- * 确保会话正在运行
234
- */
235
- ensureRunning() {
236
- if (!this.isRunning) {
237
- throw new Error("Browser session is not running. Call start() first.");
238
- }
239
- }
240
- }
241
-
242
- const { cyan, yellow, gray, green, red, blue: _blue, bold, dim: _dim } = a;
243
- function agentBrowserHelp(_options) {
244
- console.log(`
245
- ${bold(cyan("Agent Browser"))} - ${gray("Zero-config browser automation for AI agents")}
246
-
247
- ${yellow("Usage:")}
248
- ccjk browser <action> [options]
249
- ccjk ab <action> [options]
250
-
251
- ${yellow("Actions:")}
252
- ${cyan("install")} Install Agent Browser (Rust CLI + Playwright)
253
- ${cyan("uninstall")} Remove Agent Browser
254
- ${cyan("status")} Check installation status
255
- ${cyan("start")} Start a browser session
256
- ${cyan("stop")} Stop current browser session
257
- ${cyan("config")} Configure browser settings
258
-
259
- ${yellow("Examples:")}
260
- ${gray("# Install Agent Browser")}
261
- ccjk browser install
262
-
263
- ${gray("# Check status")}
264
- ccjk browser status
265
-
266
- ${gray("# Start a session with URL")}
267
- ccjk browser start https://example.com
268
-
269
- ${yellow("Quick Start:")}
270
- ${gray("After installation, use these commands directly:")}
271
- agent-browser open <url> ${gray("# Navigate to URL")}
272
- agent-browser snapshot -i ${gray("# Get interactive elements")}
273
- agent-browser click @e1 ${gray("# Click by ref")}
274
- agent-browser fill @e2 "text" ${gray("# Fill input")}
275
- agent-browser screenshot ${gray("# Take screenshot")}
276
- agent-browser close ${gray("# Close browser")}
277
-
278
- ${yellow("Documentation:")}
279
- Run ${cyan("/browser")} in Claude Code for full skill documentation
280
- `);
281
- }
282
- async function agentBrowserStatus(options) {
283
- console.log(`
284
- ${bold(cyan("Agent Browser Status"))}
285
- `);
286
- const installed = await checkAgentBrowserInstalled();
287
- const installPath = getInstallPath();
288
- if (installed) {
289
- console.log(` ${green("\u2713")} Agent Browser is ${green("installed")}`);
290
- console.log(` ${gray("Path:")} ${installPath}`);
291
- try {
292
- const { execSync } = await import('node:child_process');
293
- const version = execSync('agent-browser --version 2>/dev/null || echo "unknown"', {
294
- encoding: "utf-8"
295
- }).trim();
296
- console.log(` ${gray("Version:")} ${version}`);
297
- } catch {
298
- console.log(` ${gray("Version:")} ${yellow("unknown")}`);
299
- }
300
- try {
301
- const { execSync } = await import('node:child_process');
302
- execSync("npx playwright --version 2>/dev/null", { encoding: "utf-8" });
303
- console.log(` ${green("\u2713")} Playwright browsers available`);
304
- } catch {
305
- console.log(` ${yellow("!")} Playwright browsers may need installation`);
306
- console.log(` ${gray("Run:")} npx playwright install chromium`);
307
- }
308
- } else {
309
- console.log(` ${red("\u2717")} Agent Browser is ${red("not installed")}`);
310
- console.log(`
311
- ${gray("To install, run:")}`);
312
- console.log(` ${cyan("ccjk browser install")}`);
313
- }
314
- if (options.verbose) {
315
- console.log(`
316
- ${gray("Debug Info:")}`);
317
- console.log(` ${gray("Install path:")} ${installPath}`);
318
- console.log(` ${gray("Platform:")} ${process__default.platform}`);
319
- console.log(` ${gray("Arch:")} ${process__default.arch}`);
320
- }
321
- console.log();
322
- }
323
- async function startBrowserSession(url, options = {}) {
324
- const installed = await checkAgentBrowserInstalled();
325
- if (!installed) {
326
- console.log(`
327
- ${red("\u2717")} Agent Browser is not installed`);
328
- console.log(` ${gray("Run:")} ${cyan("ccjk browser install")} ${gray("first")}
329
- `);
330
- return;
331
- }
332
- console.log(`
333
- ${cyan("Starting browser session...")}
334
- `);
335
- try {
336
- const session = new AgentBrowserSession({
337
- headless: true,
338
- verbose: options.verbose
339
- });
340
- await session.start();
341
- if (url) {
342
- console.log(`${gray("Navigating to:")} ${url}`);
343
- await session.navigate(url);
344
- }
345
- console.log(`
346
- ${green("\u2713")} Browser session started`);
347
- console.log(`
348
- ${yellow("Available commands:")}`);
349
- console.log(` agent-browser snapshot -i ${gray("# Get interactive elements")}`);
350
- console.log(` agent-browser click @e1 ${gray("# Click element")}`);
351
- console.log(` agent-browser close ${gray("# Close session")}`);
352
- console.log();
353
- } catch (error) {
354
- console.error(`
355
- ${red("\u2717")} Failed to start browser session`);
356
- if (options.verbose && error instanceof Error) {
357
- console.error(` ${gray("Error:")} ${error.message}`);
358
- }
359
- console.log(`
360
- ${gray("Try running:")} ${cyan("ccjk browser install")} ${gray("to reinstall")}
361
- `);
362
- }
363
- }
364
- async function stopBrowserSession(options = {}) {
365
- console.log(`
366
- ${cyan("Stopping browser session...")}
367
- `);
368
- try {
369
- const { execSync } = await import('node:child_process');
370
- execSync("agent-browser close 2>/dev/null || true", { encoding: "utf-8" });
371
- console.log(`${green("\u2713")} Browser session stopped
372
- `);
373
- } catch (error) {
374
- if (options.verbose && error instanceof Error) {
375
- console.log(`${yellow("!")} No active session found or already closed`);
376
- console.log(` ${gray("Error:")} ${error.message}`);
377
- } else {
378
- console.log(`${yellow("!")} No active session found
379
- `);
380
- }
381
- }
382
- }
383
- async function configureBrowser(options = {}) {
384
- console.log(`
385
- ${bold(cyan("Agent Browser Configuration"))}
386
- `);
387
- const installed = await checkAgentBrowserInstalled();
388
- if (!installed) {
389
- console.log(`${red("\u2717")} Agent Browser is not installed`);
390
- console.log(` ${gray("Run:")} ${cyan("ccjk browser install")} ${gray("first")}
391
- `);
392
- return;
393
- }
394
- console.log(`${yellow("Current Settings:")}`);
395
- console.log(` ${gray("Default browser:")} chromium`);
396
- console.log(` ${gray("Headless mode:")} enabled`);
397
- console.log(` ${gray("Timeout:")} 30000ms`);
398
- console.log(`
399
- ${yellow("Configuration Options:")}`);
400
- console.log(` ${gray("Environment variables:")}`);
401
- console.log(` AGENT_BROWSER_HEADLESS=false ${gray("# Show browser window")}`);
402
- console.log(` AGENT_BROWSER_TIMEOUT=60000 ${gray("# Set timeout in ms")}`);
403
- console.log(` AGENT_BROWSER_BROWSER=firefox ${gray("# Use Firefox")}`);
404
- if (options.verbose) {
405
- console.log(`
406
- ${gray("Advanced:")}`);
407
- console.log(` ${gray("Config file:")} ~/.agent-browser/config.json`);
408
- console.log(` ${gray("Session dir:")} ~/.agent-browser/sessions/`);
409
- }
410
- console.log();
411
- }
412
-
413
- export { agentBrowserHelp, agentBrowserStatus, configureBrowser, startBrowserSession, stopBrowserSession };
@@ -1,138 +0,0 @@
1
- import a from './index2.mjs';
2
- import { i as inquirer } from './index3.mjs';
3
- import { exec as q } from './main.mjs';
4
- import '../shared/ccjk.BAGoDD49.mjs';
5
- import 'node:readline';
6
- import 'stream';
7
- import 'node:tty';
8
- import 'node:process';
9
- import 'node:async_hooks';
10
- import '../shared/ccjk.Cjgrln_h.mjs';
11
- import 'node:util';
12
- import 'tty';
13
- import 'fs';
14
- import 'child_process';
15
- import 'node:path';
16
- import 'node:os';
17
- import 'node:crypto';
18
- import 'buffer';
19
- import 'string_decoder';
20
- import 'module';
21
- import 'node:child_process';
22
- import 'node:stream';
23
-
24
- async function checkGitRepo() {
25
- try {
26
- await q("git", ["rev-parse", "--git-dir"]);
27
- return true;
28
- } catch {
29
- return false;
30
- }
31
- }
32
- async function getGitStatus() {
33
- const isRepo = await checkGitRepo();
34
- if (!isRepo)
35
- return { isRepo: false, hasChanges: false, staged: [], unstaged: [], untracked: [] };
36
- const { stdout } = await q("git", ["status", "--porcelain"]);
37
- const lines = stdout.trim().split("\n").filter(Boolean);
38
- const staged = [];
39
- const unstaged = [];
40
- const untracked = [];
41
- for (const line of lines) {
42
- const [s1, s2] = line.substring(0, 2);
43
- const file = line.substring(3);
44
- if (s1 !== " " && s1 !== "?")
45
- staged.push(file);
46
- if (s2 !== " ")
47
- unstaged.push(file);
48
- if (line.startsWith("??"))
49
- untracked.push(file);
50
- }
51
- return {
52
- isRepo: true,
53
- hasChanges: staged.length + unstaged.length + untracked.length > 0,
54
- staged,
55
- unstaged,
56
- untracked
57
- };
58
- }
59
- async function generateCommitMessage(files) {
60
- if (files.length === 0)
61
- return "chore: update files";
62
- const { stdout: diff } = await q("git", ["diff", "--cached", "--stat"]);
63
- const hasTest = files.some((f) => f.includes("test") || f.includes("spec"));
64
- const hasDocs = files.some((f) => f.endsWith(".md"));
65
- const hasConfig = files.some((f) => f.endsWith(".json") || f.endsWith(".yaml"));
66
- const hasTs = files.some((f) => f.endsWith(".ts"));
67
- const type = hasTest ? "test" : hasDocs ? "docs" : hasConfig ? "config" : hasTs ? "feat" : "chore";
68
- const scope = files.length === 1 ? files[0].split("/")[0] : void 0;
69
- const fileList = files.length <= 3 ? files.join(", ") : `${files.length} files`;
70
- const message = scope ? `${type}(${scope}): update ${fileList}` : `${type}: update ${fileList}`;
71
- return `${message}
72
-
73
- ${diff.trim()}`;
74
- }
75
- async function stageAllChanges() {
76
- await q("git", ["add", "-A"]);
77
- }
78
- async function commitChanges(message) {
79
- await q("git", ["commit", "-m", message]);
80
- }
81
-
82
- async function commit(options = {}) {
83
- if (!await checkGitRepo()) {
84
- console.log(a.red("\u2717 Not a git repository"));
85
- return;
86
- }
87
- const status = await getGitStatus();
88
- if (!status.hasChanges) {
89
- console.log(a.yellow("No changes to commit"));
90
- return;
91
- }
92
- console.log(a.green("\n\u{1F4DD} Changes detected:"));
93
- if (status.staged.length > 0) {
94
- console.log(a.green(` Staged: ${status.staged.length} files`));
95
- status.staged.forEach((f) => console.log(a.gray(` ${f}`)));
96
- }
97
- if (status.unstaged.length > 0)
98
- console.log(a.yellow(` Unstaged: ${status.unstaged.length} files`));
99
- if (status.untracked.length > 0)
100
- console.log(a.yellow(` Untracked: ${status.untracked.length} files`));
101
- if (status.unstaged.length > 0 || status.untracked.length > 0) {
102
- await stageAllChanges();
103
- console.log(a.green("\n\u2713 All changes staged"));
104
- }
105
- const allFiles = [...status.staged, ...status.unstaged, ...status.untracked];
106
- let message;
107
- if (options.message) {
108
- message = options.message;
109
- } else if (options.auto) {
110
- message = await generateCommitMessage(allFiles);
111
- console.log(a.green("\n\u{1F4AC} Generated commit message:"));
112
- console.log(a.white(message));
113
- } else {
114
- const suggested = await generateCommitMessage(allFiles);
115
- const { commitMessage } = await inquirer.prompt([{
116
- type: "input",
117
- name: "commitMessage",
118
- message: "Commit message:",
119
- default: suggested.split("\n")[0]
120
- }]);
121
- message = commitMessage;
122
- }
123
- if (options.dryRun) {
124
- console.log(a.yellow("\n\u{1F50D} Dry run - no commit created"));
125
- console.log(a.gray("Would commit with:"));
126
- console.log(a.white(message));
127
- return;
128
- }
129
- try {
130
- await commitChanges(message);
131
- console.log(a.green("\n\u2713 Changes committed"));
132
- } catch (error) {
133
- console.log(a.red(`
134
- \u2717 Commit failed: ${error}`));
135
- }
136
- }
137
-
138
- export { commit };