@botlearn-course/daemon 0.0.20-beta.7 → 0.0.20-beta.8

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.
@@ -3,7 +3,9 @@ export declare const WORKSPACE_IMAGE_LOGICAL_BYTES: number;
3
3
  interface MountInfoEntry {
4
4
  target: string;
5
5
  filesystemType: string;
6
+ source: string;
6
7
  mountOptions: Set<string>;
8
+ superOptions: Set<string>;
7
9
  }
8
10
  export declare function parseWorkspaceMountInfo(text: string): MountInfoEntry[];
9
11
  export declare function nasWorkspaceEnabled(env?: NodeJS.ProcessEnv): boolean;
@@ -20,7 +20,9 @@ export function parseWorkspaceMountInfo(text) {
20
20
  return {
21
21
  target: decodeMountInfoPath(fields[4]),
22
22
  filesystemType: filesystem[0],
23
+ source: decodeMountInfoPath(filesystem[1]),
23
24
  mountOptions: new Set(fields[5].split(",")),
25
+ superOptions: new Set(filesystem[2].split(",")),
24
26
  };
25
27
  });
26
28
  }
@@ -84,8 +86,11 @@ export function assertWorkspaceFilesystem(workspaceRoot, env = process.env, moun
84
86
  return;
85
87
  const mount = parseWorkspaceMountInfo(mountInfo ?? readFileSync("/proc/self/mountinfo", "utf8"))
86
88
  .find((candidate) => candidate.target === workspaceRoot);
89
+ const validFilesystem = mount?.filesystemType === "ext4" || (mount?.filesystemType === "fuse.ext4"
90
+ && mount.source === "/mnt/botlearn-workspace-store/workspace.ext4"
91
+ && mount.superOptions.has("allow_other"));
87
92
  if (!mount
88
- || mount.filesystemType !== "ext4"
93
+ || !validFilesystem
89
94
  || !mount.mountOptions.has("rw")
90
95
  || !mount.mountOptions.has("nodev")
91
96
  || !mount.mountOptions.has("nosuid")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botlearn-course/daemon",
3
- "version": "0.0.20-beta.7",
3
+ "version": "0.0.20-beta.8",
4
4
  "description": "Lightweight BotLearn Course daemon: run course tasks on your own machine with your own agent runtime (BYOA).",
5
5
  "type": "module",
6
6
  "bin": {