@ellipsis-dev/sdk 0.28.0 → 0.30.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.
@@ -1,31 +1,11 @@
1
1
  {
2
2
  "$defs": {
3
- "AttributionType": {
4
- "enum": [
5
- "github_user",
6
- "linear_user",
7
- "slack_user",
8
- "api_key"
9
- ],
10
- "title": "AttributionType",
11
- "type": "string"
12
- },
13
- "AutomationConfig": {
3
+ "AgentConfig": {
14
4
  "additionalProperties": false,
15
- "description": "A saved automation, as written in its YAML file: identity\n(`ellipsis`), when it runs (`trigger`), what goes in (`input`), and the\n`session:` block every session it starts is frozen from. Field order is\nthe canonical key order for files and `to_yaml` exports.",
5
+ "description": "A saved agent, as written in its YAML file: identity\n(`ellipsis`), when it runs (`trigger`), what goes in (`input`), and the\n`session:` block every session it starts is frozen from. Field order is\nthe canonical key order for files and `to_yaml` exports.",
16
6
  "properties": {
17
7
  "ellipsis": {
18
- "$ref": "#/$defs/AutomationIdentity",
19
- "default": {
20
- "description": null,
21
- "enabled": true,
22
- "metadata": {
23
- "annotations": {},
24
- "labels": []
25
- },
26
- "name": null,
27
- "version": "v1"
28
- }
8
+ "$ref": "#/$defs/AgentIdentity"
29
9
  },
30
10
  "input": {
31
11
  "anyOf": [
@@ -69,14 +49,17 @@
69
49
  }
70
50
  },
71
51
  "required": [
72
- "session"
52
+ "ellipsis",
53
+ "input",
54
+ "session",
55
+ "trigger"
73
56
  ],
74
- "title": "AutomationConfig",
57
+ "title": "AgentConfig",
75
58
  "type": "object"
76
59
  },
77
- "AutomationIdentity": {
60
+ "AgentIdentity": {
78
61
  "additionalProperties": false,
79
- "description": "The Ellipsis product namespace for a config file: which schema this is\n(`version`), the human-facing identity (`name`/`description`), freeform\norganizational `metadata`, and whether the agent is `enabled`. The\npresence of a top-level `ellipsis:` mapping is what marks a YAML file as\nan Ellipsis automation (vs arbitrary YAML that merely lives under a\nconfig directory) \u2014 see `yaml_is_ellipsis_config`.\n\n`enabled` is agent behavior, not freeform metadata, so it stays inside\nthe config `sha` (only `metadata` is sha-excluded). Whether a session\naccepts messages is a per-run choice (POST /v1/sessions `interactive`),\nnot a config one.",
62
+ "description": "The Ellipsis product namespace for a config file: which schema this is\n(`version`), the human-facing identity (`name`/`description`), freeform\norganizational `metadata`, and whether the agent is `enabled`. The\npresence of a top-level `ellipsis:` mapping is what marks a YAML file as\nan Ellipsis agent (vs arbitrary YAML that merely lives under a\nconfig directory) \u2014 see `yaml_is_ellipsis_config`.\n\n`enabled` is agent behavior, not freeform metadata, so it stays inside\nthe config `sha` (only `metadata` is sha-excluded). Whether a session\naccepts messages is a per-run choice (POST /v1/sessions `interactive`),\nnot a config one.",
80
63
  "properties": {
81
64
  "description": {
82
65
  "anyOf": [
@@ -95,6 +78,11 @@
95
78
  "title": "Enabled",
96
79
  "type": "boolean"
97
80
  },
81
+ "kind": {
82
+ "const": "agent",
83
+ "title": "Kind",
84
+ "type": "string"
85
+ },
98
86
  "metadata": {
99
87
  "$ref": "#/$defs/ConfigMetadata",
100
88
  "default": {
@@ -120,9 +108,27 @@
120
108
  "type": "string"
121
109
  }
122
110
  },
123
- "title": "AutomationIdentity",
111
+ "required": [
112
+ "description",
113
+ "enabled",
114
+ "kind",
115
+ "metadata",
116
+ "name",
117
+ "version"
118
+ ],
119
+ "title": "AgentIdentity",
124
120
  "type": "object"
125
121
  },
122
+ "AttributionType": {
123
+ "enum": [
124
+ "github_user",
125
+ "linear_user",
126
+ "slack_user",
127
+ "api_key"
128
+ ],
129
+ "title": "AttributionType",
130
+ "type": "string"
131
+ },
126
132
  "BudgetConfig": {
127
133
  "additionalProperties": false,
128
134
  "properties": {
@@ -153,6 +159,7 @@
153
159
  "session": {
154
160
  "anyOf": [
155
161
  {
162
+ "exclusiveMinimum": 0,
156
163
  "type": "number"
157
164
  },
158
165
  {
@@ -175,20 +182,15 @@
175
182
  "title": "Week"
176
183
  }
177
184
  },
185
+ "required": [
186
+ "day",
187
+ "month",
188
+ "session",
189
+ "week"
190
+ ],
178
191
  "title": "BudgetConfig",
179
192
  "type": "object"
180
193
  },
181
- "BudgetSource": {
182
- "description": "Which layer actually determined the enforced budget.\n\nNot derivable from the run row alone (the run does not store the config\ncents or the account default), so we persist it for the UI / audit.",
183
- "enum": [
184
- "system",
185
- "account",
186
- "config",
187
- "run"
188
- ],
189
- "title": "BudgetSource",
190
- "type": "string"
191
- },
192
194
  "ClaudeAssistantEvent": {
193
195
  "additionalProperties": true,
194
196
  "properties": {
@@ -420,6 +422,19 @@
420
422
  "default": null,
421
423
  "title": "Model"
422
424
  },
425
+ "prompt": {
426
+ "anyOf": [
427
+ {
428
+ "type": "string"
429
+ },
430
+ {
431
+ "type": "null"
432
+ }
433
+ ],
434
+ "default": null,
435
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session idle.",
436
+ "title": "Prompt"
437
+ },
423
438
  "settings": {
424
439
  "anyOf": [
425
440
  {
@@ -430,15 +445,15 @@
430
445
  }
431
446
  ],
432
447
  "default": null
433
- },
434
- "type": {
435
- "const": "claude_code",
436
- "title": "Type",
437
- "type": "string"
438
448
  }
439
449
  },
440
450
  "required": [
441
- "type"
451
+ "effort",
452
+ "fallback_model",
453
+ "max_turns",
454
+ "model",
455
+ "prompt",
456
+ "settings"
442
457
  ],
443
458
  "title": "ClaudeConfig",
444
459
  "type": "object"
@@ -491,19 +506,6 @@
491
506
  "ClaudeNativeSessionRecord": {
492
507
  "description": "Complete native Claude Code message, before SDK projection.",
493
508
  "properties": {
494
- "agent_turn_id": {
495
- "anyOf": [
496
- {
497
- "type": "string"
498
- },
499
- {
500
- "type": "null"
501
- }
502
- ],
503
- "default": null,
504
- "description": "Turn containing this record, when applicable.",
505
- "title": "Agent Turn Id"
506
- },
507
509
  "cost": {
508
510
  "anyOf": [
509
511
  {
@@ -686,10 +688,22 @@
686
688
  ],
687
689
  "default": null,
688
690
  "title": "Tools"
691
+ },
692
+ "turn_id": {
693
+ "anyOf": [
694
+ {
695
+ "type": "string"
696
+ },
697
+ {
698
+ "type": "null"
699
+ }
700
+ ],
701
+ "default": null,
702
+ "description": "Turn containing this record, when applicable.",
703
+ "title": "Turn Id"
689
704
  }
690
705
  },
691
706
  "required": [
692
- "agent_turn_id",
693
707
  "cost",
694
708
  "created_at",
695
709
  "duration",
@@ -707,7 +721,8 @@
707
721
  "source",
708
722
  "stream_seq",
709
723
  "tokens_info",
710
- "tools"
724
+ "tools",
725
+ "turn_id"
711
726
  ],
712
727
  "title": "ClaudeNativeSessionRecord",
713
728
  "type": "object",
@@ -1031,19 +1046,6 @@
1031
1046
  "ClaudeSessionRecord": {
1032
1047
  "description": "Historical Claude SDK projection, retained for existing session history.",
1033
1048
  "properties": {
1034
- "agent_turn_id": {
1035
- "anyOf": [
1036
- {
1037
- "type": "string"
1038
- },
1039
- {
1040
- "type": "null"
1041
- }
1042
- ],
1043
- "default": null,
1044
- "description": "Turn containing this record, when applicable.",
1045
- "title": "Agent Turn Id"
1046
- },
1047
1049
  "cost": {
1048
1050
  "anyOf": [
1049
1051
  {
@@ -1222,10 +1224,22 @@
1222
1224
  ],
1223
1225
  "default": null,
1224
1226
  "title": "Tools"
1227
+ },
1228
+ "turn_id": {
1229
+ "anyOf": [
1230
+ {
1231
+ "type": "string"
1232
+ },
1233
+ {
1234
+ "type": "null"
1235
+ }
1236
+ ],
1237
+ "default": null,
1238
+ "description": "Turn containing this record, when applicable.",
1239
+ "title": "Turn Id"
1225
1240
  }
1226
1241
  },
1227
1242
  "required": [
1228
- "agent_turn_id",
1229
1243
  "cost",
1230
1244
  "created_at",
1231
1245
  "duration",
@@ -1243,7 +1257,8 @@
1243
1257
  "source",
1244
1258
  "stream_seq",
1245
1259
  "tokens_info",
1246
- "tools"
1260
+ "tools",
1261
+ "turn_id"
1247
1262
  ],
1248
1263
  "title": "ClaudeSessionRecord",
1249
1264
  "type": "object",
@@ -1602,19 +1617,6 @@
1602
1617
  },
1603
1618
  "CodexAppServerSessionRecord": {
1604
1619
  "properties": {
1605
- "agent_turn_id": {
1606
- "anyOf": [
1607
- {
1608
- "type": "string"
1609
- },
1610
- {
1611
- "type": "null"
1612
- }
1613
- ],
1614
- "default": null,
1615
- "description": "Turn containing this record, when applicable.",
1616
- "title": "Agent Turn Id"
1617
- },
1618
1620
  "cost": {
1619
1621
  "anyOf": [
1620
1622
  {
@@ -1766,10 +1768,22 @@
1766
1768
  ],
1767
1769
  "default": null,
1768
1770
  "title": "Tools"
1771
+ },
1772
+ "turn_id": {
1773
+ "anyOf": [
1774
+ {
1775
+ "type": "string"
1776
+ },
1777
+ {
1778
+ "type": "null"
1779
+ }
1780
+ ],
1781
+ "default": null,
1782
+ "description": "Turn containing this record, when applicable.",
1783
+ "title": "Turn Id"
1769
1784
  }
1770
1785
  },
1771
1786
  "required": [
1772
- "agent_turn_id",
1773
1787
  "cost",
1774
1788
  "created_at",
1775
1789
  "duration",
@@ -1787,7 +1801,8 @@
1787
1801
  "source",
1788
1802
  "stream_seq",
1789
1803
  "tokens_info",
1790
- "tools"
1804
+ "tools",
1805
+ "turn_id"
1791
1806
  ],
1792
1807
  "title": "CodexAppServerSessionRecord",
1793
1808
  "type": "object",
@@ -1982,14 +1997,24 @@
1982
1997
  "title": "Model",
1983
1998
  "type": "string"
1984
1999
  },
1985
- "type": {
1986
- "const": "codex",
1987
- "title": "Type",
1988
- "type": "string"
2000
+ "prompt": {
2001
+ "anyOf": [
2002
+ {
2003
+ "type": "string"
2004
+ },
2005
+ {
2006
+ "type": "null"
2007
+ }
2008
+ ],
2009
+ "default": null,
2010
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session idle.",
2011
+ "title": "Prompt"
1989
2012
  }
1990
2013
  },
1991
2014
  "required": [
1992
- "type"
2015
+ "effort",
2016
+ "model",
2017
+ "prompt"
1993
2018
  ],
1994
2019
  "title": "CodexConfig",
1995
2020
  "type": "object"
@@ -2917,19 +2942,6 @@
2917
2942
  },
2918
2943
  "CodexSessionRecord": {
2919
2944
  "properties": {
2920
- "agent_turn_id": {
2921
- "anyOf": [
2922
- {
2923
- "type": "string"
2924
- },
2925
- {
2926
- "type": "null"
2927
- }
2928
- ],
2929
- "default": null,
2930
- "description": "Turn containing this record, when applicable.",
2931
- "title": "Agent Turn Id"
2932
- },
2933
2945
  "cost": {
2934
2946
  "anyOf": [
2935
2947
  {
@@ -3120,10 +3132,22 @@
3120
3132
  ],
3121
3133
  "default": null,
3122
3134
  "title": "Tools"
3135
+ },
3136
+ "turn_id": {
3137
+ "anyOf": [
3138
+ {
3139
+ "type": "string"
3140
+ },
3141
+ {
3142
+ "type": "null"
3143
+ }
3144
+ ],
3145
+ "default": null,
3146
+ "description": "Turn containing this record, when applicable.",
3147
+ "title": "Turn Id"
3123
3148
  }
3124
3149
  },
3125
3150
  "required": [
3126
- "agent_turn_id",
3127
3151
  "cost",
3128
3152
  "created_at",
3129
3153
  "duration",
@@ -3141,7 +3165,8 @@
3141
3165
  "source",
3142
3166
  "stream_seq",
3143
3167
  "tokens_info",
3144
- "tools"
3168
+ "tools",
3169
+ "turn_id"
3145
3170
  ],
3146
3171
  "title": "CodexSessionRecord",
3147
3172
  "type": "object",
@@ -3819,7 +3844,7 @@
3819
3844
  },
3820
3845
  "ComputeConfig": {
3821
3846
  "additionalProperties": false,
3822
- "description": "Sandbox compute sizing. Every field is optional; None inherits the\nplatform default (2 vCPU / 4096 MiB / 3600s \u2014 see DEFAULT_SANDBOX_* in\nmodels/ellipsis/sandboxes/sandbox.py). A resolved value outside the platform\nbounds fails validation loudly (a sync error on the config) rather than\nbeing clamped silently.\n\n`memory` and `timeout` each accept a shorthand string (\"8GB\", \"30m\") or an\nexplicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /\n`timeout_seconds` properties resolve either form to the canonical integer\nthe sandbox driver consumes.\n\n`timeout` is the max wall-clock the agent may run before its execution is\nstopped, capped at 1h (MAX_SANDBOX_TIMEOUT_SECONDS \u2014 equal to the default, so\ntoday the knob only shortens a session; the cap matches the 1-hour validity\nof the sandbox's GitHub token). The worker's lease/visibility heartbeat\nceiling is derived from that cap, so a run at the max stays owned by its\nworker for its whole life.\n\nCompute currently uses a temporary flat one-cent amount per allocated\nexecution, subject to the account's existing free-compute exemptions.",
3847
+ "description": "Sandbox compute sizing. Every field is optional; None inherits the\nplatform default (2 vCPU / 4096 MiB / 3600s \u2014 see DEFAULT_SANDBOX_* in\nmodels/ellipsis/vms/vm_execution.py). A resolved value outside the platform\nbounds fails validation loudly (a sync error on the config) rather than\nbeing clamped silently.\n\n`memory` and `timeout` each accept a shorthand string (\"8GB\", \"30m\") or an\nexplicit units object ({gb: 8}, {minutes: 30}); the `memory_mib` /\n`timeout_seconds` properties resolve either form to the canonical integer\nthe sandbox driver consumes.\n\n`timeout` is the max wall-clock the agent may run before its execution is\nstopped, capped at 1h (MAX_SANDBOX_TIMEOUT_SECONDS \u2014 equal to the default, so\ntoday the knob only shortens a session; the cap matches the 1-hour validity\nof the sandbox's GitHub token). The worker's lease/visibility heartbeat\nceiling is derived from that cap, so a run at the max stays owned by its\nworker for its whole life.\n\nCompute currently uses a temporary flat one-cent amount per allocated\nexecution, subject to the account's existing free-compute exemptions.",
3823
3848
  "properties": {
3824
3849
  "cpu": {
3825
3850
  "anyOf": [
@@ -3866,6 +3891,11 @@
3866
3891
  "title": "Timeout"
3867
3892
  }
3868
3893
  },
3894
+ "required": [
3895
+ "cpu",
3896
+ "memory",
3897
+ "timeout"
3898
+ ],
3869
3899
  "title": "ComputeConfig",
3870
3900
  "type": "object"
3871
3901
  },
@@ -3889,9 +3919,21 @@
3889
3919
  "type": "array"
3890
3920
  }
3891
3921
  },
3922
+ "required": [
3923
+ "annotations",
3924
+ "labels"
3925
+ ],
3892
3926
  "title": "ConfigMetadata",
3893
3927
  "type": "object"
3894
3928
  },
3929
+ "ConversationState": {
3930
+ "enum": [
3931
+ "open",
3932
+ "closed"
3933
+ ],
3934
+ "title": "ConversationState",
3935
+ "type": "string"
3936
+ },
3895
3937
  "CronTrigger": {
3896
3938
  "additionalProperties": false,
3897
3939
  "properties": {
@@ -3907,7 +3949,8 @@
3907
3949
  }
3908
3950
  },
3909
3951
  "required": [
3910
- "schedule"
3952
+ "schedule",
3953
+ "type"
3911
3954
  ],
3912
3955
  "title": "CronTrigger",
3913
3956
  "type": "object"
@@ -3915,21 +3958,8 @@
3915
3958
  "DeltaFrame": {
3916
3959
  "description": "Fire-and-forget partial assistant output for the current response.\nCarries no sequence number and is never resumable; superseded by the\ncommitted record.",
3917
3960
  "properties": {
3918
- "agent_turn_id": {
3919
- "anyOf": [
3920
- {
3921
- "type": "string"
3922
- },
3923
- {
3924
- "type": "null"
3925
- }
3926
- ],
3927
- "default": null,
3928
- "description": "Identifier of the turn the delta belongs to, if known.",
3929
- "title": "Agent Turn Id"
3930
- },
3931
3961
  "kind": {
3932
- "description": "What the partial text is. Known values: text ('thinking' reserved). Open vocabulary: ignore deltas with unknown kinds.",
3962
+ "description": "Known values: text (append assistant output), thinking (replace the readable reasoning-summary preview). Open vocabulary: ignore deltas with unknown kinds.",
3933
3963
  "type": "string"
3934
3964
  },
3935
3965
  "output_tokens": {
@@ -3968,9 +3998,22 @@
3968
3998
  }
3969
3999
  ],
3970
4000
  "default": null,
3971
- "description": "The partial output text.",
4001
+ "description": "For \"text\", an append-only fragment. For \"thinking\", the first-line prefix of the latest summary section (at most 512 characters); replace the preview, and clear it on an empty string. Null means no text update.",
3972
4002
  "title": "Text"
3973
4003
  },
4004
+ "turn_id": {
4005
+ "anyOf": [
4006
+ {
4007
+ "type": "string"
4008
+ },
4009
+ {
4010
+ "type": "null"
4011
+ }
4012
+ ],
4013
+ "default": null,
4014
+ "description": "Identifier of the turn the delta belongs to, if known.",
4015
+ "title": "Turn Id"
4016
+ },
3974
4017
  "type": {
3975
4018
  "const": "delta",
3976
4019
  "default": "delta",
@@ -3979,11 +4022,11 @@
3979
4022
  }
3980
4023
  },
3981
4024
  "required": [
3982
- "agent_turn_id",
3983
4025
  "kind",
3984
4026
  "output_tokens",
3985
4027
  "session_execution_id",
3986
4028
  "text",
4029
+ "turn_id",
3987
4030
  "type"
3988
4031
  ],
3989
4032
  "title": "DeltaFrame",
@@ -4049,6 +4092,11 @@
4049
4092
  "title": "Seconds"
4050
4093
  }
4051
4094
  },
4095
+ "required": [
4096
+ "hours",
4097
+ "minutes",
4098
+ "seconds"
4099
+ ],
4052
4100
  "title": "Duration",
4053
4101
  "type": "object"
4054
4102
  },
@@ -4087,7 +4135,8 @@
4087
4135
  }
4088
4136
  },
4089
4137
  "required": [
4090
- "level"
4138
+ "level",
4139
+ "match"
4091
4140
  ],
4092
4141
  "title": "EllipsisGrant",
4093
4142
  "type": "object"
@@ -4123,9 +4172,43 @@
4123
4172
  "title": "EllipsisPermissions",
4124
4173
  "type": "object"
4125
4174
  },
4175
+ "EnvironmentBaseBuild": {
4176
+ "additionalProperties": false,
4177
+ "description": "Create a reusable base, optionally using only selected repository files.",
4178
+ "properties": {
4179
+ "inputs": {
4180
+ "anyOf": [
4181
+ {
4182
+ "items": {
4183
+ "type": "string"
4184
+ },
4185
+ "type": "array"
4186
+ },
4187
+ {
4188
+ "type": "null"
4189
+ }
4190
+ ],
4191
+ "default": null,
4192
+ "description": "Exact files relative to /sandbox, including the repository name. Only these files are available during build_base and their contents and modes determine reuse. Omit to use all repositories and invalidate on any source change; [] means no repository files.",
4193
+ "title": "Inputs"
4194
+ },
4195
+ "run": {
4196
+ "description": "Shell script to run in /sandbox.",
4197
+ "minLength": 1,
4198
+ "title": "Run",
4199
+ "type": "string"
4200
+ }
4201
+ },
4202
+ "required": [
4203
+ "inputs",
4204
+ "run"
4205
+ ],
4206
+ "title": "EnvironmentBaseBuild",
4207
+ "type": "object"
4208
+ },
4126
4209
  "EnvironmentConfig": {
4127
4210
  "additionalProperties": false,
4128
- "description": "Everything about the environment (the sandbox) the agent runs in: which\n`repositories` are cloned into it, which environment `variables` it gets,\nits `compute` sizing, how its `image` is customized, and lifecycle `hooks`.\nWhat the agent may *do* from that environment is the top-level\n`permissions:` block, not this one.\n\nEach `variables` entry names a variable to inject; with an inline `value` it\nis hardcoded, without one it is resolved from the account's sandbox-secrets\nstore. Only the named variables reach this agent; the rest of the account's\nstored variables never do. This is how a config brings in the config and\ncredentials a custom CLI needs.",
4211
+ "description": "Everything about the environment (the sandbox) the agent runs in: which\n`repositories` are cloned into it, which environment `variables` it gets,\nits `compute` sizing, and lifecycle `hooks`.\nWhat the agent may *do* from that environment is the top-level\n`permissions:` block, not this one.\n\nEach `variables` entry names a variable to inject; with an inline `value` it\nis hardcoded, without one it is resolved from the account's sandbox-secrets\nstore. Only the named variables reach this agent; the rest of the account's\nstored variables never do. This is how a config brings in the config and\ncredentials a custom CLI needs.",
4129
4212
  "properties": {
4130
4213
  "compute": {
4131
4214
  "$ref": "#/$defs/ComputeConfig",
@@ -4138,17 +4221,13 @@
4138
4221
  "hooks": {
4139
4222
  "$ref": "#/$defs/EnvironmentHooks",
4140
4223
  "default": {
4224
+ "after_checkout": null,
4225
+ "before_start": null,
4226
+ "build_base": null,
4141
4227
  "post_clone": null,
4142
4228
  "post_start": null
4143
4229
  }
4144
4230
  },
4145
- "image": {
4146
- "$ref": "#/$defs/EnvironmentImage",
4147
- "default": {
4148
- "dockerfile_append": null,
4149
- "setup": null
4150
- }
4151
- },
4152
4231
  "mcp_servers": {
4153
4232
  "default": [],
4154
4233
  "items": {
@@ -4187,15 +4266,25 @@
4187
4266
  "type": "array"
4188
4267
  }
4189
4268
  },
4269
+ "required": [
4270
+ "compute",
4271
+ "hooks",
4272
+ "mcp_servers",
4273
+ "repositories",
4274
+ "variables"
4275
+ ],
4190
4276
  "title": "EnvironmentConfig",
4191
4277
  "type": "object"
4192
4278
  },
4193
4279
  "EnvironmentHooks": {
4194
4280
  "additionalProperties": false,
4195
- "description": "Shell scripts run at points in the sandbox lifecycle, each as the sandbox\nuser with the sandbox's environment variables available. A non-zero exit\nfails the run (exit_status = LIFECYCLE_HOOK_FAILED) and is not retried.\n\n`post_start` runs after the container starts, before any repo is cloned \u2014\nrepo-independent setup (authenticate a CLI, e.g. `doppler setup`). On Freestyle\nthe repo is baked into the image so it is incidentally present, but\n`post_start` must not depend on repo contents (that's `post_clone`).\n\n`post_clone` runs after all repos are cloned/checked out, before the agent \u2014\nrepo-dependent setup (`pip install -r requirements.txt`, codegen).\n\nHooks run on every run and their output is never cached. A dependency\ninstall whose result should be reused across runs belongs in `image.setup`\n(baked into the cached image) instead; keep hooks for per-run work \u2014 e.g.\nanything that touches run-scoped credentials.",
4281
+ "description": "Environment lifecycle scripts, in order: build_base, after_checkout,\nbefore_start. The first two produce reusable snapshots; before_start runs\nbefore an agent starts or resumes its session. Scripts run as the sandbox\nuser in /sandbox. A nonzero exit fails the session.\n\nLegacy post_start/post_clone scripts remain supported for existing configs;\nboth run after workspace preparation, before the agent starts or resumes.\nThey cannot be combined with the new lifecycle fields.",
4196
4282
  "properties": {
4197
- "post_clone": {
4283
+ "after_checkout": {
4198
4284
  "anyOf": [
4285
+ {
4286
+ "$ref": "#/$defs/EnvironmentScript"
4287
+ },
4199
4288
  {
4200
4289
  "type": "string"
4201
4290
  },
@@ -4204,10 +4293,14 @@
4204
4293
  }
4205
4294
  ],
4206
4295
  "default": null,
4207
- "title": "Post Clone"
4296
+ "description": "Prepare the requested source revision after Ellipsis checks out all repositories, before saving the prepared sandbox. Skipped when that prepared sandbox is reused.",
4297
+ "title": "After Checkout"
4208
4298
  },
4209
- "post_start": {
4299
+ "before_start": {
4210
4300
  "anyOf": [
4301
+ {
4302
+ "$ref": "#/$defs/EnvironmentScript"
4303
+ },
4211
4304
  {
4212
4305
  "type": "string"
4213
4306
  },
@@ -4216,17 +4309,26 @@
4216
4309
  }
4217
4310
  ],
4218
4311
  "default": null,
4219
- "title": "Post Start"
4220
- }
4221
- },
4222
- "title": "EnvironmentHooks",
4223
- "type": "object"
4224
- },
4225
- "EnvironmentImage": {
4226
- "additionalProperties": false,
4227
- "description": "How to customize the container image the agent runs in. You\ncontribute appended layers (`dockerfile_append`) and a build-time script\n(`setup`) only \u2014 Ellipsis owns FROM / base tooling / entrypoint / user.\nToday only inline bodies are supported; a file reference (resolved at the\nrun's SHA) will come later.\n\nThe split: `dockerfile_append` runs when the image is assembled, before any\nrepo exists \u2014 toolchain installs (a package manager binary, apt packages).\n`setup` runs at image-build time *after* the configured repositories are\nchecked out, and its output is captured by the filesystem snapshot that\nbecomes the cached image \u2014 dependency installs (`poetry install`,\n`npm install`), so later runs start with deps already on disk. Neither runs\nper run; that's `hooks.post_start` / `hooks.post_clone`.",
4228
- "properties": {
4229
- "dockerfile_append": {
4312
+ "description": "Run before the agent starts or resumes a session, after the sandbox is ready. This hook is not cached and adds to session startup time.",
4313
+ "title": "Before Start"
4314
+ },
4315
+ "build_base": {
4316
+ "anyOf": [
4317
+ {
4318
+ "$ref": "#/$defs/EnvironmentBaseBuild"
4319
+ },
4320
+ {
4321
+ "type": "string"
4322
+ },
4323
+ {
4324
+ "type": "null"
4325
+ }
4326
+ ],
4327
+ "default": null,
4328
+ "description": "Build a reusable environment before full checkout. Cached by declared inputs, script, toolchain, resources, and build configuration. A string is shorthand for run with all repositories as inputs.",
4329
+ "title": "Build Base"
4330
+ },
4331
+ "post_clone": {
4230
4332
  "anyOf": [
4231
4333
  {
4232
4334
  "type": "string"
@@ -4236,9 +4338,10 @@
4236
4338
  }
4237
4339
  ],
4238
4340
  "default": null,
4239
- "title": "Dockerfile Append"
4341
+ "description": "Legacy session startup script. Use before_start for session setup or after_checkout for cached source preparation.",
4342
+ "title": "Post Clone"
4240
4343
  },
4241
- "setup": {
4344
+ "post_start": {
4242
4345
  "anyOf": [
4243
4346
  {
4244
4347
  "type": "string"
@@ -4248,17 +4351,42 @@
4248
4351
  }
4249
4352
  ],
4250
4353
  "default": null,
4251
- "title": "Setup"
4354
+ "description": "Legacy session startup script. Use before_start in new configurations.",
4355
+ "title": "Post Start"
4356
+ }
4357
+ },
4358
+ "required": [
4359
+ "after_checkout",
4360
+ "before_start",
4361
+ "build_base",
4362
+ "post_clone",
4363
+ "post_start"
4364
+ ],
4365
+ "title": "EnvironmentHooks",
4366
+ "type": "object"
4367
+ },
4368
+ "EnvironmentScript": {
4369
+ "additionalProperties": false,
4370
+ "description": "An inline shell script run as the sandbox user, with /sandbox as cwd.",
4371
+ "properties": {
4372
+ "run": {
4373
+ "description": "Shell script to run in /sandbox.",
4374
+ "minLength": 1,
4375
+ "title": "Run",
4376
+ "type": "string"
4252
4377
  }
4253
4378
  },
4254
- "title": "EnvironmentImage",
4379
+ "required": [
4380
+ "run"
4381
+ ],
4382
+ "title": "EnvironmentScript",
4255
4383
  "type": "object"
4256
4384
  },
4257
4385
  "EnvironmentSource": {
4258
4386
  "description": "How a session's environment was chosen. None (the field is nullable)\nwhen the config carried an inline environment block and no resolution ran \u2014\nan inline environment is not a reference, so there is nothing to record.\n\nNot derivable from the row: `environment_id` says WHICH environment, not\nhow it was chosen, and is null for the built-in basic sandbox.",
4259
4387
  "enum": [
4260
4388
  "request",
4261
- "automation",
4389
+ "agent",
4262
4390
  "repo_default",
4263
4391
  "account_default",
4264
4392
  "platform_default"
@@ -4288,7 +4416,8 @@
4288
4416
  }
4289
4417
  },
4290
4418
  "required": [
4291
- "name"
4419
+ "name",
4420
+ "value"
4292
4421
  ],
4293
4422
  "title": "EnvironmentVariable",
4294
4423
  "type": "object"
@@ -4345,6 +4474,10 @@
4345
4474
  "title": "Include"
4346
4475
  }
4347
4476
  },
4477
+ "required": [
4478
+ "exclude",
4479
+ "include"
4480
+ ],
4348
4481
  "title": "GithubAccountFilter",
4349
4482
  "type": "object"
4350
4483
  },
@@ -4370,6 +4503,10 @@
4370
4503
  "$ref": "#/$defs/GithubAccountFilter"
4371
4504
  }
4372
4505
  },
4506
+ "required": [
4507
+ "bots",
4508
+ "users"
4509
+ ],
4373
4510
  "title": "GithubAccountSelector",
4374
4511
  "type": "object"
4375
4512
  },
@@ -4393,10 +4530,10 @@
4393
4530
  }
