@ariestools/toolchain 9.0.4 → 9.1.1

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 (34) hide show
  1. package/dist/actions/build.d.ts.map +1 -1
  2. package/dist/actions/clean.d.ts.map +1 -1
  3. package/dist/actions/compile.d.ts.map +1 -1
  4. package/dist/actions/deplint/checkPackage/checkPackage.d.ts.map +1 -1
  5. package/dist/actions/gitlint.d.ts.map +1 -1
  6. package/dist/actions/gitlintIgnore.d.ts +19 -0
  7. package/dist/actions/gitlintIgnore.d.ts.map +1 -0
  8. package/dist/actions/index.d.ts +1 -0
  9. package/dist/actions/index.d.ts.map +1 -1
  10. package/dist/actions/publint.d.ts.map +1 -1
  11. package/dist/bin/package/build.mjs +405 -402
  12. package/dist/bin/package/build.mjs.map +1 -1
  13. package/dist/bin/package/clean.mjs.map +1 -1
  14. package/dist/bin/package/compile.mjs +382 -379
  15. package/dist/bin/package/compile.mjs.map +1 -1
  16. package/dist/bin/package/publint.mjs +23 -23
  17. package/dist/bin/package/publint.mjs.map +1 -1
  18. package/dist/bin/package/recompile.mjs +382 -379
  19. package/dist/bin/package/recompile.mjs.map +1 -1
  20. package/dist/bin/skills.mjs +336 -141
  21. package/dist/bin/skills.mjs.map +1 -1
  22. package/dist/bin/xy.mjs +155 -52
  23. package/dist/bin/xy.mjs.map +1 -1
  24. package/dist/lib/secure/collectDeclaredDependencies.d.ts.map +1 -1
  25. package/dist/lib/updo/runUpdo.d.ts.map +1 -1
  26. package/dist/pm/PackageManager.d.ts +16 -0
  27. package/dist/pm/PackageManager.d.ts.map +1 -1
  28. package/dist/pm/pnpmPackageManager.d.ts.map +1 -1
  29. package/dist/pm/workspaceDir.d.ts +11 -0
  30. package/dist/pm/workspaceDir.d.ts.map +1 -0
  31. package/dist/pm/workspaces.d.ts.map +1 -1
  32. package/package.json +13 -13
  33. package/templates/gitignore/gitignore/template.gitignore +12 -11
  34. package/templates/gitignore/template.gitignore +12 -11
@@ -6,7 +6,7 @@ import * as l from "node:readline";
6
6
  import l__default from "node:readline";
7
7
  import { ReadStream } from "node:tty";
8
8
  import Pr, { basename, dirname, join, normalize, posix, resolve, sep, win32 } from "node:path";
9
- import { execFile, execSync, spawn, spawnSync } from "child_process";
9
+ import { execFile, spawn, spawnSync } from "child_process";
10
10
  import { EventEmitter } from "node:events";
11
11
  import path, { basename as basename$1, dirname as dirname$1, extname, isAbsolute, join as join$1, normalize as normalize$1, parse, relative, resolve as resolve$1, sep as sep$1 } from "path";
12
12
  import os, { homedir, platform, tmpdir } from "os";
@@ -31,6 +31,7 @@ import zi from "assert";
31
31
  import * as Ps from "zlib";
32
32
  import en from "zlib";
33
33
  import co from "node:assert";
34
+ import { execFile as execFile$1 } from "node:child_process";
34
35
  //#region \0rolldown/runtime.js
35
36
  var __defProp$2 = Object.defineProperty;
