handleWebSocketMessage (core/websocket.ts)

vibesdk · realtime

Module exposing: handleWebSocketMessage, handleWebSocketClose, broadcastToConnections, sendToConnection, sendError

// Source: https://github.com/mperkins0155/vibesdk | License: MIT | Copyright 2025 Cloudflare
// Provided via justclaw.it.com; keep this notice with the code.
import { Connection } from 'agents';
import { createLogger } from '../../logger';
import { WebSocketMessageRequests, WebSocketMessageResponses } from '../constants';
import { WebSocketMessage, WebSocketMessageData, WebSocketMessageType } from '../../api/websocketTypes';
import { MAX_IMAGES_PER_MESSAGE, MAX_IMAGE_SIZE_BYTES, type ImageAttachment } from '../../types/image-attachment';
import { type CredentialsPayload } from '../inferutils/config.types';
import { checkUsageAndBalance } from '../../services/rate-limit';
import type { CodeGeneratorAgent } from './codingAgent';
import type { DeploymentTarget } from './types';

// Type for 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key