ccjk 13.3.5 → 13.3.7

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 (150) hide show
  1. package/dist/chunks/agent-teams.mjs +7 -5
  2. package/dist/chunks/agent.mjs +2 -2
  3. package/dist/chunks/agents.mjs +16 -16
  4. package/dist/chunks/api-cli.mjs +6 -6
  5. package/dist/chunks/api-providers.mjs +1 -1
  6. package/dist/chunks/api.mjs +4 -4
  7. package/dist/chunks/auto-bootstrap.mjs +1 -1
  8. package/dist/chunks/auto-fix.mjs +49 -4
  9. package/dist/chunks/auto-fixer.mjs +7 -5
  10. package/dist/chunks/auto-init.mjs +9 -7208
  11. package/dist/chunks/auto-memory-bridge.mjs +9 -3
  12. package/dist/chunks/auto-updater.mjs +9 -9
  13. package/dist/chunks/auto-upgrade.mjs +5 -3
  14. package/dist/chunks/banner.mjs +4 -3
  15. package/dist/chunks/boost.mjs +118 -62
  16. package/dist/chunks/ccjk-agents.mjs +3 -3
  17. package/dist/chunks/ccjk-all.mjs +7 -7
  18. package/dist/chunks/ccjk-config.mjs +2 -2
  19. package/dist/chunks/ccjk-hooks.mjs +4 -4
  20. package/dist/chunks/ccjk-mcp.mjs +5 -5
  21. package/dist/chunks/ccjk-setup.mjs +5 -5
  22. package/dist/chunks/ccjk-skills.mjs +5 -5
  23. package/dist/chunks/ccr.mjs +18 -16
  24. package/dist/chunks/ccu.mjs +2 -2
  25. package/dist/chunks/check-updates.mjs +8 -8
  26. package/dist/chunks/claude-code-config-manager.mjs +11 -8
  27. package/dist/chunks/claude-code-incremental-manager.mjs +7 -7
  28. package/dist/chunks/claude-config.mjs +1 -1
  29. package/dist/chunks/claude-wrapper.mjs +1 -1
  30. package/dist/chunks/cli-hook.mjs +15 -15
  31. package/dist/chunks/codex-config-switch.mjs +7 -7
  32. package/dist/chunks/codex-provider-manager.mjs +7 -7
  33. package/dist/chunks/codex-uninstaller.mjs +2 -2
  34. package/dist/chunks/codex.mjs +5 -5
  35. package/dist/chunks/commands.mjs +2 -2
  36. package/dist/chunks/commands2.mjs +3 -3
  37. package/dist/chunks/commit.mjs +2 -2
  38. package/dist/chunks/completion.mjs +2 -2
  39. package/dist/chunks/config-consolidator.mjs +2 -2
  40. package/dist/chunks/config-switch.mjs +8 -8
  41. package/dist/chunks/config.mjs +6 -5
  42. package/dist/chunks/config2.mjs +5 -5
  43. package/dist/chunks/config3.mjs +4 -4
  44. package/dist/chunks/constants.mjs +1 -1
  45. package/dist/chunks/context-opt.mjs +92 -90
  46. package/dist/chunks/context.mjs +659 -0
  47. package/dist/chunks/dashboard.mjs +14 -9
  48. package/dist/chunks/doctor.mjs +4 -4
  49. package/dist/chunks/eval.mjs +502 -0
  50. package/dist/chunks/evolution.mjs +46 -39
  51. package/dist/chunks/health-alerts.mjs +9 -9
  52. package/dist/chunks/help.mjs +1 -1
  53. package/dist/chunks/hook-installer.mjs +6 -3
  54. package/dist/chunks/index.mjs +23 -0
  55. package/dist/chunks/index10.mjs +634 -571
  56. package/dist/chunks/index11.mjs +1061 -569
  57. package/dist/chunks/index12.mjs +914 -1076
  58. package/dist/chunks/index13.mjs +136 -951
  59. package/dist/chunks/index14.mjs +209 -185
  60. package/dist/chunks/index2.mjs +19 -24
  61. package/dist/chunks/index3.mjs +19085 -12
  62. package/dist/chunks/index4.mjs +16 -19092
  63. package/dist/chunks/index5.mjs +7602 -16
  64. package/dist/chunks/index6.mjs +159 -7590
  65. package/dist/chunks/index7.mjs +1602 -171
  66. package/dist/chunks/index8.mjs +19 -1602
  67. package/dist/chunks/index9.mjs +612 -15
  68. package/dist/chunks/init.mjs +26 -19
  69. package/dist/chunks/installer.mjs +5 -5
  70. package/dist/chunks/installer2.mjs +2 -2
  71. package/dist/chunks/intent-engine.mjs +1 -1
  72. package/dist/chunks/interview.mjs +4 -4
  73. package/dist/chunks/manager.mjs +1 -1
  74. package/dist/chunks/marketplace.mjs +2 -2
  75. package/dist/chunks/mcp-cli.mjs +12 -12
  76. package/dist/chunks/mcp.mjs +8 -8
  77. package/dist/chunks/memory.mjs +8 -8
  78. package/dist/chunks/menu-hierarchical.mjs +24 -22
  79. package/dist/chunks/menu.mjs +27 -22
  80. package/dist/chunks/metrics-display.mjs +2 -2
  81. package/dist/chunks/migrator.mjs +1 -1
  82. package/dist/chunks/monitor.mjs +2 -2
  83. package/dist/chunks/notification.mjs +6 -6
  84. package/dist/chunks/onboarding-wizard.mjs +6 -5
  85. package/dist/chunks/onboarding.mjs +4 -4
  86. package/dist/chunks/package.mjs +1 -1
  87. package/dist/chunks/paradigm.mjs +2 -2
  88. package/dist/chunks/permission-manager.mjs +2 -2
  89. package/dist/chunks/permissions.mjs +3 -3
  90. package/dist/chunks/persistence-manager.mjs +19 -12
  91. package/dist/chunks/persistence.mjs +5 -3
  92. package/dist/chunks/plugin.mjs +2 -2
  93. package/dist/chunks/prompts.mjs +5 -5
  94. package/dist/chunks/providers.mjs +2 -2
  95. package/dist/chunks/quick-actions.mjs +7 -6
  96. package/dist/chunks/quick-provider.mjs +5 -4
  97. package/dist/chunks/quick-setup.mjs +20 -15
  98. package/dist/chunks/remote.mjs +15 -16
  99. package/dist/chunks/{convoy-manager.mjs → session-manager.mjs} +1129 -1095
  100. package/dist/chunks/session.mjs +2 -2
  101. package/dist/chunks/sessions.mjs +3 -3
  102. package/dist/chunks/silent-updater.mjs +1 -1
  103. package/dist/chunks/simple-config.mjs +2 -2
  104. package/dist/chunks/skill2.mjs +3 -3
  105. package/dist/chunks/skills-sync.mjs +5 -5
  106. package/dist/chunks/skills.mjs +3 -3
  107. package/dist/chunks/slash-commands.mjs +9 -8
  108. package/dist/chunks/smart-defaults.mjs +9 -5
  109. package/dist/chunks/startup.mjs +1 -1
  110. package/dist/chunks/stats.mjs +2 -2
  111. package/dist/chunks/status.mjs +37 -22
  112. package/dist/chunks/team.mjs +3 -3
  113. package/dist/chunks/thinking.mjs +4 -4
  114. package/dist/chunks/trace.mjs +2 -2
  115. package/dist/chunks/uninstall.mjs +9 -9
  116. package/dist/chunks/update.mjs +14 -11
  117. package/dist/chunks/upgrade-manager.mjs +3 -3
  118. package/dist/chunks/upgrade.mjs +25 -9
  119. package/dist/chunks/version-checker.mjs +4 -4
  120. package/dist/chunks/vim.mjs +3 -3
  121. package/dist/chunks/workflows.mjs +1 -1
  122. package/dist/chunks/wsl.mjs +1 -1
  123. package/dist/chunks/zero-config.mjs +4 -4
  124. package/dist/cli.mjs +60 -26
  125. package/dist/index.d.mts +4392 -4392
  126. package/dist/index.d.ts +4392 -4392
  127. package/dist/index.mjs +4314 -4314
  128. package/dist/shared/{ccjk.DcKLglJQ.mjs → ccjk.BIxuVL3_.mjs} +2 -2
  129. package/dist/shared/{ccjk.DJdmgr2d.mjs → ccjk.BJMRY2Ra.mjs} +5 -3
  130. package/dist/shared/{ccjk.B1TwPltj.mjs → ccjk.BOu1yav7.mjs} +3 -2
  131. package/dist/shared/{ccjk.mJpVRDZ8.mjs → ccjk.BWFpnOr3.mjs} +1 -1
  132. package/dist/shared/{ccjk.BfIpomdz.mjs → ccjk.CHUEFqmw.mjs} +3 -2
  133. package/dist/shared/{ccjk.CqdbaXqU.mjs → ccjk.CLUL0pAV.mjs} +9 -5
  134. package/dist/shared/{ccjk.Cot9p9_n.mjs → ccjk.Cjj8SVrn.mjs} +1 -1
  135. package/dist/shared/{ccjk.CfrpIIKy.mjs → ccjk.Crd_nEfj.mjs} +38 -20
  136. package/dist/shared/{ccjk.DCw2WnZU.mjs → ccjk.CvChMYvB.mjs} +1 -1
  137. package/dist/shared/{ccjk.CXzjn01x.mjs → ccjk.D8ZLYSZZ.mjs} +1 -1
  138. package/dist/shared/{ccjk.BrPUmTqm.mjs → ccjk.DJuyfrlL.mjs} +164 -82
  139. package/dist/shared/{ccjk.DHXfsrwn.mjs → ccjk.DRfdq6yl.mjs} +4 -4
  140. package/dist/shared/{ccjk.DXRAZcix.mjs → ccjk.DScm_NnL.mjs} +8 -4
  141. package/dist/shared/{ccjk.XsJWJuQP.mjs → ccjk.DfZKjHvG.mjs} +6 -128
  142. package/dist/shared/{ccjk.BFxsJM0k.mjs → ccjk.DwSebGy0.mjs} +4 -3
  143. package/dist/shared/ccjk.DxWqH-EF.mjs +170 -0
  144. package/dist/shared/{ccjk.Cwa_FiTX.mjs → ccjk.I6IuYdc_.mjs} +2 -2
  145. package/dist/shared/{ccjk.DpstNaeR.mjs → ccjk.KpFl2RDA.mjs} +3 -3
  146. package/dist/shared/{ccjk.dYDLfmph.mjs → ccjk._dESH4Rk.mjs} +1 -1
  147. package/dist/shared/{ccjk.BxSmJ8B7.mjs → ccjk.wLJHO0Af.mjs} +2 -1
  148. package/package.json +65 -67
  149. package/dist/chunks/index15.mjs +0 -218
  150. package/dist/shared/{ccjk.c-ETfBZ_.mjs → ccjk.eIn-g1yI.mjs} +96 -96
