{
  "components": {
    "schemas": {
      "ComponentAuthorization": {
        "$defs": {
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "generationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "manifestHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "mode": {
            "$ref": "#/$defs/ComponentAuthorizationMode"
          },
          "world": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "world"
        ],
        "title": "ComponentAuthorization",
        "type": "object"
      },
      "ComponentProvenance": {
        "$defs": {
          "ComponentAuthorization": {
            "properties": {
              "generationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manifestHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/$defs/ComponentAuthorizationMode"
              },
              "world": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "world"
            ],
            "type": "object"
          },
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "authorization": {
            "$ref": "#/$defs/ComponentAuthorization"
          },
          "backendProfileHash": {
            "type": "string"
          },
          "deterministicProjectionHash": {
            "description": "Canonical hash of the backend-independent Tier W receipt projection.",
            "type": "string"
          },
          "engineVersion": {
            "type": "string"
          }
        },
        "required": [
          "authorization",
          "engineVersion",
          "backendProfileHash",
          "deterministicProjectionHash"
        ],
        "title": "ComponentProvenance",
        "type": "object"
      },
      "ErrorEnvelope": {
        "$defs": {
          "ErrorDetail": {
            "properties": {
              "code": {
                "type": "string"
              },
              "field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "error": {
            "$ref": "#/$defs/ErrorDetail"
          },
          "requestId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "schemaVersion": {
            "type": "string"
          }
        },
        "required": [
          "schemaVersion",
          "error"
        ],
        "title": "ErrorEnvelope",
        "type": "object"
      },
      "EvidenceVerificationResult": {
        "$defs": {
          "EvidenceVerificationCheck": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "EvidenceVerificationFailure": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "path": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "checks": {
            "default": [],
            "items": {
              "$ref": "#/$defs/EvidenceVerificationCheck"
            },
            "type": "array"
          },
          "failures": {
            "default": [],
            "items": {
              "$ref": "#/$defs/EvidenceVerificationFailure"
            },
            "type": "array"
          },
          "indexHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "receiptHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid"
        ],
        "title": "EvidenceVerificationResult",
        "type": "object"
      },
      "ExecutionApiErrorEnvelope": {
        "$defs": {
          "ExecutionApiErrorDetail": {
            "description": "HTTP error shape emitted by the execution sidecar.",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "error": {
            "$ref": "#/$defs/ExecutionApiErrorDetail"
          }
        },
        "required": [
          "error"
        ],
        "title": "ExecutionApiErrorEnvelope",
        "type": "object"
      },
      "ExecutionCertificationReport": {
        "$defs": {
          "CertificationEvidence": {
            "description": "One requirement's evidence classification. `producer_method` is\ninformational and deliberately excluded from the evidence projection.",
            "properties": {
              "bundleIndexHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dimension": {
                "$ref": "#/$defs/EvidenceDimension"
              },
              "disposition": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "environment": {
                "type": "string"
              },
              "evidenceProperties": {
                "additionalProperties": {
                  "type": "string"
                },
                "default": {},
                "type": "object"
              },
              "producerMethod": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "requirementId": {
                "type": "string"
              },
              "status": {
                "$ref": "#/$defs/EvidenceStatus"
              }
            },
            "required": [
              "requirementId",
              "dimension",
              "status",
              "environment"
            ],
            "type": "object"
          },
          "EvidenceDimension": {
            "enum": [
              "artifact_source",
              "disposable_runtime",
              "installed_host",
              "remote_deployment",
              "mobile_size",
              "physical_device",
              "judge_review"
            ],
            "type": "string"
          },
          "EvidenceStatus": {
            "enum": [
              "completed",
              "failed",
              "blocked",
              "pending_evidence",
              "pending_review"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "release": {
            "type": "string"
          },
          "requirements": {
            "additionalProperties": {
              "$ref": "#/$defs/CertificationEvidence"
            },
            "type": "object"
          },
          "schemaVersion": {
            "type": "string"
          }
        },
        "required": [
          "schemaVersion",
          "release",
          "requirements"
        ],
        "title": "ExecutionCertificationReport",
        "type": "object"
      },
      "ExecutionEvent": {
        "$defs": {
          "ExecutionEventKind": {
            "enum": [
              "accepted",
              "stdout",
              "stderr",
              "progress",
              "grant-pending",
              "completed"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "data": {
            "default": null
          },
          "kind": {
            "$ref": "#/$defs/ExecutionEventKind"
          },
          "occurredAt": {
            "format": "date-time",
            "type": "string"
          },
          "runId": {
            "format": "uuid",
            "type": "string"
          },
          "schemaVersion": {
            "type": "string"
          },
          "sequence": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "schemaVersion",
          "runId",
          "sequence",
          "occurredAt",
          "kind"
        ],
        "title": "ExecutionEvent",
        "type": "object"
      },
      "ExecutionEvidenceIndex": {
        "$defs": {
          "ArtifactEvidence": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "receiptPath": {
                "description": "Logical path recorded in the receipt.",
                "type": "string"
              },
              "sizeBytes": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "receiptPath",
              "path",
              "hash",
              "sizeBytes"
            ],
            "type": "object"
          },
          "EvidenceFile": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "sizeBytes": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "path",
              "hash",
              "sizeBytes"
            ],
            "type": "object"
          },
          "EvidenceIdentity": {
            "properties": {
              "keyId": {
                "type": "string"
              },
              "publicKey": {
                "type": "string"
              },
              "sigAlg": {
                "$ref": "#/$defs/SignatureAlgorithm"
              }
            },
            "required": [
              "sigAlg",
              "keyId",
              "publicKey"
            ],
            "type": "object"
          },
          "SignatureAlgorithm": {
            "enum": [
              "ed25519",
              "p256"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Portable, deterministic manifest for a self-contained execution-evidence\nbundle. Paths are relative to the bundle root and cannot traverse it.",
        "properties": {
          "artifacts": {
            "default": [],
            "items": {
              "$ref": "#/$defs/ArtifactEvidence"
            },
            "type": "array"
          },
          "environment": {
            "type": "string"
          },
          "environments": {
            "default": [],
            "items": {
              "$ref": "#/$defs/EvidenceFile"
            },
            "type": "array"
          },
          "receipt": {
            "$ref": "#/$defs/EvidenceFile"
          },
          "request": {
            "$ref": "#/$defs/EvidenceFile"
          },
          "requirementId": {
            "type": "string"
          },
          "runId": {
            "format": "uuid",
            "type": "string"
          },
          "schemaVersion": {
            "type": "string"
          },
          "verificationIdentity": {
            "$ref": "#/$defs/EvidenceIdentity"
          }
        },
        "required": [
          "schemaVersion",
          "requirementId",
          "runId",
          "environment",
          "receipt",
          "request",
          "verificationIdentity"
        ],
        "title": "ExecutionEvidenceIndex",
        "type": "object"
      },
      "ExecutionFailure": {
        "$defs": {
          "ExecutionFailureKind": {
            "enum": [
              "trap",
              "fuel-exhausted",
              "epoch-deadline",
              "memory-limit",
              "table-limit",
              "instance-limit",
              "stream-limit",
              "artifact-limit",
              "capability-denied",
              "component-unauthorized",
              "backend-unavailable",
              "interrupted"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "code": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/$defs/ExecutionFailureKind"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "kind",
          "code",
          "message"
        ],
        "title": "ExecutionFailure",
        "type": "object"
      },
      "ExecutionReceipt": {
        "$defs": {
          "ArtifactReference": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "sizeBytes": {
                "format": "uint64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "path",
              "hash"
            ],
            "type": "object"
          },
          "ComponentAuthorization": {
            "properties": {
              "generationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manifestHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/$defs/ComponentAuthorizationMode"
              },
              "world": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "world"
            ],
            "type": "object"
          },
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          },
          "ComponentProvenance": {
            "properties": {
              "authorization": {
                "$ref": "#/$defs/ComponentAuthorization"
              },
              "backendProfileHash": {
                "type": "string"
              },
              "deterministicProjectionHash": {
                "description": "Canonical hash of the backend-independent Tier W receipt projection.",
                "type": "string"
              },
              "engineVersion": {
                "type": "string"
              }
            },
            "required": [
              "authorization",
              "engineVersion",
              "backendProfileHash",
              "deterministicProjectionHash"
            ],
            "type": "object"
          },
          "EvidenceClass": {
            "enum": [
              "verified",
              "attested"
            ],
            "type": "string"
          },
          "ExecutingDevice": {
            "properties": {
              "keyId": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "sigAlg": {
                "$ref": "#/$defs/SignatureAlgorithm"
              }
            },
            "required": [
              "keyId",
              "sigAlg",
              "platform"
            ],
            "type": "object"
          },
          "ExecutionBackend": {
            "enum": [
              "cranelift",
              "pulley",
              "seatbelt",
              "bwrap",
              "landlock"
            ],
            "type": "string"
          },
          "ExecutionExit": {
            "properties": {
              "signalOrTrap": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "format": "int32",
                "type": "integer"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "ExecutionFailure": {
            "properties": {
              "code": {
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/ExecutionFailureKind"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "code",
              "message"
            ],
            "type": "object"
          },
          "ExecutionFailureKind": {
            "enum": [
              "trap",
              "fuel-exhausted",
              "epoch-deadline",
              "memory-limit",
              "table-limit",
              "instance-limit",
              "stream-limit",
              "artifact-limit",
              "capability-denied",
              "component-unauthorized",
              "backend-unavailable",
              "interrupted"
            ],
            "type": "string"
          },
          "ExecutionGrant": {
            "properties": {
              "kind": {
                "$ref": "#/$defs/GrantKind"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          "ExecutionOutputs": {
            "properties": {
              "artifacts": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ArtifactReference"
                },
                "type": "array"
              },
              "stderr": {
                "type": "string"
              },
              "stdout": {
                "type": "string"
              }
            },
            "required": [
              "stdout",
              "stderr"
            ],
            "type": "object"
          },
          "ExecutionTier": {
            "enum": [
              "w",
              "p"
            ],
            "type": "string"
          },
          "GrantKind": {
            "enum": [
              "ssh-manifest",
              "interactive",
              "cedar-auto"
            ],
            "type": "string"
          },
          "ResourceUsage": {
            "properties": {
              "cpuMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "fuelConsumed": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "peakMemMb": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "wallClockMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "wallClockMs",
              "cpuMs",
              "peakMemMb",
              "fuelConsumed"
            ],
            "type": "object"
          },
          "RunState": {
            "enum": [
              "queued",
              "grant-pending",
              "running",
              "succeeded",
              "failed",
              "rejected",
              "interrupted"
            ],
            "type": "string"
          },
          "SignatureAlgorithm": {
            "enum": [
              "ed25519",
              "p256"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "backend": {
            "$ref": "#/$defs/ExecutionBackend"
          },
          "codeHash": {
            "type": "string"
          },
          "component": {
            "anyOf": [
              {
                "$ref": "#/$defs/ComponentProvenance"
              },
              {
                "type": "null"
              }
            ]
          },
          "envHash": {
            "type": "string"
          },
          "evidenceClass": {
            "$ref": "#/$defs/EvidenceClass"
          },
          "executingDevice": {
            "$ref": "#/$defs/ExecutingDevice"
          },
          "exit": {
            "$ref": "#/$defs/ExecutionExit"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/$defs/ExecutionFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "finishedAt": {
            "format": "date-time",
            "type": "string"
          },
          "grants": {
            "default": [],
            "items": {
              "$ref": "#/$defs/ExecutionGrant"
            },
            "type": "array"
          },
          "inputSetHash": {
            "type": "string"
          },
          "outputs": {
            "$ref": "#/$defs/ExecutionOutputs"
          },
          "requestHash": {
            "type": "string"
          },
          "runId": {
            "format": "uuid",
            "type": "string"
          },
          "sandboxProfileHash": {
            "type": "string"
          },
          "schemaVersion": {
            "type": "string"
          },
          "signature": {
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "state": {
            "$ref": "#/$defs/RunState"
          },
          "tier": {
            "$ref": "#/$defs/ExecutionTier"
          },
          "toolchainHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "usage": {
            "$ref": "#/$defs/ResourceUsage"
          }
        },
        "required": [
          "schemaVersion",
          "runId",
          "requestHash",
          "state",
          "evidenceClass",
          "tier",
          "codeHash",
          "inputSetHash",
          "envHash",
          "sandboxProfileHash",
          "backend",
          "exit",
          "outputs",
          "usage",
          "startedAt",
          "finishedAt",
          "executingDevice"
        ],
        "title": "ExecutionReceipt",
        "type": "object"
      },
      "ExecutionRunStatus": {
        "$defs": {
          "ArtifactReference": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "sizeBytes": {
                "format": "uint64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "path",
              "hash"
            ],
            "type": "object"
          },
          "ComponentAuthorization": {
            "properties": {
              "generationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manifestHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/$defs/ComponentAuthorizationMode"
              },
              "world": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "world"
            ],
            "type": "object"
          },
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          },
          "ComponentProvenance": {
            "properties": {
              "authorization": {
                "$ref": "#/$defs/ComponentAuthorization"
              },
              "backendProfileHash": {
                "type": "string"
              },
              "deterministicProjectionHash": {
                "description": "Canonical hash of the backend-independent Tier W receipt projection.",
                "type": "string"
              },
              "engineVersion": {
                "type": "string"
              }
            },
            "required": [
              "authorization",
              "engineVersion",
              "backendProfileHash",
              "deterministicProjectionHash"
            ],
            "type": "object"
          },
          "EvidenceClass": {
            "enum": [
              "verified",
              "attested"
            ],
            "type": "string"
          },
          "ExecutingDevice": {
            "properties": {
              "keyId": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "sigAlg": {
                "$ref": "#/$defs/SignatureAlgorithm"
              }
            },
            "required": [
              "keyId",
              "sigAlg",
              "platform"
            ],
            "type": "object"
          },
          "ExecutionBackend": {
            "enum": [
              "cranelift",
              "pulley",
              "seatbelt",
              "bwrap",
              "landlock"
            ],
            "type": "string"
          },
          "ExecutionExit": {
            "properties": {
              "signalOrTrap": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "format": "int32",
                "type": "integer"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "ExecutionFailure": {
            "properties": {
              "code": {
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/ExecutionFailureKind"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "code",
              "message"
            ],
            "type": "object"
          },
          "ExecutionFailureKind": {
            "enum": [
              "trap",
              "fuel-exhausted",
              "epoch-deadline",
              "memory-limit",
              "table-limit",
              "instance-limit",
              "stream-limit",
              "artifact-limit",
              "capability-denied",
              "component-unauthorized",
              "backend-unavailable",
              "interrupted"
            ],
            "type": "string"
          },
          "ExecutionGrant": {
            "properties": {
              "kind": {
                "$ref": "#/$defs/GrantKind"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          "ExecutionOutputs": {
            "properties": {
              "artifacts": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ArtifactReference"
                },
                "type": "array"
              },
              "stderr": {
                "type": "string"
              },
              "stdout": {
                "type": "string"
              }
            },
            "required": [
              "stdout",
              "stderr"
            ],
            "type": "object"
          },
          "ExecutionReceipt": {
            "properties": {
              "backend": {
                "$ref": "#/$defs/ExecutionBackend"
              },
              "codeHash": {
                "type": "string"
              },
              "component": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ComponentProvenance"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "envHash": {
                "type": "string"
              },
              "evidenceClass": {
                "$ref": "#/$defs/EvidenceClass"
              },
              "executingDevice": {
                "$ref": "#/$defs/ExecutingDevice"
              },
              "exit": {
                "$ref": "#/$defs/ExecutionExit"
              },
              "failure": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ExecutionFailure"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finishedAt": {
                "format": "date-time",
                "type": "string"
              },
              "grants": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ExecutionGrant"
                },
                "type": "array"
              },
              "inputSetHash": {
                "type": "string"
              },
              "outputs": {
                "$ref": "#/$defs/ExecutionOutputs"
              },
              "requestHash": {
                "type": "string"
              },
              "runId": {
                "format": "uuid",
                "type": "string"
              },
              "sandboxProfileHash": {
                "type": "string"
              },
              "schemaVersion": {
                "type": "string"
              },
              "signature": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startedAt": {
                "format": "date-time",
                "type": "string"
              },
              "state": {
                "$ref": "#/$defs/RunState"
              },
              "tier": {
                "$ref": "#/$defs/ExecutionTier"
              },
              "toolchainHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage": {
                "$ref": "#/$defs/ResourceUsage"
              }
            },
            "required": [
              "schemaVersion",
              "runId",
              "requestHash",
              "state",
              "evidenceClass",
              "tier",
              "codeHash",
              "inputSetHash",
              "envHash",
              "sandboxProfileHash",
              "backend",
              "exit",
              "outputs",
              "usage",
              "startedAt",
              "finishedAt",
              "executingDevice"
            ],
            "type": "object"
          },
          "ExecutionTier": {
            "enum": [
              "w",
              "p"
            ],
            "type": "string"
          },
          "GrantKind": {
            "enum": [
              "ssh-manifest",
              "interactive",
              "cedar-auto"
            ],
            "type": "string"
          },
          "ResourceUsage": {
            "properties": {
              "cpuMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "fuelConsumed": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "peakMemMb": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "wallClockMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "wallClockMs",
              "cpuMs",
              "peakMemMb",
              "fuelConsumed"
            ],
            "type": "object"
          },
          "RunState": {
            "enum": [
              "queued",
              "grant-pending",
              "running",
              "succeeded",
              "failed",
              "rejected",
              "interrupted"
            ],
            "type": "string"
          },
          "SignatureAlgorithm": {
            "enum": [
              "ed25519",
              "p256"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "description": "Durable status returned by REST, MCP, and other service adapters.",
        "properties": {
          "receipt": {
            "anyOf": [
              {
                "$ref": "#/$defs/ExecutionReceipt"
              },
              {
                "type": "null"
              }
            ]
          },
          "replayed": {
            "type": "boolean"
          },
          "requestHash": {
            "type": "string"
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          },
          "runId": {
            "format": "uuid",
            "type": "string"
          },
          "state": {
            "$ref": "#/$defs/RunState"
          }
        },
        "required": [
          "runId",
          "requestId",
          "requestHash",
          "state",
          "replayed"
        ],
        "title": "ExecutionRunStatus",
        "type": "object"
      },
      "ReceiptLogSegment": {
        "$defs": {
          "ArtifactReference": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "sizeBytes": {
                "format": "uint64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "path",
              "hash"
            ],
            "type": "object"
          },
          "ComponentAuthorization": {
            "properties": {
              "generationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manifestHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/$defs/ComponentAuthorizationMode"
              },
              "world": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "world"
            ],
            "type": "object"
          },
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          },
          "ComponentProvenance": {
            "properties": {
              "authorization": {
                "$ref": "#/$defs/ComponentAuthorization"
              },
              "backendProfileHash": {
                "type": "string"
              },
              "deterministicProjectionHash": {
                "description": "Canonical hash of the backend-independent Tier W receipt projection.",
                "type": "string"
              },
              "engineVersion": {
                "type": "string"
              }
            },
            "required": [
              "authorization",
              "engineVersion",
              "backendProfileHash",
              "deterministicProjectionHash"
            ],
            "type": "object"
          },
          "EvidenceClass": {
            "enum": [
              "verified",
              "attested"
            ],
            "type": "string"
          },
          "ExecutingDevice": {
            "properties": {
              "keyId": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "sigAlg": {
                "$ref": "#/$defs/SignatureAlgorithm"
              }
            },
            "required": [
              "keyId",
              "sigAlg",
              "platform"
            ],
            "type": "object"
          },
          "ExecutionBackend": {
            "enum": [
              "cranelift",
              "pulley",
              "seatbelt",
              "bwrap",
              "landlock"
            ],
            "type": "string"
          },
          "ExecutionExit": {
            "properties": {
              "signalOrTrap": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "format": "int32",
                "type": "integer"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "ExecutionFailure": {
            "properties": {
              "code": {
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/ExecutionFailureKind"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "code",
              "message"
            ],
            "type": "object"
          },
          "ExecutionFailureKind": {
            "enum": [
              "trap",
              "fuel-exhausted",
              "epoch-deadline",
              "memory-limit",
              "table-limit",
              "instance-limit",
              "stream-limit",
              "artifact-limit",
              "capability-denied",
              "component-unauthorized",
              "backend-unavailable",
              "interrupted"
            ],
            "type": "string"
          },
          "ExecutionGrant": {
            "properties": {
              "kind": {
                "$ref": "#/$defs/GrantKind"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          "ExecutionOutputs": {
            "properties": {
              "artifacts": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ArtifactReference"
                },
                "type": "array"
              },
              "stderr": {
                "type": "string"
              },
              "stdout": {
                "type": "string"
              }
            },
            "required": [
              "stdout",
              "stderr"
            ],
            "type": "object"
          },
          "ExecutionReceipt": {
            "properties": {
              "backend": {
                "$ref": "#/$defs/ExecutionBackend"
              },
              "codeHash": {
                "type": "string"
              },
              "component": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ComponentProvenance"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "envHash": {
                "type": "string"
              },
              "evidenceClass": {
                "$ref": "#/$defs/EvidenceClass"
              },
              "executingDevice": {
                "$ref": "#/$defs/ExecutingDevice"
              },
              "exit": {
                "$ref": "#/$defs/ExecutionExit"
              },
              "failure": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ExecutionFailure"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finishedAt": {
                "format": "date-time",
                "type": "string"
              },
              "grants": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ExecutionGrant"
                },
                "type": "array"
              },
              "inputSetHash": {
                "type": "string"
              },
              "outputs": {
                "$ref": "#/$defs/ExecutionOutputs"
              },
              "requestHash": {
                "type": "string"
              },
              "runId": {
                "format": "uuid",
                "type": "string"
              },
              "sandboxProfileHash": {
                "type": "string"
              },
              "schemaVersion": {
                "type": "string"
              },
              "signature": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startedAt": {
                "format": "date-time",
                "type": "string"
              },
              "state": {
                "$ref": "#/$defs/RunState"
              },
              "tier": {
                "$ref": "#/$defs/ExecutionTier"
              },
              "toolchainHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage": {
                "$ref": "#/$defs/ResourceUsage"
              }
            },
            "required": [
              "schemaVersion",
              "runId",
              "requestHash",
              "state",
              "evidenceClass",
              "tier",
              "codeHash",
              "inputSetHash",
              "envHash",
              "sandboxProfileHash",
              "backend",
              "exit",
              "outputs",
              "usage",
              "startedAt",
              "finishedAt",
              "executingDevice"
            ],
            "type": "object"
          },
          "ExecutionTier": {
            "enum": [
              "w",
              "p"
            ],
            "type": "string"
          },
          "GrantKind": {
            "enum": [
              "ssh-manifest",
              "interactive",
              "cedar-auto"
            ],
            "type": "string"
          },
          "ReceiptLogEntry": {
            "properties": {
              "receipt": {
                "$ref": "#/$defs/ExecutionReceipt"
              },
              "receiptHash": {
                "type": "string"
              }
            },
            "required": [
              "receiptHash",
              "receipt"
            ],
            "type": "object"
          },
          "ReceiptLogSegmentHeader": {
            "properties": {
              "createdAt": {
                "format": "date-time",
                "type": "string"
              },
              "previousSegmentHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "receiptCount": {
                "format": "uint32",
                "minimum": 0,
                "type": "integer"
              },
              "schemaVersion": {
                "type": "string"
              },
              "sequence": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "schemaVersion",
              "sequence",
              "createdAt",
              "receiptCount"
            ],
            "type": "object"
          },
          "ResourceUsage": {
            "properties": {
              "cpuMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "fuelConsumed": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "peakMemMb": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "wallClockMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "wallClockMs",
              "cpuMs",
              "peakMemMb",
              "fuelConsumed"
            ],
            "type": "object"
          },
          "RunState": {
            "enum": [
              "queued",
              "grant-pending",
              "running",
              "succeeded",
              "failed",
              "rejected",
              "interrupted"
            ],
            "type": "string"
          },
          "SignatureAlgorithm": {
            "enum": [
              "ed25519",
              "p256"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/$defs/ReceiptLogEntry"
            },
            "type": "array"
          },
          "header": {
            "$ref": "#/$defs/ReceiptLogSegmentHeader"
          },
          "segmentHash": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "header",
          "entries"
        ],
        "title": "ReceiptLogSegment",
        "type": "object"
      },
      "SignedExecRequest": {
        "$defs": {
          "CapabilityManifest": {
            "properties": {
              "clock": {
                "default": false,
                "type": "boolean"
              },
              "env": {
                "$ref": "#/$defs/EnvironmentCapabilities",
                "default": {
                  "read": []
                }
              },
              "fs": {
                "$ref": "#/$defs/FilesystemCapabilities",
                "default": {
                  "readOnly": [],
                  "readWrite": []
                }
              },
              "net": {
                "$ref": "#/$defs/NetworkCapabilities",
                "default": {
                  "egress": []
                }
              },
              "random": {
                "default": false,
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "CodeIdentity": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/CodeKind"
              },
              "runtime": {
                "$ref": "#/$defs/RuntimeKind"
              },
              "toolchainPin": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind",
              "hash",
              "runtime"
            ],
            "type": "object"
          },
          "CodeKind": {
            "enum": [
              "inline",
              "component",
              "file"
            ],
            "type": "string"
          },
          "ComponentAuthorization": {
            "properties": {
              "generationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manifestHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/$defs/ComponentAuthorizationMode"
              },
              "world": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "world"
            ],
            "type": "object"
          },
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          },
          "EnvironmentCapabilities": {
            "properties": {
              "read": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "ExecutionLimits": {
            "properties": {
              "fuel": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "memoryMb": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "outputMb": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "stackKb": {
                "description": "Guest stack ceiling in KiB. Tier W currently requires exactly 512\nbecause Wasmtime configures this limit per engine; Tier P may apply a\nplatform-specific value.",
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "wallClockMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "memoryMb",
              "fuel",
              "wallClockMs",
              "outputMb",
              "stackKb"
            ],
            "type": "object"
          },
          "ExecutionProvenance": {
            "properties": {
              "change": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "componentAuthorization": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ComponentAuthorization"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "harness": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phase": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "skill": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          },
          "FilesystemCapabilities": {
            "properties": {
              "readOnly": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "readWrite": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "NamedInput": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "hash"
            ],
            "type": "object"
          },
          "NetworkCapabilities": {
            "properties": {
              "egress": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              }
            },
            "type": "object"
          },
          "RequestedTier": {
            "enum": [
              "w",
              "p",
              "auto"
            ],
            "type": "string"
          },
          "RuntimeKind": {
            "enum": [
              "wasm-component",
              "python3",
              "node",
              "bash"
            ],
            "type": "string"
          },
          "SignatureAlgorithm": {
            "enum": [
              "ed25519",
              "p256"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "capabilities": {
            "$ref": "#/$defs/CapabilityManifest"
          },
          "code": {
            "$ref": "#/$defs/CodeIdentity"
          },
          "inputs": {
            "default": [],
            "items": {
              "$ref": "#/$defs/NamedInput"
            },
            "type": "array"
          },
          "issuedAt": {
            "format": "date-time",
            "type": "string"
          },
          "limits": {
            "$ref": "#/$defs/ExecutionLimits"
          },
          "provenance": {
            "$ref": "#/$defs/ExecutionProvenance",
            "default": {}
          },
          "queuedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "requestId": {
            "format": "uuid",
            "type": "string"
          },
          "schemaVersion": {
            "type": "string"
          },
          "sigAlg": {
            "$ref": "#/$defs/SignatureAlgorithm"
          },
          "signature": {
            "type": [
              "string",
              "null"
            ]
          },
          "signerKeyId": {
            "type": [
              "string",
              "null"
            ]
          },
          "targets": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tier": {
            "$ref": "#/$defs/RequestedTier"
          },
          "validityWindowSecs": {
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "schemaVersion",
          "requestId",
          "issuedAt",
          "validityWindowSecs",
          "tier",
          "code",
          "capabilities",
          "limits",
          "sigAlg"
        ],
        "title": "SignedExecRequest",
        "type": "object"
      },
      "TierWReplayRequest": {
        "$defs": {
          "ArtifactReference": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "path": {
                "type": "string"
              },
              "sizeBytes": {
                "format": "uint64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              }
            },
            "required": [
              "path",
              "hash"
            ],
            "type": "object"
          },
          "ComponentAuthorization": {
            "properties": {
              "generationId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "manifestHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mode": {
                "$ref": "#/$defs/ComponentAuthorizationMode"
              },
              "world": {
                "type": "string"
              }
            },
            "required": [
              "mode",
              "world"
            ],
            "type": "object"
          },
          "ComponentAuthorizationMode": {
            "enum": [
              "signed-generation",
              "hash-pin",
              "bundled"
            ],
            "type": "string"
          },
          "ComponentProvenance": {
            "properties": {
              "authorization": {
                "$ref": "#/$defs/ComponentAuthorization"
              },
              "backendProfileHash": {
                "type": "string"
              },
              "deterministicProjectionHash": {
                "description": "Canonical hash of the backend-independent Tier W receipt projection.",
                "type": "string"
              },
              "engineVersion": {
                "type": "string"
              }
            },
            "required": [
              "authorization",
              "engineVersion",
              "backendProfileHash",
              "deterministicProjectionHash"
            ],
            "type": "object"
          },
          "EvidenceClass": {
            "enum": [
              "verified",
              "attested"
            ],
            "type": "string"
          },
          "ExecutingDevice": {
            "properties": {
              "keyId": {
                "type": "string"
              },
              "platform": {
                "type": "string"
              },
              "sigAlg": {
                "$ref": "#/$defs/SignatureAlgorithm"
              }
            },
            "required": [
              "keyId",
              "sigAlg",
              "platform"
            ],
            "type": "object"
          },
          "ExecutionBackend": {
            "enum": [
              "cranelift",
              "pulley",
              "seatbelt",
              "bwrap",
              "landlock"
            ],
            "type": "string"
          },
          "ExecutionExit": {
            "properties": {
              "signalOrTrap": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "format": "int32",
                "type": "integer"
              }
            },
            "required": [
              "status"
            ],
            "type": "object"
          },
          "ExecutionFailure": {
            "properties": {
              "code": {
                "type": "string"
              },
              "kind": {
                "$ref": "#/$defs/ExecutionFailureKind"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "kind",
              "code",
              "message"
            ],
            "type": "object"
          },
          "ExecutionFailureKind": {
            "enum": [
              "trap",
              "fuel-exhausted",
              "epoch-deadline",
              "memory-limit",
              "table-limit",
              "instance-limit",
              "stream-limit",
              "artifact-limit",
              "capability-denied",
              "component-unauthorized",
              "backend-unavailable",
              "interrupted"
            ],
            "type": "string"
          },
          "ExecutionGrant": {
            "properties": {
              "kind": {
                "$ref": "#/$defs/GrantKind"
              },
              "ref": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "kind"
            ],
            "type": "object"
          },
          "ExecutionOutputs": {
            "properties": {
              "artifacts": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ArtifactReference"
                },
                "type": "array"
              },
              "stderr": {
                "type": "string"
              },
              "stdout": {
                "type": "string"
              }
            },
            "required": [
              "stdout",
              "stderr"
            ],
            "type": "object"
          },
          "ExecutionReceipt": {
            "properties": {
              "backend": {
                "$ref": "#/$defs/ExecutionBackend"
              },
              "codeHash": {
                "type": "string"
              },
              "component": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ComponentProvenance"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "envHash": {
                "type": "string"
              },
              "evidenceClass": {
                "$ref": "#/$defs/EvidenceClass"
              },
              "executingDevice": {
                "$ref": "#/$defs/ExecutingDevice"
              },
              "exit": {
                "$ref": "#/$defs/ExecutionExit"
              },
              "failure": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ExecutionFailure"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finishedAt": {
                "format": "date-time",
                "type": "string"
              },
              "grants": {
                "default": [],
                "items": {
                  "$ref": "#/$defs/ExecutionGrant"
                },
                "type": "array"
              },
              "inputSetHash": {
                "type": "string"
              },
              "outputs": {
                "$ref": "#/$defs/ExecutionOutputs"
              },
              "requestHash": {
                "type": "string"
              },
              "runId": {
                "format": "uuid",
                "type": "string"
              },
              "sandboxProfileHash": {
                "type": "string"
              },
              "schemaVersion": {
                "type": "string"
              },
              "signature": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "startedAt": {
                "format": "date-time",
                "type": "string"
              },
              "state": {
                "$ref": "#/$defs/RunState"
              },
              "tier": {
                "$ref": "#/$defs/ExecutionTier"
              },
              "toolchainHash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "usage": {
                "$ref": "#/$defs/ResourceUsage"
              }
            },
            "required": [
              "schemaVersion",
              "runId",
              "requestHash",
              "state",
              "evidenceClass",
              "tier",
              "codeHash",
              "inputSetHash",
              "envHash",
              "sandboxProfileHash",
              "backend",
              "exit",
              "outputs",
              "usage",
              "startedAt",
              "finishedAt",
              "executingDevice"
            ],
            "type": "object"
          },
          "ExecutionTier": {
            "enum": [
              "w",
              "p"
            ],
            "type": "string"
          },
          "GrantKind": {
            "enum": [
              "ssh-manifest",
              "interactive",
              "cedar-auto"
            ],
            "type": "string"
          },
          "NamedInput": {
            "properties": {
              "hash": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "hash"
            ],
            "type": "object"
          },
          "ResourceUsage": {
            "properties": {
              "cpuMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "fuelConsumed": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "peakMemMb": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              },
              "wallClockMs": {
                "format": "uint64",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "wallClockMs",
              "cpuMs",
              "peakMemMb",
              "fuelConsumed"
            ],
            "type": "object"
          },
          "RunState": {
            "enum": [
              "queued",
              "grant-pending",
              "running",
              "succeeded",
              "failed",
              "rejected",
              "interrupted"
            ],
            "type": "string"
          },
          "SignatureAlgorithm": {
            "enum": [
              "ed25519",
              "p256"
            ],
            "type": "string"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "componentHash": {
            "type": "string"
          },
          "inputs": {
            "default": [],
            "items": {
              "$ref": "#/$defs/NamedInput"
            },
            "type": "array"
          },
          "receipt": {
            "$ref": "#/$defs/ExecutionReceipt"
          }
        },
        "required": [
          "receipt",
          "componentHash"
        ],
        "title": "TierWReplayRequest",
        "type": "object"
      },
      "TierWReplayResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "checks": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "mismatches": {
            "default": [],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid"
        ],
        "title": "TierWReplayResult",
        "type": "object"
      },
      "VerificationResult": {
        "$defs": {
          "TierWReplayResult": {
            "properties": {
              "checks": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "mismatches": {
                "default": [],
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "valid": {
                "type": "boolean"
              }
            },
            "required": [
              "valid"
            ],
            "type": "object"
          },
          "VerificationCheck": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "VerificationFailure": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "subject": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          }
        },
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "checks": {
            "default": [],
            "items": {
              "$ref": "#/$defs/VerificationCheck"
            },
            "type": "array"
          },
          "failures": {
            "default": [],
            "items": {
              "$ref": "#/$defs/VerificationFailure"
            },
            "type": "array"
          },
          "receiptHash": {
            "type": [
              "string",
              "null"
            ]
          },
          "replay": {
            "anyOf": [
              {
                "$ref": "#/$defs/TierWReplayResult"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional deterministic backend replay. Signature/hash verification is\nstill complete and transport-free when this field is absent."
          },
          "valid": {
            "type": "boolean"
          }
        },
        "required": [
          "valid"
        ],
        "title": "VerificationResult",
        "type": "object"
      }
    }
  },
  "info": {
    "description": "Same-user local execution over a Unix-domain socket. Requests and terminal receipts remain portable and independently verifiable.",
    "title": "Prometheus Exec API",
    "version": "1.7.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v2/exec/artifacts/{digest}": {
      "get": {
        "operationId": "getExecArtifact",
        "parameters": [
          {
            "in": "path",
            "name": "digest",
            "required": true,
            "schema": {
              "pattern": "^sha256:[a-f0-9]{64}$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Exact artifact bytes",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "digest is not canonical SHA-256"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "No artifact has this digest"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The artifact store is unavailable"
          }
        },
        "summary": "Read one SHA-256 content-addressed artifact",
        "tags": [
          "evidence"
        ]
      }
    },
    "/api/v2/exec/receipts/{run_id}": {
      "get": {
        "operationId": "getExecReceipt",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionReceipt"
                }
              }
            },
            "description": "Portable signed execution receipt"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "run_id is not a UUID"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The run has no terminal receipt"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The durable service is unavailable"
          }
        },
        "summary": "Read the terminal signed receipt",
        "tags": [
          "evidence"
        ]
      }
    },
    "/api/v2/exec/runs": {
      "post": {
        "description": "Returns 202 for first acceptance and 200 with replayed=true for the same request ID and canonical hash.",
        "operationId": "submitExecRun",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignedExecRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionRunStatus"
                }
              }
            },
            "description": "Exact durable replay"
          },
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionRunStatus"
                }
              }
            },
            "description": "New request accepted durably"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The signed request violates a contract invariant"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The request ID already binds a different canonical hash"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The request body is not valid JSON for SignedExecRequest"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The durable service or referenced artifact is unavailable"
          }
        },
        "summary": "Durably accept a signed execution request",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v2/exec/runs/{run_id}": {
      "get": {
        "operationId": "getExecRun",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionRunStatus"
                }
              }
            },
            "description": "Durable run state"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "run_id is not a UUID"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "No run has this ID"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The durable service is unavailable"
          }
        },
        "summary": "Read durable run state and any terminal receipt",
        "tags": [
          "runs"
        ]
      }
    },
    "/api/v2/exec/runs/{run_id}/events": {
      "get": {
        "operationId": "streamExecRunEvents",
        "parameters": [
          {
            "in": "path",
            "name": "run_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "default": 0,
              "format": "uint64",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Persisted events followed by live events until terminal state"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "run_id or after is invalid"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "No run has this ID"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                }
              }
            },
            "description": "The durable service is unavailable"
          }
        },
        "summary": "Resume ordered server-sent events after an exclusive cursor",
        "tags": [
          "runs"
        ]
      }
    },
    "/health": {
      "get": {
        "operationId": "execHealth",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "service": {
                      "const": "prometheus-exec"
                    },
                    "status": {
                      "const": "ok"
                    },
                    "version": {
                      "const": "1.7.0"
                    }
                  },
                  "required": [
                    "status",
                    "service",
                    "version"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Process is live"
          }
        },
        "summary": "Read process liveness without waiting for runtime initialization",
        "tags": [
          "lifecycle"
        ]
      }
    },
    "/ready": {
      "get": {
        "operationId": "execReady",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "ready": {
                      "type": "boolean"
                    },
                    "subsystems": {
                      "additionalProperties": {
                        "properties": {
                          "detail": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "initializing",
                              "ready",
                              "failed"
                            ]
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "type": "string"
                          }
                        },
                        "required": [
                          "status",
                          "detail",
                          "updatedAt"
                        ],
                        "type": "object"
                      },
                      "type": "object"
                    }
                  },
                  "required": [
                    "ready",
                    "subsystems"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "All required local subsystems are ready"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "properties": {
                        "ready": {
                          "type": "boolean"
                        },
                        "subsystems": {
                          "additionalProperties": {
                            "properties": {
                              "detail": {
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "initializing",
                                  "ready",
                                  "failed"
                                ]
                              },
                              "updatedAt": {
                                "format": "date-time",
                                "type": "string"
                              }
                            },
                            "required": [
                              "status",
                              "detail",
                              "updatedAt"
                            ],
                            "type": "object"
                          },
                          "type": "object"
                        }
                      },
                      "required": [
                        "ready",
                        "subsystems"
                      ],
                      "type": "object"
                    },
                    {
                      "$ref": "#/components/schemas/ExecutionApiErrorEnvelope"
                    }
                  ]
                }
              }
            },
            "description": "One or more subsystems are initializing, failed, or unavailable"
          }
        },
        "summary": "Read bounded per-subsystem readiness",
        "tags": [
          "lifecycle"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Placeholder authority used with the configured Unix-domain socket",
      "url": "http://localhost"
    }
  ],
  "tags": [
    {
      "name": "lifecycle"
    },
    {
      "name": "runs"
    },
    {
      "name": "evidence"
    }
  ]
}
