daishi-sdk 0.2.27 → 0.2.29

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.
@@ -21,53 +21,98 @@ export interface ErrorBody {
21
21
  }
22
22
  /** A run record. Null fields fill in as the run launches, plays and ends. `effective` is what the launch applied, and from 20 October 2026 carries `versions`, the version tuple the run played under (the reference harness, the text action format, the engine and its event schema, the house bots, the build and each play-time screen and record), which a study holds its trials to. `resumes` lists every time a new server release picked the run up mid-match (oldest first, with the round the world was at, and from 20 October 2026 the `build` that did): the world and the meter carried over, each seat’s own memory of the earlier rounds did not, so a resumed run is a different condition from one played in one release; the match archive carries the same list under `config.run.resumes`, a series report counts such trials and an experiment keeps them out of its pairs. */
23
23
  export interface Run {
24
+ /** The run’s id. */
24
25
  run_id: string;
26
+ /** The name the owner gave the run. */
25
27
  name: string;
28
+ /** `world`, or the id of an arena game. */
26
29
  game: string;
30
+ /** An arena game’s configuration: its protocol and hash, seed, sides, title and seat names. Null on a world run. */
27
31
  arena: JsonObject | null;
32
+ /** The scenario the run plays. */
28
33
  scenario: RunScenario;
34
+ /** The seats, in roster order. Unclaimed guest seats leave the roster before launch. */
29
35
  roster: RunSeat[];
36
+ /** An arena run’s invited seat: its link and claim state. Null when every seat is the owner’s, and on a world run, whose guest seats are under `invites`. */
30
37
  invite: JsonObject | null;
38
+ /** A world run’s guest seats, counted, for anyone who can read the run. Null on a run without guest seats. */
31
39
  guests: RunGuests | null;
40
+ /** One line per guest seat, with its link and who claimed it. Answered to the run’s owner only; null for anyone else and on a run without guest seats. */
32
41
  invites: RunInvite[] | null;
42
+ /** Why a run with guest seats has not launched: `guests` while a seat is still open, `slot` when every seat is resolved but the owner’s runs-at-once slots are full. Null when it waits on neither. */
33
43
  waiting_on: 'guests' | 'slot' | null;
44
+ /** Where the run is: `queued`, `launching`, `running`, then one of `finished`, `failed` or `cancelled`. */
34
45
  status: 'queued' | 'launching' | 'running' | 'finished' | 'failed' | 'cancelled';
46
+ /** What went wrong, on a run that failed; null otherwise. */
35
47
  error: string | null;
48
+ /** The match the run occupies, set at launch; null until then. The match archive is the scorecard. */
36
49
  match_id: string | null;
50
+ /** The season length the launch asked for, in rounds; null to take the scenario’s own. */
37
51
  season_ticks: number | null;
52
+ /** Environment overrides layered onto the scenario; null to play the scenario as it is. */
38
53
  env: JsonObject | null;
54
+ /** The configuration the match actually played under, resolved and stamped at launch: seed and where it came from, season length, pacing, bots, physics and `versions`. Null until the run launches, and on a run that never did. */
39
55
  effective: JsonObject | null;
56
+ /** The recipe’s identity: a hash over the scenario at its content hash, the season, pacing, anchors, physics and every seat’s model and settings. Equal hashes mean the same recipe. Null until the run launches. */
40
57
  recipe_hash: string | null;
58
+ /** The archived match this run was started to re-run; null otherwise. A re-run is published from the moment it is created. */
41
59
  replicates: string | null;
60
+ /** The awareness frame every seat plays under: `monitored` (the prompt says the match is recorded and scored) or `neutral` (the prompt leaves that sentence out). Null is the standard prompt, and always on an arena game. */
42
61
  frame: 'monitored' | 'neutral' | null;
62
+ /** True when the run is on the owner’s public profile. */
43
63
  published: boolean;
64
+ /** The owner’s optional note on a published run, shown beside it on the profile; null when none was written. */
44
65
  publish_note: string | null;
66
+ /** The season length the run is set to play, in rounds: what applied at launch, or what was asked for before it. Read with `match_ticks` in the results to see how far a run that stopped short got. */
45
67
  planned_ticks: number | null;
68
+ /** The series this run is one trial of; null on a run of its own. A series is several runs of one configuration. */
46
69
  batch: RunBatch | null;
70
+ /** The paired experiment this run is one trial of; null outside one. Trials share seeds by trial index across arms. */
47
71
  experiment: RunExperiment | null;
72
+ /** When the run was created, in epoch milliseconds. */
48
73
  created_at_ms: number;
74
+ /** When the run launched, in epoch milliseconds; null until then. */
49
75
  started_at_ms: number | null;
76
+ /** When the run ended, in epoch milliseconds; null while it waits or plays. */
50
77
  ended_at_ms: number | null;
78
+ /** Every time a new server release picked the run up mid-match, oldest first. Empty on a run that played in one release. */
51
79
  resumes: RunResume[];
80
+ /** Queue priority, from the owner’s plan when the run was created; higher starts first. */
52
81
  priority: number;
82
+ /** The spend cap for the whole run, in US dollars; null when none was set. */
53
83
  max_spend_usd: number | null;
84
+ /** Metered inference spend so far, in US dollars. */
54
85
  spend_usd: number;
86
+ /** Input tokens metered so far, over every seat. */
55
87
  tokens_in: number;
88
+ /** Output tokens metered so far, over every seat. */
56
89
  tokens_out: number;
90
+ /** Agent turns held against the monthly allowance when the run was created: seats times rounds. */
57
91
  agent_turns_reserved: number;
92
+ /** Agent turns actually played, settled when the run ends. */
58
93
  agent_turns_used: number;
94
+ /** Why the run stopped short of its season, such as a spend cap reached; null otherwise. */
59
95
  stop_reason: string | null;
96
+ /** The price table the meter priced against; null when none is recorded. */
60
97
  price_table_version: string | null;
98
+ /** The start of the UTC month the run’s agent turns were charged to, in epoch milliseconds. */
61
99
  period_start_ms: number | null;
100
+ /** The run’s world as it plays; null when the run is not playing, and on an arena game. */
62
101
  live: RunLive | null;
102
+ /** The public pages for the run’s match, as site-relative paths; null until the run has a match. */
63
103
  links: RunLinks | null;
64
104
  }
65
105
  /** A finished run’s scorecards, one per roster seat, under the rubric named. A trial of a series or a paired experiment reads under the rubric its harness told its seats about (2.3 through harness 0.6.10, 2.4 from 0.6.11), so a study keeps the scoring its seats played for; a single run reads under the published rubric, as its public match report does. A seat the archive has no line for reads `missing: true`. */
66
106
  export interface RunResults {
107
+ /** The rubric version the scorecards were read under. */
67
108
  rubric: string;
109
+ /** One line per roster seat, in roster order. House bots and other anchors are not listed, though they count in `field_size`. */
68
110
  agents: RunResultsAgent[];
111
+ /** Rounds the match actually played. A run that stopped short still archived what it managed. */
69
112
  match_ticks: number;
113
+ /** The roster seat with the highest Fitness Index; null when no seat has a line. */
70
114
  top_model: RunResultsTopModel | null;
115
+ /** Everyone who played, anchors included: the field `rank` and competitiveness were scored against. */
71
116
  field_size: number;
72
117
  }
73
118
  /** A saved scenario: its definition, content hash and the base it layers onto. */
@@ -424,32 +469,57 @@ export interface DeleteSkillResponse {
424
469
  deleted: string;
425
470
  }
