@foldrun/core 7.0.1 → 7.0.2

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/dist/src/store.js CHANGED
@@ -2351,13 +2351,10 @@ function realLanding(full, followLast = true) {
2351
2351
  * /etc/passwd, or a folder → / — passed them, and reads, writes and the run
2352
2352
  * archive followed it out. */
2353
2353
  function landsInside(dir, full, followLast = true) {
2354
- let root;
2355
- try {
2356
- root = fs.realpathSync(dir);
2357
- }
2358
- catch {
2359
- root = path.resolve(dir);
2360
- }
2354
+ // Canonical the same way as the path: a workspace not made yet under a
2355
+ // linked ancestor (macOS /tmp → /private/tmp) is its nearest real
2356
+ // ancestor plus the rest, or a first write into it would read as leaving.
2357
+ const root = realLanding(dir) ?? path.resolve(dir);
2361
2358
  const at = realLanding(full, followLast);
2362
2359
  return at !== null && (at === root || at.startsWith(root + path.sep));
2363
2360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldrun/core",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "Agents are just folders. The format, the runner, the checks.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",
package/src/store.ts CHANGED
@@ -2818,12 +2818,10 @@ function realLanding(full: string, followLast = true): string | null {
2818
2818
  * /etc/passwd, or a folder → / — passed them, and reads, writes and the run
2819
2819
  * archive followed it out. */
2820
2820
  function landsInside(dir: string, full: string, followLast = true): boolean {
2821
- let root: string;
2822
- try {
2823
- root = fs.realpathSync(dir);
2824
- } catch {
2825
- root = path.resolve(dir);
2826
- }
2821
+ // Canonical the same way as the path: a workspace not made yet under a
2822
+ // linked ancestor (macOS /tmp → /private/tmp) is its nearest real
2823
+ // ancestor plus the rest, or a first write into it would read as leaving.
2824
+ const root = realLanding(dir) ?? path.resolve(dir);
2827
2825
  const at = realLanding(full, followLast);
2828
2826
  return at !== null && (at === root || at.startsWith(root + path.sep));
2829
2827
  }