skilld 1.5.0 → 1.5.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/dist/_chunks/agent.mjs +2 -2
- package/dist/_chunks/assemble.mjs +2 -0
- package/dist/_chunks/assemble.mjs.map +1 -1
- package/dist/_chunks/author.mjs +13 -11
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +6 -42
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cache2.mjs +3 -1
- package/dist/_chunks/cache2.mjs.map +1 -1
- package/dist/_chunks/cli-helpers.mjs +31 -102
- package/dist/_chunks/cli-helpers.mjs.map +1 -1
- package/dist/_chunks/cli-helpers2.mjs +12 -0
- package/dist/_chunks/core.mjs +1 -0
- package/dist/_chunks/embedding-cache.mjs +4 -60
- package/dist/_chunks/embedding-cache2.mjs +61 -0
- package/dist/_chunks/embedding-cache2.mjs.map +1 -0
- package/dist/_chunks/index.d.mts +13 -21
- package/dist/_chunks/index.d.mts.map +1 -1
- package/dist/_chunks/index2.d.mts +32 -600
- package/dist/_chunks/index2.d.mts.map +1 -1
- package/dist/_chunks/index3.d.mts +615 -0
- package/dist/_chunks/index3.d.mts.map +1 -0
- package/dist/_chunks/install.mjs +12 -9
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/list.mjs +3 -1
- package/dist/_chunks/list.mjs.map +1 -1
- package/dist/_chunks/lockfile.mjs +14 -1
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/package-json.mjs +107 -0
- package/dist/_chunks/package-json.mjs.map +1 -0
- package/dist/_chunks/pool.mjs +2 -123
- package/dist/_chunks/pool2.mjs +118 -0
- package/dist/_chunks/pool2.mjs.map +1 -0
- package/dist/_chunks/prepare.mjs +34 -78
- package/dist/_chunks/prepare.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +94 -0
- package/dist/_chunks/prepare2.mjs.map +1 -0
- package/dist/_chunks/retriv.mjs +172 -0
- package/dist/_chunks/retriv.mjs.map +1 -0
- package/dist/_chunks/search-interactive.mjs +5 -3
- package/dist/_chunks/search-interactive.mjs.map +1 -1
- package/dist/_chunks/search.mjs +13 -320
- package/dist/_chunks/search2.mjs +319 -0
- package/dist/_chunks/search2.mjs.map +1 -0
- package/dist/_chunks/setup.mjs +4 -2
- package/dist/_chunks/setup.mjs.map +1 -1
- package/dist/_chunks/skills.mjs +1 -1
- package/dist/_chunks/sources.mjs +15 -18
- package/dist/_chunks/sources.mjs.map +1 -1
- package/dist/_chunks/sync-shared.mjs +3 -0
- package/dist/_chunks/sync-shared2.mjs +8 -6
- package/dist/_chunks/sync-shared2.mjs.map +1 -1
- package/dist/_chunks/sync.mjs +7 -7
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/sync2.mjs +22 -0
- package/dist/_chunks/uninstall.mjs +6 -2
- package/dist/_chunks/uninstall.mjs.map +1 -1
- package/dist/_chunks/wizard.mjs +186 -0
- package/dist/_chunks/wizard.mjs.map +1 -0
- package/dist/agent/index.mjs +2 -0
- package/dist/cache/index.d.mts +1 -1
- package/dist/cache/index.mjs +3 -1
- package/dist/cli-entry.d.mts +1 -0
- package/dist/cli-entry.mjs +11 -0
- package/dist/cli-entry.mjs.map +1 -0
- package/dist/cli.mjs +27 -192
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +4 -2
- package/dist/prepare.d.mts +1 -0
- package/dist/prepare.mjs +93 -0
- package/dist/prepare.mjs.map +1 -0
- package/dist/retriv/index.d.mts +2 -46
- package/dist/retriv/index.mjs +2 -171
- package/dist/sources/index.d.mts +1 -1
- package/dist/sources/index.mjs +1 -0
- package/dist/types.d.mts +1 -1
- package/package.json +1 -1
- package/dist/_chunks/embedding-cache.mjs.map +0 -1
- package/dist/_chunks/pool.mjs.map +0 -1
- package/dist/_chunks/search.mjs.map +0 -1
- package/dist/retriv/index.d.mts.map +0 -1
- package/dist/retriv/index.mjs.map +0 -1
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
import * as ofetch$1 from "ofetch";
|
|
2
|
+
|
|
3
|
+
//#region src/sources/blog-releases.d.ts
|
|
4
|
+
interface CachedDoc$1 {
|
|
5
|
+
path: string;
|
|
6
|
+
content: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fetch blog release notes from package presets
|
|
10
|
+
* Filters to only releases matching or older than the installed version
|
|
11
|
+
* Returns CachedDoc[] with releases/blog-{version}.md files
|
|
12
|
+
*/
|
|
13
|
+
declare function fetchBlogReleases(packageName: string, installedVersion: string): Promise<CachedDoc$1[]>;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/sources/crawl.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Website crawl doc source — fetches docs by crawling a URL pattern
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Crawl a URL pattern and return docs as cached doc format.
|
|
21
|
+
* Uses HTTP crawler (no browser needed) with sitemap discovery + glob filtering.
|
|
22
|
+
*
|
|
23
|
+
* @param url - URL with optional glob pattern (e.g. 'https://example.com/docs/**')
|
|
24
|
+
* @param onProgress - Optional progress callback
|
|
25
|
+
* @param maxPages - Max pages to crawl (default 200)
|
|
26
|
+
*/
|
|
27
|
+
declare function fetchCrawledDocs(url: string, onProgress?: (message: string) => void, maxPages?: number): Promise<Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
content: string;
|
|
30
|
+
}>>;
|
|
31
|
+
/** Append glob pattern to a docs URL for crawling */
|
|
32
|
+
declare function toCrawlPattern(docsUrl: string): string;
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/sources/discussions.d.ts
|
|
35
|
+
/**
|
|
36
|
+
* GitHub discussions fetching via gh CLI GraphQL
|
|
37
|
+
* Prioritizes Q&A and Help categories, includes accepted answers
|
|
38
|
+
* Comment quality filtering, smart truncation, noise removal
|
|
39
|
+
*/
|
|
40
|
+
interface DiscussionComment {
|
|
41
|
+
body: string;
|
|
42
|
+
author: string;
|
|
43
|
+
reactions: number;
|
|
44
|
+
isMaintainer?: boolean;
|
|
45
|
+
}
|
|
46
|
+
interface GitHubDiscussion {
|
|
47
|
+
number: number;
|
|
48
|
+
title: string;
|
|
49
|
+
body: string;
|
|
50
|
+
category: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
url: string;
|
|
53
|
+
upvoteCount: number;
|
|
54
|
+
comments: number;
|
|
55
|
+
isMaintainer?: boolean;
|
|
56
|
+
answer?: string;
|
|
57
|
+
topComments: DiscussionComment[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Fetch discussions from a GitHub repo using gh CLI GraphQL.
|
|
61
|
+
* Prioritizes Q&A and Help categories. Includes accepted answer body for answered discussions.
|
|
62
|
+
* Fetches extra comments and scores them for quality.
|
|
63
|
+
*/
|
|
64
|
+
declare function fetchGitHubDiscussions(owner: string, repo: string, limit?: number, releasedAt?: string, fromDate?: string): Promise<GitHubDiscussion[]>;
|
|
65
|
+
/**
|
|
66
|
+
* Format a single discussion as markdown with YAML frontmatter
|
|
67
|
+
*/
|
|
68
|
+
declare function formatDiscussionAsMarkdown(d: GitHubDiscussion): string;
|
|
69
|
+
/**
|
|
70
|
+
* Generate a summary index of all discussions for quick LLM scanning.
|
|
71
|
+
* Groups by category so the LLM can quickly find Q&A vs general discussions.
|
|
72
|
+
*/
|
|
73
|
+
declare function generateDiscussionIndex(discussions: GitHubDiscussion[]): string;
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/sources/docs.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* Docs index generation — creates _INDEX.md for docs directory
|
|
78
|
+
*/
|
|
79
|
+
/**
|
|
80
|
+
* Generate a _INDEX.md for a docs/ directory.
|
|
81
|
+
* Input: array of cached docs with paths like `docs/api/reactivity.md`.
|
|
82
|
+
* Output: markdown index grouped by directory with title + description per page.
|
|
83
|
+
*/
|
|
84
|
+
declare function generateDocsIndex(docs: Array<{
|
|
85
|
+
path: string;
|
|
86
|
+
content: string;
|
|
87
|
+
}>): string;
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/sources/entries.d.ts
|
|
90
|
+
interface EntryFile {
|
|
91
|
+
path: string;
|
|
92
|
+
content: string;
|
|
93
|
+
type: 'types' | 'source';
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Glob .d.ts type definition files from a package directory, skipping junk.
|
|
97
|
+
*/
|
|
98
|
+
declare function resolveEntryFiles(packageDir: string): Promise<EntryFile[]>;
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/sources/git-skills.d.ts
|
|
101
|
+
/**
|
|
102
|
+
* Git repo skill source — parse inputs + fetch pre-authored skills from repos
|
|
103
|
+
*
|
|
104
|
+
* Supports GitHub shorthand (owner/repo), full URLs, SSH, GitLab, and local paths.
|
|
105
|
+
* Skills are pre-authored SKILL.md files — no doc resolution or LLM generation needed.
|
|
106
|
+
*/
|
|
107
|
+
interface GitSkillSource {
|
|
108
|
+
type: 'github' | 'gitlab' | 'git-ssh' | 'local';
|
|
109
|
+
owner?: string;
|
|
110
|
+
repo?: string;
|
|
111
|
+
/** Direct path to a specific skill (from /tree/ref/path URLs) */
|
|
112
|
+
skillPath?: string;
|
|
113
|
+
/** Branch/tag parsed from URL */
|
|
114
|
+
ref?: string;
|
|
115
|
+
/** Absolute path for local sources */
|
|
116
|
+
localPath?: string;
|
|
117
|
+
}
|
|
118
|
+
interface RemoteSkill {
|
|
119
|
+
/** From SKILL.md frontmatter `name` field, or directory name */
|
|
120
|
+
name: string;
|
|
121
|
+
/** From SKILL.md frontmatter `description` field */
|
|
122
|
+
description: string;
|
|
123
|
+
/** Path within repo (e.g., "skills/web-design-guidelines") */
|
|
124
|
+
path: string;
|
|
125
|
+
/** Full SKILL.md content */
|
|
126
|
+
content: string;
|
|
127
|
+
/** Supporting files (scripts/, references/, assets/) */
|
|
128
|
+
files: Array<{
|
|
129
|
+
path: string;
|
|
130
|
+
content: string;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Detect whether an input string is a git skill source.
|
|
135
|
+
* Returns null for npm package names (including scoped @scope/pkg).
|
|
136
|
+
*/
|
|
137
|
+
declare function parseGitSkillInput(input: string): GitSkillSource | null;
|
|
138
|
+
/**
|
|
139
|
+
* Parse name and description from SKILL.md frontmatter.
|
|
140
|
+
*/
|
|
141
|
+
declare function parseSkillFrontmatterName(content: string): {
|
|
142
|
+
name?: string;
|
|
143
|
+
description?: string;
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Fetch skills from a git source. Returns list of discovered skills.
|
|
147
|
+
*/
|
|
148
|
+
declare function fetchGitSkills(source: GitSkillSource, onProgress?: (msg: string) => void): Promise<{
|
|
149
|
+
skills: RemoteSkill[];
|
|
150
|
+
}>;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/sources/types.d.ts
|
|
153
|
+
/**
|
|
154
|
+
* Doc resolver types
|
|
155
|
+
*/
|
|
156
|
+
interface NpmPackageInfo {
|
|
157
|
+
name: string;
|
|
158
|
+
version?: string;
|
|
159
|
+
description?: string;
|
|
160
|
+
homepage?: string;
|
|
161
|
+
repository?: string | {
|
|
162
|
+
type: string;
|
|
163
|
+
url: string;
|
|
164
|
+
directory?: string;
|
|
165
|
+
};
|
|
166
|
+
readme?: string;
|
|
167
|
+
dependencies?: Record<string, string>;
|
|
168
|
+
devDependencies?: Record<string, string>;
|
|
169
|
+
peerDependencies?: Record<string, string>;
|
|
170
|
+
}
|
|
171
|
+
interface ResolvedPackage {
|
|
172
|
+
name: string;
|
|
173
|
+
version?: string;
|
|
174
|
+
/** ISO date string when this version was released */
|
|
175
|
+
releasedAt?: string;
|
|
176
|
+
description?: string;
|
|
177
|
+
/** Production dependencies with version specifiers */
|
|
178
|
+
dependencies?: Record<string, string>;
|
|
179
|
+
/** npm dist-tags with version and release date */
|
|
180
|
+
distTags?: Record<string, {
|
|
181
|
+
version: string;
|
|
182
|
+
releasedAt?: string;
|
|
183
|
+
}>;
|
|
184
|
+
docsUrl?: string;
|
|
185
|
+
llmsUrl?: string;
|
|
186
|
+
readmeUrl?: string;
|
|
187
|
+
repoUrl?: string;
|
|
188
|
+
/** Git docs folder - versioned docs from repo */
|
|
189
|
+
gitDocsUrl?: string;
|
|
190
|
+
/** Git tag/ref used for gitDocsUrl */
|
|
191
|
+
gitRef?: string;
|
|
192
|
+
/** True when gitRef is a branch fallback (no version tag found) */
|
|
193
|
+
gitDocsFallback?: boolean;
|
|
194
|
+
/** URL pattern to crawl for docs */
|
|
195
|
+
crawlUrl?: string;
|
|
196
|
+
}
|
|
197
|
+
interface LocalDependency {
|
|
198
|
+
name: string;
|
|
199
|
+
version: string;
|
|
200
|
+
}
|
|
201
|
+
interface LlmsContent {
|
|
202
|
+
raw: string;
|
|
203
|
+
/** Markdown links extracted from llms.txt */
|
|
204
|
+
links: LlmsLink[];
|
|
205
|
+
}
|
|
206
|
+
interface LlmsLink {
|
|
207
|
+
title: string;
|
|
208
|
+
url: string;
|
|
209
|
+
}
|
|
210
|
+
interface FetchedDoc {
|
|
211
|
+
url: string;
|
|
212
|
+
title: string;
|
|
213
|
+
content: string;
|
|
214
|
+
}
|
|
215
|
+
interface ResolveAttempt {
|
|
216
|
+
source: 'npm' | 'github-docs' | 'github-meta' | 'github-search' | 'llms.txt' | 'readme';
|
|
217
|
+
url?: string;
|
|
218
|
+
status: 'success' | 'not-found' | 'error';
|
|
219
|
+
message?: string;
|
|
220
|
+
}
|
|
221
|
+
interface ResolveResult {
|
|
222
|
+
package: ResolvedPackage | null;
|
|
223
|
+
attempts: ResolveAttempt[];
|
|
224
|
+
/** npm registry version, available even when doc resolution fails */
|
|
225
|
+
registryVersion?: string;
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/sources/github.d.ts
|
|
229
|
+
/** Minimum git-doc file count to prefer over llms.txt */
|
|
230
|
+
declare const MIN_GIT_DOCS = 5;
|
|
231
|
+
/** True when git-docs exist but are too few to be useful (< MIN_GIT_DOCS) */
|
|
232
|
+
declare const isShallowGitDocs: (n: number) => boolean;
|
|
233
|
+
interface GitDocsResult {
|
|
234
|
+
/** URL pattern for fetching docs (use with ref) */
|
|
235
|
+
baseUrl: string;
|
|
236
|
+
/** Git ref (tag) used */
|
|
237
|
+
ref: string;
|
|
238
|
+
/** List of doc file paths relative to repo root */
|
|
239
|
+
files: string[];
|
|
240
|
+
/** Prefix to strip when normalizing paths to docs/ (e.g. 'apps/evalite-docs/src/content/') for nested monorepo docs */
|
|
241
|
+
docsPrefix?: string;
|
|
242
|
+
/** Full repo file tree — only set when discoverDocFiles() heuristic was used (not standard docs/ prefix) */
|
|
243
|
+
allFiles?: string[];
|
|
244
|
+
/** True when ref is a branch (main/master) rather than a version-specific tag */
|
|
245
|
+
fallback?: boolean;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Filter out docs for other frameworks when the package targets a specific one.
|
|
249
|
+
* e.g. @tanstack/vue-query → keep vue + shared docs, exclude react/solid/angular
|
|
250
|
+
* Uses word-boundary matching to catch all path conventions:
|
|
251
|
+
* framework/react/, 0.react/, api/ai-react.md, react-native.mdx, etc.
|
|
252
|
+
*/
|
|
253
|
+
declare function filterFrameworkDocs(files: string[], packageName?: string): string[];
|
|
254
|
+
/**
|
|
255
|
+
* Fetch versioned docs from GitHub repo's docs/ folder.
|
|
256
|
+
* Pass packageName to check doc overrides (e.g. vue -> vuejs/docs).
|
|
257
|
+
*/
|
|
258
|
+
declare function fetchGitDocs(owner: string, repo: string, version: string, packageName?: string, repoUrl?: string): Promise<GitDocsResult | null>;
|
|
259
|
+
/**
|
|
260
|
+
* Validate that discovered git docs are relevant by cross-referencing llms.txt links
|
|
261
|
+
* against the repo file tree. Uses extensionless suffix matching to handle monorepo nesting.
|
|
262
|
+
*
|
|
263
|
+
* Returns { isValid, matchRatio } where isValid = matchRatio >= 0.3
|
|
264
|
+
*/
|
|
265
|
+
declare function validateGitDocsWithLlms(llmsLinks: LlmsLink[], repoFiles: string[]): {
|
|
266
|
+
isValid: boolean;
|
|
267
|
+
matchRatio: number;
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Fetch GitHub repo metadata to get website URL.
|
|
271
|
+
* Pass packageName to check doc overrides first (avoids API call).
|
|
272
|
+
*/
|
|
273
|
+
declare function fetchGitHubRepoMeta(owner: string, repo: string, packageName?: string): Promise<{
|
|
274
|
+
homepage?: string;
|
|
275
|
+
} | null>;
|
|
276
|
+
/**
|
|
277
|
+
* Resolve README URL for a GitHub repo, returns ungh:// pseudo-URL or raw URL
|
|
278
|
+
*/
|
|
279
|
+
declare function fetchReadme(owner: string, repo: string, subdir?: string, ref?: string): Promise<string | null>;
|
|
280
|
+
/**
|
|
281
|
+
* Fetch README content from ungh:// pseudo-URL, file:// URL, or regular URL
|
|
282
|
+
*/
|
|
283
|
+
declare function fetchReadmeContent(url: string): Promise<string | null>;
|
|
284
|
+
/**
|
|
285
|
+
* Resolve a GitHub repo into a ResolvedPackage (no npm registry needed).
|
|
286
|
+
* Fetches repo meta, latest release version, git docs, README, and llms.txt.
|
|
287
|
+
*/
|
|
288
|
+
declare function resolveGitHubRepo(owner: string, repo: string, onProgress?: (msg: string) => void): Promise<ResolvedPackage | null>;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/sources/issues.d.ts
|
|
291
|
+
/**
|
|
292
|
+
* GitHub issues fetching via gh CLI Search API
|
|
293
|
+
* Freshness-weighted scoring, type quotas, comment quality filtering
|
|
294
|
+
* Categorized by labels, noise filtered out, non-technical issues detected
|
|
295
|
+
*/
|
|
296
|
+
type IssueType = 'bug' | 'question' | 'docs' | 'feature' | 'other';
|
|
297
|
+
interface IssueComment {
|
|
298
|
+
body: string;
|
|
299
|
+
author: string;
|
|
300
|
+
reactions: number;
|
|
301
|
+
isMaintainer?: boolean;
|
|
302
|
+
}
|
|
303
|
+
interface GitHubIssue {
|
|
304
|
+
number: number;
|
|
305
|
+
title: string;
|
|
306
|
+
state: string;
|
|
307
|
+
labels: string[];
|
|
308
|
+
body: string;
|
|
309
|
+
createdAt: string;
|
|
310
|
+
url: string;
|
|
311
|
+
reactions: number;
|
|
312
|
+
comments: number;
|
|
313
|
+
type: IssueType;
|
|
314
|
+
topComments: IssueComment[];
|
|
315
|
+
/** Freshness-weighted score: reactions * decay(age) */
|
|
316
|
+
score: number;
|
|
317
|
+
/** For closed issues: version where fix landed, if detectable */
|
|
318
|
+
resolvedIn?: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Check if gh CLI is installed and authenticated (cached)
|
|
322
|
+
*/
|
|
323
|
+
declare function isGhAvailable(): boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Fetch issues from a GitHub repo with freshness-weighted scoring and type quotas.
|
|
326
|
+
* Returns a balanced mix: bugs > questions > docs > other > features.
|
|
327
|
+
* Filters noise, non-technical content, and enriches with quality comments.
|
|
328
|
+
*/
|
|
329
|
+
declare function fetchGitHubIssues(owner: string, repo: string, limit?: number, releasedAt?: string, fromDate?: string): Promise<GitHubIssue[]>;
|
|
330
|
+
/**
|
|
331
|
+
* Format a single issue as markdown with YAML frontmatter
|
|
332
|
+
*/
|
|
333
|
+
declare function formatIssueAsMarkdown(issue: GitHubIssue): string;
|
|
334
|
+
/**
|
|
335
|
+
* Generate a summary index of all issues for quick LLM scanning.
|
|
336
|
+
* Groups by type so the LLM can quickly find bugs vs questions.
|
|
337
|
+
*/
|
|
338
|
+
declare function generateIssueIndex(issues: GitHubIssue[]): string;
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region src/sources/llms.d.ts
|
|
341
|
+
/**
|
|
342
|
+
* Check for llms.txt at a docs URL, returns the llms.txt URL if found
|
|
343
|
+
*/
|
|
344
|
+
declare function fetchLlmsUrl(docsUrl: string): Promise<string | null>;
|
|
345
|
+
/**
|
|
346
|
+
* Fetch and parse llms.txt content
|
|
347
|
+
*/
|
|
348
|
+
declare function fetchLlmsTxt(url: string): Promise<LlmsContent | null>;
|
|
349
|
+
/**
|
|
350
|
+
* Parse markdown links from llms.txt to get .md file paths
|
|
351
|
+
*/
|
|
352
|
+
declare function parseMarkdownLinks(content: string): LlmsLink[];
|
|
353
|
+
declare function downloadLlmsDocs(llmsContent: LlmsContent, baseUrl: string, onProgress?: (url: string, index: number, total: number) => void): Promise<FetchedDoc[]>;
|
|
354
|
+
/**
|
|
355
|
+
* Normalize llms.txt links to relative paths for local access
|
|
356
|
+
* Handles: absolute URLs, root-relative paths, and relative paths
|
|
357
|
+
*/
|
|
358
|
+
declare function normalizeLlmsLinks(content: string, baseUrl?: string): string;
|
|
359
|
+
/**
|
|
360
|
+
* Extract sections from llms-full.txt by URL patterns
|
|
361
|
+
* Format: ---\nurl: /path.md\n---\n<content>\n\n---\nurl: ...
|
|
362
|
+
*/
|
|
363
|
+
declare function extractSections(content: string, patterns: string[]): string | null;
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/sources/npm.d.ts
|
|
366
|
+
/**
|
|
367
|
+
* Search npm registry for packages matching a query.
|
|
368
|
+
* Used as a fallback when direct package lookup fails.
|
|
369
|
+
*/
|
|
370
|
+
declare function searchNpmPackages(query: string, size?: number): Promise<Array<{
|
|
371
|
+
name: string;
|
|
372
|
+
description?: string;
|
|
373
|
+
version: string;
|
|
374
|
+
}>>;
|
|
375
|
+
/**
|
|
376
|
+
* Fetch package info from npm registry
|
|
377
|
+
*/
|
|
378
|
+
declare function fetchNpmPackage(packageName: string): Promise<NpmPackageInfo | null>;
|
|
379
|
+
interface DistTagInfo {
|
|
380
|
+
version: string;
|
|
381
|
+
releasedAt?: string;
|
|
382
|
+
}
|
|
383
|
+
interface NpmRegistryMeta {
|
|
384
|
+
releasedAt?: string;
|
|
385
|
+
distTags?: Record<string, DistTagInfo>;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Fetch release date and dist-tags from npm registry
|
|
389
|
+
*/
|
|
390
|
+
declare function fetchNpmRegistryMeta(packageName: string, version: string): Promise<NpmRegistryMeta>;
|
|
391
|
+
type ResolveStep = 'npm' | 'github-docs' | 'github-meta' | 'github-search' | 'readme' | 'llms.txt' | 'crawl' | 'local';
|
|
392
|
+
interface ResolveOptions {
|
|
393
|
+
/** User's installed version - used to fetch versioned git docs */
|
|
394
|
+
version?: string;
|
|
395
|
+
/** Current working directory - for local readme fallback */
|
|
396
|
+
cwd?: string;
|
|
397
|
+
/** Progress callback - called before each resolution step */
|
|
398
|
+
onProgress?: (step: ResolveStep) => void;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Resolve documentation URL for a package (legacy - returns null on failure)
|
|
402
|
+
*/
|
|
403
|
+
declare function resolvePackageDocs(packageName: string, options?: ResolveOptions): Promise<ResolvedPackage | null>;
|
|
404
|
+
/**
|
|
405
|
+
* Resolve documentation URL for a package with attempt tracking
|
|
406
|
+
*/
|
|
407
|
+
declare function resolvePackageDocsWithAttempts(packageName: string, options?: ResolveOptions): Promise<ResolveResult>;
|
|
408
|
+
/**
|
|
409
|
+
* Parse version specifier, handling protocols like link:, workspace:, npm:, file:
|
|
410
|
+
*/
|
|
411
|
+
declare function parseVersionSpecifier(name: string, version: string, cwd: string): LocalDependency | null;
|
|
412
|
+
/**
|
|
413
|
+
* Resolve the actual installed version of a package by finding its package.json
|
|
414
|
+
* via mlly's resolvePathSync. Works regardless of package manager or version protocol.
|
|
415
|
+
*/
|
|
416
|
+
declare function resolveInstalledVersion(name: string, cwd: string): string | null;
|
|
417
|
+
/**
|
|
418
|
+
* Read package.json dependencies with versions
|
|
419
|
+
*/
|
|
420
|
+
declare function readLocalDependencies(cwd: string): Promise<LocalDependency[]>;
|
|
421
|
+
interface LocalPackageInfo {
|
|
422
|
+
name: string;
|
|
423
|
+
version: string;
|
|
424
|
+
description?: string;
|
|
425
|
+
repoUrl?: string;
|
|
426
|
+
localPath: string;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Read package info from a local path (for link: deps)
|
|
430
|
+
*/
|
|
431
|
+
declare function readLocalPackageInfo(localPath: string): LocalPackageInfo | null;
|
|
432
|
+
/**
|
|
433
|
+
* Resolve docs for a local package (link: dependency)
|
|
434
|
+
*/
|
|
435
|
+
declare function resolveLocalPackageDocs(localPath: string): Promise<ResolvedPackage | null>;
|
|
436
|
+
/**
|
|
437
|
+
* Download and extract npm package tarball to cache directory.
|
|
438
|
+
* Used when the package isn't available in node_modules.
|
|
439
|
+
*
|
|
440
|
+
* Extracts to: ~/.skilld/references/<pkg>@<version>/pkg/
|
|
441
|
+
* Returns the extracted directory path, or null on failure.
|
|
442
|
+
*/
|
|
443
|
+
declare function fetchPkgDist(name: string, version: string): Promise<string | null>;
|
|
444
|
+
/**
|
|
445
|
+
* Fetch just the latest version string from npm (lightweight)
|
|
446
|
+
*/
|
|
447
|
+
declare function fetchLatestVersion(packageName: string): Promise<string | null>;
|
|
448
|
+
/**
|
|
449
|
+
* Get installed skill version from SKILL.md
|
|
450
|
+
*/
|
|
451
|
+
declare function getInstalledSkillVersion(skillDir: string): string | null;
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region src/sources/package-registry.d.ts
|
|
454
|
+
/**
|
|
455
|
+
* Unified package registry — single source of truth for package metadata.
|
|
456
|
+
* Consolidates doc overrides, blog presets, and file patterns.
|
|
457
|
+
* Keyed by GitHub 'owner/repo' (source code repo).
|
|
458
|
+
*/
|
|
459
|
+
interface BlogRelease {
|
|
460
|
+
version: string;
|
|
461
|
+
url: string;
|
|
462
|
+
date: string;
|
|
463
|
+
title?: string;
|
|
464
|
+
}
|
|
465
|
+
interface PackageEntry {
|
|
466
|
+
filePatterns?: string[];
|
|
467
|
+
primary?: boolean;
|
|
468
|
+
/** Extra rules injected into skill generation prompts */
|
|
469
|
+
rules?: string[];
|
|
470
|
+
}
|
|
471
|
+
interface RepoEntry {
|
|
472
|
+
owner: string;
|
|
473
|
+
repo: string;
|
|
474
|
+
/** Separate docs repo name (e.g. 'docs' → owner/docs) */
|
|
475
|
+
docsRepo?: string;
|
|
476
|
+
/** Path prefix to filter markdown files */
|
|
477
|
+
docsPath?: string;
|
|
478
|
+
/** Branch/ref override */
|
|
479
|
+
docsRef?: string;
|
|
480
|
+
/** Homepage URL */
|
|
481
|
+
homepage?: string;
|
|
482
|
+
/** URL pattern to crawl for docs (glob, e.g. 'https://example.com/docs/**') */
|
|
483
|
+
crawlUrl?: string;
|
|
484
|
+
/** Branch to fetch CHANGELOG.md from when installed version is a prerelease (e.g. 'minor' for Vue) */
|
|
485
|
+
prereleaseChangelogRef?: string;
|
|
486
|
+
/** Packages in this repo */
|
|
487
|
+
packages: Record<string, PackageEntry>;
|
|
488
|
+
/** Curated blog release posts */
|
|
489
|
+
blogReleases?: BlogRelease[];
|
|
490
|
+
}
|
|
491
|
+
interface DocOverride {
|
|
492
|
+
owner: string;
|
|
493
|
+
repo: string;
|
|
494
|
+
path: string;
|
|
495
|
+
ref?: string;
|
|
496
|
+
homepage?: string;
|
|
497
|
+
}
|
|
498
|
+
interface BlogPreset {
|
|
499
|
+
packageName: string;
|
|
500
|
+
releases: BlogRelease[];
|
|
501
|
+
}
|
|
502
|
+
declare function getDocOverride(packageName: string): DocOverride | undefined;
|
|
503
|
+
declare function getBlogPreset(packageName: string): BlogPreset | undefined;
|
|
504
|
+
declare function getFilePatterns(packageName: string): string[] | undefined;
|
|
505
|
+
declare function getRepoEntry(repoKey: string): RepoEntry | undefined;
|
|
506
|
+
declare function getRepoKeyForPackage(packageName: string): string | undefined;
|
|
507
|
+
declare function getPrereleaseChangelogRef(packageName: string): string | undefined;
|
|
508
|
+
declare function getCrawlUrl(packageName: string): string | undefined;
|
|
509
|
+
declare function getRelatedPackages(packageName: string): string[];
|
|
510
|
+
//#endregion
|
|
511
|
+
//#region src/sources/releases.d.ts
|
|
512
|
+
/**
|
|
513
|
+
* GitHub release notes fetching via GitHub API (preferred) with ungh.cc fallback
|
|
514
|
+
*/
|
|
515
|
+
interface GitHubRelease {
|
|
516
|
+
id: number;
|
|
517
|
+
tag: string;
|
|
518
|
+
name: string;
|
|
519
|
+
prerelease: boolean;
|
|
520
|
+
createdAt: string;
|
|
521
|
+
publishedAt: string;
|
|
522
|
+
markdown: string;
|
|
523
|
+
}
|
|
524
|
+
interface CachedDoc {
|
|
525
|
+
path: string;
|
|
526
|
+
content: string;
|
|
527
|
+
}
|
|
528
|
+
interface SemVer {
|
|
529
|
+
major: number;
|
|
530
|
+
minor: number;
|
|
531
|
+
patch: number;
|
|
532
|
+
raw: string;
|
|
533
|
+
}
|
|
534
|
+
declare function parseSemver(version: string): SemVer | null;
|
|
535
|
+
/**
|
|
536
|
+
* Check if a version string contains a prerelease suffix (e.g. 6.0.0-beta, 1.2.3-rc.1)
|
|
537
|
+
*/
|
|
538
|
+
declare function isPrerelease(version: string): boolean;
|
|
539
|
+
declare function compareSemver(a: SemVer, b: SemVer): number;
|
|
540
|
+
interface ReleaseIndexOptions {
|
|
541
|
+
releases: GitHubRelease[];
|
|
542
|
+
packageName?: string;
|
|
543
|
+
blogReleases?: Array<{
|
|
544
|
+
version: string;
|
|
545
|
+
title: string;
|
|
546
|
+
date: string;
|
|
547
|
+
}>;
|
|
548
|
+
hasChangelog?: boolean;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Generate a unified summary index of all releases for quick LLM scanning.
|
|
552
|
+
* Includes GitHub releases, blog release posts, and CHANGELOG link.
|
|
553
|
+
*/
|
|
554
|
+
declare function generateReleaseIndex(releasesOrOpts: GitHubRelease[] | ReleaseIndexOptions, packageName?: string): string;
|
|
555
|
+
/**
|
|
556
|
+
* Fetch release notes for a package. Returns CachedDoc[] with releases/{tag}.md files.
|
|
557
|
+
*
|
|
558
|
+
* Strategy:
|
|
559
|
+
* 1. Fetch GitHub releases, filter to package-specific tags for monorepos
|
|
560
|
+
* 2. If no releases found, try CHANGELOG.md as fallback
|
|
561
|
+
*/
|
|
562
|
+
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
|
+
/**
|
|
566
|
+
* Shared utilities for doc resolution
|
|
567
|
+
*/
|
|
568
|
+
declare const $fetch: ofetch$1.$Fetch;
|
|
569
|
+
/**
|
|
570
|
+
* Fetch text content from URL
|
|
571
|
+
*/
|
|
572
|
+
declare function fetchText(url: string): Promise<string | null>;
|
|
573
|
+
/**
|
|
574
|
+
* Fetch text from a GitHub raw URL with auth fallback for private repos.
|
|
575
|
+
* Tries unauthenticated first (fast path), falls back to authenticated
|
|
576
|
+
* request when the repo is known to be private or unauthenticated fails.
|
|
577
|
+
*
|
|
578
|
+
* Only sends auth tokens to raw.githubusercontent.com — returns null for
|
|
579
|
+
* non-GitHub URLs that fail unauthenticated to prevent token leakage.
|
|
580
|
+
*/
|
|
581
|
+
declare function fetchGitHubRaw(url: string): Promise<string | null>;
|
|
582
|
+
/**
|
|
583
|
+
* Verify URL exists and is not HTML (likely 404 page)
|
|
584
|
+
*/
|
|
585
|
+
declare function verifyUrl(url: string): Promise<boolean>;
|
|
586
|
+
/**
|
|
587
|
+
* Check if URL is a GitHub repo URL (not a docs site)
|
|
588
|
+
*/
|
|
589
|
+
declare function isGitHubRepoUrl(url: string): boolean;
|
|
590
|
+
/**
|
|
591
|
+
* Parse owner/repo from GitHub URL
|
|
592
|
+
*/
|
|
593
|
+
declare function parseGitHubUrl(url: string): {
|
|
594
|
+
owner: string;
|
|
595
|
+
repo: string;
|
|
596
|
+
} | null;
|
|
597
|
+
/**
|
|
598
|
+
* Normalize git repo URL to https
|
|
599
|
+
*/
|
|
600
|
+
declare function normalizeRepoUrl(url: string): string;
|
|
601
|
+
/**
|
|
602
|
+
* Parse package spec with optional dist-tag or version: "vue@beta" → { name: "vue", tag: "beta" }
|
|
603
|
+
* Handles scoped packages: "@vue/reactivity@beta" → { name: "@vue/reactivity", tag: "beta" }
|
|
604
|
+
*/
|
|
605
|
+
declare function parsePackageSpec(spec: string): {
|
|
606
|
+
name: string;
|
|
607
|
+
tag?: string;
|
|
608
|
+
};
|
|
609
|
+
/**
|
|
610
|
+
* Extract branch hint from URL fragment (e.g. "git+https://...#main" → "main")
|
|
611
|
+
*/
|
|
612
|
+
declare function extractBranchHint(url: string): string | undefined;
|
|
613
|
+
//#endregion
|
|
614
|
+
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
|
+
//# sourceMappingURL=index3.d.mts.map
|
|
@@ -0,0 +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":";;;UAoBU,WAAA;EACR,IAAA;EACA,OAAA;AAAA;;;;;;iBAkFoB,iBAAA,CACpB,WAAA,UACA,gBAAA,WACC,OAAA,CAAQ,WAAA;;;;;;AAzFV;;;;;AAsFD;;;AAtFC,iBCDqB,gBAAA,CACpB,GAAA,UACA,UAAA,IAAc,OAAA,mBACd,QAAA,YACC,OAAA,CAAQ,KAAA;EAAQ,IAAA;EAAc,OAAA;AAAA;;iBA4HjB,cAAA,CAAe,OAAA;;;;;;AD/H9B;;UEOgB,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;;;;;;iBA8DO,sBAAA,CACpB,KAAA,UACA,IAAA,UACA,KAAA,WACA,UAAA,WACA,QAAA,YACC,OAAA,CAAQ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AUG,SAAA,CAAU,GAAA,WAAc,OAAA;AbuF9C;;;;;;;;AAAA,iBanEsB,cAAA,CAAe,GAAA,WAAc,OAAA;;;;iBAgC7B,SAAA,CAAU,GAAA,WAAc,OAAA;;;;iBAkC9B,eAAA,CAAgB,GAAA;;;;iBAahB,cAAA,CAAe,GAAA;EAAgB,KAAA;EAAe,IAAA;AAAA;;;AZ6B9D;iBYnBgB,gBAAA,CAAiB,GAAA;;;;;iBAejB,gBAAA,CAAiB,IAAA;EAAiB,IAAA;EAAc,GAAA;AAAA;;;;iBAqBhD,iBAAA,CAAkB,GAAA"}
|
package/dist/_chunks/install.mjs
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { a as getModelLabel, r as createToolProgress, s as optimizeDocs } from "./agent.mjs";
|
|
2
2
|
import { a as getRepoCacheDir, i as getPackageDbPath, o as getCacheDir } from "./config.mjs";
|
|
3
|
+
import { i as readPackageJsonSafe } from "./package-json.mjs";
|
|
4
|
+
import { n as linkShippedSkill, r as resolvePkgDir, t as getShippedSkills } from "./prepare.mjs";
|
|
3
5
|
import { n as sanitizeMarkdown } from "./sanitize.mjs";
|
|
4
|
-
import {
|
|
6
|
+
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";
|
|
5
7
|
import "./yaml.mjs";
|
|
6
8
|
import "./markdown.mjs";
|
|
7
|
-
import {
|
|
9
|
+
import { r as createIndex, t as SearchDepsUnavailableError } from "./retriv.mjs";
|
|
8
10
|
import { n as getSharedSkillsDir } from "./shared.mjs";
|
|
9
11
|
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";
|
|
10
12
|
import { a as targets } from "./detect.mjs";
|
|
11
13
|
import { i as linkSkillToAgents, t as generateSkillMd } from "./prompts.mjs";
|
|
12
|
-
import {
|
|
14
|
+
import { O as readConfig, _ as promptForAgent, b as resolveAgent, w as defaultFeatures, x as sharedArgs } from "./cli-helpers.mjs";
|
|
13
15
|
import { i as readLock, n as parsePackages, o as syncLockfilesToDirs, s as writeLock, t as mergeLocks } from "./lockfile.mjs";
|
|
14
16
|
import "./skills.mjs";
|
|
15
17
|
import { l as timedSpinner } from "./formatting.mjs";
|
|
18
|
+
import "./wizard.mjs";
|
|
16
19
|
import { S as writePromptFiles, a as classifyCachedDoc, b as selectLlmConfig, g as indexResources } from "./sync-shared2.mjs";
|
|
17
|
-
import { n as shutdownWorker } from "./
|
|
20
|
+
import { n as shutdownWorker } from "./pool2.mjs";
|
|
18
21
|
import "./sync.mjs";
|
|
19
22
|
import { homedir } from "node:os";
|
|
20
23
|
import { dirname, join } from "pathe";
|
|
21
|
-
import { copyFileSync, existsSync, lstatSync, mkdirSync,
|
|
24
|
+
import { copyFileSync, existsSync, lstatSync, mkdirSync, readdirSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
22
25
|
import * as p from "@clack/prompts";
|
|
23
26
|
import { defineCommand } from "citty";
|
|
24
27
|
//#region src/commands/install.ts
|
|
@@ -444,8 +447,8 @@ async function enhanceRegenerated(pkgName, version, skillDir, model, sections, c
|
|
|
444
447
|
const pkgPath = resolvePkgDir(pkgName, cwd, version);
|
|
445
448
|
let description;
|
|
446
449
|
if (pkgPath) {
|
|
447
|
-
const
|
|
448
|
-
if (
|
|
450
|
+
const pkgJsonResult = readPackageJsonSafe(join(pkgPath, "package.json"));
|
|
451
|
+
if (pkgJsonResult) description = pkgJsonResult.parsed.description;
|
|
449
452
|
}
|
|
450
453
|
let docsType = "docs";
|
|
451
454
|
if (existsSync(join(globalCachePath, "docs", "llms.txt"))) docsType = "llms.txt";
|
|
@@ -502,8 +505,8 @@ function regenerateBaseSkillMd(skillDir, pkgName, version, cwd, allSkillNames, s
|
|
|
502
505
|
const pkgPath = resolvePkgDir(pkgName, cwd, version);
|
|
503
506
|
let description;
|
|
504
507
|
if (pkgPath) {
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
508
|
+
const pkgResult = readPackageJsonSafe(join(pkgPath, "package.json"));
|
|
509
|
+
if (pkgResult) description = pkgResult.parsed.description;
|
|
507
510
|
}
|
|
508
511
|
const globalCachePath = getCacheDir(pkgName, version);
|
|
509
512
|
let docsType = "docs";
|