-
Notifications
You must be signed in to change notification settings - Fork 39
feat(cli): add lsp and mcp commands
#1523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new CLI entrypoints for elide lsp and elide mcp, extends the project manifest with development and LSP settings, and refactors the engine/context API to support shared vs. isolated contexts.
- Add
devsection with LSP settings to project manifest - Refactor GraalVM engine API to accept a
sharedflag and exposeinitializeDefaultContext - Implement MCP and LSP subcommands, options, and update dependencies
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/tooling/.../ElidePackageManifest.kt | Add DevSettings, LspSettings, and ProjectSourceSpec |
| packages/graalvm/.../GraalVMEngine.kt | Refactor createContext to support shared flag |
| packages/engine/.../AbstractLanguagePlugin.kt | Change initializeDefaultContext extension to public |
| packages/engine/.../PolyglotEngine.kt | Add overloads for acquire(shared, ...) |
| packages/graalvm/api/graalvm.api | Update acquire signature for shared parameter |
| packages/engine/api/engine.api | Mirror overloads in the public API |
| packages/cli/src/main/pkl/Dev.pkl | Document LSP settings in Pkl DSL |
| packages/cli/.../McpOptions.kt | Introduce MCP CLI options |
| packages/cli/.../LspOptions.kt | Add LSP CLI options |
| packages/cli/.../McpCommand.kt | Implement mcp command |
| packages/cli/.../LspCommand.kt | Implement lsp command |
| packages/cli/.../Elide.kt | Register LspCommand and McpCommand |
| packages/cli/.../AbstractSubcommand.kt | Extend context resolution with shared and cfg flags |
| packages/cli/build.gradle.kts | Add mcp and GraalVM LSP dependencies |
| gradle/elide.versions.toml | Pin mcp SDK and dependencies |
Comments suppressed due to low confidence (2)
packages/cli/src/main/kotlin/elide/tool/cli/options/LspOptions.kt:61
- [nitpick] The comment above
lspDelegatesis incorrect (it repeats the internals description). Update it to describe delegate servers (e.g., "Add delegate LSP servers").
/** Enable internal sources via LSP. */
packages/graalvm/src/main/kotlin/elide/runtime/core/internals/graalvm/GraalVMEngine.kt:76
- The
finalizerparameter is declared but never used; consider invokingfinalizer(builder)when constructing the context or removing the unused parameter to keep the API clean.
private fun createContext(
packages/cli/src/main/kotlin/elide/tool/cli/cmd/dev/LspCommand.kt
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1523 +/- ##
==========================================
- Coverage 40.52% 40.37% -0.15%
==========================================
Files 713 717 +4
Lines 33291 33463 +172
Branches 4624 4646 +22
==========================================
+ Hits 13491 13511 +20
- Misses 18225 18375 +150
- Partials 1575 1577 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
886afd2 to
f07ec3b
Compare
feat(cli): implement `elide lsp` command feat(cli): implement `elide mcp` command feat(cli): add lsp-specific options to cli feat(cli): add mcp-specific options to cli Signed-off-by: Sam Gammon <sam@elide.dev>
f07ec3b to
3a58da9
Compare
Summary
Adds simple entrypoints for
elide lspandelide mcp. LSP is pretty simple, and MCP only supports stdio for now (servers need Ktor). MCP is preloaded with access to the Elide project config, but not much else yet.Changelog