ccjk 12.0.0 → 12.0.2

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 (161) hide show
  1. package/dist/chunks/agent-teams.mjs +17 -18
  2. package/dist/chunks/agent.mjs +105 -102
  3. package/dist/chunks/agents.mjs +87 -77
  4. package/dist/chunks/api-cli.mjs +41 -27
  5. package/dist/chunks/api-providers.mjs +2 -4
  6. package/dist/chunks/api.mjs +22 -11
  7. package/dist/chunks/auto-bootstrap.mjs +3 -5
  8. package/dist/chunks/auto-init.mjs +3 -4
  9. package/dist/chunks/auto-updater.mjs +103 -91
  10. package/dist/chunks/banner.mjs +41 -42
  11. package/dist/chunks/boost.mjs +30 -31
  12. package/dist/chunks/ccjk-agents.mjs +6 -9
  13. package/dist/chunks/ccjk-all.mjs +703 -85
  14. package/dist/chunks/ccjk-config.mjs +6 -6
  15. package/dist/chunks/ccjk-hooks.mjs +20 -9
  16. package/dist/chunks/ccjk-mcp.mjs +64 -52
  17. package/dist/chunks/ccjk-setup.mjs +35 -25
  18. package/dist/chunks/ccjk-skills.mjs +51 -41
  19. package/dist/chunks/ccr.mjs +42 -32
  20. package/dist/chunks/ccu.mjs +16 -12
  21. package/dist/chunks/check-updates.mjs +30 -19
  22. package/dist/chunks/claude-code-config-manager.mjs +25 -10
  23. package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
  24. package/dist/chunks/claude-config.mjs +2 -2
  25. package/dist/chunks/claude-wrapper.mjs +9 -6
  26. package/dist/chunks/cleanup-migration.mjs +1 -1
  27. package/dist/chunks/cli-hook.mjs +10 -3
  28. package/dist/chunks/cloud-sync.mjs +1 -1
  29. package/dist/chunks/codex-config-switch.mjs +58 -45
  30. package/dist/chunks/codex-provider-manager.mjs +29 -16
  31. package/dist/chunks/codex-uninstaller.mjs +5 -6
  32. package/dist/chunks/codex.mjs +89 -89
  33. package/dist/chunks/commands.mjs +28 -29
  34. package/dist/chunks/commands2.mjs +4 -3
  35. package/dist/chunks/commit.mjs +42 -23
  36. package/dist/chunks/completion.mjs +46 -47
  37. package/dist/chunks/config-consolidator.mjs +12 -13
  38. package/dist/chunks/config-switch.mjs +66 -53
  39. package/dist/chunks/config.mjs +10 -10
  40. package/dist/chunks/config2.mjs +53 -42
  41. package/dist/chunks/config3.mjs +107 -93
  42. package/dist/chunks/constants.mjs +2 -4
  43. package/dist/chunks/context-loader.mjs +5 -4
  44. package/dist/chunks/context.mjs +77 -76
  45. package/dist/chunks/convoy-manager.mjs +4 -4
  46. package/dist/chunks/dashboard.mjs +28 -29
  47. package/dist/chunks/doctor.mjs +68 -54
  48. package/dist/chunks/evolution.mjs +37 -38
  49. package/dist/chunks/features.mjs +103 -92
  50. package/dist/chunks/fs-operations.mjs +1 -1
  51. package/dist/chunks/health-alerts.mjs +1 -1
  52. package/dist/chunks/health-check.mjs +1 -1
  53. package/dist/chunks/help.mjs +117 -116
  54. package/dist/chunks/hook-installer.mjs +3 -2
  55. package/dist/chunks/index.mjs +20 -6
  56. package/dist/chunks/index10.mjs +1171 -0
  57. package/dist/chunks/index11.mjs +1008 -0
  58. package/dist/chunks/index12.mjs +193 -0
  59. package/dist/chunks/index13.mjs +218 -0
  60. package/dist/chunks/index14.mjs +663 -0
  61. package/dist/chunks/index2.mjs +19 -10
  62. package/dist/chunks/index3.mjs +19079 -164
  63. package/dist/chunks/index4.mjs +8 -1171
  64. package/dist/chunks/index5.mjs +7479 -884
  65. package/dist/chunks/index6.mjs +160 -184
  66. package/dist/chunks/index7.mjs +3573 -653
  67. package/dist/chunks/index8.mjs +19 -0
  68. package/dist/chunks/index9.mjs +616 -0
  69. package/dist/chunks/init.mjs +173 -173
  70. package/dist/chunks/installer.mjs +92 -82
  71. package/dist/chunks/installer2.mjs +3 -2
  72. package/dist/chunks/interview.mjs +118 -107
  73. package/dist/chunks/json-config.mjs +3 -2
  74. package/dist/chunks/linux.mjs +3863 -0
  75. package/dist/chunks/macos.mjs +69 -0
  76. package/dist/chunks/main.mjs +635 -0
  77. package/dist/chunks/marketplace.mjs +69 -66
  78. package/dist/chunks/mcp-cli.mjs +61 -48
  79. package/dist/chunks/mcp.mjs +140 -127
  80. package/dist/chunks/menu.mjs +85 -85
  81. package/dist/chunks/metrics-display.mjs +41 -40
  82. package/dist/chunks/migrator.mjs +4 -5
  83. package/dist/chunks/monitor.mjs +95 -95
  84. package/dist/chunks/notification.mjs +151 -141
  85. package/dist/chunks/onboarding.mjs +26 -15
  86. package/dist/chunks/package.mjs +1 -1
  87. package/dist/chunks/paradigm.mjs +24 -23
  88. package/dist/chunks/permission-manager.mjs +10 -11
  89. package/dist/chunks/permissions.mjs +72 -57
  90. package/dist/chunks/persistence-manager.mjs +97 -84
  91. package/dist/chunks/persistence.mjs +1 -1
  92. package/dist/chunks/platform.mjs +29 -29
  93. package/dist/chunks/plugin.mjs +104 -105
  94. package/dist/chunks/prompts.mjs +36 -25
  95. package/dist/chunks/providers.mjs +68 -69
  96. package/dist/chunks/quick-actions.mjs +71 -72
  97. package/dist/chunks/quick-provider.mjs +56 -40
  98. package/dist/chunks/quick-setup.mjs +71 -60
  99. package/dist/chunks/remote.mjs +21 -12
  100. package/dist/chunks/session.mjs +116 -103
  101. package/dist/chunks/sessions.mjs +29 -28
  102. package/dist/chunks/silent-updater.mjs +8 -10
  103. package/dist/chunks/simple-config.mjs +13 -10
  104. package/dist/chunks/skill.mjs +8560 -103
  105. package/dist/chunks/skills-sync.mjs +5212 -79
  106. package/dist/chunks/skills.mjs +105 -94
  107. package/dist/chunks/slash-commands.mjs +36 -37
  108. package/dist/chunks/smart-defaults.mjs +7 -3
  109. package/dist/chunks/smart-guide.mjs +1 -1
  110. package/dist/chunks/startup.mjs +2 -4
  111. package/dist/chunks/stats.mjs +41 -42
  112. package/dist/chunks/status.mjs +49 -50
  113. package/dist/chunks/team.mjs +24 -12
  114. package/dist/chunks/thinking.mjs +74 -63
  115. package/dist/chunks/trace.mjs +20 -19
  116. package/dist/chunks/uninstall.mjs +69 -56
  117. package/dist/chunks/update.mjs +39 -28
  118. package/dist/chunks/upgrade-manager.mjs +24 -18
  119. package/dist/chunks/version-checker.mjs +45 -41
  120. package/dist/chunks/vim.mjs +81 -69
  121. package/dist/chunks/windows.mjs +14 -0
  122. package/dist/chunks/workflows.mjs +15 -15
  123. package/dist/chunks/wsl.mjs +129 -0
  124. package/dist/chunks/zero-config.mjs +45 -34
  125. package/dist/cli.mjs +20 -20
  126. package/dist/index.mjs +41 -31
  127. package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
  128. package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
  129. package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
  130. package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
  131. package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
  132. package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
  133. package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
  134. package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
  135. package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
  136. package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
  137. package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
  138. package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
  139. package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
  140. package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
  141. package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
  142. package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
  143. package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
  144. package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
  145. package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
  146. package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
  147. package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
  148. package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
  149. package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
  150. package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
  151. package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
  152. package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
  153. package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
  154. package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
  155. package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
  156. package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
  157. package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
  158. package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
  159. package/package.json +31 -30
  160. package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
  161. package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
