@procedures/peer 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @procedures/peer
2
2
 
3
+ ## 0.29.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @procedures/client@0.29.0
8
+
9
+ ## 0.28.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 345c740: `server.create` counts the procedures when `autoRegister` has its default (true). Before, `procedureCount` was 0 (second code audit, roadmap O57).
14
+ - 2572f41: The MCP face stays on its listener through the drain (roadmap CLI-74).
15
+
16
+ PATCH: a fix with no API change (D34).
17
+
18
+ - Before, the mount of the MCP face stopped at the stage `stop intake`. On the listener of a procedures host, the listener closed, and each request got its plain 503. Thus the answer of an elicitation and a cancel did not reach a call in progress.
19
+ - Now the handler of `mcpFace()` and `McpHost.handleHttp` have `until: "close transports"`, as a `RequestHandler` of `@mark1russell7/service/http`. The procedures host gives the `until` of the handler of each face to its mount.
20
+ - During the drain, the answer of an elicitation, a cancel and a ping reach the session. A new session and a new GET stream get the 503 of the face. A new tool call gets `UNAVAILABLE` from the server.
21
+ - The face ends the SSE stream of a cancelled call. The SDK sends no answer to a cancel, so that stream held the drain of the listener until its deadline.
22
+ - Mount `host.handleHttp` itself, for example `listener.mount(host.handleHttp)`. A function that wraps it loses `until`. The dev-tools server mounts it in this way.
23
+ - A change you can see: during a drain, a listener with the MCP face answers a new connection with 503 and `Retry-After` until the stage `close transports`. Before, the listener closed at the stage `stop intake`.
24
+ - Note on the stop time: the cap of the drain does not change, and a stream of the face does not hold the drain past its deadline. A listener with the MCP face now answers a new connection with 503 until the stage `close transports`, and does not refuse it. The test `mcp-stop.test.ts` of `@procedures/peer` measures each stop on the fake clock.
25
+ - Updated dependencies [345c740]
26
+ - Updated dependencies [984c13b]
27
+ - Updated dependencies [21dc858]
28
+ - @procedures/client@0.28.1
29
+
3
30
  ## 0.28.0
4
31
 
5
32
  ### Patch Changes
package/README.md CHANGED
@@ -148,6 +148,8 @@ const client = new Client({ transport: local.transport });
148
148
  ```
149
149
 
150
150
  - **The listeners.** The faces of a listener mount on its mount list, so they share one port. Without `listen`, the app mounts `host.handler` and `host.upgrade` on its own listener.
151
+ - A face sets the stage at which its mount stops with the property `until` of its handler, as a `RequestHandler` of the service does (CLI-74). The default is `stop intake`.
152
+ - The MCP face stays until `close transports`. Thus the listener stays open through the drain, and a call in progress gets the answer of an elicitation and its cancel.
151
153
  - **The request tracking.** Each call goes through `life.request`, with the route `<face> <procedure>`. The function of the pattern gives the idempotency of each call: a repeatable procedure, a keyed call, or a call that runs one time (decision D3).
152
154
  - **The readiness of the calls.** The option `controller.requires` names the dependencies of the service that each call needs. While a check of one of them fails readiness, the service refuses each call with `UNAVAILABLE` (CLI-45).
153
155
  - **The streams.** Each call is a stream, and a unary call is a stream of one (decision D4). A stream stays in flight until its end. A cut after the first item ends the stream with an error line. Each cut has the code `UNAVAILABLE`, and its flag `retryable` tells if a retry is safe (CLI-48). Before the first item, the HTTP face answers 503 for a retryable cut and 500 for another cut.
@@ -159,7 +161,7 @@ const client = new Client({ transport: local.transport });
159
161
  - `GET /_probes/startup`, `/_probes/readiness` and `/_probes/liveness` answer 200, or 503 with `Retry-After`. `/_probes/readiness/<controller>` gives the readiness of one controller.
160
162
  - The probes answer each caller without the token and the browser checks. They give only the status. Each other path goes to the faces, with the token and the browser checks as before.
161
163
  - A listener does not answer the report (`/_probes/report`), because it names the checks and the dependencies. `host.health` gives the details with the token.
162
- - The probes stop when the intake stops. Then the listener closes, as without the probes, and a new connection is refused. `probes: { until: "close transports" }` keeps the listener open through the drain: the probes answer 503, and each other request gets 503 with `Retry-After`.
164
+ - The probes stop when the intake stops. Then the listener closes, as without the probes, and a new connection is refused. `probes: { until: "close transports" }` keeps the listener open through the drain: the probes answer 503, and each other request gets 503 with `Retry-After`. A face until `close transports` keeps the listener open in the same way, for example the MCP face (CLI-74).
163
165
  - `probes: { prefix }` changes the prefix. `probes: false` turns the probes off, for example when the process has a probe server on a port of its own (`probeServer()`, or the option `probes` of `runProcedureHost()`).
164
166
  - `host.info.probes()` gives the base URL of the probes on each listener. Without `listen`, the app mounts `probeHandler()` on its own listener.
165
167