Files
oh-my-openagent/src/shared/session-tools-store.ts
Cole Leavitt 6aa1e96f9e 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
2026-02-21 16:44:59 -07:00

19 lines
520 B
TypeScript

const store = new Map<string, Record<string, boolean>>();
export function setSessionTools(sessionID: string, tools: Record<string, boolean>): void {
store.set(sessionID, { ...tools });
}
export function getSessionTools(sessionID: string): Record<string, boolean> | 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();
}