@tellagen/mcp-server 0.4.2 → 0.5.1

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 (184) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +337 -104
  3. package/SKILL.md +83 -17
  4. package/contracts/mcp-protocol.json +155 -0
  5. package/contracts/runbooks/manifest.json +26 -6
  6. package/contracts/runbooks/v2/cause-lead.guidance.json +37 -0
  7. package/contracts/runbooks/v2/client-protocol.json +926 -0
  8. package/contracts/runbooks/v2/client-writes.guidance.json +42 -0
  9. package/contracts/runbooks/v2/fixtures/timeline-event-blocks-rejected.json +30 -5
  10. package/contracts/runbooks/v2/result-summary.guidance.json +21 -0
  11. package/contracts/runbooks/v2/timeline-event-blocks.schema.json +18 -11
  12. package/contracts/tellagen-runbook-contracts.json +4 -4
  13. package/dist/active-run.d.ts +29 -0
  14. package/dist/active-run.js +67 -0
  15. package/dist/active-run.js.map +1 -0
  16. package/dist/bootstrap.d.ts +20 -0
  17. package/dist/bootstrap.js +29 -0
  18. package/dist/bootstrap.js.map +1 -0
  19. package/dist/cause-lead.d.ts +25 -0
  20. package/dist/cause-lead.js +145 -0
  21. package/dist/cause-lead.js.map +1 -0
  22. package/dist/cli/auth.d.ts +22 -0
  23. package/dist/cli/auth.js +207 -0
  24. package/dist/cli/auth.js.map +1 -0
  25. package/dist/cli/io.d.ts +16 -0
  26. package/dist/cli/io.js +53 -0
  27. package/dist/cli/io.js.map +1 -0
  28. package/dist/cli/listen-guard.d.ts +12 -0
  29. package/dist/cli/listen-guard.js +50 -0
  30. package/dist/cli/listen-guard.js.map +1 -0
  31. package/dist/cli/listen.d.ts +28 -0
  32. package/dist/cli/listen.js +205 -0
  33. package/dist/cli/listen.js.map +1 -0
  34. package/dist/cli/main.d.ts +3 -0
  35. package/dist/cli/main.js +53 -0
  36. package/dist/cli/main.js.map +1 -0
  37. package/dist/cli/trace-hook.d.ts +23 -0
  38. package/dist/cli/trace-hook.js +99 -0
  39. package/dist/cli/trace-hook.js.map +1 -0
  40. package/dist/client.d.ts +92 -6
  41. package/dist/client.js +300 -23
  42. package/dist/client.js.map +1 -1
  43. package/dist/config.d.ts +17 -0
  44. package/dist/config.js +38 -0
  45. package/dist/config.js.map +1 -0
  46. package/dist/credentials.d.ts +120 -0
  47. package/dist/credentials.js +363 -0
  48. package/dist/credentials.js.map +1 -0
  49. package/dist/diagnosis-structure.d.ts +257 -197
  50. package/dist/diagnosis-structure.js +144 -1
  51. package/dist/diagnosis-structure.js.map +1 -1
  52. package/dist/diff-figure.d.ts +56 -0
  53. package/dist/diff-figure.js +276 -0
  54. package/dist/diff-figure.js.map +1 -0
  55. package/dist/errors.d.ts +21 -0
  56. package/dist/errors.js +60 -0
  57. package/dist/errors.js.map +1 -1
  58. package/dist/figures.d.ts +312 -232
  59. package/dist/figures.js +189 -47
  60. package/dist/figures.js.map +1 -1
  61. package/dist/guide-resources.d.ts +28 -0
  62. package/dist/guide-resources.js +81 -0
  63. package/dist/guide-resources.js.map +1 -0
  64. package/dist/heartbeat.d.ts +24 -0
  65. package/dist/heartbeat.js +94 -0
  66. package/dist/heartbeat.js.map +1 -0
  67. package/dist/home.d.ts +8 -0
  68. package/dist/home.js +14 -0
  69. package/dist/home.js.map +1 -0
  70. package/dist/identity.d.ts +32 -0
  71. package/dist/identity.js +83 -0
  72. package/dist/identity.js.map +1 -0
  73. package/dist/index.js +46 -14
  74. package/dist/index.js.map +1 -1
  75. package/dist/listen-config.d.ts +67 -0
  76. package/dist/listen-config.js +83 -0
  77. package/dist/listen-config.js.map +1 -0
  78. package/dist/listen-probe.d.ts +57 -0
  79. package/dist/listen-probe.js +158 -0
  80. package/dist/listen-probe.js.map +1 -0
  81. package/dist/listen-rules.d.ts +88 -0
  82. package/dist/listen-rules.js +252 -0
  83. package/dist/listen-rules.js.map +1 -0
  84. package/dist/listen-settings.d.ts +18 -0
  85. package/dist/listen-settings.js +50 -0
  86. package/dist/listen-settings.js.map +1 -0
  87. package/dist/listen-wrap.d.ts +21 -0
  88. package/dist/listen-wrap.js +52 -0
  89. package/dist/listen-wrap.js.map +1 -0
  90. package/dist/listener.d.ts +195 -0
  91. package/dist/listener.js +600 -0
  92. package/dist/listener.js.map +1 -0
  93. package/dist/open-run.d.ts +2 -0
  94. package/dist/open-run.js +5 -0
  95. package/dist/open-run.js.map +1 -0
  96. package/dist/prompts.d.ts +12 -0
  97. package/dist/prompts.js +37 -0
  98. package/dist/prompts.js.map +1 -0
  99. package/dist/redact.d.ts +13 -0
  100. package/dist/redact.js +76 -0
  101. package/dist/redact.js.map +1 -0
  102. package/dist/run-events.d.ts +54 -0
  103. package/dist/run-events.js +210 -0
  104. package/dist/run-events.js.map +1 -0
  105. package/dist/run-state.d.ts +221 -0
  106. package/dist/run-state.js +221 -0
  107. package/dist/run-state.js.map +1 -0
  108. package/dist/server.d.ts +22 -2
  109. package/dist/server.js +137 -29
  110. package/dist/server.js.map +1 -1
  111. package/dist/session.d.ts +99 -0
  112. package/dist/session.js +187 -0
  113. package/dist/session.js.map +1 -0
  114. package/dist/shell-rules.d.ts +49 -0
  115. package/dist/shell-rules.js +335 -0
  116. package/dist/shell-rules.js.map +1 -0
  117. package/dist/signin-index.d.ts +164 -0
  118. package/dist/signin-index.js +116 -0
  119. package/dist/signin-index.js.map +1 -0
  120. package/dist/signin.d.ts +169 -0
  121. package/dist/signin.js +541 -0
  122. package/dist/signin.js.map +1 -0
  123. package/dist/source-bases.d.ts +75 -0
  124. package/dist/source-bases.js +125 -0
  125. package/dist/source-bases.js.map +1 -0
  126. package/dist/start.d.ts +7 -6
  127. package/dist/start.js +14 -7
  128. package/dist/start.js.map +1 -1
  129. package/dist/tools/catalog.d.ts +44 -0
  130. package/dist/tools/catalog.js +105 -0
  131. package/dist/tools/catalog.js.map +1 -0
  132. package/dist/tools/causes.d.ts +6 -6
  133. package/dist/tools/causes.js +4 -5
  134. package/dist/tools/causes.js.map +1 -1
  135. package/dist/tools/context.js +5 -5
  136. package/dist/tools/context.js.map +1 -1
  137. package/dist/tools/datasources.js +71 -14
  138. package/dist/tools/datasources.js.map +1 -1
  139. package/dist/tools/diagnostics.js +2 -2
  140. package/dist/tools/diagnostics.js.map +1 -1
  141. package/dist/tools/figures.d.ts +3 -2
  142. package/dist/tools/figures.js +38 -13
  143. package/dist/tools/figures.js.map +1 -1
  144. package/dist/tools/findings.d.ts +28 -0
  145. package/dist/tools/findings.js +75 -12
  146. package/dist/tools/findings.js.map +1 -1
  147. package/dist/tools/incidents.js +5 -5
  148. package/dist/tools/incidents.js.map +1 -1
  149. package/dist/tools/index.d.ts +19 -2
  150. package/dist/tools/index.js +115 -14
  151. package/dist/tools/index.js.map +1 -1
  152. package/dist/tools/investigations.d.ts +54 -0
  153. package/dist/tools/investigations.js +372 -68
  154. package/dist/tools/investigations.js.map +1 -1
  155. package/dist/tools/next.d.ts +20 -0
  156. package/dist/tools/next.js +136 -0
  157. package/dist/tools/next.js.map +1 -0
  158. package/dist/tools/postmortem-runbooks.d.ts +52 -52
  159. package/dist/tools/postmortem-runbooks.js +3 -10
  160. package/dist/tools/postmortem-runbooks.js.map +1 -1
  161. package/dist/tools/resume.d.ts +5 -0
  162. package/dist/tools/resume.js +136 -0
  163. package/dist/tools/resume.js.map +1 -0
  164. package/dist/tools/signin.d.ts +12 -0
  165. package/dist/tools/signin.js +54 -0
  166. package/dist/tools/signin.js.map +1 -0
  167. package/dist/tools/source-links.d.ts +16 -0
  168. package/dist/tools/source-links.js +25 -13
  169. package/dist/tools/source-links.js.map +1 -1
  170. package/dist/tools/timeline.js +57 -11
  171. package/dist/tools/timeline.js.map +1 -1
  172. package/dist/trace-record.d.ts +36 -0
  173. package/dist/trace-record.js +283 -0
  174. package/dist/trace-record.js.map +1 -0
  175. package/dist/version.d.ts +10 -2
  176. package/dist/version.js +20 -1
  177. package/dist/version.js.map +1 -1
  178. package/package.json +23 -3
  179. package/server.json +9 -9
  180. package/contracts/runbooks/v1/fixtures/global-runbook.json +0 -7
  181. package/contracts/runbooks/v1/runbook-definition.schema.json +0 -25
  182. package/dist/auth.d.ts +0 -7
  183. package/dist/auth.js +0 -19
  184. package/dist/auth.js.map +0 -1
