@ellipsis-dev/sdk 0.36.0 → 0.37.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.
@@ -2226,7 +2226,7 @@
2226
2226
  "type": "null"
2227
2227
  }
2228
2228
  ],
2229
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
2229
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
2230
2230
  "title": "Prompt"
2231
2231
  },
2232
2232
  "settings": {
@@ -2297,7 +2297,7 @@
2297
2297
  "type": "null"
2298
2298
  }
2299
2299
  ],
2300
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
2300
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
2301
2301
  "title": "Prompt"
2302
2302
  },
2303
2303
  "settings": {
@@ -2411,6 +2411,18 @@
2411
2411
  "title": "Kind",
2412
2412
  "type": "string"
2413
2413
  },
2414
+ "message_id": {
2415
+ "anyOf": [
2416
+ {
2417
+ "type": "string"
2418
+ },
2419
+ {
2420
+ "type": "null"
2421
+ }
2422
+ ],
2423
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
2424
+ "title": "Message Id"
2425
+ },
2414
2426
  "model": {
2415
2427
  "anyOf": [
2416
2428
  {
@@ -2472,18 +2484,6 @@
2472
2484
  "title": "Session Id",
2473
2485
  "type": "string"
2474
2486
  },
2475
- "session_message_id": {
2476
- "anyOf": [
2477
- {
2478
- "type": "string"
2479
- },
2480
- {
2481
- "type": "null"
2482
- }
2483
- ],
2484
- "description": "Message this record receives, delivers, requeues, or echoes.",
2485
- "title": "Session Message Id"
2486
- },
2487
2487
  "source": {
2488
2488
  "const": "claude_code",
2489
2489
  "default": "claude_code",
@@ -2513,25 +2513,12 @@
2513
2513
  }
2514
2514
  ],
2515
2515
  "title": "Tools"
2516
- },
2517
- "turn_id": {
2518
- "anyOf": [
2519
- {
2520
- "type": "string"
2521
- },
2522
- {
2523
- "type": "null"
2524
- }
2525
- ],
2526
- "description": "Turn containing this record, when applicable.",
2527
- "title": "Turn Id"
2528
2516
  }
2529
2517
  },
2530
2518
  "required": [
2531
2519
  "id",
2532
2520
  "session_id",
2533
- "turn_id",
2534
- "session_message_id",
2521
+ "message_id",
2535
2522
  "feed_seq",
2536
2523
  "source",
2537
2524
  "record_type",
@@ -2646,7 +2633,7 @@
2646
2633
  "type": "null"
2647
2634
  }
2648
2635
  ],
2649
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
2636
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
2650
2637
  "title": "Prompt"
2651
2638
  },
2652
2639
  "settings": {
@@ -2966,6 +2953,18 @@
2966
2953
  "title": "Kind",
2967
2954
  "type": "string"
2968
2955
  },
2956
+ "message_id": {
2957
+ "anyOf": [
2958
+ {
2959
+ "type": "string"
2960
+ },
2961
+ {
2962
+ "type": "null"
2963
+ }
2964
+ ],
2965
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
2966
+ "title": "Message Id"
2967
+ },
2969
2968
  "model": {
2970
2969
  "anyOf": [
2971
2970
  {
@@ -3023,18 +3022,6 @@
3023
3022
  "title": "Session Id",
3024
3023
  "type": "string"
3025
3024
  },
3026
- "session_message_id": {
3027
- "anyOf": [
3028
- {
3029
- "type": "string"
3030
- },
3031
- {
3032
- "type": "null"
3033
- }
3034
- ],
3035
- "description": "Message this record receives, delivers, requeues, or echoes.",
3036
- "title": "Session Message Id"
3037
- },
3038
3025
  "source": {
3039
3026
  "const": "claude_code",
3040
3027
  "default": "claude_code",
@@ -3064,25 +3051,12 @@
3064
3051
  }
3065
3052
  ],
3066
3053
  "title": "Tools"
3067
- },
3068
- "turn_id": {
3069
- "anyOf": [
3070
- {
3071
- "type": "string"
3072
- },
3073
- {
3074
- "type": "null"
3075
- }
3076
- ],
3077
- "description": "Turn containing this record, when applicable.",
3078
- "title": "Turn Id"
3079
3054
  }
3080
3055
  },
3081
3056
  "required": [
3082
3057
  "id",
3083
3058
  "session_id",
3084
- "turn_id",
3085
- "session_message_id",
3059
+ "message_id",
3086
3060
  "feed_seq",
3087
3061
  "source",
3088
3062
  "record_type",
@@ -3701,6 +3675,18 @@
3701
3675
  "title": "Kind",
3702
3676
  "type": "string"
3703
3677
  },
3678
+ "message_id": {
3679
+ "anyOf": [
3680
+ {
3681
+ "type": "string"
3682
+ },
3683
+ {
3684
+ "type": "null"
3685
+ }
3686
+ ],
3687
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
3688
+ "title": "Message Id"
3689
+ },
3704
3690
  "model": {
3705
3691
  "anyOf": [
3706
3692
  {
@@ -3731,18 +3717,6 @@
3731
3717
  "title": "Session Id",
3732
3718
  "type": "string"
3733
3719
  },
3734
- "session_message_id": {
3735
- "anyOf": [
3736
- {
3737
- "type": "string"
3738
- },
3739
- {
3740
- "type": "null"
3741
- }
3742
- ],
3743
- "description": "Message this record receives, delivers, requeues, or echoes.",
3744
- "title": "Session Message Id"
3745
- },
3746
3720
  "source": {
3747
3721
  "const": "codex",
3748
3722
  "default": "codex",
@@ -3772,25 +3746,12 @@
3772
3746
  }
3773
3747
  ],
3774
3748
  "title": "Tools"
3775
- },
3776
- "turn_id": {
3777
- "anyOf": [
3778
- {
3779
- "type": "string"
3780
- },
3781
- {
3782
- "type": "null"
3783
- }
3784
- ],
3785
- "description": "Turn containing this record, when applicable.",
3786
- "title": "Turn Id"
3787
3749
  }
3788
3750
  },
3789
3751
  "required": [
3790
3752
  "id",
3791
3753
  "session_id",
3792
- "turn_id",
3793
- "session_message_id",
3754
+ "message_id",
3794
3755
  "feed_seq",
3795
3756
  "source",
3796
3757
  "record_type",
@@ -4041,7 +4002,7 @@
4041
4002
  "type": "null"
4042
4003
  }
4043
4004
  ],
4044
- "description": "Reasoning effort for every turn. Omit to use the model default."
4005
+ "description": "Reasoning effort for every message. Omit to use the model default."
4045
4006
  },
4046
4007
  "model": {
4047
4008
  "description": "The model the session runs on: a Responses-capable id from the models table. Required.",
@@ -4057,7 +4018,7 @@
4057
4018
  "type": "null"
4058
4019
  }
4059
4020
  ],
4060
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
4021
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
4061
4022
  "title": "Prompt"
4062
4023
  }
4063
4024
  },
@@ -4080,7 +4041,7 @@
4080
4041
  "type": "null"
4081
4042
  }
4082
4043
  ],
4083
- "description": "Reasoning effort for every turn. Omit to use the model default."
4044
+ "description": "Reasoning effort for every message. Omit to use the model default."
4084
4045
  },
4085
4046
  "model": {
4086
4047
  "description": "The model the session runs on: a Responses-capable id from the models table. Required.",
@@ -4096,7 +4057,7 @@
4096
4057
  "type": "null"
4097
4058
  }
4098
4059
  ],
4099
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
4060
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
4100
4061
  "title": "Prompt"
4101
4062
  }
4102
4063
  },
@@ -4904,7 +4865,7 @@
4904
4865
  "type": "null"
4905
4866
  }
4906
4867
  ],
4907
- "description": "Reasoning effort for every turn. Omit to use the model default."
4868
+ "description": "Reasoning effort for every message. Omit to use the model default."
4908
4869
  },
4909
4870
  "model": {
4910
4871
  "anyOf": [
@@ -4926,7 +4887,7 @@
4926
4887
  "type": "null"
4927
4888
  }
4928
4889
  ],
4929
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
4890
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
4930
4891
  "title": "Prompt"
4931
4892
  }
4932
4893
  },
@@ -5090,6 +5051,18 @@
5090
5051
  "title": "Kind",
5091
5052
  "type": "string"
5092
5053
  },
5054
+ "message_id": {
5055
+ "anyOf": [
5056
+ {
5057
+ "type": "string"
5058
+ },
5059
+ {
5060
+ "type": "null"
5061
+ }
5062
+ ],
5063
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
5064
+ "title": "Message Id"
5065
+ },
5093
5066
  "model": {
5094
5067
  "anyOf": [
5095
5068
  {
@@ -5159,18 +5132,6 @@
5159
5132
  "title": "Session Id",
5160
5133
  "type": "string"
5161
5134
  },
5162
- "session_message_id": {
5163
- "anyOf": [
5164
- {
5165
- "type": "string"
5166
- },
5167
- {
5168
- "type": "null"
5169
- }
5170
- ],
5171
- "description": "Message this record receives, delivers, requeues, or echoes.",
5172
- "title": "Session Message Id"
5173
- },
5174
5135
  "source": {
5175
5136
  "const": "codex",
5176
5137
  "default": "codex",
@@ -5200,25 +5161,12 @@
5200
5161
  }
5201
5162
  ],
5202
5163
  "title": "Tools"
5203
- },
5204
- "turn_id": {
5205
- "anyOf": [
5206
- {
5207
- "type": "string"
5208
- },
5209
- {
5210
- "type": "null"
5211
- }
5212
- ],
5213
- "description": "Turn containing this record, when applicable.",
5214
- "title": "Turn Id"
5215
5164
  }
5216
5165
  },
5217
5166
  "required": [
5218
5167
  "id",
5219
5168
  "session_id",
5220
- "turn_id",
5221
- "session_message_id",
5169
+ "message_id",
5222
5170
  "feed_seq",
5223
5171
  "source",
5224
5172
  "record_type",
@@ -7814,7 +7762,7 @@
7814
7762
  },
7815
7763
  "EnvironmentOutputPayload": {
7816
7764
  "additionalProperties": true,
7817
- "description": "environment_output: one chunk of output from preparing the environment,\nincluding the customer's own hooks. Many fire per turn; `chunk` orders them\nwithin a step.",
7765
+ "description": "environment_output: one chunk of output from preparing the environment,\nincluding the customer's own hooks. Many fire per message; `chunk` orders\nthem within a step.",
7818
7766
  "properties": {
7819
7767
  "chunk": {
7820
7768
  "title": "Chunk",
@@ -7901,6 +7849,18 @@
7901
7849
  "title": "Kind",
7902
7850
  "type": "string"
7903
7851
  },
7852
+ "message_id": {
7853
+ "anyOf": [
7854
+ {
7855
+ "type": "string"
7856
+ },
7857
+ {
7858
+ "type": "null"
7859
+ }
7860
+ ],
7861
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
7862
+ "title": "Message Id"
7863
+ },
7904
7864
  "model": {
7905
7865
  "anyOf": [
7906
7866
  {
@@ -7932,18 +7892,6 @@
7932
7892
  "title": "Session Id",
7933
7893
  "type": "string"
7934
7894
  },
7935
- "session_message_id": {
7936
- "anyOf": [
7937
- {
7938
- "type": "string"
7939
- },
7940
- {
7941
- "type": "null"
7942
- }
7943
- ],
7944
- "description": "Message this record receives, delivers, requeues, or echoes.",
7945
- "title": "Session Message Id"
7946
- },
7947
7895
  "source": {
7948
7896
  "const": "lifecycle",
7949
7897
  "default": "lifecycle",
@@ -7973,25 +7921,12 @@
7973
7921
  }
7974
7922
  ],
7975
7923
  "title": "Tools"
7976
- },
7977
- "turn_id": {
7978
- "anyOf": [
7979
- {
7980
- "type": "string"
7981
- },
7982
- {
7983
- "type": "null"
7984
- }
7985
- ],
7986
- "description": "Turn containing this record, when applicable.",
7987
- "title": "Turn Id"
7988
7924
  }
7989
7925
  },
7990
7926
  "required": [
7991
7927
  "id",
7992
7928
  "session_id",
7993
- "turn_id",
7994
- "session_message_id",
7929
+ "message_id",
7995
7930
  "feed_seq",
7996
7931
  "source",
7997
7932
  "record_type",
@@ -8108,6 +8043,18 @@
8108
8043
  "title": "Kind",
8109
8044
  "type": "string"
8110
8045
  },
8046
+ "message_id": {
8047
+ "anyOf": [
8048
+ {
8049
+ "type": "string"
8050
+ },
8051
+ {
8052
+ "type": "null"
8053
+ }
8054
+ ],
8055
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
8056
+ "title": "Message Id"
8057
+ },
8111
8058
  "model": {
8112
8059
  "anyOf": [
8113
8060
  {
@@ -8139,18 +8086,6 @@
8139
8086
  "title": "Session Id",
8140
8087
  "type": "string"
8141
8088
  },
8142
- "session_message_id": {
8143
- "anyOf": [
8144
- {
8145
- "type": "string"
8146
- },
8147
- {
8148
- "type": "null"
8149
- }
8150
- ],
8151
- "description": "Message this record receives, delivers, requeues, or echoes.",
8152
- "title": "Session Message Id"
8153
- },
8154
8089
  "source": {
8155
8090
  "const": "lifecycle",
8156
8091
  "default": "lifecycle",
@@ -8180,25 +8115,12 @@
8180
8115
  }
8181
8116
  ],
8182
8117
  "title": "Tools"
8183
- },
8184
- "turn_id": {
8185
- "anyOf": [
8186
- {
8187
- "type": "string"
8188
- },
8189
- {
8190
- "type": "null"
8191
- }
8192
- ],
8193
- "description": "Turn containing this record, when applicable.",
8194
- "title": "Turn Id"
8195
8118
  }
8196
8119
  },
