{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/configure-dev/json-schema/configure-dev-commit-request-schema.json",
  "title": "CommitRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/configure-dev-openapi.yml#/components/schemas/CommitRequest",
  "type": "object",
  "anyOf": [
    {
      "required": [
        "memories"
      ]
    },
    {
      "required": [
        "messages"
      ]
    },
    {
      "required": [
        "toolResults"
      ]
    }
  ],
  "properties": {
    "user_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "memories": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1000
      }
    },
    "messages": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "$ref": "#/$defs/ConversationMessage"
      }
    },
    "toolResults": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "required": [
          "toolName",
          "content"
        ],
        "properties": {
          "toolName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "content": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object"
              },
              {
                "type": "array"
              }
            ]
          }
        }
      }
    },
    "memory_criteria": {
      "type": "string",
      "maxLength": 2000
    },
    "sync": {
      "type": "boolean",
      "default": false
    }
  },
  "$defs": {
    "ConversationMessage": {
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant",
            "tool"
          ]
        },
        "content": {
          "type": "string",
          "minLength": 1
        },
        "toolName": {
          "type": "string",
          "maxLength": 255
        }
      }
    }
  }
}