The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.

Viewing files at commit c6b86fb80ff9Commit detailsView latest

schemas/v0.1/interaction_contract.schema.json 157 lines · 3.5 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "protocolVersion": {
6
      "type": "string",
7
      "const": "0.1"
8
    },
9
    "interactionId": {
10
      "type": "string",
11
      "format": "uuid",
12
      "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)$"
13
    },
14
    "purpose": {
15
      "type": "string"
16
    },
17
    "parties": {
18
      "minItems": 1,
19
      "type": "array",
20
      "items": {
21
        "type": "string"
22
      }
23
    },
24
    "taskCategory": {
25
      "type": "string"
26
    },
27
    "requestedOutcome": {
28
      "type": "string"
29
    },
30
    "successCriteria": {
31
      "type": "array",
32
      "items": {
33
        "type": "string"
34
      }
35
    },
36
    "allowedActions": {
37
      "type": "array",
38
      "items": {
39
        "type": "string"
40
      }
41
    },
42
    "prohibitedActions": {
43
      "type": "array",
44
      "items": {
45
        "type": "string"
46
      }
47
    },
48
    "allowedData": {
49
      "type": "array",
50
      "items": {
51
        "type": "string"
52
      }
53
    },
54
    "prohibitedData": {
55
      "type": "array",
56
      "items": {
57
        "type": "string"
58
      }
59
    },
60
    "deadline": {
61
      "type": "string",
62
      "format": "date-time",
63
      "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))$"
64
    },
65
    "evidenceRequirements": {
66
      "type": "array",
67
      "items": {
68
        "type": "string"
69
      }
70
    },
71
    "delegationRules": {
72
      "type": "array",
73
      "items": {
74
        "type": "string"
75
      }
76
    },
77
    "humanApprovalRequirements": {
78
      "type": "array",
79
      "items": {
80
        "type": "string"
81
      }
82
    },
83
    "factCheckingPolicy": {
84
      "type": "string"
85
    },
86
    "mediationPolicy": {
87
      "type": "string",
88
      "enum": ["none", "mutual_consent"]
89
    },
90
    "retentionDays": {
91
      "type": "integer",
92
      "minimum": 0,
93
      "maximum": 9007199254740991
94
    },
95
    "completionConditions": {
96
      "type": "array",
97
      "items": {
98
        "type": "string"
99
      }
100
    },
101
    "cancellationConditions": {
102
      "type": "array",
103
      "items": {
104
        "type": "string"
105
      }
106
    },
107
    "signatures": {
108
      "default": {},
109
      "type": "object",
110
      "propertyNames": {
111
        "type": "string"
112
      },
113
      "additionalProperties": {
114
        "type": "object",
115
        "properties": {
116
          "algorithm": {
117
            "type": "string",
118
            "const": "Ed25519"
119
          },
120
          "keyId": {
121
            "type": "string",
122
            "minLength": 1
123
          },
124
          "value": {
125
            "type": "string",
126
            "minLength": 1
127
          }
128
        },
129
        "required": ["algorithm", "keyId", "value"],
130
        "additionalProperties": false
131
      }
132
    }
133
  },
134
  "required": [
135
    "protocolVersion",
136
    "interactionId",
137
    "purpose",
138
    "parties",
139
    "taskCategory",
140
    "requestedOutcome",
141
    "successCriteria",
142
    "allowedActions",
143
    "prohibitedActions",
144
    "allowedData",
145
    "prohibitedData",
146
    "evidenceRequirements",
147
    "delegationRules",
148
    "humanApprovalRequirements",
149
    "factCheckingPolicy",
150
    "mediationPolicy",
151
    "retentionDays",
152
    "completionConditions",
153
    "cancellationConditions",
154
    "signatures"
155
  ],
156
  "additionalProperties": false
157
}