{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/taskhold-com/json-schema/taskhold-com-task-update-schema.json",
  "title": "TaskUpdate",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/taskhold-com-openapi.yml#/components/schemas/TaskUpdate",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "Title"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 10000,
      "description": "Details"
    },
    "project_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Project"
    },
    "project": {
      "type": "string",
      "maxLength": 100,
      "description": "Move to the project with this name (created on first use)"
    },
    "priority": {
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high",
        "urgent"
      ],
      "description": "Priority"
    },
    "status": {
      "type": "string",
      "enum": [
        "todo",
        "in_progress",
        "blocked",
        "done"
      ],
      "description": "Status"
    },
    "blocked_reason": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 1000,
      "description": "Why it is blocked (shown to the person)"
    },
    "block_options": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80
      },
      "minItems": 2,
      "maxItems": 4,
      "description": "With status blocked: 2-4 choices shown as buttons"
    },
    "block_recommended": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 3,
      "description": "Index into block_options of the recommended choice (0 = first)"
    },
    "block_if_no_answer": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 200,
      "description": "What the agent will do if nobody answers"
    },
    "completed_summary": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 5000,
      "description": "What was done"
    },
    "agent_name": {
      "type": "string",
      "maxLength": 100,
      "description": "API key callers: label for the agent doing the work"
    },
    "repeat": {
      "oneOf": [
        {
          "$ref": "#/$defs/RepeatInput"
        },
        {
          "type": "null"
        }
      ],
      "description": "Set or change the repeat; off or null stops it"
    }
  },
  "$defs": {
    "RepeatInput": {
      "description": "Text such as \"every monday at 9am\", \"weekdays at 8:30\", \"monthly on the 1st\", \"every 3 days\", \"daily at 7am America/Chicago\" (\"off\", \"pause\", \"resume\" on updates), or an object. Times are in the person's time zone unless one is given.",
      "oneOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "object",
          "required": [
            "every"
          ],
          "properties": {
            "every": {
              "type": "string",
              "enum": [
                "day",
                "weekday",
                "week",
                "month"
              ]
            },
            "on": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "sun",
                  "mon",
                  "tue",
                  "wed",
                  "thu",
                  "fri",
                  "sat"
                ]
              },
              "description": "every week: which days"
            },
            "day": {
              "type": "integer",
              "minimum": 1,
              "maximum": 31,
              "description": "every month: day of the month; the 31st runs on the last day of shorter months"
            },
            "interval": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "description": "every day: every N days"
            },
            "at": {
              "type": "string",
              "default": "09:00",
              "description": "09:00 or 5:30pm"
            },
            "timezone": {
              "type": "string",
              "description": "IANA zone; default the person's"
            }
          }
        }
      ]
    }
  }
}