skilld 0.15.3 → 1.0.0

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 (68) hide show
  1. package/README.md +7 -5
  2. package/dist/_chunks/{detect-imports.mjs → agent.mjs} +48 -15
  3. package/dist/_chunks/agent.mjs.map +1 -0
  4. package/dist/_chunks/{storage.mjs → cache.mjs} +81 -1
  5. package/dist/_chunks/cache.mjs.map +1 -0
  6. package/dist/_chunks/cache2.mjs +71 -0
  7. package/dist/_chunks/cache2.mjs.map +1 -0
  8. package/dist/_chunks/config.mjs +23 -0
  9. package/dist/_chunks/config.mjs.map +1 -1
  10. package/dist/_chunks/{embedding-cache2.mjs → embedding-cache.mjs} +1 -1
  11. package/dist/_chunks/embedding-cache.mjs.map +1 -0
  12. package/dist/_chunks/formatting.mjs +634 -0
  13. package/dist/_chunks/formatting.mjs.map +1 -0
  14. package/dist/_chunks/{version.d.mts → index.d.mts} +1 -1
  15. package/dist/_chunks/index.d.mts.map +1 -0
  16. package/dist/_chunks/{utils.d.mts → index2.d.mts} +1 -1
  17. package/dist/_chunks/index2.d.mts.map +1 -0
  18. package/dist/_chunks/install.mjs +539 -0
  19. package/dist/_chunks/install.mjs.map +1 -0
  20. package/dist/_chunks/list.mjs +70 -0
  21. package/dist/_chunks/list.mjs.map +1 -0
  22. package/dist/_chunks/markdown.mjs +7 -0
  23. package/dist/_chunks/markdown.mjs.map +1 -1
  24. package/dist/_chunks/pool.mjs +174 -0
  25. package/dist/_chunks/pool.mjs.map +1 -0
  26. package/dist/_chunks/pool2.mjs +1 -6
  27. package/dist/_chunks/pool2.mjs.map +1 -1
  28. package/dist/_chunks/prompts.mjs +234 -2
  29. package/dist/_chunks/prompts.mjs.map +1 -1
  30. package/dist/_chunks/sanitize.mjs +71 -0
  31. package/dist/_chunks/sanitize.mjs.map +1 -1
  32. package/dist/_chunks/search-interactive.mjs +245 -0
  33. package/dist/_chunks/search-interactive.mjs.map +1 -0
  34. package/dist/_chunks/search.mjs +12 -0
  35. package/dist/_chunks/shared.mjs +4 -0
  36. package/dist/_chunks/shared.mjs.map +1 -1
  37. package/dist/_chunks/{npm.mjs → sources.mjs} +401 -4
  38. package/dist/_chunks/sources.mjs.map +1 -0
  39. package/dist/_chunks/sync.mjs +1937 -0
  40. package/dist/_chunks/sync.mjs.map +1 -0
  41. package/dist/_chunks/sync2.mjs +13 -0
  42. package/dist/_chunks/uninstall.mjs +207 -0
  43. package/dist/_chunks/uninstall.mjs.map +1 -0
  44. package/dist/_chunks/validate.mjs +3 -0
  45. package/dist/_chunks/validate.mjs.map +1 -1
  46. package/dist/_chunks/yaml.mjs +19 -0
  47. package/dist/_chunks/yaml.mjs.map +1 -1
  48. package/dist/agent/index.d.mts +1 -1
  49. package/dist/agent/index.mjs +4 -3
  50. package/dist/cache/index.d.mts +2 -2
  51. package/dist/cache/index.mjs +2 -1
  52. package/dist/cli.mjs +146 -3823
  53. package/dist/cli.mjs.map +1 -1
  54. package/dist/index.d.mts +2 -3
  55. package/dist/index.mjs +4 -4
  56. package/dist/retriv/index.mjs +14 -2
  57. package/dist/retriv/index.mjs.map +1 -1
  58. package/dist/retriv/worker.mjs +3 -3
  59. package/dist/sources/index.d.mts +2 -2
  60. package/dist/sources/index.mjs +2 -1
  61. package/dist/types.d.mts +2 -3
  62. package/package.json +9 -9
  63. package/dist/_chunks/detect-imports.mjs.map +0 -1
  64. package/dist/_chunks/embedding-cache2.mjs.map +0 -1
  65. package/dist/_chunks/npm.mjs.map +0 -1
  66. package/dist/_chunks/storage.mjs.map +0 -1
  67. package/dist/_chunks/utils.d.mts.map +0 -1
  68. package/dist/_chunks/version.d.mts.map +0 -1