4394
4531
  },
4395
4532
  "required": [
4533
+ "avatar_url",
4396
4534
  "id",
4397
4535
  "login",
4398
- "type",
4399
- "avatar_url"
4536
+ "type"
4400
4537
  ],
4401
4538
  "title": "GithubAccountSnippet",
4402
4539
  "type": "object"
@@ -4411,6 +4548,57 @@
4411
4548
  "title": "GithubAccountType",
4412
4549
  "type": "string"
4413
4550
  },
4551
+ "GithubIssueEvent": {
4552
+ "properties": {
4553
+ "action": {
4554
+ "$ref": "#/$defs/IssueAction"
4555
+ },
4556
+ "actor": {
4557
+ "anyOf": [
4558
+ {
4559
+ "$ref": "#/$defs/SessionEventActor"
4560
+ },
4561
+ {
4562
+ "type": "null"
4563
+ }
4564
+ ],
4565
+ "default": null
4566
+ },
4567
+ "number": {
4568
+ "title": "Number",
4569
+ "type": "integer"
4570
+ },
4571
+ "repository": {
4572
+ "title": "Repository",
4573
+ "type": "string"
4574
+ },
4575
+ "title": {
4576
+ "title": "Title",
4577
+ "type": "string"
4578
+ },
4579
+ "type": {
4580
+ "const": "github.issue",
4581
+ "default": "github.issue",
4582
+ "title": "Type",
4583
+ "type": "string"
4584
+ },
4585
+ "url": {
4586
+ "title": "Url",
4587
+ "type": "string"
4588
+ }
4589
+ },
4590
+ "required": [
4591
+ "action",
4592
+ "actor",
4593
+ "number",
4594
+ "repository",
4595
+ "title",
4596
+ "type",
4597
+ "url"
4598
+ ],
4599
+ "title": "GithubIssueEvent",
4600
+ "type": "object"
4601
+ },
4414
4602
  "GithubPermissions": {
4415
4603
  "additionalProperties": false,
4416
4604
  "description": "The agent's GitHub access: the scope of the installation token minted for\nits sandbox \u2014 the credential `git`, `gh`, and the GitHub MCP server\nauthenticate with.\n\nBy default the token carries the installation's full permissions on all of\nthe installation's repositories. `permissions` narrows what it may do:\nthe string `read_only` grants read access to contents, issues, metadata and\npull requests; a map requests explicit levels per GitHub App permission\nscope (e.g. `{contents: read, pull_requests: write}`) and may never exceed\nwhat the installation granted. `repositories` scopes the token to exactly\nthe listed repos, by name (they must belong to the installation).\n\nRestriction is enforced by GitHub, not by Ellipsis: the token itself is\nminted with the reduced scope, so nothing running in the sandbox can\nexceed it.",
@@ -4450,33 +4638,140 @@
4450
4638
  "title": "Repositories"
4451
4639
  }
4452
4640
  },
4641
+ "required": [
4642
+ "permissions",
4643
+ "repositories"
4644
+ ],
4453
4645
  "title": "GithubPermissions",
4454
4646
  "type": "object"
4455
4647
  },
