feat: Samsung lock screen face widget, voice assistant services, PiP mode and gitignore installers
Add Samsung proprietary Face Widget (lock screen/AOD) with terminal status display. Add voice interaction services (AgentVoiceInteractionService, RecognitionService) for digital assistant registration. Add PiP mode with voice/expand actions. Add session-state proxy, voice transcript routes, window controls component. Ignore installers/ directory.
This commit is contained in:
26
server/routes/session-state-proxy.ts
Normal file
26
server/routes/session-state-proxy.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { jsonResponse, errorResponse } from '../utils/cors'
|
||||
import { PORT_TERMINAL } from '../config'
|
||||
|
||||
/**
|
||||
* Proxy GET /api/session-state → terminal server.
|
||||
* Returns session-state + terminal-registry combined,
|
||||
* so external clients (Android widget) get everything in one call.
|
||||
*/
|
||||
export async function handleSessionStateProxy(url: URL): Promise<Response> {
|
||||
try {
|
||||
const [stateResp, registryResp] = await Promise.all([
|
||||
fetch(`http://localhost:${PORT_TERMINAL}/session-state`),
|
||||
fetch(`http://localhost:${PORT_TERMINAL}/terminal-registry`)
|
||||
])
|
||||
|
||||
const stateData = stateResp.ok ? await stateResp.json() : { agents: {} }
|
||||
const registryData = registryResp.ok ? await registryResp.json() : { registry: [] }
|
||||
|
||||
return jsonResponse({
|
||||
agents: stateData.agents ?? {},
|
||||
registry: registryData.registry ?? []
|
||||
})
|
||||
} catch (e: any) {
|
||||
return errorResponse(`Failed to reach terminal server: ${e.message}`, 502)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user