Repository navigation
Commit 799b422
Remove dead legacy session-registration path (#5622)
Now that #5445 (PR #5556) merged, Serve is the sole *Server constructor and always sets the
core, so the legacy `s.core == nil` session path is unreachable dead code. Stage 1 of the
dead-code removal tracked in #5621:
- handleSessionRegistrationImpl: drop the `if s.core != nil` conditional and the legacy
GetAdaptedTools/GetAdaptedResources registration tail — registration is now unconditionally
injectCoreSessionCapabilities.
- lazyInjectSessionTools: re-derive via serveSessionTools unconditionally (drop the
GetAdaptedTools fallback).
- Delete backend_enrichment.go (+test): withBackendEnrichment was guarded to s.core == nil,
a no-op on the Serve path.
- Delete the now-orphaned Manager.GetAdaptedTools/GetAdaptedResources/GetAdaptedPrompts and
the two SessionManager interface methods. GetAdaptedPrompts was never wired (prompts
unsupported), so it was already dead.
The discovery middleware + context seam, the session-factory aggregation mirrors, and the
server.New signature change are deferred to the follow-up stages in #5621.
Part of #5621.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent baa8bb4 commit 799b422
7 files changed
Lines changed: 23 additions & 2078 deletions
File tree
- pkg/vmcp/server
- sessionmanager
This file was deleted.
0 commit comments