skilld 1.7.0 → 1.7.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 +14 -5
- package/dist/_chunks/agent.mjs.map +1 -1
- package/dist/_chunks/assemble.mjs +1 -1
- package/dist/_chunks/author.mjs +6 -9
- package/dist/_chunks/author.mjs.map +1 -1
- package/dist/_chunks/cache.mjs +11 -1
- package/dist/_chunks/cache.mjs.map +1 -1
- package/dist/_chunks/cli-helpers.mjs +1 -1
- package/dist/_chunks/core.mjs +1 -1
- package/dist/_chunks/index.d.mts +4 -1
- package/dist/_chunks/index.d.mts.map +1 -1
- package/dist/_chunks/index3.d.mts +3 -1
- package/dist/_chunks/index3.d.mts.map +1 -1
- package/dist/_chunks/install.mjs +523 -85
- package/dist/_chunks/install.mjs.map +1 -1
- package/dist/_chunks/list.mjs +1 -1
- package/dist/_chunks/lockfile.mjs +4 -1
- package/dist/_chunks/lockfile.mjs.map +1 -1
- package/dist/_chunks/prefix.mjs +5 -5
- package/dist/_chunks/prefix.mjs.map +1 -1
- package/dist/_chunks/prepare2.mjs +4 -4
- package/dist/_chunks/prepare2.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +3 -142
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/search-helpers.mjs +2 -2
- package/dist/_chunks/search-interactive.mjs +1 -1
- package/dist/_chunks/search.mjs +1 -1
- package/dist/_chunks/shared.mjs +463 -1
- package/dist/_chunks/shared.mjs.map +1 -1
- package/dist/_chunks/skill.mjs +329 -0
- package/dist/_chunks/skill.mjs.map +1 -0
- package/dist/_chunks/skills.mjs +3 -3
- package/dist/_chunks/sources.mjs +7 -3
- package/dist/_chunks/sources.mjs.map +1 -1
- package/dist/_chunks/sync-registry.mjs +4 -4
- package/dist/_chunks/sync-registry.mjs.map +1 -1
- package/dist/_chunks/sync-shared2.mjs +9 -10
- package/dist/_chunks/sync-shared2.mjs.map +1 -1
- package/dist/_chunks/sync.mjs +48 -62
- package/dist/_chunks/sync.mjs.map +1 -1
- package/dist/_chunks/uninstall.mjs +2 -2
- package/dist/_chunks/upload.mjs +1 -1
- package/dist/_chunks/validate.mjs +1 -1
- package/dist/_chunks/wizard.mjs +1 -1
- package/dist/agent/index.d.mts +3 -1
- package/dist/agent/index.d.mts.map +1 -1
- package/dist/agent/index.mjs +4 -4
- package/dist/cache/index.d.mts +2 -2
- package/dist/cache/index.mjs +2 -2
- package/dist/cli.mjs +5 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/prepare.mjs +1 -1
- package/dist/sources/index.d.mts +2 -2
- package/dist/sources/index.mjs +3 -3
- package/dist/types.d.mts +2 -2
- package/package.json +6 -5
- package/dist/THIRD-PARTY-LICENSES.md +0 -38
- package/dist/_chunks/formatting.mjs +0 -82
- package/dist/_chunks/formatting.mjs.map +0 -1
- package/dist/_chunks/install2.mjs +0 -554
- package/dist/_chunks/install2.mjs.map +0 -1
- package/dist/_chunks/libs/@sinclair/typebox.mjs +0 -2304
- package/dist/_chunks/libs/@sinclair/typebox.mjs.map +0 -1
- package/dist/_chunks/package-registry.mjs +0 -465
- package/dist/_chunks/package-registry.mjs.map +0 -1
- package/dist/_chunks/rolldown-runtime.mjs +0 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as CACHE_DIR, D as CacheConfig, O as CachedDoc, a as clearCache, g as listCached, i as clearAllCache, j as REFERENCES_DIR, k as CachedPackage, n as getCacheKey, o as ensureCacheDir, r as getVersionKey, t as getCacheDir, u as isCached, v as readCachedDocs, x as writeToCache } from "./_chunks/index.mjs";
|
|
2
2
|
import { c as SearchResult, l as SearchSnippet, n as Document, o as SearchFilter, r as IndexConfig, s as SearchOptions } from "./_chunks/types.mjs";
|
|
3
3
|
import { d as searchSnippets, l as search, r as createIndex } from "./_chunks/index2.mjs";
|
|
4
|
-
import { At as
|
|
4
|
+
import { At as LlmsLink, Ft as ResolvedPackage, J as fetchLlmsTxt, K as downloadLlmsDocs, Mt as NpmPackageInfo, Ot as FetchedDoc, P as fetchNpmPackage, U as resolvePackageDocs, X as normalizeLlmsLinks, Z as parseMarkdownLinks, ct as fetchReadmeContent, jt as LocalDependency, kt as LlmsContent, z as readLocalDependencies } from "./_chunks/index3.mjs";
|
|
5
5
|
export { CACHE_DIR, type CacheConfig, type CachedDoc, type CachedPackage, type Document, type FetchedDoc, type IndexConfig, type LlmsContent, type LlmsLink, type LocalDependency, type NpmPackageInfo, REFERENCES_DIR, type ResolvedPackage, type SearchFilter, type SearchOptions, type SearchResult, type SearchSnippet, clearAllCache, clearCache, createIndex, downloadLlmsDocs, ensureCacheDir, fetchLlmsTxt, fetchNpmPackage, fetchReadmeContent, getCacheDir, getCacheKey, getVersionKey, isCached, listCached, normalizeLlmsLinks, parseMarkdownLinks, readCachedDocs, readLocalDependencies, resolvePackageDocs, search, searchSnippets, writeToCache };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as REFERENCES_DIR, i as CACHE_DIR, n as getCacheKey, r as getVersionKey, t as getCacheDir } from "./_chunks/version.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { h as readCachedDocs, n as clearCache, p as listCached, r as ensureCacheDir, s as isCached, t as clearAllCache, v as writeToCache } from "./_chunks/cache.mjs";
|
|
3
3
|
import { d as searchSnippets, l as search, r as createIndex } from "./_chunks/retriv.mjs";
|
|
4
4
|
import { I as fetchLlmsTxt, P as downloadLlmsDocs, R as normalizeLlmsLinks, d as resolvePackageDocs, k as fetchReadmeContent, n as fetchNpmPackage, s as readLocalDependencies, z as parseMarkdownLinks } from "./_chunks/sources.mjs";
|
|
5
5
|
export { CACHE_DIR, REFERENCES_DIR, clearAllCache, clearCache, createIndex, downloadLlmsDocs, ensureCacheDir, fetchLlmsTxt, fetchNpmPackage, fetchReadmeContent, getCacheDir, getCacheKey, getVersionKey, isCached, listCached, normalizeLlmsLinks, parseMarkdownLinks, readCachedDocs, readLocalDependencies, resolvePackageDocs, search, searchSnippets, writeToCache };
|
package/dist/prepare.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { i as restorePkgSymlink, n as linkShippedSkill, t as getShippedSkills } from "./_chunks/prepare.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { a as readLock } from "./_chunks/lockfile.mjs";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { execFileSync } from "node:child_process";
|
package/dist/sources/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { $fetch, BlogPreset, BlogRelease, DocOverride, EntryFile, FetchedDoc, GitDocsResult, GitHubDiscussion, GitHubIssue, GitHubRelease, GitSkillSource, LlmsContent, LlmsLink, LocalDependency, LocalPackageInfo, MIN_GIT_DOCS, NpmPackageInfo, ReleaseIndexOptions, RemoteSkill, ResolveAttempt, ResolveOptions, ResolveResult, ResolveStep, ResolvedPackage, SemVer, compareSemver, downloadLlmsDocs, extractBranchHint, extractSections, fetchBlogReleases, fetchCrawledDocs, fetchGitDocs, fetchGitHubDiscussions, fetchGitHubIssues, fetchGitHubRaw, fetchGitHubRepoMeta, fetchGitSkills, fetchLatestVersion, fetchLlmsTxt, fetchLlmsUrl, fetchNpmPackage, fetchNpmRegistryMeta, fetchPkgDist, fetchReadme, fetchReadmeContent, fetchReleaseNotes, fetchText, filterFrameworkDocs, formatDiscussionAsMarkdown, formatIssueAsMarkdown, generateDiscussionIndex, generateDocsIndex, generateIssueIndex, generateReleaseIndex, getBlogPreset, getCrawlUrl, getDocOverride, getFilePatterns, getInstalledSkillVersion, getPrereleaseChangelogRef, getRelatedPackages, getRepoEntry, getRepoKeyForPackage, isGhAvailable, isGitHubRepoUrl, isPrerelease, isShallowGitDocs, normalizeLlmsLinks, normalizeRepoUrl, parseGitHubUrl, parseGitSkillInput, parseMarkdownLinks, parsePackageSpec, parseSemver, parseSkillFrontmatterName, parseVersionSpecifier, readLocalDependencies, readLocalPackageInfo, resolveCrateDocsWithAttempts, resolveEntryFiles, resolveGitHubRepo, resolveInstalledVersion, resolveLocalPackageDocs, resolvePackageDocs, resolvePackageDocsWithAttempts, searchNpmPackages, toCrawlPattern, validateGitDocsWithLlms, verifyUrl };
|
|
1
|
+
import { $ as fetchGitHubIssues, A as LocalPackageInfo, At as LlmsLink, B as readLocalPackageInfo, C as getCrawlUrl, Ct as formatDiscussionAsMarkdown, D as getRelatedPackages, Dt as resolveCrateDocsWithAttempts, E as getPrereleaseChangelogRef, Et as toCrawlPattern, F as fetchNpmRegistryMeta, Ft as ResolvedPackage, G as searchNpmPackages, H as resolveLocalPackageDocs, I as fetchPkgDist, It as fetchBlogReleases, J as fetchLlmsTxt, K as downloadLlmsDocs, L as getInstalledSkillVersion, M as ResolveStep, Mt as NpmPackageInfo, N as fetchLatestVersion, Nt as ResolveAttempt, O as getRepoEntry, Ot as FetchedDoc, P as fetchNpmPackage, Pt as ResolveResult, Q as GitHubIssue, R as parseVersionSpecifier, S as getBlogPreset, St as fetchGitHubDiscussions, T as getFilePatterns, Tt as fetchCrawledDocs, U as resolvePackageDocs, V as resolveInstalledVersion, W as resolvePackageDocsWithAttempts, X as normalizeLlmsLinks, Y as fetchLlmsUrl, Z as parseMarkdownLinks, _ as isPrerelease, _t as parseSkillFrontmatterName, a as isGitHubRepoUrl, at as fetchGitDocs, b as BlogRelease, bt as generateDocsIndex, c as parseGitHubUrl, ct as fetchReadmeContent, d as GitHubRelease, dt as resolveGitHubRepo, et as formatIssueAsMarkdown, f as ReleaseIndexOptions, ft as validateGitDocsWithLlms, g as generateReleaseIndex, gt as parseGitSkillInput, h as fetchReleaseNotes, ht as fetchGitSkills, i as fetchText, it as MIN_GIT_DOCS, j as ResolveOptions, jt as LocalDependency, k as getRepoKeyForPackage, kt as LlmsContent, l as parsePackageSpec, lt as filterFrameworkDocs, m as compareSemver, mt as RemoteSkill, n as extractBranchHint, nt as isGhAvailable, o as normalizeRepoUrl, ot as fetchGitHubRepoMeta, p as SemVer, pt as GitSkillSource, q as extractSections, r as fetchGitHubRaw, rt as GitDocsResult, s as parseGitHubRepoSlug, st as fetchReadme, t as $fetch, tt as generateIssueIndex, u as verifyUrl, ut as isShallowGitDocs, v as parseSemver, vt as EntryFile, w as getDocOverride, wt as generateDiscussionIndex, x as DocOverride, xt as GitHubDiscussion, y as BlogPreset, yt as resolveEntryFiles, z as readLocalDependencies } from "../_chunks/index3.mjs";
|
|
2
|
+
export { $fetch, BlogPreset, BlogRelease, DocOverride, EntryFile, FetchedDoc, GitDocsResult, GitHubDiscussion, GitHubIssue, GitHubRelease, GitSkillSource, LlmsContent, LlmsLink, LocalDependency, LocalPackageInfo, MIN_GIT_DOCS, NpmPackageInfo, ReleaseIndexOptions, RemoteSkill, ResolveAttempt, ResolveOptions, ResolveResult, ResolveStep, ResolvedPackage, SemVer, compareSemver, downloadLlmsDocs, extractBranchHint, extractSections, fetchBlogReleases, fetchCrawledDocs, fetchGitDocs, fetchGitHubDiscussions, fetchGitHubIssues, fetchGitHubRaw, fetchGitHubRepoMeta, fetchGitSkills, fetchLatestVersion, fetchLlmsTxt, fetchLlmsUrl, fetchNpmPackage, fetchNpmRegistryMeta, fetchPkgDist, fetchReadme, fetchReadmeContent, fetchReleaseNotes, fetchText, filterFrameworkDocs, formatDiscussionAsMarkdown, formatIssueAsMarkdown, generateDiscussionIndex, generateDocsIndex, generateIssueIndex, generateReleaseIndex, getBlogPreset, getCrawlUrl, getDocOverride, getFilePatterns, getInstalledSkillVersion, getPrereleaseChangelogRef, getRelatedPackages, getRepoEntry, getRepoKeyForPackage, isGhAvailable, isGitHubRepoUrl, isPrerelease, isShallowGitDocs, normalizeLlmsLinks, normalizeRepoUrl, parseGitHubRepoSlug, parseGitHubUrl, parseGitSkillInput, parseMarkdownLinks, parsePackageSpec, parseSemver, parseSkillFrontmatterName, parseVersionSpecifier, readLocalDependencies, readLocalPackageInfo, resolveCrateDocsWithAttempts, resolveEntryFiles, resolveGitHubRepo, resolveInstalledVersion, resolveLocalPackageDocs, resolvePackageDocs, resolvePackageDocsWithAttempts, searchNpmPackages, toCrawlPattern, validateGitDocsWithLlms, verifyUrl };
|
package/dist/sources/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { $ as fetchText, A as filterFrameworkDocs, B as fetchGitHubIssues, C as toCrawlPattern, D as fetchGitHubRepoMeta, E as fetchGitDocs, F as extractSections, G as compareSemver, H as generateIssueIndex, I as fetchLlmsTxt, J as isPrerelease, K as fetchReleaseNotes, L as fetchLlmsUrl, M as resolveGitHubRepo, N as validateGitDocsWithLlms, O as fetchReadme, P as downloadLlmsDocs, Q as fetchGitHubRaw, R as normalizeLlmsLinks, S as fetchCrawledDocs, T as MIN_GIT_DOCS, U as isGhAvailable, V as formatIssueAsMarkdown, W as fetchBlogReleases, X as $fetch, Y as parseSemver, Z as extractBranchHint, _ as resolveEntryFiles, a as getInstalledSkillVersion, b as formatDiscussionAsMarkdown, c as readLocalPackageInfo, d as resolvePackageDocs, et as isGitHubRepoUrl, f as resolvePackageDocsWithAttempts, g as parseSkillFrontmatterName, h as parseGitSkillInput, i as fetchPkgDist, it as
|
|
3
|
-
export { $fetch, MIN_GIT_DOCS, compareSemver, downloadLlmsDocs, extractBranchHint, extractSections, fetchBlogReleases, fetchCrawledDocs, fetchGitDocs, fetchGitHubDiscussions, fetchGitHubIssues, fetchGitHubRaw, fetchGitHubRepoMeta, fetchGitSkills, fetchLatestVersion, fetchLlmsTxt, fetchLlmsUrl, fetchNpmPackage, fetchNpmRegistryMeta, fetchPkgDist, fetchReadme, fetchReadmeContent, fetchReleaseNotes, fetchText, filterFrameworkDocs, formatDiscussionAsMarkdown, formatIssueAsMarkdown, generateDiscussionIndex, generateDocsIndex, generateIssueIndex, generateReleaseIndex, getBlogPreset, getCrawlUrl, getDocOverride, getFilePatterns, getInstalledSkillVersion, getPrereleaseChangelogRef, getRelatedPackages, getRepoEntry, getRepoKeyForPackage, isGhAvailable, isGitHubRepoUrl, isPrerelease, isShallowGitDocs, normalizeLlmsLinks, normalizeRepoUrl, parseGitHubUrl, parseGitSkillInput, parseMarkdownLinks, parsePackageSpec, parseSemver, parseSkillFrontmatterName, parseVersionSpecifier, readLocalDependencies, readLocalPackageInfo, resolveCrateDocsWithAttempts, resolveEntryFiles, resolveGitHubRepo, resolveInstalledVersion, resolveLocalPackageDocs, resolvePackageDocs, resolvePackageDocsWithAttempts, searchNpmPackages, toCrawlPattern, validateGitDocsWithLlms, verifyUrl };
|
|
1
|
+
import { c as getBlogPreset, d as getFilePatterns, g as getRepoKeyForPackage, h as getRepoEntry, l as getCrawlUrl, m as getRelatedPackages, p as getPrereleaseChangelogRef, u as getDocOverride } from "../_chunks/shared.mjs";
|
|
2
|
+
import { $ as fetchText, A as filterFrameworkDocs, B as fetchGitHubIssues, C as toCrawlPattern, D as fetchGitHubRepoMeta, E as fetchGitDocs, F as extractSections, G as compareSemver, H as generateIssueIndex, I as fetchLlmsTxt, J as isPrerelease, K as fetchReleaseNotes, L as fetchLlmsUrl, M as resolveGitHubRepo, N as validateGitDocsWithLlms, O as fetchReadme, P as downloadLlmsDocs, Q as fetchGitHubRaw, R as normalizeLlmsLinks, S as fetchCrawledDocs, T as MIN_GIT_DOCS, U as isGhAvailable, V as formatIssueAsMarkdown, W as fetchBlogReleases, X as $fetch, Y as parseSemver, Z as extractBranchHint, _ as resolveEntryFiles, a as getInstalledSkillVersion, at as verifyUrl, b as formatDiscussionAsMarkdown, c as readLocalPackageInfo, d as resolvePackageDocs, et as isGitHubRepoUrl, f as resolvePackageDocsWithAttempts, g as parseSkillFrontmatterName, h as parseGitSkillInput, i as fetchPkgDist, it as parsePackageSpec, j as isShallowGitDocs, k as fetchReadmeContent, l as resolveInstalledVersion, m as fetchGitSkills, n as fetchNpmPackage, nt as parseGitHubRepoSlug, o as parseVersionSpecifier, p as searchNpmPackages, q as generateReleaseIndex, r as fetchNpmRegistryMeta, rt as parseGitHubUrl, s as readLocalDependencies, t as fetchLatestVersion, tt as normalizeRepoUrl, u as resolveLocalPackageDocs, v as generateDocsIndex, w as resolveCrateDocsWithAttempts, x as generateDiscussionIndex, y as fetchGitHubDiscussions, z as parseMarkdownLinks } from "../_chunks/sources.mjs";
|
|
3
|
+
export { $fetch, MIN_GIT_DOCS, compareSemver, downloadLlmsDocs, extractBranchHint, extractSections, fetchBlogReleases, fetchCrawledDocs, fetchGitDocs, fetchGitHubDiscussions, fetchGitHubIssues, fetchGitHubRaw, fetchGitHubRepoMeta, fetchGitSkills, fetchLatestVersion, fetchLlmsTxt, fetchLlmsUrl, fetchNpmPackage, fetchNpmRegistryMeta, fetchPkgDist, fetchReadme, fetchReadmeContent, fetchReleaseNotes, fetchText, filterFrameworkDocs, formatDiscussionAsMarkdown, formatIssueAsMarkdown, generateDiscussionIndex, generateDocsIndex, generateIssueIndex, generateReleaseIndex, getBlogPreset, getCrawlUrl, getDocOverride, getFilePatterns, getInstalledSkillVersion, getPrereleaseChangelogRef, getRelatedPackages, getRepoEntry, getRepoKeyForPackage, isGhAvailable, isGitHubRepoUrl, isPrerelease, isShallowGitDocs, normalizeLlmsLinks, normalizeRepoUrl, parseGitHubRepoSlug, parseGitHubUrl, parseGitSkillInput, parseMarkdownLinks, parsePackageSpec, parseSemver, parseSkillFrontmatterName, parseVersionSpecifier, readLocalDependencies, readLocalPackageInfo, resolveCrateDocsWithAttempts, resolveEntryFiles, resolveGitHubRepo, resolveInstalledVersion, resolveLocalPackageDocs, resolvePackageDocs, resolvePackageDocsWithAttempts, searchNpmPackages, toCrawlPattern, validateGitDocsWithLlms, verifyUrl };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as
|
|
1
|
+
import { D as CacheConfig, k as CachedPackage } from "./_chunks/index.mjs";
|
|
2
2
|
import { c as SearchResult, l as SearchSnippet, n as Document, o as SearchFilter, r as IndexConfig, s as SearchOptions } from "./_chunks/types.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { At as LlmsLink, Ot as FetchedDoc, kt as LlmsContent } from "./_chunks/index3.mjs";
|
|
4
4
|
export { type CacheConfig, type CachedPackage, type Document, type FetchedDoc, type IndexConfig, type LlmsContent, type LlmsLink, type SearchFilter, type SearchOptions, type SearchResult, type SearchSnippet };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skilld",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.2",
|
|
5
5
|
"description": "Generate AI agent skills from npm package documentation",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"node": ">=22.6.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@clack/prompts": "^1.
|
|
53
|
-
"@huggingface/transformers": "^4.
|
|
54
|
-
"@mariozechner/pi-ai": "^0.
|
|
52
|
+
"@clack/prompts": "^1.3.0",
|
|
53
|
+
"@huggingface/transformers": "^4.2.0",
|
|
54
|
+
"@mariozechner/pi-ai": "^0.71.0",
|
|
55
55
|
"@mdream/crawl": "^1.1.0",
|
|
56
56
|
"citty": "^0.2.2",
|
|
57
57
|
"consola": "^3.4.2",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"micromark-extension-frontmatter": "^2.0.0",
|
|
66
66
|
"mlly": "^1.8.2",
|
|
67
67
|
"ofetch": "^1.5.1",
|
|
68
|
-
"oxc-parser": "^0.
|
|
68
|
+
"oxc-parser": "^0.128.0",
|
|
69
69
|
"p-limit": "^7.3.0",
|
|
70
70
|
"pathe": "^2.0.3",
|
|
71
71
|
"retriv": "^0.13.2",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"sqlite-vec": "^0.1.9",
|
|
74
74
|
"std-env": "^4.1.0",
|
|
75
75
|
"tinyglobby": "^0.2.16",
|
|
76
|
+
"typebox": "^1.1.36",
|
|
76
77
|
"typescript": "6.0.2",
|
|
77
78
|
"unagent": "^0.0.8",
|
|
78
79
|
"unist-util-visit": "^5.1.0"
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Licenses of Bundled Dependencies
|
|
2
|
-
|
|
3
|
-
The published artifact additionally contains code with the following licenses:
|
|
4
|
-
MIT
|
|
5
|
-
|
|
6
|
-
# Bundled Dependencies
|
|
7
|
-
|
|
8
|
-
## @sinclair/typebox
|
|
9
|
-
|
|
10
|
-
License: MIT
|
|
11
|
-
By: sinclairzx81
|
|
12
|
-
Repository: https://github.com/sinclairzx81/typebox-legacy
|
|
13
|
-
|
|
14
|
-
> TypeBox
|
|
15
|
-
>
|
|
16
|
-
> Json Schema Type Builder with Static Type Resolution for TypeScript
|
|
17
|
-
>
|
|
18
|
-
> The MIT License (MIT)
|
|
19
|
-
>
|
|
20
|
-
> Copyright (c) 2017-2026 Haydn Paterson
|
|
21
|
-
>
|
|
22
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
23
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
24
|
-
> in the Software without restriction, including without limitation the rights
|
|
25
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
26
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
27
|
-
> furnished to do so, subject to the following conditions:
|
|
28
|
-
>
|
|
29
|
-
> The above copyright notice and this permission notice shall be included in
|
|
30
|
-
> all copies or substantial portions of the Software.
|
|
31
|
-
>
|
|
32
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
33
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
34
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
35
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
36
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
37
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
38
|
-
> THE SOFTWARE.
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import * as p from "@clack/prompts";
|
|
2
|
-
function timeAgo(iso) {
|
|
3
|
-
if (!iso) return "";
|
|
4
|
-
const diff = Date.now() - new Date(iso).getTime();
|
|
5
|
-
const days = Math.floor(diff / 864e5);
|
|
6
|
-
if (days <= 0) return "today";
|
|
7
|
-
if (days === 1) return "1d ago";
|
|
8
|
-
if (days < 7) return `${days}d ago`;
|
|
9
|
-
if (days < 30) return `${Math.floor(days / 7)}w ago`;
|
|
10
|
-
return `${Math.floor(days / 30)}mo ago`;
|
|
11
|
-
}
|
|
12
|
-
function formatSource(source) {
|
|
13
|
-
if (!source) return "";
|
|
14
|
-
if (source === "shipped") return "shipped";
|
|
15
|
-
if (source.includes("llms.txt")) return "llms.txt";
|
|
16
|
-
if (source.includes("github.com")) return source.replace(/https?:\/\/github\.com\//, "");
|
|
17
|
-
return source;
|
|
18
|
-
}
|
|
19
|
-
function formatDuration(ms) {
|
|
20
|
-
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
21
|
-
return `${(ms / 1e3).toFixed(1)}s`;
|
|
22
|
-
}
|
|
23
|
-
function timedSpinner() {
|
|
24
|
-
const spin = p.spinner({ indicator: "timer" });
|
|
25
|
-
return {
|
|
26
|
-
start(msg) {
|
|
27
|
-
spin.start(msg);
|
|
28
|
-
},
|
|
29
|
-
message(msg) {
|
|
30
|
-
spin.message(msg);
|
|
31
|
-
},
|
|
32
|
-
stop(msg) {
|
|
33
|
-
spin.stop(msg);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function highlightTerms(content, terms) {
|
|
38
|
-
if (terms.length === 0) return content;
|
|
39
|
-
const sorted = terms.toSorted((a, b) => b.length - a.length);
|
|
40
|
-
const pattern = new RegExp(`(${sorted.map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")})`, "gi");
|
|
41
|
-
return content.replace(pattern, "\x1B[33m$1\x1B[0m");
|
|
42
|
-
}
|
|
43
|
-
function scoreLabel(pct) {
|
|
44
|
-
return `${pct >= 70 ? "\x1B[32m" : pct >= 40 ? "\x1B[33m" : "\x1B[90m"}${pct}%\x1B[0m`;
|
|
45
|
-
}
|
|
46
|
-
function normalizeScores(results) {
|
|
47
|
-
const map = /* @__PURE__ */ new Map();
|
|
48
|
-
const max = results.reduce((m, r) => Math.max(m, r.score), 0);
|
|
49
|
-
for (const r of results) map.set(r, max > 0 ? Math.round(r.score / max * 100) : 0);
|
|
50
|
-
return map;
|
|
51
|
-
}
|
|
52
|
-
function formatSnippet(r, versions, pct) {
|
|
53
|
-
const refPath = `.claude/skills/${r.package}/.skilld/${r.source}`;
|
|
54
|
-
const lineRange = r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`;
|
|
55
|
-
const score = pct != null ? scoreLabel(pct) : `\x1B[90m${r.score.toFixed(2)}\x1B[0m`;
|
|
56
|
-
const version = versions?.get(r.package);
|
|
57
|
-
const pkgLabel = version ? `${r.package}@${version}` : r.package;
|
|
58
|
-
const scopeStr = r.scope?.length ? `${r.scope.map((e) => e.name).join(".")} → ` : "";
|
|
59
|
-
const entityStr = r.entities?.map((e) => e.signature || `${e.type} ${e.name}`).join(", ");
|
|
60
|
-
const highlighted = highlightTerms(r.content, r.highlights);
|
|
61
|
-
return [
|
|
62
|
-
`${pkgLabel} ${score}${entityStr ? ` \x1B[36m${scopeStr}${entityStr}\x1B[0m` : ""}`,
|
|
63
|
-
`\x1B[90m${refPath}:${lineRange}\x1B[0m`,
|
|
64
|
-
` ${highlighted.replace(/\n/g, "\n ")}`
|
|
65
|
-
].join("\n");
|
|
66
|
-
}
|
|
67
|
-
function formatCompactSnippet(r, cols) {
|
|
68
|
-
const entityStr = r.entities?.length ? r.entities.map((e) => e.signature || e.name).join(", ") : "";
|
|
69
|
-
const scopeStr = r.scope?.length ? `${r.scope.map((e) => e.name).join(".")} → ` : "";
|
|
70
|
-
const title = entityStr ? `${scopeStr}${entityStr}` : r.source.split("/").pop() || r.source;
|
|
71
|
-
const path = `${`.claude/skills/${r.package}/.skilld/${r.source}`}:${r.lineStart === r.lineEnd ? `L${r.lineStart}` : `L${r.lineStart}-${r.lineEnd}`}`;
|
|
72
|
-
const maxPreview = cols - 6;
|
|
73
|
-
const firstLine = r.content.split("\n").find((l) => l.trim() && l.trim() !== "---" && !/^#+\s*$/.test(l.trim())) || "";
|
|
74
|
-
return {
|
|
75
|
-
title,
|
|
76
|
-
path,
|
|
77
|
-
preview: firstLine.length > maxPreview ? `${firstLine.slice(0, maxPreview - 1)}…` : firstLine
|
|
78
|
-
};
|
|
79
|
-
}
|
|
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 };
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=formatting.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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"],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