@inflexa-ai/harness 0.19.2 → 0.21.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 (139) hide show
  1. package/dist/agents/conversation-agent.d.ts +26 -14
  2. package/dist/agents/conversation-agent.js +12 -23
  3. package/dist/agents/report-session-agent.d.ts +31 -5
  4. package/dist/agents/report-session-agent.js +31 -6
  5. package/dist/app/chat-turn.js +3 -1
  6. package/dist/app/message-assembly.d.ts +15 -1
  7. package/dist/app/message-assembly.js +22 -8
  8. package/dist/app/report-session-runtime.d.ts +21 -4
  9. package/dist/app/report-session-runtime.js +53 -6
  10. package/dist/app/spawn-report-session.d.ts +174 -17
  11. package/dist/app/spawn-report-session.js +233 -21
  12. package/dist/contracts/chat-events.d.ts +7 -2
  13. package/dist/contracts/message.d.ts +10 -0
  14. package/dist/contracts/report-blocks.d.ts +743 -19
  15. package/dist/contracts/report-blocks.js +186 -11
  16. package/dist/contracts/report-reference.d.ts +88 -0
  17. package/dist/contracts/report-reference.js +48 -0
  18. package/dist/index.d.ts +9 -0
  19. package/dist/index.js +20 -0
  20. package/dist/lib/chrome.d.ts +26 -6
  21. package/dist/lib/chrome.js +99 -32
  22. package/dist/lib/eyes.d.ts +57 -0
  23. package/dist/lib/eyes.js +45 -0
  24. package/dist/lib/page-capture.d.ts +14 -0
  25. package/dist/lib/page-capture.js +56 -2
  26. package/dist/literature/sources/pubmed.js +2 -1
  27. package/dist/loop/run-agent.js +58 -23
  28. package/dist/loop/tool-detail.d.ts +19 -2
  29. package/dist/loop/tool-detail.js +35 -2
  30. package/dist/memory/content-to-cortex.d.ts +3 -2
  31. package/dist/memory/content-to-cortex.js +21 -12
  32. package/dist/memory/conversation-display-replay.js +14 -7
  33. package/dist/memory/thread-history.d.ts +60 -3
  34. package/dist/memory/thread-history.js +55 -16
  35. package/dist/memory/thread-store.d.ts +11 -1
  36. package/dist/memory/thread-store.js +12 -2
  37. package/dist/prompts/conversation.d.ts +1 -1
  38. package/dist/prompts/conversation.js +23 -6
  39. package/dist/prompts/report-session.d.ts +1 -1
  40. package/dist/prompts/report-session.js +183 -9
  41. package/dist/report-model/authoring-grammar.d.ts +463 -0
  42. package/dist/report-model/authoring-grammar.js +77 -0
  43. package/dist/report-model/block-walk.d.ts +57 -14
  44. package/dist/report-model/block-walk.js +116 -11
  45. package/dist/report-model/draft-finish.d.ts +22 -4
  46. package/dist/report-model/draft-finish.js +39 -7
  47. package/dist/report-model/draft-operations.d.ts +3 -0
  48. package/dist/report-model/draft-operations.js +19 -5
  49. package/dist/report-model/draft-read.d.ts +8 -5
  50. package/dist/report-model/draft-read.js +21 -5
  51. package/dist/report-model/fixture-resolver.js +15 -4
  52. package/dist/report-model/pin-snapshot.d.ts +24 -6
  53. package/dist/report-model/pin-snapshot.js +204 -6
  54. package/dist/report-model/production-resolver.js +15 -4
  55. package/dist/report-model/reference-resolver.d.ts +50 -1
  56. package/dist/report-model/reference-resolver.js +94 -1
  57. package/dist/report-model/reference-stamp.d.ts +45 -0
  58. package/dist/report-model/reference-stamp.js +173 -0
  59. package/dist/report-model/structural-validation.d.ts +4 -1
  60. package/dist/report-model/structural-validation.js +48 -3
  61. package/dist/report-model/validate.d.ts +1 -1
  62. package/dist/report-model/validate.js +1 -1
  63. package/dist/report-render/asset-lookup.d.ts +19 -0
  64. package/dist/report-render/asset-lookup.js +37 -0
  65. package/dist/report-render/assets.d.ts +45 -1
  66. package/dist/report-render/assets.js +65 -6
  67. package/dist/report-render/chart-presets.d.ts +102 -0
  68. package/dist/report-render/chart-presets.js +205 -0
  69. package/dist/report-render/chart.d.ts +112 -10
  70. package/dist/report-render/chart.js +1164 -41
  71. package/dist/report-render/design.d.ts +99 -0
  72. package/dist/report-render/design.js +289 -107
  73. package/dist/report-render/number-format.d.ts +117 -0
  74. package/dist/report-render/number-format.js +479 -0
  75. package/dist/report-render/page.d.ts +121 -5
  76. package/dist/report-render/page.js +689 -7
  77. package/dist/report-render/references.d.ts +70 -16
  78. package/dist/report-render/references.js +54 -22
  79. package/dist/report-render/render.d.ts +23 -5
  80. package/dist/report-render/render.js +81 -22
  81. package/dist/report-render/table-data.d.ts +92 -0
  82. package/dist/report-render/table-data.js +129 -0
  83. package/dist/report-render/types.d.ts +15 -0
  84. package/dist/report-render/value-bridge.js +6 -2
  85. package/dist/report-render/views/chart-view.d.ts +12 -5
  86. package/dist/report-render/views/chart-view.js +14 -8
  87. package/dist/report-render/views/page-view.d.ts +36 -15
  88. package/dist/report-render/views/page-view.js +45 -23
  89. package/dist/report-render/views/prose.d.ts +12 -2
  90. package/dist/report-render/views/prose.js +29 -7
  91. package/dist/report-render/views/references-view.d.ts +22 -8
  92. package/dist/report-render/views/references-view.js +101 -13
  93. package/dist/report-render/views/values.d.ts +128 -13
  94. package/dist/report-render/views/values.js +199 -18
  95. package/dist/runtime/assemble.d.ts +39 -5
  96. package/dist/runtime/assemble.js +47 -6
  97. package/dist/sandbox/client.d.ts +10 -1
  98. package/dist/sandbox/create-sandbox.d.ts +9 -4
  99. package/dist/sandbox/create-sandbox.js +22 -16
  100. package/dist/sandbox/docker-client.js +10 -7
  101. package/dist/sandbox/k8s-client.js +11 -18
  102. package/dist/sandbox/mount-plan.d.ts +45 -7
  103. package/dist/sandbox/mount-plan.js +43 -5
  104. package/dist/sandbox/types.d.ts +10 -6
  105. package/dist/state/init.js +38 -9
  106. package/dist/state/report-session-state.d.ts +42 -1
  107. package/dist/state/report-session-state.js +70 -2
  108. package/dist/state/report-versions.d.ts +22 -17
  109. package/dist/state/report-versions.js +48 -35
  110. package/dist/state/snapshot-parse.js +16 -1
  111. package/dist/tasks/data-profile.d.ts +7 -4
  112. package/dist/tasks/data-profile.js +9 -9
  113. package/dist/tools/define-tool.d.ts +32 -0
  114. package/dist/tools/define-tool.js +4 -0
  115. package/dist/tools/detail-resolver.d.ts +7 -2
  116. package/dist/tools/detail-resolver.js +7 -2
  117. package/dist/tools/iterate-report.d.ts +1 -1
  118. package/dist/tools/report/preview-snapshot.js +1 -0
  119. package/dist/tools/report-authoring/authoring-tools.d.ts +15 -6
  120. package/dist/tools/report-authoring/authoring-tools.js +99 -18
  121. package/dist/tools/report-session/derive-table.d.ts +162 -0
  122. package/dist/tools/report-session/derive-table.js +459 -0
  123. package/dist/tools/report-session/examine-page.d.ts +48 -18
  124. package/dist/tools/report-session/examine-page.js +204 -24
  125. package/dist/tools/report-session/index.d.ts +2 -0
  126. package/dist/tools/report-session/index.js +2 -0
  127. package/dist/tools/report-session/list-artifacts.d.ts +97 -0
  128. package/dist/tools/report-session/list-artifacts.js +197 -0
  129. package/dist/tools/report-session/preview-report.d.ts +6 -0
  130. package/dist/tools/report-session/preview-report.js +180 -28
  131. package/dist/tools/report-session/record-version.d.ts +22 -10
  132. package/dist/tools/report-session/record-version.js +99 -14
  133. package/dist/tools/start-report-session.d.ts +115 -0
  134. package/dist/tools/start-report-session.js +179 -0
  135. package/dist/workflows/sandbox-step.d.ts +7 -4
  136. package/dist/workflows/sandbox-step.js +10 -12
  137. package/dist/workspace/paths.d.ts +50 -0
  138. package/dist/workspace/paths.js +63 -0
  139. package/package.json +2 -1
