@wrenautomation/birdwatch 0.0.0-stage → 0.30.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 (141) hide show
  1. package/LICENSE.md +61 -0
  2. package/README.md +320 -2
  3. package/dist/app/cli.d.ts +4 -0
  4. package/dist/app/cli.js +149 -0
  5. package/dist/app/cli.js.map +1 -0
  6. package/dist/app/engine-cli.d.ts +44 -0
  7. package/dist/app/engine-cli.js +596 -0
  8. package/dist/app/engine-cli.js.map +1 -0
  9. package/dist/app/index.d.ts +6 -0
  10. package/dist/app/index.js +7 -0
  11. package/dist/app/index.js.map +1 -0
  12. package/dist/app/serve.d.ts +14 -0
  13. package/dist/app/serve.js +102 -0
  14. package/dist/app/serve.js.map +1 -0
  15. package/dist/document/body.d.ts +6 -0
  16. package/dist/document/body.js +18 -0
  17. package/dist/document/body.js.map +1 -0
  18. package/dist/document/check.d.ts +35 -0
  19. package/dist/document/check.js +68 -0
  20. package/dist/document/check.js.map +1 -0
  21. package/dist/document/extract.d.ts +81 -0
  22. package/dist/document/extract.js +226 -0
  23. package/dist/document/extract.js.map +1 -0
  24. package/dist/document/index.d.ts +11 -0
  25. package/dist/document/index.js +12 -0
  26. package/dist/document/index.js.map +1 -0
  27. package/dist/document/model.d.ts +10 -0
  28. package/dist/document/model.js +2 -0
  29. package/dist/document/model.js.map +1 -0
  30. package/dist/document/readers.d.ts +24 -0
  31. package/dist/document/readers.js +87 -0
  32. package/dist/document/readers.js.map +1 -0
  33. package/dist/document/types.d.ts +99 -0
  34. package/dist/document/types.js +93 -0
  35. package/dist/document/types.js.map +1 -0
  36. package/dist/engine/agent.d.ts +475 -0
  37. package/dist/engine/agent.js +990 -0
  38. package/dist/engine/agent.js.map +1 -0
  39. package/dist/engine/canonical.d.ts +4 -0
  40. package/dist/engine/canonical.js +55 -0
  41. package/dist/engine/canonical.js.map +1 -0
  42. package/dist/engine/context.d.ts +9 -0
  43. package/dist/engine/context.js +141 -0
  44. package/dist/engine/context.js.map +1 -0
  45. package/dist/engine/cost.d.ts +13 -0
  46. package/dist/engine/cost.js +31 -0
  47. package/dist/engine/cost.js.map +1 -0
  48. package/dist/engine/index.d.ts +16 -0
  49. package/dist/engine/index.js +17 -0
  50. package/dist/engine/index.js.map +1 -0
  51. package/dist/engine/judge.d.ts +158 -0
  52. package/dist/engine/judge.js +323 -0
  53. package/dist/engine/judge.js.map +1 -0
  54. package/dist/engine/people.d.ts +34 -0
  55. package/dist/engine/people.js +125 -0
  56. package/dist/engine/people.js.map +1 -0
  57. package/dist/engine/plan.d.ts +6 -0
  58. package/dist/engine/plan.js +7 -0
  59. package/dist/engine/plan.js.map +1 -0
  60. package/dist/engine/plans/index.d.ts +19 -0
  61. package/dist/engine/plans/index.js +104 -0
  62. package/dist/engine/plans/index.js.map +1 -0
  63. package/dist/engine/ports.d.ts +76 -0
  64. package/dist/engine/ports.js +28 -0
  65. package/dist/engine/ports.js.map +1 -0
  66. package/dist/engine/recall.d.ts +42 -0
  67. package/dist/engine/recall.js +71 -0
  68. package/dist/engine/recall.js.map +1 -0
  69. package/dist/engine/state.d.ts +96 -0
  70. package/dist/engine/state.js +162 -0
  71. package/dist/engine/state.js.map +1 -0
  72. package/dist/engine/steps.d.ts +98 -0
  73. package/dist/engine/steps.js +435 -0
  74. package/dist/engine/steps.js.map +1 -0
  75. package/dist/engine/tree.d.ts +76 -0
  76. package/dist/engine/tree.js +148 -0
  77. package/dist/engine/tree.js.map +1 -0
  78. package/dist/engine/types.d.ts +250 -0
  79. package/dist/engine/types.js +168 -0
  80. package/dist/engine/types.js.map +1 -0
  81. package/dist/engine/view.d.ts +138 -0
  82. package/dist/engine/view.js +188 -0
  83. package/dist/engine/view.js.map +1 -0
  84. package/dist/index.d.ts +15 -0
  85. package/dist/index.js +16 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/ledger/files.d.ts +39 -0
  88. package/dist/ledger/files.js +113 -0
  89. package/dist/ledger/files.js.map +1 -0
  90. package/dist/ledger/ids.d.ts +4 -0
  91. package/dist/ledger/ids.js +9 -0
  92. package/dist/ledger/ids.js.map +1 -0
  93. package/dist/ledger/index.d.ts +11 -0
  94. package/dist/ledger/index.js +12 -0
  95. package/dist/ledger/index.js.map +1 -0
  96. package/dist/ledger/ledger.d.ts +46 -0
  97. package/dist/ledger/ledger.js +105 -0
  98. package/dist/ledger/ledger.js.map +1 -0
  99. package/dist/ledger/memory.d.ts +19 -0
  100. package/dist/ledger/memory.js +19 -0
  101. package/dist/ledger/memory.js.map +1 -0
  102. package/dist/ledger/records.d.ts +1424 -0
  103. package/dist/ledger/records.js +292 -0
  104. package/dist/ledger/records.js.map +1 -0
  105. package/dist/sources/arxiv.d.ts +105 -0
  106. package/dist/sources/arxiv.js +321 -0
  107. package/dist/sources/arxiv.js.map +1 -0
  108. package/dist/sources/exa.d.ts +19 -0
  109. package/dist/sources/exa.js +59 -0
  110. package/dist/sources/exa.js.map +1 -0
  111. package/dist/sources/fetcher.d.ts +35 -0
  112. package/dist/sources/fetcher.js +67 -0
  113. package/dist/sources/fetcher.js.map +1 -0
  114. package/dist/sources/google.d.ts +16 -0
  115. package/dist/sources/google.js +64 -0
  116. package/dist/sources/google.js.map +1 -0
  117. package/dist/sources/index.d.ts +17 -0
  118. package/dist/sources/index.js +18 -0
  119. package/dist/sources/index.js.map +1 -0
  120. package/dist/sources/junk.d.ts +10 -0
  121. package/dist/sources/junk.js +16 -0
  122. package/dist/sources/junk.js.map +1 -0
  123. package/dist/sources/ladder.d.ts +47 -0
  124. package/dist/sources/ladder.js +158 -0
  125. package/dist/sources/ladder.js.map +1 -0
  126. package/dist/sources/ledger.d.ts +7 -0
  127. package/dist/sources/ledger.js +35 -0
  128. package/dist/sources/ledger.js.map +1 -0
  129. package/dist/sources/paste.d.ts +8 -0
  130. package/dist/sources/paste.js +22 -0
  131. package/dist/sources/paste.js.map +1 -0
  132. package/dist/sources/searxng.d.ts +11 -0
  133. package/dist/sources/searxng.js +38 -0
  134. package/dist/sources/searxng.js.map +1 -0
  135. package/dist/sources/sites.d.ts +53 -0
  136. package/dist/sources/sites.js +285 -0
  137. package/dist/sources/sites.js.map +1 -0
  138. package/dist/sources/ytdlp.d.ts +43 -0
  139. package/dist/sources/ytdlp.js +117 -0
  140. package/dist/sources/ytdlp.js.map +1 -0
  141. package/package.json +61 -3
