/** * @license * Copyright 2025 OSAgent OC * SPDX-License-Identifier: Apache-2.0 */ import type { RegisteredSkill } from './types.js'; export interface SkillPluginDefinition { /** Unique skill ID */ id: string; /** Display name */ name: string; /** Description of what the skill does */ description: string; /** Priority (0-100, higher = more likely to trigger) */ priority?: number; /** Whether the skill is enabled */ enabled?: boolean; /** Trigger patterns */ triggers: SkillPluginTrigger[]; /** Steps to execute */ steps: SkillPluginStep[]; /** Tags for categorization */ tags?: string[]; } export interface SkillPluginTrigger { /** Trigger type */ type: 'keyword' | 'file' | 'command'; /** Patterns to match */ patterns: string[]; /** Confidence threshold (0-1) */ confidence?: number; } export interface SkillPluginStep { /** Step ID */ id: string; /** Step name */ name: string; /** Description */ description?: string; /** Agent ID to use (optional) */ agent?: string; /** Agent tier to use (if no specific agent) */ tier?: 'orchestrator' | 'specialist' | 'project' | 'utility'; /** Prompt to send */ prompt: string; /** Steps this depends on */ dependsOn?: string[]; /** Whether to run in parallel with other steps at same level */ parallel?: boolean; /** Verification command */ verify?: string; } /** * Skill Plugin Loader * * Loads user-defined skills from ~/.osagent/skills/ * * Skills can be defined in YAML or JSON format: * * ```yaml * # ~/.osagent/skills/my-skill.yaml * id: my-custom-skill * name: My Custom Skill * description: Does something useful * priority: 80 * triggers: * - type: keyword * patterns: ["my trigger", "custom action"] * confidence: 0.8 * steps: * - id: step1 * name: First Step * prompt: "Do the first thing" * agent: explorer * - id: step2 * name: Second Step * prompt: "Do the second thing" * dependsOn: [step1] * ``` */ export declare class SkillPluginLoader { private skillsDir; private loadedPlugins; private initialized; constructor(baseDir?: string); /** * Initialize and load all skill plugins */ initialize(): Promise; /** * Load all skill plugins from the skills directory */ private loadAllPlugins; /** * Load a single skill plugin from a file */ loadPlugin(filePath: string): Promise; /** * Convert plugin definition to RegisteredSkill format */ private convertToRegisteredSkill; /** * Get all loaded skill plugins */ getLoadedPlugins(): RegisteredSkill[]; /** * Get a specific plugin by ID */ getPlugin(id: string): RegisteredSkill | undefined; /** * Reload all plugins */ reload(): Promise; /** * Create a sample skill plugin file */ createSamplePlugin(): Promise; /** * Get the skills directory path */ getSkillsDir(): string; /** * Check if skills directory exists and has plugins */ hasPlugins(): Promise; } export declare const skillPluginLoader: SkillPluginLoader;