@@ -1,194 +1,218 @@
1
- import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2
- import { homedir } from 'node:os';
1
+ import { promisify } from 'node:util';
2
+ import childProcess from 'node:child_process';
3
+ import fs, { constants } from 'node:fs/promises';
3
4
  import process__default from 'node:process';
4
- import { i as installSuperpowers } from '../shared/ccjk.dYDLfmph.mjs';
5
- import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
6
- import 'node:child_process';
7
- import 'node:fs/promises';
8
- import 'node:util';
9
- import './index6.mjs';
10
- import 'node:url';
11
-
12
- const CORE_SKILLS = [
13
- "brainstorming",
14
- "writing-plans",
15
- "executing-plans",
16
- "systematic-debugging",
17
- "test-driven-development",
18
- "using-git-worktrees"
19
- ];
20
-
21
- function getSuperpowersDir$1() {
22
- return join(homedir(), ".claude", "plugins", "superpowers");
23
- }
24
- function isSuperpowersInstalled() {
25
- const superpowersDir = getSuperpowersDir$1();
26
- return existsSync(superpowersDir) && existsSync(join(superpowersDir, "skills"));
27
- }
28
- function areCoreSkillsInstalled() {
29
- const skillsDir = join(getSuperpowersDir$1(), "skills");
30
- if (!existsSync(skillsDir)) {
31
- return false;
32
- }
33
- for (const skill of CORE_SKILLS) {
34
- const skillPath = join(skillsDir, skill);
35
- if (!existsSync(skillPath) || !existsSync(join(skillPath, "skill.json"))) {
36
- return false;
37
- }
38
- }
39
- return true;
40
- }
41
- async function autoInstallSuperpowers(lang = "zh-CN") {
42
- try {
43
- if (isSuperpowersInstalled() && areCoreSkillsInstalled()) {
44
- return true;
45
- }
46
- const result = await installSuperpowers({
47
- lang,
48
- skipPrompt: true
49
- // Skip user prompts for silent installation
50
- });
51
- if (!result.success) {
52
- if (process__default.env.DEBUG) {
53
- console.error("[CCJK Zero-Config] Installation failed:", result.error || result.message);
54
- }
55
- return false;
56
- }
57
- return isSuperpowersInstalled() && areCoreSkillsInstalled();
58
- } catch (error) {
59
- if (process__default.env.DEBUG) {
60
- console.error("[CCJK Zero-Config] Auto-install failed:", error);
61
- }
62
- return false;
63
- }
64
- }
5
+ import os__default from 'node:os';
6
+ import fs__default from 'node:fs';
7
+ import 'node:buffer';
65
8
 