@@ -14,12 +14,322 @@
14
14
  * rule only when an extra field fails the parse.
15
15
  */
16
16
  import { z } from "zod";
17
+ /**
18
+ * The chart vocabulary. The first seven values name one plot form each. The last four are presets of a
19
+ * scientific plot, and the renderer expands a preset into a composition.
20
+ */
21
+ declare const ChartTypeSchema: z.ZodEnum<{
22
+ bar: "bar";
23
+ line: "line";
24
+ scatter: "scatter";
25
+ histogram: "histogram";
26
+ box: "box";
27
+ heatmap: "heatmap";
28
+ pie: "pie";
29
+ volcano: "volcano";
30
+ manhattan: "manhattan";
31
+ ma: "ma";
32
+ km: "km";
33
+ }>;
34
+ /** The per-row transforms of a channel. Each derived value comes from one cell. */
35
+ declare const ChartTransformSchema: z.ZodEnum<{
36
+ log10: "log10";
37
+ neg_log10: "neg_log10";
38
+ abs: "abs";
39
+ rank: "rank";
40
+ }>;
41
+ /**
42
+ * The threshold pair of a preset that classifies its rows.
43
+ *
44
+ * One declaration moves the guide lines and the color split together. Thus the split always lands on the
45
+ * drawn lines, and no second declaration can disagree with the first one.
46
+ */
47
+ declare const ChartThresholdsSchema: z.ZodObject<{
48
+ significance: z.ZodNumber;
49
+ effect: z.ZodNumber;
50
+ }, z.core.$strict>;
51
+ /**
52
+ * One visual channel: a column name, or a column with a per-row transform.
53
+ *
54
+ * The object form carries a column and a transform, and it carries no value. Thus a channel can never
55
+ * bring a data literal into the chart option.
56
+ */
57
+ export declare const ChartChannelSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
58
+ column: z.ZodString;
59
+ transform: z.ZodEnum<{
60
+ log10: "log10";
61
+ neg_log10: "neg_log10";
62
+ abs: "abs";
63
+ rank: "rank";
64
+ }>;
65
+ }, z.core.$strict>]>;
66
+ /** The mapping from a data column to a visual channel. Each channel is optional. */
67
+ declare const ChartEncodingSchema: z.ZodObject<{
68
+ x: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
69
+ column: z.ZodString;
70
+ transform: z.ZodEnum<{
71
+ log10: "log10";
72
+ neg_log10: "neg_log10";
73
+ abs: "abs";
74
+ rank: "rank";
75
+ }>;
76
+ }, z.core.$strict>]>>;
77
+ y: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
78
+ column: z.ZodString;
79
+ transform: z.ZodEnum<{
80
+ log10: "log10";
81
+ neg_log10: "neg_log10";
82
+ abs: "abs";
83
+ rank: "rank";
84
+ }>;
85
+ }, z.core.$strict>]>>;
86
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
87
+ column: z.ZodString;
88
+ transform: z.ZodEnum<{
89
+ log10: "log10";
90
+ neg_log10: "neg_log10";
91
+ abs: "abs";
92
+ rank: "rank";
93
+ }>;
94
+ }, z.core.$strict>]>>;
95
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
96
+ column: z.ZodString;
97
+ transform: z.ZodEnum<{
98
+ log10: "log10";
99
+ neg_log10: "neg_log10";
100
+ abs: "abs";
101
+ rank: "rank";
102
+ }>;
103
+ }, z.core.$strict>]>>;
104
+ label: z.ZodOptional<z.ZodString>;
105
+ }, z.core.$strict>;
106
+ /**
107
+ * One series of a composition: a plot form, its own channels, and an optional legend name.
108
+ *
109
+ * A `step` series is a line with the step flag. An `area` series can name a `y0` lower bound, thus a band
110
+ * between two columns of one row is expressible. The refine holds `y0` to the one form that draws a band,
111
+ * and the second refine holds the orientation to the one form that carries an arrangement.
112
+ */
113
+ export declare const ChartSeriesSchema: z.ZodObject<{
114
+ form: z.ZodEnum<{
115
+ step: "step";
116
+ bar: "bar";
117
+ line: "line";
118
+ scatter: "scatter";
119
+ area: "area";
120
+ }>;
121
+ encoding: z.ZodObject<{
122
+ x: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
123
+ column: z.ZodString;
124
+ transform: z.ZodEnum<{
125
+ log10: "log10";
126
+ neg_log10: "neg_log10";
127
+ abs: "abs";
128
+ rank: "rank";
129
+ }>;
130
+ }, z.core.$strict>]>;
131
+ y: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
132
+ column: z.ZodString;
133
+ transform: z.ZodEnum<{
134
+ log10: "log10";
135
+ neg_log10: "neg_log10";
136
+ abs: "abs";
137
+ rank: "rank";
138
+ }>;
139
+ }, z.core.$strict>]>;
140
+ y0: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
141
+ column: z.ZodString;
142
+ transform: z.ZodEnum<{
143
+ log10: "log10";
144
+ neg_log10: "neg_log10";
145
+ abs: "abs";
146
+ rank: "rank";
147
+ }>;
148
+ }, z.core.$strict>]>>;
149
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
150
+ column: z.ZodString;
151
+ transform: z.ZodEnum<{
152
+ log10: "log10";
153
+ neg_log10: "neg_log10";
154
+ abs: "abs";
155
+ rank: "rank";
156
+ }>;
157
+ }, z.core.$strict>]>>;
158
+ label: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strict>;
160
+ name: z.ZodOptional<z.ZodString>;
161
+ orientation: z.ZodOptional<z.ZodEnum<{
162
+ vertical: "vertical";
163
+ horizontal: "horizontal";
164
+ }>>;
165
+ }, z.core.$strict>;
166
+ /**
167
+ * One annotation of a composition.
168
+ *
169
+ * A reference line and a reference band both carry a declared constant. Such a constant is a guide, and it
170
+ * is never a plotted value.
171
+ */
172
+ export declare const ChartAnnotationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
173
+ kind: z.ZodLiteral<"reference-line">;
174
+ axis: z.ZodEnum<{
175
+ x: "x";
176
+ y: "y";
177
+ }>;
178
+ value: z.ZodNumber;
179
+ label: z.ZodOptional<z.ZodString>;
180
+ }, z.core.$strict>, z.ZodObject<{
181
+ kind: z.ZodLiteral<"reference-band">;
182
+ axis: z.ZodEnum<{
183
+ x: "x";
184
+ y: "y";
185
+ }>;
186
+ from: z.ZodNumber;
187
+ to: z.ZodNumber;
188
+ label: z.ZodOptional<z.ZodString>;
189
+ }, z.core.$strict>, z.ZodObject<{
190
+ kind: z.ZodLiteral<"point-labels">;
191
+ column: z.ZodString;
192
+ order: z.ZodEnum<{
193
+ desc: "desc";
194
+ asc: "asc";
195
+ }>;
196
+ n: z.ZodNumber;
197
+ }, z.core.$strict>], "kind">;
198
+ /** The two axes of a composition. */
199
+ export declare const ChartAxesSchema: z.ZodObject<{
200
+ x: z.ZodOptional<z.ZodObject<{
201
+ title: z.ZodOptional<z.ZodString>;
202
+ scale: z.ZodOptional<z.ZodEnum<{
203
+ log: "log";
204
+ linear: "linear";
205
+ }>>;
206
+ }, z.core.$strict>>;
207
+ y: z.ZodOptional<z.ZodObject<{
208
+ title: z.ZodOptional<z.ZodString>;
209
+ scale: z.ZodOptional<z.ZodEnum<{
210
+ log: "log";
211
+ linear: "linear";
212
+ }>>;
213
+ }, z.core.$strict>>;
214
+ }, z.core.$strict>;
215
+ /** The full chart grammar: the series, the annotations, and the axes. Each series reads the one bound table. */
216
+ export declare const ChartCompositionSchema: z.ZodObject<{
217
+ series: z.ZodArray<z.ZodObject<{
218
+ form: z.ZodEnum<{
219
+ step: "step";
220
+ bar: "bar";
221
+ line: "line";
222
+ scatter: "scatter";
223
+ area: "area";
224
+ }>;
225
+ encoding: z.ZodObject<{
226
+ x: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
227
+ column: z.ZodString;
228
+ transform: z.ZodEnum<{
229
+ log10: "log10";
230
+ neg_log10: "neg_log10";
231
+ abs: "abs";
232
+ rank: "rank";
233
+ }>;
234
+ }, z.core.$strict>]>;
235
+ y: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
236
+ column: z.ZodString;
237
+ transform: z.ZodEnum<{
238
+ log10: "log10";
239
+ neg_log10: "neg_log10";
240
+ abs: "abs";
241
+ rank: "rank";
242
+ }>;
243
+ }, z.core.$strict>]>;
244
+ y0: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
245
+ column: z.ZodString;
246
+ transform: z.ZodEnum<{
247
+ log10: "log10";
248
+ neg_log10: "neg_log10";
249
+ abs: "abs";
250
+ rank: "rank";
251
+ }>;
252
+ }, z.core.$strict>]>>;
253
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
254
+ column: z.ZodString;
255
+ transform: z.ZodEnum<{
256
+ log10: "log10";
257
+ neg_log10: "neg_log10";
258
+ abs: "abs";
259
+ rank: "rank";
260
+ }>;
261
+ }, z.core.$strict>]>>;
262
+ label: z.ZodOptional<z.ZodString>;
263
+ }, z.core.$strict>;
264
+ name: z.ZodOptional<z.ZodString>;
265
+ orientation: z.ZodOptional<z.ZodEnum<{
266
+ vertical: "vertical";
267
+ horizontal: "horizontal";
268
+ }>>;
269
+ }, z.core.$strict>>;
270
+ annotations: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
271
+ kind: z.ZodLiteral<"reference-line">;
272
+ axis: z.ZodEnum<{
273
+ x: "x";
274
+ y: "y";
275
+ }>;
276
+ value: z.ZodNumber;
277
+ label: z.ZodOptional<z.ZodString>;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ kind: z.ZodLiteral<"reference-band">;
280
+ axis: z.ZodEnum<{
281
+ x: "x";
282
+ y: "y";
283
+ }>;
284
+ from: z.ZodNumber;
285
+ to: z.ZodNumber;
286
+ label: z.ZodOptional<z.ZodString>;
287
+ }, z.core.$strict>, z.ZodObject<{
288
+ kind: z.ZodLiteral<"point-labels">;
289
+ column: z.ZodString;
290
+ order: z.ZodEnum<{
291
+ desc: "desc";
292
+ asc: "asc";
293
+ }>;
294
+ n: z.ZodNumber;
295
+ }, z.core.$strict>], "kind">>>;
296
+ axes: z.ZodOptional<z.ZodObject<{
297
+ x: z.ZodOptional<z.ZodObject<{
298
+ title: z.ZodOptional<z.ZodString>;
299
+ scale: z.ZodOptional<z.ZodEnum<{
300
+ log: "log";
301
+ linear: "linear";
302
+ }>>;
303
+ }, z.core.$strict>>;
304
+ y: z.ZodOptional<z.ZodObject<{
305
+ title: z.ZodOptional<z.ZodString>;
306
+ scale: z.ZodOptional<z.ZodEnum<{
307
+ log: "log";
308
+ linear: "linear";
309
+ }>>;
310
+ }, z.core.$strict>>;
311
+ }, z.core.$strict>>;
312
+ }, z.core.$strict>;
313
+ /**
314
+ * One typed list of a text block: the flag that selects the form, and the items.
315
+ *
316
+ * An item is one inline line, and the renderer escapes it as it escapes a paragraph. No item carries
317
+ * markup, and no item carries a list of its own. A deeper structure composes as a section with blocks.
318
+ */
319
+ export declare const TextListSchema: z.ZodObject<{
320
+ ordered: z.ZodBoolean;
321
+ items: z.ZodArray<z.ZodString>;
322
+ }, z.core.$strict>;
17
323
  /** Prose with no binding. The absence of a binding field is the rule for this kind. */
