refactor(agents): capabilities declare claims instead of hosts passing fallback (#2248)
* refactor(agents): capabilities declare claims instead of hosts passing fallback
Lifecycle capabilities declare how they claim traffic with
claims: "selective" | "catch-all" instead of the host passing
{ fallback: true } to lifecycle.use(). A catch-all always dispatches
last, whenever it was installed, and Lifecycle refuses a second one
since it could never be reached. WebSockets declares itself a
catch-all, so hosts no longer need to remember the flag.
LifecycleUseOptions is removed.
* fix(agents): WebSockets is a catch-all only when handlers claim plain upgrades
Without handlers the capability claims only callables RPC upgrades and
declines the rest, so declaring it a catch-all unconditionally would
block a real catch-all from installing.
* feat(agents): WebSockets accepts upgrades without handlers
Installing WebSockets should make WebSockets work. Without handlers the
capability now accepts and tracks every upgrade instead of declining
it; handlers only add behavior on connect, message, close and error.
That makes it an honest catch-all unconditionally.
* fix(agents): WebSockets never declines an upgrade
A callables RPC upgrade without a configured target is now refused by
the capability with a clear 404 instead of being declined, so the
catch-all claim holds for every upgrade. M
Matt committed
c96418d5334e1c0aa1fb1614de8ae0787753b3ff
Parent: 5f7ad7e
Committed by GitHub <noreply@github.com>
on 9/11/2026, 4:05:58 PM