Skip to content

input-event

Generated reference page for spec/v1/schemas/events/input-event.json.

Metadata

  • Type: JSON Schema
  • Source: spec/v1/schemas/events/input-event.json
  • Raw: View Raw

Summary

Source

json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agent-service.spec/v1/schemas/events/input-event.json",
  "$defs": {
    "TaskInputMessageEvent": {
      "type": "object",
      "additionalProperties": false,
      "required": ["type", "messages"],
      "properties": {
        "type": {
          "const": "MESSAGE"
        },
        "messages": {
          "type": "array",
          "items": {
            "$ref": "../resources/message-record.json#/$defs/TaskInputMessage"
          }
        }
      }
    },
    "TaskInputNotifyEvent": {
      "type": "object",
      "additionalProperties": false,
      "required": ["type"],
      "properties": {
        "type": {
          "const": "NOTIFY"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "TaskInputCancelEvent": {
      "type": "object",
      "additionalProperties": false,
      "required": ["type"],
      "properties": {
        "type": {
          "const": "CANCEL"
        },
        "reason": {
          "type": "string"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "TaskInputEvent": {
      "oneOf": [
        {
          "$ref": "#/$defs/TaskInputMessageEvent"
        },
        {
          "$ref": "#/$defs/TaskInputNotifyEvent"
        },
        {
          "$ref": "#/$defs/TaskInputCancelEvent"
        }
      ]
    },
    "TaskInputDelivery": {
      "type": "object",
      "additionalProperties": false,
      "required": ["runId", "event"],
      "properties": {
        "runId": {
          "$ref": "../common/identity.json#/$defs/runId"
        },
        "threadId": {
          "$ref": "../common/identity.json#/$defs/threadId"
        },
        "event": {
          "$ref": "#/$defs/TaskInputEvent"
        }
      }
    }
  }
}

Generated from spec source.