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

Function makeLocalServerManifest

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

Source from the content-addressed store, hash-verified

341 `http://${canonicalDaemonHost(hostname)}:${port}`;
342
343const makeLocalServerManifest = (input: {
344 readonly kind: ExecutorLocalServerKind;
345 readonly connection: ExecutorServerConnection;
346}): Effect.Effect<ExecutorLocalServerManifest, never, PlatformPath.Path> =>
347 Effect.gen(function* () {
348 const path = yield* PlatformPath.Path;
349 return {
350 version: 1,
351 kind: input.kind,
352 pid: process.pid,
353 startedAt: new Date().toISOString(),
354 dataDir: resolveExecutorDataDir(path),
355 scopeDir: currentScopeDirForManifest(),
356 connection: input.connection,
357 owner: {
358 client: process.env.EXECUTOR_CLIENT === "desktop" ? "desktop" : "cli",
359 version: CLI_VERSION,
360 executablePath: isDevMode ? (script ?? null) : process.execPath,
361 },
362 };
363 });
364
365// Friendly, intentionally racy fast-path: it reads the server.json hint to fail
366// 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