@hasna/skills 0.1.13 → 0.1.14

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 (197) hide show
  1. package/bin/index.js +639 -291
  2. package/bin/mcp.js +301 -180
  3. package/dist/index.d.ts +4 -2
  4. package/dist/index.js +190 -2
  5. package/dist/lib/config.d.ts +27 -0
  6. package/dist/lib/config.test.d.ts +1 -0
  7. package/dist/lib/installer.d.ts +25 -0
  8. package/dist/lib/registry.d.ts +4 -0
  9. package/dist/types/api.d.ts +74 -0
  10. package/package.json +5 -2
  11. package/skills/skill-academic-journal-matcher/bin/cli.ts +34 -0
  12. package/skills/skill-action-item-router/bin/cli.ts +34 -0
  13. package/skills/skill-ad-creative-generator/bin/cli.ts +34 -0
  14. package/skills/skill-advanced-math/bin/cli.ts +34 -0
  15. package/skills/skill-analyze-data/bin/cli.ts +19 -0
  16. package/skills/skill-anomaly-investigator/bin/cli.ts +34 -0
  17. package/skills/skill-api-test-suite/bin/cli.ts +34 -0
  18. package/skills/skill-apidocs/bin/cli.ts +87 -0
  19. package/skills/skill-audio-cleanup-lab/bin/cli.ts +6 -0
  20. package/skills/skill-audiobook-chapter-proofer/bin/cli.ts +34 -0
  21. package/skills/skill-banner-ad-suite/bin/cli.ts +34 -0
  22. package/skills/skill-benchmark-finder/bin/cli.ts +34 -0
  23. package/skills/skill-bio-sequence-tool/bin/cli.ts +34 -0
  24. package/skills/skill-blog-topic-cluster/bin/cli.ts +34 -0
  25. package/skills/skill-brand-style-guide/bin/cli.ts +19 -0
  26. package/skills/skill-brand-voice-audit/bin/cli.ts +34 -0
  27. package/skills/skill-budget-variance-analyzer/bin/cli.ts +6 -0
  28. package/skills/skill-businessactivity/bin/cli.ts +28 -0
  29. package/skills/skill-calendar-events/bin/cli.ts +34 -0
  30. package/skills/skill-campaign-metric-brief/bin/cli.ts +34 -0
  31. package/skills/skill-campaign-moodboard/bin/cli.ts +34 -0
  32. package/skills/skill-caption-style-stylist/bin/cli.ts +34 -0
  33. package/skills/skill-chemistry-calculator/bin/cli.ts +34 -0
  34. package/skills/skill-churn-risk-notifier/bin/cli.ts +34 -0
  35. package/skills/skill-citation-formatter/bin/cli.ts +34 -0
  36. package/skills/skill-classroom-newsletter-kit/bin/cli.ts +34 -0
  37. package/skills/skill-color-palette-harmonizer/bin/cli.ts +34 -0
  38. package/skills/skill-competitor-ad-analyzer/bin/cli.ts +34 -0
  39. package/skills/skill-compliance-copy-check/bin/cli.ts +34 -0
  40. package/skills/skill-compliance-report-pack/bin/cli.ts +34 -0
  41. package/skills/skill-compress-video/bin/cli.ts +19 -0
  42. package/skills/skill-consolelog/bin/cli.ts +884 -0
  43. package/skills/skill-contract-plainlanguage/bin/cli.ts +34 -0
  44. package/skills/skill-copytone-translator/bin/cli.ts +34 -0
  45. package/skills/skill-create-blog-article/bin/cli.ts +34 -0
  46. package/skills/skill-create-ebook/bin/cli.ts +34 -0
  47. package/skills/skill-crm-note-enhancer/bin/cli.ts +34 -0
  48. package/skills/skill-customer-journey-mapper/bin/cli.ts +34 -0
  49. package/skills/skill-dashboard-builder/bin/cli.ts +34 -0
  50. package/skills/skill-dashboard-narrator/bin/cli.ts +34 -0
  51. package/skills/skill-data-anonymizer/bin/cli.ts +34 -0
  52. package/skills/skill-database-explorer/bin/cli.ts +34 -0
  53. package/skills/skill-dataset-health-check/bin/cli.ts +34 -0
  54. package/skills/skill-decision-journal/bin/cli.ts +34 -0
  55. package/skills/skill-delegation-brief-writer/bin/cli.ts +34 -0
  56. package/skills/skill-destination-briefing/bin/cli.ts +34 -0
  57. package/skills/skill-diff-viewer/bin/cli.ts +34 -0
  58. package/skills/skill-domainpurchase/SKILL.md +46 -0
  59. package/skills/skill-domainpurchase/bin/cli.ts +683 -0
  60. package/skills/skill-domainsearch/SKILL.md +41 -0
  61. package/skills/skill-domainsearch/bin/cli.ts +410 -0
  62. package/skills/skill-educational-resource-finder/bin/cli.ts +34 -0
  63. package/skills/skill-email-campaign/bin/cli.ts +34 -0
  64. package/skills/skill-exam-readiness-check/bin/cli.ts +34 -0
  65. package/skills/skill-experiment-power-calculator/bin/cli.ts +34 -0
  66. package/skills/skill-extract-audio/bin/cli.ts +19 -0
  67. package/skills/skill-extract-frames/bin/cli.ts +34 -0
  68. package/skills/skill-extract-invoice/bin/cli.ts +34 -0
  69. package/skills/skill-family-activity-curator/bin/cli.ts +34 -0
  70. package/skills/skill-faq-packager/bin/cli.ts +34 -0
  71. package/skills/skill-feedback-survey-designer/bin/cli.ts +34 -0
  72. package/skills/skill-field-trip-planner/bin/cli.ts +34 -0
  73. package/skills/skill-file-organizer/bin/cli.ts +34 -0
  74. package/skills/skill-folder-tree/bin/cli.ts +34 -0
  75. package/skills/skill-forecast-scenario-lab/bin/cli.ts +34 -0
  76. package/skills/skill-form-filler/bin/cli.ts +34 -0
  77. package/skills/skill-generate-api-client/bin/cli.ts +34 -0
  78. package/skills/skill-generate-book-cover/bin/cli.ts +34 -0
  79. package/skills/skill-generate-chart/bin/cli.ts +34 -0
  80. package/skills/skill-generate-diagram/bin/cli.ts +34 -0
  81. package/skills/skill-generate-dockerfile/bin/cli.ts +34 -0
  82. package/skills/skill-generate-documentation/bin/cli.ts +34 -0
  83. package/skills/skill-generate-docx/bin/cli.ts +6 -0
  84. package/skills/skill-generate-env/bin/cli.ts +34 -0
  85. package/skills/skill-generate-excel/bin/cli.ts +34 -0
  86. package/skills/skill-generate-favicon/bin/cli.ts +34 -0
  87. package/skills/skill-generate-mock-data/bin/cli.ts +34 -0
  88. package/skills/skill-generate-pdf/bin/cli.ts +6 -0
  89. package/skills/skill-generate-pr-description/bin/cli.ts +34 -0
  90. package/skills/skill-generate-presentation/bin/cli.ts +34 -0
  91. package/skills/skill-generate-qrcode/bin/cli.ts +34 -0
  92. package/skills/skill-generate-regex/bin/cli.ts +34 -0
  93. package/skills/skill-generate-resume/bin/cli.ts +34 -0
  94. package/skills/skill-generate-sitemap/bin/cli.ts +34 -0
  95. package/skills/skill-generate-social-posts/bin/cli.ts +34 -0
  96. package/skills/skill-generate-sql/bin/cli.ts +34 -0
  97. package/skills/skill-gif-maker/bin/cli.ts +34 -0
  98. package/skills/skill-github-manager/bin/cli.ts +34 -0
  99. package/skills/skill-gmail/bin/cli.ts +34 -0
  100. package/skills/skill-goal-quarterly-roadmap/bin/cli.ts +34 -0
  101. package/skills/skill-grant-application-drafter/bin/cli.ts +34 -0
  102. package/skills/skill-grocery-basket-optimizer/bin/cli.ts +34 -0
  103. package/skills/skill-guest-communication-suite/bin/cli.ts +34 -0
  104. package/skills/skill-habit-reflection-digest/bin/cli.ts +34 -0
  105. package/skills/skill-highlight-reel-generator/bin/cli.ts +34 -0
  106. package/skills/skill-homework-feedback-coach/bin/cli.ts +34 -0
  107. package/skills/skill-hook/bunfig.toml +5 -0
  108. package/skills/skill-household-maintenance-mgr/bin/cli.ts +34 -0
  109. package/skills/skill-http-server/bin/cli.ts +34 -0
  110. package/skills/skill-implementation/bunfig.toml +5 -0
  111. package/skills/skill-implementation-agent/bin/cli.ts +34 -0
  112. package/skills/skill-implementation-plan/bin/cli.ts +34 -0
  113. package/skills/skill-implementation-todo/bin/cli.ts +34 -0
  114. package/skills/skill-inbox-priority-planner/bin/cli.ts +34 -0
  115. package/skills/skill-invoice/bin/cli.ts +20 -0
  116. package/skills/skill-invoice-dispute-helper/bin/cli.ts +34 -0
  117. package/skills/skill-itinerary-architect/bin/cli.ts +34 -0
  118. package/skills/skill-jingle-composer/bin/cli.ts +34 -0
  119. package/skills/skill-kpi-digest-generator/bin/cli.ts +34 -0
  120. package/skills/skill-lab-notebook-formatter/bin/cli.ts +34 -0
  121. package/skills/skill-landing-page-copy/bin/cli.ts +34 -0
  122. package/skills/skill-latex-table-generator/bin/cli.ts +34 -0
  123. package/skills/skill-learning-style-profiler/bin/cli.ts +34 -0
  124. package/skills/skill-lesson-plan-customizer/bin/cli.ts +34 -0
  125. package/skills/skill-livestream-runofshow/bin/cli.ts +34 -0
  126. package/skills/skill-longform-structurer/bin/cli.ts +34 -0
  127. package/skills/skill-lorem-generator/bin/cli.ts +34 -0
  128. package/skills/skill-managehook/bin/cli.ts +241 -0
  129. package/skills/skill-managemcp/bin/cli.ts +241 -0
  130. package/skills/skill-manageskill/bin/cli.ts +241 -0
  131. package/skills/skill-markdown-validator/bin/cli.ts +34 -0
  132. package/skills/skill-mcp-builder/bin/cli.ts +34 -0
  133. package/skills/skill-meal-plan-designer/bin/cli.ts +34 -0
  134. package/skills/skill-meeting-insight-summarizer/bin/cli.ts +34 -0
  135. package/skills/skill-merge-pdfs/bin/cli.ts +34 -0
  136. package/skills/skill-microcopy-generator/bin/cli.ts +34 -0
  137. package/skills/skill-mindfulness-prompt-cache/bin/cli.ts +34 -0
  138. package/skills/skill-notion-manager/bin/cli.ts +34 -0
  139. package/skills/skill-onboarding-sequence-builder/bin/cli.ts +34 -0
  140. package/skills/skill-onsite-ops-checklist/bin/cli.ts +34 -0
  141. package/skills/skill-outreach-cadence-designer/bin/cli.ts +34 -0
  142. package/skills/skill-packaging-concept-studio/bin/cli.ts +34 -0
  143. package/skills/skill-packing-plan-pro/bin/cli.ts +34 -0
  144. package/skills/skill-parent-teacher-brief/bin/cli.ts +34 -0
  145. package/skills/skill-partner-kit-assembler/bin/cli.ts +34 -0
  146. package/skills/skill-payroll-change-prepper/bin/cli.ts +34 -0
  147. package/skills/skill-persona-based-adwriter/bin/cli.ts +34 -0
  148. package/skills/skill-persona-generator/bin/cli.ts +34 -0
  149. package/skills/skill-personal-daily-ops/bin/cli.ts +34 -0
  150. package/skills/skill-pet-care-scheduler/bin/cli.ts +34 -0
  151. package/skills/skill-podcast-show-notes/bin/cli.ts +34 -0
  152. package/skills/skill-presentation-theme-maker/bin/cli.ts +34 -0
  153. package/skills/skill-press-release-drafter/bin/cli.ts +34 -0
  154. package/skills/skill-print-collateral-designer/bin/cli.ts +34 -0
  155. package/skills/skill-procurement-scorecard/bin/cli.ts +34 -0
  156. package/skills/skill-product-demo-script/bin/cli.ts +34 -0
  157. package/skills/skill-product-mockup/bin/cli.ts +34 -0
  158. package/skills/skill-project-retro-companion/bin/cli.ts +34 -0
  159. package/skills/skill-proposal-redline-advisor/bin/cli.ts +34 -0
  160. package/skills/skill-regex-tester/bin/cli.ts +34 -0
  161. package/skills/skill-remove-background/bin/cli.ts +34 -0
  162. package/skills/skill-risk-disclosure-kit/bin/cli.ts +34 -0
  163. package/skills/skill-roi-comparison-tool/bin/cli.ts +34 -0
  164. package/skills/skill-sales-call-recapper/bin/cli.ts +34 -0
  165. package/skills/skill-salescopy/bin/cli.ts +20 -0
  166. package/skills/skill-scaffold-project/bin/cli.ts +34 -0
  167. package/skills/skill-scholarship-tracker/bin/cli.ts +34 -0
  168. package/skills/skill-scientific-figure-check/bin/cli.ts +34 -0
  169. package/skills/skill-seating-chart-maker/bin/cli.ts +34 -0
  170. package/skills/skill-security-audit/bin/cli.ts +34 -0
  171. package/skills/skill-seo-brief-builder/bin/cli.ts +34 -0
  172. package/skills/skill-slack-assistant/bin/cli.ts +34 -0
  173. package/skills/skill-sleep-routine-analyzer/bin/cli.ts +34 -0
  174. package/skills/skill-social-media-kit/bin/cli.ts +34 -0
  175. package/skills/skill-split-pdf/bin/cli.ts +34 -0
  176. package/skills/skill-sponsorship-proposal-lab/bin/cli.ts +34 -0
  177. package/skills/skill-spreadsheet-cleanroom/bin/cli.ts +34 -0
  178. package/skills/skill-statistical-test-selector/bin/cli.ts +34 -0
  179. package/skills/skill-stress-relief-playbook/bin/cli.ts +34 -0
  180. package/skills/skill-study-guide-builder/bin/cli.ts +34 -0
  181. package/skills/skill-subscription-spend-watcher/bin/cli.ts +34 -0
  182. package/skills/skill-subtitle/bin/cli.ts +20 -0
  183. package/skills/skill-survey-insight-extractor/bin/cli.ts +34 -0
  184. package/skills/skill-terraform-generator/bin/cli.ts +34 -0
  185. package/skills/skill-testimonial-graphics/bin/cli.ts +34 -0
  186. package/skills/skill-timesheet/bin/cli.ts +47 -0
  187. package/skills/skill-travel-budget-balancer/bin/cli.ts +34 -0
  188. package/skills/skill-validate-config/bin/cli.ts +34 -0
  189. package/skills/skill-video-cut-suggester/bin/cli.ts +34 -0
  190. package/skills/skill-video-downloader/bin/cli.ts +34 -0
  191. package/skills/skill-video-thumbnail/bin/cli.ts +34 -0
  192. package/skills/skill-voiceover-casting-assistant/bin/cli.ts +34 -0
  193. package/skills/skill-watermark/bin/cli.ts +34 -0
  194. package/skills/skill-webcrawling/bin/cli.ts +21 -0
  195. package/skills/skill-webinar-script-coach/bin/cli.ts +34 -0
  196. package/skills/skill-wellness-progress-reporter/bin/cli.ts +34 -0
  197. package/skills/skill-workout-cycle-planner/bin/cli.ts +34 -0
