{ "openapi": "3.1.0", "info": { "title": "OZ-AGENT-003 local API", "version": "0.3.0", "description": "Persistent programmatic OZ-052 client. Loopback HTTP control plane for owned Personas, explicit, automatic and no-GEO Beacons, verified peers, Introduction decisions and encrypted private messaging. Uses the canonical English MAINSTREAM JSON. Every route except /health requires the local Bearer token. Browser Origin requests are rejected. This schema describes the implemented release; source validation applies additional canonical and cryptographic constraints." }, "servers": [ { "url": "http://127.0.0.1:8787", "description": "Default local listener; port is configurable." } ], "security": [ { "LocalBearer": [] } ], "tags": [ { "name": "System" }, { "name": "Network" }, { "name": "Catalog" }, { "name": "Personas" }, { "name": "Beacons" }, { "name": "Peers" }, { "name": "Private" }, { "name": "Events" }, { "name": "Geography" } ], "paths": { "/health": { "get": { "operationId": "liveness", "tags": [ "System" ], "summary": "Check local HTTP liveness", "description": "Unauthenticated local liveness. Host and browser-origin checks still apply. Does not establish remote network connectivity.", "responses": { "200": { "description": "Check local HTTP liveness", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "const": true }, "release": { "const": "OZ-AGENT-003" } }, "required": [ "ok", "release" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } }, "security": [] } }, "/v1/health": { "get": { "operationId": "health", "tags": [ "System" ], "summary": "Read authenticated service health", "responses": { "200": { "description": "Read authenticated service health", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "allOf": [ { "$ref": "#/components/schemas/SystemStatus" }, { "type": "object", "properties": { "ok": { "const": true } }, "required": [ "ok" ] } ] } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/system": { "get": { "operationId": "system", "tags": [ "System" ], "summary": "Read system status", "responses": { "200": { "description": "Read system status", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/SystemStatus" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/system/recover": { "post": { "operationId": "recover", "tags": [ "System" ], "summary": "Request private custody recovery on connected servers", "description": "Requires compatible advertised custody capabilities. Does not change or create server capabilities. Recovery can return an empty server list when disconnected.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } } }, "responses": { "200": { "description": "Request private custody recovery on connected servers", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "servers": { "type": "array", "items": { "type": "string" } }, "recovered": { "type": "boolean" } }, "required": [ "servers", "recovered" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/system/stop": { "post": { "operationId": "stop", "tags": [ "System" ], "summary": "Stop the local service after responding", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } } }, "responses": { "200": { "description": "Stop the local service after responding", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "stopping": { "const": true } }, "required": [ "stopping" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/schema": { "get": { "operationId": "schema", "tags": [ "System" ], "summary": "Read this OpenAPI document", "responses": { "200": { "description": "Read this OpenAPI document", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "additionalProperties": true } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/network": { "get": { "operationId": "network", "tags": [ "Network" ], "summary": "Read per-server transport state", "responses": { "200": { "description": "Read per-server transport state", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "servers": { "type": "array", "items": { "$ref": "#/components/schemas/NetworkServer" } } }, "required": [ "servers" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/network/connect": { "post": { "operationId": "connect", "tags": [ "Network" ], "summary": "Enable fresh admission and network connections", "description": "Waits for at least one connected server or a bounded startup failure. Recovery continues after an initial failure until explicitly disconnected.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } } }, "responses": { "200": { "description": "Enable fresh admission and network connections", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "servers": { "type": "array", "items": { "$ref": "#/components/schemas/NetworkServer" } } }, "required": [ "servers" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/network/disconnect": { "post": { "operationId": "disconnect", "tags": [ "Network" ], "summary": "Disconnect network transport and pause retries", "description": "Preserves local Personas, Beacons, custody queues and private history. Active Beacons renew when reconnected.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } } }, "responses": { "200": { "description": "Disconnect network transport and pause retries", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "servers": { "type": "array", "items": { "$ref": "#/components/schemas/NetworkServer" } } }, "required": [ "servers" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/catalog/status": { "get": { "operationId": "catalogStatus", "tags": [ "Catalog" ], "summary": "Read the active MAINSTREAM identity and refresh status", "responses": { "200": { "description": "Read the active MAINSTREAM identity and refresh status", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/CatalogStatus" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/catalog/search": { "get": { "operationId": "catalogSearch", "tags": [ "Catalog" ], "summary": "Search canonical Topics in MAINSTREAM", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 4096, "default": "" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 200, "default": 30 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 100000, "default": 0 } } ], "responses": { "200": { "description": "Search canonical Topics in MAINSTREAM", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Topic" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/catalog/children": { "get": { "operationId": "catalogChildren", "tags": [ "Catalog" ], "summary": "Navigate MAINSTREAM categories, groups and Topics", "parameters": [ { "name": "parentId", "in": "query", "required": false, "description": "Omit to list the top-level entrances. Editorial containers can have canonical=false.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Navigate MAINSTREAM categories, groups and Topics", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/CatalogNode" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/catalog/topics/{topicId}": { "get": { "operationId": "catalogTopic", "tags": [ "Catalog" ], "summary": "Resolve one canonical Topic or recognized alias ID", "parameters": [ { "name": "topicId", "in": "path", "required": true, "description": "URL-encoded Topic or alias ID. The result contains the canonical Topic ID.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Resolve one canonical Topic or recognized alias ID", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Topic" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/catalog/refresh": { "post": { "operationId": "catalogRefresh", "tags": [ "Catalog" ], "summary": "Refresh the configured HTTPS mainstream.json", "description": "Validates the document before activation; preserves the prior usable MAINSTREAM on fetch or validation failure. Inspect status.error and source.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } } }, "responses": { "200": { "description": "Refresh the configured HTTPS mainstream.json", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/CatalogStatus" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/personas": { "get": { "operationId": "personas", "tags": [ "Personas" ], "summary": "List owned Personas", "responses": { "200": { "description": "List owned Personas", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Persona" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "createPersona", "tags": [ "Personas" ], "summary": "Create a local Persona", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaInput" } } } }, "responses": { "201": { "description": "Create a local Persona", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Persona" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/personas/{id}": { "get": { "operationId": "persona", "tags": [ "Personas" ], "summary": "Read one Persona", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Read one Persona", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Persona" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "patch": { "operationId": "updatePersona", "tags": [ "Personas" ], "summary": "Update local Persona name or attributes", "description": "Does not automatically revise existing public Beacon disclosures or private Introduction cards.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaPatch" } } } }, "responses": { "200": { "description": "Update local Persona name or attributes", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Persona" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "operationId": "deletePersona", "tags": [ "Personas" ], "summary": "Delete a Persona and retire its participation", "description": "Removes owned private history and keys. Durable Beacon withdrawal tombstones retain the signing material needed for pending withdrawals; deletion while offline remains retired after restart.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Delete a Persona and retire its participation", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "deleted": { "const": true } }, "required": [ "id", "deleted" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/personas/{id}/export": { "post": { "operationId": "exportPersona", "tags": [ "Personas" ], "summary": "Export one passphrase-encrypted Persona backup", "description": "Use result as the backup field for import. The local storage key, installation key and API token are not included.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaExport" } } } }, "responses": { "200": { "description": "Export one passphrase-encrypted Persona backup", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/BackupEnvelope" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/personas/import": { "post": { "operationId": "importPersona", "tags": [ "Personas" ], "summary": "Restore a Persona backup into this data directory", "description": "Rejects an existing Persona ID and invalid ownership, key bindings, geometry or replay counters. Beacons restore paused. Private identity/history and pending private work are restored. Request body limit is 16 MiB.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaImport" } } } }, "responses": { "201": { "description": "Restore a Persona backup into this data directory", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/ImportedPersona" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/beacons": { "get": { "operationId": "beacons", "tags": [ "Beacons" ], "summary": "List active Beacons", "parameters": [ { "name": "personaId", "in": "query", "required": false, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } }, { "name": "includeRemoved", "in": "query", "required": false, "description": "Use true to include removed and imported paused Beacons.", "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false" } } ], "responses": { "200": { "description": "List active Beacons", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Beacon" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "createBeacon", "tags": [ "Beacons" ], "summary": "Create canonical Topic participation with explicit, automatic or no geography", "description": "Persists intent before network activity. HTTP 201 is not a remote delivery receipt. Inspect Beacon status and coverage.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BeaconCreate" } } } }, "responses": { "201": { "description": "Create canonical Topic participation in an explicit geographic area", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Beacon" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/beacons/{id}": { "get": { "operationId": "beacon", "tags": [ "Beacons" ], "summary": "Read a Beacon and per-server publication coverage", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Read a Beacon and per-server publication coverage", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Beacon" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "patch": { "operationId": "updateBeacon", "tags": [ "Beacons" ], "summary": "Revise participation or geography", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BeaconPatch" } } } }, "responses": { "200": { "description": "Revise participation or geography", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Beacon" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "delete": { "operationId": "removeBeacon", "tags": [ "Beacons" ], "summary": "Retire a Beacon and queue geographic withdrawals", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Retire a Beacon and queue geographic withdrawals", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Beacon" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/beacons/{id}/resume": { "post": { "operationId": "resumeBeacon", "tags": [ "Beacons" ], "summary": "Explicitly resume an imported paused Beacon", "description": "Only an inactive restored Beacon can be resumed. Ordinary removed Beacons cannot be resumed by this route.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmptyBody" } } } }, "responses": { "200": { "description": "Explicitly resume an imported paused Beacon", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Beacon" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/peers": { "get": { "operationId": "peers", "tags": [ "Peers" ], "summary": "List verified peers authorized by this Persona participation", "parameters": [ { "name": "personaId", "in": "query", "required": true, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } }, { "name": "topicId", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/TopicId" } }, { "name": "includeWithdrawn", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "true", "false" ], "default": "false" } } ], "responses": { "200": { "description": "List verified peers authorized by this Persona participation", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Peer" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/peers/{id}": { "get": { "operationId": "peer", "tags": [ "Peers" ], "summary": "Read one currently authorized peer", "description": "Returns 409 if the peer has left the authorized Beacon scope or has withdrawn. Authorized historical presence can be offline.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } }, { "name": "personaId", "in": "query", "required": true, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Read one currently authorized peer", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Peer" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/introductions": { "get": { "operationId": "introductions", "tags": [ "Private" ], "summary": "List this Persona Introduction requests", "parameters": [ { "name": "personaId", "in": "query", "required": true, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "List this Persona Introduction requests", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Introduction" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "createIntroduction", "tags": [ "Private" ], "summary": "Queue an explicit Introduction card to an authorized peer", "description": "No implicit card fields or automatic acceptance. The peerId must be authorized for this Persona. HTTP 202 indicates queued local work, not peer acceptance or delivery.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IntroductionCreate" } } } }, "responses": { "202": { "description": "Queue an explicit Introduction card to an authorized peer", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Introduction" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/introductions/{id}": { "get": { "operationId": "introduction", "tags": [ "Private" ], "summary": "Read one Persona-scoped Introduction", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } }, { "name": "personaId", "in": "query", "required": true, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Read one Persona-scoped Introduction", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "anyOf": [ { "$ref": "#/components/schemas/Introduction" }, { "type": "null" } ] } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/introductions/{id}/accept": { "post": { "operationId": "acceptIntroduction", "tags": [ "Private" ], "summary": "Accept a received pending Introduction with an explicit response card", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IntroductionAccept" } } } }, "responses": { "202": { "description": "Accept a received pending Introduction with an explicit response card", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Introduction" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/introductions/{id}/decline": { "post": { "operationId": "declineIntroduction", "tags": [ "Private" ], "summary": "Decline a received pending Introduction", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaScope" } } } }, "responses": { "202": { "description": "Decline a received pending Introduction", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Introduction" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/introductions/{id}/cancel": { "post": { "operationId": "cancelIntroduction", "tags": [ "Private" ], "summary": "Request cancellation of a sent pending Introduction", "description": "cancelRequested can be true while status remains pending until the protocol confirms the outcome.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonaScope" } } } }, "responses": { "202": { "description": "Request cancellation of a sent pending Introduction", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Introduction" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/conversations": { "get": { "operationId": "conversations", "tags": [ "Private" ], "summary": "List this Persona accepted conversations", "parameters": [ { "name": "personaId", "in": "query", "required": true, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "List this Persona accepted conversations", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Conversation" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/conversations/{id}/messages": { "get": { "operationId": "messages", "tags": [ "Private" ], "summary": "List messages in an owned conversation", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } }, { "name": "personaId", "in": "query", "required": true, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "List messages in an owned conversation", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/Message" } } }, "required": [ "items" ], "additionalProperties": false } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "sendMessage", "tags": [ "Private" ], "summary": "Queue an encrypted message in an accepted conversation", "description": "The recipient must have accepted the Introduction. Recipient receipt changes delivery to delivered; broker acknowledgement or custody alone is not recipient receipt.", "parameters": [ { "name": "id", "in": "path", "required": true, "description": "Resource identifier.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, "responses": { "202": { "description": "Queue an encrypted message in an accepted conversation", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/Message" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/events": { "get": { "operationId": "events", "tags": [ "Events" ], "summary": "Read durable events or follow a server-sent event stream", "description": "Unlike ordinary routes, JSON is an unwrapped {events,cursor,oldestAvailable}. Retains the latest 2,000 events. A nonzero cursor older than the retained window returns 410 EVENT_CURSOR_EXPIRED. stream=1 emits SSE with id, event and JSON data; reconnect with after explicitly. Last-Event-ID is not consumed. Persona-scoped streams also include system events.", "parameters": [ { "name": "after", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "default": 0 } }, { "name": "personaId", "in": "query", "required": false, "description": "Explicit owning Persona.", "schema": { "type": "string", "format": "uuid" } }, { "name": "stream", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "0", "1" ], "default": "0" } } ], "responses": { "200": { "description": "Read durable events or follow a server-sent event stream", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EventPage" } }, "text/event-stream": { "schema": { "type": "string" }, "example": "id: 42\nevent: message.received\ndata: {\"id\":42,\"type\":\"message.received\",\"at\":1796000000000,\"personaId\":\"00000000-0000-4000-8000-000000000001\"}\n\n" } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/v1/geo": { "get": { "operationId": "geoStatus", "tags": [ "Geography" ], "summary": "Read bootstrap state, approximate geography and four automatic Pins", "responses": { "200": { "description": "Read bootstrap state, approximate geography and four automatic Pins", "headers": { "x-request-id": { "schema": { "type": "string", "format": "uuid" }, "description": "Correlation ID for this HTTP request." } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/GeoStatus" } }, "required": [ "result" ], "additionalProperties": false } } } }, "default": { "description": "Operation rejected. Inspect error.code and error.message. HTTP errors use this envelope.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } } }, "components": { "securitySchemes": { "LocalBearer": { "type": "http", "scheme": "bearer", "bearerFormat": "64 lowercase hex characters", "description": "Read api-token from the selected private data directory. The CLI reads it automatically." } }, "schemas": { "Error": { "type": "object", "properties": { "error": { "type": "object", "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "details": {} }, "required": [ "code", "message" ], "additionalProperties": false }, "requestId": { "type": "string", "format": "uuid" } }, "required": [ "error", "requestId" ], "additionalProperties": false }, "EmptyBody": { "type": "object", "properties": {}, "additionalProperties": false, "description": "Send an empty JSON object for action routes." }, "TopicId": { "type": "string", "description": "Canonical MAINSTREAM Topic ID. Resolve with catalog search or navigation.", "pattern": "^(?:oz|act|l2):[a-z0-9][a-z0-9:._/-]{0,190}$", "maxLength": 192 }, "Role": { "type": "string", "enum": [ "looking-for", "seek-help", "answers", "offering", "offer-help", "expertise", "expressing", "opinions", "experiences", "exploring", "learning", "debating", "connecting", "companionship", "networking", "creating", "collaborating", "organizing" ] }, "Timestamp": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "Traits": { "type": "object", "properties": { "relationship": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true }, "languages": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true }, "occupation": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true }, "capabilities": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true } }, "additionalProperties": false, "description": "Existing CLIENT-082 disclosure contract. Values must be canonical supported trait IDs. Present arrays are nonempty; combinations are validated by the inherited source validator.", "minProperties": 1 }, "Badge": { "type": "object", "properties": { "topic": { "$ref": "#/components/schemas/TopicId" }, "title": { "type": "string", "description": "Trimmed nonempty text, at most 512 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 512, "x-maxUtf8Bytes": 512 }, "outcome": { "type": "string", "description": "Trimmed nonempty text, at most 256 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 256, "x-maxUtf8Bytes": 256 } }, "required": [ "topic", "title", "outcome" ], "additionalProperties": false }, "Expression": { "type": "object", "properties": { "name": { "type": "string", "description": "Trimmed nonempty text, at most 256 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 256, "x-maxUtf8Bytes": 256 }, "words": { "type": "string", "description": "Trimmed nonempty text, at most 2048 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 2048, "x-maxUtf8Bytes": 2048 }, "gender": { "type": "string", "description": "Trimmed nonempty text, at most 128 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 128, "x-maxUtf8Bytes": 128 }, "age": { "type": "string", "description": "Trimmed nonempty text, at most 64 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 64, "x-maxUtf8Bytes": 64 }, "traits": { "$ref": "#/components/schemas/Traits" }, "badges": { "type": "array", "items": { "$ref": "#/components/schemas/Badge" }, "minItems": 1, "maxItems": 1 }, "personaBadges": { "type": "array", "items": { "$ref": "#/components/schemas/Badge" }, "minItems": 1, "maxItems": 1024 }, "iam": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 64, "uniqueItems": true }, "want": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 64, "uniqueItems": true }, "emojis": { "type": "array", "items": { "type": "string", "enum": [ "👠", "🔥", "😈", "🌹", "🎲", "🎭", "🥊", "🫶", "💬", "🍊", "🤝", "✨" ] }, "minItems": 1, "maxItems": 5, "uniqueItems": true } }, "additionalProperties": false, "description": "Public Beacon disclosure. The exact authored CLIENT-082 expression validator also checks gender/age representation, canonical moods/intentions, trait values and mutually incompatible relationships. Empty expression objects are invalid. Persona badges require a disclosed name; a Topic badge must bind the exact Beacon Topic.", "minProperties": 1 }, "PersonaAttributes": { "type": "object", "properties": { "name": { "type": "string", "description": "Trimmed nonempty text, at most 256 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 256, "x-maxUtf8Bytes": 256 }, "words": { "type": "string", "description": "Trimmed nonempty text, at most 2048 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 2048, "x-maxUtf8Bytes": 2048 }, "gender": { "type": "string", "description": "Trimmed nonempty text, at most 128 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 128, "x-maxUtf8Bytes": 128 }, "age": { "type": "string", "description": "Trimmed nonempty text, at most 64 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 64, "x-maxUtf8Bytes": 64 }, "traits": { "$ref": "#/components/schemas/Traits" }, "badges": { "type": "array", "items": { "$ref": "#/components/schemas/Badge" }, "minItems": 1, "maxItems": 1 }, "personaBadges": { "type": "array", "items": { "$ref": "#/components/schemas/Badge" }, "minItems": 1, "maxItems": 1024 } }, "additionalProperties": false, "description": "Local Persona attributes. Empty is allowed. The stored attributes are not automatically copied into a Beacon or private card. Nonempty objects use the inherited expression validator." }, "PersonaInput": { "type": "object", "properties": { "name": { "type": "string", "description": "Trimmed nonempty text, at most 256 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 256, "x-maxUtf8Bytes": 256 }, "attributes": { "$ref": "#/components/schemas/PersonaAttributes" } }, "required": [ "name" ], "additionalProperties": false }, "PersonaPatch": { "type": "object", "properties": { "name": { "type": "string", "description": "Trimmed nonempty text, at most 256 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 256, "x-maxUtf8Bytes": 256 }, "attributes": { "$ref": "#/components/schemas/PersonaAttributes" } }, "additionalProperties": false }, "Persona": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "attributes": { "$ref": "#/components/schemas/PersonaAttributes" }, "createdAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "updatedAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 } }, "required": [ "id", "name", "attributes", "createdAt", "updatedAt" ], "additionalProperties": false }, "Participation": { "type": "object", "properties": { "mode": { "type": "string", "enum": [ "VIRTUAL", "IRL" ], "default": "VIRTUAL" }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" }, "maxItems": 18, "uniqueItems": true, "default": [] }, "relevants": { "type": "array", "items": { "type": "string", "description": "Trimmed nonempty text, at most 208 UTF-8 bytes; the runtime enforces byte length and rejects control characters.", "minLength": 1, "maxLength": 208, "x-maxUtf8Bytes": 208 }, "uniqueItems": true, "default": [] }, "expression": { "$ref": "#/components/schemas/Expression" } }, "additionalProperties": false, "description": "Only explicitly supplied fields are disclosed. Omitted mode, roles and relevants become VIRTUAL, [] and []. PATCH replaces the participation object; it does not deep merge." }, "BeaconCreate": { "type": "object", "properties": { "personaId": { "type": "string", "format": "uuid" }, "topicId": { "$ref": "#/components/schemas/TopicId" }, "latitude": { "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "minimum": -180, "maximum": 180 }, "precision": { "type": "integer", "minimum": 3, "maximum": 6 }, "participation": { "$ref": "#/components/schemas/Participation" }, "grouped": { "type": "boolean", "default": true }, "geoMode": { "type": "string", "enum": [ "explicit", "auto", "none" ], "description": "Explicit coordinates; automatic four-Pin plan with 00000 fallback; or permanent no-location shard. Omit to infer from coordinates on creation, or preserve existing mode on a disclosure-only patch." } }, "required": [ "personaId", "topicId", "participation" ], "additionalProperties": false, "description": "Creates durable intent. All three coordinate fields are required for explicit geography. Omit all three for auto, or specify geoMode none for the exact reserved shard. Coordinates must not accompany auto or none.", "allOf": [ { "if": { "anyOf": [ { "required": [ "geoMode" ], "properties": { "geoMode": { "const": "explicit" } } }, { "anyOf": [ { "required": [ "latitude" ] }, { "required": [ "longitude" ] }, { "required": [ "precision" ] } ] } ] }, "then": { "required": [ "latitude", "longitude", "precision" ], "properties": { "geoMode": { "const": "explicit" } } } }, { "if": { "required": [ "geoMode" ], "properties": { "geoMode": { "enum": [ "auto", "none" ] } } }, "then": { "not": { "anyOf": [ { "required": [ "latitude" ] }, { "required": [ "longitude" ] }, { "required": [ "precision" ] } ] } } } ] }, "BeaconPatch": { "type": "object", "properties": { "latitude": { "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "minimum": -180, "maximum": 180 }, "precision": { "type": "integer", "minimum": 3, "maximum": 6 }, "participation": { "$ref": "#/components/schemas/Participation" }, "grouped": { "type": "boolean" }, "geoMode": { "type": "string", "enum": [ "explicit", "auto", "none" ], "description": "Explicit coordinates; automatic four-Pin plan with 00000 fallback; or permanent no-location shard. Omit to infer from coordinates on creation, or preserve existing mode on a disclosure-only patch." } }, "additionalProperties": false, "description": "Updates the existing owned Beacon. Persona and Topic ownership cannot be changed. Each update advances replay revision and withdraws superseded geographic paths. Use geoMode auto or none without coordinates. Explicit changes may retain existing numeric coordinates; switching from auto or none to explicit requires all three coordinates.", "allOf": [ { "if": { "required": [ "geoMode" ], "properties": { "geoMode": { "enum": [ "auto", "none" ] } } }, "then": { "not": { "anyOf": [ { "required": [ "latitude" ] }, { "required": [ "longitude" ] }, { "required": [ "precision" ] } ] } } } ] }, "Bounds": { "type": "object", "properties": { "south": { "type": "number" }, "west": { "type": "number" }, "north": { "type": "number" }, "east": { "type": "number" } }, "required": [ "south", "west", "north", "east" ], "additionalProperties": false }, "Geography": { "oneOf": [ { "$ref": "#/components/schemas/GeographicCell" }, { "type": "object", "properties": { "mode": { "enum": [ "auto", "none" ] }, "reserved": { "const": true }, "geohash": { "const": "00000" }, "precision": { "const": 5 }, "geohashes": { "const": [ "00000" ] }, "center": { "type": "null" }, "bounds": { "type": "null" } }, "required": [ "mode", "reserved", "geohash", "precision", "geohashes", "center", "bounds" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "const": "auto" }, "reserved": { "const": false }, "geohash": { "type": "string", "pattern": "^[0-9bcdefghjkmnpqrstuvwxyz]{3}$" }, "precision": { "const": 3 }, "geohashes": { "type": "array", "items": { "type": "string", "pattern": "^[0-9bcdefghjkmnpqrstuvwxyz]{3}$" }, "minItems": 4, "maxItems": 4, "uniqueItems": true }, "cells": { "type": "array", "items": { "$ref": "#/components/schemas/GeographicCell" }, "minItems": 4, "maxItems": 4 }, "center": { "type": "null" }, "bounds": { "type": "null" } }, "required": [ "mode", "reserved", "geohash", "precision", "geohashes", "cells", "center", "bounds" ], "additionalProperties": false } ] }, "BeaconTopic": { "type": "object", "properties": { "source": { "const": "semantic" }, "key": { "$ref": "#/components/schemas/TopicId" }, "hash": { "type": "string", "pattern": "^[a-f0-9]{16}$" }, "label": { "type": "string" } }, "required": [ "source", "key", "hash", "label" ], "additionalProperties": false }, "Coverage": { "type": "object", "properties": { "server": { "type": "string" }, "paths": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "sent": { "type": "boolean" }, "until": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 } }, "required": [ "path", "sent", "until" ], "additionalProperties": false } } }, "required": [ "server", "paths" ], "additionalProperties": false }, "Beacon": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "personaId": { "type": "string", "format": "uuid" }, "topic": { "$ref": "#/components/schemas/BeaconTopic" }, "latitude": { "type": [ "number", "null" ] }, "longitude": { "type": [ "number", "null" ] }, "precision": { "type": "integer" }, "geohash": { "type": "string" }, "participation": { "$ref": "#/components/schemas/Participation" }, "grouped": { "type": "boolean" }, "token": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "publicKey": { "type": "string", "pattern": "^04[a-f0-9]{128}$" }, "revision": { "type": "integer" }, "sequence": { "type": "integer" }, "createdAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "updatedAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "intended": { "type": "boolean" }, "removedAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "restored": { "type": "boolean" }, "status": { "type": "string", "enum": [ "published", "partial", "pending", "waiting-for-network", "removed" ] }, "coverage": { "type": "array", "items": { "$ref": "#/components/schemas/Coverage" } }, "geography": { "$ref": "#/components/schemas/Geography" }, "geoMode": { "type": "string", "enum": [ "explicit", "auto", "none" ], "description": "Explicit coordinates; automatic four-Pin plan with 00000 fallback; or permanent no-location shard. Omit to infer from coordinates on creation, or preserve existing mode on a disclosure-only patch." }, "geohashes": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "personaId", "topic", "geohash", "participation", "intended", "token", "publicKey", "status", "coverage" ], "additionalProperties": true, "description": "The API omits signing secrets, withdrawal queues and internal publication state. Imported paused Beacons have intended=false and restored=true; status is removed until explicitly resumed." }, "Topic": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/TopicId" }, "key": { "$ref": "#/components/schemas/TopicId" }, "source": { "const": "semantic" }, "hash": { "type": "string" }, "kind": { "const": "topic" }, "canonical": { "const": true }, "topicId": { "$ref": "#/components/schemas/TopicId" }, "title": { "type": "string" }, "label": { "type": "string" }, "description": { "type": "string" }, "path": { "type": "string" }, "sourceParent": { "type": [ "string", "null" ] }, "type": {}, "group": { "type": "string" }, "adult": { "type": "boolean" }, "disposition": {}, "treat": {}, "retiredEditorial": { "type": "boolean" }, "aliases": { "type": "array", "items": { "type": "string" } }, "aliasIds": { "type": "array", "items": { "type": "string" } }, "keywords": { "type": "array", "items": { "type": "string" } }, "roles": { "type": "array", "items": { "type": "string" } }, "facets": { "type": "object", "additionalProperties": true } }, "required": [ "id", "key", "hash", "canonical", "topicId", "title", "label" ], "additionalProperties": true }, "CatalogNode": { "type": "object", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "label": { "type": "string" }, "kind": { "type": "string", "enum": [ "category", "group", "branch", "topic" ] }, "canonical": { "type": "boolean" }, "topicId": { "type": [ "string", "null" ] }, "parentId": { "type": "string" }, "childIds": { "type": "array", "items": { "type": "string" } }, "childCount": { "type": "integer" } }, "required": [ "id", "canonical" ], "additionalProperties": true, "description": "Navigation nodes can be editorial containers. Only a canonical Topic ID returned in topicId or catalog search is valid for Beacon creation." }, "CatalogStatus": { "type": "object", "properties": { "ready": { "type": "boolean" }, "url": { "type": "string", "format": "uri" }, "source": { "type": [ "string", "null" ] }, "etag": { "type": [ "string", "null" ] }, "lastModified": { "type": [ "string", "null" ] }, "fetchedAt": { "type": [ "integer", "null" ] }, "checkedAt": { "type": [ "integer", "null" ] }, "error": { "type": [ "string", "null" ] }, "cacheError": { "type": [ "string", "null" ] }, "version": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "topicCount": { "type": "integer" }, "entranceCount": { "type": "integer" }, "sha256": { "type": [ "string", "null" ] }, "release": { "type": [ "string", "null" ] } }, "required": [ "ready", "url", "topicCount", "entranceCount" ], "additionalProperties": true }, "Subscription": { "type": "object", "properties": { "topic": { "type": "string" }, "qos": { "type": "integer", "enum": [ 0, 1 ] }, "granted": { "type": [ "integer", "null" ] }, "status": { "type": "string", "enum": [ "acknowledged", "pending", "rejected" ] }, "owners": { "type": "array", "items": { "type": "string" } } }, "required": [ "topic", "qos", "status" ], "additionalProperties": true }, "NetworkServer": { "type": "object", "properties": { "id": { "type": "string" }, "endpoint": { "type": "string" }, "state": { "type": "string", "enum": [ "STOPPED", "CONNECTING", "CONNECTED", "RESTORING", "READY", "UNAVAILABLE", "RECONNECTING", "AUTH_FAILED", "UPDATE_REQUIRED" ] }, "generation": { "type": "integer" }, "lastConnection": { "type": [ "integer", "null" ] }, "subscriptions": { "type": "array", "items": { "$ref": "#/components/schemas/Subscription" } }, "lastError": {}, "retryAt": { "type": [ "integer", "null" ] }, "healthState": { "type": "string" } }, "required": [ "id", "state", "generation", "subscriptions" ], "additionalProperties": true }, "SystemStatus": { "type": "object", "properties": { "release": { "const": "OZ-AGENT-003" }, "version": { "const": "0.3.0" }, "protocol": { "const": "OZ-052" }, "startedAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "uptimeSeconds": { "type": "integer" }, "network": { "type": "array", "items": { "$ref": "#/components/schemas/NetworkServer" } }, "connected": { "type": "boolean" }, "catalog": { "$ref": "#/components/schemas/CatalogStatus" }, "personas": { "type": "integer" }, "beacons": { "type": "integer" }, "memory": { "type": "object", "additionalProperties": true }, "lastError": {}, "capabilities": { "type": "object", "additionalProperties": true }, "eventCursor": { "type": "integer" }, "geo": { "$ref": "#/components/schemas/GeoStatus" } }, "required": [ "release", "protocol", "network", "connected", "catalog", "personas", "beacons", "capabilities", "eventCursor", "geo" ], "additionalProperties": true, "description": "Local readiness and remote connectivity are separate. connected does not imply that every requested subscription or Beacon has completed." }, "SignedParticipation": { "type": "object", "properties": { "v": { "const": "oz-live-1" }, "kind": { "const": "participant" }, "action": { "type": "string", "enum": [ "upsert", "withdraw" ] }, "source": { "type": "string", "enum": [ "semantic", "text" ] }, "key": { "type": "string" }, "hash": { "type": "string" }, "prefix": { "type": "string" }, "token": { "type": "string" }, "publicKey": { "type": "string" }, "revision": { "type": "integer" }, "sequence": { "type": "integer" }, "at": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "until": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "mode": { "type": "string", "enum": [ "VIRTUAL", "IRL" ] }, "roles": { "type": "array", "items": { "$ref": "#/components/schemas/Role" } }, "relevants": { "type": "array", "items": { "type": "string" } }, "expression": { "$ref": "#/components/schemas/Expression" }, "intro": { "type": "object", "additionalProperties": true }, "sig": { "type": "string" } }, "required": [ "v", "kind", "action", "key", "token", "publicKey", "revision", "sequence", "at", "until" ], "additionalProperties": true, "description": "Verified signed network data. This is received protocol content; it is not an API publication request." }, "PeerSource": { "type": "object", "properties": { "event": { "$ref": "#/components/schemas/SignedParticipation" }, "server": { "type": "string" }, "seenAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "historical": { "type": "boolean" }, "expiry": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "generation": { "type": "integer" }, "connection": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 } }, "required": [ "event", "server", "seenAt", "historical" ], "additionalProperties": true }, "Peer": { "type": "object", "properties": { "id": { "type": "string" }, "personaId": { "type": "string", "format": "uuid" }, "peerKey": { "type": "string" }, "groupId": { "type": "string" }, "event": { "$ref": "#/components/schemas/SignedParticipation" }, "path": { "type": "string" }, "server": { "type": "string" }, "sources": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/PeerSource" } }, "withdrawn": { "type": "boolean" }, "firstSeen": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "lastSeen": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "authorized": { "type": "boolean" }, "online": { "type": "boolean" }, "current": { "type": "boolean" } }, "required": [ "id", "personaId", "event", "path", "server", "authorized", "online", "current" ], "additionalProperties": true, "description": "Scoped to the explicit owning Persona. Historical memory can be authorized while online/current are false. A private Introduction still requires the supplied peerId and an explicit card." }, "CardFields": { "type": "object", "properties": { "gender": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "age": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "relationship": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true }, "languages": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true }, "occupation": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true }, "capabilities": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 32, "uniqueItems": true } }, "additionalProperties": false }, "CardContext": { "type": "object", "properties": { "id": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 512 }, "label": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 512 } }, "required": [ "id", "label" ], "additionalProperties": false }, "CardReference": { "type": "object", "properties": { "kind": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 32 }, "id": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 512 }, "label": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 1024 }, "value": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 512 } }, "required": [ "kind", "label" ], "additionalProperties": false }, "IntroductionCard": { "type": "object", "properties": { "presentation": { "type": "string", "enum": [ "anonymous", "persona" ] }, "name": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "fields": { "$ref": "#/components/schemas/CardFields" }, "interests": { "type": "array", "items": { "$ref": "#/components/schemas/CardContext" }, "maxItems": 1000 }, "spots": { "type": "array", "items": { "$ref": "#/components/schemas/CardContext" }, "maxItems": 1000 }, "roles": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 64, "uniqueItems": true }, "role": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "moods": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 3, "uniqueItems": true }, "intentions": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 3, "uniqueItems": true }, "emojis": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 256 }, "maxItems": 5, "uniqueItems": true }, "reference": { "$ref": "#/components/schemas/CardReference" } }, "required": [ "presentation" ], "additionalProperties": false, "description": "Explicit private disclosure. anonymous requires name to be absent; persona requires name to equal the owning Persona name. Omitted moods, intentions and emojis normalize to empty arrays. Context IDs must be unique. Serialized card is bounded to 100,000 characters.", "allOf": [ { "if": { "properties": { "presentation": { "const": "anonymous" } }, "required": [ "presentation" ] }, "then": { "not": { "required": [ "name" ] } }, "else": { "required": [ "name" ] } } ] }, "IntroductionCreate": { "type": "object", "properties": { "personaId": { "type": "string", "format": "uuid" }, "peerId": { "type": "string" }, "card": { "$ref": "#/components/schemas/IntroductionCard" } }, "required": [ "personaId", "peerId", "card" ], "additionalProperties": false }, "IntroductionAccept": { "type": "object", "properties": { "personaId": { "type": "string", "format": "uuid" }, "card": { "$ref": "#/components/schemas/IntroductionCard" } }, "required": [ "personaId", "card" ], "additionalProperties": false }, "PersonaScope": { "type": "object", "properties": { "personaId": { "type": "string", "format": "uuid" } }, "required": [ "personaId" ], "additionalProperties": false }, "Introduction": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "peerKey": { "type": "string" }, "peerName": { "type": "string" }, "direction": { "type": "string", "enum": [ "sent", "received" ] }, "status": { "type": "string", "enum": [ "pending", "accepted", "declined", "canceled", "unavailable", "removed" ] }, "delivery": { "type": "string", "description": "Delivery state, independent of Introduction acceptance." }, "card": { "$ref": "#/components/schemas/IntroductionCard" }, "responseCard": { "$ref": "#/components/schemas/IntroductionCard" }, "origin": { "type": "object", "properties": { "key": { "type": "string" }, "token": { "type": "string" }, "revision": { "type": "integer" } }, "required": [ "key", "token", "revision" ], "additionalProperties": false }, "at": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "conversationId": { "type": "string", "format": "uuid" }, "cancelRequested": { "type": "boolean" }, "offerId": { "type": "string", "format": "uuid" }, "remoteSeq": { "type": "integer" } }, "required": [ "id", "direction", "status", "delivery", "at" ], "additionalProperties": true, "description": "Internal local/remote key routes are omitted. GET of an unknown Introduction in an existing Persona returns null." }, "MessageFormat": { "type": "object", "properties": { "bold": { "type": "boolean" }, "italic": { "type": "boolean" }, "font": { "type": "string", "enum": [ "sans", "serif", "mono" ] }, "color": { "type": "string", "enum": [ "default", "gold", "blue", "green" ] } }, "additionalProperties": false }, "MessageReply": { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "message", "topic", "item", "mood", "intention", "emoji" ] }, "id": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 512 }, "label": { "type": "string", "maxLength": 16384 }, "side": { "type": "string", "enum": [ "mine", "peer" ] }, "revision": { "type": "integer" } }, "required": [ "kind", "id", "label" ], "additionalProperties": false }, "TopicReference": { "type": "object", "properties": { "source": { "type": "string", "enum": [ "text", "semantic" ] }, "key": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 192 }, "placement": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 1024 }, "trail": { "type": "array", "items": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 512 }, "maxItems": 16 } }, "required": [ "source", "key", "trail" ], "additionalProperties": false, "description": "Semantic keys use the canonical OZ ID grammar. Text keys use normalized NFKC lowercase collapsed whitespace, empty trail, and no placement." }, "TextMessage": { "type": "object", "properties": { "text": { "type": "string", "maxLength": 16384 }, "url": { "type": "string", "format": "uri", "maxLength": 4096, "pattern": "^[hH][tT][tT][pP][sS]?://" }, "format": { "$ref": "#/components/schemas/MessageFormat" }, "reply": { "$ref": "#/components/schemas/MessageReply" } }, "required": [ "text" ], "additionalProperties": false, "description": "text must contain non-whitespace content unless a valid HTTP(S) URL without embedded credentials is supplied. Control and bidirectional control characters are rejected." }, "TopicMessage": { "type": "object", "properties": { "text": { "type": "string", "description": "Trimmed, nonempty text; control characters and bidirectional control characters are rejected.", "minLength": 1, "maxLength": 192 }, "topic": { "$ref": "#/components/schemas/TopicReference" } }, "required": [ "text", "topic" ], "additionalProperties": false }, "MessageInput": { "oneOf": [ { "type": "string", "minLength": 1, "maxLength": 16384 }, { "$ref": "#/components/schemas/TextMessage" }, { "$ref": "#/components/schemas/TopicMessage" } ] }, "MessageCreate": { "type": "object", "properties": { "personaId": { "type": "string", "format": "uuid" }, "message": { "$ref": "#/components/schemas/MessageInput" } }, "required": [ "personaId", "message" ], "additionalProperties": false }, "Message": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "text": { "type": "string" }, "url": { "type": "string" }, "format": { "$ref": "#/components/schemas/MessageFormat" }, "reply": { "$ref": "#/components/schemas/MessageReply" }, "topic": { "$ref": "#/components/schemas/TopicReference" }, "mine": { "type": "boolean" }, "at": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "delivery": { "type": "string" }, "acknowledged": { "type": "boolean" } }, "required": [ "id", "text", "mine", "at", "delivery" ], "additionalProperties": true }, "Conversation": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "requestId": { "type": "string", "format": "uuid" }, "peerKey": { "type": "string" }, "peerName": { "type": "string" }, "active": { "type": "boolean" }, "ownCard": { "$ref": "#/components/schemas/IntroductionCard" }, "peerCard": { "$ref": "#/components/schemas/IntroductionCard" }, "at": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "messageCount": { "type": "integer" }, "lastMessageAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "peerContexts": { "type": "object", "additionalProperties": true }, "peerHud": { "type": "object", "additionalProperties": true }, "peerHudSeq": { "type": "integer" } }, "required": [ "id", "requestId", "active", "messageCount" ], "additionalProperties": true, "description": "A conversation exists only after an explicit accepted Introduction. Message bodies are returned by the separate messages endpoint." }, "BackupEnvelope": { "type": "object", "properties": { "format": { "const": "oz-agent-persona-backup-v1" }, "kdf": { "const": "scrypt-32768-8-1" }, "salt": { "type": "string", "contentEncoding": "base64" }, "iv": { "type": "string", "contentEncoding": "base64" }, "tag": { "type": "string", "contentEncoding": "base64" }, "body": { "type": "string", "contentEncoding": "base64" } }, "required": [ "format", "kdf", "salt", "iv", "tag", "body" ], "additionalProperties": false, "description": "Passphrase-encrypted AES-256-GCM envelope. Stores the selected Persona and owned Beacon/private identities and history. Does not export the installation identity or API token." }, "PersonaExport": { "type": "object", "properties": { "passphrase": { "type": "string", "minLength": 12, "maxLength": 1024, "writeOnly": true } }, "required": [ "passphrase" ], "additionalProperties": false }, "PersonaImport": { "type": "object", "properties": { "backup": { "$ref": "#/components/schemas/BackupEnvelope" }, "passphrase": { "type": "string", "maxLength": 1024, "writeOnly": true } }, "required": [ "backup", "passphrase" ], "additionalProperties": false }, "ImportedPersona": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "attributes": { "$ref": "#/components/schemas/PersonaAttributes" }, "createdAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "updatedAt": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "restoredBeacons": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "participation": { "const": "paused" } }, "required": [ "id", "name", "attributes", "createdAt", "updatedAt", "restoredBeacons", "participation" ], "additionalProperties": false }, "Event": { "type": "object", "properties": { "id": { "type": "integer", "description": "Monotonic durable event cursor.", "minimum": 1 }, "at": { "type": "integer", "description": "Milliseconds since the Unix epoch.", "minimum": 0 }, "type": { "type": "string" }, "personaId": { "type": "string", "format": "uuid" }, "beaconId": { "type": "string", "format": "uuid" }, "peerId": { "type": "string" }, "requestId": { "type": "string", "format": "uuid" }, "conversationId": { "type": "string", "format": "uuid" }, "eventId": { "type": "string", "format": "uuid" }, "server": { "type": "string" }, "state": { "type": "string" } }, "required": [ "id", "at", "type" ], "additionalProperties": true, "description": "Events are typed metadata; fields vary by type. Fetch the corresponding object for authoritative current state." }, "EventPage": { "type": "object", "properties": { "events": { "type": "array", "items": { "$ref": "#/components/schemas/Event" } }, "cursor": { "type": "integer" }, "oldestAvailable": { "type": "integer" } }, "required": [ "events", "cursor", "oldestAvailable" ], "additionalProperties": false }, "GeographicCell": { "type": "object", "properties": { "geohash": { "type": "string", "pattern": "^[0-9bcdefghjkmnpqrstuvwxyz]{3,6}$" }, "precision": { "type": "integer" }, "latitude": { "type": "number" }, "longitude": { "type": "number" }, "center": { "type": "object", "properties": { "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "latitude", "longitude" ], "additionalProperties": false }, "bounds": { "$ref": "#/components/schemas/Bounds" } }, "required": [ "geohash", "precision", "center", "bounds" ], "additionalProperties": false }, "GeoPin": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "quadrant": { "enum": [ "NW", "NE", "SW", "SE" ] }, "precision": { "const": 3 }, "geohash": { "type": "string", "pattern": "^[0-9bcdefghjkmnpqrstuvwxyz]{3}$" }, "latitude": { "type": "number" }, "longitude": { "type": "number" } }, "required": [ "id", "name", "quadrant", "precision", "geohash", "latitude", "longitude" ], "additionalProperties": false }, "GeoStatus": { "type": "object", "properties": { "state": { "enum": [ "disabled", "waiting-for-network", "resolving", "ready", "unavailable" ] }, "reservedShard": { "const": "00000" }, "pins": { "type": "array", "items": { "$ref": "#/components/schemas/GeoPin" }, "maxItems": 4 }, "countryCode": { "type": [ "string", "null" ] }, "approximate": { "const": true }, "coordinateSource": { "type": [ "string", "null" ] }, "ipSource": { "type": [ "string", "null" ] }, "resolvedAt": { "type": [ "string", "null" ] }, "error": { "type": [ "string", "null" ] } }, "required": [ "state", "reservedShard", "pins", "countryCode", "approximate", "coordinateSource", "ipSource", "resolvedAt", "error" ], "additionalProperties": false, "description": "Installation-local approximate GEO-IP bootstrap state. Country fallback represents a geographic discovery anchor, not the user location. No raw public IP is stored." } } }, "x-implementation": { "release": "OZ-AGENT-003", "protocol": "OZ-052", "successEnvelope": "result except /health and /v1/events", "defaultRequestBodyBytes": 2097152, "importRequestBodyBytes": 16777216, "maxEventStreams": 32, "maxConcurrentRequests": 128 } }