@runfile-ai/schemas 0.1.2 → 0.4.0

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.
@@ -11,10 +11,23 @@
11
11
  "type": "string",
12
12
  "pattern": "^b_[0-9A-HJKMNP-TV-Z]{26}$"
13
13
  },
14
- "events": {
14
+ "items": {
15
15
  "type": "array",
16
16
  "items": {
17
- "$ref": "#/definitions/EventSubmission"
17
+ "anyOf": [
18
+ {
19
+ "$ref": "#/definitions/RunCreateItem"
20
+ },
21
+ {
22
+ "$ref": "#/definitions/RunUpdateItem"
23
+ },
24
+ {
25
+ "$ref": "#/definitions/RunEndItem"
26
+ },
27
+ {
28
+ "$ref": "#/definitions/EventItem"
29
+ }
30
+ ]
18
31
  },
19
32
  "minItems": 1,
20
33
  "maxItems": 100
@@ -22,49 +35,194 @@
22
35
  },
23
36
  "required": [
24
37
  "batch_id",
25
- "events"
38
+ "items"
26
39
  ],
27
40
  "additionalProperties": false
28
41
  },
29
- "EventSubmission": {
42
+ "RunCreateItem": {
30
43
  "type": "object",
31
44
  "properties": {
32
- "schema_version": {
45
+ "type": {
33
46
  "type": "string",
34
- "pattern": "^\\d+\\.\\d+\\.\\d+$"
47
+ "const": "run_create"
35
48
  },
36
- "event_id": {
49
+ "run": {
50
+ "$ref": "#/definitions/RunSubmission"
51
+ }
52
+ },
53
+ "required": [
54
+ "type",
55
+ "run"
56
+ ],
57
+ "additionalProperties": false
58
+ },
59
+ "RunUpdateItem": {
60
+ "type": "object",
61
+ "properties": {
62
+ "type": {
37
63
  "type": "string",
38
- "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
64
+ "const": "run_update"
39
65
  },
40
- "agent_run_id": {
66
+ "run_id": {
41
67
  "type": "string",
42
68
  "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
43
69
  },
44
- "parent_event_id": {
45
- "anyOf": [
46
- {
47
- "$ref": "#/definitions/EventSubmission/properties/event_id"
48
- },
49
- {
50
- "type": "null"
51
- }
70
+ "lifecycle_state": {
71
+ "type": "string",
72
+ "enum": [
73
+ "active",
74
+ "awaiting_human",
75
+ "awaiting_webhook",
76
+ "awaiting_schedule",
77
+ "ended"
52
78
  ]
53
79
  },
54
- "captured_at": {
80
+ "triggered_by_event_id": {
81
+ "type": "string",
82
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
83
+ }
84
+ },
85
+ "required": [
86
+ "type",
87
+ "run_id",
88
+ "lifecycle_state",
89
+ "triggered_by_event_id"
90
+ ],
91
+ "additionalProperties": false
92
+ },
93
+ "RunEndItem": {
94
+ "type": "object",
95
+ "properties": {
96
+ "type": {
97
+ "type": "string",
98
+ "const": "run_end"
99
+ },
100
+ "run_id": {
101
+ "$ref": "#/definitions/RunUpdateItem/properties/run_id"
102
+ },
103
+ "ended_at": {
55
104
  "type": "string",
56
105
  "format": "date-time"
57
106
  },
58
- "wall_clock_source": {
107
+ "outcome": {
59
108
  "type": "string",
60
109
  "enum": [
61
- "aws_time_sync",
62
- "ntp",
63
- "host_system",
64
- "unknown"
110
+ "success",
111
+ "failure",
112
+ "incomplete",
113
+ "abandoned"
65
114
  ]
66
115
  },
67
- "sdk": {
116
+ "final_event_id": {
117
+ "$ref": "#/definitions/RunUpdateItem/properties/triggered_by_event_id"
118
+ }
119
+ },
120
+ "required": [
121
+ "type",
122
+ "run_id",
123
+ "ended_at",
124
+ "outcome"
125
+ ],
126
+ "additionalProperties": false
127
+ },
128
+ "EventItem": {
129
+ "type": "object",
130
+ "properties": {
131
+ "type": {
132
+ "type": "string",
133
+ "const": "event"
134
+ },
135
+ "event": {
136
+ "$ref": "#/definitions/EventSubmission"
137
+ }
138
+ },
139
+ "required": [
140
+ "type",
141
+ "event"
142
+ ],
143
+ "additionalProperties": false
144
+ },
145
+ "RunSubmission": {
146
+ "type": "object",
147
+ "properties": {
148
+ "schema_version": {
149
+ "type": "string",
150
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
151
+ },
152
+ "run_id": {
153
+ "$ref": "#/definitions/RunUpdateItem/properties/run_id"
154
+ },
155
+ "agent_identity": {
156
+ "type": "string",
157
+ "pattern": "^did:[a-z][a-z0-9]*:[A-Za-z0-9._:-]+$"
158
+ },
159
+ "conversation_id": {
160
+ "type": "string",
161
+ "maxLength": 256
162
+ },
163
+ "lifecycle_state": {
164
+ "type": "string",
165
+ "const": "active"
166
+ },
167
+ "started_at": {
168
+ "type": "string",
169
+ "format": "date-time"
170
+ },
171
+ "delegated_from": {
172
+ "type": "object",
173
+ "properties": {
174
+ "run_id": {
175
+ "type": "string",
176
+ "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
177
+ },
178
+ "event_id": {
179
+ "type": "string",
180
+ "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
181
+ }
182
+ },
183
+ "required": [
184
+ "run_id"
185
+ ],
186
+ "additionalProperties": false
187
+ },
188
+ "handed_off_from": {
189
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from"
190
+ },
191
+ "scheduled_from": {
192
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from"
193
+ },
194
+ "invoked_by": {
195
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from"
196
+ },
197
+ "continued_from": {
198
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from"
199
+ },
200
+ "environment": {
201
+ "type": "string",
202
+ "enum": [
203
+ "production",
204
+ "staging",
205
+ "development"
206
+ ]
207
+ },
208
+ "labels": {
209
+ "type": "object",
210
+ "additionalProperties": {
211
+ "type": "string",
212
+ "maxLength": 128
213
+ },
214
+ "propertyNames": {
215
+ "pattern": "^[a-z][a-z0-9_]{0,31}$"
216
+ },
217
+ "maxProperties": 16
218
+ },
219
+ "redaction_policy_version": {
220
+ "$ref": "#/definitions/RunSubmission/properties/schema_version"
221
+ },
222
+ "regulatory_scope_version": {
223
+ "$ref": "#/definitions/RunSubmission/properties/schema_version"
224
+ },
225
+ "sdk_at_start": {
68
226
  "type": "object",
69
227
  "properties": {
70
228
  "name": {
@@ -87,15 +245,22 @@
87
245
  "openai_agents_js",
88
246
  "anthropic_claude",
89
247
  "anthropic_claude_js",
248
+ "claude_agent_sdk",
90
249
  "mastra",
91
250
  "vercel_ai_sdk",
251
+ "pydantic_ai",
252
+ "crewai",
92
253
  "mcp_client",
93
254
  "otel_generic",
94
255
  "manual"
95
256
  ]
96
257
  },
97
258
  "framework_version": {
98
- "$ref": "#/definitions/EventSubmission/properties/sdk/properties/version"
259
+ "$ref": "#/definitions/RunSubmission/properties/sdk_at_start/properties/version"
260
+ },
261
+ "adapter": {
262
+ "type": "string",
263
+ "maxLength": 64
99
264
  },
100
265
  "host": {
101
266
  "type": "string",
@@ -109,6 +274,71 @@
109
274
  ],
110
275
  "additionalProperties": false
111
276
  },
277
+ "prev_event_hash_intent": {
278
+ "type": "string",
279
+ "pattern": "^sha256:[a-f0-9]{64}$"
280
+ }
281
+ },
282
+ "required": [
283
+ "schema_version",
284
+ "run_id",
285
+ "agent_identity",
286
+ "lifecycle_state",
287
+ "started_at",
288
+ "redaction_policy_version"
289
+ ],
290
+ "additionalProperties": false
291
+ },
292
+ "EventSubmission": {
293
+ "type": "object",
294
+ "properties": {
295
+ "schema_version": {
296
+ "$ref": "#/definitions/RunSubmission/properties/schema_version"
297
+ },
298
+ "event_id": {
299
+ "$ref": "#/definitions/RunUpdateItem/properties/triggered_by_event_id"
300
+ },
301
+ "run_id": {
302
+ "$ref": "#/definitions/RunUpdateItem/properties/run_id"
303
+ },
304
+ "parent_event_id": {
305
+ "anyOf": [
306
+ {
307
+ "$ref": "#/definitions/RunUpdateItem/properties/triggered_by_event_id"
308
+ },
309
+ {
310
+ "type": "null"
311
+ }
312
+ ]
313
+ },
314
+ "parallel_group_id": {
315
+ "type": "string",
316
+ "pattern": "^pg_[0-9A-HJKMNP-TV-Z]{26}$"
317
+ },
318
+ "segment_index": {
319
+ "type": "integer",
320
+ "minimum": 0
321
+ },
322
+ "local_seq": {
323
+ "type": "integer",
324
+ "minimum": 0
325
+ },
326
+ "captured_at": {
327
+ "type": "string",
328
+ "format": "date-time"
329
+ },
330
+ "wall_clock_source": {
331
+ "type": "string",
332
+ "enum": [
333
+ "aws_time_sync",
334
+ "ntp",
335
+ "host_system",
336
+ "unknown"
337
+ ]
338
+ },
339
+ "sdk": {
340
+ "$ref": "#/definitions/RunSubmission/properties/sdk_at_start"
341
+ },
112
342
  "actor": {
113
343
  "type": "object",
114
344
  "properties": {
@@ -159,17 +389,28 @@
159
389
  "kind": {
160
390
  "type": "string",
161
391
  "enum": [
162
- "agent_run_start",
163
- "agent_run_end",
164
392
  "graph_node_enter",
165
393
  "graph_node_exit",
166
394
  "llm_call",
395
+ "llm_call_chunk",
167
396
  "tool_call",
168
397
  "tool_result",
398
+ "tool_approval_requested",
399
+ "tool_approval_granted",
400
+ "tool_approval_denied",
169
401
  "state_read",
170
402
  "state_write",
171
403
  "decision",
404
+ "run_create",
405
+ "run_end",
406
+ "run_suspend",
407
+ "run_resume",
408
+ "run_abandon",
409
+ "delegate",
172
410
  "handoff",
411
+ "schedule_task",
412
+ "parallel_group_open",
413
+ "parallel_group_close",
173
414
  "human_approval",
174
415
  "human_input",
175
416
  "policy_check",
@@ -219,7 +460,8 @@
219
460
  "pii",
220
461
  "phi",
221
462
  "pci",
222
- "fci"
463
+ "fci",
464
+ "audit_of_audit"
223
465
  ]
224
466
  },
225
467
  "regulatory_tags": {
@@ -274,6 +516,9 @@
274
516
  "type": "number",
275
517
  "minimum": 0,
276
518
  "maximum": 2
519
+ },
520
+ "streaming": {
521
+ "type": "boolean"
277
522
  }
278
523
  },
279
524
  "required": [
@@ -317,8 +562,7 @@
317
562
  "maxItems": 16
318
563
  },
319
564
  "reversed_by_event": {
320
- "type": "string",
321
- "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$"
565
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from/properties/event_id"
322
566
  }
323
567
  },
324
568
  "required": [
@@ -326,14 +570,238 @@
326
570
  ],
327
571
  "additionalProperties": false
328
572
  },
573
+ "suspension_details": {
574
+ "type": "object",
575
+ "properties": {
576
+ "reason": {
577
+ "type": "string",
578
+ "enum": [
579
+ "awaiting_human_approval",
580
+ "awaiting_human_input",
581
+ "awaiting_webhook",
582
+ "awaiting_schedule",
583
+ "awaiting_external_system",
584
+ "awaiting_subagent",
585
+ "other"
586
+ ]
587
+ },
588
+ "expected_resumer": {
589
+ "type": "string"
590
+ },
591
+ "expected_resume_by": {
592
+ "type": "string",
593
+ "format": "date-time"
594
+ },
595
+ "detection_source": {
596
+ "type": "string",
597
+ "enum": [
598
+ "framework_inferred",
599
+ "customer_explicit",
600
+ "derived"
601
+ ]
602
+ },
603
+ "framework_signal": {
604
+ "type": "object",
605
+ "properties": {
606
+ "framework": {
607
+ "type": "string",
608
+ "enum": [
609
+ "langgraph",
610
+ "openai_agents",
611
+ "claude_agent_sdk",
612
+ "vercel_ai_sdk",
613
+ "mcp",
614
+ "manual",
615
+ "otel"
616
+ ]
617
+ },
618
+ "signal_name": {
619
+ "type": "string",
620
+ "maxLength": 128
621
+ },
622
+ "signal_payload_hash": {
623
+ "$ref": "#/definitions/EventSubmission/properties/actor/properties/tool_version_hash"
624
+ }
625
+ },
626
+ "additionalProperties": false
627
+ }
628
+ },
629
+ "required": [
630
+ "reason"
631
+ ],
632
+ "additionalProperties": false
633
+ },
634
+ "resume_details": {
635
+ "type": "object",
636
+ "properties": {
637
+ "triggered_by": {
638
+ "type": "string",
639
+ "enum": [
640
+ "human_approval_granted",
641
+ "human_input_received",
642
+ "webhook_received",
643
+ "schedule_fired",
644
+ "external_system_response",
645
+ "subagent_completed",
646
+ "manual_resume",
647
+ "other"
648
+ ]
649
+ },
650
+ "resumer_principal": {
651
+ "$ref": "#/definitions/EventSubmission/properties/actor/properties/human_principal"
652
+ },
653
+ "suspension_duration_seconds": {
654
+ "type": "integer",
655
+ "minimum": 0
656
+ },
657
+ "suspension_started_event_id": {
658
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from/properties/event_id"
659
+ }
660
+ },
661
+ "required": [
662
+ "triggered_by"
663
+ ],
664
+ "additionalProperties": false
665
+ },
666
+ "delegation_details": {
667
+ "type": "object",
668
+ "properties": {
669
+ "delegated_run_id": {
670
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from/properties/run_id"
671
+ },
672
+ "delegated_agent_identity": {
673
+ "$ref": "#/definitions/EventSubmission/properties/actor/properties/agent_identity"
674
+ },
675
+ "wait_for_completion": {
676
+ "type": "boolean"
677
+ },
678
+ "framework_signal": {
679
+ "type": "string",
680
+ "enum": [
681
+ "langgraph_subgraph",
682
+ "openai_agents_as_tool",
683
+ "claude_agent_sdk_subagent",
684
+ "manual",
685
+ "other"
686
+ ]
687
+ }
688
+ },
689
+ "required": [
690
+ "delegated_run_id",
691
+ "delegated_agent_identity"
692
+ ],
693
+ "additionalProperties": false
694
+ },
695
+ "handoff_details": {
696
+ "type": "object",
697
+ "properties": {
698
+ "target_run_id": {
699
+ "$ref": "#/definitions/RunSubmission/properties/delegated_from/properties/run_id"
700
+ },
701
+ "target_agent_identity": {
702
+ "$ref": "#/definitions/EventSubmission/properties/actor/properties/agent_identity"
703
+ },
704
+ "handoff_reason": {
705
+ "type": "string",
706
+ "maxLength": 256
707
+ },
708
+ "framework_signal": {
709
+ "type": "string",
710
+ "enum": [
711
+ "openai_agents_handoff",
712
+ "langgraph_explicit",
713
+ "manual",
714
+ "other"
715
+ ]
716
+ }
717
+ },
718
+ "required": [
719
+ "target_run_id",
720
+ "target_agent_identity"
721
+ ],
722
+ "additionalProperties": false
723
+ },
329
724
  "payload_ref": {
330
725
  "$ref": "#/definitions/PayloadSubmission"
331
726
  },
727
+ "otel_attributes": {
728
+ "type": "object",
729
+ "properties": {
730
+ "gen_ai_system": {
731
+ "type": "string"
732
+ },
733
+ "gen_ai_operation_name": {
734
+ "type": "string"
735
+ },
736
+ "gen_ai_provider_name": {
737
+ "type": "string"
738
+ },
739
+ "gen_ai_request_model": {
740
+ "type": "string"
741
+ },
742
+ "gen_ai_response_model": {
743
+ "type": "string"
744
+ },
745
+ "gen_ai_request_temperature": {
746
+ "type": "number"
747
+ },
748
+ "gen_ai_request_top_p": {
749
+ "type": "number"
750
+ },
751
+ "gen_ai_request_max_tokens": {
752
+ "type": "integer"
753
+ },
754
+ "gen_ai_response_id": {
755
+ "type": "string"
756
+ },
757
+ "gen_ai_response_finish_reasons": {
758
+ "type": "array",
759
+ "items": {
760
+ "type": "string"
761
+ }
762
+ },
763
+ "gen_ai_usage_input_tokens": {
764
+ "type": "integer"
765
+ },
766
+ "gen_ai_usage_output_tokens": {
767
+ "type": "integer"
768
+ },
769
+ "gen_ai_tool_name": {
770
+ "type": "string"
771
+ },
772
+ "gen_ai_tool_call_id": {
773
+ "type": "string"
774
+ },
775
+ "gen_ai_agent_id": {
776
+ "type": "string"
777
+ },
778
+ "gen_ai_agent_name": {
779
+ "type": "string"
780
+ },
781
+ "gen_ai_agent_description": {
782
+ "type": "string"
783
+ },
784
+ "gen_ai_conversation_id": {
785
+ "type": "string"
786
+ },
787
+ "extra": {
788
+ "type": "object",
789
+ "additionalProperties": {
790
+ "type": [
791
+ "string",
792
+ "number",
793
+ "boolean"
794
+ ]
795
+ }
796
+ }
797
+ },
798
+ "additionalProperties": false
799
+ },
332
800
  "redaction_policy_version": {
333
- "$ref": "#/definitions/EventSubmission/properties/schema_version"
801
+ "$ref": "#/definitions/RunSubmission/properties/schema_version"
334
802
  },
335
803
  "regulatory_scope_version": {
336
- "$ref": "#/definitions/EventSubmission/properties/schema_version"
804
+ "$ref": "#/definitions/RunSubmission/properties/schema_version"
337
805
  },
338
806
  "anomaly_flags": {
339
807
  "type": "array",
@@ -345,6 +813,8 @@
345
813
  "enum": [
346
814
  "missing_ambient_context",
347
815
  "chain_break",
816
+ "sequence_gap",
817
+ "causality_violation",
348
818
  "out_of_order_arrival",
349
819
  "model_version_drift",
350
820
  "unknown_agent_identity",
@@ -352,7 +822,14 @@
352
822
  "policy_threshold_without_hitl",
353
823
  "unauthorized_tool_invocation",
354
824
  "redaction_policy_mismatch",
355
- "schema_version_warning"
825
+ "schema_version_warning",
826
+ "agent_identity_mismatch_with_run",
827
+ "suspension_sla_exceeded",
828
+ "apparent_crash_detected",
829
+ "active_duration_exceeds_threshold",
830
+ "framework_signal_unrecognised",
831
+ "otel_attribute_missing",
832
+ "delegation_loop_detected"
356
833
  ]
357
834
  },
358
835
  "severity": {
@@ -378,43 +855,186 @@
378
855
  "maxItems": 32
379
856
  },
380
857
  "environment": {
381
- "type": "string",
382
- "enum": [
383
- "production",
384
- "staging",
385
- "development"
386
- ]
858
+ "$ref": "#/definitions/RunSubmission/properties/environment"
387
859
  },
388
860
  "labels": {
389
- "type": "object",
390
- "additionalProperties": {
391
- "type": "string",
392
- "maxLength": 128
393
- },
394
- "propertyNames": {
395
- "pattern": "^[a-z][a-z0-9_]{0,31}$"
396
- }
861
+ "$ref": "#/definitions/RunSubmission/properties/labels"
397
862
  },
398
- "prev_hash_intent": {
399
- "type": "string",
400
- "pattern": "^sha256:[a-f0-9]{64}$"
863
+ "prev_event_hash_intent": {
864
+ "$ref": "#/definitions/RunSubmission/properties/prev_event_hash_intent"
401
865
  }
402
866
  },
403
867
  "required": [
404
868
  "schema_version",
405
869
  "event_id",
406
- "agent_run_id",
870
+ "run_id",
407
871
  "parent_event_id",
872
+ "segment_index",
873
+ "local_seq",
408
874
  "captured_at",
409
875
  "wall_clock_source",
410
876
  "sdk",
411
877
  "actor",
412
878
  "action",
413
- "subject",
414
879
  "redaction_policy_version",
415
- "prev_hash_intent"
880
+ "prev_event_hash_intent"
416
881
  ],
417
- "additionalProperties": false
882
+ "additionalProperties": false,
883
+ "allOf": [
884
+ {
885
+ "if": {
886
+ "properties": {
887
+ "action": {
888
+ "properties": {
889
+ "kind": {
890
+ "const": "llm_call"
891
+ }
892
+ }
893
+ }
894
+ }
895
+ },
896
+ "then": {
897
+ "required": [
898
+ "model_ref"
899
+ ]
900
+ }
901
+ },
902
+ {
903
+ "if": {
904
+ "properties": {
905
+ "action": {
906
+ "properties": {
907
+ "kind": {
908
+ "const": "decision"
909
+ }
910
+ }
911
+ }
912
+ }
913
+ },
914
+ "then": {
915
+ "required": [
916
+ "decision"
917
+ ]
918
+ }
919
+ },
920
+ {
921
+ "if": {
922
+ "properties": {
923
+ "action": {
924
+ "properties": {
925
+ "kind": {
926
+ "const": "run_suspend"
927
+ }
928
+ }
929
+ }
930
+ }
931
+ },
932
+ "then": {
933
+ "required": [
934
+ "suspension_details"
935
+ ]
936
+ }
937
+ },
938
+ {
939
+ "if": {
940
+ "properties": {
941
+ "action": {
942
+ "properties": {
943
+ "kind": {
944
+ "const": "run_resume"
945
+ }
946
+ }
947
+ }
948
+ }
949
+ },
950
+ "then": {
951
+ "required": [
952
+ "resume_details"
953
+ ]
954
+ }
955
+ },
956
+ {
957
+ "if": {
958
+ "properties": {
959
+ "action": {
960
+ "properties": {
961
+ "kind": {
962
+ "const": "delegate"
963
+ }
964
+ }
965
+ }
966
+ }
967
+ },
968
+ "then": {
969
+ "required": [
970
+ "delegation_details"
971
+ ]
972
+ }
973
+ },
974
+ {
975
+ "if": {
976
+ "properties": {
977
+ "action": {
978
+ "properties": {
979
+ "kind": {
980
+ "const": "handoff"
981
+ }
982
+ }
983
+ }
984
+ }
985
+ },
986
+ "then": {
987
+ "required": [
988
+ "handoff_details"
989
+ ]
990
+ }
991
+ },
992
+ {
993
+ "if": {
994
+ "properties": {
995
+ "actor": {
996
+ "properties": {
997
+ "type": {
998
+ "const": "agent"
999
+ }
1000
+ }
1001
+ }
1002
+ }
1003
+ },
1004
+ "then": {
1005
+ "properties": {
1006
+ "actor": {
1007
+ "required": [
1008
+ "agent_identity"
1009
+ ]
1010
+ }
1011
+ }
1012
+ }
1013
+ },
1014
+ {
1015
+ "if": {
1016
+ "properties": {
1017
+ "actor": {
1018
+ "properties": {
1019
+ "type": {
1020
+ "const": "tool"
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ },
1026
+ "then": {
1027
+ "properties": {
1028
+ "actor": {
1029
+ "required": [
1030
+ "tool_id",
1031
+ "tool_version_hash"
1032
+ ]
1033
+ }
1034
+ }
1035
+ }
1036
+ }
1037
+ ]
418
1038
  },
419
1039
  "PayloadSubmission": {
420
1040
  "type": "object",
@@ -424,7 +1044,7 @@
424
1044
  "maxLength": 1024
425
1045
  },
426
1046
  "sha256": {
427
- "$ref": "#/definitions/EventSubmission/properties/prev_hash_intent"
1047
+ "$ref": "#/definitions/RunSubmission/properties/prev_event_hash_intent"
428
1048
  },
429
1049
  "size_bytes": {
430
1050
  "type": "integer",
@@ -442,14 +1062,19 @@
442
1062
  "type": "string",
443
1063
  "maxLength": 4096
444
1064
  },
445
- "kms_key_arn": {
1065
+ "key_id": {
446
1066
  "type": "string",
447
- "pattern": "^arn:aws:kms:[a-z0-9-]+:[0-9]+:key\\/[a-f0-9-]+$"
1067
+ "maxLength": 256
1068
+ },
1069
+ "nonce": {
1070
+ "type": "string",
1071
+ "maxLength": 64
448
1072
  }
449
1073
  },
450
1074
  "required": [
451
1075
  "algorithm",
452
- "data_key_wrapped"
1076
+ "data_key_wrapped",
1077
+ "nonce"
453
1078
  ],
454
1079
  "additionalProperties": false
455
1080
  },
@@ -462,7 +1087,8 @@
462
1087
  "application/vnd.runfile.llm-response+json",
463
1088
  "application/vnd.runfile.tool-call+json",
464
1089
  "application/vnd.runfile.tool-result+json",
465
- "application/vnd.runfile.state-snapshot+json"
1090
+ "application/vnd.runfile.state-snapshot+json",
1091
+ "application/vnd.runfile.framework-signal+json"
466
1092
  ]
467
1093
  },
468
1094
  "redaction_applied": {
@@ -506,17 +1132,16 @@
506
1132
  "type": "object",
507
1133
  "properties": {
508
1134
  "batch_id": {
509
- "type": "string",
510
- "pattern": "^b_[0-9A-HJKMNP-TV-Z]{26}$"
1135
+ "$ref": "#/definitions/BatchSubmission/properties/batch_id"
511
1136
  },
512
1137
  "accepted_count": {
513
1138
  "type": "integer",
514
1139
  "minimum": 1
515
1140
  },
516
- "accepted_events": {
1141
+ "accepted_items": {
517
1142
  "type": "array",
518
1143
  "items": {
519
- "$ref": "#/definitions/AcceptedEvent"
1144
+ "$ref": "#/definitions/AcceptedItem"
520
1145
  }
521
1146
  },
522
1147
  "received_at": {
@@ -527,7 +1152,7 @@
527
1152
  "required": [
528
1153
  "batch_id",
529
1154
  "accepted_count",
530
- "accepted_events",
1155
+ "accepted_items",
531
1156
  "received_at"
532
1157
  ],
533
1158
  "additionalProperties": false
@@ -536,8 +1161,7 @@
536
1161
  "type": "object",
537
1162
  "properties": {
538
1163
  "batch_id": {
539
- "type": "string",
540
- "pattern": "^b_[0-9A-HJKMNP-TV-Z]{26}$"
1164
+ "$ref": "#/definitions/BatchSubmission/properties/batch_id"
541
1165
  },
542
1166
  "accepted_count": {
543
1167
  "type": "integer",
@@ -547,16 +1171,16 @@
547
1171
  "type": "integer",
548
1172
  "minimum": 1
549
1173
  },
550
- "accepted_events": {
1174
+ "accepted_items": {
551
1175
  "type": "array",
552
1176
  "items": {
553
- "$ref": "#/definitions/AcceptedEvent"
1177
+ "$ref": "#/definitions/AcceptedItem"
554
1178
  }
555
1179
  },
556
- "rejected_events": {
1180
+ "rejected_items": {
557
1181
  "type": "array",
558
1182
  "items": {
559
- "$ref": "#/definitions/EventRejection"
1183
+ "$ref": "#/definitions/RejectedItem"
560
1184
  }
561
1185
  },
562
1186
  "received_at": {
@@ -568,8 +1192,8 @@
568
1192
  "batch_id",
569
1193
  "accepted_count",
570
1194
  "rejected_count",
571
- "accepted_events",
572
- "rejected_events",
1195
+ "accepted_items",
1196
+ "rejected_items",
573
1197
  "received_at"
574
1198
  ],
575
1199
  "additionalProperties": false
@@ -578,31 +1202,39 @@
578
1202
  "type": "object",
579
1203
  "properties": {
580
1204
  "batch_id": {
581
- "type": "string",
582
- "pattern": "^b_[0-9A-HJKMNP-TV-Z]{26}$"
1205
+ "$ref": "#/definitions/BatchSubmission/properties/batch_id"
583
1206
  },
584
1207
  "error": {
585
1208
  "$ref": "#/definitions/IngestError"
586
1209
  },
587
- "rejected_events": {
1210
+ "rejected_items": {
588
1211
  "type": "array",
589
1212
  "items": {
590
- "$ref": "#/definitions/EventRejection"
1213
+ "$ref": "#/definitions/RejectedItem"
591
1214
  }
592
1215
  }
593
1216
  },
594
1217
  "required": [
595
1218
  "batch_id",
596
1219
  "error",
597
- "rejected_events"
1220
+ "rejected_items"
598
1221
  ],
599
1222
  "additionalProperties": false
600
1223
  },
601
- "AcceptedEvent": {
1224
+ "AcceptedItem": {
602
1225
  "type": "object",
603
1226
  "properties": {
604
- "event_id": {
605
- "$ref": "#/definitions/EventSubmission/properties/event_id"
1227
+ "type": {
1228
+ "type": "string",
1229
+ "enum": [
1230
+ "run_create",
1231
+ "run_update",
1232
+ "run_end",
1233
+ "event"
1234
+ ]
1235
+ },
1236
+ "id": {
1237
+ "type": "string"
606
1238
  },
607
1239
  "accepted_at": {
608
1240
  "type": "string",
@@ -617,23 +1249,30 @@
617
1249
  }
618
1250
  },
619
1251
  "required": [
620
- "event_id",
621
- "accepted_at",
622
- "payload_s3_uri"
1252
+ "type",
1253
+ "id",
1254
+ "accepted_at"
623
1255
  ],
624
1256
  "additionalProperties": false
625
1257
  },
626
- "EventRejection": {
1258
+ "RejectedItem": {
627
1259
  "type": "object",
628
1260
  "properties": {
629
- "event_id": {
1261
+ "type": {
1262
+ "$ref": "#/definitions/AcceptedItem/properties/type"
1263
+ },
1264
+ "id": {
630
1265
  "type": "string"
631
1266
  },
632
1267
  "error_code": {
633
1268
  "type": "string",
634
1269
  "enum": [
635
1270
  "schema_validation_failed",
636
- "duplicate_event_id",
1271
+ "duplicate_id",
1272
+ "run_not_found",
1273
+ "run_already_ended",
1274
+ "run_lifecycle_transition_invalid",
1275
+ "agent_identity_mismatch_with_run",
637
1276
  "payload_too_large",
638
1277
  "payload_sha256_mismatch",
639
1278
  "kms_key_unknown",
@@ -654,7 +1293,8 @@
654
1293
  }
655
1294
  },
656
1295
  "required": [
657
- "event_id",
1296
+ "type",
1297
+ "id",
658
1298
  "error_code",
659
1299
  "error_message"
660
1300
  ],
@@ -700,7 +1340,7 @@
700
1340
  "type": "object",
701
1341
  "properties": {
702
1342
  "policy_version": {
703
- "$ref": "#/definitions/EventSubmission/properties/schema_version"
1343
+ "$ref": "#/definitions/RunSubmission/properties/schema_version"
704
1344
  },
705
1345
  "classification_rules": {
706
1346
  "type": "array",
@@ -713,9 +1353,11 @@
713
1353
  "treatment": {
714
1354
  "type": "string",
715
1355
  "enum": [
716
- "redact",
1356
+ "drop",
717
1357
  "tokenize",
718
- "encrypt"
1358
+ "hash",
1359
+ "pass_through",
1360
+ "tokenize_with_fallback"
719
1361
  ]
720
1362
  },
721
1363
  "detector": {
@@ -754,6 +1396,21 @@
754
1396
  "BatchSubmission": {
755
1397
  "$ref": "#/definitions/BatchSubmission"
756
1398
  },
1399
+ "RunCreateItem": {
1400
+ "$ref": "#/definitions/RunCreateItem"
1401
+ },
1402
+ "RunUpdateItem": {
1403
+ "$ref": "#/definitions/RunUpdateItem"
1404
+ },
1405
+ "RunEndItem": {
1406
+ "$ref": "#/definitions/RunEndItem"
1407
+ },
1408
+ "EventItem": {
1409
+ "$ref": "#/definitions/EventItem"
1410
+ },
1411
+ "RunSubmission": {
1412
+ "$ref": "#/definitions/RunSubmission"
1413
+ },
757
1414
  "EventSubmission": {
758
1415
  "$ref": "#/definitions/EventSubmission"
759
1416
  },
@@ -769,11 +1426,11 @@
769
1426
  "BatchRejected": {
770
1427
  "$ref": "#/definitions/BatchRejected"
771
1428
  },
772
- "AcceptedEvent": {
773
- "$ref": "#/definitions/AcceptedEvent"
1429
+ "AcceptedItem": {
1430
+ "$ref": "#/definitions/AcceptedItem"
774
1431
  },
775
- "EventRejection": {
776
- "$ref": "#/definitions/EventRejection"
1432
+ "RejectedItem": {
1433
+ "$ref": "#/definitions/RejectedItem"
777
1434
  },
778
1435
  "IngestError": {
779
1436
  "$ref": "#/definitions/IngestError"
@@ -784,13 +1441,18 @@
784
1441
  },
785
1442
  "required": [
786
1443
  "BatchSubmission",
1444
+ "RunCreateItem",
1445
+ "RunUpdateItem",
1446
+ "RunEndItem",
1447
+ "EventItem",
1448
+ "RunSubmission",
787
1449
  "EventSubmission",
788
1450
  "PayloadSubmission",
789
1451
  "BatchAccepted",
790
1452
  "BatchPartial",
791
1453
  "BatchRejected",
792
- "AcceptedEvent",
793
- "EventRejection",
1454
+ "AcceptedItem",
1455
+ "RejectedItem",
794
1456
  "IngestError",
795
1457
  "RedactionPolicy"
796
1458
  ],