{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fleetai-com/json-schema/fleetai-com-seed-gen-seed-view-schema.json",
  "title": "SeedGenSeedView",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fleetai-com-seed-gen-api-openapi.yml#/components/schemas/SeedGenSeedView",
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "seed_gen.seed_view.v1",
      "title": "Schema Version",
      "default": "seed_gen.seed_view.v1"
    },
    "candidate": {
      "$ref": "#/$defs/orchestrator__private_api__registry__admin_schemas__SeedGenCandidate"
    },
    "databases": {
      "items": {
        "$ref": "#/$defs/SeedDatabaseInspection-Output"
      },
      "type": "array",
      "title": "Databases"
    },
    "files": {
      "items": {
        "$ref": "#/$defs/SeedGenFile"
      },
      "type": "array",
      "title": "Files"
    },
    "unavailable_databases": {
      "items": {
        "$ref": "#/$defs/SeedDatabaseUnavailable"
      },
      "type": "array",
      "title": "Unavailable Databases"
    },
    "diff": {
      "$ref": "#/$defs/SeedDatabaseDiff"
    },
    "quality": {
      "$ref": "#/$defs/SeedQualityV1-Output"
    }
  },
  "type": "object",
  "required": [
    "candidate",
    "databases",
    "unavailable_databases",
    "diff",
    "quality"
  ],
  "$defs": {
    "JsonValue": {},
    "SeedDatabaseColumn": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "type": {
          "type": "string",
          "title": "Type"
        },
        "not_null": {
          "type": "boolean",
          "title": "Not Null"
        },
        "default": {
          "$ref": "#/$defs/JsonValue"
        },
        "primary_key_position": {
          "type": "integer",
          "title": "Primary Key Position"
        }
      },
      "type": "object",
      "required": [
        "name",
        "type",
        "not_null",
        "primary_key_position"
      ],
      "title": "SeedDatabaseColumn"
    },
    "SeedDatabaseDiff": {
      "properties": {
        "status": {
          "type": "string",
          "const": "unavailable",
          "title": "Status",
          "default": "unavailable"
        },
        "requirement": {
          "type": "string",
          "title": "Requirement"
        }
      },
      "type": "object",
      "required": [
        "requirement"
      ],
      "title": "SeedDatabaseDiff"
    },
    "SeedDatabaseForeignKey": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "from_columns": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "From Columns"
        },
        "to_table": {
          "type": "string",
          "title": "To Table"
        },
        "to_columns": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "To Columns"
        },
        "on_update": {
          "type": "string",
          "title": "On Update"
        },
        "on_delete": {
          "type": "string",
          "title": "On Delete"
        },
        "match": {
          "type": "string",
          "title": "Match"
        }
      },
      "type": "object",
      "required": [
        "id",
        "from_columns",
        "to_table",
        "to_columns",
        "on_update",
        "on_delete",
        "match"
      ],
      "title": "SeedDatabaseForeignKey"
    },
    "SeedDatabaseInspection-Output": {
      "properties": {
        "locator": {
          "$ref": "#/$defs/SeedGenLocator"
        },
        "seed_version_id": {
          "type": "string",
          "title": "Seed Version Id"
        },
        "registry_artifact_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registry Artifact Key"
        },
        "registry_version_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registry Version Id"
        },
        "registry_version_index": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registry Version Index"
        },
        "registry_content_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registry Content Sha256"
        },
        "catalog_artifact_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Catalog Artifact Sha256"
        },
        "catalog_database_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Catalog Database Sha256"
        },
        "observed_artifact_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Observed Artifact Sha256"
        },
        "observed_database_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Observed Database Sha256"
        },
        "compressed_bytes": {
          "type": "integer",
          "title": "Compressed Bytes"
        },
        "database_bytes": {
          "type": "integer",
          "title": "Database Bytes"
        },
        "integrity_check": {
          "type": "string",
          "title": "Integrity Check"
        },
        "foreign_key_violations": {
          "items": {
            "items": {
              "$ref": "#/$defs/JsonValue"
            },
            "type": "array"
          },
          "type": "array",
          "title": "Foreign Key Violations"
        },
        "foreign_key_violations_truncated": {
          "type": "boolean",
          "title": "Foreign Key Violations Truncated"
        },
        "tables": {
          "items": {
            "$ref": "#/$defs/SeedDatabaseTable-Output"
          },
          "type": "array",
          "title": "Tables"
        },
        "tables_total": {
          "type": "integer",
          "title": "Tables Total"
        },
        "tables_truncated": {
          "type": "boolean",
          "title": "Tables Truncated"
        }
      },
      "type": "object",
      "required": [
        "locator",
        "seed_version_id",
        "observed_artifact_sha256",
        "observed_database_sha256",
        "compressed_bytes",
        "database_bytes",
        "integrity_check",
        "foreign_key_violations",
        "foreign_key_violations_truncated",
        "tables",
        "tables_total",
        "tables_truncated"
      ],
      "title": "SeedDatabaseInspection"
    },
    "SeedDatabaseTable-Output": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name"
        },
        "row_count": {
          "type": "integer",
          "title": "Row Count"
        },
        "columns": {
          "items": {
            "$ref": "#/$defs/SeedDatabaseColumn"
          },
          "type": "array",
          "title": "Columns"
        },
        "foreign_keys": {
          "items": {
            "$ref": "#/$defs/SeedDatabaseForeignKey"
          },
          "type": "array",
          "title": "Foreign Keys"
        },
        "sample_rows": {
          "items": {
            "additionalProperties": {
              "$ref": "#/$defs/JsonValue"
            },
            "type": "object"
          },
          "type": "array",
          "title": "Sample Rows"
        }
      },
      "type": "object",
      "required": [
        "name",
        "row_count",
        "columns",
        "foreign_keys",
        "sample_rows"
      ],
      "title": "SeedDatabaseTable"
    },
    "SeedDatabaseUnavailable": {
      "properties": {
        "status": {
          "type": "string",
          "const": "unavailable",
          "title": "Status",
          "default": "unavailable"
        },
        "locator": {
          "$ref": "#/$defs/SeedGenLocator"
        },
        "seed_version_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Seed Version Id"
        },
        "artifact_type": {
          "type": "string",
          "enum": [
            "tar",
            "sqlite",
            "sqlite+tar",
            "unknown"
          ],
          "title": "Artifact Type"
        },
        "reason": {
          "type": "string",
          "title": "Reason"
        }
      },
      "type": "object",
      "required": [
        "locator",
        "seed_version_id",
        "artifact_type",
        "reason"
      ],
      "title": "SeedDatabaseUnavailable"
    },
    "SeedGenFile": {
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "file",
            "verification",
            "quality",
            "handoff"
          ],
          "title": "Kind",
          "default": "file"
        },
        "recorded_at": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ],
          "title": "Recorded At"
        },
        "file_key": {
          "type": "string",
          "maxLength": 240,
          "minLength": 1,
          "title": "File Key"
        },
        "path": {
          "type": "string",
          "title": "Path"
        },
        "filename": {
          "type": "string",
          "maxLength": 240,
          "minLength": 1,
          "title": "Filename"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256"
        },
        "media_type": {
          "type": "string",
          "maxLength": 120,
          "title": "Media Type"
        },
        "size_bytes": {
          "type": "integer",
          "maximum": 33554432.0,
          "minimum": 0.0,
          "title": "Size Bytes"
        },
        "placements": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 100,
          "title": "Placements"
        }
      },
      "type": "object",
      "required": [
        "file_key",
        "path",
        "filename",
        "sha256",
        "media_type",
        "size_bytes"
      ],
      "title": "SeedGenFile"
    },
    "SeedGenLocator": {
      "properties": {
        "app": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "App"
        },
        "source_path": {
          "type": "string",
          "title": "Source Path"
        },
        "env_key": {
          "type": "string",
          "title": "Env Key"
        },
        "data_key": {
          "type": "string",
          "title": "Data Key"
        },
        "version": {
          "type": "string",
          "title": "Version"
        },
        "expected_database_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expected Database Sha256"
        }
      },
      "type": "object",
      "required": [
        "source_path",
        "env_key",
        "data_key",
        "version"
      ],
      "title": "SeedGenLocator"
    },
    "SeedQualityDimension": {
      "properties": {
        "key": {
          "type": "string",
          "enum": [
            "integrity_invariants",
            "consistency",
            "realism",
            "task_affordance",
            "specification_coverage"
          ],
          "title": "Key"
        },
        "label": {
          "type": "string",
          "title": "Label"
        },
        "definition": {
          "type": "string",
          "title": "Definition"
        },
        "status": {
          "type": "string",
          "enum": [
            "pass",
            "partial",
            "fail",
            "unavailable",
            "not_applicable"
          ],
          "title": "Status"
        },
        "summary": {
          "type": "string",
          "title": "Summary"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Reason"
        },
        "candidate_manifest_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Candidate Manifest Sha256"
        },
        "producer_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Producer Name"
        },
        "producer_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Producer Version"
        },
        "scorer_name": {
          "type": "string",
          "title": "Scorer Name"
        },
        "scorer_version": {
          "type": "string",
          "title": "Scorer Version"
        },
        "rule_set_sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rule Set Sha256"
        },
        "evidence": {
          "items": {
            "$ref": "#/$defs/SeedQualityEvidence"
          },
          "type": "array",
          "title": "Evidence"
        },
        "evidence_requirement": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Evidence Requirement"
        }
      },
      "type": "object",
      "required": [
        "key",
        "label",
        "definition",
        "status",
        "summary",
        "candidate_manifest_sha256",
        "scorer_name",
        "scorer_version",
        "evidence"
      ],
      "title": "SeedQualityDimension"
    },
    "SeedQualityEvidence": {
      "properties": {
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Path"
        },
        "kind": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Kind"
        },
        "schema_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Schema Version"
        },
        "identity": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Identity"
        },
        "sha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sha256"
        }
      },
      "type": "object",
      "title": "SeedQualityEvidence"
    },
    "SeedQualityGate": {
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "clear",
            "blocked",
            "unavailable"
          ],
          "title": "Status"
        },
        "candidate_manifest_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Candidate Manifest Sha256"
        },
        "gate_version": {
          "type": "string",
          "title": "Gate Version"
        },
        "blockers": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Blockers"
        },
        "unavailable_reasons": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Unavailable Reasons"
        }
      },
      "type": "object",
      "required": [
        "status",
        "candidate_manifest_sha256",
        "gate_version",
        "blockers",
        "unavailable_reasons"
      ],
      "title": "SeedQualityGate"
    },
    "SeedQualityV1-Output": {
      "properties": {
        "schema_version": {
          "type": "string",
          "const": "seed_gen.quality.v1",
          "title": "Schema Version",
          "default": "seed_gen.quality.v1"
        },
        "dimensions": {
          "items": {
            "$ref": "#/$defs/SeedQualityDimension"
          },
          "type": "array",
          "title": "Dimensions"
        },
        "gate": {
          "$ref": "#/$defs/SeedQualityGate"
        }
      },
      "type": "object",
      "required": [
        "dimensions",
        "gate"
      ],
      "title": "SeedQualityV1"
    },
    "orchestrator__private_api__registry__admin_schemas__SeedGenCandidate": {
      "properties": {
        "manifest_sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Manifest Sha256"
        },
        "candidate_set_hash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Candidate Set Hash"
        },
        "manifest_schema_version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Manifest Schema Version"
        },
        "manifest_path": {
          "type": "string",
          "title": "Manifest Path"
        },
        "artifact_key": {
          "type": "string",
          "title": "Artifact Key"
        },
        "artifact_version_id": {
          "type": "string",
          "title": "Artifact Version Id"
        },
        "artifact_version_index": {
          "type": "integer",
          "title": "Artifact Version Index"
        }
      },
      "type": "object",
      "required": [
        "manifest_sha256",
        "manifest_path",
        "artifact_key",
        "artifact_version_id",
        "artifact_version_index"
      ],
      "title": "SeedGenCandidate"
    }
  }
}