| 1 | {
|
| 2 | "$schema": "https://json-schema.org/draft/2020-12/schema",
|
| 3 | "type": "object",
|
| 4 | "properties": {
|
| 5 | "safeguardId": {
|
| 6 | "type": "string",
|
| 7 | "format": "uuid",
|
| 8 | "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)$"
|
| 9 | },
|
| 10 | "assessmentId": {
|
| 11 | "type": "string",
|
| 12 | "format": "uuid",
|
| 13 | "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)$"
|
| 14 | },
|
| 15 | "safeguardCode": {
|
| 16 | "type": "string",
|
| 17 | "pattern": "^[a-z][a-z0-9_]{1,63}$"
|
| 18 | },
|
| 19 | "interactionId": {
|
| 20 | "type": "string",
|
| 21 | "format": "uuid",
|
| 22 | "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)$"
|
| 23 | },
|
| 24 | "contractHash": {
|
| 25 | "type": "string",
|
| 26 | "minLength": 1
|
| 27 | },
|
| 28 | "targetAgentId": {
|
| 29 | "type": "string",
|
| 30 | "minLength": 1
|
| 31 | },
|
| 32 | "targetAgentVersion": {
|
| 33 | "type": "string",
|
| 34 | "minLength": 1,
|
| 35 | "maxLength": 200
|
| 36 | },
|
| 37 | "type": {
|
| 38 | "type": "string",
|
| 39 | "enum": [
|
| 40 | "require_evidence",
|
| 41 | "narrow_scope",
|
| 42 | "extend_deadline",
|
| 43 | "grant_tool_access",
|
| 44 | "require_human_approval",
|
| 45 | "limit_delegation",
|
| 46 | "add_checkpoint",
|
| 47 | "choose_another_agent"
|
| 48 | ]
|
| 49 | },
|
| 50 | "description": {
|
| 51 | "type": "string",
|
| 52 | "minLength": 1,
|
| 53 | "maxLength": 500
|
| 54 | },
|
| 55 | "rationale": {
|
| 56 | "type": "string",
|
| 57 | "minLength": 1,
|
| 58 | "maxLength": 500
|
| 59 | },
|
| 60 | "riskCodes": {
|
| 61 | "minItems": 1,
|
| 62 | "maxItems": 5,
|
| 63 | "type": "array",
|
| 64 | "items": {
|
| 65 | "type": "string",
|
| 66 | "pattern": "^[a-z][a-z0-9_]{1,63}$"
|
| 67 | }
|
| 68 | },
|
| 69 | "expectedImpact": {
|
| 70 | "type": "number",
|
| 71 | "minimum": 0,
|
| 72 | "maximum": 0.5
|
| 73 | },
|
| 74 | "status": {
|
| 75 | "type": "string",
|
| 76 | "enum": [
|
| 77 | "recommended",
|
| 78 | "accepted",
|
| 79 | "rejected",
|
| 80 | "modified"
|
| 81 | ]
|
| 82 | },
|
| 83 | "decisionReason": {
|
| 84 | "type": "string",
|
| 85 | "maxLength": 500
|
| 86 | },
|
| 87 | "decidedAt": {
|
| 88 | "type": "string",
|
| 89 | "format": "date-time",
|
| 90 | "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))$"
|
| 91 | },
|
| 92 | "createdAt": {
|
| 93 | "type": "string",
|
| 94 | "format": "date-time",
|
| 95 | "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))$"
|
| 96 | }
|
| 97 | },
|
| 98 | "required": [
|
| 99 | "safeguardId",
|
| 100 | "assessmentId",
|
| 101 | "safeguardCode",
|
| 102 | "interactionId",
|
| 103 | "contractHash",
|
| 104 | "targetAgentId",
|
| 105 | "targetAgentVersion",
|
| 106 | "type",
|
| 107 | "description",
|
| 108 | "rationale",
|
| 109 | "riskCodes",
|
| 110 | "expectedImpact",
|
| 111 | "status",
|
| 112 | "createdAt"
|
| 113 | ],
|
| 114 | "additionalProperties": false
|
| 115 | }
|