#!/usr/bin/env node /** * Token Optimizer MCP Daemon * * Long-running process that manages a persistent MCP server subprocess * and exposes it via named pipes (Windows) or Unix domain sockets (Linux/macOS) * for PowerShell hooks to communicate with. * * Performance: ~2-5ms per request (IPC overhead) vs ~1000-4000ms (npx spawn overhead) * Eliminates 285x slowdown caused by process spawning. * * Architecture: * - Daemon starts the MCP server (index.ts) as a child process via stdio * - Daemon listens on IPC socket (named pipe on Windows, Unix socket on Linux/macOS) * - PowerShell hooks connect via IPC and send JSON-RPC requests * - Daemon forwards requests to MCP server via stdin * - Daemon receives responses from MCP server via stdout * - Daemon returns responses to PowerShell hooks via IPC */ export {}; //# sourceMappingURL=daemon.d.ts.map