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

Function hasReachableCliDaemonManifest

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

Source from the content-addressed store, hash-verified

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

Callers 1

installServiceFunction · 0.85

Calls 2

sameServerOriginFunction · 0.85
isServerReachableFunction · 0.85

Tested by

no test coverage detected