skilld 1.1.0 → 1.1.2

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 (61) hide show
  1. package/dist/_chunks/agent.mjs +13 -1
  2. package/dist/_chunks/agent.mjs.map +1 -1
  3. package/dist/_chunks/assemble.mjs +2 -0
  4. package/dist/_chunks/assemble.mjs.map +1 -1
  5. package/dist/_chunks/cache.mjs +2 -0
  6. package/dist/_chunks/cache.mjs.map +1 -1
  7. package/dist/_chunks/cache2.mjs +3 -1
  8. package/dist/_chunks/cache2.mjs.map +1 -1
  9. package/dist/_chunks/chunk.mjs +2 -0
  10. package/dist/_chunks/config.mjs +4 -0
  11. package/dist/_chunks/config.mjs.map +1 -1
  12. package/dist/_chunks/detect.mjs +30 -0
  13. package/dist/_chunks/detect.mjs.map +1 -1
  14. package/dist/_chunks/embedding-cache.mjs +6 -6
  15. package/dist/_chunks/embedding-cache.mjs.map +1 -1
  16. package/dist/_chunks/formatting.mjs +9 -1
  17. package/dist/_chunks/formatting.mjs.map +1 -1
  18. package/dist/_chunks/index2.d.mts.map +1 -1
  19. package/dist/_chunks/install.mjs +3 -1
  20. package/dist/_chunks/install.mjs.map +1 -1
  21. package/dist/_chunks/list.mjs +2 -0
  22. package/dist/_chunks/list.mjs.map +1 -1
  23. package/dist/_chunks/markdown.mjs +2 -0
  24. package/dist/_chunks/markdown.mjs.map +1 -1
  25. package/dist/_chunks/pool.mjs +2 -0
  26. package/dist/_chunks/pool.mjs.map +1 -1
  27. package/dist/_chunks/prompts.mjs +29 -7
  28. package/dist/_chunks/prompts.mjs.map +1 -1
  29. package/dist/_chunks/sanitize.mjs +3 -1
  30. package/dist/_chunks/sanitize.mjs.map +1 -1
  31. package/dist/_chunks/search-interactive.mjs +3 -1
  32. package/dist/_chunks/search-interactive.mjs.map +1 -1
  33. package/dist/_chunks/search.mjs +183 -8
  34. package/dist/_chunks/search.mjs.map +1 -0
  35. package/dist/_chunks/shared.mjs +4 -0
  36. package/dist/_chunks/shared.mjs.map +1 -1
  37. package/dist/_chunks/skills.mjs +4 -0
  38. package/dist/_chunks/skills.mjs.map +1 -1
  39. package/dist/_chunks/sources.mjs +88 -5
  40. package/dist/_chunks/sources.mjs.map +1 -1
  41. package/dist/_chunks/sync.mjs +23 -12
  42. package/dist/_chunks/sync.mjs.map +1 -1
  43. package/dist/_chunks/uninstall.mjs +3 -1
  44. package/dist/_chunks/uninstall.mjs.map +1 -1
  45. package/dist/_chunks/validate.mjs +2 -0
  46. package/dist/_chunks/validate.mjs.map +1 -1
  47. package/dist/_chunks/yaml.mjs +2 -0
  48. package/dist/_chunks/yaml.mjs.map +1 -1
  49. package/dist/agent/index.d.mts +6 -3
  50. package/dist/agent/index.d.mts.map +1 -1
  51. package/dist/cli.mjs +19 -9
  52. package/dist/cli.mjs.map +1 -1
  53. package/dist/retriv/index.mjs +5 -3
  54. package/dist/retriv/index.mjs.map +1 -1
  55. package/dist/retriv/worker.mjs +2 -0
  56. package/dist/retriv/worker.mjs.map +1 -1
  57. package/dist/types.d.mts +0 -1
  58. package/package.json +10 -10
  59. package/dist/_chunks/search2.mjs +0 -180
  60. package/dist/_chunks/search2.mjs.map +0 -1
  61. package/dist/_chunks/sync2.mjs +0 -15
