@soulcraft/sdk 3.4.2 → 3.6.0
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/modules/ai/index.d.ts +14 -8
- package/dist/modules/ai/index.d.ts.map +1 -1
- package/dist/modules/ai/index.js +64 -11
- package/dist/modules/ai/index.js.map +1 -1
- package/dist/modules/ai/ollama.d.ts +27 -0
- package/dist/modules/ai/ollama.d.ts.map +1 -0
- package/dist/modules/ai/ollama.js +231 -0
- package/dist/modules/ai/ollama.js.map +1 -0
- package/dist/modules/ai/types.d.ts +34 -0
- package/dist/modules/ai/types.d.ts.map +1 -1
- package/dist/modules/ai/types.js +13 -0
- package/dist/modules/ai/types.js.map +1 -1
- package/dist/modules/auth/sveltekit.d.ts +11 -0
- package/dist/modules/auth/sveltekit.d.ts.map +1 -1
- package/dist/modules/auth/sveltekit.js +53 -2
- package/dist/modules/auth/sveltekit.js.map +1 -1
- package/dist/modules/skills/index.d.ts +19 -29
- package/dist/modules/skills/index.d.ts.map +1 -1
- package/dist/modules/skills/index.js +54 -171
- package/dist/modules/skills/index.js.map +1 -1
- package/dist/modules/skills/types.d.ts +39 -62
- package/dist/modules/skills/types.d.ts.map +1 -1
- package/dist/modules/skills/types.js +12 -9
- package/dist/modules/skills/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,120 +2,97 @@
|
|
|
2
2
|
* @module modules/skills/types
|
|
3
3
|
* @description Type definitions for `sdk.skills.*` — the skill loading and registry system.
|
|
4
4
|
*
|
|
5
|
-
* Skills are
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* within a kit's context.
|
|
5
|
+
* Skills are SKILL.md files stored at `/.soulcraft/skills/{id}/SKILL.md` in the Brainy VFS.
|
|
6
|
+
* Each skill is a directory containing a SKILL.md with YAML frontmatter and markdown
|
|
7
|
+
* instructions that define an AI persona, capabilities, or workflow.
|
|
9
8
|
*
|
|
10
|
-
* Skills are
|
|
11
|
-
*
|
|
9
|
+
* Skills are workspace-scoped — seeded from the kit at creation time and customizable
|
|
10
|
+
* per workspace. All products (Workshop, Venue, Academy, Pulse) read from the same path.
|
|
12
11
|
*
|
|
13
|
-
* ## Skill
|
|
12
|
+
* ## Skill types (via `type:` frontmatter)
|
|
13
|
+
* - `background` — passive knowledge, always loaded into AI context
|
|
14
|
+
* - `active` — user and/or AI can invoke
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* ## Path convention
|
|
17
|
+
* ```
|
|
18
|
+
* /.soulcraft/skills/{skill-id}/SKILL.md
|
|
19
|
+
* ```
|
|
17
20
|
*/
|
|
18
21
|
/**
|
|
19
|
-
* A parsed skill loaded from VFS or an in-memory test registry.
|
|
22
|
+
* @description A parsed skill loaded from VFS or an in-memory test registry.
|
|
20
23
|
*/
|
|
21
24
|
export interface Skill {
|
|
22
|
-
/** Kebab-case skill identifier (matches the `id:` frontmatter
|
|
25
|
+
/** Kebab-case skill identifier (matches the directory name and `id:` frontmatter). */
|
|
23
26
|
id: string;
|
|
24
|
-
/** The
|
|
25
|
-
kitId: string | null;
|
|
26
|
-
/** The full SKILL.md content including YAML frontmatter. */
|
|
27
|
+
/** The full SKILL.md content including YAML frontmatter and markdown instructions. */
|
|
27
28
|
content: string;
|
|
28
29
|
/** Where this skill was loaded from. */
|
|
29
30
|
source: 'vfs' | 'bundled';
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
|
-
* Options for listing skills.
|
|
33
|
+
* @description Options for listing skills.
|
|
33
34
|
*/
|
|
34
35
|
export interface SkillListOptions {
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
kitId?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Whether to include VFS-installed skills in the results.
|
|
41
|
-
*
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
|
-
includeVfs?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Whether to include skills from the test registry (when provided) in results.
|
|
47
|
-
*
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
-
includeBundled?: boolean;
|
|
36
|
+
/** Reserved for future filtering. */
|
|
37
|
+
_?: never;
|
|
51
38
|
}
|
|
52
39
|
/**
|
|
53
|
-
* Options for installing a skill into the VFS.
|
|
40
|
+
* @description Options for installing a skill into the VFS.
|
|
54
41
|
*/
|
|
55
42
|
export interface SkillInstallOptions {
|
|
56
|
-
/** The skill ID (kebab-case). */
|
|
43
|
+
/** The skill ID (kebab-case). Becomes the directory name. */
|
|
57
44
|
id: string;
|
|
58
|
-
/** The kit this skill belongs to. */
|
|
59
|
-
kitId: string;
|
|
60
45
|
/** The full SKILL.md content including YAML frontmatter. */
|
|
61
46
|
content: string;
|
|
62
47
|
}
|
|
63
48
|
/**
|
|
64
|
-
* The `sdk.skills` namespace.
|
|
49
|
+
* @description The `sdk.skills` namespace.
|
|
65
50
|
*
|
|
66
51
|
* Provides a unified interface for loading, listing, and installing skills
|
|
67
|
-
* from the Brainy VFS
|
|
52
|
+
* from the Brainy VFS at `/.soulcraft/skills/`.
|
|
68
53
|
*
|
|
69
54
|
* @example Loading a specific skill
|
|
70
55
|
* ```typescript
|
|
71
|
-
* const skill = await sdk.skills.load('
|
|
56
|
+
* const skill = await sdk.skills.load('candle-expertise')
|
|
72
57
|
* if (skill) {
|
|
73
|
-
* const systemPrompt = buildSystemPrompt(
|
|
58
|
+
* const systemPrompt = buildSystemPrompt([skill.content])
|
|
74
59
|
* }
|
|
75
60
|
* ```
|
|
76
61
|
*
|
|
77
|
-
* @example Listing all skills
|
|
62
|
+
* @example Listing all skills
|
|
78
63
|
* ```typescript
|
|
79
|
-
* const skills = await sdk.skills.list(
|
|
80
|
-
* const systemPrompt = buildSystemPrompt(
|
|
64
|
+
* const skills = await sdk.skills.list()
|
|
65
|
+
* const systemPrompt = buildSystemPrompt(skills.map(s => s.content))
|
|
81
66
|
* ```
|
|
82
67
|
*
|
|
83
|
-
* @example Installing a skill
|
|
68
|
+
* @example Installing a skill
|
|
84
69
|
* ```typescript
|
|
85
70
|
* await sdk.skills.install({
|
|
86
71
|
* id: 'custom-flow',
|
|
87
|
-
*
|
|
88
|
-
* content: `---\nid: custom-flow\ntitle: Custom Flow\n---\n...`,
|
|
72
|
+
* content: '---\nid: custom-flow\nname: Custom Flow\ntype: active\n---\n...',
|
|
89
73
|
* })
|
|
90
74
|
* ```
|
|
91
75
|
*/
|
|
92
76
|
export interface SkillsModule {
|
|
93
77
|
/**
|
|
94
|
-
* Load a single skill by ID
|
|
78
|
+
* @description Load a single skill by ID from `/.soulcraft/skills/{id}/SKILL.md`.
|
|
95
79
|
*
|
|
96
|
-
* @param id - Kebab-case skill ID (e.g. `'
|
|
97
|
-
* @
|
|
98
|
-
* @returns The skill, or `null` if not found in VFS or bundled registry.
|
|
80
|
+
* @param id - Kebab-case skill ID (e.g. `'candle-expertise'`).
|
|
81
|
+
* @returns The skill, or `null` if not found.
|
|
99
82
|
*/
|
|
100
|
-
load(id: string
|
|
83
|
+
load(id: string): Promise<Skill | null>;
|
|
101
84
|
/**
|
|
102
|
-
* List skills
|
|
103
|
-
*
|
|
104
|
-
* Skills are returned from VFS. When a test registry is provided, VFS skills
|
|
105
|
-
* appear first, followed by test registry skills (no deduplication).
|
|
85
|
+
* @description List all skills in the workspace.
|
|
106
86
|
*
|
|
107
|
-
* @param options -
|
|
108
|
-
* @returns
|
|
87
|
+
* @param options - Optional filtering (reserved for future use).
|
|
88
|
+
* @returns Array of all installed skills.
|
|
109
89
|
*/
|
|
110
90
|
list(options?: SkillListOptions): Promise<Skill[]>;
|
|
111
91
|
/**
|
|
112
|
-
* Install a skill into
|
|
113
|
-
*
|
|
114
|
-
* Writes the skill content to `/skills/{kitId}/{id}.md` in the Brainy VFS.
|
|
115
|
-
* Overwrites any existing skill at that path.
|
|
92
|
+
* @description Install a skill into `/.soulcraft/skills/{id}/SKILL.md`.
|
|
93
|
+
* Creates the directory if it doesn't exist. Overwrites if it does.
|
|
116
94
|
*
|
|
117
|
-
* @param options - The skill to install.
|
|
118
|
-
* @throws {Error} If the VFS is not available on this SDK instance.
|
|
95
|
+
* @param options - The skill ID and content to install.
|
|
119
96
|
*/
|
|
120
97
|
install(options: SkillInstallOptions): Promise<void>;
|
|
121
98
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/skills/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/skills/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,sFAAsF;IACtF,EAAE,EAAE,MAAM,CAAA;IACV,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAA;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,CAAC,CAAC,EAAE,KAAK,CAAA;CACV;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAA;IACV,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;IAEvC;;;;;OAKG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;IAElD;;;;;OAKG;IACH,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACrD"}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* @module modules/skills/types
|
|
3
3
|
* @description Type definitions for `sdk.skills.*` — the skill loading and registry system.
|
|
4
4
|
*
|
|
5
|
-
* Skills are
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* within a kit's context.
|
|
5
|
+
* Skills are SKILL.md files stored at `/.soulcraft/skills/{id}/SKILL.md` in the Brainy VFS.
|
|
6
|
+
* Each skill is a directory containing a SKILL.md with YAML frontmatter and markdown
|
|
7
|
+
* instructions that define an AI persona, capabilities, or workflow.
|
|
9
8
|
*
|
|
10
|
-
* Skills are
|
|
11
|
-
*
|
|
9
|
+
* Skills are workspace-scoped — seeded from the kit at creation time and customizable
|
|
10
|
+
* per workspace. All products (Workshop, Venue, Academy, Pulse) read from the same path.
|
|
12
11
|
*
|
|
13
|
-
* ## Skill
|
|
12
|
+
* ## Skill types (via `type:` frontmatter)
|
|
13
|
+
* - `background` — passive knowledge, always loaded into AI context
|
|
14
|
+
* - `active` — user and/or AI can invoke
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
16
|
+
* ## Path convention
|
|
17
|
+
* ```
|
|
18
|
+
* /.soulcraft/skills/{skill-id}/SKILL.md
|
|
19
|
+
* ```
|
|
17
20
|
*/
|
|
18
21
|
export {};
|
|
19
22
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/skills/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/skills/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
|