multica/src/shared/gateway-sdk/actions/hello.ts
yushen 7d94b40a11 Implement WebSocket Gateway with NestJS and client SDK
- Add NestJS WebSocket Gateway with Socket.IO for real-time communication
- Create client SDK (GatewayClient) supporting both browser and Node.js
- Implement device registration and point-to-point message routing
- Add action types: request/response (RPC), stream (for chat messages)
- Integrate Pino logger for structured logging
- Configure heartbeat detection (pingInterval/pingTimeout)
- Use UUID v7 for time-ordered message IDs

Gateway features:
- Device registration with deviceId and deviceType (client/agent)
- Message routing between devices via Gateway
- HTTP API endpoints (/ping, /broadcast)
- Auto-reconnect support in client SDK

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:46:51 +08:00

14 lines
326 B
TypeScript

/** Hello Action - 测试用的问候消息 */
export const HelloAction = "hello" as const;
export const HelloResponseAction = "hello_response" as const;
/** Hello 请求 payload */
export interface HelloPayload {
greeting: string;
}
/** Hello 响应 payload */
export interface HelloResponsePayload {
reply: string;
}