feat: add skills and subagents configuration support

- Updated .gitignore to include skills directory.
- Introduced agent discovery functionality to scan for AGENT.md files in user and project directories.
- Added new API endpoint for discovering filesystem agents.
- Implemented UI components for managing skills and viewing custom subagents.
- Enhanced settings helpers to retrieve skills configuration and custom subagents.
- Updated agent service to incorporate skills and subagents in task delegation.

These changes enhance the capabilities of the system by allowing users to define and manage skills and custom subagents effectively.
This commit is contained in:
Shirone
2026-01-06 04:31:57 +01:00
parent 5d675561ba
commit 236989bf6e
19 changed files with 1098 additions and 6 deletions

View File

@@ -17,6 +17,7 @@ export type {
McpStdioServerConfig,
McpSSEServerConfig,
McpHttpServerConfig,
AgentDefinition,
} from './provider.js';
// Feature types

View File

@@ -62,6 +62,20 @@ export interface McpHttpServerConfig {
headers?: Record<string, string>;
}
/**
* Subagent definition for specialized task delegation
*/
export interface AgentDefinition {
/** Natural language description of when to use this agent */
description: string;
/** System prompt defining the agent's role and behavior */
prompt: string;
/** Restricted tool list (if omitted, inherits all tools) */
tools?: string[];
/** Model override for this agent */
model?: 'sonnet' | 'opus' | 'haiku' | 'inherit';
}
/**
* Options for executing a query via a provider
*/
@@ -90,6 +104,11 @@ export interface ExecuteOptions {
* Only applies to Claude models; Cursor models handle thinking internally.
*/
thinkingLevel?: ThinkingLevel;
/**
* Custom subagents for specialized task delegation
* Key: agent name, Value: agent definition
*/
agents?: Record<string, AgentDefinition>;
}
/**

View File

@@ -486,6 +486,29 @@ export interface GlobalSettings {
// Prompt Customization
/** Custom prompts for Auto Mode, Agent Runner, Backlog Planning, and Enhancements */
promptCustomization?: PromptCustomization;
// Skills Configuration
/**
* Enable Skills functionality (loads from .claude/skills/ directories)
* @default true
*/
enableSkills?: boolean;
/**
* Which directories to load Skills from
* - 'user': ~/.claude/skills/ (personal skills)
* - 'project': .claude/skills/ (project-specific skills)
* @default ['user', 'project']
*/
skillsSources?: Array<'user' | 'project'>;
// Subagents Configuration
/**
* Custom subagent definitions for specialized task delegation
* Key: agent name (e.g., 'code-reviewer', 'test-runner')
* Value: agent configuration
*/
customSubagents?: Record<string, import('./provider.js').AgentDefinition>;
}
/**
@@ -585,6 +608,15 @@ export interface ProjectSettings {
// Claude Agent SDK Settings
/** Auto-load CLAUDE.md files using SDK's settingSources option (project override) */
autoLoadClaudeMd?: boolean;
// Subagents Configuration
/**
* Project-specific custom subagent definitions for specialized task delegation
* Merged with global customSubagents, project-level takes precedence
* Key: agent name (e.g., 'code-reviewer', 'test-runner')
* Value: agent configuration
*/
customSubagents?: Record<string, import('./provider.js').AgentDefinition>;
}
/**