@@ -1,26 +1,36 @@
1
- import * as nodeFs from 'node:fs';
1
+ import * as fs from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
3
  import process__default from 'node:process';
4
- import ansis from 'ansis';
5
- import inquirer from 'inquirer';
6
- import ora from 'ora';
7
- import { join } from 'pathe';
8
- import { exec } from 'tinyexec';
9
- import { ensureI18nInitialized, i18n } from './index3.mjs';
4
+ import a from './index2.mjs';
5
+ import { i as inquirer } from './index3.mjs';
6
+ import ora from './index7.mjs';
7
+ import { exec as q } from './main.mjs';
8
+ import { ensureI18nInitialized, i18n } from './index5.mjs';
10
9
  import { updateClaudeCode } from './auto-updater.mjs';
11
10
  import { exists } from './fs-operations.mjs';
12
11
  import { f as findCommandPath, g as getPlatform, a as getHomebrewCommandPaths, b as isTermux, c as getTermuxPrefix, d as isWSL, e as getWSLInfo, w as wrapCommandWithSudo, h as commandExists, j as getRecommendedInstallMethods } from './platform.mjs';
13
- import 'node:url';
14
- import 'i18next';
15
- import 'i18next-fs-backend';
16
- import '../shared/ccjk.DHbrGcgg.mjs';
17
- import 'inquirer-toggle';
18
- import './version-checker.mjs';
19
- import 'node:child_process';
20
- import 'node:path';
12
+ import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
13
+ import '../shared/ccjk.BAGoDD49.mjs';
14
+ import 'node:readline';
15
+ import 'stream';
16
+ import 'node:tty';
17
+ import 'node:async_hooks';
18
+ import '../shared/ccjk.Cjgrln_h.mjs';
21
19
  import 'node:util';