@@ -17,11 +17,17 @@
17
17
  */
18
18
  import { z } from "zod";
19
19
  import type { TellagenClient } from "./client.js";
20
+ import { FIGURE_EXTRAS_CAPABILITY } from "./figures.js";
21
+ import { RECORDED_STEPS_CAPABILITY } from "./trace-record.js";
22
+ export { RECORDED_STEPS_CAPABILITY };
20
23
  export declare const DIAGNOSIS_STRUCTURE_CAPABILITY = "diagnosis_structure_v1";
21
24
  /** change_refs on the result and the ci_run, deployment and release link kinds. */
22
25
  export declare const DIAGNOSIS_CHANGES_CAPABILITY = "diagnosis_changes_v1";
23
26
  /** The client reads a run's screenshots with tellagen_get_context_attachment. */
24
27
  export declare const RUN_IMAGES_CAPABILITY = "run_images_v1";
28
+ /** The server takes unchanged lines and line numbers in a diff figure. */
29
+ export declare const DIFF_LINES_CAPABILITY = "diff_lines_v1";
30
+ export { FIGURE_EXTRAS_CAPABILITY };
25
31
  /**
26
32
  * Remembers the capabilities the backend that answered a pickup or context
27
33
  * call for `runId` advertises. A missing `server_capabilities` is a definite
@@ -35,6 +41,32 @@ export declare function rememberServerCapabilities(client: TellagenClient, runId
35
41
  * supported" for this call and is retried on the next one.
36
42
  */
37
43
  export declare function supportsCapability(client: TellagenClient, runId: string, capability: string): Promise<boolean>;
44
+ /**
45
+ * Whether the backend takes unchanged lines and line numbers in a diff figure.
46
+ * With a run id it asks for that run. A tool that has no run id (the timeline
47
+ * tools) goes by the latest pickup of this process; with no pickup yet the
48
+ * answer is no, so an older backend never gets fields it would reject.
49
+ */
50
+ export declare function supportsDiffLines(client: TellagenClient, runId?: string): Promise<boolean>;
51
+ /**
52
+ * Whether the backend takes a stats title, more than four stats and
53
+ * runs_not_shown. Decided like supportsDiffLines.
54
+ */
55
+ export declare function supportsFigureExtras(client: TellagenClient, runId?: string): Promise<boolean>;
56
+ /** The capability a Tellagen can list to say that it answers a completion dry run. */
57
+ export declare const COMPLETION_REPAIRS_CAPABILITY = "completion_repairs_v1";
58
+ /**
59
+ * Whether the backend answers a completion with `dry_run: true` and a list of
60
+ * repairs. An older backend would drop the unknown field and complete the run,
61
+ * so a dry run is sent only when the pickup listed `completion_repairs_v1`.
62
+ */
63
+ export declare function supportsCompletionRepairs(client: TellagenClient, runId: string): boolean;
64
+ /**
65
+ * Whether the pickup of this run, in this process, listed a capability. It
66
+ * never asks Tellagen: a run this process did not pick up counts as "not
67
+ * known", which is the safe answer for the callers that use it.
68
+ */
69
+ export declare function knownCapability(client: TellagenClient, runId: string, capability: string): boolean;
38
70
  /** Whether the backend accepts the diagnosis structure for this run. */
39
71
  export declare function supportsDiagnosisStructure(client: TellagenClient, runId: string): Promise<boolean>;
40
72
  /** Whether the backend accepts change_refs and the change link kinds for this run. */
@@ -47,12 +79,12 @@ export declare const evidenceLinkSchema: z.ZodObject<{
47
79
  label: z.ZodString;
48
80
  url: z.ZodEffects<z.ZodString, string, string>;
49
81
  }, "strip", z.ZodTypeAny, {
82
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
50
83
  label: string;
51
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
52
84
  url: string;
53
85
  }, {
86
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
54
87
  label: string;
55
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
56
88
  url: string;
57
89
  }>;
