@meetkai/mka1 0.54.67 → 0.54.69

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.
Files changed (153) hide show
  1. package/bin/mcp-server.js +197 -17
  2. package/bin/mcp-server.js.map +21 -21
  3. package/dist/commonjs/lib/config.d.ts +2 -2
  4. package/dist/commonjs/lib/config.js +2 -2
  5. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  6. package/dist/commonjs/mcp-server/server.js +1 -1
  7. package/dist/commonjs/models/components/appendagenttrialsrequest.d.ts +8 -0
  8. package/dist/commonjs/models/components/appendagenttrialsrequest.d.ts.map +1 -1
  9. package/dist/commonjs/models/components/appendagenttrialsrequest.js +4 -0
  10. package/dist/commonjs/models/components/appendagenttrialsrequest.js.map +1 -1
  11. package/dist/commonjs/models/components/computelog.d.ts +2 -2
  12. package/dist/commonjs/models/components/evalleaderboardrow.d.ts +35 -0
  13. package/dist/commonjs/models/components/evalleaderboardrow.d.ts.map +1 -1
  14. package/dist/commonjs/models/components/evalleaderboardrow.js +26 -0
  15. package/dist/commonjs/models/components/evalleaderboardrow.js.map +1 -1
  16. package/dist/commonjs/models/components/evalrunoverview.d.ts +5 -0
  17. package/dist/commonjs/models/components/evalrunoverview.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/evalrunoverview.js +2 -0
  19. package/dist/commonjs/models/components/evalrunoverview.js.map +1 -1
  20. package/dist/commonjs/models/components/evalsampleobject.d.ts +5 -0
  21. package/dist/commonjs/models/components/evalsampleobject.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/evalsampleobject.js +4 -0
  23. package/dist/commonjs/models/components/evalsampleobject.js.map +1 -1
  24. package/dist/commonjs/models/components/importagentrunrequest.d.ts +8 -0
  25. package/dist/commonjs/models/components/importagentrunrequest.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/importagentrunrequest.js +4 -0
  27. package/dist/commonjs/models/components/importagentrunrequest.js.map +1 -1
  28. package/dist/commonjs/models/operations/appendagentevaltrials.d.ts +36 -0
  29. package/dist/commonjs/models/operations/appendagentevaltrials.d.ts.map +1 -1
  30. package/dist/commonjs/models/operations/appendagentevaltrials.js +25 -1
  31. package/dist/commonjs/models/operations/appendagentevaltrials.js.map +1 -1
  32. package/dist/commonjs/models/operations/cancelevalrun.d.ts +36 -0
  33. package/dist/commonjs/models/operations/cancelevalrun.d.ts.map +1 -1
  34. package/dist/commonjs/models/operations/cancelevalrun.js +25 -1
  35. package/dist/commonjs/models/operations/cancelevalrun.js.map +1 -1
  36. package/dist/commonjs/models/operations/createevalrun.d.ts +36 -0
  37. package/dist/commonjs/models/operations/createevalrun.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/createevalrun.js +26 -1
  39. package/dist/commonjs/models/operations/createevalrun.js.map +1 -1
  40. package/dist/commonjs/models/operations/getevalrun.d.ts +36 -0
  41. package/dist/commonjs/models/operations/getevalrun.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/getevalrun.js +25 -1
  43. package/dist/commonjs/models/operations/getevalrun.js.map +1 -1
  44. package/dist/commonjs/models/operations/importagentevalrun.d.ts +36 -0
  45. package/dist/commonjs/models/operations/importagentevalrun.d.ts.map +1 -1
  46. package/dist/commonjs/models/operations/importagentevalrun.js +25 -1
  47. package/dist/commonjs/models/operations/importagentevalrun.js.map +1 -1
  48. package/dist/commonjs/models/operations/listevalruns.d.ts +36 -0
  49. package/dist/commonjs/models/operations/listevalruns.d.ts.map +1 -1
  50. package/dist/commonjs/models/operations/listevalruns.js +25 -1
  51. package/dist/commonjs/models/operations/listevalruns.js.map +1 -1
  52. package/dist/commonjs/models/operations/listevalscheduleruns.d.ts +36 -0
  53. package/dist/commonjs/models/operations/listevalscheduleruns.d.ts.map +1 -1
  54. package/dist/commonjs/models/operations/listevalscheduleruns.js +25 -1
  55. package/dist/commonjs/models/operations/listevalscheduleruns.js.map +1 -1
  56. package/dist/commonjs/models/operations/listevalsuiteleaderboardruns.d.ts +36 -0
  57. package/dist/commonjs/models/operations/listevalsuiteleaderboardruns.d.ts.map +1 -1
  58. package/dist/commonjs/models/operations/listevalsuiteleaderboardruns.js +25 -1
  59. package/dist/commonjs/models/operations/listevalsuiteleaderboardruns.js.map +1 -1
  60. package/dist/commonjs/models/operations/rerunfailedevalsamples.d.ts +36 -0
  61. package/dist/commonjs/models/operations/rerunfailedevalsamples.d.ts.map +1 -1
  62. package/dist/commonjs/models/operations/rerunfailedevalsamples.js +25 -1
  63. package/dist/commonjs/models/operations/rerunfailedevalsamples.js.map +1 -1
  64. package/dist/commonjs/models/operations/retryfailedevalrun.d.ts +36 -0
  65. package/dist/commonjs/models/operations/retryfailedevalrun.d.ts.map +1 -1
  66. package/dist/commonjs/models/operations/retryfailedevalrun.js +25 -1
  67. package/dist/commonjs/models/operations/retryfailedevalrun.js.map +1 -1
  68. package/dist/esm/lib/config.d.ts +2 -2
  69. package/dist/esm/lib/config.js +2 -2
  70. package/dist/esm/mcp-server/mcp-server.js +1 -1
  71. package/dist/esm/mcp-server/server.js +1 -1
  72. package/dist/esm/models/components/appendagenttrialsrequest.d.ts +8 -0
  73. package/dist/esm/models/components/appendagenttrialsrequest.d.ts.map +1 -1
  74. package/dist/esm/models/components/appendagenttrialsrequest.js +4 -0
  75. package/dist/esm/models/components/appendagenttrialsrequest.js.map +1 -1
  76. package/dist/esm/models/components/computelog.d.ts +2 -2
  77. package/dist/esm/models/components/evalleaderboardrow.d.ts +35 -0
  78. package/dist/esm/models/components/evalleaderboardrow.d.ts.map +1 -1
  79. package/dist/esm/models/components/evalleaderboardrow.js +26 -0
  80. package/dist/esm/models/components/evalleaderboardrow.js.map +1 -1
  81. package/dist/esm/models/components/evalrunoverview.d.ts +5 -0
  82. package/dist/esm/models/components/evalrunoverview.d.ts.map +1 -1
  83. package/dist/esm/models/components/evalrunoverview.js +2 -0
  84. package/dist/esm/models/components/evalrunoverview.js.map +1 -1
  85. package/dist/esm/models/components/evalsampleobject.d.ts +5 -0
  86. package/dist/esm/models/components/evalsampleobject.d.ts.map +1 -1
  87. package/dist/esm/models/components/evalsampleobject.js +4 -0
  88. package/dist/esm/models/components/evalsampleobject.js.map +1 -1
  89. package/dist/esm/models/components/importagentrunrequest.d.ts +8 -0
  90. package/dist/esm/models/components/importagentrunrequest.d.ts.map +1 -1
  91. package/dist/esm/models/components/importagentrunrequest.js +4 -0
  92. package/dist/esm/models/components/importagentrunrequest.js.map +1 -1
  93. package/dist/esm/models/operations/appendagentevaltrials.d.ts +36 -0
  94. package/dist/esm/models/operations/appendagentevaltrials.d.ts.map +1 -1
  95. package/dist/esm/models/operations/appendagentevaltrials.js +22 -0
  96. package/dist/esm/models/operations/appendagentevaltrials.js.map +1 -1
  97. package/dist/esm/models/operations/cancelevalrun.d.ts +36 -0
  98. package/dist/esm/models/operations/cancelevalrun.d.ts.map +1 -1
  99. package/dist/esm/models/operations/cancelevalrun.js +22 -0
  100. package/dist/esm/models/operations/cancelevalrun.js.map +1 -1
  101. package/dist/esm/models/operations/createevalrun.d.ts +36 -0
  102. package/dist/esm/models/operations/createevalrun.d.ts.map +1 -1
  103. package/dist/esm/models/operations/createevalrun.js +23 -0
  104. package/dist/esm/models/operations/createevalrun.js.map +1 -1
  105. package/dist/esm/models/operations/getevalrun.d.ts +36 -0
  106. package/dist/esm/models/operations/getevalrun.d.ts.map +1 -1
  107. package/dist/esm/models/operations/getevalrun.js +22 -0
  108. package/dist/esm/models/operations/getevalrun.js.map +1 -1
  109. package/dist/esm/models/operations/importagentevalrun.d.ts +36 -0
  110. package/dist/esm/models/operations/importagentevalrun.d.ts.map +1 -1
  111. package/dist/esm/models/operations/importagentevalrun.js +22 -0
  112. package/dist/esm/models/operations/importagentevalrun.js.map +1 -1
  113. package/dist/esm/models/operations/listevalruns.d.ts +36 -0
  114. package/dist/esm/models/operations/listevalruns.d.ts.map +1 -1
  115. package/dist/esm/models/operations/listevalruns.js +22 -0
  116. package/dist/esm/models/operations/listevalruns.js.map +1 -1
  117. package/dist/esm/models/operations/listevalscheduleruns.d.ts +36 -0
  118. package/dist/esm/models/operations/listevalscheduleruns.d.ts.map +1 -1
  119. package/dist/esm/models/operations/listevalscheduleruns.js +22 -0
  120. package/dist/esm/models/operations/listevalscheduleruns.js.map +1 -1
  121. package/dist/esm/models/operations/listevalsuiteleaderboardruns.d.ts +36 -0
  122. package/dist/esm/models/operations/listevalsuiteleaderboardruns.d.ts.map +1 -1
  123. package/dist/esm/models/operations/listevalsuiteleaderboardruns.js +22 -0
  124. package/dist/esm/models/operations/listevalsuiteleaderboardruns.js.map +1 -1
  125. package/dist/esm/models/operations/rerunfailedevalsamples.d.ts +36 -0
  126. package/dist/esm/models/operations/rerunfailedevalsamples.d.ts.map +1 -1
  127. package/dist/esm/models/operations/rerunfailedevalsamples.js +22 -0
  128. package/dist/esm/models/operations/rerunfailedevalsamples.js.map +1 -1
  129. package/dist/esm/models/operations/retryfailedevalrun.d.ts +36 -0
  130. package/dist/esm/models/operations/retryfailedevalrun.d.ts.map +1 -1
  131. package/dist/esm/models/operations/retryfailedevalrun.js +22 -0
  132. package/dist/esm/models/operations/retryfailedevalrun.js.map +1 -1
  133. package/jsr.json +1 -1
  134. package/package.json +1 -1
  135. package/src/lib/config.ts +2 -2
  136. package/src/mcp-server/mcp-server.ts +1 -1
  137. package/src/mcp-server/server.ts +1 -1
  138. package/src/models/components/appendagenttrialsrequest.ts +12 -0
  139. package/src/models/components/computelog.ts +2 -2
  140. package/src/models/components/evalleaderboardrow.ts +61 -0
  141. package/src/models/components/evalrunoverview.ts +7 -0
  142. package/src/models/components/evalsampleobject.ts +9 -0
  143. package/src/models/components/importagentrunrequest.ts +12 -0
  144. package/src/models/operations/appendagentevaltrials.ts +76 -0
  145. package/src/models/operations/cancelevalrun.ts +74 -0
  146. package/src/models/operations/createevalrun.ts +67 -0
  147. package/src/models/operations/getevalrun.ts +74 -0
  148. package/src/models/operations/importagentevalrun.ts +74 -0
  149. package/src/models/operations/listevalruns.ts +74 -0
  150. package/src/models/operations/listevalscheduleruns.ts +74 -0
  151. package/src/models/operations/listevalsuiteleaderboardruns.ts +77 -0
  152. package/src/models/operations/rerunfailedevalsamples.ts +76 -0
  153. package/src/models/operations/retryfailedevalrun.ts +74 -0
