@tellagen/mcp-server 0.1.1 → 0.4.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 (82) hide show
  1. package/README.md +231 -12
  2. package/SKILL.md +407 -13
  3. package/contracts/runbooks/manifest.json +47 -0
  4. package/contracts/runbooks/v1/fixtures/global-runbook.json +7 -0
  5. package/contracts/runbooks/v1/runbook-definition.schema.json +25 -0
  6. package/contracts/runbooks/v2/compiled-plan.schema.json +40 -0
  7. package/contracts/runbooks/v2/fixtures/filesystem-pressure.json +181 -0
  8. package/contracts/runbooks/v2/fixtures/grafana-error-rate-plan.json +50 -0
  9. package/contracts/runbooks/v2/fixtures/grafana-error-rate.json +58 -0
  10. package/contracts/runbooks/v2/fixtures/timeline-event-blocks-rejected.json +90 -0
  11. package/contracts/runbooks/v2/fixtures/timeline-event-with-blocks.json +61 -0
  12. package/contracts/runbooks/v2/runbook-definition.schema.json +377 -0
  13. package/contracts/runbooks/v2/timeline-event-blocks.schema.json +480 -0
  14. package/contracts/tellagen-runbook-contracts.json +8 -0
  15. package/dist/auth.d.ts +2 -1
  16. package/dist/auth.js +2 -1
  17. package/dist/auth.js.map +1 -1
  18. package/dist/client.d.ts +20 -0
  19. package/dist/client.js +81 -12
  20. package/dist/client.js.map +1 -1
  21. package/dist/diagnosis-structure.d.ts +1416 -0
  22. package/dist/diagnosis-structure.js +656 -0
  23. package/dist/diagnosis-structure.js.map +1 -0
  24. package/dist/errors.d.ts +2 -1
  25. package/dist/errors.js +4 -1
  26. package/dist/errors.js.map +1 -1
  27. package/dist/figures.d.ts +2336 -0
  28. package/dist/figures.js +1288 -0
  29. package/dist/figures.js.map +1 -0
  30. package/dist/image-info.d.ts +14 -0
  31. package/dist/image-info.js +65 -0
  32. package/dist/image-info.js.map +1 -0
  33. package/dist/index.js +2 -6
  34. package/dist/index.js.map +1 -1
  35. package/dist/server.js +63 -6
  36. package/dist/server.js.map +1 -1
  37. package/dist/source-links.d.ts +101 -0
  38. package/dist/source-links.js +374 -0
  39. package/dist/source-links.js.map +1 -0
  40. package/dist/start.d.ts +11 -0
  41. package/dist/start.js +14 -0
  42. package/dist/start.js.map +1 -0
  43. package/dist/tools/attachments.d.ts +19 -0
  44. package/dist/tools/attachments.js +177 -0
  45. package/dist/tools/attachments.js.map +1 -0
  46. package/dist/tools/causes.d.ts +50 -0
  47. package/dist/tools/causes.js +97 -0
  48. package/dist/tools/causes.js.map +1 -0
  49. package/dist/tools/context.d.ts +3 -0
  50. package/dist/tools/context.js +146 -0
  51. package/dist/tools/context.js.map +1 -0
  52. package/dist/tools/datasources.d.ts +3 -0
  53. package/dist/tools/datasources.js +325 -0
  54. package/dist/tools/datasources.js.map +1 -0
  55. package/dist/tools/diagnostics.d.ts +3 -0
  56. package/dist/tools/diagnostics.js +113 -0
  57. package/dist/tools/diagnostics.js.map +1 -0
  58. package/dist/tools/figures.d.ts +8 -0
  59. package/dist/tools/figures.js +209 -0
  60. package/dist/tools/figures.js.map +1 -0
  61. package/dist/tools/findings.js +84 -6
  62. package/dist/tools/findings.js.map +1 -1
  63. package/dist/tools/incidents.js +112 -3
  64. package/dist/tools/incidents.js.map +1 -1
  65. package/dist/tools/index.js +18 -0
  66. package/dist/tools/index.js.map +1 -1
  67. package/dist/tools/investigations.js +834 -12
  68. package/dist/tools/investigations.js.map +1 -1
  69. package/dist/tools/postmortem-runbooks.d.ts +786 -0
  70. package/dist/tools/postmortem-runbooks.js +330 -0
  71. package/dist/tools/postmortem-runbooks.js.map +1 -0
  72. package/dist/tools/source-links.d.ts +47 -0
  73. package/dist/tools/source-links.js +302 -0
  74. package/dist/tools/source-links.js.map +1 -0
  75. package/dist/tools/timeline.d.ts +3 -0
  76. package/dist/tools/timeline.js +333 -0
  77. package/dist/tools/timeline.js.map +1 -0
  78. package/dist/version.d.ts +2 -0
  79. package/dist/version.js +12 -0
  80. package/dist/version.js.map +1 -0
  81. package/package.json +4 -3
  82. package/server.json +15 -1
