| 1 | /** |
| 2 | * Direct service binding from the entry middleware to the raw user worker |
| 3 | * (`SERVICE_USER_WORKER`), bypassing any downstream fetch middlewares |
| 4 | * (`images:delivery`, `stream:router`, ...). |
| 5 | * |
| 6 | * The entry's `USER_WORKER` upstream binding points at the *next middleware |
| 7 | * in the chain*, and middlewares are fetch-only HTTP-path interceptors — a |
| 8 | * JSRPC call like `.email(...)` against one fails with "The RPC receiver |
| 9 | * does not implement the method". Non-fetch event dispatch (`queue()`, |
| 10 | * `scheduled()`, `email()`) therefore goes through this direct binding, |
| 11 | * mirroring Miniflare's RPCProxyWorker model where only `fetch` traverses |
| 12 | * the router chain and every other RPC method forwards straight to the user |
| 13 | * worker (`workers-sdk/packages/miniflare/src/workers/assets/rpc-proxy.worker.ts`). |
| 14 | */ |
| 15 | export const BINDING_USER_WORKER_DIRECT = "USER_WORKER_DIRECT"; |
| 16 | |
| 17 | /** Internal module-runner connection; routed directly to the Worker in dev. */ |
| 18 | export const PATH_MODULE_RUNNER_INIT = "/cdn-cgi/alchemy/module-runner/init"; |