package/bin/index.js CHANGED
@@ -5,25 +5,43 @@ var __getProtoOf = Object.getPrototypeOf;
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ function __accessProp(key) {
9
+ return this[key];
10
+ }
11
+ var __toESMCache_node;
12
+ var __toESMCache_esm;
8
13
  var __toESM = (mod, isNodeMode, target) => {
14
+ var canCache = mod != null && typeof mod === "object";
15
+ if (canCache) {
16
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
17
+ var cached = cache.get(mod);
18
+ if (cached)
19
+ return cached;
20
+ }
9
21
  target = mod != null ? __create(__getProtoOf(mod)) : {};
10
22
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
11
23
  for (let key of __getOwnPropNames(mod))
12
24
  if (!__hasOwnProp.call(to, key))
13
25
  __defProp(to, key, {
14
- get: () => mod[key],
26
+ get: __accessProp.bind(mod, key),
15
27
  enumerable: true
16
28
  });
29
+ if (canCache)
30
+ cache.set(mod, to);
17
31
  return to;
18
32
  };
19
33
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
34
+ var __returnValue = (v) => v;
35
+ function __exportSetter(name, newValue) {
36
+ this[name] = __returnValue.bind(null, newValue);
37
+ }
20
38
  var __export = (target, all) => {
21
39
  for (var name in all)
22
40
  __defProp(target, name, {
23
41
  get: all[name],
24
42
  enumerable: true,
25
43
  configurable: true,
26
- set: (newValue) => all[name] = () => newValue
44
+ set: __exportSetter.bind(all, name)
27
45
  });
28
46
  };