@@ -57,6 +57,13 @@ export type AppendAgentTrialsRequestTrials = {
57
57
  * The share of `input_tokens` served from the provider's prompt cache.
58
58
  */
59
59
  cachedTokens?: number | null | undefined;
60
+ /**
61
+ * The share of `output_tokens` the provider attributed to reasoning. Null when it reported no split.
62
+ */
63
+ reasoningTokens?: number | null | undefined;
64
+ /**
65
+ * Wall time per phase as `{ phase: { started_at, finished_at } }` (ISO 8601). A harness trial carries its Harbor phases; a sample the gateway generated carries `generation`, the model call itself.
66
+ */
60
67
  phaseTimings?: { [k: string]: any } | null | undefined;
61
68
  };
62
69
 
@@ -98,6 +105,7 @@ export const AppendAgentTrialsRequestTrials$inboundSchema: z.ZodType<
98
105
  input_tokens: z.nullable(z.number().int()).optional(),
99
106
  output_tokens: z.nullable(z.number().int()).optional(),
100
107
  cached_tokens: z.nullable(z.number().int()).optional(),
108
+ reasoning_tokens: z.nullable(z.number().int()).optional(),
101
109
  phase_timings: z.nullable(z.record(z.any())).optional(),
102
110
  }).transform((v) => {
103
111
  return remap$(v, {
@@ -108,6 +116,7 @@ export const AppendAgentTrialsRequestTrials$inboundSchema: z.ZodType<
108
116
  "input_tokens": "inputTokens",
109
117
  "output_tokens": "outputTokens",
110
118
  "cached_tokens": "cachedTokens",
119
+ "reasoning_tokens": "reasoningTokens",
111
120
  "phase_timings": "phaseTimings",
112
121
  });
113
122
  });
