sandboxbox 2.2.0 → 2.2.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/CLAUDE.md CHANGED
@@ -14,6 +14,9 @@ Portable containerized environments using Podman with automatic WSL management a
14
14
  - Cross-platform binary downloads from GitHub releases
15
15
  - PowerShell ZIP extraction on Windows
16
16
  - Auto-detects existing installations
17
+ - Auto-triggers on first use if Podman not found
18
+ - Verifies binary existence post-download
19
+ - Auto-initializes Podman machine on Windows after download
17
20
 
18
21
  ### Container Images
19
22
  - **sandboxbox:latest**: Full development environment
@@ -50,19 +53,27 @@ if (process.platform === 'win32') {
50
53
  }
51
54
  ```
52
55
 
53
- ### Auto Podman Machine Start
56
+ ### Auto Podman Machine Start (Rootless Mode)
54
57
  ```javascript
58
+ // Initialize with explicit rootless mode for portability
55
59
  if (process.platform === 'win32' && isBundled) {
56
60
  try {
57
61
  execSync(`"${podmanPath}" info`, { stdio: 'pipe' });
58
62
  } catch (infoError) {
59
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' });
60
66
  execSync(`"${podmanPath}" machine start`, { stdio: 'inherit' });
61
67
  }
62
68
  }
63
69
  }
64
70
  ```
65
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
+
66
77
  ## Isolation Architecture
67
78
 
68
79
  ### Workflow
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
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",
7
7
  "bin": {
8
- "sandboxbox": "./cli.js"
8
+ "sandboxbox": "cli.js"
9
9
  },
10
10
  "scripts": {
11
11
  "start": "node cli.js",
@@ -29,7 +29,7 @@
29
29
  "dependencies": {},
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/AnEntrypoint/sandboxbox.git"
32
+ "url": "git+https://github.com/AnEntrypoint/sandboxbox.git"
33
33
  },
34
34
  "homepage": "https://github.com/AnEntrypoint/sandboxbox#readme",
35
35
  "bugs": {
package/utils/podman.js CHANGED
@@ -55,7 +55,7 @@ export function checkPodman() {
55
55
  console.log('\n✅ Podman machine started successfully in rootless mode!');
56
56
  } catch (startError) {
57
57
  if (startError.message.includes('not found') || startError.message.includes('does not exist')) {
58
- execSync(`"${podmanPath}" machine init`, {
58
+ execSync(`"${podmanPath}" machine init --rootful=false`, {
59
59
  stdio: 'inherit',
60
60
  cwd: __dirname,
61
61
  shell: process.platform === 'win32'
@@ -65,7 +65,7 @@ export function checkPodman() {
65
65
  cwd: __dirname,
66
66
  shell: process.platform === 'win32'
67
67
  });
68
- console.log('\n✅ Podman machine initialized and started successfully!');
68
+ console.log('\n✅ Podman machine initialized and started in rootless mode!');
69
69
  } else {
70
70
  throw startError;
71
71
  }
@@ -76,28 +76,47 @@ export function checkPodman() {
76
76
 
77
77
  return podmanPath;
78
78
  } catch (error) {
79
- if (!isBundled) {
80
- console.log(' Podman not found');
81
- console.log('\n📦 Auto-downloading Podman...');
79
+ console.log('❌ Podman not found');
80
+ console.log('\n📦 Auto-downloading Podman...');
82
81
 
83
- try {
84
- const scriptPath = resolve(__dirname, '..', 'scripts', 'download-podman.js');
85
- execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname, shell: process.platform === 'win32' });
86
-
87
- const newPodmanPath = getPodmanPath();
88
- const execOptions = {
89
- encoding: 'utf-8',
90
- stdio: 'pipe',
91
- shell: process.platform === 'win32'
92
- };
93
- const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
94
- console.log(`\n✅ ${newVersion} (auto-downloaded)`);
95
- return newPodmanPath;
96
- } catch (downloadError) {
97
- console.log(`\n❌ Auto-download failed: ${downloadError.message}`);
82
+ try {
83
+ const scriptPath = resolve(__dirname, '..', 'scripts', 'download-podman.js');
84
+ execSync(`node "${scriptPath}"`, { stdio: 'inherit', cwd: __dirname, shell: process.platform === 'win32' });
85
+
86
+ const newPodmanPath = getPodmanPath();
87
+ if (!existsSync(newPodmanPath) && newPodmanPath !== 'podman') {
88
+ throw new Error('Download completed but binary not found');
98
89
  }
99
- } else {
100
- console.log('❌ Podman not found');
90
+
91
+ const execOptions = {
92
+ encoding: 'utf-8',
93
+ stdio: 'pipe',
94
+ shell: process.platform === 'win32'
95
+ };
96
+
97
+ const newVersion = execSync(`"${newPodmanPath}" --version`, execOptions).trim();
98
+ console.log(`\n✅ ${newVersion} (auto-downloaded)`);
99
+
100
+ if (process.platform === 'win32') {
101
+ try {
102
+ execSync(`"${newPodmanPath}" info`, { ...execOptions, stdio: 'pipe' });
103
+ } catch (infoError) {
104
+ if (infoError.message.includes('Cannot connect to Podman')) {
105
+ console.log('\n🔧 Initializing Podman machine in rootless mode...');
106
+ try {
107
+ execSync(`"${newPodmanPath}" machine init --rootful=false`, { stdio: 'inherit', shell: true });
108
+ execSync(`"${newPodmanPath}" machine start`, { stdio: 'inherit', shell: true });
109
+ console.log('\n✅ Podman machine initialized and started in rootless mode!');
110
+ } catch (machineError) {
111
+ console.log('\n⚠️ Podman machine initialization will be done on first use');
112
+ }
113
+ }
114
+ }
115
+ }
116
+
117
+ return newPodmanPath;
118
+ } catch (downloadError) {
119
+ console.log(`\n❌ Auto-download failed: ${downloadError.message}`);
101
120
  }
102
121
 
103
122
  console.log('\n💡 Please install Podman manually:');