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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "3.0.37",
3
+ "version": "3.0.38",
4
4
  "description": "Lightweight process containment sandbox for CLI tools - Playwright, Claude Code, and more. Pure Node.js, no dependencies.",
5
5
  "type": "module",
6
6
  "main": "cli.js",
@@ -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
- "enabledPlugins": {
5
- "glootie-cc@anentrypoint-plugins": true
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
- // Copy plugins directory if it exists (but skip large cache files)
351
- const pluginsDir = join(hostClaudeDir, 'plugins');
352
- if (existsSync(pluginsDir)) {
353
- const sandboxPluginsDir = join(sandboxClaudeDir, 'plugins');
354
-
355
- // Check real paths to avoid copying directory to itself
356
- let shouldCopyPlugins = true;
357
- try {
358
- const pluginsRealPath = realpathSync(pluginsDir);
359
- const sandboxPluginsRealPath = realpathSync(sandboxPluginsDir);
360
- if (pluginsRealPath === sandboxPluginsRealPath) {
361
- shouldCopyPlugins = false;
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
- if (shouldCopyPlugins) {
368
- cpSync(pluginsDir, sandboxPluginsDir, { recursive: true });
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