@@ -125,6 +134,7 @@ export type AppendAgentTrialsRequestTrials$Outbound = {
125
134
  input_tokens?: number | null | undefined;
126
135
  output_tokens?: number | null | undefined;
127
136
  cached_tokens?: number | null | undefined;
137
+ reasoning_tokens?: number | null | undefined;
128
138
  phase_timings?: { [k: string]: any } | null | undefined;
129
139
  };
130
140
 
@@ -146,6 +156,7 @@ export const AppendAgentTrialsRequestTrials$outboundSchema: z.ZodType<
146
156
  inputTokens: z.nullable(z.number().int()).optional(),
147
157
  outputTokens: z.nullable(z.number().int()).optional(),
148
158
  cachedTokens: z.nullable(z.number().int()).optional(),
159
+ reasoningTokens: z.nullable(z.number().int()).optional(),
149
160
  phaseTimings: z.nullable(z.record(z.any())).optional(),
150
161
  }).transform((v) => {
151
162
  return remap$(v, {
@@ -156,6 +167,7 @@ export const AppendAgentTrialsRequestTrials$outboundSchema: z.ZodType<
156
167
  inputTokens: "input_tokens",
157
168
  outputTokens: "output_tokens",
158
169
  cachedTokens: "cached_tokens",
170
+ reasoningTokens: "reasoning_tokens",
159
171
  phaseTimings: "phase_timings",
160
172
  });
161
173
  });
