{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-host-exec-body-schema.json",
  "title": "Host exec request body",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-hosts-api-openapi.yml#/components/schemas/HostExecBody",
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "$ref": "#/$defs/HostOp"
    },
    "args": {
      "type": "object",
      "additionalProperties": true,
      "default": {},
      "description": "Op-specific arguments, relayed verbatim (e.g. `{ cmd, cwd?, timeout_ms? }` for `shell`, `{ path }` for `fs_list`). For `iphone` they must match `HostIphoneArgs` (`{ tool, args? }`), else 400."
    },
    "timeout_ms": {
      "type": "integer",
      "minimum": 1000,
      "maximum": 600000,
      "description": "How long to wait for the host. Default 60000."
    },
    "label": {
      "type": "string",
      "maxLength": 200,
      "description": "Free-form label shown in the host UI."
    }
  },
  "$defs": {
    "HostOp": {
      "type": "string",
      "description": "Operation vocabulary hosts implement (codai desktop; `iphone` = the codai iPhone bridge, cap `iphone`).",
      "enum": [
        "shell",
        "fs_read",
        "fs_write",
        "fs_list",
        "fs_roots",
        "info",
        "iphone"
      ]
    }
  }
}