66
- function getSkillsDir() {
67
- return join(homedir(), ".claude", "plugins", "superpowers", "skills");
68
- }
69
- function isSkillInstalled(skillName) {
70
- const skillPath = join(getSkillsDir(), skillName);
71
- return existsSync(skillPath) && existsSync(join(skillPath, "skill.json"));
72
- }
73
- async function loadSkill(skillName) {
74
- try {
75
- if (!isSkillInstalled(skillName)) {
76
- return {
77
- skill: skillName,
78
- success: false,
79
- error: "Skill not installed"
80
- };
81
- }
82
- const skillJsonPath = join(getSkillsDir(), skillName, "skill.json");
83
- const skillJson = JSON.parse(readFileSync(skillJsonPath, "utf-8"));
84
- if (!skillJson.name || !skillJson.version) {
85
- return {
86
- skill: skillName,
87
- success: false,
88
- error: "Invalid skill.json format"
89
- };
90
- }
91
- return {
92
- skill: skillName,
93
- success: true
94
- };
95
- } catch (error) {
96
- return {
97
- skill: skillName,
98
- success: false,
99
- error: error instanceof Error ? error.message : "Unknown error"
100
- };
101
- }
102
- }
103
- async function loadCoreSkills(_lang = "zh-CN") {
104
- const results = await Promise.all(
105
- CORE_SKILLS.map((skill) => loadSkill(skill))
106
- );
107
- if (process__default.env.DEBUG) {
108
- const successful = results.filter((r) => r.success);
109
- const failed = results.filter((r) => !r.success);
110
- console.log(`[Zero-Config] Loaded ${successful.length}/${CORE_SKILLS.length} core skills`);
111
- if (failed.length > 0) {
112
- console.log(`[Zero-Config] Failed skills: ${failed.map((r) => r.skill).join(", ")}`);
113
- }
114
- }
115
- return results;
116
- }
9
+ let isDockerCached;
117
10
 
