- 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
19 lines
520 B
TypeScript
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();
|
|
}
|