@procedures/mcp-dev-tools 0.4.0 → 0.6.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,44 @@
1
1
  # @procedures/mcp-dev-tools
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [72a8c65]
8
+ - @procedures/bundle-mcp@0.6.0
9
+ - @procedures/client@0.6.0
10
+ - @procedures/fs@0.6.0
11
+ - @procedures/mcp-server@0.6.0
12
+ - @procedures/compiler@0.6.0
13
+
14
+ ## 0.5.0
15
+
16
+ ### Minor Changes
17
+
18
+ - a47bee6: The hosts can confine the file procedures to a root (roadmap R33).
19
+
20
+ - `confineFsProcedures(registry, root)` of `@procedures/fs` replaces the handler of each `fs.*` procedure of a registry with the handler of `createFsModule({ root })`. It adds no procedure. A nested `fs.*` call of another procedure is confined too. The root must be a folder that exists.
21
+ - `mark --fs-root <folder>` confines the `fs.*` procedures of each mode and host of `mark`: a command, the REPL, `--server`, `serve` and `mcp`. Give the flag before the command.
22
+ - A `mark` command uses a CLI server only when the server has the same root. The lockfile of `@procedures/peer` has the new field `fsRoot`, and `findServer()` compares it.
23
+ - `procedure-server --fs-root <folder>` and `mark serve --fs-root <folder>` confine the procedures of the server.
24
+ - The MCP server reads `MCP_FS_ROOT`, and `mark mcp` has the flag `--fs-root`. `fs` is not a tool namespace, so the tools do not change.
25
+ - A path outside the root gives `FORBIDDEN` with the reason `outside-root`. A procedure that reads files with `node:fs`, or that starts a program, is not confined.
26
+ - `@procedures/lib/cli-flags` has the global flags `--fs-root` and `--events`, and the field `repeatable`.
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [0f75644]
31
+ - Updated dependencies [09e5566]
32
+ - Updated dependencies [ab77f75]
33
+ - Updated dependencies [a47bee6]
34
+ - Updated dependencies [a47bee6]
35
+ - Updated dependencies [bc74091]
36
+ - @procedures/client@0.5.0
37
+ - @procedures/fs@0.5.0
38
+ - @procedures/bundle-mcp@0.5.0
39
+ - @procedures/mcp-server@0.5.0
40
+ - @procedures/compiler@0.5.0
41
+
3
42
  ## 0.4.0
4
43
 
5
44
  ### Minor Changes
package/README.md CHANGED
@@ -45,6 +45,30 @@ Claude Code starts the server once for each session. After a rebuild, restart th
45
45
  | `MCP_READ_ONLY` | `false` | With `true`, the tools are only the procedures that change nothing |
46
46
  | `MCP_HTTP_PORT`, `MCP_HTTP_HOST`, `MCP_HTTP_TOKEN` | not set | The server uses Streamable HTTP on this port, not stdio. The host is `127.0.0.1` by default. |
47
47
  | `MCP_PROGRAM_CHECK` | `true` | With `false`, a program starts without the check before the run |
48
+ | `MCP_FS_ROOT` | not set | The folder that confines each path of the `fs.*` procedures. Refer to "The root of the file procedures". |
49
+
50
+ `mark mcp` starts the same server. Its flags replace the variables: `--bundles`, `--tool-timeout`, `--read-only`, `--http`, `--host`, `--token` and `--fs-root`.
51
+
52
+ The server serves no remote events (`documentation/EVENTS.md`). Its transport carries only MCP, and `events.subscribe` is not a tool. Thus the host has no variable for the topics.
53
+
54
+ ## The root of the file procedures
55
+
56
+ With `MCP_FS_ROOT` (or `mark mcp --fs-root <folder>`), the host confines each path of the `fs.*` procedures to the folder (roadmap R33):
57
+
58
+ - The host starts `confineFsProcedures()` of `@procedures/fs` after it builds its registry. The function replaces the handlers of the `fs.*` procedures, and it adds no procedure.
59
+ - `fs` is not a tool namespace, so the tools and `tools.snapshot.txt` do not change. Only the behavior of the tools changes.
60
+ - A tool reads files through nested `fs.*` calls, so the root confines these calls too. For example, `lib.scan` of a workspace outside the root gives a warning and no packages.
61
+ - A path outside the root gives `FORBIDDEN` with the reason `outside-root`. A relative path starts at the root.
62
+ - The host does not start when the folder does not exist.
63
+
64
+ The root does not confine a procedure that reads files with `node:fs`, or that starts a program. In the tools of `bundle-mcp`, these are:
65
+
66
+ - `lib.*`: `existsSync` of `pnpm-workspace.yaml`, and the TypeScript files of `lib.rename` (`ts-morph`). The `cue-config` program of `lib.new` writes files too.
67
+ - `cue.generate` and `cue.validate`: the `cue` program, and the read of `dependencies.json`.
68
+ - `git.*`, `docker.*`, `pnpm.*` and `vitest.*`: their programs. `git.init` also uses `realpath` and `access`, and `vitest.run` reads its JSON report.
69
+ - `sqlite.*` and `logs.*`: the database file.
70
+
71
+ `cue.init`, `cue.add`, `cue.remove` and `procedure.new` use only `fs.*`, so the root confines them completely. Each `cue.*` procedure except `cue.remove` reads `features.json` of the installed `@mark1russell7/cue` through `fs.read`. Thus they fail when that package is outside the root.
48
72
 
49
73
  ## How it selects the tools
50
74