ServerCapabilities.forVersion

Return a copy of these capabilities with any field newer than the negotiated protocol version stripped, so the wire output only advertises capabilities that existed in (and were negotiated for) the peer's version. Mirrors Implementation.forVersion. The basic/lifecycle rule "Only use capabilities that were successfully negotiated" requires this: completions applies from 2025-03-26, tasks from 2025-11-25, and the extensions negotiation map is draft-only. tools/resources/ prompts/logging/experimental exist in every supported version.

struct ServerCapabilities
const @safe
forVersion