skilld 1.5.5 → 1.6.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.
- package/README.md +3 -3
- package/dist/_chunks/agent.mjs +0 -77
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/assemble.mjs +0 -17
- package/dist/_chunks/assemble.mjs.map +1 -1
- package/dist/_chunks/author.mjs +0 -18
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +0 -72
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cache2.mjs +84 -17
- package/dist/_chunks/cache2.mjs.map +1 -1
- package/dist/_chunks/cli-helpers.mjs +0 -47
- package/dist/_chunks/cli-helpers.mjs.map +1 -1
- package/dist/_chunks/cli-helpers2.mjs +0 -11
- package/dist/_chunks/config.mjs +0 -27
- package/dist/_chunks/config.mjs.map +1 -1
- package/dist/_chunks/core.mjs +9 -0
- package/dist/_chunks/detect.mjs +29 -226
- package/dist/_chunks/detect.mjs.map +1 -1
- package/dist/_chunks/embedding-cache.mjs +0 -5
- package/dist/_chunks/embedding-cache2.mjs +1 -2
- package/dist/_chunks/formatting.mjs +0 -6
- package/dist/_chunks/formatting.mjs.map +1 -1
- package/dist/_chunks/index.d.mts +0 -10
- package/dist/_chunks/index.d.mts.map +1 -1
- package/dist/_chunks/index2.d.mts +3 -6
- package/dist/_chunks/index2.d.mts.map +1 -1
- package/dist/_chunks/index3.d.mts +2 -31
- package/dist/_chunks/index3.d.mts.map +1 -1
- package/dist/_chunks/install.mjs +0 -15
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/libs/@sinclair/typebox.mjs +0 -444
- package/dist/_chunks/libs/@sinclair/typebox.mjs.map +1 -1
- package/dist/_chunks/list.mjs +0 -16
- package/dist/_chunks/list.mjs.map +1 -1
- package/dist/_chunks/lockfile.mjs +1 -10
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/markdown.mjs +0 -9
- package/dist/_chunks/markdown.mjs.map +1 -1
- package/dist/_chunks/package-json.mjs +0 -25
- package/dist/_chunks/package-json.mjs.map +1 -1
- package/dist/_chunks/pool2.mjs +0 -2
- package/dist/_chunks/pool2.mjs.map +1 -1
- package/dist/_chunks/prepare.mjs +8 -7
- package/dist/_chunks/prepare.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +0 -18
- package/dist/_chunks/prepare2.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +1 -102
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/retriv.mjs +23 -24
- package/dist/_chunks/retriv.mjs.map +1 -1
- package/dist/_chunks/rolldown-runtime.mjs +0 -2
- package/dist/_chunks/sanitize.mjs +0 -78
- package/dist/_chunks/sanitize.mjs.map +1 -1
- package/dist/_chunks/search-interactive.mjs +0 -17
- package/dist/_chunks/search-interactive.mjs.map +1 -1
- package/dist/_chunks/search.mjs +0 -19
- package/dist/_chunks/search2.mjs +3 -12
- package/dist/_chunks/search2.mjs.map +1 -1
- package/dist/_chunks/setup.mjs +0 -13
- package/dist/_chunks/setup.mjs.map +1 -1
- package/dist/_chunks/shared.mjs +0 -10
- package/dist/_chunks/shared.mjs.map +1 -1
- package/dist/_chunks/skills.mjs +2 -2
- package/dist/_chunks/skills.mjs.map +1 -1
- package/dist/_chunks/sources.mjs +3 -453
- package/dist/_chunks/sources.mjs.map +1 -1
- package/dist/_chunks/sync-shared.mjs +0 -16
- package/dist/_chunks/sync-shared2.mjs +0 -42
- package/dist/_chunks/sync-shared2.mjs.map +1 -1
- package/dist/_chunks/sync.mjs +1 -21
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/sync2.mjs +0 -20
- package/dist/_chunks/types.d.mts +0 -2
- package/dist/_chunks/types.d.mts.map +1 -1
- package/dist/_chunks/uninstall.mjs +0 -25
- package/dist/_chunks/uninstall.mjs.map +1 -1
- package/dist/_chunks/validate.mjs +0 -7
- package/dist/_chunks/validate.mjs.map +1 -1
- package/dist/_chunks/wizard.mjs +0 -2
- package/dist/_chunks/wizard.mjs.map +1 -1
- package/dist/_chunks/yaml.mjs +0 -21
- package/dist/_chunks/yaml.mjs.map +1 -1
- package/dist/agent/index.d.mts +0 -24
- package/dist/agent/index.d.mts.map +1 -1
- package/dist/agent/index.mjs +0 -8
- package/dist/cache/index.mjs +0 -2
- package/dist/cli-entry.mjs +0 -6
- package/dist/cli-entry.mjs.map +1 -1
- package/dist/cli.mjs +0 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +0 -6
- package/dist/prepare.mjs +0 -12
- package/dist/prepare.mjs.map +1 -1
- package/dist/retriv/index.mjs +0 -2
- package/dist/retriv/worker.d.mts +0 -3
- package/dist/retriv/worker.d.mts.map +1 -1
- package/dist/retriv/worker.mjs +0 -2
- package/dist/retriv/worker.mjs.map +1 -1
- package/dist/sources/index.mjs +0 -4
- package/package.json +17 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as CACHE_DIR } from "./config.mjs";
|
|
2
|
+
import "./cache.mjs";
|
|
2
3
|
import { join } from "pathe";
|
|
3
4
|
import { rmSync } from "node:fs";
|
|
4
|
-
//#region src/retriv/embedding-cache.ts
|
|
5
5
|
const EMBEDDINGS_DB_PATH = join(CACHE_DIR, "embeddings.db");
|
|
6
6
|
let _db = null;
|
|
7
7
|
async function openDb() {
|
|
@@ -55,7 +55,6 @@ function clearEmbeddingCache() {
|
|
|
55
55
|
closeDb();
|
|
56
56
|
rmSync(EMBEDDINGS_DB_PATH, { force: true });
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { clearEmbeddingCache as n, cachedEmbeddings as t };
|
|
60
59
|
|
|
61
60
|
//# sourceMappingURL=embedding-cache2.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
|
-
//#region src/core/formatting.ts
|
|
3
2
|
function timeAgo(iso) {
|
|
4
3
|
if (!iso) return "";
|
|
5
4
|
const diff = Date.now() - new Date(iso).getTime();
|
|
@@ -21,7 +20,6 @@ function formatDuration(ms) {
|
|
|
21
20
|
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
22
21
|
return `${(ms / 1e3).toFixed(1)}s`;
|
|
23
22
|
}
|
|
24
|
-
/** Spinner wrapper that shows elapsed time via built-in timer indicator */
|
|
25
23
|
function timedSpinner() {
|
|
26
24
|
const spin = p.spinner({ indicator: "timer" });
|
|
27
25
|
return {
|
|
@@ -42,11 +40,9 @@ function highlightTerms(content, terms) {
|
|
|
42
40
|
const pattern = new RegExp(`(${sorted.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "gi");
|
|
43
41
|
return content.replace(pattern, "\x1B[33m$1\x1B[0m");
|
|
44
42
|
}
|
|
45
|
-
/** Format a normalized score (0-100) with color */
|
|
46
43
|
function scoreLabel(pct) {
|
|
47
44
|
return `${pct >= 70 ? "\x1B[32m" : pct >= 40 ? "\x1B[33m" : "\x1B[90m"}${pct}%\x1B[0m`;
|
|
48
45
|
}
|
|
49
|
-
/** Normalize raw cosine similarity scores to 0-100 relative to the best match */
|
|
50
46
|
function normalizeScores(results) {
|
|
51
47
|
const map = /* @__PURE__ */ new Map();
|
|
52
48
|
const max = results.reduce((m, r) => Math.max(m, r.score), 0);
|
|
@@ -68,7 +64,6 @@ function formatSnippet(r, versions, pct) {
|
|
|
68
64
|
` ${highlighted.replace(/\n/g, "\n ")}`
|
|
69
65
|
].join("\n");
|
|
70
66
|
}
|
|
71
|
-
/** Compact 2-line format for interactive search list */
|
|
72
67
|
function formatCompactSnippet(r, cols) {
|
|
73
68
|
const entityStr = r.entities?.length ? r.entities.map((e) => e.signature || e.name).join(", ") : "";
|
|
74
69
|
const scopeStr = r.scope?.length ? `${r.scope.map((e) => e.name).join(".")} → ` : "";
|
|
@@ -82,7 +77,6 @@ function formatCompactSnippet(r, cols) {
|
|
|
82
77
|
preview: firstLine.length > maxPreview ? `${firstLine.slice(0, maxPreview - 1)}…` : firstLine
|
|
83
78
|
};
|
|
84
79
|
}
|
|
85
|
-
//#endregion
|
|
86
80
|
export { highlightTerms as a, timeAgo as c, formatSource as i, timedSpinner as l, formatDuration as n, normalizeScores as o, formatSnippet as r, scoreLabel as s, formatCompactSnippet as t };
|
|
87
81
|
|
|
88
82
|
//# sourceMappingURL=formatting.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.mjs","names":[],"sources":["../../src/core/formatting.ts"],"sourcesContent":["import type { SearchSnippet } from '../retriv/index.ts'\nimport type { ProjectState } from './skills.ts'\nimport * as p from '@clack/prompts'\n\nexport function timeAgo(iso?: string): string {\n if (!iso)\n return ''\n const diff = Date.now() - new Date(iso).getTime()\n const days = Math.floor(diff / 86400000)\n if (days <= 0)\n return 'today'\n if (days === 1)\n return '1d ago'\n if (days < 7)\n return `${days}d ago`\n if (days < 30)\n return `${Math.floor(days / 7)}w ago`\n return `${Math.floor(days / 30)}mo ago`\n}\n\nexport function formatSource(source?: string): string {\n if (!source)\n return ''\n if (source === 'shipped')\n return 'shipped'\n if (source.includes('llms.txt'))\n return 'llms.txt'\n if (source.includes('github.com'))\n return source.replace(/https?:\\/\\/github\\.com\\//, '')\n return source\n}\n\nexport function formatDuration(ms: number): string {\n if (ms < 1000)\n return `${Math.round(ms)}ms`\n return `${(ms / 1000).toFixed(1)}s`\n}\n\n/** Spinner wrapper that shows elapsed time via built-in timer indicator */\nexport function timedSpinner() {\n const spin = p.spinner({ indicator: 'timer' })\n return {\n start(msg: string) {\n spin.start(msg)\n },\n message(msg: string) {\n spin.message(msg)\n },\n stop(msg: string) {\n spin.stop(msg)\n },\n }\n}\n\nexport function formatSkillStatus(state: ProjectState): void {\n const { missing, outdated, synced } = state\n\n if (synced.length > 0)\n p.log.success(`${synced.length} synced`)\n if (outdated.length > 0)\n p.log.warn(`${outdated.length} outdated: ${outdated.map(s => s.name).join(', ')}`)\n if (missing.length > 0)\n p.log.info(`${missing.length} missing: ${missing.slice(0, 5).join(', ')}${missing.length > 5 ? '...' : ''}`)\n}\n\nexport function highlightTerms(content: string, terms: string[]): string {\n if (terms.length === 0)\n return content\n // Sort by length desc to match longer terms first\n const sorted = terms.toSorted((a, b) => b.length - a.length)\n const pattern = new RegExp(`(${sorted.map(t => t.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('|')})`, 'gi')\n return content.replace(pattern, '\\x1B[33m$1\\x1B[0m')\n}\n\n/** Format a normalized score (0-100) with color */\nexport function scoreLabel(pct: number): string {\n const color = pct >= 70 ? '\\x1B[32m' : pct >= 40 ? '\\x1B[33m' : '\\x1B[90m'\n return `${color}${pct}%\\x1B[0m`\n}\n\n/** Normalize raw cosine similarity scores to 0-100 relative to the best match */\nexport function normalizeScores(results: SearchSnippet[]): Map<SearchSnippet, number> {\n const map = new Map<SearchSnippet, number>()\n const max = results.reduce((m, r) => Math.max(m, r.score), 0)\n for (const r of results)\n map.set(r, max > 0 ? Math.round((r.score / max) * 100) : 0)\n return map\n}\n\nexport function formatSnippet(r: SearchSnippet, versions?: Map<string, string>, pct?: number): string {\n const refPath = `.claude/skills/${r.package}/.skilld/${r.source}`\n const lineRange = r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`\n const score = pct != null ? scoreLabel(pct) : `\\x1B[90m${r.score.toFixed(2)}\\x1B[0m`\n const version = versions?.get(r.package)\n const pkgLabel = version ? `${r.package}@${version}` : r.package\n\n const scopeStr = r.scope?.length ? `${r.scope.map(e => e.name).join('.')} → ` : ''\n const entityStr = r.entities?.map(e => e.signature || `${e.type} ${e.name}`).join(', ')\n const highlighted = highlightTerms(r.content, r.highlights)\n\n return [\n `${pkgLabel} ${score}${entityStr ? ` \\x1B[36m${scopeStr}${entityStr}\\x1B[0m` : ''}`,\n `\\x1B[90m${refPath}:${lineRange}\\x1B[0m`,\n ` ${highlighted.replace(/\\n/g, '\\n ')}`,\n ].join('\\n')\n}\n\n/** Compact 2-line format for interactive search list */\nexport function formatCompactSnippet(r: SearchSnippet, cols: number): { title: string, path: string, preview: string } {\n const entityStr = r.entities?.length\n ? r.entities.map(e => e.signature || e.name).join(', ')\n : ''\n const scopeStr = r.scope?.length ? `${r.scope.map(e => e.name).join('.')} → ` : ''\n const title = entityStr ? `${scopeStr}${entityStr}` : r.source.split('/').pop() || r.source\n\n const refPath = `.claude/skills/${r.package}/.skilld/${r.source}`\n const lineRange = r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`\n const path = `${refPath}:${lineRange}`\n\n // First meaningful line as preview (skip empty, frontmatter delimiters, headings-only)\n const maxPreview = cols - 6\n const firstLine = r.content.split('\\n').find(l => l.trim() && l.trim() !== '---' && !/^#+\\s*$/.test(l.trim())) || ''\n const preview = firstLine.length > maxPreview ? `${firstLine.slice(0, maxPreview - 1)}…` : firstLine\n\n return { title, path, preview }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"formatting.mjs","names":[],"sources":["../../src/core/formatting.ts"],"sourcesContent":["import type { SearchSnippet } from '../retriv/index.ts'\nimport type { ProjectState } from './skills.ts'\nimport * as p from '@clack/prompts'\n\nexport function timeAgo(iso?: string): string {\n if (!iso)\n return ''\n const diff = Date.now() - new Date(iso).getTime()\n const days = Math.floor(diff / 86400000)\n if (days <= 0)\n return 'today'\n if (days === 1)\n return '1d ago'\n if (days < 7)\n return `${days}d ago`\n if (days < 30)\n return `${Math.floor(days / 7)}w ago`\n return `${Math.floor(days / 30)}mo ago`\n}\n\nexport function formatSource(source?: string): string {\n if (!source)\n return ''\n if (source === 'shipped')\n return 'shipped'\n if (source.includes('llms.txt'))\n return 'llms.txt'\n if (source.includes('github.com'))\n return source.replace(/https?:\\/\\/github\\.com\\//, '')\n return source\n}\n\nexport function formatDuration(ms: number): string {\n if (ms < 1000)\n return `${Math.round(ms)}ms`\n return `${(ms / 1000).toFixed(1)}s`\n}\n\n/** Spinner wrapper that shows elapsed time via built-in timer indicator */\nexport function timedSpinner() {\n const spin = p.spinner({ indicator: 'timer' })\n return {\n start(msg: string) {\n spin.start(msg)\n },\n message(msg: string) {\n spin.message(msg)\n },\n stop(msg: string) {\n spin.stop(msg)\n },\n }\n}\n\nexport function formatSkillStatus(state: ProjectState): void {\n const { missing, outdated, synced } = state\n\n if (synced.length > 0)\n p.log.success(`${synced.length} synced`)\n if (outdated.length > 0)\n p.log.warn(`${outdated.length} outdated: ${outdated.map(s => s.name).join(', ')}`)\n if (missing.length > 0)\n p.log.info(`${missing.length} missing: ${missing.slice(0, 5).join(', ')}${missing.length > 5 ? '...' : ''}`)\n}\n\nexport function highlightTerms(content: string, terms: string[]): string {\n if (terms.length === 0)\n return content\n // Sort by length desc to match longer terms first\n const sorted = terms.toSorted((a, b) => b.length - a.length)\n const pattern = new RegExp(`(${sorted.map(t => t.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')).join('|')})`, 'gi')\n return content.replace(pattern, '\\x1B[33m$1\\x1B[0m')\n}\n\n/** Format a normalized score (0-100) with color */\nexport function scoreLabel(pct: number): string {\n const color = pct >= 70 ? '\\x1B[32m' : pct >= 40 ? '\\x1B[33m' : '\\x1B[90m'\n return `${color}${pct}%\\x1B[0m`\n}\n\n/** Normalize raw cosine similarity scores to 0-100 relative to the best match */\nexport function normalizeScores(results: SearchSnippet[]): Map<SearchSnippet, number> {\n const map = new Map<SearchSnippet, number>()\n const max = results.reduce((m, r) => Math.max(m, r.score), 0)\n for (const r of results)\n map.set(r, max > 0 ? Math.round((r.score / max) * 100) : 0)\n return map\n}\n\nexport function formatSnippet(r: SearchSnippet, versions?: Map<string, string>, pct?: number): string {\n const refPath = `.claude/skills/${r.package}/.skilld/${r.source}`\n const lineRange = r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`\n const score = pct != null ? scoreLabel(pct) : `\\x1B[90m${r.score.toFixed(2)}\\x1B[0m`\n const version = versions?.get(r.package)\n const pkgLabel = version ? `${r.package}@${version}` : r.package\n\n const scopeStr = r.scope?.length ? `${r.scope.map(e => e.name).join('.')} → ` : ''\n const entityStr = r.entities?.map(e => e.signature || `${e.type} ${e.name}`).join(', ')\n const highlighted = highlightTerms(r.content, r.highlights)\n\n return [\n `${pkgLabel} ${score}${entityStr ? ` \\x1B[36m${scopeStr}${entityStr}\\x1B[0m` : ''}`,\n `\\x1B[90m${refPath}:${lineRange}\\x1B[0m`,\n ` ${highlighted.replace(/\\n/g, '\\n ')}`,\n ].join('\\n')\n}\n\n/** Compact 2-line format for interactive search list */\nexport function formatCompactSnippet(r: SearchSnippet, cols: number): { title: string, path: string, preview: string } {\n const entityStr = r.entities?.length\n ? r.entities.map(e => e.signature || e.name).join(', ')\n : ''\n const scopeStr = r.scope?.length ? `${r.scope.map(e => e.name).join('.')} → ` : ''\n const title = entityStr ? `${scopeStr}${entityStr}` : r.source.split('/').pop() || r.source\n\n const refPath = `.claude/skills/${r.package}/.skilld/${r.source}`\n const lineRange = r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`\n const path = `${refPath}:${lineRange}`\n\n // First meaningful line as preview (skip empty, frontmatter delimiters, headings-only)\n const maxPreview = cols - 6\n const firstLine = r.content.split('\\n').find(l => l.trim() && l.trim() !== '---' && !/^#+\\s*$/.test(l.trim())) || ''\n const preview = firstLine.length > maxPreview ? `${firstLine.slice(0, maxPreview - 1)}…` : firstLine\n\n return { title, path, preview }\n}\n"],"mappings":";AAIA,SAAgB,QAAQ,KAAsB;AAC5C,KAAI,CAAC,IACH,QAAO;CACT,MAAM,OAAO,KAAK,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC,SAAS;CACjD,MAAM,OAAO,KAAK,MAAM,OAAO,MAAS;AACxC,KAAI,QAAQ,EACV,QAAO;AACT,KAAI,SAAS,EACX,QAAO;AACT,KAAI,OAAO,EACT,QAAO,GAAG,KAAK;AACjB,KAAI,OAAO,GACT,QAAO,GAAG,K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AAK,IAAI,EAAE;CAIrF,MAAM,OAAO,GAFG,kBAAkB,EAAE,QAAQ,WAAW,EAAE,SAEjC,GADN,EAAE,cAAc,EAAE,UAAU,IAAI,EAAE,cAAc,IAAI,EAAE,UAAU,GAAG,EAAE;CAIvF,MAAM,aAAa,OAAO;CAC1B,MAAM,YAAY,EAAE,QAAQ,MAAM,KAAK,CAAC,MAAK,MAAK,EAAE,MAAM,IAAI,EAAE,MAAM,KAAK,SAAS,CAAC,UAAU,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI;AAGlH,QAAO;EAAE;EAAO;EAAM,SAFN,UAAU,SAAS,aAAa,GAAG,UAAU,MAAM,GAAG,aAAa,EAAE,CAAC,KAAK;EAE5D"}
|
package/dist/_chunks/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/cache/config.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Cache configuration
|
|
4
3
|
*/
|
|
@@ -12,8 +11,6 @@ declare const REPOS_DIR: string;
|
|
|
12
11
|
declare function getRepoCacheDir(owner: string, repo: string): string;
|
|
13
12
|
/** Get search DB path for a specific package@version */
|
|
14
13
|
declare function getPackageDbPath(name: string, version: string): string;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/cache/types.d.ts
|
|
17
14
|
/**
|
|
18
15
|
* Cache types
|
|
19
16
|
*/
|
|
@@ -32,8 +29,6 @@ interface CachedDoc {
|
|
|
32
29
|
path: string;
|
|
33
30
|
content: string;
|
|
34
31
|
}
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/core/prepare.d.ts
|
|
37
32
|
/** Resolve package directory: node_modules first, then global cache */
|
|
38
33
|
declare function resolvePkgDir(name: string, cwd: string, version?: string): string | null;
|
|
39
34
|
interface ShippedSkill {
|
|
@@ -44,8 +39,6 @@ interface ShippedSkill {
|
|
|
44
39
|
declare function getShippedSkills(name: string, cwd: string, version?: string): ShippedSkill[];
|
|
45
40
|
/** Create symlink from skills dir to shipped skill dir */
|
|
46
41
|
declare function linkShippedSkill(baseDir: string, skillName: string, targetDir: string): void;
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/cache/storage.d.ts
|
|
49
42
|
/**
|
|
50
43
|
* Check if package is cached at given version
|
|
51
44
|
*/
|
|
@@ -135,8 +128,6 @@ declare function clearAllCache(): number;
|
|
|
135
128
|
* Returns paths like ./.skilld/pkg/README.md, ./.skilld/docs/api.md
|
|
136
129
|
*/
|
|
137
130
|
declare function listReferenceFiles(skillDir: string, maxDepth?: number): string[];
|
|
138
|
-
//#endregion
|
|
139
|
-
//#region src/cache/version.d.ts
|
|
140
131
|
/**
|
|
141
132
|
* Version utilities
|
|
142
133
|
*/
|
|
@@ -153,6 +144,5 @@ declare function getCacheKey(name: string, version: string): string;
|
|
|
153
144
|
* Validates name/version to prevent path traversal.
|
|
154
145
|
*/
|
|
155
146
|
declare function getCacheDir(name: string, version: string): string;
|
|
156
|
-
//#endregion
|
|
157
147
|
export { REPOS_DIR as A, linkShippedSkill as C, CachedPackage as D, CachedDoc as E, getRepoCacheDir as M, CACHE_DIR as O, getShippedSkills as S, CacheConfig as T, readCachedSection as _, clearCache as a, writeToRepoCache as b, hasShippedDocs as c, linkPkg as d, linkPkgNamed as f, readCachedDocs as g, listReferenceFiles as h, clearAllCache as i, getPackageDbPath as j, REFERENCES_DIR as k, isCached as l, listCached as m, getCacheKey as n, ensureCacheDir as o, linkRepoCachedDir as p, getVersionKey as r, getPkgKeyFiles as s, getCacheDir as t, linkCachedDir as u, writeSections as v, resolvePkgDir as w, ShippedSkill as x, writeToCache as y };
|
|
158
148
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/cache/config.ts","../../src/cache/types.ts","../../src/core/prepare.ts","../../src/cache/storage.ts","../../src/cache/version.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/cache/config.ts","../../src/c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A,CAAc,IAAA,UAAc,OAAA,UAAiB,QAAA,EAAU,KAAA;EAAQ,IAAA;EAAc,OAAA;AAAA;;;;iBAY7E,iBAAA,CAAkB,IAAA,UAAc,OAAA,UAAiB,IAAA;AAAA,iBAOjD,cAAA,CAAe,IAAA,UAAc,GAAA,UAAa,OAAA;;AAnN1D;;iBAoOgB,UAAA,CAAA,GAAc,aAAA;;;AA7N9B;iBA4OgB,cAAA,CAAe,IAAA,UAAc,OAAA,WAAkB,SAAA;;;;iBA+B/C,UAAA,CAAW,IAAA,UAAc,OAAA;;;;iBAYzB,aAAA,CAAA;;;;;iBAeA,kBAAA,CAAmB,QAAA,UAAkB,QAAA;AHnUrD;;;;;AAGA;iBIIgB,aAAA,CAAc,OAAA;;;;iBAOd,WAAA,CAAY,IAAA,UAAc,OAAA;;;;;iBAQ1B,WAAA,CAAY,IAAA,UAAc,OAAA"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { c as SearchResult, l as SearchSnippet, n as Document, r as IndexConfig, s as SearchOptions } from "./types.mjs";
|
|
2
|
-
import * as retriv from "retriv";
|
|
3
|
-
|
|
4
|
-
//#region src/retriv/index.d.ts
|
|
2
|
+
import * as _$retriv from "retriv";
|
|
5
3
|
type RetrivInstance = Awaited<ReturnType<typeof getDb>>;
|
|
6
4
|
declare class SearchDepsUnavailableError extends Error {
|
|
7
|
-
constructor(cause: unknown);
|
|
5
|
+
constructor(cause: unknown, message?: string);
|
|
8
6
|
}
|
|
9
|
-
declare function getDb(config: Pick<IndexConfig, 'dbPath'>): Promise<retriv.SearchProvider & {
|
|
7
|
+
declare function getDb(config: Pick<IndexConfig, 'dbPath'>): Promise<_$retriv.SearchProvider & {
|
|
10
8
|
_testSetCategories?: (cats: string[]) => void;
|
|
11
9
|
}>;
|
|
12
10
|
/**
|
|
@@ -42,6 +40,5 @@ declare function searchSnippets(query: string, config: IndexConfig, options?: Se
|
|
|
42
40
|
declare function openPool(dbPaths: string[]): Promise<Map<string, RetrivInstance>>;
|
|
43
41
|
declare function searchPooled(query: string, pool: Map<string, RetrivInstance>, options?: SearchOptions): Promise<SearchSnippet[]>;
|
|
44
42
|
declare function closePool(pool: Map<string, RetrivInstance>): Promise<void>;
|
|
45
|
-
//#endregion
|
|
46
43
|
export { getDb as a, removeFromIndex as c, searchSnippets as d, createIndexDirect as i, search as l, closePool as n, listIndexIds as o, createIndex as r, openPool as s, SearchDepsUnavailableError as t, searchPooled as u };
|
|
47
44
|
//# sourceMappingURL=index2.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.d.mts","names":[],"sources":["../../src/retriv/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index2.d.mts","names":[],"sources":["../../src/retriv/index.ts"],"mappings":";;KAKK,cAAA,GAAiB,OAAA,CAAQ,UAAA,QAAkB,KAAA;AAAA,cAEnC,0BAAA,SAAmC,KAAA;cAClC,KAAA,WAAgB,OAAA;AAAA;AAAA,iBAqCR,KAAA,CAAM,MAAA,EAAQ,IAAA,CAAK,WAAA,cAAsB,OAAA,CAAvB,QAAA,CAAuB,cAAA;;;;;;;iBA0CzC,iBAAA,CACpB,SAAA,EAAW,QAAA,IACX,MAAA,EAAQ,WAAA;EAAgB,SAAA;AAAA,IACvB,OAAA;AAnFH;;;;AAAA,iBA+FsB,WAAA,CACpB,SAAA,EAAW,QAAA,IACX,MAAA,EAAQ,WAAA;EAAgB,SAAA;AAAA,IACvB,OAAA;;;;AA5DH;;;iBAwEsB,YAAA,CACpB,MAAA,EAAQ,IAAA,CAAK,WAAA,cACZ,OAAA;;;;iBAiBmB,eAAA,CACpB,GAAA,YACA,MAAA,EAAQ,IAAA,CAAK,WAAA,cACZ,OAAA;AAAA,iBAQmB,MAAA,CACpB,KAAA,UACA,MAAA,EAAQ,WAAA,EACR,OAAA,GAAS,aAAA,GACR,OAAA,CAAQ,YAAA;;;;iBAqBW,cAAA,CACpB,KAAA,UACA,MAAA,EAAQ,WAAA,EACR,OAAA,GAAS,aAAA,GACR,OAAA,CAAQ,aAAA;AAAA,iBA2BW,QAAA,CAAS,OAAA,aAAoB,OAAA,CAAQ,GAAA,SAAY,cAAA;AAAA,iBASjD,YAAA,CACpB,KAAA,UACA,IAAA,EAAM,GAAA,SAAY,cAAA,GAClB,OAAA,GAAS,aAAA,GACR,OAAA,CAAQ,aAAA;AAAA,iBAkCW,SAAA,CAAU,IAAA,EAAM,GAAA,SAAY,cAAA,IAAkB,OAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import * as ofetch
|
|
2
|
-
|
|
3
|
-
//#region src/sources/blog-releases.d.ts
|
|
1
|
+
import * as _$ofetch from "ofetch";
|
|
4
2
|
interface CachedDoc$1 {
|
|
5
3
|
path: string;
|
|
6
4
|
content: string;
|
|
@@ -11,8 +9,6 @@ interface CachedDoc$1 {
|
|
|
11
9
|
* Returns CachedDoc[] with releases/blog-{version}.md files
|
|
12
10
|
*/
|
|
13
11
|
declare function fetchBlogReleases(packageName: string, installedVersion: string): Promise<CachedDoc$1[]>;
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/sources/crawl.d.ts
|
|
16
12
|
/**
|
|
17
13
|
* Website crawl doc source — fetches docs by crawling a URL pattern
|
|
18
14
|
*/
|
|
@@ -30,8 +26,6 @@ declare function fetchCrawledDocs(url: string, onProgress?: (message: string) =>
|
|
|
30
26
|
}>>;
|
|
31
27
|
/** Append glob pattern to a docs URL for crawling */
|
|
32
28
|
declare function toCrawlPattern(docsUrl: string): string;
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/sources/discussions.d.ts
|
|
35
29
|
/**
|
|
36
30
|
* GitHub discussions fetching via gh CLI GraphQL
|
|
37
31
|
* Prioritizes Q&A and Help categories, includes accepted answers
|
|
@@ -71,8 +65,6 @@ declare function formatDiscussionAsMarkdown(d: GitHubDiscussion): string;
|
|
|
71
65
|
* Groups by category so the LLM can quickly find Q&A vs general discussions.
|
|
72
66
|
*/
|
|
73
67
|
declare function generateDiscussionIndex(discussions: GitHubDiscussion[]): string;
|
|
74
|
-
//#endregion
|
|
75
|
-
//#region src/sources/docs.d.ts
|
|
76
68
|
/**
|
|
77
69
|
* Docs index generation — creates _INDEX.md for docs directory
|
|
78
70
|
*/
|
|
@@ -85,8 +77,6 @@ declare function generateDocsIndex(docs: Array<{
|
|
|
85
77
|
path: string;
|
|
86
78
|
content: string;
|
|
87
79
|
}>): string;
|
|
88
|
-
//#endregion
|
|
89
|
-
//#region src/sources/entries.d.ts
|
|
90
80
|
interface EntryFile {
|
|
91
81
|
path: string;
|
|
92
82
|
content: string;
|
|
@@ -96,8 +86,6 @@ interface EntryFile {
|
|
|
96
86
|
* Glob .d.ts type definition files from a package directory, skipping junk.
|
|
97
87
|
*/
|
|
98
88
|
declare function resolveEntryFiles(packageDir: string): Promise<EntryFile[]>;
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/sources/git-skills.d.ts
|
|
101
89
|
/**
|
|
102
90
|
* Git repo skill source — parse inputs + fetch pre-authored skills from repos
|
|
103
91
|
*
|
|
@@ -148,8 +136,6 @@ declare function parseSkillFrontmatterName(content: string): {
|
|
|
148
136
|
declare function fetchGitSkills(source: GitSkillSource, onProgress?: (msg: string) => void): Promise<{
|
|
149
137
|
skills: RemoteSkill[];
|
|
150
138
|
}>;
|
|
151
|
-
//#endregion
|
|
152
|
-
//#region src/sources/types.d.ts
|
|
153
139
|
/**
|
|
154
140
|
* Doc resolver types
|
|
155
141
|
*/
|
|
@@ -224,8 +210,6 @@ interface ResolveResult {
|
|
|
224
210
|
/** npm registry version, available even when doc resolution fails */
|
|
225
211
|
registryVersion?: string;
|
|
226
212
|
}
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/sources/github.d.ts
|
|
229
213
|
/** Minimum git-doc file count to prefer over llms.txt */
|
|
230
214
|
declare const MIN_GIT_DOCS = 5;
|
|
231
215
|
/** True when git-docs exist but are too few to be useful (< MIN_GIT_DOCS) */
|
|
@@ -286,8 +270,6 @@ declare function fetchReadmeContent(url: string): Promise<string | null>;
|
|
|
286
270
|
* Fetches repo meta, latest release version, git docs, README, and llms.txt.
|
|
287
271
|
*/
|
|
288
272
|
declare function resolveGitHubRepo(owner: string, repo: string, onProgress?: (msg: string) => void): Promise<ResolvedPackage | null>;
|
|
289
|
-
//#endregion
|
|
290
|
-
//#region src/sources/issues.d.ts
|
|
291
273
|
/**
|
|
292
274
|
* GitHub issues fetching via gh CLI Search API
|
|
293
275
|
* Freshness-weighted scoring, type quotas, comment quality filtering
|
|
@@ -336,8 +318,6 @@ declare function formatIssueAsMarkdown(issue: GitHubIssue): string;
|
|
|
336
318
|
* Groups by type so the LLM can quickly find bugs vs questions.
|
|
337
319
|
*/
|
|
338
320
|
declare function generateIssueIndex(issues: GitHubIssue[]): string;
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region src/sources/llms.d.ts
|
|
341
321
|
/**
|
|
342
322
|
* Check for llms.txt at a docs URL, returns the llms.txt URL if found
|
|
343
323
|
*/
|
|
@@ -361,8 +341,6 @@ declare function normalizeLlmsLinks(content: string, baseUrl?: string): string;
|
|
|
361
341
|
* Format: ---\nurl: /path.md\n---\n<content>\n\n---\nurl: ...
|
|
362
342
|
*/
|
|
363
343
|
declare function extractSections(content: string, patterns: string[]): string | null;
|
|
364
|
-
//#endregion
|
|
365
|
-
//#region src/sources/npm.d.ts
|
|
366
344
|
/**
|
|
367
345
|
* Search npm registry for packages matching a query.
|
|
368
346
|
* Used as a fallback when direct package lookup fails.
|
|
@@ -449,8 +427,6 @@ declare function fetchLatestVersion(packageName: string): Promise<string | null>
|
|
|
449
427
|
* Get installed skill version from SKILL.md
|
|
450
428
|
*/
|
|
451
429
|
declare function getInstalledSkillVersion(skillDir: string): string | null;
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region src/sources/package-registry.d.ts
|
|
454
430
|
/**
|
|
455
431
|
* Unified package registry — single source of truth for package metadata.
|
|
456
432
|
* Consolidates doc overrides, blog presets, and file patterns.
|
|
@@ -507,8 +483,6 @@ declare function getRepoKeyForPackage(packageName: string): string | undefined;
|
|
|
507
483
|
declare function getPrereleaseChangelogRef(packageName: string): string | undefined;
|
|
508
484
|
declare function getCrawlUrl(packageName: string): string | undefined;
|
|
509
485
|
declare function getRelatedPackages(packageName: string): string[];
|
|
510
|
-
//#endregion
|
|
511
|
-
//#region src/sources/releases.d.ts
|
|
512
486
|
/**
|
|
513
487
|
* GitHub release notes fetching via GitHub API (preferred) with ungh.cc fallback
|
|
514
488
|
*/
|
|
@@ -560,12 +534,10 @@ declare function generateReleaseIndex(releasesOrOpts: GitHubRelease[] | ReleaseI
|
|
|
560
534
|
* 2. If no releases found, try CHANGELOG.md as fallback
|
|
561
535
|
*/
|
|
562
536
|
declare function fetchReleaseNotes(owner: string, repo: string, installedVersion: string, gitRef?: string, packageName?: string, fromDate?: string, changelogRef?: string): Promise<CachedDoc[]>;
|
|
563
|
-
//#endregion
|
|
564
|
-
//#region src/sources/utils.d.ts
|
|
565
537
|
/**
|
|
566
538
|
* Shared utilities for doc resolution
|
|
567
539
|
*/
|
|
568
|
-
declare const $fetch: ofetch
|
|
540
|
+
declare const $fetch: _$ofetch.$Fetch;
|
|
569
541
|
/**
|
|
570
542
|
* Fetch text content from URL
|
|
571
543
|
*/
|
|
@@ -610,6 +582,5 @@ declare function parsePackageSpec(spec: string): {
|
|
|
610
582
|
* Extract branch hint from URL fragment (e.g. "git+https://...#main" → "main")
|
|
611
583
|
*/
|
|
612
584
|
declare function extractBranchHint(url: string): string | undefined;
|
|
613
|
-
//#endregion
|
|
614
585
|
export { formatIssueAsMarkdown as $, ResolveOptions as A, formatDiscussionAsMarkdown as At, resolveInstalledVersion as B, getDocOverride as C, parseGitSkillInput as Ct, getRepoEntry as D, generateDocsIndex as Dt, getRelatedPackages as E, resolveEntryFiles as Et, fetchPkgDist as F, downloadLlmsDocs as G, resolvePackageDocs as H, getInstalledSkillVersion as I, fetchLlmsUrl as J, extractSections as K, parseVersionSpecifier as L, fetchLatestVersion as M, fetchCrawledDocs as Mt, fetchNpmPackage as N, toCrawlPattern as Nt, getRepoKeyForPackage as O, GitHubDiscussion as Ot, fetchNpmRegistryMeta as P, fetchBlogReleases as Pt, fetchGitHubIssues as Q, readLocalDependencies as R, getCrawlUrl as S, fetchGitSkills as St, getPrereleaseChangelogRef as T, EntryFile as Tt, resolvePackageDocsWithAttempts as U, resolveLocalPackageDocs as V, searchNpmPackages as W, parseMarkdownLinks as X, normalizeLlmsLinks as Y, GitHubIssue as Z, parseSemver as _, ResolveAttempt as _t, isGitHubRepoUrl as a, fetchGitHubRepoMeta as at, DocOverride as b, GitSkillSource as bt, parsePackageSpec as c, filterFrameworkDocs as ct, ReleaseIndexOptions as d, validateGitDocsWithLlms as dt, generateIssueIndex as et, SemVer as f, FetchedDoc as ft, isPrerelease as g, NpmPackageInfo as gt, generateReleaseIndex as h, LocalDependency as ht, fetchText as i, fetchGitDocs as it, ResolveStep as j, generateDiscussionIndex as jt, LocalPackageInfo as k, fetchGitHubDiscussions as kt, verifyUrl as l, isShallowGitDocs as lt, fetchReleaseNotes as m, LlmsLink as mt, extractBranchHint as n, GitDocsResult as nt, normalizeRepoUrl as o, fetchReadme as ot, compareSemver as p, LlmsContent as pt, fetchLlmsTxt as q, fetchGitHubRaw as r, MIN_GIT_DOCS as rt, parseGitHubUrl as s, fetchReadmeContent as st, $fetch as t, isGhAvailable as tt, GitHubRelease as u, resolveGitHubRepo as ut, BlogPreset as v, ResolveResult as vt, getFilePatterns as w, parseSkillFrontmatterName as wt, getBlogPreset as x, RemoteSkill as xt, BlogRelease as y, ResolvedPackage as yt, readLocalPackageInfo as z };
|
|
615
586
|
//# sourceMappingURL=index3.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index3.d.mts","names":[],"sources":["../../src/sources/blog-releases.ts","../../src/sources/crawl.ts","../../src/sources/discussions.ts","../../src/sources/docs.ts","../../src/sources/entries.ts","../../src/sources/git-skills.ts","../../src/sources/types.ts","../../src/sources/github.ts","../../src/sources/issues.ts","../../src/sources/llms.ts","../../src/sources/npm.ts","../../src/sources/package-registry.ts","../../src/sources/releases.ts","../../src/sources/utils.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index3.d.mts","names":[],"sources":["../../src/sources/blog-releases.ts","../../src/sources/crawl.ts","../../src/sources/discussions.ts","../../src/sources/docs.ts","../../src/sources/entries.ts","../../src/sources/git-skills.ts","../../src/sources/types.ts","../../src/sources/github.ts","../../src/sources/issues.ts","../../src/sources/llms.ts","../../src/sources/npm.ts","../../src/sources/package-registry.ts","../../src/sources/releases.ts","../../src/sources/utils.ts"],"mappings":";UAqBU,WAAA;EACR,IAAA;EACA,OAAA;AAAA;;;;ACNF;;iBDwFsB,iBAAA,CACpB,WAAA,UACA,gBAAA,WACC,OAAA,CAAQ,WAAA;;;AAzFV;;;;;AAsFD;;;;iBCxFsB,gBAAA,CACpB,GAAA,UACA,UAAA,IAAc,OAAA,mBACd,QAAA,YACC,OAAA,CAAQ,KAAA;EAAQ,IAAA;EAAc,OAAA;AAAA;;iBA4HjB,cAAA,CAAe,OAAA;;;AD9H9B;;;UEMgB,iBAAA;EACf,IAAA;EACA,MAAA;EACA,SAAA;EACA,YAAA;AAAA;AAAA,UAGe,gBAAA;EACf,MAAA;EACA,KAAA;EACA,IAAA;EACA,QAAA;EACA,SAAA;EACA,GAAA;EACA,WAAA;EACA,QAAA;EACA,YAAA;EACA,MAAA;EACA,WAAA,EAAa,iBAAA;AAAA;;;;ADsGf;;iBCxCsB,sBAAA,CACpB,KAAA,UACA,IAAA,UACA,KAAA,WACA,UAAA,WACA,QAAA,YACC,OAAA,CAAQ,gBAAA;;;;iBAwGK,0BAAA,CAA2B,CAAA,EAAG,gBAAA;;;;;iBAuC9B,uBAAA,CAAwB,WAAA,EAAa,gBAAA;;;AF3OpD;;;;;AAsFD;iBG9FgB,iBAAA,CAAkB,IAAA,EAAM,KAAA;EAAQ,IAAA;EAAc,OAAA;AAAA;AAA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gB,KAAA;EAAe,IAAA;AAAA;;;;iBAU9C,gBAAA,CAAiB,GAAA;;AXrGjC;;;iBWoHgB,gBAAA,CAAiB,IAAA;EAAiB,IAAA;EAAc,GAAA;AAAA;;;;iBAqBhD,iBAAA,CAAkB,GAAA"}
|
package/dist/_chunks/install.mjs
CHANGED
|
@@ -3,20 +3,15 @@ import { i as readPackageJsonSafe } from "./package-json.mjs";
|
|
|
3
3
|
import { n as linkShippedSkill, r as resolvePkgDir, t as getShippedSkills } from "./prepare.mjs";
|
|
4
4
|
import { n as sanitizeMarkdown } from "./sanitize.mjs";
|
|
5
5
|
import { a as hasShippedDocs, f as listReferenceFiles, g as writeToCache, i as getPkgKeyFiles, l as linkPkgNamed, o as isCached, p as readCachedDocs, r as ensureCacheDir } from "./cache.mjs";
|
|
6
|
-
import "./yaml.mjs";
|
|
7
|
-
import "./markdown.mjs";
|
|
8
6
|
import { r as createIndex, t as SearchDepsUnavailableError } from "./retriv.mjs";
|
|
9
7
|
import { n as getSharedSkillsDir } from "./shared.mjs";
|
|
10
8
|
import { C as downloadLlmsDocs, D as normalizeLlmsLinks, M as resolveEntryFiles, T as fetchLlmsTxt, Z as fetchGitHubRaw, b as isShallowGitDocs, d as resolvePackageDocs, h as fetchGitDocs, k as fetchGitSkills, tt as parseGitHubUrl, v as fetchReadmeContent, y as filterFrameworkDocs } from "./sources.mjs";
|
|
11
9
|
import { a as targets } from "./detect.mjs";
|
|
12
10
|
import { i as linkSkillToAgents, t as generateSkillMd } from "./prompts.mjs";
|
|
13
11
|
import { a as getModelLabel, r as createToolProgress, s as optimizeDocs } from "./agent.mjs";
|
|
14
|
-
import "./libs/@sinclair/typebox.mjs";
|
|
15
12
|
import { O as readConfig, _ as promptForAgent, b as resolveAgent, w as defaultFeatures, x as sharedArgs } from "./cli-helpers.mjs";
|
|
16
13
|
import { i as readLock, n as parsePackages, o as syncLockfilesToDirs, s as writeLock, t as mergeLocks } from "./lockfile.mjs";
|
|
17
|
-
import "./skills.mjs";
|
|
18
14
|
import { l as timedSpinner } from "./formatting.mjs";
|
|
19
|
-
import "./wizard.mjs";
|
|
20
15
|
import { S as writePromptFiles, a as classifyCachedDoc, b as selectLlmConfig, g as indexResources } from "./sync-shared2.mjs";
|
|
21
16
|
import { n as shutdownWorker } from "./pool2.mjs";
|
|
22
17
|
import "./sync.mjs";
|
|
@@ -25,7 +20,6 @@ import { dirname, join } from "pathe";
|
|
|
25
20
|
import { copyFileSync, existsSync, lstatSync, mkdirSync, readdirSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
26
21
|
import * as p from "@clack/prompts";
|
|
27
22
|
import { defineCommand } from "citty";
|
|
28
|
-
//#region src/commands/install.ts
|
|
29
23
|
async function installCommand(opts) {
|
|
30
24
|
const cwd = process.cwd();
|
|
31
25
|
const agent = targets[opts.agent];
|
|
@@ -364,7 +358,6 @@ async function installCommand(opts) {
|
|
|
364
358
|
await shutdownWorker();
|
|
365
359
|
p.outro("Install complete");
|
|
366
360
|
}
|
|
367
|
-
/** Copy SKILL.md from another agent's skill dir if one exists */
|
|
368
361
|
function copyFromExistingAgent(skillDir, name, allSkillsDirs) {
|
|
369
362
|
const targetMd = join(skillDir, "SKILL.md");
|
|
370
363
|
if (existsSync(targetMd)) return false;
|
|
@@ -379,7 +372,6 @@ function copyFromExistingAgent(skillDir, name, allSkillsDirs) {
|
|
|
379
372
|
}
|
|
380
373
|
return false;
|
|
381
374
|
}
|
|
382
|
-
/** Try to recover original package name from sanitized name + source */
|
|
383
375
|
function unsanitizeName(sanitized, source) {
|
|
384
376
|
if (source?.includes("ungh://")) {
|
|
385
377
|
const match = source.match(/ungh:\/\/([^/]+)\/(.+)/);
|
|
@@ -392,7 +384,6 @@ function unsanitizeName(sanitized, source) {
|
|
|
392
384
|
if (sanitized.startsWith("vueuse-")) return `@vueuse/${sanitized.slice(7)}`;
|
|
393
385
|
return sanitized;
|
|
394
386
|
}
|
|
395
|
-
/** Create pkg symlink inside references dir (links to entire package or cached dist) */
|
|
396
387
|
function linkPkgSymlink(referencesDir, name, cwd, version) {
|
|
397
388
|
const pkgPath = resolvePkgDir(name, cwd, version);
|
|
398
389
|
if (!pkgPath) return;
|
|
@@ -400,14 +391,12 @@ function linkPkgSymlink(referencesDir, name, cwd, version) {
|
|
|
400
391
|
if (existsSync(pkgLink)) unlinkSync(pkgLink);
|
|
401
392
|
symlinkSync(pkgPath, pkgLink, "junction");
|
|
402
393
|
}
|
|
403
|
-
/** Check if cache only has docs/README.md (pkg/ already has this) */
|
|
404
394
|
function isReadmeOnly(cacheDir) {
|
|
405
395
|
const docsDir = join(cacheDir, "docs");
|
|
406
396
|
if (!existsSync(docsDir)) return false;
|
|
407
397
|
const files = readdirSync(docsDir);
|
|
408
398
|
return files.length === 1 && files[0] === "README.md";
|
|
409
399
|
}
|
|
410
|
-
/** Check if package ships its own docs folder */
|
|
411
400
|
function pkgHasShippedDocs(name, cwd, version) {
|
|
412
401
|
const pkgPath = resolvePkgDir(name, cwd, version);
|
|
413
402
|
if (!pkgPath) return false;
|
|
@@ -418,7 +407,6 @@ function pkgHasShippedDocs(name, cwd, version) {
|
|
|
418
407
|
]) if (existsSync(join(pkgPath, candidate))) return true;
|
|
419
408
|
return false;
|
|
420
409
|
}
|
|
421
|
-
/** Run LLM enhancement on a regenerated SKILL.md */
|
|
422
410
|
async function enhanceRegenerated(pkgName, version, skillDir, model, sections, customPrompt, packages) {
|
|
423
411
|
const llmLog = p.taskLog({
|
|
424
412
|
title: `Agent exploring ${pkgName}`,
|
|
@@ -502,7 +490,6 @@ const installCommandDef = defineCommand({
|
|
|
502
490
|
});
|
|
503
491
|
}
|
|
504
492
|
});
|
|
505
|
-
/** Regenerate base SKILL.md from local metadata if missing */
|
|
506
493
|
function regenerateBaseSkillMd(skillDir, pkgName, version, cwd, allSkillNames, source, packages) {
|
|
507
494
|
const skillMdPath = join(skillDir, "SKILL.md");
|
|
508
495
|
if (existsSync(skillMdPath)) return false;
|
|
@@ -542,7 +529,6 @@ function regenerateBaseSkillMd(skillDir, pkgName, version, cwd, allSkillNames, s
|
|
|
542
529
|
writeFileSync(skillMdPath, content);
|
|
543
530
|
return true;
|
|
544
531
|
}
|
|
545
|
-
/** Check if .skilld/ has broken symlinks or is missing expected references from global cache */
|
|
546
532
|
function hasStaleReferences(referencesPath, pkgName, version, features) {
|
|
547
533
|
for (const entry of readdirSync(referencesPath)) {
|
|
548
534
|
const entryPath = join(referencesPath, entry);
|
|
@@ -560,7 +546,6 @@ function hasStaleReferences(referencesPath, pkgName, version, features) {
|
|
|
560
546
|
for (const [name, shouldExist] of expected) if (shouldExist && !existsSync(join(referencesPath, name))) return true;
|
|
561
547
|
return false;
|
|
562
548
|
}
|
|
563
|
-
//#endregion
|
|
564
549
|
export { installCommandDef };
|
|
565
550
|
|
|
566
551
|
//# sourceMappingURL=install.mjs.map
|