@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.
@@ -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 Markdown files (SKILL.md convention) that define an AI persona,
6
- * capabilities, glossary, and workflow steps for a specific domain. They drive
7
- * Brainy AI system prompt construction and define what Claude knows how to do
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 stored in the Brainy VFS at `/skills/{kitId}/{skillId}.md`,
11
- * installed by the kit initialization pipeline or via `sdk.skills.install()`.
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 ID convention
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
- * Skill IDs are kebab-case strings matching the `id:` frontmatter field in the
16
- * SKILL.md file. Examples: `'inventory-health'`, `'session-flow'`, `'daily-brief'`.
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 field). */
25
+ /** Kebab-case skill identifier (matches the directory name and `id:` frontmatter). */
23
26
  id: string;
24
- /** The kit this skill belongs to (`null` for global/shared skills). */
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
- * Filter by kit ID. When omitted, all skills across all kits are returned.
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('inventory-health', 'wicks-and-whiskers')
56
+ * const skill = await sdk.skills.load('candle-expertise')
72
57
  * if (skill) {
73
- * const systemPrompt = buildSystemPrompt(kit, [skill.content])
58
+ * const systemPrompt = buildSystemPrompt([skill.content])
74
59
  * }
75
60
  * ```
76
61
  *
77
- * @example Listing all skills for a kit
62
+ * @example Listing all skills
78
63
  * ```typescript
79
- * const skills = await sdk.skills.list({ kitId: 'wicks-and-whiskers' })
80
- * const systemPrompt = buildSystemPrompt(kit, skills.map(s => s.content))
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 into VFS
68
+ * @example Installing a skill
84
69
  * ```typescript
85
70
  * await sdk.skills.install({
86
71
  * id: 'custom-flow',
87
- * kitId: 'wicks-and-whiskers',
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, searching VFS first then bundled registry.
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. `'inventory-health'`).
97
- * @param kitId - The kit the skill belongs to.
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, kitId: string): Promise<Skill | null>;
83
+ load(id: string): Promise<Skill | null>;
101
84
  /**
102
- * List skills matching the given options.
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 - Filtering options.
108
- * @returns An array of matching skills.
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 the VFS, making it available to all future `load()` calls.
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;;;;;;;;;;;;;;;;GAgBG;AAMH;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,EAAE,EAAE,MAAM,CAAA;IACV,uEAAuE;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAA;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;CAChB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;IAEtD;;;;;;;;OAQG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;IAElD;;;;;;;;OAQG;IACH,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACrD"}
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 Markdown files (SKILL.md convention) that define an AI persona,
6
- * capabilities, glossary, and workflow steps for a specific domain. They drive
7
- * Brainy AI system prompt construction and define what Claude knows how to do
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 stored in the Brainy VFS at `/skills/{kitId}/{skillId}.md`,
11
- * installed by the kit initialization pipeline or via `sdk.skills.install()`.
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 ID convention
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
- * Skill IDs are kebab-case strings matching the `id:` frontmatter field in the
16
- * SKILL.md file. Examples: `'inventory-health'`, `'session-flow'`, `'daily-brief'`.
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;;;;;;;;;;;;;;;;GAgBG"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/modules/skills/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/sdk",
3
- "version": "3.4.2",
3
+ "version": "3.6.0",
4
4
  "description": "The unified Soulcraft platform SDK — data, auth, AI, billing, and notifications",
5
5
  "type": "module",
6
6
  "publishConfig": {