From 4a128f7719aa6e50cc9a0b756a295f48b540b1a9 Mon Sep 17 00:00:00 2001 From: Sanju Sivalingam Date: Fri, 20 Feb 2026 01:55:40 +0530 Subject: [PATCH] feat(shared): add voice overlay protocol types --- packages/shared/src/protocol.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/shared/src/protocol.ts b/packages/shared/src/protocol.ts index 5aeda72..53014cb 100644 --- a/packages/shared/src/protocol.ts +++ b/packages/shared/src/protocol.ts @@ -8,7 +8,11 @@ export type DeviceMessage = | { type: "pong" } | { type: "heartbeat"; batteryLevel: number; isCharging: boolean } | { type: "apps"; apps: InstalledApp[] } - | { type: "stop_goal" }; + | { type: "stop_goal" } + // Voice overlay + | { type: "voice_start" } + | { type: "voice_chunk"; data: string } + | { type: "voice_stop"; action: "send" | "cancel" }; export type ServerToDeviceMessage = | { type: "auth_ok"; deviceId: string } @@ -35,7 +39,10 @@ export type ServerToDeviceMessage = | { type: "intent"; requestId: string; intentAction: string; intentUri?: string; intentType?: string; intentExtras?: Record; packageName?: string } | { type: "ping" } | { type: "goal_started"; sessionId: string; goal: string } - | { type: "goal_completed"; sessionId: string; success: boolean; stepsUsed: number }; + | { type: "goal_completed"; sessionId: string; success: boolean; stepsUsed: number } + // Voice overlay + | { type: "transcript_partial"; text: string } + | { type: "transcript_final"; text: string }; export type DashboardMessage = | { type: "device_online"; deviceId: string; name: string }