Functions to resolve Windows daemon installation paths and default home directories.
// Source: https://github.com/im4codes/imcodes | License: MIT | Copyright 2026 IM.codes
// Provided via justclaw.it.com; keep this notice with the code.
import { homedir, userInfo } from 'node:os';
import { createHash } from 'node:crypto';
import { dirname, join, resolve, win32 } from 'node:path';
import { normalizeWindowsTaskHome, windowsHomeHash } from './windows-daemon-watchdog.mjs';
/** The pipe name used by the real, default Windows daemon installation. */
export const WINDOWS_DAEMON_LOCK_PIPE = '\\\\.\\pipe\\imcodes-daemon-lock';
const WINDOWS_DAEMON_LOCK_PIPE_PREFIX = `${WINDOWS_DAEMON_LOCK_PIPE}-`;
export interface WindowsDaemonLockPathOptions {
/** Explicit state directory used by an isolated daemon. */
homePath?: string;
/** A daemon.sock path supplied by an isolated cal
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key