| 1 | {
|
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 | "type": "object",
|
| 4 | "properties": {
|
| 5 | "type": {
|
| 6 | "type": "string",
|
| 7 | "const": "openclasp.session.offer"
|
| 8 | },
|
| 9 | "version": {
|
| 10 | "type": "string",
|
| 11 | "const": "1"
|
| 12 | },
|
| 13 | "offerId": {
|
| 14 | "type": "string",
|
| 15 | "format": "uuid",
|
| 16 | "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
| 17 | },
|
| 18 | "interactionId": {
|
| 19 | "type": "string",
|
| 20 | "format": "uuid",
|
| 21 | "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
| 22 | },
|
| 23 | "agentId": {
|
| 24 | "type": "string",
|
| 25 | "minLength": 1
|
| 26 | },
|
| 27 | "role": {
|
| 28 | "type": "string",
|
| 29 | "enum": ["initiator", "responder"]
|
| 30 | },
|
| 31 | "counterparty": {
|
| 32 | "type": "object",
|
| 33 | "properties": {
|
| 34 | "agentId": {
|
| 35 | "type": "string",
|
| 36 | "minLength": 1
|
| 37 | },
|
| 38 | "name": {
|
| 39 | "type": "string",
|
| 40 | "minLength": 1
|
| 41 | },
|
| 42 | "agentVersion": {
|
| 43 | "type": "string",
|
| 44 | "minLength": 1
|
| 45 | },
|
| 46 | "capabilities": {
|
| 47 | "type": "array",
|
| 48 | "items": {
|
| 49 | "type": "string"
|
| 50 | }
|
| 51 | }
|
| 52 | },
|
| 53 | "required": ["agentId", "name", "agentVersion", "capabilities"],
|
| 54 | "additionalProperties": false
|
| 55 | },
|
| 56 | "contract": {
|
| 57 | "type": "object",
|
| 58 | "properties": {
|
| 59 | "protocolVersion": {
|
| 60 | "type": "string",
|
| 61 | "const": "0.1"
|
| 62 | },
|
| 63 | "interactionId": {
|
| 64 | "type": "string",
|
| 65 | "format": "uuid",
|
| 66 | "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
| 67 | },
|
| 68 | "purpose": {
|
| 69 | "type": "string"
|
| 70 | },
|
| 71 | "parties": {
|
| 72 | "minItems": 1,
|
| 73 | "type": "array",
|
| 74 | "items": {
|
| 75 | "type": "string"
|
| 76 | }
|
| 77 | },
|
| 78 | "taskCategory": {
|
| 79 | "type": "string"
|
| 80 | },
|
| 81 | "requestedOutcome": {
|
| 82 | "type": "string"
|
| 83 | },
|
| 84 | "successCriteria": {
|
| 85 | "type": "array",
|
| 86 | "items": {
|
| 87 | "type": "string"
|
| 88 | }
|
| 89 | },
|
| 90 | "allowedActions": {
|
| 91 | "type": "array",
|
| 92 | "items": {
|
| 93 | "type": "string"
|
| 94 | }
|
| 95 | },
|
| 96 | "prohibitedActions": {
|
| 97 | "type": "array",
|
| 98 | "items": {
|
| 99 | "type": "string"
|
| 100 | }
|
| 101 | },
|
| 102 | "allowedData": {
|
| 103 | "type": "array",
|
| 104 | "items": {
|
| 105 | "type": "string"
|
| 106 | }
|
| 107 | },
|
| 108 | "prohibitedData": {
|
| 109 | "type": "array",
|
| 110 | "items": {
|
| 111 | "type": "string"
|
| 112 | }
|
| 113 | },
|
| 114 | "deadline": {
|
| 115 | "type": "string",
|
| 116 | "format": "date-time",
|
| 117 | "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
| 118 | },
|
| 119 | "evidenceRequirements": {
|
| 120 | "type": "array",
|
| 121 | "items": {
|
| 122 | "type": "string"
|
| 123 | }
|
| 124 | },
|
| 125 | "delegationRules": {
|
| 126 | "type": "array",
|
| 127 | "items": {
|
| 128 | "type": "string"
|
| 129 | }
|
| 130 | },
|
| 131 | "humanApprovalRequirements": {
|
| 132 | "type": "array",
|
| 133 | "items": {
|
| 134 | "type": "string"
|
| 135 | }
|
| 136 | },
|
| 137 | "factCheckingPolicy": {
|
| 138 | "type": "string"
|
| 139 | },
|
| 140 | "mediationPolicy": {
|
| 141 | "type": "string",
|
| 142 | "enum": ["none", "mutual_consent"]
|
| 143 | },
|
| 144 | "retentionDays": {
|
| 145 | "type": "integer",
|
| 146 | "minimum": 0,
|
| 147 | "maximum": 9007199254740991
|
| 148 | },
|
| 149 | "completionConditions": {
|
| 150 | "type": "array",
|
| 151 | "items": {
|
| 152 | "type": "string"
|
| 153 | }
|
| 154 | },
|
| 155 | "cancellationConditions": {
|
| 156 | "type": "array",
|
| 157 | "items": {
|
| 158 | "type": "string"
|
| 159 | }
|
| 160 | },
|
| 161 | "signatures": {
|
| 162 | "default": {},
|
| 163 | "type": "object",
|
| 164 | "propertyNames": {
|
| 165 | "type": "string"
|
| 166 | },
|
| 167 | "additionalProperties": {
|
| 168 | "type": "object",
|
| 169 | "properties": {
|
| 170 | "algorithm": {
|
| 171 | "type": "string",
|
| 172 | "const": "Ed25519"
|
| 173 | },
|
| 174 | "keyId": {
|
| 175 | "type": "string",
|
| 176 | "minLength": 1
|
| 177 | },
|
| 178 | "value": {
|
| 179 | "type": "string",
|
| 180 | "minLength": 1
|
| 181 | }
|
| 182 | },
|
| 183 | "required": ["algorithm", "keyId", "value"],
|
| 184 | "additionalProperties": false
|
| 185 | }
|
| 186 | }
|
| 187 | },
|
| 188 | "required": [
|
| 189 | "protocolVersion",
|
| 190 | "interactionId",
|
| 191 | "purpose",
|
| 192 | "parties",
|
| 193 | "taskCategory",
|
| 194 | "requestedOutcome",
|
| 195 | "successCriteria",
|
| 196 | "allowedActions",
|
| 197 | "prohibitedActions",
|
| 198 | "allowedData",
|
| 199 | "prohibitedData",
|
| 200 | "evidenceRequirements",
|
| 201 | "delegationRules",
|
| 202 | "humanApprovalRequirements",
|
| 203 | "factCheckingPolicy",
|
| 204 | "mediationPolicy",
|
| 205 | "retentionDays",
|
| 206 | "completionConditions",
|
| 207 | "cancellationConditions",
|
| 208 | "signatures"
|
| 209 | ],
|
| 210 | "additionalProperties": false
|
| 211 | },
|
| 212 | "contractHash": {
|
| 213 | "type": "string",
|
| 214 | "minLength": 1
|
| 215 | },
|
| 216 | "privateInsights": {
|
| 217 | "default": [],
|
| 218 | "type": "array",
|
| 219 | "items": {
|
| 220 | "type": "object",
|
| 221 | "properties": {
|
| 222 | "code": {
|
| 223 | "type": "string",
|
| 224 | "minLength": 1
|
| 225 | },
|
| 226 | "severity": {
|
| 227 | "type": "string",
|
| 228 | "enum": ["info", "caution", "high"]
|
| 229 | },
|
| 230 | "message": {
|
| 231 | "type": "string",
|
| 232 | "minLength": 1
|
| 233 | },
|
| 234 | "evidenceReferences": {
|
| 235 | "default": [],
|
| 236 | "type": "array",
|
| 237 | "items": {
|
| 238 | "type": "string"
|
| 239 | }
|
| 240 | }
|
| 241 | },
|
| 242 | "required": ["code", "severity", "message", "evidenceReferences"],
|
| 243 | "additionalProperties": false
|
| 244 | }
|
| 245 | },
|
| 246 | "issuedAt": {
|
| 247 | "type": "string",
|
| 248 | "format": "date-time",
|
| 249 | "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
| 250 | },
|
| 251 | "expiresAt": {
|
| 252 | "type": "string",
|
| 253 | "format": "date-time",
|
| 254 | "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
| 255 | }
|
| 256 | },
|
| 257 | "required": [
|
| 258 | "type",
|
| 259 | "version",
|
| 260 | "offerId",
|
| 261 | "interactionId",
|
| 262 | "agentId",
|
| 263 | "role",
|
| 264 | "counterparty",
|
| 265 | "contract",
|
| 266 | "contractHash",
|
| 267 | "privateInsights",
|
| 268 | "issuedAt",
|
| 269 | "expiresAt"
|
| 270 | ],
|
| 271 | "additionalProperties": false
|
| 272 | }
|