@sunasteriskrnd/takumi 1.0.0-dev.58 → 1.0.0-dev.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +466 -193
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -19815,7 +19815,7 @@ var package_default;
19815
19815
  var init_package = __esm(() => {
19816
19816
  package_default = {
19817
19817
  name: "@sunasteriskrnd/takumi",
19818
- version: "1.0.0-dev.58",
19818
+ version: "1.0.0-dev.59",
19819
19819
  description: "CLI tool for bootstrapping and managing Takumi projects",
19820
19820
  type: "module",
19821
19821
  repository: {
@@ -20012,7 +20012,7 @@ function getLegacyManifestPath(providerRoot) {
20012
20012
  return join4(providerRoot, LEGACY_MANIFEST_FILENAME);
20013
20013
  }
20014
20014
  function getCliVersion() {
20015
- return "1.0.0-dev.58"?.trim() || process.env.npm_package_version?.trim() || "unknown";
20015
+ return "1.0.0-dev.59"?.trim() || process.env.npm_package_version?.trim() || "unknown";
20016
20016
  }
20017
20017
  function getCliUserAgent() {
20018
20018
  return `${TAKUMI_CLI_NPM_PACKAGE_NAME}/${getCliVersion()}`;
@@ -51483,7 +51483,7 @@ var init_auth_command_help = __esm(() => {
51483
51483
  });
51484
51484
 
51485
51485
  // src/domains/help/commands/artifact-action-help.ts
51486
- var artifactUploadHelp, artifactDownloadHelp, artifactDeleteHelp;
51486
+ var artifactUploadHelp, artifactDownloadHelp, artifactDeleteHelp, listSearchOptionsGroup, orgVisibilityNote, artifactListHelp, artifactSearchHelp;
51487
51487
  var init_artifact_action_help = __esm(() => {
51488
51488
  artifactUploadHelp = {
51489
51489
  name: "artifact upload",
@@ -51583,6 +51583,65 @@ var init_artifact_action_help = __esm(() => {
51583
51583
  }
51584
51584
  ]
51585
51585
  };
51586
+ listSearchOptionsGroup = {
51587
+ title: "Options",
51588
+ options: [
51589
+ {
51590
+ flags: "--access <level>",
51591
+ description: "Filter by access level: private (Only you) | restricted (Only people with access) | organization (Everyone at your org)"
51592
+ },
51593
+ {
51594
+ flags: "--page <n>",
51595
+ description: "Page number, 1-based (default: 1)"
51596
+ },
51597
+ {
51598
+ flags: "--limit <n>",
51599
+ description: "Rows per page, max 100 (default: 10)"
51600
+ },
51601
+ {
51602
+ flags: "--json",
51603
+ description: "Machine-readable JSON output"
51604
+ }
51605
+ ]
51606
+ };
51607
+ orgVisibilityNote = {
51608
+ title: "Notes",
51609
+ content: "Org artifacts appear only after you have opened them at least once (same rule as the web dashboard)."
51610
+ };
51611
+ artifactListHelp = {
51612
+ name: "artifact list",
51613
+ description: "List every artifact you can see — the same rows as the web dashboard",
51614
+ usage: "tkm artifact list [options]",
51615
+ examples: [
51616
+ {
51617
+ command: "tkm artifact list --access organization --limit 25",
51618
+ description: "List up to 25 org-visible artifacts as a table"
51619
+ },
51620
+ {
51621
+ command: "tkm artifact list --json",
51622
+ description: "Print the first page as machine-readable JSON"
51623
+ }
51624
+ ],
51625
+ optionGroups: [listSearchOptionsGroup],
51626
+ sections: [orgVisibilityNote]
51627
+ };
51628
+ artifactSearchHelp = {
51629
+ name: "artifact search",
51630
+ description: "List artifacts filtered by <term> (title or owner name, case-insensitive)",
51631
+ usage: "tkm artifact search <term> [options]",
51632
+ examples: [
51633
+ {
51634
+ command: "tkm artifact search roadmap --json",
51635
+ description: "Search titles/owners for 'roadmap' and print machine-readable JSON"
51636
+ },
51637
+ {
51638
+ command: "tkm artifact search 'kim' --access organization",
51639
+ description: "Search org-visible artifacts by owner name"
51640
+ }
51641
+ ],
51642
+ optionGroups: [listSearchOptionsGroup],
51643
+ sections: [orgVisibilityNote]
51644
+ };
51586
51645
  });
51587
51646
 
51588
51647
  // src/domains/help/commands/artifact-command-help.ts
@@ -51591,22 +51650,34 @@ var init_artifact_command_help = __esm(() => {
51591
51650
  init_artifact_action_help();
51592
51651
  artifactCommandHelp = {
51593
51652
  name: "artifact",
51594
- description: "Upload, download, and delete Takumi artifacts (upload|download|delete)",
51595
- usage: "tkm artifact <upload|download|delete> [options]",
51653
+ description: "List, search, upload, download, and delete Takumi artifacts (list|search|upload|download|delete)",
51654
+ usage: "tkm artifact <list | search <term> | upload <file|dir> | download <uuid|url> | delete <uuid|url>>",
51596
51655
  examples: [
51597
51656
  {
51598
51657
  command: "tkm artifact upload ./report.html --title 'Weekly Report'",
51599
51658
  description: "Upload a file (or directory) as a new artifact and print its share URL"
51600
51659
  },
51601
51660
  {
51602
- command: "tkm artifact download <uuid|url> -o ./out --ver 3",
51603
- description: "Download a specific version's files into a directory"
51661
+ command: "tkm artifact list --access organization --limit 25",
51662
+ description: "List up to 25 org-visible artifacts as a table"
51663
+ },
51664
+ {
51665
+ command: "tkm artifact search roadmap --json",
51666
+ description: "Search titles/owners for 'roadmap' and print machine-readable JSON"
51604
51667
  }
51605
51668
  ],
51606
51669
  optionGroups: [
51607
51670
  {
51608
51671
  title: "Actions",
51609
51672
  options: [
51673
+ {
51674
+ flags: "list",
51675
+ description: "List your artifacts (filterable, paginated table or --json)"
51676
+ },
51677
+ {
51678
+ flags: "search <term>",
51679
+ description: "List filtered to <term> (title or owner name, case-insensitive)"
51680
+ },
51610
51681
  {
51611
51682
  flags: "upload <file|dir>",
51612
51683
  description: "Upload a file or directory as a new artifact (or new version with --id)"
@@ -51629,6 +51700,8 @@ var init_artifact_command_help = __esm(() => {
51629
51700
  }
51630
51701
  ],
51631
51702
  subcommands: {
51703
+ list: artifactListHelp,
51704
+ search: artifactSearchHelp,
51632
51705
  upload: artifactUploadHelp,
51633
51706
  download: artifactDownloadHelp,
51634
51707
  delete: artifactDeleteHelp
@@ -53976,6 +54049,31 @@ async function presignDownload(token, uuid, version3, paths) {
53976
54049
  }
53977
54050
  return await res.json();
53978
54051
  }
54052
+ async function listArtifacts(token, params = {}) {
54053
+ const base = getServerUrl();
54054
+ const qs = new URLSearchParams;
54055
+ if (params.q)
54056
+ qs.set("q", params.q);
54057
+ if (params.vis)
54058
+ qs.set("vis", params.vis);
54059
+ if (params.page !== undefined)
54060
+ qs.set("page", String(params.page));
54061
+ if (params.limit !== undefined)
54062
+ qs.set("limit", String(params.limit));
54063
+ const suffix = qs.toString() ? `?${qs}` : "";
54064
+ const res = await fetch(`${base}/api/v1/artifacts${suffix}`, {
54065
+ headers: { Authorization: `Bearer ${token}` }
54066
+ });
54067
+ if (!res.ok) {
54068
+ const msg = await parseErrorMessage(res);
54069
+ throw new ArtifactApiError(res.status, `List failed (HTTP ${res.status}): ${msg}`);
54070
+ }
54071
+ const payload = await res.json();
54072
+ if (!Array.isArray(payload?.artifacts) || payload?.pagination == null) {
54073
+ throw new ArtifactApiError(res.status, `List failed (HTTP ${res.status}): unexpected response shape from ${base}/api/v1/artifacts`);
54074
+ }
54075
+ return payload;
54076
+ }
53979
54077
 
53980
54078
  // src/domains/artifact/manifest-store.ts
53981
54079
  init_logger();
@@ -54435,6 +54533,162 @@ async function artifactDownload(ref, opts) {
54435
54533
  console.log(` Total: ${humanizeBytes(total)}`);
54436
54534
  }
54437
54535
 
54536
+ // src/commands/artifact/list-command.ts
54537
+ var import_picocolors17 = __toESM(require_picocolors(), 1);
54538
+ init_logger();
54539
+
54540
+ // src/shared/relative-time.ts
54541
+ function formatRelativeTime(iso, now = Date.now()) {
54542
+ const then = Date.parse(iso);
54543
+ if (Number.isNaN(then))
54544
+ return "—";
54545
+ const diffMs = Math.max(0, now - then);
54546
+ const diffSec = Math.floor(diffMs / 1000);
54547
+ if (diffSec < 60)
54548
+ return "just now";
54549
+ const diffMin = Math.floor(diffSec / 60);
54550
+ if (diffMin < 60)
54551
+ return `${diffMin}m ago`;
54552
+ const diffHour = Math.floor(diffMin / 60);
54553
+ if (diffHour < 24)
54554
+ return `${diffHour}h ago`;
54555
+ const diffDay = Math.floor(diffHour / 24);
54556
+ if (diffDay < 30)
54557
+ return `${diffDay}d ago`;
54558
+ const diffMonth = Math.floor(diffDay / 30);
54559
+ if (diffMonth < 12)
54560
+ return `${diffMonth}mo ago`;
54561
+ const diffYear = Math.floor(diffMonth / 12);
54562
+ return `${diffYear}y ago`;
54563
+ }
54564
+
54565
+ // src/shared/render-table.ts
54566
+ var import_picocolors16 = __toESM(require_picocolors(), 1);
54567
+ function renderTable(header, rows) {
54568
+ const lastCol = header.length - 1;
54569
+ const widths = header.map((h2, col) => Math.max(h2.length, ...rows.map((r2) => r2[col]?.value.length ?? 0)));
54570
+ const padPlain = (text, col) => col === lastCol ? text : text.padEnd(widths[col]);
54571
+ const headerLine = import_picocolors16.default.bold(header.map((h2, col) => padPlain(h2, col)).join(" ").trimEnd());
54572
+ const rowLine = (cells) => cells.map((cell, col) => {
54573
+ const padded = padPlain(cell.value, col);
54574
+ return cell.paint ? cell.paint(padded) : padded;
54575
+ }).join(" ").trimEnd();
54576
+ return [headerLine, ...rows.map(rowLine)].join(`
54577
+ `);
54578
+ }
54579
+
54580
+ // src/commands/artifact/list-command.ts
54581
+ var ACCESS_TO_VIS = {
54582
+ private: "private",
54583
+ restricted: "shared",
54584
+ organization: "org"
54585
+ };
54586
+ var ACCESS_VALUES = Object.keys(ACCESS_TO_VIS);
54587
+ var TITLE_MAX = 32;
54588
+ var OWNER_MAX = 18;
54589
+ function truncate(text, max) {
54590
+ const chars = Array.from(text);
54591
+ return chars.length <= max ? text : `${chars.slice(0, max - 1).join("")}…`;
54592
+ }
54593
+ function paintVis(vis) {
54594
+ if (vis === "shared")
54595
+ return import_picocolors17.default.cyan;
54596
+ if (vis === "org")
54597
+ return import_picocolors17.default.green;
54598
+ return import_picocolors17.default.dim;
54599
+ }
54600
+ function accessLabel(vis, viewerOrgName) {
54601
+ if (vis === "private")
54602
+ return "Only you";
54603
+ if (vis === "shared")
54604
+ return "Only people with access";
54605
+ if (vis === "org")
54606
+ return `Everyone at ${viewerOrgName ?? "org"}`;
54607
+ return vis;
54608
+ }
54609
+ function ownerCell(item) {
54610
+ return item.isOwner ? { value: "you", paint: import_picocolors17.default.dim } : { value: truncate(item.ownerName, OWNER_MAX) };
54611
+ }
54612
+ function threadsCell(item) {
54613
+ return item.openThreads !== null && item.openThreads > 0 ? { value: String(item.openThreads), paint: import_picocolors17.default.yellow } : { value: "—", paint: import_picocolors17.default.dim };
54614
+ }
54615
+ function buildRow(item, viewerOrgName, now) {
54616
+ return [
54617
+ { value: truncate(item.title, TITLE_MAX) },
54618
+ ownerCell(item),
54619
+ { value: accessLabel(item.visibility, viewerOrgName), paint: paintVis(item.visibility) },
54620
+ { value: String(item.live_version) },
54621
+ threadsCell(item),
54622
+ { value: formatRelativeTime(item.updated_at, now) },
54623
+ { value: item.uuid }
54624
+ ];
54625
+ }
54626
+ function describeFilters(q3, access) {
54627
+ const parts = [];
54628
+ if (q3)
54629
+ parts.push(`matching "${q3}"`);
54630
+ if (access)
54631
+ parts.push(`--access ${access}`);
54632
+ return parts.join(" ");
54633
+ }
54634
+ function footerLine(payload) {
54635
+ const { page, totalPages, totalFiltered, pageSize } = payload.pagination;
54636
+ const start = (page - 1) * pageSize + 1;
54637
+ const end = start + payload.artifacts.length - 1;
54638
+ const base = `Showing ${start}-${end} of ${totalFiltered} (page ${page}/${totalPages})`;
54639
+ return page < totalPages ? `${base} · use --page ${page + 1} for the next page` : base;
54640
+ }
54641
+ async function artifactList(term, opts) {
54642
+ if (opts.access !== undefined && !ACCESS_VALUES.includes(opts.access)) {
54643
+ console.error(`Invalid --access: ${opts.access}. Use one of: ${ACCESS_VALUES.join(", ")}`);
54644
+ process.exitCode = 1;
54645
+ return;
54646
+ }
54647
+ const token = await getToken(opts);
54648
+ if (!token)
54649
+ return;
54650
+ const params = {
54651
+ q: term,
54652
+ vis: opts.access !== undefined ? ACCESS_TO_VIS[opts.access] : undefined,
54653
+ page: opts.page,
54654
+ limit: opts.limit
54655
+ };
54656
+ let payload;
54657
+ try {
54658
+ payload = await listArtifacts(token, params);
54659
+ } catch (err) {
54660
+ if (err instanceof ArtifactApiError && err.status === 404) {
54661
+ console.error("Error: this Takumi server does not support artifact listing (needs a newer server version).");
54662
+ process.exitCode = 1;
54663
+ return;
54664
+ }
54665
+ printApiError(err);
54666
+ process.exitCode = 1;
54667
+ return;
54668
+ }
54669
+ if (opts.json) {
54670
+ process.stdout.write(`${JSON.stringify(payload)}
54671
+ `);
54672
+ return;
54673
+ }
54674
+ if (payload.artifacts.length === 0) {
54675
+ const { page, totalPages, totalFiltered } = payload.pagination;
54676
+ if (totalFiltered > 0 && page > totalPages) {
54677
+ logger.info(`Page ${page} is past the last page — ${totalFiltered} artifact(s) match across ${totalPages} page(s). Try --page 1.`);
54678
+ return;
54679
+ }
54680
+ const filters = describeFilters(params.q, opts.access);
54681
+ logger.info(filters ? `No artifacts found for ${filters}.` : "No artifacts found.");
54682
+ return;
54683
+ }
54684
+ const header = ["TITLE", "OWNER", "ACCESS", "VER", "THREADS", "UPDATED", "UUID"];
54685
+ const now = Date.now();
54686
+ const rows = payload.artifacts.map((item) => buildRow(item, payload.viewerOrgName, now));
54687
+ process.stdout.write(`${renderTable(header, rows)}
54688
+ `);
54689
+ logger.info(footerLine(payload));
54690
+ }
54691
+
54438
54692
  // src/commands/artifact/upload-command.ts
54439
54693
  init_dist2();
54440
54694
  import { promises as fs13 } from "node:fs";
@@ -54769,6 +55023,17 @@ function usageError(hint) {
54769
55023
  }
54770
55024
  async function artifactCommand(action, target, opts) {
54771
55025
  switch (action) {
55026
+ case "list":
55027
+ if (target) {
55028
+ return usageError(`tkm artifact search ${target} (list takes no search term)`);
55029
+ }
55030
+ await artifactList(undefined, opts);
55031
+ break;
55032
+ case "search":
55033
+ if (!target)
55034
+ return usageError("tkm artifact search <term>");
55035
+ await artifactList(target, opts);
55036
+ break;
54772
55037
  case "upload":
54773
55038
  if (!target)
54774
55039
  return usageError("tkm artifact upload <file>");
@@ -54785,10 +55050,10 @@ async function artifactCommand(action, target, opts) {
54785
55050
  await artifactDelete(target, opts);
54786
55051
  break;
54787
55052
  case undefined:
54788
- usageError("tkm artifact <upload <file> | download <uuid|url> | delete <uuid|url> [--ver <n>]>");
55053
+ usageError("tkm artifact <list | search <term> | upload <file> | download <uuid|url> | delete <uuid|url> [--ver <n>]>");
54789
55054
  break;
54790
55055
  default:
54791
- console.error(`Unknown artifact action: ${action}. Available: upload, download, delete`);
55056
+ console.error(`Unknown artifact action: ${action}. Available: list, search, upload, download, delete`);
54792
55057
  process.exitCode = 1;
54793
55058
  }
54794
55059
  }
@@ -70624,7 +70889,7 @@ class ReportGenerator {
70624
70889
  }
70625
70890
  // src/domains/health-checks/doctor-ui-renderer.ts
70626
70891
  init_terminal_utils();
70627
- var import_picocolors16 = __toESM(require_picocolors(), 1);
70892
+ var import_picocolors18 = __toESM(require_picocolors(), 1);
70628
70893
 
70629
70894
  class DoctorUIRenderer {
70630
70895
  symbols = getStatusSymbols();
@@ -70636,8 +70901,8 @@ class DoctorUIRenderer {
70636
70901
  const groups = this.groupChecks(summary.checks);
70637
70902
  for (const [groupName, checks] of groups) {
70638
70903
  console.log("│");
70639
- console.log(`│ ${import_picocolors16.default.bold(import_picocolors16.default.cyan(groupName.toUpperCase()))}`);
70640
- console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
70904
+ console.log(`│ ${import_picocolors18.default.bold(import_picocolors18.default.cyan(groupName.toUpperCase()))}`);
70905
+ console.log(`│ ${import_picocolors18.default.dim("─".repeat(50))}`);
70641
70906
  const maxNameLen = Math.max(...checks.map((c2) => c2.name.length));
70642
70907
  const maxMsgLen = Math.max(...checks.map((c2) => c2.message.length));
70643
70908
  for (const check of checks) {
@@ -70649,55 +70914,55 @@ class DoctorUIRenderer {
70649
70914
  }
70650
70915
  renderCheck(check, maxNameLen, maxMsgLen) {
70651
70916
  const symbol = this.getColoredSymbol(check.status);
70652
- const name2 = import_picocolors16.default.bold(check.name.padEnd(maxNameLen));
70917
+ const name2 = import_picocolors18.default.bold(check.name.padEnd(maxNameLen));
70653
70918
  const paddedMsg = check.message.padEnd(maxMsgLen);
70654
70919
  const value = this.colorizeValue(check.status, paddedMsg);
70655
70920
  if (this.verbose && check.command) {
70656
- console.log(`│ ${import_picocolors16.default.dim(`Running: ${check.command}`)}`);
70921
+ console.log(`│ ${import_picocolors18.default.dim(`Running: ${check.command}`)}`);
70657
70922
  }
70658
70923
  let line = `│ ${symbol} ${name2} ${value}`;
70659
70924
  if (this.verbose && check.duration !== undefined) {
70660
- line += ` ${import_picocolors16.default.dim(`(${check.duration}ms)`)}`;
70925
+ line += ` ${import_picocolors18.default.dim(`(${check.duration}ms)`)}`;
70661
70926
  }
70662
70927
  if (check.details) {
70663
70928
  const displayPath = this.verbose ? check.details : this.shortenPath(check.details);
70664
- line += ` ${import_picocolors16.default.dim(displayPath)}`;
70929
+ line += ` ${import_picocolors18.default.dim(displayPath)}`;
70665
70930
  }
70666
70931
  console.log(line);
70667
70932
  if (this.verbose && check.status === "pass" && check.suggestion) {
70668
70933
  const indent = " ".repeat(maxNameLen + 5);
70669
- console.log(`│ ${indent}${import_picocolors16.default.dim(`→ ${check.suggestion}`)}`);
70934
+ console.log(`│ ${indent}${import_picocolors18.default.dim(`→ ${check.suggestion}`)}`);
70670
70935
  }
70671
70936
  if (check.status !== "pass" && check.suggestion) {
70672
70937
  const indent = " ".repeat(maxNameLen + 5);
70673
- console.log(`│ ${indent}${import_picocolors16.default.dim(`→ ${check.suggestion}`)}`);
70938
+ console.log(`│ ${indent}${import_picocolors18.default.dim(`→ ${check.suggestion}`)}`);
70674
70939
  }
70675
70940
  }
70676
70941
  getColoredSymbol(status2) {
70677
70942
  switch (status2) {
70678
70943
  case "pass":
70679
- return import_picocolors16.default.green(this.symbols.pass);
70944
+ return import_picocolors18.default.green(this.symbols.pass);
70680
70945
  case "warn":
70681
- return import_picocolors16.default.yellow(this.symbols.warn);
70946
+ return import_picocolors18.default.yellow(this.symbols.warn);
70682
70947
  case "fail":
70683
- return import_picocolors16.default.red(this.symbols.fail);
70948
+ return import_picocolors18.default.red(this.symbols.fail);
70684
70949
  default:
70685
- return import_picocolors16.default.blue(this.symbols.info);
70950
+ return import_picocolors18.default.blue(this.symbols.info);
70686
70951
  }
70687
70952
  }
70688
70953
  renderHealingSummary(healSummary) {
70689
70954
  console.log("│");
70690
- console.log(`│ ${import_picocolors16.default.bold(import_picocolors16.default.cyan("AUTO-HEAL RESULTS"))}`);
70691
- console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
70955
+ console.log(`│ ${import_picocolors18.default.bold(import_picocolors18.default.cyan("AUTO-HEAL RESULTS"))}`);
70956
+ console.log(`│ ${import_picocolors18.default.dim("─".repeat(50))}`);
70692
70957
  for (const fix of healSummary.fixes) {
70693
- const symbol = fix.success ? import_picocolors16.default.green(this.symbols.pass) : import_picocolors16.default.red(this.symbols.fail);
70694
- console.log(`│ ${symbol} ${import_picocolors16.default.bold(fix.checkName)} ${import_picocolors16.default.dim(fix.message)}`);
70958
+ const symbol = fix.success ? import_picocolors18.default.green(this.symbols.pass) : import_picocolors18.default.red(this.symbols.fail);
70959
+ console.log(`│ ${symbol} ${import_picocolors18.default.bold(fix.checkName)} ${import_picocolors18.default.dim(fix.message)}`);
70695
70960
  if (!fix.success && fix.error) {
70696
- console.log(`│ ${import_picocolors16.default.red(`Error: ${fix.error}`)}`);
70961
+ console.log(`│ ${import_picocolors18.default.red(`Error: ${fix.error}`)}`);
70697
70962
  }
70698
70963
  }
70699
70964
  console.log("│");
70700
- console.log(`│ Fixed: ${import_picocolors16.default.green(String(healSummary.succeeded))}, Failed: ${import_picocolors16.default.red(String(healSummary.failed))}`);
70965
+ console.log(`│ Fixed: ${import_picocolors18.default.green(String(healSummary.succeeded))}, Failed: ${import_picocolors18.default.red(String(healSummary.failed))}`);
70701
70966
  }
70702
70967
  groupChecks(checks) {
70703
70968
  const groups = new Map;
@@ -70711,11 +70976,11 @@ class DoctorUIRenderer {
70711
70976
  colorizeValue(status2, message) {
70712
70977
  switch (status2) {
70713
70978
  case "pass":
70714
- return import_picocolors16.default.green(message);
70979
+ return import_picocolors18.default.green(message);
70715
70980
  case "warn":
70716
- return import_picocolors16.default.yellow(message);
70981
+ return import_picocolors18.default.yellow(message);
70717
70982
  case "fail":
70718
- return import_picocolors16.default.red(message);
70983
+ return import_picocolors18.default.red(message);
70719
70984
  default:
70720
70985
  return message;
70721
70986
  }
@@ -70734,23 +70999,23 @@ class DoctorUIRenderer {
70734
70999
  renderSummaryLine(summary) {
70735
71000
  const parts = [];
70736
71001
  if (summary.passed > 0) {
70737
- parts.push(import_picocolors16.default.green(`${summary.passed} ${this.symbols.pass}`));
71002
+ parts.push(import_picocolors18.default.green(`${summary.passed} ${this.symbols.pass}`));
70738
71003
  }
70739
71004
  if (summary.warnings > 0) {
70740
- parts.push(import_picocolors16.default.yellow(`${summary.warnings} ${this.symbols.warn}`));
71005
+ parts.push(import_picocolors18.default.yellow(`${summary.warnings} ${this.symbols.warn}`));
70741
71006
  }
70742
71007
  if (summary.failed > 0) {
70743
- parts.push(import_picocolors16.default.red(`${summary.failed} ${this.symbols.fail}`));
71008
+ parts.push(import_picocolors18.default.red(`${summary.failed} ${this.symbols.fail}`));
70744
71009
  }
70745
- console.log(`│ ${import_picocolors16.default.dim("─".repeat(50))}`);
71010
+ console.log(`│ ${import_picocolors18.default.dim("─".repeat(50))}`);
70746
71011
  console.log(`│ Summary: ${parts.join(" ")}`);
70747
71012
  console.log("│");
70748
- console.log(`│ ${import_picocolors16.default.dim("Quick Commands:")}`);
70749
- console.log(`│ ${import_picocolors16.default.dim(" tkm init Install/update Takumi in project")}`);
70750
- console.log(`│ ${import_picocolors16.default.dim(" tkm init -g Install/update Takumi globally")}`);
70751
- console.log(`│ ${import_picocolors16.default.dim(" tkm update Update the CLI tool")}`);
70752
- console.log(`│ ${import_picocolors16.default.dim(" tkm uninstall Remove Takumi from project/global")}`);
70753
- console.log(`│ ${import_picocolors16.default.dim(" tkm --help Show all commands")}`);
71013
+ console.log(`│ ${import_picocolors18.default.dim("Quick Commands:")}`);
71014
+ console.log(`│ ${import_picocolors18.default.dim(" tkm init Install/update Takumi in project")}`);
71015
+ console.log(`│ ${import_picocolors18.default.dim(" tkm init -g Install/update Takumi globally")}`);
71016
+ console.log(`│ ${import_picocolors18.default.dim(" tkm update Update the CLI tool")}`);
71017
+ console.log(`│ ${import_picocolors18.default.dim(" tkm uninstall Remove Takumi from project/global")}`);
71018
+ console.log(`│ ${import_picocolors18.default.dim(" tkm --help Show all commands")}`);
70754
71019
  }
70755
71020
  }
70756
71021
  // src/commands/doctor.ts
@@ -78871,7 +79136,7 @@ function releaseEntryToGitHubRelease(entry, kit) {
78871
79136
  init_logger();
78872
79137
  init_dist2();
78873
79138
  init_release_filter();
78874
- var import_picocolors19 = __toESM(require_picocolors(), 1);
79139
+ var import_picocolors21 = __toESM(require_picocolors(), 1);
78875
79140
 
78876
79141
  // src/domains/versioning/selection/version-filter.ts
78877
79142
  var VERSION_PATTERN = /^v?\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/;
@@ -78889,36 +79154,36 @@ function normalizeVersionTag(version3) {
78889
79154
  init_environment();
78890
79155
  init_logger();
78891
79156
  init_dist2();
78892
- var import_picocolors18 = __toESM(require_picocolors(), 1);
79157
+ var import_picocolors20 = __toESM(require_picocolors(), 1);
78893
79158
 
78894
79159
  // src/domains/versioning/version-display.ts
78895
- var import_picocolors17 = __toESM(require_picocolors(), 1);
79160
+ var import_picocolors19 = __toESM(require_picocolors(), 1);
78896
79161
 
78897
79162
  class VersionDisplayFormatter {
78898
79163
  static createBadges(release) {
78899
79164
  const badges = [];
78900
79165
  if (release.isLatestStable) {
78901
- badges.push(import_picocolors17.default.bold(import_picocolors17.default.yellow("[latest]")));
79166
+ badges.push(import_picocolors19.default.bold(import_picocolors19.default.yellow("[latest]")));
78902
79167
  }
78903
79168
  if (release.prerelease || release.isLatestBeta) {
78904
79169
  if (release.isLatestBeta) {
78905
- badges.push(import_picocolors17.default.bold(import_picocolors17.default.magenta("[beta]")));
79170
+ badges.push(import_picocolors19.default.bold(import_picocolors19.default.magenta("[beta]")));
78906
79171
  } else {
78907
- badges.push(import_picocolors17.default.magenta("[prerelease]"));
79172
+ badges.push(import_picocolors19.default.magenta("[prerelease]"));
78908
79173
  }
78909
79174
  } else if (!release.draft) {
78910
- badges.push(import_picocolors17.default.blue("[stable]"));
79175
+ badges.push(import_picocolors19.default.blue("[stable]"));
78911
79176
  }
78912
79177
  if (release.draft) {
78913
- badges.push(import_picocolors17.default.gray("[draft]"));
79178
+ badges.push(import_picocolors19.default.gray("[draft]"));
78914
79179
  }
78915
79180
  return badges.length > 0 ? ` ${badges.join(" ")}` : "";
78916
79181
  }
78917
79182
  static formatChoiceLabel(release) {
78918
- const version3 = import_picocolors17.default.green(release.displayVersion);
79183
+ const version3 = import_picocolors19.default.green(release.displayVersion);
78919
79184
  const badges = VersionDisplayFormatter.createBadges(release);
78920
79185
  const name2 = release.name || "Release";
78921
- return `${version3}${badges} ${import_picocolors17.default.dim(name2)}`;
79186
+ return `${version3}${badges} ${import_picocolors19.default.dim(name2)}`;
78922
79187
  }
78923
79188
  static formatChoiceHint(release) {
78924
79189
  const parts = [];
@@ -78940,7 +79205,7 @@ class VersionDisplayFormatter {
78940
79205
  if (latestStable) {
78941
79206
  options2.push({
78942
79207
  value: latestStable.tag_name,
78943
- label: `${import_picocolors17.default.bold(import_picocolors17.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
79208
+ label: `${import_picocolors19.default.bold(import_picocolors19.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
78944
79209
  hint: "recommended version",
78945
79210
  isLatest: true,
78946
79211
  isPrerelease: false
@@ -78950,7 +79215,7 @@ class VersionDisplayFormatter {
78950
79215
  if (latestBeta) {
78951
79216
  options2.push({
78952
79217
  value: latestBeta.tag_name,
78953
- label: `${import_picocolors17.default.bold(import_picocolors17.default.magenta("Latest Beta"))} (${latestBeta.displayVersion})`,
79218
+ label: `${import_picocolors19.default.bold(import_picocolors19.default.magenta("Latest Beta"))} (${latestBeta.displayVersion})`,
78954
79219
  hint: "latest features, may be unstable",
78955
79220
  isLatest: false,
78956
79221
  isPrerelease: true
@@ -78961,7 +79226,7 @@ class VersionDisplayFormatter {
78961
79226
  static createSeparator() {
78962
79227
  return {
78963
79228
  value: "separator",
78964
- label: import_picocolors17.default.dim("─".repeat(50)),
79229
+ label: import_picocolors19.default.dim("─".repeat(50)),
78965
79230
  hint: undefined,
78966
79231
  isLatest: false,
78967
79232
  isPrerelease: false
@@ -78970,7 +79235,7 @@ class VersionDisplayFormatter {
78970
79235
  static createCancelOption() {
78971
79236
  return {
78972
79237
  value: "cancel",
78973
- label: import_picocolors17.default.red("Cancel"),
79238
+ label: import_picocolors19.default.red("Cancel"),
78974
79239
  hint: "exit version selection",
78975
79240
  isLatest: false,
78976
79241
  isPrerelease: false
@@ -79022,15 +79287,15 @@ class VersionDisplayFormatter {
79022
79287
  return value !== "separator" && value !== "cancel" && value.trim().length > 0;
79023
79288
  }
79024
79289
  static formatError(message, suggestion) {
79025
- let output2 = import_picocolors17.default.red(`Error: ${message}`);
79290
+ let output2 = import_picocolors19.default.red(`Error: ${message}`);
79026
79291
  if (suggestion) {
79027
79292
  output2 += `
79028
- ${import_picocolors17.default.dim(suggestion)}`;
79293
+ ${import_picocolors19.default.dim(suggestion)}`;
79029
79294
  }
79030
79295
  return output2;
79031
79296
  }
79032
79297
  static formatSuccess(version3, kitName) {
79033
- return `${import_picocolors17.default.green("✓")} Selected ${import_picocolors17.default.bold(version3)} for ${import_picocolors17.default.bold(kitName)}`;
79298
+ return `${import_picocolors19.default.green("✓")} Selected ${import_picocolors19.default.bold(version3)} for ${import_picocolors19.default.bold(kitName)}`;
79034
79299
  }
79035
79300
  }
79036
79301
 
@@ -79040,7 +79305,7 @@ async function handleNoReleases(kit, allowManualEntry) {
79040
79305
  This could be due to:
79041
79306
  • No releases published yet
79042
79307
  • Network connectivity issues
79043
- • Repository access permissions`, import_picocolors18.default.yellow("No Releases Available"));
79308
+ • Repository access permissions`, import_picocolors20.default.yellow("No Releases Available"));
79044
79309
  if (!allowManualEntry) {
79045
79310
  throw new Error(`No releases available for ${kit.name}`);
79046
79311
  }
@@ -79100,34 +79365,34 @@ async function createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry
79100
79365
  if (latestStable) {
79101
79366
  clackChoices.push({
79102
79367
  value: latestStable.tag_name,
79103
- label: `${import_picocolors18.default.bold(import_picocolors18.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
79368
+ label: `${import_picocolors20.default.bold(import_picocolors20.default.green("Latest Stable"))} (${latestStable.displayVersion})`,
79104
79369
  hint: "recommended"
79105
79370
  });
79106
79371
  }
79107
79372
  if (allowManualEntry) {
79108
79373
  clackChoices.push({
79109
79374
  value: "manual-entry",
79110
- label: import_picocolors18.default.cyan("↳ Enter Version Manually"),
79375
+ label: import_picocolors20.default.cyan("↳ Enter Version Manually"),
79111
79376
  hint: "for older versions"
79112
79377
  });
79113
79378
  }
79114
79379
  clackChoices.push({
79115
79380
  value: "cancel",
79116
- label: import_picocolors18.default.red("✕ Cancel")
79381
+ label: import_picocolors20.default.red("✕ Cancel")
79117
79382
  });
79118
79383
  const versionChoices = choices.filter((choice) => choice.value !== "separator" && choice.value !== "cancel");
79119
79384
  for (const choice of versionChoices) {
79120
79385
  const isCurrentlyInstalled = currentVersion && (choice.value === currentVersion || choice.value === `v${currentVersion}`);
79121
- const installedMarker = isCurrentlyInstalled ? import_picocolors18.default.cyan(" (installed)") : "";
79386
+ const installedMarker = isCurrentlyInstalled ? import_picocolors20.default.cyan(" (installed)") : "";
79122
79387
  clackChoices.push({
79123
79388
  value: choice.value,
79124
79389
  label: `${choice.label}${installedMarker}`,
79125
79390
  hint: choice.hint
79126
79391
  });
79127
79392
  }
79128
- const currentVersionHint = currentVersion ? import_picocolors18.default.dim(` (current: ${currentVersion})`) : "";
79393
+ const currentVersionHint = currentVersion ? import_picocolors20.default.dim(` (current: ${currentVersion})`) : "";
79129
79394
  const selected = await ie({
79130
- message: `Select version for ${import_picocolors18.default.bold(kit.name)}${currentVersionHint}:`,
79395
+ message: `Select version for ${import_picocolors20.default.bold(kit.name)}${currentVersionHint}:`,
79131
79396
  options: clackChoices,
79132
79397
  initialValue: latestStable?.tag_name
79133
79398
  });
@@ -79152,15 +79417,15 @@ async function createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry
79152
79417
  async function handleSelectionError(error, kit, allowManualEntry, retryCallback) {
79153
79418
  logger.error(`Version selection error: ${error.message}`);
79154
79419
  if (error.message.includes("401") || error.message.includes("403")) {
79155
- le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: tkm auth"), import_picocolors18.default.red("Authentication Error"));
79420
+ le(VersionDisplayFormatter.formatError("Authentication failed", "Please check your GitHub token with: tkm auth"), import_picocolors20.default.red("Authentication Error"));
79156
79421
  } else if (error.message.includes("404")) {
79157
- le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"), import_picocolors18.default.red("Access Error"));
79422
+ le(VersionDisplayFormatter.formatError("Repository access denied", "Make sure you have access to the repository"), import_picocolors20.default.red("Access Error"));
79158
79423
  } else if (error.message.includes("rate limit") || error.message.includes("403")) {
79159
- le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"), import_picocolors18.default.yellow("Rate Limited"));
79424
+ le(VersionDisplayFormatter.formatError("GitHub API rate limit exceeded", "Please wait a moment and try again"), import_picocolors20.default.yellow("Rate Limited"));
79160
79425
  } else if (error.message.includes("network") || error.message.includes("ENOTFOUND")) {
79161
- le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"), import_picocolors18.default.yellow("Network Error"));
79426
+ le(VersionDisplayFormatter.formatError("Network connection failed", "Please check your internet connection"), import_picocolors20.default.yellow("Network Error"));
79162
79427
  } else {
79163
- le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"), import_picocolors18.default.red("Error"));
79428
+ le(VersionDisplayFormatter.formatError(error.message || "Unknown error occurred", "Please try again or contact support"), import_picocolors20.default.red("Error"));
79164
79429
  }
79165
79430
  if (isNonInteractive()) {
79166
79431
  logger.warning("Non-interactive mode: version selection failed, cannot retry");
@@ -79222,7 +79487,7 @@ class VersionSelector {
79222
79487
  } = options2;
79223
79488
  try {
79224
79489
  const loadingSpinner = de();
79225
- loadingSpinner.start(`Fetching versions for ${import_picocolors19.default.bold(kit.name)}...`);
79490
+ loadingSpinner.start(`Fetching versions for ${import_picocolors21.default.bold(kit.name)}...`);
79226
79491
  let releases;
79227
79492
  if (useGh) {
79228
79493
  releases = await this.githubClient.listReleasesWithCache(kit, {
@@ -79859,12 +80124,12 @@ import * as path10 from "node:path";
79859
80124
  // src/domains/github/auth-prompt.ts
79860
80125
  init_dist2();
79861
80126
  init_github_auth();
79862
- var import_picocolors20 = __toESM(require_picocolors(), 1);
80127
+ var import_picocolors22 = __toESM(require_picocolors(), 1);
79863
80128
  async function promptForAuth() {
79864
80129
  const hasGit = GitCloneManager.isGitInstalled();
79865
80130
  const hasSshKeys = hasGit && GitCloneManager.hasSshKeys();
79866
80131
  const hasGhCli = AuthManager.isGhCliInstalled();
79867
- oe(import_picocolors20.default.yellow("No GitHub authentication found"));
80132
+ oe(import_picocolors22.default.yellow("No GitHub authentication found"));
79868
80133
  const options2 = [];
79869
80134
  if (hasGit) {
79870
80135
  const hint = hasSshKeys ? "SSH keys detected" : "Will use HTTPS";
@@ -79917,7 +80182,7 @@ async function promptForAuth() {
79917
80182
  return { method: "cancel" };
79918
80183
  }
79919
80184
  if (typeof token === "string" && token.startsWith("github_pat_")) {
79920
- le(import_picocolors20.default.yellow(`⚠️ Fine-grained PATs cannot access repos where you're a collaborator.
80185
+ le(import_picocolors22.default.yellow(`⚠️ Fine-grained PATs cannot access repos where you're a collaborator.
79921
80186
  ` + " If you encounter access issues, use a Classic PAT instead."));
79922
80187
  }
79923
80188
  return { method: "token", token };
@@ -79960,7 +80225,7 @@ import { join as join117 } from "node:path";
79960
80225
  // src/shared/progress-bar.ts
79961
80226
  init_output_manager();
79962
80227
  init_terminal_utils();
79963
- var import_picocolors21 = __toESM(require_picocolors(), 1);
80228
+ var import_picocolors23 = __toESM(require_picocolors(), 1);
79964
80229
  var BAR_CHARS = {
79965
80230
  unicode: { filled: "█", empty: "░" },
79966
80231
  ascii: { filled: "=", empty: "-" }
@@ -80018,7 +80283,7 @@ class ProgressBar {
80018
80283
  this.clearLine();
80019
80284
  if (message) {
80020
80285
  const symbols = output.getSymbols();
80021
- console.log(`${import_picocolors21.default.green(symbols.success)} ${message}`);
80286
+ console.log(`${import_picocolors23.default.green(symbols.success)} ${message}`);
80022
80287
  }
80023
80288
  }
80024
80289
  clearLine() {
@@ -85650,7 +85915,7 @@ function filterDeletionPaths(trackedFiles, deletions) {
85650
85915
  }
85651
85916
  // src/domains/sync/merge-ui.ts
85652
85917
  init_dist2();
85653
- var import_picocolors22 = __toESM(require_picocolors(), 1);
85918
+ var import_picocolors24 = __toESM(require_picocolors(), 1);
85654
85919
  var HUNK_SEPARATOR_WIDTH = 50;
85655
85920
  var EXTENDED_CONTEXT_LINES = 10;
85656
85921
  var MAX_LINE_DISPLAY_LENGTH = 120;
@@ -85669,21 +85934,21 @@ class MergeUI {
85669
85934
  static async promptHunk(hunk, hunkIndex, totalHunks, _filename) {
85670
85935
  requireTTY();
85671
85936
  const lineRange = `${hunk.oldStart}-${hunk.oldStart + hunk.oldLines - 1}`;
85672
- console.log(import_picocolors22.default.cyan(`
85937
+ console.log(import_picocolors24.default.cyan(`
85673
85938
  Hunk ${hunkIndex + 1}/${totalHunks}: Lines ${lineRange}`));
85674
- console.log(import_picocolors22.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85939
+ console.log(import_picocolors24.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85675
85940
  for (const line of hunk.lines) {
85676
85941
  const displayLine = truncateLine(line);
85677
85942
  const prefix = line[0];
85678
85943
  if (prefix === "+") {
85679
- console.log(import_picocolors22.default.green(displayLine));
85944
+ console.log(import_picocolors24.default.green(displayLine));
85680
85945
  } else if (prefix === "-") {
85681
- console.log(import_picocolors22.default.red(displayLine));
85946
+ console.log(import_picocolors24.default.red(displayLine));
85682
85947
  } else {
85683
- console.log(import_picocolors22.default.dim(displayLine));
85948
+ console.log(import_picocolors24.default.dim(displayLine));
85684
85949
  }
85685
85950
  }
85686
- console.log(import_picocolors22.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85951
+ console.log(import_picocolors24.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85687
85952
  const action = await ie({
85688
85953
  message: "Action?",
85689
85954
  options: [
@@ -85703,21 +85968,21 @@ Hunk ${hunkIndex + 1}/${totalHunks}: Lines ${lineRange}`));
85703
85968
  `);
85704
85969
  const startLine = Math.max(0, hunk.oldStart - 1 - contextLines);
85705
85970
  const endLine = Math.min(lines.length, hunk.oldStart + hunk.oldLines - 1 + contextLines);
85706
- console.log(import_picocolors22.default.cyan(`
85971
+ console.log(import_picocolors24.default.cyan(`
85707
85972
  Extended context (lines ${startLine + 1}-${endLine}):`));
85708
- console.log(import_picocolors22.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85973
+ console.log(import_picocolors24.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85709
85974
  for (let i = startLine;i < endLine; i++) {
85710
85975
  const lineNum = String(i + 1).padStart(4, " ");
85711
85976
  const isInHunk = i >= hunk.oldStart - 1 && i < hunk.oldStart - 1 + hunk.oldLines;
85712
- const prefix = isInHunk ? import_picocolors22.default.yellow("*") : " ";
85713
- console.log(`${import_picocolors22.default.dim(lineNum)} ${prefix} ${lines[i]}`);
85977
+ const prefix = isInHunk ? import_picocolors24.default.yellow("*") : " ";
85978
+ console.log(`${import_picocolors24.default.dim(lineNum)} ${prefix} ${lines[i]}`);
85714
85979
  }
85715
- console.log(import_picocolors22.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85980
+ console.log(import_picocolors24.default.dim("─".repeat(HUNK_SEPARATOR_WIDTH)));
85716
85981
  }
85717
85982
  static async mergeFile(filename, currentContent, _newContent, hunks) {
85718
- console.log(import_picocolors22.default.bold(`
85983
+ console.log(import_picocolors24.default.bold(`
85719
85984
  ━━━ ${filename} ━━━`));
85720
- console.log(import_picocolors22.default.dim(`${hunks.length} change${hunks.length === 1 ? "" : "s"} to review
85985
+ console.log(import_picocolors24.default.dim(`${hunks.length} change${hunks.length === 1 ? "" : "s"} to review
85721
85986
  `));
85722
85987
  const decisions = [];
85723
85988
  for (let i = 0;i < hunks.length; i++) {
@@ -85740,19 +86005,19 @@ Extended context (lines ${startLine + 1}-${endLine}):`));
85740
86005
  }
85741
86006
  static displayMergeSummary(filename, applied, rejected) {
85742
86007
  if (applied > 0 && rejected > 0) {
85743
- console.log(import_picocolors22.default.dim(` ${filename}: `) + import_picocolors22.default.green(`${applied} applied`) + import_picocolors22.default.dim(", ") + import_picocolors22.default.yellow(`${rejected} rejected`));
86008
+ console.log(import_picocolors24.default.dim(` ${filename}: `) + import_picocolors24.default.green(`${applied} applied`) + import_picocolors24.default.dim(", ") + import_picocolors24.default.yellow(`${rejected} rejected`));
85744
86009
  } else if (applied > 0) {
85745
- console.log(import_picocolors22.default.dim(` ${filename}: `) + import_picocolors22.default.green(`${applied} applied`));
86010
+ console.log(import_picocolors24.default.dim(` ${filename}: `) + import_picocolors24.default.green(`${applied} applied`));
85746
86011
  } else {
85747
- console.log(import_picocolors22.default.dim(` ${filename}: `) + import_picocolors22.default.yellow(`${rejected} rejected`));
86012
+ console.log(import_picocolors24.default.dim(` ${filename}: `) + import_picocolors24.default.yellow(`${rejected} rejected`));
85748
86013
  }
85749
86014
  }
85750
86015
  static displaySkipped(filename) {
85751
- console.log(import_picocolors22.default.dim(` ${filename}: `) + import_picocolors22.default.yellow("skipped"));
86016
+ console.log(import_picocolors24.default.dim(` ${filename}: `) + import_picocolors24.default.yellow("skipped"));
85752
86017
  }
85753
86018
  }
85754
86019
  // src/domains/sync/notification-display.ts
85755
- var import_picocolors23 = __toESM(require_picocolors(), 1);
86020
+ var import_picocolors25 = __toESM(require_picocolors(), 1);
85756
86021
  import { stdout } from "node:process";
85757
86022
  function createNotificationBox2(borderColor, boxWidth) {
85758
86023
  const contentWidth = boxWidth - 2;
@@ -85776,19 +86041,19 @@ function displayConfigUpdateNotification(entries, isGlobal = false) {
85776
86041
  const lines = entries.map(({ kit, currentVersion, latestVersion }) => {
85777
86042
  const cur = currentVersion.replace(/^v/, "");
85778
86043
  const latest = latestVersion.replace(/^v/, "");
85779
- const text = `${import_picocolors23.default.bold(kit)}: ${import_picocolors23.default.dim(cur)} ${import_picocolors23.default.white("→")} ${import_picocolors23.default.green(import_picocolors23.default.bold(latest))}`;
86044
+ const text = `${import_picocolors25.default.bold(kit)}: ${import_picocolors25.default.dim(cur)} ${import_picocolors25.default.white("→")} ${import_picocolors25.default.green(import_picocolors25.default.bold(latest))}`;
85780
86045
  const visibleLen = kit.length + 2 + cur.length + 3 + latest.length;
85781
86046
  return { text, visibleLen };
85782
86047
  });
85783
86048
  const updateCmd = isGlobal ? "tkm init -g --sync" : "tkm init --sync";
85784
- const commandText = `Run: ${import_picocolors23.default.cyan(import_picocolors23.default.bold(updateCmd))}`;
86049
+ const commandText = `Run: ${import_picocolors25.default.cyan(import_picocolors25.default.bold(updateCmd))}`;
85785
86050
  const commandLen = `Run: ${updateCmd}`.length;
85786
86051
  const headerLabel = "\uD83D\uDCE6 Config Updates Available";
85787
- const headerText = import_picocolors23.default.bold(import_picocolors23.default.yellow(headerLabel));
86052
+ const headerText = import_picocolors25.default.bold(import_picocolors25.default.yellow(headerLabel));
85788
86053
  const longestLine = Math.max(headerLabel.length, commandLen, ...lines.map((l2) => l2.visibleLen));
85789
86054
  const terminalWidth = stdout.columns || 80;
85790
86055
  const boxWidth = Math.min(Math.max(longestLine + 6, 52), terminalWidth - 4);
85791
- const { topBorder, bottomBorder, emptyLine, padLine } = createNotificationBox2(import_picocolors23.default.cyan, boxWidth);
86056
+ const { topBorder, bottomBorder, emptyLine, padLine } = createNotificationBox2(import_picocolors25.default.cyan, boxWidth);
85792
86057
  console.log("");
85793
86058
  console.log(topBorder);
85794
86059
  console.log(emptyLine);
@@ -85811,7 +86076,7 @@ init_manifest_reader();
85811
86076
  init_logger();
85812
86077
  init_path_resolver();
85813
86078
  var import_fs_extra36 = __toESM(require_lib(), 1);
85814
- var import_picocolors24 = __toESM(require_picocolors(), 1);
86079
+ var import_picocolors26 = __toESM(require_picocolors(), 1);
85815
86080
  async function handleSync(ctx) {
85816
86081
  if (!ctx.options.sync) {
85817
86082
  return ctx;
@@ -85996,7 +86261,7 @@ async function executeSyncMerge(ctx) {
85996
86261
  }
85997
86262
  const backupDir = PathResolver.getBackupDir();
85998
86263
  await createBackup(ctx.claudeDir, trackedFiles, backupDir);
85999
- logger.success(`Backup created at ${import_picocolors24.default.dim(backupDir)}`);
86264
+ logger.success(`Backup created at ${import_picocolors26.default.dim(backupDir)}`);
86000
86265
  if (plan.autoUpdate.length > 0) {
86001
86266
  logger.info(`Auto-updating ${plan.autoUpdate.length} file(s)...`);
86002
86267
  let updateSuccess = 0;
@@ -86106,22 +86371,22 @@ async function executeSyncMerge(ctx) {
86106
86371
  totalRejected += result.rejected;
86107
86372
  }
86108
86373
  console.log("");
86109
- console.log(import_picocolors24.default.bold("Sync Summary:"));
86110
- console.log(import_picocolors24.default.dim("─".repeat(40)));
86374
+ console.log(import_picocolors26.default.bold("Sync Summary:"));
86375
+ console.log(import_picocolors26.default.dim("─".repeat(40)));
86111
86376
  if (plan.autoUpdate.length > 0) {
86112
- console.log(import_picocolors24.default.green(` ✓ ${plan.autoUpdate.length} file(s) auto-updated`));
86377
+ console.log(import_picocolors26.default.green(` ✓ ${plan.autoUpdate.length} file(s) auto-updated`));
86113
86378
  }
86114
86379
  if (totalApplied > 0) {
86115
- console.log(import_picocolors24.default.green(` ✓ ${totalApplied} hunk(s) applied`));
86380
+ console.log(import_picocolors26.default.green(` ✓ ${totalApplied} hunk(s) applied`));
86116
86381
  }
86117
86382
  if (totalRejected > 0) {
86118
- console.log(import_picocolors24.default.yellow(` ○ ${totalRejected} hunk(s) rejected`));
86383
+ console.log(import_picocolors26.default.yellow(` ○ ${totalRejected} hunk(s) rejected`));
86119
86384
  }
86120
86385
  if (skippedFiles > 0) {
86121
- console.log(import_picocolors24.default.yellow(` ○ ${skippedFiles} file(s) skipped`));
86386
+ console.log(import_picocolors26.default.yellow(` ○ ${skippedFiles} file(s) skipped`));
86122
86387
  }
86123
86388
  if (plan.skipped.length > 0) {
86124
- console.log(import_picocolors24.default.dim(` ─ ${plan.skipped.length} user-owned file(s) unchanged`));
86389
+ console.log(import_picocolors26.default.dim(` ─ ${plan.skipped.length} user-owned file(s) unchanged`));
86125
86390
  }
86126
86391
  } else if (plan.needsReview.length > 0 && ctx.isNonInteractive) {
86127
86392
  logger.error(`Cannot complete sync: ${plan.needsReview.length} file(s) require interactive review`);
@@ -86144,30 +86409,30 @@ Options:
86144
86409
  }
86145
86410
  function displaySyncPlan(plan) {
86146
86411
  console.log("");
86147
- console.log(import_picocolors24.default.bold("Sync Plan:"));
86148
- console.log(import_picocolors24.default.dim("─".repeat(40)));
86412
+ console.log(import_picocolors26.default.bold("Sync Plan:"));
86413
+ console.log(import_picocolors26.default.dim("─".repeat(40)));
86149
86414
  if (plan.autoUpdate.length > 0) {
86150
- console.log(import_picocolors24.default.green(` ${plan.autoUpdate.length} file(s) will be auto-updated`));
86415
+ console.log(import_picocolors26.default.green(` ${plan.autoUpdate.length} file(s) will be auto-updated`));
86151
86416
  for (const file of plan.autoUpdate.slice(0, 5)) {
86152
- console.log(import_picocolors24.default.dim(` • ${file.path}`));
86417
+ console.log(import_picocolors26.default.dim(` • ${file.path}`));
86153
86418
  }
86154
86419
  if (plan.autoUpdate.length > 5) {
86155
- console.log(import_picocolors24.default.dim(` ... and ${plan.autoUpdate.length - 5} more`));
86420
+ console.log(import_picocolors26.default.dim(` ... and ${plan.autoUpdate.length - 5} more`));
86156
86421
  }
86157
86422
  }
86158
86423
  if (plan.needsReview.length > 0) {
86159
- console.log(import_picocolors24.default.yellow(` ${plan.needsReview.length} file(s) need interactive review`));
86424
+ console.log(import_picocolors26.default.yellow(` ${plan.needsReview.length} file(s) need interactive review`));
86160
86425
  for (const file of plan.needsReview.slice(0, 5)) {
86161
- console.log(import_picocolors24.default.dim(` • ${file.path}`));
86426
+ console.log(import_picocolors26.default.dim(` • ${file.path}`));
86162
86427
  }
86163
86428
  if (plan.needsReview.length > 5) {
86164
- console.log(import_picocolors24.default.dim(` ... and ${plan.needsReview.length - 5} more`));
86429
+ console.log(import_picocolors26.default.dim(` ... and ${plan.needsReview.length - 5} more`));
86165
86430
  }
86166
86431
  }
86167
86432
  if (plan.skipped.length > 0) {
86168
- console.log(import_picocolors24.default.dim(` ${plan.skipped.length} user-owned file(s) will be skipped`));
86433
+ console.log(import_picocolors26.default.dim(` ${plan.skipped.length} user-owned file(s) will be skipped`));
86169
86434
  }
86170
- console.log(import_picocolors24.default.dim("─".repeat(40)));
86435
+ console.log(import_picocolors26.default.dim("─".repeat(40)));
86171
86436
  }
86172
86437
  async function createBackup(claudeDir, files, backupDir) {
86173
86438
  await mkdir28(backupDir, { recursive: true });
@@ -87828,26 +88093,14 @@ async function addCommand(service, options2 = {}) {
87828
88093
  }
87829
88094
  // src/commands/mcp/list-command.ts
87830
88095
  init_logger();
87831
- var import_picocolors25 = __toESM(require_picocolors(), 1);
88096
+ var import_picocolors27 = __toESM(require_picocolors(), 1);
87832
88097
  function statusCell(configured) {
87833
- return configured ? { value: "● configured", paint: import_picocolors25.default.green } : { value: "○ not set", paint: import_picocolors25.default.dim };
87834
- }
87835
- function renderTable(header, rows) {
87836
- const lastCol = header.length - 1;
87837
- const widths = header.map((h2, col) => Math.max(h2.length, ...rows.map((r2) => r2[col]?.value.length ?? 0)));
87838
- const padPlain = (text, col) => col === lastCol ? text : text.padEnd(widths[col]);
87839
- const headerLine = import_picocolors25.default.bold(header.map((h2, col) => padPlain(h2, col)).join(" ").trimEnd());
87840
- const rowLine = (cells) => cells.map((cell, col) => {
87841
- const padded = padPlain(cell.value, col);
87842
- return cell.paint ? cell.paint(padded) : padded;
87843
- }).join(" ").trimEnd();
87844
- return [headerLine, ...rows.map(rowLine)].join(`
87845
- `);
88098
+ return configured ? { value: "● configured", paint: import_picocolors27.default.green } : { value: "○ not set", paint: import_picocolors27.default.dim };
87846
88099
  }
87847
- async function listCommand(options2 = {}) {
88100
+ async function listCommand(options2 = {}, deps) {
87848
88101
  let listed;
87849
88102
  try {
87850
- listed = await runList();
88103
+ listed = await runList(deps);
87851
88104
  } catch (error) {
87852
88105
  if (error instanceof RegistryUnavailableError) {
87853
88106
  logger.error(error.message);
@@ -88685,7 +88938,7 @@ function buildPlanSummary(planFile) {
88685
88938
  // src/commands/plan/plan-read-handlers.ts
88686
88939
  init_logger();
88687
88940
  init_output_manager();
88688
- var import_picocolors26 = __toESM(require_picocolors(), 1);
88941
+ var import_picocolors28 = __toESM(require_picocolors(), 1);
88689
88942
  async function handleParse(target, options2) {
88690
88943
  const planFile = resolvePlanFile(target);
88691
88944
  if (!planFile) {
@@ -88708,7 +88961,7 @@ async function handleParse(target, options2) {
88708
88961
  }
88709
88962
  const title = typeof frontmatter.title === "string" ? frontmatter.title : basename21(dirname41(planFile));
88710
88963
  console.log();
88711
- console.log(import_picocolors26.default.bold(` Plan: ${title}`));
88964
+ console.log(import_picocolors28.default.bold(` Plan: ${title}`));
88712
88965
  console.log(` File: ${planFile}`);
88713
88966
  console.log(` Phases found: ${phases.length}`);
88714
88967
  console.log();
@@ -88739,7 +88992,7 @@ async function handleValidate(target, options2) {
88739
88992
  return;
88740
88993
  }
88741
88994
  console.log();
88742
- console.log(import_picocolors26.default.bold(` Validating: ${planFile}`));
88995
+ console.log(import_picocolors28.default.bold(` Validating: ${planFile}`));
88743
88996
  console.log();
88744
88997
  if (result.issues.length === 0) {
88745
88998
  console.log(` [OK] No issues found — ${result.phases.length} phases detected`);
@@ -88753,7 +89006,7 @@ async function handleValidate(target, options2) {
88753
89006
  }
88754
89007
  }
88755
89008
  console.log();
88756
- const validStr = result.valid ? import_picocolors26.default.green("[OK] Valid") : import_picocolors26.default.red("[X] Invalid");
89009
+ const validStr = result.valid ? import_picocolors28.default.green("[OK] Valid") : import_picocolors28.default.red("[X] Invalid");
88757
89010
  console.log(` ${validStr} — ${result.issues.filter((i) => i.severity === "error").length} errors, ${result.issues.filter((i) => i.severity === "warning").length} warnings`);
88758
89011
  console.log();
88759
89012
  if (!result.valid)
@@ -88780,14 +89033,14 @@ async function handleStatus(target, options2) {
88780
89033
  return;
88781
89034
  }
88782
89035
  console.log();
88783
- console.log(import_picocolors26.default.bold(` Plans in: ${plansDir}`));
89036
+ console.log(import_picocolors28.default.bold(` Plans in: ${plansDir}`));
88784
89037
  console.log();
88785
89038
  for (const pf of planFiles) {
88786
89039
  try {
88787
89040
  const s3 = buildPlanSummary(pf);
88788
89041
  const bar = progressBar(s3.completed, s3.totalPhases);
88789
89042
  const title2 = s3.title ?? basename21(dirname41(pf));
88790
- console.log(` ${import_picocolors26.default.bold(title2)}`);
89043
+ console.log(` ${import_picocolors28.default.bold(title2)}`);
88791
89044
  console.log(` ${bar}`);
88792
89045
  if (s3.inProgress > 0)
88793
89046
  console.log(` [~] ${s3.inProgress} in progress`);
@@ -88819,7 +89072,7 @@ async function handleStatus(target, options2) {
88819
89072
  }
88820
89073
  const title = summary.title ?? basename21(dirname41(planFile));
88821
89074
  console.log();
88822
- console.log(import_picocolors26.default.bold(` ${title}`));
89075
+ console.log(import_picocolors28.default.bold(` ${title}`));
88823
89076
  if (summary.status)
88824
89077
  console.log(` Status: ${summary.status}`);
88825
89078
  console.log();
@@ -88845,7 +89098,7 @@ async function handleKanban(target, _options) {
88845
89098
  // src/commands/plan/plan-write-handlers.ts
88846
89099
  import { basename as basename22, relative as relative22, resolve as resolve34 } from "node:path";
88847
89100
  init_output_manager();
88848
- var import_picocolors27 = __toESM(require_picocolors(), 1);
89101
+ var import_picocolors29 = __toESM(require_picocolors(), 1);
88849
89102
  async function handleCreate(target, options2) {
88850
89103
  if (!options2.title) {
88851
89104
  output.error("[X] --title is required for create");
@@ -88892,7 +89145,7 @@ async function handleCreate(target, options2) {
88892
89145
  return;
88893
89146
  }
88894
89147
  console.log();
88895
- console.log(import_picocolors27.default.bold(` [OK] Plan created: ${options2.title}`));
89148
+ console.log(import_picocolors29.default.bold(` [OK] Plan created: ${options2.title}`));
88896
89149
  console.log(` Directory: ${resolve34(dir)}`);
88897
89150
  console.log(` Phases: ${result.phaseFiles.length}`);
88898
89151
  for (const f4 of result.phaseFiles) {
@@ -90051,7 +90304,7 @@ init_manifest_writer();
90051
90304
  init_logger();
90052
90305
  init_safe_prompts();
90053
90306
  init_types2();
90054
- var import_picocolors29 = __toESM(require_picocolors(), 1);
90307
+ var import_picocolors31 = __toESM(require_picocolors(), 1);
90055
90308
 
90056
90309
  // src/commands/uninstall/installation-detector.ts
90057
90310
  init_paths();
@@ -90110,7 +90363,7 @@ init_ownership_checker();
90110
90363
  init_logger();
90111
90364
  init_safe_prompts();
90112
90365
  init_takumi_constants();
90113
- var import_picocolors28 = __toESM(require_picocolors(), 1);
90366
+ var import_picocolors30 = __toESM(require_picocolors(), 1);
90114
90367
  import { existsSync as existsSync70, readdirSync as readdirSync13, rmSync as rmSync10 } from "node:fs";
90115
90368
  import { dirname as dirname43, join as join141 } from "node:path";
90116
90369
  function listPresentManifestNames(installPath) {
@@ -90215,27 +90468,27 @@ async function analyzeInstallation(installation, forceOverwrite, kit) {
90215
90468
  }
90216
90469
  function displayDryRunPreview(analysis, installationType) {
90217
90470
  console.log("");
90218
- log.info(import_picocolors28.default.bold(`DRY RUN - Preview for ${installationType} installation:`));
90471
+ log.info(import_picocolors30.default.bold(`DRY RUN - Preview for ${installationType} installation:`));
90219
90472
  console.log("");
90220
90473
  if (analysis.toDelete.length > 0) {
90221
- console.log(import_picocolors28.default.red(import_picocolors28.default.bold(`Files to DELETE (${analysis.toDelete.length}):`)));
90474
+ console.log(import_picocolors30.default.red(import_picocolors30.default.bold(`Files to DELETE (${analysis.toDelete.length}):`)));
90222
90475
  const showDelete = analysis.toDelete.slice(0, 10);
90223
90476
  for (const item of showDelete) {
90224
- console.log(` ${import_picocolors28.default.red("✖")} ${item.path}`);
90477
+ console.log(` ${import_picocolors30.default.red("✖")} ${item.path}`);
90225
90478
  }
90226
90479
  if (analysis.toDelete.length > 10) {
90227
- console.log(import_picocolors28.default.gray(` ... and ${analysis.toDelete.length - 10} more`));
90480
+ console.log(import_picocolors30.default.gray(` ... and ${analysis.toDelete.length - 10} more`));
90228
90481
  }
90229
90482
  console.log("");
90230
90483
  }
90231
90484
  if (analysis.toPreserve.length > 0) {
90232
- console.log(import_picocolors28.default.green(import_picocolors28.default.bold(`Files to PRESERVE (${analysis.toPreserve.length}):`)));
90485
+ console.log(import_picocolors30.default.green(import_picocolors30.default.bold(`Files to PRESERVE (${analysis.toPreserve.length}):`)));
90233
90486
  const showPreserve = analysis.toPreserve.slice(0, 10);
90234
90487
  for (const item of showPreserve) {
90235
- console.log(` ${import_picocolors28.default.green("✓")} ${item.path} ${import_picocolors28.default.gray(`(${item.reason})`)}`);
90488
+ console.log(` ${import_picocolors30.default.green("✓")} ${item.path} ${import_picocolors30.default.gray(`(${item.reason})`)}`);
90236
90489
  }
90237
90490
  if (analysis.toPreserve.length > 10) {
90238
- console.log(import_picocolors28.default.gray(` ... and ${analysis.toPreserve.length - 10} more`));
90491
+ console.log(import_picocolors30.default.gray(` ... and ${analysis.toPreserve.length - 10} more`));
90239
90492
  }
90240
90493
  console.log("");
90241
90494
  }
@@ -90357,15 +90610,15 @@ function displayInstallations(installations, scope) {
90357
90610
  const hasLegacy = installations.some((i) => !i.hasMetadata);
90358
90611
  const lines = installations.map((i) => {
90359
90612
  const typeLabel = i.type === "local" ? "Local " : "Global";
90360
- const legacyTag = !i.hasMetadata ? import_picocolors29.default.yellow(" [legacy]") : "";
90613
+ const legacyTag = !i.hasMetadata ? import_picocolors31.default.yellow(" [legacy]") : "";
90361
90614
  const components = formatComponentSummary(i);
90362
90615
  return ` ${typeLabel}: ${i.path}${legacyTag}${components}`;
90363
90616
  });
90364
90617
  prompts.note(lines.join(`
90365
90618
  `), `Detected Takumi installations (${scopeLabel})`);
90366
90619
  if (hasLegacy) {
90367
- log.warn(import_picocolors29.default.yellow(`[!] Legacy installation(s) detected without metadata.json.
90368
- `) + import_picocolors29.default.yellow(" These files cannot be selectively removed. Full directory cleanup will be performed."));
90620
+ log.warn(import_picocolors31.default.yellow(`[!] Legacy installation(s) detected without metadata.json.
90621
+ `) + import_picocolors31.default.yellow(" These files cannot be selectively removed. Full directory cleanup will be performed."));
90369
90622
  }
90370
90623
  log.warn("[!] This will permanently delete Takumi files from the above paths.");
90371
90624
  }
@@ -90425,7 +90678,7 @@ async function uninstallCommand(options2) {
90425
90678
  }
90426
90679
  const isAtHome = isLocalSameAsGlobal();
90427
90680
  if (validOptions.local && !validOptions.global && isAtHome) {
90428
- log.warn(import_picocolors29.default.yellow("Cannot use --local at HOME directory (local path equals global path)."));
90681
+ log.warn(import_picocolors31.default.yellow("Cannot use --local at HOME directory (local path equals global path)."));
90429
90682
  log.info("Use -g/--global or run from a project directory.");
90430
90683
  return;
90431
90684
  }
@@ -90437,7 +90690,7 @@ async function uninstallCommand(options2) {
90437
90690
  } else if (validOptions.global) {
90438
90691
  scope = "global";
90439
90692
  } else if (isAtHome) {
90440
- log.info(import_picocolors29.default.cyan("Running at HOME directory - targeting global installation"));
90693
+ log.info(import_picocolors31.default.cyan("Running at HOME directory - targeting global installation"));
90441
90694
  scope = "global";
90442
90695
  } else {
90443
90696
  const promptedScope = await promptScope(allInstallations);
@@ -90459,10 +90712,10 @@ async function uninstallCommand(options2) {
90459
90712
  }
90460
90713
  displayInstallations(installations, scope);
90461
90714
  if (validOptions.kit) {
90462
- log.info(import_picocolors29.default.cyan(`Kit-scoped uninstall: ${validOptions.kit} kit only`));
90715
+ log.info(import_picocolors31.default.cyan(`Kit-scoped uninstall: ${validOptions.kit} kit only`));
90463
90716
  }
90464
90717
  if (validOptions.dryRun) {
90465
- log.info(import_picocolors29.default.yellow("DRY RUN MODE - No files will be deleted"));
90718
+ log.info(import_picocolors31.default.yellow("DRY RUN MODE - No files will be deleted"));
90466
90719
  await removeInstallations(installations, {
90467
90720
  dryRun: true,
90468
90721
  forceOverwrite: validOptions.forceOverwrite,
@@ -90472,8 +90725,8 @@ async function uninstallCommand(options2) {
90472
90725
  return;
90473
90726
  }
90474
90727
  if (validOptions.forceOverwrite) {
90475
- log.warn(`${import_picocolors29.default.yellow(import_picocolors29.default.bold("FORCE MODE ENABLED"))}
90476
- ${import_picocolors29.default.yellow("User modifications will be permanently deleted!")}`);
90728
+ log.warn(`${import_picocolors31.default.yellow(import_picocolors31.default.bold("FORCE MODE ENABLED"))}
90729
+ ${import_picocolors31.default.yellow("User modifications will be permanently deleted!")}`);
90477
90730
  }
90478
90731
  if (!validOptions.yes) {
90479
90732
  const kitLabel = validOptions.kit ? ` (${validOptions.kit} kit only)` : "";
@@ -90926,8 +91179,8 @@ init_auth_client();
90926
91179
  init_github_client();
90927
91180
  init_logger();
90928
91181
  init_types2();
90929
- var import_picocolors30 = __toESM(require_picocolors(), 1);
90930
- function formatRelativeTime(dateString) {
91182
+ var import_picocolors32 = __toESM(require_picocolors(), 1);
91183
+ function formatRelativeTime2(dateString) {
90931
91184
  if (!dateString)
90932
91185
  return "Unknown";
90933
91186
  const date = new Date(dateString);
@@ -90948,21 +91201,21 @@ function formatRelativeTime(dateString) {
90948
91201
  }
90949
91202
  function displayKitReleases(kitName, releases) {
90950
91203
  console.log(`
90951
- ${import_picocolors30.default.bold(import_picocolors30.default.cyan(kitName))} - Available Versions:
91204
+ ${import_picocolors32.default.bold(import_picocolors32.default.cyan(kitName))} - Available Versions:
90952
91205
  `);
90953
91206
  if (releases.length === 0) {
90954
- console.log(import_picocolors30.default.dim(" No releases found"));
91207
+ console.log(import_picocolors32.default.dim(" No releases found"));
90955
91208
  return;
90956
91209
  }
90957
91210
  for (const release of releases) {
90958
- const version3 = import_picocolors30.default.green(release.tag);
90959
- const publishedAt = formatRelativeTime(release.publishedAt);
90960
- const badge = release.prerelease ? ` ${import_picocolors30.default.yellow("[prerelease]")}` : "";
91211
+ const version3 = import_picocolors32.default.green(release.tag);
91212
+ const publishedAt = formatRelativeTime2(release.publishedAt);
91213
+ const badge = release.prerelease ? ` ${import_picocolors32.default.yellow("[prerelease]")}` : "";
90961
91214
  const versionPart = version3.padEnd(20);
90962
- const timePart = import_picocolors30.default.dim(publishedAt.padEnd(20));
91215
+ const timePart = import_picocolors32.default.dim(publishedAt.padEnd(20));
90963
91216
  console.log(` ${versionPart} ${timePart}${badge}`);
90964
91217
  }
90965
- console.log(import_picocolors30.default.dim(`
91218
+ console.log(import_picocolors32.default.dim(`
90966
91219
  Showing ${releases.length} ${releases.length === 1 ? "release" : "releases"}`));
90967
91220
  }
90968
91221
  async function fetchReleasesForKit(kitType, options2) {
@@ -91007,8 +91260,8 @@ async function versionCommand(options2) {
91007
91260
  for (const result of results) {
91008
91261
  if (result.error) {
91009
91262
  console.log(`
91010
- ${import_picocolors30.default.bold(import_picocolors30.default.cyan(result.kitConfig.name))} - ${import_picocolors30.default.red("Error")}`);
91011
- console.log(import_picocolors30.default.dim(` ${result.error}`));
91263
+ ${import_picocolors32.default.bold(import_picocolors32.default.cyan(result.kitConfig.name))} - ${import_picocolors32.default.red("Error")}`);
91264
+ console.log(import_picocolors32.default.dim(` ${result.error}`));
91012
91265
  } else {
91013
91266
  displayKitReleases(result.kitConfig.name, result.releases);
91014
91267
  }
@@ -91030,6 +91283,23 @@ function normalizeSkillGroupFlag(value) {
91030
91283
  }
91031
91284
 
91032
91285
  // src/cli/command-registry.ts
91286
+ function parsePositiveIntFlag(raw, label, example, max) {
91287
+ if (raw === undefined)
91288
+ return;
91289
+ const value = Number(String(raw));
91290
+ if (!Number.isInteger(value) || value < 1) {
91291
+ console.error(`Invalid ${label}: ${raw}. Use a positive integer, e.g. ${example}`);
91292
+ process.exitCode = 1;
91293
+ return null;
91294
+ }
91295
+ if (max !== undefined && value > max) {
91296
+ console.error(`Invalid ${label}: ${raw}. Maximum is ${max}, e.g. ${example}`);
91297
+ process.exitCode = 1;
91298
+ return null;
91299
+ }
91300
+ return value;
91301
+ }
91302
+ var ARTIFACT_LIST_LIMIT_MAX = 100;
91033
91303
  function registerCommands(cli) {
91034
91304
  cli.command("init", "Initialize or update Takumi project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit(s) to install (core, extras). Repeat the flag to install multiple kits, e.g. --kit core --kit extras.").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("--skill-role <role>", "Install only skills tagged with these role(s) (comma-separated or repeatable). Combines with --skill-category as a union.").option("--skill-category <category>", "Install only skills in these categor(y/ies) (comma-separated or repeatable). Combines with --skill-role as a union.").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Full reset: remove takumi files, replace settings.json and CLAUDE.md, reinstall from scratch").option("--force", "Force reinstall even if already at latest version (use with --yes; re-onboards missing files without full reset)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--install-hooks", "Install all agent hooks (guard, session, convention, extension). Default installs only telemetry hooks.").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /tkm: prefix to all slash commands by moving them to commands/tkm/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--dry-run", "Preview changes without applying them (requires --prefix)").option("--force-overwrite", "Override ownership protections and delete user-modified files (requires --prefix)").option("--force-overwrite-settings", "Fully replace settings.json instead of selective merge (destroys user customizations)").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("--sync", "Sync config files from upstream with interactive hunk-by-hunk merge").option("--use-git", "Use git clone instead of GitHub API (uses SSH/HTTPS credentials)").option("--archive <path>", "Use local archive file instead of downloading (zip/tar.gz)").option("--kit-path <path>", "Use local kit directory instead of downloading").option("--local", "Use local monorepo as kit source (auto-detects from CLI location)").option("--use-gh", "Force GitHub release source (bypass the Worker release distribution API; default uses Worker)").option("-a, --agent <agents...>", "Target agents (claude-code, codex). Default: claude-code").action(async (options2) => {
91035
91305
  if (options2.exclude && !Array.isArray(options2.exclude)) {
@@ -91138,14 +91408,17 @@ function registerCommands(cli) {
91138
91408
  cli.command("api [action] [service] [path]", "Interact with Takumi API and proxy services").option("--method <method>", "HTTP method for proxy requests (default: GET)").option("--body <json>", "Request body as JSON string (proxy only)").option("--query <json>", "Query params as JSON string (proxy only)").option("--key <key>", "API key to use (setup only)").option("--force", "Force re-setup even if key exists (setup only)").option("--json", "Output raw JSON instead of formatted display").option("--locale <locale>", "Locale for vidcap summary/caption (default: en)").option("--max-results <n>", "Max results for vidcap search").option("--second <s>", "Timestamp in seconds for vidcap screenshot").option("--order <order>", "Sort order for vidcap comments (time/relevance)").option("--format <fmt>", "Summary format for reviewweb (bullet/paragraph)").option("--max-length <n>", "Max summary length for reviewweb").option("--instructions <text>", "Extraction instructions for reviewweb extract").option("--template <json>", "JSON template for reviewweb extract").option("--type <type>", "Link type filter for reviewweb links (web/image/file/all)").option("--country <code>", "Country code for reviewweb SEO commands").action(async (action, service, path11, options2) => {
91139
91409
  await apiCommand(action, service, path11, options2);
91140
91410
  });
91141
- cli.command("artifact [action] [target]", "Manage Takumi artifacts (upload <file> | download <uuid|url> | delete <uuid|url>)").option("--id <uuid|url>", "Existing artifact (UUID or viewer URL) to overwrite on upload").option("--title <title>", "Display title for the artifact (max 200 chars)").option("-m, --message <message>", "Short note describing this version's change (max 100 chars)").option("-o, --output <dir>", "(download) Output directory; default: slug(title) or uuid in CWD").option("--ver <n>", "Version number (download: download it; delete: delete only that version)").option("--force", "(download) Allow writing into a non-empty directory").option("-y, --yes", "Skip delete confirmation prompt").action(async (action, target, opts) => {
91142
- const version3 = opts.ver !== undefined ? Number.parseInt(String(opts.ver), 10) : undefined;
91143
- if (version3 !== undefined && (!Number.isInteger(version3) || version3 < 1)) {
91144
- console.error(`Invalid version: ${opts.ver}. Use a positive integer, e.g. --ver 2`);
91145
- process.exitCode = 1;
91411
+ cli.command("artifact [action] [target]", "Manage Takumi artifacts (list | search <term> | upload <file> | download <uuid|url> | delete <uuid|url>)").option("--id <uuid|url>", "Existing artifact (UUID or viewer URL) to overwrite on upload").option("--title <title>", "Display title for the artifact (max 200 chars)").option("-m, --message <message>", "Short note describing this version's change (max 100 chars)").option("-o, --output <dir>", "(download) Output directory; default: slug(title) or uuid in CWD").option("--ver <n>", "Version number (download: download it; delete: delete only that version)").option("--force", "(download) Allow writing into a non-empty directory").option("-y, --yes", "Skip delete confirmation prompt").option("--access <level>", "(list) Filter by access level: private | restricted | organization").option("--page <n>", "(list) Page number, 1-based (default: 1)").option("--limit <n>", "(list) Rows per page, max 100 (default: 10)").option("--json", "(list/search) Machine-readable JSON output").action(async (action, target, opts) => {
91412
+ const version3 = parsePositiveIntFlag(opts.ver, "version", "--ver 2");
91413
+ if (version3 === null)
91146
91414
  return;
91147
- }
91148
- await artifactCommand(action, target, { ...opts, version: version3 });
91415
+ const page = parsePositiveIntFlag(opts.page, "page", "--page 2");
91416
+ if (page === null)
91417
+ return;
91418
+ const limit = parsePositiveIntFlag(opts.limit, "limit", "--limit 25", ARTIFACT_LIST_LIMIT_MAX);
91419
+ if (limit === null)
91420
+ return;
91421
+ await artifactCommand(action, target, { ...opts, version: version3, page, limit });
91149
91422
  });
91150
91423
  cli.command("auth [action]", "Sign in/out, refresh, and check Takumi session (login|logout|refresh|status)").option("--json", "Machine-readable JSON output (status, refresh)").option("-f, --force", "Force a token refresh even when the current token is still valid (refresh only)").action(async (action, options2 = {}) => {
91151
91424
  switch (action) {
@@ -91320,7 +91593,7 @@ function getPackageVersion3() {
91320
91593
 
91321
91594
  // src/shared/logger.ts
91322
91595
  init_output_manager();
91323
- var import_picocolors31 = __toESM(require_picocolors(), 1);
91596
+ var import_picocolors33 = __toESM(require_picocolors(), 1);
91324
91597
  import { createWriteStream as createWriteStream4 } from "node:fs";
91325
91598
 
91326
91599
  class Logger2 {
@@ -91329,23 +91602,23 @@ class Logger2 {
91329
91602
  exitHandlerRegistered = false;
91330
91603
  info(message) {
91331
91604
  const symbols = output.getSymbols();
91332
- console.log(import_picocolors31.default.blue(symbols.info), message);
91605
+ console.log(import_picocolors33.default.blue(symbols.info), message);
91333
91606
  }
91334
91607
  success(message) {
91335
91608
  const symbols = output.getSymbols();
91336
- console.log(import_picocolors31.default.green(symbols.success), message);
91609
+ console.log(import_picocolors33.default.green(symbols.success), message);
91337
91610
  }
91338
91611
  warning(message) {
91339
91612
  const symbols = output.getSymbols();
91340
- console.log(import_picocolors31.default.yellow(symbols.warning), message);
91613
+ console.log(import_picocolors33.default.yellow(symbols.warning), message);
91341
91614
  }
91342
91615
  error(message) {
91343
91616
  const symbols = output.getSymbols();
91344
- console.error(import_picocolors31.default.red(symbols.error), message);
91617
+ console.error(import_picocolors33.default.red(symbols.error), message);
91345
91618
  }
91346
91619
  debug(message) {
91347
91620
  if (process.env.DEBUG) {
91348
- console.log(import_picocolors31.default.gray("[DEBUG]"), message);
91621
+ console.log(import_picocolors33.default.gray("[DEBUG]"), message);
91349
91622
  }
91350
91623
  }
91351
91624
  verbose(message, context) {
@@ -91354,7 +91627,7 @@ class Logger2 {
91354
91627
  const timestamp = this.getTimestamp();
91355
91628
  const sanitizedMessage = this.sanitize(message);
91356
91629
  const formattedContext = context ? this.formatContext(context) : "";
91357
- const logLine = `${timestamp} ${import_picocolors31.default.gray("[VERBOSE]")} ${sanitizedMessage}${formattedContext}`;
91630
+ const logLine = `${timestamp} ${import_picocolors33.default.gray("[VERBOSE]")} ${sanitizedMessage}${formattedContext}`;
91358
91631
  console.error(logLine);
91359
91632
  if (this.logFileStream) {
91360
91633
  const plainLogLine = `${timestamp} [VERBOSE] ${sanitizedMessage}${formattedContext}`;
@@ -91457,7 +91730,7 @@ var logger3 = new Logger2;
91457
91730
 
91458
91731
  // src/shared/output-manager.ts
91459
91732
  init_terminal_utils();
91460
- var import_picocolors32 = __toESM(require_picocolors(), 1);
91733
+ var import_picocolors34 = __toESM(require_picocolors(), 1);
91461
91734
  var SYMBOLS2 = {
91462
91735
  unicode: {
91463
91736
  prompt: "◇",
@@ -91538,7 +91811,7 @@ class OutputManager2 {
91538
91811
  if (this.config.quiet)
91539
91812
  return;
91540
91813
  const symbol = this.getSymbols().success;
91541
- console.log(import_picocolors32.default.green(`${symbol} ${message}`));
91814
+ console.log(import_picocolors34.default.green(`${symbol} ${message}`));
91542
91815
  }
91543
91816
  error(message, data) {
91544
91817
  if (this.config.json) {
@@ -91546,7 +91819,7 @@ class OutputManager2 {
91546
91819
  return;
91547
91820
  }
91548
91821
  const symbol = this.getSymbols().error;
91549
- console.error(import_picocolors32.default.red(`${symbol} ${message}`));
91822
+ console.error(import_picocolors34.default.red(`${symbol} ${message}`));
91550
91823
  }
91551
91824
  warning(message, data) {
91552
91825
  if (this.config.json) {
@@ -91556,7 +91829,7 @@ class OutputManager2 {
91556
91829
  if (this.config.quiet)
91557
91830
  return;
91558
91831
  const symbol = this.getSymbols().warning;
91559
- console.log(import_picocolors32.default.yellow(`${symbol} ${message}`));
91832
+ console.log(import_picocolors34.default.yellow(`${symbol} ${message}`));
91560
91833
  }
91561
91834
  info(message, data) {
91562
91835
  if (this.config.json) {
@@ -91566,7 +91839,7 @@ class OutputManager2 {
91566
91839
  if (this.config.quiet)
91567
91840
  return;
91568
91841
  const symbol = this.getSymbols().info;
91569
- console.log(import_picocolors32.default.blue(`${symbol} ${message}`));
91842
+ console.log(import_picocolors34.default.blue(`${symbol} ${message}`));
91570
91843
  }
91571
91844
  verbose(message, data) {
91572
91845
  if (!this.config.verbose)
@@ -91575,7 +91848,7 @@ class OutputManager2 {
91575
91848
  this.addJsonEntry({ type: "info", message, data });
91576
91849
  return;
91577
91850
  }
91578
- console.log(import_picocolors32.default.dim(` ${message}`));
91851
+ console.log(import_picocolors34.default.dim(` ${message}`));
91579
91852
  }
91580
91853
  indent(message) {
91581
91854
  if (this.config.json)
@@ -91600,7 +91873,7 @@ class OutputManager2 {
91600
91873
  return;
91601
91874
  const symbols = this.getSymbols();
91602
91875
  console.log();
91603
- console.log(import_picocolors32.default.bold(import_picocolors32.default.cyan(`${symbols.line} ${title}`)));
91876
+ console.log(import_picocolors34.default.bold(import_picocolors34.default.cyan(`${symbols.line} ${title}`)));
91604
91877
  }
91605
91878
  addJsonEntry(entry) {
91606
91879
  this.jsonBuffer.push({