{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://remora.invalid/api/events.schema.json", "$defs": { "Cursor": { "type": "object", "properties": { "cursor": { "type": "string", "minLength": 16, "maxLength": 2048 } }, "unevaluatedProperties": { "not": {} } }, "Limit": { "type": "object", "properties": { "limit": { "type": "integer", "default": 50, "minimum": 1, "maximum": 200 } }, "unevaluatedProperties": { "not": {} } }, "IdempotencyKey": { "type": "object", "properties": { "Idempotency-Key": { "type": "string", "pattern": "^[A-Za-z0-9._~-]{16,128}$", "description": "Subject- and operation-scoped key retained for at least 24 hours." } }, "required": [ "Idempotency-Key" ], "unevaluatedProperties": { "not": {} } }, "JobId": { "type": "object", "properties": { "job_id": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "job_id" ], "unevaluatedProperties": { "not": {} } }, "OpaqueId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{7,127}$" }, "CredentialIdParameter": { "type": "object", "properties": { "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "credential_id" ], "unevaluatedProperties": { "not": {} } }, "CredentialId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{7,127}$", "description": "Owner-authorized source credential registry identifier." }, "AttemptId": { "type": "object", "properties": { "attempt_id": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "attempt_id" ], "unevaluatedProperties": { "not": {} } }, "Target": { "type": "object", "properties": { "store": { "type": "string", "minLength": 1, "maxLength": 128 }, "bucket": { "$ref": "#/$defs/BucketName" }, "prefix": { "type": "string", "maxLength": 1024, "description": "NFC-normalized target segments; semantic validation follows architecture.md." } }, "required": [ "store", "bucket", "prefix" ], "unevaluatedProperties": { "not": {} } }, "BucketName": { "type": "string", "pattern": "^(?!.*\\.\\.)[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$" }, "TargetOverride": { "type": "object", "properties": { "bucket": { "$ref": "#/$defs/BucketName" }, "prefix": { "type": "string", "maxLength": 1024, "description": "NFC-normalized target segments; semantic validation follows architecture.md." } }, "unevaluatedProperties": { "not": {} } }, "StagingTarget": { "type": "object", "properties": { "store": { "type": "string", "minLength": 1, "maxLength": 128 }, "bucket": { "$ref": "#/$defs/BucketName" }, "prefix": { "type": "string", "minLength": 1, "maxLength": 1024, "description": "Exact attempt-scoped internal prefix selected by the service." } }, "required": [ "store", "bucket", "prefix" ], "unevaluatedProperties": { "not": {} } }, "HttpSourceSubmission": { "type": "object", "properties": { "kind": { "type": "string", "const": "http" }, "url": { "type": "string", "format": "uri", "maxLength": 8192, "description": "Sensitive execution input. Public projections expose only display_url." }, "result_path": { "$ref": "#/$defs/ResultPath" }, "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "kind", "url", "result_path" ], "unevaluatedProperties": { "not": {} } }, "ResultPath": { "type": "string", "minLength": 1, "maxLength": 4096, "description": "NFC-normalized relative POSIX path validated under architecture.md." }, "ObjectStoreSourceSubmission": { "type": "object", "properties": { "kind": { "type": "string", "const": "object_store" }, "store": { "type": "string", "minLength": 1, "maxLength": 128 }, "bucket": { "type": "string", "minLength": 3, "maxLength": 63 }, "key": { "type": "string", "minLength": 1, "maxLength": 4096 }, "version_id": { "type": "string", "maxLength": 1024 }, "result_path": { "$ref": "#/$defs/ResultPath" }, "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "kind", "store", "bucket", "key", "result_path" ], "unevaluatedProperties": { "not": {} } }, "HuggingFaceSelection": { "type": "object", "properties": { "paths": { "type": "array", "items": { "$ref": "#/$defs/ResultPath" }, "maxItems": 10000 }, "prefixes": { "type": "array", "items": { "$ref": "#/$defs/ResultPath" }, "maxItems": 10000 } }, "unevaluatedProperties": { "not": {} } }, "HuggingFaceSourceSubmission": { "type": "object", "properties": { "kind": { "type": "string", "const": "hugging_face" }, "repository_type": { "anyOf": [ { "type": "string", "const": "model" }, { "type": "string", "const": "dataset" }, { "type": "string", "const": "space" } ] }, "repository_id": { "$ref": "#/$defs/HuggingFaceRepositoryId" }, "revision": { "type": "string", "minLength": 1, "maxLength": 256 }, "selection": { "$ref": "#/$defs/HuggingFaceSelection" }, "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "kind", "repository_type", "repository_id", "revision" ], "unevaluatedProperties": { "not": {} } }, "HuggingFaceRepositoryId": { "type": "string", "pattern": "^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$" }, "HttpSourceProjection": { "type": "object", "properties": { "kind": { "type": "string", "const": "http" }, "display_url": { "type": "string", "format": "uri", "maxLength": 8192, "description": "Sanitized URL without userinfo, sensitive query values, or fragments." }, "result_path": { "$ref": "#/$defs/ResultPath" }, "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "kind", "display_url", "result_path" ], "unevaluatedProperties": { "not": {} } }, "ObjectStoreSourceProjection": { "type": "object", "properties": { "kind": { "type": "string", "const": "object_store" }, "store": { "type": "string", "minLength": 1, "maxLength": 128 }, "bucket": { "type": "string", "minLength": 3, "maxLength": 63 }, "key": { "type": "string", "minLength": 1, "maxLength": 4096 }, "version_id": { "type": "string", "maxLength": 1024 }, "result_path": { "$ref": "#/$defs/ResultPath" }, "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "kind", "store", "bucket", "key", "result_path" ], "unevaluatedProperties": { "not": {} } }, "HuggingFaceSourceProjection": { "type": "object", "properties": { "kind": { "type": "string", "const": "hugging_face" }, "repository_type": { "anyOf": [ { "type": "string", "const": "model" }, { "type": "string", "const": "dataset" }, { "type": "string", "const": "space" } ] }, "repository_id": { "$ref": "#/$defs/HuggingFaceRepositoryId" }, "revision": { "type": "string", "minLength": 1, "maxLength": 256 }, "selection": { "$ref": "#/$defs/HuggingFaceSelection" }, "credential_id": { "$ref": "#/$defs/CredentialId" } }, "required": [ "kind", "repository_type", "repository_id", "revision" ], "unevaluatedProperties": { "not": {} } }, "JobSubmission": { "type": "object", "properties": { "source": { "$ref": "#/$defs/SourceSubmission" }, "target": { "$ref": "#/$defs/TargetOverride", "description": "Fields omitted here are taken from the configured default target before authorization." }, "label": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "source" ], "unevaluatedProperties": { "not": {} } }, "SourceSubmission": { "anyOf": [ { "$ref": "#/$defs/HttpSourceSubmission" }, { "$ref": "#/$defs/ObjectStoreSourceSubmission" }, { "$ref": "#/$defs/HuggingFaceSourceSubmission" } ] }, "BasicAuthMaterial": { "type": "object", "properties": { "username": { "type": "string", "minLength": 1, "maxLength": 1024 }, "password": { "type": "string", "minLength": 1, "maxLength": 16384 } }, "required": [ "username", "password" ], "unevaluatedProperties": { "not": {} } }, "TokenMaterial": { "type": "object", "properties": { "token": { "type": "string", "minLength": 1, "maxLength": 16384 } }, "required": [ "token" ], "unevaluatedProperties": { "not": {} } }, "HttpHeadersMaterial": { "type": "object", "properties": { "headers": { "$ref": "#/$defs/RecordString", "description": "Canonical lowercase end-to-end headers. Connection-nominated and routing, framing, cookie, proxy, and authentication headers are rejected." } }, "required": [ "headers" ], "unevaluatedProperties": { "not": {} } }, "RecordString": { "type": "object", "properties": {}, "unevaluatedProperties": { "type": "string" } }, "ObjectStoreCredentialMaterial": { "type": "object", "properties": { "access_key_id": { "type": "string", "minLength": 1, "maxLength": 1024 }, "secret_access_key": { "type": "string", "minLength": 1, "maxLength": 16384 }, "session_token": { "type": "string", "minLength": 1, "maxLength": 16384 } }, "required": [ "access_key_id", "secret_access_key" ], "unevaluatedProperties": { "not": {} } }, "BasicAuthCredentialCreate": { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "type": "string", "const": "basic_auth" }, "material": { "$ref": "#/$defs/BasicAuthMaterial" } }, "required": [ "label", "kind", "material" ], "unevaluatedProperties": { "not": {} } }, "BearerTokenCredentialCreate": { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "type": "string", "const": "bearer_token" }, "material": { "$ref": "#/$defs/TokenMaterial" } }, "required": [ "label", "kind", "material" ], "unevaluatedProperties": { "not": {} } }, "HttpHeadersCredentialCreate": { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "type": "string", "const": "http_headers" }, "material": { "$ref": "#/$defs/HttpHeadersMaterial" } }, "required": [ "label", "kind", "material" ], "unevaluatedProperties": { "not": {} } }, "ObjectStoreCredentialCreate": { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "type": "string", "const": "object_store" }, "material": { "$ref": "#/$defs/ObjectStoreCredentialMaterial" } }, "required": [ "label", "kind", "material" ], "unevaluatedProperties": { "not": {} } }, "HuggingFaceCredentialCreate": { "type": "object", "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "type": "string", "const": "hugging_face" }, "material": { "$ref": "#/$defs/TokenMaterial" } }, "required": [ "label", "kind", "material" ], "unevaluatedProperties": { "not": {} } }, "SourceCredentialRotate": { "type": "object", "properties": { "material": { "$ref": "#/$defs/CredentialMaterial" } }, "required": [ "material" ], "unevaluatedProperties": { "not": {} }, "description": "The material shape must match the stored credential kind; rotation never changes kind." }, "CredentialMaterial": { "anyOf": [ { "$ref": "#/$defs/BasicAuthMaterial" }, { "$ref": "#/$defs/TokenMaterial" }, { "$ref": "#/$defs/HttpHeadersMaterial" }, { "$ref": "#/$defs/ObjectStoreCredentialMaterial" } ], "description": "Write-only material whose closed shape must match the credential kind. Values are never returned or logged." }, "SourceCredentialVersion": { "type": "object", "properties": { "id": { "$ref": "#/$defs/CredentialVersionId" }, "created_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "created_at" ], "unevaluatedProperties": { "not": {} } }, "CredentialVersionId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{7,127}$", "description": "Immutable application credential-version identifier; backend secret-store coordinates are never exposed." }, "CredentialGrantVersion": { "type": "object", "properties": { "credential_id": { "$ref": "#/$defs/CredentialId" }, "version_id": { "$ref": "#/$defs/CredentialVersionId" } }, "required": [ "credential_id", "version_id" ], "unevaluatedProperties": { "not": {} } }, "SourceCredential": { "type": "object", "properties": { "id": { "$ref": "#/$defs/CredentialId" }, "owner": { "$ref": "#/$defs/PrincipalId" }, "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "$ref": "#/$defs/SourceCredentialKind" }, "status": { "anyOf": [ { "type": "string", "const": "active" }, { "type": "string", "const": "revoked" } ] }, "active_version": { "anyOf": [ { "$ref": "#/$defs/SourceCredentialVersion" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "owner", "label", "kind", "status", "active_version", "created_at", "updated_at" ], "unevaluatedProperties": { "not": {} } }, "PrincipalId": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{7,127}$", "description": "Internal stable principal identifier mapped to one exact OIDC issuer and subject pair." }, "SourceCredentialKind": { "type": "string", "enum": [ "basic_auth", "bearer_token", "http_headers", "object_store", "hugging_face" ] }, "SourceCredentialPage": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/SourceCredential" } }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "items", "next_cursor" ], "unevaluatedProperties": { "not": {} } }, "JobPhaseProjection": { "type": "object", "properties": { "phase": { "$ref": "#/$defs/JobPhase" } }, "required": [ "phase" ], "unevaluatedProperties": { "not": {} } }, "JobPhase": { "type": "string", "enum": [ "Queued", "Running", "RetryWait", "Cancelling", "Succeeded", "Failed", "Cancelled" ] }, "AttemptAuthority": { "type": "object", "properties": { "attempt_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "attempt_id", "fence", "worker_incarnation" ], "unevaluatedProperties": { "not": {} } }, "LeaseProjection": { "type": "object", "properties": { "expires_at": { "type": "string", "format": "date-time", "description": "Expiry of the exact coordination lease established for this authority." }, "renew_after": { "type": "string", "format": "date-time", "description": "Earliest recommended renewal time, strictly before expires_at." } }, "required": [ "expires_at", "renew_after" ], "unevaluatedProperties": { "not": {} } }, "Progress": { "type": "object", "properties": { "attempt_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "completed_bytes": { "type": "integer", "minimum": 0 }, "total_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "minimum": 0 }, "completed_members": { "type": "integer", "minimum": 0 }, "total_members": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "minimum": 0 }, "observed_at": { "type": "string", "format": "date-time" } }, "required": [ "attempt_id", "fence", "completed_bytes", "completed_members", "observed_at" ], "unevaluatedProperties": { "not": {} } }, "ProgressValue": { "type": "object", "properties": { "completed_bytes": { "type": "integer", "minimum": 0 }, "total_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "minimum": 0 }, "completed_members": { "type": "integer", "minimum": 0 }, "total_members": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "minimum": 0 } }, "required": [ "completed_bytes", "completed_members" ], "unevaluatedProperties": { "not": {} } }, "CheckpointProjection": { "type": "object", "properties": { "reusable": { "type": "boolean" }, "validated_bytes": { "type": "integer", "minimum": 0 }, "validated_members": { "type": "integer", "minimum": 0 } }, "required": [ "reusable", "validated_bytes", "validated_members" ], "unevaluatedProperties": { "not": {} } }, "PermanentJobFailure": { "type": "object", "properties": { "class": { "anyOf": [ { "type": "string", "const": "validation" }, { "type": "string", "const": "authorization" }, { "type": "string", "const": "source_not_found" }, { "type": "string", "const": "source_changed" }, { "type": "string", "const": "cancelled" } ] }, "retryable": { "type": "boolean", "const": false }, "message": { "type": "string", "maxLength": 500 }, "safe_details": { "$ref": "#/$defs/RecordSafeDetailValue" } }, "required": [ "class", "retryable", "message" ], "unevaluatedProperties": { "not": {} } }, "RecordSafeDetailValue": { "type": "object", "properties": {}, "unevaluatedProperties": { "$ref": "#/$defs/SafeDetailValue" } }, "SafeDetailValue": { "anyOf": [ { "type": "string" }, { "type": "integer" }, { "type": "boolean" }, { "type": "null" } ] }, "RetryableJobFailure": { "type": "object", "properties": { "class": { "anyOf": [ { "type": "string", "const": "transient_source" }, { "type": "string", "const": "transient_target" }, { "type": "string", "const": "integrity" }, { "type": "string", "const": "capacity" }, { "type": "string", "const": "internal" }, { "type": "string", "const": "lost_attempt" } ] }, "retryable": { "type": "boolean", "const": true }, "message": { "type": "string", "maxLength": 500 }, "safe_details": { "$ref": "#/$defs/RecordSafeDetailValue" } }, "required": [ "class", "retryable", "message" ], "unevaluatedProperties": { "not": {} } }, "AttemptRuntimeFailure": { "type": "object", "properties": { "class": { "anyOf": [ { "type": "string", "const": "authorization" }, { "type": "string", "const": "source_not_found" }, { "type": "string", "const": "source_changed" }, { "type": "string", "const": "transient_source" }, { "type": "string", "const": "transient_target" }, { "type": "string", "const": "integrity" }, { "type": "string", "const": "capacity" }, { "type": "string", "const": "internal" } ] }, "message": { "type": "string", "maxLength": 500 }, "safe_details": { "$ref": "#/$defs/RecordSafeDetailValue" } }, "required": [ "class", "message" ], "unevaluatedProperties": { "not": {} } }, "ResultDescriptor": { "type": "object", "properties": { "kind": { "type": "string", "const": "manifest" }, "manifest_id": { "$ref": "#/$defs/OpaqueId" }, "schema_version": { "type": "integer", "minimum": 1 }, "manifest": { "$ref": "#/$defs/ObjectIdentity" }, "member_count": { "type": "integer", "minimum": 1 }, "total_bytes": { "type": "integer", "minimum": 0 } }, "required": [ "kind", "manifest_id", "schema_version", "manifest", "member_count", "total_bytes" ], "unevaluatedProperties": { "not": {} } }, "ObjectIdentity": { "type": "object", "properties": { "store": { "type": "string" }, "bucket": { "type": "string" }, "key": { "type": "string" }, "version_id": { "type": "string" }, "checksum": { "$ref": "#/$defs/Sha256Digest" }, "size": { "type": "integer", "minimum": 0 } }, "required": [ "store", "bucket", "key", "checksum", "size" ], "unevaluatedProperties": { "not": {} } }, "Sha256Digest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }, "DurableDescriptorRef": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "kind": { "anyOf": [ { "type": "string", "const": "resolved_source" }, { "type": "string", "const": "checkpoint" } ] }, "schema_version": { "type": "integer", "minimum": 1 }, "byte_length": { "type": "integer", "minimum": 0 }, "item_count": { "type": "integer", "minimum": 0 }, "checksum": { "$ref": "#/$defs/Sha256Digest" } }, "required": [ "id", "kind", "schema_version", "byte_length", "checksum" ], "unevaluatedProperties": { "not": {} } }, "ResultMember": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "path": { "type": "string", "minLength": 1, "maxLength": 4096, "description": "NFC-normalized relative POSIX path validated under architecture.md." }, "size": { "type": "integer", "minimum": 0 }, "object": { "$ref": "#/$defs/ObjectIdentity" } }, "required": [ "id", "path", "size", "object" ], "unevaluatedProperties": { "not": {} } }, "ResultMemberPage": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/ResultMember" } }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "items", "next_cursor" ], "unevaluatedProperties": { "not": {} } }, "ResultMemberAccess": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "pattern": "^https?://", "description": "Sensitive time-limited HTTP(S) exact-object URL." }, "expires_at": { "type": "string", "format": "date-time" } }, "required": [ "url", "expires_at" ], "unevaluatedProperties": { "not": {} } }, "Job": { "type": "object", "properties": { "resource_kind": { "type": "string", "const": "job" }, "id": { "$ref": "#/$defs/OpaqueId" }, "owner": { "$ref": "#/$defs/PrincipalId" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "minLength": 1, "maxLength": 200 }, "revision": { "type": "integer", "minimum": 1 }, "phase": { "$ref": "#/$defs/JobPhase" }, "lifecycle": { "$ref": "#/$defs/JobLifecycle" }, "source": { "$ref": "#/$defs/SourceProjection" }, "target": { "$ref": "#/$defs/Target" }, "authoritative_attempt": { "anyOf": [ { "$ref": "#/$defs/AttemptAuthority" }, { "type": "null" } ] }, "progress": { "anyOf": [ { "$ref": "#/$defs/Progress" }, { "type": "null" } ] }, "checkpoint": { "anyOf": [ { "$ref": "#/$defs/CheckpointProjection" }, { "type": "null" } ] }, "result": { "anyOf": [ { "$ref": "#/$defs/ResultDescriptor" }, { "type": "null" } ] }, "failure": { "anyOf": [ { "$ref": "#/$defs/JobFailure" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "event_cursor": { "type": "string", "minLength": 16 } }, "required": [ "resource_kind", "id", "owner", "label", "revision", "phase", "lifecycle", "source", "target", "authoritative_attempt", "progress", "checkpoint", "result", "failure", "created_at", "updated_at", "event_cursor" ], "unevaluatedProperties": { "not": {} } }, "JobLifecycle": { "type": "string", "enum": [ "visible", "soft_deleted", "hard_deleting", "hard_deleted" ] }, "SourceProjection": { "anyOf": [ { "$ref": "#/$defs/HttpSourceProjection" }, { "$ref": "#/$defs/ObjectStoreSourceProjection" }, { "$ref": "#/$defs/HuggingFaceSourceProjection" } ] }, "JobFailure": { "anyOf": [ { "$ref": "#/$defs/PermanentJobFailure" }, { "$ref": "#/$defs/RetryableJobFailure" } ] }, "JobTombstone": { "type": "object", "properties": { "resource_kind": { "type": "string", "const": "tombstone" }, "id": { "$ref": "#/$defs/OpaqueId" }, "owner": { "$ref": "#/$defs/PrincipalId" }, "target": { "$ref": "#/$defs/Target" }, "terminal_phase": { "$ref": "#/$defs/TerminalJobPhase" }, "deletion_operation_id": { "$ref": "#/$defs/OpaqueId" }, "created_at": { "type": "string", "format": "date-time" }, "hard_delete_started_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "event_cursor": { "type": "string", "minLength": 16 } }, "required": [ "resource_kind", "id", "owner", "target", "terminal_phase", "deletion_operation_id", "created_at", "hard_delete_started_at", "updated_at", "event_cursor" ], "unevaluatedProperties": { "not": {} } }, "TerminalJobPhase": { "type": "string", "enum": [ "Succeeded", "Failed", "Cancelled" ] }, "JobPage": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/JobResource" } }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "event_cursor": { "type": "string", "minLength": 16 }, "management_capabilities": { "$ref": "#/$defs/ManagementCapabilities" } }, "required": [ "items", "next_cursor", "event_cursor", "management_capabilities" ], "unevaluatedProperties": { "not": {} } }, "JobResource": { "anyOf": [ { "$ref": "#/$defs/Job" }, { "$ref": "#/$defs/JobTombstone" } ] }, "ManagementCapabilities": { "type": "object", "properties": { "revoke_execution_grants": { "type": "boolean", "description": "Current caller may administratively revoke accepted execution grants." } }, "required": [ "revoke_execution_grants" ], "unevaluatedProperties": { "not": {} } }, "AttemptRecord": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "state": { "anyOf": [ { "type": "string", "const": "AttemptAuthorized" }, { "type": "string", "const": "AttemptExecuting" }, { "type": "string", "const": "AttemptStopped" }, { "type": "string", "const": "AttemptCommitted" } ] }, "progress": { "anyOf": [ { "$ref": "#/$defs/Progress" }, { "type": "null" } ] }, "result": { "anyOf": [ { "$ref": "#/$defs/ResultDescriptor" }, { "type": "null" } ] }, "failure": { "anyOf": [ { "$ref": "#/$defs/JobFailure" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "fence", "worker_incarnation", "state", "progress", "result", "failure", "created_at", "updated_at" ], "unevaluatedProperties": { "not": {} } }, "AttemptPage": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/AttemptRecord" } }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "items", "next_cursor" ], "unevaluatedProperties": { "not": {} } }, "DeletionProblem": { "type": "object", "properties": { "class": { "anyOf": [ { "type": "string", "const": "authorization" }, { "type": "string", "const": "target_unavailable" }, { "type": "string", "const": "configuration" }, { "type": "string", "const": "internal" } ] }, "message": { "type": "string", "maxLength": 500 } }, "required": [ "class", "message" ], "unevaluatedProperties": { "not": {} } }, "DeletionOperation": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "job_id": { "$ref": "#/$defs/OpaqueId" }, "state": { "anyOf": [ { "type": "string", "const": "queued" }, { "type": "string", "const": "running" }, { "type": "string", "const": "retry_wait" }, { "type": "string", "const": "blocked" }, { "type": "string", "const": "completed" } ] }, "problem": { "anyOf": [ { "$ref": "#/$defs/DeletionProblem" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" } }, "required": [ "id", "job_id", "state", "problem", "created_at", "updated_at" ], "unevaluatedProperties": { "not": {} } }, "EventTicket": { "type": "object", "properties": { "ticket": { "$ref": "#/$defs/OpaqueId" }, "expires_at": { "type": "string", "format": "date-time" } }, "required": [ "ticket", "expires_at" ], "unevaluatedProperties": { "not": {} } }, "ApiError": { "type": "object", "properties": { "code": { "anyOf": [ { "type": "string", "const": "invalid_request" }, { "type": "string", "const": "unauthenticated" }, { "type": "string", "const": "forbidden" }, { "type": "string", "const": "not_found" }, { "type": "string", "const": "idempotency_conflict" }, { "type": "string", "const": "precondition_failed" }, { "type": "string", "const": "cursor_invalid" }, { "type": "string", "const": "cursor_expired" }, { "type": "string", "const": "rate_limited" }, { "type": "string", "const": "unavailable" }, { "type": "string", "const": "internal" } ] }, "message": { "type": "string", "maxLength": 500 }, "request_id": { "$ref": "#/$defs/OpaqueId" }, "fields": { "type": "array", "items": { "type": "object", "properties": { "pointer": { "type": "string", "maxLength": 500 }, "code": { "type": "string", "maxLength": 100 } }, "required": [ "pointer", "code" ], "unevaluatedProperties": { "not": {} } }, "maxItems": 100 } }, "required": [ "code", "message", "request_id" ], "unevaluatedProperties": { "not": {} } }, "ClaimRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "operation_id", "worker_incarnation" ], "unevaluatedProperties": { "not": {} } }, "ExecutionEnvelope": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "job_id": { "$ref": "#/$defs/OpaqueId" }, "attempt_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "source": { "$ref": "#/$defs/SourceProjection" }, "sensitive_source_ref": { "$ref": "#/$defs/OpaqueId", "description": "Opaque grant-bound reference to the complete accepted source input; credential_version identifies any pinned credential separately." }, "credential_version": { "anyOf": [ { "$ref": "#/$defs/CredentialGrantVersion" }, { "type": "null" } ] }, "resolved_source_ref": { "anyOf": [ { "$ref": "#/$defs/DurableDescriptorRef" }, { "type": "null" } ] }, "target": { "$ref": "#/$defs/Target" }, "staging_target": { "$ref": "#/$defs/StagingTarget" }, "execution_grant_ref": { "$ref": "#/$defs/OpaqueId" }, "checkpoint_ref": { "anyOf": [ { "$ref": "#/$defs/DurableDescriptorRef" }, { "type": "null" } ] } }, "required": [ "id", "job_id", "attempt_id", "fence", "worker_incarnation", "source", "sensitive_source_ref", "credential_version", "resolved_source_ref", "target", "staging_target", "execution_grant_ref", "checkpoint_ref" ], "unevaluatedProperties": { "not": {} } }, "ClaimResponse": { "type": "object", "properties": { "authority": { "$ref": "#/$defs/AttemptAuthority" }, "execution": { "$ref": "#/$defs/ExecutionEnvelope" } }, "required": [ "authority", "execution" ], "unevaluatedProperties": { "not": {} } }, "ActivationResponse": { "type": "object", "properties": { "authority": { "$ref": "#/$defs/AttemptAuthority" }, "execution": { "$ref": "#/$defs/ExecutionEnvelope" }, "lease": { "$ref": "#/$defs/LeaseProjection" } }, "required": [ "authority", "execution", "lease" ], "unevaluatedProperties": { "not": {} } }, "AttemptMutation": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "operation_id", "fence", "worker_incarnation" ], "unevaluatedProperties": { "not": {} } }, "AttemptRenewRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "operation_id", "fence", "worker_incarnation" ], "unevaluatedProperties": { "not": {} } }, "AttemptActivateRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "operation_id", "fence", "worker_incarnation" ], "unevaluatedProperties": { "not": {} } }, "AttemptStopRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" } }, "required": [ "operation_id", "fence", "worker_incarnation" ], "unevaluatedProperties": { "not": {} } }, "StagingObjectIdentity": { "type": "object", "properties": { "store": { "type": "string", "minLength": 1 }, "bucket": { "type": "string", "minLength": 1 }, "key": { "type": "string", "minLength": 1 }, "version_id": { "type": "string", "minLength": 1 } }, "required": [ "store", "bucket", "key" ], "unevaluatedProperties": { "not": {} } }, "StagingWriteIntent": { "type": "object", "properties": { "store": { "type": "string", "minLength": 1 }, "bucket": { "type": "string", "minLength": 1 }, "key": { "type": "string", "minLength": 1 } }, "required": [ "store", "bucket", "key" ], "unevaluatedProperties": { "not": {} } }, "StagingMultipartIdentity": { "type": "object", "properties": { "store": { "type": "string", "minLength": 1 }, "bucket": { "type": "string", "minLength": 1 }, "key": { "type": "string", "minLength": 1 }, "upload_id": { "type": "string", "minLength": 1 } }, "required": [ "store", "bucket", "key", "upload_id" ], "unevaluatedProperties": { "not": {} } }, "AttemptStagingObjectRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "object": { "$ref": "#/$defs/StagingObjectIdentity" }, "completed_upload_id": { "type": "string", "minLength": 1 } }, "required": [ "operation_id", "fence", "worker_incarnation", "object" ], "unevaluatedProperties": { "not": {} } }, "AttemptStagingWriteIntentRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "intent": { "$ref": "#/$defs/StagingWriteIntent" } }, "required": [ "operation_id", "fence", "worker_incarnation", "intent" ], "unevaluatedProperties": { "not": {} } }, "AttemptStagingMultipartRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "multipart": { "$ref": "#/$defs/StagingMultipartIdentity" } }, "required": [ "operation_id", "fence", "worker_incarnation", "multipart" ], "unevaluatedProperties": { "not": {} } }, "ResolvedSourceDescriptorRef": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "kind": { "type": "string", "const": "resolved_source" }, "schema_version": { "type": "integer", "minimum": 1 }, "byte_length": { "type": "integer", "minimum": 0 }, "item_count": { "type": "integer", "minimum": 0 }, "checksum": { "$ref": "#/$defs/Sha256Digest" } }, "required": [ "id", "kind", "schema_version", "byte_length", "checksum" ], "unevaluatedProperties": { "not": {} } }, "CheckpointDescriptorRef": { "type": "object", "properties": { "id": { "$ref": "#/$defs/OpaqueId" }, "kind": { "type": "string", "const": "checkpoint" }, "schema_version": { "type": "integer", "minimum": 1 }, "byte_length": { "type": "integer", "minimum": 0 }, "item_count": { "type": "integer", "minimum": 0 }, "checksum": { "$ref": "#/$defs/Sha256Digest" } }, "required": [ "id", "kind", "schema_version", "byte_length", "checksum" ], "unevaluatedProperties": { "not": {} } }, "AttemptResolvedSourceRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "resolved_source_ref": { "$ref": "#/$defs/ResolvedSourceDescriptorRef" } }, "required": [ "operation_id", "fence", "worker_incarnation", "resolved_source_ref" ], "unevaluatedProperties": { "not": {} } }, "AttemptCheckpointRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "checkpoint_ref": { "$ref": "#/$defs/CheckpointDescriptorRef" }, "resolved_source_id": { "$ref": "#/$defs/OpaqueId" }, "validated_bytes": { "type": "integer", "minimum": 0 }, "validated_members": { "type": "integer", "minimum": 0 }, "staging_multipart": { "$ref": "#/$defs/StagingMultipartIdentity" } }, "required": [ "operation_id", "fence", "worker_incarnation", "checkpoint_ref", "resolved_source_id", "validated_bytes", "validated_members" ], "unevaluatedProperties": { "not": {} } }, "AttemptProgressRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "progress": { "$ref": "#/$defs/ProgressValue" } }, "required": [ "operation_id", "fence", "worker_incarnation", "progress" ], "unevaluatedProperties": { "not": {} } }, "AttemptOutcomeRequest": { "type": "object", "properties": { "operation_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "worker_incarnation": { "$ref": "#/$defs/OpaqueId" }, "outcome": { "anyOf": [ { "type": "object", "properties": { "kind": { "type": "string", "const": "success" }, "result": { "$ref": "#/$defs/ResultDescriptor" } }, "required": [ "kind", "result" ], "unevaluatedProperties": { "not": {} } }, { "type": "object", "properties": { "kind": { "type": "string", "const": "failure" }, "failure": { "$ref": "#/$defs/AttemptRuntimeFailure" } }, "required": [ "kind", "failure" ], "unevaluatedProperties": { "not": {} } } ] } }, "required": [ "operation_id", "fence", "worker_incarnation", "outcome" ], "unevaluatedProperties": { "not": {} } }, "EventAttempt": { "type": "object", "properties": { "attempt_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 } }, "required": [ "attempt_id", "fence" ], "unevaluatedProperties": { "not": {} } }, "EventProgress": { "type": "object", "properties": { "attempt_id": { "$ref": "#/$defs/OpaqueId" }, "fence": { "type": "integer", "minimum": 1 }, "completed_bytes": { "type": "integer", "minimum": 0 }, "total_bytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "minimum": 0 }, "completed_members": { "type": "integer", "minimum": 0 }, "total_members": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "minimum": 0 } }, "required": [ "attempt_id", "fence", "completed_bytes", "completed_members" ], "unevaluatedProperties": { "not": {} } }, "EventBase": { "type": "object", "properties": { "schema_version": { "type": "number", "const": 1 }, "event_id": { "$ref": "#/$defs/OpaqueId" }, "sequence": { "type": "integer", "minimum": 1 }, "cursor": { "$ref": "#/$defs/EventCursor" }, "occurred_at": { "type": "string", "format": "date-time" } }, "required": [ "schema_version", "event_id", "sequence", "cursor", "occurred_at" ] }, "EventCursor": { "type": "string", "minLength": 16, "maxLength": 2048 }, "JobChanged": { "type": "object", "properties": { "kind": { "type": "string", "const": "job_changed" }, "job_id": { "$ref": "#/$defs/OpaqueId" }, "job_revision": { "type": "integer", "minimum": 1 }, "phase": { "$ref": "#/$defs/JobPhase" }, "lifecycle": { "$ref": "#/$defs/JobLifecycle" }, "authoritative_attempt": { "anyOf": [ { "$ref": "#/$defs/EventAttempt" }, { "type": "null" } ] }, "progress": { "anyOf": [ { "$ref": "#/$defs/EventProgress" }, { "type": "null" } ] } }, "required": [ "kind", "job_id", "job_revision", "phase", "lifecycle", "authoritative_attempt", "progress" ], "allOf": [ { "$ref": "#/$defs/EventBase" } ], "unevaluatedProperties": { "not": {} } }, "DeletionChanged": { "type": "object", "properties": { "kind": { "type": "string", "const": "deletion_changed" }, "job_id": { "$ref": "#/$defs/OpaqueId" }, "operation_id": { "$ref": "#/$defs/OpaqueId" }, "state": { "anyOf": [ { "type": "string", "const": "queued" }, { "type": "string", "const": "running" }, { "type": "string", "const": "retry_wait" }, { "type": "string", "const": "blocked" }, { "type": "string", "const": "completed" } ] } }, "required": [ "kind", "job_id", "operation_id", "state" ], "allOf": [ { "$ref": "#/$defs/EventBase" } ], "unevaluatedProperties": { "not": {} } }, "ResyncRequired": { "type": "object", "properties": { "kind": { "type": "string", "const": "resync_required" }, "reason": { "anyOf": [ { "type": "string", "const": "cursor_absent" }, { "type": "string", "const": "cursor_invalid" }, { "type": "string", "const": "cursor_expired" }, { "type": "string", "const": "authorization_changed" }, { "type": "string", "const": "history_unavailable" } ] } }, "required": [ "kind", "reason" ], "allOf": [ { "$ref": "#/$defs/EventBase" } ], "unevaluatedProperties": { "not": {} } }, "Heartbeat": { "type": "object", "properties": { "kind": { "type": "string", "const": "heartbeat" } }, "required": [ "kind" ], "allOf": [ { "$ref": "#/$defs/EventBase" } ], "unevaluatedProperties": { "not": {} } }, "SourceCredentialCreate": { "anyOf": [ { "$ref": "#/$defs/BasicAuthCredentialCreate" }, { "$ref": "#/$defs/BearerTokenCredentialCreate" }, { "$ref": "#/$defs/HttpHeadersCredentialCreate" }, { "$ref": "#/$defs/ObjectStoreCredentialCreate" }, { "$ref": "#/$defs/HuggingFaceCredentialCreate" } ] }, "EventFrame": { "oneOf": [ { "$ref": "#/$defs/JobChanged" }, { "$ref": "#/$defs/DeletionChanged" }, { "$ref": "#/$defs/ResyncRequired" }, { "$ref": "#/$defs/Heartbeat" } ] } }, "title": "Remora WebSocket frame", "$ref": "#/$defs/EventFrame" }