22
- import 'semver';
20
+ import 'tty';
21
+ import 'fs';
22
+ import 'child_process';
23
+ import 'node:path';
23
24
  import 'node:crypto';
25
+ import 'buffer';
26
+ import 'string_decoder';
27
+ import 'module';
28
+ import 'node:child_process';
29
+ import 'node:stream';
30
+ import 'node:url';
31
+ import '../shared/ccjk.DOwtZMk8.mjs';
32
+ import './version-checker.mjs';
33
+ import '../shared/ccjk.CxpGa6MC.mjs';
24
34
  import 'node:fs/promises';
25
35
 
26
36
  async function isClaudeCodeInstalled() {
@@ -31,10 +41,10 @@ async function installClaudeCode(skipMethodSelection = false) {
31
41
  const codeType = "claude-code";
32
42
  const installed = await isClaudeCodeInstalled();
33
43
  if (installed) {
34
- console.log(ansis.green(`\u2714 ${i18n.t("installation:alreadyInstalled")}`));
44
+ console.log(a.green(`\u2714 ${i18n.t("installation:alreadyInstalled")}`));
35
45
  const version = await detectInstalledVersion(codeType);
36
46
  if (version) {
37
- console.log(ansis.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
47
+ console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
38
48
  }
39
49
  const verification = await verifyInstallation(codeType);
40
50
  if (verification.symlinkCreated) {
@@ -44,45 +54,45 @@ async function installClaudeCode(skipMethodSelection = false) {
44
54
  return;
45
55
  }
46
56
  if (isTermux()) {
47
- console.log(ansis.yellow(`\u2139 ${i18n.t("installation:termuxDetected")}`));
57
+ console.log(a.yellow(`\u2139 ${i18n.t("installation:termuxDetected")}`));
48
58
  const termuxPrefix = getTermuxPrefix();
49
- console.log(ansis.gray(i18n.t("installation:termuxPathInfo", { path: termuxPrefix })));
50
- console.log(ansis.gray(`Node.js: ${termuxPrefix}/bin/node`));
51
- console.log(ansis.gray(`npm: ${termuxPrefix}/bin/npm`));
59
+ console.log(a.gray(i18n.t("installation:termuxPathInfo", { path: termuxPrefix })));
60
+ console.log(a.gray(`Node.js: ${termuxPrefix}/bin/node`));
61
+ console.log(a.gray(`npm: ${termuxPrefix}/bin/npm`));
52
62
  }
53
63
  if (isWSL()) {
54
64
  const wslInfo = getWSLInfo();
55
65
  if (wslInfo?.distro) {
56
- console.log(ansis.yellow(`\u2139 ${i18n.t("installation:wslDetected", { distro: wslInfo.distro })}`));
66
+ console.log(a.yellow(`\u2139 ${i18n.t("installation:wslDetected", { distro: wslInfo.distro })}`));
57
67
  } else {
58
- console.log(ansis.yellow(`\u2139 ${i18n.t("installation:wslDetectedGeneric")}`));
68
+ console.log(a.yellow(`\u2139 ${i18n.t("installation:wslDetectedGeneric")}`));
59
69
  }
60
- console.log(ansis.gray(i18n.t("installation:wslPathInfo", { path: `${homedir()}/.claude/` })));
70
+ console.log(a.gray(i18n.t("installation:wslPathInfo", { path: `${homedir()}/.claude/` })));
61
71
  }
62
72
  if (skipMethodSelection) {
63
73
  console.log(i18n.t("installation:installing"));
64
74
  try {
65
75
  const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["install", "-g", "@anthropic-ai/claude-code", "--force"]);
66
76
  if (usedSudo) {
67
- console.log(ansis.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
77
+ console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
68
78
  }
69
- await exec(command, args);
79
+ await q(command, args);
70
80
  console.log(`\u2714 ${i18n.t("installation:installSuccess")}`);
71
81
  await setInstallMethod("npm");
72
82
  const verification = await verifyInstallation(codeType);
73
83
  displayVerificationResult(verification, codeType);
74
84
  if (isTermux()) {
75
- console.log(ansis.gray(`
85
+ console.log(a.gray(`
76
86
  Claude Code installed to: ${getTermuxPrefix()}/bin/claude`));
77
87
  }
78
88
  if (isWSL()) {
79
- console.log(ansis.gray(`
89
+ console.log(a.gray(`
80
90
  ${i18n.t("installation:wslInstallSuccess")}`));
81
91
  }
82
92
  } catch (error) {
83
93
  console.error(`\u2716 ${i18n.t("installation:installFailed")}`);
84
94
  if (isTermux()) {
85
- console.error(ansis.yellow(`
95
+ console.error(a.yellow(`
86
96
  ${i18n.t("installation:termuxInstallHint")}
87
97
  `));
88
98
  }
@@ -92,23 +102,23 @@ ${i18n.t("installation:termuxInstallHint")}
92
102
  }
93
103
  const method = await selectInstallMethod(codeType);
94
104
  if (!method) {
95
- console.log(ansis.yellow(i18n.t("common:cancelled")));
105
+ console.log(a.yellow(i18n.t("common:cancelled")));
96
106
  return;
97
107
  }
98
108
  const success = await executeInstallMethod(method, codeType);
99
109
  if (!success) {
100
110
  const retrySuccess = await handleInstallFailure(codeType, [method]);
101
111
  if (!retrySuccess) {
102
- console.error(ansis.red(`\u2716 ${i18n.t("installation:installFailed")}`));
112
+ console.error(a.red(`\u2716 ${i18n.t("installation:installFailed")}`));
103
113
  throw new Error(i18n.t("installation:installFailed"));
104
114
  }
105
115
  }
106
116
  if (isTermux()) {
107
- console.log(ansis.gray(`
117
+ console.log(a.gray(`
108
118
  Claude Code installed to: ${getTermuxPrefix()}/bin/claude`));
109
119
  }
110
120
  if (isWSL()) {
111
- console.log(ansis.gray(`
121
+ console.log(a.gray(`
112
122
  ${i18n.t("installation:wslInstallSuccess")}`));
113
123
  }
114
124
  }
@@ -121,10 +131,10 @@ async function installCodex(skipMethodSelection = false) {
121
131
  const codeTypeName = i18n.t("common:codex");
122
132
  const installed = await isCodexInstalled();
123
133
  if (installed) {
124
- console.log(ansis.green(`\u2714 ${codeTypeName} ${i18n.t("installation:alreadyInstalled")}`));
134
+ console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:alreadyInstalled")}`));
125
135
  const version = await detectInstalledVersion(codeType);
126
136
  if (version) {
127
- console.log(ansis.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
137
+ console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version })}`));
128
138
  }
129
139
  return;
130
140
  }
@@ -133,28 +143,28 @@ async function installCodex(skipMethodSelection = false) {
133
143
  try {
134
144
  const { command, args, usedSudo } = wrapCommandWithSudo("npm", ["install", "-g", "@openai/codex", "--force"]);
135
145
  if (usedSudo) {
136
- console.log(ansis.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
146
+ console.log(a.yellow(`\u2139 ${i18n.t("installation:usingSudo")}`));
137
147
  }
138
- await exec(command, args);
139
- console.log(ansis.green(`\u2714 ${codeTypeName} ${i18n.t("installation:installSuccess")}`));
148
+ await q(command, args);
149
+ console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:installSuccess")}`));
140
150
  const verification = await verifyInstallation(codeType);
141
151
  displayVerificationResult(verification, codeType);
142
152
  } catch (error) {
143
- console.error(ansis.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
153
+ console.error(a.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
144
154
  throw error;
145
155
  }
146
156
  return;
147
157
  }
148
158
  const method = await selectInstallMethod(codeType);
149
159
  if (!method) {
150
- console.log(ansis.yellow(i18n.t("common:cancelled")));
160
+ console.log(a.yellow(i18n.t("common:cancelled")));
151
161
  return;
152
162
  }
153
163
  const success = await executeInstallMethod(method, codeType);
154
164
  if (!success) {
155
165
  const retrySuccess = await handleInstallFailure(codeType, [method]);
156
166
  if (!retrySuccess) {
157
- console.error(ansis.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
167
+ console.error(a.red(`\u2716 ${codeTypeName} ${i18n.t("installation:installFailed")}`));
158
168
  throw new Error(i18n.t("installation:installFailed"));
159
169
  }
160
170
  }
@@ -186,7 +196,7 @@ async function uninstallCodeTool(codeType) {
186
196
  if (!method) {
187
197
  if (codeType === "claude-code") {
188
198
  try {
189
- const result = await exec("brew", ["list", "--cask", "claude-code"]);
199
+ const result = await q("brew", ["list", "--cask", "claude-code"]);
190
200
  if (result.exitCode === 0) {
191
201
  method = "homebrew";
192
202
  }
@@ -194,7 +204,7 @@ async function uninstallCodeTool(codeType) {
194
204
  }
195
205
  } else if (codeType === "codex") {
196
206
  try {
197
- const result = await exec("brew", ["list", "--cask", "codex"]);
207
+ const result = await q("brew", ["list", "--cask", "codex"]);
198
208
  if (result.exitCode === 0) {
199
209
  method = "homebrew";
200
210
  }
@@ -209,7 +219,7 @@ async function uninstallCodeTool(codeType) {
209
219
  const platform = getPlatform();
210
220
  if (platform === "macos" || platform === "linux") {
211
221
  try {
212
- const testResult = codeType === "claude-code" ? await exec("brew", ["list", "--cask", "claude-code"]) : await exec("brew", ["list", "--cask", "codex"]);
222
+ const testResult = codeType === "claude-code" ? await q("brew", ["list", "--cask", "claude-code"]) : await q("brew", ["list", "--cask", "codex"]);
213
223
  if (testResult.exitCode === 0) {
214
224
  method = "homebrew";
215
225
  }
@@ -231,14 +241,14 @@ async function uninstallCodeTool(codeType) {
231
241
  spinner.info(i18n.t("installation:usingSudo"));
232
242
  spinner.start();
233
243
  }
234
- await exec(command, args);
244
+ await q(command, args);
235
245
  break;
236
246
  }
237
247
  case "homebrew": {
238
248
  if (codeType === "claude-code") {
239
- await exec("brew", ["uninstall", "--cask", "claude-code"]);
249
+ await q("brew", ["uninstall", "--cask", "claude-code"]);
240
250
  } else {
241
- await exec("brew", ["uninstall", "--cask", "codex"]);
251
+ await q("brew", ["uninstall", "--cask", "codex"]);
242
252
  }
243
253
  break;
244
254
  }
@@ -248,21 +258,21 @@ async function uninstallCodeTool(codeType) {
248
258
  const command = codeType === "claude-code" ? "claude" : "codex";
249
259
  try {
250
260
  const whichCmd = getPlatform() === "windows" ? "where" : "which";
251
- const result = await exec(whichCmd, [command]);
261
+ const result = await q(whichCmd, [command]);
252
262
  if (result.stdout) {
253
263
  const binaryPath = result.stdout.trim().split("\n")[0];
254
264
  spinner.info(i18n.t("installation:binaryLocation", { path: binaryPath }));
255
265
  const platform = getPlatform();
256
266
  if (platform === "windows") {
257
267
  const quotedBinaryPath = `"${binaryPath}"`;
258
- await exec("cmd", ["/c", "del", "/f", "/q", quotedBinaryPath]);
268
+ await q("cmd", ["/c", "del", "/f", "/q", quotedBinaryPath]);
259
269
  } else {
260
270
  const { command: rmCmd, args: rmArgs } = wrapCommandWithSudo("rm", ["-f", binaryPath]);
261
271
  if (rmCmd === "sudo") {
262
272
  spinner.info(i18n.t("installation:usingSudo"));
263
273
  spinner.start();
264
274
  }
265
- await exec(rmCmd, rmArgs);
275
+ await q(rmCmd, rmArgs);
266
276
  }
267
277
  }
268
278
  } catch {
@@ -277,7 +287,7 @@ async function uninstallCodeTool(codeType) {
277
287
  } catch (error) {
278
288
  spinner.fail(i18n.t("installation:uninstallFailed", { method, codeType: codeTypeName }));
279
289
  if (error instanceof Error) {
280
- console.error(ansis.gray(error.message));
290
+ console.error(a.gray(error.message));
281
291
  }
282
292
  return false;
283
293
  }
@@ -300,7 +310,7 @@ async function setInstallMethod(method, codeType = "claude-code") {
300
310
  async function detectInstalledVersion(codeType) {
301
311
  try {
302
312
  const command = codeType === "claude-code" ? "claude" : "codex";
303
- const result = await exec(command, ["--version"]);
313
+ const result = await q(command, ["--version"]);
304
314
  if (result.exitCode === 0 && result.stdout) {
305
315
  const versionMatch = result.stdout.match(/(\d+\.\d+\.\d+)/);
306
316
  return versionMatch ? versionMatch[1] : result.stdout.trim();
@@ -344,7 +354,7 @@ function getInstallMethodOptions(codeType, recommendedMethods) {
344
354
  return availableMethods.map((method) => {
345
355
  const isTopRecommended = method === topRecommended;
346
356
  const methodLabel = getInstallMethodLabel(method);
347
- const title = isTopRecommended ? `${methodLabel} ${ansis.green(`[${i18n.t("installation:recommendedMethod")}]`)}` : methodLabel;
357
+ const title = isTopRecommended ? `${methodLabel} ${a.green(`[${i18n.t("installation:recommendedMethod")}]`)}` : methodLabel;
348
358
  return {
349
359
  title,
350
360
  value: method
@@ -357,7 +367,7 @@ async function selectInstallMethod(codeType, excludeMethods = []) {
357
367
  const recommendedMethods = getRecommendedInstallMethods(codeType);
358
368
  const methodOptions = getInstallMethodOptions(codeType, recommendedMethods).filter((option) => !excludeMethods.includes(option.value));
359
369
  if (methodOptions.length === 0) {
360
- console.log(ansis.yellow(i18n.t("installation:noMoreMethods")));
370
+ console.log(a.yellow(i18n.t("installation:noMoreMethods")));
361
371
  return null;
362
372
  }
363
373
  const response = await inquirer.prompt({
@@ -384,22 +394,22 @@ async function executeInstallMethod(method, codeType) {
384
394
  spinner.info(i18n.t("installation:usingSudo"));
385
395
  spinner.start();
386
396
  }
387
- await exec(command, args);
397
+ await q(command, args);
388
398
  await setInstallMethod("npm", codeType);
389
399
  break;
390
400
  }
391
401
  case "homebrew": {
392
402
  if (codeType === "claude-code") {
393
- await exec("brew", ["install", "--cask", "claude-code"]);
403
+ await q("brew", ["install", "--cask", "claude-code"]);
394
404
  } else {
395
- await exec("brew", ["install", "--cask", "codex"]);
405
+ await q("brew", ["install", "--cask", "codex"]);
396
406
  }
397
407
  await setInstallMethod("homebrew", codeType);
398
408
  break;
399
409
  }
400
410
  case "curl": {
401
411
  if (codeType === "claude-code") {
402
- await exec("bash", ["-c", "curl -fsSL https://claude.ai/install.sh | bash"]);
412
+ await q("bash", ["-c", "curl -fsSL https://claude.ai/install.sh | bash"]);
403
413
  } else {
404
414
  spinner.stop();
405
415
  return await executeInstallMethod("npm", codeType);
@@ -409,7 +419,7 @@ async function executeInstallMethod(method, codeType) {
409
419
  }
410
420
  case "powershell": {
411
421
  if (codeType === "claude-code") {
412
- await exec("powershell", ["-Command", "irm https://claude.ai/install.ps1 | iex"]);
422
+ await q("powershell", ["-Command", "irm https://claude.ai/install.ps1 | iex"]);
413
423
  } else {
414
424
  spinner.stop();
415
425
  return await executeInstallMethod("npm", codeType);
@@ -419,7 +429,7 @@ async function executeInstallMethod(method, codeType) {
419
429
  }
420
430
  case "cmd": {
421
431
  if (codeType === "claude-code") {
422
- await exec("cmd", ["/c", "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd"]);
432
+ await q("cmd", ["/c", "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd"]);
423
433
  } else {
424
434
  spinner.stop();
425
435
  return await executeInstallMethod("npm", codeType);
@@ -437,7 +447,7 @@ async function executeInstallMethod(method, codeType) {
437
447
  } catch (error) {
438
448
  spinner.fail(i18n.t("installation:installMethodFailed", { method }));
439
449
  if (error instanceof Error) {
440
- console.error(ansis.gray(error.message));
450
+ console.error(a.gray(error.message));
441
451
  }
442
452
  return false;
443
453
  }
@@ -466,7 +476,7 @@ async function handleInstallFailure(codeType, failedMethods) {
466
476
  async function isCommandInPath(command) {
467
477
  try {
468
478
  const cmd = getPlatform() === "windows" ? "where" : "which";
469
- const res = await exec(cmd, [command]);
479
+ const res = await q(cmd, [command]);
470
480
  return res.exitCode === 0;
471
481
  } catch {
472
482
  return false;
@@ -580,7 +590,7 @@ async function createHomebrewSymlink(command, sourcePath) {
580
590
  ];
581
591
  let targetDir = null;
582
592
  for (const binPath of homebrewBinPaths) {
583
- if (nodeFs.existsSync(binPath)) {
593
+ if (fs.existsSync(binPath)) {
584
594
  targetDir = binPath;
585
595
  break;
586
596
  }
@@ -594,16 +604,16 @@ async function createHomebrewSymlink(command, sourcePath) {
594
604
  }
595
605
  const symlinkPath = join(targetDir, command);
596
606
  try {
597
- const stats = nodeFs.lstatSync(symlinkPath);
607
+ const stats = fs.lstatSync(symlinkPath);
598
608
  if (stats.isSymbolicLink()) {
599
- const existingTarget = nodeFs.readlinkSync(symlinkPath);
609
+ const existingTarget = fs.readlinkSync(symlinkPath);
600
610
  if (existingTarget === sourcePath) {
601
611
  return {
602
612
  success: true,
603
613
  symlinkPath
604
614
  };
605
615
  }
606
- nodeFs.unlinkSync(symlinkPath);
616
+ fs.unlinkSync(symlinkPath);
607
617
  } else {
608
618
  return {
609
619
  success: false,
@@ -621,7 +631,7 @@ async function createHomebrewSymlink(command, sourcePath) {
621
631
  }
622
632
  }
623
633
  try {
624
- nodeFs.symlinkSync(sourcePath, symlinkPath);
634
+ fs.symlinkSync(sourcePath, symlinkPath);
625
635
  return {
626
636
  success: true,
627
637
  symlinkPath
@@ -646,33 +656,33 @@ function displayVerificationResult(result, codeType) {
646
656
  const codeTypeName = codeType === "claude-code" ? i18n.t("common:claudeCode") : i18n.t("common:codex");
647
657
  if (result.success) {
648
658
  if (result.symlinkCreated) {
649
- console.log(ansis.green(`\u2714 ${codeTypeName} ${i18n.t("installation:verificationSuccess")}`));
650
- console.log(ansis.gray(` ${i18n.t("installation:symlinkCreated", { path: result.commandPath })}`));
659
+ console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:verificationSuccess")}`));
660
+ console.log(a.gray(` ${i18n.t("installation:symlinkCreated", { path: result.commandPath })}`));
651
661
  } else if (result.commandPath) {
652
- console.log(ansis.green(`\u2714 ${codeTypeName} ${i18n.t("installation:verificationSuccess")}`));
653
- console.log(ansis.gray(` ${i18n.t("installation:foundAtPath", { path: result.commandPath })}`));
662
+ console.log(a.green(`\u2714 ${codeTypeName} ${i18n.t("installation:verificationSuccess")}`));
663
+ console.log(a.gray(` ${i18n.t("installation:foundAtPath", { path: result.commandPath })}`));
654
664
  }
655
665
  if (result.version) {
656
- console.log(ansis.gray(` ${i18n.t("installation:detectedVersion", { version: result.version })}`));
666
+ console.log(a.gray(` ${i18n.t("installation:detectedVersion", { version: result.version })}`));
657
667
  }
658
668
  if (result.error === "PATH_UPDATE_NEEDED") {
659
- console.log(ansis.yellow(`
669
+ console.log(a.yellow(`
660
670
  \u26A0 ${i18n.t("installation:pathUpdateNeeded")}`));
661
- console.log(ansis.gray(` ${i18n.t("installation:pathUpdateHint")}`));
662
- console.log(ansis.green(` export PATH="$HOME/.local/bin:$PATH"`));
663
- console.log(ansis.gray(` ${i18n.t("installation:pathUpdatePermanent")}`));
664
- console.log(ansis.green(` echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc`));
671
+ console.log(a.gray(` ${i18n.t("installation:pathUpdateHint")}`));
672
+ console.log(a.green(` export PATH="$HOME/.local/bin:$PATH"`));
673
+ console.log(a.gray(` ${i18n.t("installation:pathUpdatePermanent")}`));
674
+ console.log(a.green(` echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc`));
665
675
  }
666
676
  } else {
667
- console.log(ansis.yellow(`\u26A0 ${codeTypeName} ${i18n.t("installation:verificationFailed")}`));
677
+ console.log(a.yellow(`\u26A0 ${codeTypeName} ${i18n.t("installation:verificationFailed")}`));
668
678
  if (result.commandPath) {
669
- console.log(ansis.gray(` ${i18n.t("installation:foundAtPath", { path: result.commandPath })}`));
679
+ console.log(a.gray(` ${i18n.t("installation:foundAtPath", { path: result.commandPath })}`));
670
680
  }
671
681
  if (result.error && result.error !== "PATH_UPDATE_NEEDED") {
672
- console.log(ansis.gray(` ${result.error}`));
682
+ console.log(a.gray(` ${result.error}`));
673
683
  }
674
684
  if (result.needsSymlink && !result.symlinkCreated) {
675
- console.log(ansis.yellow(` ${i18n.t("installation:manualSymlinkHint")}`));
685
+ console.log(a.yellow(` ${i18n.t("installation:manualSymlinkHint")}`));
676
686
  }
677
687
  }
678
688
  }
@@ -1,9 +1,10 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { homedir } from 'node:os';
3
3
  import { join } from 'node:path';
4
- import ansis from 'ansis';
4
+ import a from './index2.mjs';
5
+ import '../shared/ccjk.BAGoDD49.mjs';
5
6
 
6
- const { cyan, yellow, gray, green, red, blue: _blue, bold, dim: _dim } = ansis;
7
+ const { cyan, yellow, gray, green, red, blue: _blue, bold, dim: _dim } = a;
7
8
  const INSTALL_DIR = join(homedir(), ".agent-browser");
8
9
  const BIN_PATH = join(INSTALL_DIR, "bin", "agent-browser");
9
10
  function getInstallPath() {