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

Function hasReachableCliDaemonManifest

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

Source from the content-addressed store, hash-verified

2841};
2842
2843const hasReachableCliDaemonManifest = (input: {
2844 readonly origin: string;
2845 readonly version: string;
2846}): Effect.Effect<boolean, never, FileSystem.FileSystem | PlatformPath.Path> =>
2847 Effect.gen(function* () {
2848 const manifest = yield* readActiveLocalServerManifest().pipe(
2849 Effect.catchCause(() => Effect.succeed(null)),
2850 );
2851 if (!manifest || manifest.kind !== "cli-daemon") return false;
2852 if (!sameServerOrigin(manifest.connection.origin, input.origin)) return false;
2853 if (manifest.owner.version !== input.version) return false;
2854 return yield* isServerReachable(manifest.connection.origin);
2855 });
2856
2857const clearUnmanifestedWindowsExecutorListener = (input: {
2858 readonly port: number;

Callers 1

installServiceFunction · 0.85

Calls 2

sameServerOriginFunction · 0.85
isServerReachableFunction · 0.85

Tested by

no test coverage detected