/**
 * 共享常量定义
 * 定义JSON↔SSE双向转换中使用的常量
 */
export declare const PROTOCOL_TYPES: {
    readonly CHAT: "chat";
    readonly RESPONSES: "responses";
};
export declare const CONVERSION_DIRECTIONS: {
    readonly JSON_TO_SSE: "json_to_sse";
    readonly SSE_TO_JSON: "sse_to_json";
};
export declare const TIMEOUT_CONSTANTS: {
    readonly DEFAULT_TIMEOUT_MS: 30000;
    readonly HEARTBEAT_INTERVAL_MS: 15000;
    readonly INACTIVITY_TIMEOUT_MS: 60000;
    readonly EVENT_PROCESSING_TIMEOUT_MS: 5000;
    readonly CHUNK_TIMEOUT_MS: 10000;
    readonly TOTAL_TIMEOUT_MS: 300000;
};
export declare const CHUNK_CONSTANTS: {
    readonly DEFAULT_CHUNK_SIZE: 12;
    readonly DEFAULT_DELAY_MS: 8;
    readonly REASONING_CHUNK_SIZE: 24;
    readonly TEXT_CHUNK_SIZE: 12;
    readonly FUNCTION_CALL_CHUNK_SIZE: 24;
    readonly MAX_CHUNK_SIZE: 1024;
    readonly MIN_CHUNK_SIZE: 1;
};
export declare const BUFFER_CONSTANTS: {
    readonly DEFAULT_BUFFER_SIZE: 1000;
    readonly MAX_BUFFER_SIZE: 10000;
    readonly HIGH_WATER_MARK: 8000;
    readonly LOW_WATER_MARK: 2000;
    readonly BACKPRESSURE_THRESHOLD: 0.8;
};
export declare const RETRY_CONSTANTS: {
    readonly DEFAULT_MAX_RETRIES: 3;
    readonly INITIAL_DELAY_MS: 1000;
    readonly MAX_DELAY_MS: 30000;
    readonly BACKOFF_MULTIPLIER: 2;
    readonly JITTER_FACTOR: 0.1;
};
export declare const VALIDATION_CONSTANTS: {
    readonly MAX_SEQUENCE_NUMBER: 10000;
    readonly MAX_OUTPUT_ITEMS: 100;
    readonly MAX_CONTENT_PARTS: 1000;
    readonly MAX_TOOL_CALLS: 50;
    readonly MAX_MESSAGE_LENGTH: 1000000;
    readonly MAX_ARGUMENTS_LENGTH: 100000;
};
export declare const ERROR_CODES: {
    readonly TIMEOUT: "TIMEOUT";
    readonly INVALID_INPUT: "INVALID_INPUT";
    readonly PARSE_ERROR: "PARSE_ERROR";
    readonly VALIDATION_ERROR: "VALIDATION_ERROR";
    readonly STREAM_ERROR: "STREAM_ERROR";
    readonly CHAT_TIMEOUT: "CHAT_TIMEOUT";
    readonly CHAT_INVALID_CHUNK: "CHAT_INVALID_CHUNK";
    readonly CHAT_SEQUENCE_ERROR: "CHAT_SEQUENCE_ERROR";
    readonly CHAT_TOOL_CALL_ERROR: "CHAT_TOOL_CALL_ERROR";
    readonly CHAT_PARSE_ERROR: "CHAT_PARSE_ERROR";
    readonly CHAT_VALIDATION_ERROR: "CHAT_VALIDATION_ERROR";
    readonly CHAT_STREAM_ERROR: "CHAT_STREAM_ERROR";
    readonly RESPONSES_TIMEOUT: "RESPONSES_TIMEOUT";
    readonly RESPONSES_INVALID_EVENT: "RESPONSES_INVALID_EVENT";
    readonly RESPONSES_SEQUENCE_ERROR: "RESPONSES_SEQUENCE_ERROR";
    readonly RESPONSES_OUTPUT_ITEM_ERROR: "RESPONSES_OUTPUT_ITEM_ERROR";
    readonly RESPONSES_CONTENT_PART_ERROR: "RESPONSES_CONTENT_PART_ERROR";
    readonly RESPONSES_PARSE_ERROR: "RESPONSES_PARSE_ERROR";
    readonly RESPONSES_VALIDATION_ERROR: "RESPONSES_VALIDATION_ERROR";
    readonly RESPONSES_STREAM_ERROR: "RESPONSES_STREAM_ERROR";
};
export declare const STREAM_STATUS: {
    readonly IDLE: "idle";
    readonly STARTING: "starting";
    readonly ACTIVE: "active";
    readonly PAUSED: "paused";
    readonly COMPLETING: "completing";
    readonly COMPLETED: "completed";
    readonly ERROR: "error";
    readonly TIMEOUT: "timeout";
    readonly ABORTED: "aborted";
};
export declare const CHAT_EVENT_TYPES: {
    readonly CHUNK: "chat_chunk";
    readonly DONE: "chat.done";
    readonly ERROR: "error";
    readonly PING: "ping";
};
export declare const RESPONSES_EVENT_TYPES: {
    readonly RESPONSE_CREATED: "response.created";
    readonly RESPONSE_IN_PROGRESS: "response.in_progress";
    readonly RESPONSE_COMPLETED: "response.completed";
    readonly RESPONSE_REQUIRED_ACTION: "response.required_action";
    readonly RESPONSE_DONE: "response.done";
    readonly OUTPUT_ITEM_ADDED: "response.output_item.added";
    readonly OUTPUT_ITEM_DONE: "response.output_item.done";
    readonly CONTENT_PART_ADDED: "response.content_part.added";
    readonly CONTENT_PART_DONE: "response.content_part.done";
    readonly OUTPUT_TEXT_DELTA: "response.output_text.delta";
    readonly OUTPUT_TEXT_DONE: "response.output_text.done";
    readonly REASONING_TEXT_DELTA: "response.reasoning_text.delta";
    readonly REASONING_TEXT_DONE: "response.reasoning_text.done";
    readonly FUNCTION_CALL_ARGUMENTS_DELTA: "response.function_call_arguments.delta";
    readonly FUNCTION_CALL_ARGUMENTS_DONE: "response.function_call_arguments.done";
};
export declare const OUTPUT_ITEM_TYPES: {
    readonly REASONING: "reasoning";
    readonly MESSAGE: "message";
    readonly FUNCTION_CALL: "function_call";
    readonly SYSTEM_MESSAGE: "system_message";
    readonly FUNCTION_CALL_OUTPUT: "function_call_output";
};
export declare const CONTENT_PART_TYPES: {
    readonly REASONING_TEXT: "reasoning_text";
    readonly REASONING_SIGNATURE: "reasoning_signature";
    readonly REASONING_IMAGE: "reasoning_image";
    readonly OUTPUT_TEXT: "output_text";
    readonly INPUT_TEXT: "input_text";
    readonly INPUT_IMAGE: "input_image";
    readonly COMMENTARY: "commentary";
};
export declare const TOOL_CALL_TYPES: {
    readonly FUNCTION: "function";
};
export declare const RESPONSE_STATUS: {
    readonly IN_PROGRESS: "in_progress";
    readonly REQUIRES_ACTION: "requires_action";
    readonly COMPLETED: "completed";
    readonly FAILED: "failed";
    readonly INCOMPLETE: "incomplete";
};
export declare const FINISH_REASONS: {
    readonly STOP: "stop";
    readonly LENGTH: "length";
    readonly TOOL_CALLS: "tool_calls";
    readonly CONTENT_FILTER: "content_filter";
    readonly FUNCTION_CALL: "function_call";
};
export declare const REQUIRED_ACTION_TYPES: {
    readonly SUBMIT_TOOL_OUTPUTS: "submit_tool_outputs";
    readonly RUN_PARALLEL_TOOLS: "run_parallel_tools";
};
export declare const DEFAULT_CONFIG: {
    readonly TIMEOUT_MS: 30000;
    readonly HEARTBEAT_INTERVAL_MS: 15000;
    readonly CHUNK_SIZE: 12;
    readonly DELAY_MS: 8;
    readonly VALIDATION_MODE: "basic";
    readonly DEBUG_MODE: false;
    readonly CHAT: {
        readonly TIMEOUT_MS: 30000;
        readonly HEARTBEAT_INTERVAL_MS: 15000;
        readonly CHUNK_DELAY_MS: 10;
        readonly MAX_TOKENS_PER_CHUNK: 100;
        readonly VALIDATE_CHUNKS: true;
        readonly STRICT_MODE: false;
        readonly VALIDATE_TOOL_CALLS: true;
        readonly MAX_CONCURRENT_CHOICES: 10;
        readonly MAX_CONCURRENT_TOOL_CALLS: 50;
    };
    readonly RESPONSES: {
        readonly TIMEOUT_MS: 30000;
        readonly HEARTBEAT_INTERVAL_MS: 15000;
        readonly REASONING_CHUNK_SIZE: 24;
        readonly TEXT_CHUNK_SIZE: 12;
        readonly FUNCTION_CALL_CHUNK_SIZE: 24;
        readonly ENABLE_EVENT_VALIDATION: true;
        readonly ENABLE_SEQUENCE_VALIDATION: true;
        readonly STRICT_MODE: false;
        readonly VALIDATE_OUTPUT_ITEMS: true;
        readonly MAX_CONCURRENT_OUTPUT_ITEMS: 10;
        readonly MAX_CONCURRENT_CONTENT_PARTS: 50;
    };
};
export declare const ENV_KEYS: {
    readonly SSE_DEFAULT_TIMEOUT_MS: "SSE_DEFAULT_TIMEOUT_MS";
    readonly SSE_HEARTBEAT_INTERVAL_MS: "SSE_HEARTBEAT_INTERVAL_MS";
    readonly SSE_INACTIVITY_TIMEOUT_MS: "SSE_INACTIVITY_TIMEOUT_MS";
    readonly SSE_EVENT_PROCESSING_TIMEOUT_MS: "SSE_EVENT_PROCESSING_TIMEOUT_MS";
    readonly SSE_DEFAULT_CHUNK_SIZE: "SSE_DEFAULT_CHUNK_SIZE";
    readonly SSE_DEFAULT_DELAY_MS: "SSE_DEFAULT_DELAY_MS";
    readonly SSE_REASONING_CHUNK_SIZE: "SSE_REASONING_CHUNK_SIZE";
    readonly SSE_TEXT_CHUNK_SIZE: "SSE_TEXT_CHUNK_SIZE";
    readonly SSE_ARGS_CHUNK_SIZE: "SSE_ARGS_CHUNK_SIZE";
    readonly SSE_ARGS_DELAY_MS: "SSE_ARGS_DELAY_MS";
    readonly SSE_MAX_BUFFER_SIZE: "SSE_MAX_BUFFER_SIZE";
    readonly SSE_HIGH_WATER_MARK: "SSE_HIGH_WATER_MARK";
    readonly SSE_LOW_WATER_MARK: "SSE_LOW_WATER_MARK";
    readonly SSE_ENABLE_VALIDATION: "SSE_ENABLE_VALIDATION";
    readonly SSE_ENABLE_SEQUENCE_VALIDATION: "SSE_ENABLE_SEQUENCE_VALIDATION";
    readonly SSE_MAX_SEQUENCE_NUMBER: "SSE_MAX_SEQUENCE_NUMBER";
    readonly SSE_STRICT_MODE: "SSE_STRICT_MODE";
    readonly SSE_DEBUG_EVENTS: "SSE_DEBUG_EVENTS";
    readonly SSE_DEBUG_MODE: "SSE_DEBUG_MODE";
    readonly SSE_LOG_LEVEL: "SSE_LOG_LEVEL";
    readonly SSE_ENABLE_METRICS: "SSE_ENABLE_METRICS";
    readonly RCC_STREAM_HEARTBEAT: "RCC_STREAM_HEARTBEAT";
    readonly RCC_STREAM_PRE_HEARTBEAT: "RCC_STREAM_PRE_HEARTBEAT";
    readonly RCC_RESP_GENERIC_ONMESSAGE: "RCC_RESP_GENERIC_ONMESSAGE";
    readonly LMSTUDIO_BASE_URL: "LMSTUDIO_BASEURL";
    readonly LMSTUDIO_API_KEY: "LMSTUDIO_API_KEY";
};
export declare const HTTP_STATUS_CODES: {
    readonly OK: 200;
    readonly BAD_REQUEST: 400;
    readonly UNAUTHORIZED: 401;
    readonly FORBIDDEN: 403;
    readonly NOT_FOUND: 404;
    readonly METHOD_NOT_ALLOWED: 405;
    readonly TIMEOUT: 408;
    readonly TOO_MANY_REQUESTS: 429;
    readonly INTERNAL_SERVER_ERROR: 500;
    readonly BAD_GATEWAY: 502;
    readonly SERVICE_UNAVAILABLE: 503;
    readonly GATEWAY_TIMEOUT: 504;
};
export declare const CONTENT_TYPES: {
    readonly JSON: "application/json";
    readonly SSE: "text/event-stream";
    readonly TEXT: "text/plain";
    readonly HTML: "text/html";
};
export declare const SSE_FIELDS: {
    readonly EVENT: "event";
    readonly DATA: "data";
    readonly ID: "id";
    readonly RETRY: "retry";
};
export declare const STANDARD_SSE_EVENTS: {
    readonly OPEN: "open";
    readonly MESSAGE: "message";
    readonly ERROR: "error";
    readonly CLOSE: "close";
};
export declare const CACHE_PREFIXES: {
    readonly CONVERSION: "conversion:";
    readonly VALIDATION: "validation:";
    readonly METRICS: "metrics:";
    readonly CONFIG: "config:";
};
export declare const METRIC_NAMES: {
    readonly CONVERSION_REQUESTS_TOTAL: "conversion_requests_total";
    readonly CONVERSION_ERRORS_TOTAL: "conversion_errors_total";
    readonly EVENTS_PROCESSED_TOTAL: "events_processed_total";
    readonly TIMEOUTS_TOTAL: "timeouts_total";
    readonly CONVERSION_DURATION_SECONDS: "conversion_duration_seconds";
    readonly EVENT_PROCESSING_DURATION_SECONDS: "event_processing_duration_seconds";
    readonly BUFFER_SIZE_BYTES: "buffer_size_bytes";
    readonly ACTIVE_CONVERSIONS: "active_conversions";
    readonly BUFFER_UTILIZATION_RATIO: "buffer_utilization_ratio";
    readonly ERROR_RATE: "error_rate";
};
export declare const LOG_LEVELS: {
    readonly DEBUG: "debug";
    readonly INFO: "info";
    readonly WARN: "warn";
    readonly ERROR: "error";
};
export declare const REGEX_PATTERNS: {
    readonly WORD_BOUNDARY: RegExp;
    readonly SENTENCE_BOUNDARY: RegExp;
    readonly PARAGRAPH_BOUNDARY: RegExp;
    readonly JSON_STRING: RegExp;
    readonly SSE_LINE: RegExp;
    readonly SSE_DATA_LINE: RegExp;
    readonly REQUEST_ID: RegExp;
    readonly RESPONSE_ID: RegExp;
    readonly ITEM_ID: RegExp;
    readonly CALL_ID: RegExp;
};
