@cat-factory/contracts 0.187.0 → 0.189.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/debug-api.d.ts +1397 -0
  2. package/dist/debug-api.d.ts.map +1 -0
  3. package/dist/debug-api.js +589 -0
  4. package/dist/debug-api.js.map +1 -0
  5. package/dist/execution.d.ts +168 -0
  6. package/dist/execution.d.ts.map +1 -1
  7. package/dist/execution.js +51 -0
  8. package/dist/execution.js.map +1 -1
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/observability.d.ts +71 -0
  14. package/dist/observability.d.ts.map +1 -1
  15. package/dist/observability.js +70 -19
  16. package/dist/observability.js.map +1 -1
  17. package/dist/provisioning-logs.d.ts +0 -2
  18. package/dist/provisioning-logs.d.ts.map +1 -1
  19. package/dist/provisioning-logs.js +0 -2
  20. package/dist/provisioning-logs.js.map +1 -1
  21. package/dist/routes/agent-runs.d.ts +22 -0
  22. package/dist/routes/agent-runs.d.ts.map +1 -1
  23. package/dist/routes/bug-hunt.d.ts +22 -0
  24. package/dist/routes/bug-hunt.d.ts.map +1 -1
  25. package/dist/routes/debug-api.d.ts +743 -0
  26. package/dist/routes/debug-api.d.ts.map +1 -0
  27. package/dist/routes/debug-api.js +82 -0
  28. package/dist/routes/debug-api.js.map +1 -0
  29. package/dist/routes/execution.d.ts +88 -0
  30. package/dist/routes/execution.d.ts.map +1 -1
  31. package/dist/routes/human-review.d.ts +11 -0
  32. package/dist/routes/human-review.d.ts.map +1 -1
  33. package/dist/routes/human-test.d.ts +55 -0
  34. package/dist/routes/human-test.d.ts.map +1 -1
  35. package/dist/routes/index.d.ts +1 -0
  36. package/dist/routes/index.d.ts.map +1 -1
  37. package/dist/routes/index.js +1 -0
  38. package/dist/routes/index.js.map +1 -1
  39. package/dist/routes/visual-confirm.d.ts +33 -0
  40. package/dist/routes/visual-confirm.d.ts.map +1 -1
  41. package/dist/routes/workspaces.d.ts +22 -0
  42. package/dist/routes/workspaces.d.ts.map +1 -1
  43. package/dist/snapshot.d.ts +11 -0
  44. package/dist/snapshot.d.ts.map +1 -1
  45. package/package.json +1 -1