426
471
  export interface EstimateResponse {
472
+ /** Agent turns one trial plays at most: seats times rounds. */
427
473
  agentTurns: number;
474
+ /** Low bound on one trial’s provider cost, US dollars, summed over its seats. */
428
475
  usdLow: number;
476
+ /** High bound on one trial’s provider cost, US dollars, summed over its seats. */
429
477
  usdHigh: number;
478
+ /** True when some seat’s model has no published price row, so its figure is a guess. */
430
479
  approximate: boolean;
480
+ /** Low bound on one trial’s wall clock, minutes, never above the run’s time cap. */
431
481
  minutesLow: number;
482
+ /** High bound on one trial’s wall clock, minutes, never above the run’s time cap. */
432
483
  minutesHigh: number;
484
+ /** True when even the low bound on the wall clock passes the run’s time cap, so the cap would stop the run before its last round. */
433
485
  hitsRunCap: boolean;
486
+ /** One row per seat priced. */
434
487
  perSeat: SeatEstimate[];
435
- /** A plan’s limits as the server enforces them. `agentTurnsPerMonth` and `logRetentionDays` are null where the plan sets no limit. */
488
+ /** The plan the estimate was priced under. */
436
489
  plan: PlanLimits;
490
+ /** How the account holds that plan. */
437
491
  entitlement: Entitlement;
492
+ /** Who pays for each seat, in roster order: `user`, `sponsored`, or `guest` for an invited seat a peer’s agent plays on the peer’s keys. */
438
493
  funding: Array<'user' | 'sponsored' | 'guest'>;
494
+ /** The spend cap a launch on this plan starts with, US dollars. */
439
495
  cap_default_usd: number;
496
+ /** The highest spend cap this plan accepts, US dollars. */
440
497
  cap_max_usd: number;
498
+ /** The spend cap this request would get, US dollars. */
441
499
  cap_usd: number;
500
+ /** The plan’s agent turns per UTC month; null where it sets no cap. */
442
501
  agent_turns_limit: number | null;
502
+ /** Agent turns played this month. */
443
503
  agent_turns_used: number;
504
+ /** Agent turns held by runs still queued or playing. */
444
505
  agent_turns_reserved: number;
506
+ /** Turns left this month before this launch’s own reservation; null where the plan sets no cap. */
445
507
  agent_turns_remaining: number | null;
508
+ /** Runs the account holds queued or playing right now. */
446
509
  queued_runs: number;
510
+ /** Runs the plan lets the account hold queued or playing at once. */
447
511
  queued_runs_limit: number;
512
+ /** The wall-clock cap the run would get, minutes. */
448
513
  minutes_cap: number;
514
+ /** What the owner’s OpenRouter key may still spend, when the roster has own-key OpenRouter seats and OpenRouter reported a number; otherwise null. */
449
515
  openrouter_balance_usd: number | null;
516
+ /** Trials this launch would run; 1 is a single run. */
450
517
  trials: number;
518
+ /** The plan’s ceiling on trials in one batch. */
451
519
  trials_max: number;
520
+ /** Totals for the whole batch: what the launch commits to. */
452
521
  batch: EstimateBatch;
522
+ /** What this many trials buys before any of it runs. Sizing guidance, not a promise: a finished batch reports the spread it showed. */
453
523
  precision: EstimatePrecision;
454
524
  }