18
324
  export declare const TextBlockSchema: z.ZodObject<{
19
325
  kind: z.ZodLiteral<"text">;
20
326
  id: z.ZodString;
21
327
  content: z.ZodObject<{
22
328
  prose: z.ZodString;
329
+ list: z.ZodOptional<z.ZodObject<{
330
+ ordered: z.ZodBoolean;
331
+ items: z.ZodArray<z.ZodString>;
332
+ }, z.core.$strict>>;
23
333
  }, z.core.$strict>;
24
334
  }, z.core.$strict>;
25
335
  /** Prose with at least one reference that justifies it. */
@@ -53,7 +363,23 @@ export declare const ClaimBlockSchema: z.ZodObject<{
53
363
  }, z.core.$strict>, z.ZodObject<{
54
364
  unit: z.ZodOptional<z.ZodString>;
55
365
  format: z.ZodOptional<z.ZodString>;
366
+ rowBound: z.ZodOptional<z.ZodObject<{
367
+ column: z.ZodString;
368
+ count: z.ZodNumber;
369
+ order: z.ZodOptional<z.ZodEnum<{
370
+ desc: "desc";
371
+ asc: "asc";
372
+ }>>;
373
+ }, z.core.$strict>>;
56
374
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
375
+ columnMeanings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
376
+ count: "count";
377
+ identifier: "identifier";
378
+ category: "category";
379
+ "p-value": "p-value";
380
+ effect: "effect";
381
+ }>>>;
382
+ columnLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
57
383
  run: z.ZodOptional<z.ZodString>;
