chore(lint): reduce warning debt across core adapters and model clients
This commit is contained in:
@@ -135,6 +135,8 @@ export class GatewayServer {
|
||||
}
|
||||
|
||||
private registerHandlers(): void {
|
||||
const channelRegistry = this.config.channelRegistry;
|
||||
const runtimeConfig = this.config.config;
|
||||
const systemHandlers = createSystemHandlers({
|
||||
startTime: this.startTime,
|
||||
version: this.config.version ?? '0.1.0',
|
||||
@@ -142,14 +144,14 @@ export class GatewayServer {
|
||||
getToolCount: () => this.config.toolRegistry.list().length,
|
||||
getConnectionCount: () => this.sessionBridge.connectionCount,
|
||||
restart: this.config.restart,
|
||||
getChannels: this.config.channelRegistry
|
||||
? () => this.config.channelRegistry!.list().map(a => ({ name: a.name, status: a.status }))
|
||||
getChannels: channelRegistry
|
||||
? () => channelRegistry.list().map(a => ({ name: a.name, status: a.status }))
|
||||
: undefined,
|
||||
getServices: this.config.config && this.config.channelRegistry
|
||||
? () => discoverServices(this.config.config!, this.config.channelRegistry!)
|
||||
getServices: runtimeConfig && channelRegistry
|
||||
? () => discoverServices(runtimeConfig, channelRegistry)
|
||||
: undefined,
|
||||
getPresence: this.config.channelRegistry
|
||||
? (opts) => this.config.channelRegistry!.getPresence(opts)
|
||||
getPresence: channelRegistry
|
||||
? (opts) => channelRegistry.getPresence(opts)
|
||||
: undefined,
|
||||
getUsage: () => ({
|
||||
totalSessions: this.config.sessionManager.listSessions().length,
|
||||
@@ -307,7 +309,7 @@ export class GatewayServer {
|
||||
});
|
||||
}
|
||||
|
||||
private handleConnection(ws: WebSocket, identity?: string): void {
|
||||
private handleConnection(ws: WebSocket, _identity?: string): void {
|
||||
// Gateway lock — reject if another client is already connected
|
||||
if (this.config.lock && this.connectionMap.size > 0) {
|
||||
ws.close(4003, 'Gateway locked — another client is already connected');
|
||||
|
||||
Reference in New Issue
Block a user