fix: plug resource leaks and add hook command timeout

- LSP signal handlers: store refs, return unregister handle, call in stopAll()
- session-tools-store: add per-session deleteSessionTools(), wire into session.deleted
- executeHookCommand: add 30s timeout with SIGTERM→SIGKILL escalation
This commit is contained in:
Cole Leavitt
2026-02-21 15:42:47 -07:00
committed by YeonGyu-Kim
parent ac81e1d7cd
commit b666ab24df
5 changed files with 418 additions and 352 deletions
+9 -5
View File
@@ -1,14 +1,18 @@
const store = new Map<string, Record<string, boolean>>()
const store = new Map<string, Record<string, boolean>>();
export function setSessionTools(sessionID: string, tools: Record<string, boolean>): void {
store.set(sessionID, { ...tools })
store.set(sessionID, { ...tools });
}
export function getSessionTools(sessionID: string): Record<string, boolean> | undefined {
const tools = store.get(sessionID)
return tools ? { ...tools } : undefined
const tools = store.get(sessionID);
return tools ? { ...tools } : undefined;
}
export function deleteSessionTools(sessionID: string): void {
store.delete(sessionID);
}
export function clearSessionTools(): void {
store.clear()
store.clear();
}