@procedures/client 0.44.0 → 0.46.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 +25 -0
- package/README.md +2 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/browser.d.ts +4 -2
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +3 -1
- package/dist/browser.js.map +1 -1
- package/dist/procedures/core/index.d.ts +50 -2
- package/dist/procedures/core/index.d.ts.map +1 -1
- package/dist/procedures/core/index.js +148 -3
- package/dist/procedures/core/index.js.map +1 -1
- package/dist/procedures/core/operands.d.ts +4 -2
- package/dist/procedures/core/operands.d.ts.map +1 -1
- package/dist/procedures/core/operands.js +4 -3
- package/dist/procedures/core/operands.js.map +1 -1
- package/dist/procedures/index.d.ts +2 -2
- package/dist/procedures/index.d.ts.map +1 -1
- package/dist/procedures/index.js +1 -1
- package/dist/procedures/index.js.map +1 -1
- package/dist/procedures/program.d.ts +14 -1
- package/dist/procedures/program.d.ts.map +1 -1
- package/dist/procedures/program.js +8 -1
- package/dist/procedures/program.js.map +1 -1
- package/dist/server/face-rules.d.ts +62 -0
- package/dist/server/face-rules.d.ts.map +1 -0
- package/dist/server/face-rules.js +79 -0
- package/dist/server/face-rules.js.map +1 -0
- package/dist/server/procedure-server.d.ts +5 -1
- package/dist/server/procedure-server.d.ts.map +1 -1
- package/dist/server/procedure-server.js +13 -2
- package/dist/server/procedure-server.js.map +1 -1
- package/dist/server/server.d.ts +3 -2
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +4 -3
- package/dist/server/server.js.map +1 -1
- package/dist/server/types.d.ts +8 -1
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/types.js.map +1 -1
- package/package.json +2 -2
- package/src/browser.ts +9 -0
- package/src/procedures/core/index.ts +211 -2
- package/src/procedures/core/operands.ts +5 -4
- package/src/procedures/index.ts +5 -0
- package/src/procedures/program.ts +24 -2
- package/src/server/face-rules.ts +115 -0
- package/src/server/procedure-server.ts +12 -2
- package/src/server/server.ts +4 -3
- package/src/server/types.ts +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @procedures/client
|
|
2
2
|
|
|
3
|
+
## 0.46.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 10dcc3c: The release train: the ranges of @mark1russell7/coeval change to a version outside the old range.
|
|
8
|
+
|
|
9
|
+
## 0.45.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 70b2245: The release train: the ranges of @mark1russell7/coeval change to a version outside the old range.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- fbb50fa: `httpFace()` and `wsFace()` of `@procedures/peer` take two optional options, `narrowing` and `expose` (AG1-B). With them, a host serves a read-only face for a browser next to its full faces. This change is additive. Thus it is a PATCH of the client group (decision D13).
|
|
18
|
+
|
|
19
|
+
- `narrowing` is the narrowing of `mcpFace({ narrowing })` (CLI-43). The face adds it as one more source of the narrowing key. The server applies the meet of all the sources, so a header of the caller cannot make the face wider.
|
|
20
|
+
- `expose` is a list of patterns, a tool surface or a function, as `hostPolicy({ expose })`. The server meets it with the rule of the host, for the call and for each nested call. A path outside it gets `NOT_FOUND`.
|
|
21
|
+
- `@procedures/client` exports `faceRules()`, the one helper of these rules. `mcpFace()` of `@procedures/mcp-server` uses it too.
|
|
22
|
+
- `ServerRequest` has the optional field `expose`: the expose rule of the face that took the request. A face sets it, not the caller.
|
|
23
|
+
- A face without these options serves the same calls as before.
|
|
24
|
+
- 845902b: The new procedure `client.trace` runs the steps of a `client.chain` program one at a time. It gives one row for each step, with the result of the step. The result of each step equals the result of the same step in `client.chain`. A step that can write does not start: its row is `not-run` with the reason `writes`.
|
|
25
|
+
|
|
26
|
+
Each call of `client.trace` asks for a capability without writes, so the capability also refuses a nested write. Thus `client.trace` changes nothing, also through a face with no limits. The input field `upTo` stops the run after a step, and `sampleLimit` cuts the arrays of each row. The kernel hook `onStep` of `runControl()` gives the result of each step of a chain.
|
|
27
|
+
|
|
3
28
|
## 0.44.0
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -40,6 +40,8 @@ npm installs `zod` and `ws` with it. The HTTP server transport needs `express` 4
|
|
|
40
40
|
|
|
41
41
|
`import "@procedures/client/register"` registers the control flow (`client.chain` and the others) and `procedure.define`, `get`, `list` and `delete` in the global registry. `createRegistry()` adds them to each new registry.
|
|
42
42
|
|
|
43
|
+
`client.trace` runs the steps of a `client.chain` program one at a time, and gives one row for each step with its result. A step that can write does not run, and the procedure asks for a capability without writes. Thus a read-only face can serve it. [The procedure reference](docs/PROCEDURES.md#clienttrace) gives the rows and the input fields `upTo` and `sampleLimit`.
|
|
44
|
+
|
|
43
45
|
## Architecture
|
|
44
46
|
|
|
45
47
|
```mermaid
|