@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.
@@ -62,7 +62,7 @@
62
62
  "type": "string",
63
63
  "pattern": "^tnt_[0-9a-z]{12}$"
64
64
  },
65
- "agent_run_id": {
65
+ "run_id": {
66
66
  "type": "string",
67
67
  "pattern": "^run_[0-9A-HJKMNP-TV-Z]{26}$"
68
68
  },
@@ -76,6 +76,20 @@
76
76
  }
77
77
  ]
78
78
  },
79
+ "parallel_group_id": {
80
+ "type": "string",
81
+ "pattern": "^pg_[0-9A-HJKMNP-TV-Z]{26}$"
82
+ },
83
+ "segment_index": {
84
+ "type": "integer",
85
+ "minimum": 0,
86
+ "description": "Which execution segment of the run this event belongs to. 0 for the initial segment; incremented each time the run resumes after a suspension. With local_seq this gives a total order within a segment: (run_id, segment_index, local_seq)."
87
+ },
88
+ "local_seq": {
89
+ "type": "integer",
90
+ "minimum": 0,
91
+ "description": "Monotonic capture counter assigned by the SDK within a single process segment, starting at 0. Authoritative ordering for the hash chain within a segment; resets to 0 at the start of each segment. A gap (e.g. 0,1,3) means an event was lost (sequence_gap anomaly)."
92
+ },
79
93
  "captured_at": {
80
94
  "type": "string",
81
95
  "format": "date-time"
@@ -116,8 +130,11 @@
116
130
  "openai_agents_js",
117
131
  "anthropic_claude",
118
132
  "anthropic_claude_js",
133
+ "claude_agent_sdk",
119
134
  "mastra",
120
135
  "vercel_ai_sdk",
136
+ "pydantic_ai",
137
+ "crewai",
121
138
  "mcp_client",
122
139
  "otel_generic",
123
140
  "manual"
@@ -126,6 +143,10 @@
126
143
  "framework_version": {
127
144
  "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/sdk/properties/version"
128
145
  },
146
+ "adapter": {
147
+ "type": "string",
148
+ "maxLength": 64
149
+ },
129
150
  "host": {
130
151
  "type": "string",
131
152
  "maxLength": 256
@@ -188,17 +209,28 @@
188
209
  "kind": {
189
210
  "type": "string",
190
211
  "enum": [
191
- "agent_run_start",
192
- "agent_run_end",
193
212
  "graph_node_enter",
194
213
  "graph_node_exit",
195
214
  "llm_call",
215
+ "llm_call_chunk",
196
216
  "tool_call",
197
217
  "tool_result",
218
+ "tool_approval_requested",
219
+ "tool_approval_granted",
220
+ "tool_approval_denied",
198
221
  "state_read",
199
222
  "state_write",
200
223
  "decision",
224
+ "run_create",
225
+ "run_end",
226
+ "run_suspend",
227
+ "run_resume",
228
+ "run_abandon",
229
+ "delegate",
201
230
  "handoff",
231
+ "schedule_task",
232
+ "parallel_group_open",
233
+ "parallel_group_close",
202
234
  "human_approval",
203
235
  "human_input",
204
236
  "policy_check",
@@ -248,7 +280,8 @@
248
280
  "pii",
249
281
  "phi",
250
282
  "pci",
251
- "fci"
283
+ "fci",
284
+ "audit_of_audit"
252
285
  ]
253
286
  },
254
287
  "regulatory_tags": {
@@ -303,6 +336,9 @@
303
336
  "type": "number",
304
337
  "minimum": 0,
305
338
  "maximum": 2
339
+ },
340
+ "streaming": {
341
+ "type": "boolean"
306
342
  }
307
343
  },
308
344
  "required": [
@@ -354,6 +390,157 @@
354
390
  ],
355
391
  "additionalProperties": false
356
392
  },
