@g3nomaly/skills 1.0.1 → 1.0.3
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 +98 -0
- package/dist/cli/adapter.d.ts +42 -8
- package/dist/cli/adapter.d.ts.map +1 -1
- package/dist/cli/adapter.js +37 -7
- package/dist/cli/adapter.js.map +1 -1
- package/dist/cli/commands/add.d.ts +10 -1
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +5 -1
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/init.d.ts +25 -2
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +31 -1
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/ls.d.ts +12 -3
- package/dist/cli/commands/ls.d.ts.map +1 -1
- package/dist/cli/commands/ls.js +6 -1
- package/dist/cli/commands/ls.js.map +1 -1
- package/dist/cli/commands/remove.d.ts +10 -1
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/remove.js +5 -1
- package/dist/cli/commands/remove.js.map +1 -1
- package/dist/cli/commands/source.d.ts +35 -6
- package/dist/cli/commands/source.d.ts.map +1 -1
- package/dist/cli/commands/source.js +22 -4
- package/dist/cli/commands/source.js.map +1 -1
- package/dist/cli/commands/update.d.ts +10 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +5 -1
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/index.js +6 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/packages/install.d.ts +9 -4
- package/dist/packages/install.d.ts.map +1 -1
- package/dist/packages/install.js +3 -2
- package/dist/packages/install.js.map +1 -1
- package/dist/registry/locate.d.ts +15 -4
- package/dist/registry/locate.d.ts.map +1 -1
- package/dist/registry/locate.js +10 -3
- package/dist/registry/locate.js.map +1 -1
- package/dist/registry/manifest.d.ts +2 -1
- package/dist/registry/manifest.d.ts.map +1 -1
- package/dist/registry/manifest.js +2 -1
- package/dist/registry/manifest.js.map +1 -1
- package/dist/registry/readSkillDir.d.ts +2 -1
- package/dist/registry/readSkillDir.d.ts.map +1 -1
- package/dist/registry/readSkillDir.js +8 -3
- package/dist/registry/readSkillDir.js.map +1 -1
- package/dist/registry/readSource.d.ts +4 -1
- package/dist/registry/readSource.d.ts.map +1 -1
- package/dist/registry/readSource.js +4 -1
- package/dist/registry/readSource.js.map +1 -1
- package/dist/registry/types.d.ts +11 -0
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/registry/types.js +0 -5
- package/dist/registry/types.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +3 -1
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +3 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,29 +1,58 @@
|
|
|
1
1
|
import type { ProjectDeps } from "../adapter";
|
|
2
|
+
/**
|
|
3
|
+
* @brief Options of `sourceAddCommand`.
|
|
4
|
+
*
|
|
5
|
+
* @property name - Name to register under; derived from the source when absent.
|
|
6
|
+
* @property ref - Branch or tag a git source is pinned to.
|
|
7
|
+
* @property targets - Harness names to register in; every configured target when absent.
|
|
8
|
+
*/
|
|
2
9
|
export interface SourceAddOptions {
|
|
3
|
-
/** Name to register under; derived from the source when absent */
|
|
4
10
|
name?: string;
|
|
5
|
-
/** Branch or tag a git source is pinned to */
|
|
6
11
|
ref?: string;
|
|
7
12
|
targets?: string[];
|
|
8
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* @brief Options of `sourceLsCommand`.
|
|
16
|
+
*
|
|
17
|
+
* @property json - Print the list as JSON.
|
|
18
|
+
* @property targets - Harness names to list for; every configured target when absent.
|
|
19
|
+
*/
|
|
9
20
|
export interface SourceLsOptions {
|
|
10
21
|
json?: boolean;
|
|
11
22
|
targets?: string[];
|
|
12
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @brief Options of `sourceRemoveCommand`.
|
|
26
|
+
*
|
|
27
|
+
* @property force - Unregister even when installed skills came from the source.
|
|
28
|
+
* @property targets - Harness names to unregister from; every configured target when absent.
|
|
29
|
+
*/
|
|
13
30
|
export interface SourceRemoveOptions {
|
|
14
|
-
/** Unregister even when installed skills came from the source */
|
|
15
31
|
force?: boolean;
|
|
16
32
|
targets?: string[];
|
|
17
33
|
}
|
|
18
34
|
/**
|
|
19
|
-
* Registers a git repository, npm package or local folder as a skill source
|
|
35
|
+
* @brief Registers a git repository, npm package or local folder as a skill source
|
|
20
36
|
* in every target's `skills.json`, after checking it offers at least one skill.
|
|
21
37
|
*
|
|
22
38
|
* @param input - The source as typed, e.g. `owner/repo`, `npm:@scope/skills` or `./my-skills`
|
|
39
|
+
* @param options - Name, ref and targets of the source.
|
|
40
|
+
* @param deps - Test injection.
|
|
23
41
|
*/
|
|
24
42
|
export declare function sourceAddCommand(input: string, options?: SourceAddOptions, deps?: ProjectDeps): Promise<void>;
|
|
25
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* @brief Lists each target's sources, built-in ones first, with how many installed skills came from each.
|
|
45
|
+
*
|
|
46
|
+
* @param options - Output format and the `targets` to list for.
|
|
47
|
+
* @param deps - Test injection.
|
|
48
|
+
*/
|
|
26
49
|
export declare function sourceLsCommand(options?: SourceLsOptions, deps?: ProjectDeps): Promise<void>;
|
|
27
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* @brief Unregisters a source from every target; refused for built-in sources and, unless forced, while skills came from it.
|
|
52
|
+
*
|
|
53
|
+
* @param name - Name of the source to unregister, as `source ls` prints it.
|
|
54
|
+
* @param options - Force flag and the `targets` to unregister from.
|
|
55
|
+
* @param deps - Test injection.
|
|
56
|
+
*/
|
|
28
57
|
export declare function sourceRemoveCommand(name: string, options?: SourceRemoveOptions, deps?: ProjectDeps): Promise<void>;
|
|
29
58
|
//# sourceMappingURL=source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/source.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/source.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAK,MAAM,CAAC;IACjB,GAAG,CAAC,EAAM,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAK,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAI,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAYD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAI3H;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,OAAO,GAAE,eAAoB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1G;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhI"}
|
|
@@ -3,27 +3,45 @@ import { addSourceEntries, lsSources, removeSourceEntries } from "@g3nomaly/core
|
|
|
3
3
|
import { readSkillSource } from "../../registry/readSource";
|
|
4
4
|
import { BUILTIN_SOURCES } from "../../sources/builtins";
|
|
5
5
|
import { SKILL_CONTEXT, openSkillProject, skillTargets } from "../adapter";
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @brief What the core source commands need to know about skills.
|
|
8
|
+
*
|
|
9
|
+
* @param projectRoot - Absolute project root the sources are resolved from.
|
|
10
|
+
* @returns The skill context with the built-in sources and the skill reader.
|
|
11
|
+
*/
|
|
7
12
|
function sourceContext(projectRoot) {
|
|
8
13
|
return { ...SKILL_CONTEXT, builtins: BUILTIN_SOURCES, readSource: readSkillSource, projectRoot };
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
|
-
* Registers a git repository, npm package or local folder as a skill source
|
|
16
|
+
* @brief Registers a git repository, npm package or local folder as a skill source
|
|
12
17
|
* in every target's `skills.json`, after checking it offers at least one skill.
|
|
13
18
|
*
|
|
14
19
|
* @param input - The source as typed, e.g. `owner/repo`, `npm:@scope/skills` or `./my-skills`
|
|
20
|
+
* @param options - Name, ref and targets of the source.
|
|
21
|
+
* @param deps - Test injection.
|
|
15
22
|
*/
|
|
16
23
|
export async function sourceAddCommand(input, options = {}, deps = {}) {
|
|
17
24
|
const { projectRoot, config } = await openSkillProject(deps);
|
|
18
25
|
const targets = skillTargets(config, projectRoot, options.targets);
|
|
19
26
|
await addSourceEntries(targets, input, { name: options.name, ref: options.ref }, sourceContext(projectRoot));
|
|
20
27
|
}
|
|
21
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* @brief Lists each target's sources, built-in ones first, with how many installed skills came from each.
|
|
30
|
+
*
|
|
31
|
+
* @param options - Output format and the `targets` to list for.
|
|
32
|
+
* @param deps - Test injection.
|
|
33
|
+
*/
|
|
22
34
|
export async function sourceLsCommand(options = {}, deps = {}) {
|
|
23
35
|
const { projectRoot, config } = await openSkillProject(deps);
|
|
24
36
|
lsSources(skillTargets(config, projectRoot, options.targets), options, sourceContext(projectRoot));
|
|
25
37
|
}
|
|
26
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* @brief Unregisters a source from every target; refused for built-in sources and, unless forced, while skills came from it.
|
|
40
|
+
*
|
|
41
|
+
* @param name - Name of the source to unregister, as `source ls` prints it.
|
|
42
|
+
* @param options - Force flag and the `targets` to unregister from.
|
|
43
|
+
* @param deps - Test injection.
|
|
44
|
+
*/
|
|
27
45
|
export async function sourceRemoveCommand(name, options = {}, deps = {}) {
|
|
28
46
|
const { projectRoot, config } = await openSkillProject(deps);
|
|
29
47
|
removeSourceEntries(skillTargets(config, projectRoot, options.targets), name, options, sourceContext(projectRoot));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/cli/commands/source.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/cli/commands/source.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAsC3E;;;;;GAKG;AACH,SAAS,aAAa,CAAC,WAAmB;IACxC,OAAO,EAAE,GAAG,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AACn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InstallOptions } from "@g3nomaly/core/cli";
|
|
2
2
|
import type { ProjectDeps } from "../adapter";
|
|
3
|
+
/**
|
|
4
|
+
* @brief Options of `updateCommand`, on top of the core install options.
|
|
5
|
+
*
|
|
6
|
+
* @property targets - Harness names to update, e.g. `["claude"]`; every configured target when absent.
|
|
7
|
+
*/
|
|
3
8
|
export interface UpdateOptions extends InstallOptions {
|
|
4
9
|
targets?: string[];
|
|
5
10
|
}
|
|
6
11
|
/**
|
|
7
|
-
* Re-installs installed skills from the source each one was installed from,
|
|
12
|
+
* @brief Re-installs installed skills from the source each one was installed from,
|
|
8
13
|
* at that source's current revision, then their packages; with no names,
|
|
9
14
|
* everything installed. Files the user changed since install are kept unless
|
|
10
15
|
* overwritten.
|
|
16
|
+
*
|
|
17
|
+
* @param names - Installed skill keys to update; empty for everything installed.
|
|
18
|
+
* @param options - Force and dry-run flags and the `targets` to narrow the update to.
|
|
19
|
+
* @param deps - Test injection.
|
|
11
20
|
*/
|
|
12
21
|
export declare function updateCommand(names: string[], options?: UpdateOptions, deps?: ProjectDeps): Promise<void>;
|
|
13
22
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,aAAkB,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvH"}
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
import { updateFromSources } from "@g3nomaly/core/cli";
|
|
3
3
|
import { SKILL_CONTEXT, installPackagesReporting, openSkillProject, openSkillRegistry, skillTargets } from "../adapter";
|
|
4
4
|
/**
|
|
5
|
-
* Re-installs installed skills from the source each one was installed from,
|
|
5
|
+
* @brief Re-installs installed skills from the source each one was installed from,
|
|
6
6
|
* at that source's current revision, then their packages; with no names,
|
|
7
7
|
* everything installed. Files the user changed since install are kept unless
|
|
8
8
|
* overwritten.
|
|
9
|
+
*
|
|
10
|
+
* @param names - Installed skill keys to update; empty for everything installed.
|
|
11
|
+
* @param options - Force and dry-run flags and the `targets` to narrow the update to.
|
|
12
|
+
* @param deps - Test injection.
|
|
9
13
|
*/
|
|
10
14
|
export async function updateCommand(names, options = {}, deps = {}) {
|
|
11
15
|
const { projectRoot, config } = await openSkillProject(deps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAYxH;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAe,EAAE,OAAO,GAAkB,EAAE,EAAE,IAAI,GAAgB,EAAE;IACtG,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,MAAM,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,wBAAwB,CAAC,CAAC;AAC3I,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -9,7 +9,12 @@ import { removeCommand } from "./commands/remove";
|
|
|
9
9
|
import { updateCommand } from "./commands/update";
|
|
10
10
|
import { lsCommand } from "./commands/ls";
|
|
11
11
|
import { sourceAddCommand, sourceLsCommand, sourceRemoveCommand } from "./commands/source";
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @brief The `-t` value as a one-target list, or `undefined` for every configured target.
|
|
14
|
+
*
|
|
15
|
+
* @param value - The raw `-t` option, e.g. `claude`, or `undefined` when the flag is absent.
|
|
16
|
+
* @returns A list holding the one parsed target, or `undefined`.
|
|
17
|
+
*/
|
|
13
18
|
function parseTargets(value) {
|
|
14
19
|
return value === undefined ? undefined : [SkillTargetSchema.parse(value)];
|
|
15
20
|
}
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,mCAAmC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,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AC,CAAC;AAEL,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9C,MAAM,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/D,OAAO,CAAC,UAAU,EAAE,CAAC"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @brief Outcome of installing one skill's packages.
|
|
3
|
+
*
|
|
4
|
+
* @property key - Skill key, the folder name under the install directory.
|
|
5
|
+
* @property error - Message from `bun install` when it failed; `undefined` when it succeeded.
|
|
6
|
+
*/
|
|
2
7
|
export interface PackageInstall {
|
|
3
8
|
key: string;
|
|
4
|
-
/** Message from `bun install` when it failed, `undefined` when it succeeded */
|
|
5
9
|
error?: string;
|
|
6
10
|
}
|
|
7
11
|
/**
|
|
8
|
-
* Runs `bun install` in each installed skill folder that ships a
|
|
12
|
+
* @brief Runs `bun install` in each installed skill folder that ships a
|
|
9
13
|
* `package.json`, with `--frozen-lockfile` when it ships a `bun.lock` too.
|
|
10
14
|
* The packages land in the skill's own `node_modules`.
|
|
11
15
|
*
|
|
12
16
|
* @param installDir - Absolute install directory, e.g. `/home/me/app/.claude/skills`
|
|
17
|
+
* @param keys - Skill keys to install, e.g. `["emphasise"]`.
|
|
13
18
|
* @returns one entry per skill that has a `package.json`; skills without one are left out
|
|
14
19
|
*/
|
|
15
20
|
export declare function installSkillPackages(installDir: string, keys: readonly string[]): Promise<PackageInstall[]>;
|
|
16
21
|
/**
|
|
17
|
-
* Deletes the `node_modules` of skills that are no longer installed, then the
|
|
22
|
+
* @brief Deletes the `node_modules` of skills that are no longer installed, then the
|
|
18
23
|
* skill folder when nothing else is left in it.
|
|
19
24
|
*
|
|
20
25
|
* @param installDir - Absolute install directory, e.g. `/home/me/app/.claude/skills`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/packages/install.ts"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/packages/install.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAK,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAgBjH;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAMrF"}
|
package/dist/packages/install.js
CHANGED
|
@@ -5,11 +5,12 @@ const PACKAGE_FILE = "package.json";
|
|
|
5
5
|
const LOCK_FILE = "bun.lock";
|
|
6
6
|
const MODULES_DIR = "node_modules";
|
|
7
7
|
/**
|
|
8
|
-
* Runs `bun install` in each installed skill folder that ships a
|
|
8
|
+
* @brief Runs `bun install` in each installed skill folder that ships a
|
|
9
9
|
* `package.json`, with `--frozen-lockfile` when it ships a `bun.lock` too.
|
|
10
10
|
* The packages land in the skill's own `node_modules`.
|
|
11
11
|
*
|
|
12
12
|
* @param installDir - Absolute install directory, e.g. `/home/me/app/.claude/skills`
|
|
13
|
+
* @param keys - Skill keys to install, e.g. `["emphasise"]`.
|
|
13
14
|
* @returns one entry per skill that has a `package.json`; skills without one are left out
|
|
14
15
|
*/
|
|
15
16
|
export async function installSkillPackages(installDir, keys) {
|
|
@@ -30,7 +31,7 @@ export async function installSkillPackages(installDir, keys) {
|
|
|
30
31
|
return results;
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
|
-
* Deletes the `node_modules` of skills that are no longer installed, then the
|
|
34
|
+
* @brief Deletes the `node_modules` of skills that are no longer installed, then the
|
|
34
35
|
* skill folder when nothing else is left in it.
|
|
35
36
|
*
|
|
36
37
|
* @param installDir - Absolute install directory, e.g. `/home/me/app/.claude/skills`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/packages/install.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,SAAS,GAAM,UAAU,CAAC;AAChC,MAAM,WAAW,GAAI,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/packages/install.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,SAAS,GAAM,UAAU,CAAC;AAChC,MAAM,WAAW,GAAI,cAAc,CAAC;AAapC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAkB,EAAE,IAAuB;IACpF,MAAM,OAAO,GAAqB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;QAC5C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;YAAE,SAAS;QAEhE,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1F,MAAM,IAAI,GAAG,GA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**
|
|
2
|
+
* @brief One plugin of a source with the skill folders it holds.
|
|
3
|
+
*
|
|
4
|
+
* @property name - Plugin name, from its manifest or the marketplace entry.
|
|
5
|
+
* @property version - Version from the plugin manifest, when it sets one.
|
|
6
|
+
* @property skillDirs - Absolute skill folders, each holding a SKILL.md.
|
|
7
|
+
*/
|
|
2
8
|
export interface SkillPlugin {
|
|
3
9
|
name: string;
|
|
4
10
|
version?: string;
|
|
5
|
-
/** Absolute skill folders, each holding a SKILL.md */
|
|
6
11
|
skillDirs: string[];
|
|
7
12
|
}
|
|
8
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* @brief The plugins found in one source, with what was skipped and why.
|
|
15
|
+
*
|
|
16
|
+
* @property plugins - Plugins that hold at least one skill folder.
|
|
17
|
+
* @property warnings - One message per skipped item, e.g. a plugin without skills.
|
|
18
|
+
*/
|
|
9
19
|
export interface SkillScan {
|
|
10
20
|
plugins: SkillPlugin[];
|
|
11
21
|
warnings: string[];
|
|
12
22
|
}
|
|
13
23
|
/**
|
|
14
|
-
* Finds the skills a source provides. A `marketplace.json` lists plugin
|
|
24
|
+
* @brief Finds the skills a source provides. A `marketplace.json` lists plugin
|
|
15
25
|
* folders; a root `plugin.json` makes the source itself a plugin. Both
|
|
16
26
|
* `.claude-plugin` and `.cursor-plugin` layouts are read.
|
|
17
27
|
*
|
|
18
28
|
* @param sourceRoot - Absolute root of the source checkout
|
|
29
|
+
* @returns The plugins with their skill folders, and the warnings about what was skipped.
|
|
19
30
|
* @throws when the source has neither manifest; plain skill folders are rejected
|
|
20
31
|
*/
|
|
21
32
|
export declare function locateSkills(sourceRoot: string): SkillScan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locate.d.ts","sourceRoot":"","sources":["../../src/registry/locate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"locate.d.ts","sourceRoot":"","sources":["../../src/registry/locate.ts"],"names":[],"mappings":"AAyBA;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAO,MAAM,CAAC;IAClB,OAAO,CAAC,EAAG,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAG,WAAW,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CA+B1D"}
|
package/dist/registry/locate.js
CHANGED
|
@@ -9,7 +9,6 @@ const DEFAULT_SKILLS_DIR = "skills";
|
|
|
9
9
|
const PluginManifestSchema = z.object({
|
|
10
10
|
name: z.string().min(1).optional(),
|
|
11
11
|
version: z.string().optional(),
|
|
12
|
-
/** A list of skill folders, or one folder to scan for them */
|
|
13
12
|
skills: z.union([z.string().min(1), z.array(z.string().min(1))]).optional(),
|
|
14
13
|
});
|
|
15
14
|
/** Folders under `dir` holding a SKILL.md; a match is not descended into further. */
|
|
@@ -30,7 +29,14 @@ function scanSkillDirs(dir) {
|
|
|
30
29
|
visit(dir);
|
|
31
30
|
return found.sort();
|
|
32
31
|
}
|
|
33
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* @brief A plugin's skill folders: the listed ones, or a scan of its skills folder.
|
|
34
|
+
*
|
|
35
|
+
* @param pluginDir - Absolute plugin folder.
|
|
36
|
+
* @param sourceRoot - Absolute source root that listed skill paths must stay inside.
|
|
37
|
+
* @param manifest - The plugin's parsed `plugin.json`, or `{}` when it has none.
|
|
38
|
+
* @returns Absolute skill folders.
|
|
39
|
+
*/
|
|
34
40
|
function pluginSkillDirs(pluginDir, sourceRoot, manifest) {
|
|
35
41
|
if (Array.isArray(manifest.skills)) {
|
|
36
42
|
return manifest.skills.map((rel) => resolveInside(sourceRoot, pluginDir, rel));
|
|
@@ -41,11 +47,12 @@ function pluginSkillDirs(pluginDir, sourceRoot, manifest) {
|
|
|
41
47
|
return scanSkillDirs(path.join(pluginDir, DEFAULT_SKILLS_DIR));
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
44
|
-
* Finds the skills a source provides. A `marketplace.json` lists plugin
|
|
50
|
+
* @brief Finds the skills a source provides. A `marketplace.json` lists plugin
|
|
45
51
|
* folders; a root `plugin.json` makes the source itself a plugin. Both
|
|
46
52
|
* `.claude-plugin` and `.cursor-plugin` layouts are read.
|
|
47
53
|
*
|
|
48
54
|
* @param sourceRoot - Absolute root of the source checkout
|
|
55
|
+
* @returns The plugins with their skill folders, and the warnings about what was skipped.
|
|
49
56
|
* @throws when the source has neither manifest; plain skill folders are rejected
|
|
50
57
|
*/
|
|
51
58
|
export function locateSkills(sourceRoot) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locate.js","sourceRoot":"","sources":["../../src/registry/locate.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,GAAU,aAAa,CAAC;AACzC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAEpC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,
|
|
1
|
+
{"version":3,"file":"locate.js","sourceRoot":"","sources":["../../src/registry/locate.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,O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,SAAS,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,QAAQ,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,MAAM,sCAAsC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Path of a target's `skills.json`, which sits beside its install directory:
|
|
2
|
+
* @brief Path of a target's `skills.json`, which sits beside its install directory:
|
|
3
3
|
* `.claude/skills` → `.claude/skills.json`.
|
|
4
4
|
*
|
|
5
|
+
* @param projectRoot - Absolute project root.
|
|
5
6
|
* @param installDir - Relative to `projectRoot`, e.g. `.claude/skills`
|
|
6
7
|
* @returns absolute path
|
|
7
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/registry/manifest.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/registry/manifest.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAElF"}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
const MANIFEST_FILE = "skills.json";
|
|
4
4
|
/**
|
|
5
|
-
* Path of a target's `skills.json`, which sits beside its install directory:
|
|
5
|
+
* @brief Path of a target's `skills.json`, which sits beside its install directory:
|
|
6
6
|
* `.claude/skills` → `.claude/skills.json`.
|
|
7
7
|
*
|
|
8
|
+
* @param projectRoot - Absolute project root.
|
|
8
9
|
* @param installDir - Relative to `projectRoot`, e.g. `.claude/skills`
|
|
9
10
|
* @returns absolute path
|
|
10
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/registry/manifest.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/registry/manifest.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,UAAkB;IACxE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -2,12 +2,13 @@ import type { ReadContext } from "@g3nomaly/core/installer";
|
|
|
2
2
|
import type { SkillMeta } from "./types";
|
|
3
3
|
export declare const SKILL_FILE = "SKILL.md";
|
|
4
4
|
/**
|
|
5
|
-
* Reads one skill folder into its registry entry. The key is the folder
|
|
5
|
+
* @brief Reads one skill folder into its registry entry. The key is the folder
|
|
6
6
|
* name and every file below it, hooks included, becomes a `files[]` entry at
|
|
7
7
|
* `<key>/<file>`, so the skill installs as one self-contained folder.
|
|
8
8
|
*
|
|
9
9
|
* @param skillDir - Absolute skill folder inside a source checkout
|
|
10
10
|
* @param context - Origin to record, the plugin as group, and the plugin's version
|
|
11
|
+
* @returns The skill key and its registry entry.
|
|
11
12
|
* @throws when the folder holds no SKILL.md or its frontmatter is invalid
|
|
12
13
|
*/
|
|
13
14
|
export declare function readSkillDir(skillDir: string, context: ReadContext): Promise<[string, SkillMeta]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readSkillDir.d.ts","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAA4B,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,UAAU,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"readSkillDir.d.ts","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAA4B,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,UAAU,aAAa,CAAC;AAqBrC;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAqBvG"}
|
|
@@ -9,10 +9,14 @@ export const SKILL_FILE = "SKILL.md";
|
|
|
9
9
|
const SkillFrontmatterSchema = z.object({
|
|
10
10
|
name: z.string().min(1),
|
|
11
11
|
description: z.string().optional(),
|
|
12
|
-
/** `<key>` or `<key>@<source>` of skills this one needs installed beside it */
|
|
13
12
|
registryDependencies: z.array(z.string().min(1)).optional(),
|
|
14
13
|
});
|
|
15
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* @brief Kind of a file by its path inside the skill: `SKILL.md`, an agent file, a hook, or a reference.
|
|
16
|
+
*
|
|
17
|
+
* @param relativeToSkill - Path of the file inside the skill folder, e.g. `agents/planner.md`.
|
|
18
|
+
* @returns The kind of the file.
|
|
19
|
+
*/
|
|
16
20
|
function fileType(relativeToSkill) {
|
|
17
21
|
if (relativeToSkill === SKILL_FILE)
|
|
18
22
|
return "skill";
|
|
@@ -23,12 +27,13 @@ function fileType(relativeToSkill) {
|
|
|
23
27
|
return "reference";
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
|
-
* Reads one skill folder into its registry entry. The key is the folder
|
|
30
|
+
* @brief Reads one skill folder into its registry entry. The key is the folder
|
|
27
31
|
* name and every file below it, hooks included, becomes a `files[]` entry at
|
|
28
32
|
* `<key>/<file>`, so the skill installs as one self-contained folder.
|
|
29
33
|
*
|
|
30
34
|
* @param skillDir - Absolute skill folder inside a source checkout
|
|
31
35
|
* @param context - Origin to record, the plugin as group, and the plugin's version
|
|
36
|
+
* @returns The skill key and its registry entry.
|
|
32
37
|
* @throws when the folder holds no SKILL.md or its frontmatter is invalid
|
|
33
38
|
*/
|
|
34
39
|
export async function readSkillDir(skillDir, context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readSkillDir.js","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;AAErC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAS,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC
|
|
1
|
+
{"version":3,"file":"readSkillDir.js","sourceRoot":"","sources":["../../src/registry/readSkillDir.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAA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AAM,WAAW,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAEjF,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;IACjH,CAAC;IAED,OAAO,CAAC,GAAG,EAAE;YACX,IAAI,EAAkB,WAAW,CAAC,IAAI;YACtC,WAAW,EAAW,WAAW,CAAC,WAAW;YAC7C,OAAO,EAAe,OAAO,CAAC,OAAO;YACrC,KAAK,EAAiB,OAAO,CAAC,KAAK;YACnC,oBAAoB,EAAE,WAAW,CAAC,oBAAoB;YACtD,MAAM,EAAgB,OAAO,CAAC,MAAM;YACpC,KAAK;SACN,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReadSource } from "@g3nomaly/core/installer";
|
|
2
2
|
import type { SkillMeta } from "./types";
|
|
3
3
|
/**
|
|
4
|
-
* Reads every skill a checked-out source declares through its plugin
|
|
4
|
+
* @brief Reads every skill a checked-out source declares through its plugin
|
|
5
5
|
* manifests, with the plugin as group. An unreadable skill is skipped with a
|
|
6
6
|
* warning. Handed to `loadSourceRegistry` by every skills command.
|
|
7
|
+
*
|
|
8
|
+
* @param checkout - The checked-out source: its folder, name and revision.
|
|
9
|
+
* @returns The skills read, and the warnings about those skipped.
|
|
7
10
|
*/
|
|
8
11
|
export declare const readSkillSource: ReadSource<SkillMeta>;
|
|
9
12
|
//# sourceMappingURL=readSource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readSource.d.ts","sourceRoot":"","sources":["../../src/registry/readSource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAI3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"readSource.d.ts","sourceRoot":"","sources":["../../src/registry/readSource.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAI3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,SAAS,CAmBjD,CAAC"}
|
|
@@ -4,9 +4,12 @@ import { errorMessage } from "@g3nomaly/core/utils";
|
|
|
4
4
|
import { locateSkills } from "./locate";
|
|
5
5
|
import { readSkillDir } from "./readSkillDir";
|
|
6
6
|
/**
|
|
7
|
-
* Reads every skill a checked-out source declares through its plugin
|
|
7
|
+
* @brief Reads every skill a checked-out source declares through its plugin
|
|
8
8
|
* manifests, with the plugin as group. An unreadable skill is skipped with a
|
|
9
9
|
* warning. Handed to `loadSourceRegistry` by every skills command.
|
|
10
|
+
*
|
|
11
|
+
* @param checkout - The checked-out source: its folder, name and revision.
|
|
12
|
+
* @returns The skills read, and the warnings about those skipped.
|
|
10
13
|
*/
|
|
11
14
|
export const readSkillSource = async (checkout) => {
|
|
12
15
|
const { plugins, warnings } = locateSkills(checkout.dir);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readSource.js","sourceRoot":"","sources":["../../src/registry/readSource.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC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AAC,KAAK,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC,CAAC"}
|
package/dist/registry/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare const SkillFileTypeSchema: z.ZodEnum<{
|
|
|
5
5
|
reference: "reference";
|
|
6
6
|
skill: "skill";
|
|
7
7
|
}>;
|
|
8
|
+
/** Kind of a file inside a skill: `skill`, `agent`, `hook` or `reference`. */
|
|
8
9
|
export type SkillFileType = z.infer<typeof SkillFileTypeSchema>;
|
|
9
10
|
/** One file of a skill; `path` is `<skill>/<file>`, relative to the install directory. */
|
|
10
11
|
export declare const SkillFileSchema: z.ZodObject<{
|
|
@@ -18,6 +19,7 @@ export declare const SkillFileSchema: z.ZodObject<{
|
|
|
18
19
|
skill: "skill";
|
|
19
20
|
}>;
|
|
20
21
|
}, z.core.$strip>;
|
|
22
|
+
/** One file of a skill, as recorded in `skills.json`; its `path` is relative to the install directory. */
|
|
21
23
|
export type SkillFile = z.infer<typeof SkillFileSchema>;
|
|
22
24
|
/**
|
|
23
25
|
* One installable skill. Built from a source's plugin manifest plus the
|
|
@@ -34,6 +36,7 @@ export declare const SkillMetaSchema: z.ZodObject<{
|
|
|
34
36
|
commit: z.ZodOptional<z.ZodString>;
|
|
35
37
|
version: z.ZodOptional<z.ZodString>;
|
|
36
38
|
}, z.core.$strip>;
|
|
39
|
+
forkedFrom: z.ZodOptional<z.ZodString>;
|
|
37
40
|
group: z.ZodString;
|
|
38
41
|
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
42
|
files: z.ZodArray<z.ZodObject<{
|
|
@@ -48,6 +51,14 @@ export declare const SkillMetaSchema: z.ZodObject<{
|
|
|
48
51
|
}>;
|
|
49
52
|
}, z.core.$strip>>;
|
|
50
53
|
}, z.core.$strip>;
|
|
54
|
+
/**
|
|
55
|
+
* @brief One installable skill, as `SkillMetaSchema` validates it.
|
|
56
|
+
*
|
|
57
|
+
* @property group - Plugin the skill ships in, e.g. `speech`.
|
|
58
|
+
* @property registryDependencies - Skills this one needs installed beside it. As read from a source these are `<key>` or `<key>@<source>`; once installed, the resolved keys.
|
|
59
|
+
* @property files - Every file of the skill, each with its `<key>/<file>` path.
|
|
60
|
+
*/
|
|
51
61
|
export type SkillMeta = z.infer<typeof SkillMetaSchema>;
|
|
62
|
+
/** Installed skills of one target, keyed by skill key. */
|
|
52
63
|
export type SkillRegistry = Record<string, SkillMeta>;
|
|
53
64
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;EAAkD,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,0FAA0F;AAC1F,eAAO,MAAM,eAAe;;;;;;;;;;iBAE1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;EAAkD,CAAC;AAEnF,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,0FAA0F;AAC1F,eAAO,MAAM,eAAe;;;;;;;;;;iBAE1B,CAAC;AAEH,0GAA0G;AAC1G,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;iBAI1B,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAO,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC5D,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC"}
|
package/dist/registry/types.js
CHANGED
|
@@ -13,12 +13,7 @@ export const SkillFileSchema = BaseFileEntrySchema.extend({
|
|
|
13
13
|
* into `skills.json` by the `add` and `update` commands.
|
|
14
14
|
*/
|
|
15
15
|
export const SkillMetaSchema = OriginEntrySchema.extend({
|
|
16
|
-
/** Plugin the skill ships in, e.g. `speech` */
|
|
17
16
|
group: z.string().min(1),
|
|
18
|
-
/**
|
|
19
|
-
* Skills this one needs installed beside it. As read from a source these
|
|
20
|
-
* are `<key>` or `<key>@<source>`; once installed, the resolved keys.
|
|
21
|
-
*/
|
|
22
17
|
registryDependencies: z.array(z.string().min(1)).optional(),
|
|
23
18
|
files: z.array(SkillFileSchema).min(1),
|
|
24
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAKnF,0FAA0F;AAC1F,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,mBAAmB;CAC1B,CAAC,CAAC;AAKH;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC,MAAM,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CACvC,CAAC,CAAC"}
|