58
384
  path: z.ZodString;
59
385
  hash: z.ZodString;
@@ -189,7 +515,23 @@ export declare const TableBlockSchema: z.ZodObject<{
189
515
  binding: z.ZodObject<{
190
516
  unit: z.ZodOptional<z.ZodString>;
191
517
  format: z.ZodOptional<z.ZodString>;
518
+ rowBound: z.ZodOptional<z.ZodObject<{
519
+ column: z.ZodString;
520
+ count: z.ZodNumber;
521
+ order: z.ZodOptional<z.ZodEnum<{
522
+ desc: "desc";
523
+ asc: "asc";
524
+ }>>;
525
+ }, z.core.$strict>>;
192
526
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
527
+ columnMeanings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
528
+ count: "count";
529
+ identifier: "identifier";
530
+ category: "category";
531
+ "p-value": "p-value";
532
+ effect: "effect";
533
+ }>>>;
534
+ columnLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
193
535
  run: z.ZodOptional<z.ZodString>;
194
536
  path: z.ZodString;
195
537
  hash: z.ZodString;
@@ -198,7 +540,16 @@ export declare const TableBlockSchema: z.ZodObject<{
198
540
  }, z.core.$strict>;
199
541
  caption: z.ZodOptional<z.ZodString>;
200
542
  }, z.core.$strict>;