393
+ "suspension_details": {
394
+ "type": "object",
395
+ "properties": {
396
+ "reason": {
397
+ "type": "string",
398
+ "enum": [
399
+ "awaiting_human_approval",
400
+ "awaiting_human_input",
401
+ "awaiting_webhook",
402
+ "awaiting_schedule",
403
+ "awaiting_external_system",
404
+ "awaiting_subagent",
405
+ "other"
406
+ ]
407
+ },
408
+ "expected_resumer": {
409
+ "type": "string"
410
+ },
411
+ "expected_resume_by": {
412
+ "type": "string",
413
+ "format": "date-time"
414
+ },
415
+ "detection_source": {
416
+ "type": "string",
417
+ "enum": [
418
+ "framework_inferred",
419
+ "customer_explicit",
420
+ "derived"
421
+ ]
422
+ },
423
+ "framework_signal": {
424
+ "type": "object",
425
+ "properties": {
426
+ "framework": {
427
+ "type": "string",
428
+ "enum": [
429
+ "langgraph",
430
+ "openai_agents",
431
+ "claude_agent_sdk",
432
+ "vercel_ai_sdk",
433
+ "mcp",
434
+ "manual",
435
+ "otel"
436
+ ]
437
+ },
438
+ "signal_name": {
439
+ "type": "string",
440
+ "maxLength": 128
441
+ },
442
+ "signal_payload_hash": {
443
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/actor/properties/tool_version_hash"
444
+ }
445
+ },
446
+ "additionalProperties": false
447
+ }
448
+ },
449
+ "required": [
450
+ "reason"
451
+ ],
452
+ "additionalProperties": false
453
+ },
454
+ "resume_details": {
455
+ "type": "object",
456
+ "properties": {
457
+ "triggered_by": {
458
+ "type": "string",
459
+ "enum": [
460
+ "human_approval_granted",
461
+ "human_input_received",
462
+ "webhook_received",
463
+ "schedule_fired",
464
+ "external_system_response",
465
+ "subagent_completed",
466
+ "manual_resume",
467
+ "other"
468
+ ]
469
+ },
470
+ "resumer_principal": {
471
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/actor/properties/human_principal"
472
+ },
473
+ "suspension_duration_seconds": {
474
+ "type": "integer",
475
+ "minimum": 0
476
+ },
477
+ "suspension_started_event_id": {
478
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/event_id"
479
+ }
480
+ },
481
+ "required": [
482
+ "triggered_by"
483
+ ],
484
+ "additionalProperties": false
485
+ },
486
+ "delegation_details": {
487
+ "type": "object",
488
+ "properties": {
489
+ "delegated_run_id": {
490
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/run_id"
491
+ },
492
+ "delegated_agent_identity": {
493
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/actor/properties/agent_identity"
494
+ },
495
+ "wait_for_completion": {
496
+ "type": "boolean"
497
+ },
498
+ "framework_signal": {
499
+ "type": "string",
500
+ "enum": [
501
+ "langgraph_subgraph",
502
+ "openai_agents_as_tool",
503
+ "claude_agent_sdk_subagent",
504
+ "manual",
505
+ "other"
506
+ ]
507
+ }
508
+ },
509
+ "required": [
510
+ "delegated_run_id",
511
+ "delegated_agent_identity"
512
+ ],
513
+ "additionalProperties": false
514
+ },
515
+ "handoff_details": {
516
+ "type": "object",
517
+ "properties": {
518
+ "target_run_id": {
519
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/run_id"
520
+ },
521
+ "target_agent_identity": {
522
+ "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/actor/properties/agent_identity"
523
+ },
524
+ "handoff_reason": {
525
+ "type": "string",
526
+ "maxLength": 256
527
+ },
528
+ "framework_signal": {
529
+ "type": "string",
530
+ "enum": [
531
+ "openai_agents_handoff",
532
+ "langgraph_explicit",
533
+ "manual",
534
+ "other"
535
+ ]
536
+ }
537
+ },
538
+ "required": [
539
+ "target_run_id",
540
+ "target_agent_identity"
541
+ ],
542
+ "additionalProperties": false
543
+ },
357
544
  "payload_ref": {
358
545
  "type": "object",
359
546
  "properties": {
@@ -381,14 +568,19 @@
381
568
  "type": "string",
382
569
  "maxLength": 4096
383
570
  },
384
- "kms_key_arn": {
571
+ "key_id": {
385
572
  "type": "string",
386
- "pattern": "^arn:aws:kms:[a-z0-9-]+:[0-9]+:key\\/[a-f0-9-]+$"
573
+ "maxLength": 256
574
+ },
575
+ "nonce": {
576
+ "type": "string",
577
+ "maxLength": 64
387
578
  }
388
579
  },
389
580
  "required": [
390
581
  "algorithm",
391
- "data_key_wrapped"
582
+ "data_key_wrapped",
583
+ "nonce"
392
584
  ],
393
585
  "additionalProperties": false
394
586
  },
@@ -401,7 +593,8 @@
401
593
  "application/vnd.runfile.llm-response+json",
402
594
  "application/vnd.runfile.tool-call+json",
403
595
  "application/vnd.runfile.tool-result+json",
