diff --git a/.github/workflows/agent-performance-analyzer.lock.yml b/.github/workflows/agent-performance-analyzer.lock.yml index 18dafaff04e..b36cc0735ac 100644 --- a/.github/workflows/agent-performance-analyzer.lock.yml +++ b/.github/workflows/agent-performance-analyzer.lock.yml @@ -574,7 +574,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/agent-persona-explorer.lock.yml b/.github/workflows/agent-persona-explorer.lock.yml index 0728c32fb3c..c220e25daa4 100644 --- a/.github/workflows/agent-persona-explorer.lock.yml +++ b/.github/workflows/agent-persona-explorer.lock.yml @@ -468,7 +468,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index d1b569c307c..9ef6b2e2990 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -536,7 +536,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml index f7ccfffa904..41e9f82c94b 100644 --- a/.github/workflows/cloclo.lock.yml +++ b/.github/workflows/cloclo.lock.yml @@ -583,7 +583,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/daily-cli-tools-tester.lock.yml b/.github/workflows/daily-cli-tools-tester.lock.yml index 242c462d358..e59ba9f08f5 100644 --- a/.github/workflows/daily-cli-tools-tester.lock.yml +++ b/.github/workflows/daily-cli-tools-tester.lock.yml @@ -471,7 +471,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index f1d178672a9..1d0dac7ccec 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -521,7 +521,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/daily-observability-report.lock.yml b/.github/workflows/daily-observability-report.lock.yml index 36516357b64..78b72ee5be8 100644 --- a/.github/workflows/daily-observability-report.lock.yml +++ b/.github/workflows/daily-observability-report.lock.yml @@ -524,7 +524,7 @@ jobs: inherit = "core" include_only = ["CODEX_API_KEY", "GH_AW_ASSETS_ALLOWED_EXTS", "GH_AW_ASSETS_BRANCH", "GH_AW_ASSETS_MAX_SIZE_KB", "GH_AW_SAFE_OUTPUTS", "GITHUB_PERSONAL_ACCESS_TOKEN", "GITHUB_REPOSITORY", "GITHUB_SERVER_URL", "GITHUB_TOKEN", "HOME", "OPENAI_API_KEY", "PATH"] - [mcp_servers.agentic_workflows] + [mcp_servers.agenticworkflows] container = "localhost/gh-aw:dev" mounts = ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"] env_vars = ["DEBUG", "GH_TOKEN", "GITHUB_TOKEN"] @@ -549,7 +549,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/daily-safe-output-optimizer.lock.yml b/.github/workflows/daily-safe-output-optimizer.lock.yml index 1985386255d..8697c0c3d51 100644 --- a/.github/workflows/daily-safe-output-optimizer.lock.yml +++ b/.github/workflows/daily-safe-output-optimizer.lock.yml @@ -502,7 +502,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/deep-report.lock.yml b/.github/workflows/deep-report.lock.yml index 2dac5d32407..53979ab8895 100644 --- a/.github/workflows/deep-report.lock.yml +++ b/.github/workflows/deep-report.lock.yml @@ -598,7 +598,7 @@ jobs: inherit = "core" include_only = ["CODEX_API_KEY", "GH_AW_ASSETS_ALLOWED_EXTS", "GH_AW_ASSETS_BRANCH", "GH_AW_ASSETS_MAX_SIZE_KB", "GH_AW_SAFE_OUTPUTS", "GITHUB_PERSONAL_ACCESS_TOKEN", "GITHUB_REPOSITORY", "GITHUB_SERVER_URL", "GITHUB_TOKEN", "HOME", "OPENAI_API_KEY", "PATH"] - [mcp_servers.agentic_workflows] + [mcp_servers.agenticworkflows] container = "localhost/gh-aw:dev" mounts = ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"] env_vars = ["DEBUG", "GH_TOKEN", "GITHUB_TOKEN"] @@ -623,7 +623,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/dev-hawk.lock.yml b/.github/workflows/dev-hawk.lock.yml index e847c4c14c2..cc8511bfe47 100644 --- a/.github/workflows/dev-hawk.lock.yml +++ b/.github/workflows/dev-hawk.lock.yml @@ -442,7 +442,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/example-workflow-analyzer.lock.yml b/.github/workflows/example-workflow-analyzer.lock.yml index 9c267e093db..18a329072b0 100644 --- a/.github/workflows/example-workflow-analyzer.lock.yml +++ b/.github/workflows/example-workflow-analyzer.lock.yml @@ -459,7 +459,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index cac09b7fe50..76fcfcda567 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -536,7 +536,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml index edd31d8e7e5..633addca83a 100644 --- a/.github/workflows/metrics-collector.lock.yml +++ b/.github/workflows/metrics-collector.lock.yml @@ -239,7 +239,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/portfolio-analyst.lock.yml b/.github/workflows/portfolio-analyst.lock.yml index 7a52526dd1e..6adf69423ba 100644 --- a/.github/workflows/portfolio-analyst.lock.yml +++ b/.github/workflows/portfolio-analyst.lock.yml @@ -528,7 +528,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/prompt-clustering-analysis.lock.yml b/.github/workflows/prompt-clustering-analysis.lock.yml index 6e55702fb05..2fe4d1865da 100644 --- a/.github/workflows/prompt-clustering-analysis.lock.yml +++ b/.github/workflows/prompt-clustering-analysis.lock.yml @@ -526,7 +526,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 5fb9006e50e..ea8a41f546d 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -516,7 +516,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 1ad33fa0228..e782c649d10 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -565,7 +565,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/safe-output-health.lock.yml b/.github/workflows/safe-output-health.lock.yml index e7ccba655d9..f78d33e817d 100644 --- a/.github/workflows/safe-output-health.lock.yml +++ b/.github/workflows/safe-output-health.lock.yml @@ -478,7 +478,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/security-review.lock.yml b/.github/workflows/security-review.lock.yml index 2de6cf7f3fc..887960bb93e 100644 --- a/.github/workflows/security-review.lock.yml +++ b/.github/workflows/security-review.lock.yml @@ -556,7 +556,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index 39723676531..667c5e36d8b 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -1160,7 +1160,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 526af9a5978..e8ed1804b63 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -1148,7 +1148,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/.github/workflows/static-analysis-report.lock.yml b/.github/workflows/static-analysis-report.lock.yml index d0859cf463e..183b928d2a1 100644 --- a/.github/workflows/static-analysis-report.lock.yml +++ b/.github/workflows/static-analysis-report.lock.yml @@ -477,7 +477,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], "args": ["-w", "${{ github.workspace }}"], diff --git a/.github/workflows/workflow-normalizer.lock.yml b/.github/workflows/workflow-normalizer.lock.yml index 8a1d6f1c3fa..331e4528358 100644 --- a/.github/workflows/workflow-normalizer.lock.yml +++ b/.github/workflows/workflow-normalizer.lock.yml @@ -475,7 +475,7 @@ jobs: cat << MCPCONFIG_EOF | bash /opt/gh-aw/actions/start_mcp_gateway.sh { "mcpServers": { - "agentic_workflows": { + "agenticworkflows": { "type": "stdio", "container": "localhost/gh-aw:dev", "mounts": ["${{ github.workspace }}:${{ github.workspace }}:rw", "/tmp/gh-aw:/tmp/gh-aw:rw"], diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index 740ceeff73f..fcfdd9f5685 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -538,6 +538,9 @@ const SafeOutputsMCPServerID = "safeoutputs" // SafeInputsMCPServerID is the identifier for the safe-inputs MCP server const SafeInputsMCPServerID = "safeinputs" +// AgenticWorkflowsMCPServerID is the identifier for the agentic-workflows MCP server +const AgenticWorkflowsMCPServerID = "agenticworkflows" + // SafeInputsMCPVersion is the version of the safe-inputs MCP server const SafeInputsMCPVersion = "1.0.0" diff --git a/pkg/workflow/agentic_workflow_test.go b/pkg/workflow/agentic_workflow_test.go index a59d309292d..96cf55b8c26 100644 --- a/pkg/workflow/agentic_workflow_test.go +++ b/pkg/workflow/agentic_workflow_test.go @@ -6,6 +6,7 @@ import ( "strings" "testing" + "github.com/github/gh-aw/pkg/constants" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -121,8 +122,8 @@ func TestAgenticWorkflowsMCPConfigGeneration(t *testing.T) { result := yaml.String() // Verify the MCP config contains agentic-workflows - assert.Contains(t, result, "agentic_workflows", - "%s engine should generate MCP config with agentic_workflows server name", e.name) + assert.Contains(t, result, constants.AgenticWorkflowsMCPServerID, + "%s engine should generate MCP config with "+constants.AgenticWorkflowsMCPServerID+" server name", e.name) assert.Contains(t, result, "gh", "%s engine MCP config should use gh CLI command for agentic-workflows", e.name) assert.Contains(t, result, "mcp-server", diff --git a/pkg/workflow/importable_tools_test.go b/pkg/workflow/importable_tools_test.go index 30bb95abd82..fcdc184cb9b 100644 --- a/pkg/workflow/importable_tools_test.go +++ b/pkg/workflow/importable_tools_test.go @@ -8,8 +8,8 @@ import ( "strings" "testing" + "github.com/github/gh-aw/pkg/constants" "github.com/github/gh-aw/pkg/stringutil" - "github.com/github/gh-aw/pkg/testutil" "github.com/github/gh-aw/pkg/workflow" ) @@ -342,7 +342,7 @@ Uses all imported tools. t.Error("Expected compiled workflow to contain serena tool") } // Per MCP Gateway Specification v1.0.0, agentic-workflows uses containerized format - if !strings.Contains(workflowData, `"agentic_workflows"`) { + if !strings.Contains(workflowData, `"`+constants.AgenticWorkflowsMCPServerID+`"`) { t.Error("Expected compiled workflow to contain agentic-workflows tool") } diff --git a/pkg/workflow/mcp_config_builtin.go b/pkg/workflow/mcp_config_builtin.go index 10753adee7e..b2727e3d73a 100644 --- a/pkg/workflow/mcp_config_builtin.go +++ b/pkg/workflow/mcp_config_builtin.go @@ -170,7 +170,7 @@ func renderAgenticWorkflowsMCPConfigWithOptions(yaml *strings.Builder, isLast bo } // Use MCP Gateway spec format with container, entrypoint, entrypointArgs, and mounts - yaml.WriteString(" \"agentic_workflows\": {\n") + yaml.WriteString(" \"" + constants.AgenticWorkflowsMCPServerID + "\": {\n") // Add type field for Copilot (per MCP Gateway Specification v1.0.0, use "stdio" for containerized servers) if includeCopilotFields { @@ -286,7 +286,7 @@ func renderSafeOutputsMCPConfigTOML(yaml *strings.Builder) { // Uses MCP Gateway spec format: container, entrypoint, entrypointArgs, and mounts fields. func renderAgenticWorkflowsMCPConfigTOML(yaml *strings.Builder, actionMode ActionMode) { yaml.WriteString(" \n") - yaml.WriteString(" [mcp_servers.agentic_workflows]\n") + yaml.WriteString(" [mcp_servers." + constants.AgenticWorkflowsMCPServerID + "]\n") containerImage := constants.DefaultAlpineImage var entrypoint string diff --git a/pkg/workflow/mcp_config_refactor_test.go b/pkg/workflow/mcp_config_refactor_test.go index 34fe326f87a..72709fe6f93 100644 --- a/pkg/workflow/mcp_config_refactor_test.go +++ b/pkg/workflow/mcp_config_refactor_test.go @@ -5,6 +5,8 @@ package workflow import ( "strings" "testing" + + "github.com/github/gh-aw/pkg/constants" ) // TestRenderSafeOutputsMCPConfigWithOptions verifies the shared Safe Outputs config helper @@ -103,7 +105,7 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { includeCopilotFields: true, actionMode: ActionModeDev, expectedContent: []string{ - `"agentic_workflows": {`, + `"` + constants.AgenticWorkflowsMCPServerID + `": {`, `"type": "stdio"`, `"container": "localhost/gh-aw:dev"`, // Dev mode uses locally built image `"${{ github.workspace }}:${{ github.workspace }}:rw"`, // workspace mount (read-write) @@ -129,7 +131,7 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { includeCopilotFields: true, actionMode: ActionModeRelease, expectedContent: []string{ - `"agentic_workflows": {`, + `"` + constants.AgenticWorkflowsMCPServerID + `": {`, `"type": "stdio"`, `"container": "alpine:latest"`, `"entrypoint": "/opt/gh-aw/gh-aw"`, @@ -155,7 +157,7 @@ func TestRenderAgenticWorkflowsMCPConfigWithOptions(t *testing.T) { includeCopilotFields: false, actionMode: ActionModeDev, expectedContent: []string{ - `"agentic_workflows": {`, + `"` + constants.AgenticWorkflowsMCPServerID + `": {`, `"container": "localhost/gh-aw:dev"`, // Dev mode uses locally built image `"${{ github.workspace }}:${{ github.workspace }}:rw"`, // workspace mount (read-write) `"/tmp/gh-aw:/tmp/gh-aw:rw"`, // temp directory mount (read-write) @@ -300,7 +302,7 @@ func TestRenderAgenticWorkflowsMCPConfigTOML(t *testing.T) { result := output.String() expectedContent := []string{ - `[mcp_servers.agentic_workflows]`, + `[mcp_servers.` + constants.AgenticWorkflowsMCPServerID + `]`, tt.expectedContainer, `args = ["-w", "${{ github.workspace }}"]`, // Docker working directory `env_vars = ["DEBUG", "GITHUB_TOKEN"]`, diff --git a/pkg/workflow/mcp_renderer.go b/pkg/workflow/mcp_renderer.go index 90acfed0dd3..ac89743a75a 100644 --- a/pkg/workflow/mcp_renderer.go +++ b/pkg/workflow/mcp_renderer.go @@ -412,7 +412,7 @@ func (r *MCPConfigRendererUnified) RenderAgenticWorkflowsMCP(yaml *strings.Build // Per MCP Gateway Specification v1.0.0 section 3.2.1, stdio-based MCP servers MUST be containerized. func (r *MCPConfigRendererUnified) renderAgenticWorkflowsTOML(yaml *strings.Builder) { yaml.WriteString(" \n") - yaml.WriteString(" [mcp_servers.agentic_workflows]\n") + yaml.WriteString(" [mcp_servers." + constants.AgenticWorkflowsMCPServerID + "]\n") containerImage := constants.DefaultAlpineImage var entrypoint string diff --git a/pkg/workflow/mcp_renderer_test.go b/pkg/workflow/mcp_renderer_test.go index 0cbd6abbd7f..4a9e6fb68a0 100644 --- a/pkg/workflow/mcp_renderer_test.go +++ b/pkg/workflow/mcp_renderer_test.go @@ -5,6 +5,8 @@ package workflow import ( "strings" "testing" + + "github.com/github/gh-aw/pkg/constants" ) func TestNewMCPConfigRenderer(t *testing.T) { @@ -181,8 +183,8 @@ func TestRenderAgenticWorkflowsMCP_JSON_Copilot(t *testing.T) { if !strings.Contains(output, `"type": "stdio"`) { t.Error("Expected 'type': 'stdio' field per MCP Gateway Specification") } - if !strings.Contains(output, `"agentic_workflows": {`) { - t.Error("Expected agentic_workflows server ID") + if !strings.Contains(output, `"`+constants.AgenticWorkflowsMCPServerID+`": {`) { + t.Error("Expected " + constants.AgenticWorkflowsMCPServerID + " server ID") } // Per MCP Gateway Specification v1.0.0, stdio servers MUST use container format // In dev mode, should use locally built image @@ -255,8 +257,9 @@ func TestRenderAgenticWorkflowsMCP_TOML(t *testing.T) { output := yaml.String() // Verify TOML format (per MCP Gateway Specification v1.0.0) - if !strings.Contains(output, "[mcp_servers.agentic_workflows]") { - t.Error("Expected TOML section header") + expectedHeader := `[mcp_servers.` + constants.AgenticWorkflowsMCPServerID + `]` + if !strings.Contains(output, expectedHeader) { + t.Errorf("Expected TOML section header: %s", expectedHeader) } // Per MCP Gateway Specification v1.0.0, stdio servers MUST use container format // In dev mode, should use locally built image