Repository navigation
v1.4.0 — In-process LSP API + MCP code-inspection tools
ApolloVM 1.4.0 brings its Language Server features to two new audiences — web/agent embedders and MCP AI agents — with no socket or transport wiring required.
Highlights
- 🧩
LspService— in-process LSP API (no socket). Embed ApolloVM's language features as plain typed Dart calls:analyze,hover,definition,documentSymbols,completion,references,rename,workspaceSymbols, and adiagnosticsstream. No transport, noinitialize/initializedhandshake;dart:io-free, so it runs unchanged in the browser (compiled to JS). - 🤖 MCP code-inspection tools (
apollovm.lsp.*). The MCP server now lets an AI agent inspect a codebase the way an editor does — diagnostics, outline, hover, definition, references, completion and workspace-wide symbol search — with precise LSP line/character ranges.
MCP — code-inspection tools (LSP)
- The MCP server now exposes ApolloVM's LSP features as
apollovm.lsp.*tools, so an AI agent can inspect code the way an editor does. Results carry precise LSP line/character ranges.apollovm.lsp.diagnostics— errors/warnings with ranges.apollovm.lsp.symbols— document outline (nested symbols + ranges).apollovm.lsp.hover— signature, type and documentation at a position.apollovm.lsp.definition— declaration location at a position.apollovm.lsp.references— all references at a position.apollovm.lsp.completion— completion proposals at a position.apollovm.lsp.workspaceSymbols— symbol search across multiple in-memory files (codebase-wide lookup).
- Each tool is stateless and web-safe (backed by the in-process
LspService; no socket, nodart:io), runs in-process or inside an isolate like the other bounded tools, and honors the existingmaxSourceCharslimit. The parser is selected from thelanguageargument, so a mismatched URI cannot change it. - New public API in
package:apollovm/apollovm_mcp.dart:LspRuntime,buildLspTools,computeLspTool,isLspTool,lspToolNames. The CLIapollovm mcp callgained--line,--characterand--queryflags. - New example
example/apollovm_example_mcp_lsp.dart.
Language Server Protocol — in-process API (no socket)
- New
LspServiceinpackage:apollovm/apollovm_lsp.dart: a document-oriented facade that embeds an in-processLspServerand exposes the language features as plain typed Dart calls — no transport, no socket and noinitialize/initializedhandshake to run by hand. Beingdart:io-free it runs unchanged in a browser (compiled to JS) or an AI agent.- One-shot
analyze(uri, text)returns the buffer's diagnostics directly;open/change/closemanage documents (versions tracked automatically); every query resolves against the current buffer. - Typed helpers:
hover,definition,documentSymbols,completion,references,documentHighlight,prepareRename,rename,workspaceSymbols, plus adiagnosticsstream and aready(InitializeResult) future. LspService.wrap(client)layers the same convenience over an existingLspClient(e.g. one connected to a remote server).
- One-shot
- New example
example/apollovm_example_lsp_api.dart.
Full changelog: v1.3.0...v1.4.0