MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / startDaemon

Function startDaemon

packages/hosts/mcp/src/stdio-integration.test.ts:46–54  ·  view source on GitHub ↗
(dataDir: string)

Source from the content-addressed store, hash-verified

44 * the manifest that `executor mcp` reads, so the exact number is not load-bearing.
45 */
46const startDaemon = (dataDir: string): void => {
47 const port = 20_000 + Math.floor(Math.random() * 20_000);
48 const result = spawnSync(
49 "bun",
50 ["run", cliEntry, "daemon", "run", "--port", String(port), "--hostname", "127.0.0.1"],
51 { env: { ...process.env, EXECUTOR_DATA_DIR: dataDir, EXECUTOR_SCOPE_DIR: testScope } },
52 );
53 expect(result.status, `daemon run failed: ${result.stderr?.toString() ?? ""}`).toBe(0);
54};
55
56/** Stop the daemon started above; the manifest carries its pid. */
57const stopDaemon = (dataDir: string): Effect.Effect<void> =>

Callers 1

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected