Compose N policies into a single pipeline. The first policy in the
array is the outermost wrapper — it sees the request before any
inner policy gets to decorate it, and sees the result last.
Example: new CompositePolicy([rate, auth, transient]).run(fetch)
runs as rate(auth(transient(fetch))). A transient 5xx is retried
first; a 401 on the last attempt triggers auth-retry; a 429 in any
branch hits the rate-limit gate outermost.
Compose N policies into a single pipeline. The first policy in the array is the outermost wrapper — it sees the request before any inner policy gets to decorate it, and sees the result last.
Example:
new CompositePolicy([rate, auth, transient]).run(fetch)runs asrate(auth(transient(fetch))). A transient 5xx is retried first; a 401 on the last attempt triggers auth-retry; a 429 in any branch hits the rate-limit gate outermost.An empty composite is a no-op pass-through.