{
  "$defs": {
    "ActAnswer": {
      "description": "`{\"action\": …, \"ids\": […]}`: what was done, and what was skipped and why.",
      "properties": {
        "done": {
          "items": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "skipped": {
          "items": {
            "$ref": "#/$defs/Skipped"
          },
          "type": "array"
        }
      },
      "required": [
        "done",
        "skipped"
      ],
      "type": "object"
    },
    "AddAnswer": {
      "description": "An address added (`url`): the download's id, or `pending` while a torrent's files are looked\nup (it joins the list once they are known).",
      "properties": {
        "id": {
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "pending": {
          "default": false,
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "ApiAnswer": {
      "description": "`{\"api\": true}` / `{\"api\": false}`: the API's new state.",
      "properties": {
        "api": {
          "type": "boolean"
        }
      },
      "required": [
        "api"
      ],
      "type": "object"
    },
    "BrowserCookie": {
      "description": "One cookie as the browser keeps it (`cookies.getAll`'s fields, under the extension's names\ntoo: `hostOnly`, `expirationDate`).",
      "properties": {
        "domain": {
          "default": "",
          "description": "`.youtube.com` (sent to its subdomains too) or a host name.",
          "type": "string"
        },
        "expires": {
          "default": null,
          "description": "When it expires, in seconds since 1970; none: when the browser closes.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "host_only": {
          "default": false,
          "description": "Sent to `domain` itself only, never its subdomains.",
          "type": "boolean"
        },
        "name": {
          "default": "",
          "type": "string"
        },
        "path": {
          "default": "",
          "type": "string"
        },
        "secure": {
          "default": false,
          "description": "Sent over HTTPS only.",
          "type": "boolean"
        },
        "value": {
          "default": "",
          "type": "string"
        }
      },
      "type": "object"
    },
    "CategoryInfo": {
      "description": "One category of the list.",
      "properties": {
        "key": {
          "description": "What `category` takes and a download's `category` says (a built-in category's English\nname, as shipped).",
          "type": "string"
        },
        "name": {
          "description": "Its name as the user sees it: a built-in one's English name (translated where it is\nshown) unless the user renamed it.",
          "type": "string"
        }
      },
      "required": [
        "key",
        "name"
      ],
      "type": "object"
    },
    "DownloadInfo": {
      "description": "One download of the list.",
      "properties": {
        "added": {
          "description": "When it was added, as the list shows it; null for downloads from before that column.",
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "default": "",
          "description": "Its category's `key` (see [`CategoryInfo`]).",
          "type": "string"
        },
        "downloaded": {
          "description": "Bytes downloaded so far.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "error": {
          "description": "Why it failed, for a download in `Error`.",
          "type": [
            "string",
            "null"
          ]
        },
        "exists": {
          "description": "`Complete`: whether its file (a torrent's folder) is still at `path`: false once it was\nmoved or deleted. Null while not looked at yet, and for the other statuses.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "file": {
          "description": "The file's name.",
          "type": "string"
        },
        "finished": {
          "description": "`Complete`: when it finished, in seconds since 1970 (null when the list doesn't know).",
          "format": "int64",
          "type": [
            "integer",
            "null"
          ]
        },
        "icon": {
          "description": "The browser popup's list (#1496): its file type icon, a key of [`RecentAnswer::icons`].",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "What the actions take (`ids`); never reused.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "kind": {
          "description": "What downloads it when it isn't a plain file: `video` (from a page, by yt-dlp),\n`torrent`, `gallery` (by gallery-dl). Null: a file.",
          "type": [
            "string",
            "null"
          ]
        },
        "left": {
          "description": "Seconds left at the speed it goes now, while it downloads with a known size.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "path": {
          "description": "Where it is saved: the file, or a torrent's folder.",
          "type": "string"
        },
        "redownload": {
          "description": "It can be downloaded again from the start (Redownload): a file that isn't running.",
          "type": "boolean"
        },
        "size": {
          "description": "Its size in bytes; null while unknown.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "speed": {
          "description": "Bytes per second; 0 when it isn't running.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "status": {
          "description": "`Queued` (added, never started), `Downloading`, `Stopped`, `Complete` or `Error`.",
          "type": "string"
        },
        "url": {
          "description": "Its address (a video's page, a torrent's magnet link).",
          "type": "string"
        }
      },
      "required": [
        "id",
        "file",
        "url",
        "path",
        "status",
        "downloaded",
        "speed"
      ],
      "type": "object"
    },
    "ErrorAnswer": {
      "description": "An unknown question or action, or a question while the API is off.",
      "properties": {
        "code": {
          "description": "For programs: `\"api-off\"` while the API is off.",
          "type": [
            "string",
            "null"
          ]
        },
        "error": {
          "description": "For people; its wording may change.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object"
    },
    "LinksPart": {
      "description": "One part of a page's links ([`Command::links_part`]): the browser's extension sends a list\nlonger than the native host takes at once ([`MAX_MESSAGE`]) in parts, each with the page's\nreferrer and cookies, and the app puts them back together into one list.",
      "properties": {
        "batch": {
          "default": "",
          "description": "The same in every part of one list, and in no other list's (random, made by the\nextension): letters, digits and `-`, at most 64.",
          "type": "string"
        },
        "count": {
          "default": 0,
          "description": "How many parts the list came in (at most [`MAX_LINK_PARTS`]).",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "index": {
          "default": 0,
          "description": "This part's place in the list, from 0.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ListAnswer": {
      "description": "`{\"query\": \"list\"}`: every download, and the total speed.",
      "properties": {
        "categories": {
          "default": [],
          "description": "The categories a new download can go to (General first).",
          "items": {
            "$ref": "#/$defs/CategoryInfo"
          },
          "type": "array"
        },
        "downloads": {
          "items": {
            "$ref": "#/$defs/DownloadInfo"
          },
          "type": "array"
        },
        "free": {
          "default": null,
          "description": "Free space where downloads go (the General category's folder), bytes; null when unknown.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "queues": {
          "default": [],
          "description": "The queues, in the Scheduler's order (the first is the main queue).",
          "items": {
            "$ref": "#/$defs/QueueInfo"
          },
          "type": "array"
        },
        "speed": {
          "description": "The total download speed, bytes per second.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "downloads",
        "speed"
      ],
      "type": "object"
    },
    "PairAnswer": {
      "description": "`{\"pair\": true}` (#157): a new pairing code for the remote control, while it is on.",
      "properties": {
        "code": {
          "description": "The 8-digit code; it works once, for `minutes`.",
          "type": "string"
        },
        "minutes": {
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "qr": {
          "description": "A QR code of the first address with the code, drawn with text blocks for a terminal.",
          "type": "string"
        },
        "urls": {
          "description": "The page's addresses, the one a phone most likely reaches first.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "code",
        "minutes",
        "urls",
        "qr"
      ],
      "type": "object"
    },
    "QueueInfo": {
      "description": "One queue of the list.",
      "properties": {
        "ids": {
          "description": "Its downloads' ids, in its order.",
          "items": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "name": {
          "description": "Its name: what `queue` takes (a built-in queue's in English, as shipped).",
          "type": "string"
        },
        "running": {
          "description": "Is it running?",
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "running",
        "ids"
      ],
      "type": "object"
    },
    "RecentAct": {
      "description": "One of the browser popup's buttons on a download ([`Command::recent_act`], #1496).",
      "properties": {
        "act": {
          "default": "",
          "description": "One of [`RECENT_ACTS`].",
          "type": "string"
        },
        "id": {
          "default": 0,
          "description": "The download (its `id` in the list); none for `clear-done`.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "RecentActAnswer": {
      "description": "[`crate::Command::recent_act`]'s answer: done, or why not.",
      "properties": {
        "done": {
          "default": false,
          "type": "boolean"
        },
        "why": {
          "description": "Why not: one of [`recent_why`]'s.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "RecentAnswer": {
      "description": "The browser popup's list of downloads (#1496), [`crate::Command::recent`]'s answer: the\nnewest that match its search and filter, how many match each filter, and the file type icons\nit lacked. Within [`RECENT_BUDGET`] bytes, so the native host's message to the browser stays\nunder its 1 MB limit.",
      "properties": {
        "counts": {
          "$ref": "#/$defs/RecentCounts",
          "default": {
            "all": 0,
            "done": 0,
            "failed": 0,
            "running": 0
          },
          "description": "How many match the search under each filter (all of them, not only those answered)."
        },
        "downloads": {
          "default": [],
          "description": "Newest first, at most the `limit` asked for.",
          "items": {
            "$ref": "#/$defs/DownloadInfo"
          },
          "type": "array"
        },
        "icons": {
          "additionalProperties": {
            "type": "string"
          },
          "default": {},
          "description": "The icons the popup lacked, by key: `data:` addresses of PNG pictures (an SVG one for a\nLinux desktop's scalable icon theme), the system's own for each type.",
          "type": "object"
        },
        "running": {
          "default": 0,
          "description": "Downloads running now, whatever the search (the toolbar button's count).",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "share": {
          "default": false,
          "description": "VDM can open this system's share sheet for a file (Windows, macOS: Linux has none).",
          "type": "boolean"
        },
        "speed": {
          "default": 0,
          "description": "The total download speed, bytes per second.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "RecentAsk": {
      "description": "The browser popup's list of downloads ([`Command::recent`], #1496): which ones, and the file\ntype icons it lacks.",
      "properties": {
        "filter": {
          "default": "",
          "description": "One of [`RECENT_FILTERS`]: every download, those running, complete, or failed.",
          "type": "string"
        },
        "have": {
          "default": [],
          "description": "The file type icons the popup has already (their keys): not sent again.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "limit": {
          "default": 0,
          "description": "The most downloads answered, newest first (at most [`RECENT_MAX`]); 0: none, only the\ncounts (the toolbar button's count of running downloads).",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "px": {
          "default": 0,
          "description": "The icons' side in pixels (the popup's size for them at the screen's scale), 16 to 64.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "search": {
          "default": "",
          "description": "Words to find in the file's name or its address (case doesn't matter); empty: all.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "RecentCounts": {
      "description": "How many downloads match the popup's search under each of its filters.",
      "properties": {
        "all": {
          "default": 0,
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "done": {
          "default": 0,
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "failed": {
          "default": 0,
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "running": {
          "default": 0,
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "Request": {
      "description": "One request line: the token from ipc.json and the command's fields.",
      "properties": {
        "action": {
          "default": null,
          "description": "Automation API: `\"pause\"`, `\"start\"`, `\"remove\"` (off the list, its file kept) or\n`\"delete\"` (with its file) the downloads `ids`; answered with what was done and skipped.\n`\"start_queue\"` / `\"stop_queue\"` start or stop the queue named `queue`.",
          "type": [
            "string",
            "null"
          ]
        },
        "api": {
          "default": null,
          "description": "Automation API: turn it on or off.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "category": {
          "default": null,
          "description": "A category for `url` (its `key` in the list's `categories`); none: by the file's type.",
          "type": [
            "string",
            "null"
          ]
        },
        "checksum": {
          "description": "The checksum the finished file must have, as the command line takes it (`sha256:…`, a\nbare hex value, …): `vdm_engine::verify::Hash` reads it.",
          "type": [
            "string",
            "null"
          ]
        },
        "cookie_jar": {
          "description": "From the browser: its cookies, each with the domain, path and flags the browser keeps\nfor it. For a video, yt-dlp's cookie file: yt-dlp may ask another host than the page's (a\nYouTube Music page is looked up on www.youtube.com), and a cookie of `.youtube.com` goes\nthere too. For a file (#1540), those of every host its download went through in the\nbrowser (its address, its redirects, `final_url`), partitioned (CHIPS) ones of its page\nincluded: the download's cookie jar sends each to the hosts it belongs to, never to\nanother. An older extension sends `cookies` only.",
          "items": {
            "$ref": "#/$defs/BrowserCookie"
          },
          "type": "array"
        },
        "cookies": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "dir": {
          "default": null,
          "description": "Save folder (`/p`) and file name (`/f`).",
          "type": [
            "string",
            "null"
          ]
        },
        "exclude_site": {
          "default": null,
          "description": "From the browser's toolbar button: leave this site's downloads (a host name) to the\nbrowser from now on (Options → File types → excluded sites).",
          "type": [
            "string",
            "null"
          ]
        },
        "exit": {
          "default": false,
          "description": "`/exit` (beyond IDM): the running app saves and quits (the installer, before an upgrade\nor an uninstall). Starts nothing when no app runs.",
          "type": "boolean"
        },
        "final_url": {
          "default": null,
          "description": "From the browser: where its redirects from `url` ended (`url` stays the address asked\nfor, so an expired signed link can be renewed from it).",
          "type": [
            "string",
            "null"
          ]
        },
        "hidden": {
          "default": false,
          "description": "`/fromhost` (beyond IDM, #1333): started by the browser native messaging host:\nstarts hidden without marking an OS session login.",
          "type": "boolean"
        },
        "id": {
          "description": "The hand-over's own id (#1651), random, made by the one sending it: a command sent again\nwith the same id, because its answer never came (lost on the way, or later than the\nsender waited), is answered `ok` and not given to the app twice. Letters, digits and `-`,\nat most 64; none (an older sender's): taken as it comes. Questions (those answered with\nmore than `ok`) aren't sent again, and carry none.",
          "type": [
            "string",
            "null"
          ]
        },
        "ids": {
          "default": [],
          "items": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          },
          "type": "array"
        },
        "include_site": {
          "description": "That button's Undo (#404): the host name `exclude_site` listed is taken off the excluded\nsites again (a pattern of the user's own that covers it stays).",
          "type": [
            "string",
            "null"
          ]
        },
        "later": {
          "default": false,
          "description": "`/a`: add to the main queue, don't start.",
          "type": "boolean"
        },
        "links": {
          "default": [],
          "description": "From the browser's right-click menu: the links of a page or a selection, offered in the\nlist window to pick from (the browser's `referer` and `cookies` go with them).",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "links_part": {
          "anyOf": [
            {
              "$ref": "#/$defs/LinksPart"
            },
            {
              "type": "null"
            }
          ],
          "description": "With `links`: which part of a page's list they are, when the list was too long for one\nmessage from the browser ([`MAX_MESSAGE`]); the app adds the list once all its parts are\nin. None: the whole list (an older extension's, or a short one)."
        },
        "mime": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "origin": {
          "description": "From the browser (#900): the `Origin` its page's player sent with a video's stream or\nfile (`video_page`, `video_lookup`), sent again with it, its playlists and each of its\npieces, as a site's video server may serve its own pages' players only.",
          "type": [
            "string",
            "null"
          ]
        },
        "page_images": {
          "description": "With `links` (#1781): those of them that are pictures located on the page (shown in it,\nnot links to them), which Link grabber hides while its \"Hide images located on this web\npage\" is ticked. Each is in `links` too, so an older app, which knows nothing of this,\nlists them as links. With `links_part`: those among this part's links.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "page_url": {
          "description": "From the browser (#607): the web page the download was started from, whole (its tab's\naddress; a link's opened in a tab of its own, the tab that opened it), where the Referer\nis often cut to the site's address by the page's referrer policy. Kept with the download:\nRefresh download address opens it.",
          "type": [
            "string",
            "null"
          ]
        },
        "pair": {
          "default": false,
          "description": "The remote control (#157, `voltdownloadmanager-cli pair`): show a new pairing code;\nanswered with it, the page's addresses and a QR code to scan ([`api::PairAnswer`]).",
          "type": "boolean"
        },
        "panel_hide_site": {
          "default": null,
          "description": "From that button's menu: never show it on this site (a host name) again.",
          "type": [
            "string",
            "null"
          ]
        },
        "panel_show_site": {
          "default": null,
          "description": "From that button's \"Turn on\" (after \"Never on <site>\"): show it on this site again.",
          "type": [
            "string",
            "null"
          ]
        },
        "post": {
          "default": null,
          "description": "From the browser: a form's download, re-sent as a POST with this body and its\nContent-Type (`post_type`).",
          "type": [
            "string",
            "null"
          ]
        },
        "post_type": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "private": {
          "default": false,
          "description": "From a private (incognito) window: the download is not written to the saved list, unless\nthe app's Options → General → \"Keep private-window downloads in the list\" is on.",
          "type": "boolean"
        },
        "proxy": {
          "default": null,
          "description": "From the browser (#42): the proxy it uses for this address (\"http://host:port\",\n\"https://…\", \"socks5h://…\", \"socks4://…\"), set by a VPN or proxy extension or its\nsettings; or its proxy auto-config script's text. The app downloads through the same\none (Options → Proxy / Socks → \"Use proxy/socks from a browser's request\").",
          "type": [
            "string",
            "null"
          ]
        },
        "proxy_login": {
          "default": false,
          "description": "That proxy asked the browser for a login, which the extension that set it answers with\nits own: no other program can have it.",
          "type": "boolean"
        },
        "proxy_pac": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "query": {
          "default": null,
          "description": "Automation API (off by default, beyond IDM): `\"list\"` asks for every download as JSON.",
          "type": [
            "string",
            "null"
          ]
        },
        "queue": {
          "default": null,
          "description": "A queue by name: where `url` waits (with `later`), or the one `action` starts or stops.",
          "type": [
            "string",
            "null"
          ]
        },
        "recent": {
          "anyOf": [
            {
              "$ref": "#/$defs/RecentAsk"
            },
            {
              "type": "null"
            }
          ],
          "description": "From the browser's toolbar button (#1496, its native host asks): the newest downloads its\npopup lists, answered with an [`api::RecentAnswer`] whatever the automation API's switch,\nnever for a paired device."
        },
        "recent_act": {
          "anyOf": [
            {
              "$ref": "#/$defs/RecentAct"
            },
            {
              "type": "null"
            }
          ],
          "description": "That list's buttons: act on one download (open it, show it in its folder, copy its file,\nshare it, pause, resume…), answered with an [`api::RecentActAnswer`]."
        },
        "referer": {
          "default": null,
          "description": "From the browser: request context to reuse.",
          "type": [
            "string",
            "null"
          ]
        },
        "show": {
          "default": null,
          "description": "`/show <window>` (beyond IDM): the running app opens one of its windows by name, for\nscreenshots and scripted checks (tools/lab/docs-shots.ps1): `addurl`, `batch`, `find`,\n`scheduler`, `about`, `language`, `shortcuts`, `speedlimit`, `properties`, `delete`,\n`progress`, `existing-files`, `video-page`, `video-helpers`, `video-subs`,\n`torrent-settings`, `add-trackers`, `menu` (the first download's right-click menu),\n`options[:general|types|saveto|downloads|connection|proxy|logins|sounds|regional|panels]`.",
          "type": [
            "string",
            "null"
          ]
        },
        "show_download": {
          "default": null,
          "description": "That button's \"Show\", once a download was added: the main window comes up with the newest\ndownload of this address (the video's page as it was looked up, or its file) selected.",
          "type": [
            "string",
            "null"
          ]
        },
        "silent": {
          "default": false,
          "description": "`/n`: silent — no Download File Info dialog.",
          "type": "boolean"
        },
        "size": {
          "default": null,
          "description": "From the browser: the size and type its own download had (no need to look them up).",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "start_queue": {
          "default": false,
          "description": "`/s`: start the main queue.",
          "type": "boolean"
        },
        "startup": {
          "default": false,
          "description": "`/startup` (beyond IDM): started with the session (Options → General → Launch on\nstartup, or the installer's \"Start when Windows starts\", #226): VDM starts in the\nnotification area, its window hidden. Changes nothing in a running app.",
          "type": "boolean"
        },
        "token": {
          "description": "The `token` from ipc.json (it changes at every start of the app).",
          "type": "string"
        },
        "url": {
          "default": null,
          "description": "The URL to download (`/d`).",
          "type": [
            "string",
            "null"
          ]
        },
        "user_agent": {
          "default": null,
          "type": [
            "string",
            "null"
          ]
        },
        "video_direct": {
          "default": false,
          "description": "With `video_page`, from that button over a video that plays a plain file (no stream, no\npage to read): `video_page` is that file, downloaded as any file at once, with no window.",
          "type": "boolean"
        },
        "video_lookup": {
          "anyOf": [
            {
              "$ref": "#/$defs/VideoLookup"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "From the browser's quality menu over a video (the button's click): look this video up\nwith yt-dlp, off the window, and answer at once with a token to ask about it\n([`api::VideoLookupAnswer`], `pending`). The browser's request context (`referer`,\n`cookies`, `cookie_jar`, `user_agent`, `private`) goes with it and stays the look-up's."
        },
        "video_page": {
          "default": null,
          "description": "From the browser's download button over a video: open the Download video window for this\npage (its address; an embedded player's own).",
          "type": [
            "string",
            "null"
          ]
        },
        "video_part_from": {
          "description": "With `video_page`, from that button's \"Download a part from here...\" (#1662): the window\nopens with Part ticked, From this many seconds into the video (where its player was).",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "video_pick": {
          "anyOf": [
            {
              "$ref": "#/$defs/VideoPick"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The quality menu: download the choice made there, with the look-up's own selector and\ncontext (`private` must be the look-up's); answered `started` or `queued`, or\n`use-window` when it can't be (the Download video window then does it)."
        },
        "video_poll": {
          "default": null,
          "description": "The quality menu: how is the look-up of this token going (`pending`, `ready` with the\nchoices, `failed`, `list`, `gone`)?",
          "type": [
            "string",
            "null"
          ]
        },
        "video_title": {
          "default": null,
          "description": "The title of the page the button was clicked on (the tab's, for a player in a frame of\nit), without the site's name (`Film | Site` is `Film`: the extension's `withoutSiteName`):\na video yt-dlp knows only by its address is named by it.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "token"
      ],
      "type": "object"
    },
    "Skipped": {
      "properties": {
        "id": {
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "why": {
          "description": "\"no such download\", \"not running\", \"already running\", \"complete\" or \"running: pause it\nfirst\".",
          "type": "string"
        }
      },
      "required": [
        "id",
        "why"
      ],
      "type": "object"
    },
    "VideoChoice": {
      "description": "One quality the browser's quality menu offers.",
      "properties": {
        "approx": {
          "description": "`size` is an estimate (a stream's bitrate times its length, a conversion's), shown as\nabout (\"~532 MB\"); otherwise it is the bytes of exactly the streams this downloads (#801).",
          "type": "boolean"
        },
        "audio": {
          "default": false,
          "description": "Only the sound (an audio file, a conversion to MP3, Opus or FLAC): the menu lists these\napart from the videos. False from an app older than the field.",
          "type": "boolean"
        },
        "codec": {
          "description": "The picture's codec as people name it: `AV1`, `VP9`, `H.264`, `H.265`… (#755). None\nfrom an app older than the field.",
          "type": [
            "string",
            "null"
          ]
        },
        "compatible": {
          "description": "The most compatible choice (#1439): an H.264 picture with AAC sound in an MP4, which\nevery video editor, TV and phone plays; the menu says so beside its height. False from\nan app older than the field.",
          "type": "boolean"
        },
        "ext": {
          "default": "",
          "description": "The file's type (`mp4`, `mp3`).",
          "type": "string"
        },
        "fps": {
          "description": "Frames a second, rounded (an app older than #755 said it only above 31).",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "height": {
          "description": "The picture's height in pixels (the button's chip: 1080p, 4K); none for the sound, or a\nfile known only by its type.",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "kbps": {
          "description": "The sound's bitrate in kbit/s, for the sound as the site has it.",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "label": {
          "default": "",
          "description": "What the menu shows (\"720p mp4\"), in VDM's language.",
          "type": "string"
        },
        "language": {
          "description": "The language of its sound, in VDM's words (#1961: \"Deutsch · German\", \"English,\noriginal\"), when the video's sound comes in several; none for one language, and from an\napp older than the field.",
          "type": [
            "string",
            "null"
          ]
        },
        "original": {
          "description": "The sound as the site sends it (not converted): the button's list says \"original\".",
          "type": "boolean"
        },
        "range": {
          "description": "The picture's dynamic range when worth saying: `HDR`, `Dolby Vision`, or `SDR` beside an\nHDR choice of the same height (#755).",
          "type": [
            "string",
            "null"
          ]
        },
        "size": {
          "default": null,
          "description": "Bytes, exact or estimated (`approx`); null when unknown.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "VideoLookup": {
      "description": "The video the browser's quality menu asks about ([`Command::video_lookup`]).",
      "properties": {
        "address": {
          "default": "",
          "description": "What yt-dlp looks up: the video's own file or its stream's manifest when the page plays\none, else the page.",
          "type": "string"
        },
        "store_id": {
          "default": null,
          "description": "The browser's cookie store the page is in (Firefox's containers): a choice is only taken\nfrom the same one.",
          "type": [
            "string",
            "null"
          ]
        },
        "title": {
          "default": null,
          "description": "The title of the page the button was clicked on, as [`Command::video_title`] has it: a\nvideo yt-dlp knows only by its address is named by it.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "VideoLookupAnswer": {
      "description": "The browser's quality menu (`video_lookup`, `video_poll`, `video_pick`): where a look-up is,\nor what became of a choice. Answered whatever the automation API's switch (the browser's\nhost asks, not a program).",
      "properties": {
        "choices": {
          "description": "`ready`: the qualities to choose from, labelled in VDM's language; `video_pick` takes a\nplace in this list.",
          "items": {
            "$ref": "#/$defs/VideoChoice"
          },
          "type": "array"
        },
        "message": {
          "description": "`failed` with [`lookup::ERROR`]: why, in VDM's words and language.",
          "type": [
            "string",
            "null"
          ]
        },
        "notice": {
          "anyOf": [
            {
              "$ref": "#/$defs/VideoNotice"
            },
            {
              "type": "null"
            }
          ],
          "description": "`ready` (and `failed` with [`lookup::NO_CHOICES`]): what the look-up lacked and how to\nmend it, shown with the choices (#852: YouTube's qualities need a JavaScript runtime).\nNone from an app older than the field."
        },
        "reason": {
          "description": "`failed`: [`lookup::NO_YTDLP`], [`lookup::NO_CHOICES`] or [`lookup::ERROR`].",
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "default": "",
          "description": "One of [`lookup`]'s states.",
          "type": "string"
        },
        "title": {
          "description": "`ready`: the video's title, the file's name: the page's when yt-dlp knows the video only\nby its address, as the Download video window names it ([`crate::Command::video_title`]).",
          "type": [
            "string",
            "null"
          ]
        },
        "token": {
          "description": "`pending` and `ready`: the look-up's token, to ask about it and to pick from it.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "VideoNotice": {
      "description": "A word in the browser's quality menu on what the look-up lacked (#852), in VDM's language.",
      "properties": {
        "link": {
          "default": "",
          "description": "The link's words (\"How to install one\").",
          "type": "string"
        },
        "text": {
          "default": "",
          "description": "What is wrong and what to do (\"YouTube needs a JavaScript runtime…\").",
          "type": "string"
        },
        "url": {
          "default": "",
          "description": "The help page it opens, on VDM's website.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "VideoPick": {
      "description": "A choice made in the browser's quality menu ([`Command::video_pick`]).",
      "properties": {
        "choice": {
          "default": 0,
          "description": "The choice's place in the look-up's `choices`.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "store_id": {
          "default": null,
          "description": "The cookie store the choice was made in: the look-up's, or it isn't taken.",
          "type": [
            "string",
            "null"
          ]
        },
        "token": {
          "default": "",
          "description": "The look-up's token.",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "$id": "https://vdm.mikaillab.com/automation-api.schema.json",
  "$ref": "#/$defs/Request",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "One JSON line to the port in ipc.json (on 127.0.0.1), one line back. A request is `Request`. A command (an address to add, start_queue) is answered `ok`; a question is answered with the JSON object for it (`ListAnswer`, `ActAnswer`, `ApiAnswer`) or an `ErrorAnswer`. A wrong token is answered `denied`, an app that doesn't answer within 2 seconds `timeout`. The browser's quality menu (`video_lookup`, `video_poll`, `video_pick`, sent by its native host) is answered with a `VideoLookupAnswer`; the browser popup's list (`recent`, `recent_act`, sent by its native host too, #1496) with a `RecentAnswer` or a `RecentActAnswer`. Guide: https://vdm.mikaillab.com/help/command-line.html#the-automation-api",
  "title": "Volt Download Manager automation API"
}
