/** * CopilotAdapter — Register VS Code Copilot as an agent node. * * Routes tasks to GitHub Copilot via MCP tool calls, enabling * Copilot to participate in multi-agent orchestration as a * code generation, review, or analysis agent. * * BYOC: Requires an MCPServerConnection pointing at a Copilot-compatible * MCP endpoint (e.g., VS Code's built-in MCP server or Copilot Extensions). * * @module CopilotAdapter * @version 1.0.0 */ import { BaseAdapter } from './base-adapter'; import type { AdapterConfig, AdapterCapabilities, AgentPayload, AgentContext, AgentResult } from '../types/agent-adapter'; /** Copilot task type — maps to different Copilot capabilities */ export type CopilotTaskType = 'generate' | 'review' | 'explain' | 'fix' | 'test' | 'refactor' | 'chat'; /** Copilot-specific execution options */ export interface CopilotOptions { /** The type of task to perform (default: 'chat') */ taskType?: CopilotTaskType; /** Programming language context */ language?: string; /** File path context */ filePath?: string; /** Model preference (e.g., 'gpt-4', 'claude-sonnet') */ model?: string; /** Maximum tokens for the response */ maxTokens?: number; } /** Connection interface for Copilot communication */ export interface CopilotConnection { /** Send a request and get a response */ chat(prompt: string, options?: CopilotOptions): Promise<{ content: string; model?: string; tokensUsed?: number; finishReason?: string; }>; /** Check if the connection is active */ isConnected(): boolean; /** Close the connection */ close(): Promise; } export declare class CopilotAdapter extends BaseAdapter { readonly name = "copilot"; readonly version = "1.0.0"; private connection; private defaultModel; get capabilities(): AdapterCapabilities; initialize(config: AdapterConfig): Promise; executeAgent(agentId: string, payload: AgentPayload, context: AgentContext): Promise; shutdown(): Promise; /** Set or replace the Copilot connection */ setConnection(connection: CopilotConnection): void; private parseTaskType; private buildPrompt; } //# sourceMappingURL=copilot-adapter.d.ts.map