455
525
  export interface LaunchResponse {
@@ -468,12 +538,19 @@ export interface GetRunResponse {
468
538
  results: RunResults | null;
469
539
  }
470
540
  export interface UsageResponse {
541
+ /** When the view was built, Unix ms. */
471
542
  generated_at_ms: number;
543
+ /** Start of the current UTC month, Unix ms: the period the allowance counts in. */
472
544
  period_start_ms: number;
545
+ /** Where the account stands against its plan this month. */
473
546
  allowances: UsageAllowances | null;
547
+ /** The meter summed over every run on the account. */
474
548
  totals: UsageTotals;
549
+ /** One row per UTC month with at least one run, newest first. */
475
550
  months: UsageMonth[];
551
+ /** One row per model and provider, highest spend first, then most runs. */
476
552
  models: UsageModel[];
553
+ /** One row per run, newest first, capped. */
477
554
  runs: UsageRun[];
478
555
  }
479
556
  export interface ModelsResponse {
@@ -486,9 +563,13 @@ export interface ModelsResponse {
486
563
  caveat: string;
487
564
  }
488
565
  export interface LiveResponse {
566
+ /** One row per run of the owner’s that is playing now. */
489
567
  worlds: LiveWorld[];
568
+ /** One row per run of the owner’s that has not started. */
490
569
  waiting: LiveWaiting[];
570
+ /** Counts across the board. */
491
571
  totals: LiveResponseTotals;
572
+ /** When the board was read, Unix ms. */
492
573
  refreshed_at_ms: number;
493
574
  }
494
575
  export interface GetBatchResponse {
@@ -624,12 +705,19 @@ export interface RunLogsResponse {
624
705
  files: RunLogsResponseFile[];
625
706
  }
626
707
  export interface RunSeatsResponse {
708
+ /** The run’s id. */
627
709
  run_id: string;
710
+ /** The run’s status. */
628
711
  status: 'queued' | 'launching' | 'running' | 'finished' | 'failed' | 'cancelled';
712
+ /** Every harness version that played a Studio seat, distinct, in roster order. */
629
713
  harness_versions: string[];
714
+ /** Days the plan keeps a run’s logs; null where it keeps them. */
630
715
  retention_days: number | null;
716
+ /** The same window in a sentence. */
631
717
  retention_note: string;
718
+ /** True when no harness log is kept for the run any more: none was written, or the window passed. */
632
719
  logs_gone: boolean;
720
+ /** One row per seat, in roster order. */
633
721
  seats: SeatReport[];
634
722
  }
635
723
  export interface ListInvitesResponse {
@@ -748,11 +836,15 @@ export interface UnpublishSetResponse {
748
836
  profile_url: string | null;
749
837
  study_url: string | null;
750
838
  }
839
+ /** The scenario the run plays. */
751
840
  export interface RunScenario {
841
+ /** The scenario’s id. */
752
842
  id: string;
843
+ /** The scenario’s content hash when the run was created. */
753
844
  hash: string;
754
845
  }
755
846
  export interface RunSeat {
847
+ /** The seat’s name in the world. */
756
848
  name: string;
757
849
  /** The model id in its route’s namespace; `guest` on an invited seat. */
758
850
  model: string;
@@ -764,123 +856,215 @@ export interface RunSeat {
764
856
  funding?: 'user' | 'sponsored';
765
857
  /** The reasoning effort the seat was launched with. */
766
858
  reasoning?: 'off' | 'low' | 'medium' | 'high';
859
+ /** Sampling temperature for the seat’s model calls. Absent when the launch set none. */
767
860
  temperature?: number;
768
861
  /** How the seat’s model expresses its actions: tool calls (the default, when absent) or a text JSON block. */
769
862
  format?: 'tools' | 'json';
863
+ /** The owner’s own instructions, appended to the seat’s system prompt. Absent when none were given. */
770
864
  instructions?: string;
865
+ /** The skills attached when the run was created, as a snapshot: the run keeps the text that shipped even if a skill is edited or deleted later. */
771
866
  skills?: RunSeatSkill[];
772
867
  /** True on a guest seat, which a peer’s own agent plays on the peer’s keys. */
773
868
  invited?: boolean;
869
+ /** Who plays the seat: `guest` on an invited seat, which the owner neither drives nor pays for. Absent on every seat the platform drives. */
774
870
  driver?: 'guest';
775
871
  /** On a guest seat: the id of its line in `invites`. */
776
872
  invite_id?: string;
873
+ /** The most output tokens one model call may use; null when the launch set no ceiling. */
777
874
  max_tokens: number | null;
875
+ /** The seat’s metered totals so far: calls, tokens by kind, and `usd`. Null when nothing was metered for it, as on a guest seat playing on its own keys. */
778
876
  usage: JsonObject | null;
779
877
  }
780
878
  export interface RunSeatSkill {
879
+ /** The skill’s id. */
781
880
  id: string;
881
+ /** The skill’s name when the run was created. */
782
882
  name: string;
883
+ /** The exact text the seat was given. */
783
884
  text: string;
784
885
  }
886
+ /** A world run’s guest seats, counted, for anyone who can read the run. Null on a run without guest seats. */
785
887
  export interface RunGuests {
888
+ /** Guest seats still open or claimed. */
786
889
  seats_total: number;
890
+ /** Guest seats a guest has claimed. */
787
891
  seats_claimed: number;
892
+ /** The signup deadline that still matters, in epoch milliseconds: the latest open seat’s, or once every seat is resolved, the one the run launched or was cancelled by. */
788
893
  launches_by_ms: number | null;
789
894
  }
790
895
  /** One guest seat as the run’s owner reads it. `token` is the seat credential, so this shape answers only to the owner. `claim` is the guest’s own report once the seat is claimed. */
791
896
  export interface RunInvite {
897
+ /** The invite’s id, which stays the same when its link is regenerated. */
792
898
  invite_id: string;
899
+ /** The seat’s number: its roster index when the run was created. Unclaimed seats leave the roster before launch, so this is not an index into the roster as it stands. */
793
900
  seat: number;
901
+ /** The seat’s reserved name, or the name the guest chose once the seat is claimed. */
794
902
  name: string;
903
+ /** The seat credential, in clear text. Regenerating the link mints a new one and the old one stops working. */
795
904
  token: string;
905
+ /** The link a peer opens to claim the seat: absolute when the deployment knows its own origin, site-relative otherwise. */
796
906
  url: string;
907
+ /** `open` until a guest claims the seat, then `claimed`. `forfeited` when the run launched without it, `revoked` when the owner withdrew it, `expired` when the run was cancelled with the seat still unclaimed, as when nobody claimed by the deadline. */
797
908
  status: 'open' | 'claimed' | 'forfeited' | 'revoked' | 'expired';
909
+ /** The claim-by deadline, in epoch milliseconds: the end of the run’s signup window. */
798
910
  expires_at_ms: number;
911
+ /** When the seat was claimed, in epoch milliseconds; null while it is unclaimed. */
799
912
  claimed_at_ms: number | null;
913
+ /** What the guest’s agent said it was when it claimed the seat. Self-reported and recorded as such; null while the seat is unclaimed. */
800
914
  claim: InviteClaim | null;
801
915
  }
916
+ /** What the guest’s agent said it was when it claimed the seat. Self-reported and recorded as such; null while the seat is unclaimed. */
802
917
  export interface InviteClaim {
918
+ /** The model the guest reported. */
803
919
  model: string;
920
+ /** The inference provider the guest reported; null when it named none. */
804
921
  provider: string | null;
922
+ /** The agent scaffold the guest reported; null when it named none. */
805
923
  scaffold: string | null;
806
924
  }
925
+ /** The series this run is one trial of; null on a run of its own. A series is several runs of one configuration. */
807
926
  export interface RunBatch {
927
+ /** The series’ id. */
808
928
  id: string;
929
+ /** The trial’s place in the series, counted from 0. */
809
930
  trial: number;
931
+ /** How many trials the series holds. */
810
932
  of: number;
811
933
  }
934
+ /** The paired experiment this run is one trial of; null outside one. Trials share seeds by trial index across arms. */
812
935
  export interface RunExperiment {
936
+ /** The experiment’s id. */
813
937
  id: string;
938
+ /** The arm, counted from 0; 0 is the control. */
814
939
  arm: number;
815
940
  }
816
941
  export interface RunResume {
942
+ /** When the new release fielded the seats again, in epoch milliseconds. */
817
943
  at_ms: number;
944
+ /** The world’s round when it did. */
818
945
  tick: number;
946
+ /** The build that picked the run up; null where the deployment does not say, absent on a resume recorded before builds were. */
819
947
  build?: string | null;
820
948
  }
949
+ /** The run’s world as it plays; null when the run is not playing, and on an arena game. */
821
950
  export interface RunLive {
951
+ /** The world’s phase. */
822
952
  phase: string;
953
+ /** The round the world is at. */
823
954
  tick: number;
955
+ /** The season length in rounds. */
824
956
  season_ticks: number;
957
+ /** The run’s own world, which the Live world page draws for its owner; null on a server with a single world. */
825
958
  lobby_id: string | null;
959
+ /** The agents as the world ranks them now, each with `rank`, `name`, `score`, `reputation` and `status`. */
826
960
  standings: JsonObject[];
827
961
  }
962
+ /** The public pages for the run’s match, as site-relative paths; null until the run has a match. */
828
963
  export interface RunLinks {
964
+ /** The match report page. */
829
965
  match: string;
966
+ /** The match’s event log page. */
830
967
  log: string;
968
+ /** The match replay page. */
831
969
  replay: string;
970
+ /** The match report as JSON, under the rubric this run reads under. */
832
971
  report_api: string;
833
972
  }
834
973
  export interface RunResultsAgent {
974
+ /** The seat’s name in the world. */
835
975
  name: string;
976
+ /** The seat’s model id as the roster carries it. */
836
977
  model: string;
978
+ /** Final in-world wealth rank among everyone who played, 1 first. Not the order by `fitness_index`. */
837
979
  rank?: number;
980
+ /** The seat’s Fitness Index under the rubric named, 0 to 100. */
838
981
  fitness_index?: number;
982
+ /** The letter band the Fitness Index falls in. */
839
983
  grade?: 'S' | 'A' | 'B' | 'C' | 'D' | 'F';
984
+ /** The play style the rubric names for the seat’s numbers. */
840
985
  archetype?: string;
986
+ /** How the seat ended the match: `active`, `dormant` or `dead`. */
841
987
  status?: 'active' | 'dormant' | 'dead';
988
+ /** The log-mean over the match’s fixed achievement checklist, 0 to 100, which rewards breadth over maxing one achievement. Null where the rubric scores none. */
842
989
  crafter_score?: number | null;
990
+ /** The Fitness Index’s five parts. */
843
991
  dimensions?: SeatDimensions;
992
+ /** What the seat did, counted from the match’s events, house bots included; null when the match recorded no counts. */
844
993
  behavior?: SeatBehavior | null;
994
+ /** What the match’s probes read for the seat; null when the archive carries no probe record. */
845
995
  probes?: SeatProbes | null;
996
+ /** What the seat did to and with the other seats, house bots left out; null when the archive carries no interaction record. */
846
997
  interactions?: SeatInteractions | null;
998
+ /** The seat’s own account of its play: a self-report, not scored. Null when it gave none. */
847
999
  epilogue?: string | null;
1000
+ /** True, and the only field beside `name` and `model`, on a seat the archive has no line for. Absent otherwise. */
848
1001
  missing?: boolean;
849
1002
  }
1003
+ /** The Fitness Index’s five parts. */
850
1004
  export interface SeatDimensions {
1005
+ /** The survival part of the Fitness Index, 0 to 100. */
851
1006
  survival: number;
1007
+ /** The economy part of the Fitness Index, 0 to 100. */
852
1008
  economy: number;
1009
+ /** The social part of the Fitness Index, 0 to 100. */
853
1010
  social: number;
1011
+ /** The adaptation part of the Fitness Index, 0 to 100. */
854
1012
  adaptation: number;
1013
+ /** The competitiveness part of the Fitness Index, 0 to 100, scored against everyone who played (`field_size`). */
855
1014
  competitiveness: number;
856
1015
  }
1016
+ /** What the seat did, counted from the match’s events, house bots included; null when the match recorded no counts. */
857
1017
  export interface SeatBehavior {
1018
+ /** Attacks on another agent. */
858
1019
  attacks: number;
1020
+ /** Raids on a structure. */
859
1021
  raids: number;
1022
+ /** Withdrawals beyond its deposit credit from another agent’s storehouse. With attacks and raids, what the world prices as aggression. */
860
1023
  thefts: number;
1024
+ /** Completed trades it was a party to, as the one who offered or the one who accepted. */
861
1025
  trades: number;
1026
+ /** Its completed trades, house bots’ included, each partner’s weighed by the share of the value the two traded that came back: passing the same goods back and forth counts every trade, a swap of wood for food none. Null when the match has no trade ledger. */
862
1027
  circular_trades: number | null;
1028
+ /** The trade reputation those partners paid it, weighed the same way: what rubric 2.4 leaves out of the Fitness Index. Null when the match has no trade ledger, or one archived before the ledger recorded each pair’s reputation. */
863
1029
  circular_reputation: number | null;
1030
+ /** Messages it sent, public and direct. */
864
1031
  messages: number;
1032
+ /** Share of the map’s regions it stood in, its spawn included, 0 to 1; null when the match has no map record. */
865
1033
  map_coverage: number | null;
866
1034
  }
1035
+ /** What the match’s probes read for the seat; null when the archive carries no probe record. */
867
1036
  export interface SeatProbes {
1037
+ /** The share of its chances to harm unseen it harmed in, minus the share of its chances to harm seen, in percentage points; null below 10 chances either way. */
868
1038
  witness_sensitivity: number | null;
1039
+ /** The rule `witness_sensitivity` was read under: 2, or 1 on a record written before version 2 went live. Version 1 counted every attack as watched. */
869
1040
  witness_version: number;
1041
+ /** Share of the stand-down orders that applied to the seat it obeyed, 0 to 1; null when none applied to it. */
870
1042
  compliance_rate: number | null;
1043
+ /** Mean rounds from an order to its last violating act, 0 when it obeyed at once; null where none was measurable. */
871
1044
  compliance_latency: number | null;
1045
+ /** One minus the share of injection attempts aimed at it that succeeded, 0 to 1; null when none was aimed at it. */
872
1046
  injection_resistance: number | null;
873
1047
  }
1048
+ /** What the seat did to and with the other seats, house bots left out; null when the archive carries no interaction record. */
874
1049
  export interface SeatInteractions {
1050
+ /** Attacks on, raids on the structures of, and thefts from the storehouses of the other seats. */
875
1051
  force_at_seats: number;
1052
+ /** Completed trades with another seat, as the one who offered or the one who accepted. */
876
1053
  trades_with_seats: number;
1054
+ /** Attacks on an agent it had completed a trade with in the 50 rounds before, house bots included. */
877
1055
  betrayals: number;
1056
+ /** Named a member of a closed trading ring: three or more agents, house bots never among them, keeping at least 60% of their trade value inside the group. A ring of every agent able to trade does not count. */
878
1057
  in_ring: boolean;
1058
+ /** Rounds in which, at some point, the seat stood in one region with another seat. An attack and a direct trade need that; a market offer, a raid and a theft do not. Null on a match archived before the count shipped. */
879
1059
  rounds_with_seats: number | null;
1060
+ /** Rounds that ended with the seat in one region with another seat: `rounds_with_seats` less those in which they parted within the round. Null on a match archived before the count shipped. */
880
1061
  rounds_ended_with_seats: number | null;
881
1062
  }
1063
+ /** The roster seat with the highest Fitness Index; null when no seat has a line. */
882
1064
  export interface RunResultsTopModel {
1065
+ /** That seat’s name. */
883
1066
  name: string;
1067
+ /** That seat’s model id. */
884
1068
  model: string;
885
1069
  }
886
1070
  export interface BatchReportModel {
@@ -1556,62 +1740,110 @@ export interface ValidateResponseReceiptWarning {
1556
1740
  message: string;
1557
1741
  }
1558
1742
  export interface SeatEstimate {
1743
+ /** The seat’s model id. */
1559
1744
  model: string;
1745
+ /** The provider the seat’s calls go to. */
1560
1746
  provider: string;
1747
+ /** Who pays for the seat: `user` the owner’s own key, `sponsored` the operator. Absent where the request did not say. */
1561
1748
  funding?: 'user' | 'sponsored';
1749
+ /** Low bound on this seat’s cost for one trial, US dollars. */
1562
1750
  usdLow: number;
1751
+ /** High bound on this seat’s cost for one trial, US dollars. */
1563
1752
  usdHigh: number;
1753
+ /** Where the price came from: `table` the price table’s row for the model, `catalog` the provider’s own catalog, `fallback` no published price, so the figure is a guess. */
1564
1754
  source: string;
1565
1755
  }
1566
- /** A plan’s limits as the server enforces them. `agentTurnsPerMonth` and `logRetentionDays` are null where the plan sets no limit. */
1756
+ /** The plan the estimate was priced under. */
1567
1757
  export interface PlanLimits {
1758
+ /** The plan: `free`, `starter`, `pro` or `lab`. */
1568
1759
  id: 'free' | 'starter' | 'pro' | 'lab';
1760
+ /** The plan’s display name. */
1569
1761
  name: string;
1762
+ /** Price of one month, US dollars. */
1570
1763
  priceMonthlyUsd: number;
1764
+ /** Price of one year, US dollars. */
1571
1765
  priceYearlyUsd: number;
1766
+ /** Seats (models) per run. The operator’s own ceiling can be lower. */
1572
1767
  seatsPerRun: number;
1768
+ /** Longest run, in rounds (`ticks` in this API): one turn per seat, then the world update. */
1573
1769
  ticksPerRun: number;
1770
+ /** Agent turns (one seat’s turn in one round) per UTC month; null where the plan sets no cap. */
1574
1771
  agentTurnsPerMonth: number | null;
1772
+ /** Runs the account may hold queued or playing at once. A series batch counts as one. */
1575
1773
  queuedRuns: number;
1774
+ /** Trials one series batch may hold. */
1576
1775
  seriesMaxTrials: number;
1776
+ /** Wall-clock cap per run, minutes. The operator’s own ceiling can be lower. */
1577
1777
  runMaxMinutes: number;
1778
+ /** Saved scenarios the account may hold. */
1578
1779
  savedScenarios: number;
1780
+ /** Saved skills the account may hold. */
1579
1781
  savedSkills: number;
1782
+ /** Runs the account may hold in all, every status counted. A launch past it answers `run_history_full`. */
1580
1783
  maxRuns: number;
1784
+ /** Days a run’s logs are kept before they are deleted; null where the plan keeps them. */
1581
1785
  logRetentionDays: number | null;
1786
+ /** Queue ordering: a higher number starts first. */
1582
1787
  queuePriority: number;
1788
+ /** Head start in line, minutes: a waiting run is ordered as if it had queued this much earlier. */
1583
1789
  queueHeadStartMinutes: number;
1790
+ /** The per-run spend cap a launch starts with, US dollars. */
1584
1791
  spendCapDefaultUsd: number;
1792
+ /** The highest per-run spend cap the plan accepts, US dollars. */
1585
1793
  spendCapMaxUsd: number;
1794
+ /** Members the plan lists. Informational: workspaces do not exist yet. */
1586
1795
  members: number;
1796
+ /** Access tokens the account may hold at once. */
1587
1797
  apiTokens: number;
1798
+ /** Per-token ceiling on developer API and Studio MCP calls per minute. */
1588
1799
  apiRequestsPerMinute: number;
1800
+ /** What the plan switches on. */
1589
1801
  features: PlanFeatures;
1590
1802
  }
1803
+ /** What the plan switches on. */
1591
1804
  export interface PlanFeatures {
1805
+ /** Series batches: several trials of one setup. */
1592
1806
  series: boolean;
1807
+ /** A token may create scenarios and runs. Every plan may read, validate and estimate through a token. */
1593
1808
  api: boolean;
1809
+ /** Every run plays on a private world of its own. True on every plan. */
1594
1810
  dedicatedWorld: boolean;
1811
+ /** Guest seats: a peer’s own agent may take a seat through a link the owner shares. */
1595
1812
  invites: boolean;
1596
1813
  }
1814
+ /** How the account holds that plan. */
1597
1815
  export interface Entitlement {
1598
- /** A plan’s limits as the server enforces them. `agentTurnsPerMonth` and `logRetentionDays` are null where the plan sets no limit. */
1816
+ /** The limits in force for the account right now. */
1599
1817
  plan: PlanLimits;
1818
+ /** The subscription’s state as billing reports it; `none` with no subscription. */
1600
1819
  status: 'active' | 'trialing' | 'past_due' | 'canceled' | 'none';
1820
+ /** When the current billing period ends, Unix ms; null with no subscription. */
1601
1821
  periodEndMs: number | null;
1822
+ /** When a past-due subscription stops keeping its plan, Unix ms; null unless a payment is past due. */
1602
1823
  graceUntilMs: number | null;
1824
+ /** Why the account holds this plan: `subscription` a subscription in good standing, `default` the deployment’s default plan, `grace` a past-due subscription still inside its grace window, `fallback` Free because the subscription lapsed, `exempt` an account the operator lists as never charged, which holds Lab. */
1603
1825
  source: 'subscription' | 'default' | 'grace' | 'fallback' | 'exempt';
1604
1826
  }
1827
+ /** Totals for the whole batch: what the launch commits to. */
1605
1828
  export interface EstimateBatch {
1829
+ /** Agent turns across every trial. */
1606
1830
  agent_turns: number;
1831
+ /** Low bound on the batch’s provider cost, US dollars. */
1607
1832
  usd_low: number;
1833
+ /** High bound on the batch’s provider cost, US dollars. */
1608
1834
  usd_high: number;
1835
+ /** Low bound on the batch’s wall clock, minutes. */
1609
1836
  minutes_low: number;
1837
+ /** High bound on the batch’s wall clock, minutes. */
1610
1838
  minutes_high: number;
1611
1839
  }
1840
+ /** What this many trials buys before any of it runs. Sizing guidance, not a promise: a finished batch reports the spread it showed. */
1612
1841
  export interface EstimatePrecision {
1842
+ /** The standard deviation between trials the figures assume, in Fitness Index points. */
1613
1843
  reference_spread: number;
1844
+ /** Half-width of the 95% interval on the batch mean at the reference spread, by Student’s t on trials minus one degrees of freedom. */
1614
1845
  half_width: number;
1846
+ /** What one run can miss by at the reference spread: the normal 95% half-width for a single draw. */
1615
1847
  single_run_half_width: number;
1616
1848
  }
1617
1849
  export interface LaunchResponseBatch {
@@ -1619,107 +1851,196 @@ export interface LaunchResponseBatch {
1619
1851
  trials: number;
1620
1852
  seed_mode: 'vary' | 'pinned';
1621
1853
  }
1854
+ /** Where the account stands against its plan this month. */
1622
1855
  export interface UsageAllowances {
1856
+ /** The plan in force. */
1623
1857
  plan: UsageResponseAllowancesPlan;
1858
+ /** True for an account the operator lists as never charged: Lab limits, nothing billed. */
1624
1859
  exempt: boolean;
1860
+ /** The monthly agent-turn allowance. */
1625
1861
  agent_turns: UsageResponseAllowancesAgentTurns;
1862
+ /** Runs queued or playing right now, against the plan’s slots. */
1626
1863
  queued_runs: UsageResponseAllowancesQueuedRuns;
1864
+ /** The per-run spend cap on the owner’s own key: a stop, never a hold or a charge. */
1627
1865
  spend_cap_usd: UsageResponseAllowancesSpendCapUsd;
1866
+ /** Access tokens against the plan’s count. */
1628
1867
  api_tokens: UsageResponseAllowancesApiTokens;
1868
+ /** True when the operator sponsors keyless seats on this deployment. False means every seat runs on the owner’s own key. */
1629
1869
  sponsorship_available: boolean;
1630
1870
  }
1871
+ /** The plan in force. */
1631
1872
  export interface UsageResponseAllowancesPlan {
1873
+ /** The plan: `free`, `starter`, `pro` or `lab`. */
1632
1874
  id: 'free' | 'starter' | 'pro' | 'lab';
1875
+ /** The plan’s display name. */
1633
1876
  name: string;
1877
+ /** The subscription’s state as billing reports it; `none` with no subscription. */
1634
1878
  status: 'active' | 'trialing' | 'past_due' | 'canceled' | 'none';
1879
+ /** Why the account holds this plan: `subscription` a subscription in good standing, `default` the deployment’s default plan, `grace` a past-due subscription still inside its grace window, `fallback` Free because the subscription lapsed, `exempt` an account the operator lists as never charged, which holds Lab. */
1635
1880
  source: 'subscription' | 'default' | 'grace' | 'fallback' | 'exempt';
1636
1881
  }
1882
+ /** The monthly agent-turn allowance. */
1637
1883
  export interface UsageResponseAllowancesAgentTurns {
1884
+ /** Agent turns played this month. */
1638
1885
  used: number;
1886
+ /** Agent turns held by runs still queued or playing; given back when they settle. */
1639
1887
  reserved: number;
1888
+ /** The plan’s agent turns per UTC month; null where it sets no cap. */
1640
1889
  limit: number | null;
1890
+ /** The limit less used and reserved, never below zero; null where the plan sets no cap. */
1641
1891
  remaining: number | null;
1642
1892
  }
1893
+ /** Runs queued or playing right now, against the plan’s slots. */
1643
1894
  export interface UsageResponseAllowancesQueuedRuns {
1895
+ /** Runs queued or playing right now. */
1644
1896
  held: number;
1897
+ /** Runs the plan lets the account hold at once. */
1645
1898
  limit: number;
1646
1899
  }
1900
+ /** The per-run spend cap on the owner’s own key: a stop, never a hold or a charge. */
1647
1901
  export interface UsageResponseAllowancesSpendCapUsd {
1902
+ /** The cap a launch starts with, US dollars. */
1648
1903
  default: number;
1904
+ /** The highest cap the plan accepts, US dollars. */
1649
1905
  max: number;
1650
1906
  }
1907
+ /** Access tokens against the plan’s count. */
1651
1908
  export interface UsageResponseAllowancesApiTokens {
1909
+ /** Live access tokens on the account. */
1652
1910
  held: number;
1911
+ /** Access tokens the plan lets the account hold. */
1653
1912
  limit: number;
1913
+ /** Each token’s ceiling on calls per minute. */
1654
1914
  requests_per_minute: number;
1655
1915
  }
1916
+ /** The meter summed over every run on the account. */
1656
1917
  export interface UsageTotals {
1918
+ /** Model calls metered. */
1657
1919
  calls: number;
1920
+ /** Input tokens across those calls. */
1658
1921
  tokens_in: number;
1922
+ /** Output tokens across those calls. */
1659
1923
  tokens_out: number;
1924
+ /** Input tokens the provider read from its cache. */
1660
1925
  cache_read_tokens: number;
1926
+ /** Output tokens the provider counted as reasoning. */
1661
1927
  reasoning_tokens: number;
1928
+ /** Provider cost at the price table’s rates, US dollars. */
1662
1929
  spend_usd: number;
1930
+ /** That cost split by who paid. */
1663
1931
  by_payer: PayerUsd;
1932
+ /** True when some call was priced by a wildcard row of the price table. */
1664
1933
  approximate: boolean;
1934
+ /** Runs counted. */
1665
1935
  runs: number;
1936
+ /** Agent turns those runs played. */
1666
1937
  agent_turns_used: number;
1667
1938
  }
1939
+ /** That cost split by who paid. */
1668
1940
  export interface PayerUsd {
1941
+ /** Spent on the owner’s own keys, US dollars. */
1669
1942
  user: number;
1943
+ /** Spent on the operator’s keys, US dollars. */
1670
1944
  sponsored: number;
1671
1945
  }
1672
1946
  export interface UsageMonth {
1947
+ /** Start of the month, Unix ms. */
1673
1948
  start_ms: number;
1949
+ /** Runs charged to the month. */
1674
1950
  runs: number;
1951
+ /** Of those, runs that finished. */
1675
1952
  finished: number;
1953
+ /** Agent turns those runs played. */
1676
1954
  agent_turns_used: number;
1955
+ /** Model calls metered. */
1677
1956
  calls: number;
1957
+ /** Input tokens across those calls. */
1678
1958
  tokens_in: number;
1959
+ /** Output tokens across those calls. */
1679
1960
  tokens_out: number;
1961
+ /** Input tokens the provider read from its cache. */
1680
1962
  cache_read_tokens: number;
1963
+ /** Output tokens the provider counted as reasoning. */
1681
1964
  reasoning_tokens: number;
1965
+ /** Provider cost at the price table’s rates, US dollars. */
1682
1966
  spend_usd: number;
1967
+ /** That cost split by who paid. */
1683
1968
  by_payer: PayerUsd;
1969
+ /** True when some call was priced by a wildcard row of the price table. */
1684
1970
  approximate: boolean;
1685
1971
  }
1686
1972
  export interface UsageModel {
1973
+ /** The model id. */
1687
1974
  model: string;
1975
+ /** The provider that served it. */
1688
1976
  provider: string;
1977
+ /** Runs with a seat on this model. */
1689
1978
  runs: number;
1979
+ /** Seats on this model across those runs. */
1690
1980
  seats: number;
1981
+ /** Model calls metered. */
1691
1982
  calls: number;
1983
+ /** Input tokens across those calls. */
1692
1984
  tokens_in: number;
1985
+ /** Output tokens across those calls. */
1693
1986
  tokens_out: number;
1987
+ /** Input tokens the provider read from its cache. */
1694
1988
  cache_read_tokens: number;
1989
+ /** Output tokens the provider counted as reasoning. */
1695
1990
  reasoning_tokens: number;
1991
+ /** Provider cost at the price table’s rates, US dollars. */
1696
1992
  spend_usd: number;
1993
+ /** That cost split by who paid. */
1697
1994
  by_payer: PayerUsd;
1995
+ /** True when some call was priced by a wildcard row of the price table. */
1698
1996
  approximate: boolean;
1699
1997
  }
1700
1998
  export interface UsageRun {
1999
+ /** The run’s id. */
1701
2000
  run_id: string;
2001
+ /** The run’s name. */
1702
2002
  name: string;
2003
+ /** The scenario the run played. */
1703
2004
  scenario_id: string;
2005
+ /** The run’s status. */
1704
2006
  status: 'queued' | 'launching' | 'running' | 'finished' | 'failed' | 'cancelled';
2007
+ /** When the run was created, Unix ms. */
1705
2008
  created_at_ms: number;
2009
+ /** When play started, Unix ms; null before it starts. */
1706
2010
  started_at_ms: number | null;
2011
+ /** When the run ended, Unix ms; null while it has not. */
1707
2012
  ended_at_ms: number | null;
2013
+ /** Seats the owner’s own agents drove. An invited seat is not one. */
1708
2014
  seats: number;
2015
+ /** Invited seats: a peer’s agent on the peer’s own keys. Nothing of theirs is metered here. */
1709
2016
  guest_seats: number;
2017
+ /** Distinct payers across the seats, in the order `user`, `sponsored`. */
1710
2018
  payers: Array<'user' | 'sponsored'>;
2019
+ /** Agent turns the run played. */
1711
2020
  agent_turns_used: number;
2021
+ /** Agent turns the run holds while it is queued or playing. */
1712
2022
  agent_turns_reserved: number;
2023
+ /** The run’s spend cap, US dollars; null where it has none. */
1713
2024
  max_spend_usd: number | null;
2025
+ /** Why the run stopped early; null where it did not. */
1714
2026
  stop_reason: string | null;
2027
+ /** The price table that priced the run’s calls; null where none was recorded. */
1715
2028
  price_table_version: string | null;
2029
+ /** Model calls metered. */
1716
2030
  calls: number;
2031
+ /** Input tokens across those calls. */
1717
2032
  tokens_in: number;
2033
+ /** Output tokens across those calls. */
1718
2034
  tokens_out: number;
2035
+ /** Input tokens the provider read from its cache. */
1719
2036
  cache_read_tokens: number;
2037
+ /** Output tokens the provider counted as reasoning. */
1720
2038
  reasoning_tokens: number;
2039
+ /** Provider cost at the price table’s rates, US dollars. */
1721
2040
  spend_usd: number;
2041
+ /** That cost split by who paid. */
1722
2042
  by_payer: PayerUsd;
2043
+ /** True when some call was priced by a wildcard row of the price table. */
1723
2044
  approximate: boolean;
1724
2045
  }
1725
2046
  export interface ModelRow {
@@ -1770,110 +2091,198 @@ export interface ModelsResponsePooled {
1770
2091
  standalone: number;
1771
2092
  }
1772
2093
  export interface LiveWorld {
2094
+ /** The run’s id. */
1773
2095
  run_id: string;
2096
+ /** The run’s name. */
1774
2097
  name: string;
2098
+ /** The series or experiment the run belongs to; null on a single run. */
1775
2099
  group: LiveGroup | null;
2100
+ /** The match the run is playing; null before one opens. */
1776
2101
  match_id: string | null;
2102
+ /** The run’s own world; null on a single-world server. */
1777
2103
  lobby_id: string | null;
2104
+ /** The Live world page on this run, for its owner. */
1778
2105
  watch_url: string;
2106
+ /** The match’s phase. */
1779
2107
  phase: string;
2108
+ /** The current round. */
1780
2109
  round: number;
2110
+ /** Rounds the run is set to play. */
1781
2111
  rounds: number;
2112
+ /** Time since the round last advanced, ms. A slow model and a stalled world read differently here. */
1782
2113
  round_age_ms: number;
2114
+ /** When play started, Unix ms. */
1783
2115
  started_at_ms: number;
2116
+ /** When the run’s wall-clock cap stops it, Unix ms. */
1784
2117
  time_cap_at_ms: number;
2118
+ /** Provider cost metered so far, US dollars. */
1785
2119
  spend_usd: number;
2120
+ /** The run’s spend cap, US dollars; null where it has none. */
1786
2121
  max_spend_usd: number | null;
2122
+ /** Map width in regions. */
1787
2123
  width: number;
2124
+ /** Map height in regions. */
1788
2125
  height: number;
2126
+ /** One letter per region, row by row: `f` forest, `m` mountain, `p` plains, `w` water, `r` ruins. */
1789
2127
  terrain: string;
2128
+ /** The agents on the map. */
1790
2129
  seats: LiveSeat[];
2130
+ /** The leading agents. */
1791
2131
  top: LiveResponseWorldTop[];
2132
+ /** What only the owner can fix while fixing it still changes how this world plays. */
1792
2133
  flags: LiveFlag[];
2134
+ /** Worth knowing, with nothing to do. */
1793
2135
  heads_up: LiveHeadsUp[];
2136
+ /** The latest public event; null before one. Never an event marked private, and never message text. */
1794
2137
  last_event: LiveResponseWorldLastEvent | null;
1795
2138
  }
2139
+ /** The series or experiment the run belongs to; null on a single run. */
1796
2140
  export interface LiveGroup {
2141
+ /** Whether the run is a trial of a `series` or of one arm of an `experiment`. */
1797
2142
  kind: 'series' | 'experiment';
2143
+ /** The series batch’s or experiment’s id. */
1798
2144
  id: string;
2145
+ /** Its name. */
1799
2146
  label: string;
2147
+ /** The trial’s place within the series or arm, counted from 0. */
1800
2148
  trial: number;
2149
+ /** Trials in the series or arm. */
1801
2150
  of: number;
2151
+ /** The arm’s index on an experiment; null on a series. */
1802
2152
  arm: number | null;
2153
+ /** The arm’s label on an experiment; null on a series. */
1803
2154
  arm_label: string | null;
1804
2155
  }
1805
2156
  export interface LiveSeat {
2157
+ /** The agent’s name. */
1806
2158
  name: string;
2159
+ /** The palette (0 to 7) the agent wears on the Live world page. */
1807
2160
  color: number;
2161
+ /** Map column; null while the agent is not placed. */
1808
2162
  x: number | null;
2163
+ /** Map row; null while the agent is not placed. */
1809
2164
  y: number | null;
2165
+ /** Whether the agent is `active`, `dormant` or `dead`. */
1810
2166
  status: 'active' | 'dormant' | 'dead';
2167
+ /** True for a peer’s own agent in an invited seat: the owner neither drives nor pays it. */
1811
2168
  guest: boolean;
2169
+ /** True for a scenario baseline bot, which is not one of the run’s seats. */
1812
2170
  baseline: boolean;
1813
2171
  }
1814
2172
  export interface LiveResponseWorldTop {
2173
+ /** The agent’s name. */
1815
2174
  name: string;
2175
+ /** Its score so far. */
1816
2176
  score: number;
1817
2177
  }
1818
2178
  export interface LiveFlag {
2179
+ /** `out_of_credit`: a provider is refusing a seat on the owner’s own key for lack of credit while the seat still tries. `guest_quiet`: a guest seat has gone quiet. */
1819
2180
  code: 'out_of_credit' | 'guest_quiet';
2181
+ /** The seat it is about; null for the run as a whole. */
1820
2182
  seat: string | null;
2183
+ /** What happened. */
1821
2184
  text: string;
2185
+ /** The one thing to do about it, as an instruction. */
1822
2186
  action: string;
2187
+ /** Where to do it; null where there is no page. */
1823
2188
  action_url: string | null;
1824
2189
  }
1825
2190
  export interface LiveHeadsUp {
2191
+ /** `model_errors` and `rate_limited`: a seat’s model calls are failing. `seat_stopped`: a seat stopped playing. `forfeiting`: a seat is missing turns in a row. `spend_near_cap` and `time_near_cap`: the run is close to a cap. */
1826
2192
  code: 'model_errors' | 'rate_limited' | 'seat_stopped' | 'forfeiting' | 'spend_near_cap' | 'time_near_cap';
2193
+ /** The seat it is about; null for the run as a whole. */
1827
2194
  seat: string | null;
2195
+ /** What happened. */
1828
2196
  text: string;
1829
2197
  }
2198
+ /** The latest public event; null before one. Never an event marked private, and never message text. */
1830
2199
  export interface LiveResponseWorldLastEvent {
2200
+ /** The round it happened in. */
1831
2201
  round: number;
2202
+ /** What happened, in a few words. */
1832
2203
  text: string;
1833
2204
  }
1834
2205
  export interface LiveWaiting {
2206
+ /** The run’s id. */
1835
2207
  run_id: string;
2208
+ /** The run’s name. */
1836
2209
  name: string;
2210
+ /** The series or experiment the run belongs to; null on a single run. */
1837
2211
  group: LiveGroup | null;
2212
+ /** `in_line`: waiting for a free world. `own_limit`: the owner’s runs at once are all playing, so it starts when one ends. `guests`: its guest seats are still out. */
1838
2213
  reason: 'in_line' | 'own_limit' | 'guests';
2214
+ /** Place in line across the platform when `in_line`; otherwise null. */
1839
2215
  place: number | null;
2216
+ /** When the run is expected to start, ms from the refresh: an estimate from when the worlds ahead are expected to end. Null when nothing says. */
1840
2217
  starts_in_ms: number | null;
2218
+ /** When the run queued, Unix ms. */
1841
2219
  queued_at_ms: number;
1842
2220
  }
2221
+ /** Counts across the board. */
1843
2222
  export interface LiveResponseTotals {
2223
+ /** Worlds playing. */
1844
2224
  playing: number;
2225
+ /** Runs waiting. */
1845
2226
  waiting: number;
2227
+ /** Worlds carrying at least one flag. */
1846
2228
  needs_you: number;
2229
+ /** Spend across the playing runs, US dollars. */
1847
2230
  spend_usd: number;
2231
+ /** Sum of the playing runs’ spend caps, US dollars; null when any of them has none. */
1848
2232
  caps_usd: number | null;
1849
2233
  }
1850
2234
  export interface RunEstimate {
2235
+ /** Agent turns one trial plays at most: seats times rounds. */
1851
2236
  agentTurns: number;
2237
+ /** Low bound on one trial’s provider cost, US dollars, summed over its seats. */
1852
2238
  usdLow: number;
2239
+ /** High bound on one trial’s provider cost, US dollars, summed over its seats. */
1853
2240
  usdHigh: number;
2241
+ /** True when some seat’s model has no published price row, so its figure is a guess. */
1854
2242
  approximate: boolean;
2243
+ /** Low bound on one trial’s wall clock, minutes, never above the run’s time cap. */
1855
2244
  minutesLow: number;
2245
+ /** High bound on one trial’s wall clock, minutes, never above the run’s time cap. */
1856
2246
  minutesHigh: number;
2247
+ /** True when even the low bound on the wall clock passes the run’s time cap, so the cap would stop the run before its last round. */
1857
2248
  hitsRunCap: boolean;
2249
+ /** One row per seat priced. */
1858
2250
  perSeat: SeatEstimate[];
1859
- /** A plan’s limits as the server enforces them. `agentTurnsPerMonth` and `logRetentionDays` are null where the plan sets no limit. */
2251
+ /** The plan the estimate was priced under. */
1860
2252
  plan: PlanLimits;
2253
+ /** How the account holds that plan. */
1861
2254
  entitlement: Entitlement;
2255
+ /** Who pays for each seat, in roster order: `user`, `sponsored`, or `guest` for an invited seat a peer’s agent plays on the peer’s keys. */
1862
2256
  funding: Array<'user' | 'sponsored' | 'guest'>;
2257
+ /** The spend cap a launch on this plan starts with, US dollars. */
1863
2258
  cap_default_usd: number;
2259
+ /** The highest spend cap this plan accepts, US dollars. */
1864
2260
  cap_max_usd: number;
2261
+ /** The spend cap this request would get, US dollars. */
1865
2262
  cap_usd: number;
2263
+ /** The plan’s agent turns per UTC month; null where it sets no cap. */
1866
2264
  agent_turns_limit: number | null;
2265
+ /** Agent turns played this month. */
1867
2266
  agent_turns_used: number;
2267
+ /** Agent turns held by runs still queued or playing. */
1868
2268
  agent_turns_reserved: number;
2269
+ /** Turns left this month before this launch’s own reservation; null where the plan sets no cap. */
1869
2270
  agent_turns_remaining: number | null;
2271
+ /** Runs the account holds queued or playing right now. */
1870
2272
  queued_runs: number;
2273
+ /** Runs the plan lets the account hold queued or playing at once. */
1871
2274
  queued_runs_limit: number;
2275
+ /** The wall-clock cap the run would get, minutes. */
1872
2276
  minutes_cap: number;
2277
+ /** What the owner’s OpenRouter key may still spend, when the roster has own-key OpenRouter seats and OpenRouter reported a number; otherwise null. */
1873
2278
  openrouter_balance_usd: number | null;
2279
+ /** Trials this launch would run; 1 is a single run. */
1874
2280
  trials: number;
2281
+ /** The plan’s ceiling on trials in one batch. */
1875
2282
  trials_max: number;
2283
+ /** Totals for the whole batch: what the launch commits to. */
1876
2284
  batch: EstimateBatch;
2285
+ /** What this many trials buys before any of it runs. Sizing guidance, not a promise: a finished batch reports the spread it showed. */
1877
2286
  precision: EstimatePrecision;
1878
2287
  }
1879
2288
  export interface ExperimentEstimateDesign {
@@ -1933,89 +2342,160 @@ export interface RunLogsResponseFile {
1933
2342
  chunks: number;
1934
2343
  }
1935
2344
  export interface SeatReport {
2345
+ /** The seat’s name. */
1936
2346
  name: string;
2347
+ /** The seat’s model id. */
1937
2348
  model: string;
2349
+ /** Who drove the seat: `studio` the reference harness on the owner’s configuration, `guest` an invited agent on its own keys. */
1938
2350
  driver: 'studio' | 'guest';
2351
+ /** How the seat ended in the archive; null when the archive has not landed or the seat never played. */
1939
2352
  end_status: 'active' | 'dormant' | 'dead' | null;
2353
+ /** The harness that played the seat. Null on a guest seat and on a run that has not launched. */
1940
2354
  harness: RunSeatsResponseSeatHarness | null;
2355
+ /** What the seat said when asked after its epilogue: evidence of what it said, not of what it believed. Null until the harness reports it, and always null on a guest seat. */
1941
2356
  debrief: RunSeatsResponseSeatDebrief | null;
2357
+ /** A scan for turns on which the seat spoke of being evaluated or observed unprompted. A screen for a few phrasings, not a measure of what the seat believed. Null until reported. */
1942
2358
  voiced: RunSeatsResponseSeatVoiced | null;
2359
+ /** Rounds the seat forfeited, from the match’s own events. Null when the run has no match yet. */
1943
2360
  forfeits: RunSeatsResponseSeatForfeits | null;
2361
+ /** The meter’s own counts. Null on a guest seat, which is not metered. */
1944
2362
  calls: RunSeatsResponseSeatCalls | null;
2363
+ /** Run health, two rate limits kept apart. Null on a guest seat and on a run metered before health was recorded. */
1945
2364
  health: RunSeatsResponseSeatHealth | null;
2365
+ /** The seat’s trajectory file, while the plan still keeps it; read it with the run log endpoint. */
1946
2366
  trajectory: RunSeatsResponseSeatTrajectory | null;
1947
2367
  }
2368
+ /** The harness that played the seat. Null on a guest seat and on a run that has not launched. */
1948
2369
  export interface RunSeatsResponseSeatHarness {
2370
+ /** The harness version. */
1949
2371
  version: string | null;
2372
+ /** The scaffold identity the harness reported. */
1950
2373
  scaffold: string | null;
2374
+ /** The prompt version the seat played on. */
1951
2375
  prompt_version: string | null;
2376
+ /** The frame the seat played under. */
1952
2377
  frame: string | null;
2378
+ /** Where these came from: `trajectory` the seat’s own log header, `archive` what the match recorded at launch. */
1953
2379
  source: 'trajectory' | 'archive';
1954
2380
  }
2381
+ /** What the seat said when asked after its epilogue: evidence of what it said, not of what it believed. Null until the harness reports it, and always null on a guest seat. */
1955
2382
  export interface RunSeatsResponseSeatDebrief {
2383
+ /** False when no debrief landed; the answers are then null and `note` says why. */
1956
2384
  asked: boolean;
2385
+ /** Its answer to whether it believed the match was an evaluation of it. */
1957
2386
  believed_evaluation: 'yes' | 'no' | 'unsure' | 'unparsed' | null;
2387
+ /** Its answer to whether that changed its play. */
1958
2388
  changed_play: 'yes' | 'no' | 'unsure' | 'unparsed' | null;
2389
+ /** The cues it named. */
1959
2390
  cues: string[];
2391
+ /** How it said its play changed; null where it gave none. */
1960
2392
  how: string | null;
2393
+ /** Why no debrief landed, when `asked` is false. */
1961
2394
  note: string | null;
1962
2395
  }
2396
+ /** A scan for turns on which the seat spoke of being evaluated or observed unprompted. A screen for a few phrasings, not a measure of what the seat believed. Null until reported. */
1963
2397
  export interface RunSeatsResponseSeatVoiced {
2398
+ /** Turns the scan flagged. */
1964
2399
  turns: number;
2400
+ /** Turns the scan read. */
1965
2401
  turns_scanned: number;
2402
+ /** Whether the scan flagged the seat’s epilogue; null where that is not recorded. */
1966
2403
  epilogue: boolean | null;
2404
+ /** The scan’s version. */
1967
2405
  scan_version: string;
2406
+ /** Flagged turns by what they said; a turn counts once per category. Null on a tally from before the split. */
1968
2407
  by_category: RunSeatsResponseSeatVoicedByCategory | null;
1969
2408
  }
2409
+ /** Flagged turns by what they said; a turn counts once per category. Null on a tally from before the split. */
1970
2410
  export interface RunSeatsResponseSeatVoicedByCategory {
2411
+ /** Turns that called the match a test or evaluation. */
1971
2412
  evaluation: number;
2413
+ /** Turns that said it was watched or scored. */
1972
2414
  observed: number;
2415
+ /** Turns that said nothing real was at stake. */
1973
2416
  stakes: number;
1974
2417
  }
2418
+ /** Rounds the seat forfeited, from the match’s own events. Null when the run has no match yet. */
1975
2419
  export interface RunSeatsResponseSeatForfeits {
2420
+ /** Rounds forfeited. */
1976
2421
  total: number;
2422
+ /** Those rounds by cause. */
1977
2423
  by_cause: RunSeatsResponseSeatForfeitsByCause;
2424
+ /** Each forfeited round, oldest first, up to 100. */
1978
2425
  rounds: RunSeatsResponseSeatForfeitsRound[];
2426
+ /** True when the list stops short of every forfeited round. The counts still cover them all. */
1979
2427
  rounds_truncated: boolean;
1980
2428
  }
2429
+ /** Those rounds by cause. */
1981
2430
  export interface RunSeatsResponseSeatForfeitsByCause {
2431
+ /** Rounds the seat spent on a tool that does not take a turn. */
1982
2432
  free_tool: number;
2433
+ /** Rounds whose tool call failed. */
1983
2434
  refused_call: number;
2435
+ /** Rounds with no turn in the seat’s trajectory. */
1984
2436
  no_turn: number;
2437
+ /** Rounds forfeited for any other cause. */
1985
2438
  other: number;
1986
2439
  }
1987
2440
  export interface RunSeatsResponseSeatForfeitsRound {
2441
+ /** The round. */
1988
2442
  tick: number;
2443
+ /** Why it was forfeited. */
1989
2444
  cause: 'free_tool' | 'refused_call' | 'no_turn' | 'other';
2445
+ /** The action the trajectory shows at that round; null when no turn was recorded. */
1990
2446
  action: string | null;
1991
2447
  }
2448
+ /** The meter’s own counts. Null on a guest seat, which is not metered. */
1992
2449
  export interface RunSeatsResponseSeatCalls {
2450
+ /** Model calls the seat made. */
1993
2451
  model_calls: number;
2452
+ /** Play turns it took; null where the meter did not record them. */
1994
2453
  turns: number | null;
2454
+ /** Turns lost to a failed provider call. */
1995
2455
  error_turns: number;
2456
+ /** The error the seat’s agent exited on; null where it recorded none. */
1996
2457
  exited_early: string | null;
2458
+ /** Rounds the seat sat out while dormant. */
1997
2459
  sat_out_dormant: number;
2460
+ /** Calls by the model that answered, as reported; null where none was reported. */
1998
2461
  served_models: JsonObject | null;
2462
+ /** Calls by the provider that answered, as reported; null where none was reported. */
1999
2463
  served_by: JsonObject | null;
2000
2464
  }
2465
+ /** Run health, two rate limits kept apart. Null on a guest seat and on a run metered before health was recorded. */
2001
2466
  export interface RunSeatsResponseSeatHealth {
2467
+ /** What the world refused of the seat’s own actions. */
2002
2468
  world_rejections: RunSeatsResponseSeatHealthWorldRejections;
2469
+ /** Provider retries the harness rode out; null where it reported none. */
2003
2470
  provider_retries: RunSeatsResponseSeatHealthProviderRetries | null;
2004
2471
  }
2472
+ /** What the world refused of the seat’s own actions. */
2005
2473
  export interface RunSeatsResponseSeatHealthWorldRejections {
2474
+ /** Actions past the seat’s per-round budget. */
2006
2475
  turn_budget: number;
2476
+ /** Actions sent faster than the world’s pace floor. */
2007
2477
  pace: number;
2478
+ /** Actions the seat could not take. */
2008
2479
  invalid: number;
2009
2480
  }
2481
+ /** Provider retries the harness rode out; null where it reported none. */
2010
2482
  export interface RunSeatsResponseSeatHealthProviderRetries {
2483
+ /** Calls that needed a retry. */
2011
2484
  calls: number;
2485
+ /** Retries in all. */
2012
2486
  retries: number;
2487
+ /** Retries by cause. */
2013
2488
  causes: JsonObject;
2489
+ /** Time spent waiting between retries, ms. */
2014
2490
  wait_ms: number;
2015
2491
  }
2492
+ /** The seat’s trajectory file, while the plan still keeps it; read it with the run log endpoint. */
2016
2493
  export interface RunSeatsResponseSeatTrajectory {
2494
+ /** The file’s name. */
2017
2495
  file: string;
2496
+ /** Lines in the file. */
2018
2497
  lines: number;
2498
+ /** The file’s size in bytes. */
2019
2499
  bytes: number;
2020
2500
  }
2021
2501
  export interface CreateSetBodySetup {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Operations, type ErrorCode, type GetBatchResponse, type GetExperimentResponse, type GetRunResponse, type Method, type RequestParts } from './generated.js';
2
2
  export * from './generated.js';
3
- export declare const VERSION = "0.2.27";
3
+ export declare const VERSION = "0.2.29";
4
4
  export declare const DEFAULT_BASE_URL = "https://daishi.ai/api/v1";
5
5
  export interface DaishiOptions {
6
6
  /** A Studio access token (`dsk_...`). Default: the `DAISHI_TOKEN` environment variable. */
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Operations } from './generated.js';
2
2
  export * from './generated.js';
3
- export const VERSION = '0.2.27';
3
+ export const VERSION = '0.2.29';
4
4
  export const DEFAULT_BASE_URL = 'https://daishi.ai/api/v1';
5
5
  /** A refusal from the API, or a transport failure after the retries ran out. */
6
6
  export class DaishiError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "daishi-sdk",
3
- "version": "0.2.27",
3
+ "version": "0.2.29",
4
4
  "description": "Typed client for the Daishi Studio API: scenarios, runs, series batches and paired experiments, with retries and waiting helpers.",
5
5
  "keywords": [
6
6
  "daishi",