8197
8120
  "required": [
8198
8121
  "id",
8199
8122
  "session_id",
8200
- "turn_id",
8201
- "session_message_id",
8123
+ "message_id",
8202
8124
  "feed_seq",
8203
8125
  "source",
8204
8126
  "record_type",
@@ -8290,6 +8212,18 @@
8290
8212
  "title": "Kind",
8291
8213
  "type": "string"
8292
8214
  },
8215
+ "message_id": {
8216
+ "anyOf": [
8217
+ {
8218
+ "type": "string"
8219
+ },
8220
+ {
8221
+ "type": "null"
8222
+ }
8223
+ ],
8224
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
8225
+ "title": "Message Id"
8226
+ },
8293
8227
  "model": {
8294
8228
  "anyOf": [
8295
8229
  {
@@ -8321,18 +8255,6 @@
8321
8255
  "title": "Session Id",
8322
8256
  "type": "string"
8323
8257
  },
8324
- "session_message_id": {
8325
- "anyOf": [
8326
- {
8327
- "type": "string"
8328
- },
8329
- {
8330
- "type": "null"
8331
- }
8332
- ],
8333
- "description": "Message this record receives, delivers, requeues, or echoes.",
8334
- "title": "Session Message Id"
8335
- },
8336
8258
  "source": {
8337
8259
  "const": "lifecycle",
8338
8260
  "default": "lifecycle",
@@ -8362,25 +8284,12 @@
8362
8284
  }
8363
8285
  ],
8364
8286
  "title": "Tools"
8365
- },
8366
- "turn_id": {
8367
- "anyOf": [
8368
- {
8369
- "type": "string"
8370
- },
8371
- {
8372
- "type": "null"
8373
- }
8374
- ],
8375
- "description": "Turn containing this record, when applicable.",
8376
- "title": "Turn Id"
8377
8287
  }
8378
8288
  },
8379
8289
  "required": [
8380
8290
  "id",
8381
8291
  "session_id",
8382
- "turn_id",
8383
- "session_message_id",
8292
+ "message_id",
8384
8293
  "feed_seq",
8385
8294
  "source",
8386
8295
  "record_type",
@@ -8544,6 +8453,30 @@
8544
8453
  "title": "ErrorInfo",
8545
8454
  "type": "object"
8546
8455
  },
8456
+ "ErrorReason": {
8457
+ "description": "Why a message failed, was stopped, or was cancelled.",
8458
+ "enum": [
8459
+ "error",
8460
+ "tool_call_failed",
8461
+ "budget_hit",
8462
+ "payment_required",
8463
+ "blocked",
8464
+ "contact_email_required",
8465
+ "lifecycle_hook_failed",
8466
+ "missing_repo_access",
8467
+ "missing_token_permissions",
8468
+ "missing_environment_variables",
8469
+ "missing_github_integration",
8470
+ "agent_unavailable",
8471
+ "upstream_unavailable",
8472
+ "unsupported_configuration",
8473
+ "execution_disabled",
8474
+ "interrupted",
8475
+ "stopped"
8476
+ ],
8477
+ "title": "ErrorReason",
8478
+ "type": "string"
8479
+ },
8547
8480
  "ErrorResponse": {
8548
8481
  "description": "The error envelope every /v1 error returns.",
8549
8482
  "properties": {
@@ -8587,7 +8520,7 @@
8587
8520
  "type": "null"
8588
8521
  }
8589
8522
  ],
8590
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
8523
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
8591
8524
  "title": "Prompt"
8592
8525
  }
8593
8526
  },
@@ -8615,7 +8548,7 @@
8615
8548
  "type": "null"
8616
8549
  }
8617
8550
  ],
8618
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
8551
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
8619
8552
  "title": "Prompt"
8620
8553
  }
8621
8554
  },
@@ -8797,7 +8730,7 @@
8797
8730
  "type": "null"
8798
8731
  }
8799
8732
  ],
8800
- "description": "The initial user message, passed verbatim. Omit to start an interactive session with no turn, waiting for a message.",
8733
+ "description": "The initial user message, passed verbatim. Omit to start an interactive session with no message, waiting for one.",
8801
8734
  "title": "Prompt"
8802
8735
  }
8803
8736
  },
@@ -8899,6 +8832,18 @@
8899
8832
  "title": "Kind",
8900
8833
  "type": "string"
8901
8834
  },
8835
+ "message_id": {
8836
+ "anyOf": [
8837
+ {
8838
+ "type": "string"
8839
+ },
8840
+ {
8841
+ "type": "null"
8842
+ }
8843
+ ],
8844
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
8845
+ "title": "Message Id"
8846
+ },
8902
8847
  "model": {
8903
8848
  "anyOf": [
8904
8849
  {
@@ -8929,18 +8874,6 @@
8929
8874
  "title": "Session Id",
8930
8875
  "type": "string"
8931
8876
  },
8932
- "session_message_id": {
8933
- "anyOf": [
8934
- {
8935
- "type": "string"
8936
- },
8937
- {
8938
- "type": "null"
8939
- }
8940
- ],
8941
- "description": "Message this record receives, delivers, requeues, or echoes.",
8942
- "title": "Session Message Id"
8943
- },
8944
8877
  "source": {
8945
8878
  "const": "gemini",
8946
8879
  "default": "gemini",
@@ -8970,25 +8903,12 @@
8970
8903
  }
8971
8904
  ],
8972
8905
  "title": "Tools"
8973
- },
8974
- "turn_id": {
8975
- "anyOf": [
8976
- {
8977
- "type": "string"
8978
- },
8979
- {
8980
- "type": "null"
8981
- }
8982
- ],
8983
- "description": "Turn containing this record, when applicable.",
8984
- "title": "Turn Id"
8985
8906
  }
8986
8907
  },
8987
8908
  "required": [
8988
8909
  "id",
8989
8910
  "session_id",
8990
- "turn_id",
8991
- "session_message_id",
8911
+ "message_id",
8992
8912
  "feed_seq",
8993
8913
  "source",
8994
8914
  "record_type",
@@ -13047,27 +12967,54 @@
13047
12967
  "title": "MentionSettings",
13048
12968
  "type": "object"
13049
12969
  },