@@ -22,12 +22,12 @@ export const Stream = {
22
22
  export type Stream = ClosedEnum<typeof Stream>;
23
23
 
24
24
  /**
25
- * One line of a workload's output, or a system note about the workload. Lines are kept for 7 days.
25
+ * One line of a workload's output, or a system note about the workload. Lines are kept for 7 days, and each job or service keeps at most its newest 100 MB, each line counting as its text plus 400 bytes. Once the limit has deleted lines, the log starts with a system line counting them.
26
26
  */
27
27
  export type ComputeLog = {
28
28
  id: string;
29
29
  /**
30
- * The node of a multi-node workload that wrote the line, 0 when it has one node. Absent on lines no run wrote, such as lines of native services, which name their replica instead.
30
+ * The node of a multi-node workload that wrote the line, 0 when it has one node. Absent on lines no run wrote: lines of native services, which name their replica instead, and the log limit's note.
31
31
  */
32
32
  instanceRank?: number | undefined;
33
33
  message: string;
@@ -46,6 +46,34 @@ export type EvalLeaderboardRow = {
46
46
  * Summed trial spend, falling back to the runs' own totals when trials carry no cost. Null when neither reported any.
47
47
  */
48
48
  costUsd: number | null;
49
+ /**
50
+ * Trials where `metric` reached full credit (1). On a pass/fail board this is the solve count; on a partial-credit board it counts only the fully passing trials, not the partials. It is the denominator for cost and tokens per solved task, which is how spend should be read: an agent that gives up early is cheap per trial and buys nothing.
51
+ */
52
+ solvedTrials: number;
53
+ /**
54
+ * Prompt tokens summed over the row's trials, `cached_tokens` included. Null when no trial reported usage.
55
+ */
56
+ inputTokens: number | null;
57
+ /**
58
+ * Completion tokens summed over the row's trials. Null when no trial reported usage.
59
+ */
60
+ outputTokens: number | null;
61
+ /**
62
+ * The share of `input_tokens` served from the provider's prompt cache. Agent context is re-sent every turn, so this is most of what separates a cheap board run from an expensive one. Null when no trial reported it.
63
+ */
64
+ cachedTokens: number | null;
65
+ /**
66
+ * Agent steps summed over the row's captured sessions. Null when no trial in the row uploaded a trajectory — a trial without one contributes nothing rather than a zero, so the figure covers only the sessions actually recorded.
67
+ */
68
+ steps: number | null;
69
+ /**
70
+ * Wall seconds of the agent phase, summed over the `timed_trials` that carry Harbor's `agent_execution` timing. Null when none did.
71
+ */
72
+ agentSeconds: number | null;
73
+ /**
74
+ * Trials behind `agent_seconds`; divide by this, not by `trials`, for seconds per trial.
75
+ */
76
+ timedTrials: number;
49
77
  runCount: number;
50
78
  /**
51
79
  * The runs behind this row, largest (most trials) first, ties newest first — element 0 is the run to open when the reader drills into this row, so a full benchmark job outranks a newer one-task smoke run.
@@ -114,6 +142,13 @@ export const EvalLeaderboardRow$inboundSchema: z.ZodType<
114
142
  scored_trials: z.number().int(),
115
143
  failed_trials: z.number().int(),
116
144
  cost_usd: z.nullable(z.number()),
145
+ solved_trials: z.number().int(),
146
+ input_tokens: z.nullable(z.number().int()),
147
+ output_tokens: z.nullable(z.number().int()),
148
+ cached_tokens: z.nullable(z.number().int()),
149
+ steps: z.nullable(z.number().int()),
150
+ agent_seconds: z.nullable(z.number()),
151
+ timed_trials: z.number().int(),
117
152
  run_count: z.number().int(),
118
153
  run_ids: z.array(z.string()),
119
154
  last_run_at: z.number().int(),
@@ -126,6 +161,12 @@ export const EvalLeaderboardRow$inboundSchema: z.ZodType<
126
161
  "scored_trials": "scoredTrials",
127
162
  "failed_trials": "failedTrials",
128
163
  "cost_usd": "costUsd",
164
+ "solved_trials": "solvedTrials",
165
+ "input_tokens": "inputTokens",
166
+ "output_tokens": "outputTokens",
167
+ "cached_tokens": "cachedTokens",
168
+ "agent_seconds": "agentSeconds",
169
+ "timed_trials": "timedTrials",
129
170
  "run_count": "runCount",
130
171
  "run_ids": "runIds",
131
172
  "last_run_at": "lastRunAt",
@@ -143,6 +184,13 @@ export type EvalLeaderboardRow$Outbound = {
143
184
  scored_trials: number;
144
185
  failed_trials: number;
145
186
  cost_usd: number | null;
187
+ solved_trials: number;
188
+ input_tokens: number | null;
189
+ output_tokens: number | null;
190
+ cached_tokens: number | null;
191
+ steps: number | null;
192
+ agent_seconds: number | null;
193
+ timed_trials: number;
146
194
  run_count: number;
147
195
  run_ids: Array<string>;
148
196
  last_run_at: number;
@@ -164,6 +212,13 @@ export const EvalLeaderboardRow$outboundSchema: z.ZodType<
164
212
  scoredTrials: z.number().int(),
165
213
  failedTrials: z.number().int(),
166
214
  costUsd: z.nullable(z.number()),
215
+ solvedTrials: z.number().int(),
216
+ inputTokens: z.nullable(z.number().int()),
217
+ outputTokens: z.nullable(z.number().int()),
218
+ cachedTokens: z.nullable(z.number().int()),
219
+ steps: z.nullable(z.number().int()),
220
+ agentSeconds: z.nullable(z.number()),
221
+ timedTrials: z.number().int(),
167
222
  runCount: z.number().int(),
168
223
  runIds: z.array(z.string()),
169
224
  lastRunAt: z.number().int(),
@@ -176,6 +231,12 @@ export const EvalLeaderboardRow$outboundSchema: z.ZodType<
176
231
  scoredTrials: "scored_trials",
177
232
  failedTrials: "failed_trials",
178
233
  costUsd: "cost_usd",
234
+ solvedTrials: "solved_trials",
235
+ inputTokens: "input_tokens",
236
+ outputTokens: "output_tokens",
237
+ cachedTokens: "cached_tokens",
238
+ agentSeconds: "agent_seconds",
239
+ timedTrials: "timed_trials",
179
240
  runCount: "run_count",
180
241
  runIds: "run_ids",
181
242
  lastRunAt: "last_run_at",
@@ -40,6 +40,10 @@ export type Tokens = {
40
40
  * Share of `input` served from the provider's prompt cache.
41
41
  */
42
42
  cached: number | null;
43
+ /**
44
+ * Reasoning tokens inside `output`, over the samples whose provider reported the split.
45
+ */
46
+ reasoning: number | null;
43
47
  };
44
48
 
45
49
  export type EvalRunOverview = {
@@ -114,12 +118,14 @@ export const Tokens$inboundSchema: z.ZodType<Tokens, z.ZodTypeDef, unknown> = z
114
118
  input: z.nullable(z.number().int()),
115
119
  output: z.nullable(z.number().int()),
116
120
  cached: z.nullable(z.number().int()),
121
+ reasoning: z.nullable(z.number().int()),
117
122
  });
118
123
  /** @internal */
119
124
  export type Tokens$Outbound = {
120
125
  input: number | null;
121
126
  output: number | null;
122
127
  cached: number | null;
128
+ reasoning: number | null;
123
129
  };
124
130
 
125
131
  /** @internal */
@@ -131,6 +137,7 @@ export const Tokens$outboundSchema: z.ZodType<
131
137
  input: z.nullable(z.number().int()),
132
138
  output: z.nullable(z.number().int()),
133
139
  cached: z.nullable(z.number().int()),
140
+ reasoning: z.nullable(z.number().int()),
134
141
  });
