@inf-monkeys-tech/monkeys 1.0.8 → 1.0.10

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,1322 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "anyOf": [
4
+ {
5
+ "type": "object",
6
+ "properties": {
7
+ "contract": {
8
+ "type": "string",
9
+ "const": "AgentSessionEvent"
10
+ },
11
+ "eventId": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 256
15
+ },
16
+ "sessionId": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 256
20
+ },
21
+ "sequence": {
22
+ "type": "integer",
23
+ "minimum": 0,
24
+ "maximum": 9007199254740991
25
+ },
26
+ "idempotencyKey": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 256
30
+ },
31
+ "occurredAt": {
32
+ "type": "string",
33
+ "format": "date-time",
34
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
35
+ },
36
+ "eventType": {
37
+ "type": "string",
38
+ "const": "message"
39
+ },
40
+ "payload": {
41
+ "type": "object",
42
+ "properties": {
43
+ "messageId": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 256
47
+ },
48
+ "role": {
49
+ "type": "string",
50
+ "enum": [
51
+ "user",
52
+ "assistant",
53
+ "system"
54
+ ]
55
+ },
56
+ "operation": {
57
+ "default": "append",
58
+ "type": "string",
59
+ "enum": [
60
+ "append",
61
+ "replace"
62
+ ]
63
+ },
64
+ "parts": {
65
+ "type": "array",
66
+ "items": {
67
+ "$ref": "#/$defs/__schema0"
68
+ }
69
+ },
70
+ "status": {
71
+ "type": "string",
72
+ "enum": [
73
+ "streaming",
74
+ "completed",
75
+ "failed"
76
+ ]
77
+ }
78
+ },
79
+ "required": [
80
+ "messageId",
81
+ "role",
82
+ "operation",
83
+ "parts"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ },
88
+ "required": [
89
+ "contract",
90
+ "eventId",
91
+ "sessionId",
92
+ "sequence",
93
+ "idempotencyKey",
94
+ "occurredAt",
95
+ "eventType",
96
+ "payload"
97
+ ],
98
+ "additionalProperties": false
99
+ },
100
+ {
101
+ "type": "object",
102
+ "properties": {
103
+ "contract": {
104
+ "type": "string",
105
+ "const": "AgentSessionEvent"
106
+ },
107
+ "eventId": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 256
111
+ },
112
+ "sessionId": {
113
+ "type": "string",
114
+ "minLength": 1,
115
+ "maxLength": 256
116
+ },
117
+ "sequence": {
118
+ "type": "integer",
119
+ "minimum": 0,
120
+ "maximum": 9007199254740991
121
+ },
122
+ "idempotencyKey": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "maxLength": 256
126
+ },
127
+ "occurredAt": {
128
+ "type": "string",
129
+ "format": "date-time",
130
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
131
+ },
132
+ "eventType": {
133
+ "type": "string",
134
+ "const": "reasoning"
135
+ },
136
+ "payload": {
137
+ "type": "object",
138
+ "properties": {
139
+ "reasoningId": {
140
+ "type": "string",
141
+ "minLength": 1,
142
+ "maxLength": 256
143
+ },
144
+ "text": {
145
+ "type": "string"
146
+ },
147
+ "status": {
148
+ "type": "string",
149
+ "enum": [
150
+ "streaming",
151
+ "completed"
152
+ ]
153
+ }
154
+ },
155
+ "required": [
156
+ "reasoningId",
157
+ "text",
158
+ "status"
159
+ ],
160
+ "additionalProperties": false
161
+ }
162
+ },
163
+ "required": [
164
+ "contract",
165
+ "eventId",
166
+ "sessionId",
167
+ "sequence",
168
+ "idempotencyKey",
169
+ "occurredAt",
170
+ "eventType",
171
+ "payload"
172
+ ],
173
+ "additionalProperties": false
174
+ },
175
+ {
176
+ "type": "object",
177
+ "properties": {
178
+ "contract": {
179
+ "type": "string",
180
+ "const": "AgentSessionEvent"
181
+ },
182
+ "eventId": {
183
+ "type": "string",
184
+ "minLength": 1,
185
+ "maxLength": 256
186
+ },
187
+ "sessionId": {
188
+ "type": "string",
189
+ "minLength": 1,
190
+ "maxLength": 256
191
+ },
192
+ "sequence": {
193
+ "type": "integer",
194
+ "minimum": 0,
195
+ "maximum": 9007199254740991
196
+ },
197
+ "idempotencyKey": {
198
+ "type": "string",
199
+ "minLength": 1,
200
+ "maxLength": 256
201
+ },
202
+ "occurredAt": {
203
+ "type": "string",
204
+ "format": "date-time",
205
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
206
+ },
207
+ "eventType": {
208
+ "type": "string",
209
+ "const": "plan"
210
+ },
211
+ "payload": {
212
+ "type": "object",
213
+ "properties": {
214
+ "planId": {
215
+ "type": "string",
216
+ "minLength": 1,
217
+ "maxLength": 256
218
+ },
219
+ "title": {
220
+ "type": "string"
221
+ },
222
+ "status": {
223
+ "type": "string",
224
+ "enum": [
225
+ "pending",
226
+ "running",
227
+ "completed",
228
+ "failed"
229
+ ]
230
+ },
231
+ "steps": {
232
+ "type": "array",
233
+ "items": {
234
+ "type": "object",
235
+ "properties": {
236
+ "id": {
237
+ "type": "string",
238
+ "minLength": 1,
239
+ "maxLength": 256
240
+ },
241
+ "title": {
242
+ "type": "string"
243
+ },
244
+ "status": {
245
+ "type": "string",
246
+ "enum": [
247
+ "pending",
248
+ "running",
249
+ "completed",
250
+ "failed",
251
+ "skipped"
252
+ ]
253
+ }
254
+ },
255
+ "required": [
256
+ "id",
257
+ "title",
258
+ "status"
259
+ ],
260
+ "additionalProperties": false
261
+ }
262
+ }
263
+ },
264
+ "required": [
265
+ "planId",
266
+ "status",
267
+ "steps"
268
+ ],
269
+ "additionalProperties": false
270
+ }
271
+ },
272
+ "required": [
273
+ "contract",
274
+ "eventId",
275
+ "sessionId",
276
+ "sequence",
277
+ "idempotencyKey",
278
+ "occurredAt",
279
+ "eventType",
280
+ "payload"
281
+ ],
282
+ "additionalProperties": false
283
+ },
284
+ {
285
+ "type": "object",
286
+ "properties": {
287
+ "contract": {
288
+ "type": "string",
289
+ "const": "AgentSessionEvent"
290
+ },
291
+ "eventId": {
292
+ "type": "string",
293
+ "minLength": 1,
294
+ "maxLength": 256
295
+ },
296
+ "sessionId": {
297
+ "type": "string",
298
+ "minLength": 1,
299
+ "maxLength": 256
300
+ },
301
+ "sequence": {
302
+ "type": "integer",
303
+ "minimum": 0,
304
+ "maximum": 9007199254740991
305
+ },
306
+ "idempotencyKey": {
307
+ "type": "string",
308
+ "minLength": 1,
309
+ "maxLength": 256
310
+ },
311
+ "occurredAt": {
312
+ "type": "string",
313
+ "format": "date-time",
314
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
315
+ },
316
+ "eventType": {
317
+ "type": "string",
318
+ "const": "task"
319
+ },
320
+ "payload": {
321
+ "type": "object",
322
+ "properties": {
323
+ "taskId": {
324
+ "type": "string",
325
+ "minLength": 1,
326
+ "maxLength": 256
327
+ },
328
+ "title": {
329
+ "type": "string"
330
+ },
331
+ "status": {
332
+ "type": "string",
333
+ "enum": [
334
+ "pending",
335
+ "running",
336
+ "completed",
337
+ "failed",
338
+ "skipped"
339
+ ]
340
+ },
341
+ "detail": {
342
+ "type": "string"
343
+ }
344
+ },
345
+ "required": [
346
+ "taskId",
347
+ "title",
348
+ "status"
349
+ ],
350
+ "additionalProperties": false
351
+ }
352
+ },
353
+ "required": [
354
+ "contract",
355
+ "eventId",
356
+ "sessionId",
357
+ "sequence",
358
+ "idempotencyKey",
359
+ "occurredAt",
360
+ "eventType",
361
+ "payload"
362
+ ],
363
+ "additionalProperties": false
364
+ },
365
+ {
366
+ "type": "object",
367
+ "properties": {
368
+ "contract": {
369
+ "type": "string",
370
+ "const": "AgentSessionEvent"
371
+ },
372
+ "eventId": {
373
+ "type": "string",
374
+ "minLength": 1,
375
+ "maxLength": 256
376
+ },
377
+ "sessionId": {
378
+ "type": "string",
379
+ "minLength": 1,
380
+ "maxLength": 256
381
+ },
382
+ "sequence": {
383
+ "type": "integer",
384
+ "minimum": 0,
385
+ "maximum": 9007199254740991
386
+ },
387
+ "idempotencyKey": {
388
+ "type": "string",
389
+ "minLength": 1,
390
+ "maxLength": 256
391
+ },
392
+ "occurredAt": {
393
+ "type": "string",
394
+ "format": "date-time",
395
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
396
+ },
397
+ "eventType": {
398
+ "type": "string",
399
+ "const": "tool"
400
+ },
401
+ "payload": {
402
+ "type": "object",
403
+ "properties": {
404
+ "toolCallId": {
405
+ "type": "string",
406
+ "minLength": 1,
407
+ "maxLength": 256
408
+ },
409
+ "toolName": {
410
+ "type": "string",
411
+ "minLength": 1
412
+ },
413
+ "status": {
414
+ "type": "string",
415
+ "enum": [
416
+ "pending",
417
+ "running",
418
+ "completed",
419
+ "failed",
420
+ "denied"
421
+ ]
422
+ },
423
+ "input": {
424
+ "$ref": "#/$defs/__schema0"
425
+ },
426
+ "output": {
427
+ "$ref": "#/$defs/__schema0"
428
+ },
429
+ "error": {
430
+ "type": "string"
431
+ },
432
+ "startedAt": {
433
+ "type": "string",
434
+ "format": "date-time",
435
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
436
+ },
437
+ "completedAt": {
438
+ "type": "string",
439
+ "format": "date-time",
440
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
441
+ }
442
+ },
443
+ "required": [
444
+ "toolCallId",
445
+ "toolName",
446
+ "status"
447
+ ],
448
+ "additionalProperties": false
449
+ }
450
+ },
451
+ "required": [
452
+ "contract",
453
+ "eventId",
454
+ "sessionId",
455
+ "sequence",
456
+ "idempotencyKey",
457
+ "occurredAt",
458
+ "eventType",
459
+ "payload"
460
+ ],
461
+ "additionalProperties": false
462
+ },
463
+ {
464
+ "type": "object",
465
+ "properties": {
466
+ "contract": {
467
+ "type": "string",
468
+ "const": "AgentSessionEvent"
469
+ },
470
+ "eventId": {
471
+ "type": "string",
472
+ "minLength": 1,
473
+ "maxLength": 256
474
+ },
475
+ "sessionId": {
476
+ "type": "string",
477
+ "minLength": 1,
478
+ "maxLength": 256
479
+ },
480
+ "sequence": {
481
+ "type": "integer",
482
+ "minimum": 0,
483
+ "maximum": 9007199254740991
484
+ },
485
+ "idempotencyKey": {
486
+ "type": "string",
487
+ "minLength": 1,
488
+ "maxLength": 256
489
+ },
490
+ "occurredAt": {
491
+ "type": "string",
492
+ "format": "date-time",
493
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
494
+ },
495
+ "eventType": {
496
+ "type": "string",
497
+ "const": "approval"
498
+ },
499
+ "payload": {
500
+ "type": "object",
501
+ "properties": {
502
+ "approvalId": {
503
+ "type": "string",
504
+ "minLength": 1,
505
+ "maxLength": 256
506
+ },
507
+ "toolCallId": {
508
+ "type": "string",
509
+ "minLength": 1,
510
+ "maxLength": 256
511
+ },
512
+ "status": {
513
+ "type": "string",
514
+ "enum": [
515
+ "requested",
516
+ "approved",
517
+ "rejected",
518
+ "expired"
519
+ ]
520
+ },
521
+ "title": {
522
+ "type": "string"
523
+ },
524
+ "description": {
525
+ "type": "string"
526
+ },
527
+ "requestedAction": {
528
+ "$ref": "#/$defs/__schema0"
529
+ }
530
+ },
531
+ "required": [
532
+ "approvalId",
533
+ "status",
534
+ "title"
535
+ ],
536
+ "additionalProperties": false
537
+ }
538
+ },
539
+ "required": [
540
+ "contract",
541
+ "eventId",
542
+ "sessionId",
543
+ "sequence",
544
+ "idempotencyKey",
545
+ "occurredAt",
546
+ "eventType",
547
+ "payload"
548
+ ],
549
+ "additionalProperties": false
550
+ },
551
+ {
552
+ "type": "object",
553
+ "properties": {
554
+ "contract": {
555
+ "type": "string",
556
+ "const": "AgentSessionEvent"
557
+ },
558
+ "eventId": {
559
+ "type": "string",
560
+ "minLength": 1,
561
+ "maxLength": 256
562
+ },
563
+ "sessionId": {
564
+ "type": "string",
565
+ "minLength": 1,
566
+ "maxLength": 256
567
+ },
568
+ "sequence": {
569
+ "type": "integer",
570
+ "minimum": 0,
571
+ "maximum": 9007199254740991
572
+ },
573
+ "idempotencyKey": {
574
+ "type": "string",
575
+ "minLength": 1,
576
+ "maxLength": 256
577
+ },
578
+ "occurredAt": {
579
+ "type": "string",
580
+ "format": "date-time",
581
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
582
+ },
583
+ "eventType": {
584
+ "type": "string",
585
+ "const": "status"
586
+ },
587
+ "payload": {
588
+ "type": "object",
589
+ "properties": {
590
+ "status": {
591
+ "type": "string",
592
+ "enum": [
593
+ "queued",
594
+ "running",
595
+ "waiting_approval",
596
+ "stopping",
597
+ "stopped",
598
+ "completed",
599
+ "failed"
600
+ ]
601
+ },
602
+ "detail": {
603
+ "type": "string"
604
+ }
605
+ },
606
+ "required": [
607
+ "status"
608
+ ],
609
+ "additionalProperties": false
610
+ }
611
+ },
612
+ "required": [
613
+ "contract",
614
+ "eventId",
615
+ "sessionId",
616
+ "sequence",
617
+ "idempotencyKey",
618
+ "occurredAt",
619
+ "eventType",
620
+ "payload"
621
+ ],
622
+ "additionalProperties": false
623
+ },
624
+ {
625
+ "type": "object",
626
+ "properties": {
627
+ "contract": {
628
+ "type": "string",
629
+ "const": "AgentSessionEvent"
630
+ },
631
+ "eventId": {
632
+ "type": "string",
633
+ "minLength": 1,
634
+ "maxLength": 256
635
+ },
636
+ "sessionId": {
637
+ "type": "string",
638
+ "minLength": 1,
639
+ "maxLength": 256
640
+ },
641
+ "sequence": {
642
+ "type": "integer",
643
+ "minimum": 0,
644
+ "maximum": 9007199254740991
645
+ },
646
+ "idempotencyKey": {
647
+ "type": "string",
648
+ "minLength": 1,
649
+ "maxLength": 256
650
+ },
651
+ "occurredAt": {
652
+ "type": "string",
653
+ "format": "date-time",
654
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
655
+ },
656
+ "eventType": {
657
+ "type": "string",
658
+ "const": "artifact"
659
+ },
660
+ "payload": {
661
+ "type": "object",
662
+ "properties": {
663
+ "artifactId": {
664
+ "type": "string",
665
+ "minLength": 1,
666
+ "maxLength": 256
667
+ },
668
+ "name": {
669
+ "type": "string",
670
+ "minLength": 1
671
+ },
672
+ "kind": {
673
+ "type": "string",
674
+ "enum": [
675
+ "file",
676
+ "image",
677
+ "video",
678
+ "audio",
679
+ "web",
680
+ "other"
681
+ ]
682
+ },
683
+ "status": {
684
+ "type": "string",
685
+ "enum": [
686
+ "pending",
687
+ "ready",
688
+ "failed"
689
+ ]
690
+ },
691
+ "mimeType": {
692
+ "type": "string"
693
+ },
694
+ "url": {
695
+ "type": "string",
696
+ "format": "uri"
697
+ },
698
+ "size": {
699
+ "type": "integer",
700
+ "minimum": 0,
701
+ "maximum": 9007199254740991
702
+ },
703
+ "sourceEventId": {
704
+ "type": "string",
705
+ "minLength": 1,
706
+ "maxLength": 256
707
+ }
708
+ },
709
+ "required": [
710
+ "artifactId",
711
+ "name",
712
+ "kind",
713
+ "status"
714
+ ],
715
+ "additionalProperties": false
716
+ }
717
+ },
718
+ "required": [
719
+ "contract",
720
+ "eventId",
721
+ "sessionId",
722
+ "sequence",
723
+ "idempotencyKey",
724
+ "occurredAt",
725
+ "eventType",
726
+ "payload"
727
+ ],
728
+ "additionalProperties": false
729
+ },
730
+ {
731
+ "type": "object",
732
+ "properties": {
733
+ "contract": {
734
+ "type": "string",
735
+ "const": "AgentSessionEvent"
736
+ },
737
+ "eventId": {
738
+ "type": "string",
739
+ "minLength": 1,
740
+ "maxLength": 256
741
+ },
742
+ "sessionId": {
743
+ "type": "string",
744
+ "minLength": 1,
745
+ "maxLength": 256
746
+ },
747
+ "sequence": {
748
+ "type": "integer",
749
+ "minimum": 0,
750
+ "maximum": 9007199254740991
751
+ },
752
+ "idempotencyKey": {
753
+ "type": "string",
754
+ "minLength": 1,
755
+ "maxLength": 256
756
+ },
757
+ "occurredAt": {
758
+ "type": "string",
759
+ "format": "date-time",
760
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
761
+ },
762
+ "eventType": {
763
+ "type": "string",
764
+ "const": "usage"
765
+ },
766
+ "payload": {
767
+ "type": "object",
768
+ "properties": {
769
+ "inputTokens": {
770
+ "type": "integer",
771
+ "minimum": 0,
772
+ "maximum": 9007199254740991
773
+ },
774
+ "outputTokens": {
775
+ "type": "integer",
776
+ "minimum": 0,
777
+ "maximum": 9007199254740991
778
+ },
779
+ "totalTokens": {
780
+ "type": "integer",
781
+ "minimum": 0,
782
+ "maximum": 9007199254740991
783
+ },
784
+ "contextTokens": {
785
+ "type": "integer",
786
+ "minimum": 0,
787
+ "maximum": 9007199254740991
788
+ },
789
+ "contextWindow": {
790
+ "type": "integer",
791
+ "exclusiveMinimum": 0,
792
+ "maximum": 9007199254740991
793
+ }
794
+ },
795
+ "additionalProperties": false
796
+ }
797
+ },
798
+ "required": [
799
+ "contract",
800
+ "eventId",
801
+ "sessionId",
802
+ "sequence",
803
+ "idempotencyKey",
804
+ "occurredAt",
805
+ "eventType",
806
+ "payload"
807
+ ],
808
+ "additionalProperties": false
809
+ },
810
+ {
811
+ "type": "object",
812
+ "properties": {
813
+ "contract": {
814
+ "type": "string",
815
+ "const": "AgentSessionEvent"
816
+ },
817
+ "eventId": {
818
+ "type": "string",
819
+ "minLength": 1,
820
+ "maxLength": 256
821
+ },
822
+ "sessionId": {
823
+ "type": "string",
824
+ "minLength": 1,
825
+ "maxLength": 256
826
+ },
827
+ "sequence": {
828
+ "type": "integer",
829
+ "minimum": 0,
830
+ "maximum": 9007199254740991
831
+ },
832
+ "idempotencyKey": {
833
+ "type": "string",
834
+ "minLength": 1,
835
+ "maxLength": 256
836
+ },
837
+ "occurredAt": {
838
+ "type": "string",
839
+ "format": "date-time",
840
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
841
+ },
842
+ "eventType": {
843
+ "type": "string",
844
+ "const": "resume"
845
+ },
846
+ "payload": {
847
+ "type": "object",
848
+ "properties": {
849
+ "resumable": {
850
+ "type": "boolean"
851
+ },
852
+ "state": {
853
+ "type": "object",
854
+ "propertyNames": {
855
+ "type": "string"
856
+ },
857
+ "additionalProperties": {
858
+ "$ref": "#/$defs/__schema0"
859
+ }
860
+ },
861
+ "reason": {
862
+ "type": "string"
863
+ }
864
+ },
865
+ "required": [
866
+ "resumable"
867
+ ],
868
+ "additionalProperties": false
869
+ }
870
+ },
871
+ "required": [
872
+ "contract",
873
+ "eventId",
874
+ "sessionId",
875
+ "sequence",
876
+ "idempotencyKey",
877
+ "occurredAt",
878
+ "eventType",
879
+ "payload"
880
+ ],
881
+ "additionalProperties": false
882
+ },
883
+ {
884
+ "type": "object",
885
+ "properties": {
886
+ "contract": {
887
+ "type": "string",
888
+ "const": "AgentSessionEvent"
889
+ },
890
+ "eventId": {
891
+ "type": "string",
892
+ "minLength": 1,
893
+ "maxLength": 256
894
+ },
895
+ "sessionId": {
896
+ "type": "string",
897
+ "minLength": 1,
898
+ "maxLength": 256
899
+ },
900
+ "sequence": {
901
+ "type": "integer",
902
+ "minimum": 0,
903
+ "maximum": 9007199254740991
904
+ },
905
+ "idempotencyKey": {
906
+ "type": "string",
907
+ "minLength": 1,
908
+ "maxLength": 256
909
+ },
910
+ "occurredAt": {
911
+ "type": "string",
912
+ "format": "date-time",
913
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
914
+ },
915
+ "eventType": {
916
+ "type": "string",
917
+ "const": "error"
918
+ },
919
+ "payload": {
920
+ "type": "object",
921
+ "properties": {
922
+ "code": {
923
+ "type": "string",
924
+ "minLength": 1
925
+ },
926
+ "message": {
927
+ "type": "string"
928
+ },
929
+ "retryable": {
930
+ "type": "boolean"
931
+ },
932
+ "sourceEventId": {
933
+ "type": "string",
934
+ "minLength": 1,
935
+ "maxLength": 256
936
+ },
937
+ "details": {
938
+ "type": "object",
939
+ "propertyNames": {
940
+ "type": "string"
941
+ },
942
+ "additionalProperties": {
943
+ "$ref": "#/$defs/__schema0"
944
+ }
945
+ }
946
+ },
947
+ "required": [
948
+ "code",
949
+ "message",
950
+ "retryable"
951
+ ],
952
+ "additionalProperties": false
953
+ }
954
+ },
955
+ "required": [
956
+ "contract",
957
+ "eventId",
958
+ "sessionId",
959
+ "sequence",
960
+ "idempotencyKey",
961
+ "occurredAt",
962
+ "eventType",
963
+ "payload"
964
+ ],
965
+ "additionalProperties": false
966
+ },
967
+ {
968
+ "type": "object",
969
+ "properties": {
970
+ "contract": {
971
+ "type": "string",
972
+ "const": "AgentSessionEvent"
973
+ },
974
+ "eventId": {
975
+ "type": "string",
976
+ "minLength": 1,
977
+ "maxLength": 256
978
+ },
979
+ "sessionId": {
980
+ "type": "string",
981
+ "minLength": 1,
982
+ "maxLength": 256
983
+ },
984
+ "sequence": {
985
+ "type": "integer",
986
+ "minimum": 0,
987
+ "maximum": 9007199254740991
988
+ },
989
+ "idempotencyKey": {
990
+ "type": "string",
991
+ "minLength": 1,
992
+ "maxLength": 256
993
+ },
994
+ "occurredAt": {
995
+ "type": "string",
996
+ "format": "date-time",
997
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
998
+ },
999
+ "eventType": {
1000
+ "type": "string",
1001
+ "const": "diff"
1002
+ },
1003
+ "payload": {
1004
+ "type": "object",
1005
+ "properties": {
1006
+ "path": {
1007
+ "type": "string",
1008
+ "minLength": 1
1009
+ },
1010
+ "status": {
1011
+ "type": "string",
1012
+ "enum": [
1013
+ "added",
1014
+ "modified",
1015
+ "deleted",
1016
+ "renamed"
1017
+ ]
1018
+ },
1019
+ "patch": {
1020
+ "type": "string"
1021
+ }
1022
+ },
1023
+ "required": [
1024
+ "path",
1025
+ "status"
1026
+ ],
1027
+ "additionalProperties": false
1028
+ }
1029
+ },
1030
+ "required": [
1031
+ "contract",
1032
+ "eventId",
1033
+ "sessionId",
1034
+ "sequence",
1035
+ "idempotencyKey",
1036
+ "occurredAt",
1037
+ "eventType",
1038
+ "payload"
1039
+ ],
1040
+ "additionalProperties": false
1041
+ },
1042
+ {
1043
+ "type": "object",
1044
+ "properties": {
1045
+ "contract": {
1046
+ "type": "string",
1047
+ "const": "AgentSessionEvent"
1048
+ },
1049
+ "eventId": {
1050
+ "type": "string",
1051
+ "minLength": 1,
1052
+ "maxLength": 256
1053
+ },
1054
+ "sessionId": {
1055
+ "type": "string",
1056
+ "minLength": 1,
1057
+ "maxLength": 256
1058
+ },
1059
+ "sequence": {
1060
+ "type": "integer",
1061
+ "minimum": 0,
1062
+ "maximum": 9007199254740991
1063
+ },
1064
+ "idempotencyKey": {
1065
+ "type": "string",
1066
+ "minLength": 1,
1067
+ "maxLength": 256
1068
+ },
1069
+ "occurredAt": {
1070
+ "type": "string",
1071
+ "format": "date-time",
1072
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1073
+ },
1074
+ "eventType": {
1075
+ "type": "string",
1076
+ "const": "workspace-file"
1077
+ },
1078
+ "payload": {
1079
+ "type": "object",
1080
+ "properties": {
1081
+ "path": {
1082
+ "type": "string",
1083
+ "minLength": 1
1084
+ },
1085
+ "operation": {
1086
+ "type": "string",
1087
+ "enum": [
1088
+ "upsert",
1089
+ "delete"
1090
+ ]
1091
+ },
1092
+ "mimeType": {
1093
+ "type": "string"
1094
+ },
1095
+ "size": {
1096
+ "type": "integer",
1097
+ "minimum": 0,
1098
+ "maximum": 9007199254740991
1099
+ }
1100
+ },
1101
+ "required": [
1102
+ "path",
1103
+ "operation"
1104
+ ],
1105
+ "additionalProperties": false
1106
+ }
1107
+ },
1108
+ "required": [
1109
+ "contract",
1110
+ "eventId",
1111
+ "sessionId",
1112
+ "sequence",
1113
+ "idempotencyKey",
1114
+ "occurredAt",
1115
+ "eventType",
1116
+ "payload"
1117
+ ],
1118
+ "additionalProperties": false
1119
+ },
1120
+ {
1121
+ "type": "object",
1122
+ "properties": {
1123
+ "contract": {
1124
+ "type": "string",
1125
+ "const": "AgentSessionEvent"
1126
+ },
1127
+ "eventId": {
1128
+ "type": "string",
1129
+ "minLength": 1,
1130
+ "maxLength": 256
1131
+ },
1132
+ "sessionId": {
1133
+ "type": "string",
1134
+ "minLength": 1,
1135
+ "maxLength": 256
1136
+ },
1137
+ "sequence": {
1138
+ "type": "integer",
1139
+ "minimum": 0,
1140
+ "maximum": 9007199254740991
1141
+ },
1142
+ "idempotencyKey": {
1143
+ "type": "string",
1144
+ "minLength": 1,
1145
+ "maxLength": 256
1146
+ },
1147
+ "occurredAt": {
1148
+ "type": "string",
1149
+ "format": "date-time",
1150
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1151
+ },
1152
+ "eventType": {
1153
+ "type": "string",
1154
+ "const": "terminal"
1155
+ },
1156
+ "payload": {
1157
+ "type": "object",
1158
+ "properties": {
1159
+ "terminalId": {
1160
+ "type": "string",
1161
+ "minLength": 1,
1162
+ "maxLength": 256
1163
+ },
1164
+ "stream": {
1165
+ "type": "string",
1166
+ "enum": [
1167
+ "stdin",
1168
+ "stdout",
1169
+ "stderr",
1170
+ "status"
1171
+ ]
1172
+ },
1173
+ "chunk": {
1174
+ "type": "string"
1175
+ },
1176
+ "exitCode": {
1177
+ "type": "integer",
1178
+ "minimum": -9007199254740991,
1179
+ "maximum": 9007199254740991
1180
+ }
1181
+ },
1182
+ "required": [
1183
+ "terminalId",
1184
+ "stream",
1185
+ "chunk"
1186
+ ],
1187
+ "additionalProperties": false
1188
+ }
1189
+ },
1190
+ "required": [
1191
+ "contract",
1192
+ "eventId",
1193
+ "sessionId",
1194
+ "sequence",
1195
+ "idempotencyKey",
1196
+ "occurredAt",
1197
+ "eventType",
1198
+ "payload"
1199
+ ],
1200
+ "additionalProperties": false
1201
+ },
1202
+ {
1203
+ "type": "object",
1204
+ "properties": {
1205
+ "contract": {
1206
+ "type": "string",
1207
+ "const": "AgentSessionEvent"
1208
+ },
1209
+ "eventId": {
1210
+ "type": "string",
1211
+ "minLength": 1,
1212
+ "maxLength": 256
1213
+ },
1214
+ "sessionId": {
1215
+ "type": "string",
1216
+ "minLength": 1,
1217
+ "maxLength": 256
1218
+ },
1219
+ "sequence": {
1220
+ "type": "integer",
1221
+ "minimum": 0,
1222
+ "maximum": 9007199254740991
1223
+ },
1224
+ "idempotencyKey": {
1225
+ "type": "string",
1226
+ "minLength": 1,
1227
+ "maxLength": 256
1228
+ },
1229
+ "occurredAt": {
1230
+ "type": "string",
1231
+ "format": "date-time",
1232
+ "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
1233
+ },
1234
+ "eventType": {
1235
+ "type": "string",
1236
+ "const": "test-result"
1237
+ },
1238
+ "payload": {
1239
+ "type": "object",
1240
+ "properties": {
1241
+ "testId": {
1242
+ "type": "string",
1243
+ "minLength": 1,
1244
+ "maxLength": 256
1245
+ },
1246
+ "name": {
1247
+ "type": "string"
1248
+ },
1249
+ "status": {
1250
+ "type": "string",
1251
+ "enum": [
1252
+ "running",
1253
+ "passed",
1254
+ "failed",
1255
+ "skipped"
1256
+ ]
1257
+ },
1258
+ "durationMs": {
1259
+ "type": "number",
1260
+ "minimum": 0
1261
+ },
1262
+ "output": {
1263
+ "type": "string"
1264
+ }
1265
+ },
1266
+ "required": [
1267
+ "testId",
1268
+ "name",
1269
+ "status"
1270
+ ],
1271
+ "additionalProperties": false
1272
+ }
1273
+ },
1274
+ "required": [
1275
+ "contract",
1276
+ "eventId",
1277
+ "sessionId",
1278
+ "sequence",
1279
+ "idempotencyKey",
1280
+ "occurredAt",
1281
+ "eventType",
1282
+ "payload"
1283
+ ],
1284
+ "additionalProperties": false
1285
+ }
1286
+ ],
1287
+ "$defs": {
1288
+ "__schema0": {
1289
+ "anyOf": [
1290
+ {
1291
+ "type": "string"
1292
+ },
1293
+ {
1294
+ "type": "number"
1295
+ },
1296
+ {
1297
+ "type": "boolean"
1298
+ },
1299
+ {
1300
+ "type": "null"
1301
+ },
1302
+ {
1303
+ "type": "array",
1304
+ "items": {
1305
+ "$ref": "#/$defs/__schema0"
1306
+ }
1307
+ },
1308
+ {
1309
+ "type": "object",
1310
+ "propertyNames": {
1311
+ "type": "string"
1312
+ },
1313
+ "additionalProperties": {
1314
+ "$ref": "#/$defs/__schema0"
1315
+ }
1316
+ }
1317
+ ]
1318
+ }
1319
+ },
1320
+ "$id": "https://schemas.infmonkeys.com/contracts/agent-session-event.schema.json",
1321
+ "title": "agent-session-event"
1322
+ }