@tenphi/akno-protocol 0.1.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 (67) hide show
  1. package/LICENSE +83 -0
  2. package/README.md +26 -0
  3. package/dist/common.d.ts +1553 -0
  4. package/dist/common.d.ts.map +1 -0
  5. package/dist/common.js +309 -0
  6. package/dist/common.js.map +1 -0
  7. package/dist/errors.d.ts +24 -0
  8. package/dist/errors.d.ts.map +1 -0
  9. package/dist/errors.js +69 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/index.d.ts +16 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +16 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/ops/answer.d.ts +207 -0
  16. package/dist/ops/answer.d.ts.map +1 -0
  17. package/dist/ops/answer.js +90 -0
  18. package/dist/ops/answer.js.map +1 -0
  19. package/dist/ops/context.d.ts +845 -0
  20. package/dist/ops/context.d.ts.map +1 -0
  21. package/dist/ops/context.js +82 -0
  22. package/dist/ops/context.js.map +1 -0
  23. package/dist/ops/folder.d.ts +85 -0
  24. package/dist/ops/folder.d.ts.map +1 -0
  25. package/dist/ops/folder.js +56 -0
  26. package/dist/ops/folder.js.map +1 -0
  27. package/dist/ops/graph.d.ts +352 -0
  28. package/dist/ops/graph.d.ts.map +1 -0
  29. package/dist/ops/graph.js +63 -0
  30. package/dist/ops/graph.js.map +1 -0
  31. package/dist/ops/list.d.ts +136 -0
  32. package/dist/ops/list.d.ts.map +1 -0
  33. package/dist/ops/list.js +57 -0
  34. package/dist/ops/list.js.map +1 -0
  35. package/dist/ops/mutate.d.ts +432 -0
  36. package/dist/ops/mutate.d.ts.map +1 -0
  37. package/dist/ops/mutate.js +234 -0
  38. package/dist/ops/mutate.js.map +1 -0
  39. package/dist/ops/read.d.ts +242 -0
  40. package/dist/ops/read.d.ts.map +1 -0
  41. package/dist/ops/read.js +65 -0
  42. package/dist/ops/read.js.map +1 -0
  43. package/dist/ops/recall.d.ts +531 -0
  44. package/dist/ops/recall.d.ts.map +1 -0
  45. package/dist/ops/recall.js +59 -0
  46. package/dist/ops/recall.js.map +1 -0
  47. package/dist/ops/timeline.d.ts +264 -0
  48. package/dist/ops/timeline.d.ts.map +1 -0
  49. package/dist/ops/timeline.js +68 -0
  50. package/dist/ops/timeline.js.map +1 -0
  51. package/dist/ops/write.d.ts +182 -0
  52. package/dist/ops/write.d.ts.map +1 -0
  53. package/dist/ops/write.js +114 -0
  54. package/dist/ops/write.js.map +1 -0
  55. package/dist/registry.d.ts +2657 -0
  56. package/dist/registry.d.ts.map +1 -0
  57. package/dist/registry.js +191 -0
  58. package/dist/registry.js.map +1 -0
  59. package/dist/version.d.ts +14 -0
  60. package/dist/version.d.ts.map +1 -0
  61. package/dist/version.js +14 -0
  62. package/dist/version.js.map +1 -0
  63. package/dist/wire.d.ts +112 -0
  64. package/dist/wire.d.ts.map +1 -0
  65. package/dist/wire.js +102 -0
  66. package/dist/wire.js.map +1 -0
  67. package/package.json +38 -0
