feat(sdk): implement support for custom skills (#19031)

This commit is contained in:
Michael Bleigh
2026-02-13 18:09:31 -08:00
committed by GitHub
parent 9fc7b56793
commit a129dbcdd4
10 changed files with 202 additions and 29 deletions

View File

@@ -158,6 +158,7 @@ export * from './tools/read-many-files.js';
export * from './tools/mcp-client.js';
export * from './tools/mcp-tool.js';
export * from './tools/write-todos.js';
export * from './tools/activate-skill.js';
export * from './tools/ask-user.js';
// MCP OAuth

View File

@@ -107,6 +107,13 @@ export class SkillManager {
this.addSkillsWithPrecedence(builtinSkills);
}
/**
* Adds skills to the manager programmatically.
*/
addSkills(skills: SkillDefinition[]): void {
this.addSkillsWithPrecedence(skills);
}
private addSkillsWithPrecedence(newSkills: SkillDefinition[]): void {
const skillMap = new Map<string, SkillDefinition>(
this.skills.map((s) => [s.name, s]),