@melra/file-runtime 0.3.0-alpha.4 → 0.3.0-alpha.5

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.
Files changed (2) hide show
  1. package/README.md +29 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # @melra/file-runtime
2
+
3
+ Confined filesystem operations for [MELRA](https://github.com/XAGI-Lab/melra):
4
+ list, read, stat, hash, write, move, delete, and mkdir, all rooted inside one
5
+ workspace.
6
+
7
+ ```bash
8
+ npm install @melra/file-runtime
9
+ ```
10
+
11
+ ```ts
12
+ import { FileRuntime } from "@melra/file-runtime";
13
+
14
+ const files = await FileRuntime.create({ root: workspaceRoot, maxFileBytes });
15
+ ```
16
+
17
+ Every path is resolved and checked against the root before the operation runs,
18
+ following symlinks first — so a link pointing outside the workspace is refused
19
+ rather than followed. Relative paths resolve against the root; absolute paths
20
+ outside it are an error, not a fallback.
21
+
22
+ `maxFileBytes` bounds how much a single read pulls into memory. It is a
23
+ resource limit rather than a permission check: an unbounded read of a huge file
24
+ takes the host down regardless of who was allowed to read it.
25
+
26
+ Requires Node.js 22 or newer. Full documentation:
27
+ [github.com/XAGI-Lab/melra](https://github.com/XAGI-Lab/melra)
28
+
29
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melra/file-runtime",
3
- "version": "0.3.0-alpha.4",
3
+ "version": "0.3.0-alpha.5",
4
4
  "description": "Workspace-confined file execution runtime for MELRA.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -21,7 +21,7 @@
21
21
  "dist"
22
22
  ],
23
23
  "dependencies": {
24
- "@melra/protocol": "0.3.0-alpha.4"
24
+ "@melra/protocol": "0.3.0-alpha.5"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsc -p tsconfig.json",