(wsId: string, recordId: string)
| 204 | // ── internals ──────────────────────────────────────────────────────────── |
| 205 | |
| 206 | private onSessionDisposed(wsId: string, recordId: string): void { |
| 207 | const session = this.sessions.get(recordId); |
| 208 | const adapter = this.adapterFor.get(recordId); |
| 209 | this.sessions.delete(recordId); |
| 210 | this.adapterFor.delete(recordId); |
| 211 | const ids = this.byWs.get(wsId); |
| 212 | if (ids) { |
| 213 | ids.delete(recordId); |
| 214 | if (ids.size === 0) this.byWs.delete(wsId); |
| 215 | } |
| 216 | if (this.transcriptWatcher && session) this.transcriptWatcher.unregister(session); |
| 217 | this.logger.info('pool.session_removed', { |
| 218 | wsId, |
| 219 | recordId, |
| 220 | agent: adapter?.id ?? 'unknown', |
| 221 | remaining: this.sessions.size, |
| 222 | forWorkspace: ids?.size ?? 0, |
| 223 | }); |
| 224 | } |
| 225 | } |
no test coverage detected