claudekit-cli 4.4.0-dev.7 → 4.4.0-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -55585,6 +55585,12 @@ async function migrateHooksSettingsForCodex(options2) {
55585
55585
  const configTomlPath = isGlobal ? join44(homedir26(), ".codex", "config.toml") : join44(process.cwd(), ".codex", "config.toml");
55586
55586
  const flagResult = await ensureCodexHooksFeatureFlag(configTomlPath, isGlobal);
55587
55587
  featureFlagWritten = flagResult.status === "written" || flagResult.status === "updated";
55588
+ if (flagResult.status === "failed") {
55589
+ warnings.push({
55590
+ reason: "codex-feature-flag-write-failed",
55591
+ message: `Codex hooks are registered but enabling them failed: ${flagResult.error ?? "unknown error"}. Run \`ck migrate --agent codex\` again to retry.`
55592
+ });
55593
+ }
55588
55594
  }
55589
55595
  return {
55590
55596
  status: "registered",
@@ -63853,7 +63859,7 @@ var package_default;
63853
63859
  var init_package = __esm(() => {
63854
63860
  package_default = {
63855
63861
  name: "claudekit-cli",
63856
- version: "4.4.0-dev.7",
63862
+ version: "4.4.0-dev.8",
63857
63863
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
63858
63864
  type: "module",
63859
63865
  repository: {
@@ -66223,6 +66229,315 @@ var init_claudekit_scanner = __esm(() => {
66223
66229
  import_fs_extra7 = __toESM(require_lib(), 1);
66224
66230
  });
66225
66231
 
66232
+ // src/ui/ck-cli-design/tokens.ts
66233
+ import { homedir as homedir41, platform as platform7 } from "node:os";
66234
+ import { resolve as resolve34, win32 } from "node:path";
66235
+ function createCliDesignContext(options2 = {}) {
66236
+ const env2 = options2.env ?? process.env;
66237
+ const isTTY2 = options2.isTTY ?? process.stdout.isTTY === true;
66238
+ const rawWidth = options2.columns ?? process.stdout.columns ?? DEFAULT_WIDTH;
66239
+ const width = Math.max(40, Math.min(rawWidth, PANEL_MAX_WIDTH));
66240
+ const currentPlatform = options2.platform ?? platform7();
66241
+ return {
66242
+ box: supportsCliUnicode({ env: env2, isTTY: isTTY2, platform: currentPlatform }) ? UNICODE_BOX : ASCII_BOX,
66243
+ platform: currentPlatform,
66244
+ rawWidth,
66245
+ supportsPanels: width >= PANEL_MIN_WIDTH,
66246
+ useColor: isTTY2 && !env2.NO_COLOR,
66247
+ width
66248
+ };
66249
+ }
66250
+ function supportsCliUnicode(options2) {
66251
+ const { env: env2, isTTY: isTTY2, platform: platform8 } = options2;
66252
+ if (env2.CK_FORCE_ASCII === "1" || env2.NO_UNICODE === "1")
66253
+ return false;
66254
+ if (env2.TERM === "dumb")
66255
+ return false;
66256
+ if (env2.WT_SESSION)
66257
+ return true;
66258
+ const ci = (env2.CI ?? "").trim().toLowerCase();
66259
+ if (ci === "true" || ci === "1")
66260
+ return true;
66261
+ if (!isTTY2)
66262
+ return false;
66263
+ if (env2.TERM_PROGRAM === "iTerm.app")
66264
+ return true;
66265
+ if (env2.TERM_PROGRAM === "Apple_Terminal")
66266
+ return true;
66267
+ if (env2.TERM_PROGRAM === "vscode")
66268
+ return true;
66269
+ if (env2.KONSOLE_VERSION)
66270
+ return true;
66271
+ const locale = `${env2.LANG ?? ""}${env2.LC_ALL ?? ""}`.toLowerCase();
66272
+ if (locale.includes("utf"))
66273
+ return true;
66274
+ if (platform8 === "win32")
66275
+ return false;
66276
+ return true;
66277
+ }
66278
+ function stripAnsi2(value) {
66279
+ let result = "";
66280
+ for (let index = 0;index < value.length; index += 1) {
66281
+ const code = value.charCodeAt(index);
66282
+ if (code !== 27) {
66283
+ result += value[index];
66284
+ continue;
66285
+ }
66286
+ const next = value[index + 1];
66287
+ if (next === "[") {
66288
+ index += 2;
66289
+ while (index < value.length) {
66290
+ const char = value.charCodeAt(index);
66291
+ if (char >= 64 && char <= 126)
66292
+ break;
66293
+ index += 1;
66294
+ }
66295
+ continue;
66296
+ }
66297
+ if (next === "]") {
66298
+ index += 2;
66299
+ while (index < value.length) {
66300
+ if (value.charCodeAt(index) === 7)
66301
+ break;
66302
+ if (value.charCodeAt(index) === 27 && value[index + 1] === "\\") {
66303
+ index += 1;
66304
+ break;
66305
+ }
66306
+ index += 1;
66307
+ }
66308
+ continue;
66309
+ }
66310
+ if (next !== undefined)
66311
+ index += 1;
66312
+ }
66313
+ return result;
66314
+ }
66315
+ function visibleWidth(value) {
66316
+ return stripAnsi2(value).length;
66317
+ }
66318
+ function padVisible(value, width) {
66319
+ const padding = Math.max(0, width - visibleWidth(value));
66320
+ return `${value}${" ".repeat(padding)}`;
66321
+ }
66322
+ function truncateMiddle(value, width) {
66323
+ if (width <= 0)
66324
+ return "";
66325
+ if (visibleWidth(value) <= width)
66326
+ return value;
66327
+ if (width <= 3)
66328
+ return ".".repeat(width);
66329
+ const keep = width - 3;
66330
+ const front = Math.ceil(keep / 2);
66331
+ const back = Math.floor(keep / 2);
66332
+ return `${value.slice(0, front)}...${value.slice(value.length - back)}`;
66333
+ }
66334
+ function wrapText(value, width) {
66335
+ if (width <= 0)
66336
+ return [""];
66337
+ const words = value.split(/\s+/).filter(Boolean);
66338
+ if (words.length === 0)
66339
+ return [""];
66340
+ const lines = [];
66341
+ let current = "";
66342
+ for (const word of words) {
66343
+ const candidate = current.length === 0 ? word : `${current} ${word}`;
66344
+ if (visibleWidth(candidate) <= width) {
66345
+ current = candidate;
66346
+ continue;
66347
+ }
66348
+ if (current.length > 0) {
66349
+ lines.push(current);
66350
+ current = "";
66351
+ }
66352
+ if (visibleWidth(word) <= width) {
66353
+ current = word;
66354
+ continue;
66355
+ }
66356
+ let remaining = word;
66357
+ while (visibleWidth(remaining) > width) {
66358
+ lines.push(`${remaining.slice(0, Math.max(1, width - 3))}...`);
66359
+ remaining = remaining.slice(Math.max(1, width - 3));
66360
+ }
66361
+ current = remaining;
66362
+ }
66363
+ if (current.length > 0) {
66364
+ lines.push(current);
66365
+ }
66366
+ return lines;
66367
+ }
66368
+ function formatDisplayPath(value) {
66369
+ const normalized = value.replace(/\\/g, "/");
66370
+ const home5 = homedir41().replace(/\\/g, "/");
66371
+ if (normalized === home5)
66372
+ return "~";
66373
+ if (normalized.startsWith(`${home5}/`)) {
66374
+ return normalized.replace(home5, "~");
66375
+ }
66376
+ return normalized;
66377
+ }
66378
+ function formatCdHint(value, currentPlatform = platform7()) {
66379
+ if (currentPlatform === "win32") {
66380
+ const absolutePath2 = win32.resolve(value);
66381
+ return `cd /d "${absolutePath2}"`;
66382
+ }
66383
+ const absolutePath = resolve34(value);
66384
+ const displayPath = formatDisplayPath(absolutePath);
66385
+ if (displayPath.includes(" ")) {
66386
+ return `cd "${displayPath}"`;
66387
+ }
66388
+ return `cd ${displayPath}`;
66389
+ }
66390
+ function paint(value, tone, context) {
66391
+ if (!context.useColor)
66392
+ return value;
66393
+ switch (tone) {
66394
+ case "accent":
66395
+ return import_picocolors14.default.cyan(value);
66396
+ case "muted":
66397
+ return import_picocolors14.default.dim(value);
66398
+ case "success":
66399
+ return import_picocolors14.default.green(value);
66400
+ case "warning":
66401
+ return import_picocolors14.default.yellow(value);
66402
+ case "heading":
66403
+ return import_picocolors14.default.bold(value);
66404
+ }
66405
+ }
66406
+ var import_picocolors14, PANEL_MIN_WIDTH = 60, PANEL_MAX_WIDTH = 72, DEFAULT_WIDTH, UNICODE_BOX, ASCII_BOX;
66407
+ var init_tokens = __esm(() => {
66408
+ import_picocolors14 = __toESM(require_picocolors(), 1);
66409
+ DEFAULT_WIDTH = PANEL_MAX_WIDTH;
66410
+ UNICODE_BOX = {
66411
+ tl: "╔",
66412
+ tr: "╗",
66413
+ bl: "╚",
66414
+ br: "╝",
66415
+ h: "═",
66416
+ v: "║",
66417
+ bullet: "●"
66418
+ };
66419
+ ASCII_BOX = {
66420
+ tl: "+",
66421
+ tr: "+",
66422
+ bl: "+",
66423
+ br: "+",
66424
+ h: "-",
66425
+ v: "|",
66426
+ bullet: "+"
66427
+ };
66428
+ });
66429
+
66430
+ // src/ui/ck-cli-design/panel.ts
66431
+ function renderPanel(options2) {
66432
+ const context = options2.context ?? createCliDesignContext(options2.contextOptions);
66433
+ const title = paint(options2.title, "heading", context);
66434
+ const subtitle = options2.subtitle ? paint(options2.subtitle, "muted", context) : null;
66435
+ if (!context.supportsPanels) {
66436
+ return renderPlainPanel(options2.zones, title, subtitle, context);
66437
+ }
66438
+ return renderBoxedPanel(options2.zones, title, subtitle, context);
66439
+ }
66440
+ function renderPlainPanel(zones, title, subtitle, context) {
66441
+ const lines = [title];
66442
+ if (subtitle)
66443
+ lines.push(subtitle);
66444
+ lines.push("");
66445
+ for (const zone of zones) {
66446
+ lines.push(paint(zone.label, "accent", context));
66447
+ for (const line of zone.lines) {
66448
+ lines.push(...wrapText(line, context.width - 2).map((entry) => ` ${entry}`));
66449
+ }
66450
+ lines.push("");
66451
+ }
66452
+ return trimTrailingBlank(lines);
66453
+ }
66454
+ function renderBoxedPanel(zones, title, subtitle, context) {
66455
+ const labelWidth = Math.min(12, Math.max(...zones.map((zone) => zone.label.length), 4));
66456
+ const innerWidth = context.width - 4;
66457
+ const lines = [renderTopBorder(title, context.box, context.width)];
66458
+ if (subtitle) {
66459
+ lines.push(renderContentLine(subtitle, innerWidth, context.box));
66460
+ lines.push(renderContentLine("", innerWidth, context.box));
66461
+ }
66462
+ for (const [index, zone] of zones.entries()) {
66463
+ for (const line of formatZone(zone, labelWidth, innerWidth, context)) {
66464
+ lines.push(renderContentLine(line, innerWidth, context.box));
66465
+ }
66466
+ if (index < zones.length - 1) {
66467
+ lines.push(renderContentLine("", innerWidth, context.box));
66468
+ }
66469
+ }
66470
+ lines.push(renderBottomBorder(context.box, context.width));
66471
+ return lines;
66472
+ }
66473
+ function formatZone(zone, labelWidth, innerWidth, context) {
66474
+ const availableWidth = Math.max(8, innerWidth - labelWidth - 3);
66475
+ const label = paint(zone.label, "accent", context);
66476
+ const rendered = [];
66477
+ for (const [index, rawLine] of zone.lines.entries()) {
66478
+ const wrappedLines = wrapText(rawLine, availableWidth);
66479
+ for (const [wrappedIndex, wrappedLine] of wrappedLines.entries()) {
66480
+ const prefix = index === 0 && wrappedIndex === 0 ? padVisible(label, labelWidth) : " ".repeat(labelWidth);
66481
+ rendered.push(` ${prefix} ${wrappedLine}`);
66482
+ }
66483
+ }
66484
+ return rendered;
66485
+ }
66486
+ function renderTopBorder(title, box, width) {
66487
+ const availableWidth = width - 2;
66488
+ const decorationWidth = 3;
66489
+ const maxTitleWidth = Math.max(1, availableWidth - decorationWidth - 1);
66490
+ const safeTitle = visibleWidth(title) > maxTitleWidth ? truncateMiddle(title, maxTitleWidth) : title;
66491
+ const heading = `${box.h} ${safeTitle} `;
66492
+ const fill = Math.max(1, availableWidth - visibleWidth(heading));
66493
+ return `${box.tl}${heading}${box.h.repeat(fill)}${box.tr}`;
66494
+ }
66495
+ function renderBottomBorder(box, width) {
66496
+ return `${box.bl}${box.h.repeat(width - 2)}${box.br}`;
66497
+ }
66498
+ function renderContentLine(content, width, box) {
66499
+ return `${box.v} ${padVisible(content, width)} ${box.v}`;
66500
+ }
66501
+ function trimTrailingBlank(lines) {
66502
+ const trimmed = [...lines];
66503
+ while (trimmed[trimmed.length - 1] === "") {
66504
+ trimmed.pop();
66505
+ }
66506
+ return trimmed;
66507
+ }
66508
+ var init_panel = __esm(() => {
66509
+ init_tokens();
66510
+ });
66511
+
66512
+ // src/commands/update/codex-sync-notice.ts
66513
+ function shouldShowCodexSyncNotice(params) {
66514
+ return !params.autoMigrateEnabled && params.providers.includes(CODEX_PROVIDER);
66515
+ }
66516
+ function renderCodexSyncNotice() {
66517
+ return renderPanel({
66518
+ title: codexSyncNotice.title,
66519
+ zones: [
66520
+ { label: "", lines: [codexSyncNotice.body] },
66521
+ ...codexSyncNotice.actions.map((action) => ({
66522
+ label: action.label,
66523
+ lines: [action.command]
66524
+ }))
66525
+ ]
66526
+ });
66527
+ }
66528
+ var CODEX_PROVIDER = "codex", codexSyncNotice;
66529
+ var init_codex_sync_notice = __esm(() => {
66530
+ init_panel();
66531
+ codexSyncNotice = {
66532
+ title: "Codex sync available",
66533
+ body: "Keep Codex in step with Claude Code automatically: agents, commands, skills, and hooks.",
66534
+ actions: [
66535
+ { label: "Sync now", command: "ck migrate --agent codex" },
66536
+ { label: "Manage", command: "ck config" }
66537
+ ]
66538
+ };
66539
+ });
66540
+
66226
66541
  // src/domains/github/github-auth.ts
66227
66542
  import { execSync as execSync2 } from "node:child_process";
66228
66543
 
@@ -67484,50 +67799,62 @@ function collectSettingsHookCommands(settings) {
67484
67799
  }
67485
67800
  return commands;
67486
67801
  }
67487
- function getInstalledHookCommands(config, kit) {
67488
- const kits = Object.entries(config.kits ?? {});
67489
- if (kits.length === 0)
67802
+ function collectSettingsHookNames(settings) {
67803
+ const names = new Set;
67804
+ for (const command of collectSettingsHookCommands(settings)) {
67805
+ const hookName = extractCkHookName(command);
67806
+ if (hookName)
67807
+ names.add(hookName);
67808
+ }
67809
+ return names;
67810
+ }
67811
+ async function readManagedHookNames(claudeDir3) {
67812
+ const manifestPath = join68(claudeDir3, "hooks", MANAGED_HOOKS_MANIFEST);
67813
+ if (!existsSync47(manifestPath))
67814
+ return [];
67815
+ try {
67816
+ const data = parseJsonContent(await import_fs_extra8.readFile(manifestPath, "utf-8"));
67817
+ if (!Array.isArray(data.managedHooks))
67818
+ return [];
67819
+ return data.managedHooks.filter((name) => typeof name === "string");
67820
+ } catch (error) {
67821
+ logger.verbose(`Failed to read managed-hooks manifest: ${error instanceof Error ? error.message : "unknown"}`);
67490
67822
  return [];
67491
- const kitKey = kit?.toLowerCase();
67492
- const preferred = kitKey ? kits.filter(([name]) => {
67493
- const normalizedName = name.toLowerCase();
67494
- return normalizedName === kitKey || normalizedName.includes(kitKey);
67495
- }) : [];
67496
- const candidates = preferred.length > 0 ? preferred : kits;
67497
- return candidates.flatMap(([, entry]) => entry.installedSettings?.hooks ?? []);
67823
+ }
67824
+ }
67825
+ async function readDisabledHookNames(claudeDir3) {
67826
+ const configPath = join68(claudeDir3, ".ck.json");
67827
+ if (!existsSync47(configPath))
67828
+ return new Set;
67829
+ try {
67830
+ const config = parseJsonContent(await import_fs_extra8.readFile(configPath, "utf-8"));
67831
+ return new Set(Object.entries(config.hooks ?? {}).filter(([, enabled]) => enabled === false).map(([name]) => name));
67832
+ } catch (error) {
67833
+ logger.verbose(`Failed to read .ck.json hook disables: ${error instanceof Error ? error.message : "unknown"}`);
67834
+ return new Set;
67835
+ }
67498
67836
  }
67499
67837
  async function countMissingCkHookRegistrations(claudeDir3, kit) {
67500
67838
  const settingsPath = join68(claudeDir3, "settings.json");
67501
- const configPath = join68(claudeDir3, ".ck.json");
67502
- if (!existsSync47(settingsPath) || !existsSync47(configPath))
67839
+ if (!existsSync47(settingsPath))
67840
+ return 0;
67841
+ const managedHooks = await readManagedHookNames(claudeDir3);
67842
+ if (managedHooks.length === 0)
67503
67843
  return 0;
67504
67844
  const settings = parseJsonContent(await import_fs_extra8.readFile(settingsPath, "utf-8"));
67505
- const config = parseJsonContent(await import_fs_extra8.readFile(configPath, "utf-8"));
67506
- const existingCommands = collectSettingsHookCommands(settings);
67507
- const existingHookNames = new Set;
67508
- for (const command of existingCommands) {
67509
- const hookName = extractCkHookName(command);
67510
- if (hookName)
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);
67845
+ const liveHookNames = collectSettingsHookNames(settings);
67846
+ const disabledHooks = await readDisabledHookNames(claudeDir3);
67847
+ const hooksDir = join68(claudeDir3, "hooks");
67848
+ let missing = 0;
67849
+ for (const name of managedHooks) {
67850
+ if (disabledHooks.has(name))
67523
67851
  continue;
67524
- }
67525
- const normalizedCommand = normalizeCommand(command);
67526
- if (!existingCommands.has(normalizedCommand)) {
67527
- missingCommands.add(normalizedCommand);
67528
- }
67852
+ if (!existsSync47(join68(hooksDir, `${name}.cjs`)))
67853
+ continue;
67854
+ if (!liveHookNames.has(name))
67855
+ missing++;
67529
67856
  }
67530
- return missingHookNames.size + missingCommands.size;
67857
+ return missing;
67531
67858
  }
67532
67859
  function buildInitCommand(isGlobal, kit, beta, yes, restoreCkHooks) {
67533
67860
  const parts = ["ck init"];
@@ -67785,13 +68112,13 @@ async function promptKitUpdate(beta, yes, deps) {
67785
68112
  args.push("--beta");
67786
68113
  const displayCmd = `ck ${args.join(" ")}`;
67787
68114
  logger.info(`Running: ${displayCmd}`);
67788
- const spawnFn = deps?.spawnInitFn ?? ((spawnArgs) => new Promise((resolve34) => {
68115
+ const spawnFn = deps?.spawnInitFn ?? ((spawnArgs) => new Promise((resolve35) => {
67789
68116
  const initCommand = resolveCkInitSpawnCommand(spawnArgs);
67790
68117
  const child = spawn2(initCommand.command, initCommand.args, { stdio: "inherit" });
67791
- child.on("close", (code) => resolve34(code ?? 1));
68118
+ child.on("close", (code) => resolve35(code ?? 1));
67792
68119
  child.on("error", (err) => {
67793
68120
  logger.verbose(`Failed to spawn ck init: ${err.message}`);
67794
- resolve34(1);
68121
+ resolve35(1);
67795
68122
  });
67796
68123
  }));
67797
68124
  const exitCode = await spawnFn(args);
@@ -67877,6 +68204,10 @@ async function promptMigrateUpdate(deps) {
67877
68204
  migrateProviders = pipeline?.migrateProviders ?? "auto";
67878
68205
  migrateScope = pipeline?.migrateScope;
67879
68206
  } catch {}
68207
+ if (shouldShowCodexSyncNotice({ providers: targets, autoMigrateEnabled: autoMigrate })) {
68208
+ for (const line of renderCodexSyncNotice())
68209
+ logger.info(line);
68210
+ }
67880
68211
  if (!autoMigrate)
67881
68212
  return;
67882
68213
  let providers2;
@@ -67933,7 +68264,7 @@ async function promptMigrateUpdate(deps) {
67933
68264
  logger.verbose(`Migrate step skipped: ${error instanceof Error ? error.message : "unknown"}`);
67934
68265
  }
67935
68266
  }
67936
- var import_fs_extra8, execAsync2, SAFE_PROVIDER_NAME, HOOK_DEPENDENCY_EXTENSIONS, DYNAMIC_INJECTED_HOOKS;
68267
+ var import_fs_extra8, execAsync2, SAFE_PROVIDER_NAME, HOOK_DEPENDENCY_EXTENSIONS, MANAGED_HOOKS_MANIFEST = "managed-hooks.json";
67937
68268
  var init_post_update_handler = __esm(() => {
67938
68269
  init_ck_config_manager();
67939
68270
  init_hook_health_checker();
@@ -67944,12 +68275,12 @@ var init_post_update_handler = __esm(() => {
67944
68275
  init_logger();
67945
68276
  init_safe_prompts();
67946
68277
  init_types3();
68278
+ init_codex_sync_notice();
67947
68279
  init_version_comparator();
67948
68280
  import_fs_extra8 = __toESM(require_lib(), 1);
67949
68281
  execAsync2 = promisify9(exec2);
67950
68282
  SAFE_PROVIDER_NAME = /^[a-z0-9-]+$/;
67951
68283
  HOOK_DEPENDENCY_EXTENSIONS = [".js", ".cjs", ".mjs", ".json"];
67952
- DYNAMIC_INJECTED_HOOKS = new Set(["task-completed-handler", "teammate-idle-handler"]);
67953
68284
  });
67954
68285
 
67955
68286
  // src/commands/update-cli.ts
@@ -68245,7 +68576,7 @@ class ConfigVersionChecker {
68245
68576
  return null;
68246
68577
  }
68247
68578
  const delay = baseBackoff * 2 ** attempt;
68248
- await new Promise((resolve34) => setTimeout(resolve34, delay));
68579
+ await new Promise((resolve35) => setTimeout(resolve35, delay));
68249
68580
  }
68250
68581
  }
68251
68582
  return null;
@@ -68348,15 +68679,15 @@ import { spawn as spawn3 } from "node:child_process";
68348
68679
  import { execFile as execFile8 } from "node:child_process";
68349
68680
  import { existsSync as existsSync48 } from "node:fs";
68350
68681
  import { readFile as readFile38 } from "node:fs/promises";
68351
- import { cpus, homedir as homedir41, totalmem } from "node:os";
68682
+ import { cpus, homedir as homedir42, totalmem } from "node:os";
68352
68683
  import { join as join70 } from "node:path";
68353
68684
  function runCommand(cmd, args, fallback2) {
68354
- return new Promise((resolve34) => {
68685
+ return new Promise((resolve35) => {
68355
68686
  execFile8(cmd, args, { timeout: 5000 }, (err, stdout) => {
68356
68687
  if (err) {
68357
- resolve34(fallback2);
68688
+ resolve35(fallback2);
68358
68689
  } else {
68359
- resolve34(stdout.trim() || fallback2);
68690
+ resolve35(stdout.trim() || fallback2);
68360
68691
  }
68361
68692
  });
68362
68693
  });
@@ -68515,7 +68846,7 @@ function registerSystemRoutes(app) {
68515
68846
  gitVersion,
68516
68847
  ghVersion,
68517
68848
  shell: process.env.SHELL ?? process.env.ComSpec ?? "unknown",
68518
- homeDir: homedir41(),
68849
+ homeDir: homedir42(),
68519
68850
  cpuCores: cpus().length,
68520
68851
  totalMemoryGb: (totalmem() / 1024 ** 3).toFixed(1)
68521
68852
  };
@@ -68793,7 +69124,7 @@ var init_routes = __esm(() => {
68793
69124
 
68794
69125
  // src/domains/web-server/static-server.ts
68795
69126
  import { existsSync as existsSync49 } from "node:fs";
68796
- import { basename as basename24, dirname as dirname30, join as join71, resolve as resolve34 } from "node:path";
69127
+ import { basename as basename24, dirname as dirname30, join as join71, resolve as resolve35 } from "node:path";
68797
69128
  import { fileURLToPath as fileURLToPath2 } from "node:url";
68798
69129
  function addRuntimeUiCandidate(candidates, runtimePath) {
68799
69130
  if (!runtimePath) {
@@ -68803,7 +69134,7 @@ function addRuntimeUiCandidate(candidates, runtimePath) {
68803
69134
  if (!looksLikePath) {
68804
69135
  return;
68805
69136
  }
68806
- const entryDir = dirname30(resolve34(runtimePath));
69137
+ const entryDir = dirname30(resolve35(runtimePath));
68807
69138
  if (basename24(entryDir) === "dist") {
68808
69139
  candidates.add(join71(entryDir, "ui"));
68809
69140
  }
@@ -71835,10 +72166,10 @@ async function createAppServer(options2 = {}) {
71835
72166
  wsManager = new WebSocketManager(server);
71836
72167
  fileWatcher = new FileWatcher({ wsManager });
71837
72168
  fileWatcher.start();
71838
- await new Promise((resolve35, reject) => {
72169
+ await new Promise((resolve36, reject) => {
71839
72170
  const onListening = () => {
71840
72171
  server.off("error", onError);
71841
- resolve35();
72172
+ resolve36();
71842
72173
  };
71843
72174
  const onError = (error) => {
71844
72175
  server.off("listening", onListening);
@@ -71875,16 +72206,16 @@ async function createAppServer(options2 = {}) {
71875
72206
  };
71876
72207
  }
71877
72208
  async function closeHttpServer(server) {
71878
- await new Promise((resolve35) => {
72209
+ await new Promise((resolve36) => {
71879
72210
  if (!server.listening) {
71880
- resolve35();
72211
+ resolve36();
71881
72212
  return;
71882
72213
  }
71883
72214
  server.close((err) => {
71884
72215
  if (err) {
71885
72216
  logger.debug(`Server close error: ${err.message}`);
71886
72217
  }
71887
- resolve35();
72218
+ resolve36();
71888
72219
  });
71889
72220
  });
71890
72221
  }
@@ -72305,8 +72636,8 @@ var require_constants3 = __commonJS((exports, module) => {
72305
72636
  "@": { type: "at", open: "(?:", close: ")" }
72306
72637
  };
72307
72638
  },
72308
- globChars(win32) {
72309
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
72639
+ globChars(win322) {
72640
+ return win322 === true ? WINDOWS_CHARS : POSIX_CHARS;
72310
72641
  }
72311
72642
  };
72312
72643
  });
@@ -72326,8 +72657,8 @@ var require_utils7 = __commonJS((exports) => {
72326
72657
  exports.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/");
72327
72658
  exports.isWindows = () => {
72328
72659
  if (typeof navigator !== "undefined" && navigator.platform) {
72329
- const platform9 = navigator.platform.toLowerCase();
72330
- return platform9 === "win32" || platform9 === "windows";
72660
+ const platform10 = navigator.platform.toLowerCase();
72661
+ return platform10 === "win32" || platform10 === "windows";
72331
72662
  }
72332
72663
  if (typeof process !== "undefined" && process.platform) {
72333
72664
  return process.platform === "win32";
@@ -73620,7 +73951,7 @@ var require_picomatch2 = __commonJS((exports, module) => {
73620
73951
  import { exec as exec7, execFile as execFile9, spawn as spawn4 } from "node:child_process";
73621
73952
  import { promisify as promisify14 } from "node:util";
73622
73953
  function executeInteractiveScript(command, args, options2) {
73623
- return new Promise((resolve37, reject) => {
73954
+ return new Promise((resolve38, reject) => {
73624
73955
  const child = spawn4(command, args, {
73625
73956
  stdio: ["ignore", "inherit", "inherit"],
73626
73957
  cwd: options2?.cwd,
@@ -73641,7 +73972,7 @@ function executeInteractiveScript(command, args, options2) {
73641
73972
  } else if (code !== 0) {
73642
73973
  reject(new Error(`Command exited with code ${code}`));
73643
73974
  } else {
73644
- resolve37();
73975
+ resolve38();
73645
73976
  }
73646
73977
  });
73647
73978
  child.on("error", (error) => {
@@ -73652,8 +73983,8 @@ function executeInteractiveScript(command, args, options2) {
73652
73983
  });
73653
73984
  }
73654
73985
  function getNpmCommand() {
73655
- const platform9 = process.platform;
73656
- return platform9 === "win32" ? "npm.cmd" : "npm";
73986
+ const platform10 = process.platform;
73987
+ return platform10 === "win32" ? "npm.cmd" : "npm";
73657
73988
  }
73658
73989
  var execAsync7, execFileAsync6;
73659
73990
  var init_process_executor = __esm(() => {
@@ -73662,7 +73993,7 @@ var init_process_executor = __esm(() => {
73662
73993
  });
73663
73994
 
73664
73995
  // src/services/package-installer/validators.ts
73665
- import { resolve as resolve37 } from "node:path";
73996
+ import { resolve as resolve38 } from "node:path";
73666
73997
  function validatePackageName(packageName) {
73667
73998
  if (!packageName || typeof packageName !== "string") {
73668
73999
  throw new Error("Package name must be a non-empty string");
@@ -73675,8 +74006,8 @@ function validatePackageName(packageName) {
73675
74006
  }
73676
74007
  }
73677
74008
  function validateScriptPath(skillsDir2, scriptPath) {
73678
- const skillsDirResolved = resolve37(skillsDir2);
73679
- const scriptPathResolved = resolve37(scriptPath);
74009
+ const skillsDirResolved = resolve38(skillsDir2);
74010
+ const scriptPathResolved = resolve38(scriptPath);
73680
74011
  const skillsDirNormalized = isWindows() ? skillsDirResolved.toLowerCase() : skillsDirResolved;
73681
74012
  const scriptPathNormalized = isWindows() ? scriptPathResolved.toLowerCase() : scriptPathResolved;
73682
74013
  if (!scriptPathNormalized.startsWith(skillsDirNormalized)) {
@@ -74142,8 +74473,8 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
74142
74473
  try {
74143
74474
  const { existsSync: existsSync62 } = await import("node:fs");
74144
74475
  const clack = await Promise.resolve().then(() => (init_dist2(), exports_dist));
74145
- const platform9 = process.platform;
74146
- const scriptName = platform9 === "win32" ? "install.ps1" : "install.sh";
74476
+ const platform10 = process.platform;
74477
+ const scriptName = platform10 === "win32" ? "install.ps1" : "install.sh";
74147
74478
  const scriptPath = join91(skillsDir2, scriptName);
74148
74479
  try {
74149
74480
  validateScriptPath(skillsDir2, scriptPath);
@@ -74173,7 +74504,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
74173
74504
  }
74174
74505
  logger.warning("Installation script will execute with user privileges");
74175
74506
  logger.info(` Script: ${scriptPath}`);
74176
- logger.info(` Platform: ${platform9 === "win32" ? "Windows (PowerShell)" : "Unix (bash)"}`);
74507
+ logger.info(` Platform: ${platform10 === "win32" ? "Windows (PowerShell)" : "Unix (bash)"}`);
74177
74508
  if (logger.isVerbose()) {
74178
74509
  try {
74179
74510
  const { readFile: readFile47 } = await import("node:fs/promises");
@@ -74204,7 +74535,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
74204
74535
  logger.info("Installation cancelled by user");
74205
74536
  logger.info("");
74206
74537
  logger.info("\uD83D\uDCD6 Manual Installation Instructions:");
74207
- logger.info(` ${platform9 === "win32" ? `powershell -File "${scriptPath}"` : `bash ${scriptPath}`}`);
74538
+ logger.info(` ${platform10 === "win32" ? `powershell -File "${scriptPath}"` : `bash ${scriptPath}`}`);
74208
74539
  logger.info("");
74209
74540
  logger.info("Or see complete guide:");
74210
74541
  logger.info(` ${join91(skillsDir2, "INSTALLATION.md")}`);
@@ -74232,7 +74563,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
74232
74563
  }
74233
74564
  }
74234
74565
  }
74235
- if (platform9 === "linux") {
74566
+ if (platform10 === "linux") {
74236
74567
  const needsSudo = await checkNeedsSudoPackages();
74237
74568
  if (needsSudo) {
74238
74569
  if (withSudo) {
@@ -74281,7 +74612,7 @@ async function installSkillsDependencies(skillsDir2, options2 = {}) {
74281
74612
  ...process.env,
74282
74613
  NON_INTERACTIVE: "1"
74283
74614
  };
74284
- if (platform9 === "win32") {
74615
+ if (platform10 === "win32") {
74285
74616
  await executeInteractiveScript("powershell.exe", ["-NoLogo", "-ExecutionPolicy", "Bypass", "-File", scriptPath, "-Y"], {
74286
74617
  timeout: 600000,
74287
74618
  cwd: skillsDir2,
@@ -74477,10 +74808,10 @@ var init_config_manager2 = __esm(() => {
74477
74808
 
74478
74809
  // src/services/package-installer/gemini-mcp/validation.ts
74479
74810
  import { existsSync as existsSync63, lstatSync, readlinkSync } from "node:fs";
74480
- import { homedir as homedir44 } from "node:os";
74811
+ import { homedir as homedir45 } from "node:os";
74481
74812
  import { join as join93 } from "node:path";
74482
74813
  function getGlobalMcpConfigPath() {
74483
- return join93(homedir44(), ".claude", ".mcp.json");
74814
+ return join93(homedir45(), ".claude", ".mcp.json");
74484
74815
  }
74485
74816
  function getLocalMcpConfigPath(projectDir) {
74486
74817
  return join93(projectDir, ".mcp.json");
@@ -74501,7 +74832,7 @@ function findMcpConfigPath(projectDir) {
74501
74832
  }
74502
74833
  function getGeminiSettingsPath(projectDir, isGlobal) {
74503
74834
  if (isGlobal) {
74504
- return join93(homedir44(), ".gemini", "settings.json");
74835
+ return join93(homedir45(), ".gemini", "settings.json");
74505
74836
  }
74506
74837
  return join93(projectDir, ".gemini", "settings.json");
74507
74838
  }
@@ -74577,10 +74908,10 @@ __export(exports_gemini_mcp_linker, {
74577
74908
  checkExistingGeminiConfig: () => checkExistingGeminiConfig,
74578
74909
  addGeminiToGitignore: () => addGeminiToGitignore
74579
74910
  });
74580
- import { resolve as resolve38 } from "node:path";
74911
+ import { resolve as resolve39 } from "node:path";
74581
74912
  async function linkGeminiMcpConfig(projectDir, options2 = {}) {
74582
74913
  const { skipGitignore = false, isGlobal = false } = options2;
74583
- const resolvedProjectDir = resolve38(projectDir);
74914
+ const resolvedProjectDir = resolve39(projectDir);
74584
74915
  const geminiSettingsPath = getGeminiSettingsPath(resolvedProjectDir, isGlobal);
74585
74916
  const mcpConfigPath = findMcpConfigPath(resolvedProjectDir);
74586
74917
  if (!mcpConfigPath) {
@@ -75228,7 +75559,7 @@ var require_get_stream = __commonJS((exports, module) => {
75228
75559
  };
75229
75560
  const { maxBuffer } = options2;
75230
75561
  let stream;
75231
- await new Promise((resolve40, reject) => {
75562
+ await new Promise((resolve41, reject) => {
75232
75563
  const rejectPromise = (error) => {
75233
75564
  if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
75234
75565
  error.bufferedData = stream.getBufferedValue();
@@ -75240,7 +75571,7 @@ var require_get_stream = __commonJS((exports, module) => {
75240
75571
  rejectPromise(error);
75241
75572
  return;
75242
75573
  }
75243
- resolve40();
75574
+ resolve41();
75244
75575
  });
75245
75576
  stream.on("data", () => {
75246
75577
  if (stream.getBufferedLength() > maxBuffer) {
@@ -76601,7 +76932,7 @@ var require_extract_zip = __commonJS((exports, module) => {
76601
76932
  debug("opening", this.zipPath, "with opts", this.opts);
76602
76933
  this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
76603
76934
  this.canceled = false;
76604
- return new Promise((resolve40, reject) => {
76935
+ return new Promise((resolve41, reject) => {
76605
76936
  this.zipfile.on("error", (err) => {
76606
76937
  this.canceled = true;
76607
76938
  reject(err);
@@ -76610,7 +76941,7 @@ var require_extract_zip = __commonJS((exports, module) => {
76610
76941
  this.zipfile.on("close", () => {
76611
76942
  if (!this.canceled) {
76612
76943
  debug("zip extraction complete");
76613
- resolve40();
76944
+ resolve41();
76614
76945
  }
76615
76946
  });
76616
76947
  this.zipfile.on("entry", async (entry) => {
@@ -76727,25 +77058,25 @@ class OwnershipDisplay {
76727
77058
  static formatOwnership(ownership) {
76728
77059
  switch (ownership) {
76729
77060
  case "ck":
76730
- return import_picocolors25.default.blue("CK-owned");
77061
+ return import_picocolors26.default.blue("CK-owned");
76731
77062
  case "user":
76732
- return import_picocolors25.default.green("User-created");
77063
+ return import_picocolors26.default.green("User-created");
76733
77064
  case "ck-modified":
76734
- return import_picocolors25.default.yellow("CK-modified");
77065
+ return import_picocolors26.default.yellow("CK-modified");
76735
77066
  default:
76736
- return import_picocolors25.default.gray("Unknown");
77067
+ return import_picocolors26.default.gray("Unknown");
76737
77068
  }
76738
77069
  }
76739
77070
  static formatAction(action) {
76740
77071
  switch (action) {
76741
77072
  case "delete":
76742
- return import_picocolors25.default.red("✖ DELETE");
77073
+ return import_picocolors26.default.red("✖ DELETE");
76743
77074
  case "preserve":
76744
- return import_picocolors25.default.green("✓ PRESERVE");
77075
+ return import_picocolors26.default.green("✓ PRESERVE");
76745
77076
  case "skip":
76746
- return import_picocolors25.default.gray("○ SKIP");
77077
+ return import_picocolors26.default.gray("○ SKIP");
76747
77078
  default:
76748
- return import_picocolors25.default.gray("? UNKNOWN");
77079
+ return import_picocolors26.default.gray("? UNKNOWN");
76749
77080
  }
76750
77081
  }
76751
77082
  static calculateSummary(results) {
@@ -76779,78 +77110,78 @@ class OwnershipDisplay {
76779
77110
  }
76780
77111
  static displaySummary(summary, title = "Ownership Summary") {
76781
77112
  const lines = [
76782
- `Total files: ${import_picocolors25.default.bold(String(summary.totalFiles))}`,
77113
+ `Total files: ${import_picocolors26.default.bold(String(summary.totalFiles))}`,
76783
77114
  "",
76784
77115
  "By ownership:",
76785
- ` ${import_picocolors25.default.blue("●")} CK-owned: ${summary.ckOwned}`,
76786
- ` ${import_picocolors25.default.green("●")} User-created: ${summary.userCreated}`,
76787
- ` ${import_picocolors25.default.yellow("●")} CK-modified: ${summary.ckModified}`,
77116
+ ` ${import_picocolors26.default.blue("●")} CK-owned: ${summary.ckOwned}`,
77117
+ ` ${import_picocolors26.default.green("●")} User-created: ${summary.userCreated}`,
77118
+ ` ${import_picocolors26.default.yellow("●")} CK-modified: ${summary.ckModified}`,
76788
77119
  "",
76789
77120
  "Actions:",
76790
- ` ${import_picocolors25.default.red("✖")} To delete: ${summary.toDelete}`,
76791
- ` ${import_picocolors25.default.green("✓")} To preserve: ${summary.toPreserve}`
77121
+ ` ${import_picocolors26.default.red("✖")} To delete: ${summary.toDelete}`,
77122
+ ` ${import_picocolors26.default.green("✓")} To preserve: ${summary.toPreserve}`
76792
77123
  ];
76793
77124
  le(lines.join(`
76794
77125
  `), title);
76795
77126
  }
76796
77127
  static displayOperationPreview(results, maxItems = 10) {
76797
77128
  const summary = OwnershipDisplay.calculateSummary(results);
76798
- f2.info(import_picocolors25.default.bold("DRY RUN - Preview of changes:"));
77129
+ f2.info(import_picocolors26.default.bold("DRY RUN - Preview of changes:"));
76799
77130
  console.log("");
76800
77131
  const toDelete = results.filter((r2) => r2.action === "delete");
76801
77132
  const toPreserve = results.filter((r2) => r2.action === "preserve");
76802
77133
  if (toDelete.length > 0) {
76803
- console.log(import_picocolors25.default.red(import_picocolors25.default.bold(`Files to DELETE (${toDelete.length}):`)));
77134
+ console.log(import_picocolors26.default.red(import_picocolors26.default.bold(`Files to DELETE (${toDelete.length}):`)));
76804
77135
  const showDelete = toDelete.slice(0, maxItems);
76805
77136
  for (const result of showDelete) {
76806
- console.log(` ${import_picocolors25.default.red("✖")} ${result.path}`);
77137
+ console.log(` ${import_picocolors26.default.red("✖")} ${result.path}`);
76807
77138
  }
76808
77139
  if (toDelete.length > maxItems) {
76809
- console.log(import_picocolors25.default.gray(` ... and ${toDelete.length - maxItems} more`));
77140
+ console.log(import_picocolors26.default.gray(` ... and ${toDelete.length - maxItems} more`));
76810
77141
  }
76811
77142
  console.log("");
76812
77143
  }
76813
77144
  if (toPreserve.length > 0) {
76814
- console.log(import_picocolors25.default.green(import_picocolors25.default.bold(`Files to PRESERVE (${toPreserve.length}):`)));
77145
+ console.log(import_picocolors26.default.green(import_picocolors26.default.bold(`Files to PRESERVE (${toPreserve.length}):`)));
76815
77146
  const showPreserve = toPreserve.slice(0, maxItems);
76816
77147
  for (const result of showPreserve) {
76817
- const reason = result.reason ? import_picocolors25.default.gray(` (${result.reason})`) : "";
76818
- console.log(` ${import_picocolors25.default.green("✓")} ${result.path}${reason}`);
77148
+ const reason = result.reason ? import_picocolors26.default.gray(` (${result.reason})`) : "";
77149
+ console.log(` ${import_picocolors26.default.green("✓")} ${result.path}${reason}`);
76819
77150
  }
76820
77151
  if (toPreserve.length > maxItems) {
76821
- console.log(import_picocolors25.default.gray(` ... and ${toPreserve.length - maxItems} more`));
77152
+ console.log(import_picocolors26.default.gray(` ... and ${toPreserve.length - maxItems} more`));
76822
77153
  }
76823
77154
  console.log("");
76824
77155
  }
76825
77156
  OwnershipDisplay.displaySummary(summary, "Preview Summary");
76826
- f2.warn(import_picocolors25.default.yellow("No changes were made. Run without --dry-run to apply changes."));
77157
+ f2.warn(import_picocolors26.default.yellow("No changes were made. Run without --dry-run to apply changes."));
76827
77158
  }
76828
77159
  static displayFile(path17, ownership, action, reason) {
76829
77160
  const ownershipStr = OwnershipDisplay.formatOwnership(ownership);
76830
77161
  const actionStr = OwnershipDisplay.formatAction(action);
76831
- const reasonStr = reason ? import_picocolors25.default.gray(` - ${reason}`) : "";
77162
+ const reasonStr = reason ? import_picocolors26.default.gray(` - ${reason}`) : "";
76832
77163
  console.log(` ${actionStr} ${path17} [${ownershipStr}]${reasonStr}`);
76833
77164
  }
76834
77165
  static displayForceWarning() {
76835
- f2.warn(`${import_picocolors25.default.yellow(import_picocolors25.default.bold("FORCE MODE ENABLED"))}
76836
- ${import_picocolors25.default.yellow("User modifications will be overwritten!")}
76837
- ${import_picocolors25.default.gray("Use --dry-run first to preview changes.")}`);
77166
+ f2.warn(`${import_picocolors26.default.yellow(import_picocolors26.default.bold("FORCE MODE ENABLED"))}
77167
+ ${import_picocolors26.default.yellow("User modifications will be overwritten!")}
77168
+ ${import_picocolors26.default.gray("Use --dry-run first to preview changes.")}`);
76838
77169
  }
76839
77170
  static displayLegacyWarning() {
76840
- f2.warn(`${import_picocolors25.default.yellow(import_picocolors25.default.bold("Legacy Installation Detected"))}
76841
- ${import_picocolors25.default.yellow("No ownership metadata found.")}
76842
- ${import_picocolors25.default.gray("Running migration to enable ownership tracking...")}`);
77171
+ f2.warn(`${import_picocolors26.default.yellow(import_picocolors26.default.bold("Legacy Installation Detected"))}
77172
+ ${import_picocolors26.default.yellow("No ownership metadata found.")}
77173
+ ${import_picocolors26.default.gray("Running migration to enable ownership tracking...")}`);
76843
77174
  }
76844
77175
  static displayCompletionSummary(deleted, preserved) {
76845
- const message = `${import_picocolors25.default.green(`✓ Deleted ${deleted} CK-owned file(s)`)}
76846
- ${import_picocolors25.default.blue(`✓ Preserved ${preserved} user/modified file(s)`)}`;
77176
+ const message = `${import_picocolors26.default.green(`✓ Deleted ${deleted} CK-owned file(s)`)}
77177
+ ${import_picocolors26.default.blue(`✓ Preserved ${preserved} user/modified file(s)`)}`;
76847
77178
  f2.success(message);
76848
77179
  }
76849
77180
  }
76850
- var import_picocolors25;
77181
+ var import_picocolors26;
76851
77182
  var init_ownership_display = __esm(() => {
76852
77183
  init_dist2();
76853
- import_picocolors25 = __toESM(require_picocolors(), 1);
77184
+ import_picocolors26 = __toESM(require_picocolors(), 1);
76854
77185
  });
76855
77186
 
76856
77187
  // src/commands/watch/phases/implementation-git-helpers.ts
@@ -80986,7 +81317,7 @@ var migrateCommandHelp;
80986
81317
  var init_migrate_command_help = __esm(() => {
80987
81318
  migrateCommandHelp = {
80988
81319
  name: "migrate",
80989
- description: "Migrate Claude Code agents, commands, skills, config, rules, and hooks to other providers",
81320
+ 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
81321
  usage: "ck migrate [options]",
80991
81322
  examples: [
80992
81323
  {
@@ -86513,7 +86844,7 @@ init_commands_discovery();
86513
86844
 
86514
86845
  // src/commands/config/config-ui-command.ts
86515
86846
  init_logger();
86516
- var import_picocolors14 = __toESM(require_picocolors(), 1);
86847
+ var import_picocolors15 = __toESM(require_picocolors(), 1);
86517
86848
  import { networkInterfaces } from "node:os";
86518
86849
  var LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "::1"]);
86519
86850
  var WILDCARD_HOSTS2 = new Set(["0.0.0.0", "::"]);
@@ -86541,24 +86872,24 @@ async function configUICommand(options2 = {}) {
86541
86872
  });
86542
86873
  const urls = getDashboardUrls(server.host, server.port);
86543
86874
  console.log();
86544
- console.log(import_picocolors14.default.bold(" ClaudeKit Dashboard"));
86545
- console.log(import_picocolors14.default.dim(" ─────────────────────"));
86875
+ console.log(import_picocolors15.default.bold(" ClaudeKit Dashboard"));
86876
+ console.log(import_picocolors15.default.dim(" ─────────────────────"));
86546
86877
  if (urls.local) {
86547
- console.log(` ${import_picocolors14.default.green("➜")} Local: ${import_picocolors14.default.cyan(urls.local)}`);
86878
+ console.log(` ${import_picocolors15.default.green("➜")} Local: ${import_picocolors15.default.cyan(urls.local)}`);
86548
86879
  }
86549
86880
  for (const url of urls.network) {
86550
- console.log(` ${import_picocolors14.default.green(urls.local ? "•" : "➜")} Network: ${import_picocolors14.default.cyan(url)}`);
86881
+ console.log(` ${import_picocolors15.default.green(urls.local ? "•" : "➜")} Network: ${import_picocolors15.default.cyan(url)}`);
86551
86882
  }
86552
- console.log(` ${import_picocolors14.default.green("•")} Bind: ${import_picocolors14.default.cyan(server.host)}`);
86883
+ console.log(` ${import_picocolors15.default.green("•")} Bind: ${import_picocolors15.default.cyan(server.host)}`);
86553
86884
  console.log();
86554
- console.log(import_picocolors14.default.dim(" Press Ctrl+C to stop"));
86885
+ console.log(import_picocolors15.default.dim(" Press Ctrl+C to stop"));
86555
86886
  console.log();
86556
- await new Promise((resolve35) => {
86887
+ await new Promise((resolve36) => {
86557
86888
  const shutdown = async () => {
86558
86889
  console.log();
86559
86890
  logger.info("Shutting down...");
86560
86891
  await server.close();
86561
- resolve35();
86892
+ resolve36();
86562
86893
  };
86563
86894
  process.on("SIGINT", shutdown);
86564
86895
  process.on("SIGTERM", shutdown);
@@ -86579,12 +86910,12 @@ async function configUICommand(options2 = {}) {
86579
86910
  }
86580
86911
  async function checkPort(port, host) {
86581
86912
  const { createServer: createServer2 } = await import("node:net");
86582
- return new Promise((resolve35) => {
86913
+ return new Promise((resolve36) => {
86583
86914
  const server = createServer2();
86584
- server.once("error", () => resolve35(false));
86915
+ server.once("error", () => resolve36(false));
86585
86916
  server.once("listening", () => {
86586
86917
  server.close();
86587
- resolve35(true);
86918
+ resolve36(true);
86588
86919
  });
86589
86920
  server.listen(port, host);
86590
86921
  });
@@ -86996,7 +87327,7 @@ function shouldSkipExpensiveOperations3() {
86996
87327
  return shouldSkipExpensiveOperations();
86997
87328
  }
86998
87329
  function getGhUpgradeInstructions(currentVersion) {
86999
- const platform7 = process.platform;
87330
+ const platform8 = process.platform;
87000
87331
  const wsl = isWSL2();
87001
87332
  const lines = [];
87002
87333
  lines.push(`✗ GitHub CLI v${currentVersion} is outdated`);
@@ -87007,10 +87338,10 @@ function getGhUpgradeInstructions(currentVersion) {
87007
87338
  lines.push(" curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg");
87008
87339
  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
87340
  lines.push(" sudo apt update && sudo apt install gh");
87010
- } else if (platform7 === "darwin") {
87341
+ } else if (platform8 === "darwin") {
87011
87342
  lines.push("Upgrade GitHub CLI:");
87012
87343
  lines.push(" brew upgrade gh");
87013
- } else if (platform7 === "win32") {
87344
+ } else if (platform8 === "win32") {
87014
87345
  lines.push("Upgrade GitHub CLI:");
87015
87346
  lines.push(" winget upgrade GitHub.cli");
87016
87347
  } else {
@@ -87030,18 +87361,18 @@ import { exec as exec3 } from "node:child_process";
87030
87361
  import { promisify as promisify10 } from "node:util";
87031
87362
  var execAsync3 = promisify10(exec3);
87032
87363
  function getOSInfo() {
87033
- const platform7 = process.platform;
87364
+ const platform8 = process.platform;
87034
87365
  const arch2 = process.arch;
87035
- const isWindows3 = platform7 === "win32";
87036
- const isMacOS2 = platform7 === "darwin";
87037
- const isLinux2 = platform7 === "linux";
87366
+ const isWindows3 = platform8 === "win32";
87367
+ const isMacOS2 = platform8 === "darwin";
87368
+ const isLinux2 = platform8 === "linux";
87038
87369
  const isWSL3 = isLinux2 && process.env.WSL_DISTRO_NAME !== undefined;
87039
- let details = `${platform7}-${arch2}`;
87370
+ let details = `${platform8}-${arch2}`;
87040
87371
  if (isWSL3) {
87041
87372
  details += ` (WSL: ${process.env.WSL_DISTRO_NAME})`;
87042
87373
  }
87043
87374
  return {
87044
- platform: platform7,
87375
+ platform: platform8,
87045
87376
  arch: arch2,
87046
87377
  isWindows: isWindows3,
87047
87378
  isMacOS: isMacOS2,
@@ -87346,16 +87677,16 @@ import * as fs7 from "node:fs";
87346
87677
  import { promisify as promisify11 } from "node:util";
87347
87678
  var execAsync4 = promisify11(exec4);
87348
87679
  async function detectOS() {
87349
- const platform7 = process.platform;
87350
- const info = { platform: platform7 };
87351
- if (platform7 === "darwin") {
87680
+ const platform8 = process.platform;
87681
+ const info = { platform: platform8 };
87682
+ if (platform8 === "darwin") {
87352
87683
  try {
87353
87684
  await execAsync4("which brew");
87354
87685
  info.hasHomebrew = true;
87355
87686
  } catch {
87356
87687
  info.hasHomebrew = false;
87357
87688
  }
87358
- } else if (platform7 === "linux") {
87689
+ } else if (platform8 === "linux") {
87359
87690
  try {
87360
87691
  if (fs7.existsSync("/etc/os-release")) {
87361
87692
  const content = fs7.readFileSync("/etc/os-release", "utf-8");
@@ -87872,8 +88203,8 @@ import { existsSync as existsSync53 } from "node:fs";
87872
88203
  import { join as join74 } from "node:path";
87873
88204
  function checkSkillsScripts(setup) {
87874
88205
  const results = [];
87875
- const platform7 = process.platform;
87876
- const scriptName = platform7 === "win32" ? "install.ps1" : "install.sh";
88206
+ const platform8 = process.platform;
88207
+ const scriptName = platform8 === "win32" ? "install.ps1" : "install.sh";
87877
88208
  if (setup.global.path) {
87878
88209
  const globalScriptPath = join74(setup.global.path, "skills", scriptName);
87879
88210
  const hasGlobalScript = existsSync53(globalScriptPath);
@@ -87927,7 +88258,7 @@ function checkComponentCounts(setup) {
87927
88258
  }
87928
88259
  // src/domains/health-checks/checkers/skill-budget-checker.ts
87929
88260
  init_path_resolver();
87930
- import { join as join76, resolve as resolve35 } from "node:path";
88261
+ import { join as join76, resolve as resolve36 } from "node:path";
87931
88262
 
87932
88263
  // src/domains/health-checks/checkers/skill-budget-scanner.ts
87933
88264
  var import_gray_matter11 = __toESM(require_gray_matter(), 1);
@@ -88046,8 +88377,8 @@ async function applyBudgetDefaults(settingsPath, projectClaudeDir, requiredFract
88046
88377
  // src/domains/health-checks/checkers/skill-budget-checker.ts
88047
88378
  var ENGINEER_SKILL_COUNT_THRESHOLD = 20;
88048
88379
  async function checkSkillBudget(setup, projectDir) {
88049
- const projectClaudeDir = resolve35(projectDir, ".claude");
88050
- const globalClaudeDir = resolve35(PathResolver.getGlobalKitDir());
88380
+ const projectClaudeDir = resolve36(projectDir, ".claude");
88381
+ const globalClaudeDir = resolve36(PathResolver.getGlobalKitDir());
88051
88382
  const projectScopeAliasesGlobal = projectClaudeDir === globalClaudeDir;
88052
88383
  const [projectSkills, globalSkills] = await Promise.all([
88053
88384
  projectScopeAliasesGlobal ? Promise.resolve([]) : scanSkills2(join76(projectClaudeDir, "skills")),
@@ -88446,8 +88777,8 @@ init_logger();
88446
88777
  init_path_resolver();
88447
88778
  import { existsSync as existsSync58 } from "node:fs";
88448
88779
  import { readFile as readFile42 } from "node:fs/promises";
88449
- import { homedir as homedir42 } from "node:os";
88450
- import { dirname as dirname31, join as join80, normalize as normalize6, resolve as resolve36 } from "node:path";
88780
+ import { homedir as homedir43 } from "node:os";
88781
+ import { dirname as dirname31, join as join80, normalize as normalize6, resolve as resolve37 } from "node:path";
88451
88782
  async function checkPathRefsValid(projectDir) {
88452
88783
  const globalClaudeMd = join80(PathResolver.getGlobalKitDir(), "CLAUDE.md");
88453
88784
  const projectClaudeMd = join80(projectDir, ".claude", "CLAUDE.md");
@@ -88479,7 +88810,7 @@ async function checkPathRefsValid(projectDir) {
88479
88810
  };
88480
88811
  }
88481
88812
  const baseDir = dirname31(claudeMdPath);
88482
- const home5 = homedir42();
88813
+ const home5 = homedir43();
88483
88814
  const broken = [];
88484
88815
  for (const ref of refs) {
88485
88816
  let refPath;
@@ -88494,7 +88825,7 @@ async function checkPathRefsValid(projectDir) {
88494
88825
  } else if (/^[A-Za-z]:/.test(ref)) {
88495
88826
  refPath = normalize6(ref);
88496
88827
  } else {
88497
- refPath = resolve36(baseDir, ref);
88828
+ refPath = resolve37(baseDir, ref);
88498
88829
  }
88499
88830
  const normalizedPath = normalize6(refPath);
88500
88831
  const isWithinHome = normalizedPath.startsWith(home5);
@@ -89477,19 +89808,19 @@ class AuthChecker {
89477
89808
  }
89478
89809
  }
89479
89810
  // src/domains/health-checks/platform-checker.ts
89480
- import { platform as platform8 } from "node:os";
89811
+ import { platform as platform9 } from "node:os";
89481
89812
 
89482
89813
  // src/domains/health-checks/platform/environment-checker.ts
89483
89814
  init_environment();
89484
89815
  init_path_resolver();
89485
89816
  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 homedir43, platform as platform7 } from "node:os";
89817
+ import { arch as arch2, homedir as homedir44, platform as platform8 } from "node:os";
89487
89818
  import { join as join85, normalize as normalize7 } from "node:path";
89488
89819
  function shouldSkipExpensiveOperations4() {
89489
89820
  return shouldSkipExpensiveOperations();
89490
89821
  }
89491
89822
  async function checkPlatformDetect() {
89492
- const os7 = platform7();
89823
+ const os7 = platform8();
89493
89824
  const architecture = arch2();
89494
89825
  const wslDistro = process.env.WSL_DISTRO_NAME;
89495
89826
  let message = `${os7} (${architecture})`;
@@ -89506,8 +89837,8 @@ async function checkPlatformDetect() {
89506
89837
  };
89507
89838
  }
89508
89839
  async function checkHomeDirResolution() {
89509
- const nodeHome = normalize7(homedir43());
89510
- const rawEnvHome = getHomeDirectoryFromEnv(platform7());
89840
+ const nodeHome = normalize7(homedir44());
89841
+ const rawEnvHome = getHomeDirectoryFromEnv(platform8());
89511
89842
  const envHome = rawEnvHome ? normalize7(rawEnvHome) : "";
89512
89843
  const match = nodeHome === envHome && envHome !== "";
89513
89844
  return {
@@ -89742,7 +90073,7 @@ async function checkSymlinkSupport() {
89742
90073
  }
89743
90074
 
89744
90075
  // src/domains/health-checks/platform-checker.ts
89745
- var IS_WINDOWS = platform8() === "win32";
90076
+ var IS_WINDOWS = platform9() === "win32";
89746
90077
 
89747
90078
  class PlatformChecker {
89748
90079
  group = "platform";
@@ -89955,17 +90286,17 @@ function createDefaultDns() {
89955
90286
  }
89956
90287
  function createDefaultTcp() {
89957
90288
  return {
89958
- connect: ({ host, port, timeoutMs }) => new Promise((resolve37) => {
90289
+ connect: ({ host, port, timeoutMs }) => new Promise((resolve38) => {
89959
90290
  const start = Date.now();
89960
90291
  const socket = net2.createConnection({ host, port });
89961
90292
  const timer = setTimeout(() => {
89962
90293
  socket.destroy();
89963
- resolve37({ ok: false, layer: "tcp", detail: "timeout", latencyMs: Date.now() - start });
90294
+ resolve38({ ok: false, layer: "tcp", detail: "timeout", latencyMs: Date.now() - start });
89964
90295
  }, timeoutMs);
89965
90296
  socket.on("connect", () => {
89966
90297
  clearTimeout(timer);
89967
90298
  socket.destroy();
89968
- resolve37({
90299
+ resolve38({
89969
90300
  ok: true,
89970
90301
  layer: "tcp",
89971
90302
  detail: "connected",
@@ -89974,7 +90305,7 @@ function createDefaultTcp() {
89974
90305
  });
89975
90306
  socket.on("error", (err) => {
89976
90307
  clearTimeout(timer);
89977
- resolve37({
90308
+ resolve38({
89978
90309
  ok: false,
89979
90310
  layer: "tcp",
89980
90311
  detail: err.message,
@@ -89986,11 +90317,11 @@ function createDefaultTcp() {
89986
90317
  }
89987
90318
  function createDefaultTls() {
89988
90319
  return {
89989
- get: (url, timeoutMs) => new Promise((resolve37) => {
90320
+ get: (url, timeoutMs) => new Promise((resolve38) => {
89990
90321
  const start = Date.now();
89991
90322
  const timer = setTimeout(() => {
89992
90323
  req.destroy();
89993
- resolve37({ ok: false, layer: "tls", detail: "timeout", latencyMs: Date.now() - start });
90324
+ resolve38({ ok: false, layer: "tls", detail: "timeout", latencyMs: Date.now() - start });
89994
90325
  }, timeoutMs);
89995
90326
  const req = https.get(url, {
89996
90327
  headers: {
@@ -90002,14 +90333,14 @@ function createDefaultTls() {
90002
90333
  const status = res.statusCode ?? 0;
90003
90334
  const latencyMs = Date.now() - start;
90004
90335
  if (status === 200) {
90005
- resolve37({ ok: true, layer: "tls", detail: `HTTP ${status}`, latencyMs });
90336
+ resolve38({ ok: true, layer: "tls", detail: `HTTP ${status}`, latencyMs });
90006
90337
  } else {
90007
- resolve37({ ok: false, layer: "tls", detail: `HTTP ${status}`, latencyMs });
90338
+ resolve38({ ok: false, layer: "tls", detail: `HTTP ${status}`, latencyMs });
90008
90339
  }
90009
90340
  });
90010
90341
  req.on("error", (err) => {
90011
90342
  clearTimeout(timer);
90012
- resolve37({
90343
+ resolve38({
90013
90344
  ok: false,
90014
90345
  layer: "tls",
90015
90346
  detail: err.message,
@@ -90130,11 +90461,11 @@ async function checkGitHubReachability(deps) {
90130
90461
  };
90131
90462
  }
90132
90463
  function raceTimeout(promise, ms) {
90133
- return new Promise((resolve37, reject) => {
90464
+ return new Promise((resolve38, reject) => {
90134
90465
  const timer = setTimeout(() => reject(new Error(`timeout after ${ms}ms`)), ms);
90135
90466
  promise.then((v2) => {
90136
90467
  clearTimeout(timer);
90137
- resolve37(v2);
90468
+ resolve38(v2);
90138
90469
  }, (e2) => {
90139
90470
  clearTimeout(timer);
90140
90471
  reject(e2);
@@ -90507,7 +90838,7 @@ class ReportGenerator {
90507
90838
  }
90508
90839
  // src/domains/health-checks/doctor-ui-renderer.ts
90509
90840
  init_terminal_utils();
90510
- var import_picocolors15 = __toESM(require_picocolors(), 1);
90841
+ var import_picocolors16 = __toESM(require_picocolors(), 1);
90511
90842
 
90512
90843
  class DoctorUIRenderer {
90513
90844
  symbols = getStatusSymbols();
@@ -90519,8 +90850,8 @@ class DoctorUIRenderer {
90519
90850
  const groups = this.groupChecks(summary.checks);
90520
90851
  for (const [groupName, checks] of groups) {
90521
90852
  console.log("│");
90522
- console.log(`│ ${import_picocolors15.default.bold(import_picocolors15.default.cyan(groupName.toUpperCase()))}`);
90523
- console.log(`│ ${import_picocolors15.default.dim("─".repeat(50))}`);
90853
+ console.log(`│ ${import_picocolors16.default.bold(import_picocolors16.default.cyan(groupName.toUpperCase()))}`);
90854
+ console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
90524
90855
  const maxNameLen = Math.max(...checks.map((c2) => c2.name.length));
90525
90856
  const maxMsgLen = Math.max(...checks.map((c2) => c2.message.length));
90526
90857
  for (const check of checks) {
@@ -90532,55 +90863,55 @@ class DoctorUIRenderer {
90532
90863
  }
90533
90864
  renderCheck(check, maxNameLen, maxMsgLen) {
90534
90865
  const symbol = this.getColoredSymbol(check.status);
90535
- const name = import_picocolors15.default.bold(check.name.padEnd(maxNameLen));
90866
+ const name = import_picocolors16.default.bold(check.name.padEnd(maxNameLen));
90536
90867
  const paddedMsg = check.message.padEnd(maxMsgLen);
90537
90868
  const value = this.colorizeValue(check.status, paddedMsg);
90538
90869
  if (this.verbose && check.command) {
90539
- console.log(`│ ${import_picocolors15.default.dim(`Running: ${check.command}`)}`);
90870
+ console.log(`│ ${import_picocolors16.default.dim(`Running: ${check.command}`)}`);
90540
90871
  }
90541
90872
  let line = `│ ${symbol} ${name} ${value}`;
90542
90873
  if (this.verbose && check.duration !== undefined) {
90543
- line += ` ${import_picocolors15.default.dim(`(${check.duration}ms)`)}`;
90874
+ line += ` ${import_picocolors16.default.dim(`(${check.duration}ms)`)}`;
90544
90875
  }
90545
90876
  if (check.details) {
90546
90877
  const displayPath = this.verbose ? check.details : this.shortenPath(check.details);
90547
- line += ` ${import_picocolors15.default.dim(displayPath)}`;
90878
+ line += ` ${import_picocolors16.default.dim(displayPath)}`;
90548
90879
  }
90549
90880
  console.log(line);
90550
90881
  if (this.verbose && check.status === "pass" && check.suggestion) {
90551
90882
  const indent = " ".repeat(maxNameLen + 5);
90552
- console.log(`│ ${indent}${import_picocolors15.default.dim(`→ ${check.suggestion}`)}`);
90883
+ console.log(`│ ${indent}${import_picocolors16.default.dim(`→ ${check.suggestion}`)}`);
90553
90884
  }
90554
90885
  if (check.status !== "pass" && check.suggestion) {
90555
90886
  const indent = " ".repeat(maxNameLen + 5);
90556
- console.log(`│ ${indent}${import_picocolors15.default.dim(`→ ${check.suggestion}`)}`);
90887
+ console.log(`│ ${indent}${import_picocolors16.default.dim(`→ ${check.suggestion}`)}`);
90557
90888
  }
90558
90889
  }
90559
90890
  getColoredSymbol(status) {
90560
90891
  switch (status) {
90561
90892
  case "pass":
90562
- return import_picocolors15.default.green(this.symbols.pass);
90893
+ return import_picocolors16.default.green(this.symbols.pass);
90563
90894
  case "warn":
90564
- return import_picocolors15.default.yellow(this.symbols.warn);
90895
+ return import_picocolors16.default.yellow(this.symbols.warn);
90565
90896
  case "fail":
90566
- return import_picocolors15.default.red(this.symbols.fail);
90897
+ return import_picocolors16.default.red(this.symbols.fail);
90567
90898
  default:
90568
- return import_picocolors15.default.blue(this.symbols.info);
90899
+ return import_picocolors16.default.blue(this.symbols.info);
90569
90900
  }
90570
90901
  }
90571
90902
  renderHealingSummary(healSummary) {
90572
90903
  console.log("│");
90573
- console.log(`│ ${import_picocolors15.default.bold(import_picocolors15.default.cyan("AUTO-HEAL RESULTS"))}`);
90574
- console.log(`│ ${import_picocolors15.default.dim("─".repeat(50))}`);
90904
+ console.log(`│ ${import_picocolors16.default.bold(import_picocolors16.default.cyan("AUTO-HEAL RESULTS"))}`);
90905
+ console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
90575
90906
  for (const fix of healSummary.fixes) {
90576
- const symbol = fix.success ? import_picocolors15.default.green(this.symbols.pass) : import_picocolors15.default.red(this.symbols.fail);
90577
- console.log(`│ ${symbol} ${import_picocolors15.default.bold(fix.checkName)} ${import_picocolors15.default.dim(fix.message)}`);
90907
+ const symbol = fix.success ? import_picocolors16.default.green(this.symbols.pass) : import_picocolors16.default.red(this.symbols.fail);
90908
+ console.log(`│ ${symbol} ${import_picocolors16.default.bold(fix.checkName)} ${import_picocolors16.default.dim(fix.message)}`);
90578
90909
  if (!fix.success && fix.error) {
90579
- console.log(`│ ${import_picocolors15.default.red(`Error: ${fix.error}`)}`);
90910
+ console.log(`│ ${import_picocolors16.default.red(`Error: ${fix.error}`)}`);
90580
90911
  }
90581
90912
  }
90582
90913
  console.log("│");
90583
- console.log(`│ Fixed: ${import_picocolors15.default.green(String(healSummary.succeeded))}, Failed: ${import_picocolors15.default.red(String(healSummary.failed))}`);
90914
+ console.log(`│ Fixed: ${import_picocolors16.default.green(String(healSummary.succeeded))}, Failed: ${import_picocolors16.default.red(String(healSummary.failed))}`);
90584
90915
  }
90585
90916
  groupChecks(checks) {
90586
90917
  const groups = new Map;
@@ -90594,11 +90925,11 @@ class DoctorUIRenderer {
90594
90925
  colorizeValue(status, message) {
90595
90926
  switch (status) {
90596
90927
  case "pass":
90597
- return import_picocolors15.default.green(message);
90928
+ return import_picocolors16.default.green(message);
90598
90929
  case "warn":
90599
- return import_picocolors15.default.yellow(message);
90930
+ return import_picocolors16.default.yellow(message);
90600
90931
  case "fail":
90601
- return import_picocolors15.default.red(message);
90932
+ return import_picocolors16.default.red(message);
90602
90933
  default:
90603
90934
  return message;
90604
90935
  }
@@ -90617,23 +90948,23 @@ class DoctorUIRenderer {
90617
90948
  renderSummaryLine(summary) {
90618
90949
  const parts = [];
90619
90950
  if (summary.passed > 0) {
90620
- parts.push(import_picocolors15.default.green(`${summary.passed} ${this.symbols.pass}`));
90951
+ parts.push(import_picocolors16.default.green(`${summary.passed} ${this.symbols.pass}`));
90621
90952
  }
90622
90953
  if (summary.warnings > 0) {
90623
- parts.push(import_picocolors15.default.yellow(`${summary.warnings} ${this.symbols.warn}`));
90954
+ parts.push(import_picocolors16.default.yellow(`${summary.warnings} ${this.symbols.warn}`));
90624
90955
  }
90625
90956
  if (summary.failed > 0) {
90626
- parts.push(import_picocolors15.default.red(`${summary.failed} ${this.symbols.fail}`));
90957
+ parts.push(import_picocolors16.default.red(`${summary.failed} ${this.symbols.fail}`));
90627
90958
  }
90628
- console.log(`│ ${import_picocolors15.default.dim("─".repeat(50))}`);
90959
+ console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
90629
90960
  console.log(`│ Summary: ${parts.join(" ")}`);
90630
90961
  console.log("│");
90631
- console.log(`│ ${import_picocolors15.default.dim("Quick Commands:")}`);
90632
- console.log(`│ ${import_picocolors15.default.dim(" ck init Install/update ClaudeKit in project")}`);
90633
- console.log(`│ ${import_picocolors15.default.dim(" ck init -g Install/update ClaudeKit globally")}`);
90634
- console.log(`│ ${import_picocolors15.default.dim(" ck update Update the CLI tool")}`);
90635
- console.log(`│ ${import_picocolors15.default.dim(" ck uninstall Remove ClaudeKit from project/global")}`);
90636
- console.log(`│ ${import_picocolors15.default.dim(" ck --help Show all commands")}`);
90962
+ console.log(`│ ${import_picocolors16.default.dim("Quick Commands:")}`);
90963
+ console.log(`│ ${import_picocolors16.default.dim(" ck init Install/update ClaudeKit in project")}`);
90964
+ console.log(`│ ${import_picocolors16.default.dim(" ck init -g Install/update ClaudeKit globally")}`);
90965
+ console.log(`│ ${import_picocolors16.default.dim(" ck update Update the CLI tool")}`);
90966
+ console.log(`│ ${import_picocolors16.default.dim(" ck uninstall Remove ClaudeKit from project/global")}`);
90967
+ console.log(`│ ${import_picocolors16.default.dim(" ck --help Show all commands")}`);
90637
90968
  }
90638
90969
  }
90639
90970
  // src/commands/doctor.ts
@@ -90733,33 +91064,33 @@ function createDoctorRunner(options2) {
90733
91064
  // src/commands/easter-egg.ts
90734
91065
  init_logger();
90735
91066
  init_safe_prompts();
90736
- var import_picocolors16 = __toESM(require_picocolors(), 1);
91067
+ var import_picocolors17 = __toESM(require_picocolors(), 1);
90737
91068
  var API_URL = "https://claudekit.cc/api/egg";
90738
91069
  function getRarityColor(rarity) {
90739
91070
  switch (rarity) {
90740
91071
  case "Legendary":
90741
- return import_picocolors16.default.magenta;
91072
+ return import_picocolors17.default.magenta;
90742
91073
  case "Epic":
90743
- return import_picocolors16.default.yellow;
91074
+ return import_picocolors17.default.yellow;
90744
91075
  case "Rare":
90745
- return import_picocolors16.default.blue;
91076
+ return import_picocolors17.default.blue;
90746
91077
  case "Uncommon":
90747
- return import_picocolors16.default.green;
91078
+ return import_picocolors17.default.green;
90748
91079
  default:
90749
- return import_picocolors16.default.gray;
91080
+ return import_picocolors17.default.gray;
90750
91081
  }
90751
91082
  }
90752
91083
  async function easterEggCommand() {
90753
91084
  intro("\uD83E\uDD5A Code Hunt 2025 - Easter Egg");
90754
91085
  try {
90755
- console.log(import_picocolors16.default.dim(`
91086
+ console.log(import_picocolors17.default.dim(`
90756
91087
  Rolling for a discount code...
90757
91088
  `));
90758
91089
  const response = await fetch(API_URL);
90759
91090
  if (!response.ok) {
90760
91091
  if (response.status === 429) {
90761
- console.log(import_picocolors16.default.yellow(" \uD83D\uDC30 Slow down! The eggs aren't going anywhere."));
90762
- console.log(import_picocolors16.default.dim(` Wait a minute and try again.
91092
+ console.log(import_picocolors17.default.yellow(" \uD83D\uDC30 Slow down! The eggs aren't going anywhere."));
91093
+ console.log(import_picocolors17.default.dim(` Wait a minute and try again.
90763
91094
  `));
90764
91095
  outro("\uD83E\uDD5A Rate limited");
90765
91096
  return;
@@ -90768,22 +91099,22 @@ async function easterEggCommand() {
90768
91099
  }
90769
91100
  const data = await response.json();
90770
91101
  const rarityColor = getRarityColor(data.rarity);
90771
- console.log(` ✨ ${import_picocolors16.default.bold(data.message)}`);
91102
+ console.log(` ✨ ${import_picocolors17.default.bold(data.message)}`);
90772
91103
  console.log();
90773
- console.log(` ${import_picocolors16.default.bold("Code:")} ${import_picocolors16.default.green(import_picocolors16.default.bold(data.code))}`);
90774
- console.log(` ${import_picocolors16.default.bold("Discount:")} ${import_picocolors16.default.cyan(data.discount)} off`);
90775
- console.log(` ${import_picocolors16.default.bold("Rarity:")} ${rarityColor(data.rarity)}`);
90776
- console.log(` ${import_picocolors16.default.bold("Hint:")} ${import_picocolors16.default.dim(data.hint)}`);
91104
+ console.log(` ${import_picocolors17.default.bold("Code:")} ${import_picocolors17.default.green(import_picocolors17.default.bold(data.code))}`);
91105
+ console.log(` ${import_picocolors17.default.bold("Discount:")} ${import_picocolors17.default.cyan(data.discount)} off`);
91106
+ console.log(` ${import_picocolors17.default.bold("Rarity:")} ${rarityColor(data.rarity)}`);
91107
+ console.log(` ${import_picocolors17.default.bold("Hint:")} ${import_picocolors17.default.dim(data.hint)}`);
90777
91108
  console.log();
90778
- console.log(` ${import_picocolors16.default.dim("Redeem at:")} ${import_picocolors16.default.underline(data.checkout)}`);
90779
- console.log(` ${import_picocolors16.default.dim("Expires:")} ${data.expires.split("T")[0]}`);
91109
+ console.log(` ${import_picocolors17.default.dim("Redeem at:")} ${import_picocolors17.default.underline(data.checkout)}`);
91110
+ console.log(` ${import_picocolors17.default.dim("Expires:")} ${data.expires.split("T")[0]}`);
90780
91111
  console.log();
90781
91112
  outro("\uD83C\uDF84 Happy Holidays from ClaudeKit!");
90782
91113
  } catch (error) {
90783
91114
  logger.error(error instanceof Error ? error.message : "Failed to fetch easter egg");
90784
- console.log(import_picocolors16.default.red(`
91115
+ console.log(import_picocolors17.default.red(`
90785
91116
  Failed to connect to the egg API.`));
90786
- console.log(import_picocolors16.default.dim(` Make sure you have internet access.
91117
+ console.log(import_picocolors17.default.dim(` Make sure you have internet access.
90787
91118
  `));
90788
91119
  process.exit(1);
90789
91120
  }
@@ -92318,7 +92649,7 @@ function filterDeletionPaths(trackedFiles, deletions, kitType) {
92318
92649
  }
92319
92650
  // src/domains/sync/merge-ui.ts
92320
92651
  init_dist2();
92321
- var import_picocolors17 = __toESM(require_picocolors(), 1);
92652
+ var import_picocolors18 = __toESM(require_picocolors(), 1);
92322
92653
  var HUNK_SEPARATOR_WIDTH = 50;
92323
92654
  var EXTENDED_CONTEXT_LINES = 10;
92324
92655
  var MAX_LINE_DISPLAY_LENGTH = 120;
@@ -92337,21 +92668,21 @@ class MergeUI {
92337
92668
  static async promptHunk(hunk, hunkIndex, totalHunks, _filename) {
92338
92669
  requireTTY();
92339
92670
  const lineRange = `${hunk.oldStart}-${hunk.oldStart + hunk.oldLines - 1}`;
92340
- console.log(import_picocolors17.default.cyan(`
92671
+ console.log(import_picocolors18.default.cyan(`
92341
92672
  Hunk ${hunkIndex + 1}/${totalHunks}: Lines ${lineRange}`));
92342
- console.log(import_picocolors17.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92673
+ console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92343
92674
  for (const line of hunk.lines) {
92344
92675
  const displayLine = truncateLine(line);
92345
92676
  const prefix = line[0];
92346
92677
  if (prefix === "+") {
92347
- console.log(import_picocolors17.default.green(displayLine));
92678
+ console.log(import_picocolors18.default.green(displayLine));
92348
92679
  } else if (prefix === "-") {
92349
- console.log(import_picocolors17.default.red(displayLine));
92680
+ console.log(import_picocolors18.default.red(displayLine));
92350
92681
  } else {
92351
- console.log(import_picocolors17.default.dim(displayLine));
92682
+ console.log(import_picocolors18.default.dim(displayLine));
92352
92683
  }
92353
92684
  }
92354
- console.log(import_picocolors17.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92685
+ console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92355
92686
  const action = await ie({
92356
92687
  message: "Action?",
92357
92688
  options: [
@@ -92371,21 +92702,21 @@ Hunk ${hunkIndex + 1}/${totalHunks}: Lines ${lineRange}`));
92371
92702
  `);
92372
92703
  const startLine = Math.max(0, hunk.oldStart - 1 - contextLines);
92373
92704
  const endLine = Math.min(lines.length, hunk.oldStart + hunk.oldLines - 1 + contextLines);
92374
- console.log(import_picocolors17.default.cyan(`
92705
+ console.log(import_picocolors18.default.cyan(`
92375
92706
  Extended context (lines ${startLine + 1}-${endLine}):`));
92376
- console.log(import_picocolors17.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92707
+ console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92377
92708
  for (let i = startLine;i < endLine; i++) {
92378
92709
  const lineNum = String(i + 1).padStart(4, " ");
92379
92710
  const isInHunk = i >= hunk.oldStart - 1 && i < hunk.oldStart - 1 + hunk.oldLines;
92380
- const prefix = isInHunk ? import_picocolors17.default.yellow("*") : " ";
92381
- console.log(`${import_picocolors17.default.dim(lineNum)} ${prefix} ${lines[i]}`);
92711
+ const prefix = isInHunk ? import_picocolors18.default.yellow("*") : " ";
92712
+ console.log(`${import_picocolors18.default.dim(lineNum)} ${prefix} ${lines[i]}`);
92382
92713
  }
92383
- console.log(import_picocolors17.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92714
+ console.log(import_picocolors18.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
92384
92715
  }
92385
92716
  static async mergeFile(filename, currentContent, _newContent, hunks) {
92386
- console.log(import_picocolors17.default.bold(`
92717
+ console.log(import_picocolors18.default.bold(`
92387
92718
  ━━━ ${filename} ━━━`));
92388
- console.log(import_picocolors17.default.dim(`${hunks.length} change${hunks.length === 1 ? "" : "s"} to review
92719
+ console.log(import_picocolors18.default.dim(`${hunks.length} change${hunks.length === 1 ? "" : "s"} to review
92389
92720
  `));
92390
92721
  const decisions = [];
92391
92722
  for (let i = 0;i < hunks.length; i++) {
@@ -92408,19 +92739,19 @@ Extended context (lines ${startLine + 1}-${endLine}):`));
92408
92739
  }
92409
92740
  static displayMergeSummary(filename, applied, rejected) {
92410
92741
  if (applied > 0 && rejected > 0) {
92411
- console.log(import_picocolors17.default.dim(` ${filename}: `) + import_picocolors17.default.green(`${applied} applied`) + import_picocolors17.default.dim(", ") + import_picocolors17.default.yellow(`${rejected} rejected`));
92742
+ console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.green(`${applied} applied`) + import_picocolors18.default.dim(", ") + import_picocolors18.default.yellow(`${rejected} rejected`));
92412
92743
  } else if (applied > 0) {
92413
- console.log(import_picocolors17.default.dim(` ${filename}: `) + import_picocolors17.default.green(`${applied} applied`));
92744
+ console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.green(`${applied} applied`));
92414
92745
  } else {
92415
- console.log(import_picocolors17.default.dim(` ${filename}: `) + import_picocolors17.default.yellow(`${rejected} rejected`));
92746
+ console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.yellow(`${rejected} rejected`));
92416
92747
  }
92417
92748
  }
92418
92749
  static displaySkipped(filename) {
92419
- console.log(import_picocolors17.default.dim(` ${filename}: `) + import_picocolors17.default.yellow("skipped"));
92750
+ console.log(import_picocolors18.default.dim(` ${filename}: `) + import_picocolors18.default.yellow("skipped"));
92420
92751
  }
92421
92752
  }
92422
92753
  // src/domains/sync/notification-display.ts
92423
- var import_picocolors18 = __toESM(require_picocolors(), 1);
92754
+ var import_picocolors19 = __toESM(require_picocolors(), 1);
92424
92755
  import { stdout } from "node:process";
92425
92756
  function createNotificationBox(borderColor, boxWidth) {
92426
92757
  const contentWidth = boxWidth - 2;
@@ -92443,13 +92774,13 @@ function displayConfigUpdateNotification(currentVersion, latestVersion, isGlobal
92443
92774
  const displayLatest = latestVersion.replace(/^v/, "");
92444
92775
  const terminalWidth = stdout.columns || 80;
92445
92776
  const boxWidth = Math.min(52, terminalWidth - 4);
92446
- const { topBorder, bottomBorder, emptyLine, padLine } = createNotificationBox(import_picocolors18.default.cyan, boxWidth);
92447
- const headerText = import_picocolors18.default.bold(import_picocolors18.default.yellow("\uD83D\uDCE6 Config Updates Available"));
92777
+ const { topBorder, bottomBorder, emptyLine, padLine } = createNotificationBox(import_picocolors19.default.cyan, boxWidth);
92778
+ const headerText = import_picocolors19.default.bold(import_picocolors19.default.yellow("\uD83D\uDCE6 Config Updates Available"));
92448
92779
  const headerLen = "\uD83D\uDCE6 Config Updates Available".length;
92449
- const versionText = `${import_picocolors18.default.dim(displayCurrent)} ${import_picocolors18.default.white("→")} ${import_picocolors18.default.green(import_picocolors18.default.bold(displayLatest))}`;
92780
+ const versionText = `${import_picocolors19.default.dim(displayCurrent)} ${import_picocolors19.default.white("→")} ${import_picocolors19.default.green(import_picocolors19.default.bold(displayLatest))}`;
92450
92781
  const versionLen = displayCurrent.length + 3 + displayLatest.length;
92451
92782
  const updateCmd = isGlobal ? "ck init -g --sync" : "ck init --sync";
92452
- const commandText = `Run: ${import_picocolors18.default.cyan(import_picocolors18.default.bold(updateCmd))}`;
92783
+ const commandText = `Run: ${import_picocolors19.default.cyan(import_picocolors19.default.bold(updateCmd))}`;
92453
92784
  const commandLen = `Run: ${updateCmd}`.length;
92454
92785
  console.log("");
92455
92786
  console.log(topBorder);
@@ -92564,7 +92895,7 @@ async function getDirectory(defaultDir = ".") {
92564
92895
  init_github_client();
92565
92896
  init_logger();
92566
92897
  init_dist2();
92567
- var import_picocolors21 = __toESM(require_picocolors(), 1);
92898
+ var import_picocolors22 = __toESM(require_picocolors(), 1);
92568
92899
 
92569
92900
  // src/domains/versioning/selection/version-filter.ts
92570
92901
  var VERSION_PATTERN = /^v?\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/;
@@ -92582,36 +92913,36 @@ function normalizeVersionTag(version) {
92582
92913
  init_environment();
92583
92914
  init_logger();
92584
92915
  init_dist2();
92585
- var import_picocolors20 = __toESM(require_picocolors(), 1);
92916
+ var import_picocolors21 = __toESM(require_picocolors(), 1);
92586
92917
 
92587
92918
  // src/domains/versioning/version-display.ts
92588
- var import_picocolors19 = __toESM(require_picocolors(), 1);
92919
+ var import_picocolors20 = __toESM(require_picocolors(), 1);
92589
92920
 
92590
92921
  class VersionDisplayFormatter {
92591
92922
  static createBadges(release) {
92592
92923
  const badges = [];
92593
92924
  if (release.isLatestStable) {
92594
- badges.push(import_picocolors19.default.bold(import_picocolors19.default.yellow("[latest]")));
92925
+ badges.push(import_picocolors20.default.bold(import_picocolors20.default.yellow("[latest]")));
92595
92926
  }
92596
92927
  if (release.prerelease || release.isLatestBeta) {
92597
92928
  if (release.isLatestBeta) {
92598
- badges.push(import_picocolors19.default.bold(import_picocolors19.default.magenta("[beta]")));
92929
+ badges.push(import_picocolors20.default.bold(import_picocolors20.default.magenta("[beta]")));
92599
92930
  } else {
92600
- badges.push(import_picocolors19.default.magenta("[prerelease]"));
92931
+ badges.push(import_picocolors20.default.magenta("[prerelease]"));
92601
92932
  }
92602
92933
  } else if (!release.draft) {
92603
- badges.push(import_picocolors19.default.blue("[stable]"));
92934
+ badges.push(import_picocolors20.default.blue("[stable]"));
92604
92935
  }
92605
92936
  if (release.draft) {
92606
- badges.push(import_picocolors19.default.gray("[draft]"));
92937
+ badges.push(import_picocolors20.default.gray("[draft]"));
92607
92938
  }
92608
92939
  return badges.length > 0 ? ` ${badges.join(" ")}` : "";
92609
92940
  }
92610
92941
  static formatChoiceLabel(release) {
92611
- const version = import_picocolors19.default.green(release.displayVersion);
92942
+ const version = import_picocolors20.default.green(release.displayVersion);
92612
92943
  const badges = VersionDisplayFormatter.createBadges(release);
92613
92944
  const name = release.name || "Release";
92614
- return `${version}${badges} ${import_picocolors19.default.dim(name)}`;
92945
+ return `${version}${badges} ${import_picocolors20.default.dim(name)}`;
92615
92946
  }
92616
92947
  static formatChoiceHint(release) {
92617
92948
  const parts = [];
@@ -92633,7 +92964,7 @@ class VersionDisplayFormatter {
92633
92964
  if (latestStable) {
92634
92965
  options2.push({
92635
92966
  value: latestStable.tag_name,
92636
- label: `${import_picocolors19.default.bold(import_picocolors19.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
92967
+ label: `${import_picocolors20.default.bold(import_picocolors20.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
92637
92968
  hint: "recommended version",
92638
92969
  isLatest: true,
92639
92970
  isPrerelease: false
@@ -92643,7 +92974,7 @@ class VersionDisplayFormatter {
92643
92974
  if (latestBeta) {
92644
92975
  options2.push({
92645
92976
  value: latestBeta.tag_name,
92646
- label: `${import_picocolors19.default.bold(import_picocolors19.default.magenta("Latest Beta"))} (${latestBeta.displayVersion})`,
92977
+ label: `${import_picocolors20.default.bold(import_picocolors20.default.magenta("Latest Beta"))} (${latestBeta.displayVersion})`,
92647
92978
  hint: "latest features, may be unstable",
92648
92979
  isLatest: false,
92649
92980
  isPrerelease: true
@@ -92654,7 +92985,7 @@ class VersionDisplayFormatter {
92654
92985
  static createSeparator() {
92655
92986
  return {
92656
92987
  value: "separator",
92657
- label: import_picocolors19.default.dim("─".repeat(50)),
92988
+ label: import_picocolors20.default.dim("─".repeat(50)),
92658
92989
  hint: undefined,
92659
92990
  isLatest: false,
92660
92991
  isPrerelease: false
@@ -92663,7 +92994,7 @@ class VersionDisplayFormatter {
92663
92994
  static createCancelOption() {
92664
92995
  return {
92665
92996
  value: "cancel",
92666
- label: import_picocolors19.default.red("Cancel"),
92997
+ label: import_picocolors20.default.red("Cancel"),
92667
92998
  hint: "exit version selection",
92668
92999
  isLatest: false,
92669
93000
  isPrerelease: false
@@ -92715,15 +93046,15 @@ class VersionDisplayFormatter {
92715
93046
  return value !== "separator" && value !== "cancel" && value.trim().length > 0;
92716
93047
  }
92717
93048
  static formatError(message, suggestion) {
92718
- let output2 = import_picocolors19.default.red(`Error: ${message}`);
93049
+ let output2 = import_picocolors20.default.red(`Error: ${message}`);
92719
93050
  if (suggestion) {
92720
93051
  output2 += `
92721
- ${import_picocolors19.default.dim(suggestion)}`;
93052
+ ${import_picocolors20.default.dim(suggestion)}`;
92722
93053
  }
92723
93054
  return output2;
92724
93055
  }
92725
93056
  static formatSuccess(version, kitName) {
92726
- return `${import_picocolors19.default.green("✓")} Selected ${import_picocolors19.default.bold(version)} for ${import_picocolors19.default.bold(kitName)}`;
93057
+ return `${import_picocolors20.default.green("✓")} Selected ${import_picocolors20.default.bold(version)} for ${import_picocolors20.default.bold(kitName)}`;
92727
93058
  }
92728
93059
  }
92729
93060
 
@@ -92733,7 +93064,7 @@ async function handleNoReleases(kit, allowManualEntry) {
92733
93064
  This could be due to:
92734
93065
  • No releases published yet
92735
93066
  • Network connectivity issues
92736
- • Repository access permissions`, import_picocolors20.default.yellow("No Releases Available"));
93067
+ • Repository access permissions`, import_picocolors21.default.yellow("No Releases Available"));
92737
93068
  if (!allowManualEntry) {
92738
93069
  throw new Error(`No releases available for ${kit.name}`);
92739
93070
  }
@@ -92793,34 +93124,34 @@ async function createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry
92793
93124
  if (latestStable) {
92794
93125
  clackChoices.push({
92795
93126
  value: latestStable.tag_name,
92796
- label: `${import_picocolors20.default.bold(import_picocolors20.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
93127
+ label: `${import_picocolors21.default.bold(import_picocolors21.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
92797
93128
  hint: "recommended"
92798
93129
  });
92799
93130
  }
92800
93131
  if (allowManualEntry) {
92801
93132
  clackChoices.push({
92802
93133
  value: "manual-entry",
92803
- label: import_picocolors20.default.cyan("↳ Enter Version Manually"),
93134
+ label: import_picocolors21.default.cyan("↳ Enter Version Manually"),
92804
93135
  hint: "for older versions"
92805
93136
  });
92806
93137
  }
92807
93138
  clackChoices.push({
92808
93139
  value: "cancel",
92809
- label: import_picocolors20.default.red("✕ Cancel")
93140
+ label: import_picocolors21.default.red("✕ Cancel")
92810
93141
  });
92811
93142
  const versionChoices = choices.filter((choice) => choice.value !== "separator" && choice.value !== "cancel");
92812
93143
  for (const choice of versionChoices) {
92813
93144
  const isCurrentlyInstalled = currentVersion && (choice.value === currentVersion || choice.value === `v${currentVersion}`);
92814
- const installedMarker = isCurrentlyInstalled ? import_picocolors20.default.cyan(" (installed)") : "";
93145
+ const installedMarker = isCurrentlyInstalled ? import_picocolors21.default.cyan(" (installed)") : "";
92815
93146
  clackChoices.push({
92816
93147
  value: choice.value,
92817
93148
  label: `${choice.label}${installedMarker}`,
92818
93149
  hint: choice.hint
92819
93150
  });
92820
93151
  }
92821
- const currentVersionHint = currentVersion ? import_picocolors20.default.dim(` (current: ${currentVersion})`) : "";
93152
+ const currentVersionHint = currentVersion ? import_picocolors21.default.dim(` (current: ${currentVersion})`) : "";
92822
93153
  const selected = await ie({
92823
- message: `Select version for ${import_picocolors20.default.bold(kit.name)}${currentVersionHint}:`,
93154
+ message: `Select version for ${import_picocolors21.default.bold(kit.name)}${currentVersionHint}:`,
92824
93155
  options: clackChoices,
92825
93156
  initialValue: latestStable?.tag_name
92826
93157
  });
@@ -92845,15 +93176,15 @@ async function createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry
92845
93176
  async function handleSelectionError(error, kit, allowManualEntry, retryCallback) {
92846
93177
  logger.error(`Version selection error: ${error.message}`);
92847
93178
  if (error.message.includes("401") || error.message.includes("403")) {
92848
- le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: ck auth"), import_picocolors20.default.red("Authentication Error"));
93179
+ le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: ck auth"), import_picocolors21.default.red("Authentication Error"));
92849
93180
  } else if (error.message.includes("404")) {
92850
- le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"), import_picocolors20.default.red("Access Error"));
93181
+ le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"), import_picocolors21.default.red("Access Error"));
92851
93182
  } 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"), import_picocolors20.default.yellow("Rate Limited"));
93183
+ le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"), import_picocolors21.default.yellow("Rate Limited"));
92853
93184
  } else if (error.message.includes("network") || error.message.includes("ENOTFOUND")) {
92854
- le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"), import_picocolors20.default.yellow("Network Error"));
93185
+ le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"), import_picocolors21.default.yellow("Network Error"));
92855
93186
  } else {
92856
- le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"), import_picocolors20.default.red("Error"));
93187
+ le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"), import_picocolors21.default.red("Error"));
92857
93188
  }
92858
93189
  if (isNonInteractive()) {
92859
93190
  logger.warning("Non-interactive mode: version selection failed, cannot retry");
@@ -92903,7 +93234,7 @@ class VersionSelector {
92903
93234
  } = options2;
92904
93235
  try {
92905
93236
  const loadingSpinner = de();
92906
- loadingSpinner.start(`Fetching versions for ${import_picocolors21.default.bold(kit.name)}...`);
93237
+ loadingSpinner.start(`Fetching versions for ${import_picocolors22.default.bold(kit.name)}...`);
92907
93238
  const releases = await this.githubClient.listReleasesWithCache(kit, {
92908
93239
  limit: limit * 2,
92909
93240
  includePrereleases,
@@ -93051,7 +93382,7 @@ async function promptFreshConfirmation(targetPath, analysis) {
93051
93382
  // src/domains/ui/prompts/confirmation-prompts.ts
93052
93383
  init_output_manager();
93053
93384
  init_safe_prompts();
93054
- import { platform as platform9 } from "node:os";
93385
+ import { platform as platform10 } from "node:os";
93055
93386
 
93056
93387
  // src/types/skills-dependencies.ts
93057
93388
  var SKILLS_DEPENDENCIES = {
@@ -93116,7 +93447,7 @@ async function promptSkillsInstallation() {
93116
93447
  if (output.isJson()) {
93117
93448
  return false;
93118
93449
  }
93119
- const isWindows3 = platform9() === "win32";
93450
+ const isWindows3 = platform10() === "win32";
93120
93451
  const pythonDeps = formatDependencyList(SKILLS_DEPENDENCIES.python);
93121
93452
  const systemDeps = formatDependencyList(SKILLS_DEPENDENCIES.system);
93122
93453
  const nodeDeps = formatDependencyList(SKILLS_DEPENDENCIES.node);
@@ -93337,12 +93668,12 @@ import * as path15 from "node:path";
93337
93668
  // src/domains/github/auth-prompt.ts
93338
93669
  init_dist2();
93339
93670
  init_github_auth();
93340
- var import_picocolors22 = __toESM(require_picocolors(), 1);
93671
+ var import_picocolors23 = __toESM(require_picocolors(), 1);
93341
93672
  async function promptForAuth() {
93342
93673
  const hasGit = GitCloneManager.isGitInstalled();
93343
93674
  const hasSshKeys = hasGit && GitCloneManager.hasSshKeys();
93344
93675
  const hasGhCli = AuthManager.isGhCliInstalled();
93345
- oe(import_picocolors22.default.yellow("No GitHub authentication found"));
93676
+ oe(import_picocolors23.default.yellow("No GitHub authentication found"));
93346
93677
  const options2 = [];
93347
93678
  if (hasGit) {
93348
93679
  const hint = hasSshKeys ? "SSH keys detected" : "Will use HTTPS";
@@ -93395,7 +93726,7 @@ async function promptForAuth() {
93395
93726
  return { method: "cancel" };
93396
93727
  }
93397
93728
  if (typeof token === "string" && token.startsWith("github_pat_")) {
93398
- le(import_picocolors22.default.yellow(`⚠️ Fine-grained PATs cannot access repos where you're a collaborator.
93729
+ le(import_picocolors23.default.yellow(`⚠️ Fine-grained PATs cannot access repos where you're a collaborator.
93399
93730
  ` + " If you encounter access issues, use a Classic PAT instead."));
93400
93731
  }
93401
93732
  return { method: "token", token };
@@ -93437,7 +93768,7 @@ import { join as join97 } from "node:path";
93437
93768
  // src/shared/progress-bar.ts
93438
93769
  init_output_manager();
93439
93770
  init_terminal_utils();
93440
- var import_picocolors23 = __toESM(require_picocolors(), 1);
93771
+ var import_picocolors24 = __toESM(require_picocolors(), 1);
93441
93772
  var BAR_CHARS = {
93442
93773
  unicode: { filled: "█", empty: "░" },
93443
93774
  ascii: { filled: "=", empty: "-" }
@@ -93495,7 +93826,7 @@ class ProgressBar {
93495
93826
  this.clearLine();
93496
93827
  if (message) {
93497
93828
  const symbols = output.getSymbols();
93498
- console.log(`${import_picocolors23.default.green(symbols.success)} ${message}`);
93829
+ console.log(`${import_picocolors24.default.green(symbols.success)} ${message}`);
93499
93830
  }
93500
93831
  }
93501
93832
  clearLine() {
@@ -93597,10 +93928,10 @@ init_types3();
93597
93928
  // src/domains/installation/utils/path-security.ts
93598
93929
  init_types3();
93599
93930
  import { lstatSync as lstatSync2, realpathSync as realpathSync4 } from "node:fs";
93600
- import { relative as relative19, resolve as resolve39 } from "node:path";
93931
+ import { relative as relative19, resolve as resolve40 } from "node:path";
93601
93932
  var MAX_EXTRACTION_SIZE = 500 * 1024 * 1024;
93602
93933
  function isPathSafe(basePath, targetPath) {
93603
- const resolvedBase = resolve39(basePath);
93934
+ const resolvedBase = resolve40(basePath);
93604
93935
  try {
93605
93936
  const stat15 = lstatSync2(targetPath);
93606
93937
  if (stat15.isSymbolicLink()) {
@@ -93610,7 +93941,7 @@ function isPathSafe(basePath, targetPath) {
93610
93941
  }
93611
93942
  }
93612
93943
  } catch {}
93613
- const resolvedTarget = resolve39(targetPath);
93944
+ const resolvedTarget = resolve40(targetPath);
93614
93945
  const relativePath = relative19(resolvedBase, resolvedTarget);
93615
93946
  return !relativePath.startsWith("..") && !relativePath.startsWith("/") && resolvedTarget.startsWith(resolvedBase);
93616
93947
  }
@@ -93698,7 +94029,7 @@ class FileDownloader {
93698
94029
  }
93699
94030
  if (downloadedSize !== totalSize) {
93700
94031
  fileStream.end();
93701
- await new Promise((resolve40) => fileStream.once("close", resolve40));
94032
+ await new Promise((resolve41) => fileStream.once("close", resolve41));
93702
94033
  try {
93703
94034
  rmSync(destPath, { force: true });
93704
94035
  } catch (cleanupError) {
@@ -93712,7 +94043,7 @@ class FileDownloader {
93712
94043
  return destPath;
93713
94044
  } catch (error) {
93714
94045
  fileStream.end();
93715
- await new Promise((resolve40) => fileStream.once("close", resolve40));
94046
+ await new Promise((resolve41) => fileStream.once("close", resolve41));
93716
94047
  try {
93717
94048
  rmSync(destPath, { force: true });
93718
94049
  } catch (cleanupError) {
@@ -93778,7 +94109,7 @@ class FileDownloader {
93778
94109
  const expectedSize = Number(response.headers.get("content-length"));
93779
94110
  if (expectedSize > 0 && downloadedSize !== expectedSize) {
93780
94111
  fileStream.end();
93781
- await new Promise((resolve40) => fileStream.once("close", resolve40));
94112
+ await new Promise((resolve41) => fileStream.once("close", resolve41));
93782
94113
  try {
93783
94114
  rmSync(destPath, { force: true });
93784
94115
  } catch (cleanupError) {
@@ -93796,7 +94127,7 @@ class FileDownloader {
93796
94127
  return destPath;
93797
94128
  } catch (error) {
93798
94129
  fileStream.end();
93799
- await new Promise((resolve40) => fileStream.once("close", resolve40));
94130
+ await new Promise((resolve41) => fileStream.once("close", resolve41));
93800
94131
  try {
93801
94132
  rmSync(destPath, { force: true });
93802
94133
  } catch (cleanupError) {
@@ -94415,10 +94746,10 @@ class Minipass extends EventEmitter3 {
94415
94746
  return this[ENCODING] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
94416
94747
  }
94417
94748
  async promise() {
94418
- return new Promise((resolve40, reject) => {
94749
+ return new Promise((resolve41, reject) => {
94419
94750
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
94420
94751
  this.on("error", (er) => reject(er));
94421
- this.on("end", () => resolve40());
94752
+ this.on("end", () => resolve41());
94422
94753
  });
94423
94754
  }
94424
94755
  [Symbol.asyncIterator]() {
@@ -94437,7 +94768,7 @@ class Minipass extends EventEmitter3 {
94437
94768
  return Promise.resolve({ done: false, value: res });
94438
94769
  if (this[EOF])
94439
94770
  return stop();
94440
- let resolve40;
94771
+ let resolve41;
94441
94772
  let reject;
94442
94773
  const onerr = (er) => {
94443
94774
  this.off("data", ondata);
@@ -94451,19 +94782,19 @@ class Minipass extends EventEmitter3 {
94451
94782
  this.off("end", onend);
94452
94783
  this.off(DESTROYED, ondestroy);
94453
94784
  this.pause();
94454
- resolve40({ value, done: !!this[EOF] });
94785
+ resolve41({ value, done: !!this[EOF] });
94455
94786
  };
94456
94787
  const onend = () => {
94457
94788
  this.off("error", onerr);
94458
94789
  this.off("data", ondata);
94459
94790
  this.off(DESTROYED, ondestroy);
94460
94791
  stop();
94461
- resolve40({ done: true, value: undefined });
94792
+ resolve41({ done: true, value: undefined });
94462
94793
  };
94463
94794
  const ondestroy = () => onerr(new Error("stream destroyed"));
94464
94795
  return new Promise((res2, rej) => {
94465
94796
  reject = rej;
94466
- resolve40 = res2;
94797
+ resolve41 = res2;
94467
94798
  this.once(DESTROYED, ondestroy);
94468
94799
  this.once("error", onerr);
94469
94800
  this.once("end", onend);
@@ -95569,10 +95900,10 @@ class Minipass2 extends EventEmitter4 {
95569
95900
  return this[ENCODING2] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
95570
95901
  }
95571
95902
  async promise() {
95572
- return new Promise((resolve40, reject) => {
95903
+ return new Promise((resolve41, reject) => {
95573
95904
  this.on(DESTROYED2, () => reject(new Error("stream destroyed")));
95574
95905
  this.on("error", (er) => reject(er));
95575
- this.on("end", () => resolve40());
95906
+ this.on("end", () => resolve41());
95576
95907
  });
95577
95908
  }
95578
95909
  [Symbol.asyncIterator]() {
@@ -95591,7 +95922,7 @@ class Minipass2 extends EventEmitter4 {
95591
95922
  return Promise.resolve({ done: false, value: res });
95592
95923
  if (this[EOF2])
95593
95924
  return stop();
95594
- let resolve40;
95925
+ let resolve41;
95595
95926
  let reject;
95596
95927
  const onerr = (er) => {
95597
95928
  this.off("data", ondata);
@@ -95605,19 +95936,19 @@ class Minipass2 extends EventEmitter4 {
95605
95936
  this.off("end", onend);
95606
95937
  this.off(DESTROYED2, ondestroy);
95607
95938
  this.pause();
95608
- resolve40({ value, done: !!this[EOF2] });
95939
+ resolve41({ value, done: !!this[EOF2] });
95609
95940
  };
95610
95941
  const onend = () => {
95611
95942
  this.off("error", onerr);
95612
95943
  this.off("data", ondata);
95613
95944
  this.off(DESTROYED2, ondestroy);
95614
95945
  stop();
95615
- resolve40({ done: true, value: undefined });
95946
+ resolve41({ done: true, value: undefined });
95616
95947
  };
95617
95948
  const ondestroy = () => onerr(new Error("stream destroyed"));
95618
95949
  return new Promise((res2, rej) => {
95619
95950
  reject = rej;
95620
- resolve40 = res2;
95951
+ resolve41 = res2;
95621
95952
  this.once(DESTROYED2, ondestroy);
95622
95953
  this.once("error", onerr);
95623
95954
  this.once("end", onend);
@@ -97045,10 +97376,10 @@ class Minipass3 extends EventEmitter5 {
97045
97376
  return this[ENCODING3] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
97046
97377
  }
97047
97378
  async promise() {
97048
- return new Promise((resolve40, reject) => {
97379
+ return new Promise((resolve41, reject) => {
97049
97380
  this.on(DESTROYED3, () => reject(new Error("stream destroyed")));
97050
97381
  this.on("error", (er) => reject(er));
97051
- this.on("end", () => resolve40());
97382
+ this.on("end", () => resolve41());
97052
97383
  });
97053
97384
  }
97054
97385
  [Symbol.asyncIterator]() {
@@ -97067,7 +97398,7 @@ class Minipass3 extends EventEmitter5 {
97067
97398
  return Promise.resolve({ done: false, value: res });
97068
97399
  if (this[EOF3])
97069
97400
  return stop();
97070
- let resolve40;
97401
+ let resolve41;
97071
97402
  let reject;
97072
97403
  const onerr = (er) => {
97073
97404
  this.off("data", ondata);
@@ -97081,19 +97412,19 @@ class Minipass3 extends EventEmitter5 {
97081
97412
  this.off("end", onend);
97082
97413
  this.off(DESTROYED3, ondestroy);
97083
97414
  this.pause();
97084
- resolve40({ value, done: !!this[EOF3] });
97415
+ resolve41({ value, done: !!this[EOF3] });
97085
97416
  };
97086
97417
  const onend = () => {
97087
97418
  this.off("error", onerr);
97088
97419
  this.off("data", ondata);
97089
97420
  this.off(DESTROYED3, ondestroy);
97090
97421
  stop();
97091
- resolve40({ done: true, value: undefined });
97422
+ resolve41({ done: true, value: undefined });
97092
97423
  };
97093
97424
  const ondestroy = () => onerr(new Error("stream destroyed"));
97094
97425
  return new Promise((res2, rej) => {
97095
97426
  reject = rej;
97096
- resolve40 = res2;
97427
+ resolve41 = res2;
97097
97428
  this.once(DESTROYED3, ondestroy);
97098
97429
  this.once("error", onerr);
97099
97430
  this.once("end", onend);
@@ -97165,8 +97496,8 @@ class Minipass3 extends EventEmitter5 {
97165
97496
  }
97166
97497
 
97167
97498
  // node_modules/tar/dist/esm/normalize-windows-path.js
97168
- var platform10 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
97169
- var normalizeWindowsPath = platform10 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
97499
+ var platform11 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
97500
+ var normalizeWindowsPath = platform11 !== "win32" ? (p) => p : (p) => p && p.replace(/\\/g, "/");
97170
97501
 
97171
97502
  // node_modules/tar/dist/esm/read-entry.js
97172
97503
  class ReadEntry extends Minipass3 {
@@ -97864,9 +98195,9 @@ var listFile = (opt, _files) => {
97864
98195
  const parse5 = new Parser(opt);
97865
98196
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
97866
98197
  const file = opt.file;
97867
- const p = new Promise((resolve40, reject) => {
98198
+ const p = new Promise((resolve41, reject) => {
97868
98199
  parse5.on("error", reject);
97869
- parse5.on("end", resolve40);
98200
+ parse5.on("end", resolve41);
97870
98201
  fs10.stat(file, (er, stat15) => {
97871
98202
  if (er) {
97872
98203
  reject(er);
@@ -97917,8 +98248,8 @@ var modeFix = (mode, isDir, portable) => {
97917
98248
  };
97918
98249
 
97919
98250
  // node_modules/tar/dist/esm/strip-absolute-path.js
97920
- import { win32 } from "node:path";
97921
- var { isAbsolute: isAbsolute12, parse: parse5 } = win32;
98251
+ import { win32 as win322 } from "node:path";
98252
+ var { isAbsolute: isAbsolute12, parse: parse5 } = win322;
97922
98253
  var stripAbsolutePath = (path8) => {
97923
98254
  let r2 = "";
97924
98255
  let parsed = parse5(path8);
@@ -99364,8 +99695,8 @@ import path13 from "node:path";
99364
99695
 
99365
99696
  // node_modules/tar/dist/esm/get-write-flag.js
99366
99697
  import fs13 from "fs";
99367
- var platform11 = process.env.__FAKE_PLATFORM__ || process.platform;
99368
- var isWindows3 = platform11 === "win32";
99698
+ var platform12 = process.env.__FAKE_PLATFORM__ || process.platform;
99699
+ var isWindows3 = platform12 === "win32";
99369
99700
  var { O_CREAT, O_TRUNC, O_WRONLY } = fs13.constants;
99370
99701
  var UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || fs13.constants.UV_FS_O_FILEMAP || 0;
99371
99702
  var fMapEnabled = isWindows3 && !!UV_FS_O_FILEMAP;
@@ -99656,8 +99987,8 @@ var normalizeUnicode = (s) => {
99656
99987
  };
99657
99988
 
99658
99989
  // node_modules/tar/dist/esm/path-reservations.js
99659
- var platform12 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
99660
- var isWindows4 = platform12 === "win32";
99990
+ var platform13 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
99991
+ var isWindows4 = platform13 === "win32";
99661
99992
  var getDirs = (path13) => {
99662
99993
  const dirs = path13.split("/").slice(0, -1).reduce((set, path14) => {
99663
99994
  const s = set[set.length - 1];
@@ -99803,8 +100134,8 @@ var DOCHOWN = Symbol("doChown");
99803
100134
  var UID = Symbol("uid");
99804
100135
  var GID = Symbol("gid");
99805
100136
  var CHECKED_CWD = Symbol("checkedCwd");
99806
- var platform13 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
99807
- var isWindows5 = platform13 === "win32";
100137
+ var platform14 = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
100138
+ var isWindows5 = platform14 === "win32";
99808
100139
  var DEFAULT_MAX_DEPTH = 1024;
99809
100140
  var unlinkFile = (path14, cb) => {
99810
100141
  if (!isWindows5) {
@@ -100446,9 +100777,9 @@ var extractFile = (opt, _3) => {
100446
100777
  const u = new Unpack(opt);
100447
100778
  const readSize = opt.maxReadSize || 16 * 1024 * 1024;
100448
100779
  const file = opt.file;
100449
- const p = new Promise((resolve40, reject) => {
100780
+ const p = new Promise((resolve41, reject) => {
100450
100781
  u.on("error", reject);
100451
- u.on("close", resolve40);
100782
+ u.on("close", resolve41);
100452
100783
  fs17.stat(file, (er, stat15) => {
100453
100784
  if (er) {
100454
100785
  reject(er);
@@ -100581,7 +100912,7 @@ var replaceAsync = (opt, files) => {
100581
100912
  };
100582
100913
  fs18.read(fd, headBuf, 0, 512, position, onread);
100583
100914
  };
100584
- const promise = new Promise((resolve40, reject) => {
100915
+ const promise = new Promise((resolve41, reject) => {
100585
100916
  p.on("error", reject);
100586
100917
  let flag = "r+";
100587
100918
  const onopen = (er, fd) => {
@@ -100606,7 +100937,7 @@ var replaceAsync = (opt, files) => {
100606
100937
  });
100607
100938
  p.pipe(stream);
100608
100939
  stream.on("error", reject);
100609
- stream.on("close", resolve40);
100940
+ stream.on("close", resolve41);
100610
100941
  addFilesAsync2(p, files);
100611
100942
  });
100612
100943
  });
@@ -101563,7 +101894,7 @@ import { join as join121 } from "node:path";
101563
101894
 
101564
101895
  // src/domains/installation/deletion-handler.ts
101565
101896
  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 resolve41, sep as sep12 } from "node:path";
101897
+ import { dirname as dirname37, join as join106, relative as relative21, resolve as resolve43, sep as sep12 } from "node:path";
101567
101898
 
101568
101899
  // src/services/file-operations/manifest/manifest-reader.ts
101569
101900
  init_metadata_migration();
@@ -101788,8 +102119,8 @@ function expandGlobPatterns(patterns, claudeDir3) {
101788
102119
  }
101789
102120
  var MAX_CLEANUP_ITERATIONS = 50;
101790
102121
  function cleanupEmptyDirectories(filePath, claudeDir3) {
101791
- const normalizedClaudeDir = resolve41(claudeDir3);
101792
- let currentDir = resolve41(dirname37(filePath));
102122
+ const normalizedClaudeDir = resolve43(claudeDir3);
102123
+ let currentDir = resolve43(dirname37(filePath));
101793
102124
  let iterations = 0;
101794
102125
  while (currentDir !== normalizedClaudeDir && currentDir.startsWith(normalizedClaudeDir) && iterations < MAX_CLEANUP_ITERATIONS) {
101795
102126
  iterations++;
@@ -101798,7 +102129,7 @@ function cleanupEmptyDirectories(filePath, claudeDir3) {
101798
102129
  if (entries.length === 0) {
101799
102130
  rmdirSync(currentDir);
101800
102131
  logger.debug(`Removed empty directory: ${currentDir}`);
101801
- currentDir = resolve41(dirname37(currentDir));
102132
+ currentDir = resolve43(dirname37(currentDir));
101802
102133
  } else {
101803
102134
  break;
101804
102135
  }
@@ -101808,8 +102139,8 @@ function cleanupEmptyDirectories(filePath, claudeDir3) {
101808
102139
  }
101809
102140
  }
101810
102141
  function deletePath(fullPath, claudeDir3) {
101811
- const normalizedPath = resolve41(fullPath);
101812
- const normalizedClaudeDir = resolve41(claudeDir3);
102142
+ const normalizedPath = resolve43(fullPath);
102143
+ const normalizedClaudeDir = resolve43(claudeDir3);
101813
102144
  if (!normalizedPath.startsWith(`${normalizedClaudeDir}${sep12}`) && normalizedPath !== normalizedClaudeDir) {
101814
102145
  throw new Error(`Path traversal detected: ${fullPath}`);
101815
102146
  }
@@ -101882,8 +102213,8 @@ async function handleDeletions(sourceMetadata, claudeDir3, kitType) {
101882
102213
  const result = { deletedPaths: [], preservedPaths: [], errors: [] };
101883
102214
  for (const path16 of deletions) {
101884
102215
  const fullPath = join106(claudeDir3, path16);
101885
- const normalizedPath = resolve41(fullPath);
101886
- const normalizedClaudeDir = resolve41(claudeDir3);
102216
+ const normalizedPath = resolve43(fullPath);
102217
+ const normalizedClaudeDir = resolve43(claudeDir3);
101887
102218
  if (!normalizedPath.startsWith(`${normalizedClaudeDir}${sep12}`)) {
101888
102219
  logger.warning(`Skipping invalid path: ${path16}`);
101889
102220
  result.errors.push(path16);
@@ -103666,7 +103997,7 @@ class FileScanner {
103666
103997
 
103667
103998
  // src/domains/installation/merger/settings-processor.ts
103668
103999
  import { execSync as execSync5 } from "node:child_process";
103669
- import { homedir as homedir45 } from "node:os";
104000
+ import { homedir as homedir46 } from "node:os";
103670
104001
  import { dirname as dirname40, join as join110 } from "node:path";
103671
104002
 
103672
104003
  // src/domains/config/installed-settings-tracker.ts
@@ -103770,7 +104101,7 @@ init_logger();
103770
104101
  init_path_resolver();
103771
104102
  var import_fs_extra15 = __toESM(require_lib(), 1);
103772
104103
  var import_semver4 = __toESM(require_semver2(), 1);
103773
- var DYNAMIC_INJECTED_HOOKS2 = new Set(["task-completed-handler", "teammate-idle-handler"]);
104104
+ var DYNAMIC_INJECTED_HOOKS = new Set(["task-completed-handler", "teammate-idle-handler"]);
103774
104105
 
103775
104106
  class SettingsProcessor {
103776
104107
  static MIN_TEAM_HOOKS_VERSION = "2.1.33";
@@ -104205,7 +104536,7 @@ class SettingsProcessor {
104205
104536
  return;
104206
104537
  for (const command of previousInstalledSettings.hooks) {
104207
104538
  const hookName = this.extractCkHookName(command);
104208
- if (!hookName || !DYNAMIC_INJECTED_HOOKS2.has(hookName))
104539
+ if (!hookName || !DYNAMIC_INJECTED_HOOKS.has(hookName))
104209
104540
  continue;
104210
104541
  this.tracker.trackHook(command, refreshedSettings);
104211
104542
  }
@@ -104330,7 +104661,7 @@ class SettingsProcessor {
104330
104661
  return false;
104331
104662
  }
104332
104663
  const configuredGlobalDir = PathResolver.getGlobalKitDir().replace(/\\/g, "/").replace(/\/+$/, "");
104333
- const defaultGlobalDir = join110(homedir45(), ".claude").replace(/\\/g, "/");
104664
+ const defaultGlobalDir = join110(homedir46(), ".claude").replace(/\\/g, "/");
104334
104665
  return configuredGlobalDir !== defaultGlobalDir;
104335
104666
  }
104336
104667
  getClaudeCommandRoot() {
@@ -105345,7 +105676,7 @@ User-created files (sample):`);
105345
105676
 
105346
105677
  // src/domains/ui/conflict-summary.ts
105347
105678
  init_logger();
105348
- var import_picocolors24 = __toESM(require_picocolors(), 1);
105679
+ var import_picocolors25 = __toESM(require_picocolors(), 1);
105349
105680
  function displayConflictSummary(summary) {
105350
105681
  const totalUpdated = summary.files.updated.length + summary.hooks.updated.length + summary.mcp.updated.length;
105351
105682
  const totalKept = summary.files.kept.length + summary.hooks.kept.length + summary.mcp.kept.length;
@@ -105354,38 +105685,38 @@ function displayConflictSummary(summary) {
105354
105685
  return;
105355
105686
  }
105356
105687
  console.log();
105357
- console.log(import_picocolors24.default.bold("Dual-Kit Conflict Resolution"));
105358
- console.log(import_picocolors24.default.dim("─".repeat(40)));
105688
+ console.log(import_picocolors25.default.bold("Dual-Kit Conflict Resolution"));
105689
+ console.log(import_picocolors25.default.dim("─".repeat(40)));
105359
105690
  if (summary.files.updated.length > 0 || summary.files.kept.length > 0) {
105360
105691
  const updated = summary.files.updated.length;
105361
105692
  const kept = summary.files.kept.length;
105362
105693
  const winners = formatWinners(summary.files.updated);
105363
- console.log(` Files: ${import_picocolors24.default.green(`${updated} updated`)}${winners}, ${import_picocolors24.default.dim(`${kept} kept`)}`);
105694
+ console.log(` Files: ${import_picocolors25.default.green(`${updated} updated`)}${winners}, ${import_picocolors25.default.dim(`${kept} kept`)}`);
105364
105695
  }
105365
105696
  if (summary.hooks.updated.length > 0 || summary.hooks.kept.length > 0) {
105366
105697
  const updated = summary.hooks.updated.length;
105367
105698
  const kept = summary.hooks.kept.length;
105368
105699
  const winners = formatHookWinners(summary.hooks.updated);
105369
- console.log(` Hooks: ${import_picocolors24.default.green(`${updated} updated`)}${winners}, ${import_picocolors24.default.dim(`${kept} kept`)}`);
105700
+ console.log(` Hooks: ${import_picocolors25.default.green(`${updated} updated`)}${winners}, ${import_picocolors25.default.dim(`${kept} kept`)}`);
105370
105701
  }
105371
105702
  if (summary.mcp.updated.length > 0 || summary.mcp.kept.length > 0) {
105372
105703
  const updated = summary.mcp.updated.length;
105373
105704
  const kept = summary.mcp.kept.length;
105374
105705
  const winners = formatMcpWinners(summary.mcp.updated);
105375
- console.log(` MCP: ${import_picocolors24.default.green(`${updated} updated`)}${winners}, ${import_picocolors24.default.dim(`${kept} kept`)}`);
105706
+ console.log(` MCP: ${import_picocolors25.default.green(`${updated} updated`)}${winners}, ${import_picocolors25.default.dim(`${kept} kept`)}`);
105376
105707
  }
105377
105708
  if (logger.isVerbose() && totalUpdated > 0) {
105378
105709
  console.log();
105379
- console.log(import_picocolors24.default.dim("Details:"));
105710
+ console.log(import_picocolors25.default.dim("Details:"));
105380
105711
  for (const file of summary.files.updated) {
105381
- console.log(` ${import_picocolors24.default.dim("-")} ${file.relativePath}: ${import_picocolors24.default.green(file.winner)} won`);
105712
+ console.log(` ${import_picocolors25.default.dim("-")} ${file.relativePath}: ${import_picocolors25.default.green(file.winner)} won`);
105382
105713
  }
105383
105714
  for (const hook of summary.hooks.updated) {
105384
105715
  const shortCmd = hook.command.length > 40 ? `${hook.command.slice(0, 40)}...` : hook.command;
105385
- console.log(` ${import_picocolors24.default.dim("-")} hook: ${shortCmd} → ${import_picocolors24.default.green(hook.winner)}`);
105716
+ console.log(` ${import_picocolors25.default.dim("-")} hook: ${shortCmd} → ${import_picocolors25.default.green(hook.winner)}`);
105386
105717
  }
105387
105718
  for (const mcp of summary.mcp.updated) {
105388
- console.log(` ${import_picocolors24.default.dim("-")} mcp: ${mcp.serverName} → ${import_picocolors24.default.green(mcp.winner)}`);
105719
+ console.log(` ${import_picocolors25.default.dim("-")} mcp: ${mcp.serverName} → ${import_picocolors25.default.green(mcp.winner)}`);
105389
105720
  }
105390
105721
  }
105391
105722
  console.log();
@@ -105399,7 +105730,7 @@ function formatWinners(items) {
105399
105730
  if (counts.size === 0)
105400
105731
  return "";
105401
105732
  const parts = Array.from(counts.entries()).map(([kit, count]) => `${kit}: ${count}`);
105402
- return import_picocolors24.default.dim(` (${parts.join(", ")})`);
105733
+ return import_picocolors25.default.dim(` (${parts.join(", ")})`);
105403
105734
  }
105404
105735
  function formatHookWinners(items) {
105405
105736
  const counts = new Map;
@@ -105409,7 +105740,7 @@ function formatHookWinners(items) {
105409
105740
  if (counts.size === 0)
105410
105741
  return "";
105411
105742
  const parts = Array.from(counts.entries()).map(([kit, count]) => `${kit}: ${count}`);
105412
- return import_picocolors24.default.dim(` (${parts.join(", ")})`);
105743
+ return import_picocolors25.default.dim(` (${parts.join(", ")})`);
105413
105744
  }
105414
105745
  function formatMcpWinners(items) {
105415
105746
  const counts = new Map;
@@ -105419,7 +105750,7 @@ function formatMcpWinners(items) {
105419
105750
  if (counts.size === 0)
105420
105751
  return "";
105421
105752
  const parts = Array.from(counts.entries()).map(([kit, count]) => `${kit}: ${count}`);
105422
- return import_picocolors24.default.dim(` (${parts.join(", ")})`);
105753
+ return import_picocolors25.default.dim(` (${parts.join(", ")})`);
105423
105754
  }
105424
105755
  function buildConflictSummary(fileConflicts, hookConflicts, mcpConflicts) {
105425
105756
  return {
@@ -105442,7 +105773,7 @@ function buildConflictSummary(fileConflicts, hookConflicts, mcpConflicts) {
105442
105773
  init_logger();
105443
105774
  init_skip_directories();
105444
105775
  var import_fs_extra20 = __toESM(require_lib(), 1);
105445
- import { join as join116, relative as relative26, resolve as resolve43 } from "node:path";
105776
+ import { join as join116, relative as relative26, resolve as resolve45 } from "node:path";
105446
105777
 
105447
105778
  class FileScanner2 {
105448
105779
  static async getFiles(dirPath, relativeTo) {
@@ -105522,8 +105853,8 @@ class FileScanner2 {
105522
105853
  return customFiles;
105523
105854
  }
105524
105855
  static isSafePath(basePath, targetPath) {
105525
- const resolvedBase = resolve43(basePath);
105526
- const resolvedTarget = resolve43(targetPath);
105856
+ const resolvedBase = resolve45(basePath);
105857
+ const resolvedTarget = resolve45(targetPath);
105527
105858
  return resolvedTarget.startsWith(resolvedBase);
105528
105859
  }
105529
105860
  static toPosixPath(path17) {
@@ -107369,9 +107700,9 @@ import { join as join131 } from "node:path";
107369
107700
  // src/services/transformers/opencode-path-transformer.ts
107370
107701
  init_logger();
107371
107702
  import { readFile as readFile58, readdir as readdir40, writeFile as writeFile31 } from "node:fs/promises";
107372
- import { platform as platform14 } from "node:os";
107703
+ import { platform as platform15 } from "node:os";
107373
107704
  import { extname as extname6, join as join130 } from "node:path";
107374
- var IS_WINDOWS2 = platform14() === "win32";
107705
+ var IS_WINDOWS2 = platform15() === "win32";
107375
107706
  function getOpenCodeGlobalPath() {
107376
107707
  return "$HOME/.config/opencode/";
107377
107708
  }
@@ -107670,7 +108001,7 @@ async function handlePostInstall(ctx) {
107670
108001
  init_config_manager();
107671
108002
  init_github_client();
107672
108003
  import { mkdir as mkdir36 } from "node:fs/promises";
107673
- import { join as join135, resolve as resolve47 } from "node:path";
108004
+ import { join as join135, resolve as resolve48 } from "node:path";
107674
108005
 
107675
108006
  // src/domains/github/kit-access-checker.ts
107676
108007
  init_error2();
@@ -107840,7 +108171,7 @@ async function runPreflightChecks() {
107840
108171
  // src/domains/installation/fresh-installer.ts
107841
108172
  init_metadata_migration();
107842
108173
  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 resolve45 } from "node:path";
108174
+ import { basename as basename28, dirname as dirname42, join as join133, resolve as resolve46 } from "node:path";
107844
108175
  init_logger();
107845
108176
  init_safe_spinner();
107846
108177
  var import_fs_extra35 = __toESM(require_lib(), 1);
@@ -107892,15 +108223,15 @@ async function analyzeFreshInstallation(claudeDir3) {
107892
108223
  };
107893
108224
  }
107894
108225
  function cleanupEmptyDirectories2(filePath, claudeDir3) {
107895
- const normalizedClaudeDir = resolve45(claudeDir3);
107896
- let currentDir = resolve45(dirname42(filePath));
108226
+ const normalizedClaudeDir = resolve46(claudeDir3);
108227
+ let currentDir = resolve46(dirname42(filePath));
107897
108228
  while (currentDir !== normalizedClaudeDir && currentDir.startsWith(normalizedClaudeDir)) {
107898
108229
  try {
107899
108230
  const entries = readdirSync10(currentDir);
107900
108231
  if (entries.length === 0) {
107901
108232
  rmdirSync2(currentDir);
107902
108233
  logger.debug(`Removed empty directory: ${currentDir}`);
107903
- currentDir = resolve45(dirname42(currentDir));
108234
+ currentDir = resolve46(dirname42(currentDir));
107904
108235
  } else {
107905
108236
  break;
107906
108237
  }
@@ -108089,8 +108420,8 @@ async function handleFreshInstallation(claudeDir3, prompts) {
108089
108420
  // src/domains/installation/global-kit-legacy-repair.ts
108090
108421
  var import_fs_extra36 = __toESM(require_lib(), 1);
108091
108422
  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 homedir46 } from "node:os";
108093
- import { dirname as dirname43, join as join134, normalize as normalize11, resolve as resolve46 } from "node:path";
108423
+ import { homedir as homedir47 } from "node:os";
108424
+ import { dirname as dirname43, join as join134, normalize as normalize11, resolve as resolve47 } from "node:path";
108094
108425
  var LEGACY_KIT_MARKERS = [
108095
108426
  "metadata.json",
108096
108427
  ".ck.json",
@@ -108116,7 +108447,7 @@ function uniqueNormalizedPaths(paths) {
108116
108447
  const seen = new Set;
108117
108448
  const result = [];
108118
108449
  for (const path17 of paths) {
108119
- const normalized = normalize11(resolve46(path17));
108450
+ const normalized = normalize11(resolve47(path17));
108120
108451
  if (seen.has(normalized))
108121
108452
  continue;
108122
108453
  seen.add(normalized);
@@ -108124,7 +108455,7 @@ function uniqueNormalizedPaths(paths) {
108124
108455
  }
108125
108456
  return result;
108126
108457
  }
108127
- function getLegacyWindowsGlobalKitDirCandidates(env2 = process.env, homeDir = homedir46()) {
108458
+ function getLegacyWindowsGlobalKitDirCandidates(env2 = process.env, homeDir = homedir47()) {
108128
108459
  const candidates = [];
108129
108460
  const localAppData = safeEnvPath(env2.LOCALAPPDATA);
108130
108461
  const appData = safeEnvPath(env2.APPDATA);
@@ -108181,8 +108512,8 @@ async function repairLegacyWindowsGlobalKitDir(options2) {
108181
108512
  if (safeEnvPath(env2.CLAUDE_CONFIG_DIR)) {
108182
108513
  return { status: "skipped", reason: "custom-global-dir", candidateDirs: [] };
108183
108514
  }
108184
- const targetDir = normalize11(resolve46(options2.targetDir));
108185
- const candidateDirs = getLegacyWindowsGlobalKitDirCandidates(env2, options2.homeDir).filter((candidate) => normalize11(resolve46(candidate)) !== targetDir);
108515
+ const targetDir = normalize11(resolve47(options2.targetDir));
108516
+ const candidateDirs = getLegacyWindowsGlobalKitDirCandidates(env2, options2.homeDir).filter((candidate) => normalize11(resolve47(candidate)) !== targetDir);
108186
108517
  const legacyDirs = [];
108187
108518
  for (const candidate of candidateDirs) {
108188
108519
  if (await hasKitMarkers(candidate)) {
@@ -108405,7 +108736,7 @@ async function handleSelection(ctx) {
108405
108736
  }
108406
108737
  }
108407
108738
  }
108408
- const resolvedDir = resolve47(targetDir);
108739
+ const resolvedDir = resolve48(targetDir);
108409
108740
  if (ctx.options.global) {
108410
108741
  try {
108411
108742
  const repairResult = await repairLegacyWindowsGlobalKitDir({ targetDir: resolvedDir });
@@ -108602,16 +108933,16 @@ async function handleSelection(ctx) {
108602
108933
  }
108603
108934
  // src/commands/init/phases/sync-handler.ts
108604
108935
  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 resolve48 } from "node:path";
108936
+ import { dirname as dirname44, join as join136, resolve as resolve49 } from "node:path";
108606
108937
  init_logger();
108607
108938
  init_path_resolver();
108608
108939
  var import_fs_extra38 = __toESM(require_lib(), 1);
108609
- var import_picocolors26 = __toESM(require_picocolors(), 1);
108940
+ var import_picocolors27 = __toESM(require_picocolors(), 1);
108610
108941
  async function handleSync(ctx) {
108611
108942
  if (!ctx.options.sync) {
108612
108943
  return ctx;
108613
108944
  }
108614
- const resolvedDir = ctx.options.global ? PathResolver.getGlobalKitDir() : resolve48(ctx.options.dir || ".");
108945
+ const resolvedDir = ctx.options.global ? PathResolver.getGlobalKitDir() : resolve49(ctx.options.dir || ".");
108615
108946
  const claudeDir3 = ctx.options.global ? resolvedDir : join136(resolvedDir, ".claude");
108616
108947
  if (!await import_fs_extra38.pathExists(claudeDir3)) {
108617
108948
  logger.error("Cannot sync: no .claude directory found");
@@ -108793,7 +109124,7 @@ async function executeSyncMerge(ctx) {
108793
109124
  }
108794
109125
  const backupDir = PathResolver.getBackupDir();
108795
109126
  await createBackup(ctx.claudeDir, trackedFiles, backupDir);
108796
- logger.success(`Backup created at ${import_picocolors26.default.dim(backupDir)}`);
109127
+ logger.success(`Backup created at ${import_picocolors27.default.dim(backupDir)}`);
108797
109128
  if (sourceMetadata?.deletions && sourceMetadata.deletions.length > 0) {
108798
109129
  try {
108799
109130
  const deletionResult = await handleDeletions(sourceMetadata, ctx.claudeDir, ctx.kitType);
@@ -108931,22 +109262,22 @@ async function executeSyncMerge(ctx) {
108931
109262
  totalRejected += result.rejected;
108932
109263
  }
108933
109264
  console.log("");
108934
- console.log(import_picocolors26.default.bold("Sync Summary:"));
108935
- console.log(import_picocolors26.default.dim("─".repeat(40)));
109265
+ console.log(import_picocolors27.default.bold("Sync Summary:"));
109266
+ console.log(import_picocolors27.default.dim("─".repeat(40)));
108936
109267
  if (plan.autoUpdate.length > 0) {
108937
- console.log(import_picocolors26.default.green(` ✓ ${plan.autoUpdate.length} file(s) auto-updated`));
109268
+ console.log(import_picocolors27.default.green(` ✓ ${plan.autoUpdate.length} file(s) auto-updated`));
108938
109269
  }
108939
109270
  if (totalApplied > 0) {
108940
- console.log(import_picocolors26.default.green(` ✓ ${totalApplied} hunk(s) applied`));
109271
+ console.log(import_picocolors27.default.green(` ✓ ${totalApplied} hunk(s) applied`));
108941
109272
  }
108942
109273
  if (totalRejected > 0) {
108943
- console.log(import_picocolors26.default.yellow(` ○ ${totalRejected} hunk(s) rejected`));
109274
+ console.log(import_picocolors27.default.yellow(` ○ ${totalRejected} hunk(s) rejected`));
108944
109275
  }
108945
109276
  if (skippedFiles > 0) {
108946
- console.log(import_picocolors26.default.yellow(` ○ ${skippedFiles} file(s) skipped`));
109277
+ console.log(import_picocolors27.default.yellow(` ○ ${skippedFiles} file(s) skipped`));
108947
109278
  }
108948
109279
  if (plan.skipped.length > 0) {
108949
- console.log(import_picocolors26.default.dim(` ─ ${plan.skipped.length} user-owned file(s) unchanged`));
109280
+ console.log(import_picocolors27.default.dim(` ─ ${plan.skipped.length} user-owned file(s) unchanged`));
108950
109281
  }
108951
109282
  } else if (plan.needsReview.length > 0 && ctx.isNonInteractive) {
108952
109283
  logger.error(`Cannot complete sync: ${plan.needsReview.length} file(s) require interactive review`);
@@ -108969,30 +109300,30 @@ Options:
108969
109300
  }
108970
109301
  function displaySyncPlan(plan) {
108971
109302
  console.log("");
108972
- console.log(import_picocolors26.default.bold("Sync Plan:"));
108973
- console.log(import_picocolors26.default.dim("─".repeat(40)));
109303
+ console.log(import_picocolors27.default.bold("Sync Plan:"));
109304
+ console.log(import_picocolors27.default.dim("─".repeat(40)));
108974
109305
  if (plan.autoUpdate.length > 0) {
108975
- console.log(import_picocolors26.default.green(` ${plan.autoUpdate.length} file(s) will be auto-updated`));
109306
+ console.log(import_picocolors27.default.green(` ${plan.autoUpdate.length} file(s) will be auto-updated`));
108976
109307
  for (const file of plan.autoUpdate.slice(0, 5)) {
108977
- console.log(import_picocolors26.default.dim(` • ${file.path}`));
109308
+ console.log(import_picocolors27.default.dim(` • ${file.path}`));
108978
109309
  }
108979
109310
  if (plan.autoUpdate.length > 5) {
108980
- console.log(import_picocolors26.default.dim(` ... and ${plan.autoUpdate.length - 5} more`));
109311
+ console.log(import_picocolors27.default.dim(` ... and ${plan.autoUpdate.length - 5} more`));
108981
109312
  }
108982
109313
  }
108983
109314
  if (plan.needsReview.length > 0) {
108984
- console.log(import_picocolors26.default.yellow(` ${plan.needsReview.length} file(s) need interactive review`));
109315
+ console.log(import_picocolors27.default.yellow(` ${plan.needsReview.length} file(s) need interactive review`));
108985
109316
  for (const file of plan.needsReview.slice(0, 5)) {
108986
- console.log(import_picocolors26.default.dim(` • ${file.path}`));
109317
+ console.log(import_picocolors27.default.dim(` • ${file.path}`));
108987
109318
  }
108988
109319
  if (plan.needsReview.length > 5) {
108989
- console.log(import_picocolors26.default.dim(` ... and ${plan.needsReview.length - 5} more`));
109320
+ console.log(import_picocolors27.default.dim(` ... and ${plan.needsReview.length - 5} more`));
108990
109321
  }
108991
109322
  }
108992
109323
  if (plan.skipped.length > 0) {
108993
- console.log(import_picocolors26.default.dim(` ${plan.skipped.length} user-owned file(s) will be skipped`));
109324
+ console.log(import_picocolors27.default.dim(` ${plan.skipped.length} user-owned file(s) will be skipped`));
108994
109325
  }
108995
- console.log(import_picocolors26.default.dim("─".repeat(40)));
109326
+ console.log(import_picocolors27.default.dim("─".repeat(40)));
108996
109327
  }
108997
109328
  async function createBackup(claudeDir3, files, backupDir) {
108998
109329
  await mkdir37(backupDir, { recursive: true });
@@ -109288,9 +109619,9 @@ async function transformFolderPaths(extractDir, folders, options2 = {}) {
109288
109619
  // src/services/transformers/global-path-transformer.ts
109289
109620
  init_logger();
109290
109621
  import { readFile as readFile61, readdir as readdir44, writeFile as writeFile35 } from "node:fs/promises";
109291
- import { homedir as homedir47, platform as platform15 } from "node:os";
109622
+ import { homedir as homedir48, platform as platform16 } from "node:os";
109292
109623
  import { extname as extname7, join as join139 } from "node:path";
109293
- var IS_WINDOWS3 = platform15() === "win32";
109624
+ var IS_WINDOWS3 = platform16() === "win32";
109294
109625
  var HOME_PREFIX = "$HOME";
109295
109626
  function getHomeDirPrefix() {
109296
109627
  return HOME_PREFIX;
@@ -109299,7 +109630,7 @@ function normalizeInstallPath(path17) {
109299
109630
  return path17.replace(/\\/g, "/").replace(/\/+$/, "");
109300
109631
  }
109301
109632
  function getDefaultGlobalClaudeDir() {
109302
- return normalizeInstallPath(join139(homedir47(), ".claude"));
109633
+ return normalizeInstallPath(join139(homedir48(), ".claude"));
109303
109634
  }
109304
109635
  function getCustomGlobalClaudeDir(targetClaudeDir) {
109305
109636
  if (!targetClaudeDir)
@@ -109735,288 +110066,19 @@ import { homedir as homedir52 } from "node:os";
109735
110066
  import { basename as basename30, join as join144, resolve as resolve50 } from "node:path";
109736
110067
  init_logger();
109737
110068
 
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
110069
  // src/ui/ck-cli-design/next-steps-footer.ts
110070
+ init_tokens();
109936
110071
  function renderNextStepsFooter(options2) {
109937
110072
  const context = options2.context ?? createCliDesignContext(options2.contextOptions);
109938
110073
  const bullet = context.box.bullet === "+" ? "-" : "•";
109939
110074
  return options2.commands.map((command) => `${bullet} ${command}`);
109940
110075
  }
109941
- // src/ui/ck-cli-design/panel.ts
109942
- function renderPanel(options2) {
109943
- const context = options2.context ?? createCliDesignContext(options2.contextOptions);
109944
- const title = paint(options2.title, "heading", context);
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
- }
110076
+
110077
+ // src/ui/ck-cli-design/index.ts
110078
+ init_panel();
110079
+
110019
110080
  // src/ui/ck-cli-design/preflight-row.ts
110081
+ init_tokens();
110020
110082
  function renderPreflightRow(options2) {
110021
110083
  const context = options2.context ?? createCliDesignContext(options2.contextOptions);
110022
110084
  const icon = options2.icon ?? context.box.bullet;
@@ -110038,6 +110100,8 @@ function renderPreflightRow(options2) {
110038
110100
  return lines;
110039
110101
  }
110040
110102
  // src/ui/ck-cli-design/source-target-header.ts
110103
+ init_panel();
110104
+ init_tokens();
110041
110105
  function renderSourceTargetHeader(options2) {
110042
110106
  const context = options2.context ?? createCliDesignContext(options2.contextOptions);
110043
110107
  return renderPanel({
@@ -110050,6 +110114,10 @@ function renderSourceTargetHeader(options2) {
110050
110114
  ]
110051
110115
  });
110052
110116
  }
110117
+
110118
+ // src/ui/ck-cli-design/index.ts
110119
+ init_tokens();
110120
+
110053
110121
  // src/commands/migrate/migrate-command.ts
110054
110122
  init_agents_discovery();
110055
110123
  init_commands_discovery();