58
90
  export declare const evidenceLinksSchema: z.ZodArray<z.ZodObject<{
@@ -60,12 +92,12 @@ export declare const evidenceLinksSchema: z.ZodArray<z.ZodObject<{
60
92
  label: z.ZodString;
61
93
  url: z.ZodEffects<z.ZodString, string, string>;
62
94
  }, "strip", z.ZodTypeAny, {
95
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
63
96
  label: string;
64
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
65
97
  url: string;
66
98
  }, {
99
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
67
100
  label: string;
68
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
69
101
  url: string;
70
102
  }>, "many">;
71
103
  /** Fields added to every evidence ref by diagnosis_structure_v1. */
@@ -75,12 +107,12 @@ export declare const evidenceRefStructureShape: {
75
107
  label: z.ZodString;
76
108
  url: z.ZodEffects<z.ZodString, string, string>;
77
109
  }, "strip", z.ZodTypeAny, {
110
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
78
111
  label: string;
79
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
80
112
  url: string;
81
113
  }, {
114
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
82
115
  label: string;
83
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
84
116
  url: string;
85
117
  }>, "many">>;
86
118
  command: z.ZodOptional<z.ZodString>;
@@ -117,9 +149,9 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
117
149
  caption?: string | undefined;
118
150
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
119
151
  }[];
120
- slot?: "summary" | undefined;
121
152
  anchor?: string | undefined;
122
153
  postmortem?: boolean | undefined;
154
+ slot?: "summary" | undefined;
123
155
  }, {
124
156
  type: "stats";
125
157
  items: {
@@ -128,9 +160,9 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
128
160
  caption?: string | undefined;
129
161
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
130
162
  }[];
131
- slot?: "summary" | undefined;
132
163
  anchor?: string | undefined;
133
164
  postmortem?: boolean | undefined;
165
+ slot?: "summary" | undefined;
134
166
  }>, z.ZodObject<{
135
167
  title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
136
168
  metric: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -170,22 +202,22 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
170
202
  label: string;
171
203
  before: number;
172
204
  after: number;
173
- mono?: boolean | undefined;
174
205
  details?: {
175
206
  label: string;
176
207
  before: string;
177
208
  after: string;
178
209
  }[] | undefined;
210
+ mono?: boolean | undefined;
179
211
  }, {
180
212
  label: string;
181
213
  before: number;
182
214
  after: number;
183
- mono?: boolean | undefined;
184
215
  details?: {
185
216
  label: string;
186
217
  before: string;
187
218
  after: string;
188
219
  }[] | undefined;
220
+ mono?: boolean | undefined;
189
221
  }>, "many">;
190
222
  slot: z.ZodOptional<z.ZodLiteral<"summary">>;
191
223
  anchor: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -197,14 +229,16 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
197
229
  label: string;
198
230
  before: number;
199
231
  after: number;
200
- mono?: boolean | undefined;
201
232
  details?: {
202
233
  label: string;
203
234
  before: string;
204
235
  after: string;
205
236
  }[] | undefined;
237
+ mono?: boolean | undefined;
206
238
  }[];
207
239
  title?: string | undefined;
240
+ anchor?: string | undefined;
241
+ postmortem?: boolean | undefined;
208
242
  metric?: string | undefined;
209
243
  unit?: string | undefined;
210
244
  better?: "lower" | "higher" | undefined;
@@ -215,22 +249,22 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
215
249
  label?: string | undefined;
216
250
  } | undefined;
217
251
  slot?: "summary" | undefined;
218
- anchor?: string | undefined;
219
- postmortem?: boolean | undefined;
220
252
  }, {
221
253
  type: "compare";
222
254
  rows: {
223
255
  label: string;
224
256
  before: number;
225
257
  after: number;
226
- mono?: boolean | undefined;
227
258
  details?: {
228
259
  label: string;
229
260
  before: string;
230
261
  after: string;
231
262
  }[] | undefined;
263
+ mono?: boolean | undefined;
232
264
  }[];
233
265
  title?: string | undefined;
266
+ anchor?: string | undefined;
267
+ postmortem?: boolean | undefined;
234
268
  metric?: string | undefined;
235
269
  unit?: string | undefined;
236
270
  better?: "lower" | "higher" | undefined;
@@ -241,8 +275,6 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
241
275
  label?: string | undefined;
242
276
  } | undefined;
243
277
  slot?: "summary" | undefined;
244
- anchor?: string | undefined;
245
- postmortem?: boolean | undefined;
246
278
  }>, z.ZodObject<{
247
279
  title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
248
280
  unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -279,16 +311,16 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
279
311
  step: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
280
312
  artifact_id: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
281
313
  }, "strict", z.ZodTypeAny, {
282
- kind?: string | undefined;
283
314
  datasource?: string | undefined;
315
+ kind?: string | undefined;
284
316
  query?: string | undefined;
285
317
  from?: string | undefined;
286
318
  to?: string | undefined;
287
319
  step?: string | undefined;
288
320
  artifact_id?: string | undefined;
289
321
  }, {
290
- kind?: string | undefined;
291
322
  datasource?: string | undefined;
323
+ kind?: string | undefined;
292
324
  query?: string | undefined;
293
325
  from?: string | undefined;
294
326
  to?: string | undefined;
@@ -303,6 +335,17 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
303
335
  type: "trend";
304
336
  series: number[];
305
337
  title?: string | undefined;
338
+ anchor?: string | undefined;
339
+ source?: {
340
+ datasource?: string | undefined;
341
+ kind?: string | undefined;
342
+ query?: string | undefined;
343
+ from?: string | undefined;
344
+ to?: string | undefined;
345
+ step?: string | undefined;
346
+ artifact_id?: string | undefined;
347
+ } | undefined;
348
+ postmortem?: boolean | undefined;
306
349
  unit?: string | undefined;
307
350
  max?: number | undefined;
308
351
  threshold?: {
@@ -315,22 +358,22 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
315
358
  label: string;
316
359
  i: number;
317
360
  }[] | undefined;
361
+ slot?: "summary" | undefined;
362
+ }, {
363
+ type: "trend";
364
+ series: number[];
365
+ title?: string | undefined;
366
+ anchor?: string | undefined;
318
367
  source?: {
319
- kind?: string | undefined;
320
368
  datasource?: string | undefined;
369
+ kind?: string | undefined;
321
370
  query?: string | undefined;
322
371
  from?: string | undefined;
323
372
  to?: string | undefined;
324
373
  step?: string | undefined;
325
374
  artifact_id?: string | undefined;
326
375
  } | undefined;
327
- slot?: "summary" | undefined;
328
- anchor?: string | undefined;
329
376
  postmortem?: boolean | undefined;
330
- }, {
331
- type: "trend";
332
- series: number[];
333
- title?: string | undefined;
334
377
  unit?: string | undefined;
335
378
  max?: number | undefined;
336
379
  threshold?: {
@@ -343,18 +386,7 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
343
386
  label: string;
344
387
  i: number;
345
388
  }[] | undefined;
346
- source?: {
347
- kind?: string | undefined;
348
- datasource?: string | undefined;
349
- query?: string | undefined;
350
- from?: string | undefined;
351
- to?: string | undefined;
352
- step?: string | undefined;
353
- artifact_id?: string | undefined;
354
- } | undefined;
355
389
  slot?: "summary" | undefined;
356
- anchor?: string | undefined;
357
- postmortem?: boolean | undefined;
358
390
  }>, z.ZodObject<{
359
391
  type: z.ZodEnum<["checks", "range_overlap", "histogram", "run_history", "diff"]>;
360
392
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -369,23 +401,25 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
369
401
  caption?: string | undefined;
370
402
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
371
403
  }[];