135
142
 
136
143
  export function tokensToJSON(tokens: Tokens): string {
@@ -53,6 +53,10 @@ export type EvalSampleObject = {
53
53
  * The share of `input_tokens` served from the provider's prompt cache. Reported separately because it is what makes two agents at the same token count cost an order of magnitude apart.
54
54
  */
55
55
  cachedTokens: number | null;
56
+ /**
57
+ * The share of `output_tokens` the provider attributed to reasoning. Null when it reported no split.
58
+ */
59
+ reasoningTokens: number | null;
56
60
  /**
57
61
  * Per-phase wall clock for a harness trial: `environment_setup`, `agent_setup`, `agent_execution`, `verifier`, each `{ started_at, finished_at }` as ISO 8601 timestamps exactly as the harness recorded them. A phase the harness did not time is absent rather than null. Drives the trial timing bar. Null outside harness runs.
58
62
  */
@@ -89,6 +93,7 @@ export const EvalSampleObject$inboundSchema: z.ZodType<
89
93
  input_tokens: z.nullable(z.number().int()),
90
94
  output_tokens: z.nullable(z.number().int()),
91
95
  cached_tokens: z.nullable(z.number().int()),
96
+ reasoning_tokens: z.nullable(z.number().int()),
92
97
  phase_timings: z.nullable(z.record(z.any())),
93
98
  created_at: z.number().int(),
94
99
  started_at: z.nullable(z.number().int()),
@@ -106,6 +111,7 @@ export const EvalSampleObject$inboundSchema: z.ZodType<
106
111
  "input_tokens": "inputTokens",
107
112
  "output_tokens": "outputTokens",
108
113
  "cached_tokens": "cachedTokens",
114
+ "reasoning_tokens": "reasoningTokens",
109
115
  "phase_timings": "phaseTimings",
110
116
  "created_at": "createdAt",
111
117
  "started_at": "startedAt",
@@ -135,6 +141,7 @@ export type EvalSampleObject$Outbound = {
135
141
  input_tokens: number | null;
136
142
  output_tokens: number | null;
137
143
  cached_tokens: number | null;
144
+ reasoning_tokens: number | null;
138
145
  phase_timings: { [k: string]: any } | null;
139
146
  created_at: number;
140
147
  started_at: number | null;
@@ -168,6 +175,7 @@ export const EvalSampleObject$outboundSchema: z.ZodType<
168
175
  inputTokens: z.nullable(z.number().int()),
169
176
  outputTokens: z.nullable(z.number().int()),
170
177
  cachedTokens: z.nullable(z.number().int()),
178
+ reasoningTokens: z.nullable(z.number().int()),
171
179
  phaseTimings: z.nullable(z.record(z.any())),
172
180
  createdAt: z.number().int(),
173
181
  startedAt: z.nullable(z.number().int()),
@@ -185,6 +193,7 @@ export const EvalSampleObject$outboundSchema: z.ZodType<
185
193
  inputTokens: "input_tokens",
186
194
  outputTokens: "output_tokens",
187
195
  cachedTokens: "cached_tokens",
196
+ reasoningTokens: "reasoning_tokens",
188
197
  phaseTimings: "phase_timings",
189
198
  createdAt: "created_at",
190
199
  startedAt: "started_at",
@@ -60,6 +60,13 @@ export type ImportAgentRunRequestTrials = {
60
60
  * The share of `input_tokens` served from the provider's prompt cache.
61
61
  */
62
62
  cachedTokens?: number | null | undefined;
63
+ /**
64
+ * The share of `output_tokens` the provider attributed to reasoning. Null when it reported no split.
65
+ */
66
+ reasoningTokens?: number | null | undefined;
67
+ /**
68
+ * Wall time per phase as `{ phase: { started_at, finished_at } }` (ISO 8601). A harness trial carries its Harbor phases; a sample the gateway generated carries `generation`, the model call itself.
69
+ */
63
70
  phaseTimings?: { [k: string]: any } | null | undefined;
64
71
  };
65
72
 
@@ -136,6 +143,7 @@ export const ImportAgentRunRequestTrials$inboundSchema: z.ZodType<
136
143
  input_tokens: z.nullable(z.number().int()).optional(),
137
144
  output_tokens: z.nullable(z.number().int()).optional(),
138
145
  cached_tokens: z.nullable(z.number().int()).optional(),
146
+ reasoning_tokens: z.nullable(z.number().int()).optional(),
139
147
  phase_timings: z.nullable(z.record(z.any())).optional(),
140
148
  }).transform((v) => {
141
149
  return remap$(v, {
@@ -146,6 +154,7 @@ export const ImportAgentRunRequestTrials$inboundSchema: z.ZodType<
146
154
  "input_tokens": "inputTokens",
147
155
  "output_tokens": "outputTokens",
148
156
  "cached_tokens": "cachedTokens",
157
+ "reasoning_tokens": "reasoningTokens",
149
158
  "phase_timings": "phaseTimings",
150
159
  });
151
160
  });
@@ -163,6 +172,7 @@ export type ImportAgentRunRequestTrials$Outbound = {
163
172
  input_tokens?: number | null | undefined;
164
173
  output_tokens?: number | null | undefined;
165
174
  cached_tokens?: number | null | undefined;
175
+ reasoning_tokens?: number | null | undefined;
166
176
  phase_timings?: { [k: string]: any } | null | undefined;
167
177
  };
168
178
 
@@ -184,6 +194,7 @@ export const ImportAgentRunRequestTrials$outboundSchema: z.ZodType<
184
194
  inputTokens: z.nullable(z.number().int()).optional(),
185
195
  outputTokens: z.nullable(z.number().int()).optional(),
186
196
  cachedTokens: z.nullable(z.number().int()).optional(),
197
+ reasoningTokens: z.nullable(z.number().int()).optional(),
187
198
  phaseTimings: z.nullable(z.record(z.any())).optional(),
188
199
  }).transform((v) => {
189
200
  return remap$(v, {
@@ -194,6 +205,7 @@ export const ImportAgentRunRequestTrials$outboundSchema: z.ZodType<
194
205
  inputTokens: "input_tokens",
195
206
  outputTokens: "output_tokens",
196
207
  cachedTokens: "cached_tokens",
208
+ reasoningTokens: "reasoning_tokens",
197
209
  phaseTimings: "phase_timings",
198
210
  });
199
211
  });
