|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://codaro.dev/contracts/checkSandboxBroker.schema.json", |
| 4 | + "title": "Codaro Check Sandbox Broker", |
| 5 | + "oneOf": [ |
| 6 | + { "$ref": "#/$defs/RequestEnvelope" }, |
| 7 | + { "$ref": "#/$defs/ResponseEnvelope" } |
| 8 | + ], |
| 9 | + "$defs": { |
| 10 | + "Hex256": { |
| 11 | + "type": "string", |
| 12 | + "pattern": "^[0-9a-f]{64}$" |
| 13 | + }, |
| 14 | + "Nonce": { |
| 15 | + "type": "string", |
| 16 | + "pattern": "^[0-9a-f]{32}$" |
| 17 | + }, |
| 18 | + "Environment": { |
| 19 | + "type": "object", |
| 20 | + "maxProperties": 32, |
| 21 | + "propertyNames": { |
| 22 | + "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" |
| 23 | + }, |
| 24 | + "additionalProperties": { |
| 25 | + "type": "string", |
| 26 | + "maxLength": 32768 |
| 27 | + } |
| 28 | + }, |
| 29 | + "Request": { |
| 30 | + "type": "object", |
| 31 | + "additionalProperties": false, |
| 32 | + "required": [ |
| 33 | + "schemaVersion", |
| 34 | + "runId", |
| 35 | + "fixtureRoot", |
| 36 | + "packagePaths", |
| 37 | + "environment", |
| 38 | + "timeoutMs", |
| 39 | + "workerRequest" |
| 40 | + ], |
| 41 | + "properties": { |
| 42 | + "schemaVersion": { "const": 1 }, |
| 43 | + "runId": { |
| 44 | + "type": "string", |
| 45 | + "pattern": "^[0-9a-f]{32}$" |
| 46 | + }, |
| 47 | + "fixtureRoot": { |
| 48 | + "type": "string", |
| 49 | + "minLength": 1, |
| 50 | + "maxLength": 32768 |
| 51 | + }, |
| 52 | + "packagePaths": { |
| 53 | + "type": "array", |
| 54 | + "maxItems": 16, |
| 55 | + "uniqueItems": true, |
| 56 | + "items": { |
| 57 | + "type": "string", |
| 58 | + "minLength": 1, |
| 59 | + "maxLength": 32768 |
| 60 | + } |
| 61 | + }, |
| 62 | + "environment": { "$ref": "#/$defs/Environment" }, |
| 63 | + "timeoutMs": { |
| 64 | + "type": "integer", |
| 65 | + "minimum": 250, |
| 66 | + "maximum": 15000 |
| 67 | + }, |
| 68 | + "workerRequest": { |
| 69 | + "type": "object" |
| 70 | + } |
| 71 | + } |
| 72 | + }, |
| 73 | + "Response": { |
| 74 | + "type": "object", |
| 75 | + "additionalProperties": false, |
| 76 | + "required": [ |
| 77 | + "schemaVersion", |
| 78 | + "runId", |
| 79 | + "executor", |
| 80 | + "workerResponse", |
| 81 | + "infrastructureError" |
| 82 | + ], |
| 83 | + "properties": { |
| 84 | + "schemaVersion": { "const": 1 }, |
| 85 | + "runId": { |
| 86 | + "type": "string", |
| 87 | + "pattern": "^[0-9a-f]{32}$" |
| 88 | + }, |
| 89 | + "executor": { "const": "windows-appcontainer" }, |
| 90 | + "workerResponse": { |
| 91 | + "type": ["object", "null"] |
| 92 | + }, |
| 93 | + "infrastructureError": { |
| 94 | + "type": ["string", "null"], |
| 95 | + "minLength": 1, |
| 96 | + "maxLength": 8192 |
| 97 | + } |
| 98 | + } |
| 99 | + }, |
| 100 | + "RequestEnvelope": { |
| 101 | + "type": "object", |
| 102 | + "additionalProperties": false, |
| 103 | + "required": ["schemaVersion", "direction", "nonce", "payload", "mac"], |
| 104 | + "properties": { |
| 105 | + "schemaVersion": { "const": 1 }, |
| 106 | + "direction": { "const": "request" }, |
| 107 | + "nonce": { "$ref": "#/$defs/Nonce" }, |
| 108 | + "payload": { "$ref": "#/$defs/Request" }, |
| 109 | + "mac": { "$ref": "#/$defs/Hex256" } |
| 110 | + } |
| 111 | + }, |
| 112 | + "ResponseEnvelope": { |
| 113 | + "type": "object", |
| 114 | + "additionalProperties": false, |
| 115 | + "required": ["schemaVersion", "direction", "nonce", "payload", "mac"], |
| 116 | + "properties": { |
| 117 | + "schemaVersion": { "const": 1 }, |
| 118 | + "direction": { "const": "response" }, |
| 119 | + "nonce": { "$ref": "#/$defs/Nonce" }, |
| 120 | + "payload": { "$ref": "#/$defs/Response" }, |
| 121 | + "mac": { "$ref": "#/$defs/Hex256" } |
| 122 | + } |
| 123 | + } |
| 124 | + } |
| 125 | +} |
0 commit comments