@@ -0,0 +1,2336 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Figures are the typed widgets Tellagen draws in the Diagnosis tab, on the
4
+ * timeline and in the postmortem. The agent sends data and Tellagen draws it.
5
+ *
6
+ * The limits below mirror the Tellagen API contract
7
+ * (contracts/runbooks/v2/timeline-event-blocks.schema.json) and the API's own
8
+ * figure validation, which stay the source of truth. A figure over a limit is
9
+ * rejected with the field named. Nothing is trimmed, because a silently
10
+ * shortened label or a dropped row would misstate the evidence.
11
+ */
12
+ /**
13
+ * Types a causal step may carry as its `figure`. table and changes are
14
+ * timeline blocks only.
15
+ */
16
+ export declare const STEP_FIGURE_TYPES: readonly ["stats", "compare", "trend", "checks", "range_overlap", "histogram", "run_history", "diff"];
17
+ /** Types the API accepts in a timeline event's `blocks`. */
18
+ export declare const TIMELINE_BLOCK_TYPES: readonly ["stats", "compare", "trend", "table", "checks", "changes", "range_overlap", "histogram", "run_history", "diff"];
19
+ /** The most JSON one step figure may take, as the backend measures it. */
20
+ export declare const MAX_STEP_FIGURE_BYTES: number;
21
+ export type FigurePlacement = "step_figure" | "timeline_block";
22
+ export declare const RUN_RESULTS: readonly ["success", "failure", "cancelled", "pending"];
23
+ export declare const RUN_MARK_CHANGES: readonly ["regression", "fix", "change"];
24
+ /** Exported for the step figure schema of tellagen_complete_investigation. */
25
+ export declare const checksBlockSchema: z.ZodObject<{
26
+ type: z.ZodLiteral<"checks">;
27
+ title: z.ZodOptional<z.ZodString>;
28
+ items: z.ZodArray<z.ZodObject<{
29
+ label: z.ZodString;
30
+ state: z.ZodEnum<["pass", "fail", "pending", "skipped"]>;
31
+ detail: z.ZodOptional<z.ZodString>;
32
+ }, "strict", z.ZodTypeAny, {
33
+ label: string;
34
+ state: "pass" | "fail" | "pending" | "skipped";
35
+ detail?: string | undefined;
36
+ }, {
37
+ label: string;
38
+ state: "pass" | "fail" | "pending" | "skipped";
39
+ detail?: string | undefined;
40
+ }>, "many">;
41
+ }, "strict", z.ZodTypeAny, {
42
+ type: "checks";
43
+ items: {
44
+ label: string;
45
+ state: "pass" | "fail" | "pending" | "skipped";
46
+ detail?: string | undefined;
47
+ }[];
48
+ title?: string | undefined;
49
+ }, {
50
+ type: "checks";
51
+ items: {
52
+ label: string;
53
+ state: "pass" | "fail" | "pending" | "skipped";
54
+ detail?: string | undefined;
55
+ }[];
56
+ title?: string | undefined;
57
+ }>;
58
+ export declare const rangeOverlapBlockSchema: z.ZodObject<{
59
+ type: z.ZodLiteral<"range_overlap">;
60
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
61
+ unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
62
+ min: z.ZodOptional<z.ZodNumber>;
63
+ max: z.ZodOptional<z.ZodNumber>;
64
+ rows: z.ZodArray<z.ZodObject<{
65
+ label: z.ZodEffects<z.ZodString, string, string>;
66
+ from: z.ZodNumber;
67
+ to: z.ZodNumber;
68
+ }, "strict", z.ZodTypeAny, {
69
+ label: string;
70
+ from: number;
71
+ to: number;
72
+ }, {
73
+ label: string;
74
+ from: number;
75
+ to: number;
76
+ }>, "many">;
77
+ window: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
78
+ }, "strict", z.ZodTypeAny, {
79
+ type: "range_overlap";
80
+ rows: {
81
+ label: string;
82
+ from: number;
83
+ to: number;
84
+ }[];
85
+ title?: string | undefined;
86
+ unit?: string | undefined;
87
+ max?: number | undefined;
88
+ min?: number | undefined;
89
+ window?: [number, number] | undefined;
90
+ }, {
91
+ type: "range_overlap";
92
+ rows: {
93
+ label: string;
94
+ from: number;
95
+ to: number;
96
+ }[];
97
+ title?: string | undefined;
98
+ unit?: string | undefined;
99
+ max?: number | undefined;
100
+ min?: number | undefined;
101
+ window?: [number, number] | undefined;
102
+ }>;
103
+ export declare const histogramBlockSchema: z.ZodObject<{
104
+ type: z.ZodLiteral<"histogram">;
105
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
106
+ unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
107
+ edges: z.ZodArray<z.ZodNumber, "many">;
108
+ before: z.ZodArray<z.ZodNumber, "many">;
109
+ after: z.ZodArray<z.ZodNumber, "many">;
110
+ threshold: z.ZodOptional<z.ZodObject<{
111
+ value: z.ZodNumber;
112
+ label: z.ZodOptional<z.ZodString>;
113
+ }, "strict", z.ZodTypeAny, {
114
+ value: number;
115
+ label?: string | undefined;
116
+ }, {
117
+ value: number;
118
+ label?: string | undefined;
119
+ }>>;
120
+ source: z.ZodOptional<z.ZodObject<{
121
+ kind: z.ZodOptional<z.ZodString>;
122
+ datasource: z.ZodOptional<z.ZodString>;
123
+ query: z.ZodOptional<z.ZodString>;
124
+ from: z.ZodOptional<z.ZodString>;
125
+ to: z.ZodOptional<z.ZodString>;
126
+ step: z.ZodOptional<z.ZodString>;
127
+ artifact_id: z.ZodOptional<z.ZodString>;
128
+ }, "strict", z.ZodTypeAny, {
129
+ kind?: string | undefined;
130
+ datasource?: string | undefined;
131
+ query?: string | undefined;
132
+ from?: string | undefined;
133
+ to?: string | undefined;
134
+ step?: string | undefined;
135
+ artifact_id?: string | undefined;
136
+ }, {
137
+ kind?: string | undefined;
138
+ datasource?: string | undefined;
139
+ query?: string | undefined;
140
+ from?: string | undefined;
141
+ to?: string | undefined;
142
+ step?: string | undefined;
143
+ artifact_id?: string | undefined;
144
+ }>>;
145
+ }, "strict", z.ZodTypeAny, {
146
+ type: "histogram";
147
+ before: number[];
148
+ after: number[];
149
+ edges: number[];
150
+ title?: string | undefined;
151
+ unit?: string | undefined;
152
+ threshold?: {
153
+ value: number;
154
+ label?: string | undefined;
155
+ } | undefined;
156
+ source?: {
157
+ kind?: string | undefined;
158
+ datasource?: string | undefined;
159
+ query?: string | undefined;
160
+ from?: string | undefined;
161
+ to?: string | undefined;
162
+ step?: string | undefined;
163
+ artifact_id?: string | undefined;
164
+ } | undefined;
165
+ }, {
166
+ type: "histogram";
167
+ before: number[];
168
+ after: number[];
169
+ edges: number[];
170
+ title?: string | undefined;
171
+ unit?: string | undefined;
172
+ threshold?: {
173
+ value: number;
174
+ label?: string | undefined;
175
+ } | undefined;
176
+ source?: {
177
+ kind?: string | undefined;
178
+ datasource?: string | undefined;
179
+ query?: string | undefined;
180
+ from?: string | undefined;
181
+ to?: string | undefined;
182
+ step?: string | undefined;
183
+ artifact_id?: string | undefined;
184
+ } | undefined;
185
+ }>;
186
+ export declare const runHistoryBlockSchema: z.ZodObject<{
187
+ type: z.ZodLiteral<"run_history">;
188
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
189
+ repo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
190
+ branch: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
191
+ runs: z.ZodArray<z.ZodObject<{
192
+ ref: z.ZodEffects<z.ZodString, string, string>;
193
+ result: z.ZodEnum<["success", "failure", "cancelled", "pending"]>;
194
+ sha: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
195
+ at: z.ZodOptional<z.ZodString>;
196
+ trigger: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
197
+ job: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
198
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
199
+ }, "strict", z.ZodTypeAny, {
200
+ ref: string;
201
+ result: "pending" | "success" | "failure" | "cancelled";
202
+ at?: string | undefined;
203
+ sha?: string | undefined;
204
+ trigger?: string | undefined;
205
+ job?: string | undefined;
206
+ url?: string | undefined;
207
+ }, {
208
+ ref: string;
209
+ result: "pending" | "success" | "failure" | "cancelled";
210
+ at?: string | undefined;
211
+ sha?: string | undefined;
212
+ trigger?: string | undefined;
213
+ job?: string | undefined;
214
+ url?: string | undefined;
215
+ }>, "many">;
216
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
217
+ between: z.ZodTuple<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>], null>;
218
+ change_ref: z.ZodEnum<["regression", "fix", "change"]>;
219
+ sha: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
220
+ at: z.ZodOptional<z.ZodString>;
221
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
222
+ }, "strict", z.ZodTypeAny, {
223
+ between: [string, string];
224
+ change_ref: "regression" | "fix" | "change";
225
+ at?: string | undefined;
226
+ title?: string | undefined;
227
+ sha?: string | undefined;
228
+ }, {
229
+ between: [string, string];
230
+ change_ref: "regression" | "fix" | "change";
231
+ at?: string | undefined;
232
+ title?: string | undefined;
233
+ sha?: string | undefined;
234
+ }>, "many">>;
235
+ span: z.ZodOptional<z.ZodObject<{
236
+ from: z.ZodEffects<z.ZodString, string, string>;
237
+ to: z.ZodEffects<z.ZodString, string, string>;
238
+ label: z.ZodEffects<z.ZodString, string, string>;
239
+ }, "strict", z.ZodTypeAny, {
240
+ label: string;
241
+ from: string;
242
+ to: string;
243
+ }, {
244
+ label: string;
245
+ from: string;
246
+ to: string;
247
+ }>>;
248
+ }, "strict", z.ZodTypeAny, {
249
+ type: "run_history";
250
+ runs: {
251
+ ref: string;
252
+ result: "pending" | "success" | "failure" | "cancelled";
253
+ at?: string | undefined;
254
+ sha?: string | undefined;
255
+ trigger?: string | undefined;
256
+ job?: string | undefined;
257
+ url?: string | undefined;
258
+ }[];
259
+ title?: string | undefined;
260
+ marks?: {
261
+ between: [string, string];
262
+ change_ref: "regression" | "fix" | "change";
263
+ at?: string | undefined;
264
+ title?: string | undefined;
265
+ sha?: string | undefined;
266
+ }[] | undefined;
267
+ repo?: string | undefined;
268
+ branch?: string | undefined;
269
+ span?: {
270
+ label: string;
271
+ from: string;
272
+ to: string;
273
+ } | undefined;
274
+ }, {
275
+ type: "run_history";
276
+ runs: {
277
+ ref: string;
278
+ result: "pending" | "success" | "failure" | "cancelled";
279
+ at?: string | undefined;
280
+ sha?: string | undefined;
281
+ trigger?: string | undefined;
282
+ job?: string | undefined;
283
+ url?: string | undefined;
284
+ }[];
285
+ title?: string | undefined;
286
+ marks?: {
287
+ between: [string, string];
288
+ change_ref: "regression" | "fix" | "change";
289
+ at?: string | undefined;
290
+ title?: string | undefined;
291
+ sha?: string | undefined;
292
+ }[] | undefined;
293
+ repo?: string | undefined;
294
+ branch?: string | undefined;
295
+ span?: {
296
+ label: string;
297
+ from: string;
298
+ to: string;
299
+ } | undefined;
300
+ }>;
301
+ export declare const diffBlockSchema: z.ZodObject<{
302
+ type: z.ZodLiteral<"diff">;
303
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
304
+ path: z.ZodEffects<z.ZodString, string, string>;
305
+ repo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
306
+ ref: z.ZodEffects<z.ZodString, string, string>;
307
+ at: z.ZodOptional<z.ZodString>;
308
+ additions: z.ZodNumber;
309
+ deletions: z.ZodNumber;
310
+ hunks: z.ZodArray<z.ZodArray<z.ZodObject<{
311
+ op: z.ZodEnum<["+", "-"]>;
312
+ text: z.ZodEffects<z.ZodString, string, string>;
313
+ }, "strict", z.ZodTypeAny, {
314
+ op: "+" | "-";
315
+ text: string;
316
+ }, {
317
+ op: "+" | "-";
318
+ text: string;
319
+ }>, "many">, "many">;
320
+ }, "strict", z.ZodTypeAny, {
321
+ path: string;
322
+ type: "diff";
323
+ ref: string;
324
+ additions: number;
325
+ deletions: number;
326
+ hunks: {
327
+ op: "+" | "-";
328
+ text: string;
329
+ }[][];
330
+ at?: string | undefined;
331
+ title?: string | undefined;
332
+ repo?: string | undefined;
333
+ }, {
334
+ path: string;
335
+ type: "diff";
336
+ ref: string;
337
+ additions: number;
338
+ deletions: number;
339
+ hunks: {
340
+ op: "+" | "-";
341
+ text: string;
342
+ }[][];
343
+ at?: string | undefined;
344
+ title?: string | undefined;
345
+ repo?: string | undefined;
346
+ }>;
347
+ export type FigureRuleIssue = {
348
+ path: Array<string | number>;
349
+ message: string;
350
+ };
351
+ /**
352
+ * The rules of range_overlap, histogram, run_history and diff that span
353
+ * fields, with the messages the API uses. The block has passed its schema.
354
+ */
355
+ export declare function figureRuleIssues(block: {
356
+ type: string;
357
+ } & Record<string, unknown>): FigureRuleIssue[];
358
+ /**
359
+ * One block as the timeline tools accept it. Cross-field rules (a trend's
360
+ * start and step_seconds travel together, a table row has one cell per
361
+ * column) are checked by validateBlock and by the API.
362
+ */
363
+ export declare const timelineBlockSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
364
+ type: z.ZodLiteral<"stats">;
365
+ items: z.ZodArray<z.ZodObject<{
366
+ label: z.ZodString;
367
+ value: z.ZodString;
368
+ caption: z.ZodOptional<z.ZodString>;
369
+ tone: z.ZodOptional<z.ZodEnum<["good", "warn", "bad", "neutral"]>>;
370
+ }, "strict", z.ZodTypeAny, {
371
+ value: string;
372
+ label: string;
373
+ caption?: string | undefined;
374
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
375
+ }, {
376
+ value: string;
377
+ label: string;
378
+ caption?: string | undefined;
379
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
380
+ }>, "many">;
381
+ } & {
382
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
383
+ anchor: z.ZodOptional<z.ZodString>;
384
+ postmortem: z.ZodOptional<z.ZodBoolean>;
385
+ }, "strict", z.ZodTypeAny, {
386
+ type: "stats";
387
+ items: {
388
+ value: string;
389
+ label: string;
390
+ caption?: string | undefined;
391
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
392
+ }[];
393
+ slot?: "summary" | undefined;
394
+ anchor?: string | undefined;
395
+ postmortem?: boolean | undefined;
396
+ }, {
397
+ type: "stats";
398
+ items: {
399
+ value: string;
400
+ label: string;
401
+ caption?: string | undefined;
402
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
403
+ }[];
404
+ slot?: "summary" | undefined;
405
+ anchor?: string | undefined;
406
+ postmortem?: boolean | undefined;
407
+ }>, z.ZodObject<{
408
+ type: z.ZodLiteral<"compare">;
409
+ title: z.ZodOptional<z.ZodString>;
410
+ metric: z.ZodOptional<z.ZodString>;
411
+ unit: z.ZodOptional<z.ZodString>;
412
+ better: z.ZodOptional<z.ZodEnum<["lower", "higher"]>>;
413
+ delta: z.ZodOptional<z.ZodEnum<["rel", "abs"]>>;
414
+ max: z.ZodOptional<z.ZodNumber>;
415
+ threshold: z.ZodOptional<z.ZodObject<{
416
+ value: z.ZodNumber;
417
+ label: z.ZodOptional<z.ZodString>;
418
+ }, "strict", z.ZodTypeAny, {
419
+ value: number;
420
+ label?: string | undefined;
421
+ }, {
422
+ value: number;
423
+ label?: string | undefined;
424
+ }>>;
425
+ rows: z.ZodArray<z.ZodObject<{
426
+ label: z.ZodString;
427
+ mono: z.ZodOptional<z.ZodBoolean>;
428
+ before: z.ZodNumber;
429
+ after: z.ZodNumber;
430
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
431
+ label: z.ZodString;
432
+ before: z.ZodString;
433
+ after: z.ZodString;
434
+ }, "strict", z.ZodTypeAny, {
435
+ label: string;
436
+ before: string;
437
+ after: string;
438
+ }, {
439
+ label: string;
440
+ before: string;
441
+ after: string;
442
+ }>, "many">>;
443
+ }, "strict", z.ZodTypeAny, {
444
+ label: string;
445
+ before: number;
446
+ after: number;
447
+ mono?: boolean | undefined;
448
+ details?: {
449
+ label: string;
450
+ before: string;
451
+ after: string;
452
+ }[] | undefined;
453
+ }, {
454
+ label: string;
455
+ before: number;
456
+ after: number;
457
+ mono?: boolean | undefined;
458
+ details?: {
459
+ label: string;
460
+ before: string;
461
+ after: string;
462
+ }[] | undefined;
463
+ }>, "many">;
464
+ } & {
465
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
466
+ anchor: z.ZodOptional<z.ZodString>;
467
+ postmortem: z.ZodOptional<z.ZodBoolean>;
468
+ }, "strict", z.ZodTypeAny, {
469
+ type: "compare";
470
+ rows: {
471
+ label: string;
472
+ before: number;
473
+ after: number;
474
+ mono?: boolean | undefined;
475
+ details?: {
476
+ label: string;
477
+ before: string;
478
+ after: string;
479
+ }[] | undefined;
480
+ }[];
481
+ title?: string | undefined;
482
+ metric?: string | undefined;
483
+ unit?: string | undefined;
484
+ better?: "lower" | "higher" | undefined;
485
+ delta?: "rel" | "abs" | undefined;
486
+ max?: number | undefined;
487
+ threshold?: {
488
+ value: number;
489
+ label?: string | undefined;
490
+ } | undefined;
491
+ slot?: "summary" | undefined;
492
+ anchor?: string | undefined;
493
+ postmortem?: boolean | undefined;
494
+ }, {
495
+ type: "compare";
496
+ rows: {
497
+ label: string;
498
+ before: number;
499
+ after: number;
500
+ mono?: boolean | undefined;
501
+ details?: {
502
+ label: string;
503
+ before: string;
504
+ after: string;
505
+ }[] | undefined;
506
+ }[];
507
+ title?: string | undefined;
508
+ metric?: string | undefined;
509
+ unit?: string | undefined;
510
+ better?: "lower" | "higher" | undefined;
511
+ delta?: "rel" | "abs" | undefined;
512
+ max?: number | undefined;
513
+ threshold?: {
514
+ value: number;
515
+ label?: string | undefined;
516
+ } | undefined;
517
+ slot?: "summary" | undefined;
518
+ anchor?: string | undefined;
519
+ postmortem?: boolean | undefined;
520
+ }>, z.ZodObject<{
521
+ type: z.ZodLiteral<"trend">;
522
+ title: z.ZodOptional<z.ZodString>;
523
+ unit: z.ZodOptional<z.ZodString>;
524
+ series: z.ZodArray<z.ZodNumber, "many">;
525
+ start: z.ZodOptional<z.ZodString>;
526
+ step_seconds: z.ZodOptional<z.ZodNumber>;
527
+ max: z.ZodOptional<z.ZodNumber>;
528
+ threshold: z.ZodOptional<z.ZodObject<{
529
+ value: z.ZodNumber;
530
+ label: z.ZodOptional<z.ZodString>;
531
+ }, "strict", z.ZodTypeAny, {
532
+ value: number;
533
+ label?: string | undefined;
534
+ }, {
535
+ value: number;
536
+ label?: string | undefined;
537
+ }>>;
538
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
539
+ i: z.ZodNumber;
540
+ label: z.ZodString;
541
+ }, "strict", z.ZodTypeAny, {
542
+ label: string;
543
+ i: number;
544
+ }, {
545
+ label: string;
546
+ i: number;
547
+ }>, "many">>;
548
+ source: z.ZodOptional<z.ZodObject<{
549
+ kind: z.ZodOptional<z.ZodString>;
550
+ datasource: z.ZodOptional<z.ZodString>;
551
+ query: z.ZodOptional<z.ZodString>;
552
+ from: z.ZodOptional<z.ZodString>;
553
+ to: z.ZodOptional<z.ZodString>;
554
+ step: z.ZodOptional<z.ZodString>;
555
+ artifact_id: z.ZodOptional<z.ZodString>;
556
+ }, "strict", z.ZodTypeAny, {
557
+ kind?: string | undefined;
558
+ datasource?: string | undefined;
559
+ query?: string | undefined;
560
+ from?: string | undefined;
561
+ to?: string | undefined;
562
+ step?: string | undefined;
563
+ artifact_id?: string | undefined;
564
+ }, {
565
+ kind?: string | undefined;
566
+ datasource?: string | undefined;
567
+ query?: string | undefined;
568
+ from?: string | undefined;
569
+ to?: string | undefined;
570
+ step?: string | undefined;
571
+ artifact_id?: string | undefined;
572
+ }>>;
573
+ } & {
574
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
575
+ anchor: z.ZodOptional<z.ZodString>;
576
+ postmortem: z.ZodOptional<z.ZodBoolean>;
577
+ }, "strict", z.ZodTypeAny, {
578
+ type: "trend";
579
+ series: number[];
580
+ title?: string | undefined;
581
+ unit?: string | undefined;
582
+ max?: number | undefined;
583
+ threshold?: {
584
+ value: number;
585
+ label?: string | undefined;
586
+ } | undefined;
587
+ start?: string | undefined;
588
+ step_seconds?: number | undefined;
589
+ marks?: {
590
+ label: string;
591
+ i: number;
592
+ }[] | undefined;
593
+ source?: {
594
+ kind?: string | undefined;
595
+ datasource?: string | undefined;
596
+ query?: string | undefined;
597
+ from?: string | undefined;
598
+ to?: string | undefined;
599
+ step?: string | undefined;
600
+ artifact_id?: string | undefined;
601
+ } | undefined;
602
+ slot?: "summary" | undefined;
603
+ anchor?: string | undefined;
604
+ postmortem?: boolean | undefined;
605
+ }, {
606
+ type: "trend";
607
+ series: number[];
608
+ title?: string | undefined;
609
+ unit?: string | undefined;
610
+ max?: number | undefined;
611
+ threshold?: {
612
+ value: number;
613
+ label?: string | undefined;
614
+ } | undefined;
615
+ start?: string | undefined;
616
+ step_seconds?: number | undefined;
617
+ marks?: {
618
+ label: string;
619
+ i: number;
620
+ }[] | undefined;
621
+ source?: {
622
+ kind?: string | undefined;
623
+ datasource?: string | undefined;
624
+ query?: string | undefined;
625
+ from?: string | undefined;
626
+ to?: string | undefined;
627
+ step?: string | undefined;
628
+ artifact_id?: string | undefined;
629
+ } | undefined;
630
+ slot?: "summary" | undefined;
631
+ anchor?: string | undefined;
632
+ postmortem?: boolean | undefined;
633
+ }>, z.ZodObject<{
634
+ type: z.ZodLiteral<"table">;
635
+ title: z.ZodOptional<z.ZodString>;
636
+ columns: z.ZodArray<z.ZodObject<{
637
+ label: z.ZodString;
638
+ }, "strict", z.ZodTypeAny, {
639
+ label: string;
640
+ }, {
641
+ label: string;
642
+ }>, "many">;
643
+ rows: z.ZodArray<z.ZodObject<{
644
+ cells: z.ZodArray<z.ZodString, "many">;
645
+ }, "strict", z.ZodTypeAny, {
646
+ cells: string[];
647
+ }, {
648
+ cells: string[];
649
+ }>, "many">;
650
+ } & {
651
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
652
+ anchor: z.ZodOptional<z.ZodString>;
653
+ postmortem: z.ZodOptional<z.ZodBoolean>;
654
+ }, "strict", z.ZodTypeAny, {
655
+ type: "table";
656
+ rows: {
657
+ cells: string[];
658
+ }[];
659
+ columns: {
660
+ label: string;
661
+ }[];
662
+ title?: string | undefined;
663
+ slot?: "summary" | undefined;
664
+ anchor?: string | undefined;
665
+ postmortem?: boolean | undefined;
666
+ }, {
667
+ type: "table";
668
+ rows: {
669
+ cells: string[];
670
+ }[];
671
+ columns: {
672
+ label: string;
673
+ }[];
674
+ title?: string | undefined;
675
+ slot?: "summary" | undefined;
676
+ anchor?: string | undefined;
677
+ postmortem?: boolean | undefined;
678
+ }>, z.ZodObject<{
679
+ type: z.ZodLiteral<"checks">;
680
+ title: z.ZodOptional<z.ZodString>;
681
+ items: z.ZodArray<z.ZodObject<{
682
+ label: z.ZodString;
683
+ state: z.ZodEnum<["pass", "fail", "pending", "skipped"]>;
684
+ detail: z.ZodOptional<z.ZodString>;
685
+ }, "strict", z.ZodTypeAny, {
686
+ label: string;
687
+ state: "pass" | "fail" | "pending" | "skipped";
688
+ detail?: string | undefined;
689
+ }, {
690
+ label: string;
691
+ state: "pass" | "fail" | "pending" | "skipped";
692
+ detail?: string | undefined;
693
+ }>, "many">;
694
+ } & {
695
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
696
+ anchor: z.ZodOptional<z.ZodString>;
697
+ postmortem: z.ZodOptional<z.ZodBoolean>;
698
+ }, "strict", z.ZodTypeAny, {
699
+ type: "checks";
700
+ items: {
701
+ label: string;
702
+ state: "pass" | "fail" | "pending" | "skipped";
703
+ detail?: string | undefined;
704
+ }[];
705
+ title?: string | undefined;
706
+ slot?: "summary" | undefined;
707
+ anchor?: string | undefined;
708
+ postmortem?: boolean | undefined;
709
+ }, {
710
+ type: "checks";
711
+ items: {
712
+ label: string;
713
+ state: "pass" | "fail" | "pending" | "skipped";
714
+ detail?: string | undefined;
715
+ }[];
716
+ title?: string | undefined;
717
+ slot?: "summary" | undefined;
718
+ anchor?: string | undefined;
719
+ postmortem?: boolean | undefined;
720
+ }>, z.ZodObject<{
721
+ type: z.ZodLiteral<"changes">;
722
+ title: z.ZodOptional<z.ZodString>;
723
+ rows: z.ZodArray<z.ZodObject<{
724
+ label: z.ZodString;
725
+ from: z.ZodOptional<z.ZodString>;
726
+ to: z.ZodOptional<z.ZodString>;
727
+ note: z.ZodOptional<z.ZodString>;
728
+ }, "strict", z.ZodTypeAny, {
729
+ label: string;
730
+ from?: string | undefined;
731
+ to?: string | undefined;
732
+ note?: string | undefined;
733
+ }, {
734
+ label: string;
735
+ from?: string | undefined;
736
+ to?: string | undefined;
737
+ note?: string | undefined;
738
+ }>, "many">;
739
+ } & {
740
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
741
+ anchor: z.ZodOptional<z.ZodString>;
742
+ postmortem: z.ZodOptional<z.ZodBoolean>;
743
+ }, "strict", z.ZodTypeAny, {
744
+ type: "changes";
745
+ rows: {
746
+ label: string;
747
+ from?: string | undefined;
748
+ to?: string | undefined;
749
+ note?: string | undefined;
750
+ }[];
751
+ title?: string | undefined;
752
+ slot?: "summary" | undefined;
753
+ anchor?: string | undefined;
754
+ postmortem?: boolean | undefined;
755
+ }, {
756
+ type: "changes";
757
+ rows: {
758
+ label: string;
759
+ from?: string | undefined;
760
+ to?: string | undefined;
761
+ note?: string | undefined;
762
+ }[];
763
+ title?: string | undefined;
764
+ slot?: "summary" | undefined;
765
+ anchor?: string | undefined;
766
+ postmortem?: boolean | undefined;
767
+ }>, z.ZodObject<{
768
+ type: z.ZodLiteral<"range_overlap">;
769
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
770
+ unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
771
+ min: z.ZodOptional<z.ZodNumber>;
772
+ max: z.ZodOptional<z.ZodNumber>;
773
+ rows: z.ZodArray<z.ZodObject<{
774
+ label: z.ZodEffects<z.ZodString, string, string>;
775
+ from: z.ZodNumber;
776
+ to: z.ZodNumber;
777
+ }, "strict", z.ZodTypeAny, {
778
+ label: string;
779
+ from: number;
780
+ to: number;
781
+ }, {
782
+ label: string;
783
+ from: number;
784
+ to: number;
785
+ }>, "many">;
786
+ window: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
787
+ } & {
788
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
789
+ anchor: z.ZodOptional<z.ZodString>;
790
+ postmortem: z.ZodOptional<z.ZodBoolean>;
791
+ }, "strict", z.ZodTypeAny, {
792
+ type: "range_overlap";
793
+ rows: {
794
+ label: string;
795
+ from: number;
796
+ to: number;
797
+ }[];
798
+ title?: string | undefined;
799
+ unit?: string | undefined;
800
+ max?: number | undefined;
801
+ min?: number | undefined;
802
+ window?: [number, number] | undefined;
803
+ slot?: "summary" | undefined;
804
+ anchor?: string | undefined;
805
+ postmortem?: boolean | undefined;
806
+ }, {
807
+ type: "range_overlap";
808
+ rows: {
809
+ label: string;
810
+ from: number;
811
+ to: number;
812
+ }[];
813
+ title?: string | undefined;
814
+ unit?: string | undefined;
815
+ max?: number | undefined;
816
+ min?: number | undefined;
817
+ window?: [number, number] | undefined;
818
+ slot?: "summary" | undefined;
819
+ anchor?: string | undefined;
820
+ postmortem?: boolean | undefined;
821
+ }>, z.ZodObject<{
822
+ type: z.ZodLiteral<"histogram">;
823
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
824
+ unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
825
+ edges: z.ZodArray<z.ZodNumber, "many">;
826
+ before: z.ZodArray<z.ZodNumber, "many">;
827
+ after: z.ZodArray<z.ZodNumber, "many">;
828
+ threshold: z.ZodOptional<z.ZodObject<{
829
+ value: z.ZodNumber;
830
+ label: z.ZodOptional<z.ZodString>;
831
+ }, "strict", z.ZodTypeAny, {
832
+ value: number;
833
+ label?: string | undefined;
834
+ }, {
835
+ value: number;
836
+ label?: string | undefined;
837
+ }>>;
838
+ source: z.ZodOptional<z.ZodObject<{
839
+ kind: z.ZodOptional<z.ZodString>;
840
+ datasource: z.ZodOptional<z.ZodString>;
841
+ query: z.ZodOptional<z.ZodString>;
842
+ from: z.ZodOptional<z.ZodString>;
843
+ to: z.ZodOptional<z.ZodString>;
844
+ step: z.ZodOptional<z.ZodString>;
845
+ artifact_id: z.ZodOptional<z.ZodString>;
846
+ }, "strict", z.ZodTypeAny, {
847
+ kind?: string | undefined;
848
+ datasource?: string | undefined;
849
+ query?: string | undefined;
850
+ from?: string | undefined;
851
+ to?: string | undefined;
852
+ step?: string | undefined;
853
+ artifact_id?: string | undefined;
854
+ }, {
855
+ kind?: string | undefined;
856
+ datasource?: string | undefined;
857
+ query?: string | undefined;
858
+ from?: string | undefined;
859
+ to?: string | undefined;
860
+ step?: string | undefined;
861
+ artifact_id?: string | undefined;
862
+ }>>;
863
+ } & {
864
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
865
+ anchor: z.ZodOptional<z.ZodString>;
866
+ postmortem: z.ZodOptional<z.ZodBoolean>;
867
+ }, "strict", z.ZodTypeAny, {
868
+ type: "histogram";
869
+ before: number[];
870
+ after: number[];
871
+ edges: number[];
872
+ title?: string | undefined;
873
+ unit?: string | undefined;
874
+ threshold?: {
875
+ value: number;
876
+ label?: string | undefined;
877
+ } | undefined;
878
+ source?: {
879
+ kind?: string | undefined;
880
+ datasource?: string | undefined;
881
+ query?: string | undefined;
882
+ from?: string | undefined;
883
+ to?: string | undefined;
884
+ step?: string | undefined;
885
+ artifact_id?: string | undefined;
886
+ } | undefined;
887
+ slot?: "summary" | undefined;
888
+ anchor?: string | undefined;
889
+ postmortem?: boolean | undefined;
890
+ }, {
891
+ type: "histogram";
892
+ before: number[];
893
+ after: number[];
894
+ edges: number[];
895
+ title?: string | undefined;
896
+ unit?: string | undefined;
897
+ threshold?: {
898
+ value: number;
899
+ label?: string | undefined;
900
+ } | undefined;
901
+ source?: {
902
+ kind?: string | undefined;
903
+ datasource?: string | undefined;
904
+ query?: string | undefined;
905
+ from?: string | undefined;
906
+ to?: string | undefined;
907
+ step?: string | undefined;
908
+ artifact_id?: string | undefined;
909
+ } | undefined;
910
+ slot?: "summary" | undefined;
911
+ anchor?: string | undefined;
912
+ postmortem?: boolean | undefined;
913
+ }>, z.ZodObject<{
914
+ type: z.ZodLiteral<"run_history">;
915
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
916
+ repo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
917
+ branch: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
918
+ runs: z.ZodArray<z.ZodObject<{
919
+ ref: z.ZodEffects<z.ZodString, string, string>;
920
+ result: z.ZodEnum<["success", "failure", "cancelled", "pending"]>;
921
+ sha: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
922
+ at: z.ZodOptional<z.ZodString>;
923
+ trigger: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
924
+ job: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
925
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
926
+ }, "strict", z.ZodTypeAny, {
927
+ ref: string;
928
+ result: "pending" | "success" | "failure" | "cancelled";
929
+ at?: string | undefined;
930
+ sha?: string | undefined;
931
+ trigger?: string | undefined;
932
+ job?: string | undefined;
933
+ url?: string | undefined;
934
+ }, {
935
+ ref: string;
936
+ result: "pending" | "success" | "failure" | "cancelled";
937
+ at?: string | undefined;
938
+ sha?: string | undefined;
939
+ trigger?: string | undefined;
940
+ job?: string | undefined;
941
+ url?: string | undefined;
942
+ }>, "many">;
943
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
944
+ between: z.ZodTuple<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>], null>;
945
+ change_ref: z.ZodEnum<["regression", "fix", "change"]>;
946
+ sha: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
947
+ at: z.ZodOptional<z.ZodString>;
948
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
949
+ }, "strict", z.ZodTypeAny, {
950
+ between: [string, string];
951
+ change_ref: "regression" | "fix" | "change";
952
+ at?: string | undefined;
953
+ title?: string | undefined;
954
+ sha?: string | undefined;
955
+ }, {
956
+ between: [string, string];
957
+ change_ref: "regression" | "fix" | "change";
958
+ at?: string | undefined;
959
+ title?: string | undefined;
960
+ sha?: string | undefined;
961
+ }>, "many">>;
962
+ span: z.ZodOptional<z.ZodObject<{
963
+ from: z.ZodEffects<z.ZodString, string, string>;
964
+ to: z.ZodEffects<z.ZodString, string, string>;
965
+ label: z.ZodEffects<z.ZodString, string, string>;
966
+ }, "strict", z.ZodTypeAny, {
967
+ label: string;
968
+ from: string;
969
+ to: string;
970
+ }, {
971
+ label: string;
972
+ from: string;
973
+ to: string;
974
+ }>>;
975
+ } & {
976
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
977
+ anchor: z.ZodOptional<z.ZodString>;
978
+ postmortem: z.ZodOptional<z.ZodBoolean>;
979
+ }, "strict", z.ZodTypeAny, {
980
+ type: "run_history";
981
+ runs: {
982
+ ref: string;
983
+ result: "pending" | "success" | "failure" | "cancelled";
984
+ at?: string | undefined;
985
+ sha?: string | undefined;
986
+ trigger?: string | undefined;
987
+ job?: string | undefined;
988
+ url?: string | undefined;
989
+ }[];
990
+ title?: string | undefined;
991
+ marks?: {
992
+ between: [string, string];
993
+ change_ref: "regression" | "fix" | "change";
994
+ at?: string | undefined;
995
+ title?: string | undefined;
996
+ sha?: string | undefined;
997
+ }[] | undefined;
998
+ repo?: string | undefined;
999
+ branch?: string | undefined;
1000
+ span?: {
1001
+ label: string;
1002
+ from: string;
1003
+ to: string;
1004
+ } | undefined;
1005
+ slot?: "summary" | undefined;
1006
+ anchor?: string | undefined;
1007
+ postmortem?: boolean | undefined;
1008
+ }, {
1009
+ type: "run_history";
1010
+ runs: {
1011
+ ref: string;
1012
+ result: "pending" | "success" | "failure" | "cancelled";
1013
+ at?: string | undefined;
1014
+ sha?: string | undefined;
1015
+ trigger?: string | undefined;
1016
+ job?: string | undefined;
1017
+ url?: string | undefined;
1018
+ }[];
1019
+ title?: string | undefined;
1020
+ marks?: {
1021
+ between: [string, string];
1022
+ change_ref: "regression" | "fix" | "change";
1023
+ at?: string | undefined;
1024
+ title?: string | undefined;
1025
+ sha?: string | undefined;
1026
+ }[] | undefined;
1027
+ repo?: string | undefined;
1028
+ branch?: string | undefined;
1029
+ span?: {
1030
+ label: string;
1031
+ from: string;
1032
+ to: string;
1033
+ } | undefined;
1034
+ slot?: "summary" | undefined;
1035
+ anchor?: string | undefined;
1036
+ postmortem?: boolean | undefined;
1037
+ }>, z.ZodObject<{
1038
+ type: z.ZodLiteral<"diff">;
1039
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1040
+ path: z.ZodEffects<z.ZodString, string, string>;
1041
+ repo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1042
+ ref: z.ZodEffects<z.ZodString, string, string>;
1043
+ at: z.ZodOptional<z.ZodString>;
1044
+ additions: z.ZodNumber;
1045
+ deletions: z.ZodNumber;
1046
+ hunks: z.ZodArray<z.ZodArray<z.ZodObject<{
1047
+ op: z.ZodEnum<["+", "-"]>;
1048
+ text: z.ZodEffects<z.ZodString, string, string>;
1049
+ }, "strict", z.ZodTypeAny, {
1050
+ op: "+" | "-";
1051
+ text: string;
1052
+ }, {
1053
+ op: "+" | "-";
1054
+ text: string;
1055
+ }>, "many">, "many">;
1056
+ } & {
1057
+ slot: z.ZodOptional<z.ZodLiteral<"summary">>;
1058
+ anchor: z.ZodOptional<z.ZodString>;
1059
+ postmortem: z.ZodOptional<z.ZodBoolean>;
1060
+ }, "strict", z.ZodTypeAny, {
1061
+ path: string;
1062
+ type: "diff";
1063
+ ref: string;
1064
+ additions: number;
1065
+ deletions: number;
1066
+ hunks: {
1067
+ op: "+" | "-";
1068
+ text: string;
1069
+ }[][];
1070
+ at?: string | undefined;
1071
+ title?: string | undefined;
1072
+ repo?: string | undefined;
1073
+ slot?: "summary" | undefined;
1074
+ anchor?: string | undefined;
1075
+ postmortem?: boolean | undefined;
1076
+ }, {
1077
+ path: string;
1078
+ type: "diff";
1079
+ ref: string;
1080
+ additions: number;
1081
+ deletions: number;
1082
+ hunks: {
1083
+ op: "+" | "-";
1084
+ text: string;
1085
+ }[][];
1086
+ at?: string | undefined;
1087
+ title?: string | undefined;
1088
+ repo?: string | undefined;
1089
+ slot?: "summary" | undefined;
1090
+ anchor?: string | undefined;
1091
+ postmortem?: boolean | undefined;
1092
+ }>]>;
1093
+ /**
1094
+ * The light check the timeline tools apply to `blocks`. The full schema above
1095
+ * would add about 8 KB to each tool listing, and the API validates every block
1096
+ * itself (400 invalid_block names the field), so the tools only check that the
1097
+ * type is one the API accepts. tellagen_build_figure does the full check.
1098
+ */
1099
+ export declare const timelineBlockRefSchema: z.ZodObject<{
1100
+ type: z.ZodEnum<["stats", "compare", "trend", "table", "checks", "changes", "range_overlap", "histogram", "run_history", "diff"]>;
1101
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1102
+ type: z.ZodEnum<["stats", "compare", "trend", "table", "checks", "changes", "range_overlap", "histogram", "run_history", "diff"]>;
1103
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1104
+ type: z.ZodEnum<["stats", "compare", "trend", "table", "checks", "changes", "range_overlap", "histogram", "run_history", "diff"]>;
1105
+ }, z.ZodTypeAny, "passthrough">>;
1106
+ /** What tellagen_build_figure accepts. */
1107
+ export declare const figureInputSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1108
+ type: z.ZodLiteral<"stats">;
1109
+ items: z.ZodArray<z.ZodObject<{
1110
+ label: z.ZodString;
1111
+ value: z.ZodString;
1112
+ caption: z.ZodOptional<z.ZodString>;
1113
+ tone: z.ZodOptional<z.ZodEnum<["good", "warn", "bad", "neutral"]>>;
1114
+ }, "strict", z.ZodTypeAny, {
1115
+ value: string;
1116
+ label: string;
1117
+ caption?: string | undefined;
1118
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1119
+ }, {
1120
+ value: string;
1121
+ label: string;
1122
+ caption?: string | undefined;
1123
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1124
+ }>, "many">;
1125
+ }, "strict", z.ZodTypeAny, {
1126
+ type: "stats";
1127
+ items: {
1128
+ value: string;
1129
+ label: string;
1130
+ caption?: string | undefined;
1131
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1132
+ }[];
1133
+ }, {
1134
+ type: "stats";
1135
+ items: {
1136
+ value: string;
1137
+ label: string;
1138
+ caption?: string | undefined;
1139
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1140
+ }[];
1141
+ }>, z.ZodObject<{
1142
+ type: z.ZodLiteral<"compare">;
1143
+ title: z.ZodOptional<z.ZodString>;
1144
+ metric: z.ZodOptional<z.ZodString>;
1145
+ unit: z.ZodOptional<z.ZodString>;
1146
+ better: z.ZodOptional<z.ZodEnum<["lower", "higher"]>>;
1147
+ delta: z.ZodOptional<z.ZodEnum<["rel", "abs"]>>;
1148
+ max: z.ZodOptional<z.ZodNumber>;
1149
+ threshold: z.ZodOptional<z.ZodObject<{
1150
+ value: z.ZodNumber;
1151
+ label: z.ZodOptional<z.ZodString>;
1152
+ }, "strict", z.ZodTypeAny, {
1153
+ value: number;
1154
+ label?: string | undefined;
1155
+ }, {
1156
+ value: number;
1157
+ label?: string | undefined;
1158
+ }>>;
1159
+ rows: z.ZodArray<z.ZodObject<{
1160
+ label: z.ZodString;
1161
+ mono: z.ZodOptional<z.ZodBoolean>;
1162
+ before: z.ZodNumber;
1163
+ after: z.ZodNumber;
1164
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
1165
+ label: z.ZodString;
1166
+ before: z.ZodString;
1167
+ after: z.ZodString;
1168
+ }, "strict", z.ZodTypeAny, {
1169
+ label: string;
1170
+ before: string;
1171
+ after: string;
1172
+ }, {
1173
+ label: string;
1174
+ before: string;
1175
+ after: string;
1176
+ }>, "many">>;
1177
+ }, "strict", z.ZodTypeAny, {
1178
+ label: string;
1179
+ before: number;
1180
+ after: number;
1181
+ mono?: boolean | undefined;
1182
+ details?: {
1183
+ label: string;
1184
+ before: string;
1185
+ after: string;
1186
+ }[] | undefined;
1187
+ }, {
1188
+ label: string;
1189
+ before: number;
1190
+ after: number;
1191
+ mono?: boolean | undefined;
1192
+ details?: {
1193
+ label: string;
1194
+ before: string;
1195
+ after: string;
1196
+ }[] | undefined;
1197
+ }>, "many">;
1198
+ }, "strict", z.ZodTypeAny, {
1199
+ type: "compare";
1200
+ rows: {
1201
+ label: string;
1202
+ before: number;
1203
+ after: number;
1204
+ mono?: boolean | undefined;
1205
+ details?: {
1206
+ label: string;
1207
+ before: string;
1208
+ after: string;
1209
+ }[] | undefined;
1210
+ }[];
1211
+ title?: string | undefined;
1212
+ metric?: string | undefined;
1213
+ unit?: string | undefined;
1214
+ better?: "lower" | "higher" | undefined;
1215
+ delta?: "rel" | "abs" | undefined;
1216
+ max?: number | undefined;
1217
+ threshold?: {
1218
+ value: number;
1219
+ label?: string | undefined;
1220
+ } | undefined;
1221
+ }, {
1222
+ type: "compare";
1223
+ rows: {
1224
+ label: string;
1225
+ before: number;
1226
+ after: number;
1227
+ mono?: boolean | undefined;
1228
+ details?: {
1229
+ label: string;
1230
+ before: string;
1231
+ after: string;
1232
+ }[] | undefined;
1233
+ }[];
1234
+ title?: string | undefined;
1235
+ metric?: string | undefined;
1236
+ unit?: string | undefined;
1237
+ better?: "lower" | "higher" | undefined;
1238
+ delta?: "rel" | "abs" | undefined;
1239
+ max?: number | undefined;
1240
+ threshold?: {
1241
+ value: number;
1242
+ label?: string | undefined;
1243
+ } | undefined;
1244
+ }>, z.ZodObject<{
1245
+ type: z.ZodLiteral<"trend">;
1246
+ title: z.ZodOptional<z.ZodString>;
1247
+ unit: z.ZodOptional<z.ZodString>;
1248
+ series: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1249
+ start: z.ZodOptional<z.ZodString>;
1250
+ step_seconds: z.ZodOptional<z.ZodNumber>;
1251
+ points: z.ZodOptional<z.ZodArray<z.ZodObject<{
1252
+ t: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1253
+ v: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1254
+ }, "strict", z.ZodTypeAny, {
1255
+ t: string | number;
1256
+ v: string | number | null;
1257
+ }, {
1258
+ t: string | number;
1259
+ v: string | number | null;
1260
+ }>, "many">>;
1261
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
1262
+ at: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1263
+ label: z.ZodString;
1264
+ }, "strict", z.ZodTypeAny, {
1265
+ label: string;
1266
+ at: string | number;
1267
+ }, {
1268
+ label: string;
1269
+ at: string | number;
1270
+ }>, "many">>;
1271
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1272
+ i: z.ZodNumber;
1273
+ label: z.ZodString;
1274
+ }, "strict", z.ZodTypeAny, {
1275
+ label: string;
1276
+ i: number;
1277
+ }, {
1278
+ label: string;
1279
+ i: number;
1280
+ }>, "many">>;
1281
+ max_points: z.ZodOptional<z.ZodNumber>;
1282
+ reduce: z.ZodOptional<z.ZodEnum<["mean", "max", "min", "last"]>>;
1283
+ precision: z.ZodOptional<z.ZodNumber>;
1284
+ max: z.ZodOptional<z.ZodNumber>;
1285
+ threshold: z.ZodOptional<z.ZodObject<{
1286
+ value: z.ZodNumber;
1287
+ label: z.ZodOptional<z.ZodString>;
1288
+ }, "strict", z.ZodTypeAny, {
1289
+ value: number;
1290
+ label?: string | undefined;
1291
+ }, {
1292
+ value: number;
1293
+ label?: string | undefined;
1294
+ }>>;
1295
+ source: z.ZodOptional<z.ZodObject<{
1296
+ kind: z.ZodOptional<z.ZodString>;
1297
+ datasource: z.ZodOptional<z.ZodString>;
1298
+ query: z.ZodOptional<z.ZodString>;
1299
+ from: z.ZodOptional<z.ZodString>;
1300
+ to: z.ZodOptional<z.ZodString>;
1301
+ step: z.ZodOptional<z.ZodString>;
1302
+ artifact_id: z.ZodOptional<z.ZodString>;
1303
+ }, "strict", z.ZodTypeAny, {
1304
+ kind?: string | undefined;
1305
+ datasource?: string | undefined;
1306
+ query?: string | undefined;
1307
+ from?: string | undefined;
1308
+ to?: string | undefined;
1309
+ step?: string | undefined;
1310
+ artifact_id?: string | undefined;
1311
+ }, {
1312
+ kind?: string | undefined;
1313
+ datasource?: string | undefined;
1314
+ query?: string | undefined;
1315
+ from?: string | undefined;
1316
+ to?: string | undefined;
1317
+ step?: string | undefined;
1318
+ artifact_id?: string | undefined;
1319
+ }>>;
1320
+ }, "strict", z.ZodTypeAny, {
1321
+ type: "trend";
1322
+ reduce?: "max" | "min" | "mean" | "last" | undefined;
1323
+ title?: string | undefined;
1324
+ unit?: string | undefined;
1325
+ max?: number | undefined;
1326
+ threshold?: {
1327
+ value: number;
1328
+ label?: string | undefined;
1329
+ } | undefined;
1330
+ series?: number[] | undefined;
1331
+ start?: string | undefined;
1332
+ step_seconds?: number | undefined;
1333
+ marks?: {
1334
+ label: string;
1335
+ i: number;
1336
+ }[] | undefined;
1337
+ source?: {
1338
+ kind?: string | undefined;
1339
+ datasource?: string | undefined;
1340
+ query?: string | undefined;
1341
+ from?: string | undefined;
1342
+ to?: string | undefined;
1343
+ step?: string | undefined;
1344
+ artifact_id?: string | undefined;
1345
+ } | undefined;
1346
+ points?: {
1347
+ t: string | number;
1348
+ v: string | number | null;
1349
+ }[] | undefined;
1350
+ events?: {
1351
+ label: string;
1352
+ at: string | number;
1353
+ }[] | undefined;
1354
+ max_points?: number | undefined;
1355
+ precision?: number | undefined;
1356
+ }, {
1357
+ type: "trend";
1358
+ reduce?: "max" | "min" | "mean" | "last" | undefined;
1359
+ title?: string | undefined;
1360
+ unit?: string | undefined;
1361
+ max?: number | undefined;
1362
+ threshold?: {
1363
+ value: number;
1364
+ label?: string | undefined;
1365
+ } | undefined;
1366
+ series?: number[] | undefined;
1367
+ start?: string | undefined;
1368
+ step_seconds?: number | undefined;
1369
+ marks?: {
1370
+ label: string;
1371
+ i: number;
1372
+ }[] | undefined;
1373
+ source?: {
1374
+ kind?: string | undefined;
1375
+ datasource?: string | undefined;
1376
+ query?: string | undefined;
1377
+ from?: string | undefined;
1378
+ to?: string | undefined;
1379
+ step?: string | undefined;
1380
+ artifact_id?: string | undefined;
1381
+ } | undefined;
1382
+ points?: {
1383
+ t: string | number;
1384
+ v: string | number | null;
1385
+ }[] | undefined;
1386
+ events?: {
1387
+ label: string;
1388
+ at: string | number;
1389
+ }[] | undefined;
1390
+ max_points?: number | undefined;
1391
+ precision?: number | undefined;
1392
+ }>, z.ZodObject<{
1393
+ type: z.ZodLiteral<"table">;
1394
+ title: z.ZodOptional<z.ZodString>;
1395
+ columns: z.ZodArray<z.ZodObject<{
1396
+ label: z.ZodString;
1397
+ }, "strict", z.ZodTypeAny, {
1398
+ label: string;
1399
+ }, {
1400
+ label: string;
1401
+ }>, "many">;
1402
+ rows: z.ZodArray<z.ZodObject<{
1403
+ cells: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1404
+ }, "strict", z.ZodTypeAny, {
1405
+ cells: (string | number)[];
1406
+ }, {
1407
+ cells: (string | number)[];
1408
+ }>, "many">;
1409
+ }, "strict", z.ZodTypeAny, {
1410
+ type: "table";
1411
+ rows: {
1412
+ cells: (string | number)[];
1413
+ }[];
1414
+ columns: {
1415
+ label: string;
1416
+ }[];
1417
+ title?: string | undefined;
1418
+ }, {
1419
+ type: "table";
1420
+ rows: {
1421
+ cells: (string | number)[];
1422
+ }[];
1423
+ columns: {
1424
+ label: string;
1425
+ }[];
1426
+ title?: string | undefined;
1427
+ }>, z.ZodObject<{
1428
+ type: z.ZodLiteral<"checks">;
1429
+ title: z.ZodOptional<z.ZodString>;
1430
+ items: z.ZodArray<z.ZodObject<{
1431
+ label: z.ZodString;
1432
+ state: z.ZodEnum<["pass", "fail", "pending", "skipped"]>;
1433
+ detail: z.ZodOptional<z.ZodString>;
1434
+ }, "strict", z.ZodTypeAny, {
1435
+ label: string;
1436
+ state: "pass" | "fail" | "pending" | "skipped";
1437
+ detail?: string | undefined;
1438
+ }, {
1439
+ label: string;
1440
+ state: "pass" | "fail" | "pending" | "skipped";
1441
+ detail?: string | undefined;
1442
+ }>, "many">;
1443
+ }, "strict", z.ZodTypeAny, {
1444
+ type: "checks";
1445
+ items: {
1446
+ label: string;
1447
+ state: "pass" | "fail" | "pending" | "skipped";
1448
+ detail?: string | undefined;
1449
+ }[];
1450
+ title?: string | undefined;
1451
+ }, {
1452
+ type: "checks";
1453
+ items: {
1454
+ label: string;
1455
+ state: "pass" | "fail" | "pending" | "skipped";
1456
+ detail?: string | undefined;
1457
+ }[];
1458
+ title?: string | undefined;
1459
+ }>, z.ZodObject<{
1460
+ type: z.ZodLiteral<"changes">;
1461
+ title: z.ZodOptional<z.ZodString>;
1462
+ rows: z.ZodArray<z.ZodObject<{
1463
+ label: z.ZodString;
1464
+ from: z.ZodOptional<z.ZodString>;
1465
+ to: z.ZodOptional<z.ZodString>;
1466
+ note: z.ZodOptional<z.ZodString>;
1467
+ }, "strict", z.ZodTypeAny, {
1468
+ label: string;
1469
+ from?: string | undefined;
1470
+ to?: string | undefined;
1471
+ note?: string | undefined;
1472
+ }, {
1473
+ label: string;
1474
+ from?: string | undefined;
1475
+ to?: string | undefined;
1476
+ note?: string | undefined;
1477
+ }>, "many">;
1478
+ }, "strict", z.ZodTypeAny, {
1479
+ type: "changes";
1480
+ rows: {
1481
+ label: string;
1482
+ from?: string | undefined;
1483
+ to?: string | undefined;
1484
+ note?: string | undefined;
1485
+ }[];
1486
+ title?: string | undefined;
1487
+ }, {
1488
+ type: "changes";
1489
+ rows: {
1490
+ label: string;
1491
+ from?: string | undefined;
1492
+ to?: string | undefined;
1493
+ note?: string | undefined;
1494
+ }[];
1495
+ title?: string | undefined;
1496
+ }>, z.ZodObject<{
1497
+ type: z.ZodLiteral<"range_overlap">;
1498
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1499
+ unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1500
+ min: z.ZodOptional<z.ZodNumber>;
1501
+ max: z.ZodOptional<z.ZodNumber>;
1502
+ rows: z.ZodArray<z.ZodObject<{
1503
+ label: z.ZodEffects<z.ZodString, string, string>;
1504
+ from: z.ZodNumber;
1505
+ to: z.ZodNumber;
1506
+ }, "strict", z.ZodTypeAny, {
1507
+ label: string;
1508
+ from: number;
1509
+ to: number;
1510
+ }, {
1511
+ label: string;
1512
+ from: number;
1513
+ to: number;
1514
+ }>, "many">;
1515
+ window: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
1516
+ }, "strict", z.ZodTypeAny, {
1517
+ type: "range_overlap";
1518
+ rows: {
1519
+ label: string;
1520
+ from: number;
1521
+ to: number;
1522
+ }[];
1523
+ title?: string | undefined;
1524
+ unit?: string | undefined;
1525
+ max?: number | undefined;
1526
+ min?: number | undefined;
1527
+ window?: [number, number] | undefined;
1528
+ }, {
1529
+ type: "range_overlap";
1530
+ rows: {
1531
+ label: string;
1532
+ from: number;
1533
+ to: number;
1534
+ }[];
1535
+ title?: string | undefined;
1536
+ unit?: string | undefined;
1537
+ max?: number | undefined;
1538
+ min?: number | undefined;
1539
+ window?: [number, number] | undefined;
1540
+ }>, z.ZodObject<{
1541
+ type: z.ZodLiteral<"histogram">;
1542
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1543
+ unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1544
+ edges: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1545
+ before: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1546
+ after: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1547
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1548
+ le: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1549
+ before: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1550
+ after: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1551
+ }, "strict", z.ZodTypeAny, {
1552
+ before: string | number;
1553
+ after: string | number;
1554
+ le: string | number;
1555
+ }, {
1556
+ before: string | number;
1557
+ after: string | number;
1558
+ le: string | number;
1559
+ }>, "many">>;
1560
+ lower_edge: z.ZodOptional<z.ZodNumber>;
1561
+ overflow: z.ZodOptional<z.ZodEnum<["reject", "drop"]>>;
1562
+ threshold: z.ZodOptional<z.ZodObject<{
1563
+ value: z.ZodNumber;
1564
+ label: z.ZodOptional<z.ZodString>;
1565
+ }, "strict", z.ZodTypeAny, {
1566
+ value: number;
1567
+ label?: string | undefined;
1568
+ }, {
1569
+ value: number;
1570
+ label?: string | undefined;
1571
+ }>>;
1572
+ source: z.ZodOptional<z.ZodObject<{
1573
+ kind: z.ZodOptional<z.ZodString>;
1574
+ datasource: z.ZodOptional<z.ZodString>;
1575
+ query: z.ZodOptional<z.ZodString>;
1576
+ from: z.ZodOptional<z.ZodString>;
1577
+ to: z.ZodOptional<z.ZodString>;
1578
+ step: z.ZodOptional<z.ZodString>;
1579
+ artifact_id: z.ZodOptional<z.ZodString>;
1580
+ }, "strict", z.ZodTypeAny, {
1581
+ kind?: string | undefined;
1582
+ datasource?: string | undefined;
1583
+ query?: string | undefined;
1584
+ from?: string | undefined;
1585
+ to?: string | undefined;
1586
+ step?: string | undefined;
1587
+ artifact_id?: string | undefined;
1588
+ }, {
1589
+ kind?: string | undefined;
1590
+ datasource?: string | undefined;
1591
+ query?: string | undefined;
1592
+ from?: string | undefined;
1593
+ to?: string | undefined;
1594
+ step?: string | undefined;
1595
+ artifact_id?: string | undefined;
1596
+ }>>;
1597
+ }, "strict", z.ZodTypeAny, {
1598
+ type: "histogram";
1599
+ title?: string | undefined;
1600
+ unit?: string | undefined;
1601
+ threshold?: {
1602
+ value: number;
1603
+ label?: string | undefined;
1604
+ } | undefined;
1605
+ before?: number[] | undefined;
1606
+ after?: number[] | undefined;
1607
+ source?: {
1608
+ kind?: string | undefined;
1609
+ datasource?: string | undefined;
1610
+ query?: string | undefined;
1611
+ from?: string | undefined;
1612
+ to?: string | undefined;
1613
+ step?: string | undefined;
1614
+ artifact_id?: string | undefined;
1615
+ } | undefined;
1616
+ edges?: number[] | undefined;
1617
+ buckets?: {
1618
+ before: string | number;
1619
+ after: string | number;
1620
+ le: string | number;
1621
+ }[] | undefined;
1622
+ lower_edge?: number | undefined;
1623
+ overflow?: "reject" | "drop" | undefined;
1624
+ }, {
1625
+ type: "histogram";
1626
+ title?: string | undefined;
1627
+ unit?: string | undefined;
1628
+ threshold?: {
1629
+ value: number;
1630
+ label?: string | undefined;
1631
+ } | undefined;
1632
+ before?: number[] | undefined;
1633
+ after?: number[] | undefined;
1634
+ source?: {
1635
+ kind?: string | undefined;
1636
+ datasource?: string | undefined;
1637
+ query?: string | undefined;
1638
+ from?: string | undefined;
1639
+ to?: string | undefined;
1640
+ step?: string | undefined;
1641
+ artifact_id?: string | undefined;
1642
+ } | undefined;
1643
+ edges?: number[] | undefined;
1644
+ buckets?: {
1645
+ before: string | number;
1646
+ after: string | number;
1647
+ le: string | number;
1648
+ }[] | undefined;
1649
+ lower_edge?: number | undefined;
1650
+ overflow?: "reject" | "drop" | undefined;
1651
+ }>, z.ZodObject<{
1652
+ type: z.ZodLiteral<"run_history">;
1653
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1654
+ repo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1655
+ branch: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1656
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1657
+ ref: z.ZodEffects<z.ZodString, string, string>;
1658
+ result: z.ZodEnum<["success", "failure", "cancelled", "pending"]>;
1659
+ sha: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1660
+ at: z.ZodOptional<z.ZodString>;
1661
+ trigger: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1662
+ job: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1663
+ url: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1664
+ }, "strict", z.ZodTypeAny, {
1665
+ ref: string;
1666
+ result: "pending" | "success" | "failure" | "cancelled";
1667
+ at?: string | undefined;
1668
+ sha?: string | undefined;
1669
+ trigger?: string | undefined;
1670
+ job?: string | undefined;
1671
+ url?: string | undefined;
1672
+ }, {
1673
+ ref: string;
1674
+ result: "pending" | "success" | "failure" | "cancelled";
1675
+ at?: string | undefined;
1676
+ sha?: string | undefined;
1677
+ trigger?: string | undefined;
1678
+ job?: string | undefined;
1679
+ url?: string | undefined;
1680
+ }>, "many">>;
1681
+ github_runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1682
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1683
+ databaseId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1684
+ run_number: z.ZodOptional<z.ZodNumber>;
1685
+ number: z.ZodOptional<z.ZodNumber>;
1686
+ head_sha: z.ZodOptional<z.ZodString>;
1687
+ headSha: z.ZodOptional<z.ZodString>;
1688
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1689
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1690
+ run_started_at: z.ZodOptional<z.ZodString>;
1691
+ startedAt: z.ZodOptional<z.ZodString>;
1692
+ created_at: z.ZodOptional<z.ZodString>;
1693
+ createdAt: z.ZodOptional<z.ZodString>;
1694
+ event: z.ZodOptional<z.ZodString>;
1695
+ html_url: z.ZodOptional<z.ZodString>;
1696
+ url: z.ZodOptional<z.ZodString>;
1697
+ job: z.ZodOptional<z.ZodString>;
1698
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1699
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1700
+ databaseId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1701
+ run_number: z.ZodOptional<z.ZodNumber>;
1702
+ number: z.ZodOptional<z.ZodNumber>;
1703
+ head_sha: z.ZodOptional<z.ZodString>;
1704
+ headSha: z.ZodOptional<z.ZodString>;
1705
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1706
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1707
+ run_started_at: z.ZodOptional<z.ZodString>;
1708
+ startedAt: z.ZodOptional<z.ZodString>;
1709
+ created_at: z.ZodOptional<z.ZodString>;
1710
+ createdAt: z.ZodOptional<z.ZodString>;
1711
+ event: z.ZodOptional<z.ZodString>;
1712
+ html_url: z.ZodOptional<z.ZodString>;
1713
+ url: z.ZodOptional<z.ZodString>;
1714
+ job: z.ZodOptional<z.ZodString>;
1715
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1716
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1717
+ databaseId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1718
+ run_number: z.ZodOptional<z.ZodNumber>;
1719
+ number: z.ZodOptional<z.ZodNumber>;
1720
+ head_sha: z.ZodOptional<z.ZodString>;
1721
+ headSha: z.ZodOptional<z.ZodString>;
1722
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1723
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1724
+ run_started_at: z.ZodOptional<z.ZodString>;
1725
+ startedAt: z.ZodOptional<z.ZodString>;
1726
+ created_at: z.ZodOptional<z.ZodString>;
1727
+ createdAt: z.ZodOptional<z.ZodString>;
1728
+ event: z.ZodOptional<z.ZodString>;
1729
+ html_url: z.ZodOptional<z.ZodString>;
1730
+ url: z.ZodOptional<z.ZodString>;
1731
+ job: z.ZodOptional<z.ZodString>;
1732
+ }, z.ZodTypeAny, "passthrough">>, "many">>;
1733
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1734
+ between: z.ZodOptional<z.ZodTuple<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>], null>>;
1735
+ sha: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1736
+ change_ref: z.ZodEnum<[string, ...string[]]>;
1737
+ at: z.ZodOptional<z.ZodString>;
1738
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1739
+ }, "strict", z.ZodTypeAny, {
1740
+ change_ref: string;
1741
+ at?: string | undefined;
1742
+ title?: string | undefined;
1743
+ sha?: string | undefined;
1744
+ between?: [string, string] | undefined;
1745
+ }, {
1746
+ change_ref: string;
1747
+ at?: string | undefined;
1748
+ title?: string | undefined;
1749
+ sha?: string | undefined;
1750
+ between?: [string, string] | undefined;
1751
+ }>, "many">>;
1752
+ span: z.ZodOptional<z.ZodObject<{
1753
+ from: z.ZodEffects<z.ZodString, string, string>;
1754
+ to: z.ZodEffects<z.ZodString, string, string>;
1755
+ label: z.ZodEffects<z.ZodString, string, string>;
1756
+ }, "strict", z.ZodTypeAny, {
1757
+ label: string;
1758
+ from: string;
1759
+ to: string;
1760
+ }, {
1761
+ label: string;
1762
+ from: string;
1763
+ to: string;
1764
+ }>>;
1765
+ }, "strict", z.ZodTypeAny, {
1766
+ type: "run_history";
1767
+ title?: string | undefined;
1768
+ marks?: {
1769
+ change_ref: string;
1770
+ at?: string | undefined;
1771
+ title?: string | undefined;
1772
+ sha?: string | undefined;
1773
+ between?: [string, string] | undefined;
1774
+ }[] | undefined;
1775
+ repo?: string | undefined;
1776
+ branch?: string | undefined;
1777
+ runs?: {
1778
+ ref: string;
1779
+ result: "pending" | "success" | "failure" | "cancelled";
1780
+ at?: string | undefined;
1781
+ sha?: string | undefined;
1782
+ trigger?: string | undefined;
1783
+ job?: string | undefined;
1784
+ url?: string | undefined;
1785
+ }[] | undefined;
1786
+ span?: {
1787
+ label: string;
1788
+ from: string;
1789
+ to: string;
1790
+ } | undefined;
1791
+ github_runs?: z.objectOutputType<{
1792
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1793
+ databaseId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1794
+ run_number: z.ZodOptional<z.ZodNumber>;
1795
+ number: z.ZodOptional<z.ZodNumber>;
1796
+ head_sha: z.ZodOptional<z.ZodString>;
1797
+ headSha: z.ZodOptional<z.ZodString>;
1798
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1799
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1800
+ run_started_at: z.ZodOptional<z.ZodString>;
1801
+ startedAt: z.ZodOptional<z.ZodString>;
1802
+ created_at: z.ZodOptional<z.ZodString>;
1803
+ createdAt: z.ZodOptional<z.ZodString>;
1804
+ event: z.ZodOptional<z.ZodString>;
1805
+ html_url: z.ZodOptional<z.ZodString>;
1806
+ url: z.ZodOptional<z.ZodString>;
1807
+ job: z.ZodOptional<z.ZodString>;
1808
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
1809
+ }, {
1810
+ type: "run_history";
1811
+ title?: string | undefined;
1812
+ marks?: {
1813
+ change_ref: string;
1814
+ at?: string | undefined;
1815
+ title?: string | undefined;
1816
+ sha?: string | undefined;
1817
+ between?: [string, string] | undefined;
1818
+ }[] | undefined;
1819
+ repo?: string | undefined;
1820
+ branch?: string | undefined;
1821
+ runs?: {
1822
+ ref: string;
1823
+ result: "pending" | "success" | "failure" | "cancelled";
1824
+ at?: string | undefined;
1825
+ sha?: string | undefined;
1826
+ trigger?: string | undefined;
1827
+ job?: string | undefined;
1828
+ url?: string | undefined;
1829
+ }[] | undefined;
1830
+ span?: {
1831
+ label: string;
1832
+ from: string;
1833
+ to: string;
1834
+ } | undefined;
1835
+ github_runs?: z.objectInputType<{
1836
+ id: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1837
+ databaseId: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
1838
+ run_number: z.ZodOptional<z.ZodNumber>;
1839
+ number: z.ZodOptional<z.ZodNumber>;
1840
+ head_sha: z.ZodOptional<z.ZodString>;
1841
+ headSha: z.ZodOptional<z.ZodString>;
1842
+ conclusion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1843
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1844
+ run_started_at: z.ZodOptional<z.ZodString>;
1845
+ startedAt: z.ZodOptional<z.ZodString>;
1846
+ created_at: z.ZodOptional<z.ZodString>;
1847
+ createdAt: z.ZodOptional<z.ZodString>;
1848
+ event: z.ZodOptional<z.ZodString>;
1849
+ html_url: z.ZodOptional<z.ZodString>;
1850
+ url: z.ZodOptional<z.ZodString>;
1851
+ job: z.ZodOptional<z.ZodString>;
1852
+ }, z.ZodTypeAny, "passthrough">[] | undefined;
1853
+ }>, z.ZodObject<{
1854
+ type: z.ZodLiteral<"diff">;
1855
+ title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1856
+ path: z.ZodEffects<z.ZodString, string, string>;
1857
+ repo: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
1858
+ ref: z.ZodEffects<z.ZodString, string, string>;
1859
+ at: z.ZodOptional<z.ZodString>;
1860
+ additions: z.ZodNumber;
1861
+ deletions: z.ZodNumber;
1862
+ hunks: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
1863
+ op: z.ZodEnum<["+", "-"]>;
1864
+ text: z.ZodEffects<z.ZodString, string, string>;
1865
+ }, "strict", z.ZodTypeAny, {
1866
+ op: "+" | "-";
1867
+ text: string;
1868
+ }, {
1869
+ op: "+" | "-";
1870
+ text: string;
1871
+ }>, "many">, "many">>;
1872
+ patch: z.ZodOptional<z.ZodString>;
1873
+ }, "strict", z.ZodTypeAny, {
1874
+ path: string;
1875
+ type: "diff";
1876
+ ref: string;
1877
+ additions: number;
1878
+ deletions: number;
1879
+ at?: string | undefined;
1880
+ title?: string | undefined;
1881
+ repo?: string | undefined;
1882
+ hunks?: {
1883
+ op: "+" | "-";
1884
+ text: string;
1885
+ }[][] | undefined;
1886
+ patch?: string | undefined;
1887
+ }, {
1888
+ path: string;
1889
+ type: "diff";
1890
+ ref: string;
1891
+ additions: number;
1892
+ deletions: number;
1893
+ at?: string | undefined;
1894
+ title?: string | undefined;
1895
+ repo?: string | undefined;
1896
+ hunks?: {
1897
+ op: "+" | "-";
1898
+ text: string;
1899
+ }[][] | undefined;
1900
+ patch?: string | undefined;
1901
+ }>]>;
1902
+ export type FigureInput = z.infer<typeof figureInputSchema>;
1903
+ /** The four figure types whose fields the tool listing leaves to the guide. */
1904
+ export declare const GUIDE_ONLY_FIGURE_TYPES: readonly ["range_overlap", "histogram", "run_history", "diff"];
1905
+ /**
1906
+ * The figure as tellagen_build_figure lists it. The six original types carry
1907
+ * their full schema; the four newer ones only their type, so the listing stays
1908
+ * small (their fields are in the figure guide). buildFigure checks every type
1909
+ * in full with figureInputSchema and names each bad field.
1910
+ */
1911
+ export declare const figureToolInputSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1912
+ type: z.ZodLiteral<"stats">;
1913
+ items: z.ZodArray<z.ZodObject<{
1914
+ label: z.ZodString;
1915
+ value: z.ZodString;
1916
+ caption: z.ZodOptional<z.ZodString>;
1917
+ tone: z.ZodOptional<z.ZodEnum<["good", "warn", "bad", "neutral"]>>;
1918
+ }, "strict", z.ZodTypeAny, {
1919
+ value: string;
1920
+ label: string;
1921
+ caption?: string | undefined;
1922
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1923
+ }, {
1924
+ value: string;
1925
+ label: string;
1926
+ caption?: string | undefined;
1927
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1928
+ }>, "many">;
1929
+ }, "strict", z.ZodTypeAny, {
1930
+ type: "stats";
1931
+ items: {
1932
+ value: string;
1933
+ label: string;
1934
+ caption?: string | undefined;
1935
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1936
+ }[];
1937
+ }, {
1938
+ type: "stats";
1939
+ items: {
1940
+ value: string;
1941
+ label: string;
1942
+ caption?: string | undefined;
1943
+ tone?: "good" | "warn" | "bad" | "neutral" | undefined;
1944
+ }[];
1945
+ }>, z.ZodObject<{
1946
+ type: z.ZodLiteral<"compare">;
1947
+ title: z.ZodOptional<z.ZodString>;
1948
+ metric: z.ZodOptional<z.ZodString>;
1949
+ unit: z.ZodOptional<z.ZodString>;
1950
+ better: z.ZodOptional<z.ZodEnum<["lower", "higher"]>>;
1951
+ delta: z.ZodOptional<z.ZodEnum<["rel", "abs"]>>;
1952
+ max: z.ZodOptional<z.ZodNumber>;
1953
+ threshold: z.ZodOptional<z.ZodObject<{
1954
+ value: z.ZodNumber;
1955
+ label: z.ZodOptional<z.ZodString>;
1956
+ }, "strict", z.ZodTypeAny, {
1957
+ value: number;
1958
+ label?: string | undefined;
1959
+ }, {
1960
+ value: number;
1961
+ label?: string | undefined;
1962
+ }>>;
1963
+ rows: z.ZodArray<z.ZodObject<{
1964
+ label: z.ZodString;
1965
+ mono: z.ZodOptional<z.ZodBoolean>;
1966
+ before: z.ZodNumber;
1967
+ after: z.ZodNumber;
1968
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
1969
+ label: z.ZodString;
1970
+ before: z.ZodString;
1971
+ after: z.ZodString;
1972
+ }, "strict", z.ZodTypeAny, {
1973
+ label: string;
1974
+ before: string;
1975
+ after: string;
1976
+ }, {
1977
+ label: string;
1978
+ before: string;
1979
+ after: string;
1980
+ }>, "many">>;
1981
+ }, "strict", z.ZodTypeAny, {
1982
+ label: string;
1983
+ before: number;
1984
+ after: number;
1985
+ mono?: boolean | undefined;
1986
+ details?: {
1987
+ label: string;
1988
+ before: string;
1989
+ after: string;
1990
+ }[] | undefined;
1991
+ }, {
1992
+ label: string;
1993
+ before: number;
1994
+ after: number;
1995
+ mono?: boolean | undefined;
1996
+ details?: {
1997
+ label: string;
1998
+ before: string;
1999
+ after: string;
2000
+ }[] | undefined;
2001
+ }>, "many">;
2002
+ }, "strict", z.ZodTypeAny, {
2003
+ type: "compare";
2004
+ rows: {
2005
+ label: string;
2006
+ before: number;
2007
+ after: number;
2008
+ mono?: boolean | undefined;
2009
+ details?: {
2010
+ label: string;
2011
+ before: string;
2012
+ after: string;
2013
+ }[] | undefined;
2014
+ }[];
2015
+ title?: string | undefined;
2016
+ metric?: string | undefined;
2017
+ unit?: string | undefined;
2018
+ better?: "lower" | "higher" | undefined;
2019
+ delta?: "rel" | "abs" | undefined;
2020
+ max?: number | undefined;
2021
+ threshold?: {
2022
+ value: number;
2023
+ label?: string | undefined;
2024
+ } | undefined;
2025
+ }, {
2026
+ type: "compare";
2027
+ rows: {
2028
+ label: string;
2029
+ before: number;
2030
+ after: number;
2031
+ mono?: boolean | undefined;
2032
+ details?: {
2033
+ label: string;
2034
+ before: string;
2035
+ after: string;
2036
+ }[] | undefined;
2037
+ }[];
2038
+ title?: string | undefined;
2039
+ metric?: string | undefined;
2040
+ unit?: string | undefined;
2041
+ better?: "lower" | "higher" | undefined;
2042
+ delta?: "rel" | "abs" | undefined;
2043
+ max?: number | undefined;
2044
+ threshold?: {
2045
+ value: number;
2046
+ label?: string | undefined;
2047
+ } | undefined;
2048
+ }>, z.ZodObject<{
2049
+ type: z.ZodLiteral<"trend">;
2050
+ title: z.ZodOptional<z.ZodString>;
2051
+ unit: z.ZodOptional<z.ZodString>;
2052
+ series: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
2053
+ start: z.ZodOptional<z.ZodString>;
2054
+ step_seconds: z.ZodOptional<z.ZodNumber>;
2055
+ points: z.ZodOptional<z.ZodArray<z.ZodObject<{
2056
+ t: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
2057
+ v: z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
2058
+ }, "strict", z.ZodTypeAny, {
2059
+ t: string | number;
2060
+ v: string | number | null;
2061
+ }, {
2062
+ t: string | number;
2063
+ v: string | number | null;
2064
+ }>, "many">>;
2065
+ events: z.ZodOptional<z.ZodArray<z.ZodObject<{
2066
+ at: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
2067
+ label: z.ZodString;
2068
+ }, "strict", z.ZodTypeAny, {
2069
+ label: string;
2070
+ at: string | number;
2071
+ }, {
2072
+ label: string;
2073
+ at: string | number;
2074
+ }>, "many">>;
2075
+ marks: z.ZodOptional<z.ZodArray<z.ZodObject<{
2076
+ i: z.ZodNumber;
2077
+ label: z.ZodString;
2078
+ }, "strict", z.ZodTypeAny, {
2079
+ label: string;
2080
+ i: number;
2081
+ }, {
2082
+ label: string;
2083
+ i: number;
2084
+ }>, "many">>;
2085
+ max_points: z.ZodOptional<z.ZodNumber>;
2086
+ reduce: z.ZodOptional<z.ZodEnum<["mean", "max", "min", "last"]>>;
2087
+ precision: z.ZodOptional<z.ZodNumber>;
2088
+ max: z.ZodOptional<z.ZodNumber>;
2089
+ threshold: z.ZodOptional<z.ZodObject<{
2090
+ value: z.ZodNumber;
2091
+ label: z.ZodOptional<z.ZodString>;
2092
+ }, "strict", z.ZodTypeAny, {
2093
+ value: number;
2094
+ label?: string | undefined;
2095
+ }, {
2096
+ value: number;
2097
+ label?: string | undefined;
2098
+ }>>;
2099
+ source: z.ZodOptional<z.ZodObject<{
2100
+ kind: z.ZodOptional<z.ZodString>;
2101
+ datasource: z.ZodOptional<z.ZodString>;
2102
+ query: z.ZodOptional<z.ZodString>;
2103
+ from: z.ZodOptional<z.ZodString>;
2104
+ to: z.ZodOptional<z.ZodString>;
2105
+ step: z.ZodOptional<z.ZodString>;
2106
+ artifact_id: z.ZodOptional<z.ZodString>;
2107
+ }, "strict", z.ZodTypeAny, {
2108
+ kind?: string | undefined;
2109
+ datasource?: string | undefined;
2110
+ query?: string | undefined;
2111
+ from?: string | undefined;
2112
+ to?: string | undefined;
2113
+ step?: string | undefined;
2114
+ artifact_id?: string | undefined;
2115
+ }, {
2116
+ kind?: string | undefined;
2117
+ datasource?: string | undefined;
2118
+ query?: string | undefined;
2119
+ from?: string | undefined;
2120
+ to?: string | undefined;
2121
+ step?: string | undefined;
2122
+ artifact_id?: string | undefined;
2123
+ }>>;
2124
+ }, "strict", z.ZodTypeAny, {
2125
+ type: "trend";
2126
+ reduce?: "max" | "min" | "mean" | "last" | undefined;
2127
+ title?: string | undefined;
2128
+ unit?: string | undefined;
2129
+ max?: number | undefined;
2130
+ threshold?: {
2131
+ value: number;
2132
+ label?: string | undefined;
2133
+ } | undefined;
2134
+ series?: number[] | undefined;
2135
+ start?: string | undefined;
2136
+ step_seconds?: number | undefined;
2137
+ marks?: {
2138
+ label: string;
2139
+ i: number;
2140
+ }[] | undefined;
2141
+ source?: {
2142
+ kind?: string | undefined;
2143
+ datasource?: string | undefined;
2144
+ query?: string | undefined;
2145
+ from?: string | undefined;
2146
+ to?: string | undefined;
2147
+ step?: string | undefined;
2148
+ artifact_id?: string | undefined;
2149
+ } | undefined;
2150
+ points?: {
2151
+ t: string | number;
2152
+ v: string | number | null;
2153
+ }[] | undefined;
2154
+ events?: {
2155
+ label: string;
2156
+ at: string | number;
2157
+ }[] | undefined;
2158
+ max_points?: number | undefined;
2159
+ precision?: number | undefined;
2160
+ }, {
2161
+ type: "trend";
2162
+ reduce?: "max" | "min" | "mean" | "last" | undefined;
2163
+ title?: string | undefined;
2164
+ unit?: string | undefined;
2165
+ max?: number | undefined;
2166
+ threshold?: {
2167
+ value: number;
2168
+ label?: string | undefined;
2169
+ } | undefined;
2170
+ series?: number[] | undefined;
2171
+ start?: string | undefined;
2172
+ step_seconds?: number | undefined;
2173
+ marks?: {
2174
+ label: string;
2175
+ i: number;
2176
+ }[] | undefined;
2177
+ source?: {
2178
+ kind?: string | undefined;
2179
+ datasource?: string | undefined;
2180
+ query?: string | undefined;
2181
+ from?: string | undefined;
2182
+ to?: string | undefined;
2183
+ step?: string | undefined;
2184
+ artifact_id?: string | undefined;
2185
+ } | undefined;
2186
+ points?: {
2187
+ t: string | number;
2188
+ v: string | number | null;
2189
+ }[] | undefined;
2190
+ events?: {
2191
+ label: string;
2192
+ at: string | number;
2193
+ }[] | undefined;
2194
+ max_points?: number | undefined;
2195
+ precision?: number | undefined;
2196
+ }>, z.ZodObject<{
2197
+ type: z.ZodLiteral<"table">;
2198
+ title: z.ZodOptional<z.ZodString>;
2199
+ columns: z.ZodArray<z.ZodObject<{
2200
+ label: z.ZodString;
2201
+ }, "strict", z.ZodTypeAny, {
2202
+ label: string;
2203
+ }, {
2204
+ label: string;
2205
+ }>, "many">;
2206
+ rows: z.ZodArray<z.ZodObject<{
2207
+ cells: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
2208
+ }, "strict", z.ZodTypeAny, {
2209
+ cells: (string | number)[];
2210
+ }, {
2211
+ cells: (string | number)[];
2212
+ }>, "many">;
2213
+ }, "strict", z.ZodTypeAny, {
2214
+ type: "table";
2215
+ rows: {
2216
+ cells: (string | number)[];
2217
+ }[];
2218
+ columns: {
2219
+ label: string;
2220
+ }[];
2221
+ title?: string | undefined;
2222
+ }, {
2223
+ type: "table";
2224
+ rows: {
2225
+ cells: (string | number)[];
2226
+ }[];
2227
+ columns: {
2228
+ label: string;
2229
+ }[];
2230
+ title?: string | undefined;
2231
+ }>, z.ZodObject<{
2232
+ type: z.ZodLiteral<"checks">;
2233
+ title: z.ZodOptional<z.ZodString>;
2234
+ items: z.ZodArray<z.ZodObject<{
2235
+ label: z.ZodString;
2236
+ state: z.ZodEnum<["pass", "fail", "pending", "skipped"]>;
2237
+ detail: z.ZodOptional<z.ZodString>;
2238
+ }, "strict", z.ZodTypeAny, {
2239
+ label: string;
2240
+ state: "pass" | "fail" | "pending" | "skipped";
2241
+ detail?: string | undefined;
2242
+ }, {
2243
+ label: string;
2244
+ state: "pass" | "fail" | "pending" | "skipped";
2245
+ detail?: string | undefined;
2246
+ }>, "many">;
2247
+ }, "strict", z.ZodTypeAny, {
2248
+ type: "checks";
2249
+ items: {
2250
+ label: string;
2251
+ state: "pass" | "fail" | "pending" | "skipped";
2252
+ detail?: string | undefined;
2253
+ }[];
2254
+ title?: string | undefined;
2255
+ }, {
2256
+ type: "checks";
2257
+ items: {
2258
+ label: string;
2259
+ state: "pass" | "fail" | "pending" | "skipped";
2260
+ detail?: string | undefined;
2261
+ }[];
2262
+ title?: string | undefined;
2263
+ }>, z.ZodObject<{
2264
+ type: z.ZodLiteral<"changes">;
2265
+ title: z.ZodOptional<z.ZodString>;
2266
+ rows: z.ZodArray<z.ZodObject<{
2267
+ label: z.ZodString;
2268
+ from: z.ZodOptional<z.ZodString>;
2269
+ to: z.ZodOptional<z.ZodString>;
2270
+ note: z.ZodOptional<z.ZodString>;
2271
+ }, "strict", z.ZodTypeAny, {
2272
+ label: string;
2273
+ from?: string | undefined;
2274
+ to?: string | undefined;
2275
+ note?: string | undefined;
2276
+ }, {
2277
+ label: string;
2278
+ from?: string | undefined;
2279
+ to?: string | undefined;
2280
+ note?: string | undefined;
2281
+ }>, "many">;
2282
+ }, "strict", z.ZodTypeAny, {
2283
+ type: "changes";
2284
+ rows: {
2285
+ label: string;
2286
+ from?: string | undefined;
2287
+ to?: string | undefined;
2288
+ note?: string | undefined;
2289
+ }[];
2290
+ title?: string | undefined;
2291
+ }, {
2292
+ type: "changes";
2293
+ rows: {
2294
+ label: string;
2295
+ from?: string | undefined;
2296
+ to?: string | undefined;
2297
+ note?: string | undefined;
2298
+ }[];
2299
+ title?: string | undefined;
2300
+ }>, z.ZodObject<{
2301
+ type: z.ZodEnum<["range_overlap", "histogram", "run_history", "diff"]>;
2302
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2303
+ type: z.ZodEnum<["range_overlap", "histogram", "run_history", "diff"]>;
2304
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2305
+ type: z.ZodEnum<["range_overlap", "histogram", "run_history", "diff"]>;
2306
+ }, z.ZodTypeAny, "passthrough">>]>;
2307
+ export type BuildFigureInput = {
2308
+ placement: FigurePlacement;
2309
+ figure: unknown;
2310
+ slot?: "summary";
2311
+ anchor?: string;
2312
+ postmortem?: boolean;
2313
+ };
2314
+ export type BuildFigureResult = {
2315
+ ok: true;
2316
+ type: string;
2317
+ placement: FigurePlacement;
2318
+ block: Record<string, unknown>;
2319
+ summary: string;
2320
+ notes: string[];
2321
+ use: string;
2322
+ } | {
2323
+ ok: false;
2324
+ issues: string[];
2325
+ };
2326
+ /**
2327
+ * Checks one block against the contract, including the rules that span
2328
+ * fields. Returns the problems, empty when the block is valid.
2329
+ */
2330
+ export declare function validateBlock(block: unknown): string[];
2331
+ /**
2332
+ * Turns the numbers an agent already read from a tool result into a figure
2333
+ * Tellagen accepts. It reshapes and checks. It has no data source of its own
2334
+ * and never makes up a value.
2335
+ */
2336
+ export declare function buildFigure(input: BuildFigureInput): BuildFigureResult;