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

Function makeLocalServerManifest

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

Source from the content-addressed store, hash-verified

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