sandboxbox 3.0.37 → 3.0.38
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/package.json +1 -1
- package/sandboxbox-settings.json +14 -5
- package/utils/sandbox.js +27 -19
package/package.json
CHANGED
package/sandboxbox-settings.json
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://schemas.modelcontextprotocol.io/0.1.0/mcp.json",
|
|
2
3
|
"pluginTimeout": 5000,
|
|
3
4
|
"alwaysThinkingEnabled": false,
|
|
4
|
-
"
|
|
5
|
-
"glootie
|
|
5
|
+
"mcpServers": {
|
|
6
|
+
"glootie": {
|
|
7
|
+
"command": "npx",
|
|
8
|
+
"args": ["-y", "mcp-glootie@latest"]
|
|
9
|
+
},
|
|
10
|
+
"playwright": {
|
|
11
|
+
"command": "npx",
|
|
12
|
+
"args": ["-y", "@playwright/mcp@latest"]
|
|
13
|
+
},
|
|
14
|
+
"vexify": {
|
|
15
|
+
"command": "npx",
|
|
16
|
+
"args": ["-y", "vexify@latest", "mcp"]
|
|
17
|
+
}
|
|
6
18
|
},
|
|
7
|
-
"pluginPaths": [
|
|
8
|
-
"../plugin"
|
|
9
|
-
],
|
|
10
19
|
"hooks": {
|
|
11
20
|
"SessionStart": [
|
|
12
21
|
{
|
package/utils/sandbox.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mkdtempSync, rmSync, cpSync, existsSync, mkdirSync, writeFileSync, symlinkSync, realpathSync, readFileSync } from 'fs';
|
|
2
2
|
import { tmpdir, homedir, platform } from 'os';
|
|
3
|
-
import { join, resolve } from 'path';
|
|
3
|
+
import { join, resolve, dirname } from 'path';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import { spawn, execSync } from 'child_process';
|
|
6
6
|
|
|
@@ -268,7 +268,6 @@ node_modules/
|
|
|
268
268
|
|
|
269
269
|
// Copy only essential files (avoid large files like history)
|
|
270
270
|
const essentialFiles = [
|
|
271
|
-
'settings.json',
|
|
272
271
|
'.credentials.json'
|
|
273
272
|
];
|
|
274
273
|
|
|
@@ -347,26 +346,35 @@ node_modules/
|
|
|
347
346
|
}
|
|
348
347
|
}
|
|
349
348
|
|
|
350
|
-
//
|
|
351
|
-
const
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
349
|
+
// Create minimal settings.json with enforced MCP servers (don't copy host settings)
|
|
350
|
+
const minimalSettings = {
|
|
351
|
+
"$schema": "https://schemas.modelcontextprotocol.io/0.1.0/mcp.json",
|
|
352
|
+
"mcpServers": {
|
|
353
|
+
"glootie": {
|
|
354
|
+
"command": "npx",
|
|
355
|
+
"args": ["-y", "mcp-glootie@latest"]
|
|
356
|
+
},
|
|
357
|
+
"playwright": {
|
|
358
|
+
"command": "npx",
|
|
359
|
+
"args": ["-y", "@playwright/mcp@latest"]
|
|
360
|
+
},
|
|
361
|
+
"vexify": {
|
|
362
|
+
"command": "npx",
|
|
363
|
+
"args": ["-y", "vexify@latest", "mcp"]
|
|
362
364
|
}
|
|
363
|
-
} catch (e) {
|
|
364
|
-
// If we can't resolve real paths, proceed with copy attempt
|
|
365
365
|
}
|
|
366
|
+
};
|
|
366
367
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
const sandboxSettingsPath = join(sandboxClaudeDir, 'settings.json');
|
|
369
|
+
writeFileSync(sandboxSettingsPath, JSON.stringify(minimalSettings, null, 2));
|
|
370
|
+
|
|
371
|
+
if (VERBOSE_OUTPUT) {
|
|
372
|
+
console.log('✅ Created minimal settings.json with enforced MCP servers');
|
|
373
|
+
console.log('📋 MCP servers configured:');
|
|
374
|
+
Object.keys(minimalSettings.mcpServers).forEach(serverName => {
|
|
375
|
+
const server = minimalSettings.mcpServers[serverName];
|
|
376
|
+
console.log(` ${serverName}: ${server.command} ${server.args.join(' ')}`);
|
|
377
|
+
});
|
|
370
378
|
}
|
|
371
379
|
|
|
372
380
|
// Copy the glootie-cc plugin from host if it exists
|