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

Function hasReachableCliDaemonManifest

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

Source from the content-addressed store, hash-verified

2911};
2912
2913const hasReachableCliDaemonManifest = (input: {
2914 readonly origin: string;
2915 readonly version: string;
2916}): Effect.Effect<boolean, never, FileSystem.FileSystem | PlatformPath.Path> =>
2917 Effect.gen(function* () {
2918 const manifest = yield* readActiveLocalServerManifest().pipe(
2919 Effect.catchCause(() => Effect.succeed(null)),
2920 );
2921 if (!manifest || manifest.kind !== "cli-daemon") return false;
2922 if (!sameServerOrigin(manifest.connection.origin, input.origin)) return false;
2923 if (manifest.owner.version !== input.version) return false;
2924 return yield* isServerReachable(manifest.connection.origin);
2925 });
2926
2927const clearUnmanifestedWindowsExecutorListener = (input: {
2928 readonly port: number;

Callers 1

installServiceFunction · 0.85

Calls 2

sameServerOriginFunction · 0.85
isServerReachableFunction · 0.85

Tested by

no test coverage detected