@@ -1,6 +1,7 @@
1
1
  import { a as getRepoCacheDir, c as getVersionKey, i as getPackageDbPath, o as getCacheDir, t as CACHE_DIR } from "./config.mjs";
2
2
  import { n as sanitizeMarkdown } from "./sanitize.mjs";
3
3
  import { _ as resolvePkgDir, a as getShippedSkills, b as writeToRepoCache, c as linkCachedDir, d as linkRepoCachedDir, f as linkShippedSkill, h as readCachedDocs, i as getPkgKeyFiles, l as linkPkg, m as listReferenceFiles, n as clearCache, o as hasShippedDocs, r as ensureCacheDir, s as isCached, u as linkPkgNamed, y as writeToCache } from "./cache.mjs";
4
+ import "./yaml.mjs";
4
5
  import { i as parseFrontmatter } from "./markdown.mjs";
5
6
  import { SearchDepsUnavailableError, createIndex } from "../retriv/index.mjs";
6
7
  import { d as getPrereleaseChangelogRef, n as getSharedSkillsDir, o as getBlogPreset, t as SHARED_SKILLS_DIR } from "./shared.mjs";
@@ -19,6 +20,7 @@ import pLimit from "p-limit";
19
20
  import * as p from "@clack/prompts";
20
21
  import { defineCommand } from "citty";
21
22
  import logUpdate from "log-update";
23
+ //#region src/commands/sync-shared.ts
22
24
  /** Max docs sent to the embedding pipeline to prevent oversized indexes */
23
25
  const MAX_INDEX_DOCS = 250;
