@procedures/client 0.37.0 → 0.39.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 +43 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/adapters/http/server/handler.js +3 -2
- package/dist/adapters/http/server/handler.js.map +1 -1
- package/dist/adapters/websocket/client/transport.d.ts +1 -1
- package/dist/adapters/websocket/client/transport.d.ts.map +1 -1
- package/dist/adapters/websocket/client/transport.js +18 -6
- package/dist/adapters/websocket/client/transport.js.map +1 -1
- package/dist/browser.d.ts +2 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +2 -1
- package/dist/browser.js.map +1 -1
- package/dist/client/validation/types.d.ts.map +1 -1
- package/dist/client/validation/types.js +1 -0
- package/dist/client/validation/types.js.map +1 -1
- package/dist/procedures/collection/schemas.d.ts.map +1 -1
- package/dist/procedures/collection/schemas.js +1 -0
- package/dist/procedures/collection/schemas.js.map +1 -1
- package/dist/procedures/envelope.d.ts.map +1 -1
- package/dist/procedures/envelope.js +2 -0
- package/dist/procedures/envelope.js.map +1 -1
- package/dist/procedures/policy.js +2 -2
- package/dist/procedures/policy.js.map +1 -1
- package/dist/procedures/program.d.ts.map +1 -1
- package/dist/procedures/program.js +3 -0
- package/dist/procedures/program.js.map +1 -1
- package/dist/procedures/ref.d.ts.map +1 -1
- package/dist/procedures/ref.js +1 -0
- package/dist/procedures/ref.js.map +1 -1
- package/dist/procedures/types.d.ts +1 -1
- package/dist/procedures/types.d.ts.map +1 -1
- package/dist/procedures/types.js.map +1 -1
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/procedure-server.d.ts +0 -9
- package/dist/server/procedure-server.d.ts.map +1 -1
- package/dist/server/procedure-server.js +2 -9
- package/dist/server/procedure-server.js.map +1 -1
- package/dist/server/stream-metadata.d.ts +15 -0
- package/dist/server/stream-metadata.d.ts.map +1 -0
- package/dist/server/stream-metadata.js +15 -0
- package/dist/server/stream-metadata.js.map +1 -0
- package/dist/testing/index.d.ts +13 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +11 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/log-storage.d.ts +28 -0
- package/dist/testing/log-storage.d.ts.map +1 -0
- package/dist/testing/log-storage.js +75 -0
- package/dist/testing/log-storage.js.map +1 -0
- package/dist/testing/mcp-caller.d.ts +33 -0
- package/dist/testing/mcp-caller.d.ts.map +1 -0
- package/dist/testing/mcp-caller.js +97 -0
- package/dist/testing/mcp-caller.js.map +1 -0
- package/dist/testing/transport-contract.d.ts +167 -0
- package/dist/testing/transport-contract.d.ts.map +1 -0
- package/dist/testing/transport-contract.js +387 -0
- package/dist/testing/transport-contract.js.map +1 -0
- package/package.json +5 -1
- package/src/adapters/http/server/handler.ts +3 -2
- package/src/adapters/websocket/client/transport.ts +20 -7
- package/src/browser.ts +2 -1
- package/src/client/validation/types.ts +1 -0
- package/src/procedures/collection/schemas.ts +1 -0
- package/src/procedures/envelope.ts +2 -0
- package/src/procedures/policy.ts +2 -2
- package/src/procedures/program.ts +3 -0
- package/src/procedures/ref.ts +1 -0
- package/src/procedures/types.ts +1 -1
- package/src/server/index.ts +2 -1
- package/src/server/procedure-server.ts +2 -11
- package/src/server/stream-metadata.ts +16 -0
- package/src/testing/index.ts +31 -0
- package/src/testing/log-storage.ts +72 -0
- package/src/testing/mcp-caller.ts +100 -0
- package/src/testing/transport-contract.ts +560 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @procedures/client
|
|
2
2
|
|
|
3
|
+
## 0.39.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 55d1e4d: Each face refuses a request above its size limit with the code `PAYLOAD_TOO_LARGE` (roadmap CLI-85). The transport contract suite found the faces that did not.
|
|
8
|
+
|
|
9
|
+
- `@procedures/client`: the HTTP handler answers a body above `bodyLimit` with the code `PAYLOAD_TOO_LARGE` and the status 413. Before, the code was `INVALID_REQUEST`. A caller that compares the code of a 413 with `INVALID_REQUEST` must compare it with `PAYLOAD_TOO_LARGE`. This change of behavior is a minor change.
|
|
10
|
+
- `@procedures/client`: when a server closes a WebSocket with the close code 1009 (a message above its limit), each pending call of `WebSocketTransport` fails with the code `PAYLOAD_TOO_LARGE` and `retryable: false`. Before, the error had no code.
|
|
11
|
+
- `@procedures/client`: the new entry point `@procedures/client/testing` has the transport contract suite: `describeTransportContract(face, runner)`, `clientCaller()`, `mcpCaller()` and the collection storage `LogStorage`. A face of the procedures server in another package or in an app runs the same cases as the faces of the client. The suite imports no test runner: give it `{ describe, it, afterEach, expect }` of Vitest. This new entry point is a minor change.
|
|
12
|
+
- `@procedures/mcp-server`: the Streamable HTTP endpoint reads the body of a request in a session with `maxBodyBytes`. A body above the limit gets the status 413 with the code `PAYLOAD_TOO_LARGE`. Before, the SDK refused it without a code.
|
|
13
|
+
|
|
14
|
+
Migration:
|
|
15
|
+
|
|
16
|
+
- A caller that reads the code of a 413 from the HTTP handler compares it with `PAYLOAD_TOO_LARGE`, not `INVALID_REQUEST`.
|
|
17
|
+
- A caller of `WebSocketTransport` that retries each failed call stops at `retryable: false`. A call above the limit of the server fails the same way each time.
|
|
18
|
+
- The site, MiniMongo, Graph and jarvis: no step, unless one of them compares the code of a refused large request with `INVALID_REQUEST`.
|
|
19
|
+
|
|
20
|
+
## 0.38.0
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- c6fba49: The keys of procedure paths go through the codec of `@procedures/client` (roadmap CLI-84, decision D36). A path without `.` and `%` in a segment keeps the same key, so only such segments see a change.
|
|
25
|
+
|
|
26
|
+
MINOR (breaking, pre-1.0): for a segment with `.` or `%`, two keys that callers can see change. If it is not clear whether a change is breaking, the release treats it as breaking.
|
|
27
|
+
|
|
28
|
+
- `@procedures/cli-kit`: the key of a `format` hook is `pathToKey(path)`. A caller sets this key. For the path `["a", "b.c"]`, the key was `a.b.c`, and it is now `a.b%2Ec`.
|
|
29
|
+
- `@procedures/lib`: the `key` of each procedure of the ecosystem scan is `pathToKey(path)`. The scan gives this key over the wire. For the path `["a", "b.c"]`, the key was `a.b.c`, and it is now `a.b%2Ec`.
|
|
30
|
+
|
|
31
|
+
The other changes are fixes:
|
|
32
|
+
|
|
33
|
+
- `pathToKey()` accepts a `readonly string[]`.
|
|
34
|
+
- `@procedures/llm`: a procedure tool reads its key with `keyToPath()`, so `a%2Eb.c` names the path `["a.b", "c"]`.
|
|
35
|
+
- `@procedures/mcp`: the cache key of a tool is `pathToKey(path)`. Before, `["a.b", "c"]` and `["a", "b", "c"]` had the same cache key. The cache is in the process, so no stored data changes.
|
|
36
|
+
- `@procedures/mcp-server`: the message about two procedures with one tool name gives the keys of the paths.
|
|
37
|
+
|
|
38
|
+
No stored key and no topic changes. The storage keys and the topics already used the codec (roadmap CLI-75).
|
|
39
|
+
|
|
40
|
+
Migration:
|
|
41
|
+
|
|
42
|
+
- A caller of `cli-kit` with a `format` hook for a path with a dotted segment writes the key in the encoded form, for example `a.b%2Ec`.
|
|
43
|
+
- A reader of the ecosystem scan that splits a `key` on `.` uses `keyToPath(key)`.
|
|
44
|
+
- The site, MiniMongo, Graph and jarvis: no step, if their procedure paths have no segment with `.` or `%`.
|
|
45
|
+
|
|
3
46
|
## 0.37.0
|
|
4
47
|
|
|
5
48
|
No changes in this release.
|