{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Multiplayer backend grant API","version":"0.3.0-alpha.12","description":"Request a short-lived, origin-bound Plugin Grant. The reviewed deployment endpoint is returned only after Registry validation.","license":{"name":"MIT"}},"servers":[{"url":"https://registry.al-amr.com","description":"Al-Amr Registry Runtime API"}],"paths":{"/v1/runtime/grants":{"post":{"operationId":"requestPluginGrant","summary":"Request access to Multiplayer backend component","description":"Environment and actor identity are derived from the Runtime bearer token and cannot be supplied in the request body.","security":[{"runtimeBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","additionalProperties":false,"required":["pluginId","releaseVersion","backendComponentId","scopes","context"],"properties":{"pluginId":{"type":"string","const":"plg_multiplayer"},"releaseVersion":{"type":"string","const":"0.3.0-alpha.12"},"backendComponentId":{"type":"string","const":"realtime"},"scopes":{"type":"array","minItems":1,"uniqueItems":true,"items":{"type":"string","enum":["multiplayer:join"]}},"context":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[A-Za-z0-9][A-Za-z0-9:_-]{0,95}$"}},"required":["scope"],"additionalProperties":false}}}]}}}},"responses":{"200":{"description":"A short-lived grant plus the currently reviewed backend deployment endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PluginGrantResponse"}}}},"401":{"description":"Runtime authorization is missing or expired."},"403":{"description":"Plugin installation, scope, origin, or context is not authorized."}}}}},"components":{"securitySchemes":{"runtimeBearer":{"type":"http","scheme":"bearer","bearerFormat":"short-lived Runtime access token"}},"schemas":{"PluginGrantResponse":{"type":"object","additionalProperties":false,"required":["token","tokenType","pluginId","releaseId","backendComponentId","scopes","runtimeLease","endpoint","conditions","expiresAt"],"properties":{"token":{"type":"string","description":"Short-lived signed Plugin Grant; never persist it."},"tokenType":{"type":"string","const":"PluginGrant"},"pluginId":{"type":"string","const":"plg_multiplayer"},"releaseId":{"type":"string","pattern":"^rel_"},"backendComponentId":{"type":"string","enum":["realtime"]},"scopes":{"type":"array","items":{"type":"string","enum":["multiplayer:join"]}},"runtimeLease":{"type":"object","additionalProperties":false,"required":["leaseId","leaseVersion","expiresAt"],"properties":{"leaseId":{"type":"string","pattern":"^rle_"},"leaseVersion":{"type":"integer","minimum":1},"expiresAt":{"type":"string","format":"date-time"}}},"endpoint":{"type":"object","additionalProperties":false,"required":["deploymentId","protocol","url"],"properties":{"deploymentId":{"type":"string","pattern":"^dep_"},"protocol":{"type":"string","enum":["https","websocket","webrtc-signaling"]},"url":{"type":"string","format":"uri"}}},"conditions":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"object","additionalProperties":false,"required":["type","status","reason","message","retryable"],"properties":{"type":{"type":"string"},"status":{"type":"string","enum":["True","False","Unknown"]},"reason":{"type":"string"},"message":{"type":"string"},"observedGeneration":{"type":"string"},"observedDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"lastProbeAt":{"type":"string","format":"date-time"},"lastTransitionAt":{"type":"string","format":"date-time"},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer","minimum":1,"maximum":86400},"nextAction":{"type":"string"}}}},"expiresAt":{"type":"string","format":"date-time"}}}}},"x-al-amr-plugin":{"pluginId":"plg_multiplayer","releaseVersion":"0.3.0-alpha.12","runtimeClass":"trusted_library","backendComponents":[{"id":"realtime","name":"Multiplayer realtime relay","protocol":"websocket","protocolArtifactId":"multiplayer-data-plane","capabilities":["room:membership","state:relay","interest:scope"],"grantScopes":["multiplayer:join"],"contextSchema":{"type":"object","properties":{"scope":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[A-Za-z0-9][A-Za-z0-9:_-]{0,95}$"}},"required":["scope"],"additionalProperties":false},"scopeAdmission":{"grantScope":"multiplayer.scope-admission@1.0.0","purpose":"multiplayer_admission","endpointPath":"/v1/multiplayer/scope-admission"},"limits":{"maxConcurrentSessions":1,"maxParticipantsPerContext":150,"maxMessageBytes":32768,"requestsPerMinute":2400}}],"note":"Live deployment URLs are Registry state and are deliberately absent from the immutable Plugin manifest and release document."}}