MCPcopy Create free account
hub / github.com/agent-tower/core / verifyTerminalCreate

Function verifyTerminalCreate

packages/desktop/src/main.ts:406–430  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

404 {
405 method: 'POST',
406 headers: { 'Content-Type': 'application/json' },
407 body: JSON.stringify({
408 socketId: `desktop-${Date.now()}`,
409 cwd: app.getPath('home'),
410 cols: 80,
411 rows: 24,
412 }),
413 },
414 10_000,
415 );
416
417 log(`Terminal create verification passed: terminalId=${terminal.terminalId} pid=${terminal.pid}`);
418
419 await fetchJson<{ success: boolean }>(
420 `${baseUrl}/api/terminals/${encodeURIComponent(terminal.terminalId)}`,
421 { method: 'DELETE' },
422 5_000,
423 );
424 log('Terminal cleanup verification passed');
425}
426
427async function verifySocketConnection(baseUrl: string): Promise<void> {
428 const { io } = await import('socket.io-client');
429
430 await new Promise<void>((resolve, reject) => {
431 const socket = io(`${baseUrl}/events`, {
432 autoConnect: true,
433 transports: ['websocket'],

Callers 1

startBackendFunction · 0.85

Calls 1

logFunction · 0.70

Tested by

no test coverage detected