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

Function hasReachableCliDaemonManifest

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

Source from the content-addressed store, hash-verified

2733};
2734
2735const hasReachableCliDaemonManifest = (input: {
2736 readonly origin: string;
2737 readonly version: string;
2738}): Effect.Effect<boolean, never, FileSystem.FileSystem | PlatformPath.Path> =>
2739 Effect.gen(function* () {
2740 const manifest = yield* readActiveLocalServerManifest().pipe(
2741 Effect.catchCause(() => Effect.succeed(null)),
2742 );
2743 if (!manifest || manifest.kind !== "cli-daemon") return false;
2744 if (!sameServerOrigin(manifest.connection.origin, input.origin)) return false;
2745 if (manifest.owner.version !== input.version) return false;
2746 return yield* isServerReachable(manifest.connection.origin);
2747 });
2748
2749const clearUnmanifestedWindowsExecutorListener = (input: {
2750 readonly port: number;

Callers 1

installServiceFunction · 0.85

Calls 2

sameServerOriginFunction · 0.85
isServerReachableFunction · 0.85

Tested by

no test coverage detected