372
- slot?: "summary" | undefined;
373
404
  anchor?: string | undefined;
374
405
  postmortem?: boolean | undefined;
406
+ slot?: "summary" | undefined;
375
407
  } | {
376
408
  type: "compare";
377
409
  rows: {
378
410
  label: string;
379
411
  before: number;
380
412
  after: number;
381
- mono?: boolean | undefined;
382
413
  details?: {
383
414
  label: string;
384
415
  before: string;
385
416
  after: string;
386
417
  }[] | undefined;
418
+ mono?: boolean | undefined;
387
419
  }[];
388
420
  title?: string | undefined;
421
+ anchor?: string | undefined;
422
+ postmortem?: boolean | undefined;
389
423
  metric?: string | undefined;
390
424
  unit?: string | undefined;
391
425
  better?: "lower" | "higher" | undefined;
@@ -396,12 +430,21 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
396
430
  label?: string | undefined;
397
431
  } | undefined;
398
432
  slot?: "summary" | undefined;
399
- anchor?: string | undefined;
400
- postmortem?: boolean | undefined;
401
433
  } | {
402
434
  type: "trend";
403
435
  series: number[];
404
436
  title?: string | undefined;
437
+ anchor?: string | undefined;
438
+ source?: {
439
+ datasource?: string | undefined;
440
+ kind?: string | undefined;
441
+ query?: string | undefined;
442
+ from?: string | undefined;
443
+ to?: string | undefined;
444
+ step?: string | undefined;
445
+ artifact_id?: string | undefined;
446
+ } | undefined;
447
+ postmortem?: boolean | undefined;
405
448
  unit?: string | undefined;
406
449
  max?: number | undefined;
407
450
  threshold?: {
@@ -414,18 +457,7 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
414
457
  label: string;
415
458
  i: number;
416
459
  }[] | undefined;
417
- source?: {
418
- kind?: string | undefined;
419
- datasource?: string | undefined;
420
- query?: string | undefined;
421
- from?: string | undefined;
422
- to?: string | undefined;
423
- step?: string | undefined;
424
- artifact_id?: string | undefined;
425
- } | undefined;
426
460
  slot?: "summary" | undefined;
427
- anchor?: string | undefined;
428
- postmortem?: boolean | undefined;
429
461
  } | z.objectOutputType<{
430
462
  type: z.ZodEnum<["checks", "range_overlap", "histogram", "run_history", "diff"]>;
431
463
  }, z.ZodTypeAny, "passthrough">, {
@@ -436,23 +468,25 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
436
468
  caption?: string | undefined;
437
469
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
438
470
  }[];
439
- slot?: "summary" | undefined;
440
471
  anchor?: string | undefined;
441
472
  postmortem?: boolean | undefined;
473
+ slot?: "summary" | undefined;
442
474
  } | {
443
475
  type: "compare";
444
476
  rows: {
445
477
  label: string;
446
478
  before: number;
447
479
  after: number;
448
- mono?: boolean | undefined;
449
480
  details?: {
450
481
  label: string;
451
482
  before: string;
452
483
  after: string;
453
484
  }[] | undefined;
485
+ mono?: boolean | undefined;
454
486
  }[];
455
487
  title?: string | undefined;
488
+ anchor?: string | undefined;
489
+ postmortem?: boolean | undefined;
456
490
  metric?: string | undefined;
457
491
  unit?: string | undefined;
458
492
  better?: "lower" | "higher" | undefined;
@@ -463,12 +497,21 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
463
497
  label?: string | undefined;
464
498
  } | undefined;
465
499
  slot?: "summary" | undefined;
466
- anchor?: string | undefined;
467
- postmortem?: boolean | undefined;
468
500
  } | {
469
501
  type: "trend";
470
502
  series: number[];
471
503
  title?: string | undefined;
504
+ anchor?: string | undefined;
505
+ source?: {
506
+ datasource?: string | undefined;
507
+ kind?: string | undefined;
508
+ query?: string | undefined;
509
+ from?: string | undefined;
510
+ to?: string | undefined;
511
+ step?: string | undefined;
512
+ artifact_id?: string | undefined;
513
+ } | undefined;
514
+ postmortem?: boolean | undefined;
472
515
  unit?: string | undefined;
473
516
  max?: number | undefined;
474
517
  threshold?: {
@@ -481,18 +524,7 @@ export declare const stepFigureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"typ
481
524
  label: string;
482
525
  i: number;
483
526
  }[] | undefined;
484
- source?: {
485
- kind?: string | undefined;
486
- datasource?: string | undefined;
487
- query?: string | undefined;
488
- from?: string | undefined;
489
- to?: string | undefined;
490
- step?: string | undefined;
491
- artifact_id?: string | undefined;
492
- } | undefined;
493
527
  slot?: "summary" | undefined;
494
- anchor?: string | undefined;
495
- postmortem?: boolean | undefined;
496
528
  } | z.objectInputType<{
497
529
  type: z.ZodEnum<["checks", "range_overlap", "histogram", "run_history", "diff"]>;
498
530
  }, z.ZodTypeAny, "passthrough">>;
@@ -527,9 +559,9 @@ export declare const stepStructureShape: {
527
559
  caption?: string | undefined;
528
560
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
529
561
  }[];
530
- slot?: "summary" | undefined;
531
562
  anchor?: string | undefined;
532
563
  postmortem?: boolean | undefined;
