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

Function hasReachableCliDaemonManifest

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

Source from the content-addressed store, hash-verified

2781};
2782
2783const hasReachableCliDaemonManifest = (input: {
2784 readonly origin: string;
2785 readonly version: string;
2786}): Effect.Effect<boolean, never, FileSystem.FileSystem | PlatformPath.Path> =>
2787 Effect.gen(function* () {
2788 const manifest = yield* readActiveLocalServerManifest().pipe(
2789 Effect.catchCause(() => Effect.succeed(null)),
2790 );
2791 if (!manifest || manifest.kind !== "cli-daemon") return false;
2792 if (!sameServerOrigin(manifest.connection.origin, input.origin)) return false;
2793 if (manifest.owner.version !== input.version) return false;
2794 return yield* isServerReachable(manifest.connection.origin);
2795 });
2796
2797const clearUnmanifestedWindowsExecutorListener = (input: {
2798 readonly port: number;

Callers 1

installServiceFunction · 0.85

Calls 2

sameServerOriginFunction · 0.85
isServerReachableFunction · 0.85

Tested by

no test coverage detected