@@ -1,3 +1,5 @@
1
+ import "./sanitize.mjs";
2
+ import "./yaml.mjs";
1
3
  import "./shared.mjs";
2
4
  import { d as getSectionValidator } from "./prompts.mjs";
3
5
  import { existsSync, readFileSync } from "node:fs";
@@ -6,6 +8,7 @@ const SECTION_HEADINGS = {
6
8
  "## API Changes": "api-changes",
7
9
  "## Best Practices": "best-practices"
8
10
  };
11
+ /** Infer section type from content headings */
9
12
  function inferSection(content) {
10
13
  for (const [heading, section] of Object.entries(SECTION_HEADINGS)) if (content.includes(heading)) return section;
11
14
  return "custom";
@@ -1 +1 @@
1
- {"version":3,"file":"validate.mjs","names":[],"sources":["../../src/commands/validate.ts"],"sourcesContent":["/**\n * skilld validate <file> [--section <type>]\n *\n * Validates a generated skill section file against quality heuristics.\n * Exits non-zero on warnings so the LLM agent detects issues via exit code.\n */\n\nimport type { SkillSection } from '../agent/prompts/index.ts'\nimport { existsSync, readFileSync } from 'node:fs'\nimport { defineCommand } from 'citty'\nimport { getSectionValidator } from '../agent/prompts/index.ts'\n\nconst SECTION_HEADINGS: Record<string, SkillSection> = {\n '## API Changes': 'api-changes',\n '## Best Practices': 'best-practices',\n}\n\n/** Infer section type from content headings */\nfunction inferSection(content: string): SkillSection | null {\n for (const [heading, section] of Object.entries(SECTION_HEADINGS)) {\n if (content.includes(heading))\n return section\n }\n // Custom sections don't have a fixed heading — fall back\n return 'custom'\n}\n\nexport const validateCommandDef = defineCommand({\n meta: { name: 'validate', description: 'Validate a generated skill section' },\n args: {\n file: {\n type: 'positional',\n description: 'Path to the section file to validate',\n required: true,\n },\n section: {\n type: 'string',\n description: 'Section type (api-changes, best-practices, custom). Auto-detected from heading if omitted.',\n },\n },\n\n /* eslint-disable no-console */\n async run({ args }) {\n const filePath = args.file as string\n if (!existsSync(filePath)) {\n console.error(`File not found: ${filePath}`)\n process.exit(1)\n }\n\n const content = readFileSync(filePath, 'utf-8').trim()\n if (!content) {\n console.error('File is empty')\n process.exit(1)\n }\n\n const section = (args.section as SkillSection) || inferSection(content)\n if (!section) {\n console.error('Could not infer section type — use --section flag')\n process.exit(1)\n }\n\n const validator = getSectionValidator(section)\n if (!validator) {\n console.log('OK: No validator for section type:', section)\n process.exit(0)\n }\n\n const warnings = validator(content)\n\n if (warnings.length === 0) {\n console.log('OK: No validation warnings')\n process.exit(0)\n }\n\n for (const w of warnings)\n console.log(`WARNING: ${w.warning}`)\n\n process.exit(1)\n },\n})\n"],"mappings":";;;;AAYA,MAAM,mBAAiD;CACrD,kBAAkB;CAClB,qBAAqB;CACtB;AAGD,SAAS,aAAa,SAAsC;AAC1D,MAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,iBAAiB,CAC/D,KAAI,QAAQ,SAAS,QAAQ,CAC3B,QAAO;AAGX,QAAO;;AAGT,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EAAE,MAAM;EAAY,aAAa;EAAsC;CAC7E,MAAM;EACJ,MAAM;GACJ,MAAM;GACN,aAAa;GACb,UAAU;GACX;EACD,SAAS;GACP,MAAM;GACN,aAAa;;EAEhB;CAGD,MAAM,IAAI,EAAE,QAAQ;EAClB,MAAM,WAAW,KAAK;AACtB,MAAI,CAAC,WAAW,SAAS,EAAE;AACzB,WAAQ,MAAM,mBAAmB,WAAW;AAC5C,WAAQ,KAAK,EAAE;;EAGjB,MAAM,UAAU,aAAa,UAAU,QAAQ,CAAC,MAAM;AACtD,MAAI,CAAC,SAAS;AACZ,WAAQ,MAAM,gBAAgB;AAC9B,WAAQ,KAAK,EAAE;;EAGjB,MAAM,UAAW,KAAK,WAA4B,aAAa,QAAQ;AACvE,MAAI,CAAC,SAAS;AACZ,WAAQ,MAAM,oDAAoD;AAClE,WAAQ,KAAK,EAAE;;EAGjB,MAAM,YAAY,oBAAoB,QAAQ;AAC9C,MAAI,CAAC,WAAW;AACd,WAAQ,IAAI,sCAAsC,QAAQ;AAC1D,WAAQ,KAAK,EAAE;;EAGjB,MAAM,WAAW,UAAU,QAAQ;AAEnC,MAAI,SAAS,WAAW,GAAG;AACzB,WAAQ,IAAI,6BAA6B;AACzC,WAAQ,KAAK,EAAE;;AAGjB,OAAK,MAAM,KAAK,SACd,SAAQ,IAAI,YAAY,EAAE,UAAU;AAEtC,UAAQ,KAAK,EAAE;;CAElB,CAAC"}
1
+ {"version":3,"file":"validate.mjs","names":[],"sources":["../../src/commands/validate.ts"],"sourcesContent":["/**\n * skilld validate <file> [--section <type>]\n *\n * Validates a generated skill section file against quality heuristics.\n * Exits non-zero on warnings so the LLM agent detects issues via exit code.\n */\n\nimport type { SkillSection } from '../agent/prompts/index.ts'\nimport { existsSync, readFileSync } from 'node:fs'\nimport { defineCommand } from 'citty'\nimport { getSectionValidator } from '../agent/prompts/index.ts'\n\nconst SECTION_HEADINGS: Record<string, SkillSection> = {\n '## API Changes': 'api-changes',\n '## Best Practices': 'best-practices',\n}\n\n/** Infer section type from content headings */\nfunction inferSection(content: string): SkillSection | null {\n for (const [heading, section] of Object.entries(SECTION_HEADINGS)) {\n if (content.includes(heading))\n return section\n }\n // Custom sections don't have a fixed heading — fall back\n return 'custom'\n}\n\nexport const validateCommandDef = defineCommand({\n meta: { name: 'validate', description: 'Validate a generated skill section' },\n args: {\n file: {\n type: 'positional',\n description: 'Path to the section file to validate',\n required: true,\n },\n section: {\n type: 'string',\n description: 'Section type (api-changes, best-practices, custom). Auto-detected from heading if omitted.',\n },\n },\n\n /* eslint-disable no-console */\n async run({ args }) {\n const filePath = args.file as string\n if (!existsSync(filePath)) {\n console.error(`File not found: ${filePath}`)\n process.exit(1)\n }\n\n const content = readFileSync(filePath, 'utf-8').trim()\n if (!content) {\n console.error('File is empty')\n process.exit(1)\n }\n\n const section = (args.section as SkillSection) || inferSection(content)\n if (!section) {\n console.error('Could not infer section type — use --section flag')\n process.exit(1)\n }\n\n const validator = getSectionValidator(section)\n if (!validator) {\n console.log('OK: No validator for section type:', section)\n process.exit(0)\n }\n\n const warnings = validator(content)\n\n if (warnings.length === 0) {\n console.log('OK: No validation warnings')\n process.exit(0)\n }\n\n for (const w of warnings)\n console.log(`WARNING: ${w.warning}`)\n\n process.exit(1)\n },\n})\n"],"mappings":";;;;;;AAYA,MAAM,mBAAiD;CACrD,kBAAkB;CAClB,qBAAqB;CACtB;;AAGD,SAAS,aAAa,SAAsC;AAC1D,MAAK,MAAM,CAAC,SAAS,YAAY,OAAO,QAAQ,iBAAiB,CAC/D,KAAI,QAAQ,SAAS,QAAQ,CAC3B,QAAO;AAGX,QAAO;;AAGT,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EAAE,MAAM;EAAY,aAAa;EAAsC;CAC7E,MAAM;EACJ,MAAM;GACJ,MAAM;GACN,aAAa;GACb,UAAU;GACX;EACD,SAAS;GACP,MAAM;GACN,aAAa;;EAEhB;CAGD,MAAM,IAAI,EAAE,QAAQ;EAClB,MAAM,WAAW,KAAK;AACtB,MAAI,CAAC,WAAW,SAAS,EAAE;AACzB,WAAQ,MAAM,mBAAmB,WAAW;AAC5C,WAAQ,KAAK,EAAE;;EAGjB,MAAM,UAAU,aAAa,UAAU,QAAQ,CAAC,MAAM;AACtD,MAAI,CAAC,SAAS;AACZ,WAAQ,MAAM,gBAAgB;AAC9B,WAAQ,KAAK,EAAE;;EAGjB,MAAM,UAAW,KAAK,WAA4B,aAAa,QAAQ;AACvE,MAAI,CAAC,SAAS;AACZ,WAAQ,MAAM,oDAAoD;AAClE,WAAQ,KAAK,EAAE;;EAGjB,MAAM,YAAY,oBAAoB,QAAQ;AAC9C,MAAI,CAAC,WAAW;AACd,WAAQ,IAAI,sCAAsC,QAAQ;AAC1D,WAAQ,KAAK,EAAE;;EAGjB,MAAM,WAAW,UAAU,QAAQ;AAEnC,MAAI,SAAS,WAAW,GAAG;AACzB,WAAQ,IAAI,6BAA6B;AACzC,WAAQ,KAAK,EAAE;;AAGjB,OAAK,MAAM,KAAK,SACd,SAAQ,IAAI,YAAY,EAAE,UAAU;AAEtC,UAAQ,KAAK,EAAE;;CAElB,CAAC"}
@@ -1,8 +1,23 @@
1
+ /**
2
+ * Minimal YAML value escaping/unescaping for our hand-rolled parsers.
3
+ *
4
+ * Handles the characters that break naive `:` splitting and quote stripping:
5
+ * colons, quotes, newlines, backslashes.
6
+ */
7
+ /** Characters that require double-quoting in YAML values */
1
8
  const NEEDS_QUOTING = /[:"'\\\n\r\t#{}[\],&*!|>%@`]/;
9
+ /**
10
+ * Escape a value for safe YAML emission. Always double-quotes if the value
11
+ * contains any special characters; returns unquoted for simple values.
12
+ */
2
13
  function yamlEscape(value) {
3
14
  if (!NEEDS_QUOTING.test(value)) return value;
4
15
  return `"${value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t")}"`;
5
16
  }
17
+ /**
18
+ * Parse a raw YAML value string back to its actual value.
19
+ * Handles double-quoted (with escapes), single-quoted, and unquoted values.
20
+ */
6
21
  function yamlUnescape(raw) {
7
22
  const trimmed = raw.trim();
8
23
  if (!trimmed) return "";
@@ -10,6 +25,10 @@ function yamlUnescape(raw) {
10
25
  if (trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
11
26
  return trimmed;
12
27
  }
28
+ /**
29
+ * Parse a YAML `key: value` line, correctly handling colons inside quoted values.
30
+ * Returns [key, value] or null if not a valid KV line.
31
+ */
13
32
  function yamlParseKV(line) {
14
33
  const trimmed = line.trim();
15
34
  const colonIdx = trimmed.indexOf(":");
@@ -1 +1 @@
1
- {"version":3,"file":"yaml.mjs","names":[],"sources":["../../src/core/yaml.ts"],"sourcesContent":["/**\n * Minimal YAML value escaping/unescaping for our hand-rolled parsers.\n *\n * Handles the characters that break naive `:` splitting and quote stripping:\n * colons, quotes, newlines, backslashes.\n */\n\n/** Characters that require double-quoting in YAML values */\nconst NEEDS_QUOTING = /[:\"'\\\\\\n\\r\\t#{}[\\],&*!|>%@`]/\n\n/**\n * Escape a value for safe YAML emission. Always double-quotes if the value\n * contains any special characters; returns unquoted for simple values.\n */\nexport function yamlEscape(value: string): string {\n if (!NEEDS_QUOTING.test(value))\n return value\n // Escape backslashes first, then double quotes, then control chars\n const escaped = value\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\t/g, '\\\\t')\n return `\"${escaped}\"`\n}\n\n/**\n * Parse a raw YAML value string back to its actual value.\n * Handles double-quoted (with escapes), single-quoted, and unquoted values.\n */\nexport function yamlUnescape(raw: string): string {\n const trimmed = raw.trim()\n if (!trimmed)\n return ''\n\n // Double-quoted: process escape sequences\n if (trimmed.startsWith('\"') && trimmed.endsWith('\"')) {\n return trimmed.slice(1, -1)\n .replace(/\\\\n/g, '\\n')\n .replace(/\\\\r/g, '\\r')\n .replace(/\\\\t/g, '\\t')\n .replace(/\\\\\"/g, '\"')\n .replace(/\\\\\\\\/g, '\\\\')\n }\n\n // Single-quoted: no escape processing, just strip quotes\n if (trimmed.startsWith('\\'') && trimmed.endsWith('\\''))\n return trimmed.slice(1, -1)\n\n return trimmed\n}\n\n/**\n * Parse a YAML `key: value` line, correctly handling colons inside quoted values.\n * Returns [key, value] or null if not a valid KV line.\n */\nexport function yamlParseKV(line: string): [string, string] | null {\n const trimmed = line.trim()\n // Find the first `: ` or `:\\n` or `:$` — the YAML key-value separator\n const colonIdx = trimmed.indexOf(':')\n if (colonIdx === -1)\n return null\n const key = trimmed.slice(0, colonIdx).trim()\n const rawValue = trimmed.slice(colonIdx + 1)\n if (!key)\n return null\n return [key, yamlUnescape(rawValue)]\n}\n"],"mappings":"AAQA,MAAM,gBAAgB;AAMtB,SAAgB,WAAW,OAAuB;AAChD,KAAI,CAAC,cAAc,KAAK,MAAM,CAC5B,QAAO;AAQT,QAAO,IANS,MACb,QAAQ,OAAO,OAAO,CACtB,QAAQ,MAAM,OAAM,CACpB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACL;;AAOrB,SAAgB,aAAa,KAAqB;CAChD,MAAM,UAAU,IAAI,MAAM;AAC1B,KAAI,CAAC,QACH,QAAO;AAGT,KAAI,QAAQ,WAAW,KAAI,IAAI,QAAQ,SAAS,KAAI,CAClD,QAAO,QAAQ,MAAM,GAAG,GAAG,CACxB,QAAQ,QAAQ,KAAK,CACrB,QAAQ,QAAQ,KAAK,CACrB,QAAQ,QAAQ,IAAK,CACrB,QAAQ,QAAQ,KAAI,CACpB,QAAQ,SAAS,KAAK;AAI3B,KAAI,QAAQ,WAAW,IAAK,IAAI,QAAQ,SAAS,IAAK,CACpD,QAAO,QAAQ,MAAM,GAAG,GAAG;AAE7B,QAAO;;AAOT,SAAgB,YAAY,MAAuC;CACjE,MAAM,UAAU,KAAK,MAAM;CAE3B,MAAM,WAAW,QAAQ,QAAQ,IAAI;AACrC,KAAI,aAAa,GACf,QAAO;CACT,MAAM,MAAM,QAAQ,MAAM,GAAG,SAAS,CAAC,MAAM;CAC7C,MAAM,WAAW,QAAQ,MAAM,WAAW,EAAE;AAC5C,KAAI,CAAC,IACH,QAAO;AACT,QAAO,CAAC,KAAK,aAAa,SAAS,CAAC"}
1
+ {"version":3,"file":"yaml.mjs","names":[],"sources":["../../src/core/yaml.ts"],"sourcesContent":["/**\n * Minimal YAML value escaping/unescaping for our hand-rolled parsers.\n *\n * Handles the characters that break naive `:` splitting and quote stripping:\n * colons, quotes, newlines, backslashes.\n */\n\n/** Characters that require double-quoting in YAML values */\nconst NEEDS_QUOTING = /[:\"'\\\\\\n\\r\\t#{}[\\],&*!|>%@`]/\n\n/**\n * Escape a value for safe YAML emission. Always double-quotes if the value\n * contains any special characters; returns unquoted for simple values.\n */\nexport function yamlEscape(value: string): string {\n if (!NEEDS_QUOTING.test(value))\n return value\n // Escape backslashes first, then double quotes, then control chars\n const escaped = value\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\t/g, '\\\\t')\n return `\"${escaped}\"`\n}\n\n/**\n * Parse a raw YAML value string back to its actual value.\n * Handles double-quoted (with escapes), single-quoted, and unquoted values.\n */\nexport function yamlUnescape(raw: string): string {\n const trimmed = raw.trim()\n if (!trimmed)\n return ''\n\n // Double-quoted: process escape sequences\n if (trimmed.startsWith('\"') && trimmed.endsWith('\"')) {\n return trimmed.slice(1, -1)\n .replace(/\\\\n/g, '\\n')\n .replace(/\\\\r/g, '\\r')\n .replace(/\\\\t/g, '\\t')\n .replace(/\\\\\"/g, '\"')\n .replace(/\\\\\\\\/g, '\\\\')\n }\n\n // Single-quoted: no escape processing, just strip quotes\n if (trimmed.startsWith('\\'') && trimmed.endsWith('\\''))\n return trimmed.slice(1, -1)\n\n return trimmed\n}\n\n/**\n * Parse a YAML `key: value` line, correctly handling colons inside quoted values.\n * Returns [key, value] or null if not a valid KV line.\n */\nexport function yamlParseKV(line: string): [string, string] | null {\n const trimmed = line.trim()\n // Find the first `: ` or `:\\n` or `:$` — the YAML key-value separator\n const colonIdx = trimmed.indexOf(':')\n if (colonIdx === -1)\n return null\n const key = trimmed.slice(0, colonIdx).trim()\n const rawValue = trimmed.slice(colonIdx + 1)\n if (!key)\n return null\n return [key, yamlUnescape(rawValue)]\n}\n"],"mappings":";;;;;;;AAQA,MAAM,gBAAgB;;;;;AAMtB,SAAgB,WAAW,OAAuB;AAChD,KAAI,CAAC,cAAc,KAAK,MAAM,CAC5B,QAAO;AAQT,QAAO,IANS,MACb,QAAQ,OAAO,OAAO,CACtB,QAAQ,MAAM,OAAM,CACpB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACrB,QAAQ,OAAO,MAAM,CACL;;;;;;AAOrB,SAAgB,aAAa,KAAqB;CAChD,MAAM,UAAU,IAAI,MAAM;AAC1B,KAAI,CAAC,QACH,QAAO;AAGT,KAAI,QAAQ,WAAW,KAAI,IAAI,QAAQ,SAAS,KAAI,CAClD,QAAO,QAAQ,MAAM,GAAG,GAAG,CACxB,QAAQ,QAAQ,KAAK,CACrB,QAAQ,QAAQ,KAAK,CACrB,QAAQ,QAAQ,IAAK,CACrB,QAAQ,QAAQ,KAAI,CACpB,QAAQ,SAAS,KAAK;AAI3B,KAAI,QAAQ,WAAW,IAAK,IAAI,QAAQ,SAAS,IAAK,CACpD,QAAO,QAAQ,MAAM,GAAG,GAAG;AAE7B,QAAO;;;;;;AAOT,SAAgB,YAAY,MAAuC;CACjE,MAAM,UAAU,KAAK,MAAM;CAE3B,MAAM,WAAW,QAAQ,QAAQ,IAAI;AACrC,KAAI,aAAa,GACf,QAAO;CACT,MAAM,MAAM,QAAQ,MAAM,GAAG,SAAS,CAAC,MAAM;CAC7C,MAAM,WAAW,QAAQ,MAAM,WAAW,EAAE;AAC5C,KAAI,CAAC,IACH,QAAO;AACT,QAAO,CAAC,KAAK,aAAa,SAAS,CAAC"}
@@ -187,7 +187,7 @@ declare function optimizeDocs(opts: OptimizeDocsOptions): Promise<OptimizeResult
187
187
  //#region src/agent/detect-imports.d.ts
188
188
  /**
189
189
  * Detect directly-used npm packages by scanning source files
190
- * Uses mlly for proper ES module parsing + globby for gitignore support
190
+ * Uses mlly for proper ES module parsing + tinyglobby for file discovery
191
191
  */
192
192
  interface PackageUsage {
193
193
  name: string;
@@ -1,7 +1,8 @@
1
- import "../_chunks/chunk.mjs";
2
1
  import "../_chunks/config.mjs";
3
- import "../_chunks/storage.mjs";
2
+ import "../_chunks/sanitize.mjs";
3
+ import "../_chunks/cache.mjs";
4
+ import "../_chunks/yaml.mjs";
4
5
  import "../_chunks/shared.mjs";
5
6
  import { _ as targets, a as sanitizeName, c as SECTION_OUTPUT_FILES, g as getAgentVersion, h as detectTargetAgent, i as linkSkillToAgents, l as buildAllSectionPrompts, m as detectInstalledAgents, n as computeSkillDirName, o as unlinkSkillFromAgents, r as installSkillForAgents, s as SECTION_MERGE_ORDER, t as generateSkillMd, u as buildSectionPrompt } from "../_chunks/prompts.mjs";
6
- import { a as getModelName, i as getModelLabel, n as createToolProgress, o as optimizeDocs, r as getAvailableModels, t as detectImportedPackages } from "../_chunks/detect-imports.mjs";
7
+ import { a as getModelName, i as getModelLabel, n as createToolProgress, o as optimizeDocs, r as getAvailableModels, t as detectImportedPackages } from "../_chunks/agent.mjs";
7
8
  export { SECTION_MERGE_ORDER, SECTION_OUTPUT_FILES, targets as agents, buildAllSectionPrompts, buildSectionPrompt, computeSkillDirName, createToolProgress, detectImportedPackages, detectInstalledAgents, detectTargetAgent, generateSkillMd, getAgentVersion, getAvailableModels, getModelLabel, getModelName, installSkillForAgents, linkSkillToAgents, optimizeDocs, sanitizeName, unlinkSkillFromAgents };
@@ -1,2 +1,2 @@
1
- import { A as REPOS_DIR, C as writeToCache, D as CachedPackage, E as CachedDoc, M as getRepoCacheDir, O as CACHE_DIR, S as writeSections, T as CacheConfig, _ as listCached, a as clearAllCache, b as readCachedSection, c as getPkgKeyFiles, d as isCached, f as linkCachedDir, g as linkShippedSkill, h as linkRepoCachedDir, i as ShippedSkill, j as getPackageDbPath, k as REFERENCES_DIR, l as getShippedSkills, m as linkPkgNamed, n as getCacheKey, o as clearCache, p as linkPkg, r as getVersionKey, s as ensureCacheDir, t as getCacheDir, u as hasShippedDocs, v as listReferenceFiles, w as writeToRepoCache, x as resolvePkgDir, y as readCachedDocs } from "../_chunks/version.mjs";
2
- export { CACHE_DIR, type CacheConfig, type CachedDoc, type CachedPackage, REFERENCES_DIR, REPOS_DIR, type ShippedSkill, clearAllCache, clearCache, ensureCacheDir, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getVersionKey, hasShippedDocs, isCached, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
1
+ import { A as REPOS_DIR, C as writeToCache, D as CachedPackage, E as CachedDoc, M as getRepoCacheDir, O as CACHE_DIR, S as writeSections, T as CacheConfig, _ as listCached, a as clearAllCache, b as readCachedSection, c as getPkgKeyFiles, d as isCached, f as linkCachedDir, g as linkShippedSkill, h as linkRepoCachedDir, i as ShippedSkill, j as getPackageDbPath, k as REFERENCES_DIR, l as getShippedSkills, m as linkPkgNamed, n as getCacheKey, o as clearCache, p as linkPkg, r as getVersionKey, s as ensureCacheDir, t as getCacheDir, u as hasShippedDocs, v as listReferenceFiles, w as writeToRepoCache, x as resolvePkgDir, y as readCachedDocs } from "../_chunks/index.mjs";
2
+ export { CACHE_DIR, CacheConfig, CachedDoc, CachedPackage, REFERENCES_DIR, REPOS_DIR, ShippedSkill, clearAllCache, clearCache, ensureCacheDir, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getVersionKey, hasShippedDocs, isCached, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };
@@ -1,3 +1,4 @@
1
1
  import { a as getRepoCacheDir, c as getVersionKey, i as getPackageDbPath, n as REFERENCES_DIR, o as getCacheDir, r as REPOS_DIR, s as getCacheKey, t as CACHE_DIR } from "../_chunks/config.mjs";
2
- import { _ as resolvePkgDir, a as getShippedSkills, b as writeToRepoCache, c as linkCachedDir, d as linkRepoCachedDir, f as linkShippedSkill, g as readCachedSection, h as readCachedDocs, i as getPkgKeyFiles, l as linkPkg, m as listReferenceFiles, n as clearCache, o as hasShippedDocs, p as listCached, r as ensureCacheDir, s as isCached, t as clearAllCache, u as linkPkgNamed, v as writeSections, y as writeToCache } from "../_chunks/storage.mjs";
2
+ import "../_chunks/sanitize.mjs";
3
+ import { _ as resolvePkgDir, a as getShippedSkills, b as writeToRepoCache, c as linkCachedDir, d as linkRepoCachedDir, f as linkShippedSkill, g as readCachedSection, h as readCachedDocs, i as getPkgKeyFiles, l as linkPkg, m as listReferenceFiles, n as clearCache, o as hasShippedDocs, p as listCached, r as ensureCacheDir, s as isCached, t as clearAllCache, u as linkPkgNamed, v as writeSections, y as writeToCache } from "../_chunks/cache.mjs";
3
4
  export { CACHE_DIR, REFERENCES_DIR, REPOS_DIR, clearAllCache, clearCache, ensureCacheDir, getCacheDir, getCacheKey, getPackageDbPath, getPkgKeyFiles, getRepoCacheDir, getShippedSkills, getVersionKey, hasShippedDocs, isCached, linkCachedDir, linkPkg, linkPkgNamed, linkRepoCachedDir, linkShippedSkill, listCached, listReferenceFiles, readCachedDocs, readCachedSection, resolvePkgDir, writeSections, writeToCache, writeToRepoCache };