asyncapi: "3.0.0"
info:
  title: "PlatPhorm Evals Events"
  version: "0.1.0"
  description: "Public-safe event contract for Evals registry sync, runs, evidence, scorecards, findings, release gates, and handoffs."
servers:
  production:
    host: "evals.platphormnews.com"
    protocol: "https"
channels:
  evals/runs/{runId}/events:
    address: "evals/runs/{runId}/events"
    messages:
      queued:
        "$ref": "#/components/messages/eval.run.queued"
      started:
        "$ref": "#/components/messages/eval.run.started"
      completed:
        "$ref": "#/components/messages/eval.run.completed"
      failed:
        "$ref": "#/components/messages/eval.run.failed"
      degraded:
        "$ref": "#/components/messages/eval.run.degraded"
  evals/findings/{findingId}/events:
    address: "evals/findings/{findingId}/events"
  evals/release-gates/{gateId}/events:
    address: "evals/release-gates/{gateId}/events"
  evals/handoffs/{handoffId}/events:
    address: "evals/handoffs/{handoffId}/events"
  evals/registry/events:
    address: "evals/registry/events"
operations:
  eval_registry_synced:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1registry~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.registry.synced"
  eval_run_queued:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.queued"
  eval_run_started:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.started"
  eval_run_step_started:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.step.started"
  eval_run_step_completed:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.step.completed"
  eval_evidence_created:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.evidence.created"
  eval_scorecard_created:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.scorecard.created"
  eval_finding_created:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.finding.created"
  eval_release_gate_decided:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.release_gate.decided"
  eval_handoff_created:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.handoff.created"
  eval_handoff_sent:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.handoff.sent"
  eval_handoff_completed:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.handoff.completed"
  eval_run_completed:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.completed"
  eval_run_failed:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.failed"
  eval_run_degraded:
    action: "send"
    channel:
      "$ref": "#/channels/evals~1runs~1{runId}~1events"
    messages:
      - 
        "$ref": "#/components/messages/eval.run.degraded"
components:
  messages:
    eval.registry.synced:
      name: "eval.registry.synced"
      title: "eval.registry.synced"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.queued:
      name: "eval.run.queued"
      title: "eval.run.queued"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.started:
      name: "eval.run.started"
      title: "eval.run.started"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.step.started:
      name: "eval.run.step.started"
      title: "eval.run.step.started"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.step.completed:
      name: "eval.run.step.completed"
      title: "eval.run.step.completed"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.evidence.created:
      name: "eval.evidence.created"
      title: "eval.evidence.created"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.scorecard.created:
      name: "eval.scorecard.created"
      title: "eval.scorecard.created"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.finding.created:
      name: "eval.finding.created"
      title: "eval.finding.created"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.release_gate.decided:
      name: "eval.release_gate.decided"
      title: "eval.release_gate.decided"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.handoff.created:
      name: "eval.handoff.created"
      title: "eval.handoff.created"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.handoff.sent:
      name: "eval.handoff.sent"
      title: "eval.handoff.sent"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.handoff.completed:
      name: "eval.handoff.completed"
      title: "eval.handoff.completed"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.completed:
      name: "eval.run.completed"
      title: "eval.run.completed"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.failed:
      name: "eval.run.failed"
      title: "eval.run.failed"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"
    eval.run.degraded:
      name: "eval.run.degraded"
      title: "eval.run.degraded"
      payload:
        type: "object"
        properties:
          schemaVersion:
            type: "string"
          id:
            type: "string"
          generatedAt:
            type: "string"
            format: "date-time"
          traceId:
            type: "string"
          publicSafe:
            type: "boolean"
          data:
            type: "object"
        required:
          - "schemaVersion"
          - "id"
          - "generatedAt"
          - "traceId"
          - "publicSafe"