118
- function getActivationStatePath() {
119
- return join(homedir(), ".claude", "plugins", "superpowers", ".activation-state.json");
120
- }
121
- function getSuperpowersDir() {
122
- return join(homedir(), ".claude", "plugins", "superpowers");
11
+ function hasDockerEnv() {
12
+ try {
13
+ fs__default.statSync('/.dockerenv');
14
+ return true;
15
+ } catch {
16
+ return false;
17
+ }
123
18
  }
124
- function loadActivationState() {
125
- try {
126
- const statePath = getActivationStatePath();
127
- if (!existsSync(statePath)) {
128
- return null;
129
- }
130
- const stateJson = readFileSync(statePath, "utf-8");
131
- return JSON.parse(stateJson);
132
- } catch (error) {
133
- if (process__default.env.DEBUG) {
134
- console.error("[Zero-Config] Failed to load activation state:", error);
135
- }
136
- return null;
137
- }
19
+
20
+ function hasDockerCGroup() {
21
+ try {
22
+ return fs__default.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
23
+ } catch {
24
+ return false;
25
+ }
138
26
  }
139
- function saveActivationState(status) {
140
- try {
141
- const statePath = getActivationStatePath();
142
- writeFileSync(statePath, JSON.stringify(status, null, 2), "utf-8");
143
- } catch (error) {
144
- if (process__default.env.DEBUG) {
145
- console.error("[Zero-Config] Failed to save activation state:", error);
146
- }
147
- }
27
+
28
+ function isDocker() {
29
+ // TODO: Use `??=` when targeting Node.js 16.
30
+ if (isDockerCached === undefined) {
31
+ isDockerCached = hasDockerEnv() || hasDockerCGroup();
32
+ }
33
+
34
+ return isDockerCached;
148
35
  }
149
- function checkActivationStatus() {
150
- const superpowersInstalled = existsSync(getSuperpowersDir());
151
- const savedState = loadActivationState();
152
- if (savedState) {
153
- return savedState;
154
- }
155
- return {
156
- isInstalled: superpowersInstalled,
157
- coreSkillsLoaded: false,
158
- loadedSkills: [],
159
- needsActivation: true,
160
- lastActivation: void 0
161
- };
36
+
37
+ let cachedResult;
38
+
39
+ // Podman detection
40
+ const hasContainerEnv = () => {
41
+ try {
42
+ fs__default.statSync('/run/.containerenv');
43
+ return true;
44
+ } catch {
45
+ return false;
46
+ }
47
+ };
48
+
49
+ function isInsideContainer() {
50
+ // TODO: Use `??=` when targeting Node.js 16.
51
+ if (cachedResult === undefined) {
52
+ cachedResult = hasContainerEnv() || isDocker();
53
+ }
54
+
55
+ return cachedResult;
162
56
  }
163
- async function activateSuperpowers(lang = "zh-CN") {
164
- const currentStatus = checkActivationStatus();
165
- if (!currentStatus.needsActivation) {
166
- return currentStatus;
167
- }
168
- if (!currentStatus.isInstalled) {
169
- const installSuccess = await autoInstallSuperpowers(lang);
170
- if (!installSuccess) {
171
- return {
172
- isInstalled: false,
173
- coreSkillsLoaded: false,
174
- loadedSkills: [],
175
- needsActivation: true,
176
- lastActivation: void 0
177
- };
178
- }
179
- }
180
- const loadResults = await loadCoreSkills(lang);
181
- const successfulLoads = loadResults.filter((r) => r.success);
182
- const allCoreSkillsLoaded = successfulLoads.length === loadResults.length;
183
- const newStatus = {
184
- isInstalled: true,
185
- coreSkillsLoaded: allCoreSkillsLoaded,
186
- loadedSkills: successfulLoads.map((r) => r.skill),
187
- needsActivation: false,
188
- lastActivation: (/* @__PURE__ */ new Date()).toISOString()
189
- };
190
- saveActivationState(newStatus);
191
- return newStatus;
57
+
58
+ const isWsl = () => {
59
+ if (process__default.platform !== 'linux') {
60
+ return false;
61
+ }
62
+
63
+ if (os__default.release().toLowerCase().includes('microsoft')) {
64
+ if (isInsideContainer()) {
65
+ return false;
66
+ }
67
+
68
+ return true;
69
+ }
70
+
71
+ try {
72
+ if (fs__default.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')) {
73
+ return !isInsideContainer();
74
+ }
75
+ } catch {}
76
+
77
+ // Fallback for custom kernels: check WSL-specific paths.
78
+ if (
79
+ fs__default.existsSync('/proc/sys/fs/binfmt_misc/WSLInterop')
80
+ || fs__default.existsSync('/run/WSL')
81
+ ) {
82
+ return !isInsideContainer();
83
+ }
84
+
85
+ return false;
86
+ };
87
+
88
+ const isWsl$1 = process__default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
89
+
90
+ promisify(childProcess.execFile);
91
+
92
+ const powerShellPath$1 = () => `${process__default.env.SYSTEMROOT || process__default.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
93
+
94
+ function parseMountPointFromConfig(content) {
95
+ for (const line of content.split('\n')) {
96
+ // Skip comment lines
97
+ if (/^\s*#/.test(line)) {
98
+ continue;
99
+ }
100
+
101
+ // Match root at start of line (after optional whitespace)
102
+ const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
103
+ if (!match) {
104
+ continue;
105
+ }
106
+
107
+ return match.groups.mountPoint
108
+ .trim()
109
+ // Strip surrounding quotes
110
+ .replaceAll(/^["']|["']$/g, '');
111
+ }
192
112
  }
193
113
 
194
- export { activateSuperpowers, autoInstallSuperpowers, checkActivationStatus, loadCoreSkills, loadSkill };
114
+ const execFile = promisify(childProcess.execFile);
115
+
116
+ const wslDrivesMountPoint = (() => {
117
+ // Default value for "root" param
118
+ // according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config
119
+ const defaultMountPoint = '/mnt/';
120
+
121
+ let mountPoint;
122
+
123
+ return async function () {
124
+ if (mountPoint) {
125
+ // Return memoized mount point value
126
+ return mountPoint;
127
+ }
128
+
129
+ const configFilePath = '/etc/wsl.conf';
130
+
131
+ let isConfigFileExists = false;
132
+ try {
133
+ await fs.access(configFilePath, constants.F_OK);
134
+ isConfigFileExists = true;
135
+ } catch {}
136
+
137
+ if (!isConfigFileExists) {
138
+ return defaultMountPoint;
139
+ }
140
+
141
+ const configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});
142
+ const parsedMountPoint = parseMountPointFromConfig(configContent);
143
+
144
+ if (parsedMountPoint === undefined) {
145
+ return defaultMountPoint;
146
+ }
147
+
148
+ mountPoint = parsedMountPoint;
149
+ mountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`;
150
+
151
+ return mountPoint;
152
+ };
153
+ })();
154
+
155
+ const powerShellPathFromWsl = async () => {
156
+ const mountPoint = await wslDrivesMountPoint();
157
+ return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
158
+ };
159
+
160
+ const powerShellPath = isWsl$1 ? powerShellPathFromWsl : powerShellPath$1;
161
+
162
+ // Cache for PowerShell accessibility check
163
+ let canAccessPowerShellPromise;
164
+
165
+ const canAccessPowerShell = async () => {
166
+ canAccessPowerShellPromise ??= (async () => {
167
+ try {
168
+ const psPath = await powerShellPath();
169
+ await fs.access(psPath, constants.X_OK);
170
+ return true;
171
+ } catch {
172
+ // PowerShell is not accessible (either doesn't exist, no execute permission, or other error)
173
+ return false;
174
+ }
175
+ })();
176
+
177
+ return canAccessPowerShellPromise;
178
+ };
179
+
180
+ const isUrl = path => /^[a-z]+:\/\//i.test(path);
181
+
182
+ const convertWslPathToWindows = async paths => {
183
+ const isBatch = Array.isArray(paths);
184
+ const pathArray = isBatch ? paths : [paths];
185
+
186
+ // Find indices of non-URL paths that need conversion
187
+ const indicesToConvert = [];
188
+ const pathsToConvert = [];
189
+
190
+ for (const [index, path] of pathArray.entries()) {
191
+ if (!isUrl(path)) {
192
+ indicesToConvert.push(index);
193
+ pathsToConvert.push(path);
194
+ }
195
+ }
196
+
197
+ // Start with original paths (URLs stay as-is)
198
+ const results = [...pathArray];
199
+
200
+ if (pathsToConvert.length > 0) {
201
+ try {
202
+ const {stdout} = await execFile('wslpath', ['-aw', ...pathsToConvert], {encoding: 'utf8'});
203
+ const convertedPaths = stdout.split(/\r?\n/).filter(Boolean);
204
+
205
+ for (const [index, originalIndex] of indicesToConvert.entries()) {
206
+ results[originalIndex] = convertedPaths[index] ?? pathArray[originalIndex];
207
+ }
208
+ } catch {
209
+ // If wslpath fails, keep original paths
210
+ }
211
+ }
212
+
213
+ return isBatch ? results : results[0];
214
+ };
215
+
216
+ const isUncPath = path => /^\\\\/u.test(path);
217
+
218
+ export { canAccessPowerShell, convertWslPathToWindows, isUncPath, isWsl$1 as isWsl, powerShellPath, powerShellPathFromWsl, wslDrivesMountPoint };
@@ -1,24 +1,19 @@
1
- export { c as configureOfficialMode, a as configureSimpleMode, b as configureWithPreset, e as detectCurrentMode, d as displayCurrentStatus, g as getCurrentConfig, q as quickSetup, r as runConfigWizard, t as testApiConnection, v as validateApiKey } from '../shared/ccjk.Cwa_FiTX.mjs';
2
- export { P as PROVIDER_PRESETS, g as getAllPresets, a as getChinesePresets, b as getPresetById, c as getRecommendedPresets } from '../shared/ccjk.DopKzo3z.mjs';
3
- import './index3.mjs';
4
- import '../shared/ccjk.BAGoDD49.mjs';
5
- import './index4.mjs';
6
- import 'node:readline';
7
- import 'stream';
8
- import 'node:tty';
9
- import 'node:process';
10
- import 'node:async_hooks';
11
- import '../shared/ccjk.Cjgrln_h.mjs';
12
- import 'node:util';
13
- import 'tty';
14
- import 'fs';
15
- import 'child_process';
16
- import 'node:path';
17
- import 'node:os';
18
- import 'node:crypto';
19
- import 'buffer';
20
- import 'string_decoder';
21
- import 'node:fs';
22
- import './fs-operations.mjs';
23
- import 'node:fs/promises';
24
- import '../shared/ccjk.bQ7Dh1g4.mjs';
1
+ import { g as getDefaultExportFromCjs } from '../shared/ccjk.BAGoDD49.mjs';
2
+
3
+ var ansis = {exports: {}};
4
+
5
+ var hasRequiredAnsis;
6
+
7
+ function requireAnsis () {
8
+ if (hasRequiredAnsis) return ansis.exports;
9
+ hasRequiredAnsis = 1;
10
+ let e,t,r,{defineProperty:l,setPrototypeOf:n,create:o,keys:s}=Object,i="",{round:c,max:a}=Math,p=e=>{let t=/([a-f\d]{3,6})/i.exec(e)?.[1],r=t?.length,l=parseInt(6^r?3^r?"0":t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,16);return [l>>16&255,l>>8&255,255&l]},u=(e,t,r)=>e^t||t^r?16+36*c(e/51)+6*c(t/51)+c(r/51):8>e?16:e>248?231:c(24*(e-8)/247)+232,d=e=>{let t,r,l,n,o;return 8>e?30+e:16>e?e-8+90:(232>e?(o=(e-=16)%36,t=(e/36|0)/5,r=(o/6|0)/5,l=o%6/5):t=r=l=(10*(e-232)+8)/255,n=2*a(t,r,l),n?30+(c(l)<<2|c(r)<<1|c(t))+(2^n?0:60):30)},f=(()=>{let r=e=>o.some((t=>e.test(t))),l=globalThis,n=l.process??{},o=n.argv??[],i=n.env??{},c=-1;try{e=","+s(i).join(",");}catch(e){i={},c=0;}let a="FORCE_COLOR",p={false:0,0:0,1:1,2:2,3:3}[i[a]]??-1,u=a in i&&p||r(/^--color=?(true|always)?$/);return u&&(c=p),~c||(c=((r,l,n)=>(t=r.TERM,{"24bit":3,truecolor:3,ansi256:2,ansi:1}[r.COLORTERM]||(r.CI?/,GITHUB/.test(e)?3:1:l&&"dumb"!==t?n?3:/-256/.test(t)?2:1:0)))(i,!!i.PM2_HOME||i.NEXT_RUNTIME?.includes("edge")||!!n.stdout?.isTTY,"win32"===n.platform)),!p||i.NO_COLOR||r(/^--(no-color|color=(false|never))$/)?0:l.window?.chrome||u&&!c?3:c})(),g={open:i,close:i},h=39,b=49,O={},m=({p:e},{open:t,close:l})=>{let o=(e,...r)=>{if(!e){if(t&&t===l)return t;if((e??i)===i)return i}let n,s=e.raw?String.raw({raw:e},...r):i+e,c=o.p,a=c.o,p=c.c;if(s.includes(""))for(;c;c=c.p){let{open:e,close:t}=c,r=t.length,l=i,o=0;if(r)for(;~(n=s.indexOf(t,o));o=n+r)l+=s.slice(o,n)+e;s=l+s.slice(o);}return a+(s.includes("\n")?s.replace(/(\r?\n)/g,p+"$1"+a):s)+p},s=t,c=l;return e&&(s=e.o+t,c=l+e.c),n(o,r),o.p={open:t,close:l,o:s,c,p:e},o.open=s,o.close=c,o};const w=new function e(t=f){let s={Ansis:e,level:t,isSupported:()=>a,strip:e=>e.replace(/[›][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,i),extend(e){for(let t in e){let r=e[t],l=(typeof r)[0];"s"===l?(c(t,T(...p(r))),c(_(t),v(...p(r)))):c(t,r,"f"===l);}return r=o({},O),n(s,r),s}},c=(e,t,r)=>{O[e]={get(){let n=r?(...e)=>m(this,t(...e)):m(this,t);return l(this,e,{value:n}),n}};},a=t>0,w=(e,t)=>a?{open:`[${e}m`,close:`[${t}m`}:g,y=e=>t=>e(...p(t)),R=(e,t)=>(r,l,n)=>w(`${e}8;2;${r};${l};${n}`,t),$=(e,t)=>(r,l,n)=>w(((e,t,r)=>d(u(e,t,r)))(r,l,n)+e,t),x=e=>(t,r,l)=>e(u(t,r,l)),T=R(3,h),v=R(4,b),C=e=>w("38;5;"+e,h),E=e=>w("48;5;"+e,b);2===t?(T=x(C),v=x(E)):1===t&&(T=$(0,h),v=$(10,b),C=e=>w(d(e),h),E=e=>w(d(e)+10,b));let M,I={fg:C,bg:E,rgb:T,bgRgb:v,hex:y(T),bgHex:y(v),visible:g,reset:w(0,0),bold:w(1,22),dim:w(2,22),italic:w(3,23),underline:w(4,24),inverse:w(7,27),hidden:w(8,28),strikethrough:w(9,29)},_=e=>"bg"+e[0].toUpperCase()+e.slice(1),k="Bright";return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e,t)=>{M=_(e),8>t?(I[e+k]=w(90+t,h),I[M+k]=w(100+t,b)):t=60,I[e]=w(30+t,h),I[M]=w(40+t,b);})),s.extend(I)};ansis.exports=w,w.default=w;
11
+ return ansis.exports;
12
+ }
13
+
14
+ var ansisExports = /*@__PURE__*/ requireAnsis();
15
+ const a = /*@__PURE__*/getDefaultExportFromCjs(ansisExports);
16
+
17
+ const {Ansis,fg,bg,rgb,bgRgb,hex,bgHex,reset,inverse,hidden,visible,bold,dim,italic,underline,strikethrough,black,red,green,yellow,blue,magenta,cyan,white,gray,redBright,greenBright,yellowBright,blueBright,magentaBright,cyanBright,whiteBright,bgBlack,bgRed,bgGreen,bgYellow,bgBlue,bgMagenta,bgCyan,bgWhite,bgGray,bgRedBright,bgGreenBright,bgYellowBright,bgBlueBright,bgMagentaBright,bgCyanBright,bgWhiteBright}=a;
18
+
19
+ export { Ansis, bg, bgBlack, bgBlue, bgBlueBright, bgCyan, bgCyanBright, bgGray, bgGreen, bgGreenBright, bgHex, bgMagenta, bgMagentaBright, bgRed, bgRedBright, bgRgb, bgWhite, bgWhiteBright, bgYellow, bgYellowBright, black, blue, blueBright, bold, cyan, cyanBright, a as default, dim, fg, gray, green, greenBright, hex, hidden, inverse, italic, magenta, magentaBright, red, redBright, reset, rgb, strikethrough, underline, visible, white, whiteBright, yellow, yellowBright };