diff --git a/.github/workflows/archie.lock.yml b/.github/workflows/archie.lock.yml index 54b8ab34af..443e5ab68e 100644 --- a/.github/workflows/archie.lock.yml +++ b/.github/workflows/archie.lock.yml @@ -153,18 +153,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Configure Git credentials diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml index a2eea82de2..5789b00534 100644 --- a/.github/workflows/cloclo.lock.yml +++ b/.github/workflows/cloclo.lock.yml @@ -181,20 +181,13 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Set up Go + uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 + with: + cache: true + go-version-file: go.mod - name: Install dependencies run: make deps-dev - env: diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index 7c1a096f7f..9bd4a6c95a 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -113,18 +113,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Configure Git credentials diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index b4befedbcb..d221ecaf0c 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -112,18 +112,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/duplicate-code-detector.lock.yml b/.github/workflows/duplicate-code-detector.lock.yml index a43f4ae2a2..4c3012c594 100644 --- a/.github/workflows/duplicate-code-detector.lock.yml +++ b/.github/workflows/duplicate-code-detector.lock.yml @@ -106,18 +106,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Configure Git credentials diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index ce98b5c9fb..390e947df2 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -112,18 +112,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/go-fan.lock.yml b/.github/workflows/go-fan.lock.yml index 1fc1e8db34..8f4a60cd94 100644 --- a/.github/workflows/go-fan.lock.yml +++ b/.github/workflows/go-fan.lock.yml @@ -111,18 +111,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/jsweep.lock.yml b/.github/workflows/jsweep.lock.yml index 4c31160069..09f226e490 100644 --- a/.github/workflows/jsweep.lock.yml +++ b/.github/workflows/jsweep.lock.yml @@ -113,14 +113,6 @@ jobs: with: node-version: '20' package-manager-cache: false - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install TypeScript language service - run: npm install -g --silent typescript-language-server typescript - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install Node.js dependencies diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index 06062f846f..3ab651c57d 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -127,10 +127,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - name: Setup Node.js uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: @@ -142,10 +138,13 @@ jobs: python-version: '3.12' - name: Setup uv uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Set up Go + uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 + with: + cache: true + go-version-file: go.mod - name: Install dependencies run: make deps-dev - env: diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 78417aa221..bd468f7df2 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -176,20 +176,13 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Set up Go + uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 + with: + cache: true + go-version-file: go.mod - name: Install dependencies run: make deps-dev - env: diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index e8f01e1901..fba0624e32 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -111,18 +111,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index d003a8351e..23b520c2d1 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -137,18 +137,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 67480648c5..08e5c3fc60 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -136,18 +136,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 65569adacf..710a2e5649 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -136,18 +136,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh # Cache memory file share configuration from frontmatter processed below diff --git a/.github/workflows/terminal-stylist.lock.yml b/.github/workflows/terminal-stylist.lock.yml index 05e7ebb7d0..ea4081ac5e 100644 --- a/.github/workflows/terminal-stylist.lock.yml +++ b/.github/workflows/terminal-stylist.lock.yml @@ -102,18 +102,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Configure Git credentials diff --git a/.github/workflows/typist.lock.yml b/.github/workflows/typist.lock.yml index 8868381403..3e6e06ce10 100644 --- a/.github/workflows/typist.lock.yml +++ b/.github/workflows/typist.lock.yml @@ -109,18 +109,6 @@ jobs: uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 with: persist-credentials: false - - name: Setup Go - uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 - with: - go-version: '1.25' - - name: Setup Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 - - name: Install Go language service (gopls) - run: go install golang.org/x/tools/gopls@latest - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Configure Git credentials diff --git a/pkg/workflow/importable_tools_test.go b/pkg/workflow/importable_tools_test.go index f9ad611523..edf29a8903 100644 --- a/pkg/workflow/importable_tools_test.go +++ b/pkg/workflow/importable_tools_test.go @@ -158,14 +158,14 @@ Uses imported serena tool. t.Error("Expected compiled workflow to contain serena Docker container") } - // Verify language service setup for Go - if !strings.Contains(workflowData, "Setup Go") { - t.Error("Expected compiled workflow to contain Go setup for serena") + // Verify that language service setup steps are NOT present + // since Serena now runs in a container with language services included + if strings.Contains(workflowData, "Install Go language service") { + t.Error("Did not expect Go language service installation step (Serena runs in container)") } - // Verify language service setup for TypeScript (Node.js) - if !strings.Contains(workflowData, "Setup Node.js") { - t.Error("Expected compiled workflow to contain Node.js setup for serena") + if strings.Contains(workflowData, "Install TypeScript language service") { + t.Error("Did not expect TypeScript language service installation step (Serena runs in container)") } } @@ -391,21 +391,20 @@ Uses imported serena with language config. t.Error("Expected compiled workflow to contain serena tool") } - // Verify Go setup with version - if !strings.Contains(workflowData, "Setup Go") { - t.Error("Expected compiled workflow to contain Go setup") + // Verify that language runtime setup steps are NOT present + // since Serena now runs in a container with language services included + if strings.Contains(workflowData, "Setup Go") { + t.Error("Did not expect Go setup step (Serena runs in container)") } - if !strings.Contains(workflowData, "go-version: '1.21'") { - t.Error("Expected compiled workflow to contain Go version 1.21") + + if strings.Contains(workflowData, "Setup Node.js") { + t.Error("Did not expect Node.js setup step (Serena runs in container)") } - // Verify Node.js setup with version - if !strings.Contains(workflowData, "Setup Node.js") { - t.Error("Expected compiled workflow to contain Node.js setup") + // Verify serena container is present + if !strings.Contains(workflowData, "ghcr.io/oraios/serena") { + t.Error("Expected serena to use Docker container") } - // Note: TypeScript version in serena config may use default Node.js version - // This is expected behavior as the TypeScript version configuration - // refers to Node.js version, and may fall back to defaults } // TestImportPlaywrightWithCustomArgs tests playwright with custom arguments diff --git a/pkg/workflow/mcp_config_comprehensive_test.go b/pkg/workflow/mcp_config_comprehensive_test.go index 4f3faea44b..12c2aa8f57 100644 --- a/pkg/workflow/mcp_config_comprehensive_test.go +++ b/pkg/workflow/mcp_config_comprehensive_test.go @@ -574,16 +574,10 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) { inlineArgs: false, expectedContent: []string{ `"serena": {`, - `"command": "uvx"`, - `"args": [`, - `"--from"`, - `"git+https://github.com/oraios/serena"`, - `"serena"`, + `"container": "ghcr.io/oraios/serena:latest"`, + `"entrypoint": "serena"`, + `"entrypointArgs"`, `"start-mcp-server"`, - `"--context"`, - `"codex"`, - `"--project"`, - `"${{ github.workspace }}"`, ` },`, }, unexpectedContent: []string{ @@ -599,7 +593,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) { inlineArgs: false, expectedContent: []string{ `"serena": {`, - `"command": "uvx"`, + `"container": "ghcr.io/oraios/serena:latest"`, ` }`, }, unexpectedContent: []string{ @@ -616,9 +610,8 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) { inlineArgs: false, expectedContent: []string{ `"serena": {`, - `"type": "local"`, - `"command": "uvx"`, - `"tools": ["*"]`, + `"type": "stdio"`, + `"container": "ghcr.io/oraios/serena:latest"`, }, unexpectedContent: []string{}, }, @@ -630,10 +623,9 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) { inlineArgs: true, expectedContent: []string{ `"serena": {`, - `"type": "local"`, - `"command": "uvx"`, - `"args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "codex", "--project", "${{ github.workspace }}"]`, - `"tools": ["*"]`, + `"type": "stdio"`, + `"container": "ghcr.io/oraios/serena:latest"`, + `"entrypointArgs": ["start-mcp-server", "--context", "codex", "--project", "${{ github.workspace }}"]`, }, unexpectedContent: []string{}, }, @@ -647,7 +639,7 @@ func TestRenderSerenaMCPConfigWithOptions(t *testing.T) { inlineArgs: false, expectedContent: []string{ `"serena": {`, - `"command": "uvx"`, + `"container": "ghcr.io/oraios/serena:latest"`, `"--verbose"`, `"--debug"`, }, diff --git a/pkg/workflow/runtime_detection.go b/pkg/workflow/runtime_detection.go index 90d479009d..27666d4325 100644 --- a/pkg/workflow/runtime_detection.go +++ b/pkg/workflow/runtime_detection.go @@ -129,14 +129,19 @@ func detectFromMCPConfigs(tools *ToolsConfig, requirements map[string]*RuntimeRe allTools := tools.ToMap() log.Printf("Scanning %d MCP configurations for runtime commands", len(allTools)) - // Special handling for Serena tool - detect language services - if tools.Serena != nil { - detectSerenaLanguages(tools.Serena, requirements) - } + // Note: Serena and other built-in MCP servers now run in containers and do not + // require runtime detection. Language services are provided inside the containers. // Scan custom MCP tools for runtime commands + // Skip containerized MCP servers as they don't need host runtime setup for _, tool := range tools.Custom { - // MCPServerConfig has a Command field directly + // Skip if the MCP server is containerized (has Container field set or Type is "docker") + if tool.Container != "" || tool.Type == "docker" { + runtimeSetupLog.Printf("Skipping runtime detection for containerized MCP server (container=%s, type=%s)", tool.Container, tool.Type) + continue + } + + // For non-containerized custom MCP servers, check the Command field if tool.Command != "" { if runtime, found := commandToRuntime[tool.Command]; found { updateRequiredRuntime(runtime, "", requirements) @@ -146,90 +151,18 @@ func detectFromMCPConfigs(tools *ToolsConfig, requirements map[string]*RuntimeRe } // detectSerenaLanguages detects runtime requirements from Serena language configuration +// NOTE: This function is now obsolete since Serena runs in a Docker container. +// Language services are provided inside the container and do not require host runtime setup. +// This function is kept for backward compatibility but returns immediately without action. func detectSerenaLanguages(serenaConfig *SerenaToolConfig, requirements map[string]*RuntimeRequirement) { if serenaConfig == nil { return } - runtimeSetupLog.Print("Detecting Serena language requirements") - - // First, ensure UV is detected (Serena requires uvx) - uvRuntime := findRuntimeByID("uv") - if uvRuntime != nil { - updateRequiredRuntime(uvRuntime, "", requirements) - } - - // Collect all languages from the configuration - var languages []string - - // Handle short syntax: ["go", "typescript"] - if len(serenaConfig.ShortSyntax) > 0 { - languages = serenaConfig.ShortSyntax - } else if serenaConfig.Languages != nil { - // Handle object syntax with languages field - for langName := range serenaConfig.Languages { - languages = append(languages, langName) - } - } - - runtimeSetupLog.Printf("Detected %d Serena languages: %v", len(languages), languages) - - // Map languages to runtime requirements - for _, lang := range languages { - switch lang { - case "go": - // Go language service requires Go runtime - goRuntime := findRuntimeByID("go") - if goRuntime != nil { - // Check if there's a version or go-mod-file specified in language config - version := "" - goModFile := "" - - // Access structured config directly - no type assertions needed! - if serenaConfig.Languages != nil { - if goConfig := serenaConfig.Languages["go"]; goConfig != nil { - version = goConfig.Version - goModFile = goConfig.GoModFile - } - } - - // Create requirement with go-mod-file if specified - req := &RuntimeRequirement{ - Runtime: goRuntime, - Version: version, - GoModFile: goModFile, - } - requirements[goRuntime.ID] = req - } - case "typescript": - // TypeScript language service requires Node.js runtime - nodeRuntime := findRuntimeByID("node") - if nodeRuntime != nil { - updateRequiredRuntime(nodeRuntime, "", requirements) - } - case "python": - // Python language service requires Python runtime - pythonRuntime := findRuntimeByID("python") - if pythonRuntime != nil { - updateRequiredRuntime(pythonRuntime, "", requirements) - } - case "java": - // Java language service requires Java runtime - javaRuntime := findRuntimeByID("java") - if javaRuntime != nil { - updateRequiredRuntime(javaRuntime, "", requirements) - } - case "rust": - // Rust language service - no runtime setup needed (uses rustup from Ubuntu) - // The language service (rust-analyzer) is typically installed separately - case "csharp": - // C# language service requires .NET runtime - dotnetRuntime := findRuntimeByID("dotnet") - if dotnetRuntime != nil { - updateRequiredRuntime(dotnetRuntime, "", requirements) - } - } - } + runtimeSetupLog.Print("Serena now runs in a container - skipping language service runtime detection") + // All Serena language services (Go, TypeScript, Python, Java, Rust, C#) are now + // provided inside the ghcr.io/oraios/serena:latest Docker container. + // No host runtime setup is needed. } // detectFromEngineSteps scans engine steps for runtime commands diff --git a/pkg/workflow/runtime_setup_order_test.go b/pkg/workflow/runtime_setup_order_test.go index 83625bb585..433a5ecc9e 100644 --- a/pkg/workflow/runtime_setup_order_test.go +++ b/pkg/workflow/runtime_setup_order_test.go @@ -1,17 +1,13 @@ package workflow import ( - "strings" "testing" ) // TestGenerateSerenaLanguageServiceStepsDeterministicOrder verifies that -// GenerateSerenaLanguageServiceSteps produces steps in a consistent order -// across multiple invocations, ensuring deterministic compilation +// GenerateSerenaLanguageServiceSteps returns no steps since Serena now runs in a container func TestGenerateSerenaLanguageServiceStepsDeterministicOrder(t *testing.T) { - // Create a Serena configuration with multiple languages in map form - // Maps have non-deterministic iteration order in Go, so this tests - // that we properly sort the languages before generating steps + // Create a Serena configuration with multiple languages tools := NewTools(map[string]any{ "serena": map[string]any{ "languages": map[string]any{ @@ -23,61 +19,10 @@ func TestGenerateSerenaLanguageServiceStepsDeterministicOrder(t *testing.T) { }, }) - // Generate steps multiple times and verify they're always in the same order - var firstResult []GitHubActionStep - const iterations = 10 + // Serena now runs in a container, so no language service steps should be generated + steps := GenerateSerenaLanguageServiceSteps(tools) - for i := 0; i < iterations; i++ { - steps := GenerateSerenaLanguageServiceSteps(tools) - - if i == 0 { - firstResult = steps - } else { - // Verify the order matches the first result - if len(steps) != len(firstResult) { - t.Errorf("Iteration %d: Got %d steps, expected %d", i, len(steps), len(firstResult)) - continue - } - - for j := range steps { - if len(steps[j]) != len(firstResult[j]) { - t.Errorf("Iteration %d, step %d: Got %d lines, expected %d", i, j, len(steps[j]), len(firstResult[j])) - continue - } - for k := range steps[j] { - if steps[j][k] != firstResult[j][k] { - t.Errorf("Iteration %d, step %d, line %d: Got %q, expected %q", i, j, k, steps[j][k], firstResult[j][k]) - } - } - } - } - } - - // Additionally verify that the steps are in alphabetical order by language - // Expected order: go, python, rust, typescript (alphabetically) - expectedLanguages := []string{"go", "python", "rust", "typescript"} - if len(firstResult) != len(expectedLanguages) { - t.Fatalf("Expected %d steps for languages %v, got %d steps", len(expectedLanguages), expectedLanguages, len(firstResult)) - } - - // Check that each step name contains the expected language in alphabetical order - for i, expectedLang := range expectedLanguages { - stepName := firstResult[i][0] // First line contains "- name: Install X language service" - - var langInStep string - switch expectedLang { - case "go": - langInStep = "Go" - case "python": - langInStep = "Python" - case "rust": - langInStep = "Rust" - case "typescript": - langInStep = "TypeScript" - } - - if !strings.Contains(stepName, langInStep) { - t.Errorf("Step %d should be for %s language, but got: %s", i, langInStep, stepName) - } + if len(steps) != 0 { + t.Errorf("Expected 0 steps since Serena runs in a container, got %d steps", len(steps)) } } diff --git a/pkg/workflow/runtime_step_generator.go b/pkg/workflow/runtime_step_generator.go index f283625426..c35dfaf374 100644 --- a/pkg/workflow/runtime_step_generator.go +++ b/pkg/workflow/runtime_step_generator.go @@ -18,83 +18,15 @@ func GenerateRuntimeSetupSteps(requirements []RuntimeRequirement) []GitHubAction } // GenerateSerenaLanguageServiceSteps creates installation steps for Serena language services -// This is called after runtime detection to install the language servers needed by Serena +// NOTE: This function is now obsolete since Serena runs in a Docker container. +// Language services are provided inside the container and do not require host installation. +// This function is kept for backward compatibility but returns an empty slice. func GenerateSerenaLanguageServiceSteps(tools *ToolsConfig) []GitHubActionStep { - runtimeSetupLog.Print("Generating Serena language service installation steps") - var steps []GitHubActionStep - - // Check if Serena is configured - if tools == nil || tools.Serena == nil { - return steps - } - - serenaConfig := tools.Serena - - // Collect all languages from the configuration - var languages []string - - // Handle short syntax: ["go", "typescript"] - if len(serenaConfig.ShortSyntax) > 0 { - languages = serenaConfig.ShortSyntax - } else if serenaConfig.Languages != nil { - // Handle object syntax with languages field - for langName := range serenaConfig.Languages { - languages = append(languages, langName) - } - } - - // Sort languages alphabetically to ensure deterministic order - sort.Strings(languages) - - runtimeSetupLog.Printf("Found %d Serena languages to install: %v", len(languages), languages) - - // Generate installation steps for each language service - for _, lang := range languages { - switch lang { - case "go": - // Install gopls for Go language service - // Check if there's a custom gopls version specified - goplsVersion := "latest" - if serenaConfig.Languages != nil { - if goConfig := serenaConfig.Languages["go"]; goConfig != nil && goConfig.GoplsVersion != "" { - goplsVersion = goConfig.GoplsVersion - } - } - steps = append(steps, GitHubActionStep{ - " - name: Install Go language service (gopls)", - fmt.Sprintf(" run: go install golang.org/x/tools/gopls@%s", goplsVersion), - }) - case "typescript": - // Install TypeScript language server - steps = append(steps, GitHubActionStep{ - " - name: Install TypeScript language service", - " run: npm install -g --silent typescript-language-server typescript", - }) - case "python": - // Install Python language server - steps = append(steps, GitHubActionStep{ - " - name: Install Python language service", - " run: pip install --quiet python-lsp-server", - }) - case "java": - // Java language service typically comes with the JDK setup - // No additional installation needed - runtimeSetupLog.Print("Java language service (jdtls) typically bundled with JDK, skipping explicit install") - case "rust": - // Install rust-analyzer for Rust language service - steps = append(steps, GitHubActionStep{ - " - name: Install Rust language service (rust-analyzer)", - " run: rustup component add rust-analyzer", - }) - case "csharp": - // C# language service typically comes with .NET SDK - // No additional installation needed - runtimeSetupLog.Print("C# language service (OmniSharp) typically bundled with .NET SDK, skipping explicit install") - } - } - - runtimeSetupLog.Printf("Generated %d Serena language service installation steps", len(steps)) - return steps + runtimeSetupLog.Print("Serena language services are now provided inside the container - no installation steps needed") + + // Return empty slice - no steps needed since Serena runs in a container + // with all language services pre-installed + return []GitHubActionStep{} } // generateSetupStep creates a setup step for a given runtime requirement