| 31 | } |
| 32 | |
| 33 | func NewCopilotEngine() *CopilotEngine { |
| 34 | copilotLog.Print("Creating new Copilot engine instance") |
| 35 | return &CopilotEngine{ |
| 36 | BaseEngine: BaseEngine{ |
| 37 | id: "copilot", |
| 38 | displayName: "GitHub Copilot CLI", |
| 39 | description: "Uses GitHub Copilot CLI with MCP server support", |
| 40 | experimental: false, |
| 41 | ghSkillAgentName: "github-copilot", |
| 42 | capabilities: EngineCapabilities{ |
| 43 | ToolsAllowlist: true, |
| 44 | MaxTurns: true, // AWF max-turns is supported for Copilot runs |
| 45 | MaxContinuations: true, // Copilot CLI supports --autopilot with --max-autopilot-continues |
| 46 | WebSearch: false, // Copilot CLI does not have built-in web-search support |
| 47 | BareMode: true, // Copilot CLI supports --no-custom-instructions |
| 48 | }, |
| 49 | dedicatedLLMGatewayPort: constants.CopilotLLMGatewayPort, |
| 50 | }, |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // GetAPMTarget returns "copilot" so that apm-action packs Copilot-specific primitives. |
| 55 | func (e *CopilotEngine) GetAPMTarget() string { |