MCPcopy Create free account
hub / github.com/github/gh-aw / addCopilotSDKStepEnv

Method addCopilotSDKStepEnv

pkg/workflow/copilot_engine_execution.go:600–610  ·  view source on GitHub ↗
(env map[string]string, workflowData *WorkflowData, copilotSDKServerArgsJSON string)

Source from the content-addressed store, hash-verified

598}
599
600func (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
612func (e *CopilotEngine) buildCopilotExecutionStep(workflowData *WorkflowData, command string, env map[string]string, timeoutValue string) GitHubActionStep {
613 // Generate the step for Copilot CLI execution

Callers 1

buildCopilotStepEnvMethod · 0.95

Calls 1

PrintfMethod · 0.45

Tested by

no test coverage detected