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 check
  • GET /v1/plugins — Installed plugins and detection status
  • GET /v1/cards — Live card snapshot pushed to mobile
  • POST /v1/event or POST /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 NameCard StatusPhone UX
PermissionRequest / waiting_approvalwaiting_approvalAmber pulsing pill + card promoted to top
PreToolUse / PostToolUse / UserPromptSubmitrunningIndigo active status + live tool name
Stop / TaskCompleted / donedoneEmerald completed pill
PostToolUseFailure / errorerrorRed error alert
SessionEnd / idle / resetidleReturns to standby
← Contributing Plugins FAQ →