feat(lsp): add background daemon for language servers

This commit is contained in:
2026-04-29 00:04:06 -04:00
parent 60b8900a09
commit 076eee4e96
12 changed files with 707 additions and 76 deletions

11
daemon.ts Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env -S npx tsx
// Daemon Entrypoint - Spawned (detached) by ensureDaemon() in
// src/daemonProtocol.ts the first time any client tries to connect.
// Stays alive across CLI invocations; idle LSP servers within are reaped
// per ServerConfig.idleTtlMs.
import { startDaemon } from "./src/daemon.ts";
startDaemon().catch((err) => {
process.stderr.write(`pi-lsp daemon failed to start: ${err?.stack ?? err}\n`);
process.exit(1);
});