{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roark/json-schema/roark-update-flow-variant-input-schema.json",
  "title": "UpdateFlowVariantInput",
  "description": "Fields to change on a variant. Omitted fields are left alone. Making a variant the default is a separate operation, since it also demotes the current default.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roark-customer-flow-api-openapi.yml#/components/schemas/UpdateFlowVariantInput",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1
    },
    "environmentId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "prompt": {
      "type": [
        "string",
        "null"
      ]
    },
    "precededByCustomerFlowId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "precededByCustomerFlowVariantId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "includeFlowExpectations": {
      "type": "boolean",
      "description": "Whether this edge case is graded on the flow's agentExpectations as well as its own additionalExpectations. Defaults to true; false grades it on its additionalExpectations only."
    },
    "personaOverrideId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The persona this runs as. Null on an edge case inherits the happy path's."
    },
    "additionalExpectations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FlowExpectationInput"
      },
      "description": "The expectations graded on this variant only, on top of the flow's own. Sent as the complete set: it replaces whatever the variant had, so omit it to leave the set alone and send [] to clear it. Improv flows only: a scripted variant's expectations come from the agent turns on its path and are rewritten on every graph edit."
    }
  },
  "$defs": {
    "FlowExpectationInput": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "minLength": 1,
          "description": "What the agent under test is graded against."
        }
      },
      "required": [
        "prompt"
      ]
    }
  }
}