Hook & Local Event Protocol
When v2d Desktop is running, it exposes a loopback-only HTTP endpoint on:
http://127.0.0.1:39472
Any local CLI, IDE hook, build script, or AI agent can POST JSON to update a card on your phone in real time.
Endpoints
GET /v1/health— Health checkGET /v1/plugins— Installed plugins and detection statusGET /v1/cards— Live card snapshot pushed to mobilePOST /v1/eventorPOST /v1/hook/<pluginId>— Push a status event
Example Request
curl -X POST http://127.0.0.1:39472/v1/event \
-H "Content-Type: application/json" \
-d '{
"pluginId": "cursor",
"event": "PermissionRequest",
"toolName": "Bash",
"title": "Run command · npm test",
"subtitle": "Tap Allow on your phone to approve",
"cwd": "/projects/v2d"
}'
Status Mapping
| Event Name | Card Status | Phone UX |
|---|---|---|
PermissionRequest / waiting_approval | waiting_approval | Amber pulsing pill + card promoted to top |
PreToolUse / PostToolUse / UserPromptSubmit | running | Indigo active status + live tool name |
Stop / TaskCompleted / done | done | Emerald completed pill |
PostToolUseFailure / error | error | Red error alert |
SessionEnd / idle / reset | idle | Returns to standby |