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

Function hasReachableCliDaemonManifest

apps/cli/src/main.ts:2931–2943  ·  view source on GitHub ↗
(input: {
  readonly origin: string;
  readonly version: string;
})

Source from the content-addressed store, hash-verified

2929};
2930
2931const hasReachableCliDaemonManifest = (input: {
2932 readonly origin: string;
2933 readonly version: string;
2934}): Effect.Effect<boolean, never, FileSystem.FileSystem | PlatformPath.Path> =>
2935 Effect.gen(function* () {
2936 const manifest = yield* readActiveLocalServerManifest().pipe(
2937 Effect.catchCause(() => Effect.succeed(null)),
2938 );
2939 if (!manifest || manifest.kind !== "cli-daemon") return false;
2940 if (!sameServerOrigin(manifest.connection.origin, input.origin)) return false;
2941 if (manifest.owner.version !== input.version) return false;
2942 return yield* isServerReachable(manifest.connection.origin);
2943 });
2944
2945const clearUnmanifestedWindowsExecutorListener = (input: {
2946 readonly port: number;

Callers 1

installServiceFunction · 0.85

Calls 2

sameServerOriginFunction · 0.85
isServerReachableFunction · 0.85

Tested by

no test coverage detected