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