You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a912170
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(middleware): give HTTP hook RPCs package-unique names
Mirror bc90d94 from #4359: rename HttpHooks.EvaluateRequest and
EvaluateResponse to EvaluateHttpRequestHook and EvaluateHttpResponseHook,
and document in supervisor_middleware.proto that RPC names must be unique
across the package's services.
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Copy file name to clipboardExpand all lines: docs/extensibility/supervisor-middleware/operations.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ A middleware service handles one or more operations, such as HTTP requests or We
14
14
15
15
| Operation | Phase | When OpenShell calls your service | RPC |
16
16
| --- | --- | --- | --- |
17
-
|`HTTP_REQUEST`|`PRE_CREDENTIALS`| After network policy allows a request, before OpenShell injects provider credentials. |`HttpHooks.EvaluateRequest`, or legacy `EvaluateHttpRequest`|
18
-
|`HTTP_RESPONSE`|`PRE_RETURN`| After the external service responds, before the sandbox receives the response. |`HttpHooks.EvaluateResponse`, or legacy `HttpResponsePreReturn.Evaluate`|
17
+
|`HTTP_REQUEST`|`PRE_CREDENTIALS`| After network policy allows a request, before OpenShell injects provider credentials. |`HttpHooks.EvaluateHttpRequestHook`, or legacy `EvaluateHttpRequest`|
18
+
|`HTTP_RESPONSE`|`PRE_RETURN`| After the external service responds, before the sandbox receives the response. |`HttpHooks.EvaluateHttpResponseHook`, or legacy `HttpResponsePreReturn.Evaluate`|
19
19
|`WEBSOCKET_MESSAGE`|`PRE_CREDENTIALS`| When the sandbox opens a WebSocket connection, and for each text message it sends. |`EvaluateWebSocketSession`|
20
20
21
21
Your service declares each operation it supports as a binding, an operation and its phase, in its `Describe` manifest. OpenShell calls your service only for the operations it declares.
@@ -42,7 +42,7 @@ OpenShell never forwards free-form text from your service to the sandbox or to l
42
42
43
43
## HTTP
44
44
45
-
HTTP middleware inspects requests before OpenShell injects provider credentials and responses before the sandbox receives them. Implement `HttpHooks.EvaluateRequest` for `HTTP_REQUEST`, `HttpHooks.EvaluateResponse` for `HTTP_RESPONSE`, or both.
45
+
HTTP middleware inspects requests before OpenShell injects provider credentials and responses before the sandbox receives them. Implement `HttpHooks.EvaluateHttpRequestHook` for `HTTP_REQUEST`, `HttpHooks.EvaluateHttpResponseHook` for `HTTP_RESPONSE`, or both.
46
46
47
47
Serve `HttpHooks` on the same endpoint as `SupervisorMiddleware`, which handles discovery and configuration. Each RPC invocation serves one binding phase, identified by `phase` in its preflight. Requests currently use `PRE_CREDENTIALS`; responses use `PRE_RETURN`.
Copy file name to clipboardExpand all lines: rfc/0009-supervisor-middleware/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ links:
19
19
|------|------------|--------|
20
20
| 2026-07-17 |[#2010](https://github.com/NVIDIA/OpenShell/issues/2010)| Added unary HTTP request middleware with built-in and operator-run services. |
21
21
| 2026-07-28 |[#2428](https://github.com/NVIDIA/OpenShell/issues/2428)| Added WebSocket preflight and text-message evaluation, and aligned the middleware API names, limits, and diagnostics. |
22
-
| 2026-10-08 |[#2431](https://github.com/NVIDIA/OpenShell/issues/2431), [#3307](https://github.com/NVIDIA/OpenShell/issues/3307)| Added HTTP hooks (`HttpHooks.EvaluateRequest` and `HttpHooks.EvaluateResponse`), selected by a required extension capability, with buffered and streamed bodies, and deprecated legacy HTTP hooks. |
22
+
| 2026-10-08 |[#2431](https://github.com/NVIDIA/OpenShell/issues/2431), [#3307](https://github.com/NVIDIA/OpenShell/issues/3307)| Added HTTP hooks (`HttpHooks.EvaluateHttpRequestHook` and `HttpHooks.EvaluateHttpResponseHook`), selected by a required extension capability, with buffered and streamed bodies, and deprecated legacy HTTP hooks. |
23
23
24
24
## Summary
25
25
@@ -305,7 +305,7 @@ The `originating_process` is the same identity OpenShell resolves on the egress
305
305
306
306
#### HTTP hooks
307
307
308
-
-**RPCs.**`HttpHooks.EvaluateRequest` and `HttpHooks.EvaluateResponse` are bidirectional streams, each with its own event and result messages. One stream serves one stage for one HTTP message.
308
+
-**RPCs.**`HttpHooks.EvaluateHttpRequestHook` and `HttpHooks.EvaluateHttpResponseHook` are bidirectional streams, each with its own event and result messages. One stream serves one stage for one HTTP message.
309
309
-**Lifecycle.** Each stream starts with a preflight. The stage then continues without the body, rejects, or inspects the body as one `WHOLE_BODY` message or as a `DUPLEX` stream. HTTP preflights handle HTTP messages only, so connections OpenShell cannot inspect follow the chain-level rule above.
310
310
-**Limits.** A `DUPLEX` stream has no total time or size limit, unless the route buffers request output before upstream contact. Then the preflight reports the route's own buffering limit as `max_output_body_bytes`, such as 10 MiB for SigV4 body signing.
311
311
-**Failure behavior.** HTTP hooks always fail closed. The gateway rejects `on_error: fail_open` for them.
0 commit comments