4456
- "Harness": {
4457
- "enum": [
4458
- "claude_code",
4459
- "codex"
4648
+ "GithubPullRequestEvent": {
4649
+ "properties": {
4650
+ "action": {
4651
+ "anyOf": [
4652
+ {
4653
+ "$ref": "#/$defs/PullRequestAction"
4654
+ },
4655
+ {
4656
+ "const": "review_commented",
4657
+ "type": "string"
4658
+ }
4659
+ ],
4660
+ "title": "Action"
4661
+ },
4662
+ "actor": {
4663
+ "anyOf": [
4664
+ {
4665
+ "$ref": "#/$defs/SessionEventActor"
4666
+ },
4667
+ {
4668
+ "type": "null"
4669
+ }
4670
+ ],
4671
+ "default": null
4672
+ },
4673
+ "branch": {
4674
+ "title": "Branch",
4675
+ "type": "string"
4676
+ },
4677
+ "number": {
4678
+ "title": "Number",
4679
+ "type": "integer"
4680
+ },
4681
+ "repository": {
4682
+ "title": "Repository",
4683
+ "type": "string"
4684
+ },
4685
+ "title": {
4686
+ "title": "Title",
4687
+ "type": "string"
4688
+ },
4689
+ "type": {
4690
+ "const": "github.pull_request",
4691
+ "default": "github.pull_request",
4692
+ "title": "Type",
4693
+ "type": "string"
4694
+ },
4695
+ "url": {
4696
+ "title": "Url",
4697
+ "type": "string"
4698
+ }
4699
+ },
4700
+ "required": [
4701
+ "action",
4702
+ "actor",
4703
+ "branch",
4704
+ "number",
4705
+ "repository",
4706
+ "title",
4707
+ "type",
4708
+ "url"
4460
4709
  ],
4461
- "title": "Harness",
4462
- "type": "string"
4710
+ "title": "GithubPullRequestEvent",
4711
+ "type": "object"
4463
4712
  },
4464
- "HarnessOptions": {
4465
- "discriminator": {
4466
- "mapping": {
4467
- "claude_code": "#/$defs/ClaudeConfig",
4468
- "codex": "#/$defs/CodexConfig"
4713
+ "GithubPushEvent": {
4714
+ "properties": {
4715
+ "actor": {
4716
+ "anyOf": [
4717
+ {
4718
+ "$ref": "#/$defs/SessionEventActor"
4719
+ },
4720
+ {
4721
+ "type": "null"
4722
+ }
4723
+ ],
4724
+ "default": null
4469
4725
  },
4470
- "propertyName": "type"
4471
- },
4472
- "oneOf": [
4473
- {
4474
- "$ref": "#/$defs/ClaudeConfig"
4726
+ "after": {
4727
+ "title": "After",
4728
+ "type": "string"
4475
4729
  },
4476
- {
4477
- "$ref": "#/$defs/CodexConfig"
4730
+ "before": {
4731
+ "title": "Before",
4732
+ "type": "string"
4733
+ },
4734
+ "branch": {
4735
+ "title": "Branch",
4736
+ "type": "string"
4737
+ },
4738
+ "repository": {
4739
+ "title": "Repository",
4740
+ "type": "string"
4741
+ },
4742
+ "type": {
4743
+ "const": "github.push",
4744
+ "default": "github.push",
4745
+ "title": "Type",
4746
+ "type": "string"
4747
+ },
4748
+ "url": {
4749
+ "title": "Url",
4750
+ "type": "string"
4478
4751
  }
4479
- ]
4752
+ },
4753
+ "required": [
4754
+ "actor",
4755
+ "after",
4756
+ "before",
4757
+ "branch",
4758
+ "repository",
4759
+ "type",
4760
+ "url"
4761
+ ],
4762
+ "title": "GithubPushEvent",
4763
+ "type": "object"
4764
+ },
4765
+ "HandlerService": {
4766
+ "description": "The service whose events a handler responds to.",
4767
+ "enum": [
4768
+ "slack",
4769
+ "github",
4770
+ "linear",
4771
+ "sentry"
4772
+ ],
4773
+ "title": "HandlerService",
4774
+ "type": "string"
4480
4775
  },
4481
4776
  "HeartbeatFrame": {
4482
4777
  "description": "A keepalive sent after a period of idleness; doubles as the dead-socket\nprobe. Clients should treat roughly twice the heartbeat interval of\nsilence as a dead connection.",
@@ -4503,7 +4798,7 @@
4503
4798
  },
4504
4799
  "InputContract": {
4505
4800
  "additionalProperties": false,
4506
- "description": "The typed input contract: what goes INTO a session (the trigger is\nwhen it happens; this is what goes in).\n\n`json_schema` types the payload a caller-started session takes\n(`POST /v1/sessions` `input`, validated at the door; required when\ndeclared). It is illegal on a react-triggered agent \u2014 react payloads are\nplatform-shaped (the published surface field sets), not caller-shaped.\n\n`message` is the initial-message template: exact `{{path}}` substitution\nover the caller payload (or, on a react agent, over the surface's\npublished fields), no conditionals/loops/filters. Refs are validated at\ndeploy time against the governing field set (see AutomationConfig's\n`_check_input`).",
4801
+ "description": "The typed input contract: what goes INTO a session (the trigger is\nwhen it happens; this is what goes in).\n\n`json_schema` validates customer data sent as `input` to\n`POST /v1/agents/{id}/sessions` and stored as `session.input`.\nInvocations require input when a schema is declared. React agents\ncannot declare schemas: the platform defines their event payloads.\n\n`message` is the initial-message template: exact `{{path}}` substitution\nover the caller payload (or, on a react agent, over the surface's\npublished fields), no conditionals/loops/filters. Refs are validated at\ndeploy time against the governing field set (see AgentConfig's\n`_check_input`).",
4507
4802
  "properties": {
4508
4803
  "json_schema": {
4509
4804
  "anyOf": [
@@ -4531,32 +4826,13 @@
4531
4826
  "title": "Message"
4532
4827
  }
4533
4828
  },
4829
+ "required": [
4830
+ "json_schema",
4831
+ "message"
4832
+ ],
4534
4833
  "title": "InputContract",
4535
4834
  "type": "object"
4536
4835
  },
4537
- "Instructions": {
4538
- "anyOf": [
4539
- {
4540
- "type": "string"
4541
- },
4542
- {
4543
- "$ref": "#/$defs/SystemFileRef"
4544
- },
4545
- {
4546
- "items": {
4547
- "anyOf": [
4548
- {
4549
- "type": "string"
4550
- },
4551
- {
4552
- "$ref": "#/$defs/SystemFileRef"
4553
- }
4554
- ]
4555
- },
4556
- "type": "array"
4557
- }
4558
- ]
4559
- },
4560
4836
  "IssueAction": {
4561
4837
  "enum": [
4562
4838
  "opened",
@@ -4930,6 +5206,74 @@
4930
5206
  "title": "LinearIssueAction",
4931
5207
  "type": "string"
4932
5208
  },
5209
+ "LinearIssueEvent": {
5210
+ "properties": {
5211
+ "action": {
5212
+ "anyOf": [
5213
+ {
5214
+ "$ref": "#/$defs/LinearIssueAction"
5215
+ },
5216
+ {
5217
+ "const": "commented",
5218
+ "type": "string"
5219
+ }
5220
+ ],
5221
+ "title": "Action"
5222
+ },
5223
+ "actor": {
5224
+ "anyOf": [
5225
+ {
5226
+ "$ref": "#/$defs/SessionEventActor"
5227
+ },
5228
+ {
5229
+ "type": "null"
5230
+ }
5231
+ ],
5232
+ "default": null
5233
+ },
5234
+ "identifier": {
5235
+ "anyOf": [
5236
+ {
5237
+ "type": "string"
5238
+ },
5239
+ {
5240
+ "type": "null"
5241
+ }
5242
+ ],
5243
+ "default": null,
5244
+ "title": "Identifier"
5245
+ },
5246
+ "number": {
5247
+ "title": "Number",
5248
+ "type": "integer"
5249
+ },
5250
+ "title": {
5251
+ "title": "Title",
5252
+ "type": "string"
5253
+ },
5254
+ "type": {
5255
+ "const": "linear.issue",
5256
+ "default": "linear.issue",
5257
+ "title": "Type",
5258
+ "type": "string"
5259
+ },
5260
+ "url": {
5261
+ "title": "Url",
5262
+ "type": "string"
5263
+ }
5264
+ },
5265
+ "required": [
5266
+ "action",
5267
+ "actor",
5268
+ "identifier",
5269
+ "number",
5270
+ "title",
5271
+ "type",
5272
+ "url"
5273
+ ],
5274
+ "title": "LinearIssueEvent",
5275
+ "type": "object"
5276
+ },
4933
5277
  "McpRemoteServer": {
4934
5278
  "additionalProperties": false,
4935
5279
  "description": "A bring-your-own remote MCP server: the harness talks HTTP to `url`.\nNothing runs in the sandbox image. `headers` carry static auth (e.g.\n`Authorization: Bearer ${TOKEN}`); values may embed `${NAME}` secret\nreferences, resolved at run time from the account's secrets store.",
@@ -4952,6 +5296,7 @@
4952
5296
  }
4953
5297
  },
4954
5298
  "required": [
5299
+ "headers",
4955
5300
  "name",
4956
5301
  "url"
4957
5302
  ],
@@ -4975,7 +5320,7 @@
4975
5320
  },
4976
5321
  "McpStdioServer": {
4977
5322
  "additionalProperties": false,
4978
- "description": "A bring-your-own stdio MCP server: the harness spawns `command` inside\nthe sandbox and speaks JSON-RPC over its stdin/stdout. The command must be\nrunnable in the sandbox image \u2014 install its runtime via `image.setup` /\n`image.dockerfile_append` if the base image lacks it.\n\n`env` values may embed `${NAME}` references, resolved at run time from the\naccount's secrets store (see `mcp_secret_refs`); everything else is passed\nliterally.",
5323
+ "description": "A bring-your-own stdio MCP server: the harness spawns `command` inside\nthe sandbox and speaks JSON-RPC over its stdin/stdout. The command must be\nrunnable in the sandbox image \u2014 install its runtime via `hooks.build_base` /\n`hooks.after_checkout` if the managed environment lacks it.\n\n`env` values may embed `${NAME}` references, resolved at run time from the\naccount's secrets store (see `mcp_secret_refs`); everything else is passed\nliterally.",
4979
5324
  "properties": {
4980
5325
  "args": {
4981
5326
  "default": [],
@@ -5003,9 +5348,11 @@
5003
5348
  }
5004
5349
  },
5005
5350
  "required": [
5006
- "name",
5007
- "command"
5008
- ],
5351
+ "args",
5352
+ "command",
5353
+ "env",
5354
+ "name"
5355
+ ],
5009
5356
  "title": "McpStdioServer",
5010
5357
  "type": "object"
5011
5358
  },
@@ -5040,6 +5387,10 @@
5040
5387
  "title": "Mb"
5041
5388
  }
5042
5389
  },
5390
+ "required": [
5391
+ "gb",
5392
+ "mb"
5393
+ ],
5043
5394
  "title": "MemorySize",
5044
5395
  "type": "object"
5045
5396
  },
@@ -5065,19 +5416,6 @@
5065
5416
  },
5066
5417
  "MessageDeliveredRecord": {
5067
5418
  "properties": {
5068
- "agent_turn_id": {
5069
- "anyOf": [
5070
- {
5071
- "type": "string"
5072
- },
5073
- {
5074
- "type": "null"
5075
- }
5076
- ],
5077
- "default": null,
5078
- "description": "Turn containing this record, when applicable.",
5079
- "title": "Agent Turn Id"
5080
- },
5081
5419
  "cost": {
5082
5420
  "anyOf": [
5083
5421
  {
@@ -5230,10 +5568,22 @@
5230
5568
  ],
5231
5569
  "default": null,
5232
5570
  "title": "Tools"
5571
+ },
5572
+ "turn_id": {
5573
+ "anyOf": [
5574
+ {
5575
+ "type": "string"
5576
+ },
5577
+ {
5578
+ "type": "null"
5579
+ }
5580
+ ],
5581
+ "default": null,
5582
+ "description": "Turn containing this record, when applicable.",
5583
+ "title": "Turn Id"
5233
5584
  }
5234
5585
  },
5235
5586
  "required": [
5236
- "agent_turn_id",
5237
5587
  "cost",
5238
5588
  "created_at",
5239
5589
  "duration",
@@ -5251,7 +5601,8 @@
5251
5601
  "source",
5252
5602
  "stream_seq",
5253
5603
  "tokens_info",
5254
- "tools"
5604
+ "tools",
5605
+ "turn_id"
5255
5606
  ],
5256
5607
  "title": "MessageDeliveredRecord",
5257
5608
  "type": "object",
@@ -5320,19 +5671,6 @@
5320
5671
  },
5321
5672
  "MessageReceivedRecord": {
5322
5673
  "properties": {
5323
- "agent_turn_id": {
5324
- "anyOf": [
5325
- {
5326
- "type": "string"
5327
- },
5328
- {
5329
- "type": "null"
5330
- }
5331
- ],
5332
- "default": null,
5333
- "description": "Turn containing this record, when applicable.",
5334
- "title": "Agent Turn Id"
5335
- },
5336
5674
  "cost": {
5337
5675
  "anyOf": [
5338
5676
  {
@@ -5485,10 +5823,22 @@
5485
5823
  ],
5486
5824
  "default": null,
5487
5825
  "title": "Tools"
5826
+ },
5827
+ "turn_id": {
5828
+ "anyOf": [
5829
+ {
5830
+ "type": "string"
5831
+ },
5832
+ {
5833
+ "type": "null"
5834
+ }
5835
+ ],
5836
+ "default": null,
5837
+ "description": "Turn containing this record, when applicable.",
5838
+ "title": "Turn Id"
5488
5839
  }
5489
5840
  },
5490
5841
  "required": [
5491
- "agent_turn_id",
5492
5842
  "cost",
5493
5843
  "created_at",
5494
5844
  "duration",
@@ -5506,7 +5856,8 @@
5506
5856
  "source",
5507
5857
  "stream_seq",
5508
5858
  "tokens_info",
5509
- "tools"
5859
+ "tools",
5860
+ "turn_id"
5510
5861
  ],
5511
5862
  "title": "MessageReceivedRecord",
5512
5863
  "type": "object",
@@ -5534,19 +5885,6 @@
5534
5885
  },
5535
5886
  "MessageRequeuedRecord": {
5536
5887
  "properties": {
5537
- "agent_turn_id": {
5538
- "anyOf": [
5539
- {
5540
- "type": "string"
5541
- },
5542
- {
5543
- "type": "null"
5544
- }
5545
- ],
5546
- "default": null,
5547
- "description": "Turn containing this record, when applicable.",
5548
- "title": "Agent Turn Id"
5549
- },
5550
5888
  "cost": {
5551
5889
  "anyOf": [
5552
5890
  {
@@ -5699,10 +6037,22 @@
5699
6037
  ],
5700
6038
  "default": null,
5701
6039
  "title": "Tools"
6040
+ },
6041
+ "turn_id": {
6042
+ "anyOf": [
6043
+ {
6044
+ "type": "string"
6045
+ },
6046
+ {
6047
+ "type": "null"
6048
+ }
6049
+ ],
6050
+ "default": null,
6051
+ "description": "Turn containing this record, when applicable.",
6052
+ "title": "Turn Id"
5702
6053
  }
5703
6054
  },
5704
6055
  "required": [
5705
- "agent_turn_id",
5706
6056
  "cost",
5707
6057
  "created_at",
5708
6058
  "duration",
@@ -5720,7 +6070,8 @@
5720
6070
  "source",
5721
6071
  "stream_seq",
5722
6072
  "tokens_info",
5723
- "tools"
6073
+ "tools",
6074
+ "turn_id"
5724
6075
  ],
5725
6076
  "title": "MessageRequeuedRecord",
5726
6077
  "type": "object",
@@ -5769,19 +6120,6 @@
5769
6120
  },
5770
6121
  "OutboxCollectedRecord": {
5771
6122
  "properties": {
5772
- "agent_turn_id": {
5773
- "anyOf": [
5774
- {
5775
- "type": "string"
5776
- },
5777
- {
5778
- "type": "null"
5779
- }
5780
- ],
5781
- "default": null,
5782
- "description": "Turn containing this record, when applicable.",
5783
- "title": "Agent Turn Id"
5784
- },
5785
6123
  "cost": {
5786
6124
  "anyOf": [
5787
6125
  {
@@ -5934,10 +6272,22 @@
5934
6272
  ],
5935
6273
  "default": null,
5936
6274
  "title": "Tools"
6275
+ },
6276
+ "turn_id": {
6277
+ "anyOf": [
6278
+ {
6279
+ "type": "string"
6280
+ },
6281
+ {
6282
+ "type": "null"
6283
+ }
6284
+ ],
6285
+ "default": null,
6286
+ "description": "Turn containing this record, when applicable.",
6287
+ "title": "Turn Id"
5937
6288
  }
5938
6289
  },
5939
6290
  "required": [
5940
- "agent_turn_id",
5941
6291
  "cost",
5942
6292
  "created_at",
5943
6293
  "duration",
@@ -5955,7 +6305,8 @@
5955
6305
  "source",
5956
6306
  "stream_seq",
5957
6307
  "tokens_info",
5958
- "tools"
6308
+ "tools",
6309
+ "turn_id"
5959
6310
  ],
5960
6311
  "title": "OutboxCollectedRecord",
5961
6312
  "type": "object",
@@ -5977,15 +6328,6 @@
5977
6328
  "title": "OutputConfig",
5978
6329
  "type": "object"
5979
6330
  },
5980
- "ParentKind": {
5981
- "description": "How a session relates to its predecessor (parent_agent_session_id) \u2014\nthe ONE \"preceded-by\" chain for every predecessor relationship. Routing\nreads this when the distinction matters.\n\nCONTINUATION \u2014 a follow-up in the same conversation surface (e.g. a Slack\nthread reply spawning a fresh session on the same thread).\nRESUME \u2014 a conversation re-hosted on a new box after its sandbox was torn\ndown (interactive platform; later phase).",
5982
- "enum": [
5983
- "continuation",
5984
- "resume"
5985
- ],
5986
- "title": "ParentKind",
5987
- "type": "string"
5988
- },
5989
6331
  "PermissionsConfig": {
5990
6332
  "additionalProperties": false,
5991
6333
  "description": "What the agent is allowed to touch, per credential the platform mints\ninto its sandbox. Distinct from `environment:`, which is where the agent\nruns; this is what it may do from there.\n\n`ellipsis` scopes the sandbox's Ellipsis API token\n(`ELLIPSIS_API_TOKEN`, what the in-sandbox `agent` CLI authenticates\nwith). `true` / the string `all` (the default) grant the full sandbox\nceiling \u2014 everything a sandbox token can ever do. A map narrows it per\nresource (see `EllipsisPermissions`); the minted token carries\nthe intersection, so a config can only ever reduce access. `false` fails\nvalidation \u2014 an agent with no API token cannot report its own progress.\n\n`github` scopes the sandbox's GitHub installation token (`GH_TOKEN`) \u2014\nsee `GithubPermissions`. GitHub enforces it at mint time.",
@@ -6013,6 +6355,10 @@
6013
6355
  }
6014
6356
  }
6015
6357
  },
6358
+ "required": [
6359
+ "ellipsis",
6360
+ "github"
6361
+ ],
6016
6362
  "title": "PermissionsConfig",
6017
6363
  "type": "object"
6018
6364
  },
@@ -6147,7 +6493,10 @@
6147
6493
  }
6148
6494
  },
