@ellipsis-dev/sdk 0.9.0 → 0.11.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.
- package/dist/index.d.ts +58 -7
- package/dist/index.js +64 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/stream/index.d.ts +1 -1
- package/dist/{types-CStmnKVu.d.ts → types-DDQQ1Yfh.d.ts} +783 -281
- package/package.json +1 -1
- package/schema/frames.schema.json +291 -196
- package/schema/openapi.v1.json +934 -211
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ellipsis-dev/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "TypeScript SDK for the Ellipsis agents platform: /v1 REST types + client, the session stream WebSocket client, and the session transcript store.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -268,42 +268,13 @@
|
|
|
268
268
|
"Session": {
|
|
269
269
|
"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.",
|
|
270
270
|
"properties": {
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
|
|
274
|
-
"$ref": "#/$defs/GithubAccountSnippet"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"type": "null"
|
|
278
|
-
}
|
|
279
|
-
],
|
|
280
|
-
"default": null,
|
|
281
|
-
"description": "The GitHub user the session is attributed to, when the attribution is a GitHub user."
|
|
271
|
+
"attribution": {
|
|
272
|
+
"$ref": "#/$defs/SessionAttribution",
|
|
273
|
+
"description": "The principal this session is attributed to."
|
|
282
274
|
},
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
|
|
286
|
-
"type": "string"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"type": "null"
|
|
290
|
-
}
|
|
291
|
-
],
|
|
292
|
-
"default": null,
|
|
293
|
-
"description": "Identifier of the principal the session is attributed to.",
|
|
294
|
-
"title": "Attribution Id"
|
|
295
|
-
},
|
|
296
|
-
"attribution_type": {
|
|
297
|
-
"anyOf": [
|
|
298
|
-
{
|
|
299
|
-
"$ref": "#/$defs/AttributionType"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"type": "null"
|
|
303
|
-
}
|
|
304
|
-
],
|
|
305
|
-
"default": null,
|
|
306
|
-
"description": "Kind of principal the session is attributed to (e.g. a GitHub user or an API key)."
|
|
275
|
+
"budget": {
|
|
276
|
+
"$ref": "#/$defs/SessionBudget",
|
|
277
|
+
"description": "The spend budget enforced for this session."
|
|
307
278
|
},
|
|
308
279
|
"client_version": {
|
|
309
280
|
"anyOf": [
|
|
@@ -358,28 +329,9 @@
|
|
|
358
329
|
"description": "The \"owner/name\" repository context the session was started in, if any.",
|
|
359
330
|
"title": "Context Repository"
|
|
360
331
|
},
|
|
361
|
-
"
|
|
362
|
-
"
|
|
363
|
-
"description": "
|
|
364
|
-
"title": "Cost Fee",
|
|
365
|
-
"type": "integer"
|
|
366
|
-
},
|
|
367
|
-
"cost_sandbox_cpu": {
|
|
368
|
-
"default": 0,
|
|
369
|
-
"description": "Sandbox CPU spend in millicents.",
|
|
370
|
-
"title": "Cost Sandbox Cpu",
|
|
371
|
-
"type": "integer"
|
|
372
|
-
},
|
|
373
|
-
"cost_sandbox_memory": {
|
|
374
|
-
"default": 0,
|
|
375
|
-
"description": "Sandbox memory spend in millicents.",
|
|
376
|
-
"title": "Cost Sandbox Memory",
|
|
377
|
-
"type": "integer"
|
|
378
|
-
},
|
|
379
|
-
"cost_tokens": {
|
|
380
|
-
"description": "Token spend in millicents. The session's grand total cost is the sum of cost_tokens, cost_sandbox_cpu, cost_sandbox_memory, and cost_fee.",
|
|
381
|
-
"title": "Cost Tokens",
|
|
382
|
-
"type": "integer"
|
|
332
|
+
"cost": {
|
|
333
|
+
"$ref": "#/$defs/SessionCost",
|
|
334
|
+
"description": "What the session cost, in millicents, broken down by leg and carrying its own total."
|
|
383
335
|
},
|
|
384
336
|
"created_at": {
|
|
385
337
|
"description": "When the session was created.",
|
|
@@ -486,30 +438,9 @@
|
|
|
486
438
|
"description": "Pull requests the session created or updated.",
|
|
487
439
|
"title": "Output Prs"
|
|
488
440
|
},
|
|
489
|
-
"
|
|
490
|
-
"
|
|
491
|
-
|
|
492
|
-
"$ref": "#/$defs/ParentKind"
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
"type": "null"
|
|
496
|
-
}
|
|
497
|
-
],
|
|
498
|
-
"default": null,
|
|
499
|
-
"description": "How this session relates to its parent session, if any."
|
|
500
|
-
},
|
|
501
|
-
"parent_session_id": {
|
|
502
|
-
"anyOf": [
|
|
503
|
-
{
|
|
504
|
-
"type": "string"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"type": "null"
|
|
508
|
-
}
|
|
509
|
-
],
|
|
510
|
-
"default": null,
|
|
511
|
-
"description": "Identifier of the parent session that spawned this one, if any.",
|
|
512
|
-
"title": "Parent Session Id"
|
|
441
|
+
"parent": {
|
|
442
|
+
"$ref": "#/$defs/SessionParent",
|
|
443
|
+
"description": "What preceded this session, if anything."
|
|
513
444
|
},
|
|
514
445
|
"prompt": {
|
|
515
446
|
"anyOf": [
|
|
@@ -528,28 +459,6 @@
|
|
|
528
459
|
"$ref": "#/$defs/SessionPrompting",
|
|
529
460
|
"description": "Whether a client may send this session a message and, when it may not, the reason to show instead of a composer."
|
|
530
461
|
},
|
|
531
|
-
"replayed_from_session_id": {
|
|
532
|
-
"anyOf": [
|
|
533
|
-
{
|
|
534
|
-
"type": "string"
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
"type": "null"
|
|
538
|
-
}
|
|
539
|
-
],
|
|
540
|
-
"default": null,
|
|
541
|
-
"description": "Identifier of the original session this one was replayed from, if it was started via replay.",
|
|
542
|
-
"title": "Replayed From Session Id"
|
|
543
|
-
},
|
|
544
|
-
"resolved_budget_cents": {
|
|
545
|
-
"description": "The spend budget resolved for this session, in cents.",
|
|
546
|
-
"title": "Resolved Budget Cents",
|
|
547
|
-
"type": "integer"
|
|
548
|
-
},
|
|
549
|
-
"resolved_budget_source": {
|
|
550
|
-
"$ref": "#/$defs/BudgetSource",
|
|
551
|
-
"description": "Where the resolved budget came from."
|
|
552
|
-
},
|
|
553
462
|
"sandbox_id": {
|
|
554
463
|
"anyOf": [
|
|
555
464
|
{
|
|
@@ -609,44 +518,9 @@
|
|
|
609
518
|
"description": "Human-readable reason for the current status, when there is one.",
|
|
610
519
|
"title": "Status Reason"
|
|
611
520
|
},
|
|
612
|
-
"
|
|
613
|
-
"
|
|
614
|
-
|
|
615
|
-
"format": "date-time",
|
|
616
|
-
"type": "string"
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
"type": "null"
|
|
620
|
-
}
|
|
621
|
-
],
|
|
622
|
-
"default": null,
|
|
623
|
-
"description": "When a stop was requested, if one was.",
|
|
624
|
-
"title": "Stopped At"
|
|
625
|
-
},
|
|
626
|
-
"stopped_by": {
|
|
627
|
-
"anyOf": [
|
|
628
|
-
{
|
|
629
|
-
"type": "integer"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"type": "null"
|
|
633
|
-
}
|
|
634
|
-
],
|
|
635
|
-
"default": null,
|
|
636
|
-
"description": "GitHub account id of the user who stopped the session, if known.",
|
|
637
|
-
"title": "Stopped By"
|
|
638
|
-
},
|
|
639
|
-
"stopped_by_user": {
|
|
640
|
-
"anyOf": [
|
|
641
|
-
{
|
|
642
|
-
"$ref": "#/$defs/GithubAccountSnippet"
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
"type": "null"
|
|
646
|
-
}
|
|
647
|
-
],
|
|
648
|
-
"default": null,
|
|
649
|
-
"description": "The GitHub user who stopped the session, if it was stopped."
|
|
521
|
+
"stopped": {
|
|
522
|
+
"$ref": "#/$defs/SessionStopped",
|
|
523
|
+
"description": "The stop request, if the session was stopped."
|
|
650
524
|
},
|
|
651
525
|
"surface": {
|
|
652
526
|
"anyOf": [
|
|
@@ -660,40 +534,9 @@
|
|
|
660
534
|
"default": null,
|
|
661
535
|
"description": "The public status projection; null for laptop-synced sessions."
|
|
662
536
|
},
|
|
663
|
-
"
|
|
664
|
-
"
|
|
665
|
-
"description": "
|
|
666
|
-
"title": "Tokens Cache Creation",
|
|
667
|
-
"type": "integer"
|
|
668
|
-
},
|
|
669
|
-
"tokens_cache_read": {
|
|
670
|
-
"default": 0,
|
|
671
|
-
"description": "Tokens read from the prompt cache.",
|
|
672
|
-
"title": "Tokens Cache Read",
|
|
673
|
-
"type": "integer"
|
|
674
|
-
},
|
|
675
|
-
"tokens_input": {
|
|
676
|
-
"default": 0,
|
|
677
|
-
"description": "Input tokens used.",
|
|
678
|
-
"title": "Tokens Input",
|
|
679
|
-
"type": "integer"
|
|
680
|
-
},
|
|
681
|
-
"tokens_model": {
|
|
682
|
-
"description": "The model the token counts are attributed to.",
|
|
683
|
-
"title": "Tokens Model",
|
|
684
|
-
"type": "string"
|
|
685
|
-
},
|
|
686
|
-
"tokens_output": {
|
|
687
|
-
"default": 0,
|
|
688
|
-
"description": "Output tokens used.",
|
|
689
|
-
"title": "Tokens Output",
|
|
690
|
-
"type": "integer"
|
|
691
|
-
},
|
|
692
|
-
"tokens_total": {
|
|
693
|
-
"default": 0,
|
|
694
|
-
"description": "Total tokens used by the session.",
|
|
695
|
-
"title": "Tokens Total",
|
|
696
|
-
"type": "integer"
|
|
537
|
+
"tokens": {
|
|
538
|
+
"$ref": "#/$defs/SessionTokens",
|
|
539
|
+
"description": "The tokens the session spent and the model they went to. `total` includes the prompt-cache lanes."
|
|
697
540
|
},
|
|
698
541
|
"updated_at": {
|
|
699
542
|
"description": "When the session was last updated.",
|
|
@@ -728,17 +571,13 @@
|
|
|
728
571
|
}
|
|
729
572
|
},
|
|
730
573
|
"required": [
|
|
731
|
-
"
|
|
732
|
-
"
|
|
733
|
-
"attribution_type",
|
|
574
|
+
"attribution",
|
|
575
|
+
"budget",
|
|
734
576
|
"client_version",
|
|
735
577
|
"config_id",
|
|
736
578
|
"config_override",
|
|
737
579
|
"context_repository",
|
|
738
|
-
"
|
|
739
|
-
"cost_sandbox_cpu",
|
|
740
|
-
"cost_sandbox_memory",
|
|
741
|
-
"cost_tokens",
|
|
580
|
+
"cost",
|
|
742
581
|
"created_at",
|
|
743
582
|
"default_resolution",
|
|
744
583
|
"exit_status",
|
|
@@ -749,29 +588,18 @@
|
|
|
749
588
|
"live_summary",
|
|
750
589
|
"metadata",
|
|
751
590
|
"output_prs",
|
|
752
|
-
"
|
|
753
|
-
"parent_session_id",
|
|
591
|
+
"parent",
|
|
754
592
|
"prompt",
|
|
755
593
|
"prompting",
|
|
756
|
-
"replayed_from_session_id",
|
|
757
|
-
"resolved_budget_cents",
|
|
758
|
-
"resolved_budget_source",
|
|
759
594
|
"sandbox_id",
|
|
760
595
|
"session_key",
|
|
761
596
|
"session_state",
|
|
762
597
|
"source",
|
|
763
598
|
"status",
|
|
764
599
|
"status_reason",
|
|
765
|
-
"
|
|
766
|
-
"stopped_by",
|
|
767
|
-
"stopped_by_user",
|
|
600
|
+
"stopped",
|
|
768
601
|
"surface",
|
|
769
|
-
"
|
|
770
|
-
"tokens_cache_read",
|
|
771
|
-
"tokens_input",
|
|
772
|
-
"tokens_model",
|
|
773
|
-
"tokens_output",
|
|
774
|
-
"tokens_total",
|
|
602
|
+
"tokens",
|
|
775
603
|
"updated_at",
|
|
776
604
|
"webhook_id",
|
|
777
605
|
"webhook_type"
|
|
@@ -779,6 +607,121 @@
|
|
|
779
607
|
"title": "Session",
|
|
780
608
|
"type": "object"
|
|
781
609
|
},
|
|
610
|
+
"SessionAttribution": {
|
|
611
|
+
"description": "The principal a session is attributed to: what kind, its id, and \u2014 when\nthe kind is a GitHub user \u2014 the resolved display snippet.",
|
|
612
|
+
"properties": {
|
|
613
|
+
"id": {
|
|
614
|
+
"anyOf": [
|
|
615
|
+
{
|
|
616
|
+
"type": "string"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"type": "null"
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"default": null,
|
|
623
|
+
"description": "Identifier of the principal the session is attributed to.",
|
|
624
|
+
"title": "Id"
|
|
625
|
+
},
|
|
626
|
+
"type": {
|
|
627
|
+
"anyOf": [
|
|
628
|
+
{
|
|
629
|
+
"$ref": "#/$defs/AttributionType"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"type": "null"
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
"default": null,
|
|
636
|
+
"description": "Kind of principal the session is attributed to (e.g. a GitHub user or an API key)."
|
|
637
|
+
},
|
|
638
|
+
"user": {
|
|
639
|
+
"anyOf": [
|
|
640
|
+
{
|
|
641
|
+
"$ref": "#/$defs/GithubAccountSnippet"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"type": "null"
|
|
645
|
+
}
|
|
646
|
+
],
|
|
647
|
+
"default": null,
|
|
648
|
+
"description": "The GitHub user the session is attributed to, resolved at read time. Null when the attribution is not a GitHub user."
|
|
649
|
+
}
|
|
650
|
+
},
|
|
651
|
+
"required": [
|
|
652
|
+
"id",
|
|
653
|
+
"type",
|
|
654
|
+
"user"
|
|
655
|
+
],
|
|
656
|
+
"title": "SessionAttribution",
|
|
657
|
+
"type": "object"
|
|
658
|
+
},
|
|
659
|
+
"SessionBudget": {
|
|
660
|
+
"description": "The spend budget actually enforced for this session, and which layer of\nthe cascade set it.",
|
|
661
|
+
"properties": {
|
|
662
|
+
"cents": {
|
|
663
|
+
"default": 0,
|
|
664
|
+
"description": "The spend budget resolved for this session, in cents.",
|
|
665
|
+
"title": "Cents",
|
|
666
|
+
"type": "integer"
|
|
667
|
+
},
|
|
668
|
+
"source": {
|
|
669
|
+
"$ref": "#/$defs/BudgetSource",
|
|
670
|
+
"default": "account",
|
|
671
|
+
"description": "Where the resolved budget came from."
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"required": [
|
|
675
|
+
"cents",
|
|
676
|
+
"source"
|
|
677
|
+
],
|
|
678
|
+
"title": "SessionBudget",
|
|
679
|
+
"type": "object"
|
|
680
|
+
},
|
|
681
|
+
"SessionCost": {
|
|
682
|
+
"description": "What a session (or one turn of it) cost, in millicents.\n\n`llm` is deliberately NOT called `tokens`: it would sit beside the `tokens`\nobject and read as \"the token count's cost\" rather than \"the cost of the\nLLM leg\".",
|
|
683
|
+
"properties": {
|
|
684
|
+
"fee": {
|
|
685
|
+
"default": 0,
|
|
686
|
+
"description": "Platform fee in millicents.",
|
|
687
|
+
"title": "Fee",
|
|
688
|
+
"type": "integer"
|
|
689
|
+
},
|
|
690
|
+
"llm": {
|
|
691
|
+
"default": 0,
|
|
692
|
+
"description": "LLM spend in millicents.",
|
|
693
|
+
"title": "Llm",
|
|
694
|
+
"type": "integer"
|
|
695
|
+
},
|
|
696
|
+
"sandbox_cpu": {
|
|
697
|
+
"default": 0,
|
|
698
|
+
"description": "Sandbox CPU spend in millicents.",
|
|
699
|
+
"title": "Sandbox Cpu",
|
|
700
|
+
"type": "integer"
|
|
701
|
+
},
|
|
702
|
+
"sandbox_memory": {
|
|
703
|
+
"default": 0,
|
|
704
|
+
"description": "Sandbox memory spend in millicents.",
|
|
705
|
+
"title": "Sandbox Memory",
|
|
706
|
+
"type": "integer"
|
|
707
|
+
},
|
|
708
|
+
"total": {
|
|
709
|
+
"default": 0,
|
|
710
|
+
"description": "The grand total in millicents: llm + sandbox_cpu + sandbox_memory + fee.",
|
|
711
|
+
"title": "Total",
|
|
712
|
+
"type": "integer"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"required": [
|
|
716
|
+
"fee",
|
|
717
|
+
"llm",
|
|
718
|
+
"sandbox_cpu",
|
|
719
|
+
"sandbox_memory",
|
|
720
|
+
"total"
|
|
721
|
+
],
|
|
722
|
+
"title": "SessionCost",
|
|
723
|
+
"type": "object"
|
|
724
|
+
},
|
|
782
725
|
"SessionExitStatus": {
|
|
783
726
|
"description": "Why a terminal agent session ended \u2014 a finer-grained reason than `status`.\n\n`status` (SessionStatus) is the lifecycle state: COMPLETED / ERROR /\nCANCELLED. `exit_status` explains *why* a run reached that terminal state, so\nthe UI and metrics can tell a budget cutoff apart from a crashed tool call or\na deliberate cancellation. It is None until the run reaches a terminal state.",
|
|
784
727
|
"enum": [
|
|
@@ -960,6 +903,56 @@
|
|
|
960
903
|
"title": "SessionMessageStatus",
|
|
961
904
|
"type": "string"
|
|
962
905
|
},
|
|
906
|
+
"SessionParent": {
|
|
907
|
+
"description": "The ONE \"preceded-by\" chain: the predecessor session and how this one\nrelates to it. Not a parent that orchestrates children \u2014 a session never\nspawns sub-sessions.",
|
|
908
|
+
"properties": {
|
|
909
|
+
"kind": {
|
|
910
|
+
"anyOf": [
|
|
911
|
+
{
|
|
912
|
+
"$ref": "#/$defs/ParentKind"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"type": "null"
|
|
916
|
+
}
|
|
917
|
+
],
|
|
918
|
+
"default": null,
|
|
919
|
+
"description": "How this session relates to its parent session, if any."
|
|
920
|
+
},
|
|
921
|
+
"replayed_from_session_id": {
|
|
922
|
+
"anyOf": [
|
|
923
|
+
{
|
|
924
|
+
"type": "string"
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
"type": "null"
|
|
928
|
+
}
|
|
929
|
+
],
|
|
930
|
+
"default": null,
|
|
931
|
+
"description": "Identifier of the original session this one was replayed from, if it was started via replay.",
|
|
932
|
+
"title": "Replayed From Session Id"
|
|
933
|
+
},
|
|
934
|
+
"session_id": {
|
|
935
|
+
"anyOf": [
|
|
936
|
+
{
|
|
937
|
+
"type": "string"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"type": "null"
|
|
941
|
+
}
|
|
942
|
+
],
|
|
943
|
+
"default": null,
|
|
944
|
+
"description": "Identifier of the parent session that spawned this one, if any.",
|
|
945
|
+
"title": "Session Id"
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
"required": [
|
|
949
|
+
"kind",
|
|
950
|
+
"replayed_from_session_id",
|
|
951
|
+
"session_id"
|
|
952
|
+
],
|
|
953
|
+
"title": "SessionParent",
|
|
954
|
+
"type": "object"
|
|
955
|
+
},
|
|
963
956
|
"SessionPr": {
|
|
964
957
|
"description": "A pull request this session created, denormalized at capture time so\nsession surfaces render a labeled link without joining gh_prs. Live PR\nstate (open/merged/closed) is not stored here \u2014 read it from gh_prs where\na view needs it.",
|
|
965
958
|
"properties": {
|
|
@@ -1263,6 +1256,57 @@
|
|
|
1263
1256
|
"title": "SessionStatus",
|
|
1264
1257
|
"type": "string"
|
|
1265
1258
|
},
|
|
1259
|
+
"SessionStopped": {
|
|
1260
|
+
"description": "The stop request, if there was one: when, by which GitHub account id,\nand that account resolved to a display snippet.",
|
|
1261
|
+
"properties": {
|
|
1262
|
+
"at": {
|
|
1263
|
+
"anyOf": [
|
|
1264
|
+
{
|
|
1265
|
+
"format": "date-time",
|
|
1266
|
+
"type": "string"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"type": "null"
|
|
1270
|
+
}
|
|
1271
|
+
],
|
|
1272
|
+
"default": null,
|
|
1273
|
+
"description": "When a stop was requested, if one was.",
|
|
1274
|
+
"title": "At"
|
|
1275
|
+
},
|
|
1276
|
+
"by": {
|
|
1277
|
+
"anyOf": [
|
|
1278
|
+
{
|
|
1279
|
+
"type": "integer"
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
"type": "null"
|
|
1283
|
+
}
|
|
1284
|
+
],
|
|
1285
|
+
"default": null,
|
|
1286
|
+
"description": "GitHub account id of the user who stopped the session, if known.",
|
|
1287
|
+
"title": "By"
|
|
1288
|
+
},
|
|
1289
|
+
"by_user": {
|
|
1290
|
+
"anyOf": [
|
|
1291
|
+
{
|
|
1292
|
+
"$ref": "#/$defs/GithubAccountSnippet"
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
"type": "null"
|
|
1296
|
+
}
|
|
1297
|
+
],
|
|
1298
|
+
"default": null,
|
|
1299
|
+
"description": "The GitHub user who stopped the session, resolved at read time."
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
"required": [
|
|
1303
|
+
"at",
|
|
1304
|
+
"by",
|
|
1305
|
+
"by_user"
|
|
1306
|
+
],
|
|
1307
|
+
"title": "SessionStopped",
|
|
1308
|
+
"type": "object"
|
|
1309
|
+
},
|
|
1266
1310
|
"SessionSurface": {
|
|
1267
1311
|
"description": "The three fields we expose. All `None` for an un-keyed (laptop) session.\n\n`use_enum_values=True` (from CustomBaseModel) stores the members as their\nstring values, so this serializes to `{\"session\": \"alive\", \"run\": \"waiting\",\n\"status\": \"waiting\"}` \u2014 a plain object, not enum names.",
|
|
1268
1312
|
"properties": {
|
|
@@ -1306,6 +1350,57 @@
|
|
|
1306
1350
|
"title": "SessionSurface",
|
|
1307
1351
|
"type": "object"
|
|
1308
1352
|
},
|
|
1353
|
+
"SessionTokens": {
|
|
1354
|
+
"description": "The token counts a session (or turn) spent, and the model they went to.\n\n`total` INCLUDES the cache lanes, unlike the old flat `tokens_total` which\ncounted input+output+thinking only and left callers to add cache reads and\nwrites back themselves (the deleted `tokensTotalAll` helper). Cache tokens\ndominate an agent run's token bill, so a \"total\" that omits them is the\nwrong default and produced two competing totals in the dashboard.",
|
|
1355
|
+
"properties": {
|
|
1356
|
+
"cache_creation": {
|
|
1357
|
+
"default": 0,
|
|
1358
|
+
"description": "Tokens written to the prompt cache.",
|
|
1359
|
+
"title": "Cache Creation",
|
|
1360
|
+
"type": "integer"
|
|
1361
|
+
},
|
|
1362
|
+
"cache_read": {
|
|
1363
|
+
"default": 0,
|
|
1364
|
+
"description": "Tokens read from the prompt cache.",
|
|
1365
|
+
"title": "Cache Read",
|
|
1366
|
+
"type": "integer"
|
|
1367
|
+
},
|
|
1368
|
+
"input": {
|
|
1369
|
+
"default": 0,
|
|
1370
|
+
"description": "Input tokens used.",
|
|
1371
|
+
"title": "Input",
|
|
1372
|
+
"type": "integer"
|
|
1373
|
+
},
|
|
1374
|
+
"model": {
|
|
1375
|
+
"default": "",
|
|
1376
|
+
"description": "The model the token counts are attributed to.",
|
|
1377
|
+
"title": "Model",
|
|
1378
|
+
"type": "string"
|
|
1379
|
+
},
|
|
1380
|
+
"output": {
|
|
1381
|
+
"default": 0,
|
|
1382
|
+
"description": "Output tokens used.",
|
|
1383
|
+
"title": "Output",
|
|
1384
|
+
"type": "integer"
|
|
1385
|
+
},
|
|
1386
|
+
"total": {
|
|
1387
|
+
"default": 0,
|
|
1388
|
+
"description": "Total tokens consumed, INCLUDING the prompt-cache reads and writes \u2014 the same basis the token cost is priced on.",
|
|
1389
|
+
"title": "Total",
|
|
1390
|
+
"type": "integer"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
"required": [
|
|
1394
|
+
"cache_creation",
|
|
1395
|
+
"cache_read",
|
|
1396
|
+
"input",
|
|
1397
|
+
"model",
|
|
1398
|
+
"output",
|
|
1399
|
+
"total"
|
|
1400
|
+
],
|
|
1401
|
+
"title": "SessionTokens",
|
|
1402
|
+
"type": "object"
|
|
1403
|
+
},
|
|
1309
1404
|
"SnapshotFrame": {
|
|
1310
1405
|
"description": "The first frame after the stream connects: the session plus its open\ninbox. Records always arrive separately via records_append frames.",
|
|
1311
1406
|
"properties": {
|