sandboxbox 2.2.1 → 2.2.3

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/CLAUDE.md CHANGED
@@ -53,19 +53,34 @@ if (process.platform === 'win32') {
53
53
  }
54
54
  ```
55
55
 
56
- ### Auto Podman Machine Start
56
+ ### Auto Podman Machine Start (Rootless Mode)
57
57
  ```javascript
58
+ // Initialize with explicit rootless mode for portability
58
59
  if (process.platform === 'win32' && isBundled) {
59
60
  try {
60
61
  execSync(`"${podmanPath}" info`, { stdio: 'pipe' });
61
62
  } catch (infoError) {
62
63
  if (infoError.message.includes('Cannot connect to Podman')) {
64
+ // Auto-initialize with rootless mode if machine doesn't exist
65
+ execSync(`"${podmanPath}" machine init --rootful=false`, { stdio: 'inherit' });
63
66
  execSync(`"${podmanPath}" machine start`, { stdio: 'inherit' });
64
67
  }
65
68
  }
66
69
  }
67
70
  ```
68
71
 
72
+ ### Rootless vs Rootful Mode
73
+ - **Rootless (default)**: Runs without administrator privileges, portable across systems
74
+ - **Configuration**: All machines initialized with `--rootful=false` flag
75
+ - **Benefits**: No elevated permissions required, better security, true portability
76
+
77
+ ### Portable Podman Architecture
78
+ - **Direct Podman Execution**: Uses bundled Podman binary without complex machine management
79
+ - **Rootless Operation**: Always runs in rootless mode for portability
80
+ - **Self-Contained**: All dependencies included in the package
81
+ - **Simple Configuration**: No complex connection or machine setup required
82
+ - **Auto-Download**: Downloads platform-specific binaries automatically
83
+
69
84
  ## Isolation Architecture
70
85
 
71
86
  ### Workflow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "Portable container runner with Podman - Claude Code & Playwright support. Works on Windows, macOS, and Linux.",
5
5
  "type": "module",
6
6
  "main": "cli.js",
Binary file
package/utils/podman.js CHANGED
@@ -37,43 +37,7 @@ export function checkPodman() {
37
37
  };
38
38
 
39
39
  const version = execSync(`"${podmanPath}" --version`, execOptions).trim();
40
-
41
- // Auto-manage Podman machine on Windows
42
- if (process.platform === 'win32' && isBundled) {
43
- try {
44
- execSync(`"${podmanPath}" info`, { ...execOptions, stdio: 'pipe' });
45
- } catch (infoError) {
46
- if (infoError.message.includes('Cannot connect to Podman')) {
47
- console.log('\n🔧 Podman machine not running, auto-initializing...');
48
-
49
- try {
50
- execSync(`"${podmanPath}" machine start`, {
51
- stdio: 'inherit',
52
- cwd: __dirname,
53
- shell: process.platform === 'win32'
54
- });
55
- console.log('\n✅ Podman machine started successfully in rootless mode!');
56
- } catch (startError) {
57
- if (startError.message.includes('not found') || startError.message.includes('does not exist')) {
58
- execSync(`"${podmanPath}" machine init`, {
59
- stdio: 'inherit',
60
- cwd: __dirname,
61
- shell: process.platform === 'win32'
62
- });
63
- execSync(`"${podmanPath}" machine start`, {
64
- stdio: 'inherit',
65
- cwd: __dirname,
66
- shell: process.platform === 'win32'
67
- });
68
- console.log('\n✅ Podman machine initialized and started successfully!');
69
- } else {
70
- throw startError;
71
- }
72
- }
73
- }
74
- }
75
- }
76
-
40
+ console.log(color('green', `✅ ${version}${isBundled ? ' (bundled)' : ''}`));
77
41
  return podmanPath;
78
42
  } catch (error) {
79
43
  console.log('❌ Podman not found');
@@ -97,23 +61,34 @@ export function checkPodman() {
97
61
  const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
98
62
  console.log(`\n✅ ${newVersion} (auto-downloaded)`);
99
63
 
100
- if (process.platform === 'win32') {
64
+ // Auto-setup minimal backend for Windows portable operation
65
+ if (process.platform === 'win32' && isBundled) {
101
66
  try {
102
67
  execSync(`"${newPodmanPath}" info`, { ...execOptions, stdio: 'pipe' });
103
68
  } catch (infoError) {
104
69
  if (infoError.message.includes('Cannot connect to Podman')) {
105
- console.log('\n🔧 Initializing Podman machine...');
70
+ console.log('\n🔧 Setting up portable Podman backend...');
106
71
  try {
107
- execSync(`"${newPodmanPath}" machine init`, { stdio: 'inherit', shell: true });
108
- execSync(`"${newPodmanPath}" machine start`, { stdio: 'inherit', shell: true });
109
- console.log('\n✅ Podman machine initialized and started!');
72
+ execSync(`"${newPodmanPath}" machine init --rootful=false`, {
73
+ stdio: 'inherit',
74
+ shell: true,
75
+ cwd: __dirname
76
+ });
77
+ execSync(`"${newPodmanPath}" machine start`, {
78
+ stdio: 'inherit',
79
+ shell: true,
80
+ cwd: __dirname
81
+ });
82
+ console.log('\n✅ Portable Podman backend ready!');
110
83
  } catch (machineError) {
111
- console.log('\n⚠️ Podman machine initialization will be done on first use');
84
+ console.log('\n⚠️ Podman backend setup needed on first container run');
112
85
  }
113
86
  }
114
87
  }
115
88
  }
116
89
 
90
+ console.log('\n✅ Portable Podman ready');
91
+
117
92
  return newPodmanPath;
118
93
  } catch (downloadError) {
119
94
  console.log(`\n❌ Auto-download failed: ${downloadError.message}`);