Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/archie.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/cloclo.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/daily-file-diet.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/developer-docs-consolidator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/duplicate-code-detector.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/glossary-maintainer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/go-fan.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/jsweep.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/mcp-inspector.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/q.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/repository-quality-improver.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/smoke-claude.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/smoke-codex.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/smoke-copilot.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/terminal-stylist.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/typist.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pkg/workflow/importable_tools_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ Uses imported serena tool.
if !strings.Contains(workflowData, "uvx --from git+https://github.com/oraios/serena") {
t.Error("Expected compiled workflow to use uvx to start Serena")
}
if !strings.Contains(workflowData, "http://localhost:9121") {
t.Error("Expected compiled workflow to contain Serena HTTP URL")
if !strings.Contains(workflowData, "http://host.docker.internal:9121") {
t.Error("Expected compiled workflow to contain Serena HTTP URL with host.docker.internal")
}

// Verify that language service setup steps ARE present
Expand Down Expand Up @@ -324,8 +324,8 @@ Uses all imported tools.
if !strings.Contains(workflowData, "mcr.microsoft.com/playwright/mcp") {
t.Error("Expected compiled workflow to contain playwright Docker image")
}
if !strings.Contains(workflowData, "http://localhost:9121") {
t.Error("Expected compiled workflow to contain Serena HTTP URL")
if !strings.Contains(workflowData, "http://host.docker.internal:9121") {
t.Error("Expected compiled workflow to contain Serena HTTP URL with host.docker.internal")
}
if !strings.Contains(workflowData, "example.com") {
t.Error("Expected compiled workflow to contain example.com domain for playwright")
Expand Down
6 changes: 4 additions & 2 deletions pkg/workflow/mcp-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ func renderPlaywrightMCPConfigWithOptions(yaml *strings.Builder, playwrightTool

// renderSerenaMCPConfigWithOptions generates the Serena MCP server configuration with engine-specific options
// Serena now runs using uvx with HTTP transport in the agent job (not containerized)
// The HTTP server is started in a background step and accessed via http://localhost:9121
// The HTTP server is started in a background step and accessed via http://host.docker.internal:9121
// Note: host.docker.internal is used because the MCP gateway runs in a container and needs to reach the host
func renderSerenaMCPConfigWithOptions(yaml *strings.Builder, serenaTool any, isLast bool, includeCopilotFields bool, inlineArgs bool) {
yaml.WriteString(" \"serena\": {\n")

Expand All @@ -157,7 +158,8 @@ func renderSerenaMCPConfigWithOptions(yaml *strings.Builder, serenaTool any, isL
}

// HTTP URL for Serena MCP server running on host
yaml.WriteString(" \"url\": \"http://localhost:9121\"\n")
// Use host.docker.internal so the gateway container can reach the host
yaml.WriteString(" \"url\": \"http://host.docker.internal:9121\"\n")

// Note: tools field is NOT included here - the converter script adds it back
// for Copilot. This keeps the gateway config compatible with the schema.
Expand Down
10 changes: 5 additions & 5 deletions pkg/workflow/mcp_config_comprehensive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) {
inlineArgs: false,
expectedContent: []string{
`"serena": {`,
`"url": "http://localhost:9121"`,
`"url": "http://host.docker.internal:9121"`,
` },`,
},
unexpectedContent: []string{
Expand All @@ -593,7 +593,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) {
inlineArgs: false,
expectedContent: []string{
`"serena": {`,
`"url": "http://localhost:9121"`,
`"url": "http://host.docker.internal:9121"`,
` }`,
},
unexpectedContent: []string{
Expand All @@ -612,7 +612,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) {
expectedContent: []string{
`"serena": {`,
`"type": "http"`,
`"url": "http://localhost:9121"`,
`"url": "http://host.docker.internal:9121"`,
},
unexpectedContent: []string{
`"container"`,
Expand All @@ -627,7 +627,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) {
expectedContent: []string{
`"serena": {`,
`"type": "http"`,
`"url": "http://localhost:9121"`,
`"url": "http://host.docker.internal:9121"`,
},
unexpectedContent: []string{
`"container"`,
Expand All @@ -644,7 +644,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) {
inlineArgs: false,
expectedContent: []string{
`"serena": {`,
`"url": "http://localhost:9121"`,
`"url": "http://host.docker.internal:9121"`,
},
unexpectedContent: []string{
`"container"`,
Expand Down
5 changes: 3 additions & 2 deletions pkg/workflow/mcp_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,12 @@ func (r *MCPConfigRendererUnified) RenderSerenaMCP(yaml *strings.Builder, serena

// renderSerenaTOML generates Serena MCP configuration in TOML format
// Serena now runs using uvx with HTTP transport in the agent job (not containerized)
// The HTTP server is started in a background step and accessed via http://localhost:9121
// The HTTP server is started in a background step and accessed via http://host.docker.internal:9121
// Note: host.docker.internal is used because the MCP gateway runs in a container and needs to reach the host
func (r *MCPConfigRendererUnified) renderSerenaTOML(yaml *strings.Builder, serenaTool any) {
yaml.WriteString(" \n")
yaml.WriteString(" [mcp_servers.serena]\n")
yaml.WriteString(" url = \"http://localhost:9121\"\n")
yaml.WriteString(" url = \"http://host.docker.internal:9121\"\n")
}

// RenderSafeOutputsMCP generates the Safe Outputs MCP server configuration
Expand Down