{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grepr/json-schema/grepr-agent-suggestion-schema.json",
  "title": "AgentSuggestion",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grepr-agent-suggestions-api-openapi.yml#/components/schemas/AgentSuggestion",
  "properties": {
    "agentId": {
      "type": "string"
    },
    "appliedJobVersion": {
      "format": "int64",
      "type": "integer"
    },
    "baseJobVersion": {
      "format": "int64",
      "type": "integer"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "investigationId": {
      "type": "string"
    },
    "jobId": {
      "type": "string"
    },
    "organizationId": {
      "type": "string"
    },
    "reviewedAt": {
      "format": "date-time",
      "type": "string"
    },
    "reviewedBy": {
      "type": "string"
    },
    "samples": {
      "items": {
        "$ref": "#/$defs/LogEvent"
      },
      "type": "array"
    },
    "status": {
      "enum": [
        "PENDING",
        "APPLIED",
        "REJECTED"
      ],
      "type": "string"
    },
    "teamIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "templateInputsPatch": {
      "$ref": "#/$defs/JsonNode"
    },
    "toolCallId": {
      "type": "string"
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "Any": {
      "description": "A value that can be a primitive (String or number), a list, or a map."
    },
    "JsonNode": {
      "description": "A partial templateInputs object to deep-merge into the pipeline's current inputs. Objects merge recursively, and an array of named objects (like input.parsers) merges by entry name, so entries you omit are kept. Scalars and arrays of non-objects replace whole.",
      "type": "object"
    },
    "LogEvent": {
      "description": "A log event.",
      "properties": {
        "attributes": {
          "additionalProperties": {
            "$ref": "#/$defs/Any"
          },
          "description": "Attributes associated with the event, a map from attribute name to attribute value, which may be a nested map or list.",
          "type": "object"
        },
        "eventTimestamp": {
          "description": "Event timestamp that is in the record. Milliseconds from epoch.",
          "format": "int64",
          "type": "integer"
        },
        "id": {
          "description": "Id of the event.",
          "type": "string"
        },
        "message": {
          "description": "The log message.",
          "type": "string"
        },
        "receivedTimestamp": {
          "description": "Timestamp when the event was received by Grepr. Milliseconds from epoch.",
          "format": "int64",
          "type": "integer"
        },
        "severity": {
          "description": "The log severity. Higher numbers mean higher severity, following the OTel format 1-24.",
          "format": "int32",
          "type": "integer"
        },
        "tags": {
          "additionalProperties": {
            "description": "Tags associated with the event, a map from tag name to set of tag values.",
            "items": {
              "description": "Tags associated with the event, a map from tag name to set of tag values.",
              "type": "string"
            },
            "type": "array",
            "uniqueItems": true
          },
          "description": "Tags associated with the event, a map from tag name to set of tag values.",
          "type": "object"
        }
      },
      "required": [
        "eventTimestamp",
        "id",
        "receivedTimestamp"
      ],
      "type": "object"
    }
  }
}