@@ -0,0 +1,1553 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * What a page contributes to memory. This is deliberately separate from who may
4
+ * edit it: a canonical page can be owner-maintained or fully synthesized, while
5
+ * a source page remains evidence either way.
6
+ */
7
+ export declare const PageRole: z.ZodEnum<{
8
+ knowledge: "knowledge";
9
+ source: "source";
10
+ inference: "inference";
11
+ ignored: "ignored";
12
+ }>;
13
+ export type PageRole = z.infer<typeof PageRole>;
14
+ /** Automatic write authority carried by a page's `akno` frontmatter block. */
15
+ export declare const RememberManagement: z.ZodEnum<{
16
+ deny: "deny";
17
+ integrate: "integrate";
18
+ }>;
19
+ export type RememberManagement = z.infer<typeof RememberManagement>;
20
+ export declare const DreamManagement: z.ZodEnum<{
21
+ none: "none";
22
+ hygiene: "hygiene";
23
+ synthesize: "synthesize";
24
+ }>;
25
+ export type DreamManagement = z.infer<typeof DreamManagement>;
26
+ export declare const PageManagement: z.ZodObject<{
27
+ remember: z.ZodOptional<z.ZodEnum<{
28
+ deny: "deny";
29
+ integrate: "integrate";
30
+ }>>;
31
+ dream: z.ZodOptional<z.ZodEnum<{
32
+ none: "none";
33
+ hygiene: "hygiene";
34
+ synthesize: "synthesize";
35
+ }>>;
36
+ }, z.core.$strip>;
37
+ export type PageManagement = z.infer<typeof PageManagement>;
38
+ /**
39
+ * One op, three expansion modes — because looking something up and
40
+ * answering a question are different retrieval problems, but must not be
41
+ * different ops. Inferred from the query unless passed explicitly.
42
+ */
43
+ export declare const RecallMode: z.ZodEnum<{
44
+ lookup: "lookup";
45
+ question: "question";
46
+ explore: "explore";
47
+ }>;
48
+ export type RecallMode = z.infer<typeof RecallMode>;
49
+ /** How much of a page body a card carries back. */
50
+ export declare const Depth: z.ZodEnum<{
51
+ summary: "summary";
52
+ lines: "lines";
53
+ full: "full";
54
+ }>;
55
+ export type Depth = z.infer<typeof Depth>;
56
+ /**
57
+ * Absence has a reason. Three distinct outcomes, never one silent empty
58
+ * result: `empty` proved nothing matched, `degraded` means a model was missing
59
+ * and the search was weaker, `unavailable` means the index could not be read.
60
+ */
61
+ export declare const ResultStatus: z.ZodEnum<{
62
+ ok: "ok";
63
+ empty: "empty";
64
+ degraded: "degraded";
65
+ unavailable: "unavailable";
66
+ }>;
67
+ export type ResultStatus = z.infer<typeof ResultStatus>;
68
+ /**
69
+ * Every line Akno returns carries the file and line it came from. `confidence`
70
+ * is present when a fact was derived from this line — how sure the deriver is
71
+ * that the line states a well-formed durable claim, not how sure it is the claim
72
+ * is true.
73
+ */
74
+ export declare const Line: z.ZodObject<{
75
+ n: z.ZodNumber;
76
+ text: z.ZodString;
77
+ confidence: z.ZodOptional<z.ZodNumber>;
78
+ fact: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>;
80
+ export type Line = z.infer<typeof Line>;
81
+ /**
82
+ * A replaced value comes back labelled, not as a second competing current
83
+ * answer. Two live readings of one attribute is the most common way a prose
84
+ * knowledge base starts lying.
85
+ */
86
+ export declare const SupersededClaim: z.ZodObject<{
87
+ claim: z.ZodString;
88
+ valid_to: z.ZodString;
89
+ }, z.core.$strip>;
90
+ export type SupersededClaim = z.infer<typeof SupersededClaim>;
91
+ /**
92
+ * Whether document evidence can still be checked against its original bytes.
93
+ *
94
+ * Extracted text is a useful surviving copy, but it is not the original. Keeping
95
+ * that distinction in the result lets a caller use remembered evidence without
96
+ * implying that the source file is still present.
97
+ */
98
+ export declare const DocumentAvailability: z.ZodObject<{
99
+ status: z.ZodEnum<{
100
+ degraded: "degraded";
101
+ unavailable: "unavailable";
102
+ available: "available";
103
+ }>;
104
+ available_from: z.ZodArray<z.ZodEnum<{
105
+ original: "original";
106
+ indexed_text: "indexed_text";
107
+ rendition: "rendition";
108
+ }>>;
109
+ missing_originals: z.ZodArray<z.ZodString>;
110
+ available_renditions: z.ZodArray<z.ZodString>;
111
+ missing_since: z.ZodOptional<z.ZodString>;
112
+ }, z.core.$strip>;
113
+ export type DocumentAvailability = z.infer<typeof DocumentAvailability>;
114
+ export declare const GraphRelation: z.ZodEnum<{
115
+ canonical_record: "canonical_record";
116
+ links_to: "links_to";
117
+ mentions: "mentions";
118
+ about: "about";
119
+ has_attribute: "has_attribute";
120
+ related_entity: "related_entity";
121
+ owns_document: "owns_document";
122
+ participates_in: "participates_in";
123
+ }>;
124
+ export type GraphRelation = z.infer<typeof GraphRelation>;
125
+ export declare const GraphNodeKind: z.ZodEnum<{
126
+ fact: "fact";
127
+ entity: "entity";
128
+ page: "page";
129
+ document: "document";
130
+ event: "event";
131
+ }>;
132
+ export type GraphNodeKind = z.infer<typeof GraphNodeKind>;
133
+ /** Compact identity only. Read the referenced page or document for content. */
134
+ export declare const GraphNodeRef: z.ZodObject<{
135
+ id: z.ZodString;
136
+ kind: z.ZodEnum<{
137
+ fact: "fact";
138
+ entity: "entity";
139
+ page: "page";
140
+ document: "document";
141
+ event: "event";
142
+ }>;
143
+ slug: z.ZodOptional<z.ZodString>;
144
+ label: z.ZodOptional<z.ZodString>;
145
+ role: z.ZodOptional<z.ZodEnum<{
146
+ knowledge: "knowledge";
147
+ source: "source";
148
+ inference: "inference";
149
+ ignored: "ignored";
150
+ }>>;
151
+ entity: z.ZodOptional<z.ZodString>;
152
+ entity_type: z.ZodOptional<z.ZodEnum<{
153
+ event: "event";
154
+ person: "person";
155
+ organization: "organization";
156
+ place: "place";
157
+ product: "product";
158
+ concept: "concept";
159
+ other: "other";
160
+ }>>;
161
+ document: z.ZodOptional<z.ZodString>;
162
+ fact: z.ZodOptional<z.ZodString>;
163
+ event: z.ZodOptional<z.ZodString>;
164
+ date: z.ZodOptional<z.ZodString>;
165
+ line_start: z.ZodOptional<z.ZodNumber>;
166
+ line_end: z.ZodOptional<z.ZodNumber>;
167
+ availability: z.ZodOptional<z.ZodEnum<{
168
+ degraded: "degraded";
169
+ unavailable: "unavailable";
170
+ available: "available";
171
+ }>>;
172
+ }, z.core.$strip>;
173
+ export type GraphNodeRef = z.infer<typeof GraphNodeRef>;
174
+ /** A locator, never a copied claim or excerpt. */
175
+ export declare const GraphEvidenceLocator: z.ZodObject<{
176
+ kind: z.ZodEnum<{
177
+ document: "document";
178
+ page_line: "page_line";
179
+ fact_line: "fact_line";
180
+ frontmatter: "frontmatter";
181
+ }>;
182
+ slug: z.ZodOptional<z.ZodString>;
183
+ document: z.ZodOptional<z.ZodString>;
184
+ event: z.ZodOptional<z.ZodString>;
185
+ fact: z.ZodOptional<z.ZodString>;
186
+ line_start: z.ZodOptional<z.ZodNumber>;
187
+ line_end: z.ZodOptional<z.ZodNumber>;
188
+ field: z.ZodOptional<z.ZodString>;
189
+ }, z.core.$strip>;
190
+ export type GraphEvidenceLocator = z.infer<typeof GraphEvidenceLocator>;
191
+ /** Why one recall candidate entered the fused candidate set. */
192
+ export declare const RecallMatchArm: z.ZodEnum<{
193
+ lexical: "lexical";
194
+ vector: "vector";
195
+ graph: "graph";
196
+ }>;
197
+ export type RecallMatchArm = z.infer<typeof RecallMatchArm>;
198
+ /** Compact, self-contained graph explanation attached only to a returned card. */
199
+ export declare const RecallGraphPath: z.ZodObject<{
200
+ seed: z.ZodObject<{
201
+ id: z.ZodString;
202
+ kind: z.ZodEnum<{
203
+ fact: "fact";
204
+ entity: "entity";
205
+ page: "page";
206
+ document: "document";
207
+ event: "event";
208
+ }>;
209
+ slug: z.ZodOptional<z.ZodString>;
210
+ label: z.ZodOptional<z.ZodString>;
211
+ role: z.ZodOptional<z.ZodEnum<{
212
+ knowledge: "knowledge";
213
+ source: "source";
214
+ inference: "inference";
215
+ ignored: "ignored";
216
+ }>>;
217
+ entity: z.ZodOptional<z.ZodString>;
218
+ entity_type: z.ZodOptional<z.ZodEnum<{
219
+ event: "event";
220
+ person: "person";
221
+ organization: "organization";
222
+ place: "place";
223
+ product: "product";
224
+ concept: "concept";
225
+ other: "other";
226
+ }>>;
227
+ document: z.ZodOptional<z.ZodString>;
228
+ fact: z.ZodOptional<z.ZodString>;
229
+ event: z.ZodOptional<z.ZodString>;
230
+ date: z.ZodOptional<z.ZodString>;
231
+ line_start: z.ZodOptional<z.ZodNumber>;
232
+ line_end: z.ZodOptional<z.ZodNumber>;
233
+ availability: z.ZodOptional<z.ZodEnum<{
234
+ degraded: "degraded";
235
+ unavailable: "unavailable";
236
+ available: "available";
237
+ }>>;
238
+ }, z.core.$strip>;
239
+ target: z.ZodObject<{
240
+ id: z.ZodString;
241
+ kind: z.ZodEnum<{
242
+ fact: "fact";
243
+ entity: "entity";
244
+ page: "page";
245
+ document: "document";
246
+ event: "event";
247
+ }>;
248
+ slug: z.ZodOptional<z.ZodString>;
249
+ label: z.ZodOptional<z.ZodString>;
250
+ role: z.ZodOptional<z.ZodEnum<{
251
+ knowledge: "knowledge";
252
+ source: "source";
253
+ inference: "inference";
254
+ ignored: "ignored";
255
+ }>>;
256
+ entity: z.ZodOptional<z.ZodString>;
257
+ entity_type: z.ZodOptional<z.ZodEnum<{
258
+ event: "event";
259
+ person: "person";
260
+ organization: "organization";
261
+ place: "place";
262
+ product: "product";
263
+ concept: "concept";
264
+ other: "other";
265
+ }>>;
266
+ document: z.ZodOptional<z.ZodString>;
267
+ fact: z.ZodOptional<z.ZodString>;
268
+ event: z.ZodOptional<z.ZodString>;
269
+ date: z.ZodOptional<z.ZodString>;
270
+ line_start: z.ZodOptional<z.ZodNumber>;
271
+ line_end: z.ZodOptional<z.ZodNumber>;
272
+ availability: z.ZodOptional<z.ZodEnum<{
273
+ degraded: "degraded";
274
+ unavailable: "unavailable";
275
+ available: "available";
276
+ }>>;
277
+ }, z.core.$strip>;
278
+ nodes: z.ZodArray<z.ZodObject<{
279
+ id: z.ZodString;
280
+ kind: z.ZodEnum<{
281
+ fact: "fact";
282
+ entity: "entity";
283
+ page: "page";
284
+ document: "document";
285
+ event: "event";
286
+ }>;
287
+ slug: z.ZodOptional<z.ZodString>;
288
+ label: z.ZodOptional<z.ZodString>;
289
+ role: z.ZodOptional<z.ZodEnum<{
290
+ knowledge: "knowledge";
291
+ source: "source";
292
+ inference: "inference";
293
+ ignored: "ignored";
294
+ }>>;
295
+ entity: z.ZodOptional<z.ZodString>;
296
+ entity_type: z.ZodOptional<z.ZodEnum<{
297
+ event: "event";
298
+ person: "person";
299
+ organization: "organization";
300
+ place: "place";
301
+ product: "product";
302
+ concept: "concept";
303
+ other: "other";
304
+ }>>;
305
+ document: z.ZodOptional<z.ZodString>;
306
+ fact: z.ZodOptional<z.ZodString>;
307
+ event: z.ZodOptional<z.ZodString>;
308
+ date: z.ZodOptional<z.ZodString>;
309
+ line_start: z.ZodOptional<z.ZodNumber>;
310
+ line_end: z.ZodOptional<z.ZodNumber>;
311
+ availability: z.ZodOptional<z.ZodEnum<{
312
+ degraded: "degraded";
313
+ unavailable: "unavailable";
314
+ available: "available";
315
+ }>>;
316
+ }, z.core.$strip>>;
317
+ relations: z.ZodArray<z.ZodEnum<{
318
+ canonical_record: "canonical_record";
319
+ links_to: "links_to";
320
+ mentions: "mentions";
321
+ about: "about";
322
+ has_attribute: "has_attribute";
323
+ related_entity: "related_entity";
324
+ owns_document: "owns_document";
325
+ participates_in: "participates_in";
326
+ }>>;
327
+ hops: z.ZodNumber;
328
+ confidence: z.ZodNumber;
329
+ evidence: z.ZodArray<z.ZodObject<{
330
+ kind: z.ZodEnum<{
331
+ document: "document";
332
+ page_line: "page_line";
333
+ fact_line: "fact_line";
334
+ frontmatter: "frontmatter";
335
+ }>;
336
+ slug: z.ZodOptional<z.ZodString>;
337
+ document: z.ZodOptional<z.ZodString>;
338
+ event: z.ZodOptional<z.ZodString>;
339
+ fact: z.ZodOptional<z.ZodString>;
340
+ line_start: z.ZodOptional<z.ZodNumber>;
341
+ line_end: z.ZodOptional<z.ZodNumber>;
342
+ field: z.ZodOptional<z.ZodString>;
343
+ }, z.core.$strip>>;
344
+ }, z.core.$strip>;
345
+ export type RecallGraphPath = z.infer<typeof RecallGraphPath>;
346
+ /** An attachment that matched, and where inside it. */
347
+ export declare const DocumentRef: z.ZodObject<{
348
+ id: z.ZodString;
349
+ rel_path: z.ZodOptional<z.ZodString>;
350
+ mime: z.ZodOptional<z.ZodString>;
351
+ label: z.ZodOptional<z.ZodString>;
352
+ pages: z.ZodOptional<z.ZodNumber>;
353
+ parts: z.ZodOptional<z.ZodNumber>;
354
+ matched_page: z.ZodOptional<z.ZodNumber>;
355
+ summary: z.ZodOptional<z.ZodString>;
356
+ quote: z.ZodOptional<z.ZodString>;
357
+ availability: z.ZodOptional<z.ZodObject<{
358
+ status: z.ZodEnum<{
359
+ degraded: "degraded";
360
+ unavailable: "unavailable";
361
+ available: "available";
362
+ }>;
363
+ available_from: z.ZodArray<z.ZodEnum<{
364
+ original: "original";
365
+ indexed_text: "indexed_text";
366
+ rendition: "rendition";
367
+ }>>;
368
+ missing_originals: z.ZodArray<z.ZodString>;
369
+ available_renditions: z.ZodArray<z.ZodString>;
370
+ missing_since: z.ZodOptional<z.ZodString>;
371
+ }, z.core.$strip>>;
372
+ }, z.core.$strip>;
373
+ export type DocumentRef = z.infer<typeof DocumentRef>;
374
+ /** How searchable text was obtained from a standalone document. */
375
+ export declare const DocumentTextSource: z.ZodObject<{
376
+ kind: z.ZodEnum<{
377
+ none: "none";
378
+ original_text: "original_text";
379
+ ocr_text: "ocr_text";
380
+ model_description: "model_description";
381
+ }>;
382
+ via: z.ZodEnum<{
383
+ none: "none";
384
+ plain: "plain";
385
+ textutil: "textutil";
386
+ "text-layer": "text-layer";
387
+ ocr: "ocr";
388
+ vision: "vision";
389
+ }>;
390
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
391
+ }, z.core.$strip>;
392
+ export type DocumentTextSource = z.infer<typeof DocumentTextSource>;
393
+ export declare const DocumentPartRef: z.ZodObject<{
394
+ id: z.ZodString;
395
+ path: z.ZodString;
396
+ pages: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
397
+ }, z.core.$strip>;
398
+ export type DocumentPartRef = z.infer<typeof DocumentPartRef>;
399
+ /**
400
+ * Recall returns page cards, not chunks — a chunk boundary is an indexing
401
+ * artifact and means nothing to a reader.
402
+ */
403
+ export declare const Card: z.ZodObject<{
404
+ slug: z.ZodString;
405
+ title: z.ZodString;
406
+ role: z.ZodEnum<{
407
+ knowledge: "knowledge";
408
+ source: "source";
409
+ inference: "inference";
410
+ ignored: "ignored";
411
+ }>;
412
+ summary: z.ZodNullable<z.ZodString>;
413
+ breadcrumb: z.ZodOptional<z.ZodString>;
414
+ updated: z.ZodOptional<z.ZodString>;
415
+ score: z.ZodNumber;
416
+ relevance: z.ZodOptional<z.ZodNumber>;
417
+ lines: z.ZodArray<z.ZodObject<{
418
+ n: z.ZodNumber;
419
+ text: z.ZodString;
420
+ confidence: z.ZodOptional<z.ZodNumber>;
421
+ fact: z.ZodOptional<z.ZodString>;
422
+ }, z.core.$strip>>;
423
+ superseded: z.ZodOptional<z.ZodArray<z.ZodObject<{
424
+ claim: z.ZodString;
425
+ valid_to: z.ZodString;
426
+ }, z.core.$strip>>>;
427
+ links: z.ZodOptional<z.ZodArray<z.ZodString>>;
428
+ documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
429
+ id: z.ZodString;
430
+ rel_path: z.ZodOptional<z.ZodString>;
431
+ mime: z.ZodOptional<z.ZodString>;
432
+ label: z.ZodOptional<z.ZodString>;
433
+ pages: z.ZodOptional<z.ZodNumber>;
434
+ parts: z.ZodOptional<z.ZodNumber>;
435
+ matched_page: z.ZodOptional<z.ZodNumber>;
436
+ summary: z.ZodOptional<z.ZodString>;
437
+ quote: z.ZodOptional<z.ZodString>;
438
+ availability: z.ZodOptional<z.ZodObject<{
439
+ status: z.ZodEnum<{
440
+ degraded: "degraded";
441
+ unavailable: "unavailable";
442
+ available: "available";
443
+ }>;
444
+ available_from: z.ZodArray<z.ZodEnum<{
445
+ original: "original";
446
+ indexed_text: "indexed_text";
447
+ rendition: "rendition";
448
+ }>>;
449
+ missing_originals: z.ZodArray<z.ZodString>;
450
+ available_renditions: z.ZodArray<z.ZodString>;
451
+ missing_since: z.ZodOptional<z.ZodString>;
452
+ }, z.core.$strip>>;
453
+ }, z.core.$strip>>>;
454
+ truncated: z.ZodOptional<z.ZodBoolean>;
455
+ matched_by: z.ZodOptional<z.ZodArray<z.ZodEnum<{
456
+ lexical: "lexical";
457
+ vector: "vector";
458
+ graph: "graph";
459
+ }>>>;
460
+ graph_paths: z.ZodOptional<z.ZodArray<z.ZodObject<{
461
+ seed: z.ZodObject<{
462
+ id: z.ZodString;
463
+ kind: z.ZodEnum<{
464
+ fact: "fact";
465
+ entity: "entity";
466
+ page: "page";
467
+ document: "document";
468
+ event: "event";
469
+ }>;
470
+ slug: z.ZodOptional<z.ZodString>;
471
+ label: z.ZodOptional<z.ZodString>;
472
+ role: z.ZodOptional<z.ZodEnum<{
473
+ knowledge: "knowledge";
474
+ source: "source";
475
+ inference: "inference";
476
+ ignored: "ignored";
477
+ }>>;
478
+ entity: z.ZodOptional<z.ZodString>;
479
+ entity_type: z.ZodOptional<z.ZodEnum<{
480
+ event: "event";
481
+ person: "person";
482
+ organization: "organization";
483
+ place: "place";
484
+ product: "product";
485
+ concept: "concept";
486
+ other: "other";
487
+ }>>;
488
+ document: z.ZodOptional<z.ZodString>;
489
+ fact: z.ZodOptional<z.ZodString>;
490
+ event: z.ZodOptional<z.ZodString>;
491
+ date: z.ZodOptional<z.ZodString>;
492
+ line_start: z.ZodOptional<z.ZodNumber>;
493
+ line_end: z.ZodOptional<z.ZodNumber>;
494
+ availability: z.ZodOptional<z.ZodEnum<{
495
+ degraded: "degraded";
496
+ unavailable: "unavailable";
497
+ available: "available";
498
+ }>>;
499
+ }, z.core.$strip>;
500
+ target: z.ZodObject<{
501
+ id: z.ZodString;
502
+ kind: z.ZodEnum<{
503
+ fact: "fact";
504
+ entity: "entity";
505
+ page: "page";
506
+ document: "document";
507
+ event: "event";
508
+ }>;
509
+ slug: z.ZodOptional<z.ZodString>;
510
+ label: z.ZodOptional<z.ZodString>;
511
+ role: z.ZodOptional<z.ZodEnum<{
512
+ knowledge: "knowledge";
513
+ source: "source";
514
+ inference: "inference";
515
+ ignored: "ignored";
516
+ }>>;
517
+ entity: z.ZodOptional<z.ZodString>;
518
+ entity_type: z.ZodOptional<z.ZodEnum<{
519
+ event: "event";
520
+ person: "person";
521
+ organization: "organization";
522
+ place: "place";
523
+ product: "product";
524
+ concept: "concept";
525
+ other: "other";
526
+ }>>;
527
+ document: z.ZodOptional<z.ZodString>;
528
+ fact: z.ZodOptional<z.ZodString>;
529
+ event: z.ZodOptional<z.ZodString>;
530
+ date: z.ZodOptional<z.ZodString>;
531
+ line_start: z.ZodOptional<z.ZodNumber>;
532
+ line_end: z.ZodOptional<z.ZodNumber>;
533
+ availability: z.ZodOptional<z.ZodEnum<{
534
+ degraded: "degraded";
535
+ unavailable: "unavailable";
536
+ available: "available";
537
+ }>>;
538
+ }, z.core.$strip>;
539
+ nodes: z.ZodArray<z.ZodObject<{
540
+ id: z.ZodString;
541
+ kind: z.ZodEnum<{
542
+ fact: "fact";
543
+ entity: "entity";
544
+ page: "page";
545
+ document: "document";
546
+ event: "event";
547
+ }>;
548
+ slug: z.ZodOptional<z.ZodString>;
549
+ label: z.ZodOptional<z.ZodString>;
550
+ role: z.ZodOptional<z.ZodEnum<{
551
+ knowledge: "knowledge";
552
+ source: "source";
553
+ inference: "inference";
554
+ ignored: "ignored";
555
+ }>>;
556
+ entity: z.ZodOptional<z.ZodString>;
557
+ entity_type: z.ZodOptional<z.ZodEnum<{
558
+ event: "event";
559
+ person: "person";
560
+ organization: "organization";
561
+ place: "place";
562
+ product: "product";
563
+ concept: "concept";
564
+ other: "other";
565
+ }>>;
566
+ document: z.ZodOptional<z.ZodString>;
567
+ fact: z.ZodOptional<z.ZodString>;
568
+ event: z.ZodOptional<z.ZodString>;
569
+ date: z.ZodOptional<z.ZodString>;
570
+ line_start: z.ZodOptional<z.ZodNumber>;
571
+ line_end: z.ZodOptional<z.ZodNumber>;
572
+ availability: z.ZodOptional<z.ZodEnum<{
573
+ degraded: "degraded";
574
+ unavailable: "unavailable";
575
+ available: "available";
576
+ }>>;
577
+ }, z.core.$strip>>;
578
+ relations: z.ZodArray<z.ZodEnum<{
579
+ canonical_record: "canonical_record";
580
+ links_to: "links_to";
581
+ mentions: "mentions";
582
+ about: "about";
583
+ has_attribute: "has_attribute";
584
+ related_entity: "related_entity";
585
+ owns_document: "owns_document";
586
+ participates_in: "participates_in";
587
+ }>>;
588
+ hops: z.ZodNumber;
589
+ confidence: z.ZodNumber;
590
+ evidence: z.ZodArray<z.ZodObject<{
591
+ kind: z.ZodEnum<{
592
+ document: "document";
593
+ page_line: "page_line";
594
+ fact_line: "fact_line";
595
+ frontmatter: "frontmatter";
596
+ }>;
597
+ slug: z.ZodOptional<z.ZodString>;
598
+ document: z.ZodOptional<z.ZodString>;
599
+ event: z.ZodOptional<z.ZodString>;
600
+ fact: z.ZodOptional<z.ZodString>;
601
+ line_start: z.ZodOptional<z.ZodNumber>;
602
+ line_end: z.ZodOptional<z.ZodNumber>;
603
+ field: z.ZodOptional<z.ZodString>;
604
+ }, z.core.$strip>>;
605
+ }, z.core.$strip>>>;
606
+ }, z.core.$strip>;
607
+ export type Card = z.infer<typeof Card>;
608
+ /** The page variant in the authoritative mixed recall result list. */
609
+ export declare const PageCard: z.ZodObject<{
610
+ slug: z.ZodString;
611
+ title: z.ZodString;
612
+ role: z.ZodEnum<{
613
+ knowledge: "knowledge";
614
+ source: "source";
615
+ inference: "inference";
616
+ ignored: "ignored";
617
+ }>;
618
+ summary: z.ZodNullable<z.ZodString>;
619
+ breadcrumb: z.ZodOptional<z.ZodString>;
620
+ updated: z.ZodOptional<z.ZodString>;
621
+ score: z.ZodNumber;
622
+ relevance: z.ZodOptional<z.ZodNumber>;
623
+ lines: z.ZodArray<z.ZodObject<{
624
+ n: z.ZodNumber;
625
+ text: z.ZodString;
626
+ confidence: z.ZodOptional<z.ZodNumber>;
627
+ fact: z.ZodOptional<z.ZodString>;
628
+ }, z.core.$strip>>;
629
+ superseded: z.ZodOptional<z.ZodArray<z.ZodObject<{
630
+ claim: z.ZodString;
631
+ valid_to: z.ZodString;
632
+ }, z.core.$strip>>>;
633
+ links: z.ZodOptional<z.ZodArray<z.ZodString>>;
634
+ documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
635
+ id: z.ZodString;
636
+ rel_path: z.ZodOptional<z.ZodString>;
637
+ mime: z.ZodOptional<z.ZodString>;
638
+ label: z.ZodOptional<z.ZodString>;
639
+ pages: z.ZodOptional<z.ZodNumber>;
640
+ parts: z.ZodOptional<z.ZodNumber>;
641
+ matched_page: z.ZodOptional<z.ZodNumber>;
642
+ summary: z.ZodOptional<z.ZodString>;
643
+ quote: z.ZodOptional<z.ZodString>;
644
+ availability: z.ZodOptional<z.ZodObject<{
645
+ status: z.ZodEnum<{
646
+ degraded: "degraded";
647
+ unavailable: "unavailable";
648
+ available: "available";
649
+ }>;
650
+ available_from: z.ZodArray<z.ZodEnum<{
651
+ original: "original";
652
+ indexed_text: "indexed_text";
653
+ rendition: "rendition";
654
+ }>>;
655
+ missing_originals: z.ZodArray<z.ZodString>;
656
+ available_renditions: z.ZodArray<z.ZodString>;
657
+ missing_since: z.ZodOptional<z.ZodString>;
658
+ }, z.core.$strip>>;
659
+ }, z.core.$strip>>>;
660
+ truncated: z.ZodOptional<z.ZodBoolean>;
661
+ matched_by: z.ZodOptional<z.ZodArray<z.ZodEnum<{
662
+ lexical: "lexical";
663
+ vector: "vector";
664
+ graph: "graph";
665
+ }>>>;
666
+ graph_paths: z.ZodOptional<z.ZodArray<z.ZodObject<{
667
+ seed: z.ZodObject<{
668
+ id: z.ZodString;
669
+ kind: z.ZodEnum<{
670
+ fact: "fact";
671
+ entity: "entity";
672
+ page: "page";
673
+ document: "document";
674
+ event: "event";
675
+ }>;
676
+ slug: z.ZodOptional<z.ZodString>;
677
+ label: z.ZodOptional<z.ZodString>;
678
+ role: z.ZodOptional<z.ZodEnum<{
679
+ knowledge: "knowledge";
680
+ source: "source";
681
+ inference: "inference";
682
+ ignored: "ignored";
683
+ }>>;
684
+ entity: z.ZodOptional<z.ZodString>;
685
+ entity_type: z.ZodOptional<z.ZodEnum<{
686
+ event: "event";
687
+ person: "person";
688
+ organization: "organization";
689
+ place: "place";
690
+ product: "product";
691
+ concept: "concept";
692
+ other: "other";
693
+ }>>;
694
+ document: z.ZodOptional<z.ZodString>;
695
+ fact: z.ZodOptional<z.ZodString>;
696
+ event: z.ZodOptional<z.ZodString>;
697
+ date: z.ZodOptional<z.ZodString>;
698
+ line_start: z.ZodOptional<z.ZodNumber>;
699
+ line_end: z.ZodOptional<z.ZodNumber>;
700
+ availability: z.ZodOptional<z.ZodEnum<{
701
+ degraded: "degraded";
702
+ unavailable: "unavailable";
703
+ available: "available";
704
+ }>>;
705
+ }, z.core.$strip>;
706
+ target: z.ZodObject<{
707
+ id: z.ZodString;
708
+ kind: z.ZodEnum<{
709
+ fact: "fact";
710
+ entity: "entity";
711
+ page: "page";
712
+ document: "document";
713
+ event: "event";
714
+ }>;
715
+ slug: z.ZodOptional<z.ZodString>;
716
+ label: z.ZodOptional<z.ZodString>;
717
+ role: z.ZodOptional<z.ZodEnum<{
718
+ knowledge: "knowledge";
719
+ source: "source";
720
+ inference: "inference";
721
+ ignored: "ignored";
722
+ }>>;
723
+ entity: z.ZodOptional<z.ZodString>;
724
+ entity_type: z.ZodOptional<z.ZodEnum<{
725
+ event: "event";
726
+ person: "person";
727
+ organization: "organization";
728
+ place: "place";
729
+ product: "product";
730
+ concept: "concept";
731
+ other: "other";
732
+ }>>;
733
+ document: z.ZodOptional<z.ZodString>;
734
+ fact: z.ZodOptional<z.ZodString>;
735
+ event: z.ZodOptional<z.ZodString>;
736
+ date: z.ZodOptional<z.ZodString>;
737
+ line_start: z.ZodOptional<z.ZodNumber>;
738
+ line_end: z.ZodOptional<z.ZodNumber>;
739
+ availability: z.ZodOptional<z.ZodEnum<{
740
+ degraded: "degraded";
741
+ unavailable: "unavailable";
742
+ available: "available";
743
+ }>>;
744
+ }, z.core.$strip>;
745
+ nodes: z.ZodArray<z.ZodObject<{
746
+ id: z.ZodString;
747
+ kind: z.ZodEnum<{
748
+ fact: "fact";
749
+ entity: "entity";
750
+ page: "page";
751
+ document: "document";
752
+ event: "event";
753
+ }>;
754
+ slug: z.ZodOptional<z.ZodString>;
755
+ label: z.ZodOptional<z.ZodString>;
756
+ role: z.ZodOptional<z.ZodEnum<{
757
+ knowledge: "knowledge";
758
+ source: "source";
759
+ inference: "inference";
760
+ ignored: "ignored";
761
+ }>>;
762
+ entity: z.ZodOptional<z.ZodString>;
763
+ entity_type: z.ZodOptional<z.ZodEnum<{
764
+ event: "event";
765
+ person: "person";
766
+ organization: "organization";
767
+ place: "place";
768
+ product: "product";
769
+ concept: "concept";
770
+ other: "other";
771
+ }>>;
772
+ document: z.ZodOptional<z.ZodString>;
773
+ fact: z.ZodOptional<z.ZodString>;
774
+ event: z.ZodOptional<z.ZodString>;
775
+ date: z.ZodOptional<z.ZodString>;
776
+ line_start: z.ZodOptional<z.ZodNumber>;
777
+ line_end: z.ZodOptional<z.ZodNumber>;
778
+ availability: z.ZodOptional<z.ZodEnum<{
779
+ degraded: "degraded";
780
+ unavailable: "unavailable";
781
+ available: "available";
782
+ }>>;
783
+ }, z.core.$strip>>;
784
+ relations: z.ZodArray<z.ZodEnum<{
785
+ canonical_record: "canonical_record";
786
+ links_to: "links_to";
787
+ mentions: "mentions";
788
+ about: "about";
789
+ has_attribute: "has_attribute";
790
+ related_entity: "related_entity";
791
+ owns_document: "owns_document";
792
+ participates_in: "participates_in";
793
+ }>>;
794
+ hops: z.ZodNumber;
795
+ confidence: z.ZodNumber;
796
+ evidence: z.ZodArray<z.ZodObject<{
797
+ kind: z.ZodEnum<{
798
+ document: "document";
799
+ page_line: "page_line";
800
+ fact_line: "fact_line";
801
+ frontmatter: "frontmatter";
802
+ }>;
803
+ slug: z.ZodOptional<z.ZodString>;
804
+ document: z.ZodOptional<z.ZodString>;
805
+ event: z.ZodOptional<z.ZodString>;
806
+ fact: z.ZodOptional<z.ZodString>;
807
+ line_start: z.ZodOptional<z.ZodNumber>;
808
+ line_end: z.ZodOptional<z.ZodNumber>;
809
+ field: z.ZodOptional<z.ZodString>;
810
+ }, z.core.$strip>>;
811
+ }, z.core.$strip>>>;
812
+ type: z.ZodLiteral<"page">;
813
+ }, z.core.$strip>;
814
+ export type PageCard = z.infer<typeof PageCard>;
815
+ /** Searchable evidence that has not been filed beneath a Markdown page. */
816
+ export declare const DocumentCard: z.ZodObject<{
817
+ type: z.ZodLiteral<"document">;
818
+ id: z.ZodString;
819
+ path: z.ZodString;
820
+ label: z.ZodString;
821
+ mime: z.ZodNullable<z.ZodString>;
822
+ summary: z.ZodOptional<z.ZodString>;
823
+ quote: z.ZodOptional<z.ZodString>;
824
+ matched_page: z.ZodOptional<z.ZodNumber>;
825
+ parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
826
+ id: z.ZodString;
827
+ path: z.ZodString;
828
+ pages: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
829
+ }, z.core.$strip>>>;
830
+ source: z.ZodObject<{
831
+ kind: z.ZodEnum<{
832
+ none: "none";
833
+ original_text: "original_text";
834
+ ocr_text: "ocr_text";
835
+ model_description: "model_description";
836
+ }>;
837
+ via: z.ZodEnum<{
838
+ none: "none";
839
+ plain: "plain";
840
+ textutil: "textutil";
841
+ "text-layer": "text-layer";
842
+ ocr: "ocr";
843
+ vision: "vision";
844
+ }>;
845
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
846
+ }, z.core.$strip>;
847
+ availability: z.ZodOptional<z.ZodObject<{
848
+ status: z.ZodEnum<{
849
+ degraded: "degraded";
850
+ unavailable: "unavailable";
851
+ available: "available";
852
+ }>;
853
+ available_from: z.ZodArray<z.ZodEnum<{
854
+ original: "original";
855
+ indexed_text: "indexed_text";
856
+ rendition: "rendition";
857
+ }>>;
858
+ missing_originals: z.ZodArray<z.ZodString>;
859
+ available_renditions: z.ZodArray<z.ZodString>;
860
+ missing_since: z.ZodOptional<z.ZodString>;
861
+ }, z.core.$strip>>;
862
+ ownership: z.ZodObject<{
863
+ status: z.ZodLiteral<"orphan">;
864
+ }, z.core.$strip>;
865
+ suggested_actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
866
+ op: z.ZodLiteral<"adopt">;
867
+ args: z.ZodObject<{
868
+ documentId: z.ZodString;
869
+ }, z.core.$strip>;
870
+ }, z.core.$strip>>>;
871
+ score: z.ZodNumber;
872
+ relevance: z.ZodOptional<z.ZodNumber>;
873
+ matched_by: z.ZodOptional<z.ZodArray<z.ZodEnum<{
874
+ lexical: "lexical";
875
+ vector: "vector";
876
+ graph: "graph";
877
+ }>>>;
878
+ graph_paths: z.ZodOptional<z.ZodArray<z.ZodObject<{
879
+ seed: z.ZodObject<{
880
+ id: z.ZodString;
881
+ kind: z.ZodEnum<{
882
+ fact: "fact";
883
+ entity: "entity";
884
+ page: "page";
885
+ document: "document";
886
+ event: "event";
887
+ }>;
888
+ slug: z.ZodOptional<z.ZodString>;
889
+ label: z.ZodOptional<z.ZodString>;
890
+ role: z.ZodOptional<z.ZodEnum<{
891
+ knowledge: "knowledge";
892
+ source: "source";
893
+ inference: "inference";
894
+ ignored: "ignored";
895
+ }>>;
896
+ entity: z.ZodOptional<z.ZodString>;
897
+ entity_type: z.ZodOptional<z.ZodEnum<{
898
+ event: "event";
899
+ person: "person";
900
+ organization: "organization";
901
+ place: "place";
902
+ product: "product";
903
+ concept: "concept";
904
+ other: "other";
905
+ }>>;
906
+ document: z.ZodOptional<z.ZodString>;
907
+ fact: z.ZodOptional<z.ZodString>;
908
+ event: z.ZodOptional<z.ZodString>;
909
+ date: z.ZodOptional<z.ZodString>;
910
+ line_start: z.ZodOptional<z.ZodNumber>;
911
+ line_end: z.ZodOptional<z.ZodNumber>;
912
+ availability: z.ZodOptional<z.ZodEnum<{
913
+ degraded: "degraded";
914
+ unavailable: "unavailable";
915
+ available: "available";
916
+ }>>;
917
+ }, z.core.$strip>;
918
+ target: z.ZodObject<{
919
+ id: z.ZodString;
920
+ kind: z.ZodEnum<{
921
+ fact: "fact";
922
+ entity: "entity";
923
+ page: "page";
924
+ document: "document";
925
+ event: "event";
926
+ }>;
927
+ slug: z.ZodOptional<z.ZodString>;
928
+ label: z.ZodOptional<z.ZodString>;
929
+ role: z.ZodOptional<z.ZodEnum<{
930
+ knowledge: "knowledge";
931
+ source: "source";
932
+ inference: "inference";
933
+ ignored: "ignored";
934
+ }>>;
935
+ entity: z.ZodOptional<z.ZodString>;
936
+ entity_type: z.ZodOptional<z.ZodEnum<{
937
+ event: "event";
938
+ person: "person";
939
+ organization: "organization";
940
+ place: "place";
941
+ product: "product";
942
+ concept: "concept";
943
+ other: "other";
944
+ }>>;
945
+ document: z.ZodOptional<z.ZodString>;
946
+ fact: z.ZodOptional<z.ZodString>;
947
+ event: z.ZodOptional<z.ZodString>;
948
+ date: z.ZodOptional<z.ZodString>;
949
+ line_start: z.ZodOptional<z.ZodNumber>;
950
+ line_end: z.ZodOptional<z.ZodNumber>;
951
+ availability: z.ZodOptional<z.ZodEnum<{
952
+ degraded: "degraded";
953
+ unavailable: "unavailable";
954
+ available: "available";
955
+ }>>;
956
+ }, z.core.$strip>;
957
+ nodes: z.ZodArray<z.ZodObject<{
958
+ id: z.ZodString;
959
+ kind: z.ZodEnum<{
960
+ fact: "fact";
961
+ entity: "entity";
962
+ page: "page";
963
+ document: "document";
964
+ event: "event";
965
+ }>;
966
+ slug: z.ZodOptional<z.ZodString>;
967
+ label: z.ZodOptional<z.ZodString>;
968
+ role: z.ZodOptional<z.ZodEnum<{
969
+ knowledge: "knowledge";
970
+ source: "source";
971
+ inference: "inference";
972
+ ignored: "ignored";
973
+ }>>;
974
+ entity: z.ZodOptional<z.ZodString>;
975
+ entity_type: z.ZodOptional<z.ZodEnum<{
976
+ event: "event";
977
+ person: "person";
978
+ organization: "organization";
979
+ place: "place";
980
+ product: "product";
981
+ concept: "concept";
982
+ other: "other";
983
+ }>>;
984
+ document: z.ZodOptional<z.ZodString>;
985
+ fact: z.ZodOptional<z.ZodString>;
986
+ event: z.ZodOptional<z.ZodString>;
987
+ date: z.ZodOptional<z.ZodString>;
988
+ line_start: z.ZodOptional<z.ZodNumber>;
989
+ line_end: z.ZodOptional<z.ZodNumber>;
990
+ availability: z.ZodOptional<z.ZodEnum<{
991
+ degraded: "degraded";
992
+ unavailable: "unavailable";
993
+ available: "available";
994
+ }>>;
995
+ }, z.core.$strip>>;
996
+ relations: z.ZodArray<z.ZodEnum<{
997
+ canonical_record: "canonical_record";
998
+ links_to: "links_to";
999
+ mentions: "mentions";
1000
+ about: "about";
1001
+ has_attribute: "has_attribute";
1002
+ related_entity: "related_entity";
1003
+ owns_document: "owns_document";
1004
+ participates_in: "participates_in";
1005
+ }>>;
1006
+ hops: z.ZodNumber;
1007
+ confidence: z.ZodNumber;
1008
+ evidence: z.ZodArray<z.ZodObject<{
1009
+ kind: z.ZodEnum<{
1010
+ document: "document";
1011
+ page_line: "page_line";
1012
+ fact_line: "fact_line";
1013
+ frontmatter: "frontmatter";
1014
+ }>;
1015
+ slug: z.ZodOptional<z.ZodString>;
1016
+ document: z.ZodOptional<z.ZodString>;
1017
+ event: z.ZodOptional<z.ZodString>;
1018
+ fact: z.ZodOptional<z.ZodString>;
1019
+ line_start: z.ZodOptional<z.ZodNumber>;
1020
+ line_end: z.ZodOptional<z.ZodNumber>;
1021
+ field: z.ZodOptional<z.ZodString>;
1022
+ }, z.core.$strip>>;
1023
+ }, z.core.$strip>>>;
1024
+ }, z.core.$strip>;
1025
+ export type DocumentCard = z.infer<typeof DocumentCard>;
1026
+ export declare const RecallResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
1027
+ slug: z.ZodString;
1028
+ title: z.ZodString;
1029
+ role: z.ZodEnum<{
1030
+ knowledge: "knowledge";
1031
+ source: "source";
1032
+ inference: "inference";
1033
+ ignored: "ignored";
1034
+ }>;
1035
+ summary: z.ZodNullable<z.ZodString>;
1036
+ breadcrumb: z.ZodOptional<z.ZodString>;
1037
+ updated: z.ZodOptional<z.ZodString>;
1038
+ score: z.ZodNumber;
1039
+ relevance: z.ZodOptional<z.ZodNumber>;
1040
+ lines: z.ZodArray<z.ZodObject<{
1041
+ n: z.ZodNumber;
1042
+ text: z.ZodString;
1043
+ confidence: z.ZodOptional<z.ZodNumber>;
1044
+ fact: z.ZodOptional<z.ZodString>;
1045
+ }, z.core.$strip>>;
1046
+ superseded: z.ZodOptional<z.ZodArray<z.ZodObject<{
1047
+ claim: z.ZodString;
1048
+ valid_to: z.ZodString;
1049
+ }, z.core.$strip>>>;
1050
+ links: z.ZodOptional<z.ZodArray<z.ZodString>>;
1051
+ documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
1052
+ id: z.ZodString;
1053
+ rel_path: z.ZodOptional<z.ZodString>;
1054
+ mime: z.ZodOptional<z.ZodString>;
1055
+ label: z.ZodOptional<z.ZodString>;
1056
+ pages: z.ZodOptional<z.ZodNumber>;
1057
+ parts: z.ZodOptional<z.ZodNumber>;
1058
+ matched_page: z.ZodOptional<z.ZodNumber>;
1059
+ summary: z.ZodOptional<z.ZodString>;
1060
+ quote: z.ZodOptional<z.ZodString>;
1061
+ availability: z.ZodOptional<z.ZodObject<{
1062
+ status: z.ZodEnum<{
1063
+ degraded: "degraded";
1064
+ unavailable: "unavailable";
1065
+ available: "available";
1066
+ }>;
1067
+ available_from: z.ZodArray<z.ZodEnum<{
1068
+ original: "original";
1069
+ indexed_text: "indexed_text";
1070
+ rendition: "rendition";
1071
+ }>>;
1072
+ missing_originals: z.ZodArray<z.ZodString>;
1073
+ available_renditions: z.ZodArray<z.ZodString>;
1074
+ missing_since: z.ZodOptional<z.ZodString>;
1075
+ }, z.core.$strip>>;
1076
+ }, z.core.$strip>>>;
1077
+ truncated: z.ZodOptional<z.ZodBoolean>;
1078
+ matched_by: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1079
+ lexical: "lexical";
1080
+ vector: "vector";
1081
+ graph: "graph";
1082
+ }>>>;
1083
+ graph_paths: z.ZodOptional<z.ZodArray<z.ZodObject<{
1084
+ seed: z.ZodObject<{
1085
+ id: z.ZodString;
1086
+ kind: z.ZodEnum<{
1087
+ fact: "fact";
1088
+ entity: "entity";
1089
+ page: "page";
1090
+ document: "document";
1091
+ event: "event";
1092
+ }>;
1093
+ slug: z.ZodOptional<z.ZodString>;
1094
+ label: z.ZodOptional<z.ZodString>;
1095
+ role: z.ZodOptional<z.ZodEnum<{
1096
+ knowledge: "knowledge";
1097
+ source: "source";
1098
+ inference: "inference";
1099
+ ignored: "ignored";
1100
+ }>>;
1101
+ entity: z.ZodOptional<z.ZodString>;
1102
+ entity_type: z.ZodOptional<z.ZodEnum<{
1103
+ event: "event";
1104
+ person: "person";
1105
+ organization: "organization";
1106
+ place: "place";
1107
+ product: "product";
1108
+ concept: "concept";
1109
+ other: "other";
1110
+ }>>;
1111
+ document: z.ZodOptional<z.ZodString>;
1112
+ fact: z.ZodOptional<z.ZodString>;
1113
+ event: z.ZodOptional<z.ZodString>;
1114
+ date: z.ZodOptional<z.ZodString>;
1115
+ line_start: z.ZodOptional<z.ZodNumber>;
1116
+ line_end: z.ZodOptional<z.ZodNumber>;
1117
+ availability: z.ZodOptional<z.ZodEnum<{
1118
+ degraded: "degraded";
1119
+ unavailable: "unavailable";
1120
+ available: "available";
1121
+ }>>;
1122
+ }, z.core.$strip>;
1123
+ target: z.ZodObject<{
1124
+ id: z.ZodString;
1125
+ kind: z.ZodEnum<{
1126
+ fact: "fact";
1127
+ entity: "entity";
1128
+ page: "page";
1129
+ document: "document";
1130
+ event: "event";
1131
+ }>;
1132
+ slug: z.ZodOptional<z.ZodString>;
1133
+ label: z.ZodOptional<z.ZodString>;
1134
+ role: z.ZodOptional<z.ZodEnum<{
1135
+ knowledge: "knowledge";
1136
+ source: "source";
1137
+ inference: "inference";
1138
+ ignored: "ignored";
1139
+ }>>;
1140
+ entity: z.ZodOptional<z.ZodString>;
1141
+ entity_type: z.ZodOptional<z.ZodEnum<{
1142
+ event: "event";
1143
+ person: "person";
1144
+ organization: "organization";
1145
+ place: "place";
1146
+ product: "product";
1147
+ concept: "concept";
1148
+ other: "other";
1149
+ }>>;
1150
+ document: z.ZodOptional<z.ZodString>;
1151
+ fact: z.ZodOptional<z.ZodString>;
1152
+ event: z.ZodOptional<z.ZodString>;
1153
+ date: z.ZodOptional<z.ZodString>;
1154
+ line_start: z.ZodOptional<z.ZodNumber>;
1155
+ line_end: z.ZodOptional<z.ZodNumber>;
1156
+ availability: z.ZodOptional<z.ZodEnum<{
1157
+ degraded: "degraded";
1158
+ unavailable: "unavailable";
1159
+ available: "available";
1160
+ }>>;
1161
+ }, z.core.$strip>;
1162
+ nodes: z.ZodArray<z.ZodObject<{
1163
+ id: z.ZodString;
1164
+ kind: z.ZodEnum<{
1165
+ fact: "fact";
1166
+ entity: "entity";
1167
+ page: "page";
1168
+ document: "document";
1169
+ event: "event";
1170
+ }>;
1171
+ slug: z.ZodOptional<z.ZodString>;
1172
+ label: z.ZodOptional<z.ZodString>;
1173
+ role: z.ZodOptional<z.ZodEnum<{
1174
+ knowledge: "knowledge";
1175
+ source: "source";
1176
+ inference: "inference";
1177
+ ignored: "ignored";
1178
+ }>>;
1179
+ entity: z.ZodOptional<z.ZodString>;
1180
+ entity_type: z.ZodOptional<z.ZodEnum<{
1181
+ event: "event";
1182
+ person: "person";
1183
+ organization: "organization";
1184
+ place: "place";
1185
+ product: "product";
1186
+ concept: "concept";
1187
+ other: "other";
1188
+ }>>;
1189
+ document: z.ZodOptional<z.ZodString>;
1190
+ fact: z.ZodOptional<z.ZodString>;
1191
+ event: z.ZodOptional<z.ZodString>;
1192
+ date: z.ZodOptional<z.ZodString>;
1193
+ line_start: z.ZodOptional<z.ZodNumber>;
1194
+ line_end: z.ZodOptional<z.ZodNumber>;
1195
+ availability: z.ZodOptional<z.ZodEnum<{
1196
+ degraded: "degraded";
1197
+ unavailable: "unavailable";
1198
+ available: "available";
1199
+ }>>;
1200
+ }, z.core.$strip>>;
1201
+ relations: z.ZodArray<z.ZodEnum<{
1202
+ canonical_record: "canonical_record";
1203
+ links_to: "links_to";
1204
+ mentions: "mentions";
1205
+ about: "about";
1206
+ has_attribute: "has_attribute";
1207
+ related_entity: "related_entity";
1208
+ owns_document: "owns_document";
1209
+ participates_in: "participates_in";
1210
+ }>>;
1211
+ hops: z.ZodNumber;
1212
+ confidence: z.ZodNumber;
1213
+ evidence: z.ZodArray<z.ZodObject<{
1214
+ kind: z.ZodEnum<{
1215
+ document: "document";
1216
+ page_line: "page_line";
1217
+ fact_line: "fact_line";
1218
+ frontmatter: "frontmatter";
1219
+ }>;
1220
+ slug: z.ZodOptional<z.ZodString>;
1221
+ document: z.ZodOptional<z.ZodString>;
1222
+ event: z.ZodOptional<z.ZodString>;
1223
+ fact: z.ZodOptional<z.ZodString>;
1224
+ line_start: z.ZodOptional<z.ZodNumber>;
1225
+ line_end: z.ZodOptional<z.ZodNumber>;
1226
+ field: z.ZodOptional<z.ZodString>;
1227
+ }, z.core.$strip>>;
1228
+ }, z.core.$strip>>>;
1229
+ type: z.ZodLiteral<"page">;
1230
+ }, z.core.$strip>, z.ZodObject<{
1231
+ type: z.ZodLiteral<"document">;
1232
+ id: z.ZodString;
1233
+ path: z.ZodString;
1234
+ label: z.ZodString;
1235
+ mime: z.ZodNullable<z.ZodString>;
1236
+ summary: z.ZodOptional<z.ZodString>;
1237
+ quote: z.ZodOptional<z.ZodString>;
1238
+ matched_page: z.ZodOptional<z.ZodNumber>;
1239
+ parts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1240
+ id: z.ZodString;
1241
+ path: z.ZodString;
1242
+ pages: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1243
+ }, z.core.$strip>>>;
1244
+ source: z.ZodObject<{
1245
+ kind: z.ZodEnum<{
1246
+ none: "none";
1247
+ original_text: "original_text";
1248
+ ocr_text: "ocr_text";
1249
+ model_description: "model_description";
1250
+ }>;
1251
+ via: z.ZodEnum<{
1252
+ none: "none";
1253
+ plain: "plain";
1254
+ textutil: "textutil";
1255
+ "text-layer": "text-layer";
1256
+ ocr: "ocr";
1257
+ vision: "vision";
1258
+ }>;
1259
+ confidence: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1260
+ }, z.core.$strip>;
1261
+ availability: z.ZodOptional<z.ZodObject<{
1262
+ status: z.ZodEnum<{
1263
+ degraded: "degraded";
1264
+ unavailable: "unavailable";
1265
+ available: "available";
1266
+ }>;
1267
+ available_from: z.ZodArray<z.ZodEnum<{
1268
+ original: "original";
1269
+ indexed_text: "indexed_text";
1270
+ rendition: "rendition";
1271
+ }>>;
1272
+ missing_originals: z.ZodArray<z.ZodString>;
1273
+ available_renditions: z.ZodArray<z.ZodString>;
1274
+ missing_since: z.ZodOptional<z.ZodString>;
1275
+ }, z.core.$strip>>;
1276
+ ownership: z.ZodObject<{
1277
+ status: z.ZodLiteral<"orphan">;
1278
+ }, z.core.$strip>;
1279
+ suggested_actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1280
+ op: z.ZodLiteral<"adopt">;
1281
+ args: z.ZodObject<{
1282
+ documentId: z.ZodString;
1283
+ }, z.core.$strip>;
1284
+ }, z.core.$strip>>>;
1285
+ score: z.ZodNumber;
1286
+ relevance: z.ZodOptional<z.ZodNumber>;
1287
+ matched_by: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1288
+ lexical: "lexical";
1289
+ vector: "vector";
1290
+ graph: "graph";
1291
+ }>>>;
1292
+ graph_paths: z.ZodOptional<z.ZodArray<z.ZodObject<{
1293
+ seed: z.ZodObject<{
1294
+ id: z.ZodString;
1295
+ kind: z.ZodEnum<{
1296
+ fact: "fact";
1297
+ entity: "entity";
1298
+ page: "page";
1299
+ document: "document";
1300
+ event: "event";
1301
+ }>;
1302
+ slug: z.ZodOptional<z.ZodString>;
1303
+ label: z.ZodOptional<z.ZodString>;
1304
+ role: z.ZodOptional<z.ZodEnum<{
1305
+ knowledge: "knowledge";
1306
+ source: "source";
1307
+ inference: "inference";
1308
+ ignored: "ignored";
1309
+ }>>;
1310
+ entity: z.ZodOptional<z.ZodString>;
1311
+ entity_type: z.ZodOptional<z.ZodEnum<{
1312
+ event: "event";
1313
+ person: "person";
1314
+ organization: "organization";
1315
+ place: "place";
1316
+ product: "product";
1317
+ concept: "concept";
1318
+ other: "other";
1319
+ }>>;
1320
+ document: z.ZodOptional<z.ZodString>;
1321
+ fact: z.ZodOptional<z.ZodString>;
1322
+ event: z.ZodOptional<z.ZodString>;
1323
+ date: z.ZodOptional<z.ZodString>;
1324
+ line_start: z.ZodOptional<z.ZodNumber>;
1325
+ line_end: z.ZodOptional<z.ZodNumber>;
1326
+ availability: z.ZodOptional<z.ZodEnum<{
1327
+ degraded: "degraded";
1328
+ unavailable: "unavailable";
1329
+ available: "available";
1330
+ }>>;
1331
+ }, z.core.$strip>;
1332
+ target: z.ZodObject<{
1333
+ id: z.ZodString;
1334
+ kind: z.ZodEnum<{
1335
+ fact: "fact";
1336
+ entity: "entity";
1337
+ page: "page";
1338
+ document: "document";
1339
+ event: "event";
1340
+ }>;
1341
+ slug: z.ZodOptional<z.ZodString>;
1342
+ label: z.ZodOptional<z.ZodString>;
1343
+ role: z.ZodOptional<z.ZodEnum<{
1344
+ knowledge: "knowledge";
1345
+ source: "source";
1346
+ inference: "inference";
1347
+ ignored: "ignored";
1348
+ }>>;
1349
+ entity: z.ZodOptional<z.ZodString>;
1350
+ entity_type: z.ZodOptional<z.ZodEnum<{
1351
+ event: "event";
1352
+ person: "person";
1353
+ organization: "organization";
1354
+ place: "place";
1355
+ product: "product";
1356
+ concept: "concept";
1357
+ other: "other";
1358
+ }>>;
1359
+ document: z.ZodOptional<z.ZodString>;
1360
+ fact: z.ZodOptional<z.ZodString>;
1361
+ event: z.ZodOptional<z.ZodString>;
1362
+ date: z.ZodOptional<z.ZodString>;
1363
+ line_start: z.ZodOptional<z.ZodNumber>;
1364
+ line_end: z.ZodOptional<z.ZodNumber>;
1365
+ availability: z.ZodOptional<z.ZodEnum<{
1366
+ degraded: "degraded";
1367
+ unavailable: "unavailable";
1368
+ available: "available";
1369
+ }>>;
1370
+ }, z.core.$strip>;
1371
+ nodes: z.ZodArray<z.ZodObject<{
1372
+ id: z.ZodString;
1373
+ kind: z.ZodEnum<{
1374
+ fact: "fact";
1375
+ entity: "entity";
1376
+ page: "page";
1377
+ document: "document";
1378
+ event: "event";
1379
+ }>;
1380
+ slug: z.ZodOptional<z.ZodString>;
1381
+ label: z.ZodOptional<z.ZodString>;
1382
+ role: z.ZodOptional<z.ZodEnum<{
1383
+ knowledge: "knowledge";
1384
+ source: "source";
1385
+ inference: "inference";
1386
+ ignored: "ignored";
1387
+ }>>;
1388
+ entity: z.ZodOptional<z.ZodString>;
1389
+ entity_type: z.ZodOptional<z.ZodEnum<{
1390
+ event: "event";
1391
+ person: "person";
1392
+ organization: "organization";
1393
+ place: "place";
1394
+ product: "product";
1395
+ concept: "concept";
1396
+ other: "other";
1397
+ }>>;
1398
+ document: z.ZodOptional<z.ZodString>;
1399
+ fact: z.ZodOptional<z.ZodString>;
1400
+ event: z.ZodOptional<z.ZodString>;
1401
+ date: z.ZodOptional<z.ZodString>;
1402
+ line_start: z.ZodOptional<z.ZodNumber>;
1403
+ line_end: z.ZodOptional<z.ZodNumber>;
1404
+ availability: z.ZodOptional<z.ZodEnum<{
1405
+ degraded: "degraded";
1406
+ unavailable: "unavailable";
1407
+ available: "available";
1408
+ }>>;
1409
+ }, z.core.$strip>>;
1410
+ relations: z.ZodArray<z.ZodEnum<{
1411
+ canonical_record: "canonical_record";
1412
+ links_to: "links_to";
1413
+ mentions: "mentions";
1414
+ about: "about";
1415
+ has_attribute: "has_attribute";
1416
+ related_entity: "related_entity";
1417
+ owns_document: "owns_document";
1418
+ participates_in: "participates_in";
1419
+ }>>;
1420
+ hops: z.ZodNumber;
1421
+ confidence: z.ZodNumber;
1422
+ evidence: z.ZodArray<z.ZodObject<{
1423
+ kind: z.ZodEnum<{
1424
+ document: "document";
1425
+ page_line: "page_line";
1426
+ fact_line: "fact_line";
1427
+ frontmatter: "frontmatter";
1428
+ }>;
1429
+ slug: z.ZodOptional<z.ZodString>;
1430
+ document: z.ZodOptional<z.ZodString>;
1431
+ event: z.ZodOptional<z.ZodString>;
1432
+ fact: z.ZodOptional<z.ZodString>;
1433
+ line_start: z.ZodOptional<z.ZodNumber>;
1434
+ line_end: z.ZodOptional<z.ZodNumber>;
1435
+ field: z.ZodOptional<z.ZodString>;
1436
+ }, z.core.$strip>>;
1437
+ }, z.core.$strip>>>;
1438
+ }, z.core.$strip>], "type">;
1439
+ export type RecallResult = z.infer<typeof RecallResult>;
1440
+ export declare function isPageCard(result: RecallResult): result is PageCard;
1441
+ export declare function isDocumentCard(result: RecallResult): result is DocumentCard;
1442
+ /**
1443
+ * Named, machine-readable reasons a result is `degraded`. A rule that quietly
1444
+ * excludes half a knowledge base is worse than no rule — default to visible.
1445
+ */
1446
+ export declare const DegradedReason: z.ZodEnum<{
1447
+ no_embedding_model: "no_embedding_model";
1448
+ no_reranker: "no_reranker";
1449
+ no_derive_model: "no_derive_model";
1450
+ no_expansion_model: "no_expansion_model";
1451
+ embedding_failed: "embedding_failed";
1452
+ rerank_failed: "rerank_failed";
1453
+ derive_failed: "derive_failed";
1454
+ expansion_failed: "expansion_failed";
1455
+ no_vector_index: "no_vector_index";
1456
+ partial_index: "partial_index";
1457
+ no_document_text: "no_document_text";
1458
+ document_source_missing: "document_source_missing";
1459
+ no_graph_index: "no_graph_index";
1460
+ no_entity_index: "no_entity_index";
1461
+ entity_resolution_failed: "entity_resolution_failed";
1462
+ partial_graph_index: "partial_graph_index";
1463
+ graph_traversal_limited: "graph_traversal_limited";
1464
+ no_answer_model: "no_answer_model";
1465
+ answer_failed: "answer_failed";
1466
+ answer_verification_failed: "answer_verification_failed";
1467
+ answer_truncated: "answer_truncated";
1468
+ }>;
1469
+ export type DegradedReason = z.infer<typeof DegradedReason>;
1470
+ /** Every op's response carries these, so a caller can branch uniformly. */
1471
+ export declare const ResultEnvelope: z.ZodObject<{
1472
+ status: z.ZodEnum<{
1473
+ ok: "ok";
1474
+ empty: "empty";
1475
+ degraded: "degraded";
1476
+ unavailable: "unavailable";
1477
+ }>;
1478
+ degraded: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1479
+ no_embedding_model: "no_embedding_model";
1480
+ no_reranker: "no_reranker";
1481
+ no_derive_model: "no_derive_model";
1482
+ no_expansion_model: "no_expansion_model";
1483
+ embedding_failed: "embedding_failed";
1484
+ rerank_failed: "rerank_failed";
1485
+ derive_failed: "derive_failed";
1486
+ expansion_failed: "expansion_failed";
1487
+ no_vector_index: "no_vector_index";
1488
+ partial_index: "partial_index";
1489
+ no_document_text: "no_document_text";
1490
+ document_source_missing: "document_source_missing";
1491
+ no_graph_index: "no_graph_index";
1492
+ no_entity_index: "no_entity_index";
1493
+ entity_resolution_failed: "entity_resolution_failed";
1494
+ partial_graph_index: "partial_graph_index";
1495
+ graph_traversal_limited: "graph_traversal_limited";
1496
+ no_answer_model: "no_answer_model";
1497
+ answer_failed: "answer_failed";
1498
+ answer_verification_failed: "answer_verification_failed";
1499
+ answer_truncated: "answer_truncated";
1500
+ }>>>;
1501
+ note: z.ZodOptional<z.ZodString>;
1502
+ }, z.core.$strip>;
1503
+ export type ResultEnvelope = z.infer<typeof ResultEnvelope>;
1504
+ /** What the reranker was allowed to remove, kept visible so fewer results never looks accidental. */
1505
+ export declare const RecallQualification: z.ZodObject<{
1506
+ model: z.ZodEnum<{
1507
+ llm: "llm";
1508
+ native: "native";
1509
+ }>;
1510
+ model_id: z.ZodOptional<z.ZodString>;
1511
+ latency_ms: z.ZodOptional<z.ZodNumber>;
1512
+ input_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1513
+ output_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1514
+ total_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1515
+ applied: z.ZodBoolean;
1516
+ judged: z.ZodNumber;
1517
+ rejected: z.ZodNumber;
1518
+ unjudged: z.ZodNumber;
1519
+ basis: z.ZodEnum<{
1520
+ llm_grade: "llm_grade";
1521
+ native_auto: "native_auto";
1522
+ native_manual: "native_manual";
1523
+ disabled: "disabled";
1524
+ calibration_failed: "calibration_failed";
1525
+ }>;
1526
+ threshold: z.ZodNullable<z.ZodNumber>;
1527
+ }, z.core.$strip>;
1528
+ export type RecallQualification = z.infer<typeof RecallQualification>;
1529
+ export declare const SlugFilter: z.ZodObject<{
1530
+ folder: z.ZodOptional<z.ZodString>;
1531
+ type: z.ZodOptional<z.ZodString>;
1532
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1533
+ role: z.ZodOptional<z.ZodEnum<{
1534
+ knowledge: "knowledge";
1535
+ source: "source";
1536
+ inference: "inference";
1537
+ ignored: "ignored";
1538
+ }>>;
1539
+ source: z.ZodOptional<z.ZodEnum<{
1540
+ page: "page";
1541
+ document: "document";
1542
+ both: "both";
1543
+ }>>;
1544
+ ownership: z.ZodOptional<z.ZodEnum<{
1545
+ any: "any";
1546
+ orphan: "orphan";
1547
+ owned: "owned";
1548
+ }>>;
1549
+ }, z.core.$strip>;
1550
+ export type SlugFilter = z.infer<typeof SlugFilter>;
1551
+ /** `YYYY`, `YYYY-MM` or `YYYY-MM-DD` — the granularities a ledger is filtered by. */
1552
+ export declare const DatePrefix: z.ZodString;
1553
+ //# sourceMappingURL=common.d.ts.map