@a2a-exposed/encryption 0.0.0-stage → 0.8.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,546 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://a2a.exposed/ext/sealed/v1/content.schema.json",
4
+ "description": "Exact canonical decrypted content shape. UTF-8 size, canonical base64 bits, unique artifact IDs and signed header/author/state agreement are additionally checked by the runtime; this schema grants no trust/replay authorization.",
5
+ "$defs": {
6
+ "message": {
7
+ "type": "object",
8
+ "properties": {
9
+ "kind": {
10
+ "const": "message"
11
+ },
12
+ "authorRole": {
13
+ "enum": [
14
+ "user",
15
+ "agent"
16
+ ]
17
+ },
18
+ "parts": {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "maxItems": 100,
22
+ "items": {
23
+ "oneOf": [
24
+ {
25
+ "type": "object",
26
+ "properties": {
27
+ "kind": {
28
+ "const": "text"
29
+ },
30
+ "text": {
31
+ "type": "string",
32
+ "maxLength": 200000
33
+ },
34
+ "mediaType": {
35
+ "anyOf": [
36
+ {
37
+ "type": "null"
38
+ },
39
+ {
40
+ "type": "string",
41
+ "maxLength": 256
42
+ }
43
+ ]
44
+ },
45
+ "metadata": {
46
+ "type": "object"
47
+ }
48
+ },
49
+ "required": [
50
+ "kind",
51
+ "text",
52
+ "mediaType",
53
+ "metadata"
54
+ ],
55
+ "additionalProperties": false
56
+ },
57
+ {
58
+ "type": "object",
59
+ "properties": {
60
+ "kind": {
61
+ "const": "data"
62
+ },
63
+ "data": {
64
+ "type": "object"
65
+ },
66
+ "mediaType": {
67
+ "anyOf": [
68
+ {
69
+ "type": "null"
70
+ },
71
+ {
72
+ "type": "string",
73
+ "maxLength": 256
74
+ }
75
+ ]
76
+ },
77
+ "metadata": {
78
+ "type": "object"
79
+ }
80
+ },
81
+ "required": [
82
+ "kind",
83
+ "data",
84
+ "mediaType",
85
+ "metadata"
86
+ ],
87
+ "additionalProperties": false
88
+ },
89
+ {
90
+ "type": "object",
91
+ "properties": {
92
+ "kind": {
93
+ "const": "file"
94
+ },
95
+ "file": {
96
+ "type": "object",
97
+ "properties": {
98
+ "name": {
99
+ "anyOf": [
100
+ {
101
+ "type": "null"
102
+ },
103
+ {
104
+ "type": "string",
105
+ "maxLength": 512
106
+ }
107
+ ]
108
+ },
109
+ "bytes": {
110
+ "type": "string",
111
+ "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
112
+ }
113
+ },
114
+ "required": [
115
+ "name",
116
+ "bytes"
117
+ ],
118
+ "additionalProperties": false
119
+ },
120
+ "mediaType": {
121
+ "anyOf": [
122
+ {
123
+ "type": "null"
124
+ },
125
+ {
126
+ "type": "string",
127
+ "maxLength": 256
128
+ }
129
+ ]
130
+ },
131
+ "metadata": {
132
+ "type": "object"
133
+ }
134
+ },
135
+ "required": [
136
+ "kind",
137
+ "file",
138
+ "mediaType",
139
+ "metadata"
140
+ ],
141
+ "additionalProperties": false
142
+ }
143
+ ]
144
+ }
145
+ },
146
+ "metadata": {
147
+ "type": "object"
148
+ },
149
+ "extensions": {
150
+ "type": "array",
151
+ "maxItems": 100,
152
+ "items": {
153
+ "type": "string",
154
+ "minLength": 1,
155
+ "maxLength": 4096
156
+ }
157
+ },
158
+ "referenceTaskIds": {
159
+ "type": "array",
160
+ "maxItems": 100,
161
+ "items": {
162
+ "type": "string",
163
+ "pattern": "^[!-~]{1,200}$"
164
+ }
165
+ },
166
+ "requestDigest": {
167
+ "type": "string",
168
+ "pattern": "^[A-Za-z0-9_-]{43}$"
169
+ }
170
+ },
171
+ "required": [
172
+ "kind",
173
+ "authorRole",
174
+ "parts",
175
+ "metadata",
176
+ "extensions",
177
+ "referenceTaskIds"
178
+ ],
179
+ "additionalProperties": false,
180
+ "allOf": [
181
+ {
182
+ "if": {
183
+ "properties": {
184
+ "authorRole": {
185
+ "const": "agent"
186
+ }
187
+ }
188
+ },
189
+ "then": {
190
+ "required": [
191
+ "requestDigest"
192
+ ]
193
+ },
194
+ "else": {
195
+ "not": {
196
+ "required": [
197
+ "requestDigest"
198
+ ]
199
+ }
200
+ }
201
+ }
202
+ ]
203
+ },
204
+ "snapshot": {
205
+ "type": "object",
206
+ "properties": {
207
+ "kind": {
208
+ "const": "snapshot"
209
+ },
210
+ "authorRole": {
211
+ "enum": [
212
+ "user",
213
+ "agent"
214
+ ]
215
+ },
216
+ "revision": {
217
+ "type": "integer",
218
+ "minimum": 0,
219
+ "maximum": 9007199254740991
220
+ },
221
+ "previousDigest": {
222
+ "anyOf": [
223
+ {
224
+ "type": "null"
225
+ },
226
+ {
227
+ "type": "string",
228
+ "pattern": "^[A-Za-z0-9_-]{43}$"
229
+ }
230
+ ]
231
+ },
232
+ "state": {
233
+ "enum": [
234
+ "submitted",
235
+ "working",
236
+ "input-required",
237
+ "completed",
238
+ "failed",
239
+ "canceled",
240
+ "rejected",
241
+ "auth-required"
242
+ ]
243
+ },
244
+ "statusMessage": {
245
+ "anyOf": [
246
+ {
247
+ "type": "null"
248
+ },
249
+ {
250
+ "$ref": "#/$defs/message"
251
+ }
252
+ ]
253
+ },
254
+ "artifacts": {
255
+ "type": "array",
256
+ "maxItems": 100,
257
+ "items": {
258
+ "type": "object",
259
+ "properties": {
260
+ "artifactId": {
261
+ "type": "string",
262
+ "pattern": "^[!-~]{1,200}$"
263
+ },
264
+ "name": {
265
+ "anyOf": [
266
+ {
267
+ "type": "null"
268
+ },
269
+ {
270
+ "type": "string",
271
+ "maxLength": 512
272
+ }
273
+ ]
274
+ },
275
+ "description": {
276
+ "anyOf": [
277
+ {
278
+ "type": "null"
279
+ },
280
+ {
281
+ "type": "string",
282
+ "maxLength": 4000
283
+ }
284
+ ]
285
+ },
286
+ "parts": {
287
+ "type": "array",
288
+ "minItems": 1,
289
+ "maxItems": 100,
290
+ "items": {
291
+ "oneOf": [
292
+ {
293
+ "type": "object",
294
+ "properties": {
295
+ "kind": {
296
+ "const": "text"
297
+ },
298
+ "text": {
299
+ "type": "string",
300
+ "maxLength": 200000
301
+ },
302
+ "mediaType": {
303
+ "anyOf": [
304
+ {
305
+ "type": "null"
306
+ },
307
+ {
308
+ "type": "string",
309
+ "maxLength": 256
310
+ }
311
+ ]
312
+ },
313
+ "metadata": {
314
+ "type": "object"
315
+ }
316
+ },
317
+ "required": [
318
+ "kind",
319
+ "text",
320
+ "mediaType",
321
+ "metadata"
322
+ ],
323
+ "additionalProperties": false
324
+ },
325
+ {
326
+ "type": "object",
327
+ "properties": {
328
+ "kind": {
329
+ "const": "data"
330
+ },
331
+ "data": {
332
+ "type": "object"
333
+ },
334
+ "mediaType": {
335
+ "anyOf": [
336
+ {
337
+ "type": "null"
338
+ },
339
+ {
340
+ "type": "string",
341
+ "maxLength": 256
342
+ }
343
+ ]
344
+ },
345
+ "metadata": {
346
+ "type": "object"
347
+ }
348
+ },
349
+ "required": [
350
+ "kind",
351
+ "data",
352
+ "mediaType",
353
+ "metadata"
354
+ ],
355
+ "additionalProperties": false
356
+ },
357
+ {
358
+ "type": "object",
359
+ "properties": {
360
+ "kind": {
361
+ "const": "file"
362
+ },
363
+ "file": {
364
+ "type": "object",
365
+ "properties": {
366
+ "name": {
367
+ "anyOf": [
368
+ {
369
+ "type": "null"
370
+ },
371
+ {
372
+ "type": "string",
373
+ "maxLength": 512
374
+ }
375
+ ]
376
+ },
377
+ "bytes": {
378
+ "type": "string",
379
+ "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
380
+ }
381
+ },
382
+ "required": [
383
+ "name",
384
+ "bytes"
385
+ ],
386
+ "additionalProperties": false
387
+ },
388
+ "mediaType": {
389
+ "anyOf": [
390
+ {
391
+ "type": "null"
392
+ },
393
+ {
394
+ "type": "string",
395
+ "maxLength": 256
396
+ }
397
+ ]
398
+ },
399
+ "metadata": {
400
+ "type": "object"
401
+ }
402
+ },
403
+ "required": [
404
+ "kind",
405
+ "file",
406
+ "mediaType",
407
+ "metadata"
408
+ ],
409
+ "additionalProperties": false
410
+ }
411
+ ]
412
+ }
413
+ },
414
+ "metadata": {
415
+ "type": "object"
416
+ },
417
+ "extensions": {
418
+ "type": "array",
419
+ "maxItems": 100,
420
+ "items": {
421
+ "type": "string",
422
+ "minLength": 1,
423
+ "maxLength": 4096
424
+ }
425
+ }
426
+ },
427
+ "required": [
428
+ "artifactId",
429
+ "name",
430
+ "description",
431
+ "parts",
432
+ "metadata",
433
+ "extensions"
434
+ ],
435
+ "additionalProperties": false
436
+ }
437
+ },
438
+ "metadata": {
439
+ "type": "object"
440
+ },
441
+ "terminal": {
442
+ "type": "boolean"
443
+ },
444
+ "requestDigest": {
445
+ "type": "string",
446
+ "pattern": "^[A-Za-z0-9_-]{43}$"
447
+ }
448
+ },
449
+ "required": [
450
+ "kind",
451
+ "authorRole",
452
+ "revision",
453
+ "previousDigest",
454
+ "state",
455
+ "statusMessage",
456
+ "artifacts",
457
+ "metadata",
458
+ "terminal"
459
+ ],
460
+ "additionalProperties": false,
461
+ "allOf": [
462
+ {
463
+ "if": {
464
+ "properties": {
465
+ "revision": {
466
+ "const": 0
467
+ }
468
+ }
469
+ },
470
+ "then": {
471
+ "properties": {
472
+ "previousDigest": {
473
+ "type": "null"
474
+ }
475
+ }
476
+ },
477
+ "else": {
478
+ "properties": {
479
+ "previousDigest": {
480
+ "type": "string",
481
+ "pattern": "^[A-Za-z0-9_-]{43}$"
482
+ }
483
+ }
484
+ }
485
+ },
486
+ {
487
+ "if": {
488
+ "properties": {
489
+ "state": {
490
+ "enum": [
491
+ "completed",
492
+ "failed",
493
+ "canceled",
494
+ "rejected"
495
+ ]
496
+ }
497
+ }
498
+ },
499
+ "then": {
500
+ "properties": {
501
+ "terminal": {
502
+ "const": true
503
+ }
504
+ }
505
+ },
506
+ "else": {
507
+ "properties": {
508
+ "terminal": {
509
+ "const": false
510
+ }
511
+ }
512
+ }
513
+ },
514
+ {
515
+ "if": {
516
+ "properties": {
517
+ "authorRole": {
518
+ "const": "agent"
519
+ }
520
+ }
521
+ },
522
+ "then": {
523
+ "required": [
524
+ "requestDigest"
525
+ ]
526
+ },
527
+ "else": {
528
+ "not": {
529
+ "required": [
530
+ "requestDigest"
531
+ ]
532
+ }
533
+ }
534
+ }
535
+ ]
536
+ }
537
+ },
538
+ "oneOf": [
539
+ {
540
+ "$ref": "#/$defs/message"
541
+ },
542
+ {
543
+ "$ref": "#/$defs/snapshot"
544
+ }
545
+ ]
546
+ }