201
- /** A whole-table artifact rendered as a chart, with the plot form and the channel mapping. */
543
+ /**
544
+ * A whole-table artifact rendered as a chart.
545
+ *
546
+ * The block carries the quick path or the composition, and never both. The quick path is one chart type
547
+ * with one encoding. The composition holds the series, the annotations, and the axes. The refine makes the
548
+ * exactly-one rule a parse failure.
549
+ *
550
+ * No member of either path carries a data literal, and no member carries script text. Thus every plotted
551
+ * value comes from the resolved rows of the bound table.
552
+ */
202
553
  export declare const ChartBlockSchema: z.ZodObject<{
203
554
  kind: z.ZodLiteral<"chart">;
204
555
  id: z.ZodString;
@@ -206,28 +557,186 @@ export declare const ChartBlockSchema: z.ZodObject<{
206
557
  binding: z.ZodObject<{
207
558
  unit: z.ZodOptional<z.ZodString>;
208
559
  format: z.ZodOptional<z.ZodString>;
560
+ rowBound: z.ZodOptional<z.ZodObject<{
561
+ column: z.ZodString;
562
+ count: z.ZodNumber;
563
+ order: z.ZodOptional<z.ZodEnum<{
564
+ desc: "desc";
565
+ asc: "asc";
566
+ }>>;
567
+ }, z.core.$strict>>;
209
568
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
569
+ columnMeanings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
570
+ count: "count";
571
+ identifier: "identifier";
572
+ category: "category";
573
+ "p-value": "p-value";
574
+ effect: "effect";
575
+ }>>>;
576
+ columnLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
210
577
  run: z.ZodOptional<z.ZodString>;
211
578
  path: z.ZodString;
212
579
  hash: z.ZodString;
213
580
  snapshot: z.ZodOptional<z.ZodString>;
214
581
  kind: z.ZodLiteral<"artifact-table">;
215
582
  }, z.core.$strict>;
216
- chartType: z.ZodEnum<{
217
- line: "line";
583
+ chartType: z.ZodOptional<z.ZodEnum<{
218
584
  bar: "bar";
585
+ line: "line";
219
586
  scatter: "scatter";
220
587
  histogram: "histogram";
221
588
  box: "box";
222
589
  heatmap: "heatmap";
223
590
  pie: "pie";
224
- }>;
225
- encoding: z.ZodObject<{
226
- x: z.ZodOptional<z.ZodString>;
227
- y: z.ZodOptional<z.ZodString>;
228
- group: z.ZodOptional<z.ZodString>;
229
- value: z.ZodOptional<z.ZodString>;
230
- }, z.core.$strict>;
591
+ volcano: "volcano";
592
+ manhattan: "manhattan";
593
+ ma: "ma";
594
+ km: "km";
595
+ }>>;
596
+ encoding: z.ZodOptional<z.ZodObject<{
597
+ x: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
598
+ column: z.ZodString;
599
+ transform: z.ZodEnum<{
600
+ log10: "log10";
601
+ neg_log10: "neg_log10";
602
+ abs: "abs";
603
+ rank: "rank";
604
+ }>;
605
+ }, z.core.$strict>]>>;
606
+ y: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
607
+ column: z.ZodString;
608
+ transform: z.ZodEnum<{
609
+ log10: "log10";
610
+ neg_log10: "neg_log10";
611
+ abs: "abs";
612
+ rank: "rank";
613
+ }>;
614
+ }, z.core.$strict>]>>;
615
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
616
+ column: z.ZodString;
617
+ transform: z.ZodEnum<{
618
+ log10: "log10";
619
+ neg_log10: "neg_log10";
620
+ abs: "abs";
621
+ rank: "rank";
622
+ }>;
623
+ }, z.core.$strict>]>>;
624
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
625
+ column: z.ZodString;
626
+ transform: z.ZodEnum<{
627
+ log10: "log10";
628
+ neg_log10: "neg_log10";
629
+ abs: "abs";
630
+ rank: "rank";
631
+ }>;
632
+ }, z.core.$strict>]>>;
633
+ label: z.ZodOptional<z.ZodString>;
634
+ }, z.core.$strict>>;
635
+ orientation: z.ZodOptional<z.ZodEnum<{
636
+ vertical: "vertical";
637
+ horizontal: "horizontal";
638
+ }>>;
639
+ thresholds: z.ZodOptional<z.ZodObject<{
640
+ significance: z.ZodNumber;
641
+ effect: z.ZodNumber;
642
+ }, z.core.$strict>>;
643
+ composition: z.ZodOptional<z.ZodObject<{
644
+ series: z.ZodArray<z.ZodObject<{
645
+ form: z.ZodEnum<{
646
+ step: "step";
647
+ bar: "bar";
648
+ line: "line";
649
+ scatter: "scatter";
650
+ area: "area";
651
+ }>;
652
+ encoding: z.ZodObject<{
653
+ x: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
654
+ column: z.ZodString;
655
+ transform: z.ZodEnum<{
656
+ log10: "log10";
657
+ neg_log10: "neg_log10";
658
+ abs: "abs";
659
+ rank: "rank";
660
+ }>;
661
+ }, z.core.$strict>]>;
662
+ y: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
663
+ column: z.ZodString;
664
+ transform: z.ZodEnum<{
665
+ log10: "log10";
666
+ neg_log10: "neg_log10";
667
+ abs: "abs";
668
+ rank: "rank";
669
+ }>;
670
+ }, z.core.$strict>]>;
671
+ y0: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
672
+ column: z.ZodString;
673
+ transform: z.ZodEnum<{
674
+ log10: "log10";
675
+ neg_log10: "neg_log10";
676
+ abs: "abs";
677
+ rank: "rank";
678
+ }>;
679
+ }, z.core.$strict>]>>;
680
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
681
+ column: z.ZodString;
682
+ transform: z.ZodEnum<{
683
+ log10: "log10";
684
+ neg_log10: "neg_log10";
685
+ abs: "abs";
686
+ rank: "rank";
687
+ }>;
688
+ }, z.core.$strict>]>>;
689
+ label: z.ZodOptional<z.ZodString>;
690
+ }, z.core.$strict>;
691
+ name: z.ZodOptional<z.ZodString>;
692
+ orientation: z.ZodOptional<z.ZodEnum<{
693
+ vertical: "vertical";
694
+ horizontal: "horizontal";
695
+ }>>;
696
+ }, z.core.$strict>>;
697
+ annotations: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
698
+ kind: z.ZodLiteral<"reference-line">;
699
+ axis: z.ZodEnum<{
700
+ x: "x";
701
+ y: "y";
702
+ }>;
703
+ value: z.ZodNumber;
704
+ label: z.ZodOptional<z.ZodString>;
705
+ }, z.core.$strict>, z.ZodObject<{
706
+ kind: z.ZodLiteral<"reference-band">;
707
+ axis: z.ZodEnum<{
708
+ x: "x";
709
+ y: "y";
710
+ }>;
711
+ from: z.ZodNumber;
712
+ to: z.ZodNumber;
713
+ label: z.ZodOptional<z.ZodString>;
714
+ }, z.core.$strict>, z.ZodObject<{
715
+ kind: z.ZodLiteral<"point-labels">;
716
+ column: z.ZodString;
717
+ order: z.ZodEnum<{
718
+ desc: "desc";
719
+ asc: "asc";
720
+ }>;
721
+ n: z.ZodNumber;
722
+ }, z.core.$strict>], "kind">>>;
723
+ axes: z.ZodOptional<z.ZodObject<{
724
+ x: z.ZodOptional<z.ZodObject<{
725
+ title: z.ZodOptional<z.ZodString>;
726
+ scale: z.ZodOptional<z.ZodEnum<{
727
+ log: "log";
728
+ linear: "linear";
729
+ }>>;
730
+ }, z.core.$strict>>;
731
+ y: z.ZodOptional<z.ZodObject<{
732
+ title: z.ZodOptional<z.ZodString>;
733
+ scale: z.ZodOptional<z.ZodEnum<{
734
+ log: "log";
735
+ linear: "linear";
736
+ }>>;
737
+ }, z.core.$strict>>;
738
+ }, z.core.$strict>>;
739
+ }, z.core.$strict>>;
231
740
  caption: z.ZodOptional<z.ZodString>;