564
+ slot?: "summary" | undefined;
533
565
  }, {
534
566
  type: "stats";
535
567
  items: {
@@ -538,9 +570,9 @@ export declare const stepStructureShape: {
538
570
  caption?: string | undefined;
539
571
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
540
572
  }[];
541
- slot?: "summary" | undefined;
542
573
  anchor?: string | undefined;
543
574
  postmortem?: boolean | undefined;
575
+ slot?: "summary" | undefined;
544
576
  }>, z.ZodObject<{
545
577
  title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
546
578
  metric: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -580,22 +612,22 @@ export declare const stepStructureShape: {
580
612
  label: string;
581
613
  before: number;
582
614
  after: number;
583
- mono?: boolean | undefined;
584
615
  details?: {
585
616
  label: string;
586
617
  before: string;
587
618
  after: string;
588
619
  }[] | undefined;
620
+ mono?: boolean | undefined;
589
621
  }, {
590
622
  label: string;
591
623
  before: number;
592
624
  after: number;
593
- mono?: boolean | undefined;
594
625
  details?: {
595
626
  label: string;
596
627
  before: string;
597
628
  after: string;
598
629
  }[] | undefined;
630
+ mono?: boolean | undefined;
599
631
  }>, "many">;
600
632
  slot: z.ZodOptional<z.ZodLiteral<"summary">>;
601
633
  anchor: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -607,14 +639,16 @@ export declare const stepStructureShape: {
607
639
  label: string;
608
640
  before: number;
609
641
  after: number;
610
- mono?: boolean | undefined;
611
642
  details?: {
612
643
  label: string;
613
644
  before: string;
614
645
  after: string;
615
646
  }[] | undefined;
647
+ mono?: boolean | undefined;
616
648
  }[];
617
649
  title?: string | undefined;
650
+ anchor?: string | undefined;
651
+ postmortem?: boolean | undefined;
618
652
  metric?: string | undefined;
619
653
  unit?: string | undefined;
620
654
  better?: "lower" | "higher" | undefined;
@@ -625,22 +659,22 @@ export declare const stepStructureShape: {
625
659
  label?: string | undefined;
626
660
  } | undefined;
627
661
  slot?: "summary" | undefined;
628
- anchor?: string | undefined;
629
- postmortem?: boolean | undefined;
630
662
  }, {
631
663
  type: "compare";
632
664
  rows: {
633
665
  label: string;
634
666
  before: number;
635
667
  after: number;
636
- mono?: boolean | undefined;
637
668
  details?: {
638
669
  label: string;
639
670
  before: string;
640
671
  after: string;
641
672
  }[] | undefined;
673
+ mono?: boolean | undefined;
642
674
  }[];
643
675
  title?: string | undefined;
676
+ anchor?: string | undefined;
677
+ postmortem?: boolean | undefined;
644
678
  metric?: string | undefined;
645
679
  unit?: string | undefined;
646
680
  better?: "lower" | "higher" | undefined;
@@ -651,8 +685,6 @@ export declare const stepStructureShape: {
651
685
  label?: string | undefined;
652
686
  } | undefined;
653
687
  slot?: "summary" | undefined;
654
- anchor?: string | undefined;
655
- postmortem?: boolean | undefined;
656
688
  }>, z.ZodObject<{
657
689
  title: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
658
690
  unit: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
@@ -689,16 +721,16 @@ export declare const stepStructureShape: {
689
721
  step: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
690
722
  artifact_id: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
691
723
  }, "strict", z.ZodTypeAny, {
692
- kind?: string | undefined;
693
724
  datasource?: string | undefined;
725
+ kind?: string | undefined;
694
726
  query?: string | undefined;
695
727
  from?: string | undefined;
696
728
  to?: string | undefined;
697
729
  step?: string | undefined;
698
730
  artifact_id?: string | undefined;
699
731
  }, {
700
- kind?: string | undefined;
701
732
  datasource?: string | undefined;
733
+ kind?: string | undefined;
702
734
  query?: string | undefined;
703
735
  from?: string | undefined;
704
736
  to?: string | undefined;
@@ -713,6 +745,17 @@ export declare const stepStructureShape: {
713
745
  type: "trend";
714
746
  series: number[];
715
747
  title?: string | undefined;
748
+ anchor?: string | undefined;
749
+ source?: {
750
+ datasource?: string | undefined;
751
+ kind?: string | undefined;
752
+ query?: string | undefined;
753
+ from?: string | undefined;
754
+ to?: string | undefined;
755
+ step?: string | undefined;
756
+ artifact_id?: string | undefined;
757
+ } | undefined;
758
+ postmortem?: boolean | undefined;
716
759
  unit?: string | undefined;
717
760
  max?: number | undefined;
718
761
  threshold?: {
@@ -725,22 +768,22 @@ export declare const stepStructureShape: {
725
768
  label: string;
726
769
  i: number;
727
770
  }[] | undefined;
771
+ slot?: "summary" | undefined;
772
+ }, {
773
+ type: "trend";
774
+ series: number[];
775
+ title?: string | undefined;
776
+ anchor?: string | undefined;
728
777
  source?: {
729
- kind?: string | undefined;
730
778
  datasource?: string | undefined;
779
+ kind?: string | undefined;
731
780
  query?: string | undefined;
732
781
  from?: string | undefined;
733
782
  to?: string | undefined;
734
783
  step?: string | undefined;
735
784
  artifact_id?: string | undefined;
736
785
  } | undefined;
737
- slot?: "summary" | undefined;
738
- anchor?: string | undefined;
739
786
  postmortem?: boolean | undefined;
740
- }, {
741
- type: "trend";
742
- series: number[];
743
- title?: string | undefined;
744
787
  unit?: string | undefined;
745
788
  max?: number | undefined;
746
789
  threshold?: {
@@ -753,18 +796,7 @@ export declare const stepStructureShape: {
753
796
  label: string;
754
797
  i: number;
755
798
  }[] | undefined;
756
- source?: {
757
- kind?: string | undefined;
758
- datasource?: string | undefined;
759
- query?: string | undefined;
760
- from?: string | undefined;
761
- to?: string | undefined;
762
- step?: string | undefined;
763
- artifact_id?: string | undefined;
764
- } | undefined;
765
799
  slot?: "summary" | undefined;
766
- anchor?: string | undefined;
767
- postmortem?: boolean | undefined;
768
800
  }>, z.ZodObject<{
769
801
  type: z.ZodEnum<["checks", "range_overlap", "histogram", "run_history", "diff"]>;
770
802
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -779,23 +811,25 @@ export declare const stepStructureShape: {
779
811
  caption?: string | undefined;
780
812
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
781
813
  }[];
782
- slot?: "summary" | undefined;
783
814
  anchor?: string | undefined;
784
815
  postmortem?: boolean | undefined;
816
+ slot?: "summary" | undefined;
785
817
  } | {
786
818
  type: "compare";
787
819
  rows: {
788
820
  label: string;
789
821
  before: number;
790
822
  after: number;
791
- mono?: boolean | undefined;
792
823
  details?: {
793
824
  label: string;
794
825
  before: string;
795
826
  after: string;
796
827
  }[] | undefined;
828
+ mono?: boolean | undefined;
797
829
  }[];
798
830
  title?: string | undefined;
831
+ anchor?: string | undefined;
832
+ postmortem?: boolean | undefined;
799
833
  metric?: string | undefined;
800
834
  unit?: string | undefined;
801
835
  better?: "lower" | "higher" | undefined;
@@ -806,12 +840,21 @@ export declare const stepStructureShape: {
806
840
  label?: string | undefined;
807
841
  } | undefined;
808
842
  slot?: "summary" | undefined;
809
- anchor?: string | undefined;
810
- postmortem?: boolean | undefined;
811
843
  } | {
812
844
  type: "trend";
813
845
  series: number[];
814
846
  title?: string | undefined;
847
+ anchor?: string | undefined;
848
+ source?: {
849
+ datasource?: string | undefined;
850
+ kind?: string | undefined;
851
+ query?: string | undefined;
852
+ from?: string | undefined;
853
+ to?: string | undefined;
854
+ step?: string | undefined;
855
+ artifact_id?: string | undefined;
856
+ } | undefined;
857
+ postmortem?: boolean | undefined;
815
858
  unit?: string | undefined;
816
859
  max?: number | undefined;
817
860
  threshold?: {
@@ -824,18 +867,7 @@ export declare const stepStructureShape: {
824
867
  label: string;
825
868
  i: number;
826
869
  }[] | undefined;
827
- source?: {
828
- kind?: string | undefined;
829
- datasource?: string | undefined;
830
- query?: string | undefined;
831
- from?: string | undefined;
832
- to?: string | undefined;
833
- step?: string | undefined;
834
- artifact_id?: string | undefined;
835
- } | undefined;
836
870
  slot?: "summary" | undefined;
837
- anchor?: string | undefined;
838
- postmortem?: boolean | undefined;
839
871
  } | z.objectOutputType<{
840
872
  type: z.ZodEnum<["checks", "range_overlap", "histogram", "run_history", "diff"]>;
841
873
  }, z.ZodTypeAny, "passthrough">, {
@@ -846,23 +878,25 @@ export declare const stepStructureShape: {
846
878
  caption?: string | undefined;
847
879
  tone?: "good" | "warn" | "bad" | "neutral" | undefined;
848
880
  }[];
849
- slot?: "summary" | undefined;
850
881
  anchor?: string | undefined;
851
882
  postmortem?: boolean | undefined;
883
+ slot?: "summary" | undefined;
852
884
  } | {
853
885
  type: "compare";
854
886
  rows: {
855
887
  label: string;
856
888
  before: number;
857
889
  after: number;
858
- mono?: boolean | undefined;
859
890
  details?: {
860
891
  label: string;
861
892
  before: string;
862
893
  after: string;
863
894
  }[] | undefined;
895
+ mono?: boolean | undefined;
864
896
  }[];
865
897
  title?: string | undefined;
898
+ anchor?: string | undefined;
899
+ postmortem?: boolean | undefined;
866
900
  metric?: string | undefined;
867
901
  unit?: string | undefined;
868
902
  better?: "lower" | "higher" | undefined;
@@ -873,12 +907,21 @@ export declare const stepStructureShape: {
873
907
  label?: string | undefined;
874
908
  } | undefined;
875
909
  slot?: "summary" | undefined;
876
- anchor?: string | undefined;
877
- postmortem?: boolean | undefined;
878
910
  } | {
879
911
  type: "trend";
880
912
  series: number[];
881
913
  title?: string | undefined;
914
+ anchor?: string | undefined;
915
+ source?: {
916
+ datasource?: string | undefined;
917
+ kind?: string | undefined;
918
+ query?: string | undefined;
919
+ from?: string | undefined;
920
+ to?: string | undefined;
921
+ step?: string | undefined;
922
+ artifact_id?: string | undefined;
923
+ } | undefined;
924
+ postmortem?: boolean | undefined;
882
925
  unit?: string | undefined;
883
926
  max?: number | undefined;
884
927
  threshold?: {
@@ -891,18 +934,7 @@ export declare const stepStructureShape: {
891
934
  label: string;
892
935
  i: number;
893
936
  }[] | undefined;
894
- source?: {
895
- kind?: string | undefined;
896
- datasource?: string | undefined;
897
- query?: string | undefined;
898
- from?: string | undefined;
899
- to?: string | undefined;
900
- step?: string | undefined;
901
- artifact_id?: string | undefined;
902
- } | undefined;
903
937
  slot?: "summary" | undefined;
904
- anchor?: string | undefined;
905
- postmortem?: boolean | undefined;
906
938
  } | z.objectInputType<{
907
939
  type: z.ZodEnum<["checks", "range_overlap", "histogram", "run_history", "diff"]>;
908
940
  }, z.ZodTypeAny, "passthrough">>>;
@@ -911,12 +943,12 @@ export declare const stepStructureShape: {
911
943
  label: z.ZodString;
912
944
  url: z.ZodEffects<z.ZodString, string, string>;
913
945
  }, "strip", z.ZodTypeAny, {
946
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
914
947
  label: string;
915
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
916
948
  url: string;
917
949
  }, {
950
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
918
951
  label: string;
919
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
920
952
  url: string;
921
953
  }>, "many">>;
922
954
  };
@@ -930,12 +962,12 @@ export declare const ruledOutSchema: z.ZodObject<{
930
962
  label: z.ZodString;
931
963
  url: z.ZodEffects<z.ZodString, string, string>;
932
964
  }, "strip", z.ZodTypeAny, {
965
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
933
966
  label: string;
934
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
935
967
  url: string;
936
968
  }, {
969
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
937
970
  label: string;
938
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
939
971
  url: string;
940
972
  }>, "many">>;
941
973
  confidence_percent: z.ZodOptional<z.ZodNumber>;
@@ -943,8 +975,8 @@ export declare const ruledOutSchema: z.ZodObject<{
943
975
  label: string;
944
976
  id?: string | undefined;
945
977
  links?: {
978
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
946
979
  label: string;
947
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
948
980
  url: string;
949
981
  }[] | undefined;
950
982
  explanation?: string | undefined;
@@ -954,8 +986,8 @@ export declare const ruledOutSchema: z.ZodObject<{
954
986
  label: string;
955
987
  id?: string | undefined;
956
988
  links?: {
989
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
957
990
  label: string;
958
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
959
991
  url: string;
960
992
  }[] | undefined;
961
993
  explanation?: string | undefined;
@@ -972,38 +1004,38 @@ export declare const coverageEntrySchema: z.ZodObject<{
972
1004
  label: z.ZodString;
973
1005
  url: z.ZodEffects<z.ZodString, string, string>;
974
1006
  }, "strip", z.ZodTypeAny, {
1007
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
975
1008
  label: string;
976
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
977
1009
  url: string;
978
1010
  }, {
1011
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
979
1012
  label: string;
980
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
981
1013
  url: string;
982
1014
  }>, "many">>;
983
1015
  step_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
984
1016
  integration_id: z.ZodOptional<z.ZodString>;
985
1017
  finding_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
986
1018
  }, "strip", z.ZodTypeAny, {
987
- source: string;
988
1019
  state: "checked" | "gap" | "not_configured";
989
- summary?: string | undefined;
1020
+ source: string;
990
1021
  id?: string | undefined;
1022
+ summary?: string | undefined;
991
1023
  links?: {
1024
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
992
1025
  label: string;
993
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
994
1026
  url: string;
995
1027
  }[] | undefined;
996
1028
  finding_ids?: number[] | undefined;
997
1029
  step_ids?: string[] | undefined;
998
1030
  integration_id?: string | undefined;
999
1031
  }, {
1000
- source: string;
1001
1032
  state: "checked" | "gap" | "not_configured";
1002
- summary?: string | undefined;
1033
+ source: string;
1003
1034
  id?: string | undefined;
1035
+ summary?: string | undefined;
1004
1036
  links?: {
1037
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1005
1038
  label: string;
1006
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1007
1039
  url: string;
1008
1040
  }[] | undefined;
1009
1041
  finding_ids?: number[] | undefined;
@@ -1053,97 +1085,97 @@ export declare const changeRefSchema: z.ZodEffects<z.ZodObject<{
1053
1085
  label: z.ZodString;
1054
1086
  url: z.ZodEffects<z.ZodString, string, string>;
1055
1087
  }, "strip", z.ZodTypeAny, {
1088
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1056
1089
  label: string;
1057
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1058
1090
  url: string;
1059
1091
  }, {
1092
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1060
1093
  label: string;
1061
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1062
1094
  url: string;
1063
1095
  }>, "many">>;
1064
1096
  }, "strip", z.ZodTypeAny, {
1065
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1066
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1097
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1098
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1067
1099
  title?: string | undefined;
1100
+ id?: string | undefined;
1101
+ author?: string | undefined;
1068
1102
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1069
1103
  ref?: string | undefined;
1070
1104
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1071
1105
  sha?: string | undefined;
1072
1106
  repo?: string | undefined;
1073
- id?: string | undefined;
1074
1107
  links?: {
1108
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1075
1109
  label: string;
1076
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1077
1110
  url: string;
1078
1111
  }[] | undefined;
1079
1112
  finding_ids?: number[] | undefined;
1080
1113
  confidence_percent?: number | undefined;
1081
1114
  step_ids?: string[] | undefined;
1082
1115
  occurred_at?: string | undefined;
1083
- author?: string | undefined;
1084
1116
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1085
1117
  }, {
1086
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1087
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1118
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1119
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1088
1120
  title?: string | undefined;
1121
+ id?: string | undefined;
1122
+ author?: string | undefined;
1089
1123
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1090
1124
  ref?: string | undefined;
1091
1125
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1092
1126
  sha?: string | undefined;
1093
1127
  repo?: string | undefined;
1094
- id?: string | undefined;
1095
1128
  links?: {
1129
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1096
1130
  label: string;
1097
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1098
1131
  url: string;
1099
1132
  }[] | undefined;
1100
1133
  finding_ids?: number[] | undefined;
1101
1134
  confidence_percent?: number | undefined;
1102
1135
  step_ids?: string[] | undefined;
1103
1136
  occurred_at?: string | undefined;
1104
- author?: string | undefined;
1105
1137
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1106
1138
  }>, {
1107
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1108
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1139
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1140
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1109
1141
  title?: string | undefined;
1142
+ id?: string | undefined;
1143
+ author?: string | undefined;
1110
1144
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1111
1145
  ref?: string | undefined;
1112
1146
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1113
1147
  sha?: string | undefined;
1114
1148
  repo?: string | undefined;
1115
- id?: string | undefined;
1116
1149
  links?: {
1150
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1117
1151
  label: string;
1118
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1119
1152
  url: string;
1120
1153
  }[] | undefined;
1121
1154
  finding_ids?: number[] | undefined;
1122
1155
  confidence_percent?: number | undefined;
1123
1156
  step_ids?: string[] | undefined;
1124
1157
  occurred_at?: string | undefined;
1125
- author?: string | undefined;
1126
1158
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1127
1159
  }, {
1128
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1129
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1160
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1161
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1130
1162
  title?: string | undefined;
1163
+ id?: string | undefined;
1164
+ author?: string | undefined;
1131
1165
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1132
1166
  ref?: string | undefined;
1133
1167
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1134
1168
  sha?: string | undefined;
1135
1169
  repo?: string | undefined;
1136
- id?: string | undefined;
1137
1170
  links?: {
1171
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1138
1172
  label: string;
1139
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1140
1173
  url: string;
1141
1174
  }[] | undefined;
1142
1175
  finding_ids?: number[] | undefined;
1143
1176
  confidence_percent?: number | undefined;
1144
1177
  step_ids?: string[] | undefined;
1145
1178
  occurred_at?: string | undefined;
1146
- author?: string | undefined;
1147
1179
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1148
1180
  }>;
1149
1181
  export declare const resultChangeShape: {
@@ -1168,97 +1200,97 @@ export declare const resultChangeShape: {
1168
1200
  label: z.ZodString;
1169
1201
  url: z.ZodEffects<z.ZodString, string, string>;
1170
1202
  }, "strip", z.ZodTypeAny, {
1203
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1171
1204
  label: string;
1172
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1173
1205
  url: string;
1174
1206
  }, {
1207
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1175
1208
  label: string;
1176
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1177
1209
  url: string;
1178
1210
  }>, "many">>;
1179
1211
  }, "strip", z.ZodTypeAny, {
1180
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1181
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1212
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1213
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1182
1214
  title?: string | undefined;
1215
+ id?: string | undefined;
1216
+ author?: string | undefined;
1183
1217
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1184
1218
  ref?: string | undefined;
1185
1219
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1186
1220
  sha?: string | undefined;
1187
1221
  repo?: string | undefined;
1188
- id?: string | undefined;
1189
1222
  links?: {
1223
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1190
1224
  label: string;
1191
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1192
1225
  url: string;
1193
1226
  }[] | undefined;
1194
1227
  finding_ids?: number[] | undefined;
1195
1228
  confidence_percent?: number | undefined;
1196
1229
  step_ids?: string[] | undefined;
1197
1230
  occurred_at?: string | undefined;
1198
- author?: string | undefined;
1199
1231
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1200
1232
  }, {
1201
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1202
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1233
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1234
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1203
1235
  title?: string | undefined;
1236
+ id?: string | undefined;
1237
+ author?: string | undefined;
1204
1238
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1205
1239
  ref?: string | undefined;
1206
1240
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1207
1241
  sha?: string | undefined;
1208
1242
  repo?: string | undefined;
1209
- id?: string | undefined;
1210
1243
  links?: {
1244
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1211
1245
  label: string;
1212
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1213
1246
  url: string;
1214
1247
  }[] | undefined;
1215
1248
  finding_ids?: number[] | undefined;
1216
1249
  confidence_percent?: number | undefined;
1217
1250
  step_ids?: string[] | undefined;
1218
1251
  occurred_at?: string | undefined;
1219
- author?: string | undefined;
1220
1252
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1221
1253
  }>, {
1222
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1223
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1254
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1255
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1224
1256
  title?: string | undefined;
1257
+ id?: string | undefined;
1258
+ author?: string | undefined;
1225
1259
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1226
1260
  ref?: string | undefined;
1227
1261
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1228
1262
  sha?: string | undefined;
1229
1263
  repo?: string | undefined;
1230
- id?: string | undefined;
1231
1264
  links?: {
1265
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1232
1266
  label: string;
1233
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1234
1267
  url: string;
1235
1268
  }[] | undefined;
1236
1269
  finding_ids?: number[] | undefined;
1237
1270
  confidence_percent?: number | undefined;
1238
1271
  step_ids?: string[] | undefined;
1239
1272
  occurred_at?: string | undefined;
1240
- author?: string | undefined;
1241
1273
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1242
1274
  }, {
1243
- kind: "ci_run" | "deployment" | "release" | "commit" | "pull_request" | "config_change";
1244
- role: "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by" | "context";
1275
+ kind: "commit" | "ci_run" | "release" | "deployment" | "pull_request" | "config_change";
1276
+ role: "context" | "fix" | "regression_source" | "first_bad" | "rollback" | "last_good" | "verified_by";
1245
1277
  title?: string | undefined;
1278
+ id?: string | undefined;
1279
+ author?: string | undefined;
1246
1280
  state?: "open" | "merged" | "closed" | "reverted" | "deployed" | "rolled_back" | undefined;
1247
1281
  ref?: string | undefined;
1248
1282
  result?: "unknown" | "pending" | "skipped" | "success" | "failure" | "cancelled" | undefined;
1249
1283
  sha?: string | undefined;
1250
1284
  repo?: string | undefined;
1251
- id?: string | undefined;
1252
1285
  links?: {
1286
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1253
1287
  label: string;
1254
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1255
1288
  url: string;
1256
1289
  }[] | undefined;
1257
1290
  finding_ids?: number[] | undefined;
1258
1291
  confidence_percent?: number | undefined;
1259
1292
  step_ids?: string[] | undefined;
1260
1293
  occurred_at?: string | undefined;
1261
- author?: string | undefined;
1262
1294
  verification?: "unknown" | "confirmed" | "likely" | undefined;
1263
1295
  }>, "many">>;
1264
1296
  };
@@ -1273,12 +1305,12 @@ export declare const resultStructureShape: {
1273
1305
  label: z.ZodString;
1274
1306
  url: z.ZodEffects<z.ZodString, string, string>;
1275
1307
  }, "strip", z.ZodTypeAny, {
1308
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1276
1309
  label: string;
1277
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1278
1310
  url: string;
1279
1311
  }, {
1312
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1280
1313
  label: string;
1281
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1282
1314
  url: string;
1283
1315
  }>, "many">>;
1284
1316
  confidence_percent: z.ZodOptional<z.ZodNumber>;
@@ -1286,8 +1318,8 @@ export declare const resultStructureShape: {
1286
1318
  label: string;
1287
1319
  id?: string | undefined;
1288
1320
  links?: {
1321
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1289
1322
  label: string;
1290
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1291
1323
  url: string;
1292
1324
  }[] | undefined;
1293
1325
  explanation?: string | undefined;
@@ -1297,8 +1329,8 @@ export declare const resultStructureShape: {
1297
1329
  label: string;
1298
1330
  id?: string | undefined;
1299
1331
  links?: {
1332
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1300
1333
  label: string;
1301
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1302
1334
  url: string;
1303
1335
  }[] | undefined;
1304
1336
  explanation?: string | undefined;
@@ -1315,38 +1347,38 @@ export declare const resultStructureShape: {
1315
1347
  label: z.ZodString;
1316
1348
  url: z.ZodEffects<z.ZodString, string, string>;
1317
1349
  }, "strip", z.ZodTypeAny, {
1350
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1318
1351
  label: string;
1319
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1320
1352
  url: string;
1321
1353
  }, {
1354
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1322
1355
  label: string;
1323
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1324
1356
  url: string;
1325
1357
  }>, "many">>;
1326
1358
  step_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1327
1359
  integration_id: z.ZodOptional<z.ZodString>;
1328
1360
  finding_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1329
1361
  }, "strip", z.ZodTypeAny, {
1330
- source: string;
1331
1362
  state: "checked" | "gap" | "not_configured";
1332
- summary?: string | undefined;
1363
+ source: string;
1333
1364
  id?: string | undefined;
1365
+ summary?: string | undefined;
1334
1366
  links?: {
1367
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1335
1368
  label: string;
1336
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1337
1369
  url: string;
1338
1370
  }[] | undefined;
1339
1371
  finding_ids?: number[] | undefined;
1340
1372
  step_ids?: string[] | undefined;
1341
1373
  integration_id?: string | undefined;
1342
1374
  }, {
1343
- source: string;
1344
1375
  state: "checked" | "gap" | "not_configured";
1345
- summary?: string | undefined;
1376
+ source: string;
1346
1377
  id?: string | undefined;
1378
+ summary?: string | undefined;
1347
1379
  links?: {
1380
+ kind: "diff" | "commit" | "pr" | "ci_run" | "release" | "deployment" | "explore" | "panel" | "logs" | "trace";
1348
1381
  label: string;
1349
- kind: "diff" | "ci_run" | "deployment" | "release" | "explore" | "panel" | "commit" | "pr" | "logs" | "trace";
1350
1382
  url: string;
1351
1383
  }[] | undefined;
1352
1384
  finding_ids?: number[] | undefined;
@@ -1401,6 +1433,22 @@ export declare function stripFindingChangeLinks(refs: unknown): {
1401
1433
  refs: unknown;
1402
1434
  removed: string[];
1403
1435
  };
1436
+ /**
1437
+ * A result summary whose diff figures carry no unchanged lines and no line
1438
+ * numbers. `removed` names each figure that was changed.
1439
+ */
1440
+ export declare function stripResultDiffLines(summary: unknown): {
1441
+ summary: unknown;
1442
+ removed: string[];
1443
+ };
1444
+ /**
1445
+ * A result summary whose stats and run_history figures carry none of the
1446
+ * figure extras. `removed` names each figure that was changed.
1447
+ */
1448
+ export declare function stripResultFigureExtras(summary: unknown): {
1449
+ summary: unknown;
1450
+ removed: string[];
1451
+ };
1404
1452
  /** The sentence the tool adds when it dropped fields for an older backend. */
1405
1453
  export declare function unsupportedNotice(removed: string[], capability?: string): string;
1406
1454
  export type QualityWarning = {
@@ -1413,4 +1461,16 @@ export type QualityWarning = {
1413
1461
  * themselves stay verbatim in the response; this only groups them by code.
1414
1462
  */
1415
1463
  export declare function summarizeWarnings(warnings: unknown): string | undefined;
1416
- export {};
1464
+ export declare const HEADLINE_MAX_WORDS = 15;
1465
+ /**
1466
+ * Advice when the headline claim (conclusion.sentence) is over the limit.
1467
+ * Nothing is changed or blocked: the backend accepts any text and only warns.
1468
+ */
1469
+ export declare function headlineNotice(summary: unknown): string | undefined;
1470
+ /**
1471
+ * Advice when the claim of a gap finding is not a question. A gap finding
1472
+ * that is open blocks the diagnosis, and a person reads its claim as the
1473
+ * question to answer. A source that was only unavailable is still a gap, so
1474
+ * this is advice and never an error.
1475
+ */
1476
+ export declare function gapQuestionNotice(findingType: string, role: string | undefined, claim: string): string | undefined;