The collision check Middleware applies: resolves to Handler when every contributed key is free on Base, and otherwise to a Conflict sentinel naming the colliding key — a union of them where several collide.
Accepts either a single literal key (NoConflict<'flag', Base, H>) or a contributions record (NoConflict<{ flag: boolean }, Base, H>), so the same type serves Middleware and Composite.
Site it on the handler parameter, not the Base constraint. TypeScript substitutes a failed constraint silently but prints a failed parameter verbatim, so on the parameter the sentinel's text reaches the reader and the error is reported on the offending call rather than the one enclosing it. pipeline has always taken this route (see ValidateEntries); the Middleware overloads are the nesting equivalent.
Reuse it in a middleware with a bespoke generic signature (e.g. one that adds a Payload type parameter) by wrapping the handler parameter and leaving the Base constraint to In & BaseContext:
<Base extends In & BaseContext>(
handler: NoConflict<Key, Base, (req: Request, ctx: Base & …) => Promise<Response>>,
): Produced<Base, In>
Every overload that can accept the handler needs the wrap. One left unguarded will accept the call the guarded one rejected, resolve its own Base to something unusable, and push the error back out to the enclosing call — which is the failure mode this type exists to remove.