Commit de26188
authored
Configure TypeScript and Python language servers in Serena container (#809)
Serena container's `.serena/project.yml` only configured Go, causing
TypeScript and Python language server analysis to return empty results.
## Changes
- **Initialization script**: Added `/usr/local/bin/serena-init.sh` that
auto-generates `.serena/project.yml` with all three languages on
container startup
- **ENTRYPOINT**: Changed from direct `serena-mcp-server` execution to
wrapper script
- **Idempotent logic**: Script checks for each language individually
with anchored patterns (`^- go$`, `^- typescript$`, `^- python$`) and
only recreates config when any language is missing
```bash
#!/bin/bash
set -e
mkdir -p /workspace/.serena
if [ ! -f /workspace/.serena/project.yml ] || \
! grep -q "^- go$" /workspace/.serena/project.yml || \
! grep -q "^- typescript$" /workspace/.serena/project.yml || \
! grep -q "^- python$" /workspace/.serena/project.yml; then
printf "languages:\n- go\n- typescript\n- python\n" > /workspace/.serena/project.yml
fi
exec serena-mcp-server "$@"
```
Language servers (gopls, typescript-language-server, pyright) were
already installed but not configured for project-level analysis.
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>[language-support] TypeScript and Python language servers
not configured in Serena project</issue_title>
> <issue_description>## Summary
>
> The language-support-tester workflow declares support for Go,
TypeScript, and Python in the workflow configuration, but the Serena MCP
server project is only configured with Go language support. This
prevents TypeScript and Python code analysis from working.
>
> ## Test Results
>
> ### ✅ Go Language Support: **WORKING**
> - Successfully found symbols using `find_symbol`
> - Successfully analyzed Go files using `get_symbols_overview`
> - Successfully found references using `find_referencing_symbols`
> - Tested with: `main.go`, `version.go`, `main_test.go`
>
> ### ❌ TypeScript/JavaScript Language Support: **NOT WORKING**
> - Created test TypeScript file with classes, interfaces, and functions
> - `find_symbol` returned empty results `[]`
> - `get_symbols_overview` returned empty object `{}`
> - Language server not analyzing TypeScript/JavaScript files
>
> ### ❌ Python Language Support: **NOT WORKING**
> - Created test Python file with classes and functions
> - `find_symbol` returned empty results `[]`
> - `get_symbols_overview` returned empty object `{}`
> - Language server not analyzing Python files
>
> ## Root Cause
>
> The `.serena/project.yml` configuration file only includes Go:
>
> ``````yaml
> languages:
> - go
> ``````
>
> However, the workflow configuration at
`.github/workflows/language-support-tester.md` declares:
>
> ``````yaml
> tools:
> serena: ["go", "typescript", "python"]
> ``````
>
> ## Expected Behavior
>
> The Serena project configuration should include all three languages:
>
> ``````yaml
> languages:
> - go
> - typescript
> - python
> ``````
>
> ## Additional Issues
>
> The test sample directories referenced in the task specification do
not exist:
> - Missing: `/workspace/test/serena-mcp-tests/samples/js_project/`
> - Missing: `/workspace/test/serena-mcp-tests/samples/python_project/`
>
> These directories should be created with representative test files for
proper integration testing.
>
> ## Steps to Reproduce
>
> 1. Run the language-support-tester workflow
> 2. Attempt to analyze TypeScript or Python files using Serena tools
> 3. Observe that symbol finding and analysis return empty results
>
> ## Recommended Actions
>
> 1. Update `.serena/project.yml` to include TypeScript and Python in
the `languages` list
> 2. Create test sample directories with representative TypeScript and
Python code
> 3. Re-run the language support tests to verify all three languages
work correctly
>
>
>
>
> > AI generated by [Language Support
Tester](https://github.com/github/gh-aw-mcpg/actions/runs/21778809095)
> > - [x] expires <!-- gh-aw-expires: 2026-02-14T10:47:32.483Z --> on
Feb 14, 2026, 10:47 AM UTC
>
> <!-- gh-aw-agentic-workflow: Language Support Tester, engine: copilot,
run: https://github.com/github/gh-aw-mcpg/actions/runs/21778809095 -->
>
> <!-- gh-aw-workflow-id: language-support-tester
--></issue_description>
>
> <agent_instructions>Fix the serena Dockerfile</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
> **Custom agent used: agentic-workflows**
> GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade
AI-powered workflows with intelligent prompt routing
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes #801
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).2 files changed
Lines changed: 36 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
56 | 78 | | |
57 | 79 | | |
58 | 80 | | |
| |||
72 | 94 | | |
73 | 95 | | |
74 | 96 | | |
75 | | - | |
76 | | - | |
| 97 | + | |
| 98 | + | |
77 | 99 | | |
78 | 100 | | |
0 commit comments