36
37
  var __esmMin = (fn, res, err) => () => {
@@ -53,7 +54,7 @@ var __exportAll = (all, no_symbols) => {
53
54
  };
54
55
  var __require$1 = /* #__PURE__ */ (() => createRequire(import.meta.url))();
55
56
  //#endregion
56
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/rolldown-runtime.mjs
57
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/rolldown-runtime.mjs
57
58
  var __create, __defProp$1, __getOwnPropDesc$1, __getOwnPropNames$1, __getProtoOf, __hasOwnProp$1, __commonJSMin, __copyProps$1, __toESM, __require;
58
59
  var init_rolldown_runtime = __esmMin((() => {
59
60
  __create = Object.create;
@@ -80,7 +81,7 @@ var init_rolldown_runtime = __esmMin((() => {
80
81
  __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
81
82
  }));
82
83
  //#endregion
83
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@clack/core.mjs
84
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@clack/core.mjs
84
85
  function wrapAnsi(string, columns, options) {
85
86
  return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
86
87
  }
@@ -779,7 +780,7 @@ var init_core = __esmMin((() => {
779
780
  };
780
781
  }));
781
782
  //#endregion
782
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs
783
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@clack/prompts.mjs
783
784
  function isUnicodeSupported() {
784
785
  if (process$1.platform !== "win32") return process$1.env.TERM !== "linux";
785
786
  return Boolean(process$1.env.CI) || Boolean(process$1.env.WT_SESSION) || Boolean(process$1.env.TERMINUS_SUBLIME) || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
@@ -788,7 +789,7 @@ function formatInstructionFooter(o, e) {
788
789
  const r = [`${e ? `${styleText("cyan", S_BAR$1)} ` : ""}${o.join(" • ")}`];
789
790
  return e && r.push(styleText("cyan", S_BAR_END)), r;
790
791
  }
791
- var import_src$1, unicode, isCI$1, unicodeOr, S_STEP_ACTIVE$1, S_STEP_CANCEL$1, S_STEP_ERROR, S_STEP_SUBMIT$1, S_BAR_START, S_BAR$1, S_BAR_END, S_RADIO_ACTIVE$1, S_RADIO_INACTIVE$1, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_BAR_H$1, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I$2, limitOptions, confirm, MULTISELECT_INSTRUCTIONS, m$1, multiselect$1, log, cancel, intro, outro, W$1$1, C$2, note, W$2, spinner, SELECT_INSTRUCTIONS, c$2, select;
792
+ var import_src$1, unicode, isCI$1, unicodeOr, S_STEP_ACTIVE$1, S_STEP_CANCEL$1, S_STEP_ERROR, S_STEP_SUBMIT$1, S_BAR_START, S_BAR$1, S_BAR_END, S_RADIO_ACTIVE$1, S_RADIO_INACTIVE$1, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, S_BAR_H$1, S_CORNER_TOP_RIGHT, S_CONNECT_LEFT, S_CORNER_BOTTOM_RIGHT, S_CORNER_BOTTOM_LEFT, S_INFO, S_SUCCESS, S_WARN, S_ERROR, symbol, symbolBar, I$2, limitOptions, confirm, MULTISELECT_INSTRUCTIONS, m$1, multiselect, log, cancel, intro, outro, W$1$1, C$2, note, W$2, spinner, SELECT_INSTRUCTIONS, c$2, select;
792
793
  var init_prompts = __esmMin((() => {
793
794
  init_core();
794
795
  import_src$1 = require_src$2();
@@ -915,7 +916,7 @@ ${g}
915
916
  m$1 = (i, u) => i.split(`
916
917
  `).map((d) => u(d)).join(`
917
918
  `);
918
- multiselect$1 = (i) => {
919
+ multiselect = (i) => {
919
920
  const u = (t, a) => {
920
921
  const r = t.label ?? String(t.value);
921
922
  return a === "disabled" ? `${styleText("gray", S_CHECKBOX_INACTIVE)} ${m$1(r, (o) => styleText(["strikethrough", "gray"], o))}${t.hint ? ` ${styleText("dim", `(${t.hint ?? "disabled"})`)}` : ""}` : a === "active" ? `${styleText("cyan", S_CHECKBOX_ACTIVE)} ${r}${t.hint ? ` ${styleText("dim", `(${t.hint})`)}` : ""}` : a === "selected" ? `${styleText("green", S_CHECKBOX_SELECTED)} ${m$1(r, (o) => styleText("dim", o))}${t.hint ? ` ${styleText("dim", `(${t.hint})`)}` : ""}` : a === "cancelled" ? `${m$1(r, (o) => styleText(["strikethrough", "dim"], o))}` : a === "active-selected" ? `${styleText("green", S_CHECKBOX_SELECTED)} ${r}${t.hint ? ` ${styleText("dim", `(${t.hint})`)}` : ""}` : a === "submitted" ? `${m$1(r, (o) => styleText("dim", o))}` : `${styleText("dim", S_CHECKBOX_INACTIVE)} ${m$1(r, (o) => styleText("dim", o))}`;
@@ -1226,7 +1227,7 @@ ${b}
1226
1227
  `${styleText("gray", S_BAR$1)}`;
1227
1228
  }));
1228
1229
  //#endregion
1229
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/picocolors.mjs
1230
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/picocolors.mjs
1230
1231
  var require_picocolors;
1231
1232
  var init_picocolors = __esmMin((() => {
1232
1233
  init_rolldown_runtime();
@@ -1300,7 +1301,7 @@ var init_picocolors = __esmMin((() => {
1300
1301
  }));
1301
1302
  }));
1302
1303
  //#endregion
1303
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs
1304
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@kwsites/file-exists.mjs
1304
1305
  var require_ms, require_common, require_browser, require_node, require_src$1, require_src, require_dist$3;
1305
1306
  var init_file_exists = __esmMin((() => {
1306
1307
  init_rolldown_runtime();
@@ -1866,7 +1867,7 @@ var init_file_exists = __esmMin((() => {
1866
1867
  }));
1867
1868
  }));
1868
1869
  //#endregion
1869
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@simple-git/args-pathspec.mjs
1870
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@simple-git/args-pathspec.mjs
1870
1871
  function c$1(...n) {
1871
1872
  const e = new String(n);
1872
1873
  return t.set(e, n), e;
@@ -1882,7 +1883,7 @@ var init_args_pathspec = __esmMin((() => {
1882
1883
  t = /* @__PURE__ */ new WeakMap();
1883
1884
  }));
1884
1885
  //#endregion
1885
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs
1886
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@kwsites/promise-deferred.mjs
1886
1887
  var require_dist$2;
1887
1888
  var init_promise_deferred = __esmMin((() => {
1888
1889
  init_rolldown_runtime();
@@ -1923,7 +1924,7 @@ var init_promise_deferred = __esmMin((() => {
1923
1924
  }));
1924
1925
  }));
1925
1926
  //#endregion
1926
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@simple-git/argv-parser.mjs
1927
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@simple-git/argv-parser.mjs
1927
1928
  function* U$1(e, t) {
1928
1929
  const n = t === "global";
1929
1930
  for (const o of e) o.isGlobal === n && (yield o);
@@ -2398,7 +2399,7 @@ var init_argv_parser = __esmMin((() => {
2398
2399
  };
2399
2400
  }));
2400
2401
  //#endregion
2401
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/simple-git.mjs
2402
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/simple-git.mjs
2402
2403
  function asFunction(source) {
2403
2404
  if (typeof source !== "function") return NOOP;
2404
2405
  return source;
@@ -5908,7 +5909,7 @@ var init_simple_git = __esmMin((() => {
5908
5909
  esm_default = gitInstanceFactory;
5909
5910
  }));
5910
5911
  //#endregion
5911
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs
5912
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/xdg-basedir.mjs
5912
5913
  var homeDirectory, env, xdgData, xdgConfig, xdgDataDirectories, xdgConfigDirectories;
5913
5914
  var init_xdg_basedir = __esmMin((() => {
5914
5915
  homeDirectory = os.homedir();
@@ -5924,7 +5925,7 @@ var init_xdg_basedir = __esmMin((() => {
5924
5925
  if (xdgConfig) xdgConfigDirectories.unshift(xdgConfig);
5925
5926
  }));
5926
5927
  //#endregion
5927
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs
5928
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/_chunks/libs/@vercel/detect-agent.mjs
5928
5929
  var require_dist$1;
5929
5930
  var init_detect_agent = __esmMin((() => {
5930
5931
  init_rolldown_runtime();
@@ -16023,7 +16024,7 @@ while (this[Zs](this[st].shift()));
16023
16024
  };
16024
16025
  }));
16025
16026
  //#endregion
16026
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/dist/cli.mjs
16027
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/dist/cli.mjs
16027
16028
  var cli_exports = /* @__PURE__ */ __exportAll({});
16028
16029
  function getGitHubHost() {
16029
16030
  const configuredHost = process.env.GH_HOST?.trim();
@@ -16390,8 +16391,19 @@ function toggleSearchEntry(selected, entry) {
16390
16391
  } else if (entry?.type === "item") if (selected.has(entry.item.value)) selected.delete(entry.item.value);
16391
16392
  else selected.add(entry.item.value);
16392
16393
  }
16394
+ function getSelectAllState(selected, items) {
16395
+ const selectedCount = items.filter((item) => selected.has(item.value)).length;
16396
+ if (selectedCount === 0) return "none";
16397
+ if (selectedCount === items.length) return "all";
16398
+ return "partial";
16399
+ }
16400
+ function toggleAllItems(selected, items) {
16401
+ const shouldClear = getSelectAllState(selected, items) === "all";
16402
+ for (const item of items) if (shouldClear) selected.delete(item.value);
16403
+ else selected.add(item.value);
16404
+ }
16393
16405
  async function searchMultiselect(options) {
16394
- const { message, items, maxVisible = 8, initialSelected = [], required = false, lockedSection, searchable = true, showDetail = false, detailLines = 2, showSelectedSummary = true, selectGroups = false } = options;
16406
+ const { message, items, maxVisible = 8, initialSelected = [], required = false, lockedSection, searchable = true, showDetail = false, detailLines = 2, showSelectedSummary = true, selectGroups = false, selectAll = false } = options;
16395
16407
  return new Promise((resolve) => {
16396
16408
  const rl = readline.createInterface({
16397
16409
  input: process.stdin,
@@ -16418,6 +16430,8 @@ async function searchMultiselect(options) {
16418
16430
  const lines = [];
16419
16431
  const filtered = getFiltered();
16420
16432
  const entries = buildSearchEntries(filtered, selectGroups, collapsedGroups);
16433
+ const hasSelectAll = selectAll && items.length > 0;
16434
+ const entryCursor = cursor - (hasSelectAll ? 1 : 0);
16421
16435
  const icon = state === "active" ? S_STEP_ACTIVE : state === "cancel" ? S_STEP_CANCEL : S_STEP_SUBMIT;
16422
16436
  lines.push(`${icon} ${import_picocolors.default.bold(message)}`);
16423
16437
  if (state === "active") {
@@ -16436,21 +16450,59 @@ async function searchMultiselect(options) {
16436
16450
  lines.push(`${S_BAR} ${import_picocolors.default.dim("↑↓ move, space select, enter confirm")}`);
16437
16451
  lines.push(`${S_BAR}`);
16438
16452
  }
16439
- const visibleStart = Math.max(0, Math.min(cursor - Math.floor(maxVisible / 2), entries.length - maxVisible));
16440
- const visibleEnd = Math.min(entries.length, visibleStart + maxVisible);
16441
- const visibleEntries = entries.slice(visibleStart, visibleEnd);
16442
- if (filtered.length === 0) lines.push(`${S_BAR} ${import_picocolors.default.dim("No matches found")}`);
16443
- else {
16453
+ if (hasSelectAll) {
16454
+ const selectedCount = items.filter((item) => selected.has(item.value)).length;
16455
+ const selectAllState = getSelectAllState(selected, items);
16456
+ const radio = selectAllState === "all" ? S_RADIO_ACTIVE : selectAllState === "partial" ? import_picocolors.default.yellow("◐") : S_RADIO_INACTIVE;
16457
+ const isCursor = cursor === 0;
16458
+ const prefix = isCursor ? import_picocolors.default.cyan("❯") : " ";
16459
+ const label = isCursor ? import_picocolors.default.underline(import_picocolors.default.bold("Select All")) : import_picocolors.default.bold("Select All");
16460
+ lines.push(`${S_BAR} ${prefix} ${radio} ${label} ${import_picocolors.default.dim(`(${selectedCount}/${items.length})`)}`);
16461
+ lines.push(`${S_BAR} ${S_BAR_H.repeat(36)}`);
16462
+ }
16463
+ const columns = process.stdout.columns && process.stdout.columns > 0 ? process.stdout.columns : 80;
16464
+ const buildFooterLines = (includeDetail, includeSelectedSummary) => {
16465
+ const footerLines = [];
16466
+ if (includeDetail) {
16467
+ const entry = entries[entryCursor];
16468
+ const detail = hasSelectAll && cursor === 0 ? `Select or clear all ${items.length} skills.` : entry?.type === "group" ? `Select all ${entry.items.length} skills in ${entry.group}.` : entry?.item.detail;
16469
+ const detailWidth = Math.max(1, columns - 5);
16470
+ footerLines.push(`${S_BAR}`);
16471
+ footerLines.push(`${S_BAR} ${import_picocolors.default.dim("Description")}`);
16472
+ for (const line of formatDetailLines(detail, detailWidth, detailLines)) footerLines.push(`${S_BAR} ${import_picocolors.default.dim(line)}`);
16473
+ }
16474
+ if (includeSelectedSummary) {
16475
+ footerLines.push(`${S_BAR}`);
16476
+ const allSelectedLabels = [...lockedSection ? lockedSection.items.map((i) => i.label) : [], ...items.filter((item) => selected.has(item.value)).map((item) => item.label)];
16477
+ if (allSelectedLabels.length === 0) footerLines.push(`${S_BAR} ${import_picocolors.default.dim("Selected: (none)")}`);
16478
+ else {
16479
+ const summary = allSelectedLabels.length <= 3 ? allSelectedLabels.join(", ") : `${allSelectedLabels.slice(0, 3).join(", ")} +${allSelectedLabels.length - 3} more`;
16480
+ footerLines.push(`${S_BAR} ${import_picocolors.default.green("Selected:")} ${summary}`);
16481
+ }
16482
+ }
16483
+ if (!searchable) {
16484
+ footerLines.push(`${S_BAR}`);
16485
+ footerLines.push(`${S_BAR} ${import_picocolors.default.dim("↑↓ move, ←→ collapse/expand, space select, enter confirm")}`);
16486
+ }
16487
+ footerLines.push(`${import_picocolors.default.dim("└")}`);
16488
+ return footerLines;
16489
+ };
16490
+ const buildItemLines = (visibleLimit) => {
16491
+ if (filtered.length === 0) return [`${S_BAR} ${import_picocolors.default.dim("No matches found")}`];
16492
+ const itemLines = [];
16493
+ const visibleStart = Math.max(0, Math.min(entryCursor - Math.floor(visibleLimit / 2), entries.length - visibleLimit));
16494
+ const visibleEnd = Math.min(entries.length, visibleStart + visibleLimit);
16495
+ const visibleEntries = entries.slice(visibleStart, visibleEnd);
16444
16496
  for (let i = 0; i < visibleEntries.length; i++) {
16445
16497
  const entry = visibleEntries[i];
16446
- const isCursor = visibleStart + i === cursor;
16498
+ const isCursor = visibleStart + i === entryCursor;
16447
16499
  if (entry.type === "group") {
16448
16500
  const selectedCount = entry.items.filter((item) => selected.has(item.value)).length;
16449
16501
  const radio = selectedCount === entry.items.length ? S_RADIO_ACTIVE : selectedCount > 0 ? import_picocolors.default.yellow("◐") : S_RADIO_INACTIVE;
16450
16502
  const label = isCursor ? import_picocolors.default.underline(import_picocolors.default.bold(entry.group)) : import_picocolors.default.bold(entry.group);
16451
16503
  const prefix = isCursor ? import_picocolors.default.cyan("❯") : " ";
16452
16504
  const disclosure = import_picocolors.default.dim(entry.collapsed ? "▸" : "▾");
16453
- lines.push(`${S_BAR} ${prefix} ${disclosure} ${radio} ${label}`);
16505
+ itemLines.push(`${S_BAR} ${prefix} ${disclosure} ${radio} ${label}`);
16454
16506
  continue;
16455
16507
  }
16456
16508
  const item = entry.item;
@@ -16461,7 +16513,7 @@ async function searchMultiselect(options) {
16461
16513
  const groupItems = selectGroups && item.group ? filtered.filter((i) => i.group === item.group) : [];
16462
16514
  const isLastInGroup = groupItems.at(-1) === item;
16463
16515
  const tree = groupItems.length > 0 ? `${import_picocolors.default.dim(isLastInGroup ? "└─" : "├─")} ` : "";
16464
- lines.push(`${S_BAR} ${prefix} ${tree}${radio} ${label}${hint}`);
16516
+ itemLines.push(`${S_BAR} ${prefix} ${tree}${radio} ${label}${hint}`);
16465
16517
  }
16466
16518
  const hiddenBefore = visibleStart;
16467
16519
  const hiddenAfter = entries.length - visibleEnd;
@@ -16469,32 +16521,48 @@ async function searchMultiselect(options) {
16469
16521
  const parts = [];
16470
16522
  if (hiddenBefore > 0) parts.push(`↑ ${hiddenBefore} more`);
16471
16523
  if (hiddenAfter > 0) parts.push(`↓ ${hiddenAfter} more`);
16472
- lines.push(`${S_BAR} ${import_picocolors.default.dim(parts.join(" "))}`);
16524
+ itemLines.push(`${S_BAR} ${import_picocolors.default.dim(parts.join(" "))}`);
16473
16525
  }
16474
- }
16475
- if (showDetail) {
16476
- const entry = entries[cursor];
16477
- const detail = entry?.type === "group" ? `Select all ${entry.items.length} skills in ${entry.group}.` : entry?.item.detail;
16478
- const columns = process.stdout.columns && process.stdout.columns > 0 ? process.stdout.columns : 80;
16479
- const detailWidth = Math.max(1, columns - 5);
16480
- lines.push(`${S_BAR}`);
16481
- lines.push(`${S_BAR} ${import_picocolors.default.dim("Description")}`);
16482
- for (const line of formatDetailLines(detail, detailWidth, detailLines)) lines.push(`${S_BAR} ${import_picocolors.default.dim(line)}`);
16483
- }
16484
- if (showSelectedSummary) {
16485
- lines.push(`${S_BAR}`);
16486
- const allSelectedLabels = [...lockedSection ? lockedSection.items.map((i) => i.label) : [], ...items.filter((item) => selected.has(item.value)).map((item) => item.label)];
16487
- if (allSelectedLabels.length === 0) lines.push(`${S_BAR} ${import_picocolors.default.dim("Selected: (none)")}`);
16488
- else {
16489
- const summary = allSelectedLabels.length <= 3 ? allSelectedLabels.join(", ") : `${allSelectedLabels.slice(0, 3).join(", ")} +${allSelectedLabels.length - 3} more`;
16490
- lines.push(`${S_BAR} ${import_picocolors.default.green("Selected:")} ${summary}`);
16526
+ return itemLines;
16527
+ };
16528
+ const terminalRows = process.stdout.rows && process.stdout.rows > 0 ? process.stdout.rows : void 0;
16529
+ const maxFrameRows = terminalRows ? Math.max(1, terminalRows - 1) : void 0;
16530
+ const fitFrame = (includeDetail, includeSelectedSummary) => {
16531
+ const footerLines = buildFooterLines(includeDetail, includeSelectedSummary);
16532
+ let visibleLimit = Math.max(1, maxVisible);
16533
+ let itemLines = buildItemLines(visibleLimit);
16534
+ let frameRows = countVisualRowsForLines([
16535
+ ...lines,
16536
+ ...itemLines,
16537
+ ...footerLines
16538
+ ], columns);
16539
+ while (maxFrameRows && frameRows > maxFrameRows && visibleLimit > 1) {
16540
+ visibleLimit -= 1;
16541
+ itemLines = buildItemLines(visibleLimit);
16542
+ frameRows = countVisualRowsForLines([
16543
+ ...lines,
16544
+ ...itemLines,
16545
+ ...footerLines
16546
+ ], columns);
16491
16547
  }
16548
+ return {
16549
+ itemLines,
16550
+ footerLines,
16551
+ frameRows
16552
+ };
16553
+ };
16554
+ let includeDetail = showDetail;
16555
+ let includeSelectedSummary = showSelectedSummary;
16556
+ let fitted = fitFrame(includeDetail, includeSelectedSummary);
16557
+ if (maxFrameRows && fitted.frameRows > maxFrameRows && includeDetail) {
16558
+ includeDetail = false;
16559
+ fitted = fitFrame(includeDetail, includeSelectedSummary);
16492
16560
  }
16493
- if (!searchable) {
16494
- lines.push(`${S_BAR}`);
16495
- lines.push(`${S_BAR} ${import_picocolors.default.dim("↑↓ move, ←→ collapse/expand, space select, enter confirm")}`);
16561
+ if (maxFrameRows && fitted.frameRows > maxFrameRows && includeSelectedSummary) {
16562
+ includeSelectedSummary = false;
16563
+ fitted = fitFrame(includeDetail, includeSelectedSummary);
16496
16564
  }
16497
- lines.push(`${import_picocolors.default.dim("└")}`);
16565
+ lines.push(...fitted.itemLines, ...fitted.footerLines);
16498
16566
  } else if (state === "submit") {
16499
16567
  const allSelectedLabels = [...lockedSection ? lockedSection.items.map((i) => i.label) : [], ...items.filter((item) => selected.has(item.value)).map((item) => item.label)];
16500
16568
  lines.push(`${S_BAR} ${import_picocolors.default.dim(allSelectedLabels.join(", "))}`);
@@ -16522,6 +16590,9 @@ async function searchMultiselect(options) {
16522
16590
  const keypressHandler = (_str, key) => {
16523
16591
  if (!key) return;
16524
16592
  const entries = buildSearchEntries(getFiltered(), selectGroups, collapsedGroups);
16593
+ const hasSelectAll = selectAll && items.length > 0;
16594
+ const cursorOffset = hasSelectAll ? 1 : 0;
16595
+ const entry = entries[cursor - cursorOffset];
16525
16596
  if (key.name === "return") {
16526
16597
  submit();
16527
16598
  return;
@@ -16536,12 +16607,11 @@ async function searchMultiselect(options) {
16536
16607
  return;
16537
16608
  }
16538
16609
  if (key.name === "down") {
16539
- cursor = Math.min(entries.length - 1, cursor + 1);
16610
+ cursor = Math.min(entries.length + cursorOffset - 1, cursor + 1);
16540
16611
  render();
16541
16612
  return;
16542
16613
  }
16543
16614
  if (selectGroups && key.name === "right") {
16544
- const entry = entries[cursor];
16545
16615
  if (entry?.type === "group" && entry.collapsed) {
16546
16616
  collapsedGroups.delete(entry.group);
16547
16617
  render();
@@ -16549,18 +16619,17 @@ async function searchMultiselect(options) {
16549
16619
  return;
16550
16620
  }
16551
16621
  if (selectGroups && key.name === "left") {
16552
- const entry = entries[cursor];
16553
16622
  const group = entry?.type === "group" ? entry.group : entry?.item.group;
16554
16623
  if (group) {
16555
16624
  collapsedGroups.add(group);
16556
- cursor = buildSearchEntries(getFiltered(), selectGroups, collapsedGroups).findIndex((collapsedEntry) => collapsedEntry.type === "group" && collapsedEntry.group === group);
16625
+ cursor = buildSearchEntries(getFiltered(), selectGroups, collapsedGroups).findIndex((collapsedEntry) => collapsedEntry.type === "group" && collapsedEntry.group === group) + cursorOffset;
16557
16626
  render();
16558
16627
  }
16559
16628
  return;
16560
16629
  }
16561
16630
  if (key.name === "space") {
16562
- const entry = entries[cursor];
16563
- toggleSearchEntry(selected, entry);
16631
+ if (hasSelectAll && cursor === 0) toggleAllItems(selected, items);
16632
+ else toggleSearchEntry(selected, entry);
16564
16633
  render();
16565
16634
  return;
16566
16635
  }
@@ -16764,6 +16833,38 @@ async function cloneRepo(url, ref) {
16764
16833
  throw new GitCloneError(`Failed to clone ${url}: ${errorMessage}`, url, false, false);
16765
16834
  }
16766
16835
  }
16836
+ async function getGitTreeHash(repoDir, skillPath) {
16837
+ const segments = skillPath.replace(/\\/g, "/").split("/");
16838
+ segments.pop();
16839
+ const folderPath = segments.join("/");
16840
+ const revision = folderPath ? `HEAD:${folderPath}` : "HEAD^{tree}";
16841
+ try {
16842
+ const hash = (await new Promise((resolve, reject) => {
16843
+ execFile("git", [
16844
+ "-C",
16845
+ repoDir,
16846
+ "rev-parse",
16847
+ "--verify",
16848
+ "--end-of-options",
16849
+ revision
16850
+ ], {
16851
+ encoding: "utf8",
16852
+ timeout: CLONE_TIMEOUT_MS,
16853
+ env: {
16854
+ ...process.env,
16855
+ GIT_OPTIONAL_LOCKS: "0",
16856
+ GIT_TERMINAL_PROMPT: "0"
16857
+ }
16858
+ }, (error, output) => {
16859
+ if (error) reject(error);
16860
+ else resolve(output);
16861
+ });
16862
+ })).trim();
16863
+ return /^[0-9a-f]{40}$/i.test(hash) ? hash.toLowerCase() : null;
16864
+ } catch {
16865
+ return null;
16866
+ }
16867
+ }
16767
16868
  async function cleanupTempDir(dir) {
16768
16869
  const normalizedDir = normalize$1(resolve$1(dir));
16769
16870
  const normalizedTmpDir = normalize$1(resolve$1(tmpdir()));
@@ -17131,6 +17232,9 @@ function isKimchiInstalled(homeDir = home, pathExists = existsSync) {
17131
17232
  function isMiniMaxCodeInstalled(homeDir = home, pathExists = existsSync) {
17132
17233
  return pathExists(join$1(homeDir, ".minimax")) || pathExists("/Applications/MiniMax Code.app");
17133
17234
  }
17235
+ function isPositAssistantInstalled(homeDir = home, pathExists = existsSync) {
17236
+ return pathExists(join$1(homeDir, ".posit/assistant")) || pathExists(join$1(homeDir, ".positai"));
17237
+ }
17134
17238
  async function detectInstalledAgents() {
17135
17239
  return (await Promise.all(Object.entries(agents).map(async ([type, config]) => ({
17136
17240
  type,
@@ -17763,6 +17867,7 @@ function setVersion(version) {
17763
17867
  cliVersion = version;
17764
17868
  }
17765
17869
  async function fetchAuditData(source, skillSlugs, timeoutMs = 3e3) {
17870
+ if (!isEnabled()) return null;
17766
17871
  if (skillSlugs.length === 0) return null;
17767
17872
  try {
17768
17873
  const params = new URLSearchParams({
@@ -18225,21 +18330,6 @@ async function writeSkillLock(lock) {
18225
18330
  function getGitHubToken() {
18226
18331
  if (process.env.GITHUB_TOKEN) return process.env.GITHUB_TOKEN;
18227
18332
  if (process.env.GH_TOKEN) return process.env.GH_TOKEN;
18228
- if (!_ghWarningShown) {
18229
- process.stderr.write(`${import_picocolors.default.dim("│ GitHub API request limit reached; checking existing ")}${import_picocolors.default.cyan("gh")}${import_picocolors.default.dim(" authentication…\n")}`);
18230
- _ghWarningShown = true;
18231
- }
18232
- try {
18233
- const token = execSync("gh auth token", {
18234
- encoding: "utf-8",
18235
- stdio: [
18236
- "pipe",
18237
- "pipe",
18238
- "pipe"
18239
- ]
18240
- }).trim();
18241
- if (token) return token;
18242
- } catch {}
18243
18333
  return null;
18244
18334
  }
18245
18335
  async function addSkillToLock(skillName, entry) {
@@ -18295,7 +18385,8 @@ function toSkillSlug(name) {
18295
18385
  }
18296
18386
  async function fetchTreeBranch(ownerRepo, branch, token) {
18297
18387
  try {
18298
- const url = `https://api.github.com/repos/${ownerRepo}/git/trees/${encodeURIComponent(branch)}?recursive=1`;
18388
+ const githubHost = getGitHubHost();
18389
+ const url = `${githubHost === "github.com" ? "https://api.github.com" : `https://${githubHost}/api/v3`}/repos/${ownerRepo}/git/trees/${encodeURIComponent(branch)}?recursive=1`;
18299
18390
  const headers = {
18300
18391
  Accept: "application/vnd.github.v3+json",
18301
18392
  "User-Agent": "skills-cli"
@@ -18339,13 +18430,55 @@ async function fetchTreeWithToken(ownerRepo, branches, getToken) {
18339
18430
  }
18340
18431
  return null;
18341
18432
  }
18433
+ async function fetchTreeWithGitHubCli(ownerRepo, branches) {
18434
+ for (const branch of branches) try {
18435
+ const endpoint = `repos/${ownerRepo}/git/trees/${encodeURIComponent(branch)}?recursive=1`;
18436
+ const stdout = await new Promise((resolve, reject) => {
18437
+ execFile$1("gh", [
18438
+ "api",
18439
+ endpoint,
18440
+ "--method",
18441
+ "GET",
18442
+ "--hostname",
18443
+ getGitHubHost()
18444
+ ], {
18445
+ encoding: "utf8",
18446
+ timeout: FETCH_TIMEOUT,
18447
+ maxBuffer: GH_API_MAX_BUFFER,
18448
+ windowsHide: true,
18449
+ env: {
18450
+ ...process.env,
18451
+ GH_PROMPT_DISABLED: "1"
18452
+ }
18453
+ }, (error, output) => {
18454
+ if (error) reject(error);
18455
+ else resolve(output);
18456
+ });
18457
+ });
18458
+ const data = JSON.parse(stdout);
18459
+ if (typeof data.sha !== "string" || !Array.isArray(data.tree)) continue;
18460
+ return {
18461
+ sha: data.sha,
18462
+ branch,
18463
+ tree: data.tree
18464
+ };
18465
+ } catch {}
18466
+ return null;
18467
+ }
18468
+ async function fetchTreeWithAvailableAuth(ownerRepo, branches, getToken) {
18469
+ if (getToken) {
18470
+ const tree = await fetchTreeWithToken(ownerRepo, branches, getToken);
18471
+ if (tree) return tree;
18472
+ }
18473
+ return fetchTreeWithGitHubCli(ownerRepo, branches);
18474
+ }
18342
18475
  async function fetchRepoTree(ownerRepo, ref, getToken) {
18343
18476
  const branches = ref ? [ref] : [
18344
18477
  "HEAD",
18345
18478
  "main",
18346
18479
  "master"
18347
18480
  ];
18348
- if (_rateLimitedThisSession && getToken) return fetchTreeWithToken(ownerRepo, branches, getToken);
18481
+ if (_rateLimitedThisSession) return fetchTreeWithAvailableAuth(ownerRepo, branches, getToken);
18349
18482
  let rateLimited = false;
18350
18483
  let authRetryable = false;
18351
18484
  for (const branch of branches) {
@@ -18360,9 +18493,9 @@ async function fetchRepoTree(ownerRepo, ref, getToken) {
18360
18493
  break;
18361
18494
  }
18362
18495
  }
18363
- if (!getToken || !(rateLimited || authRetryable)) return null;
18496
+ if (!(rateLimited || authRetryable)) return null;
18364
18497
  if (rateLimited) _rateLimitedThisSession = true;
18365
- return fetchTreeWithToken(ownerRepo, branches, getToken);
18498
+ return fetchTreeWithAvailableAuth(ownerRepo, branches, getToken);
18366
18499
  }
18367
18500
  function getSkillFolderHashFromTree(tree, skillPath) {
18368
18501
  let folderPath = skillPath.replace(/\\/g, "/");
@@ -18457,6 +18590,7 @@ function computeSnapshotHash(files) {
18457
18590
  return hash.digest("hex");
18458
18591
  }
18459
18592
  async function tryBlobInstall(ownerRepo, options = {}) {
18593
+ if (options.ref !== void 0) return null;
18460
18594
  const tree = await fetchRepoTree(ownerRepo, options.ref, options.getToken);
18461
18595
  if (!tree) return null;
18462
18596
  let skillMdPaths = findSkillMdPaths(tree, options.subpath);
@@ -18679,13 +18813,6 @@ function buildResultLines(results, targetAgents) {
18679
18813
  if (failedSymlinks.length > 0) lines.push(` ${import_picocolors.default.yellow("copied:")} ${formatList$1(failedSymlinks)}`);
18680
18814
  return lines;
18681
18815
  }
18682
- function multiselect(opts) {
18683
- return multiselect$1({
18684
- ...opts,
18685
- options: opts.options,
18686
- message: `${opts.message} ${import_picocolors.default.dim("(space to toggle)")}`
18687
- });
18688
- }
18689
18816
  async function promptForAgents(message, choices) {
18690
18817
  let lastSelected;
18691
18818
  try {
@@ -18754,7 +18881,16 @@ function isSkillsShPackUrl(url) {
18754
18881
  }
18755
18882
  async function handleWellKnownSkills(source, url, options, spinner) {
18756
18883
  spinner.start("Discovering skills from well-known endpoint...");
18757
- const skills = await wellKnownProvider.fetchAllSkills(url).catch(() => []);
18884
+ let skills = [];
18885
+ try {
18886
+ skills = await wellKnownProvider.fetchAllSkills(url, { includeInternal: Boolean(options.skill && options.skill.length > 0 && !options.skill.includes("*")) });
18887
+ } catch (error) {
18888
+ if (error instanceof WellKnownScopeNotFoundError) {
18889
+ spinner.stop(import_picocolors.default.red("No matching skills"));
18890
+ log.error(error.message);
18891
+ process.exit(1);
18892
+ }
18893
+ }
18758
18894
  if (skills.length === 0) {
18759
18895
  spinner.stop(import_picocolors.default.dim("No well-known skills found; trying direct download..."));
18760
18896
  return false;
@@ -18797,17 +18933,19 @@ async function handleWellKnownSkills(source, url, options, spinner) {
18797
18933
  selectedSkills = skills;
18798
18934
  log.info(`Installing all ${skills.length} skills`);
18799
18935
  } else {
18800
- const selected = await multiselect({
18936
+ const selected = await searchMultiselect({
18801
18937
  message: "Select skills to install",
18802
- options: skills.map((s) => ({
18938
+ items: skills.map((s) => ({
18803
18939
  value: s,
18804
18940
  label: s.installName,
18805
18941
  hint: s.description.length > 60 ? s.description.slice(0, 57) + "…" : s.description
18806
18942
  })),
18807
- initialValues: isSkillsShPackUrl(url) ? skills : void 0,
18808
- required: true
18943
+ initialSelected: isSkillsShPackUrl(url) ? skills : void 0,
18944
+ required: true,
18945
+ maxVisible: 20,
18946
+ selectAll: true
18809
18947
  });
18810
- if (isCancel(selected)) {
18948
+ if (isCancelled$1(selected)) {
18811
18949
  cancel("Installation cancelled");
18812
18950
  process.exit(0);
18813
18951
  }
@@ -19105,7 +19243,7 @@ async function runAdd(args, options = {}) {
19105
19243
  options.skill = options.skill || [];
19106
19244
  if (!options.skill.includes(parsed.skillFilter)) options.skill.push(parsed.skillFilter);
19107
19245
  }
19108
- const includeInternal = !!(options.skill && options.skill.length > 0);
19246
+ const includeInternal = !!(options.skill && options.skill.length > 0 && !options.skill.includes("*"));
19109
19247
  let skills;
19110
19248
  let blobResult = null;
19111
19249
  if (parsed.type === "local") {
@@ -19258,7 +19396,8 @@ async function runAdd(args, options = {}) {
19258
19396
  searchable: !hasGroups,
19259
19397
  showDetail: true,
19260
19398
  showSelectedSummary: false,
19261
- selectGroups: hasGroups
19399
+ selectGroups: hasGroups,
19400
+ selectAll: true
19262
19401
  });
19263
19402
  if (isCancelled$1(selected)) {
19264
19403
  cancel("Installation cancelled");
@@ -19268,7 +19407,7 @@ async function runAdd(args, options = {}) {
19268
19407
  selectedSkills = selected;
19269
19408
  }
19270
19409
  const ownerRepoForAudit = getOwnerRepo(parsed);
19271
- const auditPromise = ownerRepoForAudit ? fetchAuditData(ownerRepoForAudit, selectedSkills.map((s) => getSkillDisplayName(s))) : Promise.resolve(null);
19410
+ const auditPromise = ownerRepoForAudit ? repoPrivacyPromise.then((isPrivate) => isPrivate === false ? fetchAuditData(ownerRepoForAudit, selectedSkills.map((s) => getSkillDisplayName(s))) : null) : Promise.resolve(null);
19272
19411
  let targetAgents;
19273
19412
  const validAgents = Object.keys(agents);
19274
19413
  if (options.agent?.includes("*")) {
@@ -19348,7 +19487,7 @@ async function runAdd(args, options = {}) {
19348
19487
  const availableSubagents = getEveSubagents(process.cwd());
19349
19488
  if (options.subagent && options.subagent.length > 0) eveSubagentTargets = options.subagent.map((s) => s === "root" || s === "." ? void 0 : s);
19350
19489
  else if (availableSubagents.length > 0 && !options.yes) {
19351
- const selectedSubagents = await multiselect$1({
19490
+ const selectedSubagents = await multiselect({
19352
19491
  message: "Where should Eve skills be installed?",
19353
19492
  options: [{
19354
19493
  value: "",
@@ -20623,6 +20762,17 @@ async function removeCommand(skillNames, options) {
20623
20762
  options.yes = true;
20624
20763
  log.info(import_picocolors.default.bgCyan(import_picocolors.default.black(import_picocolors.default.bold(` ${agentResult.agent.name} `))) + " Agent detected — removing non-interactively");
20625
20764
  }
20765
+ if (skillNames.includes("*")) {
20766
+ options.all = true;
20767
+ skillNames = skillNames.filter((name) => name !== "*");
20768
+ }
20769
+ const namedSkills = skillNames.filter((name) => name !== "*");
20770
+ if (options.all && namedSkills.length > 0) {
20771
+ log.error("Cannot combine --all with specific skill names.");
20772
+ log.info("Use `skills remove --all` to remove every skill, or omit --all to remove only the named skills.");
20773
+ log.info(`Example: skills remove ${namedSkills[0]} -y`);
20774
+ process.exit(1);
20775
+ }
20626
20776
  const isGlobal = options.global ?? false;
20627
20777
  const cwd = process.cwd();
20628
20778
  const spinner$1 = spinner();
@@ -20675,7 +20825,7 @@ async function removeCommand(skillNames, options) {
20675
20825
  value: s,
20676
20826
  label: s
20677
20827
  }));
20678
- const selected = await multiselect$1({
20828
+ const selected = await multiselect({
20679
20829
  message: `Select skills to remove ${import_picocolors.default.dim("(space to toggle)")}`,
20680
20830
  options: choices,
20681
20831
  required: true
@@ -20810,8 +20960,19 @@ function parseRemoveOptions(args) {
20810
20960
  const arg = args[i];
20811
20961
  if (arg === "-g" || arg === "--global") options.global = true;
20812
20962
  else if (arg === "-y" || arg === "--yes") options.yes = true;
20813
- else if (arg === "--all") options.all = true;
20814
- else if (arg === "-a" || arg === "--agent") {
20963
+ else if (arg === "--all") {
20964
+ options.all = true;
20965
+ options.yes = true;
20966
+ } else if (arg === "-s" || arg === "--skill") {
20967
+ i++;
20968
+ let nextArg = args[i];
20969
+ while (i < args.length && nextArg && !nextArg.startsWith("-")) {
20970
+ skills.push(nextArg);
20971
+ i++;
20972
+ nextArg = args[i];
20973
+ }
20974
+ i--;
20975
+ } else if (arg === "-a" || arg === "--agent") {
20815
20976
  options.agent = options.agent || [];
20816
20977
  i++;
20817
20978
  let nextArg = args[i];
@@ -21143,48 +21304,49 @@ async function updateGlobalSkills(options = {}) {
21143
21304
  failCount += wkFailCount;
21144
21305
  const bySource = /* @__PURE__ */ new Map();
21145
21306
  for (const item of checkable) {
21146
- const source = item.entry.source;
21147
- const existing = bySource.get(source) || [];
21307
+ const key = `${item.entry.source}\n${item.entry.ref ?? ""}`;
21308
+ const existing = bySource.get(key) || [];
21148
21309
  existing.push(item);
21149
- bySource.set(source, existing);
21310
+ bySource.set(key, existing);
21150
21311
  }
21151
- for (const [source, itemsForSource] of bySource) {
21312
+ for (const [, itemsForSource] of bySource) {
21152
21313
  const firstEntry = itemsForSource[0].entry;
21314
+ const source = firstEntry.source;
21153
21315
  const sourceUrl = firstEntry.sourceUrl || firstEntry.source;
21154
21316
  let tempDir = null;
21155
21317
  process.stdout.write(`\r${DIM$1}Checking skills from source: ${source}${RESET$1}\x1b[K\n`);
21156
21318
  try {
21157
- if (firstEntry.sourceType === "github") {
21319
+ const isGitHubSource = firstEntry.sourceType === "github";
21320
+ if (isGitHubSource) {
21158
21321
  const tree = await fetchRepoTree(source, firstEntry.ref, getGitHubToken);
21159
- if (!tree) {
21160
- console.log(` ${DIM$1}✗ Failed to fetch tree for ${source}${RESET$1}`);
21322
+ if (tree) {
21323
+ const discoveredPaths = tree.tree.filter((entry) => entry.type === "blob").map((entry) => entry.path);
21324
+ const deletedSkills = await checkAndPromptForDeletions(source, Object.entries(lock.skills).filter(([_, entry]) => entry.source === source && entry.ref === firstEntry.ref).map(([name, _]) => name), lock.skills, true, options, discoveredPaths);
21325
+ const deletedSkillSet = new Set(deletedSkills);
21326
+ for (const { name: skillName, entry } of itemsForSource) {
21327
+ if (deletedSkillSet.has(skillName)) continue;
21328
+ const latestHash = getSkillFolderHashFromTree(tree, entry.skillPath);
21329
+ if (latestHash && latestHash !== entry.skillFolderHash) updates.push({
21330
+ name: skillName,
21331
+ source,
21332
+ entry
21333
+ });
21334
+ }
21161
21335
  continue;
21162
21336
  }
21163
- const discoveredPaths = tree.tree.filter((entry) => entry.type === "blob").map((entry) => entry.path);
21164
- const deletedSkills = await checkAndPromptForDeletions(source, Object.entries(lock.skills).filter(([_, entry]) => entry.source === source).map(([name, _]) => name), lock.skills, true, options, discoveredPaths);
21165
- const deletedSkillSet = new Set(deletedSkills);
21166
- for (const { name: skillName, entry } of itemsForSource) {
21167
- if (deletedSkillSet.has(skillName)) continue;
21168
- const latestHash = getSkillFolderHashFromTree(tree, entry.skillPath);
21169
- if (latestHash && latestHash !== entry.skillFolderHash) updates.push({
21170
- name: skillName,
21171
- source,
21172
- entry
21173
- });
21174
- }
21175
- continue;
21337
+ console.log(` ${DIM$1}GitHub API unavailable; checking via Git clone${RESET$1}`);
21176
21338
  }
21177
21339
  tempDir = await cloneRepo(sourceUrl, firstEntry.ref);
21178
21340
  const discoveredPaths = (await discoverSkills(tempDir, void 0, { fullDepth: true })).map((skill) => {
21179
21341
  return join$1(relative(tempDir, skill.path), "SKILL.md").split(sep$1).join("/");
21180
21342
  });
21181
- const deletedSkills = await checkAndPromptForDeletions(source, Object.entries(lock.skills).filter(([_, entry]) => entry.source === source).map(([name, _]) => name), lock.skills, true, options, discoveredPaths);
21343
+ const deletedSkills = await checkAndPromptForDeletions(source, Object.entries(lock.skills).filter(([_, entry]) => entry.source === source && entry.ref === firstEntry.ref).map(([name, _]) => name), lock.skills, true, options, discoveredPaths);
21182
21344
  const deletedSkillSet = new Set(deletedSkills);
21183
21345
  for (const { name: skillName, entry } of itemsForSource) {
21184
21346
  if (deletedSkillSet.has(skillName)) continue;
21185
21347
  const skillPath = entry.skillPath;
21186
21348
  if (!discoveredPaths.includes(skillPath)) continue;
21187
- const latestHash = await computeSkillFolderHash(join$1(tempDir, dirname$1(skillPath)));
21349
+ const latestHash = isGitHubSource && /^[0-9a-f]{40}$/i.test(entry.skillFolderHash) ? await getGitTreeHash(tempDir, skillPath) : await computeSkillFolderHash(join$1(tempDir, dirname$1(skillPath)));
21188
21350
  if (latestHash && latestHash !== entry.skillFolderHash) updates.push({
21189
21351
  name: skillName,
21190
21352
  source,
@@ -21343,10 +21505,10 @@ async function updateProjectSkills(options = {}) {
21343
21505
  failCount += wkFailCount;
21344
21506
  const bySource = /* @__PURE__ */ new Map();
21345
21507
  for (const skill of updatable) {
21346
- const source = skill.entry.sourceUrl || skill.entry.source;
21347
- const existing = bySource.get(source) || [];
21508
+ const key = `${skill.entry.sourceUrl || skill.entry.source}\n${skill.entry.ref ?? ""}`;
21509
+ const existing = bySource.get(key) || [];
21348
21510
  existing.push(skill);
21349
- bySource.set(source, existing);
21511
+ bySource.set(key, existing);
21350
21512
  }
21351
21513
  const localLock = await readLocalLock();
21352
21514
  const cliEntry = join$1(__dirname$1, "..", "bin", "cli.mjs");
@@ -21358,11 +21520,12 @@ async function updateProjectSkills(options = {}) {
21358
21520
  foundCount: projectSkills.length
21359
21521
  };
21360
21522
  }
21361
- for (const [source, skillsForSource] of bySource) {
21523
+ for (const [, skillsForSource] of bySource) {
21362
21524
  const firstEntry = skillsForSource[0].entry;
21525
+ const source = firstEntry.sourceUrl || firstEntry.source;
21363
21526
  const cloneSource = buildLocalCloneSource(firstEntry);
21364
21527
  const ref = firstEntry.ref;
21365
- const allLockedForSource = Object.entries(localLock.skills).filter(([_, entry]) => (entry.sourceUrl || entry.source) === source).map(([name, _]) => name);
21528
+ const allLockedForSource = Object.entries(localLock.skills).filter(([_, entry]) => (entry.sourceUrl || entry.source) === source && entry.ref === ref).map(([name, _]) => name);
21366
21529
  let tempDir = null;
21367
21530
  let deletedSkills = [];
21368
21531
  if (cloneSource === null) {
@@ -21487,7 +21650,6 @@ function parseUseOptions(args) {
21487
21650
  if (!arg) continue;
21488
21651
  if (arg === "--help" || arg === "-h") options.help = true;
21489
21652
  else if (arg === "--full-depth") options.fullDepth = true;
21490
- else if (arg === "--dangerously-accept-openclaw-risks") options.dangerouslyAcceptOpenclawRisks = true;
21491
21653
  else if (arg === "--skill" || arg === "-s") {
21492
21654
  const value = args[i + 1];
21493
21655
  if (!value || value.startsWith("-")) errors.push(`${arg} requires a skill name`);
@@ -21558,16 +21720,14 @@ async function runUse(sourceArgs, options = {}, parseErrors = []) {
21558
21720
  if (useAgent && !USE_AGENT_CONFIGS[useAgent]) fail(formatUnsupportedAgentError(useAgent));
21559
21721
  const source = sourceArgs[0];
21560
21722
  const parsed = parseSource(source);
21561
- if (getOwnerRepo(parsed)?.split("/")[0]?.toLowerCase() === "openclaw" && !options.dangerouslyAcceptOpenclawRisks) fail([
21562
- "OpenClaw skills are unverified community submissions.",
21563
- "Skills run with full agent permissions and could be malicious.",
21564
- `If you understand the risks, re-run with: skills use ${source} --dangerously-accept-openclaw-risks`
21565
- ].join("\n"));
21566
21723
  const selector = resolveSelector(parsed.skillFilter, options.skill);
21567
21724
  const includeInternal = selector !== void 0;
21568
21725
  let selectedSkill;
21569
21726
  if (parsed.type === "well-known") {
21570
- const skills = await wellKnownProvider.fetchAllSkills(parsed.url);
21727
+ const skills = await wellKnownProvider.fetchAllSkills(parsed.url, { includeInternal }).catch((error) => {
21728
+ if (error instanceof WellKnownScopeNotFoundError) fail(error.message);
21729
+ return [];
21730
+ });
21571
21731
  if (skills.length > 0) selectedSkill = selectWellKnownSkill(skills, selector, source);
21572
21732
  else {
21573
21733
  const downloaded = await downloadSource(parsed.url);
@@ -21696,8 +21856,6 @@ Options:
21696
21856
  -s, --skill <skill> Select the skill to use
21697
21857
  -a, --agent <agent> Start one supported agent interactively (${SUPPORTED_USE_AGENTS.join(", ")})
21698
21858
  --full-depth Search nested directories like skills add --full-depth
21699
- --dangerously-accept-openclaw-risks
21700
- Allow unverified OpenClaw community skills
21701
21859
  -h, --help Show this help message
21702
21860
 
21703
21861
  Examples:
@@ -21923,15 +22081,13 @@ ${BOLD}Use Options:${RESET}
21923
22081
  -s, --skill <skill> Specify the skill to use
21924
22082
  -a, --agent <agent> Start one supported agent interactively
21925
22083
  --full-depth Search all subdirectories even when a root SKILL.md exists
21926
- --dangerously-accept-openclaw-risks
21927
- Allow unverified OpenClaw community skills
21928
22084
 
21929
22085
  ${BOLD}Remove Options:${RESET}
21930
22086
  -g, --global Remove from global scope
21931
- -a, --agent <agents> Remove from specific agents (use '*' for all agents)
22087
+ -a, --agent <agents> Remove from specific agents (omit to clean all agent links)
21932
22088
  -s, --skill <skills> Specify skills to remove (use '*' for all skills)
21933
22089
  -y, --yes Skip confirmation prompts
21934
- --all Shorthand for --skill '*' --agent '*' -y
22090
+ --all Remove every installed skill (-y implied). Do not combine with named skills.
21935
22091
 
21936
22092
  ${BOLD}Experimental Sync Options:${RESET}
21937
22093
  -a, --agent <agents> Specify agents to install to (use '*' for all agents)
@@ -21987,10 +22143,10 @@ ${BOLD}Arguments:${RESET}
21987
22143
 
21988
22144
  ${BOLD}Options:${RESET}
21989
22145
  -g, --global Remove from global scope (~/) instead of project scope
21990
- -a, --agent Remove from specific agents (use '*' for all agents)
22146
+ -a, --agent Remove from specific agents (omit to clean all agent links)
21991
22147
  -s, --skill Specify skills to remove (use '*' for all skills)
21992
22148
  -y, --yes Skip confirmation prompts
21993
- --all Shorthand for --skill '*' --agent '*' -y
22149
+ --all Remove every installed skill (-y implied). Do not combine with named skills.
21994
22150
 
21995
22151
  ${BOLD}Examples:${RESET}
21996
22152
  ${DIM}$${RESET} skills remove ${DIM}# interactive selection${RESET}
@@ -22138,7 +22294,7 @@ async function main() {
22138
22294
  process.exitCode = 1;
22139
22295
  }
22140
22296
  }
22141
- var import_dist, import_picocolors, DEFAULT_GITHUB_HOST, SOURCE_ALIASES, CSI_RE, OSC_RE, DCS_PM_APC_RE, SIMPLE_ESC_RE, C1_RE, CONTROL_RE, silentOutput, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_SUBMIT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_BULLET, S_BAR, S_BAR_H, cancelSymbol, DEFAULT_CLONE_TIMEOUT_MS, ALLOWED_GIT_PROTOCOLS, CLONE_TIMEOUT_MS, execFileAsync, GitCloneError, LOCAL_LOCK_FILE, CURRENT_VERSION$1, AGENTS_DIR$1, SKILLS_SUBDIR, SKIP_DIRS, AGENT_PROJECT_SKILL_DIRS, home, configHome, codexHome, claudeHome, vibeHome, hermesHome, autohandHome, grokHome, zedAppDataHome, zedFlatpakConfigHome, agents, EVE_SUBAGENTS_DIR, EXCLUDE_FILES$1, EXCLUDE_DIRS$1, isExcluded$1, TELEMETRY_URL, AUDIT_URL, cliVersion, detectedAgentName, pendingTelemetry, import_dist$1, cachedResult, agentNameToType, ProviderRegistryImpl, ZIP_LOCAL_FILE_HEADER, ZIP_CENTRAL_DIRECTORY_HEADER, ZIP_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR, ZIP_END_MIN_SIZE, ZIP_MAX_COMMENT_SIZE, CP437_HIGH_BYTES, ArchiveValidationError, DISCOVERY_SCHEMA_V2, MAX_ARCHIVE_UNPACKED_BYTES, MAX_ARCHIVE_FILES, DISCOVERY_TIMEOUT_MS, WellKnownProvider, wellKnownProvider, DEFAULT_DOWNLOAD_MAX_BYTES, DEFAULT_EXTRACT_MAX_BYTES, DEFAULT_EXTRACT_MAX_FILES, FETCH_TIMEOUT_MS, AGENTS_DIR, LOCK_FILE, CURRENT_VERSION, _ghWarningShown, DOWNLOAD_BASE_URL, BLOB_ALLOWED_REPOS, FETCH_TIMEOUT, _rateLimitedThisSession, PRIORITY_PREFIXES, version$1, isCancelled$1, EVE_AGENT_LABEL, RESET$3, BOLD$3, DIM$3, TEXT$2, CYAN$1, SEARCH_API_BASE, SEARCH_RESULT_LIMIT, GITHUB_OWNER_PATTERN, HIDE_CURSOR, SHOW_CURSOR, CLEAR_DOWN, MOVE_UP, MOVE_TO_COL, isCancelled, RESET$2, BOLD$2, DIM$2, CYAN, YELLOW, __dirname$1, RESET$1, BOLD$1, DIM$1, TEXT$1, BLOB_ALLOWED_OWNERS, EXCLUDE_FILES, EXCLUDE_DIRS, USE_AGENT_CONFIGS, SUPPORTED_USE_AGENTS, UseCommandError, __dirname, VERSION, RESET, BOLD, DIM, TEXT, LOGO_LINES, GRAYS;
22297
+ var import_dist, import_picocolors, DEFAULT_GITHUB_HOST, SOURCE_ALIASES, CSI_RE, OSC_RE, DCS_PM_APC_RE, SIMPLE_ESC_RE, C1_RE, CONTROL_RE, silentOutput, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_SUBMIT, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_BULLET, S_BAR, S_BAR_H, cancelSymbol, DEFAULT_CLONE_TIMEOUT_MS, ALLOWED_GIT_PROTOCOLS, CLONE_TIMEOUT_MS, execFileAsync, GitCloneError, LOCAL_LOCK_FILE, CURRENT_VERSION$1, AGENTS_DIR$1, SKILLS_SUBDIR, SKIP_DIRS, AGENT_PROJECT_SKILL_DIRS, home, configHome, codexHome, claudeHome, vibeHome, hermesHome, autohandHome, grokHome, zedAppDataHome, zedFlatpakConfigHome, agents, EVE_SUBAGENTS_DIR, EXCLUDE_FILES$1, EXCLUDE_DIRS$1, isExcluded$1, TELEMETRY_URL, AUDIT_URL, cliVersion, detectedAgentName, pendingTelemetry, import_dist$1, cachedResult, agentNameToType, ProviderRegistryImpl, ZIP_LOCAL_FILE_HEADER, ZIP_CENTRAL_DIRECTORY_HEADER, ZIP_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY, ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR, ZIP_END_MIN_SIZE, ZIP_MAX_COMMENT_SIZE, CP437_HIGH_BYTES, ArchiveValidationError, DISCOVERY_SCHEMA_V2, MAX_ARCHIVE_UNPACKED_BYTES, MAX_ARCHIVE_FILES, DISCOVERY_TIMEOUT_MS, WellKnownScopeNotFoundError, WellKnownProvider, wellKnownProvider, DEFAULT_DOWNLOAD_MAX_BYTES, DEFAULT_EXTRACT_MAX_BYTES, DEFAULT_EXTRACT_MAX_FILES, FETCH_TIMEOUT_MS, AGENTS_DIR, LOCK_FILE, CURRENT_VERSION, DOWNLOAD_BASE_URL, BLOB_ALLOWED_REPOS, FETCH_TIMEOUT, GH_API_MAX_BUFFER, _rateLimitedThisSession, PRIORITY_PREFIXES, version$1, isCancelled$1, EVE_AGENT_LABEL, RESET$3, BOLD$3, DIM$3, TEXT$2, CYAN$1, SEARCH_API_BASE, SEARCH_RESULT_LIMIT, GITHUB_OWNER_PATTERN, HIDE_CURSOR, SHOW_CURSOR, CLEAR_DOWN, MOVE_UP, MOVE_TO_COL, isCancelled, RESET$2, BOLD$2, DIM$2, CYAN, YELLOW, __dirname$1, RESET$1, BOLD$1, DIM$1, TEXT$1, BLOB_ALLOWED_OWNERS, EXCLUDE_FILES, EXCLUDE_DIRS, USE_AGENT_CONFIGS, SUPPORTED_USE_AGENTS, UseCommandError, __dirname, VERSION, RESET, BOLD, DIM, TEXT, LOGO_LINES, GRAYS;
22142
22298
  var init_cli = __esmMin((() => {
22143
22299
  init_rolldown_runtime();
22144
22300
  init_core();
@@ -22228,6 +22384,7 @@ var init_cli = __esmMin((() => {
22228
22384
  ".opencode/skills",
22229
22385
  ".openhands/skills",
22230
22386
  ".pi/skills",
22387
+ ".posit/assistant/skills",
22231
22388
  ".qoder/skills",
22232
22389
  ".roo/skills",
22233
22390
  ".trae/skills",
@@ -22727,6 +22884,15 @@ var init_cli = __esmMin((() => {
22727
22884
  return existsSync(join$1(home, ".pi/agent"));
22728
22885
  }
22729
22886
  },
22887
+ "posit-assistant": {
22888
+ name: "posit-assistant",
22889
+ displayName: "Posit Assistant",
22890
+ skillsDir: ".posit/assistant/skills",
22891
+ globalSkillsDir: join$1(home, ".posit/assistant/skills"),
22892
+ detectInstalled: async () => {
22893
+ return isPositAssistantInstalled();
22894
+ }
22895
+ },
22730
22896
  qoder: {
22731
22897
  name: "qoder",
22732
22898
  displayName: "Qoder",
@@ -23011,6 +23177,16 @@ var init_cli = __esmMin((() => {
23011
23177
  MAX_ARCHIVE_UNPACKED_BYTES = 52428800;
23012
23178
  MAX_ARCHIVE_FILES = 1e3;
23013
23179
  DISCOVERY_TIMEOUT_MS = 1e4;
23180
+ WellKnownScopeNotFoundError = class extends Error {
23181
+ scopePath;
23182
+ rootUrl;
23183
+ constructor(scopePath, rootUrl) {
23184
+ super(`No skills found for the scoped path '${scopePath}' on ${rootUrl}. Not falling back to the root skills index because that would install every skill the host publishes. Check the URL, or run 'skills add ${rootUrl}' to install from the root index.`);
23185
+ this.name = "WellKnownScopeNotFoundError";
23186
+ this.scopePath = scopePath;
23187
+ this.rootUrl = rootUrl;
23188
+ }
23189
+ };
23014
23190
  WellKnownProvider = class {
23015
23191
  id = "well-known";
23016
23192
  displayName = "Well-Known Skills";
@@ -23309,16 +23485,34 @@ var init_cli = __esmMin((() => {
23309
23485
  indexEntry: input.indexEntry
23310
23486
  };
23311
23487
  }
23312
- async fetchAllSkills(url) {
23488
+ getScope(url) {
23489
+ try {
23490
+ const parsed = new URL(url);
23491
+ const scopePath = parsed.pathname.replace(/\/$/, "");
23492
+ if (!scopePath) return null;
23493
+ return {
23494
+ scopePath,
23495
+ rootBaseUrl: `${parsed.protocol}//${parsed.host}`
23496
+ };
23497
+ } catch {
23498
+ return null;
23499
+ }
23500
+ }
23501
+ async fetchAllSkills(url, options = {}) {
23313
23502
  try {
23314
23503
  const candidates = await this.fetchIndexCandidates(url);
23315
- for (const result of candidates) {
23504
+ const scope = this.getScope(url);
23505
+ const scopedCandidates = scope ? candidates.filter((c) => c.resolvedBaseUrl !== scope.rootBaseUrl) : candidates;
23506
+ const includeInternal = options.includeInternal || shouldInstallInternalSkills();
23507
+ for (const result of scopedCandidates) {
23316
23508
  const skillPromises = result.entries.map((entry) => this.fetchSkillByEntry(entry));
23317
- const skills = (await Promise.all(skillPromises)).filter((s) => s !== null);
23509
+ const skills = (await Promise.all(skillPromises)).filter((s) => s !== null).filter((skill) => includeInternal || skill.metadata?.internal !== true);
23318
23510
  if (skills.length > 0) return skills;
23319
23511
  }
23512
+ if (scope && scopedCandidates.length < candidates.length) throw new WellKnownScopeNotFoundError(scope.scopePath, scope.rootBaseUrl);
23320
23513
  return [];
23321
- } catch {
23514
+ } catch (error) {
23515
+ if (error instanceof WellKnownScopeNotFoundError) throw error;
23322
23516
  return [];
23323
23517
  }
23324
23518
  }
@@ -23424,10 +23618,10 @@ var init_cli = __esmMin((() => {
23424
23618
  AGENTS_DIR = ".agents";
23425
23619
  LOCK_FILE = ".skill-lock.json";
23426
23620
  CURRENT_VERSION = 3;
23427
- _ghWarningShown = false;
23428
23621
  DOWNLOAD_BASE_URL = process.env.SKILLS_DOWNLOAD_URL || "https://skills.sh";
23429
23622
  BLOB_ALLOWED_REPOS = { "zapier/connectors": { downloadUrl: (slug) => `https://connectors-skills.zapier.com/download/${encodeURIComponent(slug)}/snapshot.json` } };
23430
23623
  FETCH_TIMEOUT = 1e4;
23624
+ GH_API_MAX_BUFFER = 16777216;
23431
23625
  _rateLimitedThisSession = false;
23432
23626
  PRIORITY_PREFIXES = [
23433
23627
  "",
@@ -23456,6 +23650,7 @@ var init_cli = __esmMin((() => {
23456
23650
  ".opencode/skills/",
23457
23651
  ".openhands/skills/",
23458
23652
  ".pi/skills/",
23653
+ ".posit/assistant/skills/",
23459
23654
  ".qoder/skills/",
23460
23655
  ".roo/skills/",
23461
23656
  ".trae/skills/",
@@ -23463,7 +23658,7 @@ var init_cli = __esmMin((() => {
23463
23658
  ".zcode/skills/",
23464
23659
  ".zencoder/skills/"
23465
23660
  ];
23466
- version$1 = "1.5.22";
23661
+ version$1 = "1.5.23";
23467
23662
  isCancelled$1 = (value) => typeof value === "symbol";
23468
23663
  EVE_AGENT_LABEL = "eve agent";
23469
23664
  setVersion(version$1);
@@ -23540,7 +23735,7 @@ var init_cli = __esmMin((() => {
23540
23735
  main().finally(() => flushTelemetry().then(() => process.exit(process.exitCode ?? 0)));
23541
23736
  }));
23542
23737
  //#endregion
23543
- //#region ../../node_modules/.pnpm/skills@1.5.22/node_modules/skills/bin/cli.mjs
23738
+ //#region ../../node_modules/.pnpm/skills@1.5.23/node_modules/skills/bin/cli.mjs
23544
23739
  if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) try {
23545
23740
  module.enableCompileCache();
23546
23741
  } catch {}