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

Function makeLocalServerManifest

apps/cli/src/main.ts:326–346  ·  view source on GitHub ↗
(input: {
  readonly kind: ExecutorLocalServerKind;
  readonly connection: ExecutorServerConnection;
})

Source from the content-addressed store, hash-verified

324 `http://${canonicalDaemonHost(hostname)}:${port}`;
325
326const makeLocalServerManifest = (input: {
327 readonly kind: ExecutorLocalServerKind;
328 readonly connection: ExecutorServerConnection;
329}): Effect.Effect<ExecutorLocalServerManifest, never, PlatformPath.Path> =>
330 Effect.gen(function* () {
331 const path = yield* PlatformPath.Path;
332 return {
333 version: 1,
334 kind: input.kind,
335 pid: process.pid,
336 startedAt: new Date().toISOString(),
337 dataDir: resolveExecutorDataDir(path),
338 scopeDir: currentScopeDirForManifest(),
339 connection: input.connection,
340 owner: {
341 client: process.env.EXECUTOR_CLIENT === "desktop" ? "desktop" : "cli",
342 version: CLI_VERSION,
343 executablePath: isDevMode ? (script ?? null) : process.execPath,
344 },
345 };
346 });
347
348// Friendly, intentionally racy fast-path: it reads the server.json hint to fail
349// early with a helpful message when another local server is already up. It is

Callers 1

Calls 2

resolveExecutorDataDirFunction · 0.90

Tested by

no test coverage detected