232
741
  }, z.core.$strict>;
233
742
  /** A static image artifact. An image has no per-cell address, thus it is pinned whole-file. */
@@ -278,6 +787,10 @@ export declare const ATOM_BLOCK_SCHEMAS: readonly [z.ZodObject<{
278
787
  id: z.ZodString;
279
788
  content: z.ZodObject<{
280
789
  prose: z.ZodString;
790
+ list: z.ZodOptional<z.ZodObject<{
791
+ ordered: z.ZodBoolean;
792
+ items: z.ZodArray<z.ZodString>;
793
+ }, z.core.$strict>>;
281
794
  }, z.core.$strict>;
282
795
  }, z.core.$strict>, z.ZodObject<{
283
796
  kind: z.ZodLiteral<"claim">;
@@ -309,7 +822,23 @@ export declare const ATOM_BLOCK_SCHEMAS: readonly [z.ZodObject<{
309
822
  }, z.core.$strict>, z.ZodObject<{
310
823
  unit: z.ZodOptional<z.ZodString>;
311
824
  format: z.ZodOptional<z.ZodString>;
825
+ rowBound: z.ZodOptional<z.ZodObject<{
826
+ column: z.ZodString;
827
+ count: z.ZodNumber;
828
+ order: z.ZodOptional<z.ZodEnum<{
829
+ desc: "desc";
830
+ asc: "asc";
831
+ }>>;
832
+ }, z.core.$strict>>;
312
833
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
834
+ columnMeanings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
835
+ count: "count";
836
+ identifier: "identifier";
837
+ category: "category";
838
+ "p-value": "p-value";
839
+ effect: "effect";
840
+ }>>>;
841
+ columnLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
313
842
  run: z.ZodOptional<z.ZodString>;
314
843
  path: z.ZodString;
315
844
  hash: z.ZodString;
@@ -441,7 +970,23 @@ export declare const ATOM_BLOCK_SCHEMAS: readonly [z.ZodObject<{
441
970
  binding: z.ZodObject<{
442
971
  unit: z.ZodOptional<z.ZodString>;
443
972
  format: z.ZodOptional<z.ZodString>;
973
+ rowBound: z.ZodOptional<z.ZodObject<{
974
+ column: z.ZodString;
975
+ count: z.ZodNumber;
976
+ order: z.ZodOptional<z.ZodEnum<{
977
+ desc: "desc";
978
+ asc: "asc";
979
+ }>>;
980
+ }, z.core.$strict>>;
444
981
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
982
+ columnMeanings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
983
+ count: "count";
984
+ identifier: "identifier";
985
+ category: "category";
986
+ "p-value": "p-value";
987
+ effect: "effect";
988
+ }>>>;
989
+ columnLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
445
990
  run: z.ZodOptional<z.ZodString>;
446
991
  path: z.ZodString;
447
992
  hash: z.ZodString;
@@ -456,28 +1001,186 @@ export declare const ATOM_BLOCK_SCHEMAS: readonly [z.ZodObject<{
456
1001
  binding: z.ZodObject<{
457
1002
  unit: z.ZodOptional<z.ZodString>;
458
1003
  format: z.ZodOptional<z.ZodString>;
1004
+ rowBound: z.ZodOptional<z.ZodObject<{
1005
+ column: z.ZodString;
1006
+ count: z.ZodNumber;
1007
+ order: z.ZodOptional<z.ZodEnum<{
1008
+ desc: "desc";
1009
+ asc: "asc";
1010
+ }>>;
1011
+ }, z.core.$strict>>;
459
1012
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
1013
+ columnMeanings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
1014
+ count: "count";
1015
+ identifier: "identifier";
1016
+ category: "category";
1017
+ "p-value": "p-value";
1018
+ effect: "effect";
1019
+ }>>>;
1020
+ columnLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
460
1021
  run: z.ZodOptional<z.ZodString>;
461
1022
  path: z.ZodString;
462
1023
  hash: z.ZodString;
463
1024
  snapshot: z.ZodOptional<z.ZodString>;
464
1025
  kind: z.ZodLiteral<"artifact-table">;
465
1026
  }, z.core.$strict>;
466
- chartType: z.ZodEnum<{
467
- line: "line";
1027
+ chartType: z.ZodOptional<z.ZodEnum<{
468
1028
  bar: "bar";
1029
+ line: "line";
469
1030
  scatter: "scatter";
470
1031
  histogram: "histogram";
471
1032
  box: "box";
472
1033
  heatmap: "heatmap";
473
1034
  pie: "pie";
474
- }>;
475
- encoding: z.ZodObject<{
476
- x: z.ZodOptional<z.ZodString>;
477
- y: z.ZodOptional<z.ZodString>;
478
- group: z.ZodOptional<z.ZodString>;
479
- value: z.ZodOptional<z.ZodString>;
480
- }, z.core.$strict>;
1035
+ volcano: "volcano";
1036
+ manhattan: "manhattan";
1037
+ ma: "ma";
1038
+ km: "km";
1039
+ }>>;
1040
+ encoding: z.ZodOptional<z.ZodObject<{
1041
+ x: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1042
+ column: z.ZodString;
1043
+ transform: z.ZodEnum<{
1044
+ log10: "log10";
1045
+ neg_log10: "neg_log10";
1046
+ abs: "abs";
1047
+ rank: "rank";
1048
+ }>;
1049
+ }, z.core.$strict>]>>;
1050
+ y: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1051
+ column: z.ZodString;
1052
+ transform: z.ZodEnum<{
1053
+ log10: "log10";
1054
+ neg_log10: "neg_log10";
1055
+ abs: "abs";
1056
+ rank: "rank";
1057
+ }>;
1058
+ }, z.core.$strict>]>>;
1059
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1060
+ column: z.ZodString;
1061
+ transform: z.ZodEnum<{
1062
+ log10: "log10";
1063
+ neg_log10: "neg_log10";
1064
+ abs: "abs";
1065
+ rank: "rank";
1066
+ }>;
1067
+ }, z.core.$strict>]>>;
1068
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1069
+ column: z.ZodString;
1070
+ transform: z.ZodEnum<{
1071
+ log10: "log10";
1072
+ neg_log10: "neg_log10";
1073
+ abs: "abs";
1074
+ rank: "rank";
1075
+ }>;
1076
+ }, z.core.$strict>]>>;
1077
+ label: z.ZodOptional<z.ZodString>;
1078
+ }, z.core.$strict>>;
1079
+ orientation: z.ZodOptional<z.ZodEnum<{
1080
+ vertical: "vertical";
1081
+ horizontal: "horizontal";
1082
+ }>>;
1083
+ thresholds: z.ZodOptional<z.ZodObject<{
1084
+ significance: z.ZodNumber;
1085
+ effect: z.ZodNumber;
1086
+ }, z.core.$strict>>;
1087
+ composition: z.ZodOptional<z.ZodObject<{
1088
+ series: z.ZodArray<z.ZodObject<{
1089
+ form: z.ZodEnum<{
1090
+ step: "step";
1091
+ bar: "bar";
1092
+ line: "line";
1093
+ scatter: "scatter";
1094
+ area: "area";
1095
+ }>;
1096
+ encoding: z.ZodObject<{
1097
+ x: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1098
+ column: z.ZodString;
1099
+ transform: z.ZodEnum<{
1100
+ log10: "log10";
1101
+ neg_log10: "neg_log10";
1102
+ abs: "abs";
1103
+ rank: "rank";
1104
+ }>;
1105
+ }, z.core.$strict>]>;
1106
+ y: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1107
+ column: z.ZodString;
1108
+ transform: z.ZodEnum<{
1109
+ log10: "log10";
1110
+ neg_log10: "neg_log10";
1111
+ abs: "abs";
1112
+ rank: "rank";
1113
+ }>;
1114
+ }, z.core.$strict>]>;
1115
+ y0: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1116
+ column: z.ZodString;
1117
+ transform: z.ZodEnum<{
1118
+ log10: "log10";
1119
+ neg_log10: "neg_log10";
1120
+ abs: "abs";
1121
+ rank: "rank";
1122
+ }>;
1123
+ }, z.core.$strict>]>>;
1124
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1125
+ column: z.ZodString;
1126
+ transform: z.ZodEnum<{
1127
+ log10: "log10";
1128
+ neg_log10: "neg_log10";
1129
+ abs: "abs";
1130
+ rank: "rank";
1131
+ }>;
1132
+ }, z.core.$strict>]>>;
1133
+ label: z.ZodOptional<z.ZodString>;
1134
+ }, z.core.$strict>;
1135
+ name: z.ZodOptional<z.ZodString>;
1136
+ orientation: z.ZodOptional<z.ZodEnum<{
1137
+ vertical: "vertical";
1138
+ horizontal: "horizontal";
1139
+ }>>;
1140
+ }, z.core.$strict>>;
1141
+ annotations: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1142
+ kind: z.ZodLiteral<"reference-line">;
1143
+ axis: z.ZodEnum<{
1144
+ x: "x";
1145
+ y: "y";
1146
+ }>;
1147
+ value: z.ZodNumber;
1148
+ label: z.ZodOptional<z.ZodString>;
1149
+ }, z.core.$strict>, z.ZodObject<{
1150
+ kind: z.ZodLiteral<"reference-band">;
1151
+ axis: z.ZodEnum<{
1152
+ x: "x";
1153
+ y: "y";
1154
+ }>;
1155
+ from: z.ZodNumber;
1156
+ to: z.ZodNumber;
1157
+ label: z.ZodOptional<z.ZodString>;
1158
+ }, z.core.$strict>, z.ZodObject<{
1159
+ kind: z.ZodLiteral<"point-labels">;
1160
+ column: z.ZodString;
1161
+ order: z.ZodEnum<{
1162
+ desc: "desc";
1163
+ asc: "asc";
1164
+ }>;
1165
+ n: z.ZodNumber;
1166
+ }, z.core.$strict>], "kind">>>;
1167
+ axes: z.ZodOptional<z.ZodObject<{
1168
+ x: z.ZodOptional<z.ZodObject<{
1169
+ title: z.ZodOptional<z.ZodString>;
1170
+ scale: z.ZodOptional<z.ZodEnum<{
1171
+ log: "log";
1172
+ linear: "linear";
1173
+ }>>;
1174
+ }, z.core.$strict>>;
1175
+ y: z.ZodOptional<z.ZodObject<{
1176
+ title: z.ZodOptional<z.ZodString>;
1177
+ scale: z.ZodOptional<z.ZodEnum<{
1178
+ log: "log";
1179
+ linear: "linear";
1180
+ }>>;
1181
+ }, z.core.$strict>>;
1182
+ }, z.core.$strict>>;
1183
+ }, z.core.$strict>>;
481
1184
  caption: z.ZodOptional<z.ZodString>;
