sandboxbox 3.0.76 → 3.0.78

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.
@@ -1,5 +1,11 @@
1
1
  # MANDATORY DEV WORKFLOW - ABSOLUTE RULES
2
2
 
3
+ ## Git Workflow - CRITICAL
4
+ - ALWAYS commit changes after completing work: `git add .` then `git commit -m "descriptive message"`
5
+ - ALWAYS push commits to host immediately: `git push origin HEAD`
6
+ - NEVER leave unpushed commits - the stop hook will block you
7
+ - Git remote 'origin' points to the host repository - pushing here persists your changes
8
+
3
9
  ## Files
4
10
  - Maintain permanent structure ONLY - NO ephemeral/temp/mock/simulation files, use glootie mcp and playwright mcp execution instead
5
11
  - Single primary working implementations - ZERO failovers/fallbacks ever
package/CLAUDE.md CHANGED
@@ -78,15 +78,16 @@ if (process.platform === 'win32') {
78
78
  1. Copy project to temporary directory (including .git)
79
79
  2. Mount temporary directory as /workspace in container
80
80
  3. Run commands in isolated environment
81
- 4. Auto-commit and push changes to host repository
81
+ 4. Agent commits and pushes changes via explicit git commands
82
82
  5. Clean up temporary directory on exit
83
83
 
84
- ### Auto-Commit & Push (v3.0.76+)
85
- - Cleanup function automatically detects uncommitted changes
86
- - Auto-commits with timestamped message: "sandboxbox auto-commit: {ISO timestamp}"
87
- - Auto-pushes to host repository before sandbox cleanup
88
- - Changes persist automatically without manual git operations
89
- - Graceful error handling - cleanup continues even if git operations fail
84
+ ### Agent-Controlled Git Workflow
85
+ - Git remote `origin` points to host repository
86
+ - Host configured with `receive.denyCurrentBranch=updateInstead`
87
+ - Git identity (name, email, color) transferred from host
88
+ - Agent decides when to commit and push via standard git commands
89
+ - Example: Agent runs `git add .`, `git commit -m "message"`, `git push origin master`
90
+ - Changes persist when agent explicitly pushes to host
90
91
 
91
92
  ### Pattern
92
93
  ```javascript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sandboxbox",
3
- "version": "3.0.76",
3
+ "version": "3.0.78",
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",
package/utils/sandbox.js CHANGED
@@ -325,66 +325,6 @@ node_modules/
325
325
  }
326
326
 
327
327
  const cleanup = () => {
328
- const VERBOSE_OUTPUT = process.env.SANDBOX_VERBOSE === 'true' || process.argv.includes('--verbose');
329
-
330
- // Push any committed changes back to host before cleanup
331
- try {
332
- // Check if there are any uncommitted changes
333
- const status = execSync(`git status --porcelain`, {
334
- cwd: workspaceDir,
335
- encoding: 'utf8',
336
- stdio: 'pipe'
337
- }).trim();
338
-
339
- if (status) {
340
- // Add all changes
341
- execSync(`git add -A`, {
342
- cwd: workspaceDir,
343
- stdio: 'pipe',
344
- shell: true
345
- });
346
-
347
- // Commit with timestamp
348
- const commitMessage = `sandboxbox auto-commit: ${new Date().toISOString()}
349
-
350
- 🤖 Generated with SandboxBox
351
- Changes made during sandboxbox session`;
352
-
353
- execSync(`git commit -m "${commitMessage}"`, {
354
- cwd: workspaceDir,
355
- stdio: 'pipe',
356
- shell: true
357
- });
358
-
359
- if (VERBOSE_OUTPUT) {
360
- console.log('✅ Committed sandbox changes');
361
- }
362
- }
363
-
364
- // Push to host repository (origin points to host)
365
- try {
366
- execSync(`git push origin HEAD`, {
367
- cwd: workspaceDir,
368
- stdio: 'pipe',
369
- shell: true
370
- });
371
-
372
- if (VERBOSE_OUTPUT) {
373
- console.log('✅ Pushed changes to host repository');
374
- }
375
- } catch (pushError) {
376
- // Push might fail if there are no changes or network issues
377
- if (VERBOSE_OUTPUT) {
378
- console.log('⚠️ Could not push to host repository');
379
- }
380
- }
381
- } catch (error) {
382
- // Don't fail cleanup if git operations fail
383
- if (VERBOSE_OUTPUT) {
384
- console.log(`⚠️ Git sync failed: ${error.message}`);
385
- }
386
- }
387
-
388
328
  // Close any log files that might be open
389
329
  if (global.logFileHandle) {
390
330
  try {
@@ -395,6 +335,10 @@ Changes made during sandboxbox session`;
395
335
  }
396
336
  }
397
337
 
338
+ // Note: Git commits/pushes are handled by the agent via explicit instructions
339
+ // The sandbox has git configured with origin pointing to host and receive.denyCurrentBranch=updateInstead
340
+ // This allows agent-driven git push to work correctly
341
+
398
342
  rmSync(sandboxDir, { recursive: true, force: true });
399
343
  };
400
344