"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWebSocketEvent = isWebSocketEvent;
function isWebSocketEvent(obj) {
    if (typeof obj !== 'object' || obj === null) {
        return false;
    }
    const { event, data } = obj;
    if (typeof event !== 'string' || typeof data !== 'object') {
        return false;
    }
    switch (event) {
        case 'refresh-ui':
            return true;
        case 'plan-ready':
            return data !== null && 'sessionId' in data && 'sessionInputId' in data;
        case 'system-prompt-update':
            return data !== null && 'systemPrompt' in data;
        case 'session-created':
            return data !== null && 'sessionId' in data;
        case 'llm-stream-chunk':
            return (data !== null &&
                'sessionInputId' in data &&
                'chunk' in data &&
                'isFirst' in data);
        case 'llm-thought-chunk':
            return (data !== null &&
                'sessionInputId' in data &&
                'chunk' in data &&
                'isFirst' in data);
        case 'llm-generation-started':
            return (data !== null &&
                'sessionInputId' in data &&
                'sessionId' in data &&
                'isStreaming' in data);
        case 'llm-generation-in-progress':
            return data !== null && 'sessionInputId' in data;
        case 'llm-generation-ended':
            return data !== null && 'sessionInputId' in data && 'sessionId' in data;
        case 'llm-retry-attempt':
            return (data !== null &&
                'sessionInputId' in data &&
                'sessionId' in data &&
                'attempt' in data &&
                'maxAttempts' in data);
        default:
            return false;
    }
}
//# sourceMappingURL=websocket.events.js.map