chore(lint): burn down remaining warnings to zero
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import type { GatewayEvent, GatewayRequest, OutboundMessage } from '../protocol.js';
|
||||
import { LaneQueue } from '../lane-queue.js';
|
||||
import { createAgentHandlers } from './agent.js';
|
||||
import type { AgentHandlerDeps } from './agent.js';
|
||||
import { CommandRegistry, registerBuiltinCommands } from '../../commands/index.js';
|
||||
|
||||
describe('createAgentHandlers command fast-path', () => {
|
||||
@@ -35,9 +36,9 @@ describe('createAgentHandlers command fast-path', () => {
|
||||
registerBuiltinCommands(commandRegistry);
|
||||
|
||||
const handlers = createAgentHandlers({
|
||||
sessionBridge: sessionBridge as any,
|
||||
sessionBridge: sessionBridge as unknown as AgentHandlerDeps['sessionBridge'],
|
||||
laneQueue: new LaneQueue(),
|
||||
sessionManager: sessionManager as any,
|
||||
sessionManager: sessionManager as unknown as AgentHandlerDeps['sessionManager'],
|
||||
commandRegistry,
|
||||
});
|
||||
|
||||
|
||||
@@ -59,7 +59,8 @@ export function createSystemHandlers(deps: SystemHandlerDeps) {
|
||||
},
|
||||
|
||||
'system.restart': async (request: GatewayRequest): Promise<OutboundMessage> => {
|
||||
if (!deps.restart) {
|
||||
const restart = deps.restart;
|
||||
if (!restart) {
|
||||
return makeError(request.id, ErrorCode.InternalError, 'Restart not available in this environment');
|
||||
}
|
||||
|
||||
@@ -68,7 +69,7 @@ export function createSystemHandlers(deps: SystemHandlerDeps) {
|
||||
|
||||
// Schedule restart after response is sent (next tick)
|
||||
queueMicrotask(() => {
|
||||
deps.restart!().catch((err) => {
|
||||
restart().catch((err) => {
|
||||
console.error('Restart failed:', err);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user