You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(vmcp): unify composite tools and optimizer as session decorators
Both composite tools and the optimizer now implement the MultiSession
decorator pattern (same as hijackPreventionDecorator) rather than having
bespoke SDK wiring in handleSessionRegistrationImpl.
New session decorators:
- session/compositetools: appends composite tools to Tools(), routes
their CallTool invocations to per-session workflow executors
- session/optimizerdec: replaces Tools() with [find_tool, call_tool];
find_tool routes through the optimizer, call_tool delegates to the
underlying session for normal backend routing
sessionmanager.Manager gains DecorateSession() to swap in a wrapped
session after creation. handleSessionRegistrationImpl becomes a flat
decoration sequence (apply compositetools → apply optimizer → register
tools) with no branching on optimizer vs non-optimizer paths.
adapter.WorkflowExecutor/WorkflowResult become type aliases for the
compositetools package types so the two layers share a single definition.
adapter.CreateOptimizerTools is deleted; its logic lives in optimizerdec.
0 commit comments