-
Notifications
You must be signed in to change notification settings - Fork 34
Add gh-aw-mcpg gateway support (replacing awmg) #9172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot enable the gateway for all the smoke tests. (including the one without the firewall) |
Enabled MCP gateway for all smoke tests in commit 29c657d. Added
|
|
@copilot can you regenerate all the workflow yamls and push them? |
Ran |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
❌ Firewall validation failed... Smoke Codex Firewall failed. Network sandboxing may not be working correctly. |
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
💀 Blimey! Smoke Copilot Safe Inputs failed and walked the plank! No treasure today, matey! ☠️ |
|
✅ Smoke Test Results - Copilot Engine (No Firewall) All tests passed successfully:
|
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
Smoke Test Results - Copilot Engine (No Firewall) ✅All tests passed successfully:
|
|
💫 TO BE CONTINUED... Smoke Claude failed! Our hero faces unexpected challenges... |
|
📰 VERDICT: Smoke Copilot Playwright has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🎉 Yo ho ho! Smoke Copilot Safe Inputs found the treasure and completed successfully! ⚓💰 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Firewall validation complete... Smoke Codex Firewall confirmed network sandboxing is operational. 🛡️ |
|
🤖 DIAGNOSTIC COMPLETE: Smoke Copilot No Firewall STATUS: ALL_UNITS_OPERATIONAL. MISSION_SUCCESS. |
|
✅ Smoke test passed - All 4 tests successful:
|
|
Let's restart from the spec. If need, update spec, the update code. |
9bc98b8 to
402fed6
Compare
Adds foundation for gh-aw-mcpg as the MCP gateway, running as a Docker container on port 80 with HTTP transport for AWF containers to access via
host.docker.internal.Changes
Gateway Core (
pkg/workflow/gateway.go)GenerateMCPGatewayDockerCommands()- Docker run command generation with socket mount, port mapping, and routed modeTransformMCPConfigForGateway()- Converts MCP server configs to HTTP transport with Bearer authValidateGatewayVersion()- Rejectslatesttag for reproducibilityIsMCPGatewayEnabled()- Checks AWF + MCP server conditionsConfiguration
MCPfield toSandboxConfigfor gateway config in frontmatterSessionTokenfield toMCPGatewayRuntimeConfigv0.1.0Validation
validateSandboxConfig()v, cannot be empty orlatestHealth Check
verify_mcp_gateway_health.shfor Docker container checksawf-session)Smoke Tests
sandbox.mcp.version: v0.1.0) for all smoke test workflows:Example Usage
Generates Docker command:
cat /tmp/gh-aw/mcpg-config.json | docker run \ --rm -i --name gh-aw-mcpg \ -v /var/run/docker.sock:/var/run/docker.sock \ -p 80:8000 \ --add-host host.docker.internal:host-gateway \ ghcr.io/githubnext/gh-aw-mcpg:v0.1.0 \ --routed --listen 0.0.0.0:8000 --config-stdinAnd transforms client config to HTTP transport:
{ "github": { "type": "http", "url": "http://host.docker.internal/mcp/github", "headers": { "Authorization": "Bearer awf-session" } } }Original prompt
Implementation Plan: Replace awmg with gh-aw-mcpg
This plan modifies the gh-aw compiler to use gh-aw-mcpg as the MCP gateway instead of awmg, working together with AWF (Agentic Workflow Firewall).
Overview
Current State:
Target State:
host.docker.internaltype: "http"with Bearer token authenticationArchitecture Diagram
Phase 1: Update Gateway Constants and Types
1.1 Update Constants (
pkg/workflow/gateway.go)CRITICAL: All container versions MUST be pinned to specific tags, never use
latest.1.2 Update MCPGatewayRuntimeConfig (
pkg/workflow/tools_types.go)Add new field for session token:
Phase 2: Rewrite Gateway Start Step Generation
2.1 Replace
generateDefaultAWMGCommands()with gh-aw-mcpg DockerFile:
pkg/workflow/gateway.goReplace the default awmg binary commands with gh-aw-mcpg Docker container:
Key Docker flags:
-v /var/run/docker.sock:/var/run/docker.sock- Mount Docker socket for spawning backend MCP servers-p 80:8000- Map host port 80 to container port 8000--add-host host.docker.internal:host-gateway- Enable host access from gateway container-e GITHUB_PERSONAL_ACCESS_TOKEN- Pass through token for GitHub MCP server--routed- Use routed mode with/mcp/{serverID}endpoints--config-stdin- Read config from stdin (piped)2.2 Version Pinning Validation
Add compile-time validation to prevent
latesttag: