{
  "id": "com.glidevizion.detection-webhooks",
  "name": "Detection Webhooks",
  "version": "0.1.0",
  "description": "Forward saved person, vehicle, and smart-camera detections to a user-owned webhook.",
  "author": {
    "name": "Glide Vizion",
    "url": "https://glidevizion.com"
  },
  "homepage": "https://glidevizion.com/plugins",
  "runtime": "sidecar",
  "entrypoint": "./detection-webhooks",
  "health": {
    "required": true,
    "startup_deadline_seconds": 30,
    "heartbeat_interval_seconds": 10
  },
  "permissions": ["detections:read", "network:outbound", "ui:settings.panel"],
  "settings": {
    "title": "Detection Webhooks",
    "description": "Send meaningful saved detections to an HTTPS endpoint for alerts and automation.",
    "fields": [
      {
        "id": "webhook_url",
        "label": "Webhook URL",
        "type": "url",
        "required": true,
        "placeholder": "https://example.com/nvr/detections",
        "help": "The HTTP or HTTPS endpoint that receives each matching detection."
      },
      {
        "id": "webhook_secret",
        "label": "Shared secret",
        "type": "password",
        "placeholder": "Optional HMAC secret",
        "help": "When set, each request includes an HMAC SHA-256 signature."
      },
      {
        "id": "camera_id",
        "label": "Camera",
        "type": "camera",
        "required": true,
        "help": "Choose one camera and grant it under Camera access."
      },
      {
        "id": "minimum_confidence",
        "label": "Minimum confidence",
        "type": "number",
        "required": true,
        "min": 0,
        "max": 1,
        "step": 0.05,
        "placeholder": "0.5",
        "help": "Only detections at or above this score are sent. Use 0 to include camera alerts without confidence scores."
      },
      {
        "id": "labels",
        "label": "Labels",
        "type": "text",
        "placeholder": "person, vehicle",
        "help": "Optional comma-separated labels. Leave blank to include every label."
      },
      {
        "id": "source",
        "label": "Detection source",
        "type": "text",
        "placeholder": "plugin:com.glidevizion.coreml-detector",
        "help": "Optional exact source filter. Leave blank to include camera and local-model detections."
      },
      {
        "id": "include_snapshot",
        "label": "Include evidence image",
        "type": "boolean",
        "help": "Attach the saved JPEG as base64. This increases webhook size and sends the image to the configured endpoint."
      }
    ]
  },
  "ui": {
    "slots": [
      {
        "slot": "settings.panel",
        "title": "Detection Webhooks"
      }
    ]
  }
}
