claudekit-cli 4.4.0-dev.7 → 4.4.0-dev.9
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.
- package/cli-manifest.json +3 -3
- package/dist/index.js +830 -679
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -54841,6 +54841,7 @@ function rewriteCommandPath(command, pathRewrite) {
|
|
|
54841
54841
|
if (pathRewrite.commandSubstitutions && pathRewrite.commandSubstitutions.size > 0) {
|
|
54842
54842
|
const home3 = homedir25();
|
|
54843
54843
|
const homeForward = normalizeSlashes(home3);
|
|
54844
|
+
const projectDirForward = pathRewrite.projectDir ? normalizeSlashes(pathRewrite.projectDir) : null;
|
|
54844
54845
|
for (const [originalAbsPath, wrapperAbsPath] of pathRewrite.commandSubstitutions) {
|
|
54845
54846
|
const originalAbsForward = normalizeSlashes(originalAbsPath);
|
|
54846
54847
|
let relFromHome = null;
|
|
@@ -54849,34 +54850,84 @@ function rewriteCommandPath(command, pathRewrite) {
|
|
|
54849
54850
|
} else if (originalAbsForward === homeForward) {
|
|
54850
54851
|
relFromHome = "";
|
|
54851
54852
|
}
|
|
54853
|
+
let relFromProject = null;
|
|
54854
|
+
if (projectDirForward !== null) {
|
|
54855
|
+
if (originalAbsForward.startsWith(`${projectDirForward}/`)) {
|
|
54856
|
+
relFromProject = originalAbsForward.slice(projectDirForward.length + 1);
|
|
54857
|
+
} else if (originalAbsForward === projectDirForward) {
|
|
54858
|
+
relFromProject = "";
|
|
54859
|
+
}
|
|
54860
|
+
}
|
|
54861
|
+
const wrapperForward = normalizeSlashes(wrapperAbsPath);
|
|
54852
54862
|
const candidates = [
|
|
54853
|
-
originalAbsForward,
|
|
54854
|
-
originalAbsPath
|
|
54863
|
+
{ text: originalAbsForward, replacement: wrapperForward },
|
|
54864
|
+
{ text: originalAbsPath, replacement: wrapperForward }
|
|
54855
54865
|
];
|
|
54856
54866
|
if (relFromHome !== null && relFromHome !== "") {
|
|
54857
|
-
candidates.push(`$HOME/${relFromHome}
|
|
54858
|
-
candidates.push(`~/${relFromHome}
|
|
54859
|
-
candidates.push(`%USERPROFILE%/${relFromHome}
|
|
54860
|
-
candidates.push(`\${HOME}/${relFromHome}
|
|
54867
|
+
candidates.push({ text: `$HOME/${relFromHome}`, replacement: wrapperForward });
|
|
54868
|
+
candidates.push({ text: `~/${relFromHome}`, replacement: wrapperForward });
|
|
54869
|
+
candidates.push({ text: `%USERPROFILE%/${relFromHome}`, replacement: wrapperForward });
|
|
54870
|
+
candidates.push({ text: `\${HOME}/${relFromHome}`, replacement: wrapperForward });
|
|
54871
|
+
}
|
|
54872
|
+
if (relFromProject !== null && relFromProject !== "") {
|
|
54873
|
+
candidates.push({
|
|
54874
|
+
text: `"$CLAUDE_PROJECT_DIR/${relFromProject}"`,
|
|
54875
|
+
replacement: `"${wrapperForward}"`
|
|
54876
|
+
});
|
|
54877
|
+
candidates.push({
|
|
54878
|
+
text: `"$CLAUDE_PROJECT_DIR"/${relFromProject}`,
|
|
54879
|
+
replacement: `"${wrapperForward}"`
|
|
54880
|
+
});
|
|
54881
|
+
candidates.push({
|
|
54882
|
+
text: `"\${CLAUDE_PROJECT_DIR}"/${relFromProject}`,
|
|
54883
|
+
replacement: `"${wrapperForward}"`
|
|
54884
|
+
});
|
|
54885
|
+
candidates.push({
|
|
54886
|
+
text: `"%CLAUDE_PROJECT_DIR%"/${relFromProject}`,
|
|
54887
|
+
replacement: `"${wrapperForward}"`
|
|
54888
|
+
});
|
|
54889
|
+
candidates.push({
|
|
54890
|
+
text: `\${CLAUDE_PROJECT_DIR}/${relFromProject}`,
|
|
54891
|
+
replacement: wrapperForward
|
|
54892
|
+
});
|
|
54893
|
+
candidates.push({
|
|
54894
|
+
text: `$CLAUDE_PROJECT_DIR/${relFromProject}`,
|
|
54895
|
+
replacement: wrapperForward
|
|
54896
|
+
});
|
|
54897
|
+
candidates.push({
|
|
54898
|
+
text: `%CLAUDE_PROJECT_DIR%/${relFromProject}`,
|
|
54899
|
+
replacement: `"${wrapperForward}"`
|
|
54900
|
+
});
|
|
54861
54901
|
}
|
|
54862
|
-
const
|
|
54863
|
-
|
|
54864
|
-
const candidateNorm = normalizeSlashes(candidate);
|
|
54902
|
+
for (const { text, replacement } of candidates) {
|
|
54903
|
+
const candidateNorm = normalizeSlashes(text);
|
|
54865
54904
|
const rewrittenNorm = normalizeSlashes(rewritten);
|
|
54866
54905
|
if (rewrittenNorm.includes(candidateNorm)) {
|
|
54867
|
-
rewritten = replaceCommandCandidate(rewrittenNorm, candidateNorm,
|
|
54906
|
+
rewritten = replaceCommandCandidate(rewrittenNorm, candidateNorm, replacement);
|
|
54868
54907
|
}
|
|
54869
54908
|
}
|
|
54870
54909
|
}
|
|
54871
54910
|
}
|
|
54872
54911
|
const src = normalizeSlashes(pathRewrite.sourceDir.endsWith("/") || pathRewrite.sourceDir.endsWith("\\") ? pathRewrite.sourceDir : `${pathRewrite.sourceDir}/`);
|
|
54873
54912
|
const tgt = normalizeSlashes(pathRewrite.targetDir.endsWith("/") || pathRewrite.targetDir.endsWith("\\") ? pathRewrite.targetDir : `${pathRewrite.targetDir}/`);
|
|
54874
|
-
if (src
|
|
54875
|
-
|
|
54876
|
-
|
|
54877
|
-
|
|
54878
|
-
|
|
54879
|
-
|
|
54913
|
+
if (src !== tgt) {
|
|
54914
|
+
const normalizedRewritten = normalizeSlashes(rewritten);
|
|
54915
|
+
if (normalizedRewritten.includes(src)) {
|
|
54916
|
+
rewritten = normalizedRewritten.replaceAll(src, tgt);
|
|
54917
|
+
}
|
|
54918
|
+
}
|
|
54919
|
+
if (pathRewrite.projectDir) {
|
|
54920
|
+
const pd = normalizeSlashes(pathRewrite.projectDir);
|
|
54921
|
+
rewritten = rewritten.replace(/"(\$CLAUDE_PROJECT_DIR)(\/[^"]+)"/g, (_match, _varRef, suffix) => `"${pd}${suffix}"`);
|
|
54922
|
+
rewritten = rewritten.replace(/"(\$CLAUDE_PROJECT_DIR)"(\/[^\s"';&|()]*)?/g, (_match, _varRef, suffix) => `"${pd}${suffix ?? ""}"`);
|
|
54923
|
+
rewritten = rewritten.replace(/"\$\{CLAUDE_PROJECT_DIR\}"(\/[^\s"';&|()]*)?/g, (_match, suffix) => `"${pd}${suffix ?? ""}"`);
|
|
54924
|
+
rewritten = rewritten.replace(/\$\{CLAUDE_PROJECT_DIR\}(\/[^\s"';&|()]*)?/g, (_match, suffix) => `"${pd}${suffix ?? ""}"`);
|
|
54925
|
+
rewritten = rewritten.replace(/"%CLAUDE_PROJECT_DIR%(\/[^"]+)"/g, (_match, suffix) => `"${pd}${suffix}"`);
|
|
54926
|
+
rewritten = rewritten.replace(/"%CLAUDE_PROJECT_DIR%"(\/[^\s"';&|()]*)?/g, (_match, suffix) => `"${pd}${suffix ?? ""}"`);
|
|
54927
|
+
rewritten = rewritten.replace(/%CLAUDE_PROJECT_DIR%(\/[^\s"';&|()]*)?(?=[\s"']|$)/g, (_match, suffix) => `"${pd}${suffix ?? ""}"`);
|
|
54928
|
+
rewritten = rewritten.replace(/\$CLAUDE_PROJECT_DIR(?![A-Za-z0-9_])(\/[^\s"';&|()]*)?/g, (_match, suffix) => `"${pd}${suffix ?? ""}"`);
|
|
54929
|
+
}
|
|
54930
|
+
return rewritten;
|
|
54880
54931
|
}
|
|
54881
54932
|
function replaceCommandCandidate(command, candidate, replacement) {
|
|
54882
54933
|
if (!isRelativeCommandCandidate(candidate)) {
|
|
@@ -54886,7 +54937,7 @@ function replaceCommandCandidate(command, candidate, replacement) {
|
|
|
54886
54937
|
return command.replace(pattern, (_match, prefix) => `${prefix}${replacement}`);
|
|
54887
54938
|
}
|
|
54888
54939
|
function isRelativeCommandCandidate(candidate) {
|
|
54889
|
-
return !candidate.startsWith("/") && !candidate.startsWith("$HOME/") && !candidate.startsWith("~/");
|
|
54940
|
+
return !candidate.startsWith("/") && !candidate.startsWith("$HOME/") && !candidate.startsWith("~/") && !candidate.startsWith('"') && !candidate.startsWith("$CLAUDE_PROJECT_DIR") && !candidate.startsWith("${CLAUDE_PROJECT_DIR}") && !candidate.startsWith("%CLAUDE_PROJECT_DIR%");
|
|
54890
54941
|
}
|
|
54891
54942
|
function escapeRegExp2(value) {
|
|
54892
54943
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -55115,7 +55166,8 @@ async function mergeHooksIntoSettings(targetSettingsPath, newHooks, options2 = {
|
|
|
55115
55166
|
}
|
|
55116
55167
|
const existingHooks = existingSettings.hooks ?? {};
|
|
55117
55168
|
const incompatibleCleanup = pruneIncompatibleHookRegistrations(existingHooks, options2);
|
|
55118
|
-
const
|
|
55169
|
+
const brokenCleanup = pruneVariableTokenBrokenEntries(incompatibleCleanup.hooks, options2);
|
|
55170
|
+
const pruned = pruneStaleFileHooks(brokenCleanup.hooks);
|
|
55119
55171
|
const merged = deduplicateMerge(pruned, newHooks);
|
|
55120
55172
|
existingSettings.hooks = merged;
|
|
55121
55173
|
const dir = dirname16(targetSettingsPath);
|
|
@@ -55128,7 +55180,10 @@ async function mergeHooksIntoSettings(targetSettingsPath, newHooks, options2 = {
|
|
|
55128
55180
|
await rm6(tempPath, { force: true });
|
|
55129
55181
|
throw new Error(`Failed to write settings: ${err}. Backup preserved at: ${backupPath}`);
|
|
55130
55182
|
}
|
|
55131
|
-
return {
|
|
55183
|
+
return {
|
|
55184
|
+
backupPath,
|
|
55185
|
+
hooksPruned: incompatibleCleanup.hooksPruned + brokenCleanup.hooksPruned
|
|
55186
|
+
};
|
|
55132
55187
|
}
|
|
55133
55188
|
function pruneIncompatibleHookRegistrations(hooks, options2) {
|
|
55134
55189
|
if (options2.targetProvider !== "codex")
|
|
@@ -55157,6 +55212,32 @@ function pruneIncompatibleHookRegistrations(hooks, options2) {
|
|
|
55157
55212
|
}
|
|
55158
55213
|
return { hooks: pruned, hooksPruned };
|
|
55159
55214
|
}
|
|
55215
|
+
function pruneVariableTokenBrokenEntries(hooks, options2) {
|
|
55216
|
+
if (options2.targetProvider !== "codex")
|
|
55217
|
+
return { hooks, hooksPruned: 0 };
|
|
55218
|
+
const varPattern = /\$\{?CLAUDE_PROJECT_DIR\}?|%CLAUDE_PROJECT_DIR%/;
|
|
55219
|
+
const ckHookDirPattern = /\.claude\/hooks\/|\.codex\/hooks\//;
|
|
55220
|
+
let hooksPruned = 0;
|
|
55221
|
+
const result = {};
|
|
55222
|
+
for (const [event, groups] of Object.entries(hooks)) {
|
|
55223
|
+
const keptGroups = [];
|
|
55224
|
+
for (const group of groups) {
|
|
55225
|
+
const keptHooks = group.hooks.filter((entry) => {
|
|
55226
|
+
const cmd = entry.command;
|
|
55227
|
+
if (varPattern.test(cmd) && ckHookDirPattern.test(cmd)) {
|
|
55228
|
+
hooksPruned += 1;
|
|
55229
|
+
return false;
|
|
55230
|
+
}
|
|
55231
|
+
return true;
|
|
55232
|
+
});
|
|
55233
|
+
if (keptHooks.length > 0)
|
|
55234
|
+
keptGroups.push({ ...group, hooks: keptHooks });
|
|
55235
|
+
}
|
|
55236
|
+
if (keptGroups.length > 0)
|
|
55237
|
+
result[event] = keptGroups;
|
|
55238
|
+
}
|
|
55239
|
+
return { hooks: result, hooksPruned };
|
|
55240
|
+
}
|
|
55160
55241
|
function commandTargetsHookDir(command, targetHooksDir) {
|
|
55161
55242
|
const normalizedCommand = command.replace(/\\/g, "/");
|
|
55162
55243
|
const normalizedDir = targetHooksDir.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
@@ -55423,6 +55504,7 @@ async function migrateHooksSettingsForCodex(options2) {
|
|
|
55423
55504
|
}
|
|
55424
55505
|
const resolvedSourcePath = isGlobal ? sourceSettingsPath : join44(process.cwd(), sourceSettingsPath);
|
|
55425
55506
|
const resolvedTargetPath = isGlobal ? targetSettingsPath : join44(process.cwd(), targetSettingsPath);
|
|
55507
|
+
const projectDir = isGlobal ? undefined : process.cwd();
|
|
55426
55508
|
const sourceHooksResult = await inspectHooksSettings(resolvedSourcePath);
|
|
55427
55509
|
if (sourceHooksResult.status === "missing-file") {
|
|
55428
55510
|
return {
|
|
@@ -55538,7 +55620,8 @@ async function migrateHooksSettingsForCodex(options2) {
|
|
|
55538
55620
|
const converted = convertClaudeHooksToCodex(filtered, capabilities, {
|
|
55539
55621
|
sourceDir: sourceHooksDir,
|
|
55540
55622
|
targetDir: effectiveTargetDir,
|
|
55541
|
-
commandSubstitutions: commandSubstitutions.size > 0 ? commandSubstitutions : undefined
|
|
55623
|
+
commandSubstitutions: commandSubstitutions.size > 0 ? commandSubstitutions : undefined,
|
|
55624
|
+
projectDir
|
|
55542
55625
|
});
|
|
55543
55626
|
let hooksRegistered = 0;
|
|
55544
55627
|
for (const groups of Object.values(converted)) {
|
|
@@ -55585,6 +55668,12 @@ async function migrateHooksSettingsForCodex(options2) {
|
|
|
55585
55668
|
const configTomlPath = isGlobal ? join44(homedir26(), ".codex", "config.toml") : join44(process.cwd(), ".codex", "config.toml");
|
|
55586
55669
|
const flagResult = await ensureCodexHooksFeatureFlag(configTomlPath, isGlobal);
|
|
55587
55670
|
featureFlagWritten = flagResult.status === "written" || flagResult.status === "updated";
|
|
55671
|
+
if (flagResult.status === "failed") {
|
|
55672
|
+
warnings.push({
|
|
55673
|
+
reason: "codex-feature-flag-write-failed",
|
|
55674
|
+
message: `Codex hooks are registered but enabling them failed: ${flagResult.error ?? "unknown error"}. Run \`ck migrate --agent codex\` again to retry.`
|
|
55675
|
+
});
|
|
55676
|
+
}
|
|
55588
55677
|
}
|
|
55589
55678
|
return {
|
|
55590
55679
|
status: "registered",
|
|
@@ -63853,7 +63942,7 @@ var package_default;
|
|
|
63853
63942
|
var init_package = __esm(() => {
|
|
63854
63943
|
package_default = {
|
|
63855
63944
|
name: "claudekit-cli",
|
|
63856
|
-
version: "4.4.0-dev.
|
|
63945
|
+
version: "4.4.0-dev.9",
|
|
63857
63946
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
63858
63947
|
type: "module",
|
|
63859
63948
|
repository: {
|
|
@@ -66223,6 +66312,315 @@ var init_claudekit_scanner = __esm(() => {
|
|
|
66223
66312
|
import_fs_extra7 = __toESM(require_lib(), 1);
|
|
66224
66313
|
});
|
|
66225
66314
|
|
|
66315
|
+
// src/ui/ck-cli-design/tokens.ts
|
|
66316
|
+
import { homedir as homedir41, platform as platform7 } from "node:os";
|
|
66317
|
+
import { resolve as resolve34, win32 } from "node:path";
|
|
66318
|
+
function createCliDesignContext(options2 = {}) {
|
|
66319
|
+
const env2 = options2.env ?? process.env;
|
|
66320
|
+
const isTTY2 = options2.isTTY ?? process.stdout.isTTY === true;
|
|
66321
|
+
const rawWidth = options2.columns ?? process.stdout.columns ?? DEFAULT_WIDTH;
|
|
66322
|
+
const width = Math.max(40, Math.min(rawWidth, PANEL_MAX_WIDTH));
|
|
66323
|
+
const currentPlatform = options2.platform ?? platform7();
|
|
66324
|
+
return {
|
|
66325
|
+
box: supportsCliUnicode({ env: env2, isTTY: isTTY2, platform: currentPlatform }) ? UNICODE_BOX : ASCII_BOX,
|
|
66326
|
+
platform: currentPlatform,
|
|
66327
|
+
rawWidth,
|
|
66328
|
+
supportsPanels: width >= PANEL_MIN_WIDTH,
|
|
66329
|
+
useColor: isTTY2 && !env2.NO_COLOR,
|
|
66330
|
+
width
|
|
66331
|
+
};
|
|
66332
|
+
}
|
|
66333
|
+
function supportsCliUnicode(options2) {
|
|
66334
|
+
const { env: env2, isTTY: isTTY2, platform: platform8 } = options2;
|
|
66335
|
+
if (env2.CK_FORCE_ASCII === "1" || env2.NO_UNICODE === "1")
|
|
66336
|
+
return false;
|
|
66337
|
+
if (env2.TERM === "dumb")
|
|
66338
|
+
return false;
|
|
66339
|
+
if (env2.WT_SESSION)
|
|
66340
|
+
return true;
|
|
66341
|
+
const ci = (env2.CI ?? "").trim().toLowerCase();
|
|
66342
|
+
if (ci === "true" || ci === "1")
|
|
66343
|
+
return true;
|
|
66344
|
+
if (!isTTY2)
|
|
66345
|
+
return false;
|
|
66346
|
+
if (env2.TERM_PROGRAM === "iTerm.app")
|
|
66347
|
+
return true;
|
|
66348
|
+
if (env2.TERM_PROGRAM === "Apple_Terminal")
|
|
66349
|
+
return true;
|
|
66350
|
+
if (env2.TERM_PROGRAM === "vscode")
|
|
66351
|
+
return true;
|
|
66352
|
+
if (env2.KONSOLE_VERSION)
|
|
66353
|
+
return true;
|
|
66354
|
+
const locale = `${env2.LANG ?? ""}${env2.LC_ALL ?? ""}`.toLowerCase();
|
|
66355
|
+
if (locale.includes("utf"))
|
|
66356
|
+
return true;
|
|
66357
|
+
if (platform8 === "win32")
|
|
66358
|
+
return false;
|
|
66359
|
+
return true;
|
|
66360
|
+
}
|
|
66361
|
+
function stripAnsi2(value) {
|
|
66362
|
+
let result = "";
|
|
66363
|
+
for (let index = 0;index < value.length; index += 1) {
|
|
66364
|
+
const code = value.charCodeAt(index);
|
|
66365
|
+
if (code !== 27) {
|
|
66366
|
+
result += value[index];
|
|
66367
|
+
continue;
|
|
66368
|
+
}
|
|
66369
|
+
const next = value[index + 1];
|
|
66370
|
+
if (next === "[") {
|
|
66371
|
+
index += 2;
|
|
66372
|
+
while (index < value.length) {
|
|
66373
|
+
const char = value.charCodeAt(index);
|
|
66374
|
+
if (char >= 64 && char <= 126)
|
|
66375
|
+
break;
|
|
66376
|
+
index += 1;
|
|
66377
|
+
}
|
|
66378
|
+
continue;
|
|
66379
|
+
}
|
|
66380
|
+
if (next === "]") {
|
|
66381
|
+
index += 2;
|
|
66382
|
+
while (index < value.length) {
|
|
66383
|
+
if (value.charCodeAt(index) === 7)
|
|
66384
|
+
break;
|
|
66385
|
+
if (value.charCodeAt(index) === 27 && value[index + 1] === "\\") {
|
|
66386
|
+
index += 1;
|
|
66387
|
+
break;
|
|
66388
|
+
}
|
|
66389
|
+
index += 1;
|
|
66390
|
+
}
|
|
66391
|
+
continue;
|
|
66392
|
+
}
|
|
66393
|
+
if (next !== undefined)
|
|
66394
|
+
index += 1;
|
|
66395
|
+
}
|
|
66396
|
+
return result;
|
|
66397
|
+
}
|
|
66398
|
+
function visibleWidth(value) {
|
|
66399
|
+
return stripAnsi2(value).length;
|
|
66400
|
+
}
|
|
66401
|
+
function padVisible(value, width) {
|
|
66402
|
+
const padding = Math.max(0, width - visibleWidth(value));
|
|
66403
|
+
return `${value}${" ".repeat(padding)}`;
|
|
66404
|
+
}
|
|
66405
|
+
function truncateMiddle(value, width) {
|
|
66406
|
+
if (width <= 0)
|
|
66407
|
+
return "";
|
|
66408
|
+
if (visibleWidth(value) <= width)
|
|
66409
|
+
return value;
|
|
66410
|
+
if (width <= 3)
|
|
66411
|
+
return ".".repeat(width);
|
|
66412
|
+
const keep = width - 3;
|
|
66413
|
+
const front = Math.ceil(keep / 2);
|
|
66414
|
+
const back = Math.floor(keep / 2);
|
|
66415
|
+
return `${value.slice(0, front)}...${value.slice(value.length - back)}`;
|
|
66416
|
+
}
|
|
66417
|
+
function wrapText(value, width) {
|
|
66418
|
+
if (width <= 0)
|
|
66419
|
+
return [""];
|
|
66420
|
+
const words = value.split(/\s+/).filter(Boolean);
|
|
66421
|
+
if (words.length === 0)
|
|
66422
|
+
return [""];
|
|
66423
|
+
const lines = [];
|
|
66424
|
+
let current = "";
|
|
66425
|
+
for (const word of words) {
|
|
66426
|
+
const candidate = current.length === 0 ? word : `${current} ${word}`;
|
|
66427
|
+
if (visibleWidth(candidate) <= width) {
|
|
66428
|
+
current = candidate;
|
|
66429
|
+
continue;
|
|
66430
|
+
}
|
|
66431
|
+
if (current.length > 0) {
|
|
66432
|
+
lines.push(current);
|
|
66433
|
+
current = "";
|
|
66434
|
+
}
|
|
66435
|
+
if (visibleWidth(word) <= width) {
|
|
66436
|
+
current = word;
|
|
66437
|
+
continue;
|
|
66438
|
+
}
|
|
66439
|
+
let remaining = word;
|
|
66440
|
+
while (visibleWidth(remaining) > width) {
|
|
66441
|
+
lines.push(`${remaining.slice(0, Math.max(1, width - 3))}...`);
|
|
66442
|
+
remaining = remaining.slice(Math.max(1, width - 3));
|
|
66443
|
+
}
|
|
66444
|
+
current = remaining;
|
|
66445
|
+
}
|
|
66446
|
+
if (current.length > 0) {
|
|
66447
|
+
lines.push(current);
|
|
66448
|
+
}
|
|
66449
|
+
return lines;
|
|
66450
|
+
}
|
|
66451
|
+
function formatDisplayPath(value) {
|
|
66452
|
+
const normalized = value.replace(/\\/g, "/");
|
|
66453
|
+
const home5 = homedir41().replace(/\\/g, "/");
|
|
66454
|
+
if (normalized === home5)
|
|
66455
|
+
return "~";
|
|
66456
|
+
if (normalized.startsWith(`${home5}/`)) {
|
|
66457
|
+
return normalized.replace(home5, "~");
|
|
66458
|
+
}
|
|
66459
|
+
return normalized;
|
|
66460
|
+
}
|
|
66461
|
+
function formatCdHint(value, currentPlatform = platform7()) {
|
|
66462
|
+
if (currentPlatform === "win32") {
|
|
66463
|
+
const absolutePath2 = win32.resolve(value);
|
|
66464
|
+
return `cd /d "${absolutePath2}"`;
|
|
66465
|
+
}
|
|
66466
|
+
const absolutePath = resolve34(value);
|
|
66467
|
+
const displayPath = formatDisplayPath(absolutePath);
|
|
66468
|
+
if (displayPath.includes(" ")) {
|
|
66469
|
+
return `cd "${displayPath}"`;
|
|
66470
|
+
}
|
|
66471
|
+
return `cd ${displayPath}`;
|
|
66472
|
+
}
|
|
66473
|
+
function paint(value, tone, context) {
|
|
66474
|
+
if (!context.useColor)
|
|
66475
|
+
return value;
|
|
66476
|
+
switch (tone) {
|
|
66477
|
+
case "accent":
|
|
66478
|
+
return import_picocolors14.default.cyan(value);
|
|
66479
|
+
case "muted":
|
|
66480
|
+
return import_picocolors14.default.dim(value);
|
|
66481
|
+
case "success":
|
|
66482
|
+
return import_picocolors14.default.green(value);
|
|
66483
|
+
case "warning":
|
|
66484
|
+
return import_picocolors14.default.yellow(value);
|
|
66485
|
+
case "heading":
|
|
66486
|
+
return import_picocolors14.default.bold(value);
|
|
66487
|
+
}
|
|
66488
|
+
}
|
|
66489
|
+
var import_picocolors14, PANEL_MIN_WIDTH = 60, PANEL_MAX_WIDTH = 72, DEFAULT_WIDTH, UNICODE_BOX, ASCII_BOX;
|
|
66490
|
+
var init_tokens = __esm(() => {
|
|
66491
|
+
import_picocolors14 = __toESM(require_picocolors(), 1);
|
|
66492
|
+
DEFAULT_WIDTH = PANEL_MAX_WIDTH;
|
|
66493
|
+
UNICODE_BOX = {
|
|
66494
|
+
tl: "╔",
|
|
66495
|
+
tr: "╗",
|
|
66496
|
+
bl: "╚",
|
|
66497
|
+
br: "╝",
|
|
66498
|
+
h: "═",
|
|
66499
|
+
v: "║",
|
|
66500
|
+
bullet: "●"
|
|
66501
|
+
};
|
|
66502
|
+
ASCII_BOX = {
|
|
66503
|
+
tl: "+",
|
|
66504
|
+
tr: "+",
|
|
66505
|
+
bl: "+",
|
|
66506
|
+
br: "+",
|
|
66507
|
+
h: "-",
|
|
66508
|
+
v: "|",
|
|
66509
|
+
bullet: "+"
|
|
66510
|
+
};
|
|
66511
|
+
});
|
|
66512
|
+
|
|
66513
|
+
// src/ui/ck-cli-design/panel.ts
|
|
66514
|
+
function renderPanel(options2) {
|
|
66515
|
+
const context = options2.context ?? createCliDesignContext(options2.contextOptions);
|
|
66516
|
+
const title = paint(options2.title, "heading", context);
|
|
66517
|
+
const subtitle = options2.subtitle ? paint(options2.subtitle, "muted", context) : null;
|
|
66518
|
+
if (!context.supportsPanels) {
|
|
66519
|
+
return renderPlainPanel(options2.zones, title, subtitle, context);
|
|
66520
|
+
}
|
|
66521
|
+
return renderBoxedPanel(options2.zones, title, subtitle, context);
|
|
66522
|
+
}
|
|
66523
|
+
function renderPlainPanel(zones, title, subtitle, context) {
|
|
66524
|
+
const lines = [title];
|
|
66525
|
+
if (subtitle)
|
|
66526
|
+
lines.push(subtitle);
|
|
66527
|
+
lines.push("");
|
|
66528
|
+
for (const zone of zones) {
|
|
66529
|
+
lines.push(paint(zone.label, "accent", context));
|
|
66530
|
+
for (const line of zone.lines) {
|
|
66531
|
+
lines.push(...wrapText(line, context.width - 2).map((entry) => ` ${entry}`));
|
|
66532
|
+
}
|
|
66533
|
+
lines.push("");
|
|
66534
|
+
}
|
|
66535
|
+
return trimTrailingBlank(lines);
|
|
66536
|
+
}
|
|
66537
|
+
function renderBoxedPanel(zones, title, subtitle, context) {
|
|
66538
|
+
const labelWidth = Math.min(12, Math.max(...zones.map((zone) => zone.label.length), 4));
|
|
66539
|
+
const innerWidth = context.width - 4;
|
|
66540
|
+
const lines = [renderTopBorder(title, context.box, context.width)];
|
|
66541
|
+
if (subtitle) {
|
|
66542
|
+
lines.push(renderContentLine(subtitle, innerWidth, context.box));
|
|
66543
|
+
lines.push(renderContentLine("", innerWidth, context.box));
|
|
66544
|
+
}
|
|
66545
|
+
for (const [index, zone] of zones.entries()) {
|
|
66546
|
+
for (const line of formatZone(zone, labelWidth, innerWidth, context)) {
|
|
66547
|
+
lines.push(renderContentLine(line, innerWidth, context.box));
|
|
66548
|
+
}
|
|
66549
|
+
if (index < zones.length - 1) {
|
|
66550
|
+
lines.push(renderContentLine("", innerWidth, context.box));
|
|
66551
|
+
}
|
|
66552
|
+
}
|
|
66553
|
+
lines.push(renderBottomBorder(context.box, context.width));
|
|
66554
|
+
return lines;
|
|
66555
|
+
}
|
|
66556
|
+
function formatZone(zone, labelWidth, innerWidth, context) {
|
|
66557
|
+
const availableWidth = Math.max(8, innerWidth - labelWidth - 3);
|
|
66558
|
+
const label = paint(zone.label, "accent", context);
|
|
66559
|
+
const rendered = [];
|
|
66560
|
+
for (const [index, rawLine] of zone.lines.entries()) {
|
|
66561
|
+
const wrappedLines = wrapText(rawLine, availableWidth);
|
|
66562
|
+
for (const [wrappedIndex, wrappedLine] of wrappedLines.entries()) {
|
|
66563
|
+
const prefix = index === 0 && wrappedIndex === 0 ? padVisible(label, labelWidth) : " ".repeat(labelWidth);
|
|
66564
|
+
rendered.push(` ${prefix} ${wrappedLine}`);
|
|
66565
|
+
}
|
|
66566
|
+
}
|
|
66567
|
+
return rendered;
|
|
66568
|
+
}
|
|
66569
|
+
function renderTopBorder(title, box, width) {
|
|
66570
|
+
const availableWidth = width - 2;
|
|
66571
|
+
const decorationWidth = 3;
|
|
66572
|
+
const maxTitleWidth = Math.max(1, availableWidth - decorationWidth - 1);
|
|
66573
|
+
const safeTitle = visibleWidth(title) > maxTitleWidth ? truncateMiddle(title, maxTitleWidth) : title;
|
|
66574
|
+
const heading = `${box.h} ${safeTitle} `;
|
|
66575
|
+
const fill = Math.max(1, availableWidth - visibleWidth(heading));
|
|
66576
|
+
return `${box.tl}${heading}${box.h.repeat(fill)}${box.tr}`;
|
|
66577
|
+
}
|
|
66578
|
+
function renderBottomBorder(box, width) {
|
|
66579
|
+
return `${box.bl}${box.h.repeat(width - 2)}${box.br}`;
|
|
66580
|
+
}
|
|
66581
|
+
function renderContentLine(content, width, box) {
|
|
66582
|
+
return `${box.v} ${padVisible(content, width)} ${box.v}`;
|
|
66583
|
+
}
|
|
66584
|
+
function trimTrailingBlank(lines) {
|
|
66585
|
+
const trimmed = [...lines];
|
|
66586
|
+
while (trimmed[trimmed.length - 1] === "") {
|
|
66587
|
+
trimmed.pop();
|
|
66588
|
+
}
|
|
66589
|
+
return trimmed;
|
|
66590
|
+
}
|
|
66591
|
+
var init_panel = __esm(() => {
|
|
66592
|
+
init_tokens();
|
|
66593
|
+
});
|
|
66594
|
+
|
|
66595
|
+
// src/commands/update/codex-sync-notice.ts
|
|
66596
|
+
function shouldShowCodexSyncNotice(params) {
|
|
66597
|
+
return !params.autoMigrateEnabled && params.providers.includes(CODEX_PROVIDER);
|
|
66598
|
+
}
|
|
66599
|
+
function renderCodexSyncNotice() {
|
|
66600
|
+
return renderPanel({
|
|
66601
|
+
title: codexSyncNotice.title,
|
|
66602
|
+
zones: [
|
|
66603
|
+
{ label: "", lines: [codexSyncNotice.body] },
|
|
66604
|
+
...codexSyncNotice.actions.map((action) => ({
|
|
66605
|
+
label: action.label,
|
|
66606
|
+
lines: [action.command]
|
|
66607
|
+
}))
|
|
66608
|
+
]
|
|
66609
|
+
});
|
|
66610
|
+
}
|
|
66611
|
+
var CODEX_PROVIDER = "codex", codexSyncNotice;
|
|
66612
|
+
var init_codex_sync_notice = __esm(() => {
|
|
66613
|
+
init_panel();
|
|
66614
|
+
codexSyncNotice = {
|
|
66615
|
+
title: "Codex sync available",
|
|
66616
|
+
body: "Keep Codex in step with Claude Code automatically: agents, commands, skills, and hooks.",
|
|
66617
|
+
actions: [
|
|
66618
|
+
{ label: "Sync now", command: "ck migrate --agent codex" },
|
|
66619
|
+
{ label: "Manage", command: "ck config" }
|
|
66620
|
+
]
|
|
66621
|
+
};
|
|
66622
|
+
});
|
|
66623
|
+
|
|
66226
66624
|
// src/domains/github/github-auth.ts
|
|
66227
66625
|
import { execSync as execSync2 } from "node:child_process";
|
|
66228
66626
|
|
|
@@ -67484,50 +67882,62 @@ function collectSettingsHookCommands(settings) {
|
|
|
67484
67882
|
}
|
|
67485
67883
|
return commands;
|
|
67486
67884
|
}
|
|
67487
|
-
function
|
|
67488
|
-
const
|
|
67489
|
-
|
|
67885
|
+
function collectSettingsHookNames(settings) {
|
|
67886
|
+
const names = new Set;
|
|
67887
|
+
for (const command of collectSettingsHookCommands(settings)) {
|
|
67888
|
+
const hookName = extractCkHookName(command);
|
|
67889
|
+
if (hookName)
|
|
67890
|
+
names.add(hookName);
|
|
67891
|
+
}
|
|
67892
|
+
return names;
|
|
67893
|
+
}
|
|
67894
|
+
async function readManagedHookNames(claudeDir3) {
|
|
67895
|
+
const manifestPath = join68(claudeDir3, "hooks", MANAGED_HOOKS_MANIFEST);
|
|
67896
|
+
if (!existsSync47(manifestPath))
|
|
67897
|
+
return [];
|
|
67898
|
+
try {
|
|
67899
|
+
const data = parseJsonContent(await import_fs_extra8.readFile(manifestPath, "utf-8"));
|
|
67900
|
+
if (!Array.isArray(data.managedHooks))
|
|
67901
|
+
return [];
|
|
67902
|
+
return data.managedHooks.filter((name) => typeof name === "string");
|
|
67903
|
+
} catch (error) {
|
|
67904
|
+
logger.verbose(`Failed to read managed-hooks manifest: ${error instanceof Error ? error.message : "unknown"}`);
|
|
67490
67905
|
return [];
|
|
67491
|
-
|
|
67492
|
-
|
|
67493
|
-
|
|
67494
|
-
|
|
67495
|
-
|
|
67496
|
-
|
|
67497
|
-
|
|
67906
|
+
}
|
|
67907
|
+
}
|
|
67908
|
+
async function readDisabledHookNames(claudeDir3) {
|
|
67909
|
+
const configPath = join68(claudeDir3, ".ck.json");
|
|
67910
|
+
if (!existsSync47(configPath))
|
|
67911
|
+
return new Set;
|
|
67912
|
+
try {
|
|
67913
|
+
const config = parseJsonContent(await import_fs_extra8.readFile(configPath, "utf-8"));
|
|
67914
|
+
return new Set(Object.entries(config.hooks ?? {}).filter(([, enabled]) => enabled === false).map(([name]) => name));
|
|
67915
|
+
} catch (error) {
|
|
67916
|
+
logger.verbose(`Failed to read .ck.json hook disables: ${error instanceof Error ? error.message : "unknown"}`);
|
|
67917
|
+
return new Set;
|
|
67918
|
+
}
|
|
67498
67919
|
}
|
|
67499
67920
|
async function countMissingCkHookRegistrations(claudeDir3, kit) {
|
|
67500
67921
|
const settingsPath = join68(claudeDir3, "settings.json");
|
|
67501
|
-
|
|
67502
|
-
|
|
67922
|
+
if (!existsSync47(settingsPath))
|
|
67923
|
+
return 0;
|
|
67924
|
+
const managedHooks = await readManagedHookNames(claudeDir3);
|
|
67925
|
+
if (managedHooks.length === 0)
|
|
67503
67926
|
return 0;
|
|
67504
67927
|
const settings = parseJsonContent(await import_fs_extra8.readFile(settingsPath, "utf-8"));
|
|
67505
|
-
const
|
|
67506
|
-
const
|
|
67507
|
-
const
|
|
67508
|
-
|
|
67509
|
-
|
|
67510
|
-
if (
|
|
67511
|
-
existingHookNames.add(hookName);
|
|
67512
|
-
}
|
|
67513
|
-
const disabledHooks = new Set(Object.entries(config.hooks ?? {}).filter(([, enabled]) => enabled === false).map(([name]) => name));
|
|
67514
|
-
const missingHookNames = new Set;
|
|
67515
|
-
const missingCommands = new Set;
|
|
67516
|
-
for (const command of getInstalledHookCommands(config, kit)) {
|
|
67517
|
-
const hookName = extractCkHookName(command);
|
|
67518
|
-
if (hookName) {
|
|
67519
|
-
if (disabledHooks.has(hookName) || DYNAMIC_INJECTED_HOOKS.has(hookName))
|
|
67520
|
-
continue;
|
|
67521
|
-
if (!existingHookNames.has(hookName))
|
|
67522
|
-
missingHookNames.add(hookName);
|
|
67928
|
+
const liveHookNames = collectSettingsHookNames(settings);
|
|
67929
|
+
const disabledHooks = await readDisabledHookNames(claudeDir3);
|
|
67930
|
+
const hooksDir = join68(claudeDir3, "hooks");
|
|
67931
|
+
let missing = 0;
|
|
67932
|
+
for (const name of managedHooks) {
|
|
67933
|
+
if (disabledHooks.has(name))
|
|
67523
67934
|
continue;
|
|
67524
|
-
}
|
|
67525
|
-
|
|
67526
|
-
if (!
|
|
67527
|
-
|
|
67528
|
-
}
|
|
67935
|
+
if (!existsSync47(join68(hooksDir, `${name}.cjs`)))
|
|
67936
|
+
continue;
|
|
67937
|
+
if (!liveHookNames.has(name))
|
|
67938
|
+
missing++;
|
|
67529
67939
|
}
|
|
67530
|
-
return
|
|
67940
|
+
return missing;
|
|
67531
67941
|
}
|
|
67532
67942
|
function buildInitCommand(isGlobal, kit, beta, yes, restoreCkHooks) {
|
|
67533
67943
|
const parts = ["ck init"];
|
|
@@ -67785,13 +68195,13 @@ async function promptKitUpdate(beta, yes, deps) {
|
|
|
67785
68195
|
args.push("--beta");
|
|
67786
68196
|
const displayCmd = `ck ${args.join(" ")}`;
|
|
67787
68197
|
logger.info(`Running: ${displayCmd}`);
|
|
67788
|
-
const spawnFn = deps?.spawnInitFn ?? ((spawnArgs) => new Promise((
|
|
68198
|
+
const spawnFn = deps?.spawnInitFn ?? ((spawnArgs) => new Promise((resolve35) => {
|
|
67789
68199
|
const initCommand = resolveCkInitSpawnCommand(spawnArgs);
|
|
67790
68200
|
const child = spawn2(initCommand.command, initCommand.args, { stdio: "inherit" });
|
|
67791
|
-
child.on("close", (code) =>
|
|
68201
|
+
child.on("close", (code) => resolve35(code ?? 1));
|
|
67792
68202
|
child.on("error", (err) => {
|
|
67793
68203
|
logger.verbose(`Failed to spawn ck init: ${err.message}`);
|
|
67794
|
-
|
|
68204
|
+
resolve35(1);
|
|
67795
68205
|
});
|
|
67796
68206
|
}));
|
|
67797
68207
|
const exitCode = await spawnFn(args);
|
|
@@ -67877,6 +68287,10 @@ async function promptMigrateUpdate(deps) {
|
|
|
67877
68287
|
migrateProviders = pipeline?.migrateProviders ?? "auto";
|
|
67878
68288
|
migrateScope = pipeline?.migrateScope;
|
|
67879
68289
|
} catch {}
|
|
68290
|
+
if (shouldShowCodexSyncNotice({ providers: targets, autoMigrateEnabled: autoMigrate })) {
|
|
68291
|
+
for (const line of renderCodexSyncNotice())
|
|
68292
|
+
logger.info(line);
|
|
68293
|
+
}
|
|
67880
68294
|
if (!autoMigrate)
|
|
67881
68295
|
return;
|
|
67882
68296
|
let providers2;
|
|
@@ -67933,7 +68347,7 @@ async function promptMigrateUpdate(deps) {
|
|
|
67933
68347
|
logger.verbose(`Migrate step skipped: ${error instanceof Error ? error.message : "unknown"}`);
|
|
67934
68348
|
}
|
|
67935
68349
|
}
|
|
67936
|
-
var import_fs_extra8, execAsync2, SAFE_PROVIDER_NAME, HOOK_DEPENDENCY_EXTENSIONS,
|
|
68350
|
+
var import_fs_extra8, execAsync2, SAFE_PROVIDER_NAME, HOOK_DEPENDENCY_EXTENSIONS, MANAGED_HOOKS_MANIFEST = "managed-hooks.json";
|
|
67937
68351
|
var init_post_update_handler = __esm(() => {
|
|
67938
68352
|
init_ck_config_manager();
|
|
67939
68353
|
init_hook_health_checker();
|
|
@@ -67944,12 +68358,12 @@ var init_post_update_handler = __esm(() => {
|
|
|
67944
68358
|
init_logger();
|
|
67945
68359
|
init_safe_prompts();
|
|
67946
68360
|
init_types3();
|
|
68361
|
+
init_codex_sync_notice();
|
|
67947
68362
|
init_version_comparator();
|
|
67948
68363
|
import_fs_extra8 = __toESM(require_lib(), 1);
|
|
67949
68364
|
execAsync2 = promisify9(exec2);
|
|
67950
68365
|
SAFE_PROVIDER_NAME = /^[a-z0-9-]+$/;
|
|
67951
68366
|
HOOK_DEPENDENCY_EXTENSIONS = [".js", ".cjs", ".mjs", ".json"];
|
|
67952
|
-
DYNAMIC_INJECTED_HOOKS = new Set(["task-completed-handler", "teammate-idle-handler"]);
|
|
67953
68367
|
});
|
|
67954
68368
|
|
|
67955
68369
|
// src/commands/update-cli.ts
|
|
@@ -68245,7 +68659,7 @@ class ConfigVersionChecker {
|
|
|
68245
68659
|
return null;
|
|
68246
68660
|
}
|
|
68247
68661
|
const delay = baseBackoff * 2 ** attempt;
|
|
68248
|
-
await new Promise((
|
|
68662
|
+
await new Promise((resolve35) => setTimeout(resolve35, delay));
|
|
68249
68663
|
}
|
|
68250
68664
|
}
|
|
68251
68665
|
return null;
|
|
@@ -68348,15 +68762,15 @@ import { spawn as spawn3 } from "node:child_process";
|
|
|
68348
68762
|
import { execFile as execFile8 } from "node:child_process";
|
|
68349
68763
|
import { existsSync as existsSync48 } from "node:fs";
|
|
68350
68764
|
import { readFile as readFile38 } from "node:fs/promises";
|
|
68351
|
-
import { cpus, homedir as
|
|
68765
|
+
import { cpus, homedir as homedir42, totalmem } from "node:os";
|
|
68352
68766
|
import { join as join70 } from "node:path";
|
|
68353
68767
|
function runCommand(cmd, args, fallback2) {
|
|
68354
|
-
return new Promise((
|
|
68768
|
+
return new Promise((resolve35) => {
|
|
68355
68769
|
execFile8(cmd, args, { timeout: 5000 }, (err, stdout) => {
|
|
68356
68770
|
if (err) {
|
|
68357
|
-
|
|
68771
|
+
resolve35(fallback2);
|
|
68358
68772
|
} else {
|
|
68359
|
-
|
|
68773
|
+
resolve35(stdout.trim() || fallback2);
|
|
68360
68774
|
}
|
|
68361
68775
|
});
|
|
68362
68776
|
});
|
|
@@ -68515,7 +68929,7 @@ function registerSystemRoutes(app) {
|
|
|
68515
68929
|
gitVersion,
|
|
68516
68930
|
ghVersion,
|
|
68517
68931
|
shell: process.env.SHELL ?? process.env.ComSpec ?? "unknown",
|
|
68518
|
-
homeDir:
|
|
68932
|
+
homeDir: homedir42(),
|
|
68519
68933
|
cpuCores: cpus().length,
|
|
68520
68934
|
totalMemoryGb: (totalmem() / 1024 ** 3).toFixed(1)
|
|
68521
68935
|
};
|
|
@@ -68793,7 +69207,7 @@ var init_routes = __esm(() => {
|
|
|
68793
69207
|
|
|
68794
69208
|
// src/domains/web-server/static-server.ts
|
|
68795
69209
|
import { existsSync as existsSync49 } from "node:fs";
|
|
68796
|
-
import { basename as basename24, dirname as dirname30, join as join71, resolve as
|
|
69210
|
+
import { basename as basename24, dirname as dirname30, join as join71, resolve as resolve35 } from "node:path";
|
|
68797
69211
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
68798
69212
|
function addRuntimeUiCandidate(candidates, runtimePath) {
|
|
68799
69213
|
if (!runtimePath) {
|
|
@@ -68803,7 +69217,7 @@ function addRuntimeUiCandidate(candidates, runtimePath) {
|
|
|
68803
69217
|
if (!looksLikePath) {
|
|
68804
69218
|
return;
|
|
68805
69219
|
}
|
|
68806
|
-
const entryDir = dirname30(
|
|
69220
|
+
const entryDir = dirname30(resolve35(runtimePath));
|
|
68807
69221
|
if (basename24(entryDir) === "dist") {
|
|
68808
69222
|
candidates.add(join71(entryDir, "ui"));
|
|
68809
69223
|
}
|
|
@@ -71835,10 +72249,10 @@ async function createAppServer(options2 = {}) {
|
|
|
71835
72249
|
wsManager = new WebSocketManager(server);
|
|
71836
72250
|
fileWatcher = new FileWatcher({ wsManager });
|
|
71837
72251
|
fileWatcher.start();
|
|
71838
|
-
await new Promise((
|
|
72252
|
+
await new Promise((resolve36, reject) => {
|
|
71839
72253
|
const onListening = () => {
|
|
71840
72254
|
server.off("error", onError);
|
|
71841
|
-
|
|
72255
|
+
resolve36();
|
|
71842
72256
|
};
|
|
71843
72257
|
const onError = (error) => {
|
|
71844
72258
|
server.off("listening", onListening);
|
|
@@ -71875,16 +72289,16 @@ async function createAppServer(options2 = {}) {
|
|
|
71875
72289
|
};
|
|
71876
72290
|
}
|
|
71877
72291
|
async function closeHttpServer(server) {
|
|
71878
|
-
await new Promise((
|
|
72292
|
+
await new Promise((resolve36) => {
|
|
71879
72293
|
if (!server.listening) {
|
|
71880
|
-
|
|
72294
|
+
resolve36();
|
|
71881
72295
|
return;
|
|
71882
72296
|
}
|
|
71883
72297
|
server.close((err) => {
|
|
71884
72298
|
if (err) {
|
|
71885
72299
|
logger.debug(`Server close error: ${err.message}`);
|
|
71886
72300
|
}
|
|
71887
|
-
|
|
72301
|
+
resolve36();
|
|
71888
72302
|
});
|
|
71889
72303
|
});
|
|
71890
72304
|
}
|
|
@@ -72305,8 +72719,8 @@ var require_constants3 = __commonJS((exports, module) => {
|
|
|
72305
72719
|
"@": { type: "at", open: "(?:", close: ")" }
|
|
72306
72720
|
};
|
|
72307
72721
|
},
|
|
72308
|
-
globChars(
|
|
72309
|
-
return
|
|
72722
|
+
globChars(win322) {
|
|
72723
|
+
return win322 === true ? WINDOWS_CHARS : POSIX_CHARS;
|
|
72310
72724
|
}
|
|
72311
72725
|
};
|
|
72312
72726
|
});
|
|
@@ -72326,8 +72740,8 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
72326
72740
|
exports.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/");
|
|
72327
72741
|
exports.isWindows = () => {
|
|
72328
72742
|
if (typeof navigator !== "undefined" && navigator.platform) {
|
|
72329
|
-
const
|
|
72330
|
-
return
|
|
72743
|
+
const platform10 = navigator.platform.toLowerCase();
|
|
72744
|
+
return platform10 === "win32" || platform10 === "windows";
|
|
72331
72745
|
}
|
|
72332
72746
|
if (typeof process !== "undefined" && process.platform) {
|
|
72333
72747
|
return process.platform === "win32";
|
|
@@ -73620,7 +74034,7 @@ var require_picomatch2 = __commonJS((exports, module) => {
|
|
|
73620
74034
|
import { exec as exec7, execFile as execFile9, spawn as spawn4 } from "node:child_process";
|
|
73621
74035
|
import { promisify as promisify14 } from "node:util";
|
|
73622
74036
|
function executeInteractiveScript(command, args, options2) {
|
|
73623
|
-
return new Promise((
|
|
74037
|
+
return new Promise((resolve38, reject) => {
|
|
73624
74038
|
const child = spawn4(command, args, {
|
|
73625
74039
|
stdio: ["ignore", "inherit", "inherit"],
|
|
73626
74040
|
cwd: options2?.cwd,
|
|
@@ -73641,7 +74055,7 @@ function executeInteractiveScript(command, args, options2) {
|
|
|
73641
74055
|
} else if (code !== 0) {
|
|
73642
74056
|
reject(new Error(`Command exited with code ${code}`));
|
|
73643
74057
|
} else {
|
|
73644
|
-
|
|
74058
|
+
resolve38();
|
|
73645
74059
|
}
|
|
73646
74060
|
});
|
|
73647
74061
|
child.on("error", (error) => {
|
|
@@ -73652,8 +74066,8 @@ function executeInteractiveScript(command, args, options2) {
|
|
|
73652
74066
|
});
|
|
73653
74067
|
}
|
|
73654
74068
|
function getNpmCommand() {
|
|
73655
|
-
const
|
|
73656
|
-
return
|
|
74069
|
+
const platform10 = process.platform;
|
|
74070
|
+
return platform10 === "win32" ? "npm.cmd" : "npm";
|
|
73657
74071
|
}
|
|
73658
74072
|
var execAsync7, execFileAsync6;
|
|
73659
74073
|
var init_process_executor = __esm(() => {
|
|
@@ -73662,7 +74076,7 @@ var init_process_executor = __esm(() => {
|
|
|
73662
74076
|
});
|
|
73663
74077
|
|
|
73664
74078
|
// src/services/package-installer/validators.ts
|
|
73665
|
-
import { resolve as
|
|
74079
|
+
import { resolve as resolve38 } from "node:path";
|
|
73666
74080
|
function validatePackageName(packageName) {
|
|
73667
74081
|
if (!packageName || typeof packageName !== "string") {
|
|
73668
74082
|
throw new Error("Package name must be a non-empty string");
|
|
@@ -73675,8 +74089,8 @@ function validatePackageName(packageName) {
|
|
|
73675
74089
|
}
|
|
73676
74090
|
}
|
|
73677
74091
|
function validateScriptPath(skillsDir2, scriptPath) {
|
|
73678
|
-
const skillsDirResolved =
|
|
73679
|
-
const scriptPathResolved =
|
|
74092
|
+
const skillsDirResolved = resolve38(skillsDir2);
|
|
74093
|
+
const scriptPathResolved = resolve38(scriptPath);
|
|
73680
74094
|
const skillsDirNormalized = isWindows() ? skillsDirResolved.toLowerCase() : skillsDirResolved;
|
|
73681
74095
|
const scriptPathNormalized = isWindows() ? scriptPathResolved.toLowerCase() : scriptPathResolved;
|
|
73682
74096
|
if (!scriptPathNormalized.startsWith(skillsDirNormalized)) {
|
|
@@ -74142,8 +74556,8 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
|
|
|
74142
74556
|
try {
|
|
74143
74557
|
const { existsSync: existsSync62 } = await import("node:fs");
|
|
74144
74558
|
const clack = await Promise.resolve().then(() => (init_dist2(), exports_dist));
|
|
74145
|
-
const
|
|
74146
|
-
const scriptName =
|
|
74559
|
+
const platform10 = process.platform;
|
|
74560
|
+
const scriptName = platform10 === "win32" ? "install.ps1" : "install.sh";
|
|
74147
74561
|
const scriptPath = join91(skillsDir2, scriptName);
|
|
74148
74562
|
try {
|
|
74149
74563
|
validateScriptPath(skillsDir2, scriptPath);
|
|
@@ -74173,7 +74587,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
|
|
|
74173
74587
|
}
|
|
74174
74588
|
logger.warning("Installation script will execute with user privileges");
|
|
74175
74589
|
logger.info(` Script: ${scriptPath}`);
|
|
74176
|
-
logger.info(` Platform: ${
|
|
74590
|
+
logger.info(` Platform: ${platform10 === "win32" ? "Windows (PowerShell)" : "Unix (bash)"}`);
|
|
74177
74591
|
if (logger.isVerbose()) {
|
|
74178
74592
|
try {
|
|
74179
74593
|
const { readFile: readFile47 } = await import("node:fs/promises");
|
|
@@ -74204,7 +74618,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
|
|
|
74204
74618
|
logger.info("Installation cancelled by user");
|
|
74205
74619
|
logger.info("");
|
|
74206
74620
|
logger.info("\uD83D\uDCD6 Manual Installation Instructions:");
|
|
74207
|
-
logger.info(` ${
|
|
74621
|
+
logger.info(` ${platform10 === "win32" ? `powershell -File "${scriptPath}"` : `bash ${scriptPath}`}`);
|
|
74208
74622
|
logger.info("");
|
|
74209
74623
|
logger.info("Or see complete guide:");
|
|
74210
74624
|
logger.info(` ${join91(skillsDir2, "INSTALLATION.md")}`);
|
|
@@ -74232,7 +74646,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
|
|
|
74232
74646
|
}
|
|
74233
74647
|
}
|
|
74234
74648
|
}
|
|
74235
|
-
if (
|
|
74649
|
+
if (platform10 === "linux") {
|
|
74236
74650
|
const needsSudo = await checkNeedsSudoPackages();
|
|
74237
74651
|
if (needsSudo) {
|
|
74238
74652
|
if (withSudo) {
|
|
@@ -74281,7 +74695,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
|
|
|
74281
74695
|
...process.env,
|
|
74282
74696
|
NON_INTERACTIVE: "1"
|
|
74283
74697
|
};
|
|
74284
|
-
if (
|
|
74698
|
+
if (platform10 === "win32") {
|
|
74285
74699
|
await executeInteractiveScript("powershell.exe", ["-NoLogo", "-ExecutionPolicy", "Bypass", "-File", scriptPath, "-Y"], {
|
|
74286
74700
|
timeout: 600000,
|
|
74287
74701
|
cwd: skillsDir2,
|
|
@@ -74477,10 +74891,10 @@ var init_config_manager2 = __esm(() => {
|
|
|
74477
74891
|
|
|
74478
74892
|
// src/services/package-installer/gemini-mcp/validation.ts
|
|
74479
74893
|
import { existsSync as existsSync63, lstatSync, readlinkSync } from "node:fs";
|
|
74480
|
-
import { homedir as
|
|
74894
|
+
import { homedir as homedir45 } from "node:os";
|
|
74481
74895
|
import { join as join93 } from "node:path";
|
|
74482
74896
|
function getGlobalMcpConfigPath() {
|
|
74483
|
-
return join93(
|
|
74897
|
+
return join93(homedir45(), ".claude", ".mcp.json");
|
|
74484
74898
|
}
|
|
74485
74899
|
function getLocalMcpConfigPath(projectDir) {
|
|
74486
74900
|
return join93(projectDir, ".mcp.json");
|
|
@@ -74501,7 +74915,7 @@ function findMcpConfigPath(projectDir) {
|
|
|
74501
74915
|
}
|
|
74502
74916
|
function getGeminiSettingsPath(projectDir, isGlobal) {
|
|
74503
74917
|
if (isGlobal) {
|
|
74504
|
-
return join93(
|
|
74918
|
+
return join93(homedir45(), ".gemini", "settings.json");
|
|
74505
74919
|
}
|
|
74506
74920
|
return join93(projectDir, ".gemini", "settings.json");
|
|
74507
74921
|
}
|
|
@@ -74577,10 +74991,10 @@ __export(exports_gemini_mcp_linker, {
|
|
|
74577
74991
|
checkExistingGeminiConfig: () => checkExistingGeminiConfig,
|
|
74578
74992
|
addGeminiToGitignore: () => addGeminiToGitignore
|
|
74579
74993
|
});
|
|
74580
|
-
import { resolve as
|
|
74994
|
+
import { resolve as resolve39 } from "node:path";
|
|
74581
74995
|
async function linkGeminiMcpConfig(projectDir, options2 = {}) {
|
|
74582
74996
|
const { skipGitignore = false, isGlobal = false } = options2;
|
|
74583
|
-
const resolvedProjectDir =
|
|
74997
|
+
const resolvedProjectDir = resolve39(projectDir);
|
|
74584
74998
|
const geminiSettingsPath = getGeminiSettingsPath(resolvedProjectDir, isGlobal);
|
|
74585
74999
|
const mcpConfigPath = findMcpConfigPath(resolvedProjectDir);
|
|
74586
75000
|
if (!mcpConfigPath) {
|
|
@@ -75228,7 +75642,7 @@ var require_get_stream = __commonJS((exports, module) => {
|
|
|
75228
75642
|
};
|
|
75229
75643
|
const { maxBuffer } = options2;
|
|
75230
75644
|
let stream;
|
|
75231
|
-
await new Promise((
|
|
75645
|
+
await new Promise((resolve41, reject) => {
|
|
75232
75646
|
const rejectPromise = (error) => {
|
|
75233
75647
|
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
75234
75648
|
error.bufferedData = stream.getBufferedValue();
|
|
@@ -75240,7 +75654,7 @@ var require_get_stream = __commonJS((exports, module) => {
|
|
|
75240
75654
|
rejectPromise(error);
|
|
75241
75655
|
return;
|
|
75242
75656
|
}
|
|
75243
|
-
|
|
75657
|
+
resolve41();
|
|
75244
75658
|
});
|
|
75245
75659
|
stream.on("data", () => {
|
|
75246
75660
|
if (stream.getBufferedLength() > maxBuffer) {
|
|
@@ -76601,7 +77015,7 @@ var require_extract_zip = __commonJS((exports, module) => {
|
|
|
76601
77015
|
debug("opening", this.zipPath, "with opts", this.opts);
|
|
76602
77016
|
this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
|
|
76603
77017
|
this.canceled = false;
|
|
76604
|
-
return new Promise((
|
|
77018
|
+
return new Promise((resolve41, reject) => {
|
|
76605
77019
|
this.zipfile.on("error", (err) => {
|
|
76606
77020
|
this.canceled = true;
|
|
76607
77021
|
reject(err);
|
|
@@ -76610,7 +77024,7 @@ var require_extract_zip = __commonJS((exports, module) => {
|
|
|
76610
77024
|
this.zipfile.on("close", () => {
|
|
76611
77025
|
if (!this.canceled) {
|
|
76612
77026
|
debug("zip extraction complete");
|
|
76613
|
-
|
|
77027
|
+
resolve41();
|
|
76614
77028
|
}
|
|
76615
77029
|
});
|
|
76616
77030
|
this.zipfile.on("entry", async (entry) => {
|
|
@@ -76727,25 +77141,25 @@ class OwnershipDisplay {
|
|
|
76727
77141
|
static formatOwnership(ownership) {
|
|
76728
77142
|
switch (ownership) {
|
|
76729
77143
|
case "ck":
|
|
76730
|
-
return
|
|
77144
|
+
return import_picocolors26.default.blue("CK-owned");
|
|
76731
77145
|
case "user":
|
|
76732
|
-
return
|
|
77146
|
+
return import_picocolors26.default.green("User-created");
|
|
76733
77147
|
case "ck-modified":
|
|
76734
|
-
return
|
|
77148
|
+
return import_picocolors26.default.yellow("CK-modified");
|
|
76735
77149
|
default:
|
|
76736
|
-
return
|
|
77150
|
+
return import_picocolors26.default.gray("Unknown");
|
|
76737
77151
|
}
|
|
76738
77152
|
}
|
|
76739
77153
|
static formatAction(action) {
|
|
76740
77154
|
switch (action) {
|
|
76741
77155
|
case "delete":
|
|
76742
|
-
return
|
|
77156
|
+
return import_picocolors26.default.red("✖ DELETE");
|
|
76743
77157
|
case "preserve":
|
|
76744
|
-
return
|
|
77158
|
+
return import_picocolors26.default.green("✓ PRESERVE");
|
|
76745
77159
|
case "skip":
|
|
76746
|
-
return
|
|
77160
|
+
return import_picocolors26.default.gray("○ SKIP");
|
|
76747
77161
|
default:
|
|
76748
|
-
return
|
|
77162
|
+
return import_picocolors26.default.gray("? UNKNOWN");
|
|
76749
77163
|
}
|
|
76750
77164
|
}
|
|
76751
77165
|
static calculateSummary(results) {
|
|
@@ -76779,78 +77193,78 @@ class OwnershipDisplay {
|
|
|
76779
77193
|
}
|
|
76780
77194
|
static displaySummary(summary, title = "Ownership Summary") {
|
|
76781
77195
|
const lines = [
|
|
76782
|
-
`Total files: ${
|
|
77196
|
+
`Total files: ${import_picocolors26.default.bold(String(summary.totalFiles))}`,
|
|
76783
77197
|
"",
|
|
76784
77198
|
"By ownership:",
|
|
76785
|
-
` ${
|
|
76786
|
-
` ${
|
|
76787
|
-
` ${
|
|
77199
|
+
` ${import_picocolors26.default.blue("●")} CK-owned: ${summary.ckOwned}`,
|
|
77200
|
+
` ${import_picocolors26.default.green("●")} User-created: ${summary.userCreated}`,
|
|
77201
|
+
` ${import_picocolors26.default.yellow("●")} CK-modified: ${summary.ckModified}`,
|
|
76788
77202
|
"",
|
|
76789
77203
|
"Actions:",
|
|
76790
|
-
` ${
|
|
76791
|
-
` ${
|
|
77204
|
+
` ${import_picocolors26.default.red("✖")} To delete: ${summary.toDelete}`,
|
|
77205
|
+
` ${import_picocolors26.default.green("✓")} To preserve: ${summary.toPreserve}`
|
|
76792
77206
|
];
|
|
76793
77207
|
le(lines.join(`
|
|
76794
77208
|
`), title);
|
|
76795
77209
|
}
|
|
76796
77210
|
static displayOperationPreview(results, maxItems = 10) {
|
|
76797
77211
|
const summary = OwnershipDisplay.calculateSummary(results);
|
|
76798
|
-
f2.info(
|
|
77212
|
+
f2.info(import_picocolors26.default.bold("DRY RUN - Preview of changes:"));
|
|
76799
77213
|
console.log("");
|
|
76800
77214
|
const toDelete = results.filter((r2) => r2.action === "delete");
|
|
76801
77215
|
const toPreserve = results.filter((r2) => r2.action === "preserve");
|
|
76802
77216
|
if (toDelete.length > 0) {
|
|
76803
|
-
console.log(
|
|
77217
|
+
console.log(import_picocolors26.default.red(import_picocolors26.default.bold(`Files to DELETE (${toDelete.length}):`)));
|
|
76804
77218
|
const showDelete = toDelete.slice(0, maxItems);
|
|
76805
77219
|
for (const result of showDelete) {
|
|
76806
|
-
console.log(` ${
|
|
77220
|
+
console.log(` ${import_picocolors26.default.red("✖")} ${result.path}`);
|
|
76807
77221
|
}
|
|
76808
77222
|
if (toDelete.length > maxItems) {
|
|
76809
|
-
console.log(
|
|
77223
|
+
console.log(import_picocolors26.default.gray(` ... and ${toDelete.length - maxItems} more`));
|
|
76810
77224
|
}
|
|
76811
77225
|
console.log("");
|
|
76812
77226
|
}
|
|
76813
77227
|
if (toPreserve.length > 0) {
|
|
76814
|
-
console.log(
|
|
77228
|
+
console.log(import_picocolors26.default.green(import_picocolors26.default.bold(`Files to PRESERVE (${toPreserve.length}):`)));
|
|
76815
77229
|
const showPreserve = toPreserve.slice(0, maxItems);
|
|
76816
77230
|
for (const result of showPreserve) {
|
|
76817
|
-
const reason = result.reason ?
|
|
76818
|
-
console.log(` ${
|
|
77231
|
+
const reason = result.reason ? import_picocolors26.default.gray(` (${result.reason})`) : "";
|
|
77232
|
+
console.log(` ${import_picocolors26.default.green("✓")} ${result.path}${reason}`);
|
|
76819
77233
|
}
|
|
76820
77234
|
if (toPreserve.length > maxItems) {
|
|
76821
|
-
console.log(
|
|
77235
|
+
console.log(import_picocolors26.default.gray(` ... and ${toPreserve.length - maxItems} more`));
|
|
76822
77236
|
}
|
|
76823
77237
|
console.log("");
|
|
76824
77238
|
}
|
|
76825
77239
|
OwnershipDisplay.displaySummary(summary, "Preview Summary");
|
|
76826
|
-
f2.warn(
|
|
77240
|
+
f2.warn(import_picocolors26.default.yellow("No changes were made. Run without --dry-run to apply changes."));
|
|
76827
77241
|
}
|
|
76828
77242
|
static displayFile(path17, ownership, action, reason) {
|
|
76829
77243
|
const ownershipStr = OwnershipDisplay.formatOwnership(ownership);
|
|
76830
77244
|
const actionStr = OwnershipDisplay.formatAction(action);
|
|
76831
|
-
const reasonStr = reason ?
|
|
77245
|
+
const reasonStr = reason ? import_picocolors26.default.gray(` - ${reason}`) : "";
|
|
76832
77246
|
console.log(` ${actionStr} ${path17} [${ownershipStr}]${reasonStr}`);
|
|
76833
77247
|
}
|
|
76834
77248
|
static displayForceWarning() {
|
|
76835
|
-
f2.warn(`${
|
|
76836
|
-
${
|
|
76837
|
-
${
|
|
77249
|
+
f2.warn(`${import_picocolors26.default.yellow(import_picocolors26.default.bold("FORCE MODE ENABLED"))}
|
|
77250
|
+
${import_picocolors26.default.yellow("User modifications will be overwritten!")}
|
|
77251
|
+
${import_picocolors26.default.gray("Use --dry-run first to preview changes.")}`);
|
|
76838
77252
|
}
|
|
76839
77253
|
static displayLegacyWarning() {
|
|
76840
|
-
f2.warn(`${
|
|
76841
|
-
${
|
|
76842
|
-
${
|
|
77254
|
+
f2.warn(`${import_picocolors26.default.yellow(import_picocolors26.default.bold("Legacy Installation Detected"))}
|
|
77255
|
+
${import_picocolors26.default.yellow("No ownership metadata found.")}
|
|
77256
|
+
${import_picocolors26.default.gray("Running migration to enable ownership tracking...")}`);
|
|
76843
77257
|
}
|
|
76844
77258
|
static displayCompletionSummary(deleted, preserved) {
|
|
76845
|
-
const message = `${
|
|
76846
|
-
${
|
|
77259
|
+
const message = `${import_picocolors26.default.green(`✓ Deleted ${deleted} CK-owned file(s)`)}
|
|
77260
|
+
${import_picocolors26.default.blue(`✓ Preserved ${preserved} user/modified file(s)`)}`;
|
|
76847
77261
|
f2.success(message);
|
|
76848
77262
|
}
|
|
76849
77263
|
}
|
|
76850
|
-
var
|
|
77264
|
+
var import_picocolors26;
|
|
76851
77265
|
var init_ownership_display = __esm(() => {
|
|
76852
77266
|
init_dist2();
|
|
76853
|
-
|
|
77267
|
+
import_picocolors26 = __toESM(require_picocolors(), 1);
|
|
76854
77268
|
});
|
|
76855
77269
|
|
|
76856
77270
|
// src/commands/watch/phases/implementation-git-helpers.ts
|
|
@@ -80986,7 +81400,7 @@ var migrateCommandHelp;
|
|
|
80986
81400
|
var init_migrate_command_help = __esm(() => {
|
|
80987
81401
|
migrateCommandHelp = {
|
|
80988
81402
|
name: "migrate",
|
|
80989
|
-
description: "Migrate Claude Code agents, commands, skills, config, rules, and hooks to other providers",
|
|
81403
|
+
description: "Migrate Claude Code agents, commands, skills, config, rules, and hooks to other providers (e.g. Codex). Set updatePipeline.autoMigrateAfterUpdate to keep targets in sync with Claude Code on each `ck update`.",
|
|
80990
81404
|
usage: "ck migrate [options]",
|
|
80991
81405
|
examples: [
|
|
80992
81406
|
{
|
|
@@ -86513,7 +86927,7 @@ init_commands_discovery();
|
|
|
86513
86927
|
|
|
86514
86928
|
// src/commands/config/config-ui-command.ts
|
|
86515
86929
|
init_logger();
|
|
86516
|
-
var
|
|
86930
|
+
var import_picocolors15 = __toESM(require_picocolors(), 1);
|
|
86517
86931
|
import { networkInterfaces } from "node:os";
|
|
86518
86932
|
var LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "::1"]);
|
|
86519
86933
|
var WILDCARD_HOSTS2 = new Set(["0.0.0.0", "::"]);
|
|
@@ -86541,24 +86955,24 @@ async function configUICommand(options2 = {}) {
|
|
|
86541
86955
|
});
|
|
86542
86956
|
const urls = getDashboardUrls(server.host, server.port);
|
|
86543
86957
|
console.log();
|
|
86544
|
-
console.log(
|
|
86545
|
-
console.log(
|
|
86958
|
+
console.log(import_picocolors15.default.bold(" ClaudeKit Dashboard"));
|
|
86959
|
+
console.log(import_picocolors15.default.dim(" ─────────────────────"));
|
|
86546
86960
|
if (urls.local) {
|
|
86547
|
-
console.log(` ${
|
|
86961
|
+
console.log(` ${import_picocolors15.default.green("➜")} Local: ${import_picocolors15.default.cyan(urls.local)}`);
|
|
86548
86962
|
}
|
|
86549
86963
|
for (const url of urls.network) {
|
|
86550
|
-
console.log(` ${
|
|
86964
|
+
console.log(` ${import_picocolors15.default.green(urls.local ? "•" : "➜")} Network: ${import_picocolors15.default.cyan(url)}`);
|
|
86551
86965
|
}
|
|
86552
|
-
console.log(` ${
|
|
86966
|
+
console.log(` ${import_picocolors15.default.green("•")} Bind: ${import_picocolors15.default.cyan(server.host)}`);
|
|
86553
86967
|
console.log();
|
|
86554
|
-
console.log(
|
|
86968
|
+
console.log(import_picocolors15.default.dim(" Press Ctrl+C to stop"));
|
|
86555
86969
|
console.log();
|
|
86556
|
-
await new Promise((
|
|
86970
|
+
await new Promise((resolve36) => {
|
|
86557
86971
|
const shutdown = async () => {
|
|
86558
86972
|
console.log();
|
|
86559
86973
|
logger.info("Shutting down...");
|
|
86560
86974
|
await server.close();
|
|
86561
|
-
|
|
86975
|
+
resolve36();
|
|
86562
86976
|
};
|
|
86563
86977
|
process.on("SIGINT", shutdown);
|
|
86564
86978
|
process.on("SIGTERM", shutdown);
|
|
@@ -86579,12 +86993,12 @@ async function configUICommand(options2 = {}) {
|
|
|
86579
86993
|
}
|
|
86580
86994
|
async function checkPort(port, host) {
|
|
86581
86995
|
const { createServer: createServer2 } = await import("node:net");
|
|
86582
|
-
return new Promise((
|
|
86996
|
+
return new Promise((resolve36) => {
|
|
86583
86997
|
const server = createServer2();
|
|
86584
|
-
server.once("error", () =>
|
|
86998
|
+
server.once("error", () => resolve36(false));
|
|
86585
86999
|
server.once("listening", () => {
|
|
86586
87000
|
server.close();
|
|
86587
|
-
|
|
87001
|
+
resolve36(true);
|
|
86588
87002
|
});
|
|
86589
87003
|
server.listen(port, host);
|
|
86590
87004
|
});
|
|
@@ -86996,7 +87410,7 @@ function shouldSkipExpensiveOperations3() {
|
|
|
86996
87410
|
return shouldSkipExpensiveOperations();
|
|
86997
87411
|
}
|
|
86998
87412
|
function getGhUpgradeInstructions(currentVersion) {
|
|
86999
|
-
const
|
|
87413
|
+
const platform8 = process.platform;
|
|
87000
87414
|
const wsl = isWSL2();
|
|
87001
87415
|
const lines = [];
|
|
87002
87416
|
lines.push(`✗ GitHub CLI v${currentVersion} is outdated`);
|
|
@@ -87007,10 +87421,10 @@ function getGhUpgradeInstructions(currentVersion) {
|
|
|
87007
87421
|
lines.push(" curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg");
|
|
87008
87422
|
lines.push(' echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null');
|
|
87009
87423
|
lines.push(" sudo apt update && sudo apt install gh");
|
|
87010
|
-
} else if (
|
|
87424
|
+
} else if (platform8 === "darwin") {
|
|
87011
87425
|
lines.push("Upgrade GitHub CLI:");
|
|
87012
87426
|
lines.push(" brew upgrade gh");
|
|
87013
|
-
} else if (
|
|
87427
|
+
} else if (platform8 === "win32") {
|
|
87014
87428
|
lines.push("Upgrade GitHub CLI:");
|
|
87015
87429
|
lines.push(" winget upgrade GitHub.cli");
|
|
87016
87430
|
} else {
|
|
@@ -87030,18 +87444,18 @@ import { exec as exec3 } from "node:child_process";
|
|
|
87030
87444
|
import { promisify as promisify10 } from "node:util";
|
|
87031
87445
|
var execAsync3 = promisify10(exec3);
|
|
87032
87446
|
function getOSInfo() {
|
|
87033
|
-
const
|
|
87447
|
+
const platform8 = process.platform;
|
|
87034
87448
|
const arch2 = process.arch;
|
|
87035
|
-
const isWindows3 =
|
|
87036
|
-
const isMacOS2 =
|
|
87037
|
-
const isLinux2 =
|
|
87449
|
+
const isWindows3 = platform8 === "win32";
|
|
87450
|
+
const isMacOS2 = platform8 === "darwin";
|
|
87451
|
+
const isLinux2 = platform8 === "linux";
|
|
87038
87452
|
const isWSL3 = isLinux2 && process.env.WSL_DISTRO_NAME !== undefined;
|
|
87039
|
-
let details = `${
|
|
87453
|
+
let details = `${platform8}-${arch2}`;
|
|
87040
87454
|
if (isWSL3) {
|
|
87041
87455
|
details += ` (WSL: ${process.env.WSL_DISTRO_NAME})`;
|
|
87042
87456
|
}
|
|
87043
87457
|
return {
|
|
87044
|
-
platform:
|
|
87458
|
+
platform: platform8,
|
|
87045
87459
|
arch: arch2,
|
|
87046
87460
|
isWindows: isWindows3,
|
|
87047
87461
|
isMacOS: isMacOS2,
|
|
@@ -87346,16 +87760,16 @@ import * as fs7 from "node:fs";
|
|
|
87346
87760
|
import { promisify as promisify11 } from "node:util";
|
|
87347
87761
|
var execAsync4 = promisify11(exec4);
|
|
87348
87762
|
async function detectOS() {
|
|
87349
|
-
const
|
|
87350
|
-
const info = { platform:
|
|
87351
|
-
if (
|
|
87763
|
+
const platform8 = process.platform;
|
|
87764
|
+
const info = { platform: platform8 };
|
|
87765
|
+
if (platform8 === "darwin") {
|
|
87352
87766
|
try {
|
|
87353
87767
|
await execAsync4("which brew");
|
|
87354
87768
|
info.hasHomebrew = true;
|
|
87355
87769
|
} catch {
|
|
87356
87770
|
info.hasHomebrew = false;
|
|
87357
87771
|
}
|
|
87358
|
-
} else if (
|
|
87772
|
+
} else if (platform8 === "linux") {
|
|
87359
87773
|
try {
|
|
87360
87774
|
if (fs7.existsSync("/etc/os-release")) {
|
|
87361
87775
|
const content = fs7.readFileSync("/etc/os-release", "utf-8");
|
|
@@ -87872,8 +88286,8 @@ import { existsSync as existsSync53 } from "node:fs";
|
|
|
87872
88286
|
import { join as join74 } from "node:path";
|
|
87873
88287
|
function checkSkillsScripts(setup) {
|
|
87874
88288
|
const results = [];
|
|
87875
|
-
const
|
|
87876
|
-
const scriptName =
|
|
88289
|
+
const platform8 = process.platform;
|
|
88290
|
+
const scriptName = platform8 === "win32" ? "install.ps1" : "install.sh";
|
|
87877
88291
|
if (setup.global.path) {
|
|
87878
88292
|
const globalScriptPath = join74(setup.global.path, "skills", scriptName);
|
|
87879
88293
|
const hasGlobalScript = existsSync53(globalScriptPath);
|
|
@@ -87927,7 +88341,7 @@ function checkComponentCounts(setup) {
|
|
|
87927
88341
|
}
|
|
87928
88342
|
// src/domains/health-checks/checkers/skill-budget-checker.ts
|
|
87929
88343
|
init_path_resolver();
|
|
87930
|
-
import { join as join76, resolve as
|
|
88344
|
+
import { join as join76, resolve as resolve36 } from "node:path";
|
|
87931
88345
|
|
|
87932
88346
|
// src/domains/health-checks/checkers/skill-budget-scanner.ts
|
|
87933
88347
|
var import_gray_matter11 = __toESM(require_gray_matter(), 1);
|
|
@@ -88046,8 +88460,8 @@ async function applyBudgetDefaults(settingsPath, projectClaudeDir, requiredFract
|
|
|
88046
88460
|
// src/domains/health-checks/checkers/skill-budget-checker.ts
|
|
88047
88461
|
var ENGINEER_SKILL_COUNT_THRESHOLD = 20;
|
|
88048
88462
|
async function checkSkillBudget(setup, projectDir) {
|
|
88049
|
-
const projectClaudeDir =
|
|
88050
|
-
const globalClaudeDir =
|
|
88463
|
+
const projectClaudeDir = resolve36(projectDir, ".claude");
|
|
88464
|
+
const globalClaudeDir = resolve36(PathResolver.getGlobalKitDir());
|
|
88051
88465
|
const projectScopeAliasesGlobal = projectClaudeDir === globalClaudeDir;
|
|
88052
88466
|
const [projectSkills, globalSkills] = await Promise.all([
|
|
88053
88467
|
projectScopeAliasesGlobal ? Promise.resolve([]) : scanSkills2(join76(projectClaudeDir, "skills")),
|
|
@@ -88446,8 +88860,8 @@ init_logger();
|
|
|
88446
88860
|
init_path_resolver();
|
|
88447
88861
|
import { existsSync as existsSync58 } from "node:fs";
|
|
88448
88862
|
import { readFile as readFile42 } from "node:fs/promises";
|
|
88449
|
-
import { homedir as
|
|
88450
|
-
import { dirname as dirname31, join as join80, normalize as normalize6, resolve as
|
|
88863
|
+
import { homedir as homedir43 } from "node:os";
|
|
88864
|
+
import { dirname as dirname31, join as join80, normalize as normalize6, resolve as resolve37 } from "node:path";
|
|
88451
88865
|
async function checkPathRefsValid(projectDir) {
|
|
88452
88866
|
const globalClaudeMd = join80(PathResolver.getGlobalKitDir(), "CLAUDE.md");
|
|
88453
88867
|
const projectClaudeMd = join80(projectDir, ".claude", "CLAUDE.md");
|
|
@@ -88479,7 +88893,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
88479
88893
|
};
|
|
88480
88894
|
}
|
|
88481
88895
|
const baseDir = dirname31(claudeMdPath);
|
|
88482
|
-
const home5 =
|
|
88896
|
+
const home5 = homedir43();
|
|
88483
88897
|
const broken = [];
|
|
88484
88898
|
for (const ref of refs) {
|
|
88485
88899
|
let refPath;
|
|
@@ -88494,7 +88908,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
88494
88908
|
} else if (/^[A-Za-z]:/.test(ref)) {
|
|
88495
88909
|
refPath = normalize6(ref);
|
|
88496
88910
|
} else {
|
|
88497
|
-
refPath =
|
|
88911
|
+
refPath = resolve37(baseDir, ref);
|
|
88498
88912
|
}
|
|
88499
88913
|
const normalizedPath = normalize6(refPath);
|
|
88500
88914
|
const isWithinHome = normalizedPath.startsWith(home5);
|
|
@@ -89477,19 +89891,19 @@ class AuthChecker {
|
|
|
89477
89891
|
}
|
|
89478
89892
|
}
|
|
89479
89893
|
// src/domains/health-checks/platform-checker.ts
|
|
89480
|
-
import { platform as
|
|
89894
|
+
import { platform as platform9 } from "node:os";
|
|
89481
89895
|
|
|
89482
89896
|
// src/domains/health-checks/platform/environment-checker.ts
|
|
89483
89897
|
init_environment();
|
|
89484
89898
|
init_path_resolver();
|
|
89485
89899
|
import { constants as constants3, access as access4, mkdir as mkdir21, readFile as readFile44, unlink as unlink11, writeFile as writeFile21 } from "node:fs/promises";
|
|
89486
|
-
import { arch as arch2, homedir as
|
|
89900
|
+
import { arch as arch2, homedir as homedir44, platform as platform8 } from "node:os";
|
|
89487
89901
|
import { join as join85, normalize as normalize7 } from "node:path";
|
|
89488
89902
|
function shouldSkipExpensiveOperations4() {
|
|
89489
89903
|
return shouldSkipExpensiveOperations();
|
|
89490
89904
|
}
|
|
89491
89905
|
async function checkPlatformDetect() {
|
|
89492
|
-
const os7 =
|
|
89906
|
+
const os7 = platform8();
|
|
89493
89907
|
const architecture = arch2();
|
|
89494
89908
|
const wslDistro = process.env.WSL_DISTRO_NAME;
|
|
89495
89909
|
let message = `${os7} (${architecture})`;
|
|
@@ -89506,8 +89920,8 @@ async function checkPlatformDetect() {
|
|
|
89506
89920
|
};
|
|
89507
89921
|
}
|
|
89508
89922
|
async function checkHomeDirResolution() {
|
|
89509
|
-
const nodeHome = normalize7(
|
|
89510
|
-
const rawEnvHome = getHomeDirectoryFromEnv(
|
|
89923
|
+
const nodeHome = normalize7(homedir44());
|
|
89924
|
+
const rawEnvHome = getHomeDirectoryFromEnv(platform8());
|
|
89511
89925
|
const envHome = rawEnvHome ? normalize7(rawEnvHome) : "";
|
|
89512
89926
|
const match = nodeHome === envHome && envHome !== "";
|
|
89513
89927
|
return {
|
|
@@ -89742,7 +90156,7 @@ async function checkSymlinkSupport() {
|
|
|
89742
90156
|
}
|
|
89743
90157
|
|
|
89744
90158
|
// src/domains/health-checks/platform-checker.ts
|
|
89745
|
-
var IS_WINDOWS =
|
|
90159
|
+
var IS_WINDOWS = platform9() === "win32";
|
|
89746
90160
|
|
|
89747
90161
|
class PlatformChecker {
|
|
89748
90162
|
group = "platform";
|
|
@@ -89955,17 +90369,17 @@ function createDefaultDns() {
|
|
|
89955
90369
|
}
|
|
89956
90370
|
function createDefaultTcp() {
|
|
89957
90371
|
return {
|
|
89958
|
-
connect: ({ host, port, timeoutMs }) => new Promise((
|
|
90372
|
+
connect: ({ host, port, timeoutMs }) => new Promise((resolve38) => {
|
|
89959
90373
|
const start = Date.now();
|
|
89960
90374
|
const socket = net2.createConnection({ host, port });
|
|
89961
90375
|
const timer = setTimeout(() => {
|
|
89962
90376
|
socket.destroy();
|
|
89963
|
-
|
|
90377
|
+
resolve38({ ok: false, layer: "tcp", detail: "timeout", latencyMs: Date.now() - start });
|
|
89964
90378
|
}, timeoutMs);
|
|
89965
90379
|
socket.on("connect", () => {
|
|
89966
90380
|
clearTimeout(timer);
|
|
89967
90381
|
socket.destroy();
|
|
89968
|
-
|
|
90382
|
+
resolve38({
|
|
89969
90383
|
ok: true,
|
|
89970
90384
|
layer: "tcp",
|
|
89971
90385
|
detail: "connected",
|
|
@@ -89974,7 +90388,7 @@ function createDefaultTcp() {
|
|
|
89974
90388
|
});
|
|
89975
90389
|
socket.on("error", (err) => {
|
|
89976
90390
|
clearTimeout(timer);
|
|
89977
|
-
|
|
90391
|
+
resolve38({
|
|
89978
90392
|
ok: false,
|
|
89979
90393
|
layer: "tcp",
|
|
89980
90394
|
detail: err.message,
|
|
@@ -89986,11 +90400,11 @@ function createDefaultTcp() {
|
|
|
89986
90400
|
}
|
|
89987
90401
|
function createDefaultTls() {
|
|
89988
90402
|
return {
|
|
89989
|
-
get: (url, timeoutMs) => new Promise((
|
|
90403
|
+
get: (url, timeoutMs) => new Promise((resolve38) => {
|
|
89990
90404
|
const start = Date.now();
|
|
89991
90405
|
const timer = setTimeout(() => {
|
|
89992
90406
|
req.destroy();
|
|
89993
|
-
|
|
90407
|
+
resolve38({ ok: false, layer: "tls", detail: "timeout", latencyMs: Date.now() - start });
|
|
89994
90408
|
}, timeoutMs);
|
|
89995
90409
|
const req = https.get(url, {
|
|
89996
90410
|
headers: {
|
|
@@ -90002,14 +90416,14 @@ function createDefaultTls() {
|
|
|
90002
90416
|
const status = res.statusCode ?? 0;
|
|
90003
90417
|
const latencyMs = Date.now() - start;
|
|
90004
90418
|
if (status === 200) {
|
|
90005
|
-
|
|
90419
|
+
resolve38({ ok: true, layer: "tls", detail: `HTTP ${status}`, latencyMs });
|
|
90006
90420
|
} else {
|
|
90007
|
-
|
|
90421
|
+
resolve38({ ok: false, layer: "tls", detail: `HTTP ${status}`, latencyMs });
|
|
90008
90422
|
}
|
|
90009
90423
|
});
|
|
90010
90424
|
req.on("error", (err) => {
|
|
90011
90425
|
clearTimeout(timer);
|
|
90012
|
-
|
|
90426
|
+
resolve38({
|
|
90013
90427
|
ok: false,
|
|
90014
90428
|
layer: "tls",
|
|
90015
90429
|
detail: err.message,
|
|
@@ -90130,11 +90544,11 @@ async function checkGitHubReachability(deps) {
|
|
|
90130
90544
|
};
|
|
90131
90545
|
}
|
|
90132
90546
|
function raceTimeout(promise, ms) {
|
|
90133
|
-
return new Promise((
|
|
90547
|
+
return new Promise((resolve38, reject) => {
|
|
90134
90548
|
const timer = setTimeout(() => reject(new Error(`timeout after ${ms}ms`)), ms);
|
|
90135
90549
|
promise.then((v2) => {
|
|
90136
90550
|
clearTimeout(timer);
|
|
90137
|
-
|
|
90551
|
+
resolve38(v2);
|
|
90138
90552
|
}, (e2) => {
|
|
90139
90553
|
clearTimeout(timer);
|
|
90140
90554
|
reject(e2);
|
|
@@ -90507,7 +90921,7 @@ class ReportGenerator {
|
|
|
90507
90921
|
}
|
|
90508
90922
|
// src/domains/health-checks/doctor-ui-renderer.ts
|
|
90509
90923
|
init_terminal_utils();
|
|
90510
|
-
var
|
|
90924
|
+
var import_picocolors16 = __toESM(require_picocolors(), 1);
|
|
90511
90925
|
|
|
90512
90926
|
class DoctorUIRenderer {
|
|
90513
90927
|
symbols = getStatusSymbols();
|
|
@@ -90519,8 +90933,8 @@ class DoctorUIRenderer {
|
|
|
90519
90933
|
const groups = this.groupChecks(summary.checks);
|
|
90520
90934
|
for (const [groupName, checks] of groups) {
|
|
90521
90935
|
console.log("│");
|
|
90522
|
-
console.log(`│ ${
|
|
90523
|
-
console.log(`│ ${
|
|
90936
|
+
console.log(`│ ${import_picocolors16.default.bold(import_picocolors16.default.cyan(groupName.toUpperCase()))}`);
|
|
90937
|
+
console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
|
|
90524
90938
|
const maxNameLen = Math.max(...checks.map((c2) => c2.name.length));
|
|
90525
90939
|
const maxMsgLen = Math.max(...checks.map((c2) => c2.message.length));
|
|
90526
90940
|
for (const check of checks) {
|
|
@@ -90532,55 +90946,55 @@ class DoctorUIRenderer {
|
|
|
90532
90946
|
}
|
|
90533
90947
|
renderCheck(check, maxNameLen, maxMsgLen) {
|
|
90534
90948
|
const symbol = this.getColoredSymbol(check.status);
|
|
90535
|
-
const name =
|
|
90949
|
+
const name = import_picocolors16.default.bold(check.name.padEnd(maxNameLen));
|
|
90536
90950
|
const paddedMsg = check.message.padEnd(maxMsgLen);
|
|
90537
90951
|
const value = this.colorizeValue(check.status, paddedMsg);
|
|
90538
90952
|
if (this.verbose && check.command) {
|
|
90539
|
-
console.log(`│ ${
|
|
90953
|
+
console.log(`│ ${import_picocolors16.default.dim(`Running: ${check.command}`)}`);
|
|
90540
90954
|
}
|
|
90541
90955
|
let line = `│ ${symbol} ${name} ${value}`;
|
|
90542
90956
|
if (this.verbose && check.duration !== undefined) {
|
|
90543
|
-
line += ` ${
|
|
90957
|
+
line += ` ${import_picocolors16.default.dim(`(${check.duration}ms)`)}`;
|
|
90544
90958
|
}
|
|
90545
90959
|
if (check.details) {
|
|
90546
90960
|
const displayPath = this.verbose ? check.details : this.shortenPath(check.details);
|
|
90547
|
-
line += ` ${
|
|
90961
|
+
line += ` ${import_picocolors16.default.dim(displayPath)}`;
|
|
90548
90962
|
}
|
|
90549
90963
|
console.log(line);
|
|
90550
90964
|
if (this.verbose && check.status === "pass" && check.suggestion) {
|
|
90551
90965
|
const indent = " ".repeat(maxNameLen + 5);
|
|
90552
|
-
console.log(`│ ${indent}${
|
|
90966
|
+
console.log(`│ ${indent}${import_picocolors16.default.dim(`→ ${check.suggestion}`)}`);
|
|
90553
90967
|
}
|
|
90554
90968
|
if (check.status !== "pass" && check.suggestion) {
|
|
90555
90969
|
const indent = " ".repeat(maxNameLen + 5);
|
|
90556
|
-
console.log(`│ ${indent}${
|
|
90970
|
+
console.log(`│ ${indent}${import_picocolors16.default.dim(`→ ${check.suggestion}`)}`);
|
|
90557
90971
|
}
|
|
90558
90972
|
}
|
|
90559
90973
|
getColoredSymbol(status) {
|
|
90560
90974
|
switch (status) {
|
|
90561
90975
|
case "pass":
|
|
90562
|
-
return
|
|
90976
|
+
return import_picocolors16.default.green(this.symbols.pass);
|
|
90563
90977
|
case "warn":
|
|
90564
|
-
return
|
|
90978
|
+
return import_picocolors16.default.yellow(this.symbols.warn);
|
|
90565
90979
|
case "fail":
|
|
90566
|
-
return
|
|
90980
|
+
return import_picocolors16.default.red(this.symbols.fail);
|
|
90567
90981
|
default:
|
|
90568
|
-
return
|
|
90982
|
+
return import_picocolors16.default.blue(this.symbols.info);
|
|
90569
90983
|
}
|
|
90570
90984
|
}
|
|
90571
90985
|
renderHealingSummary(healSummary) {
|
|
90572
90986
|
console.log("│");
|
|
90573
|
-
console.log(`│ ${
|
|
90574
|
-
console.log(`│ ${
|
|
90987
|
+
console.log(`│ ${import_picocolors16.default.bold(import_picocolors16.default.cyan("AUTO-HEAL RESULTS"))}`);
|
|
90988
|
+
console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
|
|
90575
90989
|
for (const fix of healSummary.fixes) {
|
|
90576
|
-
const symbol = fix.success ?
|
|
90577
|
-
console.log(`│ ${symbol} ${
|
|
90990
|
+
const symbol = fix.success ? import_picocolors16.default.green(this.symbols.pass) : import_picocolors16.default.red(this.symbols.fail);
|
|
90991
|
+
console.log(`│ ${symbol} ${import_picocolors16.default.bold(fix.checkName)} ${import_picocolors16.default.dim(fix.message)}`);
|
|
90578
90992
|
if (!fix.success && fix.error) {
|
|
90579
|
-
console.log(`│ ${
|
|
90993
|
+
console.log(`│ ${import_picocolors16.default.red(`Error: ${fix.error}`)}`);
|
|
90580
90994
|
}
|
|
90581
90995
|
}
|
|
90582
90996
|
console.log("│");
|
|
90583
|
-
console.log(`│ Fixed: ${
|
|
90997
|
+
console.log(`│ Fixed: ${import_picocolors16.default.green(String(healSummary.succeeded))}, Failed: ${import_picocolors16.default.red(String(healSummary.failed))}`);
|
|
90584
90998
|
}
|
|
90585
90999
|
groupChecks(checks) {
|
|
90586
91000
|
const groups = new Map;
|
|
@@ -90594,11 +91008,11 @@ class DoctorUIRenderer {
|
|
|
90594
91008
|
colorizeValue(status, message) {
|
|
90595
91009
|
switch (status) {
|
|
90596
91010
|
case "pass":
|
|
90597
|
-
return
|
|
91011
|
+
return import_picocolors16.default.green(message);
|
|
90598
91012
|
case "warn":
|
|
90599
|
-
return
|
|
91013
|
+
return import_picocolors16.default.yellow(message);
|
|
90600
91014
|
case "fail":
|
|
90601
|
-
return
|
|
91015
|
+
return import_picocolors16.default.red(message);
|
|
90602
91016
|
default:
|
|
90603
91017
|
return message;
|
|
90604
91018
|
}
|
|
@@ -90617,23 +91031,23 @@ class DoctorUIRenderer {
|
|
|
90617
91031
|
renderSummaryLine(summary) {
|
|
90618
91032
|
const parts = [];
|
|
90619
91033
|
if (summary.passed > 0) {
|
|
90620
|
-
parts.push(
|
|
91034
|
+
parts.push(import_picocolors16.default.green(`${summary.passed} ${this.symbols.pass}`));
|
|
90621
91035
|
}
|
|
90622
91036
|
if (summary.warnings > 0) {
|
|
90623
|
-
parts.push(
|
|
91037
|
+
parts.push(import_picocolors16.default.yellow(`${summary.warnings} ${this.symbols.warn}`));
|
|
90624
91038
|
}
|
|
90625
91039
|
if (summary.failed > 0) {
|
|
90626
|
-
parts.push(
|
|
91040
|
+
parts.push(import_picocolors16.default.red(`${summary.failed} ${this.symbols.fail}`));
|
|
90627
91041
|
}
|
|
90628
|
-
console.log(`│ ${
|
|
91042
|
+
console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
|
|
90629
91043
|
console.log(`│ Summary: ${parts.join(" ")}`);
|
|
90630
91044
|
console.log("│");
|
|
90631
|
-
console.log(`│ ${
|
|
90632
|
-
console.log(`│ ${
|
|
90633
|
-
console.log(`│ ${
|
|
90634
|
-
console.log(`│ ${
|
|
90635
|
-
console.log(`│ ${
|
|
90636
|
-
console.log(`│ ${
|
|
91045
|
+
console.log(`│ ${import_picocolors16.default.dim("Quick Commands:")}`);
|
|
91046
|
+
console.log(`│ ${import_picocolors16.default.dim(" ck init Install/update ClaudeKit in project")}`);
|
|
91047
|
+
console.log(`│ ${import_picocolors16.default.dim(" ck init -g Install/update ClaudeKit globally")}`);
|
|
91048
|
+
console.log(`│ ${import_picocolors16.default.dim(" ck update Update the CLI tool")}`);
|
|
91049
|
+
console.log(`│ ${import_picocolors16.default.dim(" ck uninstall Remove ClaudeKit from project/global")}`);
|
|
91050
|
+
console.log(`│ ${import_picocolors16.default.dim(" ck --help Show all commands")}`);
|
|
90637
91051
|
}
|
|
90638
91052
|
}
|
|
90639
91053
|
// src/commands/doctor.ts
|
|
@@ -90733,33 +91147,33 @@ function createDoctorRunner(options2) {
|
|
|
90733
91147
|
// src/commands/easter-egg.ts
|
|
90734
91148
|
init_logger();
|
|
90735
91149
|
init_safe_prompts();
|
|
90736
|
-
var
|
|
91150
|
+
var import_picocolors17 = __toESM(require_picocolors(), 1);
|
|
90737
91151
|
var API_URL = "https://claudekit.cc/api/egg";
|
|
90738
91152
|
function getRarityColor(rarity) {
|
|
90739
91153
|
switch (rarity) {
|
|
90740
91154
|
case "Legendary":
|
|
90741
|
-
return
|
|
91155
|
+
return import_picocolors17.default.magenta;
|
|
90742
91156
|
case "Epic":
|
|
90743
|
-
return
|
|
91157
|
+
return import_picocolors17.default.yellow;
|
|
90744
91158
|
case "Rare":
|
|
90745
|
-
return
|
|
91159
|
+
return import_picocolors17.default.blue;
|
|
90746
91160
|
case "Uncommon":
|
|
90747
|
-
return
|
|
91161
|
+
return import_picocolors17.default.green;
|
|
90748
91162
|
default:
|
|
90749
|
-
return
|
|
91163
|
+
return import_picocolors17.default.gray;
|
|
90750
91164
|
}
|
|
90751
91165
|
}
|
|
90752
91166
|
async function easterEggCommand() {
|
|
90753
91167
|
intro("\uD83E\uDD5A Code Hunt 2025 - Easter Egg");
|
|
90754
91168
|
try {
|
|
90755
|
-
console.log(
|
|
91169
|
+
console.log(import_picocolors17.default.dim(`
|
|
90756
91170
|
Rolling for a discount code...
|
|
90757
91171
|
`));
|
|
90758
91172
|
const response = await fetch(API_URL);
|
|
90759
91173
|
if (!response.ok) {
|
|
90760
91174
|
if (response.status === 429) {
|
|
90761
|
-
console.log(
|
|
90762
|
-
console.log(
|
|
91175
|
+
console.log(import_picocolors17.default.yellow(" \uD83D\uDC30 Slow down! The eggs aren't going anywhere."));
|
|
91176
|
+
console.log(import_picocolors17.default.dim(` Wait a minute and try again.
|
|
90763
91177
|
`));
|
|
90764
91178
|
outro("\uD83E\uDD5A Rate limited");
|
|
90765
91179
|
return;
|
|
@@ -90768,22 +91182,22 @@ async function easterEggCommand() {
|
|
|
90768
91182
|
}
|
|
90769
91183
|
const data = await response.json();
|
|
90770
91184
|
const rarityColor = getRarityColor(data.rarity);
|
|
90771
|
-
console.log(` ✨ ${
|
|
91185
|
+
console.log(` ✨ ${import_picocolors17.default.bold(data.message)}`);
|
|
90772
91186
|
console.log();
|
|
90773
|
-
console.log(` ${
|
|
90774
|
-
console.log(` ${
|
|
90775
|
-
console.log(` ${
|
|
90776
|
-
console.log(` ${
|
|
91187
|
+
console.log(` ${import_picocolors17.default.bold("Code:")} ${import_picocolors17.default.green(import_picocolors17.default.bold(data.code))}`);
|
|
91188
|
+
console.log(` ${import_picocolors17.default.bold("Discount:")} ${import_picocolors17.default.cyan(data.discount)} off`);
|
|
91189
|
+
console.log(` ${import_picocolors17.default.bold("Rarity:")} ${rarityColor(data.rarity)}`);
|
|
91190
|
+
console.log(` ${import_picocolors17.default.bold("Hint:")} ${import_picocolors17.default.dim(data.hint)}`);
|
|
90777
91191
|
console.log();
|
|
90778
|
-
console.log(` ${
|
|
90779
|
-
console.log(` ${
|
|
91192
|
+
console.log(` ${import_picocolors17.default.dim("Redeem at:")} ${import_picocolors17.default.underline(data.checkout)}`);
|
|
91193
|
+
console.log(` ${import_picocolors17.default.dim("Expires:")} ${data.expires.split("T")[0]}`);
|
|
90780
91194
|
console.log();
|
|
90781
91195
|
outro("\uD83C\uDF84 Happy Holidays from ClaudeKit!");
|
|
90782
91196
|
} catch (error) {
|
|
90783
91197
|
logger.error(error instanceof Error ? error.message : "Failed to fetch easter egg");
|
|
90784
|
-
console.log(
|
|
91198
|
+
console.log(import_picocolors17.default.red(`
|
|
90785
91199
|
Failed to connect to the egg API.`));
|
|
90786
|
-
console.log(
|
|
91200
|
+
console.log(import_picocolors17.default.dim(` Make sure you have internet access.
|
|
90787
91201
|
`));
|
|
90788
91202
|
process.exit(1);
|
|
90789
91203
|
}
|
|
@@ -92318,7 +92732,7 @@ function filterDeletionPaths(trackedFiles, deletions, kitType) {
|
|
|
92318
92732
|
}
|
|
92319
92733
|
// src/domains/sync/merge-ui.ts
|
|
92320
92734
|
init_dist2();
|
|
92321
|
-
var
|
|
92735
|
+
var import_picocolors18 = __toESM(require_picocolors(), 1);
|
|
92322
92736
|
var HUNK_SEPARATOR_WIDTH = 50;
|
|
92323
92737
|
var EXTENDED_CONTEXT_LINES = 10;
|
|
92324
92738
|
var MAX_LINE_DISPLAY_LENGTH = 120;
|
|
@@ -92337,21 +92751,21 @@ class MergeUI {
|
|
|
92337
92751
|
static async promptHunk(hunk, hunkIndex, totalHunks, _filename) {
|
|
92338
92752
|
requireTTY();
|
|
92339
92753
|
const lineRange = `${hunk.oldStart}-${hunk.oldStart + hunk.oldLines - 1}`;
|
|
92340
|
-
console.log(
|
|
92754
|
+
console.log(import_picocolors18.default.cyan(`
|
|
92341
92755
|
Hunk ${hunkIndex + 1}/${totalHunks}: Lines ${lineRange}`));
|
|
92342
|
-
console.log(
|
|
92756
|
+
console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
|
|
92343
92757
|
for (const line of hunk.lines) {
|
|
92344
92758
|
const displayLine = truncateLine(line);
|
|
92345
92759
|
const prefix = line[0];
|
|
92346
92760
|
if (prefix === "+") {
|
|
92347
|
-
console.log(
|
|
92761
|
+
console.log(import_picocolors18.default.green(displayLine));
|
|
92348
92762
|
} else if (prefix === "-") {
|
|
92349
|
-
console.log(
|
|
92763
|
+
console.log(import_picocolors18.default.red(displayLine));
|
|
92350
92764
|
} else {
|
|
92351
|
-
console.log(
|
|
92765
|
+
console.log(import_picocolors18.default.dim(displayLine));
|
|
92352
92766
|
}
|
|
92353
92767
|
}
|
|
92354
|
-
console.log(
|
|
92768
|
+
console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
|
|
92355
92769
|
const action = await ie({
|
|
92356
92770
|
message: "Action?",
|
|
92357
92771
|
options: [
|
|
@@ -92371,21 +92785,21 @@ Hunk ${hunkIndex + 1}/${totalHunks}: Lines ${lineRange}`));
|
|
|
92371
92785
|
`);
|
|
92372
92786
|
const startLine = Math.max(0, hunk.oldStart - 1 - contextLines);
|
|
92373
92787
|
const endLine = Math.min(lines.length, hunk.oldStart + hunk.oldLines - 1 + contextLines);
|
|
92374
|
-
console.log(
|
|
92788
|
+
console.log(import_picocolors18.default.cyan(`
|
|
92375
92789
|
Extended context (lines ${startLine + 1}-${endLine}):`));
|
|
92376
|
-
console.log(
|
|
92790
|
+
console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
|
|
92377
92791
|
for (let i = startLine;i < endLine; i++) {
|
|
92378
92792
|
const lineNum = String(i + 1).padStart(4, " ");
|
|
92379
92793
|
const isInHunk = i >= hunk.oldStart - 1 && i < hunk.oldStart - 1 + hunk.oldLines;
|
|
92380
|
-
const prefix = isInHunk ?
|
|
92381
|
-
console.log(`${
|
|
92794
|
+
const prefix = isInHunk ? import_picocolors18.default.yellow("*") : " ";
|
|
92795
|
+
console.log(`${import_picocolors18.default.dim(lineNum)} ${prefix} ${lines[i]}`);
|
|
92382
92796
|
}
|
|
92383
|
-
console.log(
|
|
92797
|
+
console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
|
|
92384
92798
|
}
|
|
92385
92799
|
static async mergeFile(filename, currentContent, _newContent, hunks) {
|
|
92386
|
-
console.log(
|
|
92800
|
+
console.log(import_picocolors18.default.bold(`
|
|
92387
92801
|
━━━ ${filename} ━━━`));
|
|
92388
|
-
console.log(
|
|
92802
|
+
console.log(import_picocolors18.default.dim(`${hunks.length} change${hunks.length === 1 ? "" : "s"} to review
|
|
92389
92803
|
`));
|
|
92390
92804
|
const decisions = [];
|
|
92391
92805
|
for (let i = 0;i < hunks.length; i++) {
|
|
@@ -92408,19 +92822,19 @@ Extended context (lines ${startLine + 1}-${endLine}):`));
|
|
|
92408
92822
|
}
|
|
92409
92823
|
static displayMergeSummary(filename, applied, rejected) {
|
|
92410
92824
|
if (applied > 0 && rejected > 0) {
|
|
92411
|
-
console.log(
|
|
92825
|
+
console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.green(`${applied} applied`) + import_picocolors18.default.dim(", ") + import_picocolors18.default.yellow(`${rejected} rejected`));
|
|
92412
92826
|
} else if (applied > 0) {
|
|
92413
|
-
console.log(
|
|
92827
|
+
console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.green(`${applied} applied`));
|
|
92414
92828
|
} else {
|
|
92415
|
-
console.log(
|
|
92829
|
+
console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.yellow(`${rejected} rejected`));
|
|
92416
92830
|
}
|
|
92417
92831
|
}
|
|
92418
92832
|
static displaySkipped(filename) {
|
|
92419
|
-
console.log(
|
|
92833
|
+
console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.yellow("skipped"));
|
|
92420
92834
|
}
|
|
92421
92835
|
}
|
|
92422
92836
|
// src/domains/sync/notification-display.ts
|
|
92423
|
-
var
|
|
92837
|
+
var import_picocolors19 = __toESM(require_picocolors(), 1);
|
|
92424
92838
|
import { stdout } from "node:process";
|
|
92425
92839
|
function createNotificationBox(borderColor, boxWidth) {
|
|
92426
92840
|
const contentWidth = boxWidth - 2;
|
|
@@ -92443,13 +92857,13 @@ function displayConfigUpdateNotification(currentVersion, latestVersion, isGlobal
|
|
|
92443
92857
|
const displayLatest = latestVersion.replace(/^v/, "");
|
|
92444
92858
|
const terminalWidth = stdout.columns || 80;
|
|
92445
92859
|
const boxWidth = Math.min(52, terminalWidth - 4);
|
|
92446
|
-
const { topBorder, bottomBorder, emptyLine, padLine } = createNotificationBox(
|
|
92447
|
-
const headerText =
|
|
92860
|
+
const { topBorder, bottomBorder, emptyLine, padLine } = createNotificationBox(import_picocolors19.default.cyan, boxWidth);
|
|
92861
|
+
const headerText = import_picocolors19.default.bold(import_picocolors19.default.yellow("\uD83D\uDCE6 Config Updates Available"));
|
|
92448
92862
|
const headerLen = "\uD83D\uDCE6 Config Updates Available".length;
|
|
92449
|
-
const versionText = `${
|
|
92863
|
+
const versionText = `${import_picocolors19.default.dim(displayCurrent)} ${import_picocolors19.default.white("→")} ${import_picocolors19.default.green(import_picocolors19.default.bold(displayLatest))}`;
|
|
92450
92864
|
const versionLen = displayCurrent.length + 3 + displayLatest.length;
|
|
92451
92865
|
const updateCmd = isGlobal ? "ck init -g --sync" : "ck init --sync";
|
|
92452
|
-
const commandText = `Run: ${
|
|
92866
|
+
const commandText = `Run: ${import_picocolors19.default.cyan(import_picocolors19.default.bold(updateCmd))}`;
|
|
92453
92867
|
const commandLen = `Run: ${updateCmd}`.length;
|
|
92454
92868
|
console.log("");
|
|
92455
92869
|
console.log(topBorder);
|
|
@@ -92564,7 +92978,7 @@ async function getDirectory(defaultDir = ".") {
|
|
|
92564
92978
|
init_github_client();
|
|
92565
92979
|
init_logger();
|
|
92566
92980
|
init_dist2();
|
|
92567
|
-
var
|
|
92981
|
+
var import_picocolors22 = __toESM(require_picocolors(), 1);
|
|
92568
92982
|
|
|
92569
92983
|
// src/domains/versioning/selection/version-filter.ts
|
|
92570
92984
|
var VERSION_PATTERN = /^v?\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/;
|
|
@@ -92582,36 +92996,36 @@ function normalizeVersionTag(version) {
|
|
|
92582
92996
|
init_environment();
|
|
92583
92997
|
init_logger();
|
|
92584
92998
|
init_dist2();
|
|
92585
|
-
var
|
|
92999
|
+
var import_picocolors21 = __toESM(require_picocolors(), 1);
|
|
92586
93000
|
|
|
92587
93001
|
// src/domains/versioning/version-display.ts
|
|
92588
|
-
var
|
|
93002
|
+
var import_picocolors20 = __toESM(require_picocolors(), 1);
|
|
92589
93003
|
|
|
92590
93004
|
class VersionDisplayFormatter {
|
|
92591
93005
|
static createBadges(release) {
|
|
92592
93006
|
const badges = [];
|
|
92593
93007
|
if (release.isLatestStable) {
|
|
92594
|
-
badges.push(
|
|
93008
|
+
badges.push(import_picocolors20.default.bold(import_picocolors20.default.yellow("[latest]")));
|
|
92595
93009
|
}
|
|
92596
93010
|
if (release.prerelease || release.isLatestBeta) {
|
|
92597
93011
|
if (release.isLatestBeta) {
|
|
92598
|
-
badges.push(
|
|
93012
|
+
badges.push(import_picocolors20.default.bold(import_picocolors20.default.magenta("[beta]")));
|
|
92599
93013
|
} else {
|
|
92600
|
-
badges.push(
|
|
93014
|
+
badges.push(import_picocolors20.default.magenta("[prerelease]"));
|
|
92601
93015
|
}
|
|
92602
93016
|
} else if (!release.draft) {
|
|
92603
|
-
badges.push(
|
|
93017
|
+
badges.push(import_picocolors20.default.blue("[stable]"));
|
|
92604
93018
|
}
|
|
92605
93019
|
if (release.draft) {
|
|
92606
|
-
badges.push(
|
|
93020
|
+
badges.push(import_picocolors20.default.gray("[draft]"));
|
|
92607
93021
|
}
|
|
92608
93022
|
return badges.length > 0 ? ` ${badges.join(" ")}` : "";
|
|
92609
93023
|
}
|
|
92610
93024
|
static formatChoiceLabel(release) {
|
|
92611
|
-
const version =
|
|
93025
|
+
const version = import_picocolors20.default.green(release.displayVersion);
|
|
92612
93026
|
const badges = VersionDisplayFormatter.createBadges(release);
|
|
92613
93027
|
const name = release.name || "Release";
|
|
92614
|
-
return `${version}${badges} ${
|
|
93028
|
+
return `${version}${badges} ${import_picocolors20.default.dim(name)}`;
|
|
92615
93029
|
}
|
|
92616
93030
|
static formatChoiceHint(release) {
|
|
92617
93031
|
const parts = [];
|
|
@@ -92633,7 +93047,7 @@ class VersionDisplayFormatter {
|
|
|
92633
93047
|
if (latestStable) {
|
|
92634
93048
|
options2.push({
|
|
92635
93049
|
value: latestStable.tag_name,
|
|
92636
|
-
label: `${
|
|
93050
|
+
label: `${import_picocolors20.default.bold(import_picocolors20.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
|
|
92637
93051
|
hint: "recommended version",
|
|
92638
93052
|
isLatest: true,
|
|
92639
93053
|
isPrerelease: false
|
|
@@ -92643,7 +93057,7 @@ class VersionDisplayFormatter {
|
|
|
92643
93057
|
if (latestBeta) {
|
|
92644
93058
|
options2.push({
|
|
92645
93059
|
value: latestBeta.tag_name,
|
|
92646
|
-
label: `${
|
|
93060
|
+
label: `${import_picocolors20.default.bold(import_picocolors20.default.magenta("Latest Beta"))} (${latestBeta.displayVersion})`,
|
|
92647
93061
|
hint: "latest features, may be unstable",
|
|
92648
93062
|
isLatest: false,
|
|
92649
93063
|
isPrerelease: true
|
|
@@ -92654,7 +93068,7 @@ class VersionDisplayFormatter {
|
|
|
92654
93068
|
static createSeparator() {
|
|
92655
93069
|
return {
|
|
92656
93070
|
value: "separator",
|
|
92657
|
-
label:
|
|
93071
|
+
label: import_picocolors20.default.dim("─".repeat(50)),
|
|
92658
93072
|
hint: undefined,
|
|
92659
93073
|
isLatest: false,
|
|
92660
93074
|
isPrerelease: false
|
|
@@ -92663,7 +93077,7 @@ class VersionDisplayFormatter {
|
|
|
92663
93077
|
static createCancelOption() {
|
|
92664
93078
|
return {
|
|
92665
93079
|
value: "cancel",
|
|
92666
|
-
label:
|
|
93080
|
+
label: import_picocolors20.default.red("Cancel"),
|
|
92667
93081
|
hint: "exit version selection",
|
|
92668
93082
|
isLatest: false,
|
|
92669
93083
|
isPrerelease: false
|
|
@@ -92715,15 +93129,15 @@ class VersionDisplayFormatter {
|
|
|
92715
93129
|
return value !== "separator" && value !== "cancel" && value.trim().length > 0;
|
|
92716
93130
|
}
|
|
92717
93131
|
static formatError(message, suggestion) {
|
|
92718
|
-
let output2 =
|
|
93132
|
+
let output2 = import_picocolors20.default.red(`Error: ${message}`);
|
|
92719
93133
|
if (suggestion) {
|
|
92720
93134
|
output2 += `
|
|
92721
|
-
${
|
|
93135
|
+
${import_picocolors20.default.dim(suggestion)}`;
|
|
92722
93136
|
}
|
|
92723
93137
|
return output2;
|
|
92724
93138
|
}
|
|
92725
93139
|
static formatSuccess(version, kitName) {
|
|
92726
|
-
return `${
|
|
93140
|
+
return `${import_picocolors20.default.green("✓")} Selected ${import_picocolors20.default.bold(version)} for ${import_picocolors20.default.bold(kitName)}`;
|
|
92727
93141
|
}
|
|
92728
93142
|
}
|
|
92729
93143
|
|
|
@@ -92733,7 +93147,7 @@ async function handleNoReleases(kit, allowManualEntry) {
|
|
|
92733
93147
|
This could be due to:
|
|
92734
93148
|
• No releases published yet
|
|
92735
93149
|
• Network connectivity issues
|
|
92736
|
-
• Repository access permissions`,
|
|
93150
|
+
• Repository access permissions`, import_picocolors21.default.yellow("No Releases Available"));
|
|
92737
93151
|
if (!allowManualEntry) {
|
|
92738
93152
|
throw new Error(`No releases available for ${kit.name}`);
|
|
92739
93153
|
}
|
|
@@ -92793,34 +93207,34 @@ async function createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry
|
|
|
92793
93207
|
if (latestStable) {
|
|
92794
93208
|
clackChoices.push({
|
|
92795
93209
|
value: latestStable.tag_name,
|
|
92796
|
-
label: `${
|
|
93210
|
+
label: `${import_picocolors21.default.bold(import_picocolors21.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
|
|
92797
93211
|
hint: "recommended"
|
|
92798
93212
|
});
|
|
92799
93213
|
}
|
|
92800
93214
|
if (allowManualEntry) {
|
|
92801
93215
|
clackChoices.push({
|
|
92802
93216
|
value: "manual-entry",
|
|
92803
|
-
label:
|
|
93217
|
+
label: import_picocolors21.default.cyan("↳ Enter Version Manually"),
|
|
92804
93218
|
hint: "for older versions"
|
|
92805
93219
|
});
|
|
92806
93220
|
}
|
|
92807
93221
|
clackChoices.push({
|
|
92808
93222
|
value: "cancel",
|
|
92809
|
-
label:
|
|
93223
|
+
label: import_picocolors21.default.red("✕ Cancel")
|
|
92810
93224
|
});
|
|
92811
93225
|
const versionChoices = choices.filter((choice) => choice.value !== "separator" && choice.value !== "cancel");
|
|
92812
93226
|
for (const choice of versionChoices) {
|
|
92813
93227
|
const isCurrentlyInstalled = currentVersion && (choice.value === currentVersion || choice.value === `v${currentVersion}`);
|
|
92814
|
-
const installedMarker = isCurrentlyInstalled ?
|
|
93228
|
+
const installedMarker = isCurrentlyInstalled ? import_picocolors21.default.cyan(" (installed)") : "";
|
|
92815
93229
|
clackChoices.push({
|
|
92816
93230
|
value: choice.value,
|
|
92817
93231
|
label: `${choice.label}${installedMarker}`,
|
|
92818
93232
|
hint: choice.hint
|
|
92819
93233
|
});
|
|
92820
93234
|
}
|
|
92821
|
-
const currentVersionHint = currentVersion ?
|
|
93235
|
+
const currentVersionHint = currentVersion ? import_picocolors21.default.dim(` (current: ${currentVersion})`) : "";
|
|
92822
93236
|
const selected = await ie({
|
|
92823
|
-
message: `Select version for ${
|
|
93237
|
+
message: `Select version for ${import_picocolors21.default.bold(kit.name)}${currentVersionHint}:`,
|
|
92824
93238
|
options: clackChoices,
|
|
92825
93239
|
initialValue: latestStable?.tag_name
|
|
92826
93240
|
});
|
|
@@ -92845,15 +93259,15 @@ async function createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry
|
|
|
92845
93259
|
async function handleSelectionError(error, kit, allowManualEntry, retryCallback) {
|
|
92846
93260
|
logger.error(`Version selection error: ${error.message}`);
|
|
92847
93261
|
if (error.message.includes("401") || error.message.includes("403")) {
|
|
92848
|
-
le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: ck auth"),
|
|
93262
|
+
le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: ck auth"), import_picocolors21.default.red("Authentication Error"));
|
|
92849
93263
|
} else if (error.message.includes("404")) {
|
|
92850
|
-
le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"),
|
|
93264
|
+
le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"), import_picocolors21.default.red("Access Error"));
|
|
92851
93265
|
} else if (error.message.includes("rate limit") || error.message.includes("403")) {
|
|
92852
|
-
le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"),
|
|
93266
|
+
le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"), import_picocolors21.default.yellow("Rate Limited"));
|
|
92853
93267
|
} else if (error.message.includes("network") || error.message.includes("ENOTFOUND")) {
|
|
92854
|
-
le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"),
|
|
93268
|
+
le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"), import_picocolors21.default.yellow("Network Error"));
|
|
92855
93269
|
} else {
|
|
92856
|
-
le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"),
|
|
93270
|
+
le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"), import_picocolors21.default.red("Error"));
|
|
92857
93271
|
}
|
|
92858
93272
|
if (isNonInteractive()) {
|
|
92859
93273
|
logger.warning("Non-interactive mode: version selection failed, cannot retry");
|
|
@@ -92903,7 +93317,7 @@ class VersionSelector {
|
|
|
92903
93317
|
} = options2;
|
|
92904
93318
|
try {
|
|
92905
93319
|
const loadingSpinner = de();
|
|
92906
|
-
loadingSpinner.start(`Fetching versions for ${
|
|
93320
|
+
loadingSpinner.start(`Fetching versions for ${import_picocolors22.default.bold(kit.name)}...`);
|
|
92907
93321
|
const releases = await this.githubClient.listReleasesWithCache(kit, {
|
|
92908
93322
|
limit: limit * 2,
|
|
92909
93323
|
includePrereleases,
|
|
@@ -93051,7 +93465,7 @@ async function promptFreshConfirmation(targetPath, analysis) {
|
|
|
93051
93465
|
// src/domains/ui/prompts/confirmation-prompts.ts
|
|
93052
93466
|
init_output_manager();
|
|
93053
93467
|
init_safe_prompts();
|
|
93054
|
-
import { platform as
|
|
93468
|
+
import { platform as platform10 } from "node:os";
|
|
93055
93469
|
|
|
93056
93470
|
// src/types/skills-dependencies.ts
|
|
93057
93471
|
var SKILLS_DEPENDENCIES = {
|
|
@@ -93116,7 +93530,7 @@ async function promptSkillsInstallation() {
|
|
|
93116
93530
|
if (output.isJson()) {
|
|
93117
93531
|
return false;
|
|
93118
93532
|
}
|
|
93119
|
-
const isWindows3 =
|
|
93533
|
+
const isWindows3 = platform10() === "win32";
|
|
93120
93534
|
const pythonDeps = formatDependencyList(SKILLS_DEPENDENCIES.python);
|
|
93121
93535
|
const systemDeps = formatDependencyList(SKILLS_DEPENDENCIES.system);
|
|
93122
93536
|
const nodeDeps = formatDependencyList(SKILLS_DEPENDENCIES.node);
|
|
@@ -93337,12 +93751,12 @@ import * as path15 from "node:path";
|
|
|
93337
93751
|
// src/domains/github/auth-prompt.ts
|
|
93338
93752
|
init_dist2();
|
|
93339
93753
|
init_github_auth();
|
|
93340
|
-
var
|
|
93754
|
+
var import_picocolors23 = __toESM(require_picocolors(), 1);
|
|
93341
93755
|
async function promptForAuth() {
|
|
93342
93756
|
const hasGit = GitCloneManager.isGitInstalled();
|
|
93343
93757
|
const hasSshKeys = hasGit && GitCloneManager.hasSshKeys();
|
|
93344
93758
|
const hasGhCli = AuthManager.isGhCliInstalled();
|
|
93345
|
-
oe(
|
|
93759
|
+
oe(import_picocolors23.default.yellow("No GitHub authentication found"));
|
|
93346
93760
|
const options2 = [];
|
|
93347
93761
|
if (hasGit) {
|
|
93348
93762
|
const hint = hasSshKeys ? "SSH keys detected" : "Will use HTTPS";
|
|
@@ -93395,7 +93809,7 @@ async function promptForAuth() {
|
|
|
93395
93809
|
return { method: "cancel" };
|
|
93396
93810
|
}
|
|
93397
93811
|
if (typeof token === "string" && token.startsWith("github_pat_")) {
|
|
93398
|
-
le(
|
|
93812
|
+
le(import_picocolors23.default.yellow(`⚠️ Fine-grained PATs cannot access repos where you're a collaborator.
|
|
93399
93813
|
` + " If you encounter access issues, use a Classic PAT instead."));
|
|
93400
93814
|
}
|
|
93401
93815
|
return { method: "token", token };
|
|
@@ -93437,7 +93851,7 @@ import { join as join97 } from "node:path";
|
|
|
93437
93851
|
// src/shared/progress-bar.ts
|
|
93438
93852
|
init_output_manager();
|
|
93439
93853
|
init_terminal_utils();
|
|
93440
|
-
var
|
|
93854
|
+
var import_picocolors24 = __toESM(require_picocolors(), 1);
|
|
93441
93855
|
var BAR_CHARS = {
|
|
93442
93856
|
unicode: { filled: "█", empty: "░" },
|
|
93443
93857
|
ascii: { filled: "=", empty: "-" }
|
|
@@ -93495,7 +93909,7 @@ class ProgressBar {
|
|
|
93495
93909
|
this.clearLine();
|
|
93496
93910
|
if (message) {
|
|
93497
93911
|
const symbols = output.getSymbols();
|
|
93498
|
-
console.log(`${
|
|
93912
|
+
console.log(`${import_picocolors24.default.green(symbols.success)} ${message}`);
|
|
93499
93913
|
}
|
|
93500
93914
|
}
|
|
93501
93915
|
clearLine() {
|
|
@@ -93597,10 +94011,10 @@ init_types3();
|
|
|
93597
94011
|
// src/domains/installation/utils/path-security.ts
|
|
93598
94012
|
init_types3();
|
|
93599
94013
|
import { lstatSync as lstatSync2, realpathSync as realpathSync4 } from "node:fs";
|
|
93600
|
-
import { relative as relative19, resolve as
|
|
94014
|
+
import { relative as relative19, resolve as resolve40 } from "node:path";
|
|
93601
94015
|
var MAX_EXTRACTION_SIZE = 500 * 1024 * 1024;
|
|
93602
94016
|
function isPathSafe(basePath, targetPath) {
|
|
93603
|
-
const resolvedBase =
|
|
94017
|
+
const resolvedBase = resolve40(basePath);
|
|
93604
94018
|
try {
|
|
93605
94019
|
const stat15 = lstatSync2(targetPath);
|
|
93606
94020
|
if (stat15.isSymbolicLink()) {
|
|
@@ -93610,7 +94024,7 @@ function isPathSafe(basePath, targetPath) {
|
|
|
93610
94024
|
}
|
|
93611
94025
|
}
|
|
93612
94026
|
} catch {}
|
|
93613
|
-
const resolvedTarget =
|
|
94027
|
+
const resolvedTarget = resolve40(targetPath);
|
|
93614
94028
|
const relativePath = relative19(resolvedBase, resolvedTarget);
|
|
93615
94029
|
return !relativePath.startsWith("..") && !relativePath.startsWith("/") && resolvedTarget.startsWith(resolvedBase);
|
|
93616
94030
|
}
|
|
@@ -93698,7 +94112,7 @@ class FileDownloader {
|
|
|
93698
94112
|
}
|
|
93699
94113
|
if (downloadedSize !== totalSize) {
|
|
93700
94114
|
fileStream.end();
|
|
93701
|
-
await new Promise((
|
|
94115
|
+
await new Promise((resolve41) => fileStream.once("close", resolve41));
|
|
93702
94116
|
try {
|
|
93703
94117
|
rmSync(destPath, { force: true });
|
|
93704
94118
|
} catch (cleanupError) {
|
|
@@ -93712,7 +94126,7 @@ class FileDownloader {
|
|
|
93712
94126
|
return destPath;
|
|
93713
94127
|
} catch (error) {
|
|
93714
94128
|
fileStream.end();
|
|
93715
|
-
await new Promise((
|
|
94129
|
+
await new Promise((resolve41) => fileStream.once("close", resolve41));
|
|
93716
94130
|
try {
|
|
93717
94131
|
rmSync(destPath, { force: true });
|
|
93718
94132
|
} catch (cleanupError) {
|
|
@@ -93778,7 +94192,7 @@ class FileDownloader {
|
|
|
93778
94192
|
const expectedSize = Number(response.headers.get("content-length"));
|
|
93779
94193
|
if (expectedSize > 0 && downloadedSize !== expectedSize) {
|
|
93780
94194
|
fileStream.end();
|
|
93781
|
-
await new Promise((
|
|
94195
|
+
await new Promise((resolve41) => fileStream.once("close", resolve41));
|
|
93782
94196
|
try {
|
|
93783
94197
|
rmSync(destPath, { force: true });
|
|
93784
94198
|
} catch (cleanupError) {
|
|
@@ -93796,7 +94210,7 @@ class FileDownloader {
|
|
|
93796
94210
|
return destPath;
|
|
93797
94211
|
} catch (error) {
|
|
93798
94212
|
fileStream.end();
|
|
93799
|
-
await new Promise((
|
|
94213
|
+
await new Promise((resolve41) => fileStream.once("close", resolve41));
|
|
93800
94214
|
try {
|
|
93801
94215
|
rmSync(destPath, { force: true });
|
|
93802
94216
|
} catch (cleanupError) {
|
|
@@ -94415,10 +94829,10 @@ class Minipass extends EventEmitter3 {
|
|
|
94415
94829
|
return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
|
|
94416
94830
|
}
|
|
94417
94831
|
async promise() {
|
|
94418
|
-
return new Promise((
|
|
94832
|
+
return new Promise((resolve41, reject) => {
|
|
94419
94833
|
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
94420
94834
|
this.on("error", (er) => reject(er));
|
|
94421
|
-
this.on("end", () =>
|
|
94835
|
+
this.on("end", () => resolve41());
|
|
94422
94836
|
});
|
|
94423
94837
|
}
|
|
94424
94838
|
[Symbol.asyncIterator]() {
|
|
@@ -94437,7 +94851,7 @@ class Minipass extends EventEmitter3 {
|
|
|
94437
94851
|
return Promise.resolve({ done: false, value: res });
|
|
94438
94852
|
if (this[EOF])
|
|
94439
94853
|
return stop();
|
|
94440
|
-
let
|
|
94854
|
+
let resolve41;
|
|
94441
94855
|
let reject;
|
|
94442
94856
|
const onerr = (er) => {
|
|
94443
94857
|
this.off("data", ondata);
|
|
@@ -94451,19 +94865,19 @@ class Minipass extends EventEmitter3 {
|
|
|
94451
94865
|
this.off("end", onend);
|
|
94452
94866
|
this.off(DESTROYED, ondestroy);
|
|
94453
94867
|
this.pause();
|
|
94454
|
-
|
|
94868
|
+
resolve41({ value, done: !!this[EOF] });
|
|
94455
94869
|
};
|
|
94456
94870
|
const onend = () => {
|
|
94457
94871
|
this.off("error", onerr);
|
|
94458
94872
|
this.off("data", ondata);
|
|
94459
94873
|
this.off(DESTROYED, ondestroy);
|
|
94460
94874
|
stop();
|
|
94461
|
-
|
|
94875
|
+
resolve41({ done: true, value: undefined });
|
|
94462
94876
|
};
|
|
94463
94877
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
94464
94878
|
return new Promise((res2, rej) => {
|
|
94465
94879
|
reject = rej;
|
|
94466
|
-
|
|
94880
|
+
resolve41 = res2;
|
|
94467
94881
|
this.once(DESTROYED, ondestroy);
|
|
94468
94882
|
this.once("error", onerr);
|
|
94469
94883
|
this.once("end", onend);
|
|
@@ -95569,10 +95983,10 @@ class Minipass2 extends EventEmitter4 {
|
|
|
95569
95983
|
return this[ENCODING2] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
|
|
95570
95984
|
}
|
|
95571
95985
|
async promise() {
|
|
95572
|
-
return new Promise((
|
|
95986
|
+
return new Promise((resolve41, reject) => {
|
|
95573
95987
|
this.on(DESTROYED2, () => reject(new Error("stream destroyed")));
|
|
95574
95988
|
this.on("error", (er) => reject(er));
|
|
95575
|
-
this.on("end", () =>
|
|
95989
|
+
this.on("end", () => resolve41());
|
|
95576
95990
|
});
|
|
95577
95991
|
}
|
|
95578
95992
|
[Symbol.asyncIterator]() {
|
|
@@ -95591,7 +96005,7 @@ class Minipass2 extends EventEmitter4 {
|
|
|
95591
96005
|
return Promise.resolve({ done: false, value: res });
|
|
95592
96006
|
if (this[EOF2])
|
|
95593
96007
|
return stop();
|
|
95594
|
-
let
|
|
96008
|
+
let resolve41;
|
|
95595
96009
|
let reject;
|
|
95596
96010
|
const onerr = (er) => {
|
|
95597
96011
|
this.off("data", ondata);
|
|
@@ -95605,19 +96019,19 @@ class Minipass2 extends EventEmitter4 {
|
|
|
95605
96019
|
this.off("end", onend);
|
|
95606
96020
|
this.off(DESTROYED2, ondestroy);
|
|
95607
96021
|
this.pause();
|
|
95608
|
-
|
|
96022
|
+
resolve41({ value, done: !!this[EOF2] });
|
|
95609
96023
|
};
|
|
95610
96024
|
const onend = () => {
|
|
95611
96025
|
this.off("error", onerr);
|
|
95612
96026
|
this.off("data", ondata);
|
|
95613
96027
|
this.off(DESTROYED2, ondestroy);
|
|
95614
96028
|
stop();
|
|
95615
|
-
|
|
96029
|
+
resolve41({ done: true, value: undefined });
|
|
95616
96030
|
};
|
|
95617
96031
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
95618
96032
|
return new Promise((res2, rej) => {
|
|
95619
96033
|
reject = rej;
|
|
95620
|
-
|
|
96034
|
+
resolve41 = res2;
|
|
95621
96035
|
this.once(DESTROYED2, ondestroy);
|
|
95622
96036
|
this.once("error", onerr);
|
|
95623
96037
|
this.once("end", onend);
|
|
@@ -97045,10 +97459,10 @@ class Minipass3 extends EventEmitter5 {
|
|
|
97045
97459
|
return this[ENCODING3] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
|
|
97046
97460
|
}
|
|
97047
97461
|
async promise() {
|
|
97048
|
-
return new Promise((
|
|
97462
|
+
return new Promise((resolve41, reject) => {
|
|
97049
97463
|
this.on(DESTROYED3, () => reject(new Error("stream destroyed")));
|
|
97050
97464
|
this.on("error", (er) => reject(er));
|
|
97051
|
-
this.on("end", () =>
|
|
97465
|
+
this.on("end", () => resolve41());
|
|
97052
97466
|
});
|
|
97053
97467
|
}
|
|
97054
97468
|
[Symbol.asyncIterator]() {
|
|
@@ -97067,7 +97481,7 @@ class Minipass3 extends EventEmitter5 {
|
|
|
97067
97481
|
return Promise.resolve({ done: false, value: res });
|
|
97068
97482
|
if (this[EOF3])
|
|
97069
97483
|
return stop();
|
|
97070
|
-
let
|
|
97484
|
+
let resolve41;
|
|
97071
97485
|
let reject;
|
|
97072
97486
|
const onerr = (er) => {
|
|
97073
97487
|
this.off("data", ondata);
|
|
@@ -97081,19 +97495,19 @@ class Minipass3 extends EventEmitter5 {
|
|
|
97081
97495
|
this.off("end", onend);
|
|
97082
97496
|
this.off(DESTROYED3, ondestroy);
|
|
97083
97497
|
this.pause();
|
|
97084
|
-
|
|
97498
|
+
resolve41({ value, done: !!this[EOF3] });
|
|
97085
97499
|
};
|
|
97086
97500
|
const onend = () => {
|
|
97087
97501
|
this.off("error", onerr);
|
|
97088
97502
|
this.off("data", ondata);
|
|
97089
97503
|
this.off(DESTROYED3, ondestroy);
|
|
97090
97504
|
stop();
|
|
97091
|
-
|
|
97505
|
+
resolve41({ done: true, value: undefined });
|
|
97092
97506
|
};
|
|
97093
97507
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
97094
97508
|
return new Promise((res2, rej) => {
|
|
97095
97509
|
reject = rej;
|
|
97096
|
-
|
|
97510
|
+
resolve41 = res2;
|
|
97097
97511
|
this.once(DESTROYED3, ondestroy);
|
|
97098
97512
|
this.once("error", onerr);
|
|
97099
97513
|
this.once("end", onend);
|
|
@@ -97165,8 +97579,8 @@ class Minipass3 extends EventEmitter5 {
|
|
|
97165
97579
|
}
|
|
97166
97580
|
|
|
97167
97581
|
// node_modules/tar/dist/esm/normalize-windows-path.js
|
|
97168
|
-
var
|
|
97169
|
-
var normalizeWindowsPath =
|
|
97582
|
+
var platform11 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
97583
|
+
var normalizeWindowsPath = platform11 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
|
|
97170
97584
|
|
|
97171
97585
|
// node_modules/tar/dist/esm/read-entry.js
|
|
97172
97586
|
class ReadEntry extends Minipass3 {
|
|
@@ -97864,9 +98278,9 @@ var listFile = (opt, _files) => {
|
|
|
97864
98278
|
const parse5 = new Parser(opt);
|
|
97865
98279
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
97866
98280
|
const file = opt.file;
|
|
97867
|
-
const p = new Promise((
|
|
98281
|
+
const p = new Promise((resolve41, reject) => {
|
|
97868
98282
|
parse5.on("error", reject);
|
|
97869
|
-
parse5.on("end",
|
|
98283
|
+
parse5.on("end", resolve41);
|
|
97870
98284
|
fs10.stat(file, (er, stat15) => {
|
|
97871
98285
|
if (er) {
|
|
97872
98286
|
reject(er);
|
|
@@ -97917,8 +98331,8 @@ var modeFix = (mode, isDir, portable) => {
|
|
|
97917
98331
|
};
|
|
97918
98332
|
|
|
97919
98333
|
// node_modules/tar/dist/esm/strip-absolute-path.js
|
|
97920
|
-
import { win32 } from "node:path";
|
|
97921
|
-
var { isAbsolute: isAbsolute12, parse: parse5 } =
|
|
98334
|
+
import { win32 as win322 } from "node:path";
|
|
98335
|
+
var { isAbsolute: isAbsolute12, parse: parse5 } = win322;
|
|
97922
98336
|
var stripAbsolutePath = (path8) => {
|
|
97923
98337
|
let r2 = "";
|
|
97924
98338
|
let parsed = parse5(path8);
|
|
@@ -99364,8 +99778,8 @@ import path13 from "node:path";
|
|
|
99364
99778
|
|
|
99365
99779
|
// node_modules/tar/dist/esm/get-write-flag.js
|
|
99366
99780
|
import fs13 from "fs";
|
|
99367
|
-
var
|
|
99368
|
-
var isWindows3 =
|
|
99781
|
+
var platform12 = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
99782
|
+
var isWindows3 = platform12 === "win32";
|
|
99369
99783
|
var { O_CREAT, O_TRUNC, O_WRONLY } = fs13.constants;
|
|
99370
99784
|
var UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || fs13.constants.UV_FS_O_FILEMAP || 0;
|
|
99371
99785
|
var fMapEnabled = isWindows3 && !!UV_FS_O_FILEMAP;
|
|
@@ -99656,8 +100070,8 @@ var normalizeUnicode = (s) => {
|
|
|
99656
100070
|
};
|
|
99657
100071
|
|
|
99658
100072
|
// node_modules/tar/dist/esm/path-reservations.js
|
|
99659
|
-
var
|
|
99660
|
-
var isWindows4 =
|
|
100073
|
+
var platform13 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
100074
|
+
var isWindows4 = platform13 === "win32";
|
|
99661
100075
|
var getDirs = (path13) => {
|
|
99662
100076
|
const dirs = path13.split("/").slice(0, -1).reduce((set, path14) => {
|
|
99663
100077
|
const s = set[set.length - 1];
|
|
@@ -99803,8 +100217,8 @@ var DOCHOWN = Symbol("doChown");
|
|
|
99803
100217
|
var UID = Symbol("uid");
|
|
99804
100218
|
var GID = Symbol("gid");
|
|
99805
100219
|
var CHECKED_CWD = Symbol("checkedCwd");
|
|
99806
|
-
var
|
|
99807
|
-
var isWindows5 =
|
|
100220
|
+
var platform14 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
|
|
100221
|
+
var isWindows5 = platform14 === "win32";
|
|
99808
100222
|
var DEFAULT_MAX_DEPTH = 1024;
|
|
99809
100223
|
var unlinkFile = (path14, cb) => {
|
|
99810
100224
|
if (!isWindows5) {
|
|
@@ -100446,9 +100860,9 @@ var extractFile = (opt, _3) => {
|
|
|
100446
100860
|
const u = new Unpack(opt);
|
|
100447
100861
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
100448
100862
|
const file = opt.file;
|
|
100449
|
-
const p = new Promise((
|
|
100863
|
+
const p = new Promise((resolve41, reject) => {
|
|
100450
100864
|
u.on("error", reject);
|
|
100451
|
-
u.on("close",
|
|
100865
|
+
u.on("close", resolve41);
|
|
100452
100866
|
fs17.stat(file, (er, stat15) => {
|
|
100453
100867
|
if (er) {
|
|
100454
100868
|
reject(er);
|
|
@@ -100581,7 +100995,7 @@ var replaceAsync = (opt, files) => {
|
|
|
100581
100995
|
};
|
|
100582
100996
|
fs18.read(fd, headBuf, 0, 512, position, onread);
|
|
100583
100997
|
};
|
|
100584
|
-
const promise = new Promise((
|
|
100998
|
+
const promise = new Promise((resolve41, reject) => {
|
|
100585
100999
|
p.on("error", reject);
|
|
100586
101000
|
let flag = "r+";
|
|
100587
101001
|
const onopen = (er, fd) => {
|
|
@@ -100606,7 +101020,7 @@ var replaceAsync = (opt, files) => {
|
|
|
100606
101020
|
});
|
|
100607
101021
|
p.pipe(stream);
|
|
100608
101022
|
stream.on("error", reject);
|
|
100609
|
-
stream.on("close",
|
|
101023
|
+
stream.on("close", resolve41);
|
|
100610
101024
|
addFilesAsync2(p, files);
|
|
100611
101025
|
});
|
|
100612
101026
|
});
|
|
@@ -101563,7 +101977,7 @@ import { join as join121 } from "node:path";
|
|
|
101563
101977
|
|
|
101564
101978
|
// src/domains/installation/deletion-handler.ts
|
|
101565
101979
|
import { existsSync as existsSync65, lstatSync as lstatSync3, readdirSync as readdirSync9, rmSync as rmSync2, rmdirSync, unlinkSync as unlinkSync4 } from "node:fs";
|
|
101566
|
-
import { dirname as dirname37, join as join106, relative as relative21, resolve as
|
|
101980
|
+
import { dirname as dirname37, join as join106, relative as relative21, resolve as resolve43, sep as sep12 } from "node:path";
|
|
101567
101981
|
|
|
101568
101982
|
// src/services/file-operations/manifest/manifest-reader.ts
|
|
101569
101983
|
init_metadata_migration();
|
|
@@ -101788,8 +102202,8 @@ function expandGlobPatterns(patterns, claudeDir3) {
|
|
|
101788
102202
|
}
|
|
101789
102203
|
var MAX_CLEANUP_ITERATIONS = 50;
|
|
101790
102204
|
function cleanupEmptyDirectories(filePath, claudeDir3) {
|
|
101791
|
-
const normalizedClaudeDir =
|
|
101792
|
-
let currentDir =
|
|
102205
|
+
const normalizedClaudeDir = resolve43(claudeDir3);
|
|
102206
|
+
let currentDir = resolve43(dirname37(filePath));
|
|
101793
102207
|
let iterations = 0;
|
|
101794
102208
|
while (currentDir !== normalizedClaudeDir && currentDir.startsWith(normalizedClaudeDir) && iterations < MAX_CLEANUP_ITERATIONS) {
|
|
101795
102209
|
iterations++;
|
|
@@ -101798,7 +102212,7 @@ function cleanupEmptyDirectories(filePath, claudeDir3) {
|
|
|
101798
102212
|
if (entries.length === 0) {
|
|
101799
102213
|
rmdirSync(currentDir);
|
|
101800
102214
|
logger.debug(`Removed empty directory: ${currentDir}`);
|
|
101801
|
-
currentDir =
|
|
102215
|
+
currentDir = resolve43(dirname37(currentDir));
|
|
101802
102216
|
} else {
|
|
101803
102217
|
break;
|
|
101804
102218
|
}
|
|
@@ -101808,8 +102222,8 @@ function cleanupEmptyDirectories(filePath, claudeDir3) {
|
|
|
101808
102222
|
}
|
|
101809
102223
|
}
|
|
101810
102224
|
function deletePath(fullPath, claudeDir3) {
|
|
101811
|
-
const normalizedPath =
|
|
101812
|
-
const normalizedClaudeDir =
|
|
102225
|
+
const normalizedPath = resolve43(fullPath);
|
|
102226
|
+
const normalizedClaudeDir = resolve43(claudeDir3);
|
|
101813
102227
|
if (!normalizedPath.startsWith(`${normalizedClaudeDir}${sep12}`) && normalizedPath !== normalizedClaudeDir) {
|
|
101814
102228
|
throw new Error(`Path traversal detected: ${fullPath}`);
|
|
101815
102229
|
}
|
|
@@ -101882,8 +102296,8 @@ async function handleDeletions(sourceMetadata, claudeDir3, kitType) {
|
|
|
101882
102296
|
const result = { deletedPaths: [], preservedPaths: [], errors: [] };
|
|
101883
102297
|
for (const path16 of deletions) {
|
|
101884
102298
|
const fullPath = join106(claudeDir3, path16);
|
|
101885
|
-
const normalizedPath =
|
|
101886
|
-
const normalizedClaudeDir =
|
|
102299
|
+
const normalizedPath = resolve43(fullPath);
|
|
102300
|
+
const normalizedClaudeDir = resolve43(claudeDir3);
|
|
101887
102301
|
if (!normalizedPath.startsWith(`${normalizedClaudeDir}${sep12}`)) {
|
|
101888
102302
|
logger.warning(`Skipping invalid path: ${path16}`);
|
|
101889
102303
|
result.errors.push(path16);
|
|
@@ -103666,7 +104080,7 @@ class FileScanner {
|
|
|
103666
104080
|
|
|
103667
104081
|
// src/domains/installation/merger/settings-processor.ts
|
|
103668
104082
|
import { execSync as execSync5 } from "node:child_process";
|
|
103669
|
-
import { homedir as
|
|
104083
|
+
import { homedir as homedir46 } from "node:os";
|
|
103670
104084
|
import { dirname as dirname40, join as join110 } from "node:path";
|
|
103671
104085
|
|
|
103672
104086
|
// src/domains/config/installed-settings-tracker.ts
|
|
@@ -103770,7 +104184,7 @@ init_logger();
|
|
|
103770
104184
|
init_path_resolver();
|
|
103771
104185
|
var import_fs_extra15 = __toESM(require_lib(), 1);
|
|
103772
104186
|
var import_semver4 = __toESM(require_semver2(), 1);
|
|
103773
|
-
var
|
|
104187
|
+
var DYNAMIC_INJECTED_HOOKS = new Set(["task-completed-handler", "teammate-idle-handler"]);
|
|
103774
104188
|
|
|
103775
104189
|
class SettingsProcessor {
|
|
103776
104190
|
static MIN_TEAM_HOOKS_VERSION = "2.1.33";
|
|
@@ -104205,7 +104619,7 @@ class SettingsProcessor {
|
|
|
104205
104619
|
return;
|
|
104206
104620
|
for (const command of previousInstalledSettings.hooks) {
|
|
104207
104621
|
const hookName = this.extractCkHookName(command);
|
|
104208
|
-
if (!hookName || !
|
|
104622
|
+
if (!hookName || !DYNAMIC_INJECTED_HOOKS.has(hookName))
|
|
104209
104623
|
continue;
|
|
104210
104624
|
this.tracker.trackHook(command, refreshedSettings);
|
|
104211
104625
|
}
|
|
@@ -104330,7 +104744,7 @@ class SettingsProcessor {
|
|
|
104330
104744
|
return false;
|
|
104331
104745
|
}
|
|
104332
104746
|
const configuredGlobalDir = PathResolver.getGlobalKitDir().replace(/\\/g, "/").replace(/\/+$/, "");
|
|
104333
|
-
const defaultGlobalDir = join110(
|
|
104747
|
+
const defaultGlobalDir = join110(homedir46(), ".claude").replace(/\\/g, "/");
|
|
104334
104748
|
return configuredGlobalDir !== defaultGlobalDir;
|
|
104335
104749
|
}
|
|
104336
104750
|
getClaudeCommandRoot() {
|
|
@@ -105345,7 +105759,7 @@ User-created files (sample):`);
|
|
|
105345
105759
|
|
|
105346
105760
|
// src/domains/ui/conflict-summary.ts
|
|
105347
105761
|
init_logger();
|
|
105348
|
-
var
|
|
105762
|
+
var import_picocolors25 = __toESM(require_picocolors(), 1);
|
|
105349
105763
|
function displayConflictSummary(summary) {
|
|
105350
105764
|
const totalUpdated = summary.files.updated.length + summary.hooks.updated.length + summary.mcp.updated.length;
|
|
105351
105765
|
const totalKept = summary.files.kept.length + summary.hooks.kept.length + summary.mcp.kept.length;
|
|
@@ -105354,38 +105768,38 @@ function displayConflictSummary(summary) {
|
|
|
105354
105768
|
return;
|
|
105355
105769
|
}
|
|
105356
105770
|
console.log();
|
|
105357
|
-
console.log(
|
|
105358
|
-
console.log(
|
|
105771
|
+
console.log(import_picocolors25.default.bold("Dual-Kit Conflict Resolution"));
|
|
105772
|
+
console.log(import_picocolors25.default.dim("─".repeat(40)));
|
|
105359
105773
|
if (summary.files.updated.length > 0 || summary.files.kept.length > 0) {
|
|
105360
105774
|
const updated = summary.files.updated.length;
|
|
105361
105775
|
const kept = summary.files.kept.length;
|
|
105362
105776
|
const winners = formatWinners(summary.files.updated);
|
|
105363
|
-
console.log(` Files: ${
|
|
105777
|
+
console.log(` Files: ${import_picocolors25.default.green(`${updated} updated`)}${winners}, ${import_picocolors25.default.dim(`${kept} kept`)}`);
|
|
105364
105778
|
}
|
|
105365
105779
|
if (summary.hooks.updated.length > 0 || summary.hooks.kept.length > 0) {
|
|
105366
105780
|
const updated = summary.hooks.updated.length;
|
|
105367
105781
|
const kept = summary.hooks.kept.length;
|
|
105368
105782
|
const winners = formatHookWinners(summary.hooks.updated);
|
|
105369
|
-
console.log(` Hooks: ${
|
|
105783
|
+
console.log(` Hooks: ${import_picocolors25.default.green(`${updated} updated`)}${winners}, ${import_picocolors25.default.dim(`${kept} kept`)}`);
|
|
105370
105784
|
}
|
|
105371
105785
|
if (summary.mcp.updated.length > 0 || summary.mcp.kept.length > 0) {
|
|
105372
105786
|
const updated = summary.mcp.updated.length;
|
|
105373
105787
|
const kept = summary.mcp.kept.length;
|
|
105374
105788
|
const winners = formatMcpWinners(summary.mcp.updated);
|
|
105375
|
-
console.log(` MCP: ${
|
|
105789
|
+
console.log(` MCP: ${import_picocolors25.default.green(`${updated} updated`)}${winners}, ${import_picocolors25.default.dim(`${kept} kept`)}`);
|
|
105376
105790
|
}
|
|
105377
105791
|
if (logger.isVerbose() && totalUpdated > 0) {
|
|
105378
105792
|
console.log();
|
|
105379
|
-
console.log(
|
|
105793
|
+
console.log(import_picocolors25.default.dim("Details:"));
|
|
105380
105794
|
for (const file of summary.files.updated) {
|
|
105381
|
-
console.log(` ${
|
|
105795
|
+
console.log(` ${import_picocolors25.default.dim("-")} ${file.relativePath}: ${import_picocolors25.default.green(file.winner)} won`);
|
|
105382
105796
|
}
|
|
105383
105797
|
for (const hook of summary.hooks.updated) {
|
|
105384
105798
|
const shortCmd = hook.command.length > 40 ? `${hook.command.slice(0, 40)}...` : hook.command;
|
|
105385
|
-
console.log(` ${
|
|
105799
|
+
console.log(` ${import_picocolors25.default.dim("-")} hook: ${shortCmd} → ${import_picocolors25.default.green(hook.winner)}`);
|
|
105386
105800
|
}
|
|
105387
105801
|
for (const mcp of summary.mcp.updated) {
|
|
105388
|
-
console.log(` ${
|
|
105802
|
+
console.log(` ${import_picocolors25.default.dim("-")} mcp: ${mcp.serverName} → ${import_picocolors25.default.green(mcp.winner)}`);
|
|
105389
105803
|
}
|
|
105390
105804
|
}
|
|
105391
105805
|
console.log();
|
|
@@ -105399,7 +105813,7 @@ function formatWinners(items) {
|
|
|
105399
105813
|
if (counts.size === 0)
|
|
105400
105814
|
return "";
|
|
105401
105815
|
const parts = Array.from(counts.entries()).map(([kit, count]) => `${kit}: ${count}`);
|
|
105402
|
-
return
|
|
105816
|
+
return import_picocolors25.default.dim(` (${parts.join(", ")})`);
|
|
105403
105817
|
}
|
|
105404
105818
|
function formatHookWinners(items) {
|
|
105405
105819
|
const counts = new Map;
|
|
@@ -105409,7 +105823,7 @@ function formatHookWinners(items) {
|
|
|
105409
105823
|
if (counts.size === 0)
|
|
105410
105824
|
return "";
|
|
105411
105825
|
const parts = Array.from(counts.entries()).map(([kit, count]) => `${kit}: ${count}`);
|
|
105412
|
-
return
|
|
105826
|
+
return import_picocolors25.default.dim(` (${parts.join(", ")})`);
|
|
105413
105827
|
}
|
|
105414
105828
|
function formatMcpWinners(items) {
|
|
105415
105829
|
const counts = new Map;
|
|
@@ -105419,7 +105833,7 @@ function formatMcpWinners(items) {
|
|
|
105419
105833
|
if (counts.size === 0)
|
|
105420
105834
|
return "";
|
|
105421
105835
|
const parts = Array.from(counts.entries()).map(([kit, count]) => `${kit}: ${count}`);
|
|
105422
|
-
return
|
|
105836
|
+
return import_picocolors25.default.dim(` (${parts.join(", ")})`);
|
|
105423
105837
|
}
|
|
105424
105838
|
function buildConflictSummary(fileConflicts, hookConflicts, mcpConflicts) {
|
|
105425
105839
|
return {
|
|
@@ -105442,7 +105856,7 @@ function buildConflictSummary(fileConflicts, hookConflicts, mcpConflicts) {
|
|
|
105442
105856
|
init_logger();
|
|
105443
105857
|
init_skip_directories();
|
|
105444
105858
|
var import_fs_extra20 = __toESM(require_lib(), 1);
|
|
105445
|
-
import { join as join116, relative as relative26, resolve as
|
|
105859
|
+
import { join as join116, relative as relative26, resolve as resolve45 } from "node:path";
|
|
105446
105860
|
|
|
105447
105861
|
class FileScanner2 {
|
|
105448
105862
|
static async getFiles(dirPath, relativeTo) {
|
|
@@ -105522,8 +105936,8 @@ class FileScanner2 {
|
|
|
105522
105936
|
return customFiles;
|
|
105523
105937
|
}
|
|
105524
105938
|
static isSafePath(basePath, targetPath) {
|
|
105525
|
-
const resolvedBase =
|
|
105526
|
-
const resolvedTarget =
|
|
105939
|
+
const resolvedBase = resolve45(basePath);
|
|
105940
|
+
const resolvedTarget = resolve45(targetPath);
|
|
105527
105941
|
return resolvedTarget.startsWith(resolvedBase);
|
|
105528
105942
|
}
|
|
105529
105943
|
static toPosixPath(path17) {
|
|
@@ -107369,9 +107783,9 @@ import { join as join131 } from "node:path";
|
|
|
107369
107783
|
// src/services/transformers/opencode-path-transformer.ts
|
|
107370
107784
|
init_logger();
|
|
107371
107785
|
import { readFile as readFile58, readdir as readdir40, writeFile as writeFile31 } from "node:fs/promises";
|
|
107372
|
-
import { platform as
|
|
107786
|
+
import { platform as platform15 } from "node:os";
|
|
107373
107787
|
import { extname as extname6, join as join130 } from "node:path";
|
|
107374
|
-
var IS_WINDOWS2 =
|
|
107788
|
+
var IS_WINDOWS2 = platform15() === "win32";
|
|
107375
107789
|
function getOpenCodeGlobalPath() {
|
|
107376
107790
|
return "$HOME/.config/opencode/";
|
|
107377
107791
|
}
|
|
@@ -107670,7 +108084,7 @@ async function handlePostInstall(ctx) {
|
|
|
107670
108084
|
init_config_manager();
|
|
107671
108085
|
init_github_client();
|
|
107672
108086
|
import { mkdir as mkdir36 } from "node:fs/promises";
|
|
107673
|
-
import { join as join135, resolve as
|
|
108087
|
+
import { join as join135, resolve as resolve48 } from "node:path";
|
|
107674
108088
|
|
|
107675
108089
|
// src/domains/github/kit-access-checker.ts
|
|
107676
108090
|
init_error2();
|
|
@@ -107840,7 +108254,7 @@ async function runPreflightChecks() {
|
|
|
107840
108254
|
// src/domains/installation/fresh-installer.ts
|
|
107841
108255
|
init_metadata_migration();
|
|
107842
108256
|
import { existsSync as existsSync67, readdirSync as readdirSync10, rmSync as rmSync3, rmdirSync as rmdirSync2, unlinkSync as unlinkSync5 } from "node:fs";
|
|
107843
|
-
import { basename as basename28, dirname as dirname42, join as join133, resolve as
|
|
108257
|
+
import { basename as basename28, dirname as dirname42, join as join133, resolve as resolve46 } from "node:path";
|
|
107844
108258
|
init_logger();
|
|
107845
108259
|
init_safe_spinner();
|
|
107846
108260
|
var import_fs_extra35 = __toESM(require_lib(), 1);
|
|
@@ -107892,15 +108306,15 @@ async function analyzeFreshInstallation(claudeDir3) {
|
|
|
107892
108306
|
};
|
|
107893
108307
|
}
|
|
107894
108308
|
function cleanupEmptyDirectories2(filePath, claudeDir3) {
|
|
107895
|
-
const normalizedClaudeDir =
|
|
107896
|
-
let currentDir =
|
|
108309
|
+
const normalizedClaudeDir = resolve46(claudeDir3);
|
|
108310
|
+
let currentDir = resolve46(dirname42(filePath));
|
|
107897
108311
|
while (currentDir !== normalizedClaudeDir && currentDir.startsWith(normalizedClaudeDir)) {
|
|
107898
108312
|
try {
|
|
107899
108313
|
const entries = readdirSync10(currentDir);
|
|
107900
108314
|
if (entries.length === 0) {
|
|
107901
108315
|
rmdirSync2(currentDir);
|
|
107902
108316
|
logger.debug(`Removed empty directory: ${currentDir}`);
|
|
107903
|
-
currentDir =
|
|
108317
|
+
currentDir = resolve46(dirname42(currentDir));
|
|
107904
108318
|
} else {
|
|
107905
108319
|
break;
|
|
107906
108320
|
}
|
|
@@ -108089,8 +108503,8 @@ async function handleFreshInstallation(claudeDir3, prompts) {
|
|
|
108089
108503
|
// src/domains/installation/global-kit-legacy-repair.ts
|
|
108090
108504
|
var import_fs_extra36 = __toESM(require_lib(), 1);
|
|
108091
108505
|
import { cp as cp5, mkdir as mkdir35, readdir as readdir42, rename as rename11, rm as rm16, stat as stat22 } from "node:fs/promises";
|
|
108092
|
-
import { homedir as
|
|
108093
|
-
import { dirname as dirname43, join as join134, normalize as normalize11, resolve as
|
|
108506
|
+
import { homedir as homedir47 } from "node:os";
|
|
108507
|
+
import { dirname as dirname43, join as join134, normalize as normalize11, resolve as resolve47 } from "node:path";
|
|
108094
108508
|
var LEGACY_KIT_MARKERS = [
|
|
108095
108509
|
"metadata.json",
|
|
108096
108510
|
".ck.json",
|
|
@@ -108116,7 +108530,7 @@ function uniqueNormalizedPaths(paths) {
|
|
|
108116
108530
|
const seen = new Set;
|
|
108117
108531
|
const result = [];
|
|
108118
108532
|
for (const path17 of paths) {
|
|
108119
|
-
const normalized = normalize11(
|
|
108533
|
+
const normalized = normalize11(resolve47(path17));
|
|
108120
108534
|
if (seen.has(normalized))
|
|
108121
108535
|
continue;
|
|
108122
108536
|
seen.add(normalized);
|
|
@@ -108124,7 +108538,7 @@ function uniqueNormalizedPaths(paths) {
|
|
|
108124
108538
|
}
|
|
108125
108539
|
return result;
|
|
108126
108540
|
}
|
|
108127
|
-
function getLegacyWindowsGlobalKitDirCandidates(env2 = process.env, homeDir =
|
|
108541
|
+
function getLegacyWindowsGlobalKitDirCandidates(env2 = process.env, homeDir = homedir47()) {
|
|
108128
108542
|
const candidates = [];
|
|
108129
108543
|
const localAppData = safeEnvPath(env2.LOCALAPPDATA);
|
|
108130
108544
|
const appData = safeEnvPath(env2.APPDATA);
|
|
@@ -108181,8 +108595,8 @@ async function repairLegacyWindowsGlobalKitDir(options2) {
|
|
|
108181
108595
|
if (safeEnvPath(env2.CLAUDE_CONFIG_DIR)) {
|
|
108182
108596
|
return { status: "skipped", reason: "custom-global-dir", candidateDirs: [] };
|
|
108183
108597
|
}
|
|
108184
|
-
const targetDir = normalize11(
|
|
108185
|
-
const candidateDirs = getLegacyWindowsGlobalKitDirCandidates(env2, options2.homeDir).filter((candidate) => normalize11(
|
|
108598
|
+
const targetDir = normalize11(resolve47(options2.targetDir));
|
|
108599
|
+
const candidateDirs = getLegacyWindowsGlobalKitDirCandidates(env2, options2.homeDir).filter((candidate) => normalize11(resolve47(candidate)) !== targetDir);
|
|
108186
108600
|
const legacyDirs = [];
|
|
108187
108601
|
for (const candidate of candidateDirs) {
|
|
108188
108602
|
if (await hasKitMarkers(candidate)) {
|
|
@@ -108405,7 +108819,7 @@ async function handleSelection(ctx) {
|
|
|
108405
108819
|
}
|
|
108406
108820
|
}
|
|
108407
108821
|
}
|
|
108408
|
-
const resolvedDir =
|
|
108822
|
+
const resolvedDir = resolve48(targetDir);
|
|
108409
108823
|
if (ctx.options.global) {
|
|
108410
108824
|
try {
|
|
108411
108825
|
const repairResult = await repairLegacyWindowsGlobalKitDir({ targetDir: resolvedDir });
|
|
@@ -108602,16 +109016,16 @@ async function handleSelection(ctx) {
|
|
|
108602
109016
|
}
|
|
108603
109017
|
// src/commands/init/phases/sync-handler.ts
|
|
108604
109018
|
import { copyFile as copyFile8, mkdir as mkdir37, open as open5, readFile as readFile59, rename as rename12, stat as stat23, unlink as unlink13, writeFile as writeFile33 } from "node:fs/promises";
|
|
108605
|
-
import { dirname as dirname44, join as join136, resolve as
|
|
109019
|
+
import { dirname as dirname44, join as join136, resolve as resolve49 } from "node:path";
|
|
108606
109020
|
init_logger();
|
|
108607
109021
|
init_path_resolver();
|
|
108608
109022
|
var import_fs_extra38 = __toESM(require_lib(), 1);
|
|
108609
|
-
var
|
|
109023
|
+
var import_picocolors27 = __toESM(require_picocolors(), 1);
|
|
108610
109024
|
async function handleSync(ctx) {
|
|
108611
109025
|
if (!ctx.options.sync) {
|
|
108612
109026
|
return ctx;
|
|
108613
109027
|
}
|
|
108614
|
-
const resolvedDir = ctx.options.global ? PathResolver.getGlobalKitDir() :
|
|
109028
|
+
const resolvedDir = ctx.options.global ? PathResolver.getGlobalKitDir() : resolve49(ctx.options.dir || ".");
|
|
108615
109029
|
const claudeDir3 = ctx.options.global ? resolvedDir : join136(resolvedDir, ".claude");
|
|
108616
109030
|
if (!await import_fs_extra38.pathExists(claudeDir3)) {
|
|
108617
109031
|
logger.error("Cannot sync: no .claude directory found");
|
|
@@ -108793,7 +109207,7 @@ async function executeSyncMerge(ctx) {
|
|
|
108793
109207
|
}
|
|
108794
109208
|
const backupDir = PathResolver.getBackupDir();
|
|
108795
109209
|
await createBackup(ctx.claudeDir, trackedFiles, backupDir);
|
|
108796
|
-
logger.success(`Backup created at ${
|
|
109210
|
+
logger.success(`Backup created at ${import_picocolors27.default.dim(backupDir)}`);
|
|
108797
109211
|
if (sourceMetadata?.deletions && sourceMetadata.deletions.length > 0) {
|
|
108798
109212
|
try {
|
|
108799
109213
|
const deletionResult = await handleDeletions(sourceMetadata, ctx.claudeDir, ctx.kitType);
|
|
@@ -108931,22 +109345,22 @@ async function executeSyncMerge(ctx) {
|
|
|
108931
109345
|
totalRejected += result.rejected;
|
|
108932
109346
|
}
|
|
108933
109347
|
console.log("");
|
|
108934
|
-
console.log(
|
|
108935
|
-
console.log(
|
|
109348
|
+
console.log(import_picocolors27.default.bold("Sync Summary:"));
|
|
109349
|
+
console.log(import_picocolors27.default.dim("─".repeat(40)));
|
|
108936
109350
|
if (plan.autoUpdate.length > 0) {
|
|
108937
|
-
console.log(
|
|
109351
|
+
console.log(import_picocolors27.default.green(` ✓ ${plan.autoUpdate.length} file(s) auto-updated`));
|
|
108938
109352
|
}
|
|
108939
109353
|
if (totalApplied > 0) {
|
|
108940
|
-
console.log(
|
|
109354
|
+
console.log(import_picocolors27.default.green(` ✓ ${totalApplied} hunk(s) applied`));
|
|
108941
109355
|
}
|
|
108942
109356
|
if (totalRejected > 0) {
|
|
108943
|
-
console.log(
|
|
109357
|
+
console.log(import_picocolors27.default.yellow(` ○ ${totalRejected} hunk(s) rejected`));
|
|
108944
109358
|
}
|
|
108945
109359
|
if (skippedFiles > 0) {
|
|
108946
|
-
console.log(
|
|
109360
|
+
console.log(import_picocolors27.default.yellow(` ○ ${skippedFiles} file(s) skipped`));
|
|
108947
109361
|
}
|
|
108948
109362
|
if (plan.skipped.length > 0) {
|
|
108949
|
-
console.log(
|
|
109363
|
+
console.log(import_picocolors27.default.dim(` ─ ${plan.skipped.length} user-owned file(s) unchanged`));
|
|
108950
109364
|
}
|
|
108951
109365
|
} else if (plan.needsReview.length > 0 && ctx.isNonInteractive) {
|
|
108952
109366
|
logger.error(`Cannot complete sync: ${plan.needsReview.length} file(s) require interactive review`);
|
|
@@ -108969,30 +109383,30 @@ Options:
|
|
|
108969
109383
|
}
|
|
108970
109384
|
function displaySyncPlan(plan) {
|
|
108971
109385
|
console.log("");
|
|
108972
|
-
console.log(
|
|
108973
|
-
console.log(
|
|
109386
|
+
console.log(import_picocolors27.default.bold("Sync Plan:"));
|
|
109387
|
+
console.log(import_picocolors27.default.dim("─".repeat(40)));
|
|
108974
109388
|
if (plan.autoUpdate.length > 0) {
|
|
108975
|
-
console.log(
|
|
109389
|
+
console.log(import_picocolors27.default.green(` ${plan.autoUpdate.length} file(s) will be auto-updated`));
|
|
108976
109390
|
for (const file of plan.autoUpdate.slice(0, 5)) {
|
|
108977
|
-
console.log(
|
|
109391
|
+
console.log(import_picocolors27.default.dim(` • ${file.path}`));
|
|
108978
109392
|
}
|
|
108979
109393
|
if (plan.autoUpdate.length > 5) {
|
|
108980
|
-
console.log(
|
|
109394
|
+
console.log(import_picocolors27.default.dim(` ... and ${plan.autoUpdate.length - 5} more`));
|
|
108981
109395
|
}
|
|
108982
109396
|
}
|
|
108983
109397
|
if (plan.needsReview.length > 0) {
|
|
108984
|
-
console.log(
|
|
109398
|
+
console.log(import_picocolors27.default.yellow(` ${plan.needsReview.length} file(s) need interactive review`));
|
|
108985
109399
|
for (const file of plan.needsReview.slice(0, 5)) {
|
|
108986
|
-
console.log(
|
|
109400
|
+
console.log(import_picocolors27.default.dim(` • ${file.path}`));
|
|
108987
109401
|
}
|
|
108988
109402
|
if (plan.needsReview.length > 5) {
|
|
108989
|
-
console.log(
|
|
109403
|
+
console.log(import_picocolors27.default.dim(` ... and ${plan.needsReview.length - 5} more`));
|
|
108990
109404
|
}
|
|
108991
109405
|
}
|
|
108992
109406
|
if (plan.skipped.length > 0) {
|
|
108993
|
-
console.log(
|
|
109407
|
+
console.log(import_picocolors27.default.dim(` ${plan.skipped.length} user-owned file(s) will be skipped`));
|
|
108994
109408
|
}
|
|
108995
|
-
console.log(
|
|
109409
|
+
console.log(import_picocolors27.default.dim("─".repeat(40)));
|
|
108996
109410
|
}
|
|
108997
109411
|
async function createBackup(claudeDir3, files, backupDir) {
|
|
108998
109412
|
await mkdir37(backupDir, { recursive: true });
|
|
@@ -109288,9 +109702,9 @@ async function transformFolderPaths(extractDir, folders, options2 = {}) {
|
|
|
109288
109702
|
// src/services/transformers/global-path-transformer.ts
|
|
109289
109703
|
init_logger();
|
|
109290
109704
|
import { readFile as readFile61, readdir as readdir44, writeFile as writeFile35 } from "node:fs/promises";
|
|
109291
|
-
import { homedir as
|
|
109705
|
+
import { homedir as homedir48, platform as platform16 } from "node:os";
|
|
109292
109706
|
import { extname as extname7, join as join139 } from "node:path";
|
|
109293
|
-
var IS_WINDOWS3 =
|
|
109707
|
+
var IS_WINDOWS3 = platform16() === "win32";
|
|
109294
109708
|
var HOME_PREFIX = "$HOME";
|
|
109295
109709
|
function getHomeDirPrefix() {
|
|
109296
109710
|
return HOME_PREFIX;
|
|
@@ -109299,7 +109713,7 @@ function normalizeInstallPath(path17) {
|
|
|
109299
109713
|
return path17.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
109300
109714
|
}
|
|
109301
109715
|
function getDefaultGlobalClaudeDir() {
|
|
109302
|
-
return normalizeInstallPath(join139(
|
|
109716
|
+
return normalizeInstallPath(join139(homedir48(), ".claude"));
|
|
109303
109717
|
}
|
|
109304
109718
|
function getCustomGlobalClaudeDir(targetClaudeDir) {
|
|
109305
109719
|
if (!targetClaudeDir)
|
|
@@ -109735,288 +110149,19 @@ import { homedir as homedir52 } from "node:os";
|
|
|
109735
110149
|
import { basename as basename30, join as join144, resolve as resolve50 } from "node:path";
|
|
109736
110150
|
init_logger();
|
|
109737
110151
|
|
|
109738
|
-
// src/ui/ck-cli-design/tokens.ts
|
|
109739
|
-
var import_picocolors27 = __toESM(require_picocolors(), 1);
|
|
109740
|
-
import { homedir as homedir48, platform as platform16 } from "node:os";
|
|
109741
|
-
import { resolve as resolve49, win32 as win322 } from "node:path";
|
|
109742
|
-
var PANEL_MIN_WIDTH = 60;
|
|
109743
|
-
var PANEL_MAX_WIDTH = 72;
|
|
109744
|
-
var DEFAULT_WIDTH = PANEL_MAX_WIDTH;
|
|
109745
|
-
var UNICODE_BOX = {
|
|
109746
|
-
tl: "╔",
|
|
109747
|
-
tr: "╗",
|
|
109748
|
-
bl: "╚",
|
|
109749
|
-
br: "╝",
|
|
109750
|
-
h: "═",
|
|
109751
|
-
v: "║",
|
|
109752
|
-
bullet: "●"
|
|
109753
|
-
};
|
|
109754
|
-
var ASCII_BOX = {
|
|
109755
|
-
tl: "+",
|
|
109756
|
-
tr: "+",
|
|
109757
|
-
bl: "+",
|
|
109758
|
-
br: "+",
|
|
109759
|
-
h: "-",
|
|
109760
|
-
v: "|",
|
|
109761
|
-
bullet: "+"
|
|
109762
|
-
};
|
|
109763
|
-
function createCliDesignContext(options2 = {}) {
|
|
109764
|
-
const env2 = options2.env ?? process.env;
|
|
109765
|
-
const isTTY2 = options2.isTTY ?? process.stdout.isTTY === true;
|
|
109766
|
-
const rawWidth = options2.columns ?? process.stdout.columns ?? DEFAULT_WIDTH;
|
|
109767
|
-
const width = Math.max(40, Math.min(rawWidth, PANEL_MAX_WIDTH));
|
|
109768
|
-
const currentPlatform = options2.platform ?? platform16();
|
|
109769
|
-
return {
|
|
109770
|
-
box: supportsCliUnicode({ env: env2, isTTY: isTTY2, platform: currentPlatform }) ? UNICODE_BOX : ASCII_BOX,
|
|
109771
|
-
platform: currentPlatform,
|
|
109772
|
-
rawWidth,
|
|
109773
|
-
supportsPanels: width >= PANEL_MIN_WIDTH,
|
|
109774
|
-
useColor: isTTY2 && !env2.NO_COLOR,
|
|
109775
|
-
width
|
|
109776
|
-
};
|
|
109777
|
-
}
|
|
109778
|
-
function supportsCliUnicode(options2) {
|
|
109779
|
-
const { env: env2, isTTY: isTTY2, platform: platform17 } = options2;
|
|
109780
|
-
if (env2.CK_FORCE_ASCII === "1" || env2.NO_UNICODE === "1")
|
|
109781
|
-
return false;
|
|
109782
|
-
if (env2.TERM === "dumb")
|
|
109783
|
-
return false;
|
|
109784
|
-
if (env2.WT_SESSION)
|
|
109785
|
-
return true;
|
|
109786
|
-
const ci = (env2.CI ?? "").trim().toLowerCase();
|
|
109787
|
-
if (ci === "true" || ci === "1")
|
|
109788
|
-
return true;
|
|
109789
|
-
if (!isTTY2)
|
|
109790
|
-
return false;
|
|
109791
|
-
if (env2.TERM_PROGRAM === "iTerm.app")
|
|
109792
|
-
return true;
|
|
109793
|
-
if (env2.TERM_PROGRAM === "Apple_Terminal")
|
|
109794
|
-
return true;
|
|
109795
|
-
if (env2.TERM_PROGRAM === "vscode")
|
|
109796
|
-
return true;
|
|
109797
|
-
if (env2.KONSOLE_VERSION)
|
|
109798
|
-
return true;
|
|
109799
|
-
const locale = `${env2.LANG ?? ""}${env2.LC_ALL ?? ""}`.toLowerCase();
|
|
109800
|
-
if (locale.includes("utf"))
|
|
109801
|
-
return true;
|
|
109802
|
-
if (platform17 === "win32")
|
|
109803
|
-
return false;
|
|
109804
|
-
return true;
|
|
109805
|
-
}
|
|
109806
|
-
function stripAnsi2(value) {
|
|
109807
|
-
let result = "";
|
|
109808
|
-
for (let index = 0;index < value.length; index += 1) {
|
|
109809
|
-
const code2 = value.charCodeAt(index);
|
|
109810
|
-
if (code2 !== 27) {
|
|
109811
|
-
result += value[index];
|
|
109812
|
-
continue;
|
|
109813
|
-
}
|
|
109814
|
-
const next = value[index + 1];
|
|
109815
|
-
if (next === "[") {
|
|
109816
|
-
index += 2;
|
|
109817
|
-
while (index < value.length) {
|
|
109818
|
-
const char = value.charCodeAt(index);
|
|
109819
|
-
if (char >= 64 && char <= 126)
|
|
109820
|
-
break;
|
|
109821
|
-
index += 1;
|
|
109822
|
-
}
|
|
109823
|
-
continue;
|
|
109824
|
-
}
|
|
109825
|
-
if (next === "]") {
|
|
109826
|
-
index += 2;
|
|
109827
|
-
while (index < value.length) {
|
|
109828
|
-
if (value.charCodeAt(index) === 7)
|
|
109829
|
-
break;
|
|
109830
|
-
if (value.charCodeAt(index) === 27 && value[index + 1] === "\\") {
|
|
109831
|
-
index += 1;
|
|
109832
|
-
break;
|
|
109833
|
-
}
|
|
109834
|
-
index += 1;
|
|
109835
|
-
}
|
|
109836
|
-
continue;
|
|
109837
|
-
}
|
|
109838
|
-
if (next !== undefined)
|
|
109839
|
-
index += 1;
|
|
109840
|
-
}
|
|
109841
|
-
return result;
|
|
109842
|
-
}
|
|
109843
|
-
function visibleWidth(value) {
|
|
109844
|
-
return stripAnsi2(value).length;
|
|
109845
|
-
}
|
|
109846
|
-
function padVisible(value, width) {
|
|
109847
|
-
const padding = Math.max(0, width - visibleWidth(value));
|
|
109848
|
-
return `${value}${" ".repeat(padding)}`;
|
|
109849
|
-
}
|
|
109850
|
-
function truncateMiddle(value, width) {
|
|
109851
|
-
if (width <= 0)
|
|
109852
|
-
return "";
|
|
109853
|
-
if (visibleWidth(value) <= width)
|
|
109854
|
-
return value;
|
|
109855
|
-
if (width <= 3)
|
|
109856
|
-
return ".".repeat(width);
|
|
109857
|
-
const keep = width - 3;
|
|
109858
|
-
const front = Math.ceil(keep / 2);
|
|
109859
|
-
const back = Math.floor(keep / 2);
|
|
109860
|
-
return `${value.slice(0, front)}...${value.slice(value.length - back)}`;
|
|
109861
|
-
}
|
|
109862
|
-
function wrapText(value, width) {
|
|
109863
|
-
if (width <= 0)
|
|
109864
|
-
return [""];
|
|
109865
|
-
const words = value.split(/\s+/).filter(Boolean);
|
|
109866
|
-
if (words.length === 0)
|
|
109867
|
-
return [""];
|
|
109868
|
-
const lines = [];
|
|
109869
|
-
let current = "";
|
|
109870
|
-
for (const word of words) {
|
|
109871
|
-
const candidate = current.length === 0 ? word : `${current} ${word}`;
|
|
109872
|
-
if (visibleWidth(candidate) <= width) {
|
|
109873
|
-
current = candidate;
|
|
109874
|
-
continue;
|
|
109875
|
-
}
|
|
109876
|
-
if (current.length > 0) {
|
|
109877
|
-
lines.push(current);
|
|
109878
|
-
current = "";
|
|
109879
|
-
}
|
|
109880
|
-
if (visibleWidth(word) <= width) {
|
|
109881
|
-
current = word;
|
|
109882
|
-
continue;
|
|
109883
|
-
}
|
|
109884
|
-
let remaining = word;
|
|
109885
|
-
while (visibleWidth(remaining) > width) {
|
|
109886
|
-
lines.push(`${remaining.slice(0, Math.max(1, width - 3))}...`);
|
|
109887
|
-
remaining = remaining.slice(Math.max(1, width - 3));
|
|
109888
|
-
}
|
|
109889
|
-
current = remaining;
|
|
109890
|
-
}
|
|
109891
|
-
if (current.length > 0) {
|
|
109892
|
-
lines.push(current);
|
|
109893
|
-
}
|
|
109894
|
-
return lines;
|
|
109895
|
-
}
|
|
109896
|
-
function formatDisplayPath(value) {
|
|
109897
|
-
const normalized = value.replace(/\\/g, "/");
|
|
109898
|
-
const home5 = homedir48().replace(/\\/g, "/");
|
|
109899
|
-
if (normalized === home5)
|
|
109900
|
-
return "~";
|
|
109901
|
-
if (normalized.startsWith(`${home5}/`)) {
|
|
109902
|
-
return normalized.replace(home5, "~");
|
|
109903
|
-
}
|
|
109904
|
-
return normalized;
|
|
109905
|
-
}
|
|
109906
|
-
function formatCdHint(value, currentPlatform = platform16()) {
|
|
109907
|
-
if (currentPlatform === "win32") {
|
|
109908
|
-
const absolutePath2 = win322.resolve(value);
|
|
109909
|
-
return `cd /d "${absolutePath2}"`;
|
|
109910
|
-
}
|
|
109911
|
-
const absolutePath = resolve49(value);
|
|
109912
|
-
const displayPath = formatDisplayPath(absolutePath);
|
|
109913
|
-
if (displayPath.includes(" ")) {
|
|
109914
|
-
return `cd "${displayPath}"`;
|
|
109915
|
-
}
|
|
109916
|
-
return `cd ${displayPath}`;
|
|
109917
|
-
}
|
|
109918
|
-
function paint(value, tone, context) {
|
|
109919
|
-
if (!context.useColor)
|
|
109920
|
-
return value;
|
|
109921
|
-
switch (tone) {
|
|
109922
|
-
case "accent":
|
|
109923
|
-
return import_picocolors27.default.cyan(value);
|
|
109924
|
-
case "muted":
|
|
109925
|
-
return import_picocolors27.default.dim(value);
|
|
109926
|
-
case "success":
|
|
109927
|
-
return import_picocolors27.default.green(value);
|
|
109928
|
-
case "warning":
|
|
109929
|
-
return import_picocolors27.default.yellow(value);
|
|
109930
|
-
case "heading":
|
|
109931
|
-
return import_picocolors27.default.bold(value);
|
|
109932
|
-
}
|
|
109933
|
-
}
|
|
109934
|
-
|
|
109935
110152
|
// src/ui/ck-cli-design/next-steps-footer.ts
|
|
110153
|
+
init_tokens();
|
|
109936
110154
|
function renderNextStepsFooter(options2) {
|
|
109937
110155
|
const context = options2.context ?? createCliDesignContext(options2.contextOptions);
|
|
109938
110156
|
const bullet = context.box.bullet === "+" ? "-" : "•";
|
|
109939
110157
|
return options2.commands.map((command) => `${bullet} ${command}`);
|
|
109940
110158
|
}
|
|
109941
|
-
|
|
109942
|
-
|
|
109943
|
-
|
|
109944
|
-
|
|
109945
|
-
const subtitle = options2.subtitle ? paint(options2.subtitle, "muted", context) : null;
|
|
109946
|
-
if (!context.supportsPanels) {
|
|
109947
|
-
return renderPlainPanel(options2.zones, title, subtitle, context);
|
|
109948
|
-
}
|
|
109949
|
-
return renderBoxedPanel(options2.zones, title, subtitle, context);
|
|
109950
|
-
}
|
|
109951
|
-
function renderPlainPanel(zones, title, subtitle, context) {
|
|
109952
|
-
const lines = [title];
|
|
109953
|
-
if (subtitle)
|
|
109954
|
-
lines.push(subtitle);
|
|
109955
|
-
lines.push("");
|
|
109956
|
-
for (const zone of zones) {
|
|
109957
|
-
lines.push(paint(zone.label, "accent", context));
|
|
109958
|
-
for (const line of zone.lines) {
|
|
109959
|
-
lines.push(...wrapText(line, context.width - 2).map((entry) => ` ${entry}`));
|
|
109960
|
-
}
|
|
109961
|
-
lines.push("");
|
|
109962
|
-
}
|
|
109963
|
-
return trimTrailingBlank(lines);
|
|
109964
|
-
}
|
|
109965
|
-
function renderBoxedPanel(zones, title, subtitle, context) {
|
|
109966
|
-
const labelWidth = Math.min(12, Math.max(...zones.map((zone) => zone.label.length), 4));
|
|
109967
|
-
const innerWidth = context.width - 4;
|
|
109968
|
-
const lines = [renderTopBorder(title, context.box, context.width)];
|
|
109969
|
-
if (subtitle) {
|
|
109970
|
-
lines.push(renderContentLine(subtitle, innerWidth, context.box));
|
|
109971
|
-
lines.push(renderContentLine("", innerWidth, context.box));
|
|
109972
|
-
}
|
|
109973
|
-
for (const [index, zone] of zones.entries()) {
|
|
109974
|
-
for (const line of formatZone(zone, labelWidth, innerWidth, context)) {
|
|
109975
|
-
lines.push(renderContentLine(line, innerWidth, context.box));
|
|
109976
|
-
}
|
|
109977
|
-
if (index < zones.length - 1) {
|
|
109978
|
-
lines.push(renderContentLine("", innerWidth, context.box));
|
|
109979
|
-
}
|
|
109980
|
-
}
|
|
109981
|
-
lines.push(renderBottomBorder(context.box, context.width));
|
|
109982
|
-
return lines;
|
|
109983
|
-
}
|
|
109984
|
-
function formatZone(zone, labelWidth, innerWidth, context) {
|
|
109985
|
-
const availableWidth = Math.max(8, innerWidth - labelWidth - 3);
|
|
109986
|
-
const label = paint(zone.label, "accent", context);
|
|
109987
|
-
const rendered = [];
|
|
109988
|
-
for (const [index, rawLine] of zone.lines.entries()) {
|
|
109989
|
-
const wrappedLines = wrapText(rawLine, availableWidth);
|
|
109990
|
-
for (const [wrappedIndex, wrappedLine] of wrappedLines.entries()) {
|
|
109991
|
-
const prefix = index === 0 && wrappedIndex === 0 ? padVisible(label, labelWidth) : " ".repeat(labelWidth);
|
|
109992
|
-
rendered.push(` ${prefix} ${wrappedLine}`);
|
|
109993
|
-
}
|
|
109994
|
-
}
|
|
109995
|
-
return rendered;
|
|
109996
|
-
}
|
|
109997
|
-
function renderTopBorder(title, box, width) {
|
|
109998
|
-
const availableWidth = width - 2;
|
|
109999
|
-
const decorationWidth = 3;
|
|
110000
|
-
const maxTitleWidth = Math.max(1, availableWidth - decorationWidth - 1);
|
|
110001
|
-
const safeTitle = visibleWidth(title) > maxTitleWidth ? truncateMiddle(title, maxTitleWidth) : title;
|
|
110002
|
-
const heading = `${box.h} ${safeTitle} `;
|
|
110003
|
-
const fill = Math.max(1, availableWidth - visibleWidth(heading));
|
|
110004
|
-
return `${box.tl}${heading}${box.h.repeat(fill)}${box.tr}`;
|
|
110005
|
-
}
|
|
110006
|
-
function renderBottomBorder(box, width) {
|
|
110007
|
-
return `${box.bl}${box.h.repeat(width - 2)}${box.br}`;
|
|
110008
|
-
}
|
|
110009
|
-
function renderContentLine(content, width, box) {
|
|
110010
|
-
return `${box.v} ${padVisible(content, width)} ${box.v}`;
|
|
110011
|
-
}
|
|
110012
|
-
function trimTrailingBlank(lines) {
|
|
110013
|
-
const trimmed = [...lines];
|
|
110014
|
-
while (trimmed[trimmed.length - 1] === "") {
|
|
110015
|
-
trimmed.pop();
|
|
110016
|
-
}
|
|
110017
|
-
return trimmed;
|
|
110018
|
-
}
|
|
110159
|
+
|
|
110160
|
+
// src/ui/ck-cli-design/index.ts
|
|
110161
|
+
init_panel();
|
|
110162
|
+
|
|
110019
110163
|
// src/ui/ck-cli-design/preflight-row.ts
|
|
110164
|
+
init_tokens();
|
|
110020
110165
|
function renderPreflightRow(options2) {
|
|
110021
110166
|
const context = options2.context ?? createCliDesignContext(options2.contextOptions);
|
|
110022
110167
|
const icon = options2.icon ?? context.box.bullet;
|
|
@@ -110038,6 +110183,8 @@ function renderPreflightRow(options2) {
|
|
|
110038
110183
|
return lines;
|
|
110039
110184
|
}
|
|
110040
110185
|
// src/ui/ck-cli-design/source-target-header.ts
|
|
110186
|
+
init_panel();
|
|
110187
|
+
init_tokens();
|
|
110041
110188
|
function renderSourceTargetHeader(options2) {
|
|
110042
110189
|
const context = options2.context ?? createCliDesignContext(options2.contextOptions);
|
|
110043
110190
|
return renderPanel({
|
|
@@ -110050,6 +110197,10 @@ function renderSourceTargetHeader(options2) {
|
|
|
110050
110197
|
]
|
|
110051
110198
|
});
|
|
110052
110199
|
}
|
|
110200
|
+
|
|
110201
|
+
// src/ui/ck-cli-design/index.ts
|
|
110202
|
+
init_tokens();
|
|
110203
|
+
|
|
110053
110204
|
// src/commands/migrate/migrate-command.ts
|
|
110054
110205
|
init_agents_discovery();
|
|
110055
110206
|
init_commands_discovery();
|