13050
- "MessageDeliveredPayload": {
12970
+ "MessageEndedPayload": {
13051
12971
  "additionalProperties": true,
13052
- "description": "message_delivered: the agent started on the message.",
12972
+ "description": "message_ended: the message was answered, or its answer failed, was\nstopped, or was cancelled. `error` is the same object as the session's\n`error`, null when the message was answered. `cost` and `tokens` are what\nanswering it spent. Messages answered together report the spend once, on\nthe last of them.",
13053
12973
  "properties": {
12974
+ "cost": {
12975
+ "$ref": "#/components/schemas/Cost"
12976
+ },
12977
+ "duration_ms": {
12978
+ "anyOf": [
12979
+ {
12980
+ "type": "integer"
12981
+ },
12982
+ {
12983
+ "type": "null"
12984
+ }
12985
+ ],
12986
+ "title": "Duration Ms"
12987
+ },
12988
+ "error": {
12989
+ "anyOf": [
12990
+ {
12991
+ "$ref": "#/components/schemas/SessionError"
12992
+ },
12993
+ {
12994
+ "type": "null"
12995
+ }
12996
+ ]
12997
+ },
13054
12998
  "message_id": {
13055
12999
  "title": "Message Id",
13056
13000
  "type": "string"
13057
13001
  },
13058
- "turn_id": {
13059
- "title": "Turn Id",
13002
+ "status": {
13003
+ "title": "Status",
13060
13004
  "type": "string"
13005
+ },
13006
+ "tokens": {
13007
+ "$ref": "#/components/schemas/Tokens"
13061
13008
  }
13062
13009
  },
13063
13010
  "required": [
13064
13011
  "message_id",
13065
- "turn_id"
13012
+ "status"
13066
13013
  ],
13067
- "title": "MessageDeliveredPayload",
13014
+ "title": "MessageEndedPayload",
13068
13015
  "type": "object"
13069
13016
  },
13070
- "MessageDeliveredRecord": {
13017
+ "MessageEndedRecord": {
13071
13018
  "properties": {
13072
13019
  "cost": {
13073
13020
  "anyOf": [
@@ -13112,6 +13059,18 @@
13112
13059
  "title": "Kind",
13113
13060
  "type": "string"
13114
13061
  },
13062
+ "message_id": {
13063
+ "anyOf": [
13064
+ {
13065
+ "type": "string"
13066
+ },
13067
+ {
13068
+ "type": "null"
13069
+ }
13070
+ ],
13071
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
13072
+ "title": "Message Id"
13073
+ },
13115
13074
  "model": {
13116
13075
  "anyOf": [
13117
13076
  {
@@ -13124,7 +13083,7 @@
13124
13083
  "title": "Model"
13125
13084
  },
13126
13085
  "payload": {
13127
- "$ref": "#/components/schemas/MessageDeliveredPayload"
13086
+ "$ref": "#/components/schemas/MessageEndedPayload"
13128
13087
  },
13129
13088
  "record_format": {
13130
13089
  "const": "ellipsis_lifecycle@1",
@@ -13133,8 +13092,8 @@
13133
13092
  "type": "string"
13134
13093
  },
13135
13094
  "record_type": {
13136
- "const": "message_delivered",
13137
- "default": "message_delivered",
13095
+ "const": "message_ended",
13096
+ "default": "message_ended",
13138
13097
  "title": "Record Type",
13139
13098
  "type": "string"
13140
13099
  },
@@ -13143,18 +13102,6 @@
13143
13102
  "title": "Session Id",
13144
13103
  "type": "string"
13145
13104
  },
13146
- "session_message_id": {
13147
- "anyOf": [
13148
- {
13149
- "type": "string"
13150
- },
13151
- {
13152
- "type": "null"
13153
- }
13154
- ],
13155
- "description": "Message this record receives, delivers, requeues, or echoes.",
13156
- "title": "Session Message Id"
13157
- },
13158
13105
  "source": {
13159
13106
  "const": "lifecycle",
13160
13107
  "default": "lifecycle",
@@ -13184,25 +13131,12 @@
13184
13131
  }
13185
13132
  ],
13186
13133
  "title": "Tools"
13187
- },
13188
- "turn_id": {
13189
- "anyOf": [
13190
- {
13191
- "type": "string"
13192
- },
13193
- {
13194
- "type": "null"
13195
- }
13196
- ],
13197
- "description": "Turn containing this record, when applicable.",
13198
- "title": "Turn Id"
13199
13134
  }
13200
13135
  },
13201
13136
  "required": [
13202
13137
  "id",
13203
13138
  "session_id",
13204
- "turn_id",
13205
- "session_message_id",
13139
+ "message_id",
13206
13140
  "feed_seq",
13207
13141
  "source",
13208
13142
  "record_type",
@@ -13216,39 +13150,81 @@
13216
13150
  "created_at",
13217
13151
  "kind"
13218
13152
  ],
13219
- "title": "MessageDeliveredRecord",
13153
+ "title": "MessageEndedRecord",
13220
13154
  "type": "object",
13221
13155
  "x-ellipsis-preserve-payload": true
13222
13156
  },
13223
- "MessageReceivedPayload": {
13157
+ "MessageQueuedPayload": {
13224
13158
  "additionalProperties": true,
13225
- "description": "message_received: a message landed in the session inbox and its turn was\ncreated. `turn_id` is the turn that will answer it.",
13159
+ "description": "message_queued: the message waits because the account already has\n`sessions_alive` sessions alive, its limit.",
13226
13160
  "properties": {
13227
- "author": {
13161
+ "limit": {
13162
+ "title": "Limit",
13163
+ "type": "integer"
13164
+ },
13165
+ "message_id": {
13166
+ "title": "Message Id",
13167
+ "type": "string"
13168
+ },
13169
+ "sessions_alive": {
13170
+ "title": "Sessions Alive",
13171
+ "type": "integer"
13172
+ }
13173
+ },
13174
+ "required": [
13175
+ "message_id",
13176
+ "sessions_alive",
13177
+ "limit"
13178
+ ],
13179
+ "title": "MessageQueuedPayload",
13180
+ "type": "object"
13181
+ },
13182
+ "MessageQueuedRecord": {
13183
+ "properties": {
13184
+ "cost": {
13228
13185
  "anyOf": [
13229
13186
  {
13230
- "type": "string"
13187
+ "type": "integer"
13231
13188
  },
13232
13189
  {
13233
13190
  "type": "null"
13234
13191
  }
13235
13192
  ],
13236
- "title": "Author"
13193
+ "title": "Cost"
13237
13194
  },
13238
- "body": {
13239
- "title": "Body",
13195
+ "created_at": {
13196
+ "format": "date-time",
13197
+ "title": "Created At",
13240
13198
  "type": "string"
13241
13199
  },
13242
- "closes_session": {
13243
- "default": false,
13244
- "title": "Closes Session",
13245
- "type": "boolean"
13200
+ "duration": {
13201
+ "anyOf": [
13202
+ {
13203
+ "type": "integer"
13204
+ },
13205
+ {
13206
+ "type": "null"
13207
+ }
13208
+ ],
13209
+ "title": "Duration"
13246
13210
  },
13247
- "message_id": {
13248
- "title": "Message Id",
13211
+ "feed_seq": {
13212
+ "description": "Position in the session feed and the stream's resume cursor.",
13213
+ "title": "Feed Seq",
13214
+ "type": "integer"
13215
+ },
13216
+ "id": {
13217
+ "description": "Unique identifier of the record.",
13218
+ "title": "Id",
13219
+ "type": "string"
13220
+ },
13221
+ "kind": {
13222
+ "const": "platform",
13223
+ "default": "platform",
13224
+ "title": "Kind",
13249
13225
  "type": "string"
13250
13226
  },
13251
- "sender_attribution_id": {
13227
+ "message_id": {
13252
13228
  "anyOf": [
13253
13229
  {
13254
13230
  "type": "string"
@@ -13257,9 +13233,10 @@
13257
13233
  "type": "null"
13258
13234
  }
13259
13235
  ],
13260
- "title": "Sender Attribution Id"
13236
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
13237
+ "title": "Message Id"
13261
13238
  },
13262
- "sender_attribution_type": {
13239
+ "model": {
13263
13240
  "anyOf": [
13264
13241
  {
13265
13242
  "type": "string"
@@ -13268,28 +13245,81 @@
13268
13245
  "type": "null"
13269
13246
  }
13270
13247
  ],
13271
- "title": "Sender Attribution Type"
13248
+ "title": "Model"
13249
+ },
13250
+ "payload": {
13251
+ "$ref": "#/components/schemas/MessageQueuedPayload"
13252
+ },
13253
+ "record_format": {
13254
+ "const": "ellipsis_lifecycle@1",
13255
+ "default": "ellipsis_lifecycle@1",
13256
+ "title": "Record Format",
13257
+ "type": "string"
13258
+ },
13259
+ "record_type": {
13260
+ "const": "message_queued",
13261
+ "default": "message_queued",
13262
+ "title": "Record Type",
13263
+ "type": "string"
13264
+ },
13265
+ "session_id": {
13266
+ "description": "Session containing this record.",
13267
+ "title": "Session Id",
13268
+ "type": "string"
13269
+ },
13270
+ "source": {
13271
+ "const": "lifecycle",
13272
+ "default": "lifecycle",
13273
+ "title": "Source",
13274
+ "type": "string"
13272
13275
  },
13273
- "turn_id": {
13276
+ "tokens_info": {
13274
13277
  "anyOf": [
13275
13278
  {
13276
- "type": "string"
13279
+ "$ref": "#/components/schemas/TokensInfo"
13280
+ },
13281
+ {
13282
+ "type": "null"
13283
+ }
13284
+ ]
13285
+ },
13286
+ "tools": {
13287
+ "anyOf": [
13288
+ {
13289
+ "items": {
13290
+ "type": "string"
13291
+ },
13292
+ "type": "array"
13277
13293
  },
13278
13294
  {
13279
13295
  "type": "null"
13280
13296
  }
13281
13297
  ],
13282
- "title": "Turn Id"
13298
+ "title": "Tools"
13283
13299
  }
13284
13300
  },
13285
13301
  "required": [
13302
+ "id",
13303
+ "session_id",
13286
13304
  "message_id",
13287
- "body"
13305
+ "feed_seq",
13306
+ "source",
13307
+ "record_type",
13308
+ "record_format",
13309
+ "payload",
13310
+ "tools",
13311
+ "tokens_info",
13312
+ "cost",
13313
+ "duration",
13314
+ "model",
13315
+ "created_at",
13316
+ "kind"
13288
13317
  ],
13289
- "title": "MessageReceivedPayload",
13290
- "type": "object"
13318
+ "title": "MessageQueuedRecord",
13319
+ "type": "object",
13320
+ "x-ellipsis-preserve-payload": true
13291
13321
  },
13292
- "MessageReceivedRecord": {
13322
+ "MessageRecord": {
13293
13323
  "properties": {
13294
13324
  "cost": {
13295
13325
  "anyOf": [
@@ -13334,6 +13364,18 @@
13334
13364
  "title": "Kind",
13335
13365
  "type": "string"
13336
13366
  },
13367
+ "message_id": {
13368
+ "anyOf": [
13369
+ {
13370
+ "type": "string"
13371
+ },
13372
+ {
13373
+ "type": "null"
13374
+ }
13375
+ ],
13376
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
13377
+ "title": "Message Id"
13378
+ },
13337
13379
  "model": {
13338
13380
  "anyOf": [
13339
13381
  {
@@ -13346,7 +13388,7 @@
13346
13388
  "title": "Model"
13347
13389
  },
13348
13390
  "payload": {
13349
- "$ref": "#/components/schemas/MessageReceivedPayload"
13391
+ "$ref": "#/components/schemas/SessionMessage"
13350
13392
  },
13351
13393
  "record_format": {
13352
13394
  "const": "ellipsis_lifecycle@1",
@@ -13355,8 +13397,8 @@
13355
13397
  "type": "string"
13356
13398
  },
13357
13399
  "record_type": {
13358
- "const": "message_received",
13359
- "default": "message_received",
13400
+ "const": "message",
13401
+ "default": "message",
13360
13402
  "title": "Record Type",
13361
13403
  "type": "string"
13362
13404
  },
@@ -13365,18 +13407,6 @@
13365
13407
  "title": "Session Id",
13366
13408
  "type": "string"
13367
13409
  },
13368
- "session_message_id": {
13369
- "anyOf": [
13370
- {
13371
- "type": "string"
13372
- },
13373
- {
13374
- "type": "null"
13375
- }
13376
- ],
13377
- "description": "Message this record receives, delivers, requeues, or echoes.",
13378
- "title": "Session Message Id"
13379
- },
13380
13410
  "source": {
13381
13411
  "const": "lifecycle",
13382
13412
  "default": "lifecycle",
@@ -13406,25 +13436,12 @@
13406
13436
  }
13407
13437
  ],
13408
13438
  "title": "Tools"
13409
- },
13410
- "turn_id": {
13411
- "anyOf": [
13412
- {
13413
- "type": "string"
13414
- },
13415
- {
13416
- "type": "null"
13417
- }
13418
- ],
13419
- "description": "Turn containing this record, when applicable.",
13420
- "title": "Turn Id"
13421
13439
  }
13422
13440
  },
13423
13441
  "required": [
13424
13442
  "id",
13425
13443
  "session_id",
13426
- "turn_id",
13427
- "session_message_id",
13444
+ "message_id",
13428
13445
  "feed_seq",
13429
13446
  "source",
13430
13447
  "record_type",
@@ -13438,37 +13455,21 @@
13438
13455
  "created_at",
13439
13456
  "kind"
13440
13457
  ],
13441
- "title": "MessageReceivedRecord",
13458
+ "title": "MessageRecord",
13442
13459
  "type": "object",
13443
13460
  "x-ellipsis-preserve-payload": true
13444
13461
  },
13445
13462
  "MessageRequeuedPayload": {
13446
13463
  "additionalProperties": true,
13447
- "description": "message_requeued: a turn was interrupted before answering, so the\nmessage goes back to the inbox with a new queued turn.",
13464
+ "description": "message_requeued: the agent was interrupted before answering, so the\nmessage goes back to the inbox and starts again on a fresh environment.",
13448
13465
  "properties": {
13449
13466
  "message_id": {
13450
13467
  "title": "Message Id",
13451
13468
  "type": "string"
13452
- },
13453
- "requeued_turn_id": {
13454
- "anyOf": [
13455
- {
13456
- "type": "string"
13457
- },
13458
- {
13459
- "type": "null"
13460
- }
13461
- ],
13462
- "title": "Requeued Turn Id"
13463
- },
13464
- "turn_id": {
13465
- "title": "Turn Id",
13466
- "type": "string"
13467
13469
  }
13468
13470
  },
13469
13471
  "required": [
13470
- "message_id",
13471
- "turn_id"
13472
+ "message_id"
13472
13473
  ],
13473
13474
  "title": "MessageRequeuedPayload",
13474
13475
  "type": "object"
@@ -13518,6 +13519,18 @@
13518
13519
  "title": "Kind",
13519
13520
  "type": "string"
13520
13521
  },
13522
+ "message_id": {
13523
+ "anyOf": [
13524
+ {
13525
+ "type": "string"
13526
+ },
13527
+ {
13528
+ "type": "null"
13529
+ }
13530
+ ],
13531
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
13532
+ "title": "Message Id"
13533
+ },
13521
13534
  "model": {
13522
13535
  "anyOf": [
13523
13536
  {
@@ -13549,18 +13562,6 @@
13549
13562
  "title": "Session Id",
13550
13563
  "type": "string"
13551
13564
  },
13552
- "session_message_id": {
13553
- "anyOf": [
13554
- {
13555
- "type": "string"
13556
- },
13557
- {
13558
- "type": "null"
13559
- }
13560
- ],
13561
- "description": "Message this record receives, delivers, requeues, or echoes.",
13562
- "title": "Session Message Id"
13563
- },
13564
13565
  "source": {
13565
13566
  "const": "lifecycle",
13566
13567
  "default": "lifecycle",
@@ -13590,8 +13591,102 @@
13590
13591
  }
13591
13592
  ],
13592
13593
  "title": "Tools"
13594
+ }
13595
+ },
13596
+ "required": [
13597
+ "id",
13598
+ "session_id",
13599
+ "message_id",
13600
+ "feed_seq",
13601
+ "source",
13602
+ "record_type",
13603
+ "record_format",
13604
+ "payload",
13605
+ "tools",
13606
+ "tokens_info",
13607
+ "cost",
13608
+ "duration",
13609
+ "model",
13610
+ "created_at",
13611
+ "kind"
13612
+ ],
13613
+ "title": "MessageRequeuedRecord",
13614
+ "type": "object",
13615
+ "x-ellipsis-preserve-payload": true
13616
+ },
13617
+ "MessageStartedPayload": {
13618
+ "additionalProperties": true,
13619
+ "description": "message_started: the agent started on the message.",
13620
+ "properties": {
13621
+ "message_id": {
13622
+ "title": "Message Id",
13623
+ "type": "string"
13624
+ }
13625
+ },
13626
+ "required": [
13627
+ "message_id"
13628
+ ],
13629
+ "title": "MessageStartedPayload",
13630
+ "type": "object"
13631
+ },
13632
+ "MessageStartedRecord": {
13633
+ "properties": {
13634
+ "cost": {
13635
+ "anyOf": [
13636
+ {
13637
+ "type": "integer"
13638
+ },
13639
+ {
13640
+ "type": "null"
13641
+ }
13642
+ ],
13643
+ "title": "Cost"
13644
+ },
13645
+ "created_at": {
13646
+ "format": "date-time",
13647
+ "title": "Created At",
13648
+ "type": "string"
13649
+ },
13650
+ "duration": {
13651
+ "anyOf": [
13652
+ {
13653
+ "type": "integer"
13654
+ },
13655
+ {
13656
+ "type": "null"
13657
+ }
13658
+ ],
13659
+ "title": "Duration"
13660
+ },
13661
+ "feed_seq": {
13662
+ "description": "Position in the session feed and the stream's resume cursor.",
13663
+ "title": "Feed Seq",
13664
+ "type": "integer"
13665
+ },
13666
+ "id": {
13667
+ "description": "Unique identifier of the record.",
13668
+ "title": "Id",
13669
+ "type": "string"
13670
+ },
13671
+ "kind": {
13672
+ "const": "platform",
13673
+ "default": "platform",
13674
+ "title": "Kind",
13675
+ "type": "string"
13676
+ },
13677
+ "message_id": {
13678
+ "anyOf": [
13679
+ {
13680
+ "type": "string"
13681
+ },
13682
+ {
13683
+ "type": "null"
13684
+ }
13685
+ ],
13686
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
13687
+ "title": "Message Id"
13593
13688
  },
13594
- "turn_id": {
13689
+ "model": {
13595
13690
  "anyOf": [
13596
13691
  {
13597
13692
  "type": "string"
@@ -13600,15 +13695,63 @@
13600
13695
  "type": "null"
13601
13696
  }
13602
13697
  ],
13603
- "description": "Turn containing this record, when applicable.",
13604
- "title": "Turn Id"
13698
+ "title": "Model"
13699
+ },
13700
+ "payload": {
13701
+ "$ref": "#/components/schemas/MessageStartedPayload"
13702
+ },
13703
+ "record_format": {
13704
+ "const": "ellipsis_lifecycle@1",
13705
+ "default": "ellipsis_lifecycle@1",
13706
+ "title": "Record Format",
13707
+ "type": "string"
13708
+ },
13709
+ "record_type": {
13710
+ "const": "message_started",
13711
+ "default": "message_started",
13712
+ "title": "Record Type",
13713
+ "type": "string"
13714
+ },
13715
+ "session_id": {
13716
+ "description": "Session containing this record.",
13717
+ "title": "Session Id",
13718
+ "type": "string"
13719
+ },
13720
+ "source": {
13721
+ "const": "lifecycle",
13722
+ "default": "lifecycle",
13723
+ "title": "Source",
13724
+ "type": "string"
13725
+ },
13726
+ "tokens_info": {
13727
+ "anyOf": [
13728
+ {
13729
+ "$ref": "#/components/schemas/TokensInfo"
13730
+ },
13731
+ {
13732
+ "type": "null"
13733
+ }
13734
+ ]
13735
+ },
13736
+ "tools": {
13737
+ "anyOf": [
13738
+ {
13739
+ "items": {
13740
+ "type": "string"
13741
+ },
13742
+ "type": "array"
13743
+ },
13744
+ {
13745
+ "type": "null"
13746
+ }
13747
+ ],
13748
+ "title": "Tools"
13605
13749
  }
13606
13750
  },
13607
13751
  "required": [
13608
13752
  "id",
13609
13753
  "session_id",
13610
- "turn_id",
13611
- "session_message_id",
13754
+ "message_id",
13612
13755
  "feed_seq",
13613
13756
  "source",
13614
13757
  "record_type",
@@ -13622,7 +13765,7 @@
13622
13765
  "created_at",
13623
13766
  "kind"
13624
13767
  ],
13625
- "title": "MessageRequeuedRecord",
13768
+ "title": "MessageStartedRecord",
13626
13769
  "type": "object",
13627
13770
  "x-ellipsis-preserve-payload": true
13628
13771
  },
@@ -14121,13 +14264,12 @@
14121
14264
  "environment_output": "#/components/schemas/EnvironmentOutputRecord",
14122
14265
  "environment_phase": "#/components/schemas/EnvironmentPhaseRecord",
14123
14266
  "environment_ready": "#/components/schemas/EnvironmentReadyRecord",
14124
- "message_delivered": "#/components/schemas/MessageDeliveredRecord",
14125
- "message_received": "#/components/schemas/MessageReceivedRecord",
14267
+ "message": "#/components/schemas/MessageRecord",
14268
+ "message_ended": "#/components/schemas/MessageEndedRecord",
14269
+ "message_queued": "#/components/schemas/MessageQueuedRecord",
14126
14270
  "message_requeued": "#/components/schemas/MessageRequeuedRecord",
14127
- "session_closed": "#/components/schemas/SessionClosedRecord",
14128
- "turn_ended": "#/components/schemas/TurnEndedRecord",
14129
- "turn_queued": "#/components/schemas/TurnQueuedRecord",
14130
- "turn_started": "#/components/schemas/TurnStartedRecord"
14271
+ "message_started": "#/components/schemas/MessageStartedRecord",
14272
+ "session_closed": "#/components/schemas/SessionClosedRecord"
14131
14273
  },
14132
14274
  "propertyName": "record_type"
14133
14275
  },
@@ -14136,22 +14278,19 @@
14136
14278
  "$ref": "#/components/schemas/SessionClosedRecord"
14137
14279
  },
14138
14280
  {
14139
- "$ref": "#/components/schemas/MessageReceivedRecord"
14281
+ "$ref": "#/components/schemas/MessageRecord"
14140
14282
  },
14141
14283
  {
14142
- "$ref": "#/components/schemas/MessageDeliveredRecord"
14284
+ "$ref": "#/components/schemas/MessageQueuedRecord"
14143
14285
  },
14144
14286
  {
14145
- "$ref": "#/components/schemas/MessageRequeuedRecord"
14146
- },
14147
- {
14148
- "$ref": "#/components/schemas/TurnQueuedRecord"
14287
+ "$ref": "#/components/schemas/MessageStartedRecord"
14149
14288
  },
14150
14289
  {
14151
- "$ref": "#/components/schemas/TurnStartedRecord"
14290
+ "$ref": "#/components/schemas/MessageEndedRecord"
14152
14291
  },
14153
14292
  {
14154
- "$ref": "#/components/schemas/TurnEndedRecord"
14293
+ "$ref": "#/components/schemas/MessageRequeuedRecord"
14155
14294
  },
14156
14295
  {
14157
14296
  "$ref": "#/components/schemas/EnvironmentPhaseRecord"
@@ -18485,7 +18624,7 @@
18485
18624
  ]
18486
18625
  }
18487
18626
  ],
18488
- "description": "An agent session: one conversation with an agent. Returned by\n`GET /v1/sessions/{id}` and carried by the session stream's\n`session`/`snapshot` frames; REST and stream never disagree about what a\nsession looks like.",
18627
+ "description": "An agent session: one conversation with an agent. Returned by\n`GET /v1/sessions/{id}` and carried by the session stream's\n`session` frames; REST and stream never disagree about what a\nsession looks like.",
18489
18628
  "properties": {
18490
18629
  "agent": {
18491
18630
  "anyOf": [
@@ -18559,6 +18698,17 @@
18559
18698
  "$ref": "#/components/schemas/SessionEnvironment",
18560
18699
  "description": "The full environment configuration frozen when the session was created, with the saved environment's id and how it was chosen."
18561
18700
  },
18701
+ "error": {
18702
+ "anyOf": [
18703
+ {
18704
+ "$ref": "#/components/schemas/SessionError"
18705
+ },
18706
+ {
18707
+ "type": "null"
18708
+ }
18709
+ ],
18710
+ "description": "Why the last message failed, was stopped, or was cancelled; null otherwise."
18711
+ },
18562
18712
  "event": {
18563
18713
  "anyOf": [
18564
18714
  {
@@ -18681,7 +18831,7 @@
18681
18831
  "type": "null"
18682
18832
  }
18683
18833
  ],
18684
- "description": "The session's structured output: the `json_schema` the agent must satisfy and, once a turn has submitted it, the `result`."
18834
+ "description": "The session's structured output: the `json_schema` the agent must satisfy and, once the agent has submitted it, the `result`."
18685
18835
  },
18686
18836
  "parent": {
18687
18837
  "anyOf": [
@@ -18710,6 +18860,10 @@
18710
18860
  "$ref": "#/components/schemas/SessionSource",
18711
18861
  "description": "Where the session came from (e.g. react, web, api, cli, mention, cron)."
18712
18862
  },
18863
+ "status": {
18864
+ "$ref": "#/components/schemas/SessionStatus",
18865
+ "description": "Where the session is. A message you sent is answered once the status is `idle` or `closed`; its `message_ended` record in GET /v1/sessions/{id}/records says how."
18866
+ },
18713
18867
  "summary": {
18714
18868
  "anyOf": [
18715
18869
  {
@@ -18725,17 +18879,6 @@
18725
18879
  "$ref": "#/components/schemas/Tokens",
18726
18880
  "description": "The tokens the session has used so far."
18727
18881
  },
18728
- "turn": {
18729
- "anyOf": [
18730
- {
18731
- "$ref": "#/components/schemas/SessionTurn"
18732
- },
18733
- {
18734
- "type": "null"
18735
- }
18736
- ],
18737
- "description": "The turn in progress, or the latest one when none is running. Null until the session has a message. Wait on it: the message you sent is answered when the turn with your message's `turn_id` reaches a final status."
18738
- },
18739
18882
  "updated_at": {
18740
18883
  "description": "When the session was last updated.",
18741
18884
  "format": "date-time",
@@ -18754,6 +18897,7 @@
18754
18897
  "cost",
18755
18898
  "created_at",
18756
18899
  "environment",
18900
+ "error",
18757
18901
  "event",
18758
18902
  "gemini",
18759
18903
  "git",
@@ -18765,9 +18909,9 @@
18765
18909
  "permissions",
18766
18910
  "skills",
18767
18911
  "source",
18912
+ "status",
18768
18913
  "summary",
18769
18914
  "tokens",
18770
- "turn",
18771
18915
  "updated_at"
18772
18916
  ],
18773
18917
  "title": "Session",
@@ -19003,7 +19147,7 @@
19003
19147
  },
19004
19148
  "SessionClosedPayload": {
19005
19149
  "additionalProperties": true,
19006
- "description": "session_closed: the conversation closed permanently.",
19150
+ "description": "session_closed: the session closed permanently.",
19007
19151
  "properties": {},
19008
19152
  "title": "SessionClosedPayload",
19009
19153
  "type": "object"
@@ -19053,6 +19197,18 @@
19053
19197
  "title": "Kind",
19054
19198
  "type": "string"
19055
19199
  },
19200
+ "message_id": {
19201
+ "anyOf": [
19202
+ {
19203
+ "type": "string"
19204
+ },
19205
+ {
19206
+ "type": "null"
19207
+ }
19208
+ ],
19209
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
19210
+ "title": "Message Id"
19211
+ },
19056
19212
  "model": {
19057
19213
  "anyOf": [
19058
19214
  {
@@ -19084,18 +19240,6 @@
19084
19240
  "title": "Session Id",
19085
19241
  "type": "string"
19086
19242
  },
19087
- "session_message_id": {
19088
- "anyOf": [
19089
- {
19090
- "type": "string"
19091
- },
19092
- {
19093
- "type": "null"
19094
- }
19095
- ],
19096
- "description": "Message this record receives, delivers, requeues, or echoes.",
19097
- "title": "Session Message Id"
19098
- },
19099
19243
  "source": {
19100
19244
  "const": "lifecycle",
19101
19245
  "default": "lifecycle",
@@ -19125,25 +19269,12 @@
19125
19269
  }
19126
19270
  ],
19127
19271
  "title": "Tools"
19128
- },
19129
- "turn_id": {
19130
- "anyOf": [
19131
- {
19132
- "type": "string"
19133
- },
19134
- {
19135
- "type": "null"
19136
- }
19137
- ],
19138
- "description": "Turn containing this record, when applicable.",
19139
- "title": "Turn Id"
19140
19272
  }
19141
19273
  },
19142
19274
  "required": [
19143
19275
  "id",
19144
19276
  "session_id",
19145
- "turn_id",
19146
- "session_message_id",
19277
+ "message_id",
19147
19278
  "feed_seq",
19148
19279
  "source",
19149
19280
  "record_type",
@@ -19486,7 +19617,7 @@
19486
19617
  "description": "Whether the session can take more messages, and how quickly it would\nanswer one.",
19487
19618
  "properties": {
19488
19619
  "interactive": {
19489
- "description": "Whether the session stays open after its first turn.",
19620
+ "description": "Whether the session stays open after its first message is answered.",
19490
19621
  "title": "Interactive",
19491
19622
  "type": "boolean"
19492
19623
  },
@@ -19494,10 +19625,6 @@
19494
19625
  "$ref": "#/components/schemas/SessionPrompting",
19495
19626
  "description": "The session's policy for direct messages. Caller authorization and message validation are checked separately."
19496
19627
  },
19497
- "state": {
19498
- "$ref": "#/components/schemas/SessionState",
19499
- "description": "`open` while the session can take messages; `closed` is permanent."
19500
- },
19501
19628
  "warm": {
19502
19629
  "description": "Whether an agent is ready to answer the next message right away. When false, the next message first prepares an environment, which takes longer. A hint only; clients need no logic on it.",
19503
19630
  "title": "Warm",
@@ -19507,7 +19634,6 @@
19507
19634
  "required": [
19508
19635
  "interactive",
19509
19636
  "prompting",
19510
- "state",
19511
19637
  "warm"
19512
19638
  ],
19513
19639
  "title": "SessionConversation",
@@ -19518,7 +19644,7 @@
19518
19644
  "description": "Conversation settings for a session, set on a saved agent or sent when starting a session or running an agent.",
19519
19645
  "properties": {
19520
19646
  "interactive": {
19521
- "description": "Whether the session stays open after its first turn. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.",
19647
+ "description": "Whether the session stays open after its first message is answered. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.",
19522
19648
  "title": "Interactive",
19523
19649
  "type": "boolean"
19524
19650
  }
@@ -19532,7 +19658,7 @@
19532
19658
  "properties": {
19533
19659
  "interactive": {
19534
19660
  "default": true,
19535
- "description": "Whether the session stays open after its first turn. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.",
19661
+ "description": "Whether the session stays open after its first message is answered. Defaults to true; false runs once and requires a prompt. Requires the model's interactive capability when true. Direct message acceptance is reported separately in conversation.prompting.",
19536
19662
  "title": "Interactive",
19537
19663
  "type": "boolean"
19538
19664
  }
@@ -19686,6 +19812,33 @@
19686
19812
  "title": "SessionEnvironment",
19687
19813
  "type": "object"
19688
19814
  },
19815
+ "SessionError": {
19816
+ "description": "Why the last message failed, was stopped, or was cancelled. Cleared\nwhen the next message starts.",
19817
+ "properties": {
19818
+ "detail": {
19819
+ "anyOf": [
19820
+ {
19821
+ "type": "string"
19822
+ },
19823
+ {
19824
+ "type": "null"
19825
+ }
19826
+ ],
19827
+ "description": "A human-readable explanation.",
19828
+ "title": "Detail"
19829
+ },
19830
+ "reason": {
19831
+ "$ref": "#/components/schemas/ErrorReason",
19832
+ "description": "What went wrong."
19833
+ }
19834
+ },
19835
+ "required": [
19836
+ "detail",
19837
+ "reason"
19838
+ ],
19839
+ "title": "SessionError",
19840
+ "type": "object"
19841
+ },
19689
19842
  "SessionEventActor": {
19690
19843
  "description": "The event's initiator, when known; never inferred from resource ownership.",
19691
19844
  "properties": {
@@ -20082,7 +20235,7 @@
20082
20235
  "type": "object"
20083
20236
  },
20084
20237
  "SessionMessage": {
20085
- "description": "One message in a session's inbox: what a queued message renders and\nretires on. The webhook provenance internals stay off the wire.",
20238
+ "description": "One message sent to a session.",
20086
20239
  "properties": {
20087
20240
  "author": {
20088
20241
  "anyOf": [
@@ -20102,36 +20255,11 @@
20102
20255
  "type": "string"
20103
20256
  },
20104
20257
  "created_at": {
20105
- "description": "When the message was created.",
20258
+ "description": "When the message was received.",
20106
20259
  "format": "date-time",
20107
20260
  "title": "Created At",
20108
20261
  "type": "string"
20109
20262
  },
20110
- "delivered_at": {
20111
- "anyOf": [
20112
- {
20113
- "format": "date-time",
20114
- "type": "string"
20115
- },
20116
- {
20117
- "type": "null"
20118
- }
20119
- ],
20120
- "description": "When the message was delivered to the agent, if it has been.",
20121
- "title": "Delivered At"
20122
- },
20123
- "feed_seq": {
20124
- "anyOf": [
20125
- {
20126
- "type": "integer"
20127
- },
20128
- {
20129
- "type": "null"
20130
- }
20131
- ],
20132
- "description": "Where the message sits in the session's feed \u2014 placement metadata only, NOT a resume cursor (only records_append frames advance the cursor). Null for older rows.",
20133
- "title": "Feed Seq"
20134
- },
20135
20263
  "id": {
20136
20264
  "description": "Unique identifier of the message.",
20137
20265
  "title": "Id",
@@ -20145,55 +20273,21 @@
20145
20273
  "title": "Images",
20146
20274
  "type": "array"
20147
20275
  },
20148
- "sender_attribution_id": {
20149
- "anyOf": [
20150
- {
20151
- "type": "string"
20152
- },
20153
- {
20154
- "type": "null"
20155
- }
20156
- ],
20157
- "description": "Identifier of the principal that sent the message, if attributed.",
20158
- "title": "Sender Attribution Id"
20159
- },
20160
- "sender_attribution_type": {
20161
- "anyOf": [
20162
- {
20163
- "$ref": "#/components/schemas/AttributionType"
20164
- },
20165
- {
20166
- "type": "null"
20167
- }
20168
- ],
20169
- "description": "Kind of principal that sent the message, if attributed."
20276
+ "index": {
20277
+ "description": "Position in the session, starting at 0.",
20278
+ "title": "Index",
20279
+ "type": "integer"
20170
20280
  },
20171
20281
  "session_id": {
20172
20282
  "description": "Identifier of the session the message belongs to.",
20173
20283
  "title": "Session Id",
20174
20284
  "type": "string"
20175
- },
20176
- "status": {
20177
- "$ref": "#/components/schemas/SessionMessageStatus",
20178
- "description": "Delivery status of the message."
20179
- },
20180
- "turn_id": {
20181
- "anyOf": [
20182
- {
20183
- "type": "string"
20184
- },
20185
- {
20186
- "type": "null"
20187
- }
20188
- ],
20189
- "description": "The turn created to answer this message. Wait on it: the message is answered when that turn reaches a final status.",
20190
- "title": "Turn Id"
20191
20285
  }
20192
20286
  },
20193
20287
  "required": [
20194
20288
  "id",
20195
20289
  "session_id",
20196
- "status",
20290
+ "index",
20197
20291
  "body",
20198
20292
  "created_at"
20199
20293
  ],
@@ -20228,34 +20322,21 @@
20228
20322
  "type": "object"
20229
20323
  },
20230
20324
  "SessionMessageResponse": {
20231
- "description": "One inbox message and the turn created to answer it.",
20325
+ "description": "One message sent to a session.",
20232
20326
  "properties": {
20233
20327
  "message": {
20234
20328
  "$ref": "#/components/schemas/SessionMessage",
20235
- "description": "The message."
20236
- },
20237
- "turn": {
20238
- "$ref": "#/components/schemas/SessionTurn",
20239
- "description": "The turn that will answer the message. Wait on it: poll GET /v1/sessions/{session_id}/turns/{id} or watch the stream's session frames until its status is final."
20329
+ "description": "The message. It is answered once the session's status is `idle` or `closed`; its `message_ended` record says how."
20240
20330
  }
20241
20331
  },
20242
20332
  "required": [
20243
- "message",
20244
- "turn"
20333
+ "message"
20245
20334
  ],
20246
20335
  "title": "SessionMessageResponse",
20247
20336
  "type": "object"
20248
20337
  },
20249
- "SessionMessageStatus": {
20250
- "enum": [
20251
- "pending",
20252
- "delivered"
20253
- ],
20254
- "title": "SessionMessageStatus",
20255
- "type": "string"
20256
- },
20257
20338
  "SessionOutput": {
20258
- "description": "Structured output on the wire: the contract and, when a turn has\nsubmitted one, the payload. `result` is None while the session runs and\nwhen no turn submitted anything; it is the agent's own JSON, in the\nshape of `json_schema`.",
20339
+ "description": "Structured output on the wire: the contract and, when the agent has\nsubmitted one, the payload. `result` is None while the session runs and\nwhen the agent submitted nothing; it is the agent's own JSON, in the\nshape of `json_schema`.",
20259
20340
  "properties": {
20260
20341
  "json_schema": {
20261
20342
  "additionalProperties": true,
@@ -20273,7 +20354,7 @@
20273
20354
  "type": "null"
20274
20355
  }
20275
20356
  ],
20276
- "description": "The payload the agent submitted, or null until a turn submits one.",
20357
+ "description": "The payload the agent submitted, or null until it submits one.",
20277
20358
  "title": "Result"
20278
20359
  }
20279
20360
  },
@@ -20729,7 +20810,7 @@
20729
20810
  "type": "object"
20730
20811
  },
20731
20812
  "SessionRecordsListResponse": {
20732
- "description": "A session's stored transcript records, plus its pending inbox\nmessages.",
20813
+ "description": "A session's log: everything that happened, oldest first.",
20733
20814
  "properties": {
20734
20815
  "earliest_feed_seq": {
20735
20816
  "anyOf": [
@@ -20749,15 +20830,6 @@
20749
20830
  "title": "Has More",
20750
20831
  "type": "boolean"
20751
20832
  },
20752
- "messages": {
20753
- "default": [],
20754
- "description": "The open inbox slice (pending rows only): queued messages not yet consumed by a turn. Delivered history comes from the records themselves.",
20755
- "items": {
20756
- "$ref": "#/components/schemas/SessionMessage"
20757
- },
20758
- "title": "Messages",
20759
- "type": "array"
20760
- },
20761
20833
  "next_cursor": {
20762
20834
  "anyOf": [
20763
20835
  {
@@ -20771,7 +20843,7 @@
20771
20843
  "title": "Next Cursor"
20772
20844
  },
20773
20845
  "records": {
20774
- "description": "The session's records (transcript + lifecycle), ordered by feed_seq. Clients render each by (source, record_format, record_type). Pagination is opt-in (`cursor` + `limit`); a bare call returns the full retained transcript.",
20846
+ "description": "The session's records, ordered by feed_seq: the messages sent to it, the platform's own events, and the agent's output. Clients render each by (source, record_format, record_type). Pagination is opt-in (`cursor` + `limit`); a bare call returns the full retained log.",
20775
20847
  "items": {
20776
20848
  "$ref": "#/components/schemas/SessionRecord"
20777
20849
  },
@@ -20917,43 +20989,18 @@
20917
20989
  "title": "SessionSpendItem",
20918
20990
  "type": "object"
20919
20991
  },
20920
- "SessionState": {
20921
- "description": "Whether the conversation can still take messages. `closed` is permanent:\na session with interactive false closes when its turn ends, and a conversation closes\nafter its closing message's turn.",
20992
+ "SessionStatus": {
20993
+ "description": "Where the session is. `queued` while a message waits for a worker,\n`preparing` while its environment is set up, `running` while the agent\nworks, `idle` when every message has been answered and the session can\ntake another, and `closed` when it can take no more. `closed` is\npermanent.",
20922
20994
  "enum": [
20923
- "open",
20995
+ "queued",
20996
+ "preparing",
20997
+ "running",
20998
+ "idle",
20924
20999
  "closed"
20925
21000
  ],
20926
- "title": "SessionState",
21001
+ "title": "SessionStatus",
20927
21002
  "type": "string"
20928
21003
  },
20929
- "SessionStopped": {
20930
- "description": "When a stop was requested and the GitHub user who requested it.",
20931
- "properties": {
20932
- "at": {
20933
- "description": "When a stop was requested.",
20934
- "format": "date-time",
20935
- "title": "At",
20936
- "type": "string"
20937
- },
20938
- "by": {
20939
- "anyOf": [
20940
- {
20941
- "$ref": "#/components/schemas/GithubAccountSnippet"
20942
- },
20943
- {
20944
- "type": "null"
20945
- }
20946
- ],
20947
- "description": "The GitHub user who stopped the session, resolved at read time. Null if the user is unknown or unavailable."
20948
- }
20949
- },
20950
- "required": [
20951
- "at",
20952
- "by"
20953
- ],
20954
- "title": "SessionStopped",
20955
- "type": "object"
20956
- },
20957
21004
  "SessionSummary": {
20958
21005
  "description": "A live one-line summary of what the session is doing, refreshed\nevery few steps while it runs.",
20959
21006
  "properties": {
@@ -21001,155 +21048,6 @@
21001
21048
  "title": "SessionToolCount",
21002
21049
  "type": "object"
21003
21050
  },
21004
- "SessionTurn": {
21005
- "description": "One message and the agent's answer to it. A turn is `queued` from the\nmoment its message is received, `preparing` while its environment is set\nup, `running` while the agent works, then `completed`, `failed`,\n`stopped`, or `cancelled`.",
21006
- "properties": {
21007
- "cost": {
21008
- "$ref": "#/components/schemas/Cost",
21009
- "description": "What the turn cost so far, in millicents, broken down by leg."
21010
- },
21011
- "created_at": {
21012
- "description": "When the turn's message was received.",
21013
- "format": "date-time",
21014
- "title": "Created At",
21015
- "type": "string"
21016
- },
21017
- "detail": {
21018
- "anyOf": [
21019
- {
21020
- "type": "string"
21021
- },
21022
- {
21023
- "type": "null"
21024
- }
21025
- ],
21026
- "description": "A human-readable explanation of a failed, stopped, or cancelled turn, or of why a queued turn waits.",
21027
- "title": "Detail"
21028
- },
21029
- "ended_at": {
21030
- "anyOf": [
21031
- {
21032
- "format": "date-time",
21033
- "type": "string"
21034
- },
21035
- {
21036
- "type": "null"
21037
- }
21038
- ],
21039
- "description": "When the turn reached its final status.",
21040
- "title": "Ended At"
21041
- },
21042
- "id": {
21043
- "description": "Unique identifier of the turn.",
21044
- "title": "Id",
21045
- "type": "string"
21046
- },
21047
- "index": {
21048
- "description": "Position in the session, starting at 0.",
21049
- "title": "Index",
21050
- "type": "integer"
21051
- },
21052
- "reason": {
21053
- "anyOf": [
21054
- {
21055
- "$ref": "#/components/schemas/TurnReason"
21056
- },
21057
- {
21058
- "type": "null"
21059
- }
21060
- ],
21061
- "description": "Why the turn failed or was cancelled; null on every other status."
21062
- },
21063
- "started_at": {
21064
- "anyOf": [
21065
- {
21066
- "format": "date-time",
21067
- "type": "string"
21068
- },
21069
- {
21070
- "type": "null"
21071
- }
21072
- ],
21073
- "description": "When the agent started on the message.",
21074
- "title": "Started At"
21075
- },
21076
- "status": {
21077
- "$ref": "#/components/schemas/TurnStatus",
21078
- "description": "Where the turn is."
21079
- },
21080
- "stopped": {
21081
- "anyOf": [
21082
- {
21083
- "$ref": "#/components/schemas/SessionStopped"
21084
- },
21085
- {
21086
- "type": "null"
21087
- }
21088
- ],
21089
- "description": "When and by whom a stop was requested; null when none was."
21090
- },
21091
- "tokens": {
21092
- "$ref": "#/components/schemas/Tokens",
21093
- "description": "The tokens the turn spent and the model they went to."
21094
- }
21095
- },
21096
- "required": [
21097
- "cost",
21098
- "created_at",
21099
- "detail",
21100
- "ended_at",
21101
- "id",
21102
- "index",
21103
- "reason",
21104
- "started_at",
21105
- "status",
21106
- "stopped",
21107
- "tokens"
21108
- ],
21109
- "title": "SessionTurn",
21110
- "type": "object"
21111
- },
21112
- "SessionTurnResponse": {
21113
- "description": "One turn.",
21114
- "properties": {
21115
- "turn": {
21116
- "$ref": "#/components/schemas/SessionTurn",
21117
- "description": "The turn."
21118
- }
21119
- },
21120
- "required": [
21121
- "turn"
21122
- ],
21123
- "title": "SessionTurnResponse",
21124
- "type": "object"
21125
- },
21126
- "SessionTurnsListResponse": {
21127
- "description": "A session's turns and its whole inbox, oldest first.",
21128
- "properties": {
21129
- "messages": {
21130
- "description": "Every message, delivered and pending, oldest first.",
21131
- "items": {
21132
- "$ref": "#/components/schemas/SessionMessage"
21133
- },
21134
- "title": "Messages",
21135
- "type": "array"
21136
- },
21137
- "turns": {
21138
- "description": "Every turn, ordered by index.",
21139
- "items": {
21140
- "$ref": "#/components/schemas/SessionTurn"
21141
- },
21142
- "title": "Turns",
21143
- "type": "array"
21144
- }
21145
- },
21146
- "required": [
21147
- "turns",
21148
- "messages"
21149
- ],
21150
- "title": "SessionTurnsListResponse",
21151
- "type": "object"
21152
- },
21153
21051
  "SessionUsageBucket": {
21154
21052
  "properties": {
21155
21053
  "cache_read_tokens": {
@@ -21203,6 +21101,14 @@
21203
21101
  "title": "Has More",
21204
21102
  "type": "boolean"
21205
21103
  },
21104
+ "message_counts": {
21105
+ "additionalProperties": {
21106
+ "type": "integer"
21107
+ },
21108
+ "description": "How many messages each listed session has received, by session id.",
21109
+ "title": "Message Counts",
21110
+ "type": "object"
21111
+ },
21206
21112
  "next_cursor": {
21207
21113
  "anyOf": [
21208
21114
  {
@@ -21229,13 +21135,6 @@
21229
21135
  },
21230
21136
  "title": "Sessions",
21231
21137
  "type": "array"
21232
- },
21233
- "turn_counts": {
21234
- "additionalProperties": {
21235
- "type": "integer"
21236
- },
21237
- "title": "Turn Counts",
21238
- "type": "object"
21239
21138
  }
21240
21139
  },
21241
21140
  "required": [
@@ -22090,7 +21989,7 @@
22090
21989
  },
22091
21990
  "conversation": {
22092
21991
  "$ref": "#/components/schemas/SessionConversationConfig-Input",
22093
- "description": "Conversation settings. Omitted, a raw session is interactive and an agent session keeps the agent's setting. State, warmth, prompting, and the turn are server-owned response fields."
21992
+ "description": "Conversation settings. Omitted, a raw session is interactive and an agent session keeps the agent's setting. Warmth and prompting are server-owned response fields."
22094
21993
  },
22095
21994
  "environment": {
22096
21995
  "anyOf": [
@@ -22124,7 +22023,7 @@
22124
22023
  "description": "Gemini CLI options for this session. Sent fields replace the agent's; naming Gemini CLI on an agent that runs another harness replaces its harness and requires a model. Set at most one of claude_code, codex, or gemini."
22125
22024
  },
22126
22025
  "images": {
22127
- "description": "Images attached to the first message, base64 inline. Requires the model's `images` capability, listed by `/v1/account/models`. Each becomes an `[Image #N]` placeholder in the prompt and an image block on turn 0. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
22026
+ "description": "Images attached to the first message, base64 inline. Requires the model's `images` capability, listed by `/v1/account/models`. Each becomes an `[Image #N]` placeholder in the prompt and an image block the model sees with it. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
22128
22027
  "items": {
22129
22028
  "$ref": "#/components/schemas/ImageAttachment"
22130
22029
  },
@@ -22341,7 +22240,7 @@
22341
22240
  },
22342
22241
  "conversation": {
22343
22242
  "$ref": "#/components/schemas/SessionConversationConfig-Input",
22344
- "description": "Conversation settings. Omitted, a raw session is interactive and an agent session keeps the agent's setting. State, warmth, prompting, and the turn are server-owned response fields."
22243
+ "description": "Conversation settings. Omitted, a raw session is interactive and an agent session keeps the agent's setting. Warmth and prompting are server-owned response fields."
22345
22244
  },
22346
22245
  "environment": {
22347
22246
  "anyOf": [
@@ -22375,7 +22274,7 @@
22375
22274
  "description": "Gemini CLI input and native options. Set exactly one of claude_code, codex, or gemini."
22376
22275
  },
22377
22276
  "images": {
22378
- "description": "Images attached to the first message, base64 inline. Requires the model's `images` capability, listed by `/v1/account/models`. Each becomes an `[Image #N]` placeholder in the prompt and an image block on turn 0. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
22277
+ "description": "Images attached to the first message, base64 inline. Requires the model's `images` capability, listed by `/v1/account/models`. Each becomes an `[Image #N]` placeholder in the prompt and an image block the model sees with it. Up to 10, 5 MiB each; PNG, JPEG, GIF, or WebP.",
22379
22278
  "items": {
22380
22279
  "$ref": "#/components/schemas/ImageAttachment"
22381
22280
  },
@@ -22605,605 +22504,6 @@
22605
22504
  "title": "TranscriptIngestResult",
22606
22505
  "type": "object"
22607
22506
  },
22608
- "TurnEndedPayload": {
22609
- "additionalProperties": true,
22610
- "description": "turn_ended: the turn reached its final status. `status`, `reason`, and\n`detail` match the turn on the session object.",
22611
- "properties": {
22612
- "detail": {
22613
- "anyOf": [
22614
- {
22615
- "type": "string"
22616
- },
22617
- {
22618
- "type": "null"
22619
- }
22620
- ],
22621
- "title": "Detail"
22622
- },
22623
- "duration_ms": {
22624
- "anyOf": [
22625
- {
22626
- "type": "integer"
22627
- },
22628
- {
22629
- "type": "null"
22630
- }
22631
- ],
22632
- "title": "Duration Ms"
22633
- },
22634
- "reason": {
22635
- "anyOf": [
22636
- {
22637
- "type": "string"
22638
- },
22639
- {
22640
- "type": "null"
22641
- }
22642
- ],
22643
- "title": "Reason"
22644
- },
22645
- "status": {
22646
- "title": "Status",
22647
- "type": "string"
22648
- },
22649
- "turn_id": {
22650
- "title": "Turn Id",
22651
- "type": "string"
22652
- },
22653
- "turn_index": {
22654
- "title": "Turn Index",
22655
- "type": "integer"
22656
- }
22657
- },
22658
- "required": [
22659
- "turn_id",
22660
- "turn_index",
22661
- "status"
22662
- ],
22663
- "title": "TurnEndedPayload",
22664
- "type": "object"
22665
- },
22666
- "TurnEndedRecord": {
22667
- "properties": {
22668
- "cost": {
22669
- "anyOf": [
22670
- {
22671
- "type": "integer"
22672
- },
22673
- {
22674
- "type": "null"
22675
- }
22676
- ],
22677
- "title": "Cost"
22678
- },
22679
- "created_at": {
22680
- "format": "date-time",
22681
- "title": "Created At",
22682
- "type": "string"
22683
- },
22684
- "duration": {
22685
- "anyOf": [
22686
- {
22687
- "type": "integer"
22688
- },
22689
- {
22690
- "type": "null"
22691
- }
22692
- ],
22693
- "title": "Duration"
22694
- },
22695
- "feed_seq": {
22696
- "description": "Position in the session feed and the stream's resume cursor.",
22697
- "title": "Feed Seq",
22698
- "type": "integer"
22699
- },
22700
- "id": {
22701
- "description": "Unique identifier of the record.",
22702
- "title": "Id",
22703
- "type": "string"
22704
- },
22705
- "kind": {
22706
- "const": "platform",
22707
- "default": "platform",
22708
- "title": "Kind",
22709
- "type": "string"
22710
- },
22711
- "model": {
22712
- "anyOf": [
22713
- {
22714
- "type": "string"
22715
- },
22716
- {
22717
- "type": "null"
22718
- }
22719
- ],
22720
- "title": "Model"
22721
- },
22722
- "payload": {
22723
- "$ref": "#/components/schemas/TurnEndedPayload"
22724
- },
22725
- "record_format": {
22726
- "const": "ellipsis_lifecycle@1",
22727
- "default": "ellipsis_lifecycle@1",
22728
- "title": "Record Format",
22729
- "type": "string"
22730
- },
22731
- "record_type": {
22732
- "const": "turn_ended",
22733
- "default": "turn_ended",
22734
- "title": "Record Type",
22735
- "type": "string"
22736
- },
22737
- "session_id": {
22738
- "description": "Session containing this record.",
22739
- "title": "Session Id",
22740
- "type": "string"
22741
- },
22742
- "session_message_id": {
22743
- "anyOf": [
22744
- {
22745
- "type": "string"
22746
- },
22747
- {
22748
- "type": "null"
22749
- }
22750
- ],
22751
- "description": "Message this record receives, delivers, requeues, or echoes.",
22752
- "title": "Session Message Id"
22753
- },
22754
- "source": {
22755
- "const": "lifecycle",
22756
- "default": "lifecycle",
22757
- "title": "Source",
22758
- "type": "string"
22759
- },
22760
- "tokens_info": {
22761
- "anyOf": [
22762
- {
22763
- "$ref": "#/components/schemas/TokensInfo"
22764
- },
22765
- {
22766
- "type": "null"
22767
- }
22768
- ]
22769
- },
22770
- "tools": {
22771
- "anyOf": [
22772
- {
22773
- "items": {
22774
- "type": "string"
22775
- },
22776
- "type": "array"
22777
- },
22778
- {
22779
- "type": "null"
22780
- }
22781
- ],
22782
- "title": "Tools"
22783
- },
22784
- "turn_id": {
22785
- "anyOf": [
22786
- {
22787
- "type": "string"
22788
- },
22789
- {
22790
- "type": "null"
22791
- }
22792
- ],
22793
- "description": "Turn containing this record, when applicable.",
22794
- "title": "Turn Id"
22795
- }
22796
- },
22797
- "required": [
22798
- "id",
22799
- "session_id",
22800
- "turn_id",
22801
- "session_message_id",
22802
- "feed_seq",
22803
- "source",
22804
- "record_type",
22805
- "record_format",
22806
- "payload",
22807
- "tools",
22808
- "tokens_info",
22809
- "cost",
22810
- "duration",
22811
- "model",
22812
- "created_at",
22813
- "kind"
22814
- ],
22815
- "title": "TurnEndedRecord",
22816
- "type": "object",
22817
- "x-ellipsis-preserve-payload": true
22818
- },
22819
- "TurnQueuedPayload": {
22820
- "additionalProperties": true,
22821
- "description": "turn_queued: the turn waits because the account already has\n`sessions_alive` sessions alive, its limit.",
22822
- "properties": {
22823
- "limit": {
22824
- "title": "Limit",
22825
- "type": "integer"
22826
- },
22827
- "sessions_alive": {
22828
- "title": "Sessions Alive",
22829
- "type": "integer"
22830
- },
22831
- "turn_id": {
22832
- "title": "Turn Id",
22833
- "type": "string"
22834
- }
22835
- },
22836
- "required": [
22837
- "turn_id",
22838
- "sessions_alive",
22839
- "limit"
22840
- ],
22841
- "title": "TurnQueuedPayload",
22842
- "type": "object"
22843
- },
22844
- "TurnQueuedRecord": {
22845
- "properties": {
22846
- "cost": {
22847
- "anyOf": [
22848
- {
22849
- "type": "integer"
22850
- },
22851
- {
22852
- "type": "null"
22853
- }
22854
- ],
22855
- "title": "Cost"
22856
- },
22857
- "created_at": {
22858
- "format": "date-time",
22859
- "title": "Created At",
22860
- "type": "string"
22861
- },
22862
- "duration": {
22863
- "anyOf": [
22864
- {
22865
- "type": "integer"
22866
- },
22867
- {
22868
- "type": "null"
22869
- }
22870
- ],
22871
- "title": "Duration"
22872
- },
22873
- "feed_seq": {
22874
- "description": "Position in the session feed and the stream's resume cursor.",
22875
- "title": "Feed Seq",
22876
- "type": "integer"
22877
- },
22878
- "id": {
22879
- "description": "Unique identifier of the record.",
22880
- "title": "Id",
22881
- "type": "string"
22882
- },
22883
- "kind": {
22884
- "const": "platform",
22885
- "default": "platform",
22886
- "title": "Kind",
22887
- "type": "string"
22888
- },
22889
- "model": {
22890
- "anyOf": [
22891
- {
22892
- "type": "string"
22893
- },
22894
- {
22895
- "type": "null"
22896
- }
22897
- ],
22898
- "title": "Model"
22899
- },
22900
- "payload": {
22901
- "$ref": "#/components/schemas/TurnQueuedPayload"
22902
- },
22903
- "record_format": {
22904
- "const": "ellipsis_lifecycle@1",
22905
- "default": "ellipsis_lifecycle@1",
22906
- "title": "Record Format",
22907
- "type": "string"
22908
- },
22909
- "record_type": {
22910
- "const": "turn_queued",
22911
- "default": "turn_queued",
22912
- "title": "Record Type",
22913
- "type": "string"
22914
- },
22915
- "session_id": {
22916
- "description": "Session containing this record.",
22917
- "title": "Session Id",
22918
- "type": "string"
22919
- },
22920
- "session_message_id": {
22921
- "anyOf": [
22922
- {
22923
- "type": "string"
22924
- },
22925
- {
22926
- "type": "null"
22927
- }
22928
- ],
22929
- "description": "Message this record receives, delivers, requeues, or echoes.",
22930
- "title": "Session Message Id"
22931
- },
22932
- "source": {
22933
- "const": "lifecycle",
22934
- "default": "lifecycle",
22935
- "title": "Source",
22936
- "type": "string"
22937
- },
22938
- "tokens_info": {
22939
- "anyOf": [
22940
- {
22941
- "$ref": "#/components/schemas/TokensInfo"
22942
- },
22943
- {
22944
- "type": "null"
22945
- }
22946
- ]
22947
- },
22948
- "tools": {
22949
- "anyOf": [
22950
- {
22951
- "items": {
22952
- "type": "string"
22953
- },
22954
- "type": "array"
22955
- },
22956
- {
22957
- "type": "null"
22958
- }
22959
- ],
22960
- "title": "Tools"
22961
- },
22962
- "turn_id": {
22963
- "anyOf": [
22964
- {
22965
- "type": "string"
22966
- },
22967
- {
22968
- "type": "null"
22969
- }
22970
- ],
22971
- "description": "Turn containing this record, when applicable.",
22972
- "title": "Turn Id"
22973
- }
22974
- },
22975
- "required": [
22976
- "id",
22977
- "session_id",
22978
- "turn_id",
22979
- "session_message_id",
22980
- "feed_seq",
22981
- "source",
22982
- "record_type",
22983
- "record_format",
22984
- "payload",
22985
- "tools",
22986
- "tokens_info",
22987
- "cost",
22988
- "duration",
22989
- "model",
22990
- "created_at",
22991
- "kind"
22992
- ],
22993
- "title": "TurnQueuedRecord",
22994
- "type": "object",
22995
- "x-ellipsis-preserve-payload": true
22996
- },
22997
- "TurnReason": {
22998
- "description": "Why a turn failed or was cancelled. Null on every other outcome.",
22999
- "enum": [
23000
- "error",
23001
- "tool_call_failed",
23002
- "budget_hit",
23003
- "payment_required",
23004
- "blocked",
23005
- "contact_email_required",
23006
- "lifecycle_hook_failed",
23007
- "missing_repo_access",
23008
- "missing_token_permissions",
23009
- "missing_environment_variables",
23010
- "missing_github_integration",
23011
- "agent_unavailable",
23012
- "upstream_unavailable",
23013
- "unsupported_configuration",
23014
- "execution_disabled",
23015
- "interrupted"
23016
- ],
23017
- "title": "TurnReason",
23018
- "type": "string"
23019
- },
23020
- "TurnStartedPayload": {
23021
- "additionalProperties": true,
23022
- "description": "turn_started: the agent started on the turn's message.",
23023
- "properties": {
23024
- "turn_id": {
23025
- "title": "Turn Id",
23026
- "type": "string"
23027
- },
23028
- "turn_index": {
23029
- "title": "Turn Index",
23030
- "type": "integer"
23031
- }
23032
- },
23033
- "required": [
23034
- "turn_id",
23035
- "turn_index"
23036
- ],
23037
- "title": "TurnStartedPayload",
23038
- "type": "object"
23039
- },
23040
- "TurnStartedRecord": {
23041
- "properties": {
23042
- "cost": {
23043
- "anyOf": [
23044
- {
23045
- "type": "integer"
23046
- },
23047
- {
23048
- "type": "null"
23049
- }
23050
- ],
23051
- "title": "Cost"
23052
- },
23053
- "created_at": {
23054
- "format": "date-time",
23055
- "title": "Created At",
23056
- "type": "string"
23057
- },
23058
- "duration": {
23059
- "anyOf": [
23060
- {
23061
- "type": "integer"
23062
- },
23063
- {
23064
- "type": "null"
23065
- }
23066
- ],
23067
- "title": "Duration"
23068
- },
23069
- "feed_seq": {
23070
- "description": "Position in the session feed and the stream's resume cursor.",
23071
- "title": "Feed Seq",
23072
- "type": "integer"
23073
- },
23074
- "id": {
23075
- "description": "Unique identifier of the record.",
23076
- "title": "Id",
23077
- "type": "string"
23078
- },
23079
- "kind": {
23080
- "const": "platform",
23081
- "default": "platform",
23082
- "title": "Kind",
23083
- "type": "string"
23084
- },
23085
- "model": {
23086
- "anyOf": [
23087
- {
23088
- "type": "string"
23089
- },
23090
- {
23091
- "type": "null"
23092
- }
23093
- ],
23094
- "title": "Model"
23095
- },
23096
- "payload": {
23097
- "$ref": "#/components/schemas/TurnStartedPayload"
23098
- },
23099
- "record_format": {
23100
- "const": "ellipsis_lifecycle@1",
23101
- "default": "ellipsis_lifecycle@1",
23102
- "title": "Record Format",
23103
- "type": "string"
23104
- },
23105
- "record_type": {
23106
- "const": "turn_started",
23107
- "default": "turn_started",
23108
- "title": "Record Type",
23109
- "type": "string"
23110
- },
23111
- "session_id": {
23112
- "description": "Session containing this record.",
23113
- "title": "Session Id",
23114
- "type": "string"
23115
- },
23116
- "session_message_id": {
23117
- "anyOf": [
23118
- {
23119
- "type": "string"
23120
- },
23121
- {
23122
- "type": "null"
23123
- }
23124
- ],
23125
- "description": "Message this record receives, delivers, requeues, or echoes.",
23126
- "title": "Session Message Id"
23127
- },
23128
- "source": {
23129
- "const": "lifecycle",
23130
- "default": "lifecycle",
23131
- "title": "Source",
23132
- "type": "string"
23133
- },
23134
- "tokens_info": {
23135
- "anyOf": [
23136
- {
23137
- "$ref": "#/components/schemas/TokensInfo"
23138
- },
23139
- {
23140
- "type": "null"
23141
- }
23142
- ]
23143
- },
23144
- "tools": {
23145
- "anyOf": [
23146
- {
23147
- "items": {
23148
- "type": "string"
23149
- },
23150
- "type": "array"
23151
- },
23152
- {
23153
- "type": "null"
23154
- }
23155
- ],
23156
- "title": "Tools"
23157
- },
23158
- "turn_id": {
23159
- "anyOf": [
23160
- {
23161
- "type": "string"
23162
- },
23163
- {
23164
- "type": "null"
23165
- }
23166
- ],
23167
- "description": "Turn containing this record, when applicable.",
23168
- "title": "Turn Id"
23169
- }
23170
- },
23171
- "required": [
23172
- "id",
23173
- "session_id",
23174
- "turn_id",
23175
- "session_message_id",
23176
- "feed_seq",
23177
- "source",
23178
- "record_type",
23179
- "record_format",
23180
- "payload",
23181
- "tools",
23182
- "tokens_info",
23183
- "cost",
23184
- "duration",
23185
- "model",
23186
- "created_at",
23187
- "kind"
23188
- ],
23189
- "title": "TurnStartedRecord",
23190
- "type": "object",
23191
- "x-ellipsis-preserve-payload": true
23192
- },
23193
- "TurnStatus": {
23194
- "description": "Where one turn is: waiting, preparing, being answered, or over.\n\n`queued` turns wait to start, behind another turn or for a free session\nslot on the account. `preparing` turns wait while the environment is set\nup. `stopped` and `cancelled` are their own outcomes; `reason` explains a\n`failed` or `cancelled` turn.",
23195
- "enum": [
23196
- "queued",
23197
- "preparing",
23198
- "running",
23199
- "completed",
23200
- "failed",
23201
- "stopped",
23202
- "cancelled"
23203
- ],
23204
- "title": "TurnStatus",
23205
- "type": "string"
23206
- },
23207
22507
  "UninstallGithubAppRequest": {
23208
22508
  "properties": {
23209
22509
  "confirm_account_login": {
@@ -23263,6 +22563,18 @@
23263
22563
  "title": "Kind",
23264
22564
  "type": "string"
23265
22565
  },
22566
+ "message_id": {
22567
+ "anyOf": [
22568
+ {
22569
+ "type": "string"
22570
+ },
22571
+ {
22572
+ "type": "null"
22573
+ }
22574
+ ],
22575
+ "description": "The message this record belongs to: the message itself, or what happened while answering it. Null for records outside any message, such as the session closing.",
22576
+ "title": "Message Id"
22577
+ },
23266
22578
  "model": {
23267
22579
  "anyOf": [
23268
22580
  {
@@ -23294,18 +22606,6 @@
23294
22606
  "title": "Session Id",
23295
22607
  "type": "string"
23296
22608
  },
23297
- "session_message_id": {
23298
- "anyOf": [
23299
- {
23300
- "type": "string"
23301
- },
23302
- {
23303
- "type": "null"
23304
- }
23305
- ],
23306
- "description": "Message this record receives, delivers, requeues, or echoes.",
23307
- "title": "Session Message Id"
23308
- },
23309
22609
  "source": {
23310
22610
  "description": "Original producer. Unknown producers remain readable as unknown records.",
23311
22611
  "title": "Source",
@@ -23334,25 +22634,12 @@
23334
22634
  }
23335
22635
  ],
23336
22636
  "title": "Tools"
23337
- },
23338
- "turn_id": {
23339
- "anyOf": [
23340
- {
23341
- "type": "string"
23342
- },
23343
- {
23344
- "type": "null"
23345
- }
23346
- ],
23347
- "description": "Turn containing this record, when applicable.",
23348
- "title": "Turn Id"
23349
22637
  }
23350
22638
  },
23351
22639
  "required": [
23352
22640
  "id",
23353
22641
  "session_id",
23354
- "turn_id",
23355
- "session_message_id",
22642
+ "message_id",
23356
22643
  "feed_seq",
23357
22644
  "source",
23358
22645
  "record_type",
@@ -34278,7 +33565,7 @@
34278
33565
  },
34279
33566
  "/v1/sessions": {
34280
33567
  "get": {
34281
- "description": "List cloud agent sessions, newest first.\n\nOptionally filtered by agent (id or name), source, service, handler, time\nwindow, attributed author, repository, and whether the session is\nstill going.",
33568
+ "description": "List cloud agent sessions, newest first.\n\nOptionally filtered by agent (id or name), source, service, handler, time\nwindow, attributed author, repository, and status.",
34282
33569
  "operationId": "list_sessions",
34283
33570
  "parameters": [
34284
33571
  {
@@ -34469,15 +33756,24 @@
34469
33756
  }
34470
33757
  },
34471
33758
  {
34472
- "description": "Keep only sessions whose current turn is queued, preparing, or running.",
33759
+ "description": "Keep only sessions in these statuses.",
34473
33760
  "in": "query",
34474
- "name": "unfinished",
33761
+ "name": "status",
34475
33762
  "required": false,
34476
33763
  "schema": {
34477
- "default": false,
34478
- "description": "Keep only sessions whose current turn is queued, preparing, or running.",
34479
- "title": "Unfinished",
34480
- "type": "boolean"
33764
+ "anyOf": [
33765
+ {
33766
+ "items": {
33767
+ "$ref": "#/components/schemas/SessionStatus"
33768
+ },
33769
+ "type": "array"
33770
+ },
33771
+ {
33772
+ "type": "null"
33773
+ }
33774
+ ],
33775
+ "description": "Keep only sessions in these statuses.",
33776
+ "title": "Status"
34481
33777
  }
34482
33778
  },
34483
33779
  {
@@ -34899,7 +34195,7 @@
34899
34195
  }
34900
34196
  },
34901
34197
  {
34902
- "description": "Current turn statuses to keep.",
34198
+ "description": "Keep only sessions in these statuses.",
34903
34199
  "in": "query",
34904
34200
  "name": "status",
34905
34201
  "required": false,
@@ -34907,7 +34203,7 @@
34907
34203
  "anyOf": [
34908
34204
  {
34909
34205
  "items": {
34910
- "$ref": "#/components/schemas/TurnStatus"
34206
+ "$ref": "#/components/schemas/SessionStatus"
34911
34207
  },
34912
34208
  "type": "array"
34913
34209
  },
@@ -34915,7 +34211,7 @@
34915
34211
  "type": "null"
34916
34212
  }
34917
34213
  ],
34918
- "description": "Current turn statuses to keep.",
34214
+ "description": "Keep only sessions in these statuses.",
34919
34215
  "title": "Status"
34920
34216
  }
34921
34217
  },
@@ -36009,7 +35305,7 @@
36009
35305
  },
36010
35306
  "/v1/sessions/{id}/messages": {
36011
35307
  "post": {
36012
- "description": "Send a message to a session.\n\n409 for mention, non-interactive, closed, and out-of-budget\nsessions. Returns the created message and its turn; a retried send\nwith the same idempotency_key returns the original ones.",
35308
+ "description": "Send a message to a session.\n\n409 for mention, non-interactive, closed, and out-of-budget\nsessions. Returns the created message; a retried send with the\nsame idempotency_key returns the original one. The message is\nanswered once the session's status is `idle` or `closed`.",
36013
35309
  "operationId": "send_session_message",
36014
35310
  "parameters": [
36015
35311
  {
@@ -36351,6 +35647,24 @@
36351
35647
  "title": "Limit"
36352
35648
  }
36353
35649
  },
35650
+ {
35651
+ "description": "Keep only the records of this message.",
35652
+ "in": "query",
35653
+ "name": "message_id",
35654
+ "required": false,
35655
+ "schema": {
35656
+ "anyOf": [
35657
+ {
35658
+ "type": "string"
35659
+ },
35660
+ {
35661
+ "type": "null"
35662
+ }
35663
+ ],
35664
+ "description": "Keep only the records of this message.",
35665
+ "title": "Message Id"
35666
+ }
35667
+ },
36354
35668
  {
36355
35669
  "in": "header",
36356
35670
  "name": "user-agent",
@@ -36476,7 +35790,7 @@
36476
35790
  },
36477
35791
  "/v1/sessions/{id}/stop": {
36478
35792
  "post": {
36479
- "description": "Stop the turn in progress and return the session.\n\nThe turn ends `stopped`; the conversation stays open. 409 when no\nturn is queued, preparing, or running. The stopping user is recorded only\nwhen the caller's credential maps to a GitHub account.",
35793
+ "description": "Stop the session's work and return it.\n\nThe running message ends `stopped` and every queued message is\ncancelled, so the session goes `idle` (or `closed` when it was\nnot interactive). 409 when the session is idle or closed already.",
36480
35794
  "operationId": "stop_session",
36481
35795
  "parameters": [
36482
35796
  {
@@ -36554,7 +35868,7 @@
36554
35868
  }
36555
35869
  }
36556
35870
  },
36557
- "description": "No turn is queued, preparing, or running."
35871
+ "description": "The session is idle or closed."
36558
35872
  },
36559
35873
  "422": {
36560
35874
  "content": {
@@ -36906,289 +36220,6 @@
36906
36220
  "x-ellipsis-undocumented": true
36907
36221
  }
36908
36222
  },
36909
- "/v1/sessions/{id}/turns": {
36910
- "get": {
36911
- "description": "Return the session's turns and messages, oldest first.\n\nOne turn per message: pending until the agent starts on it,\nrunning while it works, then completed, failed, stopped, or\ncancelled.",
36912
- "operationId": "get_session_turns",
36913
- "parameters": [
36914
- {
36915
- "in": "path",
36916
- "name": "id",
36917
- "required": true,
36918
- "schema": {
36919
- "title": "Id",
36920
- "type": "string"
36921
- }
36922
- },
36923
- {
36924
- "in": "header",
36925
- "name": "user-agent",
36926
- "required": false,
36927
- "schema": {
36928
- "anyOf": [
36929
- {
36930
- "type": "string"
36931
- },
36932
- {
36933
- "type": "null"
36934
- }
36935
- ],
36936
- "title": "User-Agent"
36937
- }
36938
- }
36939
- ],
36940
- "responses": {
36941
- "200": {
36942
- "content": {
36943
- "application/json": {
36944
- "schema": {
36945
- "$ref": "#/components/schemas/SessionTurnsListResponse"
36946
- }
36947
- }
36948
- },
36949
- "description": "Successful Response"
36950
- },
36951
- "401": {
36952
- "content": {
36953
- "application/json": {
36954
- "schema": {
36955
- "$ref": "#/components/schemas/ErrorResponse"
36956
- }
36957
- }
36958
- },
36959
- "description": "The bearer token is missing, invalid, or revoked."
36960
- },
36961
- "403": {
36962
- "content": {
36963
- "application/json": {
36964
- "schema": {
36965
- "$ref": "#/components/schemas/ErrorResponse"
36966
- }
36967
- }
36968
- },
36969
- "description": "The credential may not perform this action, or the account is blocked."
36970
- },
36971
- "404": {
36972
- "content": {
36973
- "application/json": {
36974
- "schema": {
36975
- "$ref": "#/components/schemas/ErrorResponse"
36976
- }
36977
- }
36978
- },
36979
- "description": "No such session in your account."
36980
- },
36981
- "422": {
36982
- "content": {
36983
- "application/json": {
36984
- "schema": {
36985
- "$ref": "#/components/schemas/HTTPValidationError"
36986
- }
36987
- }
36988
- },
36989
- "description": "Validation Error"
36990
- }
36991
- },
36992
- "security": [
36993
- {
36994
- "HTTPBearer": []
36995
- }
36996
- ],
36997
- "summary": "Get Session Turns",
36998
- "tags": [
36999
- "v1"
37000
- ],
37001
- "x-ellipsis-permissions": {
37002
- "constraints": [
37003
- {
37004
- "account_admin_fields": [],
37005
- "identity": null,
37006
- "sandbox_scope": null
37007
- }
37008
- ],
37009
- "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
37010
- "notes": [
37011
- "Higher permission levels include lower levels: read < write < delete.",
37012
- "Grant match patterns can further restrict access to individual resources."
37013
- ],
37014
- "required": [
37015
- {
37016
- "level": "read",
37017
- "resource": "sessions"
37018
- }
37019
- ],
37020
- "tokens": [
37021
- {
37022
- "available": true,
37023
- "conditions": [],
37024
- "kind": "api_key",
37025
- "label": "API key"
37026
- },
37027
- {
37028
- "available": true,
37029
- "conditions": [],
37030
- "kind": "user_token",
37031
- "label": "CLI user token"
37032
- },
37033
- {
37034
- "available": true,
37035
- "conditions": [
37036
- "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
37037
- ],
37038
- "kind": "sandbox_token",
37039
- "label": "Session token"
37040
- }
37041
- ]
37042
- },
37043
- "x-ellipsis-sdk-method": "sessions.turns.list"
37044
- }
37045
- },
37046
- "/v1/sessions/{session_id}/turns/{id}": {
37047
- "get": {
37048
- "description": "Return one turn.\n\nPoll this after sending a message: the message is answered when\nthe turn's status is completed, failed, stopped, or cancelled.",
37049
- "operationId": "get_session_turn",
37050
- "parameters": [
37051
- {
37052
- "in": "path",
37053
- "name": "session_id",
37054
- "required": true,
37055
- "schema": {
37056
- "title": "Session Id",
37057
- "type": "string"
37058
- }
37059
- },
37060
- {
37061
- "in": "path",
37062
- "name": "id",
37063
- "required": true,
37064
- "schema": {
37065
- "title": "Id",
37066
- "type": "string"
37067
- }
37068
- },
37069
- {
37070
- "in": "header",
37071
- "name": "user-agent",
37072
- "required": false,
37073
- "schema": {
37074
- "anyOf": [
37075
- {
37076
- "type": "string"
37077
- },
37078
- {
37079
- "type": "null"
37080
- }
37081
- ],
37082
- "title": "User-Agent"
37083
- }
37084
- }
37085
- ],
37086
- "responses": {
37087
- "200": {
37088
- "content": {
37089
- "application/json": {
37090
- "schema": {
37091
- "$ref": "#/components/schemas/SessionTurnResponse"
37092
- }
37093
- }
37094
- },
37095
- "description": "Successful Response"
37096
- },
37097
- "401": {
37098
- "content": {
37099
- "application/json": {
37100
- "schema": {
37101
- "$ref": "#/components/schemas/ErrorResponse"
37102
- }
37103
- }
37104
- },
37105
- "description": "The bearer token is missing, invalid, or revoked."
37106
- },
37107
- "403": {
37108
- "content": {
37109
- "application/json": {
37110
- "schema": {
37111
- "$ref": "#/components/schemas/ErrorResponse"
37112
- }
37113
- }
37114
- },
37115
- "description": "The credential may not perform this action, or the account is blocked."
37116
- },
37117
- "404": {
37118
- "content": {
37119
- "application/json": {
37120
- "schema": {
37121
- "$ref": "#/components/schemas/ErrorResponse"
37122
- }
37123
- }
37124
- },
37125
- "description": "No such session or turn in your account."
37126
- },
37127
- "422": {
37128
- "content": {
37129
- "application/json": {
37130
- "schema": {
37131
- "$ref": "#/components/schemas/HTTPValidationError"
37132
- }
37133
- }
37134
- },
37135
- "description": "Validation Error"
37136
- }
37137
- },
37138
- "security": [
37139
- {
37140
- "HTTPBearer": []
37141
- }
37142
- ],
37143
- "summary": "Get Session Turn",
37144
- "tags": [
37145
- "v1"
37146
- ],
37147
- "x-ellipsis-permissions": {
37148
- "constraints": [
37149
- {
37150
- "account_admin_fields": [],
37151
- "identity": null,
37152
- "sandbox_scope": null
37153
- }
37154
- ],
37155
- "description": "Required permissions: read:sessions.\nAPI key: Supported.\nCLI user token: Supported.\nSession token: Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration.\nHigher permission levels include lower levels: read < write < delete.\nGrant match patterns can further restrict access to individual resources.",
37156
- "notes": [
37157
- "Higher permission levels include lower levels: read < write < delete.",
37158
- "Grant match patterns can further restrict access to individual resources."
37159
- ],
37160
- "required": [
37161
- {
37162
- "level": "read",
37163
- "resource": "sessions"
37164
- }
37165
- ],
37166
- "tokens": [
37167
- {
37168
- "available": true,
37169
- "conditions": [],
37170
- "kind": "api_key",
37171
- "label": "API key"
37172
- },
37173
- {
37174
- "available": true,
37175
- "conditions": [],
37176
- "kind": "user_token",
37177
- "label": "CLI user token"
37178
- },
37179
- {
37180
- "available": true,
37181
- "conditions": [
37182
- "Requires the ellipsis:api scope and the required grants in the token's permissions.ellipsis configuration."
37183
- ],
37184
- "kind": "sandbox_token",
37185
- "label": "Session token"
37186
- }
37187
- ]
37188
- },
37189
- "x-ellipsis-sdk-method": "sessions.turns.get"
37190
- }
37191
- },
37192
36223
  "/v1/support/slack": {
37193
36224
  "get": {
37194
36225
  "operationId": "get_slack_help",