29
47
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
@@ -1878,7 +1896,7 @@ var package_default;
1878
1896
  var init_package = __esm(() => {
1879
1897
  package_default = {
1880
1898
  name: "@hasna/skills",
1881
- version: "0.1.13",
1899
+ version: "0.1.14",
1882
1900
  description: "Skills library for AI coding agents",
1883
1901
  type: "module",
1884
1902
  bin: {
@@ -1901,9 +1919,12 @@ var init_package = __esm(() => {
1901
1919
  main: "./dist/index.js",
1902
1920
  types: "./dist/index.d.ts",
1903
1921
  scripts: {
1904
- build: "bun build ./src/cli/index.tsx --outdir ./bin --target bun --external ink --external react --external chalk && bun build ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build ./src/index.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
1922
+ clean: "rm -rf bin/ dist/",
1923
+ build: "bun run clean && bun build ./src/cli/index.tsx --outdir ./bin --target bun --external ink --external react --external chalk && bun build ./src/mcp/index.ts --outfile ./bin/mcp.js --target bun && bun build ./src/index.ts --outdir ./dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist",
1905
1924
  test: "bun test",
1906
1925
  dev: "bun run ./src/cli/index.tsx",
1926
+ "dev:watch": "bun --watch run ./src/cli/index.tsx",
1927
+ "dev:mcp": "bun --watch run ./src/mcp/index.ts",
1907
1928
  typecheck: "tsc --noEmit",
1908
1929
  prepublishOnly: "bun run build",
1909
1930
  "dashboard:dev": "cd dashboard && bun run dev",
@@ -2045,6 +2066,21 @@ function searchSkills(query) {
2045
2066
  function getSkill(name) {
2046
2067
  return SKILLS.find((s) => s.name === name);
2047
2068
  }
2069
+ function levenshtein(a, b) {
2070
+ const m = a.length, n = b.length;
2071
+ const dp = Array.from({ length: m + 1 }, (_, i) => Array.from({ length: n + 1 }, (_2, j) => i === 0 ? j : j === 0 ? i : 0));
2072
+ for (let i = 1;i <= m; i++) {
2073
+ for (let j = 1;j <= n; j++) {
2074
+ dp[i][j] = a[i - 1] === b[j - 1] ? dp[i - 1][j - 1] : 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);
2075
+ }
2076
+ }
2077
+ return dp[m][n];
2078
+ }
2079
+ function findSimilarSkills(query, maxResults = 3) {
2080
+ const q = query.toLowerCase();
2081
+ const scored = SKILLS.map((s) => ({ name: s.name, dist: levenshtein(q, s.name.toLowerCase()) })).filter((s) => s.dist <= Math.max(3, Math.floor(q.length / 2))).sort((a, b) => a.dist - b.dist);
2082
+ return scored.slice(0, maxResults).map((s) => s.name);
2083
+ }
2048
2084
  var CATEGORIES, SKILLS;
2049
2085
  var init_registry = __esm(() => {
2050
2086
  CATEGORIES = [
@@ -5126,7 +5162,7 @@ var require_cli_spinners = __commonJS((exports, module) => {
5126
5162
  });
5127
5163
 
5128
5164
  // src/lib/installer.ts
5129
- import { existsSync, cpSync, mkdirSync, writeFileSync, rmSync, readdirSync, statSync, readFileSync } from "fs";
5165
+ import { existsSync, cpSync, mkdirSync, writeFileSync, rmSync, readdirSync, statSync, readFileSync, accessSync, constants } from "fs";
5130
5166
  import { join, dirname } from "path";
5131
5167
  import { homedir } from "os";
5132
5168
  import { fileURLToPath } from "url";
@@ -5181,6 +5217,7 @@ function installSkill(name, options = {}) {
5181
5217
  }
5182
5218
  });
5183
5219
  updateSkillsIndex(destDir);
5220
+ recordInstall(destDir, name);
5184
5221
  const meta = getSkill(name);
5185
5222
  if (meta?.dependencies && meta.dependencies.length > 0) {
5186
5223
  const installed = getInstalledSkills(targetDir);
@@ -5206,7 +5243,9 @@ function installSkill(name, options = {}) {
5206
5243
  }
5207
5244
  function updateSkillsIndex(skillsDir) {
5208
5245
  const indexPath = join(skillsDir, "index.ts");
5209
- const skills = readdirSync(skillsDir).filter((f) => f.startsWith("skill-") && !f.includes("."));
5246
+ const meta = loadMeta(skillsDir);
5247
+ const disabledSet = new Set(meta.disabled || []);
5248
+ const skills = readdirSync(skillsDir).filter((f) => f.startsWith("skill-") && !f.includes(".") && !disabledSet.has(f.replace("skill-", "")));
5210
5249
  const exports = skills.map((s) => {
5211
5250
  const name = s.replace("skill-", "").replace(/-/g, "_");
5212
5251
  return `export * as ${name} from './${s}/src/index.js';`;
@@ -5221,6 +5260,43 @@ ${exports}
5221
5260
  `;
5222
5261
  writeFileSync(indexPath, content);
5223
5262
  }
5263
+ function getMetaPath(skillsDir) {
5264
+ return join(skillsDir, ".meta.json");
5265
+ }
5266
+ function loadMeta(skillsDir) {
5267
+ const metaPath = getMetaPath(skillsDir);
5268
+ if (existsSync(metaPath)) {
5269
+ try {
5270
+ return JSON.parse(readFileSync(metaPath, "utf-8"));
5271
+ } catch {}
5272
+ }
5273
+ return { skills: {} };
5274
+ }
5275
+ function saveMeta(skillsDir, meta) {
5276
+ writeFileSync(getMetaPath(skillsDir), JSON.stringify(meta, null, 2));
5277
+ }
5278
+ function recordInstall(skillsDir, name) {
5279
+ const meta = loadMeta(skillsDir);
5280
+ const skillName = normalizeSkillName(name);
5281
+ let version = "unknown";
5282
+ try {
5283
+ const pkgPath = join(skillsDir, skillName, "package.json");
5284
+ if (existsSync(pkgPath)) {
5285
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
5286
+ version = pkg.version || "unknown";
5287
+ }
5288
+ } catch {}
5289
+ meta.skills[name] = { installedAt: new Date().toISOString(), version };
5290
+ saveMeta(skillsDir, meta);
5291
+ }
5292
+ function recordRemove(skillsDir, name) {
5293
+ const meta = loadMeta(skillsDir);
5294
+ delete meta.skills[name];
5295
+ saveMeta(skillsDir, meta);
5296
+ }
5297
+ function getInstallMeta(targetDir = process.cwd()) {
5298
+ return loadMeta(join(targetDir, ".skills"));
5299
+ }
5224
5300
  function getInstalledSkills(targetDir = process.cwd()) {
5225
5301
  const skillsDir = join(targetDir, ".skills");
5226
5302
  if (!existsSync(skillsDir)) {
@@ -5240,6 +5316,7 @@ function removeSkill(name, targetDir = process.cwd()) {
5240
5316
  }
5241
5317
  rmSync(skillPath, { recursive: true, force: true });
5242
5318
  updateSkillsIndex(skillsDir);
5319
+ recordRemove(skillsDir, name);
5243
5320
  return true;
5244
5321
  }
5245
5322
  function resolveAgents(agentArg) {
@@ -5280,6 +5357,30 @@ function installSkillForAgent(name, options, generateSkillMd) {
5280
5357
  return { skill: name, success: false, error: `No SKILL.md found and could not generate one for '${name}'` };
5281
5358
  }
5282
5359
  const destDir = getAgentSkillPath(name, agent, scope, projectDir);
5360
+ if (scope === "global") {
5361
+ const agentBaseDir = join(homedir(), `.${agent}`);
5362
+ if (!existsSync(agentBaseDir)) {
5363
+ const agentLabels = {
5364
+ claude: "Claude Code",
5365
+ codex: "Codex CLI",
5366
+ gemini: "Gemini CLI"
5367
+ };
5368
+ return {
5369
+ skill: name,
5370
+ success: false,
5371
+ error: `Agent directory ${agentBaseDir} does not exist. Is ${agentLabels[agent]} installed?`
5372
+ };
5373
+ }
5374
+ try {
5375
+ accessSync(agentBaseDir, constants.W_OK);
5376
+ } catch {
5377
+ return {
5378
+ skill: name,
5379
+ success: false,
5380
+ error: `Agent directory ${agentBaseDir} is not writable. Check permissions.`
5381
+ };
5382
+ }
5383
+ }
5283
5384
  try {
5284
5385
  mkdirSync(destDir, { recursive: true });
5285
5386
  writeFileSync(join(destDir, "SKILL.md"), skillMdContent);
@@ -5632,7 +5733,7 @@ var init_skillinfo = __esm(() => {
5632
5733
  GENERIC_ENV_PATTERN = /\b((?:OPENAI|ANTHROPIC|GEMINI|XAI|ELEVENLABS|DEEPGRAM|REPLICATE|FAL|STABILITY|EXA|FIRECRAWL|TWILIO|SENDGRID|RESEND|SLACK|DISCORD|NOTION|LINEAR|GITHUB|AWS|GOOGLE|CLOUDFLARE|VERCEL|SUPABASE|STRIPE)_[A-Z_]+)\b/g;
5633
5734
  });
5634
5735
 
5635
- // node_modules/zod/v3/helpers/util.js
5736
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.js
5636
5737
  var util, objectUtil, ZodParsedType, getParsedType = (data) => {
5637
5738
  const t = typeof data;
5638
5739
  switch (t) {
@@ -5763,7 +5864,7 @@ var init_util = __esm(() => {
5763
5864
  ]);
5764
5865
  });
5765
5866
 
5766
- // node_modules/zod/v3/ZodError.js
5867
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.js
5767
5868
  var ZodIssueCode, ZodError;
5768
5869
  var init_ZodError = __esm(() => {
5769
5870
  init_util();
@@ -5881,7 +5982,7 @@ var init_ZodError = __esm(() => {
5881
5982
  };
5882
5983
  });
5883
5984
 
5884
- // node_modules/zod/v3/locales/en.js
5985
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/locales/en.js
5885
5986
  var errorMap = (issue, _ctx) => {
5886
5987
  let message;
5887
5988
  switch (issue.code) {
@@ -5988,7 +6089,7 @@ var init_en = __esm(() => {
5988
6089
  en_default = errorMap;
5989
6090
  });
5990
6091
 
5991
- // node_modules/zod/v3/errors.js
6092
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/errors.js
5992
6093
  function getErrorMap() {
5993
6094
  return overrideErrorMap;
5994
6095
  }
@@ -5998,7 +6099,7 @@ var init_errors = __esm(() => {
5998
6099
  overrideErrorMap = en_default;
5999
6100
  });
6000
6101
 
6001
- // node_modules/zod/v3/helpers/parseUtil.js
6102
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.js
6002
6103
  function addIssueToContext(ctx, issueData) {
6003
6104
  const overrideMap = getErrorMap();
6004
6105
  const issue = makeIssue({
@@ -6102,10 +6203,10 @@ var init_parseUtil = __esm(() => {
6102
6203
  });
6103
6204
  });
6104
6205
 
6105
- // node_modules/zod/v3/helpers/typeAliases.js
6206
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.js
6106
6207
  var init_typeAliases = () => {};
6107
6208
 
6108
- // node_modules/zod/v3/helpers/errorUtil.js
6209
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.js
6109
6210
  var errorUtil;
6110
6211
  var init_errorUtil = __esm(() => {
6111
6212
  (function(errorUtil2) {
@@ -6114,7 +6215,7 @@ var init_errorUtil = __esm(() => {
6114
6215
  })(errorUtil || (errorUtil = {}));
6115
6216
  });
6116
6217
 
6117
- // node_modules/zod/v3/types.js
6218
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.js
6118
6219
  class ParseInputLazyPath {
6119
6220
  constructor(parent, value, path, key) {
6120
6221
  this._cachedPath = [];
@@ -9425,7 +9526,7 @@ var init_types = __esm(() => {
9425
9526
  pipelineType = ZodPipeline.create;
9426
9527
  });
9427
9528
 
9428
- // node_modules/zod/v3/external.js
9529
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/external.js
9429
9530
  var init_external = __esm(() => {
9430
9531
  init_errors();
9431
9532
  init_parseUtil();
@@ -9435,12 +9536,12 @@ var init_external = __esm(() => {
9435
9536
  init_ZodError();
9436
9537
  });
9437
9538
 
9438
- // node_modules/zod/v3/index.js
9539
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/index.js
9439
9540
  var init_v3 = __esm(() => {
9440
9541
  init_external();
9441
9542
  });
9442
9543
 
9443
- // node_modules/zod/v4/core/core.js
9544
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js
9444
9545
  function $constructor(name, initializer, params) {
9445
9546
  function init(inst, def) {
9446
9547
  if (!inst._zod) {
@@ -9518,7 +9619,7 @@ var init_core = __esm(() => {
9518
9619
  globalConfig = {};
9519
9620
  });
9520
9621
 
9521
- // node_modules/zod/v4/core/util.js
9622
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js
9522
9623
  var exports_util = {};
9523
9624
  __export(exports_util, {
9524
9625
  unwrapMessage: () => unwrapMessage,
@@ -10194,7 +10295,7 @@ var init_util2 = __esm(() => {
10194
10295
  };
10195
10296
  });
10196
10297
 
10197
- // node_modules/zod/v4/core/errors.js
10298
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js
10198
10299
  function flattenError(error, mapper = (issue2) => issue2.message) {
10199
10300
  const fieldErrors = {};
10200
10301
  const formErrors = [];
@@ -10335,7 +10436,7 @@ var init_errors2 = __esm(() => {
10335
10436
  $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
10336
10437
  });
10337
10438
 
10338
- // node_modules/zod/v4/core/parse.js
10439
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js
10339
10440
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
10340
10441
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
10341
10442
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -10417,7 +10518,7 @@ var init_parse = __esm(() => {
10417
10518
  safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
10418
10519
  });
10419
10520
 
10420
- // node_modules/zod/v4/core/regexes.js
10521
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js
10421
10522
  var exports_regexes = {};
10422
10523
  __export(exports_regexes, {
10423
10524
  xid: () => xid,
@@ -10573,7 +10674,7 @@ var init_regexes = __esm(() => {
10573
10674
  sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
10574
10675
  });
10575
10676
 
10576
- // node_modules/zod/v4/core/checks.js
10677
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js
10577
10678
  function handleCheckPropertyResult(result, payload, property) {
10578
10679
  if (result.issues.length) {
10579
10680
  payload.issues.push(...prefixIssues(property, result.issues));
@@ -11126,7 +11227,7 @@ var init_checks = __esm(() => {
11126
11227
  });
11127
11228
  });
11128
11229
 
11129
- // node_modules/zod/v4/core/doc.js
11230
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js
11130
11231
  class Doc {
11131
11232
  constructor(args = []) {
11132
11233
  this.content = [];
@@ -11164,7 +11265,7 @@ class Doc {
11164
11265
  }
11165
11266
  }
11166
11267
 
11167
- // node_modules/zod/v4/core/versions.js
11268
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js
11168
11269
  var version;
11169
11270
  var init_versions = __esm(() => {
11170
11271
  version = {
@@ -11174,7 +11275,7 @@ var init_versions = __esm(() => {
11174
11275
  };
11175
11276
  });
11176
11277
 
11177
- // node_modules/zod/v4/core/schemas.js
11278
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js
11178
11279
  function isValidBase64(data) {
11179
11280
  if (data === "")
11180
11281
  return true;
@@ -13147,7 +13248,7 @@ var init_schemas = __esm(() => {
13147
13248
  });
13148
13249
  });
13149
13250
 
13150
- // node_modules/zod/v4/locales/ar.js
13251
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ar.js
13151
13252
  function ar_default() {
13152
13253
  return {
13153
13254
  localeError: error()
@@ -13257,7 +13358,7 @@ var init_ar = __esm(() => {
13257
13358
  init_util2();
13258
13359
  });
13259
13360
 
13260
- // node_modules/zod/v4/locales/az.js
13361
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/az.js
13261
13362
  function az_default() {
13262
13363
  return {
13263
13364
  localeError: error2()
@@ -13366,7 +13467,7 @@ var init_az = __esm(() => {
13366
13467
  init_util2();
13367
13468
  });
13368
13469
 
13369
- // node_modules/zod/v4/locales/be.js
13470
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/be.js
13370
13471
  function getBelarusianPlural(count, one, few, many) {
13371
13472
  const absCount = Math.abs(count);
13372
13473
  const lastDigit = absCount % 10;
@@ -13526,7 +13627,7 @@ var init_be = __esm(() => {
13526
13627
  init_util2();
13527
13628
  });
13528
13629
 
13529
- // node_modules/zod/v4/locales/bg.js
13630
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/bg.js
13530
13631
  function bg_default() {
13531
13632
  return {
13532
13633
  localeError: error4()
@@ -13650,7 +13751,7 @@ var init_bg = __esm(() => {
13650
13751
  init_util2();
13651
13752
  });
13652
13753
 
13653
- // node_modules/zod/v4/locales/ca.js
13754
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ca.js
13654
13755
  function ca_default() {
13655
13756
  return {
13656
13757
  localeError: error5()
@@ -13761,7 +13862,7 @@ var init_ca = __esm(() => {
13761
13862
  init_util2();
13762
13863
  });
13763
13864
 
13764
- // node_modules/zod/v4/locales/cs.js
13865
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/cs.js
13765
13866
  function cs_default() {
13766
13867
  return {
13767
13868
  localeError: error6()
@@ -13876,7 +13977,7 @@ var init_cs = __esm(() => {
13876
13977
  init_util2();
13877
13978
  });
13878
13979
 
13879
- // node_modules/zod/v4/locales/da.js
13980
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/da.js
13880
13981
  function da_default() {
13881
13982
  return {
13882
13983
  localeError: error7()
@@ -13995,7 +14096,7 @@ var init_da = __esm(() => {
13995
14096
  init_util2();
13996
14097
  });
13997
14098
 
13998
- // node_modules/zod/v4/locales/de.js
14099
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/de.js
13999
14100
  function de_default() {
14000
14101
  return {
14001
14102
  localeError: error8()
@@ -14107,7 +14208,7 @@ var init_de = __esm(() => {
14107
14208
  init_util2();
14108
14209
  });
14109
14210
 
14110
- // node_modules/zod/v4/locales/en.js
14211
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/en.js
14111
14212
  function en_default2() {
14112
14213
  return {
14113
14214
  localeError: error9()
@@ -14217,7 +14318,7 @@ var init_en2 = __esm(() => {
14217
14318
  init_util2();
14218
14319
  });
14219
14320
 
14220
- // node_modules/zod/v4/locales/eo.js
14321
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/eo.js
14221
14322
  function eo_default() {
14222
14323
  return {
14223
14324
  localeError: error10()
@@ -14330,7 +14431,7 @@ var init_eo = __esm(() => {
14330
14431
  init_util2();
14331
14432
  });
14332
14433
 
14333
- // node_modules/zod/v4/locales/es.js
14434
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/es.js
14334
14435
  function es_default() {
14335
14436
  return {
14336
14437
  localeError: error11()
@@ -14466,7 +14567,7 @@ var init_es = __esm(() => {
14466
14567
  init_util2();
14467
14568
  });
14468
14569
 
14469
- // node_modules/zod/v4/locales/fa.js
14570
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fa.js
14470
14571
  function fa_default() {
14471
14572
  return {
14472
14573
  localeError: error12()
@@ -14584,7 +14685,7 @@ var init_fa = __esm(() => {
14584
14685
  init_util2();
14585
14686
  });
14586
14687
 
14587
- // node_modules/zod/v4/locales/fi.js
14688
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fi.js
14588
14689
  function fi_default() {
14589
14690
  return {
14590
14691
  localeError: error13()
@@ -14700,7 +14801,7 @@ var init_fi = __esm(() => {
14700
14801
  init_util2();
14701
14802
  });
14702
14803
 
14703
- // node_modules/zod/v4/locales/fr.js
14804
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr.js
14704
14805
  function fr_default() {
14705
14806
  return {
14706
14807
  localeError: error14()
@@ -14812,7 +14913,7 @@ var init_fr = __esm(() => {
14812
14913
  init_util2();
14813
14914
  });
14814
14915
 
14815
- // node_modules/zod/v4/locales/fr-CA.js
14916
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
14816
14917
  function fr_CA_default() {
14817
14918
  return {
14818
14919
  localeError: error15()
@@ -14923,7 +15024,7 @@ var init_fr_CA = __esm(() => {
14923
15024
  init_util2();
14924
15025
  });
14925
15026
 
14926
- // node_modules/zod/v4/locales/he.js
15027
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/he.js
14927
15028
  function he_default() {
14928
15029
  return {
14929
15030
  localeError: error16()
@@ -15120,7 +15221,7 @@ var init_he = __esm(() => {
15120
15221
  init_util2();
15121
15222
  });
15122
15223
 
15123
- // node_modules/zod/v4/locales/hu.js
15224
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hu.js
15124
15225
  function hu_default() {
15125
15226
  return {
15126
15227
  localeError: error17()
@@ -15232,7 +15333,7 @@ var init_hu = __esm(() => {
15232
15333
  init_util2();
15233
15334
  });
15234
15335
 
15235
- // node_modules/zod/v4/locales/hy.js
15336
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/hy.js
15236
15337
  function getArmenianPlural(count, one, many) {
15237
15338
  return Math.abs(count) === 1 ? one : many;
15238
15339
  }
@@ -15383,7 +15484,7 @@ var init_hy = __esm(() => {
15383
15484
  init_util2();
15384
15485
  });
15385
15486
 
15386
- // node_modules/zod/v4/locales/id.js
15487
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/id.js
15387
15488
  function id_default() {
15388
15489
  return {
15389
15490
  localeError: error19()
@@ -15493,7 +15594,7 @@ var init_id = __esm(() => {
15493
15594
  init_util2();
15494
15595
  });
15495
15596
 
15496
- // node_modules/zod/v4/locales/is.js
15597
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/is.js
15497
15598
  function is_default() {
15498
15599
  return {
15499
15600
  localeError: error20()
@@ -15606,7 +15707,7 @@ var init_is = __esm(() => {
15606
15707
  init_util2();
15607
15708
  });
15608
15709
 
15609
- // node_modules/zod/v4/locales/it.js
15710
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/it.js
15610
15711
  function it_default() {
15611
15712
  return {
15612
15713
  localeError: error21()
@@ -15718,7 +15819,7 @@ var init_it = __esm(() => {
15718
15819
  init_util2();
15719
15820
  });
15720
15821
 
15721
- // node_modules/zod/v4/locales/ja.js
15822
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ja.js
15722
15823
  function ja_default() {
15723
15824
  return {
15724
15825
  localeError: error22()
@@ -15829,7 +15930,7 @@ var init_ja = __esm(() => {
15829
15930
  init_util2();
15830
15931
  });
15831
15932
 
15832
- // node_modules/zod/v4/locales/ka.js
15933
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ka.js
15833
15934
  function ka_default() {
15834
15935
  return {
15835
15936
  localeError: error23()
@@ -15945,7 +16046,7 @@ var init_ka = __esm(() => {
15945
16046
  init_util2();
15946
16047
  });
15947
16048
 
15948
- // node_modules/zod/v4/locales/km.js
16049
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/km.js
15949
16050
  function km_default() {
15950
16051
  return {
15951
16052
  localeError: error24()
@@ -16059,7 +16160,7 @@ var init_km = __esm(() => {
16059
16160
  init_util2();
16060
16161
  });
16061
16162
 
16062
- // node_modules/zod/v4/locales/kh.js
16163
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/kh.js
16063
16164
  function kh_default() {
16064
16165
  return km_default();
16065
16166
  }
@@ -16067,7 +16168,7 @@ var init_kh = __esm(() => {
16067
16168
  init_km();
16068
16169
  });
16069
16170
 
16070
- // node_modules/zod/v4/locales/ko.js
16171
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ko.js
16071
16172
  function ko_default() {
16072
16173
  return {
16073
16174
  localeError: error25()
@@ -16182,7 +16283,7 @@ var init_ko = __esm(() => {
16182
16283
  init_util2();
16183
16284
  });
16184
16285
 
16185
- // node_modules/zod/v4/locales/lt.js
16286
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/lt.js
16186
16287
  function getUnitTypeFromNumber(number2) {
16187
16288
  const abs = Math.abs(number2);
16188
16289
  const last = abs % 10;
@@ -16388,7 +16489,7 @@ var init_lt = __esm(() => {
16388
16489
  init_util2();
16389
16490
  });
16390
16491
 
16391
- // node_modules/zod/v4/locales/mk.js
16492
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/mk.js
16392
16493
  function mk_default() {
16393
16494
  return {
16394
16495
  localeError: error27()
@@ -16501,7 +16602,7 @@ var init_mk = __esm(() => {
16501
16602
  init_util2();
16502
16603
  });
16503
16604
 
16504
- // node_modules/zod/v4/locales/ms.js
16605
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ms.js
16505
16606
  function ms_default() {
16506
16607
  return {
16507
16608
  localeError: error28()
@@ -16612,7 +16713,7 @@ var init_ms = __esm(() => {
16612
16713
  init_util2();
16613
16714
  });
16614
16715
 
16615
- // node_modules/zod/v4/locales/nl.js
16716
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/nl.js
16616
16717
  function nl_default() {
16617
16718
  return {
16618
16719
  localeError: error29()
@@ -16726,7 +16827,7 @@ var init_nl = __esm(() => {
16726
16827
  init_util2();
16727
16828
  });
16728
16829
 
16729
- // node_modules/zod/v4/locales/no.js
16830
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/no.js
16730
16831
  function no_default() {
16731
16832
  return {
16732
16833
  localeError: error30()
@@ -16838,7 +16939,7 @@ var init_no = __esm(() => {
16838
16939
  init_util2();
16839
16940
  });
16840
16941
 
16841
- // node_modules/zod/v4/locales/ota.js
16942
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ota.js
16842
16943
  function ota_default() {
16843
16944
  return {
16844
16945
  localeError: error31()
@@ -16951,7 +17052,7 @@ var init_ota = __esm(() => {
16951
17052
  init_util2();
16952
17053
  });
16953
17054
 
16954
- // node_modules/zod/v4/locales/ps.js
17055
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ps.js
16955
17056
  function ps_default() {
16956
17057
  return {
16957
17058
  localeError: error32()
@@ -17069,7 +17170,7 @@ var init_ps = __esm(() => {
17069
17170
  init_util2();
17070
17171
  });
17071
17172
 
17072
- // node_modules/zod/v4/locales/pl.js
17173
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pl.js
17073
17174
  function pl_default() {
17074
17175
  return {
17075
17176
  localeError: error33()
@@ -17182,7 +17283,7 @@ var init_pl = __esm(() => {
17182
17283
  init_util2();
17183
17284
  });
17184
17285
 
17185
- // node_modules/zod/v4/locales/pt.js
17286
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/pt.js
17186
17287
  function pt_default() {
17187
17288
  return {
17188
17289
  localeError: error34()
@@ -17294,7 +17395,7 @@ var init_pt = __esm(() => {
17294
17395
  init_util2();
17295
17396
  });
17296
17397
 
17297
- // node_modules/zod/v4/locales/ru.js
17398
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ru.js
17298
17399
  function getRussianPlural(count, one, few, many) {
17299
17400
  const absCount = Math.abs(count);
17300
17401
  const lastDigit = absCount % 10;
@@ -17454,7 +17555,7 @@ var init_ru = __esm(() => {
17454
17555
  init_util2();
17455
17556
  });
17456
17557
 
17457
- // node_modules/zod/v4/locales/sl.js
17558
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sl.js
17458
17559
  function sl_default() {
17459
17560
  return {
17460
17561
  localeError: error36()
@@ -17567,7 +17668,7 @@ var init_sl = __esm(() => {
17567
17668
  init_util2();
17568
17669
  });
17569
17670
 
17570
- // node_modules/zod/v4/locales/sv.js
17671
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/sv.js
17571
17672
  function sv_default() {
17572
17673
  return {
17573
17674
  localeError: error37()
@@ -17681,7 +17782,7 @@ var init_sv = __esm(() => {
17681
17782
  init_util2();
17682
17783
  });
17683
17784
 
17684
- // node_modules/zod/v4/locales/ta.js
17785
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ta.js
17685
17786
  function ta_default() {
17686
17787
  return {
17687
17788
  localeError: error38()
@@ -17795,7 +17896,7 @@ var init_ta = __esm(() => {
17795
17896
  init_util2();
17796
17897
  });
17797
17898
 
17798
- // node_modules/zod/v4/locales/th.js
17899
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/th.js
17799
17900
  function th_default() {
17800
17901
  return {
17801
17902
  localeError: error39()
@@ -17909,7 +18010,7 @@ var init_th = __esm(() => {
17909
18010
  init_util2();
17910
18011
  });
17911
18012
 
17912
- // node_modules/zod/v4/locales/tr.js
18013
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/tr.js
17913
18014
  function tr_default() {
17914
18015
  return {
17915
18016
  localeError: error40()
@@ -18018,7 +18119,7 @@ var init_tr = __esm(() => {
18018
18119
  init_util2();
18019
18120
  });
18020
18121
 
18021
- // node_modules/zod/v4/locales/uk.js
18122
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uk.js
18022
18123
  function uk_default() {
18023
18124
  return {
18024
18125
  localeError: error41()
@@ -18130,7 +18231,7 @@ var init_uk = __esm(() => {
18130
18231
  init_util2();
18131
18232
  });
18132
18233
 
18133
- // node_modules/zod/v4/locales/ua.js
18234
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ua.js
18134
18235
  function ua_default() {
18135
18236
  return uk_default();
18136
18237
  }
@@ -18138,7 +18239,7 @@ var init_ua = __esm(() => {
18138
18239
  init_uk();
18139
18240
  });
18140
18241
 
18141
- // node_modules/zod/v4/locales/ur.js
18242
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/ur.js
18142
18243
  function ur_default() {
18143
18244
  return {
18144
18245
  localeError: error42()
@@ -18252,7 +18353,7 @@ var init_ur = __esm(() => {
18252
18353
  init_util2();
18253
18354
  });
18254
18355
 
18255
- // node_modules/zod/v4/locales/uz.js
18356
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/uz.js
18256
18357
  function uz_default() {
18257
18358
  return {
18258
18359
  localeError: error43()
@@ -18365,7 +18466,7 @@ var init_uz = __esm(() => {
18365
18466
  init_util2();
18366
18467
  });
18367
18468
 
18368
- // node_modules/zod/v4/locales/vi.js
18469
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/vi.js
18369
18470
  function vi_default() {
18370
18471
  return {
18371
18472
  localeError: error44()
@@ -18477,7 +18578,7 @@ var init_vi = __esm(() => {
18477
18578
  init_util2();
18478
18579
  });
18479
18580
 
18480
- // node_modules/zod/v4/locales/zh-CN.js
18581
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
18481
18582
  function zh_CN_default() {
18482
18583
  return {
18483
18584
  localeError: error45()
@@ -18590,7 +18691,7 @@ var init_zh_CN = __esm(() => {
18590
18691
  init_util2();
18591
18692
  });
18592
18693
 
18593
- // node_modules/zod/v4/locales/zh-TW.js
18694
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
18594
18695
  function zh_TW_default() {
18595
18696
  return {
18596
18697
  localeError: error46()
@@ -18701,7 +18802,7 @@ var init_zh_TW = __esm(() => {
18701
18802
  init_util2();
18702
18803
  });
18703
18804
 
18704
- // node_modules/zod/v4/locales/yo.js
18805
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/yo.js
18705
18806
  function yo_default() {
18706
18807
  return {
18707
18808
  localeError: error47()
@@ -18812,7 +18913,7 @@ var init_yo = __esm(() => {
18812
18913
  init_util2();
18813
18914
  });
18814
18915
 
18815
- // node_modules/zod/v4/locales/index.js
18916
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/locales/index.js
18816
18917
  var exports_locales = {};
18817
18918
  __export(exports_locales, {
18818
18919
  zhTW: () => zh_TW_default,
@@ -18917,7 +19018,7 @@ var init_locales = __esm(() => {
18917
19018
  init_yo();
18918
19019
  });
18919
19020
 
18920
- // node_modules/zod/v4/core/registries.js
19021
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js
18921
19022
  class $ZodRegistry {
18922
19023
  constructor() {
18923
19024
  this._map = new WeakMap;
@@ -18969,7 +19070,7 @@ var init_registries = __esm(() => {
18969
19070
  globalRegistry = globalThis.__zod_globalRegistry;
18970
19071
  });
18971
19072
 
18972
- // node_modules/zod/v4/core/api.js
19073
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js
18973
19074
  function _string(Class2, params) {
18974
19075
  return new Class2({
18975
19076
  type: "string",
@@ -19897,7 +19998,7 @@ var init_api = __esm(() => {
19897
19998
  };
19898
19999
  });
19899
20000
 
19900
- // node_modules/zod/v4/core/to-json-schema.js
20001
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
19901
20002
  function initializeContext(params) {
19902
20003
  let target = params?.target ?? "draft-2020-12";
19903
20004
  if (target === "draft-4")
@@ -20245,7 +20346,7 @@ var init_to_json_schema = __esm(() => {
20245
20346
  init_registries();
20246
20347
  });
20247
20348
 
20248
- // node_modules/zod/v4/core/json-schema-processors.js
20349
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
20249
20350
  function toJSONSchema(input, params) {
20250
20351
  if ("_idmap" in input) {
20251
20352
  const registry2 = input;
@@ -20757,7 +20858,7 @@ var init_json_schema_processors = __esm(() => {
20757
20858
  };
20758
20859
  });
20759
20860
 
20760
- // node_modules/zod/v4/core/json-schema-generator.js
20861
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
20761
20862
  class JSONSchemaGenerator {
20762
20863
  get metadataRegistry() {
20763
20864
  return this.ctx.metadataRegistry;
@@ -20821,11 +20922,11 @@ var init_json_schema_generator = __esm(() => {
20821
20922
  init_to_json_schema();
20822
20923
  });
20823
20924
 
20824
- // node_modules/zod/v4/core/json-schema.js
20925
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
20825
20926
  var exports_json_schema = {};
20826
20927
  var init_json_schema = () => {};
20827
20928
 
20828
- // node_modules/zod/v4/core/index.js
20929
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/index.js
20829
20930
  var exports_core2 = {};
20830
20931
  __export(exports_core2, {
20831
20932
  version: () => version,
@@ -21120,12 +21221,12 @@ var init_core2 = __esm(() => {
21120
21221
  init_to_json_schema();
21121
21222
  });
21122
21223
 
21123
- // node_modules/zod/v4/mini/parse.js
21224
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/parse.js
21124
21225
  var init_parse2 = __esm(() => {
21125
21226
  init_core2();
21126
21227
  });
21127
21228
 
21128
- // node_modules/zod/v4/mini/schemas.js
21229
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/schemas.js
21129
21230
  function object(shape, params) {
21130
21231
  const def = {
21131
21232
  type: "object",
@@ -21174,16 +21275,16 @@ var init_schemas2 = __esm(() => {
21174
21275
  });
21175
21276
  });
21176
21277
 
21177
- // node_modules/zod/v4/mini/checks.js
21278
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/checks.js
21178
21279
  var init_checks2 = () => {};
21179
21280
 
21180
- // node_modules/zod/v4/mini/iso.js
21281
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/iso.js
21181
21282
  var init_iso = () => {};
21182
21283
 
21183
- // node_modules/zod/v4/mini/coerce.js
21284
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/coerce.js
21184
21285
  var init_coerce = () => {};
21185
21286
 
21186
- // node_modules/zod/v4/mini/external.js
21287
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/external.js
21187
21288
  var init_external2 = __esm(() => {
21188
21289
  init_core2();
21189
21290
  init_json_schema_processors();
@@ -21195,7 +21296,7 @@ var init_external2 = __esm(() => {
21195
21296
  init_checks2();
21196
21297
  });
21197
21298
 
21198
- // node_modules/zod/v4-mini/index.js
21299
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4-mini/index.js
21199
21300
  var init_v4_mini = __esm(() => {
21200
21301
  init_external2();
21201
21302
  });
@@ -21348,7 +21449,7 @@ var init_zod_compat = __esm(() => {
21348
21449
  init_v4_mini();
21349
21450
  });
21350
21451
 
21351
- // node_modules/zod/v4/classic/checks.js
21452
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/checks.js
21352
21453
  var exports_checks2 = {};
21353
21454
  __export(exports_checks2, {
21354
21455
  uppercase: () => _uppercase,
@@ -21385,7 +21486,7 @@ var init_checks3 = __esm(() => {
21385
21486
  init_core2();
21386
21487
  });
21387
21488
 
21388
- // node_modules/zod/v4/classic/iso.js
21489
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js
21389
21490
  var exports_iso2 = {};
21390
21491
  __export(exports_iso2, {
21391
21492
  time: () => time2,
@@ -21431,7 +21532,7 @@ var init_iso2 = __esm(() => {
21431
21532
  });
21432
21533
  });
21433
21534
 
21434
- // node_modules/zod/v4/classic/errors.js
21535
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js
21435
21536
  var initializer2 = (inst, issues) => {
21436
21537
  $ZodError.init(inst, issues);
21437
21538
  inst.name = "ZodError";
@@ -21471,7 +21572,7 @@ var init_errors3 = __esm(() => {
21471
21572
  });
21472
21573
  });
21473
21574
 
21474
- // node_modules/zod/v4/classic/parse.js
21575
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js
21475
21576
  var parse4, parseAsync2, safeParse3, safeParseAsync3, encode2, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2;
21476
21577
  var init_parse3 = __esm(() => {
21477
21578
  init_core2();
@@ -21490,7 +21591,7 @@ var init_parse3 = __esm(() => {
21490
21591
  safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
21491
21592
  });
21492
21593
 
21493
- // node_modules/zod/v4/classic/schemas.js
21594
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
21494
21595
  var exports_schemas2 = {};
21495
21596
  __export(exports_schemas2, {
21496
21597
  xor: () => xor,
@@ -22743,7 +22844,7 @@ var init_schemas3 = __esm(() => {
22743
22844
  meta2 = meta;
22744
22845
  });
22745
22846
 
22746
- // node_modules/zod/v4/classic/compat.js
22847
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/compat.js
22747
22848
  function setErrorMap(map2) {
22748
22849
  config({
22749
22850
  customError: map2
@@ -22771,7 +22872,7 @@ var init_compat = __esm(() => {
22771
22872
  (function(ZodFirstPartyTypeKind3) {})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
22772
22873
  });
22773
22874
 
22774
- // node_modules/zod/v4/classic/from-json-schema.js
22875
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
22775
22876
  function detectVersion(schema, defaultTarget) {
22776
22877
  const $schema = schema.$schema;
22777
22878
  if ($schema === "https://json-schema.org/draft/2020-12/schema") {
@@ -23240,7 +23341,7 @@ var init_from_json_schema = __esm(() => {
23240
23341
  ]);
23241
23342
  });
23242
23343
 
23243
- // node_modules/zod/v4/classic/coerce.js
23344
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
23244
23345
  var exports_coerce2 = {};
23245
23346
  __export(exports_coerce2, {
23246
23347
  string: () => string3,
@@ -23269,7 +23370,7 @@ var init_coerce2 = __esm(() => {
23269
23370
  init_schemas3();
23270
23371
  });
23271
23372
 
23272
- // node_modules/zod/v4/classic/external.js
23373
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
23273
23374
  var exports_external = {};
23274
23375
  __export(exports_external, {
23275
23376
  xor: () => xor,
@@ -23528,12 +23629,12 @@ var init_external3 = __esm(() => {
23528
23629
  config(en_default2());
23529
23630
  });
23530
23631
 
23531
- // node_modules/zod/v4/classic/index.js
23632
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/index.js
23532
23633
  var init_classic = __esm(() => {
23533
23634
  init_external3();
23534
23635
  });
23535
23636
 
23536
- // node_modules/zod/v4/index.js
23637
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/index.js
23537
23638
  var init_v4 = __esm(() => {
23538
23639
  init_classic();
23539
23640
  });
@@ -27041,11 +27142,11 @@ var require_codegen = __commonJS((exports) => {
27041
27142
  const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`;
27042
27143
  return `${varKind} ${this.name}${rhs};` + _n;
27043
27144
  }
27044
- optimizeNames(names, constants) {
27145
+ optimizeNames(names, constants2) {
27045
27146
  if (!names[this.name.str])
27046
27147
  return;
27047
27148
  if (this.rhs)
27048
- this.rhs = optimizeExpr(this.rhs, names, constants);
27149
+ this.rhs = optimizeExpr(this.rhs, names, constants2);
27049
27150
  return this;
27050
27151
  }
27051
27152
  get names() {
@@ -27063,10 +27164,10 @@ var require_codegen = __commonJS((exports) => {
27063
27164
  render({ _n }) {
27064
27165
  return `${this.lhs} = ${this.rhs};` + _n;
27065
27166
  }
27066
- optimizeNames(names, constants) {
27167
+ optimizeNames(names, constants2) {
27067
27168
  if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
27068
27169
  return;
27069
- this.rhs = optimizeExpr(this.rhs, names, constants);
27170
+ this.rhs = optimizeExpr(this.rhs, names, constants2);
27070
27171
  return this;
27071
27172
  }
27072
27173
  get names() {
@@ -27132,8 +27233,8 @@ var require_codegen = __commonJS((exports) => {
27132
27233
  optimizeNodes() {
27133
27234
  return `${this.code}` ? this : undefined;
27134
27235
  }
27135
- optimizeNames(names, constants) {
27136
- this.code = optimizeExpr(this.code, names, constants);
27236
+ optimizeNames(names, constants2) {
27237
+ this.code = optimizeExpr(this.code, names, constants2);
27137
27238
  return this;
27138
27239
  }
27139
27240
  get names() {
@@ -27163,12 +27264,12 @@ var require_codegen = __commonJS((exports) => {
27163
27264
  }
27164
27265
  return nodes.length > 0 ? this : undefined;
27165
27266
  }
27166
- optimizeNames(names, constants) {
27267
+ optimizeNames(names, constants2) {
27167
27268
  const { nodes } = this;
27168
27269
  let i = nodes.length;
27169
27270
  while (i--) {
27170
27271
  const n = nodes[i];
27171
- if (n.optimizeNames(names, constants))
27272
+ if (n.optimizeNames(names, constants2))
27172
27273
  continue;
27173
27274
  subtractNames(names, n.names);
27174
27275
  nodes.splice(i, 1);
@@ -27225,12 +27326,12 @@ var require_codegen = __commonJS((exports) => {
27225
27326
  return;
27226
27327
  return this;
27227
27328
  }
27228
- optimizeNames(names, constants) {
27329
+ optimizeNames(names, constants2) {
27229
27330
  var _a2;
27230
- this.else = (_a2 = this.else) === null || _a2 === undefined ? undefined : _a2.optimizeNames(names, constants);
27231
- if (!(super.optimizeNames(names, constants) || this.else))
27331
+ this.else = (_a2 = this.else) === null || _a2 === undefined ? undefined : _a2.optimizeNames(names, constants2);
27332
+ if (!(super.optimizeNames(names, constants2) || this.else))
27232
27333
  return;
27233
- this.condition = optimizeExpr(this.condition, names, constants);
27334
+ this.condition = optimizeExpr(this.condition, names, constants2);
27234
27335
  return this;
27235
27336
  }
27236
27337
  get names() {
@@ -27255,10 +27356,10 @@ var require_codegen = __commonJS((exports) => {
27255
27356
  render(opts) {
27256
27357
  return `for(${this.iteration})` + super.render(opts);
27257
27358
  }
27258
- optimizeNames(names, constants) {
27259
- if (!super.optimizeNames(names, constants))
27359
+ optimizeNames(names, constants2) {
27360
+ if (!super.optimizeNames(names, constants2))
27260
27361
  return;
27261
- this.iteration = optimizeExpr(this.iteration, names, constants);
27362
+ this.iteration = optimizeExpr(this.iteration, names, constants2);
27262
27363
  return this;
27263
27364
  }
27264
27365
  get names() {
@@ -27296,10 +27397,10 @@ var require_codegen = __commonJS((exports) => {
27296
27397
  render(opts) {
27297
27398
  return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
27298
27399
  }
27299
- optimizeNames(names, constants) {
27300
- if (!super.optimizeNames(names, constants))
27400
+ optimizeNames(names, constants2) {
27401
+ if (!super.optimizeNames(names, constants2))
27301
27402
  return;
27302
- this.iterable = optimizeExpr(this.iterable, names, constants);
27403
+ this.iterable = optimizeExpr(this.iterable, names, constants2);
27303
27404
  return this;
27304
27405
  }
27305
27406
  get names() {
@@ -27344,11 +27445,11 @@ var require_codegen = __commonJS((exports) => {
27344
27445
  (_b = this.finally) === null || _b === undefined || _b.optimizeNodes();
27345
27446
  return this;
27346
27447
  }
27347
- optimizeNames(names, constants) {
27448
+ optimizeNames(names, constants2) {
27348
27449
  var _a2, _b;
27349
- super.optimizeNames(names, constants);
27350
- (_a2 = this.catch) === null || _a2 === undefined || _a2.optimizeNames(names, constants);
27351
- (_b = this.finally) === null || _b === undefined || _b.optimizeNames(names, constants);
27450
+ super.optimizeNames(names, constants2);
27451
+ (_a2 = this.catch) === null || _a2 === undefined || _a2.optimizeNames(names, constants2);
27452
+ (_b = this.finally) === null || _b === undefined || _b.optimizeNames(names, constants2);
27352
27453
  return this;
27353
27454
  }
27354
27455
  get names() {
@@ -27622,7 +27723,7 @@ var require_codegen = __commonJS((exports) => {
27622
27723
  function addExprNames(names, from) {
27623
27724
  return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
27624
27725
  }
27625
- function optimizeExpr(expr, names, constants) {
27726
+ function optimizeExpr(expr, names, constants2) {
27626
27727
  if (expr instanceof code_1.Name)
27627
27728
  return replaceName(expr);
27628
27729
  if (!canOptimize(expr))
@@ -27637,14 +27738,14 @@ var require_codegen = __commonJS((exports) => {
27637
27738
  return items;
27638
27739
  }, []));
27639
27740
  function replaceName(n) {
27640
- const c = constants[n.str];
27741
+ const c = constants2[n.str];
27641
27742
  if (c === undefined || names[n.str] !== 1)
27642
27743
  return n;
27643
27744
  delete names[n.str];
27644
27745
  return c;
27645
27746
  }
27646
27747
  function canOptimize(e) {
27647
- return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined);
27748
+ return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants2[c.str] !== undefined);
27648
27749
  }
27649
27750
  }
27650
27751
  function subtractNames(names, from) {
@@ -32913,7 +33014,7 @@ var require_formats = __commonJS((exports) => {
32913
33014
  }
32914
33015
  var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
32915
33016
  function getTime(strictTimeZone) {
32916
- return function time(str) {
33017
+ return function time3(str) {
32917
33018
  const matches = TIME.exec(str);
32918
33019
  if (!matches)
32919
33020
  return false;
@@ -33177,62 +33278,6 @@ class ExperimentalServerTasks {
33177
33278
  requestStream(request, resultSchema, options) {
33178
33279
  return this._server.requestStream(request, resultSchema, options);
33179
33280
  }
33180
- createMessageStream(params, options) {
33181
- const clientCapabilities = this._server.getClientCapabilities();
33182
- if ((params.tools || params.toolChoice) && !clientCapabilities?.sampling?.tools) {
33183
- throw new Error("Client does not support sampling tools capability.");
33184
- }
33185
- if (params.messages.length > 0) {
33186
- const lastMessage = params.messages[params.messages.length - 1];
33187
- const lastContent = Array.isArray(lastMessage.content) ? lastMessage.content : [lastMessage.content];
33188
- const hasToolResults = lastContent.some((c) => c.type === "tool_result");
33189
- const previousMessage = params.messages.length > 1 ? params.messages[params.messages.length - 2] : undefined;
33190
- const previousContent = previousMessage ? Array.isArray(previousMessage.content) ? previousMessage.content : [previousMessage.content] : [];
33191
- const hasPreviousToolUse = previousContent.some((c) => c.type === "tool_use");
33192
- if (hasToolResults) {
33193
- if (lastContent.some((c) => c.type !== "tool_result")) {
33194
- throw new Error("The last message must contain only tool_result content if any is present");
33195
- }
33196
- if (!hasPreviousToolUse) {
33197
- throw new Error("tool_result blocks are not matching any tool_use from the previous message");
33198
- }
33199
- }
33200
- if (hasPreviousToolUse) {
33201
- const toolUseIds = new Set(previousContent.filter((c) => c.type === "tool_use").map((c) => c.id));
33202
- const toolResultIds = new Set(lastContent.filter((c) => c.type === "tool_result").map((c) => c.toolUseId));
33203
- if (toolUseIds.size !== toolResultIds.size || ![...toolUseIds].every((id) => toolResultIds.has(id))) {
33204
- throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match");
33205
- }
33206
- }
33207
- }
33208
- return this.requestStream({
33209
- method: "sampling/createMessage",
33210
- params
33211
- }, CreateMessageResultSchema, options);
33212
- }
33213
- elicitInputStream(params, options) {
33214
- const clientCapabilities = this._server.getClientCapabilities();
33215
- const mode = params.mode ?? "form";
33216
- switch (mode) {
33217
- case "url": {
33218
- if (!clientCapabilities?.elicitation?.url) {
33219
- throw new Error("Client does not support url elicitation.");
33220
- }
33221
- break;
33222
- }
33223
- case "form": {
33224
- if (!clientCapabilities?.elicitation?.form) {
33225
- throw new Error("Client does not support form elicitation.");
33226
- }
33227
- break;
33228
- }
33229
- }
33230
- const normalizedParams = mode === "form" && params.mode === undefined ? { ...params, mode: "form" } : params;
33231
- return this.requestStream({
33232
- method: "elicitation/create",
33233
- params: normalizedParams
33234
- }, ElicitResultSchema, options);
33235
- }
33236
33281
  async getTask(taskId, options) {
33237
33282
  return this._server.getTask({ taskId }, options);
33238
33283
  }
@@ -33246,9 +33291,6 @@ class ExperimentalServerTasks {
33246
33291
  return this._server.cancelTask({ taskId }, options);
33247
33292
  }
33248
33293
  }
33249
- var init_server = __esm(() => {
33250
- init_types2();
33251
- });
33252
33294
 
33253
33295
  // node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
33254
33296
  function assertToolsCallTaskCapability(requests, method, entityName) {
@@ -33287,12 +33329,11 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
33287
33329
 
33288
33330
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
33289
33331
  var Server;
33290
- var init_server2 = __esm(() => {
33332
+ var init_server = __esm(() => {
33291
33333
  init_protocol();
33292
33334
  init_types2();
33293
33335
  init_ajv_provider();
33294
33336
  init_zod_compat();
33295
- init_server();
33296
33337
  Server = class Server extends Protocol {
33297
33338
  constructor(_serverInfo, options) {
33298
33339
  super(options);
@@ -33932,7 +33973,7 @@ class ExperimentalMcpServerTasks {
33932
33973
  }
33933
33974
  }
33934
33975
 
33935
- // node_modules/zod/index.js
33976
+ // ../../../../hasnastudio/hasnastudio-alumia/platform/platformdev/platform-alumia/node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
33936
33977
  var init_zod = __esm(() => {
33937
33978
  init_external3();
33938
33979
  init_external3();
@@ -34665,7 +34706,7 @@ function createCompletionResult(suggestions) {
34665
34706
  }
34666
34707
  var EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT;
34667
34708
  var init_mcp = __esm(() => {
34668
- init_server2();
34709
+ init_server();
34669
34710
  init_zod_compat();
34670
34711
  init_zod_json_schema_compat();
34671
34712
  init_types2();
@@ -34782,17 +34823,40 @@ var init_stdio2 = __esm(() => {
34782
34823
 
34783
34824
  // src/mcp/index.ts
34784
34825
  var exports_mcp = {};
34785
- import { existsSync as existsSync3, readdirSync as readdirSync3, statSync as statSync2 } from "fs";
34786
- import { join as join3 } from "path";
34787
- import { homedir as homedir2 } from "os";
34826
+ import { existsSync as existsSync4, readdirSync as readdirSync3, statSync as statSync2 } from "fs";
34827
+ import { join as join4 } from "path";
34828
+ import { homedir as homedir3 } from "os";
34788
34829
  function stripNulls(obj) {
34789
34830
  return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== null && v !== undefined && !(Array.isArray(v) && v.length === 0)));
34790
34831
  }
34832
+ function cacheGet(key) {
34833
+ return searchCache.get(key);
34834
+ }
34835
+ function cacheSet(key, value) {
34836
+ if (searchCache.size >= CACHE_MAX) {
34837
+ const first = searchCache.keys().next().value;
34838
+ if (first !== undefined)
34839
+ searchCache.delete(first);
34840
+ }
34841
+ searchCache.set(key, value);
34842
+ }
34843
+ function cacheClear() {
34844
+ searchCache.clear();
34845
+ }
34846
+ function mcpError(code, message, suggestions) {
34847
+ const obj = { code, message };
34848
+ if (suggestions && suggestions.length > 0)
34849
+ obj.suggestions = suggestions;
34850
+ return {
34851
+ content: [{ type: "text", text: JSON.stringify(obj) }],
34852
+ isError: true
34853
+ };
34854
+ }
34791
34855
  async function main() {
34792
34856
  const transport = new StdioServerTransport;
34793
34857
  await server.connect(transport);
34794
34858
  }
34795
- var server;
34859
+ var server, searchCache, CACHE_MAX = 100, _agentReg;
34796
34860
  var init_mcp2 = __esm(() => {
34797
34861
  init_mcp();
34798
34862
  init_stdio2();
@@ -34805,30 +34869,66 @@ var init_mcp2 = __esm(() => {
34805
34869
  name: "skills",
34806
34870
  version: package_default.version
34807
34871
  });
34872
+ searchCache = new Map;
34808
34873
  server.registerTool("list_skills", {
34809
34874
  title: "List Skills",
34810
- description: "List skills. Returns {name,category} by default; detail:true for full objects.",
34875
+ description: "List skills. Returns {name,category} by default; detail:true for full objects. Supports limit/offset pagination.",
34811
34876
  inputSchema: {
34812
34877
  category: exports_external.string().optional(),
34813
- detail: exports_external.boolean().optional()
34878
+ detail: exports_external.boolean().optional(),
34879
+ limit: exports_external.number().optional(),
34880
+ offset: exports_external.number().optional()
34814
34881
  }
34815
- }, async ({ category, detail }) => {
34882
+ }, async ({ category, detail, limit, offset }) => {
34816
34883
  const skills = category ? getSkillsByCategory(category) : SKILLS;
34817
- const result = detail ? skills : skills.map((s) => ({ name: s.name, category: s.category }));
34884
+ const mapped = detail ? skills : skills.map((s) => ({ name: s.name, category: s.category }));
34885
+ if (limit !== undefined || offset !== undefined) {
34886
+ const start = offset || 0;
34887
+ const sliced = limit !== undefined ? mapped.slice(start, start + limit) : mapped.slice(start);
34888
+ return {
34889
+ content: [{ type: "text", text: JSON.stringify({ skills: sliced, total: mapped.length, offset: start, limit: limit ?? null }) }]
34890
+ };
34891
+ }
34818
34892
  return {
34819
- content: [{ type: "text", text: JSON.stringify(result) }]
34893
+ content: [{ type: "text", text: JSON.stringify(mapped) }]
34894
+ };
34895
+ });
34896
+ server.registerTool("list_installed_skills", {
34897
+ title: "List Installed Skills",
34898
+ description: "List skills installed in the current project's .skills/ directory.",
34899
+ inputSchema: {
34900
+ directory: exports_external.string().optional()
34901
+ }
34902
+ }, async ({ directory }) => {
34903
+ const dir = directory || process.cwd();
34904
+ const installed = getInstalledSkills(dir);
34905
+ return {
34906
+ content: [{ type: "text", text: JSON.stringify({ directory: dir, count: installed.length, skills: installed }) }]
34820
34907
  };
34821
34908
  });
34822
34909
  server.registerTool("search_skills", {
34823
34910
  title: "Search Skills",
34824
- description: "Search skills by name, description, or tags. Returns compact list by default.",
34911
+ description: "Search skills by name, description, or tags. Returns compact list by default. Supports limit/offset pagination.",
34825
34912
  inputSchema: {
34826
34913
  query: exports_external.string(),
34827
- detail: exports_external.boolean().optional()
34828
- }
34829
- }, async ({ query, detail }) => {
34830
- const results = searchSkills(query);
34914
+ detail: exports_external.boolean().optional(),
34915
+ limit: exports_external.number().optional(),
34916
+ offset: exports_external.number().optional()
34917
+ }
34918
+ }, async ({ query, detail, limit, offset }) => {
34919
+ const cacheKey = `${query}:${detail ?? false}`;
34920
+ const cached2 = cacheGet(cacheKey);
34921
+ const results = cached2 ? cached2 : searchSkills(query);
34922
+ if (!cached2)
34923
+ cacheSet(cacheKey, results);
34831
34924
  const out = detail ? results : results.map((s) => ({ name: s.name, category: s.category }));
34925
+ if (limit !== undefined || offset !== undefined) {
34926
+ const start = offset || 0;
34927
+ const sliced = limit !== undefined ? out.slice(start, start + limit) : out.slice(start);
34928
+ return {
34929
+ content: [{ type: "text", text: JSON.stringify({ skills: sliced, total: out.length, offset: start, limit: limit ?? null }) }]
34930
+ };
34931
+ }
34832
34932
  return {
34833
34933
  content: [{ type: "text", text: JSON.stringify(out) }]
34834
34934
  };
@@ -34842,7 +34942,7 @@ var init_mcp2 = __esm(() => {
34842
34942
  }, async ({ name }) => {
34843
34943
  const skill = getSkill(name);
34844
34944
  if (!skill) {
34845
- return { content: [{ type: "text", text: `Skill '${name}' not found` }], isError: true };
34945
+ return mcpError("SKILL_NOT_FOUND", `Skill '${name}' not found`, findSimilarSkills(name));
34846
34946
  }
34847
34947
  const reqs = getSkillRequirements(name);
34848
34948
  const result = stripNulls({ ...skill, ...reqs });
@@ -34859,7 +34959,7 @@ var init_mcp2 = __esm(() => {
34859
34959
  }, async ({ name }) => {
34860
34960
  const doc2 = getSkillBestDoc(name);
34861
34961
  if (!doc2) {
34862
- return { content: [{ type: "text", text: `No documentation found for '${name}'` }], isError: true };
34962
+ return mcpError("NO_DOCS", `No documentation found for '${name}'`);
34863
34963
  }
34864
34964
  return { content: [{ type: "text", text: doc2 }] };
34865
34965
  });
@@ -34877,10 +34977,7 @@ var init_mcp2 = __esm(() => {
34877
34977
  try {
34878
34978
  agents = resolveAgents(agentArg);
34879
34979
  } catch (err) {
34880
- return {
34881
- content: [{ type: "text", text: err.message }],
34882
- isError: true
34883
- };
34980
+ return mcpError("INVALID_AGENT", err.message, ["claude", "codex", "gemini", "all"]);
34884
34981
  }
34885
34982
  const results = agents.map((a) => installSkillForAgent(name, { agent: a, scope: scope || "global" }, generateSkillMd));
34886
34983
  return {
@@ -34889,6 +34986,8 @@ var init_mcp2 = __esm(() => {
34889
34986
  };
34890
34987
  }
34891
34988
  const result = installSkill(name);
34989
+ if (result.success)
34990
+ cacheClear();
34892
34991
  return {
34893
34992
  content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
34894
34993
  isError: !result.success
@@ -34906,8 +35005,7 @@ var init_mcp2 = __esm(() => {
34906
35005
  const matchedCategory = CATEGORIES.find((c) => c.toLowerCase() === category.toLowerCase());
34907
35006
  if (!matchedCategory) {
34908
35007
  return {
34909
- content: [{ type: "text", text: `Unknown category: ${category}. Available: ${CATEGORIES.join(", ")}` }],
34910
- isError: true
35008
+ ...mcpError("UNKNOWN_CATEGORY", `Unknown category: ${category}`, CATEGORIES.slice())
34911
35009
  };
34912
35010
  }
34913
35011
  const categorySkills = getSkillsByCategory(matchedCategory);
@@ -34917,10 +35015,7 @@ var init_mcp2 = __esm(() => {
34917
35015
  try {
34918
35016
  agents = resolveAgents(agentArg);
34919
35017
  } catch (err) {
34920
- return {
34921
- content: [{ type: "text", text: err.message }],
34922
- isError: true
34923
- };
35018
+ return mcpError("INVALID_AGENT", err.message, ["claude", "codex", "gemini", "all"]);
34924
35019
  }
34925
35020
  const results2 = [];
34926
35021
  for (const name of names) {
@@ -34954,10 +35049,7 @@ var init_mcp2 = __esm(() => {
34954
35049
  try {
34955
35050
  agents = resolveAgents(agentArg);
34956
35051
  } catch (err) {
34957
- return {
34958
- content: [{ type: "text", text: err.message }],
34959
- isError: true
34960
- };
35052
+ return mcpError("INVALID_AGENT", err.message, ["claude", "codex", "gemini", "all"]);
34961
35053
  }
34962
35054
  const results = agents.map((a) => ({
34963
35055
  skill: name,
@@ -34969,6 +35061,8 @@ var init_mcp2 = __esm(() => {
34969
35061
  };
34970
35062
  }
34971
35063
  const removed = removeSkill(name);
35064
+ if (removed)
35065
+ cacheClear();
34972
35066
  return {
34973
35067
  content: [{ type: "text", text: JSON.stringify({ skill: name, removed }, null, 2) }]
34974
35068
  };
@@ -35005,7 +35099,7 @@ var init_mcp2 = __esm(() => {
35005
35099
  }, async ({ name }) => {
35006
35100
  const reqs = getSkillRequirements(name);
35007
35101
  if (!reqs) {
35008
- return { content: [{ type: "text", text: `Skill '${name}' not found` }], isError: true };
35102
+ return mcpError("SKILL_NOT_FOUND", `Skill '${name}' not found`, findSimilarSkills(name));
35009
35103
  }
35010
35104
  return { content: [{ type: "text", text: JSON.stringify(reqs, null, 2) }] };
35011
35105
  });
@@ -35019,7 +35113,7 @@ var init_mcp2 = __esm(() => {
35019
35113
  }, async ({ name, args }) => {
35020
35114
  const skill = getSkill(name);
35021
35115
  if (!skill) {
35022
- return { content: [{ type: "text", text: `Skill '${name}' not found` }], isError: true };
35116
+ return mcpError("SKILL_NOT_FOUND", `Skill '${name}' not found`, findSimilarSkills(name));
35023
35117
  }
35024
35118
  const result = await runSkill(name, args || []);
35025
35119
  if (result.error) {
@@ -35062,10 +35156,7 @@ var init_mcp2 = __esm(() => {
35062
35156
  try {
35063
35157
  agents = resolveAgents(agentArg);
35064
35158
  } catch (err) {
35065
- return {
35066
- content: [{ type: "text", text: err.message }],
35067
- isError: true
35068
- };
35159
+ return mcpError("INVALID_AGENT", err.message, ["claude", "codex", "gemini", "all"]);
35069
35160
  }
35070
35161
  for (const name of skillList) {
35071
35162
  const agentResults = agents.map((a) => installSkillForAgent(name, { agent: a, scope: scope || "global" }, generateSkillMd));
@@ -35096,13 +35187,13 @@ var init_mcp2 = __esm(() => {
35096
35187
  const agentNames = ["claude", "codex", "gemini"];
35097
35188
  const agents = [];
35098
35189
  for (const agent of agentNames) {
35099
- const agentSkillsPath = join3(homedir2(), `.${agent}`, "skills");
35100
- const exists = existsSync3(agentSkillsPath);
35190
+ const agentSkillsPath = join4(homedir3(), `.${agent}`, "skills");
35191
+ const exists = existsSync4(agentSkillsPath);
35101
35192
  let skillCount = 0;
35102
35193
  if (exists) {
35103
35194
  try {
35104
35195
  skillCount = readdirSync3(agentSkillsPath).filter((f) => {
35105
- const full = join3(agentSkillsPath, f);
35196
+ const full = join4(agentSkillsPath, f);
35106
35197
  return f.startsWith("skill-") && statSync2(full).isDirectory();
35107
35198
  }).length;
35108
35199
  } catch {}
@@ -35150,6 +35241,7 @@ var init_mcp2 = __esm(() => {
35150
35241
  }, async ({ query }) => {
35151
35242
  const all = [
35152
35243
  "list_skills",
35244
+ "list_installed_skills",
35153
35245
  "search_skills",
35154
35246
  "get_skill_info",
35155
35247
  "get_skill_docs",
@@ -35176,6 +35268,7 @@ var init_mcp2 = __esm(() => {
35176
35268
  }, async ({ names }) => {
35177
35269
  const descriptions = {
35178
35270
  list_skills: "List skills {name,category}. Params: category?, detail?",
35271
+ list_installed_skills: "List installed skills in .skills/. Params: directory?",
35179
35272
  search_skills: "Search skills by name/tags. Params: query, detail?",
35180
35273
  get_skill_info: "Get skill metadata and env vars. Params: name",
35181
35274
  get_skill_docs: "Get skill documentation. Params: name",
@@ -35194,6 +35287,32 @@ var init_mcp2 = __esm(() => {
35194
35287
  `);
35195
35288
  return { content: [{ type: "text", text: result }] };
35196
35289
  });
35290
+ _agentReg = new Map;
35291
+ server.tool("register_agent", "Register this agent session. Returns agent_id for use in heartbeat/set_focus.", { name: exports_external.string(), session_id: exports_external.string().optional() }, async (a) => {
35292
+ const existing = [..._agentReg.values()].find((x) => x.name === a.name);
35293
+ if (existing) {
35294
+ existing.last_seen_at = new Date().toISOString();
35295
+ return { content: [{ type: "text", text: JSON.stringify(existing) }] };
35296
+ }
35297
+ const id = Math.random().toString(36).slice(2, 10);
35298
+ const ag = { id, name: a.name, last_seen_at: new Date().toISOString() };
35299
+ _agentReg.set(id, ag);
35300
+ return { content: [{ type: "text", text: JSON.stringify(ag) }] };
35301
+ });
35302
+ server.tool("heartbeat", "Update last_seen_at to signal agent is active.", { agent_id: exports_external.string() }, async (a) => {
35303
+ const ag = _agentReg.get(a.agent_id);
35304
+ if (!ag)
35305
+ return { content: [{ type: "text", text: `Agent not found: ${a.agent_id}` }], isError: true };
35306
+ ag.last_seen_at = new Date().toISOString();
35307
+ return { content: [{ type: "text", text: `\u2665 ${ag.name} \u2014 active` }] };
35308
+ });
35309
+ server.tool("set_focus", "Set active project context for this agent session.", { agent_id: exports_external.string(), project_id: exports_external.string().optional() }, async (a) => {
35310
+ const ag = _agentReg.get(a.agent_id);
35311
+ if (!ag)
35312
+ return { content: [{ type: "text", text: `Agent not found: ${a.agent_id}` }], isError: true };
35313
+ ag.project_id = a.project_id;
35314
+ return { content: [{ type: "text", text: a.project_id ? `Focus: ${a.project_id}` : "Focus cleared" }] };
35315
+ });
35197
35316
  main().catch((error48) => {
35198
35317
  console.error("MCP server error:", error48);
35199
35318
  process.exit(1);
@@ -35206,16 +35325,16 @@ __export(exports_serve, {
35206
35325
  startServer: () => startServer,
35207
35326
  createFetchHandler: () => createFetchHandler
35208
35327
  });
35209
- import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
35210
- import { join as join4, dirname as dirname2, extname } from "path";
35328
+ import { existsSync as existsSync5, readFileSync as readFileSync4 } from "fs";
35329
+ import { join as join5, dirname as dirname3, extname } from "path";
35211
35330
  import { fileURLToPath as fileURLToPath2 } from "url";
35212
35331
  function getPackageJson() {
35213
35332
  try {
35214
- const scriptDir = dirname2(fileURLToPath2(import.meta.url));
35333
+ const scriptDir = dirname3(fileURLToPath2(import.meta.url));
35215
35334
  for (const rel of ["../..", ".."]) {
35216
- const pkgPath = join4(scriptDir, rel, "package.json");
35217
- if (existsSync4(pkgPath)) {
35218
- const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
35335
+ const pkgPath = join5(scriptDir, rel, "package.json");
35336
+ if (existsSync5(pkgPath)) {
35337
+ const pkg = JSON.parse(readFileSync4(pkgPath, "utf-8"));
35219
35338
  return { version: pkg.version || "unknown", name: pkg.name || "skills" };
35220
35339
  }
35221
35340
  }
@@ -35225,27 +35344,28 @@ function getPackageJson() {
35225
35344
  function resolveDashboardDir() {
35226
35345
  const candidates = [];
35227
35346
  try {
35228
- const scriptDir = dirname2(fileURLToPath2(import.meta.url));
35229
- candidates.push(join4(scriptDir, "..", "dashboard", "dist"));
35230
- candidates.push(join4(scriptDir, "..", "..", "dashboard", "dist"));
35347
+ const scriptDir = dirname3(fileURLToPath2(import.meta.url));
35348
+ candidates.push(join5(scriptDir, "..", "dashboard", "dist"));
35349
+ candidates.push(join5(scriptDir, "..", "..", "dashboard", "dist"));
35231
35350
  } catch {}
35232
35351
  if (process.argv[1]) {
35233
- const mainDir = dirname2(process.argv[1]);
35234
- candidates.push(join4(mainDir, "..", "dashboard", "dist"));
35235
- candidates.push(join4(mainDir, "..", "..", "dashboard", "dist"));
35352
+ const mainDir = dirname3(process.argv[1]);
35353
+ candidates.push(join5(mainDir, "..", "dashboard", "dist"));
35354
+ candidates.push(join5(mainDir, "..", "..", "dashboard", "dist"));
35236
35355
  }
35237
- candidates.push(join4(process.cwd(), "dashboard", "dist"));
35356
+ candidates.push(join5(process.cwd(), "dashboard", "dist"));
35238
35357
  for (const candidate of candidates) {
35239
- if (existsSync4(candidate))
35358
+ if (existsSync5(candidate))
35240
35359
  return candidate;
35241
35360
  }
35242
- return join4(process.cwd(), "dashboard", "dist");
35361
+ return join5(process.cwd(), "dashboard", "dist");
35243
35362
  }
35244
35363
  function json2(data, status = 200) {
35245
35364
  return new Response(JSON.stringify(data), {
35246
35365
  status,
35247
35366
  headers: {
35248
35367
  "Content-Type": "application/json",
35368
+ "X-API-Version": "1",
35249
35369
  ...SECURITY_HEADERS
35250
35370
  }
35251
35371
  });
@@ -35285,7 +35405,7 @@ function getAllSkillsWithStatus() {
35285
35405
  });
35286
35406
  }
35287
35407
  function serveStaticFile(filePath) {
35288
- if (!existsSync4(filePath))
35408
+ if (!existsSync5(filePath))
35289
35409
  return null;
35290
35410
  const ext = extname(filePath);
35291
35411
  const contentType = MIME_TYPES[ext] || "application/octet-stream";
@@ -35295,15 +35415,48 @@ function serveStaticFile(filePath) {
35295
35415
  }
35296
35416
  function createFetchHandler(options) {
35297
35417
  const dashboardDir = options?.dashboardDir ?? resolveDashboardDir();
35298
- const dashboardExists = options?.dashboardExists ?? existsSync4(dashboardDir);
35418
+ const dashboardExists = options?.dashboardExists ?? existsSync5(dashboardDir);
35299
35419
  return async function fetchHandler(req) {
35300
35420
  const url2 = new URL(req.url);
35301
- const path = url2.pathname;
35421
+ const path = url2.pathname.replace(/^\/api\/v1\//, "/api/");
35302
35422
  const method = req.method;
35423
+ if (path === "/api/health" && method === "GET") {
35424
+ const pkg = getPackageJson();
35425
+ return json2({
35426
+ status: "ok",
35427
+ version: pkg.version,
35428
+ uptime: Math.floor(process.uptime()),
35429
+ skillCount: SKILLS.length
35430
+ });
35431
+ }
35303
35432
  if (path === "/api/skills" && method === "GET") {
35304
35433
  const fields = parseFields(url2.searchParams);
35305
35434
  const skills = getAllSkillsWithStatus();
35306
- return json2(fields.length ? skills.map((s) => pickFields(s, fields)) : skills);
35435
+ const data = fields.length ? skills.map((s) => pickFields(s, fields)) : skills;
35436
+ if (url2.searchParams.get("stream") === "true") {
35437
+ const CHUNK_SIZE = 20;
35438
+ const stream = new ReadableStream({
35439
+ start(controller) {
35440
+ controller.enqueue("[");
35441
+ for (let i = 0;i < data.length; i += CHUNK_SIZE) {
35442
+ const chunk = data.slice(i, i + CHUNK_SIZE);
35443
+ const prefix = i === 0 ? "" : ",";
35444
+ controller.enqueue(prefix + chunk.map((s) => JSON.stringify(s)).join(","));
35445
+ }
35446
+ controller.enqueue("]");
35447
+ controller.close();
35448
+ }
35449
+ });
35450
+ return new Response(stream, {
35451
+ headers: {
35452
+ "Content-Type": "application/json",
35453
+ "Transfer-Encoding": "chunked",
35454
+ "X-API-Version": "1",
35455
+ ...SECURITY_HEADERS
35456
+ }
35457
+ });
35458
+ }
35459
+ return json2(data);
35307
35460
  }
35308
35461
  if (path === "/api/categories" && method === "GET") {
35309
35462
  const counts = CATEGORIES.map((cat) => ({
@@ -35360,14 +35513,27 @@ function createFetchHandler(options) {
35360
35513
  const reqs = getSkillRequirements(name);
35361
35514
  const docs = getSkillBestDoc(name);
35362
35515
  const installed = new Set(getInstalledSkills());
35516
+ const isInstalled = installed.has(meta3.name);
35363
35517
  const envVars = reqs?.envVars || [];
35518
+ let installedAt = null;
35519
+ let installedVersion = null;
35520
+ if (isInstalled) {
35521
+ const installMeta = getInstallMeta();
35522
+ const skillMeta = installMeta.skills?.[meta3.name];
35523
+ if (skillMeta) {
35524
+ installedAt = skillMeta.installedAt || null;
35525
+ installedVersion = skillMeta.version || null;
35526
+ }
35527
+ }
35364
35528
  const obj = {
35365
35529
  name: meta3.name,
35366
35530
  displayName: meta3.displayName,
35367
35531
  description: meta3.description,
35368
35532
  category: meta3.category,
35369
35533
  tags: meta3.tags,
35370
- installed: installed.has(meta3.name),
35534
+ installed: isInstalled,
35535
+ installedAt,
35536
+ installedVersion,
35371
35537
  envVars,
35372
35538
  envVarsSet: envVars.filter((v) => !!process.env[v]),
35373
35539
  systemDeps: reqs?.systemDeps || [],
@@ -35533,12 +35699,12 @@ function createFetchHandler(options) {
35533
35699
  }
35534
35700
  if (dashboardExists && (method === "GET" || method === "HEAD")) {
35535
35701
  if (path !== "/") {
35536
- const filePath = join4(dashboardDir, path);
35702
+ const filePath = join5(dashboardDir, path);
35537
35703
  const res2 = serveStaticFile(filePath);
35538
35704
  if (res2)
35539
35705
  return res2;
35540
35706
  }
35541
- const indexPath = join4(dashboardDir, "index.html");
35707
+ const indexPath = join5(dashboardDir, "index.html");
35542
35708
  const res = serveStaticFile(indexPath);
35543
35709
  if (res)
35544
35710
  return res;
@@ -35549,7 +35715,7 @@ function createFetchHandler(options) {
35549
35715
  async function startServer(port = 0, options) {
35550
35716
  const shouldOpen = options?.open ?? true;
35551
35717
  const dashboardDir = resolveDashboardDir();
35552
- const dashboardExists = existsSync4(dashboardDir);
35718
+ const dashboardExists = existsSync5(dashboardDir);
35553
35719
  if (!dashboardExists) {
35554
35720
  console.error(`
35555
35721
  Dashboard not found at: ${dashboardDir}`);
@@ -35629,8 +35795,8 @@ var {
35629
35795
  // src/cli/index.tsx
35630
35796
  init_package();
35631
35797
  import chalk2 from "chalk";
35632
- import { existsSync as existsSync5, writeFileSync as writeFileSync2, appendFileSync, readFileSync as readFileSync4, readdirSync as readdirSync4, statSync as statSync3 } from "fs";
35633
- import { join as join5 } from "path";
35798
+ import { existsSync as existsSync6, writeFileSync as writeFileSync3, appendFileSync, readFileSync as readFileSync5, readdirSync as readdirSync4, statSync as statSync3 } from "fs";
35799
+ import { join as join6 } from "path";
35634
35800
 
35635
35801
  // src/cli/components/App.tsx
35636
35802
  import { useState as useState7 } from "react";
@@ -36754,10 +36920,103 @@ function App({ initialSkills, overwrite = false }) {
36754
36920
  init_registry();
36755
36921
  init_installer();
36756
36922
  init_skillinfo();
36923
+
36924
+ // src/lib/config.ts
36925
+ import { existsSync as existsSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "fs";
36926
+ import { join as join3, dirname as dirname2 } from "path";
36927
+ import { homedir as homedir2 } from "os";
36928
+ var VALID_KEYS = {
36929
+ defaultAgent: ["claude", "codex", "gemini", "all"],
36930
+ defaultScope: ["global", "project"],
36931
+ format: ["compact", "json", "csv"]
36932
+ };
36933
+ function getConfigPath(scope) {
36934
+ if (scope === "global") {
36935
+ return join3(homedir2(), ".skillsrc");
36936
+ }
36937
+ return join3(process.cwd(), "skills.config.json");
36938
+ }
36939
+ function readConfigFile(path) {
36940
+ if (!existsSync3(path))
36941
+ return {};
36942
+ try {
36943
+ const raw = readFileSync3(path, "utf-8");
36944
+ const parsed = JSON.parse(raw);
36945
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
36946
+ return {};
36947
+ const config = {};
36948
+ for (const [key, allowed] of Object.entries(VALID_KEYS)) {
36949
+ const val = parsed[key];
36950
+ if (typeof val === "string" && allowed.includes(val)) {
36951
+ config[key] = val;
36952
+ }
36953
+ }
36954
+ return config;
36955
+ } catch {
36956
+ return {};
36957
+ }
36958
+ }
36959
+ function loadConfig() {
36960
+ const globalConfig = readConfigFile(getConfigPath("global"));
36961
+ const projectConfig = readConfigFile(getConfigPath("project"));
36962
+ return { ...globalConfig, ...projectConfig };
36963
+ }
36964
+ function saveConfig(key, value, scope = "project") {
36965
+ if (!(key in VALID_KEYS)) {
36966
+ throw new Error(`Unknown config key: ${key}. Valid keys: ${Object.keys(VALID_KEYS).join(", ")}`);
36967
+ }
36968
+ const allowed = VALID_KEYS[key];
36969
+ if (!allowed.includes(value)) {
36970
+ throw new Error(`Invalid value '${value}' for ${key}. Allowed: ${allowed.join(", ")}`);
36971
+ }
36972
+ const filePath = getConfigPath(scope);
36973
+ let existing = {};
36974
+ if (existsSync3(filePath)) {
36975
+ try {
36976
+ existing = JSON.parse(readFileSync3(filePath, "utf-8"));
36977
+ if (typeof existing !== "object" || existing === null || Array.isArray(existing)) {
36978
+ existing = {};
36979
+ }
36980
+ } catch {
36981
+ existing = {};
36982
+ }
36983
+ } else {
36984
+ const dir = dirname2(filePath);
36985
+ if (!existsSync3(dir)) {
36986
+ mkdirSync2(dir, { recursive: true });
36987
+ }
36988
+ }
36989
+ existing[key] = value;
36990
+ writeFileSync2(filePath, JSON.stringify(existing, null, 2) + `
36991
+ `);
36992
+ }
36993
+
36994
+ // src/cli/index.tsx
36757
36995
  import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
36758
36996
  var isTTY = (process.stdout.isTTY ?? false) && (process.stdin.isTTY ?? false);
36997
+ if (process.argv.includes("--no-color")) {
36998
+ chalk2.level = 0;
36999
+ const idx = process.argv.indexOf("--no-color");
37000
+ process.argv.splice(idx, 1);
37001
+ }
36759
37002
  var program2 = new Command;
36760
- program2.name("skills").description("Install AI agent skills for your project").version(package_default.version).option("--verbose", "Enable verbose logging", false).enablePositionalOptions();
37003
+ var _verbose;
37004
+ function debug(msg) {
37005
+ if (_verbose === undefined) {
37006
+ _verbose = program2.opts().verbose || process.argv.includes("--verbose");
37007
+ }
37008
+ if (_verbose) {
37009
+ console.error(`[debug] ${msg}`);
37010
+ }
37011
+ }
37012
+ function skillNotFound(name) {
37013
+ console.error(`Skill '${name}' not found`);
37014
+ const similar = findSimilarSkills(name);
37015
+ if (similar.length > 0) {
37016
+ console.error(chalk2.dim(`Did you mean: ${similar.join(", ")}?`));
37017
+ }
37018
+ }
37019
+ program2.name("skills").description("Install AI agent skills for your project").version(package_default.version).option("--verbose", "Enable verbose logging", false).option("--no-color", "Disable colored output (also respects NO_COLOR env var)").enablePositionalOptions();
36761
37020
  program2.command("interactive", { isDefault: true }).alias("i").description("Interactive skill browser (TUI)").action(() => {
36762
37021
  if (!isTTY) {
36763
37022
  console.log(JSON.stringify(SKILLS.map((s) => ({ name: s.name, category: s.category }))));
@@ -36765,7 +37024,15 @@ program2.command("interactive", { isDefault: true }).alias("i").description("Int
36765
37024
  }
36766
37025
  render(/* @__PURE__ */ jsxDEV7(App, {}, undefined, false, undefined, this));
36767
37026
  });
36768
- program2.command("install").alias("add").argument("[skills...]", "Skills to install").option("-o, --overwrite", "Overwrite existing skills", false).option("--json", "Output results as JSON", false).option("--for <agent>", "Install for agent: claude, codex, gemini, or all").option("--scope <scope>", "Install scope: global or project", "global").option("--dry-run", "Print what would happen without actually installing", false).option("--category <category>", "Install all skills in a category (case-insensitive)").description("Install one or more skills").action((skills, options) => {
37027
+ program2.command("install").alias("add").argument("[skills...]", "Skills to install").option("--verbose", "Enable verbose debug logging", false).option("-o, --overwrite", "Overwrite existing skills", false).option("--json", "Output results as JSON", false).option("--for <agent>", "Install for agent: claude, codex, gemini, or all").option("--scope <scope>", "Install scope: global or project", "global").option("--dry-run", "Print what would happen without actually installing", false).option("--category <category>", "Install all skills in a category (case-insensitive)").description("Install one or more skills").action((skills, options) => {
37028
+ const config2 = loadConfig();
37029
+ if (!options.for && config2.defaultAgent) {
37030
+ options.for = config2.defaultAgent;
37031
+ }
37032
+ if (!process.argv.includes("--scope") && config2.defaultScope) {
37033
+ options.scope = config2.defaultScope;
37034
+ }
37035
+ debug(`install: skills=[${skills.join(", ")}] overwrite=${options.overwrite} for=${options.for ?? "none"} scope=${options.scope} dryRun=${options.dryRun}`);
36769
37036
  if (skills.length === 0 && !options.category) {
36770
37037
  console.error("error: missing required argument 'skills' or --category option");
36771
37038
  process.exitCode = 1;
@@ -36792,6 +37059,7 @@ Installing ${skills.length} skills from "${matchedCategory}"...
36792
37059
  let agents;
36793
37060
  try {
36794
37061
  agents = resolveAgents(options.for);
37062
+ debug(`install: resolved agents=[${agents.join(", ")}]`);
36795
37063
  } catch (err) {
36796
37064
  console.error(chalk2.red(err.message));
36797
37065
  process.exitCode = 1;
@@ -36807,10 +37075,12 @@ Installing ${skills.length} skills from "${matchedCategory}"...
36807
37075
  }
36808
37076
  for (const name of skills) {
36809
37077
  for (const agent of agents) {
37078
+ debug(`install: installing ${name} for agent=${agent} scope=${options.scope}`);
36810
37079
  const result = installSkillForAgent(name, {
36811
37080
  agent,
36812
37081
  scope: options.scope
36813
37082
  }, generateSkillMd);
37083
+ debug(`install: ${name} \u2192 ${result.success ? "ok" : "failed"} path=${result.path ?? "n/a"}`);
36814
37084
  results.push({ ...result, agent, scope: options.scope });
36815
37085
  }
36816
37086
  }
@@ -36839,15 +37109,31 @@ SKILL.md copied to agent skill directories`));
36839
37109
  return;
36840
37110
  }
36841
37111
  const total = skills.length;
37112
+ const startTime = Date.now();
36842
37113
  for (let i = 0;i < total; i++) {
36843
37114
  const name = skills[i];
37115
+ debug(`install: source=${getSkillPath(name)} dest=.skills/${normalizeSkillName(name)}`);
36844
37116
  if (total > 1 && !options.json) {
36845
37117
  process.stdout.write(`[${i + 1}/${total}] Installing ${name}...`);
36846
37118
  }
36847
37119
  const result = installSkill(name, { overwrite: options.overwrite });
37120
+ debug(`install: ${name} \u2192 ${result.success ? "ok" : "failed"} path=${result.path ?? "n/a"}`);
36848
37121
  results.push(result);
36849
37122
  if (total > 1 && !options.json) {
36850
- console.log(result.success ? " done" : " failed");
37123
+ console.log(result.success ? " done" : ` ${chalk2.red("failed")}`);
37124
+ }
37125
+ }
37126
+ if (total > 1 && !options.json) {
37127
+ const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
37128
+ const succeeded = results.filter((r) => r.success).length;
37129
+ const failed = results.filter((r) => !r.success);
37130
+ if (failed.length > 0) {
37131
+ console.log(chalk2.yellow(`
37132
+ ${succeeded}/${total} installed in ${elapsed}s, ${failed.length} failed: ${failed.map((r) => r.skill).join(", ")}`));
37133
+ process.exitCode = 1;
37134
+ } else {
37135
+ console.log(chalk2.green(`
37136
+ ${succeeded}/${total} installed in ${elapsed}s`));
36851
37137
  }
36852
37138
  }
36853
37139
  if (options.json) {
@@ -36990,8 +37276,9 @@ Available skills (${SKILLS.length}):
36990
37276
  console.log();
36991
37277
  }
36992
37278
  });
36993
- program2.command("search").argument("<query>", "Search term").option("--json", "Output as JSON", false).option("--brief", "One line per skill: name \u2014 description [category]", false).option("--format <format>", "Output format: compact (names only) or csv (name,category,description)").option("-c, --category <category>", "Filter results by category").option("-t, --tags <tags>", "Filter results by comma-separated tags (OR logic, case-insensitive)").description("Search for skills").action((query, options) => {
37279
+ program2.command("search").alias("s").argument("<query>", "Search term").option("--verbose", "Enable verbose debug logging", false).option("--json", "Output as JSON", false).option("--brief", "One line per skill: name \u2014 description [category]", false).option("--format <format>", "Output format: compact (names only) or csv (name,category,description)").option("-c, --category <category>", "Filter results by category").option("-t, --tags <tags>", "Filter results by comma-separated tags (OR logic, case-insensitive)").description("Search for skills").action((query, options) => {
36994
37280
  let results = searchSkills(query);
37281
+ debug(`search: query="${query}" results=${results.length} category=${options.category ?? "none"} tags=${options.tags ?? "none"}`);
36995
37282
  if (options.category) {
36996
37283
  const category = CATEGORIES.find((c) => c.toLowerCase() === options.category.toLowerCase());
36997
37284
  if (!category) {
@@ -37014,6 +37301,10 @@ program2.command("search").argument("<query>", "Search term").option("--json", "
37014
37301
  }
37015
37302
  if (results.length === 0) {
37016
37303
  console.log(chalk2.dim(`No skills found for "${query}"`));
37304
+ const similar = findSimilarSkills(query, 5);
37305
+ if (similar.length > 0) {
37306
+ console.log(chalk2.dim(`Related skills: ${similar.join(", ")}`));
37307
+ }
37017
37308
  return;
37018
37309
  }
37019
37310
  if (fmt === "compact") {
@@ -37046,7 +37337,7 @@ Found ${results.length} skill(s):
37046
37337
  program2.command("info").argument("<skill>", "Skill name").option("--json", "Output as JSON", false).option("--brief", "Single line: name \u2014 description [category] (tags: ...)", false).description("Show details about a specific skill").action((name, options) => {
37047
37338
  const skill = getSkill(name);
37048
37339
  if (!skill) {
37049
- console.error(`Skill '${name}' not found`);
37340
+ skillNotFound(name);
37050
37341
  process.exitCode = 1;
37051
37342
  return;
37052
37343
  }
@@ -37078,7 +37369,7 @@ ${chalk2.bold(skill.displayName)}`);
37078
37369
  program2.command("docs").argument("<skill>", "Skill name").option("--json", "Output as JSON", false).option("--file <file>", "Specific file: skill, readme, claude", "").description("Show documentation for a skill").action((name, options) => {
37079
37370
  const docs = getSkillDocs(name);
37080
37371
  if (!docs) {
37081
- console.error(`Skill '${name}' not found`);
37372
+ skillNotFound(name);
37082
37373
  process.exitCode = 1;
37083
37374
  return;
37084
37375
  }
@@ -37121,7 +37412,7 @@ program2.command("docs").argument("<skill>", "Skill name").option("--json", "Out
37121
37412
  program2.command("requires").argument("<skill>", "Skill name").option("--json", "Output as JSON", false).description("Show what a skill needs (env vars, system deps, dependencies)").action((name, options) => {
37122
37413
  const reqs = getSkillRequirements(name);
37123
37414
  if (!reqs) {
37124
- console.error(`Skill '${name}' not found`);
37415
+ skillNotFound(name);
37125
37416
  process.exitCode = 1;
37126
37417
  return;
37127
37418
  }
@@ -37165,7 +37456,7 @@ ${chalk2.bold("npm dependencies:")} ${depCount} packages`);
37165
37456
  program2.command("run").argument("<skill>", "Skill name").argument("[args...]", "Arguments to pass to the skill").allowUnknownOption(true).passThroughOptions(true).description("Run a skill directly").action(async (name, args) => {
37166
37457
  const skill = getSkill(name);
37167
37458
  if (!skill) {
37168
- console.error(`Skill '${name}' not found in registry`);
37459
+ skillNotFound(name);
37169
37460
  process.exitCode = 1;
37170
37461
  return;
37171
37462
  }
@@ -37289,8 +37580,8 @@ Installing recommended skills for ${options.for} (${options.scope})...
37289
37580
  const envContent = lines.join(`
37290
37581
  `) + `
37291
37582
  `;
37292
- const envPath = join5(cwd, ".env.example");
37293
- writeFileSync2(envPath, envContent);
37583
+ const envPath = join6(cwd, ".env.example");
37584
+ writeFileSync3(envPath, envContent);
37294
37585
  envVarCount = envMap.size;
37295
37586
  if (!options.json) {
37296
37587
  console.log(chalk2.green(`\u2713 Generated .env.example (${envVarCount} variables from ${installed.length} skills)`));
@@ -37300,11 +37591,11 @@ Installing recommended skills for ${options.for} (${options.scope})...
37300
37591
  console.log(chalk2.dim(" No environment variables detected across installed skills"));
37301
37592
  }
37302
37593
  }
37303
- const gitignorePath = join5(cwd, ".gitignore");
37594
+ const gitignorePath = join6(cwd, ".gitignore");
37304
37595
  const gitignoreEntry = ".skills/";
37305
37596
  let gitignoreContent = "";
37306
- if (existsSync5(gitignorePath)) {
37307
- gitignoreContent = readFileSync4(gitignorePath, "utf-8");
37597
+ if (existsSync6(gitignorePath)) {
37598
+ gitignoreContent = readFileSync5(gitignorePath, "utf-8");
37308
37599
  }
37309
37600
  let gitignoreUpdated = false;
37310
37601
  if (!gitignoreContent.includes(gitignoreEntry)) {
@@ -37350,11 +37641,27 @@ Initialized for ${installed.length} installed skill(s)`));
37350
37641
  }
37351
37642
  }
37352
37643
  });
37353
- program2.command("remove").alias("rm").argument("<skill>", "Skill to remove").option("--json", "Output as JSON", false).option("--for <agent>", "Remove from agent: claude, codex, gemini, or all").option("--scope <scope>", "Remove scope: global or project", "global").option("--dry-run", "Print what would happen without actually removing", false).description("Remove an installed skill").action((skill, options) => {
37644
+ program2.command("remove").alias("rm").argument("<skill>", "Skill to remove").option("--verbose", "Enable verbose debug logging", false).option("--json", "Output as JSON", false).option("--for <agent>", "Remove from agent: claude, codex, gemini, or all").option("--scope <scope>", "Remove scope: global or project", "global").option("--dry-run", "Print what would happen without actually removing", false).option("-y, --yes", "Skip confirmation prompt", false).description("Remove an installed skill").action(async (skill, options) => {
37645
+ debug(`remove: skill=${skill} for=${options.for ?? "none"} scope=${options.scope} dryRun=${options.dryRun}`);
37646
+ if (!options.yes && !options.dryRun && isTTY) {
37647
+ const skillName = normalizeSkillName(skill);
37648
+ const target = options.for ? `from ${options.for} (${options.scope})` : "from .skills/";
37649
+ const readline = await import("readline");
37650
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
37651
+ const answer = await new Promise((resolve) => {
37652
+ rl.question(`Remove ${skillName} ${target}? (y/N) `, resolve);
37653
+ });
37654
+ rl.close();
37655
+ if (answer.toLowerCase() !== "y") {
37656
+ console.log("Cancelled.");
37657
+ return;
37658
+ }
37659
+ }
37354
37660
  if (options.for) {
37355
37661
  let agents;
37356
37662
  try {
37357
37663
  agents = resolveAgents(options.for);
37664
+ debug(`remove: resolved agents=[${agents.join(", ")}]`);
37358
37665
  } catch (err) {
37359
37666
  console.error(chalk2.red(err.message));
37360
37667
  process.exitCode = 1;
@@ -37368,10 +37675,12 @@ program2.command("remove").alias("rm").argument("<skill>", "Skill to remove").op
37368
37675
  }
37369
37676
  const results = [];
37370
37677
  for (const agent of agents) {
37678
+ debug(`remove: removing ${skill} from agent=${agent} scope=${options.scope}`);
37371
37679
  const removed = removeSkillForAgent(skill, {
37372
37680
  agent,
37373
37681
  scope: options.scope
37374
37682
  });
37683
+ debug(`remove: ${skill} from ${agent} \u2192 ${removed ? "removed" : "not found"}`);
37375
37684
  results.push({ skill, agent, scope: options.scope, removed });
37376
37685
  }
37377
37686
  if (options.json) {
@@ -37394,7 +37703,9 @@ program2.command("remove").alias("rm").argument("<skill>", "Skill to remove").op
37394
37703
  console.log(chalk2.dim(`[dry-run] Would remove ${skill} from .skills/`));
37395
37704
  return;
37396
37705
  }
37706
+ debug(`remove: deleting .skills/${normalizeSkillName(skill)}`);
37397
37707
  const removed = removeSkill(skill);
37708
+ debug(`remove: ${skill} \u2192 ${removed ? "removed" : "not found"}`);
37398
37709
  if (options.json) {
37399
37710
  console.log(JSON.stringify({ skill, removed }));
37400
37711
  } else if (removed) {
@@ -37413,10 +37724,10 @@ program2.command("update").argument("[skills...]", "Skills to update (default: a
37413
37724
  }
37414
37725
  function collectFiles(dir, base = "") {
37415
37726
  const files = new Set;
37416
- if (!existsSync5(dir))
37727
+ if (!existsSync6(dir))
37417
37728
  return files;
37418
37729
  for (const entry of readdirSync4(dir)) {
37419
- const full = join5(dir, entry);
37730
+ const full = join6(dir, entry);
37420
37731
  const rel = base ? `${base}/${entry}` : entry;
37421
37732
  if (statSync3(full).isDirectory()) {
37422
37733
  for (const f of collectFiles(full, rel))
@@ -37430,7 +37741,7 @@ program2.command("update").argument("[skills...]", "Skills to update (default: a
37430
37741
  const updateResults = [];
37431
37742
  for (const name of toUpdate) {
37432
37743
  const skillName = normalizeSkillName(name);
37433
- const destPath = join5(process.cwd(), ".skills", skillName);
37744
+ const destPath = join6(process.cwd(), ".skills", skillName);
37434
37745
  const beforeFiles = collectFiles(destPath);
37435
37746
  const result = installSkill(name, { overwrite: true });
37436
37747
  const afterFiles = collectFiles(destPath);
@@ -37511,7 +37822,7 @@ Tags:
37511
37822
  program2.command("mcp").option("--register <agent>", "Register MCP server with agent: claude, codex, gemini, or all").description("Start MCP server (stdio) or register with an agent").action(async (options) => {
37512
37823
  if (options.register) {
37513
37824
  const agents = options.register === "all" ? ["claude", "codex", "gemini"] : [options.register];
37514
- const binPath = join5(import.meta.dir, "..", "mcp", "index.ts");
37825
+ const binPath = join6(import.meta.dir, "..", "mcp", "index.ts");
37515
37826
  for (const agent of agents) {
37516
37827
  if (agent === "claude") {
37517
37828
  try {
@@ -37525,8 +37836,8 @@ program2.command("mcp").option("--register <agent>", "Register MCP server with a
37525
37836
  console.log(chalk2.yellow(`Manual registration: claude mcp add skills -- bun run ${binPath}`));
37526
37837
  }
37527
37838
  } else if (agent === "codex") {
37528
- const { homedir: homedir3 } = await import("os");
37529
- const configPath = join5(homedir3(), ".codex", "config.toml");
37839
+ const { homedir: homedir4 } = await import("os");
37840
+ const configPath = join6(homedir4(), ".codex", "config.toml");
37530
37841
  console.log(chalk2.bold(`
37531
37842
  Add to ${configPath}:`));
37532
37843
  console.log(chalk2.dim(`[mcp_servers.skills]
@@ -37534,8 +37845,8 @@ command = "bun"
37534
37845
  args = ["run", "${binPath}"]`));
37535
37846
  console.log(chalk2.green(`\u2713 Codex MCP config shown above`));
37536
37847
  } else if (agent === "gemini") {
37537
- const { homedir: homedir3 } = await import("os");
37538
- const configPath = join5(homedir3(), ".gemini", "settings.json");
37848
+ const { homedir: homedir4 } = await import("os");
37849
+ const configPath = join6(homedir4(), ".gemini", "settings.json");
37539
37850
  console.log(chalk2.bold(`
37540
37851
  Add to ${configPath} mcpServers:`));
37541
37852
  console.log(chalk2.dim(JSON.stringify({
@@ -37735,12 +38046,12 @@ program2.command("import").argument("<file>", "JSON file to import (use - for st
37735
38046
  if (file2 === "-") {
37736
38047
  raw = await new Response(process.stdin).text();
37737
38048
  } else {
37738
- if (!existsSync5(file2)) {
38049
+ if (!existsSync6(file2)) {
37739
38050
  console.error(chalk2.red(`File not found: ${file2}`));
37740
38051
  process.exitCode = 1;
37741
38052
  return;
37742
38053
  }
37743
- raw = readFileSync4(file2, "utf-8");
38054
+ raw = readFileSync5(file2, "utf-8");
37744
38055
  }
37745
38056
  } catch (err) {
37746
38057
  console.error(chalk2.red(`Failed to read file: ${err.message}`));
@@ -37871,7 +38182,7 @@ Skills Doctor (${installed.length} installed):
37871
38182
  });
37872
38183
  program2.command("auth").argument("[skill]", "Skill name (omit to check all installed skills)").option("--set <assignment>", "Set an env var in .env file (format: KEY=VALUE)").option("--json", "Output as JSON", false).description("Show auth/env var status for a skill or all installed skills").action((name, options) => {
37873
38184
  const cwd = process.cwd();
37874
- const envFilePath = join5(cwd, ".env");
38185
+ const envFilePath = join6(cwd, ".env");
37875
38186
  if (options.set) {
37876
38187
  const eqIdx = options.set.indexOf("=");
37877
38188
  if (eqIdx === -1) {
@@ -37887,8 +38198,8 @@ program2.command("auth").argument("[skill]", "Skill name (omit to check all inst
37887
38198
  return;
37888
38199
  }
37889
38200
  let existing = "";
37890
- if (existsSync5(envFilePath)) {
37891
- existing = readFileSync4(envFilePath, "utf-8");
38201
+ if (existsSync6(envFilePath)) {
38202
+ existing = readFileSync5(envFilePath, "utf-8");
37892
38203
  }
37893
38204
  const keyPattern = new RegExp(`^${key}=.*$`, "m");
37894
38205
  let updated;
@@ -37901,7 +38212,7 @@ program2.command("auth").argument("[skill]", "Skill name (omit to check all inst
37901
38212
  ${key}=${value}
37902
38213
  `;
37903
38214
  }
37904
- writeFileSync2(envFilePath, updated, "utf-8");
38215
+ writeFileSync3(envFilePath, updated, "utf-8");
37905
38216
  console.log(chalk2.green(`Set ${key} in ${envFilePath}`));
37906
38217
  return;
37907
38218
  }
@@ -37967,20 +38278,20 @@ Auth status (${installed.length} installed skills):
37967
38278
  }
37968
38279
  });
37969
38280
  program2.command("whoami").option("--json", "Output as JSON", false).description("Show setup summary: version, installed skills, agent configs, and paths").action((options) => {
37970
- const { homedir: homedir3 } = __require("os");
38281
+ const { homedir: homedir4 } = __require("os");
37971
38282
  const version2 = package_default.version;
37972
38283
  const cwd = process.cwd();
37973
38284
  const installed = getInstalledSkills();
37974
38285
  const agentNames = ["claude", "codex", "gemini"];
37975
38286
  const agentConfigs = [];
37976
38287
  for (const agent of agentNames) {
37977
- const agentSkillsPath = join5(homedir3(), `.${agent}`, "skills");
37978
- const exists = existsSync5(agentSkillsPath);
38288
+ const agentSkillsPath = join6(homedir4(), `.${agent}`, "skills");
38289
+ const exists = existsSync6(agentSkillsPath);
37979
38290
  let skillCount = 0;
37980
38291
  if (exists) {
37981
38292
  try {
37982
38293
  skillCount = readdirSync4(agentSkillsPath).filter((f) => {
37983
- const full = join5(agentSkillsPath, f);
38294
+ const full = join6(agentSkillsPath, f);
37984
38295
  return f.startsWith("skill-") && statSync3(full).isDirectory();
37985
38296
  }).length;
37986
38297
  } catch {}
@@ -38125,19 +38436,19 @@ program2.command("outdated").option("--json", "Output as JSON", false).descripti
38125
38436
  const upToDate = [];
38126
38437
  for (const name of installed) {
38127
38438
  const skillName = normalizeSkillName(name);
38128
- const installedPkgPath = join5(cwd, ".skills", skillName, "package.json");
38439
+ const installedPkgPath = join6(cwd, ".skills", skillName, "package.json");
38129
38440
  let installedVersion = "unknown";
38130
- if (existsSync5(installedPkgPath)) {
38441
+ if (existsSync6(installedPkgPath)) {
38131
38442
  try {
38132
- installedVersion = JSON.parse(readFileSync4(installedPkgPath, "utf-8")).version || "unknown";
38443
+ installedVersion = JSON.parse(readFileSync5(installedPkgPath, "utf-8")).version || "unknown";
38133
38444
  } catch {}
38134
38445
  }
38135
38446
  const registryPath = getSkillPath(name);
38136
- const registryPkgPath = join5(registryPath, "package.json");
38447
+ const registryPkgPath = join6(registryPath, "package.json");
38137
38448
  let registryVersion = "unknown";
38138
- if (existsSync5(registryPkgPath)) {
38449
+ if (existsSync6(registryPkgPath)) {
38139
38450
  try {
38140
- registryVersion = JSON.parse(readFileSync4(registryPkgPath, "utf-8")).version || "unknown";
38451
+ registryVersion = JSON.parse(readFileSync5(registryPkgPath, "utf-8")).version || "unknown";
38141
38452
  } catch {}
38142
38453
  }
38143
38454
  if (installedVersion !== registryVersion) {
@@ -38168,4 +38479,41 @@ ${upToDate.length} skill(s) up to date`));
38168
38479
  console.log(chalk2.dim(`
38169
38480
  Run ${chalk2.bold("skills update")} to update all outdated skills`));
38170
38481
  });
38482
+ var configCmd = program2.command("config").description("Manage skills configuration");
38483
+ configCmd.command("show", { isDefault: true }).description("Show current merged configuration").action(() => {
38484
+ const config2 = loadConfig();
38485
+ const keys = Object.keys(config2);
38486
+ if (keys.length === 0) {
38487
+ console.log(chalk2.dim("No configuration set"));
38488
+ return;
38489
+ }
38490
+ for (const [key, value] of Object.entries(config2)) {
38491
+ console.log(`${chalk2.cyan(key)} = ${chalk2.bold(value)}`);
38492
+ }
38493
+ });
38494
+ configCmd.command("set <key> <value>").option("--global", "Save to global config (~/.skillsrc)", false).description("Set a configuration value").action((key, value, options) => {
38495
+ const scope = options.global ? "global" : "project";
38496
+ try {
38497
+ saveConfig(key, value, scope);
38498
+ console.log(chalk2.green(`Set ${key} = ${value} (${scope})`));
38499
+ } catch (err) {
38500
+ console.error(chalk2.red(err.message));
38501
+ process.exitCode = 1;
38502
+ }
38503
+ });
38504
+ configCmd.command("get <key>").description("Get a specific configuration value").action((key) => {
38505
+ const config2 = loadConfig();
38506
+ const value = config2[key];
38507
+ if (value === undefined) {
38508
+ console.log(chalk2.dim(`${key} is not set`));
38509
+ } else {
38510
+ console.log(value);
38511
+ }
38512
+ });
38513
+ configCmd.command("path").description("Show configuration file paths").action(() => {
38514
+ const globalPath = getConfigPath("global");
38515
+ const projectPath = getConfigPath("project");
38516
+ console.log(`${chalk2.cyan("global")}: ${globalPath}${existsSync6(globalPath) ? chalk2.green(" (exists)") : chalk2.dim(" (not found)")}`);
38517
+ console.log(`${chalk2.cyan("project")}: ${projectPath}${existsSync6(projectPath) ? chalk2.green(" (exists)") : chalk2.dim(" (not found)")}`);
38518
+ });
38171
38519
  program2.parse();