diff --git a/veilid-python/veilid/schema/RecvMessage.json b/veilid-python/veilid/schema/RecvMessage.json index 475ca99d..c5530d44 100644 --- a/veilid-python/veilid/schema/RecvMessage.json +++ b/veilid-python/veilid/schema/RecvMessage.json @@ -349,9 +349,34 @@ }, { "type": "object", + "anyOf": [ + { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + } + }, + { + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "$ref": "#/definitions/VeilidAPIError" + } + } + } + ], "required": [ - "op", - "value" + "op" ], "properties": { "op": { @@ -359,11 +384,6 @@ "enum": [ "NewRoutingContext" ] - }, - "value": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 } } }, @@ -433,7 +453,7 @@ "rc_op": { "type": "string", "enum": [ - "WithPrivacy" + "WithDefaultSafety" ] } } @@ -473,7 +493,7 @@ "rc_op": { "type": "string", "enum": [ - "WithCustomPrivacy" + "WithSafety" ] } } @@ -498,6 +518,24 @@ } } }, + { + "type": "object", + "required": [ + "rc_op", + "value" + ], + "properties": { + "rc_op": { + "type": "string", + "enum": [ + "Safety" + ] + }, + "value": { + "$ref": "#/definitions/SafetySelection" + } + } + }, { "type": "object", "anyOf": [ @@ -2865,6 +2903,92 @@ } } }, + "SafetySelection": { + "description": "The choice of safety route to include in compiled routes", + "oneOf": [ + { + "description": "Don't use a safety route, only specify the sequencing preference", + "type": "object", + "required": [ + "Unsafe" + ], + "properties": { + "Unsafe": { + "$ref": "#/definitions/Sequencing" + } + }, + "additionalProperties": false + }, + { + "description": "Use a safety route and parameters specified by a SafetySpec", + "type": "object", + "required": [ + "Safe" + ], + "properties": { + "Safe": { + "$ref": "#/definitions/SafetySpec" + } + }, + "additionalProperties": false + } + ] + }, + "SafetySpec": { + "description": "Options for safety routes (sender privacy)", + "type": "object", + "required": [ + "hop_count", + "sequencing", + "stability" + ], + "properties": { + "hop_count": { + "description": "must be greater than 0", + "type": "integer", + "format": "uint", + "minimum": 0.0 + }, + "preferred_route": { + "description": "preferred safety route set id if it still exists", + "type": [ + "string", + "null" + ] + }, + "sequencing": { + "description": "prefer connection-oriented sequenced protocols", + "allOf": [ + { + "$ref": "#/definitions/Sequencing" + } + ] + }, + "stability": { + "description": "prefer reliability over speed", + "allOf": [ + { + "$ref": "#/definitions/Stability" + } + ] + } + } + }, + "Sequencing": { + "type": "string", + "enum": [ + "NoPreference", + "PreferOrdered", + "EnsureOrdered" + ] + }, + "Stability": { + "type": "string", + "enum": [ + "LowLatency", + "Reliable" + ] + }, "TransferStats": { "type": "object", "required": [ diff --git a/veilid-python/veilid/schema/Request.json b/veilid-python/veilid/schema/Request.json index 9d78ceac..4fe0b117 100644 --- a/veilid-python/veilid/schema/Request.json +++ b/veilid-python/veilid/schema/Request.json @@ -215,7 +215,7 @@ "rc_op": { "type": "string", "enum": [ - "WithPrivacy" + "WithDefaultSafety" ] } } @@ -230,7 +230,7 @@ "rc_op": { "type": "string", "enum": [ - "WithCustomPrivacy" + "WithSafety" ] }, "safety_selection": { @@ -256,6 +256,20 @@ } } }, + { + "type": "object", + "required": [ + "rc_op" + ], + "properties": { + "rc_op": { + "type": "string", + "enum": [ + "Safety" + ] + } + } + }, { "type": "object", "required": [