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

Function manifestPid

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

Source from the content-addressed store, hash-verified

20);
21
22const manifestPid = (dataDir: string): number | undefined =>
23 Effect.runSync(
24 Effect.try({
25 try: () => readFileSync(join(dataDir, "server-control", "server.json"), "utf8"),
26 catch: () => undefined,
27 }).pipe(
28 Effect.map((text) => {
29 const manifest = decodeServerManifest(text);
30 return Option.isSome(manifest) ? manifest.value.pid : undefined;
31 }),
32 Effect.orElseSucceed(() => undefined),
33 ),
34 );
35
36/**
37 * Own the daemon this test bridges to, on its own port.

Callers 1

stopDaemonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected