skilld 0.8.1 → 0.8.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 +13 -0
- package/dist/_chunks/chunk.mjs +13 -0
- package/dist/_chunks/config.mjs +25 -0
- package/dist/_chunks/config.mjs.map +1 -0
- package/dist/_chunks/detect-imports.mjs +2002 -0
- package/dist/_chunks/detect-imports.mjs.map +1 -0
- package/dist/_chunks/embedding-cache.mjs +50 -0
- package/dist/_chunks/embedding-cache.mjs.map +1 -0
- package/dist/_chunks/npm.mjs +1941 -0
- package/dist/_chunks/npm.mjs.map +1 -0
- package/dist/_chunks/pool2.mjs +120 -0
- package/dist/_chunks/pool2.mjs.map +1 -0
- package/dist/_chunks/storage.mjs +436 -0
- package/dist/_chunks/storage.mjs.map +1 -0
- package/dist/_chunks/types.d.mts +90 -0
- package/dist/_chunks/types.d.mts.map +1 -0
- package/dist/_chunks/utils.d.mts +541 -0
- package/dist/_chunks/utils.d.mts.map +1 -0
- package/dist/_chunks/version.d.mts +153 -0
- package/dist/_chunks/version.d.mts.map +1 -0
- package/dist/_chunks/yaml.mjs +468 -0
- package/dist/_chunks/yaml.mjs.map +1 -0
- package/dist/agent/index.d.mts +316 -1
- package/dist/agent/index.d.mts.map +1 -0
- package/dist/agent/index.mjs +6 -1
- package/dist/cache/index.d.mts +2 -1
- package/dist/cache/index.mjs +3 -1
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +4234 -1
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.mjs +10 -1
- package/dist/retriv/index.d.mts +26 -1
- package/dist/retriv/index.d.mts.map +1 -0
- package/dist/retriv/index.mjs +109 -1
- package/dist/retriv/index.mjs.map +1 -0
- package/dist/retriv/worker.d.mts +33 -1
- package/dist/retriv/worker.d.mts.map +1 -0
- package/dist/retriv/worker.mjs +51 -1
- package/dist/retriv/worker.mjs.map +1 -0
- package/dist/sources/index.d.mts +2 -1
- package/dist/sources/index.mjs +4 -1
- package/dist/types.d.mts +6 -1
- package/dist/types.mjs +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -192,6 +192,19 @@ Several approaches exist for steering agent knowledge. Each fills a different ni
|
|
|
192
192
|
- **[skills-npm](https://github.com/antfu/skills-npm)**: the ideal end-state: zero-token skills shipped by the package author, but requires every maintainer to opt in.
|
|
193
193
|
- **skilld**: generates version-aware skills from existing docs, changelogs, issues, and discussions. Works for any package without author opt-in.
|
|
194
194
|
|
|
195
|
+
## Telemetry
|
|
196
|
+
|
|
197
|
+
Skilld sends anonymous install events to [skills.sh](https://skills.sh/) so skills can be discovered and ranked. No personal information is collected.
|
|
198
|
+
|
|
199
|
+
Telemetry is automatically disabled in CI environments.
|
|
200
|
+
|
|
201
|
+
To opt out, set either environment variable:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
DISABLE_TELEMETRY=1
|
|
205
|
+
DO_NOT_TRACK=1
|
|
206
|
+
```
|
|
207
|
+
|
|
195
208
|
## Related
|
|
196
209
|
|
|
197
210
|
- [skills-npm](https://github.com/antfu/skills-npm) - Convention for shipping agent skills in npm packages
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
13
|
+
export { __require as n, __exportAll as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join, resolve } from "pathe";
|
|
3
|
+
const VALID_PKG_NAME = /^(?:@[a-z0-9][-a-z0-9._]*\/)?[a-z0-9][-a-z0-9._]*$/;
|
|
4
|
+
const VALID_VERSION = /^[a-z0-9][-\w.+]*$/i;
|
|
5
|
+
function getVersionKey(version) {
|
|
6
|
+
return version;
|
|
7
|
+
}
|
|
8
|
+
function getCacheKey(name, version) {
|
|
9
|
+
return `${name}@${getVersionKey(version)}`;
|
|
10
|
+
}
|
|
11
|
+
function getCacheDir(name, version) {
|
|
12
|
+
if (!VALID_PKG_NAME.test(name)) throw new Error(`Invalid package name: ${name}`);
|
|
13
|
+
if (!VALID_VERSION.test(version)) throw new Error(`Invalid version: ${version}`);
|
|
14
|
+
const dir = resolve(REFERENCES_DIR, getCacheKey(name, version));
|
|
15
|
+
if (!dir.startsWith(REFERENCES_DIR)) throw new Error(`Path traversal detected: ${dir}`);
|
|
16
|
+
return dir;
|
|
17
|
+
}
|
|
18
|
+
const CACHE_DIR = join(homedir(), ".skilld");
|
|
19
|
+
const REFERENCES_DIR = join(CACHE_DIR, "references");
|
|
20
|
+
function getPackageDbPath(name, version) {
|
|
21
|
+
return join(REFERENCES_DIR, getCacheKey(name, version), "search.db");
|
|
22
|
+
}
|
|
23
|
+
export { getCacheKey as a, getCacheDir as i, REFERENCES_DIR as n, getVersionKey as o, getPackageDbPath as r, CACHE_DIR as t };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../src/cache/version.ts","../../src/cache/config.ts"],"sourcesContent":["/**\n * Version utilities\n */\n\nimport { resolve } from 'pathe'\nimport { REFERENCES_DIR } from './config.ts'\n\n/** Validate npm package name (scoped or unscoped) */\nconst VALID_PKG_NAME = /^(?:@[a-z0-9][-a-z0-9._]*\\/)?[a-z0-9][-a-z0-9._]*$/\n\n/** Validate version string (semver-ish, no path separators) */\nconst VALID_VERSION = /^[a-z0-9][-\\w.+]*$/i\n\n/**\n * Get exact version key for cache keying\n */\nexport function getVersionKey(version: string): string {\n return version\n}\n\n/**\n * Get cache key for a package: name@version\n */\nexport function getCacheKey(name: string, version: string): string {\n return `${name}@${getVersionKey(version)}`\n}\n\n/**\n * Get path to cached package references.\n * Validates name/version to prevent path traversal.\n */\nexport function getCacheDir(name: string, version: string): string {\n if (!VALID_PKG_NAME.test(name))\n throw new Error(`Invalid package name: ${name}`)\n if (!VALID_VERSION.test(version))\n throw new Error(`Invalid version: ${version}`)\n\n const dir = resolve(REFERENCES_DIR, getCacheKey(name, version))\n if (!dir.startsWith(REFERENCES_DIR))\n throw new Error(`Path traversal detected: ${dir}`)\n return dir\n}\n","/**\n * Cache configuration\n */\n\nimport { homedir } from 'node:os'\nimport { join } from 'pathe'\nimport { getCacheKey } from './version.ts'\n\n/** Global cache directory */\nexport const CACHE_DIR = join(homedir(), '.skilld')\n\n/** References subdirectory */\nexport const REFERENCES_DIR = join(CACHE_DIR, 'references')\n\n/** Get search DB path for a specific package@version */\nexport function getPackageDbPath(name: string, version: string): string {\n return join(REFERENCES_DIR, getCacheKey(name, version), 'search.db')\n}\n"],"mappings":";;AAQA,MAAM,iBAAiB;AAGvB,MAAM,gBAAgB;AAKtB,SAAgB,cAAc,SAAyB;AACrD,QAAO;;AAMT,SAAgB,YAAY,MAAc,SAAyB;AACjE,QAAO,GAAG,KAAK,GAAG,cAAc,QAAQ;;AAO1C,SAAgB,YAAY,MAAc,SAAyB;AACjE,KAAI,CAAC,eAAe,KAAK,KAAK,CAC5B,OAAM,IAAI,MAAM,yBAAyB,OAAO;AAClD,KAAI,CAAC,cAAc,KAAK,QAAQ,CAC9B,OAAM,IAAI,MAAM,oBAAoB,UAAU;CAEhD,MAAM,MAAM,QAAQ,gBAAgB,YAAY,MAAM,QAAQ,CAAC;AAC/D,KAAI,CAAC,IAAI,WAAW,eAAe,CACjC,OAAM,IAAI,MAAM,4BAA4B,MAAM;AACpD,QAAO;;AC/BT,MAAa,YAAY,KAAK,SAAS,EAAE,UAAU;AAGnD,MAAa,iBAAiB,KAAK,WAAW,aAAa;AAG3D,SAAgB,iBAAiB,MAAc,SAAyB;AACtE,QAAO,KAAK,gBAAgB,YAAY,MAAM,QAAQ,EAAE,YAAY"}
|