Skip to content

Commit e2ddcc9

Browse files
committed
DEV temp
1 parent 71ef0e3 commit e2ddcc9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/server.tools.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ const spawnToolsHost = async (
210210

211211
// Deny network and fs write by omission
212212
if (pluginIsolation === 'strict') {
213-
nodeArgs.push('--experimental-permission');
213+
// nodeArgs.push('--experimental-permission');
214+
const major = options?.nodeVersion || 0;
215+
const permissionFlag = major >= 24 ? '--permission' : '--experimental-permission';
216+
217+
nodeArgs.push(permissionFlag);
214218

215219
// 1) Gather directories (project, plugin modules, and the host entry's dir)
216220
const allowSet = new Set<string>(computeFsReadAllowlist());
@@ -236,6 +240,7 @@ const spawnToolsHost = async (
236240

237241
// Optional debug to verify exactly what the child gets
238242
log.debug(`Tools Host allow-fs-read flags: ${allowList.map(dir => `--allow-fs-read=${dir}`).join(' ')}`);
243+
log.debug(`Tools Host permission flag: ${permissionFlag}`);
239244
}
240245

241246
// Pre-compute file and package tool modules before spawning to reduce latency

0 commit comments

Comments
 (0)