(env map[string]string, workflowData *WorkflowData, copilotSDKServerArgsJSON string)
| 598 | } |
| 599 | |
| 600 | func (e *CopilotEngine) addCopilotSDKStepEnv(env map[string]string, workflowData *WorkflowData, copilotSDKServerArgsJSON string) { |
| 601 | // When copilot-sdk: true, provide the SDK URI that the harness uses to start a separate headless server. |
| 602 | if workflowData.EngineConfig == nil || !workflowData.EngineConfig.CopilotSDK { |
| 603 | return |
| 604 | } |
| 605 | env[constants.CopilotSDKURIEnvVar] = fmt.Sprintf("http://127.0.0.1:%d", constants.DefaultCopilotSDKPort) |
| 606 | copilotExecLog.Printf("copilot-sdk enabled: set %s=%s", constants.CopilotSDKURIEnvVar, env[constants.CopilotSDKURIEnvVar]) |
| 607 | env[constants.CopilotSDKDriverEnvVar] = "1" |
| 608 | env[constants.CopilotSDKServerArgsEnvVar] = copilotSDKServerArgsJSON |
| 609 | copilotExecLog.Printf("copilot-sdk driver mode: set %s and %s", constants.CopilotSDKDriverEnvVar, constants.CopilotSDKServerArgsEnvVar) |
| 610 | } |
| 611 | |
| 612 | func (e *CopilotEngine) buildCopilotExecutionStep(workflowData *WorkflowData, command string, env map[string]string, timeoutValue string) GitHubActionStep { |
| 613 | // Generate the step for Copilot CLI execution |
no test coverage detected