482
1185
  }, z.core.$strict>, z.ZodObject<{
483
1186
  kind: z.ZodLiteral<"figure">;
@@ -554,6 +1257,26 @@ export declare const ReportDocumentSchema: z.ZodObject<{
554
1257
  blocks: z.ZodLazy<z.ZodArray<z.ZodType<Block, unknown, z.core.$ZodTypeInternals<Block, unknown>>>>;
555
1258
  }, z.core.$strict>>;
556
1259
  }, z.core.$strict>;
1260
+ /**
1261
+ * The column that one channel names.
1262
+ *
1263
+ * A transform rides beside the column and never in place of it, thus the two channel forms name their
1264
+ * column the same way. The walk, the preset expansion, and the derivation all read the name through this
1265
+ * one function.
1266
+ */
1267
+ export declare function channelColumn(channel: ChartChannel): string;
1268
+ /** The transform of one channel, or `undefined` when the channel names a plain column. */
1269
+ export declare function channelTransform(channel: ChartChannel): ChartTransform | undefined;
1270
+ export type ChartChannel = z.infer<typeof ChartChannelSchema>;
1271
+ export type ChartTransform = z.infer<typeof ChartTransformSchema>;
1272
+ export type ChartEncoding = z.infer<typeof ChartEncodingSchema>;
1273
+ export type ChartSeries = z.infer<typeof ChartSeriesSchema>;
1274
+ export type ChartAnnotation = z.infer<typeof ChartAnnotationSchema>;
1275
+ export type ChartAxes = z.infer<typeof ChartAxesSchema>;
1276
+ export type ChartThresholds = z.infer<typeof ChartThresholdsSchema>;
1277
+ export type ChartComposition = z.infer<typeof ChartCompositionSchema>;
1278
+ export type ChartType = z.infer<typeof ChartTypeSchema>;
1279
+ export type TextList = z.infer<typeof TextListSchema>;
557
1280
  export type TextBlock = z.infer<typeof TextBlockSchema>;
558
1281
  export type ClaimBlock = z.infer<typeof ClaimBlockSchema>;
559
1282
  export type MetricBlock = z.infer<typeof MetricBlockSchema>;
@@ -562,3 +1285,4 @@ export type ChartBlock = z.infer<typeof ChartBlockSchema>;
562
1285
  export type FigureBlock = z.infer<typeof FigureBlockSchema>;
563
1286
  export type CitationBlock = z.infer<typeof CitationBlockSchema>;
564
1287
  export type ReportDocument = z.infer<typeof ReportDocumentSchema>;
1288
+ export {};