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

Function makeLocalServerManifest

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

Source from the content-addressed store, hash-verified

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