Files
serena/docs/01-about
ab67ecab3b feat: add mSL (mIRC Scripting Language) support (#1315)
* feat: add mSL (mIRC Scripting Language) support

Add language server support for mIRC Scripting Language (.mrc files).
mSL is used in mIRC and AdiIRC IRC clients for scripting bots, games,
and automation.

The implementation uses a custom Python-based LSP server (pygls) that
parses aliases, events, menus, dialogs, and CTCP handlers. Dependencies
(pygls, lsprotocol) are installed in an isolated venv on first use.

Includes test repo, integration tests, and documentation updates.

* style: apply ruff formatting to msl_language_server.py

* fix: remove INITIALIZE handler that crashes pygls 2.x

pygls 2.x handles the initialize request internally. Overriding
it via @server.feature(lsp.INITIALIZE) causes the LSP subprocess
to crash. Removing the handler lets pygls auto-advertise capabilities
based on registered features (document_symbol, workspace_symbol).

* fix: update embedded LSP script for pygls 2.x

pygls 2.x moved LanguageServer from pygls.server to pygls.lsp.server.
Update import and bump requirement from pygls>=1.3.0 to pygls>=2.0.0.

* refactor: ship mSL LSP as package module, not runtime disk write

Per maintainer feedback: the mSL LSP is a Python script, so it should
ship as a module inside the package rather than being written to disk
at runtime.

Changes:
- Extract embedded LSP script to msl_lsp_server.py (proper module)
- Simplify MslLanguageServer: remove venv creation, disk writes,
  _create_msl_lsp_files(). DependencyProvider now just returns
  sys.executable and launches the sibling module directly.
- Add pygls>=2.0.0 and lsprotocol>=2023.0.0 to pyproject.toml deps

* fix: regenerate uv.lock after upstream v1.1.0 merge

* feat(msl): add references, definitions, and expand test coverage

- Add textDocument/references handler for cross-file alias reference finding
- Add textDocument/definition handler for go-to-definition support
- Handle $ prefix on cursor position for mSL identifiers
- Fix pre-existing mypy error in agent.py (dict[str, object] -> dict[str, str | int])
- Add MSL to _LANGUAGE_PYTEST_MARKERS in conftest.py
- Add MSL parametrized cases to test_find_symbol_stable and test_find_symbol_references_stable
- Expand test repo with cross-file reference examples (main.mrc <-> utils.mrc)
- Add within-file and cross-file reference tests to test_msl_basic.py
- Update docs and CHANGELOG to reflect expanded capabilities

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: apply ruff formatting to msl_lsp_server.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(msl): add hover handler, fix cross-file references via filesystem scan

Root causes of 4 CI test failures:
- textDocument/hover was not implemented (test_find_symbol_stable needs it)
- references/workspace_symbol/definition only searched opened documents,
  missing files not explicitly opened by the client
- pygls.uris.to_fs_path returns lowercase drive letters on Windows,
  causing URI mismatch with the framework's repository path comparison

Fixes:
- Add textDocument/hover handler returning definition snippets in Markdown
- Add _get_all_mrc_files() to scan workspace filesystem for all .mrc files
- Read workspace roots from server.workspace (pygls 2.x API) instead of
  broken monkey-patching of server.lsp
- Use pathlib.Path.resolve() to normalize drive letter casing on Windows
- Simplify __main__ to just server.start_io()

All 12 tests pass locally (10 solidlsp + 2 serena_agent integration).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* MSL language: removed unnecessary Dep. provider

* Changelog

* deps

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Michael Panchenko <michael.panchenko@oraios-ai.de>
2026-04-13 08:47:51 +02:00
..
2025-11-09 06:19:25 +01:00