@@ -0,0 +1,1424 @@
1
+ import { z } from "../engine/types.js";
2
+ /** Who wrote a record: a model, a person, or a tool (a source adapter, the engine). */
3
+ export declare const From: z.ZodEnum<{
4
+ ai: "ai";
5
+ human: "human";
6
+ tool: "tool";
7
+ }>;
8
+ export type From = z.infer<typeof From>;
9
+ /** The steps, in order. An edge's `to` names one of the first five. */
10
+ export declare const Step: z.ZodEnum<{
11
+ check: "check";
12
+ plan: "plan";
13
+ fetch: "fetch";
14
+ triage: "triage";
15
+ read: "read";
16
+ extract: "extract";
17
+ review: "review";
18
+ }>;
19
+ export type Step = z.infer<typeof Step>;
20
+ export declare const STEPS: ("check" | "plan" | "fetch" | "triage" | "read" | "extract" | "review")[];
21
+ export declare const RECORD_TYPES: readonly ["query", "hit", "document", "finding", "verdict", "call", "spend", "snapshot", "edge", "done", "steer", "gap", "check", "pattern", "found", "draft", "class", "dead", "judge", "person"];
22
+ export declare const RecordType: z.ZodEnum<{
23
+ check: "check";
24
+ gap: "gap";
25
+ pattern: "pattern";
26
+ steer: "steer";
27
+ verdict: "verdict";
28
+ person: "person";
29
+ query: "query";
30
+ hit: "hit";
31
+ document: "document";
32
+ finding: "finding";
33
+ call: "call";
34
+ spend: "spend";
35
+ snapshot: "snapshot";
36
+ edge: "edge";
37
+ done: "done";
38
+ found: "found";
39
+ draft: "draft";
40
+ class: "class";
41
+ dead: "dead";
42
+ judge: "judge";
43
+ }>;
44
+ export type RecordType = z.infer<typeof RecordType>;
45
+ /** What every record carries. `step` is absent on a record written outside a run's steps (a call by hand). */
46
+ export declare const Envelope: z.ZodObject<{
47
+ id: z.ZodString;
48
+ run: z.ZodString;
49
+ round: z.ZodNumber;
50
+ step: z.ZodOptional<z.ZodEnum<{
51
+ check: "check";
52
+ plan: "plan";
53
+ fetch: "fetch";
54
+ triage: "triage";
55
+ read: "read";
56
+ extract: "extract";
57
+ review: "review";
58
+ }>>;
59
+ at: z.ZodString;
60
+ from: z.ZodEnum<{
61
+ ai: "ai";
62
+ human: "human";
63
+ tool: "tool";
64
+ }>;
65
+ by: z.ZodString;
66
+ }, z.core.$strip>;
67
+ export type Envelope = z.infer<typeof Envelope>;
68
+ /** What a follow lists from a page: its channel's or author's own posts, or pages like it. */
69
+ export declare const FOLLOW_AS: readonly ["posts", "similar", "refs", "citers"];
70
+ export declare const FollowAs: z.ZodEnum<{
71
+ posts: "posts";
72
+ similar: "similar";
73
+ refs: "refs";
74
+ citers: "citers";
75
+ }>;
76
+ export type FollowAs = z.infer<typeof FollowAs>;
77
+ /** One thing to look for, as the plan step made it; or a follow: a page's own posts, or pages like it. */
78
+ export declare const QueryRecord: z.ZodObject<{
79
+ id: z.ZodString;
80
+ run: z.ZodString;
81
+ round: z.ZodNumber;
82
+ step: z.ZodOptional<z.ZodEnum<{
83
+ check: "check";
84
+ plan: "plan";
85
+ fetch: "fetch";
86
+ triage: "triage";
87
+ read: "read";
88
+ extract: "extract";
89
+ review: "review";
90
+ }>>;
91
+ at: z.ZodString;
92
+ from: z.ZodEnum<{
93
+ ai: "ai";
94
+ human: "human";
95
+ tool: "tool";
96
+ }>;
97
+ by: z.ZodString;
98
+ type: z.ZodLiteral<"query">;
99
+ kind: z.ZodEnum<{
100
+ video: "video";
101
+ channel: "channel";
102
+ web: "web";
103
+ person: "person";
104
+ site: "site";
105
+ }>;
106
+ why: z.ZodString;
107
+ site: z.ZodOptional<z.ZodString>;
108
+ terms: z.ZodString;
109
+ facet: z.ZodOptional<z.ZodString>;
110
+ tier: z.ZodOptional<z.ZodNumber>;
111
+ needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
112
+ follow: z.ZodOptional<z.ZodObject<{
113
+ url: z.ZodString;
114
+ as: z.ZodEnum<{
115
+ posts: "posts";
116
+ similar: "similar";
117
+ refs: "refs";
118
+ citers: "citers";
119
+ }>;
120
+ document: z.ZodOptional<z.ZodString>;
121
+ }, z.core.$strip>>;
122
+ }, z.core.$strip>;
123
+ export type QueryRecord = z.infer<typeof QueryRecord>;
124
+ /** What a source returned for a query, before any read. One per canonical URL per fetch step. */
125
+ export declare const HitRecord: z.ZodObject<{
126
+ id: z.ZodString;
127
+ run: z.ZodString;
128
+ round: z.ZodNumber;
129
+ step: z.ZodOptional<z.ZodEnum<{
130
+ check: "check";
131
+ plan: "plan";
132
+ fetch: "fetch";
133
+ triage: "triage";
134
+ read: "read";
135
+ extract: "extract";
136
+ review: "review";
137
+ }>>;
138
+ at: z.ZodString;
139
+ from: z.ZodEnum<{
140
+ ai: "ai";
141
+ human: "human";
142
+ tool: "tool";
143
+ }>;
144
+ by: z.ZodString;
145
+ type: z.ZodLiteral<"hit">;
146
+ url: z.ZodString;
147
+ title: z.ZodOptional<z.ZodString>;
148
+ channel: z.ZodOptional<z.ZodString>;
149
+ length: z.ZodOptional<z.ZodNumber>;
150
+ date: z.ZodOptional<z.ZodString>;
151
+ snippet: z.ZodOptional<z.ZodString>;
152
+ sources: z.ZodDefault<z.ZodArray<z.ZodString>>;
153
+ odds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
154
+ key: z.ZodString;
155
+ queries: z.ZodArray<z.ZodString>;
156
+ }, z.core.$strip>;
157
+ export type HitRecord = z.infer<typeof HitRecord>;
158
+ /** A hit read whole. */
159
+ export declare const DocumentRecord: z.ZodObject<{
160
+ id: z.ZodString;
161
+ run: z.ZodString;
162
+ round: z.ZodNumber;
163
+ step: z.ZodOptional<z.ZodEnum<{
164
+ check: "check";
165
+ plan: "plan";
166
+ fetch: "fetch";
167
+ triage: "triage";
168
+ read: "read";
169
+ extract: "extract";
170
+ review: "review";
171
+ }>>;
172
+ at: z.ZodString;
173
+ from: z.ZodEnum<{
174
+ ai: "ai";
175
+ human: "human";
176
+ tool: "tool";
177
+ }>;
178
+ by: z.ZodString;
179
+ type: z.ZodLiteral<"document">;
180
+ url: z.ZodString;
181
+ media: z.ZodEnum<{
182
+ html: "html";
183
+ pdf: "pdf";
184
+ text: "text";
185
+ video: "video";
186
+ audio: "audio";
187
+ }>;
188
+ title: z.ZodOptional<z.ZodString>;
189
+ text: z.ZodString;
190
+ channel: z.ZodOptional<z.ZodString>;
191
+ date: z.ZodOptional<z.ZodString>;
192
+ length: z.ZodOptional<z.ZodNumber>;
193
+ hit: z.ZodString;
194
+ }, z.core.$strip>;
195
+ export type DocumentRecord = z.infer<typeof DocumentRecord>;
196
+ /** One fact drawn from a document, with its proof, and the document's date when it has one. */
197
+ export declare const FindingRecord: z.ZodObject<{
198
+ id: z.ZodString;
199
+ run: z.ZodString;
200
+ round: z.ZodNumber;
201
+ step: z.ZodOptional<z.ZodEnum<{
202
+ check: "check";
203
+ plan: "plan";
204
+ fetch: "fetch";
205
+ triage: "triage";
206
+ read: "read";
207
+ extract: "extract";
208
+ review: "review";
209
+ }>>;
210
+ at: z.ZodString;
211
+ from: z.ZodEnum<{
212
+ ai: "ai";
213
+ human: "human";
214
+ tool: "tool";
215
+ }>;
216
+ by: z.ZodString;
217
+ type: z.ZodLiteral<"finding">;
218
+ kind: z.ZodString;
219
+ text: z.ZodString;
220
+ proof: z.ZodObject<{
221
+ url: z.ZodString;
222
+ quote: z.ZodOptional<z.ZodString>;
223
+ timestamp: z.ZodOptional<z.ZodNumber>;
224
+ frame: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strip>;
226
+ document: z.ZodString;
227
+ date: z.ZodOptional<z.ZodString>;
228
+ fixes: z.ZodOptional<z.ZodString>;
229
+ }, z.core.$strip>;
230
+ export type FindingRecord = z.infer<typeof FindingRecord>;
231
+ /**
232
+ * The extractor's word on a document once its findings are through the gate: how much of the
233
+ * ask it held, and what the ask still lacks. One per document per extract; the extract step's
234
+ * checkpoint, and the review's view of what the reads were worth.
235
+ */
236
+ export declare const VerdictRecord: z.ZodObject<{
237
+ id: z.ZodString;
238
+ run: z.ZodString;
239
+ round: z.ZodNumber;
240
+ step: z.ZodOptional<z.ZodEnum<{
241
+ check: "check";
242
+ plan: "plan";
243
+ fetch: "fetch";
244
+ triage: "triage";
245
+ read: "read";
246
+ extract: "extract";
247
+ review: "review";
248
+ }>>;
249
+ at: z.ZodString;
250
+ from: z.ZodEnum<{
251
+ ai: "ai";
252
+ human: "human";
253
+ tool: "tool";
254
+ }>;
255
+ by: z.ZodString;
256
+ type: z.ZodLiteral<"verdict">;
257
+ quality: z.ZodEnum<{
258
+ rich: "rich";
259
+ thin: "thin";
260
+ off: "off";
261
+ empty: "empty";
262
+ }>;
263
+ gap: z.ZodOptional<z.ZodString>;
264
+ document: z.ZodString;
265
+ }, z.core.$strip>;
266
+ export type VerdictRecord = z.infer<typeof VerdictRecord>;
267
+ /**
268
+ * The call: keep or drop, on a hit (read or skip) or a finding, with why. The latest call on a
269
+ * record is its state. A person's call and a model's are the same row with a different `from`.
270
+ */
271
+ export declare const CallRecord: z.ZodObject<{
272
+ id: z.ZodString;
273
+ run: z.ZodString;
274
+ round: z.ZodNumber;
275
+ step: z.ZodOptional<z.ZodEnum<{
276
+ check: "check";
277
+ plan: "plan";
278
+ fetch: "fetch";
279
+ triage: "triage";
280
+ read: "read";
281
+ extract: "extract";
282
+ review: "review";
283
+ }>>;
284
+ at: z.ZodString;
285
+ from: z.ZodEnum<{
286
+ ai: "ai";
287
+ human: "human";
288
+ tool: "tool";
289
+ }>;
290
+ by: z.ZodString;
291
+ type: z.ZodLiteral<"call">;
292
+ on: z.ZodString;
293
+ verdict: z.ZodEnum<{
294
+ keep: "keep";
295
+ drop: "drop";
296
+ }>;
297
+ why: z.ZodString;
298
+ }, z.core.$strip>;
299
+ export type CallRecord = z.infer<typeof CallRecord>;
300
+ export declare const CostKind: z.ZodEnum<{
301
+ free: "free";
302
+ metered: "metered";
303
+ browser: "browser";
304
+ }>;
305
+ export type CostKind = z.infer<typeof CostKind>;
306
+ /** One use of a source or a model: what it was asked, whether it answered, what it cost. */
307
+ export declare const SpendRecord: z.ZodObject<{
308
+ id: z.ZodString;
309
+ run: z.ZodString;
310
+ round: z.ZodNumber;
311
+ step: z.ZodOptional<z.ZodEnum<{
312
+ check: "check";
313
+ plan: "plan";
314
+ fetch: "fetch";
315
+ triage: "triage";
316
+ read: "read";
317
+ extract: "extract";
318
+ review: "review";
319
+ }>>;
320
+ at: z.ZodString;
321
+ from: z.ZodEnum<{
322
+ ai: "ai";
323
+ human: "human";
324
+ tool: "tool";
325
+ }>;
326
+ by: z.ZodString;
327
+ type: z.ZodLiteral<"spend">;
328
+ source: z.ZodString;
329
+ op: z.ZodEnum<{
330
+ ask: "ask";
331
+ search: "search";
332
+ open: "open";
333
+ }>;
334
+ about: z.ZodString;
335
+ on: z.ZodOptional<z.ZodString>;
336
+ ok: z.ZodBoolean;
337
+ error: z.ZodOptional<z.ZodString>;
338
+ retryAfter: z.ZodOptional<z.ZodString>;
339
+ cost: z.ZodEnum<{
340
+ free: "free";
341
+ metered: "metered";
342
+ browser: "browser";
343
+ }>;
344
+ ms: z.ZodNumber;
345
+ usd: z.ZodOptional<z.ZodNumber>;
346
+ tokens: z.ZodOptional<z.ZodObject<{
347
+ input: z.ZodOptional<z.ZodNumber>;
348
+ output: z.ZodOptional<z.ZodNumber>;
349
+ }, z.core.$strip>>;
350
+ }, z.core.$strip>;
351
+ export type SpendRecord = z.infer<typeof SpendRecord>;
352
+ /** What the plan step was given for one round: the ask, the allow-list, the budget, the snapshot. */
353
+ export declare const SnapshotRecord: z.ZodObject<{
354
+ id: z.ZodString;
355
+ run: z.ZodString;
356
+ round: z.ZodNumber;
357
+ step: z.ZodOptional<z.ZodEnum<{
358
+ check: "check";
359
+ plan: "plan";
360
+ fetch: "fetch";
361
+ triage: "triage";
362
+ read: "read";
363
+ extract: "extract";
364
+ review: "review";
365
+ }>>;
366
+ at: z.ZodString;
367
+ from: z.ZodEnum<{
368
+ ai: "ai";
369
+ human: "human";
370
+ tool: "tool";
371
+ }>;
372
+ by: z.ZodString;
373
+ type: z.ZodLiteral<"snapshot">;
374
+ known: z.ZodArray<z.ZodString>;
375
+ planFile: z.ZodObject<{
376
+ id: z.ZodString;
377
+ version: z.ZodNumber;
378
+ }, z.core.$strip>;
379
+ model: z.ZodNullable<z.ZodString>;
380
+ yieldRows: z.ZodNumber;
381
+ ask: z.ZodObject<{
382
+ text: z.ZodString;
383
+ kind: z.ZodEnum<{
384
+ video: "video";
385
+ channel: "channel";
386
+ web: "web";
387
+ person: "person";
388
+ site: "site";
389
+ }>;
390
+ known: z.ZodDefault<z.ZodArray<z.ZodString>>;
391
+ premises: z.ZodDefault<z.ZodArray<z.ZodString>>;
392
+ steer: z.ZodDefault<z.ZodArray<z.ZodString>>;
393
+ open: z.ZodDefault<z.ZodArray<z.ZodString>>;
394
+ criteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
395
+ name: z.ZodString;
396
+ question: z.ZodString;
397
+ }, z.core.$strip>>>;
398
+ site: z.ZodOptional<z.ZodString>;
399
+ }, z.core.$strip>;
400
+ sources: z.ZodArray<z.ZodString>;
401
+ opens: z.ZodDefault<z.ZodArray<z.ZodString>>;
402
+ budget: z.ZodObject<{
403
+ queries: z.ZodNumber;
404
+ reads: z.ZodNumber;
405
+ rounds: z.ZodNumber;
406
+ checks: z.ZodDefault<z.ZodNumber>;
407
+ }, z.core.$strip>;
408
+ parent: z.ZodOptional<z.ZodObject<{
409
+ run: z.ZodString;
410
+ round: z.ZodNumber;
411
+ why: z.ZodString;
412
+ }, z.core.$strip>>;
413
+ treeReads: z.ZodOptional<z.ZodNumber>;
414
+ }, z.core.$strip>;
415
+ export type SnapshotRecord = z.infer<typeof SnapshotRecord>;
416
+ /** The edge taken after a round. */
417
+ export declare const EdgeRecord: z.ZodObject<{
418
+ id: z.ZodString;
419
+ run: z.ZodString;
420
+ round: z.ZodNumber;
421
+ step: z.ZodOptional<z.ZodEnum<{
422
+ check: "check";
423
+ plan: "plan";
424
+ fetch: "fetch";
425
+ triage: "triage";
426
+ read: "read";
427
+ extract: "extract";
428
+ review: "review";
429
+ }>>;
430
+ at: z.ZodString;
431
+ from: z.ZodEnum<{
432
+ ai: "ai";
433
+ human: "human";
434
+ tool: "tool";
435
+ }>;
436
+ by: z.ZodString;
437
+ type: z.ZodLiteral<"edge">;
438
+ why: z.ZodString;
439
+ next: z.ZodEnum<{
440
+ stop: "stop";
441
+ again: "again";
442
+ back: "back";
443
+ }>;
444
+ to: z.ZodOptional<z.ZodEnum<{
445
+ plan: "plan";
446
+ fetch: "fetch";
447
+ triage: "triage";
448
+ read: "read";
449
+ extract: "extract";
450
+ }>>;
451
+ }, z.core.$strip>;
452
+ export type EdgeRecord = z.infer<typeof EdgeRecord>;
453
+ /** A step finished (`ok`) or gave up (`ok: false`, `note` says why). Resume reads these. */
454
+ export declare const DoneRecord: z.ZodObject<{
455
+ id: z.ZodString;
456
+ run: z.ZodString;
457
+ round: z.ZodNumber;
458
+ at: z.ZodString;
459
+ from: z.ZodEnum<{
460
+ ai: "ai";
461
+ human: "human";
462
+ tool: "tool";
463
+ }>;
464
+ by: z.ZodString;
465
+ type: z.ZodLiteral<"done">;
466
+ step: z.ZodEnum<{
467
+ check: "check";
468
+ plan: "plan";
469
+ fetch: "fetch";
470
+ triage: "triage";
471
+ read: "read";
472
+ extract: "extract";
473
+ review: "review";
474
+ }>;
475
+ ok: z.ZodBoolean;
476
+ note: z.ZodOptional<z.ZodString>;
477
+ }, z.core.$strip>;
478
+ export type DoneRecord = z.infer<typeof DoneRecord>;
479
+ /**
480
+ * What the person says to the run: free text, written between rounds (`birdwatch steer`), rendered
481
+ * first in every prompt of the rounds after it. Always `from: human`; `step` absent.
482
+ */
483
+ export declare const SteerRecord: z.ZodObject<{
484
+ id: z.ZodString;
485
+ run: z.ZodString;
486
+ round: z.ZodNumber;
487
+ step: z.ZodOptional<z.ZodEnum<{
488
+ check: "check";
489
+ plan: "plan";
490
+ fetch: "fetch";
491
+ triage: "triage";
492
+ read: "read";
493
+ extract: "extract";
494
+ review: "review";
495
+ }>>;
496
+ at: z.ZodString;
497
+ from: z.ZodEnum<{
498
+ ai: "ai";
499
+ human: "human";
500
+ tool: "tool";
501
+ }>;
502
+ by: z.ZodString;
503
+ type: z.ZodLiteral<"steer">;
504
+ text: z.ZodString;
505
+ }, z.core.$strip>;
506
+ export type SteerRecord = z.infer<typeof SteerRecord>;
507
+ /**
508
+ * What a step or a person says the round lacks, in English: a query with no new hits, a hit no
509
+ * source could open, a person's word. The round's review reads every gap, and the next round's
510
+ * plan reads them as what was left open. `step` is the step that wrote it; a person's has none.
511
+ */
512
+ export declare const GapRecord: z.ZodObject<{
513
+ id: z.ZodString;
514
+ run: z.ZodString;
515
+ round: z.ZodNumber;
516
+ step: z.ZodOptional<z.ZodEnum<{
517
+ check: "check";
518
+ plan: "plan";
519
+ fetch: "fetch";
520
+ triage: "triage";
521
+ read: "read";
522
+ extract: "extract";
523
+ review: "review";
524
+ }>>;
525
+ at: z.ZodString;
526
+ from: z.ZodEnum<{
527
+ ai: "ai";
528
+ human: "human";
529
+ tool: "tool";
530
+ }>;
531
+ by: z.ZodString;
532
+ type: z.ZodLiteral<"gap">;
533
+ note: z.ZodString;
534
+ on: z.ZodOptional<z.ZodString>;
535
+ }, z.core.$strip>;
536
+ export type GapRecord = z.infer<typeof GapRecord>;
537
+ /**
538
+ * The sample check's word on one kept finding: does its quote back it? A finding that fails
539
+ * also gets a drop call, so it leaves what the run has found; a person's keep puts it back.
540
+ */
541
+ export declare const CheckRecord: z.ZodObject<{
542
+ id: z.ZodString;
543
+ run: z.ZodString;
544
+ round: z.ZodNumber;
545
+ step: z.ZodOptional<z.ZodEnum<{
546
+ check: "check";
547
+ plan: "plan";
548
+ fetch: "fetch";
549
+ triage: "triage";
550
+ read: "read";
551
+ extract: "extract";
552
+ review: "review";
553
+ }>>;
554
+ at: z.ZodString;
555
+ from: z.ZodEnum<{
556
+ ai: "ai";
557
+ human: "human";
558
+ tool: "tool";
559
+ }>;
560
+ by: z.ZodString;
561
+ type: z.ZodLiteral<"check">;
562
+ on: z.ZodString;
563
+ ok: z.ZodBoolean;
564
+ why: z.ZodString;
565
+ }, z.core.$strip>;
566
+ export type CheckRecord = z.infer<typeof CheckRecord>;
567
+ /**
568
+ * What several findings say together, by the agent (or the person): `./document`'s `Pattern`, its
569
+ * source count computed by code when it is written. The report leads with patterns; a finding
570
+ * no pattern rests on is a fact on its own. `step` absent: written between steps.
571
+ */
572
+ export declare const PatternRecord: z.ZodObject<{
573
+ id: z.ZodString;
574
+ run: z.ZodString;
575
+ round: z.ZodNumber;
576
+ step: z.ZodOptional<z.ZodEnum<{
577
+ check: "check";
578
+ plan: "plan";
579
+ fetch: "fetch";
580
+ triage: "triage";
581
+ read: "read";
582
+ extract: "extract";
583
+ review: "review";
584
+ }>>;
585
+ at: z.ZodString;
586
+ from: z.ZodEnum<{
587
+ ai: "ai";
588
+ human: "human";
589
+ tool: "tool";
590
+ }>;
591
+ by: z.ZodString;
592
+ type: z.ZodLiteral<"pattern">;
593
+ text: z.ZodString;
594
+ findings: z.ZodArray<z.ZodString>;
595
+ sources: z.ZodNumber;
596
+ }, z.core.$strip>;
597
+ export type PatternRecord = z.infer<typeof PatternRecord>;
598
+ /**
599
+ * A hit the run already had came back for another query: the hit's record stays one, this says
600
+ * which other query found it. The brief ranks a hit by how many facets found it.
601
+ */
602
+ export declare const FoundRecord: z.ZodObject<{
603
+ id: z.ZodString;
604
+ run: z.ZodString;
605
+ round: z.ZodNumber;
606
+ step: z.ZodOptional<z.ZodEnum<{
607
+ check: "check";
608
+ plan: "plan";
609
+ fetch: "fetch";
610
+ triage: "triage";
611
+ read: "read";
612
+ extract: "extract";
613
+ review: "review";
614
+ }>>;
615
+ at: z.ZodString;
616
+ from: z.ZodEnum<{
617
+ ai: "ai";
618
+ human: "human";
619
+ tool: "tool";
620
+ }>;
621
+ by: z.ZodString;
622
+ type: z.ZodLiteral<"found">;
623
+ hit: z.ZodString;
624
+ query: z.ZodString;
625
+ }, z.core.$strip>;
626
+ export type FoundRecord = z.infer<typeof FoundRecord>;
627
+ /**
628
+ * A rough synthesis over the run's kept findings and patterns: options, a pick, the gap that
629
+ * would change it. Each item cites finding or pattern ids, and each number in it is in a cited
630
+ * finding (the study's draft gate). A draft, never the final: a person or an agent polishes it
631
+ * outside the ledger.
632
+ */
633
+ export declare const DraftRecord: z.ZodObject<{
634
+ id: z.ZodString;
635
+ run: z.ZodString;
636
+ round: z.ZodNumber;
637
+ step: z.ZodOptional<z.ZodEnum<{
638
+ check: "check";
639
+ plan: "plan";
640
+ fetch: "fetch";
641
+ triage: "triage";
642
+ read: "read";
643
+ extract: "extract";
644
+ review: "review";
645
+ }>>;
646
+ at: z.ZodString;
647
+ from: z.ZodEnum<{
648
+ ai: "ai";
649
+ human: "human";
650
+ tool: "tool";
651
+ }>;
652
+ by: z.ZodString;
653
+ type: z.ZodLiteral<"draft">;
654
+ for: z.ZodString;
655
+ items: z.ZodArray<z.ZodObject<{
656
+ title: z.ZodString;
657
+ body: z.ZodString;
658
+ cites: z.ZodArray<z.ZodString>;
659
+ }, z.core.$strip>>;
660
+ dropped: z.ZodDefault<z.ZodArray<z.ZodObject<{
661
+ title: z.ZodString;
662
+ why: z.ZodString;
663
+ }, z.core.$strip>>>;
664
+ }, z.core.$strip>;
665
+ export type DraftRecord = z.infer<typeof DraftRecord>;
666
+ /** What kind of source a page is. A closed set, so counts per class add up across agents. */
667
+ export declare const SOURCE_CLASSES: readonly ["primary_data", "survey", "practitioner", "vendor", "forum", "news", "other"];
668
+ export declare const SourceClass: z.ZodEnum<{
669
+ primary_data: "primary_data";
670
+ survey: "survey";
671
+ practitioner: "practitioner";
672
+ vendor: "vendor";
673
+ forum: "forum";
674
+ news: "news";
675
+ other: "other";
676
+ }>;
677
+ export type SourceClass = z.infer<typeof SourceClass>;
678
+ /**
679
+ * The agent's word on what kind of source a document is, with why. Its findings take the class;
680
+ * a class on a finding overrides it (a vendor page that quotes a survey). The latest per target
681
+ * wins. A model never writes one.
682
+ */
683
+ export declare const ClassRecord: z.ZodObject<{
684
+ id: z.ZodString;
685
+ run: z.ZodString;
686
+ round: z.ZodNumber;
687
+ step: z.ZodOptional<z.ZodEnum<{
688
+ check: "check";
689
+ plan: "plan";
690
+ fetch: "fetch";
691
+ triage: "triage";
692
+ read: "read";
693
+ extract: "extract";
694
+ review: "review";
695
+ }>>;
696
+ at: z.ZodString;
697
+ from: z.ZodEnum<{
698
+ ai: "ai";
699
+ human: "human";
700
+ tool: "tool";
701
+ }>;
702
+ by: z.ZodString;
703
+ type: z.ZodLiteral<"class">;
704
+ on: z.ZodString;
705
+ class: z.ZodEnum<{
706
+ primary_data: "primary_data";
707
+ survey: "survey";
708
+ practitioner: "practitioner";
709
+ vendor: "vendor";
710
+ forum: "forum";
711
+ news: "news";
712
+ other: "other";
713
+ }>;
714
+ why: z.ZodString;
715
+ }, z.core.$strip>;
716
+ export type ClassRecord = z.infer<typeof ClassRecord>;
717
+ /**
718
+ * A facet the agent gives up on, with why: thin after its tries. Later tiers and rounds of the
719
+ * run skip it, and a parent's next plan reads it as a dead end.
720
+ */
721
+ export declare const DeadRecord: z.ZodObject<{
722
+ id: z.ZodString;
723
+ run: z.ZodString;
724
+ round: z.ZodNumber;
725
+ step: z.ZodOptional<z.ZodEnum<{
726
+ check: "check";
727
+ plan: "plan";
728
+ fetch: "fetch";
729
+ triage: "triage";
730
+ read: "read";
731
+ extract: "extract";
732
+ review: "review";
733
+ }>>;
734
+ at: z.ZodString;
735
+ from: z.ZodEnum<{
736
+ ai: "ai";
737
+ human: "human";
738
+ tool: "tool";
739
+ }>;
740
+ by: z.ZodString;
741
+ type: z.ZodLiteral<"dead">;
742
+ facet: z.ZodString;
743
+ why: z.ZodString;
744
+ }, z.core.$strip>;
745
+ export type DeadRecord = z.infer<typeof DeadRecord>;
746
+ /**
747
+ * A judge's answers on one hit, document or finding: each question's label probabilities (a
748
+ * yes or no as `yes` and `no`). A hint and a router, never a call: the agent or a model decides.
749
+ * `by` is the judge's model id; its spend carries the cost.
750
+ */
751
+ export declare const JudgeRecord: z.ZodObject<{
752
+ id: z.ZodString;
753
+ run: z.ZodString;
754
+ round: z.ZodNumber;
755
+ step: z.ZodOptional<z.ZodEnum<{
756
+ check: "check";
757
+ plan: "plan";
758
+ fetch: "fetch";
759
+ triage: "triage";
760
+ read: "read";
761
+ extract: "extract";
762
+ review: "review";
763
+ }>>;
764
+ at: z.ZodString;
765
+ from: z.ZodEnum<{
766
+ ai: "ai";
767
+ human: "human";
768
+ tool: "tool";
769
+ }>;
770
+ by: z.ZodString;
771
+ type: z.ZodLiteral<"judge">;
772
+ on: z.ZodString;
773
+ answers: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
774
+ }, z.core.$strip>;
775
+ export type JudgeRecord = z.infer<typeof JudgeRecord>;
776
+ /**
777
+ * One person across platforms, by the agent, with why: the profile URLs (a channel, a Substack,
778
+ * an X account, a blog) and the names they post under. Signals cluster in people: the brief
779
+ * counts kept findings per person. The latest per name wins.
780
+ */
781
+ export declare const PersonRecord: z.ZodObject<{
782
+ id: z.ZodString;
783
+ run: z.ZodString;
784
+ round: z.ZodNumber;
785
+ step: z.ZodOptional<z.ZodEnum<{
786
+ check: "check";
787
+ plan: "plan";
788
+ fetch: "fetch";
789
+ triage: "triage";
790
+ read: "read";
791
+ extract: "extract";
792
+ review: "review";
793
+ }>>;
794
+ at: z.ZodString;
795
+ from: z.ZodEnum<{
796
+ ai: "ai";
797
+ human: "human";
798
+ tool: "tool";
799
+ }>;
800
+ by: z.ZodString;
801
+ type: z.ZodLiteral<"person">;
802
+ name: z.ZodString;
803
+ profiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
804
+ aka: z.ZodDefault<z.ZodArray<z.ZodString>>;
805
+ why: z.ZodString;
806
+ }, z.core.$strip>;
807
+ export type PersonRecord = z.infer<typeof PersonRecord>;
808
+ export declare const LedgerRecord: z.ZodDiscriminatedUnion<[z.ZodObject<{
809
+ id: z.ZodString;
810
+ run: z.ZodString;
811
+ round: z.ZodNumber;
812
+ step: z.ZodOptional<z.ZodEnum<{
813
+ check: "check";
814
+ plan: "plan";
815
+ fetch: "fetch";
816
+ triage: "triage";
817
+ read: "read";
818
+ extract: "extract";
819
+ review: "review";
820
+ }>>;
821
+ at: z.ZodString;
822
+ from: z.ZodEnum<{
823
+ ai: "ai";
824
+ human: "human";
825
+ tool: "tool";
826
+ }>;
827
+ by: z.ZodString;
828
+ type: z.ZodLiteral<"query">;
829
+ kind: z.ZodEnum<{
830
+ video: "video";
831
+ channel: "channel";
832
+ web: "web";
833
+ person: "person";
834
+ site: "site";
835
+ }>;
836
+ why: z.ZodString;
837
+ site: z.ZodOptional<z.ZodString>;
838
+ terms: z.ZodString;
839
+ facet: z.ZodOptional<z.ZodString>;
840
+ tier: z.ZodOptional<z.ZodNumber>;
841
+ needs: z.ZodOptional<z.ZodArray<z.ZodString>>;
842
+ follow: z.ZodOptional<z.ZodObject<{
843
+ url: z.ZodString;
844
+ as: z.ZodEnum<{
845
+ posts: "posts";
846
+ similar: "similar";
847
+ refs: "refs";
848
+ citers: "citers";
849
+ }>;
850
+ document: z.ZodOptional<z.ZodString>;
851
+ }, z.core.$strip>>;
852
+ }, z.core.$strip>, z.ZodObject<{
853
+ id: z.ZodString;
854
+ run: z.ZodString;
855
+ round: z.ZodNumber;
856
+ step: z.ZodOptional<z.ZodEnum<{
857
+ check: "check";
858
+ plan: "plan";
859
+ fetch: "fetch";
860
+ triage: "triage";
861
+ read: "read";
862
+ extract: "extract";
863
+ review: "review";
864
+ }>>;
865
+ at: z.ZodString;
866
+ from: z.ZodEnum<{
867
+ ai: "ai";
868
+ human: "human";
869
+ tool: "tool";
870
+ }>;
871
+ by: z.ZodString;
872
+ type: z.ZodLiteral<"hit">;
873
+ url: z.ZodString;
874
+ title: z.ZodOptional<z.ZodString>;
875
+ channel: z.ZodOptional<z.ZodString>;
876
+ length: z.ZodOptional<z.ZodNumber>;
877
+ date: z.ZodOptional<z.ZodString>;
878
+ snippet: z.ZodOptional<z.ZodString>;
879
+ sources: z.ZodDefault<z.ZodArray<z.ZodString>>;
880
+ odds: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
881
+ key: z.ZodString;
882
+ queries: z.ZodArray<z.ZodString>;
883
+ }, z.core.$strip>, z.ZodObject<{
884
+ id: z.ZodString;
885
+ run: z.ZodString;
886
+ round: z.ZodNumber;
887
+ step: z.ZodOptional<z.ZodEnum<{
888
+ check: "check";
889
+ plan: "plan";
890
+ fetch: "fetch";
891
+ triage: "triage";
892
+ read: "read";
893
+ extract: "extract";
894
+ review: "review";
895
+ }>>;
896
+ at: z.ZodString;
897
+ from: z.ZodEnum<{
898
+ ai: "ai";
899
+ human: "human";
900
+ tool: "tool";
901
+ }>;
902
+ by: z.ZodString;
903
+ type: z.ZodLiteral<"document">;
904
+ url: z.ZodString;
905
+ media: z.ZodEnum<{
906
+ html: "html";
907
+ pdf: "pdf";
908
+ text: "text";
909
+ video: "video";
910
+ audio: "audio";
911
+ }>;
912
+ title: z.ZodOptional<z.ZodString>;
913
+ text: z.ZodString;
914
+ channel: z.ZodOptional<z.ZodString>;
915
+ date: z.ZodOptional<z.ZodString>;
916
+ length: z.ZodOptional<z.ZodNumber>;
917
+ hit: z.ZodString;
918
+ }, z.core.$strip>, z.ZodObject<{
919
+ id: z.ZodString;
920
+ run: z.ZodString;
921
+ round: z.ZodNumber;
922
+ step: z.ZodOptional<z.ZodEnum<{
923
+ check: "check";
924
+ plan: "plan";
925
+ fetch: "fetch";
926
+ triage: "triage";
927
+ read: "read";
928
+ extract: "extract";
929
+ review: "review";
930
+ }>>;
931
+ at: z.ZodString;
932
+ from: z.ZodEnum<{
933
+ ai: "ai";
934
+ human: "human";
935
+ tool: "tool";
936
+ }>;
937
+ by: z.ZodString;
938
+ type: z.ZodLiteral<"finding">;
939
+ kind: z.ZodString;
940
+ text: z.ZodString;
941
+ proof: z.ZodObject<{
942
+ url: z.ZodString;
943
+ quote: z.ZodOptional<z.ZodString>;
944
+ timestamp: z.ZodOptional<z.ZodNumber>;
945
+ frame: z.ZodOptional<z.ZodString>;
946
+ }, z.core.$strip>;
947
+ document: z.ZodString;
948
+ date: z.ZodOptional<z.ZodString>;
949
+ fixes: z.ZodOptional<z.ZodString>;
950
+ }, z.core.$strip>, z.ZodObject<{
951
+ id: z.ZodString;
952
+ run: z.ZodString;
953
+ round: z.ZodNumber;
954
+ step: z.ZodOptional<z.ZodEnum<{
955
+ check: "check";
956
+ plan: "plan";
957
+ fetch: "fetch";
958
+ triage: "triage";
959
+ read: "read";
960
+ extract: "extract";
961
+ review: "review";
962
+ }>>;
963
+ at: z.ZodString;
964
+ from: z.ZodEnum<{
965
+ ai: "ai";
966
+ human: "human";
967
+ tool: "tool";
968
+ }>;
969
+ by: z.ZodString;
970
+ type: z.ZodLiteral<"verdict">;
971
+ quality: z.ZodEnum<{
972
+ rich: "rich";
973
+ thin: "thin";
974
+ off: "off";
975
+ empty: "empty";
976
+ }>;
977
+ gap: z.ZodOptional<z.ZodString>;
978
+ document: z.ZodString;
979
+ }, z.core.$strip>, z.ZodObject<{
980
+ id: z.ZodString;
981
+ run: z.ZodString;
982
+ round: z.ZodNumber;
983
+ step: z.ZodOptional<z.ZodEnum<{
984
+ check: "check";
985
+ plan: "plan";
986
+ fetch: "fetch";
987
+ triage: "triage";
988
+ read: "read";
989
+ extract: "extract";
990
+ review: "review";
991
+ }>>;
992
+ at: z.ZodString;
993
+ from: z.ZodEnum<{
994
+ ai: "ai";
995
+ human: "human";
996
+ tool: "tool";
997
+ }>;
998
+ by: z.ZodString;
999
+ type: z.ZodLiteral<"call">;
1000
+ on: z.ZodString;
1001
+ verdict: z.ZodEnum<{
1002
+ keep: "keep";
1003
+ drop: "drop";
1004
+ }>;
1005
+ why: z.ZodString;
1006
+ }, z.core.$strip>, z.ZodObject<{
1007
+ id: z.ZodString;
1008
+ run: z.ZodString;
1009
+ round: z.ZodNumber;
1010
+ step: z.ZodOptional<z.ZodEnum<{
1011
+ check: "check";
1012
+ plan: "plan";
1013
+ fetch: "fetch";
1014
+ triage: "triage";
1015
+ read: "read";
1016
+ extract: "extract";
1017
+ review: "review";
1018
+ }>>;
1019
+ at: z.ZodString;
1020
+ from: z.ZodEnum<{
1021
+ ai: "ai";
1022
+ human: "human";
1023
+ tool: "tool";
1024
+ }>;
1025
+ by: z.ZodString;
1026
+ type: z.ZodLiteral<"spend">;
1027
+ source: z.ZodString;
1028
+ op: z.ZodEnum<{
1029
+ ask: "ask";
1030
+ search: "search";
1031
+ open: "open";
1032
+ }>;
1033
+ about: z.ZodString;
1034
+ on: z.ZodOptional<z.ZodString>;
1035
+ ok: z.ZodBoolean;
1036
+ error: z.ZodOptional<z.ZodString>;
1037
+ retryAfter: z.ZodOptional<z.ZodString>;
1038
+ cost: z.ZodEnum<{
1039
+ free: "free";
1040
+ metered: "metered";
1041
+ browser: "browser";
1042
+ }>;
1043
+ ms: z.ZodNumber;
1044
+ usd: z.ZodOptional<z.ZodNumber>;
1045
+ tokens: z.ZodOptional<z.ZodObject<{
1046
+ input: z.ZodOptional<z.ZodNumber>;
1047
+ output: z.ZodOptional<z.ZodNumber>;
1048
+ }, z.core.$strip>>;
1049
+ }, z.core.$strip>, z.ZodObject<{
1050
+ id: z.ZodString;
1051
+ run: z.ZodString;
1052
+ round: z.ZodNumber;
1053
+ step: z.ZodOptional<z.ZodEnum<{
1054
+ check: "check";
1055
+ plan: "plan";
1056
+ fetch: "fetch";
1057
+ triage: "triage";
1058
+ read: "read";
1059
+ extract: "extract";
1060
+ review: "review";
1061
+ }>>;
1062
+ at: z.ZodString;
1063
+ from: z.ZodEnum<{
1064
+ ai: "ai";
1065
+ human: "human";
1066
+ tool: "tool";
1067
+ }>;
1068
+ by: z.ZodString;
1069
+ type: z.ZodLiteral<"snapshot">;
1070
+ known: z.ZodArray<z.ZodString>;
1071
+ planFile: z.ZodObject<{
1072
+ id: z.ZodString;
1073
+ version: z.ZodNumber;
1074
+ }, z.core.$strip>;
1075
+ model: z.ZodNullable<z.ZodString>;
1076
+ yieldRows: z.ZodNumber;
1077
+ ask: z.ZodObject<{
1078
+ text: z.ZodString;
1079
+ kind: z.ZodEnum<{
1080
+ video: "video";
1081
+ channel: "channel";
1082
+ web: "web";
1083
+ person: "person";
1084
+ site: "site";
1085
+ }>;
1086
+ known: z.ZodDefault<z.ZodArray<z.ZodString>>;
1087
+ premises: z.ZodDefault<z.ZodArray<z.ZodString>>;
1088
+ steer: z.ZodDefault<z.ZodArray<z.ZodString>>;
1089
+ open: z.ZodDefault<z.ZodArray<z.ZodString>>;
1090
+ criteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
1091
+ name: z.ZodString;
1092
+ question: z.ZodString;
1093
+ }, z.core.$strip>>>;
1094
+ site: z.ZodOptional<z.ZodString>;
1095
+ }, z.core.$strip>;
1096
+ sources: z.ZodArray<z.ZodString>;
1097
+ opens: z.ZodDefault<z.ZodArray<z.ZodString>>;
1098
+ budget: z.ZodObject<{
1099
+ queries: z.ZodNumber;
1100
+ reads: z.ZodNumber;
1101
+ rounds: z.ZodNumber;
1102
+ checks: z.ZodDefault<z.ZodNumber>;
1103
+ }, z.core.$strip>;
1104
+ parent: z.ZodOptional<z.ZodObject<{
1105
+ run: z.ZodString;
1106
+ round: z.ZodNumber;
1107
+ why: z.ZodString;
1108
+ }, z.core.$strip>>;
1109
+ treeReads: z.ZodOptional<z.ZodNumber>;
1110
+ }, z.core.$strip>, z.ZodObject<{
1111
+ id: z.ZodString;
1112
+ run: z.ZodString;
1113
+ round: z.ZodNumber;
1114
+ step: z.ZodOptional<z.ZodEnum<{
1115
+ check: "check";
1116
+ plan: "plan";
1117
+ fetch: "fetch";
1118
+ triage: "triage";
1119
+ read: "read";
1120
+ extract: "extract";
1121
+ review: "review";
1122
+ }>>;
1123
+ at: z.ZodString;
1124
+ from: z.ZodEnum<{
1125
+ ai: "ai";
1126
+ human: "human";
1127
+ tool: "tool";
1128
+ }>;
1129
+ by: z.ZodString;
1130
+ type: z.ZodLiteral<"edge">;
1131
+ why: z.ZodString;
1132
+ next: z.ZodEnum<{
1133
+ stop: "stop";
1134
+ again: "again";
1135
+ back: "back";
1136
+ }>;
1137
+ to: z.ZodOptional<z.ZodEnum<{
1138
+ plan: "plan";
1139
+ fetch: "fetch";
1140
+ triage: "triage";
1141
+ read: "read";
1142
+ extract: "extract";
1143
+ }>>;
1144
+ }, z.core.$strip>, z.ZodObject<{
1145
+ id: z.ZodString;
1146
+ run: z.ZodString;
1147
+ round: z.ZodNumber;
1148
+ at: z.ZodString;
1149
+ from: z.ZodEnum<{
1150
+ ai: "ai";
1151
+ human: "human";
1152
+ tool: "tool";
1153
+ }>;
1154
+ by: z.ZodString;
1155
+ type: z.ZodLiteral<"done">;
1156
+ step: z.ZodEnum<{
1157
+ check: "check";
1158
+ plan: "plan";
1159
+ fetch: "fetch";
1160
+ triage: "triage";
1161
+ read: "read";
1162
+ extract: "extract";
1163
+ review: "review";
1164
+ }>;
1165
+ ok: z.ZodBoolean;
1166
+ note: z.ZodOptional<z.ZodString>;
1167
+ }, z.core.$strip>, z.ZodObject<{
1168
+ id: z.ZodString;
1169
+ run: z.ZodString;
1170
+ round: z.ZodNumber;
1171
+ step: z.ZodOptional<z.ZodEnum<{
1172
+ check: "check";
1173
+ plan: "plan";
1174
+ fetch: "fetch";
1175
+ triage: "triage";
1176
+ read: "read";
1177
+ extract: "extract";
1178
+ review: "review";
1179
+ }>>;
1180
+ at: z.ZodString;
1181
+ from: z.ZodEnum<{
1182
+ ai: "ai";
1183
+ human: "human";
1184
+ tool: "tool";
1185
+ }>;
1186
+ by: z.ZodString;
1187
+ type: z.ZodLiteral<"steer">;
1188
+ text: z.ZodString;
1189
+ }, z.core.$strip>, z.ZodObject<{
1190
+ id: z.ZodString;
1191
+ run: z.ZodString;
1192
+ round: z.ZodNumber;
1193
+ step: z.ZodOptional<z.ZodEnum<{
1194
+ check: "check";
1195
+ plan: "plan";
1196
+ fetch: "fetch";
1197
+ triage: "triage";
1198
+ read: "read";
1199
+ extract: "extract";
1200
+ review: "review";
1201
+ }>>;
1202
+ at: z.ZodString;
1203
+ from: z.ZodEnum<{
1204
+ ai: "ai";
1205
+ human: "human";
1206
+ tool: "tool";
1207
+ }>;
1208
+ by: z.ZodString;
1209
+ type: z.ZodLiteral<"gap">;
1210
+ note: z.ZodString;
1211
+ on: z.ZodOptional<z.ZodString>;
1212
+ }, z.core.$strip>, z.ZodObject<{
1213
+ id: z.ZodString;
1214
+ run: z.ZodString;
1215
+ round: z.ZodNumber;
1216
+ step: z.ZodOptional<z.ZodEnum<{
1217
+ check: "check";
1218
+ plan: "plan";
1219
+ fetch: "fetch";
1220
+ triage: "triage";
1221
+ read: "read";
1222
+ extract: "extract";
1223
+ review: "review";
1224
+ }>>;
1225
+ at: z.ZodString;
1226
+ from: z.ZodEnum<{
1227
+ ai: "ai";
1228
+ human: "human";
1229
+ tool: "tool";
1230
+ }>;
1231
+ by: z.ZodString;
1232
+ type: z.ZodLiteral<"check">;
1233
+ on: z.ZodString;
1234
+ ok: z.ZodBoolean;
1235
+ why: z.ZodString;
1236
+ }, z.core.$strip>, z.ZodObject<{
1237
+ id: z.ZodString;
1238
+ run: z.ZodString;
1239
+ round: z.ZodNumber;
1240
+ step: z.ZodOptional<z.ZodEnum<{
1241
+ check: "check";
1242
+ plan: "plan";
1243
+ fetch: "fetch";
1244
+ triage: "triage";
1245
+ read: "read";
1246
+ extract: "extract";
1247
+ review: "review";
1248
+ }>>;
1249
+ at: z.ZodString;
1250
+ from: z.ZodEnum<{
1251
+ ai: "ai";
1252
+ human: "human";
1253
+ tool: "tool";
1254
+ }>;
1255
+ by: z.ZodString;
1256
+ type: z.ZodLiteral<"pattern">;
1257
+ text: z.ZodString;
1258
+ findings: z.ZodArray<z.ZodString>;
1259
+ sources: z.ZodNumber;
1260
+ }, z.core.$strip>, z.ZodObject<{
1261
+ id: z.ZodString;
1262
+ run: z.ZodString;
1263
+ round: z.ZodNumber;
1264
+ step: z.ZodOptional<z.ZodEnum<{
1265
+ check: "check";
1266
+ plan: "plan";
1267
+ fetch: "fetch";
1268
+ triage: "triage";
1269
+ read: "read";
1270
+ extract: "extract";
1271
+ review: "review";
1272
+ }>>;
1273
+ at: z.ZodString;
1274
+ from: z.ZodEnum<{
1275
+ ai: "ai";
1276
+ human: "human";
1277
+ tool: "tool";
1278
+ }>;
1279
+ by: z.ZodString;
1280
+ type: z.ZodLiteral<"found">;
1281
+ hit: z.ZodString;
1282
+ query: z.ZodString;
1283
+ }, z.core.$strip>, z.ZodObject<{
1284
+ id: z.ZodString;
1285
+ run: z.ZodString;
1286
+ round: z.ZodNumber;
1287
+ step: z.ZodOptional<z.ZodEnum<{
1288
+ check: "check";
1289
+ plan: "plan";
1290
+ fetch: "fetch";
1291
+ triage: "triage";
1292
+ read: "read";
1293
+ extract: "extract";
1294
+ review: "review";
1295
+ }>>;
1296
+ at: z.ZodString;
1297
+ from: z.ZodEnum<{
1298
+ ai: "ai";
1299
+ human: "human";
1300
+ tool: "tool";
1301
+ }>;
1302
+ by: z.ZodString;
1303
+ type: z.ZodLiteral<"draft">;
1304
+ for: z.ZodString;
1305
+ items: z.ZodArray<z.ZodObject<{
1306
+ title: z.ZodString;
1307
+ body: z.ZodString;
1308
+ cites: z.ZodArray<z.ZodString>;
1309
+ }, z.core.$strip>>;
1310
+ dropped: z.ZodDefault<z.ZodArray<z.ZodObject<{
1311
+ title: z.ZodString;
1312
+ why: z.ZodString;
1313
+ }, z.core.$strip>>>;
1314
+ }, z.core.$strip>, z.ZodObject<{
1315
+ id: z.ZodString;
1316
+ run: z.ZodString;
1317
+ round: z.ZodNumber;
1318
+ step: z.ZodOptional<z.ZodEnum<{
1319
+ check: "check";
1320
+ plan: "plan";
1321
+ fetch: "fetch";
1322
+ triage: "triage";
1323
+ read: "read";
1324
+ extract: "extract";
1325
+ review: "review";
1326
+ }>>;
1327
+ at: z.ZodString;
1328
+ from: z.ZodEnum<{
1329
+ ai: "ai";
1330
+ human: "human";
1331
+ tool: "tool";
1332
+ }>;
1333
+ by: z.ZodString;
1334
+ type: z.ZodLiteral<"class">;
1335
+ on: z.ZodString;
1336
+ class: z.ZodEnum<{
1337
+ primary_data: "primary_data";
1338
+ survey: "survey";
1339
+ practitioner: "practitioner";
1340
+ vendor: "vendor";
1341
+ forum: "forum";
1342
+ news: "news";
1343
+ other: "other";
1344
+ }>;
1345
+ why: z.ZodString;
1346
+ }, z.core.$strip>, z.ZodObject<{
1347
+ id: z.ZodString;
1348
+ run: z.ZodString;
1349
+ round: z.ZodNumber;
1350
+ step: z.ZodOptional<z.ZodEnum<{
1351
+ check: "check";
1352
+ plan: "plan";
1353
+ fetch: "fetch";
1354
+ triage: "triage";
1355
+ read: "read";
1356
+ extract: "extract";
1357
+ review: "review";
1358
+ }>>;
1359
+ at: z.ZodString;
1360
+ from: z.ZodEnum<{
1361
+ ai: "ai";
1362
+ human: "human";
1363
+ tool: "tool";
1364
+ }>;
1365
+ by: z.ZodString;
1366
+ type: z.ZodLiteral<"dead">;
1367
+ facet: z.ZodString;
1368
+ why: z.ZodString;
1369
+ }, z.core.$strip>, z.ZodObject<{
1370
+ id: z.ZodString;
1371
+ run: z.ZodString;
1372
+ round: z.ZodNumber;
1373
+ step: z.ZodOptional<z.ZodEnum<{
1374
+ check: "check";
1375
+ plan: "plan";
1376
+ fetch: "fetch";
1377
+ triage: "triage";
1378
+ read: "read";
1379
+ extract: "extract";
1380
+ review: "review";
1381
+ }>>;
1382
+ at: z.ZodString;
1383
+ from: z.ZodEnum<{
1384
+ ai: "ai";
1385
+ human: "human";
1386
+ tool: "tool";
1387
+ }>;
1388
+ by: z.ZodString;
1389
+ type: z.ZodLiteral<"judge">;
1390
+ on: z.ZodString;
1391
+ answers: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1392
+ }, z.core.$strip>, z.ZodObject<{
1393
+ id: z.ZodString;
1394
+ run: z.ZodString;
1395
+ round: z.ZodNumber;
1396
+ step: z.ZodOptional<z.ZodEnum<{
1397
+ check: "check";
1398
+ plan: "plan";
1399
+ fetch: "fetch";
1400
+ triage: "triage";
1401
+ read: "read";
1402
+ extract: "extract";
1403
+ review: "review";
1404
+ }>>;
1405
+ at: z.ZodString;
1406
+ from: z.ZodEnum<{
1407
+ ai: "ai";
1408
+ human: "human";
1409
+ tool: "tool";
1410
+ }>;
1411
+ by: z.ZodString;
1412
+ type: z.ZodLiteral<"person">;
1413
+ name: z.ZodString;
1414
+ profiles: z.ZodDefault<z.ZodArray<z.ZodString>>;
1415
+ aka: z.ZodDefault<z.ZodArray<z.ZodString>>;
1416
+ why: z.ZodString;
1417
+ }, z.core.$strip>], "type">;
1418
+ export type LedgerRecord = z.infer<typeof LedgerRecord>;
1419
+ /** A record of one type. */
1420
+ export type RecordOf<T extends RecordType> = Extract<LedgerRecord, {
1421
+ type: T;
1422
+ }>;
1423
+ /** Time, then id: two writers' clocks can tie. */
1424
+ export declare function byTime(a: Pick<Envelope, "at" | "id">, b: Pick<Envelope, "at" | "id">): number;