Key under which the kernel terminal handler brands an IRequest
with a WebSocket upgrade intent.
Created with Symbol.for, not Symbol(), so two copies of this package in
one process resolve the same key — the SECURITY_METADATA
precedent.
The IRequest is the channel rather than IRequestContext.state, and that
is a correctness requirement rather than a preference: the HTTP adapter
holds the IRequest it built and hands to the framework handler, and never
sees the IRequestContext — the kernel creates the context internally and
discards it when the handler returns. There is no path by which a value
written to ctx.state could reach the adapter that must perform the
handshake.
Prefer setUpgradeIntent and upgradeIntentOf over
touching this directly; the symbol is exported so a custom adapter outside
@setu-ts/runtime can read the brand.
Key under which the kernel terminal handler brands an
IRequestwith a WebSocket upgrade intent.Created with
Symbol.for, notSymbol(), so two copies of this package in one process resolve the same key — theSECURITY_METADATAprecedent.The
IRequestis the channel rather thanIRequestContext.state, and that is a correctness requirement rather than a preference: the HTTP adapter holds theIRequestit built and hands to the framework handler, and never sees theIRequestContext— the kernel creates the context internally and discards it when the handler returns. There is no path by which a value written toctx.statecould reach the adapter that must perform the handshake.Prefer
setUpgradeIntentandupgradeIntentOfover touching this directly; the symbol is exported so a custom adapter outside@setu-ts/runtimecan read the brand.