|
|
@@ -65,7 +65,7 @@ Route table (`${serviceId}:${operation}`):
|
|
|
| `History:getAll` | — | Query SQLite (last 50), emit array response |
|
|
|
| `History:delete` | `{ archiveId: string }` | Delete record + disk image, emit `{ deleted: boolean }` |
|
|
|
| `History:clearAll` | — | Wipe all records + images, emit `{ deleted: number }` |
|
|
|
-| `Chat:send` | `{ message: string }` | POST to `N8N_WEBHOOK_URL` server-to-server, unwrap array to first element, emit response |
|
|
|
+| `Chat:send` | `{ message: string }` | POST to `N8N_WEBHOOK_URL` server-to-server; normalizes the reply into `{ text, has_visuals, visual_data }` (unwraps array/`output`/fenced-JSON string shapes from the n8n agent) and emits it |
|
|
|
| `Chat:clear` | — | Generate new session UUID, emit `{ status: 'success' }` |
|
|
|
| `PalmHistory:GetImage` | `{ archiveId: string }` | Load image from disk, encode to Base64 data URL, emit response |
|
|
|
| `Surveillance:SubscribeTelemetry` | — | Join `telemetry-room`; immediately push latest snapshot; reply `{ status: 'subscribed' }` |
|