{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/callidus-legal-ai/json-schema/callidus-legal-ai-matter-file-suggestions-response-schema.json",
  "title": "MatterFileSuggestionsResponse",
  "description": "Candidate matter-level files to suggest after the Add Files step.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/callidus-legal-ai-chat-api-openapi.yml#/components/schemas/MatterFileSuggestionsResponse",
  "properties": {
    "matter_intelligence_enabled": {
      "type": "boolean",
      "title": "Matter Intelligence Enabled",
      "default": false
    },
    "mode": {
      "type": "string",
      "enum": [
        "initial",
        "incremental"
      ],
      "title": "Mode",
      "default": "initial"
    },
    "cutoff_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cutoff At"
    },
    "documents": {
      "items": {
        "$ref": "#/$defs/MatterFileSuggestionDoc"
      },
      "type": "array",
      "title": "Documents"
    }
  },
  "type": "object",
  "$defs": {
    "MatterFileSuggestionDoc": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "date_added": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Date Added"
        },
        "size": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Size"
        },
        "kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Kind"
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Category"
        },
        "is_relevant": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is Relevant",
          "description": "LLM relevance verdict for this matter document w.r.t. the task. True = recommended preselect; False = scored but not relevant; None = relevance was not computed (gate off, no candidates, LLM timeout/error). FE preselects only is_relevant=True."
        }
      },
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "title": "MatterFileSuggestionDoc",
      "description": "One candidate matter-level document surfaced in the suggestion modal."
    }
  }
}