6149
6495
  "required": [
6150
- "on"
6496
+ "for",
6497
+ "labels",
6498
+ "on",
6499
+ "repositories"
6151
6500
  ],
6152
6501
  "title": "ReactIssue",
6153
6502
  "type": "object"
@@ -6169,6 +6518,10 @@
6169
6518
  "type": "array"
6170
6519
  }
6171
6520
  },
6521
+ "required": [
6522
+ "for",
6523
+ "on"
6524
+ ],
6172
6525
  "title": "ReactLinearIssue",
6173
6526
  "type": "object"
6174
6527
  },
@@ -6234,7 +6587,14 @@
6234
6587
  }
6235
6588
  },
6236
6589
  "required": [
6237
- "on"
6590
+ "base",
6591
+ "draft",
6592
+ "for",
6593
+ "head",
6594
+ "labels",
6595
+ "on",
6596
+ "paths",
6597
+ "repositories"
6238
6598
  ],
6239
6599
  "title": "ReactPullRequest",
6240
6600
  "type": "object"
@@ -6265,6 +6625,12 @@
6265
6625
  "$ref": "#/$defs/RepositoryFilter"
6266
6626
  }
6267
6627
  },
6628
+ "required": [
6629
+ "branch",
6630
+ "for",
6631
+ "paths",
6632
+ "repositories"
6633
+ ],
6268
6634
  "title": "ReactPush",
6269
6635
  "type": "object"
6270
6636
  },
@@ -6288,7 +6654,8 @@
6288
6654
  }
6289
6655
  },
6290
6656
  "required": [
6291
- "on"
6657
+ "on",
6658
+ "projects"
6292
6659
  ],
6293
6660
  "title": "ReactSentry",
6294
6661
  "type": "object"
@@ -6375,6 +6742,15 @@
6375
6742
  "type": "string"
6376
6743
  }
6377
6744
  },
6745
+ "required": [
6746
+ "issue",
6747
+ "linear_issue",
6748
+ "pull_request",
6749
+ "push",
6750
+ "sentry",
6751
+ "slack_channel",
6752
+ "type"
6753
+ ],
6378
6754
  "title": "ReactTrigger",
6379
6755
  "type": "object"
6380
6756
  },
@@ -6426,6 +6802,10 @@
6426
6802
  "type": "array"
6427
6803
  }
6428
6804
  },
6805
+ "required": [
6806
+ "exclude",
6807
+ "include"
6808
+ ],
6429
6809
  "title": "RepositoryFilter",
6430
6810
  "type": "object"
6431
6811
  },
@@ -6470,7 +6850,9 @@
6470
6850
  }
6471
6851
  },
6472
6852
  "required": [
6473
- "name"
6853
+ "name",
6854
+ "owner",
6855
+ "ref"
6474
6856
  ],
6475
6857
  "title": "RepositoryRef",
6476
6858
  "type": "object"
@@ -6497,22 +6879,6 @@
6497
6879
  "title": "Resource",
6498
6880
  "type": "string"
6499
6881
  },
6500
- "RunStatus": {
6501
- "description": "What the current (or most recent) execution is doing (backs `run`).",
6502
- "enum": [
6503
- "scheduled",
6504
- "starting",
6505
- "working",
6506
- "waiting",
6507
- "done",
6508
- "failed",
6509
- "stopped",
6510
- "cancelled",
6511
- "retrying"
6512
- ],
6513
- "title": "RunStatus",
6514
- "type": "string"
6515
- },
6516
6882
  "SandboxOutputPayload": {
6517
6883
  "additionalProperties": true,
6518
6884
  "description": "sandbox_output \u2014 one chunk of provisioning/lifecycle-script output.\nMany fire per execution; `chunk` rides the idempotency key. These records\nARE the durable copy (archived into the session log's S3 segments), under\na high per-session cap + truncation marker.",
@@ -6560,19 +6926,6 @@
6560
6926
  },
