@procedures/server 0.7.0 → 0.8.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,28 @@
1
1
  # @procedures/server
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3f376af: The root of the files confines each procedure, not only `fs.*` (roadmap R33). `mark --fs-root`, `procedure-server --fs-root` and `MCP_FS_ROOT` start `confineToRoot()` of `@procedures/fs`. Each procedure keeps its paths in the root, or the host refuses it with `FORBIDDEN` and the reason `outside-root`.
8
+
9
+ This change is breaking under a root. The hosts refuse procedures that they ran before: `git.*`, `pnpm.*`, `docker.run`, `docker.build`, `docker.compose.*`, a call of `shell.run`, and each procedure that reaches files without `metadata.fsRoot`. `lib.scan` of a workspace outside the root gives `FORBIDDEN`, not a warning. Without a root, nothing changes. The list of the MCP tools does not change.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [4b09a03]
14
+ - Updated dependencies [4b09a03]
15
+ - Updated dependencies [aa6e3aa]
16
+ - Updated dependencies [698e24d]
17
+ - Updated dependencies [4b09a03]
18
+ - Updated dependencies [600c497]
19
+ - Updated dependencies [7c2e7f7]
20
+ - Updated dependencies [90ea741]
21
+ - Updated dependencies [c4cfa34]
22
+ - Updated dependencies [d25805a]
23
+ - @procedures/client@0.8.0
24
+ - @procedures/peer@0.8.0
25
+
3
26
  ## 0.7.0
4
27
 
5
28
  ### Patch Changes
package/README.md CHANGED
@@ -164,7 +164,7 @@ procedure-server -p @procedures/mongo/register -t http,websocket
164
164
  | `--no-token` | - | - | Serve without a token (only on a trusted host) |
165
165
  | `--expose` | `-e` | every loaded procedure | Comma-separated procedures to serve: exact keys (`git.status`) or prefixes (`git.*`) |
166
166
  | `--events` | - | no topics | The topics of the event bus that a peer can subscribe to. Exact names (`orders.created`), prefixes (`orders.*`) or `*`. Repeat the option, or separate the patterns with commas. |
167
- | `--fs-root` | - | no root | The folder that confines each path of the `fs.*` procedures, also in their nested calls |
167
+ | `--fs-root` | - | no root | The root of the files: each procedure keeps its paths in this folder, also in the nested calls, or the server refuses it |
168
168
  | `--verbose` | `-v` | - | Verbose output |
169
169
  | `--help` | `-h` | - | Show help |
170
170
 
@@ -184,14 +184,16 @@ The server always serves the procedure `events.subscribe` ([EVENTS.md](../docume
184
184
  procedure-server -p ./my-procedures.js -t http,websocket --events "orders.*" --events audit.created
185
185
  ```
186
186
 
187
- ### The root of the file procedures
187
+ ### The root of the files
188
188
 
189
- With `--fs-root <folder>`, the server starts `confineFsProcedures()` of `@procedures/fs` after it builds its registry (roadmap R33):
189
+ With `--fs-root <folder>`, the server starts `confineToRoot()` of `@procedures/fs` after it builds its registry (roadmap R33):
190
190
 
191
- - Each `fs.*` procedure refuses a path outside the folder with `FORBIDDEN` and the reason `outside-root`. A relative path starts at the folder.
192
- - A nested `fs.*` call of another procedure is confined too.
193
- - The server does not start when the folder does not exist, or when it cannot load `@procedures/fs`.
194
- - A procedure that reads files with `node:fs`, or that starts a program, is not confined. The [README of the MCP server](../impl-mcp-dev/README.md) lists them.
191
+ - Each procedure refuses a path outside the folder with `FORBIDDEN` and the reason `outside-root`. A relative path starts at the folder. A working folder without a value is the folder.
192
+ - The `fs.*` procedures get the handlers of the root. A procedure with rules (`metadata.fsRoot`) gets each path of its rules examined. A nested call is confined too.
193
+ - The server refuses each procedure that the folder cannot confine, with the same error: `git.*`, `pnpm.*`, `docker.run`, a call of `shell.run`, and a procedure that reaches files without rules.
194
+ - The server does not start when the folder does not exist, or when it cannot load a version of `@procedures/fs` with `confineToRoot()`.
195
+
196
+ The rules and the table of the procedures are in [CAPABILITIES-2026-10.md](../documentation/CAPABILITIES-2026-10.md#the-root-of-the-files-roadmap-r33).
195
197
 
196
198
  The server has a registry of its own (roadmap 3.1): the `server.*` procedures and the `./module` entry of each `--procedures` package. The `server.*` procedures come from two modules: the module of `@procedures/peer` (`server.create`, `server.call` and the others) and the module of this package. Two servers in one process serve only their own packages. `pkg/register`, the form of the old examples, gives the module of `pkg`. A package without a `./module` entry still works: the server takes the procedures that its import registers. The token, the `--expose` list and the browser checks come from `hostPolicy()` of `@procedures/client`.
197
199