Skip to content

Commit 3a15b01

Browse files
michaelnealejamadeo
authored andcommitted
chore: cleanup old sandbox (#7700)
1 parent ba1e8b8 commit 3a15b01

File tree

9 files changed

+5
-1306
lines changed

9 files changed

+5
-1306
lines changed

crates/goose-server/src/tunnel/lapstone_test.rs

Lines changed: 0 additions & 172 deletions
This file was deleted.

crates/goose-server/src/tunnel/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
pub mod lapstone;
22

3-
#[cfg(test)]
4-
mod lapstone_test;
5-
63
use crate::configuration::Settings;
74
use fs2::FileExt as _;
85
use goose::config::{paths::Paths, Config};

ui/desktop/forge.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { resolve } = require('path');
44

55
let cfg = {
66
asar: true,
7-
extraResource: ['src/bin', 'src/images', 'src/sandbox'],
7+
extraResource: ['src/bin', 'src/images'],
88
icon: 'src/images/icon',
99
// Windows specific configuration
1010
win32: {

ui/desktop/src/goosed.ts

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ import { createServer } from 'net';
66
import { Buffer } from 'node:buffer';
77
import { status } from './api';
88
import { Client, createClient, createConfig } from './api/client';
9-
import {
10-
buildSandboxSpawn,
11-
ensureProxy,
12-
stopProxy,
13-
isSandboxEnabled,
14-
isSandboxAvailable,
15-
} from './sandbox';
9+
1610

1711
export interface Logger {
1812
info: (...args: unknown[]) => void;
@@ -232,17 +226,10 @@ export const startGoosed = async (options: StartGoosedOptions): Promise<GoosedRe
232226
};
233227
}
234228

235-
if (isSandboxEnabled() && !isSandboxAvailable()) {
236-
throw new Error('GOOSE_SANDBOX=true but sandbox-exec is not available (macOS only)');
237-
}
238-
const useSandbox = isSandboxEnabled();
239-
240229
const goosedPath = findGoosedBinaryPath({ isPackaged, resourcesPath });
241230

242231
const port = await findAvailablePort();
243-
logger.info(
244-
`Starting goosed from: ${goosedPath} on port ${port} in dir ${workingDir}${useSandbox ? ' [SANDBOXED]' : ''}`
245-
);
232+
logger.info(`Starting goosed from: ${goosedPath} on port ${port} in dir ${workingDir}`);
246233

247234
const baseUrl = `https://127.0.0.1:${port}`;
248235

@@ -257,19 +244,8 @@ export const startGoosed = async (options: StartGoosedOptions): Promise<GoosedRe
257244
}
258245
}
259246

260-
// If sandbox mode, start proxy and wrap with sandbox-exec
261-
let spawnCommand = goosedPath;
262-
let spawnArgs = ['agent'];
263-
264-
if (useSandbox) {
265-
const proxy = await ensureProxy();
266-
const sandboxSpawn = buildSandboxSpawn(goosedPath, ['agent'], proxy.port);
267-
spawnCommand = sandboxSpawn.command;
268-
spawnArgs = sandboxSpawn.args;
269-
// Merge proxy env vars into the process env
270-
Object.assign(spawnEnv, sandboxSpawn.env);
271-
logger.info(`[sandbox] Spawning via: ${spawnCommand} ${spawnArgs.join(' ')}`);
272-
}
247+
const spawnCommand = goosedPath;
248+
const spawnArgs = ['agent'];
273249

274250
const isWindows = process.platform === 'win32';
275251
const spawnOptions = {
@@ -368,10 +344,6 @@ export const startGoosed = async (options: StartGoosedOptions): Promise<GoosedRe
368344
logger.error('Error while terminating goosed process:', error);
369345
}
370346

371-
if (useSandbox) {
372-
stopProxy().catch((err) => logger.error('Error stopping sandbox proxy:', err));
373-
}
374-
375347
setTimeout(() => {
376348
if (goosedProcess && !goosedProcess.killed && process.platform !== 'win32') {
377349
goosedProcess.kill('SIGKILL');

ui/desktop/src/sandbox/blocked.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

ui/desktop/src/sandbox/connect-proxy.pl

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)