6561
6927
  "SandboxOutputRecord": {
6562
6928
  "properties": {
6563
- "agent_turn_id": {
6564
- "anyOf": [
6565
- {
6566
- "type": "string"
6567
- },
6568
- {
6569
- "type": "null"
6570
- }
6571
- ],
6572
- "default": null,
6573
- "description": "Turn containing this record, when applicable.",
6574
- "title": "Agent Turn Id"
6575
- },
6576
6929
  "cost": {
6577
6930
  "anyOf": [
6578
6931
  {
@@ -6725,10 +7078,22 @@
6725
7078
  ],
6726
7079
  "default": null,
6727
7080
  "title": "Tools"
7081
+ },
7082
+ "turn_id": {
7083
+ "anyOf": [
7084
+ {
7085
+ "type": "string"
7086
+ },
7087
+ {
7088
+ "type": "null"
7089
+ }
7090
+ ],
7091
+ "default": null,
7092
+ "description": "Turn containing this record, when applicable.",
7093
+ "title": "Turn Id"
6728
7094
  }
6729
7095
  },
6730
7096
  "required": [
6731
- "agent_turn_id",
6732
7097
  "cost",
6733
7098
  "created_at",
6734
7099
  "duration",
@@ -6746,7 +7111,8 @@
6746
7111
  "source",
6747
7112
  "stream_seq",
6748
7113
  "tokens_info",
6749
- "tools"
7114
+ "tools",
7115
+ "turn_id"
6750
7116
  ],
6751
7117
  "title": "SandboxOutputRecord",
6752
7118
  "type": "object",
@@ -6811,19 +7177,6 @@
6811
7177
  },
6812
7178
  "SandboxPhaseRecord": {
6813
7179
  "properties": {
6814
- "agent_turn_id": {
6815
- "anyOf": [
6816
- {
6817
- "type": "string"
6818
- },
6819
- {
6820
- "type": "null"
6821
- }
6822
- ],
6823
- "default": null,
6824
- "description": "Turn containing this record, when applicable.",
6825
- "title": "Agent Turn Id"
6826
- },
6827
7180
  "cost": {
6828
7181
  "anyOf": [
6829
7182
  {
@@ -6976,10 +7329,22 @@
6976
7329
  ],
6977
7330
  "default": null,
6978
7331
  "title": "Tools"
7332
+ },
7333
+ "turn_id": {
7334
+ "anyOf": [
7335
+ {
7336
+ "type": "string"
7337
+ },
7338
+ {
7339
+ "type": "null"
7340
+ }
7341
+ ],
7342
+ "default": null,
7343
+ "description": "Turn containing this record, when applicable.",
7344
+ "title": "Turn Id"
6979
7345
  }
6980
7346
  },
6981
7347
  "required": [
6982
- "agent_turn_id",
6983
7348
  "cost",
6984
7349
  "created_at",
6985
7350
  "duration",
@@ -6997,7 +7362,8 @@
6997
7362
  "source",
6998
7363
  "stream_seq",
6999
7364
  "tokens_info",
7000
- "tools"
7365
+ "tools",
7366
+ "turn_id"
7001
7367
  ],
7002
7368
  "title": "SandboxPhaseRecord",
7003
7369
  "type": "object",
@@ -7043,19 +7409,6 @@
7043
7409
  },
7044
7410
  "SandboxReadyRecord": {
7045
7411
  "properties": {
7046
- "agent_turn_id": {
7047
- "anyOf": [
7048
- {
7049
- "type": "string"
7050
- },
7051
- {
7052
- "type": "null"
7053
- }
7054
- ],
7055
- "default": null,
7056
- "description": "Turn containing this record, when applicable.",
7057
- "title": "Agent Turn Id"
7058
- },
7059
7412
  "cost": {
7060
7413
  "anyOf": [
7061
7414
  {
@@ -7208,10 +7561,22 @@
7208
7561
  ],
7209
7562
  "default": null,
7210
7563
  "title": "Tools"
7564
+ },
7565
+ "turn_id": {
7566
+ "anyOf": [
7567
+ {
7568
+ "type": "string"
7569
+ },
7570
+ {
7571
+ "type": "null"
7572
+ }
7573
+ ],
7574
+ "default": null,
7575
+ "description": "Turn containing this record, when applicable.",
7576
+ "title": "Turn Id"
7211
7577
  }
7212
7578
  },
7213
7579
  "required": [
7214
- "agent_turn_id",
7215
7580
  "cost",
7216
7581
  "created_at",
7217
7582
  "duration",
@@ -7229,7 +7594,8 @@
7229
7594
  "source",
7230
7595
  "stream_seq",
7231
7596
  "tokens_info",
7232
- "tools"
7597
+ "tools",
7598
+ "turn_id"
7233
7599
  ],
7234
7600
  "title": "SandboxReadyRecord",
7235
7601
  "type": "object",
@@ -7255,19 +7621,6 @@
7255
7621
  },
7256
7622
  "SandboxStartingRecord": {
7257
7623
  "properties": {
7258
- "agent_turn_id": {
7259
- "anyOf": [
7260
- {
7261
- "type": "string"
7262
- },
7263
- {
7264
- "type": "null"
7265
- }
7266
- ],
7267
- "default": null,
7268
- "description": "Turn containing this record, when applicable.",
7269
- "title": "Agent Turn Id"
7270
- },
7271
7624
  "cost": {
7272
7625
  "anyOf": [
7273
7626
  {
@@ -7420,10 +7773,22 @@
7420
7773
  ],
7421
7774
  "default": null,
7422
7775
  "title": "Tools"
7776
+ },
7777
+ "turn_id": {
7778
+ "anyOf": [
7779
+ {
7780
+ "type": "string"
7781
+ },
7782
+ {
7783
+ "type": "null"
7784
+ }
7785
+ ],
7786
+ "default": null,
7787
+ "description": "Turn containing this record, when applicable.",
7788
+ "title": "Turn Id"
7423
7789
  }
7424
7790
  },
7425
7791
  "required": [
7426
- "agent_turn_id",
7427
7792
  "cost",
7428
7793
  "created_at",
7429
7794
  "duration",
@@ -7441,7 +7806,8 @@
7441
7806
  "source",
7442
7807
  "stream_seq",
7443
7808
  "tokens_info",
7444
- "tools"
7809
+ "tools",
7810
+ "turn_id"
7445
7811
  ],
7446
7812
  "title": "SandboxStartingRecord",
7447
7813
  "type": "object",
@@ -7881,34 +8247,39 @@
7881
8247
  "title": "SentryAction",
7882
8248
  "type": "string"
7883
8249
  },
7884
- "Session": {
7885
- "description": "An agent session: one conversation with an agent, from trigger to\nterminal state. Returned by `GET /v1/sessions/{id}` and carried by the\nsession stream's `session`/`snapshot` frames \u2014 REST and stream never\ndisagree about what a session looks like.",
8250
+ "SentryAlertEvent": {
7886
8251
  "properties": {
7887
- "attribution": {
7888
- "$ref": "#/$defs/SessionAttribution",
7889
- "description": "The principal this session is attributed to."
8252
+ "action": {
8253
+ "$ref": "#/$defs/SentryAction"
7890
8254
  },
7891
- "automation": {
8255
+ "actor": {
7892
8256
  "anyOf": [
7893
8257
  {
7894
- "$ref": "#/$defs/SessionAutomation"
8258
+ "$ref": "#/$defs/SessionEventActor"
7895
8259
  },
7896
8260
  {
7897
8261
  "type": "null"
7898
8262
  }
7899
8263
  ],
7900
- "default": null,
7901
- "description": "The automation the session was started from, or null for a raw session started with POST /v1/sessions."
8264
+ "default": null
7902
8265
  },
7903
- "budget": {
7904
- "$ref": "#/$defs/SessionBudget",
7905
- "description": "The spend budget enforced for this session."
8266
+ "organization_slug": {
8267
+ "title": "Organization Slug",
8268
+ "type": "string"
7906
8269
  },
7907
- "config": {
7908
- "$ref": "#/$defs/SessionConfig",
7909
- "description": "What the session ran on, frozen when it was created: the harness block, the resolved environment, permissions, skills, output contract, and budget."
8270
+ "project_slug": {
8271
+ "anyOf": [
8272
+ {
8273
+ "type": "string"
8274
+ },
8275
+ {
8276
+ "type": "null"
8277
+ }
8278
+ ],
8279
+ "default": null,
8280
+ "title": "Project Slug"
7910
8281
  },
7911
- "context_repository": {
8282
+ "title": {
7912
8283
  "anyOf": [
7913
8284
  {
7914
8285
  "type": "string"
@@ -7918,226 +8289,311 @@
7918
8289
  }
7919
8290
  ],
7920
8291
  "default": null,
7921
- "description": "The \"owner/name\" repository context the session was started in, if any.",
7922
- "title": "Context Repository"
8292
+ "title": "Title"
7923
8293
  },
7924
- "cost": {
7925
- "$ref": "#/$defs/SessionCost",
7926
- "description": "What the session cost, in millicents, broken down by leg and carrying its own total."
7927
- },
7928
- "created_at": {
7929
- "description": "When the session was created.",
7930
- "format": "date-time",
7931
- "title": "Created At",
8294
+ "type": {
8295
+ "const": "sentry.alert",
8296
+ "default": "sentry.alert",
8297
+ "title": "Type",
7932
8298
  "type": "string"
7933
8299
  },
7934
- "environment": {
7935
- "$ref": "#/$defs/SessionEnvironment",
7936
- "description": "The environment the session resolved: the saved environment's id and how it was chosen. The environment's frozen body is `config.environment`."
7937
- },
7938
- "exit_status": {
8300
+ "url": {
7939
8301
  "anyOf": [
7940
8302
  {
7941
- "$ref": "#/$defs/SessionExitStatus"
8303
+ "type": "string"
7942
8304
  },
7943
8305
  {
7944
8306
  "type": "null"
7945
8307
  }
7946
8308
  ],
7947
8309
  "default": null,
7948
- "description": "How the session ended; null until it is terminal."
7949
- },
7950
- "git": {
8310
+ "title": "Url"
8311
+ }
8312
+ },
8313
+ "required": [
8314
+ "action",
8315
+ "actor",
8316
+ "organization_slug",
8317
+ "project_slug",
8318
+ "title",
8319
+ "type",
8320
+ "url"
8321
+ ],
8322
+ "title": "SentryAlertEvent",
8323
+ "type": "object"
8324
+ },
8325
+ "Session": {
8326
+ "additionalProperties": false,
8327
+ "allOf": [
8328
+ {
8329
+ "oneOf": [
8330
+ {
8331
+ "properties": {
8332
+ "claude_code": {
8333
+ "additionalProperties": true,
8334
+ "type": "object"
8335
+ },
8336
+ "codex": {
8337
+ "type": "null"
8338
+ }
8339
+ },
8340
+ "required": [
8341
+ "claude_code",
8342
+ "codex"
8343
+ ]
8344
+ },
8345
+ {
8346
+ "properties": {
8347
+ "claude_code": {
8348
+ "type": "null"
8349
+ },
8350
+ "codex": {
8351
+ "additionalProperties": true,
8352
+ "type": "object"
8353
+ }
8354
+ },
8355
+ "required": [
8356
+ "claude_code",
8357
+ "codex"
8358
+ ]
8359
+ }
8360
+ ]
8361
+ }
8362
+ ],
8363
+ "description": "An agent session: one conversation with an agent, from trigger to\nterminal state. Returned by `GET /v1/sessions/{id}` and carried by the\nsession stream's `session`/`snapshot` frames \u2014 REST and stream never\ndisagree about what a session looks like.",
8364
+ "properties": {
8365
+ "agent": {
7951
8366
  "anyOf": [
7952
8367
  {
7953
- "$ref": "#/$defs/SessionGit"
8368
+ "$ref": "#/$defs/SessionAgent"
7954
8369
  },
7955
8370
  {
7956
8371
  "type": "null"
7957
8372
  }
7958
8373
  ],
7959
8374
  "default": null,
7960
- "description": "What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured."
8375
+ "description": "The agent the session was started from, or null for a raw session started with POST /v1/sessions."
7961
8376
  },
7962
- "harness": {
7963
- "$ref": "#/$defs/Harness",
7964
- "description": "The coding-agent harness the session runs on."
8377
+ "attribution": {
8378
+ "$ref": "#/$defs/SessionAttribution",
8379
+ "description": "The principal this session is attributed to."
7965
8380
  },
7966
- "id": {
7967
- "description": "Unique identifier of the session.",
7968
- "title": "Id",
7969
- "type": "string"
8381
+ "budget": {
8382
+ "default": 0,
8383
+ "description": "The spend budget enforced for this session, in US dollars, after resolving defaults and ceilings.",
8384
+ "title": "Budget",
8385
+ "type": "number"
7970
8386
  },
7971
- "last_activity_at": {
8387
+ "claude_code": {
7972
8388
  "anyOf": [
7973
8389
  {
7974
- "format": "date-time",
7975
- "type": "string"
8390
+ "$ref": "#/$defs/ClaudeConfig"
7976
8391
  },
7977
8392
  {
7978
8393
  "type": "null"
7979
8394
  }
7980
8395
  ],
7981
8396
  "default": null,
7982
- "description": "When the session last showed activity.",
7983
- "title": "Last Activity At"
8397
+ "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
7984
8398
  },
7985
- "last_message_at": {
8399
+ "codex": {
7986
8400
  "anyOf": [
7987
8401
  {
7988
- "format": "date-time",
7989
- "type": "string"
8402
+ "$ref": "#/$defs/CodexConfig"
7990
8403
  },
7991
8404
  {
7992
8405
  "type": "null"
7993
8406
  }
7994
8407
  ],
7995
8408
  "default": null,
7996
- "description": "When the session last received a message.",
7997
- "title": "Last Message At"
8409
+ "description": "Codex input and native options. Set exactly one of claude_code or codex."
7998
8410
  },
7999
- "metadata": {
8000
- "additionalProperties": {
8001
- "type": "string"
8002
- },
8003
- "default": {},
8004
- "description": "Caller-supplied metadata key-value pairs.",
8005
- "title": "Metadata",
8006
- "type": "object"
8411
+ "cost": {
8412
+ "$ref": "#/$defs/SessionCost",
8413
+ "description": "What the session cost, in millicents, broken down by leg and carrying its own total."
8007
8414
  },
8008
- "parent": {
8009
- "$ref": "#/$defs/SessionParent",
8010
- "description": "What preceded this session, if anything."
8415
+ "environment": {
8416
+ "$ref": "#/$defs/SessionEnvironment",
8417
+ "description": "The full environment configuration frozen when the session was created, with the saved environment's id and how it was chosen."
8011
8418
  },
8012
- "prompt": {
8419
+ "event": {
8013
8420
  "anyOf": [
8014
8421
  {
8015
- "type": "string"
8422
+ "discriminator": {
8423
+ "mapping": {
8424
+ "github.issue": "#/$defs/GithubIssueEvent",
8425
+ "github.pull_request": "#/$defs/GithubPullRequestEvent",
8426
+ "github.push": "#/$defs/GithubPushEvent",
8427
+ "linear.issue": "#/$defs/LinearIssueEvent",
8428
+ "sentry.alert": "#/$defs/SentryAlertEvent",
8429
+ "slack.channel_created": "#/$defs/SlackChannelCreatedEvent",
8430
+ "slack.message": "#/$defs/SlackMessageEvent"
8431
+ },
8432
+ "propertyName": "type"
8433
+ },
8434
+ "oneOf": [
8435
+ {
8436
+ "$ref": "#/$defs/GithubPullRequestEvent"
8437
+ },
8438
+ {
8439
+ "$ref": "#/$defs/GithubIssueEvent"
8440
+ },
8441
+ {
8442
+ "$ref": "#/$defs/GithubPushEvent"
8443
+ },
8444
+ {
8445
+ "$ref": "#/$defs/LinearIssueEvent"
8446
+ },
8447
+ {
8448
+ "$ref": "#/$defs/SlackMessageEvent"
8449
+ },
8450
+ {
8451
+ "$ref": "#/$defs/SlackChannelCreatedEvent"
8452
+ },
8453
+ {
8454
+ "$ref": "#/$defs/SentryAlertEvent"
8455
+ }
8456
+ ]
8016
8457
  },
8017
8458
  {
8018
8459
  "type": "null"
8019
8460
  }
8020
8461
  ],
8021
8462
  "default": null,
8022
- "description": "The per-session prompt the session was started with.",
8023
- "title": "Prompt"
8463
+ "description": "The typed external event that started the session; null for direct and scheduled starts.",
8464
+ "title": "Event"
8024
8465
  },
8025
- "prompting": {
8026
- "$ref": "#/$defs/SessionPrompting",
8027
- "description": "Whether a client may send this session a message and, when it may not, the reason to show instead of a composer."
8466
+ "git": {
8467
+ "anyOf": [
8468
+ {
8469
+ "$ref": "#/$defs/SessionGit"
8470
+ },
8471
+ {
8472
+ "type": "null"
8473
+ }
8474
+ ],
8475
+ "default": null,
8476
+ "description": "What the session did to git, one entry per repository in its workspace: the commit and branch it sits on, per-file line counts for its uncommitted changes, and the pull requests it opened. Null if nothing was ever captured."
8028
8477
  },
8029
- "session_state": {
8478
+ "handler": {
8030
8479
  "anyOf": [
8031
8480
  {
8032
- "$ref": "#/$defs/SessionState"
8481
+ "$ref": "#/$defs/SessionHandler"
8033
8482
  },
8034
8483
  {
8035
8484
  "type": "null"
8036
8485
  }
8037
8486
  ],
8038
8487
  "default": null,
8039
- "description": "Lifecycle state of the durable conversation, or null for sessions without one."
8488
+ "description": "The saved handler and its effective display name when this session started, frozen at creation. Null for built-in responders, legacy sessions, and sessions started without a handler."
8040
8489
  },
8041
- "source": {
8042
- "$ref": "#/$defs/SessionSource",
8043
- "description": "Where the session came from (e.g. react, web, api, cli, mention, cron)."
8490
+ "id": {
8491
+ "description": "Unique identifier of the session.",
8492
+ "title": "Id",
8493
+ "type": "string"
8044
8494
  },
8045
- "status": {
8046
- "$ref": "#/$defs/SessionStatus",
8047
- "description": "Execution status of the session."
8495
+ "lifecycle": {
8496
+ "$ref": "#/$defs/SessionLifecycle",
8497
+ "description": "The session's activity, conversation state, messaging policy, outcomes, and timestamps."
8498
+ },
8499
+ "metadata": {
8500
+ "additionalProperties": {
8501
+ "type": "string"
8502
+ },
8503
+ "default": {},
8504
+ "description": "Caller-supplied metadata key-value pairs.",
8505
+ "title": "Metadata",
8506
+ "type": "object"
8048
8507
  },
8049
- "status_reason": {
8508
+ "output": {
8050
8509
  "anyOf": [
8051
8510
  {
8052
- "type": "string"
8511
+ "$ref": "#/$defs/OutputConfig"
8053
8512
  },
8054
8513
  {
8055
8514
  "type": "null"
8056
8515
  }
8057
8516
  ],
8058
8517
  "default": null,
8059
- "description": "Human-readable reason for the current status, when there is one.",
8060
- "title": "Status Reason"
8518
+ "description": "The structured-output exit contract for this session."
8061
8519
  },
8062
- "stopped": {
8063
- "$ref": "#/$defs/SessionStopped",
8064
- "description": "The stop request, if the session was stopped."
8065
- },
8066
- "summary": {
8520
+ "parent": {
8067
8521
  "anyOf": [
8068
8522
  {
8069
- "$ref": "#/$defs/SessionSummary"
8523
+ "$ref": "#/$defs/SessionParent"
8070
8524
  },
8071
8525
  {
8072
8526
  "type": "null"
8073
8527
  }
8074
8528
  ],
8075
8529
  "default": null,
8076
- "description": "The latest live summary of the session's progress while it runs, and when it was generated."
8530
+ "description": "The predecessor session this session continues; null when there is none."
8077
8531
  },
8078
- "surface": {
8079
- "$ref": "#/$defs/SessionSurface",
8080
- "description": "The public status projection: the durable conversation (`session`), the current execution (`run`), and the one derived `status` word."
8532
+ "permissions": {
8533
+ "$ref": "#/$defs/PermissionsConfig",
8534
+ "description": "What the session may touch, per minted credential."
8081
8535
  },
8082
- "tokens": {
8083
- "$ref": "#/$defs/SessionTokens",
8084
- "description": "The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes."
8536
+ "skills": {
8537
+ "description": "Skills installed for this session.",
8538
+ "items": {
8539
+ "$ref": "#/$defs/SkillRef"
8540
+ },
8541
+ "title": "Skills",
8542
+ "type": "array"
8085
8543
  },
8086
- "trigger": {
8544
+ "source": {
8545
+ "$ref": "#/$defs/SessionSource",
8546
+ "description": "Where the session came from (e.g. react, web, api, cli, mention, cron)."
8547
+ },
8548
+ "summary": {
8087
8549
  "anyOf": [
8088
8550
  {
8089
- "$ref": "#/$defs/SessionTrigger"
8551
+ "$ref": "#/$defs/SessionSummary"
8090
8552
  },
8091
8553
  {
8092
8554
  "type": "null"
8093
8555
  }
8094
8556
  ],
8095
8557
  "default": null,
8096
- "description": "The external event that started the session."
8558
+ "description": "The latest live summary of the session's progress while it runs, and when it was generated."
8097
8559
  },
8098
- "updated_at": {
8099
- "description": "When the session was last updated.",
8100
- "format": "date-time",
8101
- "title": "Updated At",
8102
- "type": "string"
8560
+ "tokens": {
8561
+ "$ref": "#/$defs/SessionTokens",
8562
+ "description": "The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes."
8103
8563
  }
8104
8564
  },
8105
8565
  "required": [
8566
+ "agent",
8106
8567
  "attribution",
8107
- "automation",
8108
8568
  "budget",
8109
- "config",
8110
- "context_repository",
8569
+ "claude_code",
8570
+ "codex",
8111
8571
  "cost",
8112
- "created_at",
8113
8572
  "environment",
8114
- "exit_status",
8573
+ "event",
8115
8574
  "git",
8116
- "harness",
8575
+ "handler",
8117
8576
  "id",
8118
- "last_activity_at",
8119
- "last_message_at",
8577
+ "lifecycle",
8120
8578
  "metadata",
8579
+ "output",
8121
8580
  "parent",
8122
- "prompt",
8123
- "prompting",
8124
- "session_state",
8581
+ "permissions",
8582
+ "skills",
8125
8583
  "source",
8126
- "status",
8127
- "status_reason",
8128
- "stopped",
8129
8584
  "summary",
8130
- "surface",
8131
- "tokens",
8132
- "trigger",
8133
- "updated_at"
8585
+ "tokens"
8134
8586
  ],
8135
8587
  "title": "Session",
8136
8588
  "type": "object"
8137
8589
  },
8138
- "SessionAttribution": {
8139
- "description": "The principal a session is attributed to: what kind, its id, and \u2014 when\nthe kind is a GitHub user \u2014 the resolved display snippet.",
8590
+ "SessionAgent": {
8591
+ "description": "The agent this session was started from: the definition frozen\nwhen the session was created, and the saved agent it came from as it\nexists NOW. They diverge legitimately \u2014 a YAML edit after the session\nstarted leaves the pointer describing something the session never ran.",
8140
8592
  "properties": {
8593
+ "config": {
8594
+ "$ref": "#/$defs/AgentConfig",
8595
+ "description": "The agent definition the session was started from, frozen when the session was created."
8596
+ },
8141
8597
  "id": {
8142
8598
  "anyOf": [
8143
8599
  {
@@ -8148,80 +8604,93 @@
8148
8604
  }
8149
8605
  ],
8150
8606
  "default": null,
8151
- "description": "Identifier of the principal the session is attributed to.",
8607
+ "description": "Identifier of the saved agent this session's snapshot was taken from. Null for a routing-file agent, a code-review stage agent, or the built-in mention agent, which have no saved agent behind them. Points at the agent as it exists now, which may have changed since.",
8152
8608
  "title": "Id"
8609
+ }
8610
+ },
8611
+ "required": [
8612
+ "config",
8613
+ "id"
8614
+ ],
8615
+ "title": "SessionAgent",
8616
+ "type": "object"
8617
+ },
8618
+ "SessionArchived": {
8619
+ "description": "When the session was archived and the GitHub user who archived it.",
8620
+ "properties": {
8621
+ "at": {
8622
+ "description": "When the session was archived.",
8623
+ "format": "date-time",
8624
+ "title": "At",
8625
+ "type": "string"
8153
8626
  },
8154
- "type": {
8627
+ "by": {
8155
8628
  "anyOf": [
8156
8629
  {
8157
- "$ref": "#/$defs/AttributionType"
8630
+ "$ref": "#/$defs/GithubAccountSnippet"
8158
8631
  },
8159
8632
  {
8160
8633
  "type": "null"
8161
8634
  }
8162
8635
  ],
8163
8636
  "default": null,
8164
- "description": "Kind of principal the session is attributed to (e.g. a GitHub user or an API key)."
8637
+ "description": "The GitHub user who archived the session; null if unknown or unavailable."
8638
+ }
8639
+ },
8640
+ "required": [
8641
+ "at",
8642
+ "by"
8643
+ ],
8644
+ "title": "SessionArchived",
8645
+ "type": "object"
8646
+ },
8647
+ "SessionAttribution": {
8648
+ "description": "The principal a session is attributed to: what kind, its id, and \u2014 when\nthe kind is a GitHub user \u2014 the resolved display snippet.",
8649
+ "properties": {
8650
+ "id": {
8651
+ "anyOf": [
8652
+ {
8653
+ "type": "string"
8654
+ },
8655
+ {
8656
+ "type": "null"
8657
+ }
8658
+ ],
8659
+ "default": null,
8660
+ "description": "Identifier of the principal the session is attributed to.",
8661
+ "title": "Id"
8165
8662
  },
8166
- "user": {
8663
+ "type": {
8167
8664
  "anyOf": [
8168
8665
  {
8169
- "$ref": "#/$defs/GithubAccountSnippet"
8666
+ "$ref": "#/$defs/AttributionType"
8170
8667
  },
8171
8668
  {
8172
8669
  "type": "null"
8173
8670
  }
8174
8671
  ],
8175
8672
  "default": null,
8176
- "description": "The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user."
8177
- }
8178
- },
8179
- "title": "SessionAttribution",
8180
- "type": "object"
8181
- },
8182
- "SessionAutomation": {
8183
- "description": "The automation this session was started from: the definition frozen\nwhen the session was created, and the saved automation it came from as it\nexists NOW. They diverge legitimately \u2014 a YAML edit after the session\nstarted leaves the pointer describing something the session never ran.",
8184
- "properties": {
8185
- "config": {
8186
- "$ref": "#/$defs/AutomationConfig",
8187
- "description": "The automation definition the session was started from, frozen when the session was created."
8673
+ "description": "Kind of principal the session is attributed to (e.g. a GitHub user or an API key)."
8188
8674
  },
8189
- "id": {
8675
+ "user": {
8190
8676
  "anyOf": [
8191
8677
  {
8192
- "type": "string"
8678
+ "$ref": "#/$defs/GithubAccountSnippet"
8193
8679
  },
8194
8680
  {
8195
8681
  "type": "null"
8196
8682
  }
8197
8683
  ],
8198
8684
  "default": null,
8199
- "description": "Identifier of the saved automation this session's snapshot was taken from. Null for a routing-file agent, a code-review stage agent, or the built-in mention agent, which have no saved automation behind them. Points at the automation as it exists now, which may have changed since.",
8200
- "title": "Id"
8685
+ "description": "The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user."
8201
8686
  }
8202
8687
  },
8203
8688
  "required": [
8204
- "config"
8689
+ "id",
8690
+ "type",
8691
+ "user"
8205
8692
  ],
8206
- "title": "SessionAutomation",
8207
- "type": "object"
8208
- },
8209
- "SessionBudget": {
8210
- "description": "The spend budget actually enforced for this session, and which layer of\nthe cascade set it.",
8211
- "properties": {
8212
- "cents": {
8213
- "default": 0,
8214
- "description": "The spend budget resolved for this session, in cents.",
8215
- "title": "Cents",
8216
- "type": "integer"
8217
- },
8218
- "source": {
8219
- "$ref": "#/$defs/BudgetSource",
8220
- "default": "account",
8221
- "description": "Where the resolved budget came from."
8222
- }
8223
- },
8224
- "title": "SessionBudget",
8693
+ "title": "SessionAttribution",
8225
8694
  "type": "object"
8226
8695
  },
8227
8696
  "SessionCancelledPayload": {
@@ -8241,19 +8710,6 @@
8241
8710
  },
8242
8711
  "SessionCancelledRecord": {
8243
8712
  "properties": {
8244
- "agent_turn_id": {
8245
- "anyOf": [
8246
- {
8247
- "type": "string"
8248
- },
8249
- {
8250
- "type": "null"
8251
- }
8252
- ],
8253
- "default": null,
8254
- "description": "Turn containing this record, when applicable.",
8255
- "title": "Agent Turn Id"
8256
- },
8257
8713
  "cost": {
8258
8714
  "anyOf": [
8259
8715
  {
@@ -8406,10 +8862,22 @@
8406
8862
  ],
8407
8863
  "default": null,
8408
8864
  "title": "Tools"
8865
+ },
8866
+ "turn_id": {
8867
+ "anyOf": [
8868
+ {
8869
+ "type": "string"
8870
+ },
8871
+ {
8872
+ "type": "null"
8873
+ }
8874
+ ],
8875
+ "default": null,
8876
+ "description": "Turn containing this record, when applicable.",
8877
+ "title": "Turn Id"
8409
8878
  }
8410
8879
  },
8411
8880
  "required": [
8412
- "agent_turn_id",
8413
8881
  "cost",
8414
8882
  "created_at",
8415
8883
  "duration",
@@ -8427,7 +8895,8 @@
8427
8895
  "source",
8428
8896
  "stream_seq",
8429
8897
  "tokens_info",
8430
- "tools"
8898
+ "tools",
8899
+ "turn_id"
8431
8900
  ],
8432
8901
  "title": "SessionCancelledRecord",
8433
8902
  "type": "object",
@@ -8442,19 +8911,6 @@
8442
8911
  },
8443
8912
  "SessionClosedRecord": {
8444
8913
  "properties": {
8445
- "agent_turn_id": {
8446
- "anyOf": [
8447
- {
8448
- "type": "string"
8449
- },
8450
- {
8451
- "type": "null"
8452
- }
8453
- ],
8454
- "default": null,
8455
- "description": "Turn containing this record, when applicable.",
8456
- "title": "Agent Turn Id"
8457
- },
8458
8914
  "cost": {
8459
8915
  "anyOf": [
8460
8916
  {
@@ -8607,10 +9063,22 @@
8607
9063
  ],
8608
9064
  "default": null,
8609
9065
  "title": "Tools"
9066
+ },
9067
+ "turn_id": {
9068
+ "anyOf": [
9069
+ {
9070
+ "type": "string"
9071
+ },
9072
+ {
9073
+ "type": "null"
9074
+ }
9075
+ ],
9076
+ "default": null,
9077
+ "description": "Turn containing this record, when applicable.",
9078
+ "title": "Turn Id"
8610
9079
  }
8611
9080
  },
8612
9081
  "required": [
8613
- "agent_turn_id",
8614
9082
  "cost",
8615
9083
  "created_at",
8616
9084
  "duration",
@@ -8628,7 +9096,8 @@
8628
9096
  "source",
8629
9097
  "stream_seq",
8630
9098
  "tokens_info",
8631
- "tools"
9099
+ "tools",
9100
+ "turn_id"
8632
9101
  ],
8633
9102
  "title": "SessionClosedRecord",
8634
9103
  "type": "object",
@@ -8636,7 +9105,43 @@
8636
9105
  },
8637
9106
  "SessionConfig": {
8638
9107
  "additionalProperties": false,
8639
- "description": "What one session runs on: its selected harness, where it runs, what it\nmay touch, its skills, its exit contract, and its spend cap. Every session\nfreezes one of these (`agent_sessions.session_config`); an automation\ncarries one under `session:` (`AutomationConfig.session`); and\n`POST /v1/sessions` is this shape flattened onto the request body, plus the\nrun settings. Nothing in here is an automation's identity or trigger \u2014\nthose belong to `AutomationConfig`.\n\nField order is the canonical key order for `session:` blocks and YAML\nexports: what runs (`harness`, `instructions`), where (`environment`), what it may\ntouch (`permissions`), then the rest.",
9108
+ "allOf": [
9109
+ {
9110
+ "oneOf": [
9111
+ {
9112
+ "properties": {
9113
+ "claude_code": {
9114
+ "additionalProperties": true,
9115
+ "type": "object"
9116
+ },
9117
+ "codex": {
9118
+ "type": "null"
9119
+ }
9120
+ },
9121
+ "required": [
9122
+ "claude_code",
9123
+ "codex"
9124
+ ]
9125
+ },
9126
+ {
9127
+ "properties": {
9128
+ "claude_code": {
9129
+ "type": "null"
9130
+ },
9131
+ "codex": {
9132
+ "additionalProperties": true,
9133
+ "type": "object"
9134
+ }
9135
+ },
9136
+ "required": [
9137
+ "claude_code",
9138
+ "codex"
9139
+ ]
9140
+ }
9141
+ ]
9142
+ }
9143
+ ],
9144
+ "description": "What one session runs on: its selected harness, where it runs, what it\nmay touch, its skills, its exit contract, and its spend cap. Every session\nfreezes one of these (`sessions.session_config`); an agent\ncarries one under `session:` (`AgentConfig.session`); and\n`POST /v1/sessions` is this shape flattened onto the request body, plus the\nrun settings. Nothing in here is an agent's identity or trigger \u2014\nthose belong to `AgentConfig`.\n\nField order is the canonical key order for `session:` blocks and YAML\nexports: what runs (`claude_code` or `codex`), where (`environment`), what it may\ntouch (`permissions`), then the rest.",
8640
9145
  "properties": {
8641
9146
  "budget": {
8642
9147
  "$ref": "#/$defs/BudgetConfig",
@@ -8647,6 +9152,30 @@
8647
9152
  "week": null
8648
9153
  }
8649
9154
  },
9155
+ "claude_code": {
9156
+ "anyOf": [
9157
+ {
9158
+ "$ref": "#/$defs/ClaudeConfig"
9159
+ },
9160
+ {
9161
+ "type": "null"
9162
+ }
9163
+ ],
9164
+ "default": null,
9165
+ "description": "Claude Code input and native options. Set exactly one of claude_code or codex."
9166
+ },
9167
+ "codex": {
9168
+ "anyOf": [
9169
+ {
9170
+ "$ref": "#/$defs/CodexConfig"
9171
+ },
9172
+ {
9173
+ "type": "null"
9174
+ }
9175
+ ],
9176
+ "default": null,
9177
+ "description": "Codex input and native options. Set exactly one of claude_code or codex."
9178
+ },
8650
9179
  "environment": {
8651
9180
  "anyOf": [
8652
9181
  {
@@ -8663,28 +9192,18 @@
8663
9192
  "timeout": null
8664
9193
  },
8665
9194
  "hooks": {
9195
+ "after_checkout": null,
9196
+ "before_start": null,
9197
+ "build_base": null,
8666
9198
  "post_clone": null,
8667
9199
  "post_start": null
8668
9200
  },
8669
- "image": {
8670
- "dockerfile_append": null,
8671
- "setup": null
8672
- },
8673
9201
  "mcp_servers": [],
8674
9202
  "repositories": [],
8675
9203
  "variables": []
8676
9204
  },
8677
9205
  "title": "Environment"
8678
9206
  },
8679
- "harness": {
8680
- "$ref": "#/$defs/HarnessOptions",
8681
- "description": "The explicitly selected harness and its native options."
8682
- },
8683
- "instructions": {
8684
- "$ref": "#/$defs/Instructions",
8685
- "default": "",
8686
- "description": "Instructions appended to the harness's own prompt. Text and repository file references are resolved in order."
8687
- },
8688
9207
  "output": {
8689
9208
  "anyOf": [
8690
9209
  {
@@ -8716,7 +9235,13 @@
8716
9235
  }
8717
9236
  },
8718
9237
  "required": [
8719
- "harness"
9238
+ "budget",
9239
+ "claude_code",
9240
+ "codex",
9241
+ "environment",
9242
+ "output",
9243
+ "permissions",
9244
+ "skills"
8720
9245
  ],
8721
9246
  "title": "SessionConfig",
8722
9247
  "type": "object"
@@ -8724,6 +9249,12 @@
8724
9249
  "SessionCost": {
8725
9250
  "description": "What a session (or one turn of it) cost, in millicents.\n\n`llm` is deliberately NOT called `tokens`: it would sit beside the `tokens`\nobject and read as \"the token count's cost\" rather than \"the cost of the\nLLM leg\".",
8726
9251
  "properties": {
9252
+ "cpu": {
9253
+ "default": 0,
9254
+ "description": "Sandbox CPU spend in millicents.",
9255
+ "title": "Cpu",
9256
+ "type": "integer"
9257
+ },
8727
9258
  "fee": {
8728
9259
  "default": 0,
8729
9260
  "description": "Platform fee in millicents.",
@@ -8736,32 +9267,52 @@
8736
9267
  "title": "Llm",
8737
9268
  "type": "integer"
8738
9269
  },
8739
- "sandbox_cpu": {
8740
- "default": 0,
8741
- "description": "Sandbox CPU spend in millicents.",
8742
- "title": "Sandbox Cpu",
8743
- "type": "integer"
8744
- },
8745
- "sandbox_memory": {
9270
+ "memory": {
8746
9271
  "default": 0,
8747
9272
  "description": "Sandbox memory spend in millicents.",
8748
- "title": "Sandbox Memory",
9273
+ "title": "Memory",
8749
9274
  "type": "integer"
8750
9275
  },
8751
9276
  "total": {
8752
9277
  "default": 0,
8753
- "description": "The grand total in millicents: llm + sandbox_cpu + sandbox_memory + fee.",
9278
+ "description": "The grand total in millicents: llm + cpu + memory + fee.",
8754
9279
  "title": "Total",
8755
9280
  "type": "integer"
8756
9281
  }
8757
9282
  },
9283
+ "required": [
9284
+ "cpu",
9285
+ "fee",
9286
+ "llm",
9287
+ "memory",
9288
+ "total"
9289
+ ],
8758
9290
  "title": "SessionCost",
8759
9291
  "type": "object"
8760
9292
  },
8761
9293
  "SessionEnvironment": {
8762
- "description": "The environment this session resolved: which saved environment (as it\nexists now) and how it was chosen. The environment's frozen BODY rides\ninside `config.environment` \u2014 substitution happens before the config\nsnapshot freezes \u2014 so this object is provenance, not payload.",
9294
+ "additionalProperties": false,
9295
+ "description": "The environment configuration frozen at session creation, enriched with\nthe saved environment's identity and how it was chosen.",
8763
9296
  "properties": {
8764
- "environment_id": {
9297
+ "compute": {
9298
+ "$ref": "#/$defs/ComputeConfig",
9299
+ "default": {
9300
+ "cpu": null,
9301
+ "memory": null,
9302
+ "timeout": null
9303
+ }
9304
+ },
9305
+ "hooks": {
9306
+ "$ref": "#/$defs/EnvironmentHooks",
9307
+ "default": {
9308
+ "after_checkout": null,
9309
+ "before_start": null,
9310
+ "build_base": null,
9311
+ "post_clone": null,
9312
+ "post_start": null
9313
+ }
9314
+ },
9315
+ "id": {
8765
9316
  "anyOf": [
8766
9317
  {
8767
9318
  "type": "string"
@@ -8772,7 +9323,36 @@
8772
9323
  ],
8773
9324
  "default": null,
8774
9325
  "description": "Identifier of the saved environment the session's config resolved. Null for an inline environment block or the built-in basic sandbox.",
8775
- "title": "Environment Id"
9326
+ "title": "Id"
9327
+ },
9328
+ "mcp_servers": {
9329
+ "default": [],
9330
+ "items": {
9331
+ "anyOf": [
9332
+ {
9333
+ "type": "string"
9334
+ },
9335
+ {
9336
+ "$ref": "#/$defs/McpServerRef"
9337
+ },
9338
+ {
9339
+ "$ref": "#/$defs/McpStdioServer"
9340
+ },
9341
+ {
9342
+ "$ref": "#/$defs/McpRemoteServer"
9343
+ }
9344
+ ]
9345
+ },
9346
+ "title": "Mcp Servers",
9347
+ "type": "array"
9348
+ },
9349
+ "repositories": {
9350
+ "default": [],
9351
+ "items": {
9352
+ "$ref": "#/$defs/RepositoryRef"
9353
+ },
9354
+ "title": "Repositories",
9355
+ "type": "array"
8776
9356
  },
8777
9357
  "source": {
8778
9358
  "anyOf": [
@@ -8784,12 +9364,97 @@
8784
9364
  }
8785
9365
  ],
8786
9366
  "default": null,
8787
- "description": "How the environment was chosen (request, automation, platform_default; repo_default and account_default on sessions from before those ladders were removed). Null when the config carried its own inline environment."
9367
+ "description": "How the environment was chosen (request, agent, platform_default; repo_default and account_default on sessions from before those ladders were removed). An inline request uses request; an inline environment declared in session configuration has no source."
9368
+ },
9369
+ "variables": {
9370
+ "default": [],
9371
+ "items": {
9372
+ "$ref": "#/$defs/EnvironmentVariable"
9373
+ },
9374
+ "title": "Variables",
9375
+ "type": "array"
8788
9376
  }
8789
9377
  },
9378
+ "required": [
9379
+ "compute",
9380
+ "hooks",
9381
+ "id",
9382
+ "mcp_servers",
9383
+ "repositories",
9384
+ "source",
9385
+ "variables"
9386
+ ],
8790
9387
  "title": "SessionEnvironment",
8791
9388
  "type": "object"
8792
9389
  },
9390
+ "SessionEventActor": {
9391
+ "description": "The event's initiator, when known; never inferred from resource ownership.",
9392
+ "properties": {
9393
+ "avatar_url": {
9394
+ "anyOf": [
9395
+ {
9396
+ "type": "string"
9397
+ },
9398
+ {
9399
+ "type": "null"
9400
+ }
9401
+ ],
9402
+ "default": null,
9403
+ "title": "Avatar Url"
9404
+ },
9405
+ "is_bot": {
9406
+ "anyOf": [
9407
+ {
9408
+ "type": "boolean"
9409
+ },
9410
+ {
9411
+ "type": "null"
9412
+ }
9413
+ ],
9414
+ "default": null,
9415
+ "title": "Is Bot"
9416
+ },
9417
+ "name": {
9418
+ "title": "Name",
9419
+ "type": "string"
9420
+ }
9421
+ },
9422
+ "required": [
9423
+ "avatar_url",
9424
+ "is_bot",
9425
+ "name"
9426
+ ],
9427
+ "title": "SessionEventActor",
9428
+ "type": "object"
9429
+ },
9430
+ "SessionExecutionResult": {
9431
+ "description": "Outcome of the last finished execution, retained across subsequent resumes.\n\nAn execution spans a start or resume through parking or termination, and may\ncontain several turns. Admission failures also produce a result, even when\nprovisioning never starts.",
9432
+ "properties": {
9433
+ "completion_reason": {
9434
+ "$ref": "#/$defs/SessionExitStatus",
9435
+ "description": "Why the last execution ended; completed also includes parking an open conversation."
9436
+ },
9437
+ "detail": {
9438
+ "anyOf": [
9439
+ {
9440
+ "type": "string"
9441
+ },
9442
+ {
9443
+ "type": "null"
9444
+ }
9445
+ ],
9446
+ "default": null,
9447
+ "description": "Human-readable explanation of that outcome.",
9448
+ "title": "Detail"
9449
+ }
9450
+ },
9451
+ "required": [
9452
+ "completion_reason",
9453
+ "detail"
9454
+ ],
9455
+ "title": "SessionExecutionResult",
9456
+ "type": "object"
9457
+ },
8793
9458
  "SessionExitStatus": {
8794
9459
  "description": "Why a terminal agent session ended \u2014 a finer-grained reason than `status`.\n\n`status` (SessionStatus) is the lifecycle state: COMPLETED / ERROR /\nCANCELLED. `exit_status` explains *why* a run reached that terminal state, so\nthe UI and metrics can tell a budget cutoff apart from a crashed tool call or\na deliberate cancellation. It is None until the run reaches a terminal state.",
8795
9460
  "enum": [
@@ -8833,7 +9498,7 @@
8833
9498
  "type": "object"
8834
9499
  },
8835
9500
  "SessionGit": {
8836
- "description": "Every repo the session touched. Small enough to ride on `agent_sessions`\nand be returned by every session read.",
9501
+ "description": "Every repo the session touched. Small enough to ride on `sessions`\nand be returned by every session read.",
8837
9502
  "properties": {
8838
9503
  "repos": {
8839
9504
  "default": [],
@@ -8844,6 +9509,9 @@
8844
9509
  "type": "array"
8845
9510
  }
8846
9511
  },
9512
+ "required": [
9513
+ "repos"
9514
+ ],
8847
9515
  "title": "SessionGit",
8848
9516
  "type": "object"
8849
9517
  },
@@ -8869,10 +9537,10 @@
8869
9537
  }
8870
9538
  },
8871
9539
  "required": [
8872
- "sha",
8873
- "subject",
8874
9540
  "committed_at",
8875
- "pushed"
9541
+ "pushed",
9542
+ "sha",
9543
+ "subject"
8876
9544
  ],
8877
9545
  "title": "SessionGitCommit",
8878
9546
  "type": "object"
@@ -8898,10 +9566,10 @@
8898
9566
  }
8899
9567
  },
8900
9568
  "required": [
8901
- "path",
8902
- "status",
8903
9569
  "additions",
8904
- "deletions"
9570
+ "deletions",
9571
+ "path",
9572
+ "status"
8905
9573
  ],
8906
9574
  "title": "SessionGitFile",
8907
9575
  "type": "object"
@@ -8943,7 +9611,9 @@
8943
9611
  }
8944
9612
  },
8945
9613
  "required": [
9614
+ "gh_pr_id",
8946
9615
  "number",
9616
+ "title",
8947
9617
  "url"
8948
9618
  ],
8949
9619
  "title": "SessionGitPr",
@@ -9023,11 +9693,53 @@
9023
9693
  }
9024
9694
  },
9025
9695
  "required": [
9026
- "full_name"
9696
+ "commits",
9697
+ "commits_total",
9698
+ "full_name",
9699
+ "local_commit",
9700
+ "local_uncommitted_files",
9701
+ "prs",
9702
+ "remote_branch",
9703
+ "remote_commit"
9027
9704
  ],
9028
9705
  "title": "SessionGitRepo",
9029
9706
  "type": "object"
9030
9707
  },
9708
+ "SessionHandler": {
9709
+ "description": "The saved handler and its display name when the session started.",
9710
+ "properties": {
9711
+ "agent_name": {
9712
+ "description": "The handler's effective display name when the session started: ellipsis.name, or the service default (Slack, GitHub, Linear, or sentry).",
9713
+ "minLength": 1,
9714
+ "title": "Agent Name",
9715
+ "type": "string"
9716
+ },
9717
+ "id": {
9718
+ "description": "Identifier of the saved handler.",
9719
+ "minLength": 1,
9720
+ "title": "Id",
9721
+ "type": "string"
9722
+ },
9723
+ "service": {
9724
+ "$ref": "#/$defs/HandlerService",
9725
+ "description": "The service the handler responds to."
9726
+ },
9727
+ "sha": {
9728
+ "description": "Content fingerprint of the validated handler configuration used when the session started. This is not the Git commit SHA.",
9729
+ "minLength": 1,
9730
+ "title": "Sha",
9731
+ "type": "string"
9732
+ }
9733
+ },
9734
+ "required": [
9735
+ "agent_name",
9736
+ "id",
9737
+ "service",
9738
+ "sha"
9739
+ ],
9740
+ "title": "SessionHandler",
9741
+ "type": "object"
9742
+ },
9031
9743
  "SessionIdlePayload": {
9032
9744
  "additionalProperties": true,
9033
9745
  "description": "session_idle \u2014 the warm loop ended and the durable conversation is\nparked; the next message wakes it.",
@@ -9037,19 +9749,6 @@
9037
9749
  },
9038
9750
  "SessionIdleRecord": {
9039
9751
  "properties": {
9040
- "agent_turn_id": {
9041
- "anyOf": [
9042
- {
9043
- "type": "string"
9044
- },
9045
- {
9046
- "type": "null"
9047
- }
9048
- ],
9049
- "default": null,
9050
- "description": "Turn containing this record, when applicable.",
9051
- "title": "Agent Turn Id"
9052
- },
9053
9752
  "cost": {
9054
9753
  "anyOf": [
9055
9754
  {
@@ -9202,10 +9901,22 @@
9202
9901
  ],
9203
9902
  "default": null,
9204
9903
  "title": "Tools"
9904
+ },
9905
+ "turn_id": {
9906
+ "anyOf": [
9907
+ {
9908
+ "type": "string"
9909
+ },
9910
+ {
9911
+ "type": "null"
9912
+ }
9913
+ ],
9914
+ "default": null,
9915
+ "description": "Turn containing this record, when applicable.",
9916
+ "title": "Turn Id"
9205
9917
  }
9206
9918
  },
9207
9919
  "required": [
9208
- "agent_turn_id",
9209
9920
  "cost",
9210
9921
  "created_at",
9211
9922
  "duration",
@@ -9223,20 +9934,114 @@
9223
9934
  "source",
9224
9935
  "stream_seq",
9225
9936
  "tokens_info",
9226
- "tools"
9937
+ "tools",
9938
+ "turn_id"
9939
+ ],
9940
+ "title": "SessionIdleRecord",
9941
+ "type": "object",
9942
+ "x-ellipsis-preserve-payload": true
9943
+ },
9944
+ "SessionLifecycle": {
9945
+ "description": "Current activity, conversation state, messaging policy, and lifecycle history.",
9946
+ "properties": {
9947
+ "archived": {
9948
+ "anyOf": [
9949
+ {
9950
+ "$ref": "#/$defs/SessionArchived"
9951
+ },
9952
+ {
9953
+ "type": "null"
9954
+ }
9955
+ ],
9956
+ "default": null,
9957
+ "description": "When and by whom the session was archived; null when unarchived. Archiving does not stop or close a session."
9958
+ },
9959
+ "conversation": {
9960
+ "$ref": "#/$defs/ConversationState",
9961
+ "description": "Whether the conversation is open or permanently closed. Open does not imply direct messages are permitted."
9962
+ },
9963
+ "detail": {
9964
+ "anyOf": [
9965
+ {
9966
+ "type": "string"
9967
+ },
9968
+ {
9969
+ "type": "null"
9970
+ }
9971
+ ],
9972
+ "default": null,
9973
+ "description": "Explanation of the current status, when applicable.",
9974
+ "title": "Detail"
9975
+ },
9976
+ "interactive": {
9977
+ "description": "Whether the session stays open after its first turn.",
9978
+ "title": "Interactive",
9979
+ "type": "boolean"
9980
+ },
9981
+ "last_execution_result": {
9982
+ "anyOf": [
9983
+ {
9984
+ "$ref": "#/$defs/SessionExecutionResult"
9985
+ },
9986
+ {
9987
+ "type": "null"
9988
+ }
9989
+ ],
9990
+ "default": null,
9991
+ "description": "The last finished execution's outcome, retained across resumes; null until an outcome has been recorded."
9992
+ },
9993
+ "prompting": {
9994
+ "$ref": "#/$defs/SessionPrompting",
9995
+ "description": "The session's policy for direct messages. Caller authorization and message validation are checked separately."
9996
+ },
9997
+ "status": {
9998
+ "$ref": "#/$defs/SessionLifecycleStatus",
9999
+ "description": "Canonical current activity. working means a turn is in progress; waiting means the worker is warm and awaiting input; idle means parked. A failed, stopped, or cancelled execution may leave an open conversation."
10000
+ },
10001
+ "stopped": {
10002
+ "anyOf": [
10003
+ {
10004
+ "$ref": "#/$defs/SessionStopped"
10005
+ },
10006
+ {
10007
+ "type": "null"
10008
+ }
10009
+ ],
10010
+ "default": null,
10011
+ "description": "When and by whom a stop was requested; null when no stop is pending for this execution."
10012
+ },
10013
+ "timestamps": {
10014
+ "$ref": "#/$defs/SessionTimestamps"
10015
+ }
10016
+ },
10017
+ "required": [
10018
+ "archived",
10019
+ "conversation",
10020
+ "detail",
10021
+ "interactive",
10022
+ "last_execution_result",
10023
+ "prompting",
10024
+ "status",
10025
+ "stopped",
10026
+ "timestamps"
9227
10027
  ],
9228
- "title": "SessionIdleRecord",
9229
- "type": "object",
9230
- "x-ellipsis-preserve-payload": true
10028
+ "title": "SessionLifecycle",
10029
+ "type": "object"
9231
10030
  },
9232
- "SessionLiveness": {
9233
- "description": "The durable conversation axis (backs the surfaced `session` field).",
10031
+ "SessionLifecycleStatus": {
9234
10032
  "enum": [
9235
- "alive",
10033
+ "scheduled",
10034
+ "starting",
10035
+ "working",
10036
+ "waiting",
10037
+ "retrying",
9236
10038
  "idle",
9237
- "closed"
10039
+ "closed",
10040
+ "failed",
10041
+ "stopped",
10042
+ "cancelled"
9238
10043
  ],
9239
- "title": "SessionLiveness",
10044
+ "title": "SessionLifecycleStatus",
9240
10045
  "type": "string"
9241
10046
  },
9242
10047
  "SessionMessage": {
@@ -9407,33 +10212,8 @@
9407
10212
  "type": "string"
9408
10213
  },
9409
10214
  "SessionParent": {
9410
- "description": "The ONE \"preceded-by\" chain: the predecessor session and how this one\nrelates to it. Not a parent that orchestrates children \u2014 a session never\nspawns sub-sessions.",
10215
+ "description": "The predecessor session this session continues.",
9411
10216
  "properties": {
9412
- "kind": {
9413
- "anyOf": [
9414
- {
9415
- "$ref": "#/$defs/ParentKind"
9416
- },
9417
- {
9418
- "type": "null"
9419
- }
9420
- ],
9421
- "default": null,
9422
- "description": "How this session relates to its parent session, if any."
9423
- },
9424
- "replayed_from_session_id": {
9425
- "anyOf": [
9426
- {
9427
- "type": "string"
9428
- },
9429
- {
9430
- "type": "null"
9431
- }
9432
- ],
9433
- "default": null,
9434
- "description": "Identifier of the original session this one was replayed from, if it was started via replay.",
9435
- "title": "Replayed From Session Id"
9436
- },
9437
10217
  "session_id": {
9438
10218
  "anyOf": [
9439
10219
  {
@@ -9444,10 +10224,13 @@
9444
10224
  }
9445
10225
  ],
9446
10226
  "default": null,
9447
- "description": "Identifier of the parent session that spawned this one, if any.",
10227
+ "description": "Identifier of the predecessor session this session continues, if any.",
9448
10228
  "title": "Session Id"
9449
10229
  }
9450
10230
  },
10231
+ "required": [
10232
+ "session_id"
10233
+ ],
9451
10234
  "title": "SessionParent",
9452
10235
  "type": "object"
9453
10236
  },
@@ -9495,7 +10278,10 @@
9495
10278
  }
9496
10279
  },
9497
10280
  "required": [
9498
- "enabled"
10281
+ "blocked_reason",
10282
+ "detail",
10283
+ "enabled",
10284
+ "surface_name"
9499
10285
  ],
9500
10286
  "title": "SessionPrompting",
9501
10287
  "type": "object"
@@ -9539,19 +10325,6 @@
9539
10325
  },
9540
10326
  "SessionResumedRecord": {
9541
10327
  "properties": {
9542
- "agent_turn_id": {
9543
- "anyOf": [
9544
- {
9545
- "type": "string"
9546
- },
9547
- {
9548
- "type": "null"
9549
- }
9550
- ],
9551
- "default": null,
9552
- "description": "Turn containing this record, when applicable.",
9553
- "title": "Agent Turn Id"
9554
- },
9555
10328
  "cost": {
9556
10329
  "anyOf": [
9557
10330
  {
@@ -9704,10 +10477,22 @@
9704
10477
  ],
9705
10478
  "default": null,
9706
10479
  "title": "Tools"
10480
+ },
10481
+ "turn_id": {
10482
+ "anyOf": [
10483
+ {
10484
+ "type": "string"
10485
+ },
10486
+ {
10487
+ "type": "null"
10488
+ }
10489
+ ],
10490
+ "default": null,
10491
+ "description": "Turn containing this record, when applicable.",
10492
+ "title": "Turn Id"
9707
10493
  }
9708
10494
  },
9709
10495
  "required": [
9710
- "agent_turn_id",
9711
10496
  "cost",
9712
10497
  "created_at",
9713
10498
  "duration",
@@ -9725,7 +10510,8 @@
9725
10510
  "source",
9726
10511
  "stream_seq",
9727
10512
  "tokens_info",
9728
- "tools"
10513
+ "tools",
10514
+ "turn_id"
9729
10515
  ],
9730
10516
  "title": "SessionResumedRecord",
9731
10517
  "type": "object",
@@ -9753,19 +10539,6 @@
9753
10539
  },
9754
10540
  "SessionRetryingRecord": {
9755
10541
  "properties": {
9756
- "agent_turn_id": {
9757
- "anyOf": [
9758
- {
9759
- "type": "string"
9760
- },
9761
- {
9762
- "type": "null"
9763
- }
9764
- ],
9765
- "default": null,
9766
- "description": "Turn containing this record, when applicable.",
9767
- "title": "Agent Turn Id"
9768
- },
9769
10542
  "cost": {
9770
10543
  "anyOf": [
9771
10544
  {
@@ -9918,10 +10691,22 @@
9918
10691
  ],
9919
10692
  "default": null,
9920
10693
  "title": "Tools"
10694
+ },
10695
+ "turn_id": {
10696
+ "anyOf": [
10697
+ {
10698
+ "type": "string"
10699
+ },
10700
+ {
10701
+ "type": "null"
10702
+ }
10703
+ ],
10704
+ "default": null,
10705
+ "description": "Turn containing this record, when applicable.",
10706
+ "title": "Turn Id"
9921
10707
  }
9922
10708
  },
9923
10709
  "required": [
9924
- "agent_turn_id",
9925
10710
  "cost",
9926
10711
  "created_at",
9927
10712
  "duration",
@@ -9939,7 +10724,8 @@
9939
10724
  "source",
9940
10725
  "stream_seq",
9941
10726
  "tokens_info",
9942
- "tools"
10727
+ "tools",
10728
+ "turn_id"
9943
10729
  ],
9944
10730
  "title": "SessionRetryingRecord",
9945
10731
  "type": "object",
@@ -9986,19 +10772,6 @@
9986
10772
  },
9987
10773
  "SessionScheduledRecord": {
9988
10774
  "properties": {
9989
- "agent_turn_id": {
9990
- "anyOf": [
9991
- {
9992
- "type": "string"
9993
- },
9994
- {
9995
- "type": "null"
9996
- }
9997
- ],
9998
- "default": null,
9999
- "description": "Turn containing this record, when applicable.",
10000
- "title": "Agent Turn Id"
10001
- },
10002
10775
  "cost": {
10003
10776
  "anyOf": [
10004
10777
  {
@@ -10151,10 +10924,22 @@
10151
10924
  ],
10152
10925
  "default": null,
10153
10926
  "title": "Tools"
10927
+ },
10928
+ "turn_id": {
10929
+ "anyOf": [
10930
+ {
10931
+ "type": "string"
10932
+ },
10933
+ {
10934
+ "type": "null"
10935
+ }
10936
+ ],
10937
+ "default": null,
10938
+ "description": "Turn containing this record, when applicable.",
10939
+ "title": "Turn Id"
10154
10940
  }
10155
10941
  },
10156
10942
  "required": [
10157
- "agent_turn_id",
10158
10943
  "cost",
10159
10944
  "created_at",
10160
10945
  "duration",
@@ -10172,7 +10957,8 @@
10172
10957
  "source",
10173
10958
  "stream_seq",
10174
10959
  "tokens_info",
10175
- "tools"
10960
+ "tools",
10961
+ "turn_id"
10176
10962
  ],
10177
10963
  "title": "SessionScheduledRecord",
10178
10964
  "type": "object",
@@ -10213,19 +10999,6 @@
10213
10999
  },
10214
11000
  "SessionStartingRecord": {
10215
11001
  "properties": {
10216
- "agent_turn_id": {
10217
- "anyOf": [
10218
- {
10219
- "type": "string"
10220
- },
10221
- {
10222
- "type": "null"
10223
- }
10224
- ],
10225
- "default": null,
10226
- "description": "Turn containing this record, when applicable.",
10227
- "title": "Agent Turn Id"
10228
- },
10229
11002
  "cost": {
10230
11003
  "anyOf": [
10231
11004
  {
@@ -10378,10 +11151,22 @@
10378
11151
  ],
10379
11152
  "default": null,
10380
11153
  "title": "Tools"
11154
+ },
11155
+ "turn_id": {
11156
+ "anyOf": [
11157
+ {
11158
+ "type": "string"
11159
+ },
11160
+ {
11161
+ "type": "null"
11162
+ }
11163
+ ],
11164
+ "default": null,
11165
+ "description": "Turn containing this record, when applicable.",
11166
+ "title": "Turn Id"
10381
11167
  }
10382
11168
  },
10383
11169
  "required": [
10384
- "agent_turn_id",
10385
11170
  "cost",
10386
11171
  "created_at",
10387
11172
  "duration",
@@ -10399,67 +11184,23 @@
10399
11184
  "source",
10400
11185
  "stream_seq",
10401
11186
  "tokens_info",
10402
- "tools"
11187
+ "tools",
11188
+ "turn_id"
10403
11189
  ],
10404
11190
  "title": "SessionStartingRecord",
10405
11191
  "type": "object",
10406
11192
  "x-ellipsis-preserve-payload": true
10407
11193
  },
10408
- "SessionState": {
10409
- "description": "Lifecycle of a keyed (multi-turn) session \u2014 the durable conversation.\nDistinct from SessionStatus, which is per-execution (one turn's run) and\nmoves to agent_turns in a later slice. IDLE: alive, waiting for the next\nmessage. RUNNING: a turn is executing. CLOSED: the conversation is done and\nits sandbox/snapshots are torn down.",
10410
- "enum": [
10411
- "idle",
10412
- "running",
10413
- "closed"
10414
- ],
10415
- "title": "SessionState",
10416
- "type": "string"
10417
- },
10418
- "SessionStatus": {
10419
- "enum": [
10420
- "scheduled",
10421
- "creating_sandbox",
10422
- "running",
10423
- "retrying",
10424
- "completed",
10425
- "error",
10426
- "cancelled",
10427
- "stopped"
10428
- ],
10429
- "title": "SessionStatus",
10430
- "type": "string"
10431
- },
10432
11194
  "SessionStopped": {
10433
- "description": "The stop request, if there was one: when, by which GitHub account id,\nand that account resolved to a display snippet.",
11195
+ "description": "When a stop was requested and the GitHub user who requested it.",
10434
11196
  "properties": {
10435
11197
  "at": {
10436
- "anyOf": [
10437
- {
10438
- "format": "date-time",
10439
- "type": "string"
10440
- },
10441
- {
10442
- "type": "null"
10443
- }
10444
- ],
10445
- "default": null,
10446
- "description": "When a stop was requested, if one was.",
10447
- "title": "At"
11198
+ "description": "When a stop was requested.",
11199
+ "format": "date-time",
11200
+ "title": "At",
11201
+ "type": "string"
10448
11202
  },
10449
11203
  "by": {
10450
- "anyOf": [
10451
- {
10452
- "type": "integer"
10453
- },
10454
- {
10455
- "type": "null"
10456
- }
10457
- ],
10458
- "default": null,
10459
- "description": "GitHub account id of the user who stopped the session, if known.",
10460
- "title": "By"
10461
- },
10462
- "by_user": {
10463
11204
  "anyOf": [
10464
11205
  {
10465
11206
  "$ref": "#/$defs/GithubAccountSnippet"
@@ -10469,9 +11210,13 @@
10469
11210
  }
10470
11211
  ],
10471
11212
  "default": null,
10472
- "description": "The GitHub user who stopped the session, resolved at read time."
11213
+ "description": "The GitHub user who stopped the session, resolved at read time. Null if the user is unknown or unavailable."
10473
11214
  }
10474
11215
  },
11216
+ "required": [
11217
+ "at",
11218
+ "by"
11219
+ ],
10475
11220
  "title": "SessionStopped",
10476
11221
  "type": "object"
10477
11222
  },
@@ -10499,52 +11244,62 @@
10499
11244
  }
10500
11245
  },
10501
11246
  "required": [
11247
+ "created_at",
10502
11248
  "description"
10503
11249
  ],
10504
11250
  "title": "SessionSummary",
10505
11251
  "type": "object"
10506
11252
  },
10507
- "SessionSurface": {
10508
- "description": "The three fields we expose.\n\n`use_enum_values=True` (from CustomBaseModel) stores the members as their\nstring values, so this serializes to `{\"session\": \"alive\", \"run\": \"waiting\",\n\"status\": \"waiting\"}` \u2014 a plain object, not enum names.",
11253
+ "SessionTimestamps": {
10509
11254
  "properties": {
10510
- "run": {
10511
- "anyOf": [
10512
- {
10513
- "$ref": "#/$defs/RunStatus"
10514
- },
10515
- {
10516
- "type": "null"
10517
- }
10518
- ]
11255
+ "created_at": {
11256
+ "description": "When the session was created.",
11257
+ "format": "date-time",
11258
+ "title": "Created At",
11259
+ "type": "string"
10519
11260
  },
10520
- "session": {
11261
+ "last_activity_at": {
10521
11262
  "anyOf": [
10522
11263
  {
10523
- "$ref": "#/$defs/SessionLiveness"
11264
+ "format": "date-time",
11265
+ "type": "string"
10524
11266
  },
10525
11267
  {
10526
11268
  "type": "null"
10527
11269
  }
10528
- ]
11270
+ ],
11271
+ "default": null,
11272
+ "description": "When the session last showed agent activity.",
11273
+ "title": "Last Activity At"
10529
11274
  },
10530
- "status": {
11275
+ "last_message_at": {
10531
11276
  "anyOf": [
10532
11277
  {
11278
+ "format": "date-time",
10533
11279
  "type": "string"
10534
11280
  },
10535
11281
  {
10536
11282
  "type": "null"
10537
11283
  }
10538
11284
  ],
10539
- "title": "Status"
11285
+ "default": null,
11286
+ "description": "When the session last received a message.",
11287
+ "title": "Last Message At"
11288
+ },
11289
+ "updated_at": {
11290
+ "description": "When the session was last updated.",
11291
+ "format": "date-time",
11292
+ "title": "Updated At",
11293
+ "type": "string"
10540
11294
  }
10541
11295
  },
10542
11296
  "required": [
10543
- "session",
10544
- "run",
10545
- "status"
11297
+ "created_at",
11298
+ "last_activity_at",
11299
+ "last_message_at",
11300
+ "updated_at"
10546
11301
  ],
10547
- "title": "SessionSurface",
11302
+ "title": "SessionTimestamps",
10548
11303
  "type": "object"
10549
11304
  },
10550
11305
  "SessionTokens": {
@@ -10587,84 +11342,89 @@
10587
11342
  "type": "integer"
10588
11343
  }
10589
11344
  },
11345
+ "required": [
11346
+ "cache_creation",
11347
+ "cache_read",
11348
+ "input",
11349
+ "model",
11350
+ "output",
11351
+ "total"
11352
+ ],
10590
11353
  "title": "SessionTokens",
10591
- "type": "object"
10592
- },
10593
- "SessionTrigger": {
10594
- "description": "The external event that started a session, without raw webhook payloads.",
10595
- "properties": {
10596
- "action": {
10597
- "anyOf": [
10598
- {
10599
- "type": "string"
10600
- },
10601
- {
10602
- "type": "null"
10603
- }
10604
- ],
10605
- "default": null,
10606
- "title": "Action"
10607
- },
10608
- "actor": {
10609
- "anyOf": [
10610
- {
10611
- "$ref": "#/$defs/SessionTriggerActor"
10612
- },
10613
- {
10614
- "type": "null"
10615
- }
10616
- ],
10617
- "default": null
10618
- },
10619
- "branch": {
10620
- "anyOf": [
10621
- {
10622
- "type": "string"
10623
- },
10624
- {
10625
- "type": "null"
10626
- }
10627
- ],
10628
- "default": null,
10629
- "title": "Branch"
11354
+ "type": "object"
11355
+ },
11356
+ "SettingsRef": {
11357
+ "additionalProperties": false,
11358
+ "description": "A config-declared Claude Code settings.json, resolved at run start and\npassed to `claude --settings <path>`. That is the CLI settings tier \u2014 BELOW\nEllipsis's managed-settings.json floor \u2014 so it customizes behavior (model\npermissions, includeCoAuthoredBy, statusLine, ...) but can never weaken a\nsecurity setting. Lets a team point the cloud agent at the same settings file\nthey already use with Claude Code locally instead of re-encoding it as YAML.",
11359
+ "properties": {
11360
+ "path": {
11361
+ "title": "Path",
11362
+ "type": "string"
10630
11363
  },
10631
- "number": {
11364
+ "repository": {
10632
11365
  "anyOf": [
10633
11366
  {
10634
- "type": "integer"
11367
+ "$ref": "#/$defs/RepositoryRef"
10635
11368
  },
10636
11369
  {
10637
11370
  "type": "null"
10638
11371
  }
10639
11372
  ],
10640
- "default": null,
10641
- "title": "Number"
11373
+ "default": null
11374
+ }
11375
+ },
11376
+ "required": [
11377
+ "path",
11378
+ "repository"
11379
+ ],
11380
+ "title": "SettingsRef",
11381
+ "type": "object"
11382
+ },
11383
+ "SkillRef": {
11384
+ "additionalProperties": false,
11385
+ "description": "A repository directory containing SKILL.md and supporting UTF-8 files.\nResolved at run start and installed in the selected harness's skill directory.\nExplicit skill references require a model with the skills capability.",
11386
+ "properties": {
11387
+ "path": {
11388
+ "title": "Path",
11389
+ "type": "string"
10642
11390
  },
10643
11391
  "repository": {
10644
11392
  "anyOf": [
10645
11393
  {
10646
- "type": "string"
11394
+ "$ref": "#/$defs/RepositoryRef"
10647
11395
  },
10648
11396
  {
10649
11397
  "type": "null"
10650
11398
  }
10651
11399
  ],
10652
- "default": null,
10653
- "title": "Repository"
10654
- },
10655
- "surface": {
11400
+ "default": null
11401
+ }
11402
+ },
11403
+ "required": [
11404
+ "path",
11405
+ "repository"
11406
+ ],
11407
+ "title": "SkillRef",
11408
+ "type": "object"
11409
+ },
11410
+ "SlackChannelCreatedEvent": {
11411
+ "properties": {
11412
+ "actor": {
10656
11413
  "anyOf": [
10657
11414
  {
10658
- "type": "string"
11415
+ "$ref": "#/$defs/SessionEventActor"
10659
11416
  },
10660
11417
  {
10661
11418
  "type": "null"
10662
11419
  }
10663
11420
  ],
10664
- "default": null,
10665
- "title": "Surface"
11421
+ "default": null
10666
11422
  },
10667
- "title": {
11423
+ "channel_id": {
11424
+ "title": "Channel Id",
11425
+ "type": "string"
11426
+ },
11427
+ "channel_name": {
10668
11428
  "anyOf": [
10669
11429
  {
10670
11430
  "type": "string"
@@ -10674,104 +11434,104 @@
10674
11434
  }
10675
11435
  ],
10676
11436
  "default": null,
10677
- "title": "Title"
11437
+ "title": "Channel Name"
11438
+ },
11439
+ "type": {
11440
+ "const": "slack.channel_created",
11441
+ "default": "slack.channel_created",
11442
+ "title": "Type",
11443
+ "type": "string"
10678
11444
  },
10679
11445
  "url": {
10680
- "anyOf": [
10681
- {
10682
- "type": "string"
10683
- },
10684
- {
10685
- "type": "null"
10686
- }
10687
- ],
10688
- "default": null,
10689
- "title": "Url"
11446
+ "title": "Url",
11447
+ "type": "string"
10690
11448
  }
10691
11449
  },
10692
- "title": "SessionTrigger",
11450
+ "required": [
11451
+ "actor",
11452
+ "channel_id",
11453
+ "channel_name",
11454
+ "type",
11455
+ "url"
11456
+ ],
11457
+ "title": "SlackChannelCreatedEvent",
10693
11458
  "type": "object"
10694
11459
  },
10695
- "SessionTriggerActor": {
11460
+ "SlackMessageEvent": {
10696
11461
  "properties": {
10697
- "avatar_url": {
11462
+ "action": {
11463
+ "enum": [
11464
+ "message",
11465
+ "app_mention"
11466
+ ],
11467
+ "title": "Action",
11468
+ "type": "string"
11469
+ },
11470
+ "actor": {
10698
11471
  "anyOf": [
10699
11472
  {
10700
- "type": "string"
11473
+ "$ref": "#/$defs/SessionEventActor"
10701
11474
  },
10702
11475
  {
10703
11476
  "type": "null"
10704
11477
  }
10705
11478
  ],
10706
- "default": null,
10707
- "title": "Avatar Url"
10708
- },
10709
- "is_bot": {
10710
- "default": false,
10711
- "title": "Is Bot",
10712
- "type": "boolean"
11479
+ "default": null
10713
11480
  },
10714
- "name": {
10715
- "title": "Name",
10716
- "type": "string"
10717
- }
10718
- },
10719
- "required": [
10720
- "name"
10721
- ],
10722
- "title": "SessionTriggerActor",
10723
- "type": "object"
10724
- },
10725
- "SettingsRef": {
10726
- "additionalProperties": false,
10727
- "description": "A config-declared Claude Code settings.json, resolved at run start and\npassed to `claude --settings <path>`. That is the CLI settings tier \u2014 BELOW\nEllipsis's managed-settings.json floor \u2014 so it customizes behavior (model\npermissions, includeCoAuthoredBy, statusLine, ...) but can never weaken a\nsecurity setting. Lets a team point the cloud agent at the same settings file\nthey already use with Claude Code locally instead of re-encoding it as YAML.",
10728
- "properties": {
10729
- "path": {
10730
- "title": "Path",
11481
+ "channel_id": {
11482
+ "title": "Channel Id",
10731
11483
  "type": "string"
10732
11484
  },
10733
- "repository": {
11485
+ "channel_name": {
10734
11486
  "anyOf": [
10735
11487
  {
10736
- "$ref": "#/$defs/RepositoryRef"
11488
+ "type": "string"
10737
11489
  },
10738
11490
  {
10739
11491
  "type": "null"
10740
11492
  }
10741
11493
  ],
10742
- "default": null
10743
- }
10744
- },
10745
- "required": [
10746
- "path"
10747
- ],
10748
- "title": "SettingsRef",
10749
- "type": "object"
10750
- },
10751
- "SkillRef": {
10752
- "additionalProperties": false,
10753
- "description": "A repository directory containing SKILL.md and supporting UTF-8 files.\nResolved at run start and installed in the selected harness's skill directory.\nExplicit skill references require a model with the skills capability.",
10754
- "properties": {
10755
- "path": {
10756
- "title": "Path",
11494
+ "default": null,
11495
+ "title": "Channel Name"
11496
+ },
11497
+ "message_ts": {
11498
+ "title": "Message Ts",
10757
11499
  "type": "string"
10758
11500
  },
10759
- "repository": {
11501
+ "thread_ts": {
10760
11502
  "anyOf": [
10761
11503
  {
10762
- "$ref": "#/$defs/RepositoryRef"
11504
+ "type": "string"
10763
11505
  },
10764
11506
  {
10765
11507
  "type": "null"
10766
11508
  }
10767
11509
  ],
10768
- "default": null
11510
+ "default": null,
11511
+ "title": "Thread Ts"
11512
+ },
11513
+ "type": {
11514
+ "const": "slack.message",
11515
+ "default": "slack.message",
11516
+ "title": "Type",
11517
+ "type": "string"
11518
+ },
11519
+ "url": {
11520
+ "title": "Url",
11521
+ "type": "string"
10769
11522
  }
10770
11523
  },
10771
11524
  "required": [
10772
- "path"
11525
+ "action",
11526
+ "actor",
11527
+ "channel_id",
11528
+ "channel_name",
11529
+ "message_ts",
11530
+ "thread_ts",
11531
+ "type",
11532
+ "url"
10773
11533
  ],
10774
- "title": "SkillRef",
11534
+ "title": "SlackMessageEvent",
10775
11535
  "type": "object"
10776
11536
  },
10777
11537
  "SnapshotFrame": {
@@ -10798,7 +11558,7 @@
10798
11558
  "type": "array"
10799
11559
  },
10800
11560
  "protocol": {
10801
- "default": 4,
11561
+ "default": 6,
10802
11562
  "description": "Echoes the protocol version the server is serving.",
10803
11563
  "title": "Protocol",
10804
11564
  "type": "integer"
@@ -10824,31 +11584,6 @@
10824
11584
  "title": "SnapshotFrame",
10825
11585
  "type": "object"
10826
11586
  },
10827
- "SystemFileRef": {
10828
- "additionalProperties": false,
10829
- "properties": {
10830
- "file": {
10831
- "title": "File",
10832
- "type": "string"
10833
- },
10834
- "repository": {
10835
- "anyOf": [
10836
- {
10837
- "$ref": "#/$defs/RepositoryRef"
10838
- },
10839
- {
10840
- "type": "null"
10841
- }
10842
- ],
10843
- "default": null
10844
- }
10845
- },
10846
- "required": [
10847
- "file"
10848
- ],
10849
- "title": "SystemFileRef",
10850
- "type": "object"
10851
- },
10852
11587
  "TokensInfo": {
10853
11588
  "additionalProperties": false,
10854
11589
  "description": "Token/cost usage, per record (one API call's counts, aggregate fields at\ntheir zero defaults) or aggregated per execution/session\n(compute_spend_from_records derives num_turns and cost_usd).\n\nStrict on purpose: this is our own persisted schema, so an unknown key is a\nwriter bug (the num_turns=0 bug shipped because a Claude Code usage dict\nvalidated leniently against this model, silently zeroing every\nnon-overlapping field). Legacy keys were dropped from persisted blobs by\nthe 2026-07-26 tokens_info migration; per-model usage lives on\n`execution.model_usage` (CC's modelUsage, verbatim).",
@@ -10921,19 +11656,6 @@
10921
11656
  },
10922
11657
  "TurnCompletedRecord": {
10923
11658
  "properties": {
10924
- "agent_turn_id": {
10925
- "anyOf": [
10926
- {
10927
- "type": "string"
10928
- },
10929
- {
10930
- "type": "null"
10931
- }
10932
- ],
10933
- "default": null,
10934
- "description": "Turn containing this record, when applicable.",
10935
- "title": "Agent Turn Id"
10936
- },
10937
11659
  "cost": {
10938
11660
  "anyOf": [
10939
11661
  {
@@ -11086,10 +11808,22 @@
11086
11808
  ],
11087
11809
  "default": null,
11088
11810
  "title": "Tools"
11811
+ },
11812
+ "turn_id": {
11813
+ "anyOf": [
11814
+ {
11815
+ "type": "string"
11816
+ },
11817
+ {
11818
+ "type": "null"
11819
+ }
11820
+ ],
11821
+ "default": null,
11822
+ "description": "Turn containing this record, when applicable.",
11823
+ "title": "Turn Id"
11089
11824
  }
11090
11825
  },
11091
11826
  "required": [
11092
- "agent_turn_id",
11093
11827
  "cost",
11094
11828
  "created_at",
11095
11829
  "duration",
@@ -11107,7 +11841,8 @@
11107
11841
  "source",
11108
11842
  "stream_seq",
11109
11843
  "tokens_info",
11110
- "tools"
11844
+ "tools",
11845
+ "turn_id"
11111
11846
  ],
11112
11847
  "title": "TurnCompletedRecord",
11113
11848
  "type": "object",
@@ -11135,19 +11870,6 @@
11135
11870
  },
11136
11871
  "TurnFailedRecord": {
11137
11872
  "properties": {
11138
- "agent_turn_id": {
11139
- "anyOf": [
11140
- {
11141
- "type": "string"
11142
- },
11143
- {
11144
- "type": "null"
11145
- }
11146
- ],
11147
- "default": null,
11148
- "description": "Turn containing this record, when applicable.",
11149
- "title": "Agent Turn Id"
11150
- },
11151
11873
  "cost": {
11152
11874
  "anyOf": [
11153
11875
  {
@@ -11300,10 +12022,22 @@
11300
12022
  ],
11301
12023
  "default": null,
11302
12024
  "title": "Tools"
12025
+ },
12026
+ "turn_id": {
12027
+ "anyOf": [
12028
+ {
12029
+ "type": "string"
12030
+ },
12031
+ {
12032
+ "type": "null"
12033
+ }
12034
+ ],
12035
+ "default": null,
12036
+ "description": "Turn containing this record, when applicable.",
12037
+ "title": "Turn Id"
11303
12038
  }
11304
12039
  },
11305
12040
  "required": [
11306
- "agent_turn_id",
11307
12041
  "cost",
11308
12042
  "created_at",
11309
12043
  "duration",
@@ -11321,7 +12055,8 @@
11321
12055
  "source",
11322
12056
  "stream_seq",
11323
12057
  "tokens_info",
11324
- "tools"
12058
+ "tools",
12059
+ "turn_id"
11325
12060
  ],
11326
12061
  "title": "TurnFailedRecord",
11327
12062
  "type": "object",
@@ -11349,19 +12084,6 @@
11349
12084
  },
11350
12085
  "TurnStartedRecord": {
11351
12086
  "properties": {
11352
- "agent_turn_id": {
11353
- "anyOf": [
11354
- {
11355
- "type": "string"
11356
- },
11357
- {
11358
- "type": "null"
11359
- }
11360
- ],
11361
- "default": null,
11362
- "description": "Turn containing this record, when applicable.",
11363
- "title": "Agent Turn Id"
11364
- },
11365
12087
  "cost": {
11366
12088
  "anyOf": [
11367
12089
  {
@@ -11514,10 +12236,22 @@
11514
12236
  ],
11515
12237
  "default": null,
11516
12238
  "title": "Tools"
12239
+ },
12240
+ "turn_id": {
12241
+ "anyOf": [
12242
+ {
12243
+ "type": "string"
12244
+ },
12245
+ {
12246
+ "type": "null"
12247
+ }
12248
+ ],
12249
+ "default": null,
12250
+ "description": "Turn containing this record, when applicable.",
12251
+ "title": "Turn Id"
11517
12252
  }
11518
12253
  },
11519
12254
  "required": [
11520
- "agent_turn_id",
11521
12255
  "cost",
11522
12256
  "created_at",
11523
12257
  "duration",
@@ -11535,7 +12269,8 @@
11535
12269
  "source",
11536
12270
  "stream_seq",
11537
12271
  "tokens_info",
11538
- "tools"
12272
+ "tools",
12273
+ "turn_id"
11539
12274
  ],
11540
12275
  "title": "TurnStartedRecord",
11541
12276
  "type": "object",
@@ -11544,19 +12279,6 @@
11544
12279
  "UnknownSessionRecord": {
11545
12280
  "description": "Unrecognized or unparseable payload; the complete original stays readable.",
11546
12281
  "properties": {
11547
- "agent_turn_id": {
11548
- "anyOf": [
11549
- {
11550
- "type": "string"
11551
- },
11552
- {
11553
- "type": "null"
11554
- }
11555
- ],
11556
- "default": null,
11557
- "description": "Turn containing this record, when applicable.",
11558
- "title": "Agent Turn Id"
11559
- },
11560
12282
  "cost": {
11561
12283
  "anyOf": [
11562
12284
  {
@@ -11708,10 +12430,22 @@
11708
12430
  ],
11709
12431
  "default": null,
11710
12432
  "title": "Tools"
12433
+ },
12434
+ "turn_id": {
12435
+ "anyOf": [
12436
+ {
12437
+ "type": "string"
12438
+ },
12439
+ {
12440
+ "type": "null"
12441
+ }
12442
+ ],
12443
+ "default": null,
12444
+ "description": "Turn containing this record, when applicable.",
12445
+ "title": "Turn Id"
11711
12446
  }
11712
12447
  },
11713
12448
  "required": [
11714
- "agent_turn_id",
11715
12449
  "cost",
11716
12450
  "created_at",
11717
12451
  "duration",
@@ -11729,7 +12463,8 @@
11729
12463
  "source",
11730
12464
  "stream_seq",
11731
12465
  "tokens_info",
11732
- "tools"
12466
+ "tools",
12467
+ "turn_id"
11733
12468
  ],
11734
12469
  "title": "UnknownSessionRecord",
11735
12470
  "type": "object",
@@ -11737,7 +12472,7 @@
11737
12472
  }
11738
12473
  },
11739
12474
  "$schema": "https://json-schema.org/draft/2020-12/schema",
11740
- "description": "One server-to-client frame of the Ellipsis session stream protocol v4 (WS /v1/sessions/{id}/stream?protocol=4). Clients MUST ignore frames with unknown `type` values \u2014 additive frames are not a protocol break.",
12475
+ "description": "One server-to-client frame of the Ellipsis session stream protocol v6 (WS /v1/sessions/{id}/stream?protocol=6). Clients MUST ignore frames with unknown `type` values \u2014 additive frames are not a protocol break.",
11741
12476
  "oneOf": [
11742
12477
  {
11743
12478
  "$ref": "#/$defs/SnapshotFrame"