Sitelet https://github.com/stacklok/toolhive/commit/799b422239195d95407e872a884123dadbaeadc0
Skip to content

Commit 799b422

Browse files
tgrunnagleclaude
andauthored
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/backend_enrichment.go‎

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)