@ellipsis-dev/sdk 0.7.0 → 0.8.1

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.
@@ -96,10 +96,41 @@
96
96
  "title": "AgentSessionStatus",
97
97
  "type": "string"
98
98
  },
99
- "AgentSessionWire": {
100
- "description": "An agent session: one conversation with an agent, from trigger to\nterminal state. Returned by `GET /sessions/{id}` and carried by the\nsession stream's `session`/`snapshot` frames \u2014 REST and stream never\ndisagree about what a session looks like.",
99
+ "AttributionType": {
100
+ "enum": [
101
+ "github_user",
102
+ "linear_user",
103
+ "slack_user",
104
+ "api_key"
105
+ ],
106
+ "title": "AttributionType",
107
+ "type": "string"
108
+ },
109
+ "BudgetSource": {
110
+ "description": "Which layer actually determined the enforced budget.\n\nNot derivable from the run row alone (the run does not store the config\ncents or the account default), so we persist it for the UI / audit.",
111
+ "enum": [
112
+ "system",
113
+ "account",
114
+ "config",
115
+ "run"
116
+ ],
117
+ "title": "BudgetSource",
118
+ "type": "string"
119
+ },
120
+ "DefaultResolution": {
121
+ "description": "How a session that arrived with no explicit config source resolved its\nconfig (documents/eng/DEFAULT_CONFIGS.md \u00a74). Persisted on the session so\naudit and clients can say \"ran under X (repo default)\". A session started\nwith an explicit config/config_id/template_id never enters resolution and\nstores None.",
122
+ "enum": [
123
+ "repo_default",
124
+ "account_default",
125
+ "none"
126
+ ],
127
+ "title": "DefaultResolution",
128
+ "type": "string"
129
+ },
130
+ "DeltaFrame": {
131
+ "description": "Fire-and-forget partial assistant output for the current response.\nCarries no sequence number and is never resumable; superseded by the\ncommitted record.",
101
132
  "properties": {
102
- "agent_config_id": {
133
+ "agent_turn_id": {
103
134
  "anyOf": [
104
135
  {
105
136
  "type": "string"
@@ -109,9 +140,230 @@
109
140
  }
110
141
  ],
111
142
  "default": null,
112
- "description": "Identifier of the saved agent config the session ran on, if any.",
113
- "title": "Agent Config Id"
143
+ "description": "Identifier of the turn the delta belongs to, if known.",
144
+ "title": "Agent Turn Id"
145
+ },
146
+ "kind": {
147
+ "description": "What the partial text is. Known values: text ('thinking' reserved). Open vocabulary: ignore deltas with unknown kinds.",
148
+ "type": "string"
149
+ },
150
+ "output_tokens": {
151
+ "anyOf": [
152
+ {
153
+ "type": "integer"
154
+ },
155
+ {
156
+ "type": "null"
157
+ }
158
+ ],
159
+ "default": null,
160
+ "description": "Output tokens generated so far for the current response.",
161
+ "title": "Output Tokens"
162
+ },
163
+ "text": {
164
+ "anyOf": [
165
+ {
166
+ "type": "string"
167
+ },
168
+ {
169
+ "type": "null"
170
+ }
171
+ ],
172
+ "default": null,
173
+ "description": "The partial output text.",
174
+ "title": "Text"
175
+ },
176
+ "type": {
177
+ "const": "delta",
178
+ "default": "delta",
179
+ "title": "Type",
180
+ "type": "string"
181
+ }
182
+ },
183
+ "required": [
184
+ "agent_turn_id",
185
+ "kind",
186
+ "output_tokens",
187
+ "text",
188
+ "type"
189
+ ],
190
+ "title": "DeltaFrame",
191
+ "type": "object"
192
+ },
193
+ "DoneFrame": {
194
+ "description": "Terminal marker: the conversation is over, after the final session\nframe carried the end state. Followed by a normal close (1000).",
195
+ "properties": {
196
+ "type": {
197
+ "const": "done",
198
+ "default": "done",
199
+ "title": "Type",
200
+ "type": "string"
201
+ }
202
+ },
203
+ "required": [
204
+ "type"
205
+ ],
206
+ "title": "DoneFrame",
207
+ "type": "object"
208
+ },
209
+ "ErrorFrame": {
210
+ "description": "Terminal error marker, sent before the server closes with code 1011.",
211
+ "properties": {
212
+ "message": {
213
+ "description": "A human-readable error message.",
214
+ "title": "Message",
215
+ "type": "string"
114
216
  },
217
+ "type": {
218
+ "const": "error",
219
+ "default": "error",
220
+ "title": "Type",
221
+ "type": "string"
222
+ }
223
+ },
224
+ "required": [
225
+ "message",
226
+ "type"
227
+ ],
228
+ "title": "ErrorFrame",
229
+ "type": "object"
230
+ },
231
+ "GithubAccountSnippet": {
232
+ "description": "Sometimes the GitHub API returns a user of github (can include bots)\nusing this snippet instead of the full GithubAccount model. One example,\nis when the API returns a pull request.\n\nThis is the least amount of info we need to represent a GitHub account.",
233
+ "properties": {
234
+ "avatar_url": {
235
+ "title": "Avatar Url",
236
+ "type": "string"
237
+ },
238
+ "id": {
239
+ "title": "Id",
240
+ "type": "integer"
241
+ },
242
+ "login": {
243
+ "title": "Login",
244
+ "type": "string"
245
+ },
246
+ "type": {
247
+ "$ref": "#/$defs/GithubAccountType"
248
+ }
249
+ },
250
+ "required": [
251
+ "avatar_url",
252
+ "id",
253
+ "login",
254
+ "type"
255
+ ],
256
+ "title": "GithubAccountSnippet",
257
+ "type": "object"
258
+ },
259
+ "GithubAccountType": {
260
+ "enum": [
261
+ "User",
262
+ "Organization",
263
+ "Bot",
264
+ "Mannequin"
265
+ ],
266
+ "title": "GithubAccountType",
267
+ "type": "string"
268
+ },
269
+ "Harness": {
270
+ "enum": [
271
+ "claude_code",
272
+ "codex"
273
+ ],
274
+ "title": "Harness",
275
+ "type": "string"
276
+ },
277
+ "HeartbeatFrame": {
278
+ "description": "A keepalive sent after a period of idleness; doubles as the dead-socket\nprobe. Clients should treat roughly twice the heartbeat interval of\nsilence as a dead connection.",
279
+ "properties": {
280
+ "ts": {
281
+ "description": "Server time when the heartbeat was sent.",
282
+ "format": "date-time",
283
+ "title": "Ts",
284
+ "type": "string"
285
+ },
286
+ "type": {
287
+ "const": "heartbeat",
288
+ "default": "heartbeat",
289
+ "title": "Type",
290
+ "type": "string"
291
+ }
292
+ },
293
+ "required": [
294
+ "ts",
295
+ "type"
296
+ ],
297
+ "title": "HeartbeatFrame",
298
+ "type": "object"
299
+ },
300
+ "ParentKind": {
301
+ "description": "How a session relates to its predecessor (parent_agent_session_id) \u2014\nthe ONE \"preceded-by\" chain for every predecessor relationship. Routing\nreads this when the distinction matters.\n\nCONTINUATION \u2014 a follow-up in the same conversation surface (e.g. a Slack\nthread reply spawning a fresh session on the same thread).\nHANDOFF \u2014 a session started to take over work from another surface (e.g.\nlaptop \u2192 cloud handoff; later phase).\nRESUME \u2014 a conversation re-hosted on a new box after its sandbox was torn\ndown (interactive platform; later phase).",
302
+ "enum": [
303
+ "continuation",
304
+ "handoff",
305
+ "resume"
306
+ ],
307
+ "title": "ParentKind",
308
+ "type": "string"
309
+ },
310
+ "PromptBlockedReason": {
311
+ "description": "Why direct prompting is refused. Absent when prompting is allowed.",
312
+ "enum": [
313
+ "mention_surface",
314
+ "ephemeral_trigger",
315
+ "non_interactive",
316
+ "harness_single_turn",
317
+ "closed",
318
+ "laptop"
319
+ ],
320
+ "title": "PromptBlockedReason",
321
+ "type": "string"
322
+ },
323
+ "RecordsAppendFrame": {
324
+ "description": "Cursored append-only delivery of session records, ordered by feed_seq,\nfrom all sources. Every record in the frame advances the resume cursor \u2014\nincluding ones a client renders as nothing.",
325
+ "properties": {
326
+ "records": {
327
+ "description": "New session records, ordered by feed_seq.",
328
+ "items": {
329
+ "$ref": "#/$defs/SessionRecord"
330
+ },
331
+ "title": "Records",
332
+ "type": "array"
333
+ },
334
+ "type": {
335
+ "const": "records_append",
336
+ "default": "records_append",
337
+ "title": "Type",
338
+ "type": "string"
339
+ }
340
+ },
341
+ "required": [
342
+ "records",
343
+ "type"
344
+ ],
345
+ "title": "RecordsAppendFrame",
346
+ "type": "object"
347
+ },
348
+ "RunStatus": {
349
+ "description": "What the current (or most recent) execution is doing (backs `run`).",
350
+ "enum": [
351
+ "scheduled",
352
+ "starting",
353
+ "working",
354
+ "waiting",
355
+ "done",
356
+ "failed",
357
+ "stopped",
358
+ "cancelled",
359
+ "retrying"
360
+ ],
361
+ "title": "RunStatus",
362
+ "type": "string"
363
+ },
364
+ "Session": {
365
+ "description": "An agent session: one conversation with an agent, from trigger to\nterminal state. Returned by `GET /sessions/{id}` and carried by the\nsession stream's `session`/`snapshot` frames \u2014 REST and stream never\ndisagree about what a session looks like.",
366
+ "properties": {
115
367
  "attributed_user": {
116
368
  "anyOf": [
117
369
  {
@@ -162,6 +414,19 @@
162
414
  "description": "Version of the client that started the session, if reported.",
163
415
  "title": "Client Version"
164
416
  },
417
+ "config_id": {
418
+ "anyOf": [
419
+ {
420
+ "type": "string"
421
+ },
422
+ {
423
+ "type": "null"
424
+ }
425
+ ],
426
+ "default": null,
427
+ "description": "Identifier of the saved agent config the session ran on, if any.",
428
+ "title": "Config Id"
429
+ },
165
430
  "config_override": {
166
431
  "anyOf": [
167
432
  {
@@ -218,11 +483,6 @@
218
483
  "title": "Created At",
219
484
  "type": "string"
220
485
  },
221
- "customer_id": {
222
- "description": "Identifier of the account that owns the session.",
223
- "title": "Customer Id",
224
- "type": "string"
225
- },
226
486
  "default_resolution": {
227
487
  "anyOf": [
228
488
  {
@@ -322,30 +582,30 @@
322
582
  "description": "Pull requests the session created or updated.",
323
583
  "title": "Output Prs"
324
584
  },
325
- "parent_agent_session_id": {
585
+ "parent_kind": {
326
586
  "anyOf": [
327
587
  {
328
- "type": "string"
588
+ "$ref": "#/$defs/ParentKind"
329
589
  },
330
590
  {
331
591
  "type": "null"
332
592
  }
333
593
  ],
334
594
  "default": null,
335
- "description": "Identifier of the parent session that spawned this one, if any.",
336
- "title": "Parent Agent Session Id"
595
+ "description": "How this session relates to its parent session, if any."
337
596
  },
338
- "parent_kind": {
597
+ "parent_session_id": {
339
598
  "anyOf": [
340
599
  {
341
- "$ref": "#/$defs/ParentKind"
600
+ "type": "string"
342
601
  },
343
602
  {
344
603
  "type": "null"
345
604
  }
346
605
  ],
347
606
  "default": null,
348
- "description": "How this session relates to its parent session, if any."
607
+ "description": "Identifier of the parent session that spawned this one, if any.",
608
+ "title": "Parent Session Id"
349
609
  },
350
610
  "prompt": {
351
611
  "anyOf": [
@@ -499,393 +759,127 @@
499
759
  "tokens_cache_creation": {
500
760
  "default": 0,
501
761
  "description": "Tokens written to the prompt cache.",
502
- "title": "Tokens Cache Creation",
503
- "type": "integer"
504
- },
505
- "tokens_cache_read": {
506
- "default": 0,
507
- "description": "Tokens read from the prompt cache.",
508
- "title": "Tokens Cache Read",
509
- "type": "integer"
510
- },
511
- "tokens_input": {
512
- "default": 0,
513
- "description": "Input tokens used.",
514
- "title": "Tokens Input",
515
- "type": "integer"
516
- },
517
- "tokens_model": {
518
- "description": "The model the token counts are attributed to.",
519
- "title": "Tokens Model",
520
- "type": "string"
521
- },
522
- "tokens_output": {
523
- "default": 0,
524
- "description": "Output tokens used.",
525
- "title": "Tokens Output",
526
- "type": "integer"
527
- },
528
- "tokens_total": {
529
- "default": 0,
530
- "description": "Total tokens used by the session.",
531
- "title": "Tokens Total",
532
- "type": "integer"
533
- },
534
- "updated_at": {
535
- "description": "When the session was last updated.",
536
- "format": "date-time",
537
- "title": "Updated At",
538
- "type": "string"
539
- },
540
- "webhook_id": {
541
- "anyOf": [
542
- {
543
- "type": "string"
544
- },
545
- {
546
- "type": "null"
547
- }
548
- ],
549
- "default": null,
550
- "description": "Identifier of the webhook event that triggered the session, if any.",
551
- "title": "Webhook Id"
552
- },
553
- "webhook_type": {
554
- "anyOf": [
555
- {
556
- "$ref": "#/$defs/WebhookType"
557
- },
558
- {
559
- "type": "null"
560
- }
561
- ],
562
- "default": null,
563
- "description": "Type of the webhook event that triggered the session, if any."
564
- }
565
- },
566
- "required": [
567
- "agent_config_id",
568
- "attributed_user",
569
- "attribution_id",
570
- "attribution_type",
571
- "client_version",
572
- "config_override",
573
- "context_repository",
574
- "cost_fee",
575
- "cost_sandbox_cpu",
576
- "cost_sandbox_memory",
577
- "cost_tokens",
578
- "created_at",
579
- "customer_id",
580
- "default_resolution",
581
- "exit_status",
582
- "harness",
583
- "id",
584
- "last_activity_at",
585
- "last_message_at",
586
- "live_summary",
587
- "metadata",
588
- "output_prs",
589
- "parent_agent_session_id",
590
- "parent_kind",
591
- "prompt",
592
- "prompting",
593
- "replayed_from_session_id",
594
- "resolved_budget_cents",
595
- "resolved_budget_source",
596
- "sandbox_id",
597
- "session_key",
598
- "session_state",
599
- "source",
600
- "status",
601
- "status_reason",
602
- "stopped_at",
603
- "stopped_by",
604
- "stopped_by_user",
605
- "surface",
606
- "tokens_cache_creation",
607
- "tokens_cache_read",
608
- "tokens_input",
609
- "tokens_model",
610
- "tokens_output",
611
- "tokens_total",
612
- "updated_at",
613
- "webhook_id",
614
- "webhook_type"
615
- ],
616
- "title": "AgentSessionWire",
617
- "type": "object"
618
- },
619
- "AttributionType": {
620
- "enum": [
621
- "github_user",
622
- "linear_user",
623
- "slack_user",
624
- "api_key"
625
- ],
626
- "title": "AttributionType",
627
- "type": "string"
628
- },
629
- "BudgetSource": {
630
- "description": "Which layer actually determined the enforced budget.\n\nNot derivable from the run row alone (the run does not store the config\ncents or the account default), so we persist it for the UI / audit.",
631
- "enum": [
632
- "system",
633
- "account",
634
- "config",
635
- "run"
636
- ],
637
- "title": "BudgetSource",
638
- "type": "string"
639
- },
640
- "DefaultResolution": {
641
- "description": "How a session that arrived with no explicit config source resolved its\nconfig (documents/eng/DEFAULT_CONFIGS.md \u00a74). Persisted on the session so\naudit and clients can say \"ran under X (repo default)\". A session started\nwith an explicit config/config_id/template_id never enters resolution and\nstores None.",
642
- "enum": [
643
- "repo_default",
644
- "account_default",
645
- "none"
646
- ],
647
- "title": "DefaultResolution",
648
- "type": "string"
649
- },
650
- "DeltaFrame": {
651
- "description": "Fire-and-forget partial assistant output for the current response.\nCarries no sequence number and is never resumable; superseded by the\ncommitted record.",
652
- "properties": {
653
- "agent_turn_id": {
654
- "anyOf": [
655
- {
656
- "type": "string"
657
- },
658
- {
659
- "type": "null"
660
- }
661
- ],
662
- "default": null,
663
- "description": "Identifier of the turn the delta belongs to, if known.",
664
- "title": "Agent Turn Id"
665
- },
666
- "kind": {
667
- "description": "What the partial text is. Known values: text ('thinking' reserved). Open vocabulary: ignore deltas with unknown kinds.",
668
- "type": "string"
669
- },
670
- "output_tokens": {
671
- "anyOf": [
672
- {
673
- "type": "integer"
674
- },
675
- {
676
- "type": "null"
677
- }
678
- ],
679
- "default": null,
680
- "description": "Output tokens generated so far for the current response.",
681
- "title": "Output Tokens"
682
- },
683
- "text": {
684
- "anyOf": [
685
- {
686
- "type": "string"
687
- },
688
- {
689
- "type": "null"
690
- }
691
- ],
692
- "default": null,
693
- "description": "The partial output text.",
694
- "title": "Text"
695
- },
696
- "type": {
697
- "const": "delta",
698
- "default": "delta",
699
- "title": "Type",
700
- "type": "string"
701
- }
702
- },
703
- "required": [
704
- "agent_turn_id",
705
- "kind",
706
- "output_tokens",
707
- "text",
708
- "type"
709
- ],
710
- "title": "DeltaFrame",
711
- "type": "object"
712
- },
713
- "DoneFrame": {
714
- "description": "Terminal marker: the conversation is over, after the final session\nframe carried the end state. Followed by a normal close (1000).",
715
- "properties": {
716
- "type": {
717
- "const": "done",
718
- "default": "done",
719
- "title": "Type",
720
- "type": "string"
721
- }
722
- },
723
- "required": [
724
- "type"
725
- ],
726
- "title": "DoneFrame",
727
- "type": "object"
728
- },
729
- "ErrorFrame": {
730
- "description": "Terminal error marker, sent before the server closes with code 1011.",
731
- "properties": {
732
- "message": {
733
- "description": "A human-readable error message.",
734
- "title": "Message",
735
- "type": "string"
762
+ "title": "Tokens Cache Creation",
763
+ "type": "integer"
736
764
  },
737
- "type": {
738
- "const": "error",
739
- "default": "error",
740
- "title": "Type",
741
- "type": "string"
742
- }
743
- },
744
- "required": [
745
- "message",
746
- "type"
747
- ],
748
- "title": "ErrorFrame",
749
- "type": "object"
750
- },
751
- "GithubAccountSnippet": {
752
- "description": "Sometimes the GitHub API returns a user of github (can include bots)\nusing this snippet instead of the full GithubAccount model. One example,\nis when the API returns a pull request.\n\nThis is the least amount of info we need to represent a GitHub account.",
753
- "properties": {
754
- "avatar_url": {
755
- "title": "Avatar Url",
756
- "type": "string"
765
+ "tokens_cache_read": {
766
+ "default": 0,
767
+ "description": "Tokens read from the prompt cache.",
768
+ "title": "Tokens Cache Read",
769
+ "type": "integer"
757
770
  },
758
- "id": {
759
- "title": "Id",
771
+ "tokens_input": {
772
+ "default": 0,
773
+ "description": "Input tokens used.",
774
+ "title": "Tokens Input",
760
775
  "type": "integer"
761
776
  },
762
- "login": {
763
- "title": "Login",
777
+ "tokens_model": {
778
+ "description": "The model the token counts are attributed to.",
779
+ "title": "Tokens Model",
764
780
  "type": "string"
765
781
  },
766
- "type": {
767
- "$ref": "#/$defs/GithubAccountType"
768
- }
769
- },
770
- "required": [
771
- "avatar_url",
772
- "id",
773
- "login",
774
- "type"
775
- ],
776
- "title": "GithubAccountSnippet",
777
- "type": "object"
778
- },
779
- "GithubAccountType": {
780
- "enum": [
781
- "User",
782
- "Organization",
783
- "Bot",
784
- "Mannequin"
785
- ],
786
- "title": "GithubAccountType",
787
- "type": "string"
788
- },
789
- "Harness": {
790
- "enum": [
791
- "claude_code",
792
- "codex"
793
- ],
794
- "title": "Harness",
795
- "type": "string"
796
- },
797
- "HeartbeatFrame": {
798
- "description": "A keepalive sent after a period of idleness; doubles as the dead-socket\nprobe. Clients should treat roughly twice the heartbeat interval of\nsilence as a dead connection.",
799
- "properties": {
800
- "ts": {
801
- "description": "Server time when the heartbeat was sent.",
782
+ "tokens_output": {
783
+ "default": 0,
784
+ "description": "Output tokens used.",
785
+ "title": "Tokens Output",
786
+ "type": "integer"
787
+ },
788
+ "tokens_total": {
789
+ "default": 0,
790
+ "description": "Total tokens used by the session.",
791
+ "title": "Tokens Total",
792
+ "type": "integer"
793
+ },
794
+ "updated_at": {
795
+ "description": "When the session was last updated.",
802
796
  "format": "date-time",
803
- "title": "Ts",
797
+ "title": "Updated At",
804
798
  "type": "string"
805
799
  },
806
- "type": {
807
- "const": "heartbeat",
808
- "default": "heartbeat",
809
- "title": "Type",
810
- "type": "string"
811
- }
812
- },
813
- "required": [
814
- "ts",
815
- "type"
816
- ],
817
- "title": "HeartbeatFrame",
818
- "type": "object"
819
- },
820
- "ParentKind": {
821
- "description": "How a session relates to its predecessor (parent_agent_session_id) \u2014\nthe ONE \"preceded-by\" chain for every predecessor relationship. Routing\nreads this when the distinction matters.\n\nCONTINUATION \u2014 a follow-up in the same conversation surface (e.g. a Slack\nthread reply spawning a fresh session on the same thread).\nHANDOFF \u2014 a session started to take over work from another surface (e.g.\nlaptop \u2192 cloud handoff; later phase).\nRESUME \u2014 a conversation re-hosted on a new box after its sandbox was torn\ndown (interactive platform; later phase).",
822
- "enum": [
823
- "continuation",
824
- "handoff",
825
- "resume"
826
- ],
827
- "title": "ParentKind",
828
- "type": "string"
829
- },
830
- "PromptBlockedReason": {
831
- "description": "Why direct prompting is refused. Absent when prompting is allowed.",
832
- "enum": [
833
- "mention_surface",
834
- "ephemeral_trigger",
835
- "non_interactive",
836
- "harness_single_turn",
837
- "closed",
838
- "laptop"
839
- ],
840
- "title": "PromptBlockedReason",
841
- "type": "string"
842
- },
843
- "RecordsAppendFrame": {
844
- "description": "Cursored append-only delivery of session records, ordered by feed_seq,\nfrom all sources. Every record in the frame advances the resume cursor \u2014\nincluding ones a client renders as nothing.",
845
- "properties": {
846
- "records": {
847
- "description": "New session records, ordered by feed_seq.",
848
- "items": {
849
- "$ref": "#/$defs/SessionRecordWire"
850
- },
851
- "title": "Records",
852
- "type": "array"
800
+ "webhook_id": {
801
+ "anyOf": [
802
+ {
803
+ "type": "string"
804
+ },
805
+ {
806
+ "type": "null"
807
+ }
808
+ ],
809
+ "default": null,
810
+ "description": "Identifier of the webhook event that triggered the session, if any.",
811
+ "title": "Webhook Id"
853
812
  },
854
- "type": {
855
- "const": "records_append",
856
- "default": "records_append",
857
- "title": "Type",
858
- "type": "string"
813
+ "webhook_type": {
814
+ "anyOf": [
815
+ {
816
+ "$ref": "#/$defs/WebhookType"
817
+ },
818
+ {
819
+ "type": "null"
820
+ }
821
+ ],
822
+ "default": null,
823
+ "description": "Type of the webhook event that triggered the session, if any."
859
824
  }
860
825
  },
861
826
  "required": [
862
- "records",
863
- "type"
827
+ "attributed_user",
828
+ "attribution_id",
829
+ "attribution_type",
830
+ "client_version",
831
+ "config_id",
832
+ "config_override",
833
+ "context_repository",
834
+ "cost_fee",
835
+ "cost_sandbox_cpu",
836
+ "cost_sandbox_memory",
837
+ "cost_tokens",
838
+ "created_at",
839
+ "default_resolution",
840
+ "exit_status",
841
+ "harness",
842
+ "id",
843
+ "last_activity_at",
844
+ "last_message_at",
845
+ "live_summary",
846
+ "metadata",
847
+ "output_prs",
848
+ "parent_kind",
849
+ "parent_session_id",
850
+ "prompt",
851
+ "prompting",
852
+ "replayed_from_session_id",
853
+ "resolved_budget_cents",
854
+ "resolved_budget_source",
855
+ "sandbox_id",
856
+ "session_key",
857
+ "session_state",
858
+ "source",
859
+ "status",
860
+ "status_reason",
861
+ "stopped_at",
862
+ "stopped_by",
863
+ "stopped_by_user",
864
+ "surface",
865
+ "tokens_cache_creation",
866
+ "tokens_cache_read",
867
+ "tokens_input",
868
+ "tokens_model",
869
+ "tokens_output",
870
+ "tokens_total",
871
+ "updated_at",
872
+ "webhook_id",
873
+ "webhook_type"
864
874
  ],
865
- "title": "RecordsAppendFrame",
875
+ "title": "Session",
866
876
  "type": "object"
867
877
  },
868
- "RunStatus": {
869
- "description": "What the current (or most recent) execution is doing (backs `run`).",
870
- "enum": [
871
- "scheduled",
872
- "starting",
873
- "working",
874
- "waiting",
875
- "done",
876
- "failed",
877
- "stopped",
878
- "cancelled",
879
- "retrying"
880
- ],
881
- "title": "RunStatus",
882
- "type": "string"
883
- },
884
878
  "SessionFrame": {
885
879
  "description": "A last-writer-wins snapshot of the session \u2014 the only way status,\nstate, and cost updates arrive. Resent whole on any field change.",
886
880
  "properties": {
887
881
  "session": {
888
- "$ref": "#/$defs/AgentSessionWire",
882
+ "$ref": "#/$defs/Session",
889
883
  "description": "The session's current state."
890
884
  },
891
885
  "type": {
@@ -912,22 +906,9 @@
912
906
  "title": "SessionLiveness",
913
907
  "type": "string"
914
908
  },
915
- "SessionMessageStatus": {
916
- "enum": [
917
- "pending",
918
- "delivered"
919
- ],
920
- "title": "SessionMessageStatus",
921
- "type": "string"
922
- },
923
- "SessionMessageWire": {
909
+ "SessionMessage": {
924
910
  "description": "One message in a session's inbox: what a queued message renders and\nretires on. The webhook provenance internals stay off the wire.",
925
911
  "properties": {
926
- "agent_session_id": {
927
- "description": "Identifier of the session the message belongs to.",
928
- "title": "Agent Session Id",
929
- "type": "string"
930
- },
931
912
  "author": {
932
913
  "anyOf": [
933
914
  {
@@ -1022,13 +1003,17 @@
1022
1003
  "default": null,
1023
1004
  "description": "Kind of principal that sent the message, if attributed."
1024
1005
  },
1006
+ "session_id": {
1007
+ "description": "Identifier of the session the message belongs to.",
1008
+ "title": "Session Id",
1009
+ "type": "string"
1010
+ },
1025
1011
  "status": {
1026
1012
  "$ref": "#/$defs/SessionMessageStatus",
1027
1013
  "description": "Delivery status of the message."
1028
1014
  }
1029
1015
  },
1030
1016
  "required": [
1031
- "agent_session_id",
1032
1017
  "author",
1033
1018
  "body",
1034
1019
  "created_at",
@@ -1038,11 +1023,20 @@
1038
1023
  "id",
1039
1024
  "sender_attribution_id",
1040
1025
  "sender_attribution_type",
1026
+ "session_id",
1041
1027
  "status"
1042
1028
  ],
1043
- "title": "SessionMessageWire",
1029
+ "title": "SessionMessage",
1044
1030
  "type": "object"
1045
1031
  },
1032
+ "SessionMessageStatus": {
1033
+ "enum": [
1034
+ "pending",
1035
+ "delivered"
1036
+ ],
1037
+ "title": "SessionMessageStatus",
1038
+ "type": "string"
1039
+ },
1046
1040
  "SessionPrompting": {
1047
1041
  "description": "The prompt-affordance projection. `enabled` answers \"would a send work\",\nand when it wouldn't, `blocked_reason` + `detail` say why.\n\n`surface_name` is set only for MENTION_SURFACE, naming where to reply.",
1048
1042
  "properties": {
@@ -1095,14 +1089,9 @@
1095
1089
  "title": "SessionPrompting",
1096
1090
  "type": "object"
1097
1091
  },
1098
- "SessionRecordWire": {
1092
+ "SessionRecord": {
1099
1093
  "description": "One entry of a session's log: a stable envelope around the harness's\nnative payload. Internal-only columns are deliberately absent so internal\nmodel evolution stays free.",
1100
1094
  "properties": {
1101
- "agent_session_id": {
1102
- "description": "Identifier of the session the record belongs to.",
1103
- "title": "Agent Session Id",
1104
- "type": "string"
1105
- },
1106
1095
  "agent_turn_id": {
1107
1096
  "anyOf": [
1108
1097
  {
@@ -1187,6 +1176,11 @@
1187
1176
  "title": "Record Type",
1188
1177
  "type": "string"
1189
1178
  },
1179
+ "session_id": {
1180
+ "description": "Identifier of the session the record belongs to.",
1181
+ "title": "Session Id",
1182
+ "type": "string"
1183
+ },
1190
1184
  "session_message_id": {
1191
1185
  "anyOf": [
1192
1186
  {
@@ -1239,7 +1233,6 @@
1239
1233
  }
1240
1234
  },
1241
1235
  "required": [
1242
- "agent_session_id",
1243
1236
  "agent_turn_id",
1244
1237
  "cost",
1245
1238
  "created_at",
@@ -1250,13 +1243,14 @@
1250
1243
  "payload",
1251
1244
  "record_format",
1252
1245
  "record_type",
1246
+ "session_id",
1253
1247
  "session_message_id",
1254
1248
  "source",
1255
1249
  "stream_seq",
1256
1250
  "tokens_info",
1257
1251
  "tools"
1258
1252
  ],
1259
- "title": "SessionRecordWire",
1253
+ "title": "SessionRecord",
1260
1254
  "type": "object"
1261
1255
  },
1262
1256
  "SessionState": {
@@ -1330,7 +1324,7 @@
1330
1324
  "messages": {
1331
1325
  "description": "The session's open (pending) inbox messages.",
1332
1326
  "items": {
1333
- "$ref": "#/$defs/SessionMessageWire"
1327
+ "$ref": "#/$defs/SessionMessage"
1334
1328
  },
1335
1329
  "title": "Messages",
1336
1330
  "type": "array"
@@ -1342,7 +1336,7 @@
1342
1336
  "type": "integer"
1343
1337
  },
1344
1338
  "session": {
1345
- "$ref": "#/$defs/AgentSessionWire",
1339
+ "$ref": "#/$defs/Session",
1346
1340
  "description": "The session's current state."
1347
1341
  },
1348
1342
  "type": {