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

Viewing files at commit 20744dd65349Commit detailsView latest

schemas/v0.1/interaction_contract.schema.json 164 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": [
89
        "none",
90
        "mutual_consent"
91
      ]
92
    },
93
    "retentionDays": {
94
      "type": "integer",
95
      "minimum": 0,
96
      "maximum": 9007199254740991
97
    },
98
    "completionConditions": {
99
      "type": "array",
100
      "items": {
101
        "type": "string"
102
      }
103
    },
104
    "cancellationConditions": {
105
      "type": "array",
106
      "items": {
107
        "type": "string"
108
      }
109
    },
110
    "signatures": {
111
      "default": {},
112
      "type": "object",
113
      "propertyNames": {
114
        "type": "string"
115
      },
116
      "additionalProperties": {
117
        "type": "object",
118
        "properties": {
119
          "algorithm": {
120
            "type": "string",
121
            "const": "Ed25519"
122
          },
123
          "keyId": {
124
            "type": "string",
125
            "minLength": 1
126
          },
127
          "value": {
128
            "type": "string",
129
            "minLength": 1
130
          }
131
        },
132
        "required": [
133
          "algorithm",
134
          "keyId",
135
          "value"
136
        ],
137
        "additionalProperties": false
138
      }
139
    }
140
  },
141
  "required": [
142
    "protocolVersion",
143
    "interactionId",
144
    "purpose",
145
    "parties",
146
    "taskCategory",
147
    "requestedOutcome",
148
    "successCriteria",
149
    "allowedActions",
150
    "prohibitedActions",
151
    "allowedData",
152
    "prohibitedData",
153
    "evidenceRequirements",
154
    "delegationRules",
155
    "humanApprovalRequirements",
156
    "factCheckingPolicy",
157
    "mediationPolicy",
158
    "retentionDays",
159
    "completionConditions",
160
    "cancellationConditions",
161
    "signatures"
162
  ],
163
  "additionalProperties": false
164
}