404
- "application/vnd.runfile.state-snapshot+json"
596
+ "application/vnd.runfile.state-snapshot+json",
597
+ "application/vnd.runfile.framework-signal+json"
405
598
  ]
406
599
  },
407
600
  "redaction_applied": {
@@ -436,6 +629,79 @@
436
629
  ],
437
630
  "additionalProperties": false
438
631
  },
632
+ "otel_attributes": {
633
+ "type": "object",
634
+ "properties": {
635
+ "gen_ai_system": {
636
+ "type": "string"
637
+ },
638
+ "gen_ai_operation_name": {
639
+ "type": "string"
640
+ },
641
+ "gen_ai_provider_name": {
642
+ "type": "string"
643
+ },
644
+ "gen_ai_request_model": {
645
+ "type": "string"
646
+ },
647
+ "gen_ai_response_model": {
648
+ "type": "string"
649
+ },
650
+ "gen_ai_request_temperature": {
651
+ "type": "number"
652
+ },
653
+ "gen_ai_request_top_p": {
654
+ "type": "number"
655
+ },
656
+ "gen_ai_request_max_tokens": {
657
+ "type": "integer"
658
+ },
659
+ "gen_ai_response_id": {
660
+ "type": "string"
661
+ },
662
+ "gen_ai_response_finish_reasons": {
663
+ "type": "array",
664
+ "items": {
665
+ "type": "string"
666
+ }
667
+ },
668
+ "gen_ai_usage_input_tokens": {
669
+ "type": "integer"
670
+ },
671
+ "gen_ai_usage_output_tokens": {
672
+ "type": "integer"
673
+ },
674
+ "gen_ai_tool_name": {
675
+ "type": "string"
676
+ },
677
+ "gen_ai_tool_call_id": {
678
+ "type": "string"
679
+ },
680
+ "gen_ai_agent_id": {
681
+ "type": "string"
682
+ },
683
+ "gen_ai_agent_name": {
684
+ "type": "string"
685
+ },
686
+ "gen_ai_agent_description": {
687
+ "type": "string"
688
+ },
689
+ "gen_ai_conversation_id": {
690
+ "type": "string"
691
+ },
692
+ "extra": {
693
+ "type": "object",
694
+ "additionalProperties": {
695
+ "type": [
696
+ "string",
697
+ "number",
698
+ "boolean"
699
+ ]
700
+ }
701
+ }
702
+ },
703
+ "additionalProperties": false
704
+ },
439
705
  "redaction_policy_version": {
440
706
  "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/schema_version"
441
707
  },
@@ -452,6 +718,8 @@
452
718
  "enum": [
453
719
  "missing_ambient_context",
454
720
  "chain_break",
721
+ "sequence_gap",
722
+ "causality_violation",
455
723
  "out_of_order_arrival",
456
724
  "model_version_drift",
457
725
  "unknown_agent_identity",
@@ -459,7 +727,14 @@
459
727
  "policy_threshold_without_hitl",
460
728
  "unauthorized_tool_invocation",
461
729
  "redaction_policy_mismatch",
462
- "schema_version_warning"
730
+ "schema_version_warning",
731
+ "agent_identity_mismatch_with_run",
732
+ "suspension_sla_exceeded",
733
+ "apparent_crash_detected",
734
+ "active_duration_exceeds_threshold",
735
+ "framework_signal_unrecognised",
736
+ "otel_attribute_missing",
737
+ "delegation_loop_detected"
463
738
  ]
464
739
  },
465
740
  "severity": {
@@ -500,9 +775,10 @@
500
775
  },
501
776
  "propertyNames": {
502
777
  "pattern": "^[a-z][a-z0-9_]{0,31}$"
503
- }
778
+ },
779
+ "maxProperties": 16
504
780
  },
505
- "prev_hash": {
781
+ "prev_event_hash": {
506
782
  "$ref": "#/definitions/EvidenceBundle/properties/events/items/properties/actor/properties/tool_version_hash"
507
783
  },
508
784
  "event_hash": {
@@ -535,17 +811,18 @@
535
811
  "schema_version",
536
812
  "event_id",
537
813
  "tenant_id",
538
- "agent_run_id",
814
+ "run_id",
539
815
  "parent_event_id",
816
+ "segment_index",
817
+ "local_seq",
540
818
  "captured_at",
541
819
  "received_at",
542
820
  "wall_clock_source",
543
821
  "sdk",
544
822
  "actor",
545
823
  "action",
546
- "subject",
547
824
  "redaction_policy_version",
548
- "prev_hash",
825
+ "prev_event_hash",
549
826
  "event_hash"
550
827
  ],
551
828
  "additionalProperties": false