| 589 | } |
| 590 | |
| 591 | func (e *CopilotEngine) addCopilotSandboxEnv(env map[string]string, sandboxEnabled bool) { |
| 592 | // Inject the dummy BYOK sentinel and AWF_REFLECT_ENABLED only when the AWF sandbox is active. |
| 593 | // COPILOT_API_KEY itself is exported in PathSetup via shell variable expansion to avoid false positives. |
| 594 | if sandboxEnabled { |
| 595 | env[constants.CopilotBYOKDummyAPIKeyEnvVar] = constants.CopilotBYOKDummyAPIKey |
| 596 | env["AWF_REFLECT_ENABLED"] = "1" |
| 597 | } |
| 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. |