@@ -88,6 +88,25 @@ export type AppendAgentEvalTrialsRequestCounts = {
88
88
  failed: number;
89
89
  };
90
90
 
91
+ /**
92
+ * Token totals for the run, summed over its samples when it finalized. Each is null when nothing reported that figure, which is a different fact from zero and must not render as free.
93
+ */
94
+ export type AppendAgentEvalTrialsTokens = {
95
+ /**
96
+ * Prompt tokens over the run's samples, `cached` included.
97
+ */
98
+ input: number | null;
99
+ output: number | null;
100
+ /**
101
+ * The share of `input` the provider served from its prompt cache. Can exceed `input` on an older harness import, where the two numbers came from different accountings — treat the pair as inconsistent rather than deriving a hit rate from it.
102
+ */
103
+ cached: number | null;
104
+ /**
105
+ * Reasoning tokens inside `output`, summed over the samples whose provider reported the split. Null when none did; the per-task figures in `metrics.by_task` estimate the split from the stored text in that case.
106
+ */
107
+ reasoning: number | null;
108
+ };
109
+
91
110
  /**
92
111
  * OK
93
112
  */
@@ -132,6 +151,10 @@ export type AppendAgentEvalTrialsResponseBody = {
132
151
  * Total spend for the run in USD. Null when the harness did not report cost.
133
152
  */
134
153
  costUsd: number | null;
154
+ /**
155
+ * Token totals for the run, summed over its samples when it finalized. Each is null when nothing reported that figure, which is a different fact from zero and must not render as free.
156
+ */
157
+ tokens: AppendAgentEvalTrialsTokens;
135
158
  createdAt: number;
136
159
  startedAt: number | null;
137
160
  completedAt: number | null;
@@ -510,6 +533,56 @@ export function appendAgentEvalTrialsRequestCountsFromJSON(
510
533
  );
511
534
  }
512
535
 
536
+ /** @internal */
537
+ export const AppendAgentEvalTrialsTokens$inboundSchema: z.ZodType<
538
+ AppendAgentEvalTrialsTokens,
539
+ z.ZodTypeDef,
540
+ unknown
541
+ > = z.object({
542
+ input: z.nullable(z.number().int()),
543
+ output: z.nullable(z.number().int()),
544
+ cached: z.nullable(z.number().int()),
545
+ reasoning: z.nullable(z.number().int()),
546
+ });
547
+ /** @internal */
548
+ export type AppendAgentEvalTrialsTokens$Outbound = {
549
+ input: number | null;
550
+ output: number | null;
551
+ cached: number | null;
552
+ reasoning: number | null;
553
+ };
554
+
555
+ /** @internal */
556
+ export const AppendAgentEvalTrialsTokens$outboundSchema: z.ZodType<
557
+ AppendAgentEvalTrialsTokens$Outbound,
558
+ z.ZodTypeDef,
559
+ AppendAgentEvalTrialsTokens
560
+ > = z.object({
561
+ input: z.nullable(z.number().int()),
562
+ output: z.nullable(z.number().int()),
563
+ cached: z.nullable(z.number().int()),
564
+ reasoning: z.nullable(z.number().int()),
565
+ });
566
+
567
+ export function appendAgentEvalTrialsTokensToJSON(
568
+ appendAgentEvalTrialsTokens: AppendAgentEvalTrialsTokens,
569
+ ): string {
570
+ return JSON.stringify(
571
+ AppendAgentEvalTrialsTokens$outboundSchema.parse(
572
+ appendAgentEvalTrialsTokens,
573
+ ),
574
+ );
575
+ }
576
+ export function appendAgentEvalTrialsTokensFromJSON(
577
+ jsonString: string,
578
+ ): SafeParseResult<AppendAgentEvalTrialsTokens, SDKValidationError> {
579
+ return safeParse(
580
+ jsonString,
581
+ (x) => AppendAgentEvalTrialsTokens$inboundSchema.parse(JSON.parse(x)),
582
+ `Failed to parse 'AppendAgentEvalTrialsTokens' from JSON`,
583
+ );
584
+ }
585
+
513
586
  /** @internal */
514
587
  export const AppendAgentEvalTrialsResponseBody$inboundSchema: z.ZodType<
515
588
  AppendAgentEvalTrialsResponseBody,
@@ -540,6 +613,7 @@ export const AppendAgentEvalTrialsResponseBody$inboundSchema: z.ZodType<
540
613
  agent_version: z.nullable(z.string()),
541
614
  agent_effort: z.nullable(z.string()),
542
615
  cost_usd: z.nullable(z.number()),
