{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "AgentWorkbenchComposerViewModel"
    },
    "value": {
      "default": "",
      "type": "string"
    },
    "status": {
      "default": "idle",
      "type": "string",
      "enum": [
        "idle",
        "loading",
        "streaming",
        "stopping",
        "error"
      ]
    },
    "mode": {
      "type": "string",
      "enum": [
        "chat",
        "work"
      ]
    },
    "placeholder": {
      "type": "string"
    },
    "attachments": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "mediaType": {
            "type": "string",
            "minLength": 1
          },
          "previewUrl": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "default": "ready",
            "type": "string",
            "enum": [
              "uploading",
              "ready",
              "error"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "queuedDrafts": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "text": {
            "type": "string"
          },
          "attachmentCount": {
            "default": 0,
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "status": {
            "default": "queued",
            "type": "string",
            "enum": [
              "queued",
              "sending",
              "error"
            ]
          }
        },
        "required": [
          "id",
          "text",
          "attachmentCount",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "inputActions": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "icon": {
            "type": "string",
            "enum": [
              "file-text",
              "image"
            ]
          }
        },
        "required": [
          "id",
          "label"
        ],
        "additionalProperties": false
      }
    },
    "selectedInputActionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "model": {
      "type": "object",
      "properties": {
        "selectedId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "label": {
                "type": "string",
                "minLength": 1
              },
              "provider": {
                "type": "string",
                "minLength": 1
              },
              "mode": {
                "type": "string",
                "enum": [
                  "chat",
                  "work"
                ]
              },
              "disabled": {
                "default": false,
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "label",
              "mode",
              "disabled"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "options"
      ],
      "additionalProperties": false
    },
    "reasoning": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high",
            "xhigh"
          ]
        },
        "options": {
          "minItems": 1,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "xhigh"
            ]
          }
        }
      },
      "required": [
        "value",
        "options"
      ],
      "additionalProperties": false
    },
    "permissionProfile": {
      "type": "string",
      "enum": [
        "approval-required",
        "auto-approve",
        "full-access"
      ]
    },
    "webSearchEnabled": {
      "default": false,
      "type": "boolean"
    },
    "error": {
      "type": "string"
    },
    "capabilities": {
      "type": "object",
      "properties": {
        "attachments": {
          "default": false,
          "type": "boolean"
        },
        "voiceInput": {
          "default": false,
          "type": "boolean"
        },
        "webSearch": {
          "default": false,
          "type": "boolean"
        },
        "modelSelection": {
          "default": false,
          "type": "boolean"
        },
        "reasoning": {
          "default": false,
          "type": "boolean"
        },
        "permissions": {
          "default": false,
          "type": "boolean"
        },
        "queue": {
          "default": false,
          "type": "boolean"
        },
        "stop": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "attachments",
        "voiceInput",
        "webSearch",
        "modelSelection",
        "reasoning",
        "permissions",
        "queue",
        "stop"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "contract",
    "value",
    "status",
    "mode",
    "attachments",
    "queuedDrafts",
    "inputActions",
    "model",
    "webSearchEnabled",
    "capabilities"
  ],
  "additionalProperties": false,
  "$id": "https://schemas.infmonkeys.com/contracts/agent-workbench-composer-view-model.schema.json",
  "title": "agent-workbench-composer-view-model"
}
