export interface HandoffConfig { label: string; agent: string; prompt: string; send?: boolean; } export interface AgentMetadata { name: string; displayName: string; description: string; version: string; author?: string; tags?: string[]; dependencies?: string[]; } /** * Target output platforms supported by the framework. * - copilot: GitHub Copilot / VS Code (.github/agents/*.agent.md) * - cursor: Cursor AI (.cursor/rules/*.mdc) * - claude: Claude Code (AGENTS.md) * - windsurf: Windsurf (.windsurf/rules/*.md) * - open-plugins: Open Plugins canonical structure (.agents/plugins//) * - opencode: OpenCode (.opencode/agents/*.md) */ export type TargetPlatform = 'copilot' | 'cursor' | 'claude' | 'windsurf' | 'open-plugins' | 'opencode'; export interface AgentConfig { platform?: 'vscode' | 'github-copilot'; tools?: string[]; github?: any; agents?: string[]; argumentHint?: string; userInvocable?: boolean; model?: string; handoffs?: HandoffConfig[]; disableModelInvocation?: boolean; infer?: boolean; mcpServers?: string[]; /** * When true, all generated output passes through PromptOptimizer.compress(). * Strips emoji from headers, removes boilerplate Identity/Communication sections, * and collapses blank lines — typically saves 15–25% of tokens. */ compact?: boolean; /** * OpenCode agent mode. Defaults to 'subagent'. * - primary: invoked directly by the user * - subagent: orchestrated by another agent * - all: accessible in both contexts */ openCodeMode?: 'primary' | 'subagent' | 'all'; } export declare abstract class Agent { protected metadata: AgentMetadata; protected config: AgentConfig; constructor(metadata: AgentMetadata, config?: AgentConfig); /** * Get agent metadata */ getMetadata(): AgentMetadata; /** * Get agent configuration */ getConfig(): AgentConfig; /** * Generate the agent definition file content (.agent.md) */ abstract generateAgentFile(): string; /** * Get the agent's instructions */ abstract getInstructions(): string; /** * Get the agent's system prompt (defaults to instructions) */ getSystemPrompt(): string; /** * Spec-Kit workflow integration block, shared by all agents. * Each agent passes its own file list, fallback advice, and commands. */ protected buildSpecKitBlock(options: { trigger?: string; files: Array<{ path: string; note: string; }>; fallback: string; commands: Array<{ cmd: string; description: string; }>; extraSections?: string; }): string; /** * Generate agent file content for a specific target platform. * This is the primary entry point used by PlatformEmitter. */ generateForPlatform(platform: TargetPlatform): string; private _generateForPlatformRaw; /** * Generate an OpenCode agent file (.opencode/agents/*.md). * Produces YAML frontmatter with description, mode, model (if set), and * a permission block derived from the agent's declared tools. */ protected generateOpenCodeAgent(): string; /** * Generate a Cursor .mdc rule file. * Uses gray-matter to produce valid YAML frontmatter. */ protected generateCursorRule(): string; /** * Generate a Windsurf rule file (.windsurf/rules/*.md). * Windsurf uses the same frontmatter format as Cursor. */ protected generateWindsurfRule(): string; /** * Generate a markdown section for inclusion in AGENTS.md (Claude Code). * Each agent contributes one top-level section. */ generateClaudeSection(): string; /** * Generate YAML frontmatter for agent file. * The 'target' field is the platform selector: * target: vscode — enables agents, argument-hint, handoffs, model, user-invocable, disable-model-invocation * target: github-copilot — enables infer, mcp-servers * Both platforms support: description, github, name, target, tools */ protected generateFrontmatter(): string; /** * Simple YAML stringifier — handles flat values, string arrays, and object arrays */ private yamlStringify; private yamlValue; } //# sourceMappingURL=Agent.d.ts.map