616
+ tokens: z.lazy(() => AppendAgentEvalTrialsTokens$inboundSchema),
543
617
  created_at: z.number().int(),
544
618
  started_at: z.nullable(z.number().int()),
545
619
  completed_at: z.nullable(z.number().int()),
@@ -592,6 +666,7 @@ export type AppendAgentEvalTrialsResponseBody$Outbound = {
592
666
  agent_version: string | null;
593
667
  agent_effort: string | null;
594
668
  cost_usd: number | null;
669
+ tokens: AppendAgentEvalTrialsTokens$Outbound;
595
670
  created_at: number;
596
671
  started_at: number | null;
597
672
  completed_at: number | null;
@@ -629,6 +704,7 @@ export const AppendAgentEvalTrialsResponseBody$outboundSchema: z.ZodType<
629
704
  agentVersion: z.nullable(z.string()),
630
705
  agentEffort: z.nullable(z.string()),
631
706
  costUsd: z.nullable(z.number()),
707
+ tokens: z.lazy(() => AppendAgentEvalTrialsTokens$outboundSchema),
632
708
  createdAt: z.number().int(),
633
709
  startedAt: z.nullable(z.number().int()),
634
710
  completedAt: z.nullable(z.number().int()),
@@ -87,6 +87,25 @@ export type CancelEvalRunRequestCounts = {
87
87
  failed: number;
88
88
  };
89
89
 
90
+ /**
91
+ * Token totals for the run, summed over its samples when it finalized. Each is null when nothing reported that figure, which is a different fact from zero and must not render as free.
92
+ */
93
+ export type CancelEvalRunTokens = {
94
+ /**
95
+ * Prompt tokens over the run's samples, `cached` included.
96
+ */
97
+ input: number | null;
98
+ output: number | null;
99
+ /**
100
+ * The share of `input` the provider served from its prompt cache. Can exceed `input` on an older harness import, where the two numbers came from different accountings — treat the pair as inconsistent rather than deriving a hit rate from it.
101
+ */
102
+ cached: number | null;
103
+ /**
104
+ * Reasoning tokens inside `output`, summed over the samples whose provider reported the split. Null when none did; the per-task figures in `metrics.by_task` estimate the split from the stored text in that case.
105
+ */
106
+ reasoning: number | null;
107
+ };
108
+
90
109
  /**
91
110
  * OK
92
111
  */
@@ -131,6 +150,10 @@ export type CancelEvalRunResponseBody = {
131
150
  * Total spend for the run in USD. Null when the harness did not report cost.
132
151
  */
133
152
  costUsd: number | null;
153
+ /**
154
+ * Token totals for the run, summed over its samples when it finalized. Each is null when nothing reported that figure, which is a different fact from zero and must not render as free.
155
+ */
156
+ tokens: CancelEvalRunTokens;
134
157
  createdAt: number;
135
158
  startedAt: number | null;
136
159
  completedAt: number | null;
@@ -495,6 +518,54 @@ export function cancelEvalRunRequestCountsFromJSON(
495
518
  );
496
519
  }
497
520
 
521
+ /** @internal */
522
+ export const CancelEvalRunTokens$inboundSchema: z.ZodType<
523
+ CancelEvalRunTokens,
524
+ z.ZodTypeDef,
525
+ unknown
526
+ > = z.object({
527
+ input: z.nullable(z.number().int()),
528
+ output: z.nullable(z.number().int()),
529
+ cached: z.nullable(z.number().int()),
530
+ reasoning: z.nullable(z.number().int()),
531
+ });
532
+ /** @internal */
533
+ export type CancelEvalRunTokens$Outbound = {
534
+ input: number | null;
535
+ output: number | null;
536
+ cached: number | null;
537
+ reasoning: number | null;
538
+ };
539
+
540
+ /** @internal */
541
+ export const CancelEvalRunTokens$outboundSchema: z.ZodType<
542
+ CancelEvalRunTokens$Outbound,
543
+ z.ZodTypeDef,
544
+ CancelEvalRunTokens
545
+ > = z.object({
546
+ input: z.nullable(z.number().int()),
547
+ output: z.nullable(z.number().int()),
548
+ cached: z.nullable(z.number().int()),
549
+ reasoning: z.nullable(z.number().int()),
550
+ });
551
+
552
+ export function cancelEvalRunTokensToJSON(
553
+ cancelEvalRunTokens: CancelEvalRunTokens,
554
+ ): string {
555
+ return JSON.stringify(
556
+ CancelEvalRunTokens$outboundSchema.parse(cancelEvalRunTokens),
557
+ );
558
+ }
559
+ export function cancelEvalRunTokensFromJSON(
560
+ jsonString: string,
561
+ ): SafeParseResult<CancelEvalRunTokens, SDKValidationError> {
562
+ return safeParse(
563
+ jsonString,
564
+ (x) => CancelEvalRunTokens$inboundSchema.parse(JSON.parse(x)),
565
+ `Failed to parse 'CancelEvalRunTokens' from JSON`,
566
+ );
567
+ }
568
+
498
569
  /** @internal */
499
570
  export const CancelEvalRunResponseBody$inboundSchema: z.ZodType<
500
571
  CancelEvalRunResponseBody,
@@ -523,6 +594,7 @@ export const CancelEvalRunResponseBody$inboundSchema: z.ZodType<
523
594
  agent_version: z.nullable(z.string()),
524
595
  agent_effort: z.nullable(z.string()),
525
596
  cost_usd: z.nullable(z.number()),
597
+ tokens: z.lazy(() => CancelEvalRunTokens$inboundSchema),
526
598
  created_at: z.number().int(),
527
599
  started_at: z.nullable(z.number().int()),
528
600
  completed_at: z.nullable(z.number().int()),
@@ -575,6 +647,7 @@ export type CancelEvalRunResponseBody$Outbound = {
575
647
  agent_version: string | null;
576
648
  agent_effort: string | null;
577
649
  cost_usd: number | null;
650
+ tokens: CancelEvalRunTokens$Outbound;
578
651
  created_at: number;
579
652
  started_at: number | null;
580
653
  completed_at: number | null;
@@ -610,6 +683,7 @@ export const CancelEvalRunResponseBody$outboundSchema: z.ZodType<
610
683
  agentVersion: z.nullable(z.string()),
611
684
  agentEffort: z.nullable(z.string()),
612
685
  costUsd: z.nullable(z.number()),
686
+ tokens: z.lazy(() => CancelEvalRunTokens$outboundSchema),
613
687
  createdAt: z.number().int(),
614
688
  startedAt: z.nullable(z.number().int()),
615
689
  completedAt: z.nullable(z.number().int()),
@@ -83,6 +83,25 @@ export type RequestCounts = {
83
83
  failed: number;
84
84
  };
85
85
 
86
+ /**
87
+ * Token totals for the run, summed over its samples when it finalized. Each is null when nothing reported that figure, which is a different fact from zero and must not render as free.
88
+ */
89
+ export type Tokens = {
90
+ /**
91
+ * Prompt tokens over the run's samples, `cached` included.
92
+ */
93
+ input: number | null;
94
+ output: number | null;
95
+ /**
96
+ * The share of `input` the provider served from its prompt cache. Can exceed `input` on an older harness import, where the two numbers came from different accountings — treat the pair as inconsistent rather than deriving a hit rate from it.
97
+ */
98
+ cached: number | null;
99
+ /**
100
+ * Reasoning tokens inside `output`, summed over the samples whose provider reported the split. Null when none did; the per-task figures in `metrics.by_task` estimate the split from the stored text in that case.
101
+ */
102
+ reasoning: number | null;
103
+ };
104
+
86
105
  /**
87
106
  * OK
88
107
  */
@@ -127,6 +146,10 @@ export type CreateEvalRunResponseBody = {
127
146
  * Total spend for the run in USD. Null when the harness did not report cost.
128
147
  */
129
148
  costUsd: number | null;
149
+ /**
150
+ * Token totals for the run, summed over its samples when it finalized. Each is null when nothing reported that figure, which is a different fact from zero and must not render as free.
151
+ */
152
+ tokens: Tokens;
130
153
  createdAt: number;
131
154
  startedAt: number | null;
132
155
  completedAt: number | null;
@@ -465,6 +488,47 @@ export function requestCountsFromJSON(
465
488
  );
466
489
  }
467
490
 
491
+ /** @internal */
492
+ export const Tokens$inboundSchema: z.ZodType<Tokens, z.ZodTypeDef, unknown> = z
493
+ .object({
494
+ input: z.nullable(z.number().int()),
495
+ output: z.nullable(z.number().int()),
496
+ cached: z.nullable(z.number().int()),
497
+ reasoning: z.nullable(z.number().int()),
498
+ });
499
+ /** @internal */
500
+ export type Tokens$Outbound = {
501
+ input: number | null;
502
+ output: number | null;
503
+ cached: number | null;
504
+ reasoning: number | null;
505
+ };
506
+
507
+ /** @internal */
508
+ export const Tokens$outboundSchema: z.ZodType<
509
+ Tokens$Outbound,
510
+ z.ZodTypeDef,
511
+ Tokens
512
+ > = z.object({
513
+ input: z.nullable(z.number().int()),
514
+ output: z.nullable(z.number().int()),
515
+ cached: z.nullable(z.number().int()),
516
+ reasoning: z.nullable(z.number().int()),
517
+ });
518
+
519
+ export function tokensToJSON(tokens: Tokens): string {
520
+ return JSON.stringify(Tokens$outboundSchema.parse(tokens));
521
+ }
522
+ export function tokensFromJSON(
523
+ jsonString: string,
524
+ ): SafeParseResult<Tokens, SDKValidationError> {
525
+ return safeParse(
526
+ jsonString,
527
+ (x) => Tokens$inboundSchema.parse(JSON.parse(x)),
528
+ `Failed to parse 'Tokens' from JSON`,
529
+ );
530
+ }
531
+
468
532
  /** @internal */
469
533
  export const CreateEvalRunResponseBody$inboundSchema: z.ZodType<
470
534
  CreateEvalRunResponseBody,
@@ -493,6 +557,7 @@ export const CreateEvalRunResponseBody$inboundSchema: z.ZodType<
493
557
  agent_version: z.nullable(z.string()),
494
558
  agent_effort: z.nullable(z.string()),
495
559
  cost_usd: z.nullable(z.number()),
560
+ tokens: z.lazy(() => Tokens$inboundSchema),
496
561
  created_at: z.number().int(),
497
562
  started_at: z.nullable(z.number().int()),
498
563
  completed_at: z.nullable(z.number().int()),
@@ -545,6 +610,7 @@ export type CreateEvalRunResponseBody$Outbound = {
545
610
  agent_version: string | null;
546
611
  agent_effort: string | null;
547
612
  cost_usd: number | null;
613
+ tokens: Tokens$Outbound;
548
614
  created_at: number;
549
615
  started_at: number | null;
550
616
  completed_at: number | null;
@@ -580,6 +646,7 @@ export const CreateEvalRunResponseBody$outboundSchema: z.ZodType<
580
646
  agentVersion: z.nullable(z.string()),
581
647
  agentEffort: z.nullable(z.string()),
582
648
  costUsd: z.nullable(z.number()),
649
+ tokens: z.lazy(() => Tokens$outboundSchema),
583
650
  createdAt: z.number().int(),
584
651
  startedAt: z.nullable(z.number().int()),
585
652
  completedAt: z.nullable(z.number().int()),