Skip to content

feat(cdk-explorer): advertise LSP feature and protocol manifest#1750

Merged
megha-narayanan merged 2 commits into
mainfrom
meghabit/lsp-versioning
Jul 22, 2026
Merged

feat(cdk-explorer): advertise LSP feature and protocol manifest#1750
megha-narayanan merged 2 commits into
mainfrom
meghabit/lsp-versioning

Conversation

@megha-narayanan

Copy link
Copy Markdown
Contributor

The CDK Language Server now advertises a capability manifest on initialize: a protocol version, a named feature list, and the supported commands, exposed via serverInfo and capabilities.experimental.cdk. A new 'cdk lsp --features' flag prints the same manifest as JSON and exits, so a client can probe LSP presence and capabilities without opening a session.

This lets clients gate features by name rather than inferring them from the CDK CLI version. A test guards the advertised feature list against drift from the real server capabilities.

Fixes #

Checklist

  • This change contains a major version upgrade for a dependency and I confirm all breaking changes are addressed
    • Release notes for the new version:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The CDK Language Server now advertises a capability manifest on initialize: a protocol version, a named feature list, and the supported commands, exposed via serverInfo and capabilities.experimental.cdk. A new 'cdk lsp --features' flag prints the same manifest as JSON and exits, so a client can probe LSP presence and capabilities without opening a session.

This lets clients gate features by name rather than inferring them from the CDK CLI version. A test guards the advertised feature list against drift from the real server capabilities.
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

…ng an import cycle

Sourcing the manifest version by importing VERSION from the package barrel created an index -> lsp/features import cycle that node-backpack rejects at bundle time. The CDK CLI now injects its own versionNumber() into startLspServer and cdk lsp --features, and the manifest takes version as a parameter. This removes the cycle and reports the real CLI version rather than the library's placeholder.
@megha-narayanan
megha-narayanan added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 70cf0e3 Jul 22, 2026
45 checks passed
@megha-narayanan
megha-narayanan deleted the meghabit/lsp-versioning branch July 22, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants