GCC Build OSv0
/api

DocumentUploadedevent type

A document was uploaded to R2. Carries embedding_model + embedding_model_version (I8) so that downstream re-embedding and replay can reproduce the vector substrate.

Full spec

{
  "name": "DocumentUploaded",
  "description": "A document was uploaded to R2. Carries embedding_model + embedding_model_version (I8) so that downstream re-embedding and replay can reproduce the vector substrate.",
  "current_version": 1,
  "actor_type_allowed": [
    "human"
  ],
  "object_type": "Document",
  "payload_versions": {
    "v1": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "document_id",
        "r2_key",
        "file_name",
        "mime_type",
        "byte_size",
        "embedding_model",
        "embedding_model_version",
        "uploaded_by"
      ],
      "properties": {
        "document_id": {
          "type": "string",
          "format": "uuid"
        },
        "r2_key": {
          "type": "string",
          "minLength": 1
        },
        "file_name": {
          "type": "string",
          "minLength": 1
        },
        "mime_type": {
          "type": "string",
          "minLength": 1
        },
        "byte_size": {
          "type": "integer",
          "minimum": 0
        },
        "embedding_model": {
          "type": "string",
          "minLength": 1,
          "description": "I8: model identifier (e.g., '@cf/baai/bge-large-en-v1.5')."
        },
        "embedding_model_version": {
          "type": "string",
          "minLength": 1,
          "description": "I8: model version pin for reproducibility."
        },
        "workstream_tag": {
          "type": [
            "string",
            "null"
          ]
        },
        "question_tag": {
          "type": [
            "string",
            "null"
          ]
        },
        "uploaded_by": {
          "type": "string",
          "format": "uuid"
        },
        "virus_scan_status": {
          "type": "string",
          "enum": [
            "pending",
            "clean",
            "infected"
          ],
          "default": "pending"
        }
      }
    }
  },
  "projections_consuming": [
    "documents_view",
    "audit_log"
  ],
  "canonicalizer_module": "event-canonicalizers/document_uploaded.ts"
}