24
26
  const RESOLVE_STEP_LABELS = {
@@ -674,7 +676,7 @@ async function ensureAgentInstructions(agent, cwd, isGlobal) {
674
676
  if (!agentConfig.instructionFile) return;
675
677
  const filePath = join(cwd, agentConfig.instructionFile);
676
678
  if (existsSync(filePath)) {
677
- if (readFileSync(filePath, "utf-8").includes(SKILLD_MARKER_START)) return;
679
+ if (readFileSync(filePath, "utf-8").includes("<!-- skilld -->")) return;
678
680
  }
679
681
  if (!isInteractive()) {
680
682
  if (existsSync(filePath)) appendFileSync(filePath, `${readFileSync(filePath, "utf-8").endsWith("\n") ? "" : "\n"}\n${SKILLD_INSTRUCTIONS}\n`);
@@ -957,6 +959,8 @@ function writePromptFiles(opts) {
957
959
  }
958
960
  return written;
959
961
  }
962
+ //#endregion
963
+ //#region src/telemetry.ts
960
964
  /**
961
965
  * Anonymous telemetry — fire-and-forget GET to add-skill.vercel.sh/t
962
966
  *
@@ -978,6 +982,8 @@ function track(data) {
978
982
  fetch(`${TELEMETRY_URL}?${params.toString()}`).catch(() => {});
979
983
  } catch {}
980
984
  }
985
+ //#endregion
986
+ //#region src/commands/sync-git.ts
981
987
  async function syncGitSkills(opts) {
982
988
  const { source, agent, global: isGlobal, yes } = opts;
983
989
  const cwd = process.cwd();
@@ -1206,6 +1212,8 @@ async function syncGitHubRepo(opts) {
1206
1212
  });
1207
1213
  p.outro(`Synced ${owner}/${repo} to ${relative(cwd, skillDir)}`);
1208
1214
  }
1215
+ //#endregion
1216
+ //#region src/commands/sync-parallel.ts
1209
1217
  const STATUS_ICONS = {
1210
1218
  pending: "○",
1211
1219
  resolving: "◐",
@@ -1240,7 +1248,7 @@ async function syncPackagesParallel(config) {
1240
1248
  });
1241
1249
  function render() {
1242
1250
  const maxNameLen = Math.max(...packages.map((p) => p.length), 20);
1243
- const lines = [...states.values()].map((s) => {
1251
+ const lines = Array.from(states.values(), (s) => {
1244
1252
  const icon = STATUS_ICONS[s.status];
1245
1253
  const color = STATUS_COLORS[s.status];
1246
1254
  const reset = "\x1B[0m";
@@ -1523,6 +1531,8 @@ async function enhanceWithLLM(packageName, data, config, cwd, update, sections,
1523
1531
  }
1524
1532
  update(packageName, "done", "Skill optimized", versionKey);
1525
1533
  }
1534
+ //#endregion
1535
+ //#region src/commands/sync.ts
1526
1536
  function showResolveAttempts(attempts) {
1527
1537
  if (attempts.length === 0) return;
1528
1538
  p.log.message("\x1B[90mResolution attempts:\x1B[0m");
@@ -1576,7 +1586,7 @@ async function interactivePicker(state) {
1576
1586
  p.log.warn("No dependencies found");
1577
1587
  return null;
1578
1588
  }
1579
- return pickFromList([...declaredMap.entries()].map(([name, version]) => ({
1589
+ return pickFromList(Array.from(declaredMap.entries(), ([name, version]) => ({
1580
1590
  name,
1581
1591
  version: maskPatch(version),
1582
1592
  count: 0,
@@ -1946,29 +1956,29 @@ const ejectCommandDef = defineCommand({
1946
1956
  description: "Eject skill with references as real files (portable, no symlinks)"
1947
1957
  },
1948
1958
  args: {
1949
- "package": {
1959
+ package: {
1950
1960
  type: "positional",
1951
1961
  description: "Package to eject",
1952
1962
  required: true
1953
1963
  },
1954
- "name": {
1964
+ name: {
1955
1965
  type: "string",
1956
1966
  alias: "n",
1957
1967
  description: "Custom skill directory name (default: derived from package)"
1958
1968
  },
1959
- "out": {
1969
+ out: {
1960
1970
  type: "string",
1961
1971
  alias: "o",
1962
1972
  description: "Output directory path override"
1963
1973
  },
1964
- "from": {
1974
+ from: {
1965
1975
  type: "string",
1966
1976
  description: "Collect releases/issues/discussions from this date onward (YYYY-MM-DD)"
1967
1977
  },
1968
- "no-search": {
1978
+ search: {
1969
1979
  type: "boolean",
1970
- description: "Skip search index / embeddings generation",
1971
- default: false
1980
+ description: "Build search index / embeddings (use --no-search to skip)",
1981
+ default: true
1972
1982
  },
1973
1983
  ...sharedArgs
1974
1984
  },
@@ -1990,7 +2000,7 @@ const ejectCommandDef = defineCommand({
1990
2000
  eject: args.out || true,
1991
2001
  name: args.name,
1992
2002
  from: args.from,
1993
- noSearch: args["no-search"]
2003
+ noSearch: !args.search
1994
2004
  });
1995
2005
  }
1996
2006
  });
@@ -2210,6 +2220,7 @@ async function exportPortablePrompts(packageSpec, opts) {
2210
2220
  const outputFileList = sectionList.map((s) => SECTION_OUTPUT_FILES[s]).join(", ");
2211
2221
  p.log.info(`Have your agent enhance the skill. Give it this prompt:\n\x1B[2m\x1B[3m Read each prompt file (${promptFiles}) in ${relDir}/, read the\n referenced files, then write your output to the matching file (${outputFileList}).\n When done, run: skilld assemble\x1B[0m`);
2212
2222
  }
2213
- export { writePromptFiles as _, updateCommandDef as a, SKILLD_MARKER_START as c, ensureAgentInstructions as d, ensureGitignore as f, selectSkillSections as g, selectModel as h, syncCommand as i, classifyCachedDoc as l, selectLlmConfig as m, ejectCommandDef as n, DEFAULT_SECTIONS as o, indexResources as p, exportPortablePrompts as r, SKILLD_MARKER_END as s, addCommandDef as t, enhanceSkillWithLLM as u };
2223
+ //#endregion
2224
+ export { selectLlmConfig as a, addCommandDef, ejectCommandDef, indexResources as i, SKILLD_MARKER_START as n, writePromptFiles as o, classifyCachedDoc as r, syncCommand, SKILLD_MARKER_END as t, updateCommandDef };
2214
2225
 
2215
2226
  //# sourceMappingURL=sync.mjs.map