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

Function readDaemonPointer

apps/cli/src/daemon-state.ts:269–281  ·  view source on GitHub ↗
(input: {
  hostname: string;
  scopeId: string;
})

Source from the content-addressed store, hash-verified

267 });
268
269export const readDaemonPointer = (input: {
270 hostname: string;
271 scopeId: string;
272}): Effect.Effect<DaemonPointer | null, never, FileSystem.FileSystem | Path.Path> =>
273 Effect.gen(function* () {
274 const fs = yield* FileSystem.FileSystem;
275 const path = yield* Path.Path;
276 const raw = yield* fs
277 .readFileString(daemonPointerPath(path, input))
278 .pipe(Effect.catchCause(() => Effect.succeed(null)));
279 if (raw === null) return null;
280 return parsePointer(raw);
281 });
282
283export const removeDaemonPointer = (input: {
284 hostname: string;

Callers 5

resolveDaemonTargetFunction · 0.90
spawnDaemonAsLockHolderFunction · 0.90
runDaemonSessionFunction · 0.90

Calls 2

daemonPointerPathFunction · 0.85
parsePointerFunction · 0.85

Tested by

no test coverage detected