@@ -0,0 +1,1397 @@
1
+ import * as v from 'valibot';
2
+ /** Hard ceiling on rows one page may return. */
3
+ export declare const DEBUG_MAX_PAGE_LIMIT = 100;
4
+ /** Hard ceiling on the per-field body preview a LIST may inline. */
5
+ export declare const DEBUG_MAX_PREVIEW_CHARS = 4000;
6
+ /** Hard ceiling on the per-field body a POINT READ may return. */
7
+ export declare const DEBUG_MAX_BODY_CHARS = 200000;
8
+ /**
9
+ * Hard ceiling on a point read's slice offset — comfortably above the store's own per-body
10
+ * cap (512 kB), so every stored character is reachable, while still rejecting a garbage
11
+ * offset instead of quietly serving an empty slice for it.
12
+ */
13
+ export declare const DEBUG_MAX_BODY_OFFSET = 2000000;
14
+ /** Hard ceiling on a `contains` search term's length. */
15
+ export declare const DEBUG_MAX_SEARCH_CHARS = 256;
16
+ /**
17
+ * A bounded slice of a stored text body, and enough metadata to know what was left out.
18
+ *
19
+ * This is THE reason the surface is safe to hand to a model: a bare truncated string is
20
+ * indistinguishable from a short one, so a reader would confidently conclude "the agent
21
+ * returned nothing" from a payload that merely hit its budget. `totalChars` is always the
22
+ * full stored length, measured in SQL, even when `text` is empty.
23
+ */
24
+ export declare const debugTextSchema: v.ObjectSchema<{
25
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
26
+ readonly text: v.StringSchema<undefined>;
27
+ /**
28
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
29
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
30
+ */
31
+ readonly chars: v.NumberSchema<undefined>;
32
+ /**
33
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
34
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
35
+ * `offset + chars <= totalChars` always holds.
36
+ */
37
+ readonly offset: v.NumberSchema<undefined>;
38
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
39
+ readonly totalChars: v.NumberSchema<undefined>;
40
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
41
+ readonly truncated: v.BooleanSchema<undefined>;
42
+ /**
43
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
44
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
45
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
46
+ * to jump straight to the match without transferring the bytes before it.
47
+ */
48
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
49
+ }, undefined>;
50
+ export type DebugText = v.InferOutput<typeof debugTextSchema>;
51
+ /**
52
+ * The lean run projection every debug list/overview leads with. Deliberately a SUMMARY, not
53
+ * the internal `ExecutionInstance`: a run's persisted `detail` blob carries per-step gate,
54
+ * judge, follow-up, container and validation state that is megabytes on a long run and means
55
+ * nothing to an external caller. What survives is what identifies a run and says whether it
56
+ * is worth opening.
57
+ */
58
+ export declare const debugRunSummarySchema: v.ObjectSchema<{
59
+ readonly runId: v.StringSchema<undefined>;
60
+ /** The board block the run is anchored on (a task, a service frame, or a headless anchor). */
61
+ readonly blockId: v.StringSchema<undefined>;
62
+ readonly pipelineId: v.StringSchema<undefined>;
63
+ readonly pipelineName: v.StringSchema<undefined>;
64
+ readonly status: v.PicklistSchema<["running", "blocked", "done", "paused", "failed"], undefined>;
65
+ /** Epoch-ms creation stamp — also the value the keyset cursor is minted from. */
66
+ readonly createdAt: v.NumberSchema<undefined>;
67
+ /** Index of the step the run is currently on. */
68
+ readonly currentStep: v.NumberSchema<undefined>;
69
+ /** How many steps the run's pipeline has. */
70
+ readonly stepCount: v.NumberSchema<undefined>;
71
+ /** Structured failure diagnostics when the run failed; null otherwise. */
72
+ readonly failure: v.NullableSchema<v.ObjectSchema<{
73
+ readonly kind: v.PicklistSchema<["preflight", "dispatch", "environment", "evicted", "timeout", "agent", "job_failed", "rejected", "companion_rejected", "stalled", "cancelled", "unknown"], undefined>;
74
+ readonly message: v.StringSchema<undefined>;
75
+ readonly detail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
76
+ readonly hint: v.NullableSchema<v.StringSchema<undefined>, undefined>;
77
+ readonly reason: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
78
+ readonly occurredAt: v.NumberSchema<undefined>;
79
+ readonly lastSubtasks: v.NullableSchema<v.ObjectSchema<{
80
+ readonly completed: v.NumberSchema<undefined>;
81
+ readonly inProgress: v.NumberSchema<undefined>;
82
+ readonly total: v.NumberSchema<undefined>;
83
+ readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
84
+ readonly label: v.StringSchema<undefined>;
85
+ readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
86
+ }, undefined>, undefined>, undefined>;
87
+ }, undefined>, undefined>;
88
+ readonly stepIndex: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
89
+ }, undefined>, undefined>;
90
+ }, undefined>;
91
+ export type DebugRunSummary = v.InferOutput<typeof debugRunSummarySchema>;
92
+ /** Query params for `GET /api/v1/debug/runs`. */
93
+ export declare const listDebugRunsQuerySchema: v.ObjectSchema<{
94
+ /** Filter to one internal execution status (`running`/`blocked`/`paused`/`done`/`failed`/…). */
95
+ readonly status: v.OptionalSchema<v.PicklistSchema<["running", "blocked", "done", "paused", "failed"], undefined>, undefined>;
96
+ /** Inclusive lower bound on the run's `createdAt`. */
97
+ readonly since: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number of epoch milliseconds">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
98
+ /** Cap on rows returned (default 25, hard max {@link DEBUG_MAX_PAGE_LIMIT}). */
99
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>;
100
+ /** Opaque keyset cursor from a previous page's `nextCursor`. */
101
+ readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
102
+ }, undefined>;
103
+ export type ListDebugRunsQuery = v.InferOutput<typeof listDebugRunsQuerySchema>;
104
+ export declare const debugRunListSchema: v.ObjectSchema<{
105
+ readonly runs: v.ArraySchema<v.ObjectSchema<{
106
+ readonly runId: v.StringSchema<undefined>;
107
+ /** The board block the run is anchored on (a task, a service frame, or a headless anchor). */
108
+ readonly blockId: v.StringSchema<undefined>;
109
+ readonly pipelineId: v.StringSchema<undefined>;
110
+ readonly pipelineName: v.StringSchema<undefined>;
111
+ readonly status: v.PicklistSchema<["running", "blocked", "done", "paused", "failed"], undefined>;
112
+ /** Epoch-ms creation stamp — also the value the keyset cursor is minted from. */
113
+ readonly createdAt: v.NumberSchema<undefined>;
114
+ /** Index of the step the run is currently on. */
115
+ readonly currentStep: v.NumberSchema<undefined>;
116
+ /** How many steps the run's pipeline has. */
117
+ readonly stepCount: v.NumberSchema<undefined>;
118
+ /** Structured failure diagnostics when the run failed; null otherwise. */
119
+ readonly failure: v.NullableSchema<v.ObjectSchema<{
120
+ readonly kind: v.PicklistSchema<["preflight", "dispatch", "environment", "evicted", "timeout", "agent", "job_failed", "rejected", "companion_rejected", "stalled", "cancelled", "unknown"], undefined>;
121
+ readonly message: v.StringSchema<undefined>;
122
+ readonly detail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
123
+ readonly hint: v.NullableSchema<v.StringSchema<undefined>, undefined>;
124
+ readonly reason: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
125
+ readonly occurredAt: v.NumberSchema<undefined>;
126
+ readonly lastSubtasks: v.NullableSchema<v.ObjectSchema<{
127
+ readonly completed: v.NumberSchema<undefined>;
128
+ readonly inProgress: v.NumberSchema<undefined>;
129
+ readonly total: v.NumberSchema<undefined>;
130
+ readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
131
+ readonly label: v.StringSchema<undefined>;
132
+ readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
133
+ }, undefined>, undefined>, undefined>;
134
+ }, undefined>, undefined>;
135
+ readonly stepIndex: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
136
+ }, undefined>, undefined>;
137
+ }, undefined>, undefined>;
138
+ /** Cursor for the next page, or null when this was the last page. */
139
+ readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
140
+ }, undefined>;
141
+ export type DebugRunList = v.InferOutput<typeof debugRunListSchema>;
142
+ /**
143
+ * One step of the run, projected to what a diagnosis actually reads. The internal
144
+ * `PipelineStep` carries two dozen per-kind state blobs (gate, judge, follow-ups, container,
145
+ * validation, reproduction, …) that are megabytes on a long run and meaningless without the
146
+ * engine's vocabulary; what survives here is the step's identity, its clocks, and the two
147
+ * things that explain a stuck step — whether its container kept dying, and what killed it.
148
+ */
149
+ export declare const debugRunStepSchema: v.ObjectSchema<{
150
+ readonly index: v.NumberSchema<undefined>;
151
+ readonly agentKind: v.StringSchema<undefined>;
152
+ /** Lifecycle state (`pending` / `working` / `waiting_decision` / `done` / …). */
153
+ readonly state: v.StringSchema<undefined>;
154
+ readonly progress: v.NumberSchema<undefined>;
155
+ /** The resolved model this step dispatched on, when the engine recorded one. */
156
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
157
+ /** Whether the pipeline skipped this step. */
158
+ readonly skipped: v.BooleanSchema<undefined>;
159
+ /** Epoch ms the step first began executing; null until it starts. */
160
+ readonly startedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
161
+ /** Epoch ms the step finished; null until it completes. */
162
+ readonly finishedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
163
+ /**
164
+ * Epoch ms of the container agent's last observed sign of life. The field that separates a
165
+ * genuinely-active-but-quiet step (a reviewer reading hundreds of files) from a wedged one,
166
+ * which no other clock here can distinguish. Null on non-container steps.
167
+ */
168
+ readonly lastActivityAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
169
+ /** Live/last subtask counts for an async container step; null when none were reported. */
170
+ readonly subtasks: v.NullableSchema<v.ObjectSchema<{
171
+ readonly completed: v.NumberSchema<undefined>;
172
+ readonly inProgress: v.NumberSchema<undefined>;
173
+ readonly total: v.NumberSchema<undefined>;
174
+ }, undefined>, undefined>;
175
+ /** Characters of prose output the step produced (0 ⇒ it produced none). */
176
+ readonly outputChars: v.NumberSchema<undefined>;
177
+ /** Whether the step produced a structured result (`step.custom`). */
178
+ readonly hasStructuredResult: v.BooleanSchema<undefined>;
179
+ /** How many times this step's container was evicted/crashed and automatically re-dispatched. */
180
+ readonly evictionRecoveries: v.NumberSchema<undefined>;
181
+ /**
182
+ * The post-mortem retained from the FIRST container death on this step (exit state plus a
183
+ * scrubbed log tail). Null when the step's containers never died. Bounded like every other
184
+ * body on this surface.
185
+ */
186
+ readonly firstEvictionDetail: v.NullableSchema<v.ObjectSchema<{
187
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
188
+ readonly text: v.StringSchema<undefined>;
189
+ /**
190
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
191
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
192
+ */
193
+ readonly chars: v.NumberSchema<undefined>;
194
+ /**
195
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
196
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
197
+ * `offset + chars <= totalChars` always holds.
198
+ */
199
+ readonly offset: v.NumberSchema<undefined>;
200
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
201
+ readonly totalChars: v.NumberSchema<undefined>;
202
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
203
+ readonly truncated: v.BooleanSchema<undefined>;
204
+ /**
205
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
206
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
207
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
208
+ * to jump straight to the match without transferring the bytes before it.
209
+ */
210
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
211
+ }, undefined>, undefined>;
212
+ }, undefined>;
213
+ export type DebugRunStep = v.InferOutput<typeof debugRunStepSchema>;
214
+ /**
215
+ * Whether one telemetry sink has anything for this run, and how much. The point of the block
216
+ * is to stop a caller issuing four detail requests to discover three of them are empty —
217
+ * `available: false` means the sink's repository is not wired on this deployment, so a zero
218
+ * count there is "we never recorded this", not "nothing happened".
219
+ *
220
+ * Availability is REPOSITORY presence only. The capture-time gates (`LLM_RECORD_PROMPTS`, the
221
+ * per-workspace `storeAgentContext`) act at record time and are invisible here: a workspace
222
+ * that opted out of capture reads `available: true, count: 0`.
223
+ */
224
+ export declare const debugSinkStatusSchema: v.ObjectSchema<{
225
+ readonly available: v.BooleanSchema<undefined>;
226
+ readonly count: v.NumberSchema<undefined>;
227
+ }, undefined>;
228
+ export type DebugSinkStatus = v.InferOutput<typeof debugSinkStatusSchema>;
229
+ /** Severity of a derived diagnostic signal. */
230
+ export declare const debugSignalSeveritySchema: v.PicklistSchema<["info", "warning", "error"], undefined>;
231
+ export type DebugSignalSeverity = v.InferOutput<typeof debugSignalSeveritySchema>;
232
+ /**
233
+ * A precomputed diagnostic hint. These are derivations the caller could make itself from the
234
+ * rollups — which is exactly why they are here: a model that has to rediscover "13 of 40 calls
235
+ * were truncated" by arithmetic over a payload will sometimes get it wrong, and will always
236
+ * spend context doing it. `code` is machine-readable and stable; `message` restates it in
237
+ * prose so the payload is useful with no external key.
238
+ */
239
+ export declare const debugSignalSchema: v.ObjectSchema<{
240
+ readonly code: v.StringSchema<undefined>;
241
+ readonly severity: v.PicklistSchema<["info", "warning", "error"], undefined>;
242
+ readonly message: v.StringSchema<undefined>;
243
+ /** How many occurrences the signal counts (truncated calls, failed provisions, …); null when it counts nothing. */
244
+ readonly count: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
245
+ /** The agent kind the signal is about, when it is scoped to one. */
246
+ readonly agentKind: v.NullableSchema<v.StringSchema<undefined>, undefined>;
247
+ /** The step index the signal is about, when it is scoped to one. */
248
+ readonly stepIndex: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
249
+ }, undefined>;
250
+ export type DebugSignal = v.InferOutput<typeof debugSignalSchema>;
251
+ /**
252
+ * The run's diagnostic map: identity, per-step state, what each telemetry sink holds, the
253
+ * SQL-aggregated LLM rollups, and the derived signals. Composed from aggregates only — it
254
+ * reads no prompt, response or context body, so it stays cheap enough to be the first call a
255
+ * debugging client always makes.
256
+ */
257
+ export declare const debugRunOverviewSchema: v.ObjectSchema<{
258
+ /** Schema marker so a consuming model knows the shape without external docs. */
259
+ readonly kind: v.LiteralSchema<"cat-factory.run-debug-overview", undefined>;
260
+ readonly version: v.LiteralSchema<1, undefined>;
261
+ /** When this projection was computed (epoch ms). */
262
+ readonly generatedAt: v.NumberSchema<undefined>;
263
+ readonly run: v.ObjectSchema<{
264
+ readonly runId: v.StringSchema<undefined>;
265
+ /** The board block the run is anchored on (a task, a service frame, or a headless anchor). */
266
+ readonly blockId: v.StringSchema<undefined>;
267
+ readonly pipelineId: v.StringSchema<undefined>;
268
+ readonly pipelineName: v.StringSchema<undefined>;
269
+ readonly status: v.PicklistSchema<["running", "blocked", "done", "paused", "failed"], undefined>;
270
+ /** Epoch-ms creation stamp — also the value the keyset cursor is minted from. */
271
+ readonly createdAt: v.NumberSchema<undefined>;
272
+ /** Index of the step the run is currently on. */
273
+ readonly currentStep: v.NumberSchema<undefined>;
274
+ /** How many steps the run's pipeline has. */
275
+ readonly stepCount: v.NumberSchema<undefined>;
276
+ /** Structured failure diagnostics when the run failed; null otherwise. */
277
+ readonly failure: v.NullableSchema<v.ObjectSchema<{
278
+ readonly kind: v.PicklistSchema<["preflight", "dispatch", "environment", "evicted", "timeout", "agent", "job_failed", "rejected", "companion_rejected", "stalled", "cancelled", "unknown"], undefined>;
279
+ readonly message: v.StringSchema<undefined>;
280
+ readonly detail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
281
+ readonly hint: v.NullableSchema<v.StringSchema<undefined>, undefined>;
282
+ readonly reason: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
283
+ readonly occurredAt: v.NumberSchema<undefined>;
284
+ readonly lastSubtasks: v.NullableSchema<v.ObjectSchema<{
285
+ readonly completed: v.NumberSchema<undefined>;
286
+ readonly inProgress: v.NumberSchema<undefined>;
287
+ readonly total: v.NumberSchema<undefined>;
288
+ readonly items: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
289
+ readonly label: v.StringSchema<undefined>;
290
+ readonly status: v.PicklistSchema<["pending", "in_progress", "completed"], undefined>;
291
+ }, undefined>, undefined>, undefined>;
292
+ }, undefined>, undefined>;
293
+ readonly stepIndex: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
294
+ }, undefined>, undefined>;
295
+ }, undefined>;
296
+ readonly steps: v.ArraySchema<v.ObjectSchema<{
297
+ readonly index: v.NumberSchema<undefined>;
298
+ readonly agentKind: v.StringSchema<undefined>;
299
+ /** Lifecycle state (`pending` / `working` / `waiting_decision` / `done` / …). */
300
+ readonly state: v.StringSchema<undefined>;
301
+ readonly progress: v.NumberSchema<undefined>;
302
+ /** The resolved model this step dispatched on, when the engine recorded one. */
303
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
304
+ /** Whether the pipeline skipped this step. */
305
+ readonly skipped: v.BooleanSchema<undefined>;
306
+ /** Epoch ms the step first began executing; null until it starts. */
307
+ readonly startedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
308
+ /** Epoch ms the step finished; null until it completes. */
309
+ readonly finishedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
310
+ /**
311
+ * Epoch ms of the container agent's last observed sign of life. The field that separates a
312
+ * genuinely-active-but-quiet step (a reviewer reading hundreds of files) from a wedged one,
313
+ * which no other clock here can distinguish. Null on non-container steps.
314
+ */
315
+ readonly lastActivityAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
316
+ /** Live/last subtask counts for an async container step; null when none were reported. */
317
+ readonly subtasks: v.NullableSchema<v.ObjectSchema<{
318
+ readonly completed: v.NumberSchema<undefined>;
319
+ readonly inProgress: v.NumberSchema<undefined>;
320
+ readonly total: v.NumberSchema<undefined>;
321
+ }, undefined>, undefined>;
322
+ /** Characters of prose output the step produced (0 ⇒ it produced none). */
323
+ readonly outputChars: v.NumberSchema<undefined>;
324
+ /** Whether the step produced a structured result (`step.custom`). */
325
+ readonly hasStructuredResult: v.BooleanSchema<undefined>;
326
+ /** How many times this step's container was evicted/crashed and automatically re-dispatched. */
327
+ readonly evictionRecoveries: v.NumberSchema<undefined>;
328
+ /**
329
+ * The post-mortem retained from the FIRST container death on this step (exit state plus a
330
+ * scrubbed log tail). Null when the step's containers never died. Bounded like every other
331
+ * body on this surface.
332
+ */
333
+ readonly firstEvictionDetail: v.NullableSchema<v.ObjectSchema<{
334
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
335
+ readonly text: v.StringSchema<undefined>;
336
+ /**
337
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
338
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
339
+ */
340
+ readonly chars: v.NumberSchema<undefined>;
341
+ /**
342
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
343
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
344
+ * `offset + chars <= totalChars` always holds.
345
+ */
346
+ readonly offset: v.NumberSchema<undefined>;
347
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
348
+ readonly totalChars: v.NumberSchema<undefined>;
349
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
350
+ readonly truncated: v.BooleanSchema<undefined>;
351
+ /**
352
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
353
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
354
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
355
+ * to jump straight to the match without transferring the bytes before it.
356
+ */
357
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
358
+ }, undefined>, undefined>;
359
+ }, undefined>, undefined>;
360
+ /**
361
+ * Where and on what the run's most recent container step executed (backend, model, repo,
362
+ * control-plane host), when the engine recorded it. Null for a pure-inline run.
363
+ */
364
+ readonly diagnostics: v.NullableSchema<v.ObjectSchema<{
365
+ readonly lastDispatch: v.OptionalSchema<v.ObjectSchema<{
366
+ readonly stepIndex: v.NumberSchema<undefined>;
367
+ readonly agentKind: v.StringSchema<undefined>;
368
+ readonly model: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
369
+ readonly executionBackend: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
370
+ readonly repo: v.OptionalSchema<v.ObjectSchema<{
371
+ readonly owner: v.StringSchema<undefined>;
372
+ readonly name: v.StringSchema<undefined>;
373
+ readonly baseBranch: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
374
+ readonly provider: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
375
+ }, undefined>, undefined>;
376
+ readonly at: v.NumberSchema<undefined>;
377
+ }, undefined>, undefined>;
378
+ readonly host: v.OptionalSchema<v.ObjectSchema<{
379
+ readonly platform: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
380
+ }, undefined>, undefined>;
381
+ }, undefined>, undefined>;
382
+ readonly sinks: v.ObjectSchema<{
383
+ readonly llmCalls: v.ObjectSchema<{
384
+ readonly available: v.BooleanSchema<undefined>;
385
+ readonly count: v.NumberSchema<undefined>;
386
+ }, undefined>;
387
+ readonly agentContext: v.ObjectSchema<{
388
+ readonly available: v.BooleanSchema<undefined>;
389
+ readonly count: v.NumberSchema<undefined>;
390
+ }, undefined>;
391
+ readonly searchQueries: v.ObjectSchema<{
392
+ readonly available: v.BooleanSchema<undefined>;
393
+ readonly count: v.NumberSchema<undefined>;
394
+ }, undefined>;
395
+ readonly provisioningLog: v.ObjectSchema<{
396
+ readonly available: v.BooleanSchema<undefined>;
397
+ readonly count: v.NumberSchema<undefined>;
398
+ }, undefined>;
399
+ }, undefined>;
400
+ /**
401
+ * The run's model activity, aggregated in SQL. `byAgentKind` reuses the same insight shape
402
+ * the LLM-metrics export publishes, derived ratios included, so the two never disagree.
403
+ *
404
+ * `byPhase` re-cuts the SAME aggregate along the other axis — WHICH slice of the run's work
405
+ * spent the tokens (the agent's edit loop, a validation repair round, a reproduction-proof
406
+ * round, …) — with the carry cost that says how much each phase burdened the turns after it.
407
+ * It is the axis a caller asked "why did this trivial task cost a million tokens" needs, and
408
+ * `byAgentKind` cannot answer it: one coder step contains every phase. Both are folds over
409
+ * one `GROUP BY`, so their totals agree by construction. Rows are ordered by descending
410
+ * carry cost — the expensive slice first, which is what the caller is looking for.
411
+ */
412
+ readonly llm: v.ObjectSchema<{
413
+ readonly totals: v.ObjectSchema<{
414
+ readonly calls: v.NumberSchema<undefined>;
415
+ readonly promptTokens: v.NumberSchema<undefined>;
416
+ readonly cacheReadTokens: v.NumberSchema<undefined>;
417
+ readonly cacheWriteTokens: v.NumberSchema<undefined>;
418
+ readonly cacheHitRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
419
+ readonly completionTokens: v.NumberSchema<undefined>;
420
+ readonly upstreamMs: v.NumberSchema<undefined>;
421
+ readonly overheadMs: v.NumberSchema<undefined>;
422
+ readonly transportOverheadRatio: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
423
+ readonly errors: v.NumberSchema<undefined>;
424
+ readonly warnings: v.NumberSchema<undefined>;
425
+ readonly truncatedCalls: v.NumberSchema<undefined>;
426
+ }, undefined>;
427
+ readonly byAgentKind: v.ArraySchema<v.ObjectSchema<{
428
+ readonly agentKind: v.StringSchema<undefined>;
429
+ readonly calls: v.NumberSchema<undefined>;
430
+ readonly promptTokens: v.NumberSchema<undefined>;
431
+ readonly cacheReadTokens: v.NumberSchema<undefined>;
432
+ readonly cacheWriteTokens: v.NumberSchema<undefined>;
433
+ readonly cacheHitRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
434
+ readonly completionTokens: v.NumberSchema<undefined>;
435
+ readonly peakCompletionTokens: v.NumberSchema<undefined>;
436
+ readonly maxOutputTokens: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
437
+ readonly outputHeadroomRatio: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
438
+ readonly truncatedCalls: v.NumberSchema<undefined>;
439
+ readonly upstreamMs: v.NumberSchema<undefined>;
440
+ readonly overheadMs: v.NumberSchema<undefined>;
441
+ readonly transportOverheadRatio: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
442
+ readonly errors: v.NumberSchema<undefined>;
443
+ readonly warnings: v.NumberSchema<undefined>;
444
+ }, undefined>, undefined>;
445
+ readonly byPhase: v.ArraySchema<v.ObjectSchema<{
446
+ readonly phase: v.StringSchema<undefined>;
447
+ readonly calls: v.NumberSchema<undefined>;
448
+ readonly promptTokens: v.NumberSchema<undefined>;
449
+ readonly cacheReadTokens: v.NumberSchema<undefined>;
450
+ readonly cacheWriteTokens: v.NumberSchema<undefined>;
451
+ readonly cacheHitRate: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
452
+ readonly completionTokens: v.NumberSchema<undefined>;
453
+ readonly carryCostTokens: v.NumberSchema<undefined>;
454
+ readonly carryCostShare: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
455
+ readonly upstreamMs: v.NumberSchema<undefined>;
456
+ readonly overheadMs: v.NumberSchema<undefined>;
457
+ readonly errors: v.NumberSchema<undefined>;
458
+ readonly warnings: v.NumberSchema<undefined>;
459
+ readonly truncatedCalls: v.NumberSchema<undefined>;
460
+ }, undefined>, undefined>;
461
+ }, undefined>;
462
+ readonly signals: v.ArraySchema<v.ObjectSchema<{
463
+ readonly code: v.StringSchema<undefined>;
464
+ readonly severity: v.PicklistSchema<["info", "warning", "error"], undefined>;
465
+ readonly message: v.StringSchema<undefined>;
466
+ /** How many occurrences the signal counts (truncated calls, failed provisions, …); null when it counts nothing. */
467
+ readonly count: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
468
+ /** The agent kind the signal is about, when it is scoped to one. */
469
+ readonly agentKind: v.NullableSchema<v.StringSchema<undefined>, undefined>;
470
+ /** The step index the signal is about, when it is scoped to one. */
471
+ readonly stepIndex: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
472
+ }, undefined>, undefined>;
473
+ }, undefined>;
474
+ export type DebugRunOverview = v.InferOutput<typeof debugRunOverviewSchema>;
475
+ /** Classification of a recorded call, precomputed so a caller need not re-derive it. */
476
+ export declare const debugCallOutcomeSchema: v.PicklistSchema<["ok", "warning", "error"], undefined>;
477
+ export type DebugCallOutcome = v.InferOutput<typeof debugCallOutcomeSchema>;
478
+ /** Chronological direction a call page walks in. */
479
+ export declare const debugCallOrderSchema: v.PicklistSchema<["newest", "oldest"], undefined>;
480
+ export type DebugCallOrder = v.InferOutput<typeof debugCallOrderSchema>;
481
+ /** How the single-call point read presents the prompt delta. */
482
+ export declare const debugCallViewSchema: v.PicklistSchema<["raw", "messages"], undefined>;
483
+ export type DebugCallView = v.InferOutput<typeof debugCallViewSchema>;
484
+ /**
485
+ * One message of a parsed prompt delta (`?view=messages` on the point read). The parse is
486
+ * LENIENT — both telemetry producers store `JSON.stringify` of a `{ role, content }` array,
487
+ * but the content shapes differ (OpenAI-style strings/parts/`tool_calls` from the proxy,
488
+ * vendor content blocks from the harness transcript), so unrecognised parts degrade to a
489
+ * `[type]` placeholder rather than failing the message.
490
+ */
491
+ export declare const debugPromptMessageSchema: v.ObjectSchema<{
492
+ /**
493
+ * The message's absolute position in the FULL conversation (`elidedLeadingMessages` +
494
+ * its position in the delta), so two calls' parsed views line up without arithmetic.
495
+ */
496
+ readonly index: v.NumberSchema<undefined>;
497
+ /** The message's role verbatim (`system` / `user` / `assistant` / `tool` / …), `unknown` when absent. */
498
+ readonly role: v.StringSchema<undefined>;
499
+ /** The message's `name` field (a named tool/function turn), when the producer recorded one. */
500
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
501
+ /** The tool invocation a tool-result turn answers, when the producer recorded the id. */
502
+ readonly toolCallId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
503
+ /** Tool invocations an assistant turn requested: the tool's name plus its budgeted serialized arguments. */
504
+ readonly toolCalls: v.ArraySchema<v.ObjectSchema<{
505
+ readonly name: v.StringSchema<undefined>;
506
+ readonly args: v.ObjectSchema<{
507
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
508
+ readonly text: v.StringSchema<undefined>;
509
+ /**
510
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
511
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
512
+ */
513
+ readonly chars: v.NumberSchema<undefined>;
514
+ /**
515
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
516
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
517
+ * `offset + chars <= totalChars` always holds.
518
+ */
519
+ readonly offset: v.NumberSchema<undefined>;
520
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
521
+ readonly totalChars: v.NumberSchema<undefined>;
522
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
523
+ readonly truncated: v.BooleanSchema<undefined>;
524
+ /**
525
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
526
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
527
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
528
+ * to jump straight to the match without transferring the bytes before it.
529
+ */
530
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
531
+ }, undefined>;
532
+ }, undefined>, undefined>;
533
+ /** The message's textual content, budgeted INDEPENDENTLY of every other message's. */
534
+ readonly content: v.ObjectSchema<{
535
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
536
+ readonly text: v.StringSchema<undefined>;
537
+ /**
538
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
539
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
540
+ */
541
+ readonly chars: v.NumberSchema<undefined>;
542
+ /**
543
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
544
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
545
+ * `offset + chars <= totalChars` always holds.
546
+ */
547
+ readonly offset: v.NumberSchema<undefined>;
548
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
549
+ readonly totalChars: v.NumberSchema<undefined>;
550
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
551
+ readonly truncated: v.BooleanSchema<undefined>;
552
+ /**
553
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
554
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
555
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
556
+ * to jump straight to the match without transferring the bytes before it.
557
+ */
558
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
559
+ }, undefined>;
560
+ }, undefined>;
561
+ export type DebugPromptMessage = v.InferOutput<typeof debugPromptMessageSchema>;
562
+ /**
563
+ * One recorded model call. The three body fields are always PRESENT but empty unless the
564
+ * caller asked for a preview — their `totalChars` is measured in SQL either way, so a
565
+ * zero-cost sweep still shows exactly how much text each call holds.
566
+ *
567
+ * `prompt` is the call's DELTA — only the messages this call appended to its conversation.
568
+ * That is how the store keeps prompts (a container agent re-sends its whole growing history
569
+ * every turn, so storing the full array per call is ~21x redundant), and it is also the right
570
+ * shape for reading: walk one agent kind's calls with `order=oldest` and the concatenated
571
+ * deltas ARE the conversation, with no prefix re-sent to the caller either.
572
+ */
573
+ export declare const debugLlmCallSchema: v.ObjectSchema<{
574
+ readonly callId: v.StringSchema<undefined>;
575
+ readonly runId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
576
+ readonly agentKind: v.StringSchema<undefined>;
577
+ readonly provider: v.StringSchema<undefined>;
578
+ readonly model: v.StringSchema<undefined>;
579
+ readonly createdAt: v.NumberSchema<undefined>;
580
+ readonly outcome: v.PicklistSchema<["ok", "warning", "error"], undefined>;
581
+ readonly ok: v.BooleanSchema<undefined>;
582
+ readonly httpStatus: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
583
+ readonly errorMessage: v.NullableSchema<v.StringSchema<undefined>, undefined>;
584
+ readonly finishReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
585
+ readonly streaming: v.BooleanSchema<undefined>;
586
+ /**
587
+ * WHICH slice of the run spent this call: the agent's own edit loop (`agent`), a pre-PR
588
+ * validation repair round (`validation-repair`), a reproduction-proof repair round
589
+ * (`reproduction-repair`), … Stamped by whoever owns the loop boundary, never reconstructed
590
+ * from timestamps, which is why it is worth reading rather than inferring.
591
+ *
592
+ * `''` means the call could not be attributed — an older harness image, an inline call, or the
593
+ * un-phased proxy path. That is a REAL slice, not a gap: a run whose calls are all `''` was
594
+ * metered by something that has no phase concept, NOT one that spent nothing outside the agent.
595
+ */
596
+ readonly phase: v.StringSchema<undefined>;
597
+ /**
598
+ * The call's ordinal within its job's telemetry sequence (0-based), so a phase's calls can be
599
+ * ordered by TURN rather than by wall clock.
600
+ *
601
+ * `null` where the producing channel has no turn concept — the LLM proxy sees one HTTP request
602
+ * at a time with no job-scoped counter. Deliberately not faked to 0, which would read as "the
603
+ * first turn" and sort every proxied call to the front of its phase.
604
+ */
605
+ readonly turnIndex: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
606
+ /** Messages in the FULL request (not just the delta below). */
607
+ readonly messageCount: v.NumberSchema<undefined>;
608
+ /** Tools offered to the model (0 ⇒ the agent could not edit anything). */
609
+ readonly toolCount: v.NumberSchema<undefined>;
610
+ readonly requestMaxTokens: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
611
+ /** FRESH (uncached) input tokens — exclusive of both cache classes below. */
612
+ readonly promptTokens: v.NumberSchema<undefined>;
613
+ /** Input tokens served from the provider's prefix cache (priced around 0.1x fresh). */
614
+ readonly cacheReadTokens: v.NumberSchema<undefined>;
615
+ /**
616
+ * Input tokens WRITTEN into the provider's cache (priced 1.25-2x fresh). Kept apart from
617
+ * the reads because summed together, a loop that keeps invalidating and re-writing its
618
+ * prefix is indistinguishable from one riding a warm cache — and telling those apart is
619
+ * often the whole question when a run costs more than it should.
620
+ */
621
+ readonly cacheWriteTokens: v.NumberSchema<undefined>;
622
+ readonly completionTokens: v.NumberSchema<undefined>;
623
+ readonly totalTokens: v.NumberSchema<undefined>;
624
+ readonly upstreamMs: v.NumberSchema<undefined>;
625
+ readonly overheadMs: v.NumberSchema<undefined>;
626
+ readonly totalMs: v.NumberSchema<undefined>;
627
+ /** Leading messages elided from `prompt` because an earlier call in the chain stored them. */
628
+ readonly elidedLeadingMessages: v.NumberSchema<undefined>;
629
+ /** The messages this call APPENDED, as JSON (see the note above). */
630
+ readonly prompt: v.ObjectSchema<{
631
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
632
+ readonly text: v.StringSchema<undefined>;
633
+ /**
634
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
635
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
636
+ */
637
+ readonly chars: v.NumberSchema<undefined>;
638
+ /**
639
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
640
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
641
+ * `offset + chars <= totalChars` always holds.
642
+ */
643
+ readonly offset: v.NumberSchema<undefined>;
644
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
645
+ readonly totalChars: v.NumberSchema<undefined>;
646
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
647
+ readonly truncated: v.BooleanSchema<undefined>;
648
+ /**
649
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
650
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
651
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
652
+ * to jump straight to the match without transferring the bytes before it.
653
+ */
654
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
655
+ }, undefined>;
656
+ /** The assistant's visible reply. */
657
+ readonly response: v.ObjectSchema<{
658
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
659
+ readonly text: v.StringSchema<undefined>;
660
+ /**
661
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
662
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
663
+ */
664
+ readonly chars: v.NumberSchema<undefined>;
665
+ /**
666
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
667
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
668
+ * `offset + chars <= totalChars` always holds.
669
+ */
670
+ readonly offset: v.NumberSchema<undefined>;
671
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
672
+ readonly totalChars: v.NumberSchema<undefined>;
673
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
674
+ readonly truncated: v.BooleanSchema<undefined>;
675
+ /**
676
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
677
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
678
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
679
+ * to jump straight to the match without transferring the bytes before it.
680
+ */
681
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
682
+ }, undefined>;
683
+ /** The model's separate reasoning channel, when it emits one. */
684
+ readonly reasoning: v.ObjectSchema<{
685
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
686
+ readonly text: v.StringSchema<undefined>;
687
+ /**
688
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
689
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
690
+ */
691
+ readonly chars: v.NumberSchema<undefined>;
692
+ /**
693
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
694
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
695
+ * `offset + chars <= totalChars` always holds.
696
+ */
697
+ readonly offset: v.NumberSchema<undefined>;
698
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
699
+ readonly totalChars: v.NumberSchema<undefined>;
700
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
701
+ readonly truncated: v.BooleanSchema<undefined>;
702
+ /**
703
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
704
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
705
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
706
+ * to jump straight to the match without transferring the bytes before it.
707
+ */
708
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
709
+ }, undefined>;
710
+ /**
711
+ * The prompt delta parsed into per-message rows, each budgeted independently — present only
712
+ * on a `?view=messages` point read. `null` there means the stored delta did not parse as a
713
+ * message array (the raw `prompt` is served instead, so the view degrades rather than
714
+ * returning nothing); absent means the caller did not ask for the view. Independent budgets
715
+ * are the point: in the raw view one enormous leading tool result must be paid for before
716
+ * anything after it is visible, while here every message shows its head. The response's
717
+ * worst case stays computable — `(messageCount − elidedLeadingMessages) × bodyChars`, both
718
+ * factors already on the list row.
719
+ */
720
+ readonly promptMessages: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
721
+ /**
722
+ * The message's absolute position in the FULL conversation (`elidedLeadingMessages` +
723
+ * its position in the delta), so two calls' parsed views line up without arithmetic.
724
+ */
725
+ readonly index: v.NumberSchema<undefined>;
726
+ /** The message's role verbatim (`system` / `user` / `assistant` / `tool` / …), `unknown` when absent. */
727
+ readonly role: v.StringSchema<undefined>;
728
+ /** The message's `name` field (a named tool/function turn), when the producer recorded one. */
729
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
730
+ /** The tool invocation a tool-result turn answers, when the producer recorded the id. */
731
+ readonly toolCallId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
732
+ /** Tool invocations an assistant turn requested: the tool's name plus its budgeted serialized arguments. */
733
+ readonly toolCalls: v.ArraySchema<v.ObjectSchema<{
734
+ readonly name: v.StringSchema<undefined>;
735
+ readonly args: v.ObjectSchema<{
736
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
737
+ readonly text: v.StringSchema<undefined>;
738
+ /**
739
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
740
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
741
+ */
742
+ readonly chars: v.NumberSchema<undefined>;
743
+ /**
744
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
745
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
746
+ * `offset + chars <= totalChars` always holds.
747
+ */
748
+ readonly offset: v.NumberSchema<undefined>;
749
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
750
+ readonly totalChars: v.NumberSchema<undefined>;
751
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
752
+ readonly truncated: v.BooleanSchema<undefined>;
753
+ /**
754
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
755
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
756
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
757
+ * to jump straight to the match without transferring the bytes before it.
758
+ */
759
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
760
+ }, undefined>;
761
+ }, undefined>, undefined>;
762
+ /** The message's textual content, budgeted INDEPENDENTLY of every other message's. */
763
+ readonly content: v.ObjectSchema<{
764
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
765
+ readonly text: v.StringSchema<undefined>;
766
+ /**
767
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
768
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
769
+ */
770
+ readonly chars: v.NumberSchema<undefined>;
771
+ /**
772
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
773
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
774
+ * `offset + chars <= totalChars` always holds.
775
+ */
776
+ readonly offset: v.NumberSchema<undefined>;
777
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
778
+ readonly totalChars: v.NumberSchema<undefined>;
779
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
780
+ readonly truncated: v.BooleanSchema<undefined>;
781
+ /**
782
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
783
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
784
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
785
+ * to jump straight to the match without transferring the bytes before it.
786
+ */
787
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
788
+ }, undefined>;
789
+ }, undefined>, undefined>, undefined>, undefined>;
790
+ }, undefined>;
791
+ export type DebugLlmCall = v.InferOutput<typeof debugLlmCallSchema>;
792
+ /** Query params for `GET /api/v1/debug/runs/:runId/llm-calls`. */
793
+ export declare const listDebugLlmCallsQuerySchema: v.ObjectSchema<{
794
+ /** Narrow to one step kind's conversation (`coder`, `ci-fixer`, …), applied in SQL. */
795
+ readonly agentKind: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
796
+ /**
797
+ * Narrow to one PHASE's calls (`agent`, `validation-repair`, `reproduction-repair`, …), an
798
+ * exact match applied in SQL. This is how "what did the repair rounds cost" is answered in one
799
+ * request rather than by paging the run and grouping client-side.
800
+ *
801
+ * Unlike `agentKind` the EMPTY string is accepted and meaningful: it selects the unattributed
802
+ * slice (an older harness image, an inline call, the un-phased proxy path), which is otherwise
803
+ * unreachable as a query.
804
+ */
805
+ readonly phase: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 120, undefined>]>, undefined>;
806
+ /** Narrow to failing or warning (truncated / filtered) calls only. */
807
+ readonly outcome: v.OptionalSchema<v.PicklistSchema<["ok", "warning", "error"], undefined>, undefined>;
808
+ /**
809
+ * Narrow to calls whose prompt delta, response or reasoning CONTAINS this literal substring,
810
+ * matched case-insensitively in SQL. This is the surface's grep — the way a caller finds a
811
+ * tool-validation error, a repeated apology, or any known marker across thousands of calls
812
+ * in ONE request instead of paging every body through its own context. Matched rows report
813
+ * a per-body `matchOffset`; wildcards (`%`/`_`) match literally.
814
+ */
815
+ readonly contains: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>]>, undefined>;
816
+ /** `newest` (default) for triage; `oldest` to read a conversation forwards. */
817
+ readonly order: v.OptionalSchema<v.PicklistSchema<["newest", "oldest"], undefined>, undefined>;
818
+ /** Cap on rows returned (default 25, hard max {@link DEBUG_MAX_PAGE_LIMIT}). */
819
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>;
820
+ readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
821
+ /**
822
+ * Per-field body preview budget, 0..{@link DEBUG_MAX_PREVIEW_CHARS}. Default 0: the sweep
823
+ * returns sizes only. Bodies are sliced IN SQL, so an un-previewed page never reads the
824
+ * text columns out of the store at all.
825
+ */
826
+ readonly bodyChars: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 4000, undefined>]>, undefined>;
827
+ }, undefined>;
828
+ export type ListDebugLlmCallsQuery = v.InferOutput<typeof listDebugLlmCallsQuerySchema>;
829
+ export declare const debugLlmCallListSchema: v.ObjectSchema<{
830
+ readonly calls: v.ArraySchema<v.ObjectSchema<{
831
+ readonly callId: v.StringSchema<undefined>;
832
+ readonly runId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
833
+ readonly agentKind: v.StringSchema<undefined>;
834
+ readonly provider: v.StringSchema<undefined>;
835
+ readonly model: v.StringSchema<undefined>;
836
+ readonly createdAt: v.NumberSchema<undefined>;
837
+ readonly outcome: v.PicklistSchema<["ok", "warning", "error"], undefined>;
838
+ readonly ok: v.BooleanSchema<undefined>;
839
+ readonly httpStatus: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
840
+ readonly errorMessage: v.NullableSchema<v.StringSchema<undefined>, undefined>;
841
+ readonly finishReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
842
+ readonly streaming: v.BooleanSchema<undefined>;
843
+ /**
844
+ * WHICH slice of the run spent this call: the agent's own edit loop (`agent`), a pre-PR
845
+ * validation repair round (`validation-repair`), a reproduction-proof repair round
846
+ * (`reproduction-repair`), … Stamped by whoever owns the loop boundary, never reconstructed
847
+ * from timestamps, which is why it is worth reading rather than inferring.
848
+ *
849
+ * `''` means the call could not be attributed — an older harness image, an inline call, or the
850
+ * un-phased proxy path. That is a REAL slice, not a gap: a run whose calls are all `''` was
851
+ * metered by something that has no phase concept, NOT one that spent nothing outside the agent.
852
+ */
853
+ readonly phase: v.StringSchema<undefined>;
854
+ /**
855
+ * The call's ordinal within its job's telemetry sequence (0-based), so a phase's calls can be
856
+ * ordered by TURN rather than by wall clock.
857
+ *
858
+ * `null` where the producing channel has no turn concept — the LLM proxy sees one HTTP request
859
+ * at a time with no job-scoped counter. Deliberately not faked to 0, which would read as "the
860
+ * first turn" and sort every proxied call to the front of its phase.
861
+ */
862
+ readonly turnIndex: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
863
+ /** Messages in the FULL request (not just the delta below). */
864
+ readonly messageCount: v.NumberSchema<undefined>;
865
+ /** Tools offered to the model (0 ⇒ the agent could not edit anything). */
866
+ readonly toolCount: v.NumberSchema<undefined>;
867
+ readonly requestMaxTokens: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
868
+ /** FRESH (uncached) input tokens — exclusive of both cache classes below. */
869
+ readonly promptTokens: v.NumberSchema<undefined>;
870
+ /** Input tokens served from the provider's prefix cache (priced around 0.1x fresh). */
871
+ readonly cacheReadTokens: v.NumberSchema<undefined>;
872
+ /**
873
+ * Input tokens WRITTEN into the provider's cache (priced 1.25-2x fresh). Kept apart from
874
+ * the reads because summed together, a loop that keeps invalidating and re-writing its
875
+ * prefix is indistinguishable from one riding a warm cache — and telling those apart is
876
+ * often the whole question when a run costs more than it should.
877
+ */
878
+ readonly cacheWriteTokens: v.NumberSchema<undefined>;
879
+ readonly completionTokens: v.NumberSchema<undefined>;
880
+ readonly totalTokens: v.NumberSchema<undefined>;
881
+ readonly upstreamMs: v.NumberSchema<undefined>;
882
+ readonly overheadMs: v.NumberSchema<undefined>;
883
+ readonly totalMs: v.NumberSchema<undefined>;
884
+ /** Leading messages elided from `prompt` because an earlier call in the chain stored them. */
885
+ readonly elidedLeadingMessages: v.NumberSchema<undefined>;
886
+ /** The messages this call APPENDED, as JSON (see the note above). */
887
+ readonly prompt: v.ObjectSchema<{
888
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
889
+ readonly text: v.StringSchema<undefined>;
890
+ /**
891
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
892
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
893
+ */
894
+ readonly chars: v.NumberSchema<undefined>;
895
+ /**
896
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
897
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
898
+ * `offset + chars <= totalChars` always holds.
899
+ */
900
+ readonly offset: v.NumberSchema<undefined>;
901
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
902
+ readonly totalChars: v.NumberSchema<undefined>;
903
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
904
+ readonly truncated: v.BooleanSchema<undefined>;
905
+ /**
906
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
907
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
908
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
909
+ * to jump straight to the match without transferring the bytes before it.
910
+ */
911
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
912
+ }, undefined>;
913
+ /** The assistant's visible reply. */
914
+ readonly response: v.ObjectSchema<{
915
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
916
+ readonly text: v.StringSchema<undefined>;
917
+ /**
918
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
919
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
920
+ */
921
+ readonly chars: v.NumberSchema<undefined>;
922
+ /**
923
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
924
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
925
+ * `offset + chars <= totalChars` always holds.
926
+ */
927
+ readonly offset: v.NumberSchema<undefined>;
928
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
929
+ readonly totalChars: v.NumberSchema<undefined>;
930
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
931
+ readonly truncated: v.BooleanSchema<undefined>;
932
+ /**
933
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
934
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
935
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
936
+ * to jump straight to the match without transferring the bytes before it.
937
+ */
938
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
939
+ }, undefined>;
940
+ /** The model's separate reasoning channel, when it emits one. */
941
+ readonly reasoning: v.ObjectSchema<{
942
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
943
+ readonly text: v.StringSchema<undefined>;
944
+ /**
945
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
946
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
947
+ */
948
+ readonly chars: v.NumberSchema<undefined>;
949
+ /**
950
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
951
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
952
+ * `offset + chars <= totalChars` always holds.
953
+ */
954
+ readonly offset: v.NumberSchema<undefined>;
955
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
956
+ readonly totalChars: v.NumberSchema<undefined>;
957
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
958
+ readonly truncated: v.BooleanSchema<undefined>;
959
+ /**
960
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
961
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
962
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
963
+ * to jump straight to the match without transferring the bytes before it.
964
+ */
965
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
966
+ }, undefined>;
967
+ /**
968
+ * The prompt delta parsed into per-message rows, each budgeted independently — present only
969
+ * on a `?view=messages` point read. `null` there means the stored delta did not parse as a
970
+ * message array (the raw `prompt` is served instead, so the view degrades rather than
971
+ * returning nothing); absent means the caller did not ask for the view. Independent budgets
972
+ * are the point: in the raw view one enormous leading tool result must be paid for before
973
+ * anything after it is visible, while here every message shows its head. The response's
974
+ * worst case stays computable — `(messageCount − elidedLeadingMessages) × bodyChars`, both
975
+ * factors already on the list row.
976
+ */
977
+ readonly promptMessages: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
978
+ /**
979
+ * The message's absolute position in the FULL conversation (`elidedLeadingMessages` +
980
+ * its position in the delta), so two calls' parsed views line up without arithmetic.
981
+ */
982
+ readonly index: v.NumberSchema<undefined>;
983
+ /** The message's role verbatim (`system` / `user` / `assistant` / `tool` / …), `unknown` when absent. */
984
+ readonly role: v.StringSchema<undefined>;
985
+ /** The message's `name` field (a named tool/function turn), when the producer recorded one. */
986
+ readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
987
+ /** The tool invocation a tool-result turn answers, when the producer recorded the id. */
988
+ readonly toolCallId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
989
+ /** Tool invocations an assistant turn requested: the tool's name plus its budgeted serialized arguments. */
990
+ readonly toolCalls: v.ArraySchema<v.ObjectSchema<{
991
+ readonly name: v.StringSchema<undefined>;
992
+ readonly args: v.ObjectSchema<{
993
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
994
+ readonly text: v.StringSchema<undefined>;
995
+ /**
996
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
997
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
998
+ */
999
+ readonly chars: v.NumberSchema<undefined>;
1000
+ /**
1001
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1002
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1003
+ * `offset + chars <= totalChars` always holds.
1004
+ */
1005
+ readonly offset: v.NumberSchema<undefined>;
1006
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1007
+ readonly totalChars: v.NumberSchema<undefined>;
1008
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1009
+ readonly truncated: v.BooleanSchema<undefined>;
1010
+ /**
1011
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1012
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1013
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1014
+ * to jump straight to the match without transferring the bytes before it.
1015
+ */
1016
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1017
+ }, undefined>;
1018
+ }, undefined>, undefined>;
1019
+ /** The message's textual content, budgeted INDEPENDENTLY of every other message's. */
1020
+ readonly content: v.ObjectSchema<{
1021
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1022
+ readonly text: v.StringSchema<undefined>;
1023
+ /**
1024
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1025
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1026
+ */
1027
+ readonly chars: v.NumberSchema<undefined>;
1028
+ /**
1029
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1030
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1031
+ * `offset + chars <= totalChars` always holds.
1032
+ */
1033
+ readonly offset: v.NumberSchema<undefined>;
1034
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1035
+ readonly totalChars: v.NumberSchema<undefined>;
1036
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1037
+ readonly truncated: v.BooleanSchema<undefined>;
1038
+ /**
1039
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1040
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1041
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1042
+ * to jump straight to the match without transferring the bytes before it.
1043
+ */
1044
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1045
+ }, undefined>;
1046
+ }, undefined>, undefined>, undefined>, undefined>;
1047
+ }, undefined>, undefined>;
1048
+ readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1049
+ }, undefined>;
1050
+ export type DebugLlmCallList = v.InferOutput<typeof debugLlmCallListSchema>;
1051
+ /** Query params for the single-call point read. */
1052
+ export declare const getDebugLlmCallQuerySchema: v.ObjectSchema<{
1053
+ /**
1054
+ * Per-field budget, 0..{@link DEBUG_MAX_BODY_CHARS}. Absent ⇒ the ceiling itself: a body
1055
+ * longer than {@link DEBUG_MAX_BODY_CHARS} is still cut (and says so via `truncated`).
1056
+ * Under `view=messages` this is the PER-MESSAGE content budget.
1057
+ */
1058
+ readonly bodyChars: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 200000, undefined>]>, undefined>;
1059
+ /**
1060
+ * 0-based code-point offset the body slices start at (raw view only; a parsed message view
1061
+ * always reads each message whole and budgets its head). Pair with a searched list row's
1062
+ * `matchOffset` to read the text AROUND a match — the `grep -C` of this surface.
1063
+ */
1064
+ readonly bodyOffset: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 2000000, undefined>]>, undefined>;
1065
+ /**
1066
+ * `raw` (default) returns the delta as stored JSON; `messages` parses it into per-message
1067
+ * rows with independent budgets (see `promptMessages`). Falls back to `raw` semantics when
1068
+ * the stored delta does not parse.
1069
+ */
1070
+ readonly view: v.OptionalSchema<v.PicklistSchema<["raw", "messages"], undefined>, undefined>;
1071
+ }, undefined>;
1072
+ export type GetDebugLlmCallQuery = v.InferOutput<typeof getDebugLlmCallQuerySchema>;
1073
+ /**
1074
+ * One captured dispatch, SIZES ONLY. A snapshot carries the whole composed system prompt, the
1075
+ * whole user prompt, every folded fragment body and the full content of every injected
1076
+ * context file — a single row can be megabytes, so the list never inlines any of it (there is
1077
+ * no `bodyChars` here on purpose: a truncated prefix of a fragment ARRAY answers no question a
1078
+ * size does not, and the point read is one hop away).
1079
+ */
1080
+ export declare const debugAgentContextEntrySchema: v.ObjectSchema<{
1081
+ readonly snapshotId: v.StringSchema<undefined>;
1082
+ readonly agentKind: v.StringSchema<undefined>;
1083
+ /** The step index within the run's pipeline this dispatch belongs to. */
1084
+ readonly stepIndex: v.NumberSchema<undefined>;
1085
+ readonly createdAt: v.NumberSchema<undefined>;
1086
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1087
+ readonly harness: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1088
+ readonly systemPromptChars: v.NumberSchema<undefined>;
1089
+ readonly userPromptChars: v.NumberSchema<undefined>;
1090
+ /**
1091
+ * Serialized size of the best-practice fragments folded into the system prompt, and of the
1092
+ * files injected into the container as `.cat-context/*` (their bodies included).
1093
+ *
1094
+ * Sizes rather than element counts on purpose: counting the entries of those two JSON
1095
+ * columns means either parsing them — which reads the very bodies this projection exists to
1096
+ * avoid — or calling `json_array_length` on a column where one malformed row would fail the
1097
+ * whole page. For "is there a lot in here, and did it change between attempts", a length
1098
+ * answers just as well; the point read gives the actual arrays.
1099
+ */
1100
+ readonly fragmentsChars: v.NumberSchema<undefined>;
1101
+ readonly contextFilesChars: v.NumberSchema<undefined>;
1102
+ }, undefined>;
1103
+ export type DebugAgentContextEntry = v.InferOutput<typeof debugAgentContextEntrySchema>;
1104
+ /** Query params for `GET /api/v1/debug/runs/:runId/agent-context`. */
1105
+ export declare const listDebugAgentContextQuerySchema: v.ObjectSchema<{
1106
+ /** Narrow to one step's dispatches (a step re-dispatched on retry records one snapshot each). */
1107
+ readonly stepIndex: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
1108
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>;
1109
+ readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
1110
+ }, undefined>;
1111
+ export type ListDebugAgentContextQuery = v.InferOutput<typeof listDebugAgentContextQuerySchema>;
1112
+ export declare const debugAgentContextListSchema: v.ObjectSchema<{
1113
+ readonly snapshots: v.ArraySchema<v.ObjectSchema<{
1114
+ readonly snapshotId: v.StringSchema<undefined>;
1115
+ readonly agentKind: v.StringSchema<undefined>;
1116
+ /** The step index within the run's pipeline this dispatch belongs to. */
1117
+ readonly stepIndex: v.NumberSchema<undefined>;
1118
+ readonly createdAt: v.NumberSchema<undefined>;
1119
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1120
+ readonly harness: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1121
+ readonly systemPromptChars: v.NumberSchema<undefined>;
1122
+ readonly userPromptChars: v.NumberSchema<undefined>;
1123
+ /**
1124
+ * Serialized size of the best-practice fragments folded into the system prompt, and of the
1125
+ * files injected into the container as `.cat-context/*` (their bodies included).
1126
+ *
1127
+ * Sizes rather than element counts on purpose: counting the entries of those two JSON
1128
+ * columns means either parsing them — which reads the very bodies this projection exists to
1129
+ * avoid — or calling `json_array_length` on a column where one malformed row would fail the
1130
+ * whole page. For "is there a lot in here, and did it change between attempts", a length
1131
+ * answers just as well; the point read gives the actual arrays.
1132
+ */
1133
+ readonly fragmentsChars: v.NumberSchema<undefined>;
1134
+ readonly contextFilesChars: v.NumberSchema<undefined>;
1135
+ }, undefined>, undefined>;
1136
+ readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1137
+ }, undefined>;
1138
+ export type DebugAgentContextList = v.InferOutput<typeof debugAgentContextListSchema>;
1139
+ /** One folded best-practice fragment, with its body bounded. */
1140
+ export declare const debugAgentContextFragmentSchema: v.ObjectSchema<{
1141
+ readonly id: v.StringSchema<undefined>;
1142
+ readonly body: v.ObjectSchema<{
1143
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1144
+ readonly text: v.StringSchema<undefined>;
1145
+ /**
1146
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1147
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1148
+ */
1149
+ readonly chars: v.NumberSchema<undefined>;
1150
+ /**
1151
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1152
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1153
+ * `offset + chars <= totalChars` always holds.
1154
+ */
1155
+ readonly offset: v.NumberSchema<undefined>;
1156
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1157
+ readonly totalChars: v.NumberSchema<undefined>;
1158
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1159
+ readonly truncated: v.BooleanSchema<undefined>;
1160
+ /**
1161
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1162
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1163
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1164
+ * to jump straight to the match without transferring the bytes before it.
1165
+ */
1166
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1167
+ }, undefined>;
1168
+ }, undefined>;
1169
+ export type DebugAgentContextFragment = v.InferOutput<typeof debugAgentContextFragmentSchema>;
1170
+ /** One injected context file, with its (already secret-scrubbed) body bounded. */
1171
+ export declare const debugAgentContextFileSchema: v.ObjectSchema<{
1172
+ readonly path: v.StringSchema<undefined>;
1173
+ readonly title: v.StringSchema<undefined>;
1174
+ readonly url: v.StringSchema<undefined>;
1175
+ readonly content: v.ObjectSchema<{
1176
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1177
+ readonly text: v.StringSchema<undefined>;
1178
+ /**
1179
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1180
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1181
+ */
1182
+ readonly chars: v.NumberSchema<undefined>;
1183
+ /**
1184
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1185
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1186
+ * `offset + chars <= totalChars` always holds.
1187
+ */
1188
+ readonly offset: v.NumberSchema<undefined>;
1189
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1190
+ readonly totalChars: v.NumberSchema<undefined>;
1191
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1192
+ readonly truncated: v.BooleanSchema<undefined>;
1193
+ /**
1194
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1195
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1196
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1197
+ * to jump straight to the match without transferring the bytes before it.
1198
+ */
1199
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1200
+ }, undefined>;
1201
+ }, undefined>;
1202
+ export type DebugAgentContextFile = v.InferOutput<typeof debugAgentContextFileSchema>;
1203
+ /**
1204
+ * The full context one dispatch was provided. Every body is budgeted independently so one
1205
+ * enormous injected file cannot crowd out the prompts a reader actually came for.
1206
+ */
1207
+ export declare const debugAgentContextDetailSchema: v.ObjectSchema<{
1208
+ readonly snapshotId: v.StringSchema<undefined>;
1209
+ readonly runId: v.StringSchema<undefined>;
1210
+ readonly agentKind: v.StringSchema<undefined>;
1211
+ readonly stepIndex: v.NumberSchema<undefined>;
1212
+ readonly createdAt: v.NumberSchema<undefined>;
1213
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1214
+ readonly harness: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1215
+ readonly systemPrompt: v.ObjectSchema<{
1216
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1217
+ readonly text: v.StringSchema<undefined>;
1218
+ /**
1219
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1220
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1221
+ */
1222
+ readonly chars: v.NumberSchema<undefined>;
1223
+ /**
1224
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1225
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1226
+ * `offset + chars <= totalChars` always holds.
1227
+ */
1228
+ readonly offset: v.NumberSchema<undefined>;
1229
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1230
+ readonly totalChars: v.NumberSchema<undefined>;
1231
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1232
+ readonly truncated: v.BooleanSchema<undefined>;
1233
+ /**
1234
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1235
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1236
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1237
+ * to jump straight to the match without transferring the bytes before it.
1238
+ */
1239
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1240
+ }, undefined>;
1241
+ readonly userPrompt: v.ObjectSchema<{
1242
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1243
+ readonly text: v.StringSchema<undefined>;
1244
+ /**
1245
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1246
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1247
+ */
1248
+ readonly chars: v.NumberSchema<undefined>;
1249
+ /**
1250
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1251
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1252
+ * `offset + chars <= totalChars` always holds.
1253
+ */
1254
+ readonly offset: v.NumberSchema<undefined>;
1255
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1256
+ readonly totalChars: v.NumberSchema<undefined>;
1257
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1258
+ readonly truncated: v.BooleanSchema<undefined>;
1259
+ /**
1260
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1261
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1262
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1263
+ * to jump straight to the match without transferring the bytes before it.
1264
+ */
1265
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1266
+ }, undefined>;
1267
+ readonly fragments: v.ArraySchema<v.ObjectSchema<{
1268
+ readonly id: v.StringSchema<undefined>;
1269
+ readonly body: v.ObjectSchema<{
1270
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1271
+ readonly text: v.StringSchema<undefined>;
1272
+ /**
1273
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1274
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1275
+ */
1276
+ readonly chars: v.NumberSchema<undefined>;
1277
+ /**
1278
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1279
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1280
+ * `offset + chars <= totalChars` always holds.
1281
+ */
1282
+ readonly offset: v.NumberSchema<undefined>;
1283
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1284
+ readonly totalChars: v.NumberSchema<undefined>;
1285
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1286
+ readonly truncated: v.BooleanSchema<undefined>;
1287
+ /**
1288
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1289
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1290
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1291
+ * to jump straight to the match without transferring the bytes before it.
1292
+ */
1293
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1294
+ }, undefined>;
1295
+ }, undefined>, undefined>;
1296
+ readonly contextFiles: v.ArraySchema<v.ObjectSchema<{
1297
+ readonly path: v.StringSchema<undefined>;
1298
+ readonly title: v.StringSchema<undefined>;
1299
+ readonly url: v.StringSchema<undefined>;
1300
+ readonly content: v.ObjectSchema<{
1301
+ /** The returned slice — `chars` characters of the stored body, starting at `offset`. */
1302
+ readonly text: v.StringSchema<undefined>;
1303
+ /**
1304
+ * Characters actually returned in {@link debugTextSchema} `text`, in Unicode CODE POINTS —
1305
+ * the unit SQL `length()`/`substr()` measure in (an emoji counts once, not twice).
1306
+ */
1307
+ readonly chars: v.NumberSchema<undefined>;
1308
+ /**
1309
+ * 0-based code-point position `text` starts at within the stored body — 0 unless the caller
1310
+ * asked for a later window via `?bodyOffset=`. Clamped to `totalChars`, so
1311
+ * `offset + chars <= totalChars` always holds.
1312
+ */
1313
+ readonly offset: v.NumberSchema<undefined>;
1314
+ /** Characters stored for this field (the full code-point length, regardless of what was returned). */
1315
+ readonly totalChars: v.NumberSchema<undefined>;
1316
+ /** True when `chars < totalChars`, i.e. `text` is not the entire stored body. */
1317
+ readonly truncated: v.BooleanSchema<undefined>;
1318
+ /**
1319
+ * 0-based code-point offset of the first case-insensitive occurrence of the request's
1320
+ * `?contains=` term in this body, or null when the term occurs only in a sibling body.
1321
+ * Present ONLY on rows of a searched list — pair it with the point read's `?bodyOffset=`
1322
+ * to jump straight to the match without transferring the bytes before it.
1323
+ */
1324
+ readonly matchOffset: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
1325
+ }, undefined>;
1326
+ }, undefined>, undefined>;
1327
+ /**
1328
+ * Redacted structural context (repo, branches, infra spec, the run's decisions and revision
1329
+ * feedback). Small and already deep-scrubbed at capture time, so it is returned whole.
1330
+ */
1331
+ readonly extras: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1332
+ }, undefined>;
1333
+ export type DebugAgentContextDetail = v.InferOutput<typeof debugAgentContextDetailSchema>;
1334
+ /** Query params for the single-snapshot point read. */
1335
+ export declare const getDebugAgentContextQuerySchema: v.ObjectSchema<{
1336
+ /**
1337
+ * Per-body budget, 0..{@link DEBUG_MAX_BODY_CHARS}. Absent ⇒ the ceiling itself: a body
1338
+ * longer than {@link DEBUG_MAX_BODY_CHARS} is still cut (and says so via `truncated`).
1339
+ */
1340
+ readonly bodyChars: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 200000, undefined>]>, undefined>;
1341
+ /**
1342
+ * 0-based code-point offset every body slice starts at. Applied to ALL of the snapshot's
1343
+ * bodies uniformly (it exists to reach the tail of ONE large body the index sized; the
1344
+ * others simply run out and return empty slices past their end).
1345
+ */
1346
+ readonly bodyOffset: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 2000000, undefined>]>, undefined>;
1347
+ }, undefined>;
1348
+ export type GetDebugAgentContextQuery = v.InferOutput<typeof getDebugAgentContextQuerySchema>;
1349
+ /** Query params for the two small-row lists (`search-queries`, `logs`). */
1350
+ export declare const listDebugPageQuerySchema: v.ObjectSchema<{
1351
+ readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be a whole number">, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>;
1352
+ readonly cursor: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
1353
+ }, undefined>;
1354
+ export type ListDebugPageQuery = v.InferOutput<typeof listDebugPageQuerySchema>;
1355
+ /**
1356
+ * The web searches the run's agents performed. Rows are small (the query text is capped at
1357
+ * 8 kB at capture time), so they are returned whole rather than as {@link debugTextSchema}.
1358
+ */
1359
+ export declare const debugSearchQueryListSchema: v.ObjectSchema<{
1360
+ readonly queries: v.ArraySchema<v.ObjectSchema<{
1361
+ readonly id: v.StringSchema<undefined>;
1362
+ readonly workspaceId: v.StringSchema<undefined>;
1363
+ readonly executionId: v.StringSchema<undefined>;
1364
+ readonly agentKind: v.StringSchema<undefined>;
1365
+ readonly provider: v.NullableSchema<v.PicklistSchema<["brave", "searxng"], undefined>, undefined>;
1366
+ readonly query: v.StringSchema<undefined>;
1367
+ readonly resultCount: v.NumberSchema<undefined>;
1368
+ readonly createdAt: v.NumberSchema<undefined>;
1369
+ }, undefined>, undefined>;
1370
+ readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1371
+ }, undefined>;
1372
+ export type DebugSearchQueryList = v.InferOutput<typeof debugSearchQueryListSchema>;
1373
+ /**
1374
+ * The run's slice of the provisioning event log — every attempt to spin up or tear down the
1375
+ * throwaway infrastructure it ran on, with the verbatim (secret-scrubbed) provider error. This
1376
+ * is the half of "why did it fail" that no model call can answer: a run whose container never
1377
+ * came up has no LLM telemetry at all, and this is where its cause of death is written.
1378
+ */
1379
+ export declare const debugLogListSchema: v.ObjectSchema<{
1380
+ readonly entries: v.ArraySchema<v.ObjectSchema<{
1381
+ readonly id: v.StringSchema<undefined>;
1382
+ readonly workspaceId: v.StringSchema<undefined>;
1383
+ readonly subsystem: v.PicklistSchema<["environment", "runner-pool", "container"], undefined>;
1384
+ readonly operation: v.PicklistSchema<["provision", "teardown", "status", "dispatch", "release", "poll-failure"], undefined>;
1385
+ readonly targetId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1386
+ readonly providerId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1387
+ readonly blockId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1388
+ readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1389
+ readonly outcome: v.PicklistSchema<["success", "failure"], undefined>;
1390
+ readonly error: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1391
+ readonly detail: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1392
+ readonly createdAt: v.NumberSchema<undefined>;
1393
+ }, undefined>, undefined>;
1394
+ readonly nextCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1395
+ }, undefined>;
1396
+ export type DebugLogList = v.InferOutput<typeof debugLogListSchema>;
1397
+ //# sourceMappingURL=debug-api.d.ts.map