{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agenticwebwatch.org/schemas/product-catalogue.schema.json",
  "title": "Agent Observatory Product Catalogue",
  "type": "object",
  "required": [
    "schema_version",
    "schema_url",
    "generated_at",
    "products"
  ],
  "properties": {
    "schema_version": {
      "type": "string"
    },
    "schema_url": {
      "type": "string",
      "format": "uri-reference"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    },
    "purpose": {
      "type": "string"
    },
    "products": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "product_id",
          "artifact_available",
          "action_permission",
          "canonical_artifact_urls",
          "task_routes",
          "latest_daily_run_artifact_count",
          "artifact_count",
          "verification_statuses",
          "blocked_uses",
          "artifacts"
        ],
        "properties": {
          "product_id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "schema_version": {
            "type": "string"
          },
          "artifact_available": {
            "type": "boolean"
          },
          "artifact_index_updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "latest_daily_run_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "latest_daily_run_exported_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "latest_daily_run_artifact_count": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "artifact_count": {
            "type": "integer",
            "minimum": 0
          },
          "verification_statuses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "action_permission": {
            "enum": [
              "blocked",
              null
            ]
          },
          "allowed_use": {
            "type": [
              "string",
              "null"
            ]
          },
          "blocked_uses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "canonical_artifact_urls": {
            "type": "object",
            "required": [
              "agent_manifest",
              "artifact_index",
              "latest_daily_run",
              "latest_export_manifest"
            ],
            "properties": {
              "agent_manifest": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              },
              "artifact_index": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              },
              "latest_daily_run": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              },
              "latest_export_manifest": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              }
            },
            "additionalProperties": true
          },
          "task_routes": {
            "type": "object",
            "required": [
              "start_here",
              "taar_html",
              "agent_manifest",
              "artifact_index",
              "latest_daily_run"
            ],
            "properties": {
              "start_here": {
                "type": "string",
                "format": "uri-reference"
              },
              "taar_html": {
                "type": "string",
                "format": "uri-reference"
              },
              "agent_manifest": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              },
              "artifact_index": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              },
              "latest_daily_run": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              },
              "latest_export_manifest": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri-reference"
              }
            },
            "additionalProperties": true
          },
          "artifacts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "question_id",
                "daily_run_id",
                "verification_status",
                "canonical_package_hash",
                "action_gate_json_url",
                "instance_spec_json_url",
                "overview_markdown_url"
              ],
              "properties": {
                "question_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "artifact_run_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "daily_run_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "verification_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "canonical_package_hash": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^(sha256:)?[0-9a-f]{64}$"
                },
                "bundle_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri-reference"
                },
                "overview_markdown_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri-reference"
                },
                "action_gate_json_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri-reference"
                },
                "instance_spec_json_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uri-reference"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}
