@inflexa-ai/harness 0.16.0 → 0.17.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.
- package/dist/agents/conversation-agent.d.ts +3 -0
- package/dist/agents/conversation-agent.js +5 -2
- package/dist/agents/sandbox/shared.d.ts +3 -0
- package/dist/agents/sandbox/shared.js +5 -0
- package/dist/agents/sandbox/types.d.ts +1 -1
- package/dist/app/chat-turn.d.ts +2 -0
- package/dist/app/chat-turn.js +11 -2
- package/dist/app/synthesize-run.d.ts +3 -0
- package/dist/app/synthesize-run.js +2 -1
- package/dist/citations/__fixtures__/resolver.d.ts +3 -0
- package/dist/citations/__fixtures__/resolver.js +9 -0
- package/dist/citations/aggregate.d.ts +3 -0
- package/dist/citations/aggregate.js +44 -0
- package/dist/citations/clients/arxiv.d.ts +6 -0
- package/dist/citations/clients/arxiv.js +34 -0
- package/dist/citations/clients/common.d.ts +11 -0
- package/dist/citations/clients/common.js +43 -0
- package/dist/citations/clients/crossref.d.ts +8 -0
- package/dist/citations/clients/crossref.js +98 -0
- package/dist/citations/clients/doi-registry.d.ts +3 -0
- package/dist/citations/clients/doi-registry.js +95 -0
- package/dist/citations/clients/pubmed.d.ts +6 -0
- package/dist/citations/clients/pubmed.js +83 -0
- package/dist/citations/clients/semantic-scholar.d.ts +6 -0
- package/dist/citations/clients/semantic-scholar.js +60 -0
- package/dist/citations/compare.d.ts +9 -0
- package/dist/citations/compare.js +72 -0
- package/dist/citations/match.d.ts +11 -0
- package/dist/citations/match.js +173 -0
- package/dist/citations/normalize.d.ts +31 -0
- package/dist/citations/normalize.js +187 -0
- package/dist/citations/plan.d.ts +2 -0
- package/dist/citations/plan.js +59 -0
- package/dist/citations/resolve.d.ts +28 -0
- package/dist/citations/resolve.js +238 -0
- package/dist/citations/types.d.ts +583 -0
- package/dist/citations/types.js +129 -0
- package/dist/contracts/schemas/chat-parts.d.ts +8 -8
- package/dist/contracts/target-dossier.d.ts +20 -20
- package/dist/execution/run-synthesis.d.ts +3 -0
- package/dist/execution/run-synthesis.js +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +3 -0
- package/dist/lib/cache.d.ts +8 -0
- package/dist/lib/cache.js +35 -0
- package/dist/lib/rate-limit.d.ts +35 -0
- package/dist/lib/rate-limit.js +121 -0
- package/dist/literature/sources/arxiv.d.ts +22 -0
- package/dist/literature/sources/arxiv.js +103 -0
- package/dist/literature/sources/http.d.ts +28 -0
- package/dist/literature/sources/http.js +97 -0
- package/dist/literature/sources/pubmed.d.ts +68 -0
- package/dist/literature/sources/pubmed.js +266 -0
- package/dist/literature/sources/semantic-scholar.d.ts +24 -0
- package/dist/literature/sources/semantic-scholar.js +71 -0
- package/dist/memory/thread-store.d.ts +142 -25
- package/dist/memory/thread-store.js +228 -40
- package/dist/prompts/literature-reviewer.d.ts +1 -1
- package/dist/prompts/literature-reviewer.js +2 -0
- package/dist/runtime/assemble.d.ts +50 -4
- package/dist/runtime/assemble.js +47 -3
- package/dist/runtime/boot.js +7 -1
- package/dist/state/init.js +46 -1
- package/dist/state/schema.d.ts +2 -2
- package/dist/tools/bio/gene-preclinical-profile.d.ts +1 -1
- package/dist/tools/bio/keys.d.ts +1 -0
- package/dist/tools/bio/pubmed.js +4 -4
- package/dist/tools/lib/ncbi-utils.d.ts +3 -58
- package/dist/tools/lib/ncbi-utils.js +2 -286
- package/dist/tools/lib/pubmed-client.d.ts +5 -12
- package/dist/tools/lib/pubmed-client.js +20 -79
- package/dist/tools/research/generate-analogy-report.js +2 -2
- package/dist/tools/research/index.d.ts +1 -0
- package/dist/tools/research/index.js +1 -0
- package/dist/tools/research/inspect-run.d.ts +1 -1
- package/dist/tools/research/literature-reviewer.d.ts +3 -0
- package/dist/tools/research/literature-reviewer.js +2 -0
- package/dist/tools/research/resolve-citation.d.ts +3 -0
- package/dist/tools/research/resolve-citation.js +15 -0
- package/dist/tools/research/search-arxiv.d.ts +3 -19
- package/dist/tools/research/search-arxiv.js +9 -105
- package/dist/tools/research/search-semantic-scholar.d.ts +8 -33
- package/dist/tools/research/search-semantic-scholar.js +29 -88
- package/dist/tools/sandbox/list-available-refs.js +1 -2
- package/dist/workflows/execute-analysis.d.ts +3 -0
- package/dist/workflows/execute-analysis.js +1 -0
- package/dist/workflows/sandbox-step.d.ts +5 -0
- package/dist/workflows/sandbox-step.js +1 -0
- package/dist/workflows/target-assessment/phase4-assemble.d.ts +2 -2
- package/dist/workflows/target-assessment/schemas.d.ts +2 -2
- package/dist/workflows/target-assessment/steps/phase2-aggregate.d.ts +1 -1
- package/dist/workflows/target-assessment/steps/phase3-aggregate.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,583 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CitationKindSchema: z.ZodEnum<{
|
|
3
|
+
auto: "auto";
|
|
4
|
+
doi: "doi";
|
|
5
|
+
pmid: "pmid";
|
|
6
|
+
arxiv: "arxiv";
|
|
7
|
+
free_text: "free_text";
|
|
8
|
+
}>;
|
|
9
|
+
export type CitationKind = z.infer<typeof CitationKindSchema>;
|
|
10
|
+
export declare const CitationInputSchema: z.ZodObject<{
|
|
11
|
+
citation: z.ZodString;
|
|
12
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
auto: "auto";
|
|
14
|
+
doi: "doi";
|
|
15
|
+
pmid: "pmid";
|
|
16
|
+
arxiv: "arxiv";
|
|
17
|
+
free_text: "free_text";
|
|
18
|
+
}>>;
|
|
19
|
+
title: z.ZodOptional<z.ZodString>;
|
|
20
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
23
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
24
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type CitationInput = z.infer<typeof CitationInputSchema>;
|
|
27
|
+
export declare const CitationSourceSchema: z.ZodEnum<{
|
|
28
|
+
arxiv: "arxiv";
|
|
29
|
+
doi_registry: "doi_registry";
|
|
30
|
+
crossref: "crossref";
|
|
31
|
+
pubmed: "pubmed";
|
|
32
|
+
semantic_scholar: "semantic_scholar";
|
|
33
|
+
}>;
|
|
34
|
+
export type CitationSource = z.infer<typeof CitationSourceSchema>;
|
|
35
|
+
export declare const CitationSourceStatusSchema: z.ZodEnum<{
|
|
36
|
+
ok: "ok";
|
|
37
|
+
no_data: "no_data";
|
|
38
|
+
unavailable: "unavailable";
|
|
39
|
+
not_applicable: "not_applicable";
|
|
40
|
+
}>;
|
|
41
|
+
export type CitationSourceStatus = z.infer<typeof CitationSourceStatusSchema>;
|
|
42
|
+
export declare const CitationVerdictSchema: z.ZodEnum<{
|
|
43
|
+
verified: "verified";
|
|
44
|
+
metadata_mismatch: "metadata_mismatch";
|
|
45
|
+
not_found: "not_found";
|
|
46
|
+
unverifiable: "unverifiable";
|
|
47
|
+
inconclusive: "inconclusive";
|
|
48
|
+
}>;
|
|
49
|
+
export type CitationVerdict = z.infer<typeof CitationVerdictSchema>;
|
|
50
|
+
export declare const CitationCoverageSchema: z.ZodEnum<{
|
|
51
|
+
none: "none";
|
|
52
|
+
complete: "complete";
|
|
53
|
+
partial: "partial";
|
|
54
|
+
}>;
|
|
55
|
+
export type CitationCoverage = z.infer<typeof CitationCoverageSchema>;
|
|
56
|
+
export declare const ComparisonStatusSchema: z.ZodEnum<{
|
|
57
|
+
match: "match";
|
|
58
|
+
mismatch: "mismatch";
|
|
59
|
+
not_compared: "not_compared";
|
|
60
|
+
}>;
|
|
61
|
+
export type ComparisonStatus = z.infer<typeof ComparisonStatusSchema>;
|
|
62
|
+
export declare const CitationFieldSchema: z.ZodEnum<{
|
|
63
|
+
title: "title";
|
|
64
|
+
authors: "authors";
|
|
65
|
+
year: "year";
|
|
66
|
+
venue: "venue";
|
|
67
|
+
volume: "volume";
|
|
68
|
+
firstPage: "firstPage";
|
|
69
|
+
}>;
|
|
70
|
+
export type CitationField = z.infer<typeof CitationFieldSchema>;
|
|
71
|
+
export declare const UnsupportedWorkKindSchema: z.ZodEnum<{
|
|
72
|
+
personal_communication: "personal_communication";
|
|
73
|
+
unpublished: "unpublished";
|
|
74
|
+
unregistered_in_press: "unregistered_in_press";
|
|
75
|
+
}>;
|
|
76
|
+
export type UnsupportedWorkKind = z.infer<typeof UnsupportedWorkKindSchema>;
|
|
77
|
+
export declare const CitationIdentifiersSchema: z.ZodObject<{
|
|
78
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
79
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
80
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
81
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export type CitationIdentifiers = z.infer<typeof CitationIdentifiersSchema>;
|
|
84
|
+
export declare const NormalizedCitationMetadataSchema: z.ZodObject<{
|
|
85
|
+
title: z.ZodOptional<z.ZodString>;
|
|
86
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
89
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
90
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type NormalizedCitationMetadata = z.infer<typeof NormalizedCitationMetadataSchema>;
|
|
93
|
+
export declare const NormalizedCitationSchema: z.ZodObject<{
|
|
94
|
+
citation: z.ZodString;
|
|
95
|
+
query: z.ZodString;
|
|
96
|
+
kind: z.ZodEnum<{
|
|
97
|
+
doi: "doi";
|
|
98
|
+
pmid: "pmid";
|
|
99
|
+
arxiv: "arxiv";
|
|
100
|
+
free_text: "free_text";
|
|
101
|
+
}>;
|
|
102
|
+
identifiers: z.ZodObject<{
|
|
103
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
104
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
105
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
106
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
supplied: z.ZodObject<{
|
|
109
|
+
title: z.ZodOptional<z.ZodString>;
|
|
110
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
111
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
113
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
114
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
unsupportedWorkKind: z.ZodOptional<z.ZodEnum<{
|
|
117
|
+
personal_communication: "personal_communication";
|
|
118
|
+
unpublished: "unpublished";
|
|
119
|
+
unregistered_in_press: "unregistered_in_press";
|
|
120
|
+
}>>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export type NormalizedCitation = z.infer<typeof NormalizedCitationSchema>;
|
|
123
|
+
export declare const CitationRecordSchema: z.ZodObject<{
|
|
124
|
+
source: z.ZodEnum<{
|
|
125
|
+
arxiv: "arxiv";
|
|
126
|
+
doi_registry: "doi_registry";
|
|
127
|
+
crossref: "crossref";
|
|
128
|
+
pubmed: "pubmed";
|
|
129
|
+
semantic_scholar: "semantic_scholar";
|
|
130
|
+
}>;
|
|
131
|
+
sourceRecordId: z.ZodString;
|
|
132
|
+
identifiers: z.ZodObject<{
|
|
133
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
134
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
135
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
136
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
title: z.ZodOptional<z.ZodString>;
|
|
139
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
142
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
143
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
144
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
145
|
+
url: z.ZodOptional<z.ZodString>;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type CitationRecord = z.infer<typeof CitationRecordSchema>;
|
|
148
|
+
export declare const IdentifierEvidenceSchema: z.ZodObject<{
|
|
149
|
+
type: z.ZodEnum<{
|
|
150
|
+
doi: "doi";
|
|
151
|
+
pmid: "pmid";
|
|
152
|
+
arxiv: "arxiv";
|
|
153
|
+
}>;
|
|
154
|
+
identifier: z.ZodString;
|
|
155
|
+
exists: z.ZodBoolean;
|
|
156
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
157
|
+
metadataAvailable: z.ZodBoolean;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
export type IdentifierEvidence = z.infer<typeof IdentifierEvidenceSchema>;
|
|
160
|
+
export declare const CitationSourceOutcomeSchema: z.ZodObject<{
|
|
161
|
+
source: z.ZodEnum<{
|
|
162
|
+
arxiv: "arxiv";
|
|
163
|
+
doi_registry: "doi_registry";
|
|
164
|
+
crossref: "crossref";
|
|
165
|
+
pubmed: "pubmed";
|
|
166
|
+
semantic_scholar: "semantic_scholar";
|
|
167
|
+
}>;
|
|
168
|
+
operation: z.ZodString;
|
|
169
|
+
status: z.ZodEnum<{
|
|
170
|
+
ok: "ok";
|
|
171
|
+
no_data: "no_data";
|
|
172
|
+
unavailable: "unavailable";
|
|
173
|
+
not_applicable: "not_applicable";
|
|
174
|
+
}>;
|
|
175
|
+
requestCount: z.ZodNumber;
|
|
176
|
+
records: z.ZodArray<z.ZodObject<{
|
|
177
|
+
source: z.ZodEnum<{
|
|
178
|
+
arxiv: "arxiv";
|
|
179
|
+
doi_registry: "doi_registry";
|
|
180
|
+
crossref: "crossref";
|
|
181
|
+
pubmed: "pubmed";
|
|
182
|
+
semantic_scholar: "semantic_scholar";
|
|
183
|
+
}>;
|
|
184
|
+
sourceRecordId: z.ZodString;
|
|
185
|
+
identifiers: z.ZodObject<{
|
|
186
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
187
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
188
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
189
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
title: z.ZodOptional<z.ZodString>;
|
|
192
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
195
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
196
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
197
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
198
|
+
url: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, z.core.$strip>>;
|
|
200
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
201
|
+
identifierEvidence: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
type: z.ZodEnum<{
|
|
203
|
+
doi: "doi";
|
|
204
|
+
pmid: "pmid";
|
|
205
|
+
arxiv: "arxiv";
|
|
206
|
+
}>;
|
|
207
|
+
identifier: z.ZodString;
|
|
208
|
+
exists: z.ZodBoolean;
|
|
209
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
210
|
+
metadataAvailable: z.ZodBoolean;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type CitationSourceOutcome = z.infer<typeof CitationSourceOutcomeSchema>;
|
|
214
|
+
export declare const CitationFieldComparisonSchema: z.ZodObject<{
|
|
215
|
+
field: z.ZodEnum<{
|
|
216
|
+
title: "title";
|
|
217
|
+
authors: "authors";
|
|
218
|
+
year: "year";
|
|
219
|
+
venue: "venue";
|
|
220
|
+
volume: "volume";
|
|
221
|
+
firstPage: "firstPage";
|
|
222
|
+
}>;
|
|
223
|
+
status: z.ZodEnum<{
|
|
224
|
+
match: "match";
|
|
225
|
+
mismatch: "mismatch";
|
|
226
|
+
not_compared: "not_compared";
|
|
227
|
+
}>;
|
|
228
|
+
supplied: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
229
|
+
sourceValues: z.ZodArray<z.ZodObject<{
|
|
230
|
+
source: z.ZodEnum<{
|
|
231
|
+
arxiv: "arxiv";
|
|
232
|
+
doi_registry: "doi_registry";
|
|
233
|
+
crossref: "crossref";
|
|
234
|
+
pubmed: "pubmed";
|
|
235
|
+
semantic_scholar: "semantic_scholar";
|
|
236
|
+
}>;
|
|
237
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
ruleVersion: z.ZodString;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
export type CitationFieldComparison = z.infer<typeof CitationFieldComparisonSchema>;
|
|
242
|
+
export declare const CitationConflictSchema: z.ZodObject<{
|
|
243
|
+
field: z.ZodEnum<{
|
|
244
|
+
title: "title";
|
|
245
|
+
authors: "authors";
|
|
246
|
+
year: "year";
|
|
247
|
+
venue: "venue";
|
|
248
|
+
volume: "volume";
|
|
249
|
+
firstPage: "firstPage";
|
|
250
|
+
}>;
|
|
251
|
+
values: z.ZodArray<z.ZodObject<{
|
|
252
|
+
source: z.ZodEnum<{
|
|
253
|
+
arxiv: "arxiv";
|
|
254
|
+
doi_registry: "doi_registry";
|
|
255
|
+
crossref: "crossref";
|
|
256
|
+
pubmed: "pubmed";
|
|
257
|
+
semantic_scholar: "semantic_scholar";
|
|
258
|
+
}>;
|
|
259
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
260
|
+
}, z.core.$strip>>;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
export type CitationConflict = z.infer<typeof CitationConflictSchema>;
|
|
263
|
+
export declare const CitationClusterRelationSchema: z.ZodObject<{
|
|
264
|
+
clusterId: z.ZodString;
|
|
265
|
+
kind: z.ZodEnum<{
|
|
266
|
+
preprint_of: "preprint_of";
|
|
267
|
+
published_as: "published_as";
|
|
268
|
+
related_version: "related_version";
|
|
269
|
+
}>;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
export declare const CitationCandidateClusterSchema: z.ZodObject<{
|
|
272
|
+
id: z.ZodString;
|
|
273
|
+
score: z.ZodNumber;
|
|
274
|
+
records: z.ZodArray<z.ZodObject<{
|
|
275
|
+
source: z.ZodEnum<{
|
|
276
|
+
arxiv: "arxiv";
|
|
277
|
+
doi_registry: "doi_registry";
|
|
278
|
+
crossref: "crossref";
|
|
279
|
+
pubmed: "pubmed";
|
|
280
|
+
semantic_scholar: "semantic_scholar";
|
|
281
|
+
}>;
|
|
282
|
+
sourceRecordId: z.ZodString;
|
|
283
|
+
identifiers: z.ZodObject<{
|
|
284
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
285
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
286
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
287
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
title: z.ZodOptional<z.ZodString>;
|
|
290
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
291
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
293
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
294
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
295
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
296
|
+
url: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, z.core.$strip>>;
|
|
298
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
299
|
+
clusterId: z.ZodString;
|
|
300
|
+
kind: z.ZodEnum<{
|
|
301
|
+
preprint_of: "preprint_of";
|
|
302
|
+
published_as: "published_as";
|
|
303
|
+
related_version: "related_version";
|
|
304
|
+
}>;
|
|
305
|
+
}, z.core.$strip>>;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
export type CitationCandidateCluster = z.infer<typeof CitationCandidateClusterSchema>;
|
|
308
|
+
export declare const CitationResolutionResultSchema: z.ZodObject<{
|
|
309
|
+
input: z.ZodObject<{
|
|
310
|
+
citation: z.ZodString;
|
|
311
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
auto: "auto";
|
|
313
|
+
doi: "doi";
|
|
314
|
+
pmid: "pmid";
|
|
315
|
+
arxiv: "arxiv";
|
|
316
|
+
free_text: "free_text";
|
|
317
|
+
}>>;
|
|
318
|
+
title: z.ZodOptional<z.ZodString>;
|
|
319
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
320
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
322
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
323
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
normalized: z.ZodObject<{
|
|
326
|
+
citation: z.ZodString;
|
|
327
|
+
query: z.ZodString;
|
|
328
|
+
kind: z.ZodEnum<{
|
|
329
|
+
doi: "doi";
|
|
330
|
+
pmid: "pmid";
|
|
331
|
+
arxiv: "arxiv";
|
|
332
|
+
free_text: "free_text";
|
|
333
|
+
}>;
|
|
334
|
+
identifiers: z.ZodObject<{
|
|
335
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
336
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
337
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
338
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
339
|
+
}, z.core.$strip>;
|
|
340
|
+
supplied: z.ZodObject<{
|
|
341
|
+
title: z.ZodOptional<z.ZodString>;
|
|
342
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
343
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
345
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
346
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
347
|
+
}, z.core.$strip>;
|
|
348
|
+
unsupportedWorkKind: z.ZodOptional<z.ZodEnum<{
|
|
349
|
+
personal_communication: "personal_communication";
|
|
350
|
+
unpublished: "unpublished";
|
|
351
|
+
unregistered_in_press: "unregistered_in_press";
|
|
352
|
+
}>>;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
sourceOutcomes: z.ZodArray<z.ZodObject<{
|
|
355
|
+
source: z.ZodEnum<{
|
|
356
|
+
arxiv: "arxiv";
|
|
357
|
+
doi_registry: "doi_registry";
|
|
358
|
+
crossref: "crossref";
|
|
359
|
+
pubmed: "pubmed";
|
|
360
|
+
semantic_scholar: "semantic_scholar";
|
|
361
|
+
}>;
|
|
362
|
+
operation: z.ZodString;
|
|
363
|
+
status: z.ZodEnum<{
|
|
364
|
+
ok: "ok";
|
|
365
|
+
no_data: "no_data";
|
|
366
|
+
unavailable: "unavailable";
|
|
367
|
+
not_applicable: "not_applicable";
|
|
368
|
+
}>;
|
|
369
|
+
requestCount: z.ZodNumber;
|
|
370
|
+
records: z.ZodArray<z.ZodObject<{
|
|
371
|
+
source: z.ZodEnum<{
|
|
372
|
+
arxiv: "arxiv";
|
|
373
|
+
doi_registry: "doi_registry";
|
|
374
|
+
crossref: "crossref";
|
|
375
|
+
pubmed: "pubmed";
|
|
376
|
+
semantic_scholar: "semantic_scholar";
|
|
377
|
+
}>;
|
|
378
|
+
sourceRecordId: z.ZodString;
|
|
379
|
+
identifiers: z.ZodObject<{
|
|
380
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
381
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
382
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
383
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
384
|
+
}, z.core.$strip>;
|
|
385
|
+
title: z.ZodOptional<z.ZodString>;
|
|
386
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
387
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
389
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
390
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
391
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
392
|
+
url: z.ZodOptional<z.ZodString>;
|
|
393
|
+
}, z.core.$strip>>;
|
|
394
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
395
|
+
identifierEvidence: z.ZodOptional<z.ZodObject<{
|
|
396
|
+
type: z.ZodEnum<{
|
|
397
|
+
doi: "doi";
|
|
398
|
+
pmid: "pmid";
|
|
399
|
+
arxiv: "arxiv";
|
|
400
|
+
}>;
|
|
401
|
+
identifier: z.ZodString;
|
|
402
|
+
exists: z.ZodBoolean;
|
|
403
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
404
|
+
metadataAvailable: z.ZodBoolean;
|
|
405
|
+
}, z.core.$strip>>;
|
|
406
|
+
}, z.core.$strip>>;
|
|
407
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
408
|
+
id: z.ZodString;
|
|
409
|
+
score: z.ZodNumber;
|
|
410
|
+
records: z.ZodArray<z.ZodObject<{
|
|
411
|
+
source: z.ZodEnum<{
|
|
412
|
+
arxiv: "arxiv";
|
|
413
|
+
doi_registry: "doi_registry";
|
|
414
|
+
crossref: "crossref";
|
|
415
|
+
pubmed: "pubmed";
|
|
416
|
+
semantic_scholar: "semantic_scholar";
|
|
417
|
+
}>;
|
|
418
|
+
sourceRecordId: z.ZodString;
|
|
419
|
+
identifiers: z.ZodObject<{
|
|
420
|
+
doi: z.ZodOptional<z.ZodString>;
|
|
421
|
+
pmid: z.ZodOptional<z.ZodString>;
|
|
422
|
+
arxiv: z.ZodOptional<z.ZodString>;
|
|
423
|
+
corpusId: z.ZodOptional<z.ZodString>;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
title: z.ZodOptional<z.ZodString>;
|
|
426
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
427
|
+
year: z.ZodOptional<z.ZodNumber>;
|
|
428
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
429
|
+
volume: z.ZodOptional<z.ZodString>;
|
|
430
|
+
firstPage: z.ZodOptional<z.ZodString>;
|
|
431
|
+
registrationAgency: z.ZodOptional<z.ZodString>;
|
|
432
|
+
url: z.ZodOptional<z.ZodString>;
|
|
433
|
+
}, z.core.$strip>>;
|
|
434
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
435
|
+
clusterId: z.ZodString;
|
|
436
|
+
kind: z.ZodEnum<{
|
|
437
|
+
preprint_of: "preprint_of";
|
|
438
|
+
published_as: "published_as";
|
|
439
|
+
related_version: "related_version";
|
|
440
|
+
}>;
|
|
441
|
+
}, z.core.$strip>>;
|
|
442
|
+
}, z.core.$strip>>;
|
|
443
|
+
selectedClusterId: z.ZodOptional<z.ZodString>;
|
|
444
|
+
comparisons: z.ZodArray<z.ZodObject<{
|
|
445
|
+
field: z.ZodEnum<{
|
|
446
|
+
title: "title";
|
|
447
|
+
authors: "authors";
|
|
448
|
+
year: "year";
|
|
449
|
+
venue: "venue";
|
|
450
|
+
volume: "volume";
|
|
451
|
+
firstPage: "firstPage";
|
|
452
|
+
}>;
|
|
453
|
+
status: z.ZodEnum<{
|
|
454
|
+
match: "match";
|
|
455
|
+
mismatch: "mismatch";
|
|
456
|
+
not_compared: "not_compared";
|
|
457
|
+
}>;
|
|
458
|
+
supplied: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
459
|
+
sourceValues: z.ZodArray<z.ZodObject<{
|
|
460
|
+
source: z.ZodEnum<{
|
|
461
|
+
arxiv: "arxiv";
|
|
462
|
+
doi_registry: "doi_registry";
|
|
463
|
+
crossref: "crossref";
|
|
464
|
+
pubmed: "pubmed";
|
|
465
|
+
semantic_scholar: "semantic_scholar";
|
|
466
|
+
}>;
|
|
467
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
468
|
+
}, z.core.$strip>>;
|
|
469
|
+
ruleVersion: z.ZodString;
|
|
470
|
+
}, z.core.$strip>>;
|
|
471
|
+
conflicts: z.ZodArray<z.ZodObject<{
|
|
472
|
+
field: z.ZodEnum<{
|
|
473
|
+
title: "title";
|
|
474
|
+
authors: "authors";
|
|
475
|
+
year: "year";
|
|
476
|
+
venue: "venue";
|
|
477
|
+
volume: "volume";
|
|
478
|
+
firstPage: "firstPage";
|
|
479
|
+
}>;
|
|
480
|
+
values: z.ZodArray<z.ZodObject<{
|
|
481
|
+
source: z.ZodEnum<{
|
|
482
|
+
arxiv: "arxiv";
|
|
483
|
+
doi_registry: "doi_registry";
|
|
484
|
+
crossref: "crossref";
|
|
485
|
+
pubmed: "pubmed";
|
|
486
|
+
semantic_scholar: "semantic_scholar";
|
|
487
|
+
}>;
|
|
488
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodString>]>;
|
|
489
|
+
}, z.core.$strip>>;
|
|
490
|
+
}, z.core.$strip>>;
|
|
491
|
+
verdict: z.ZodEnum<{
|
|
492
|
+
verified: "verified";
|
|
493
|
+
metadata_mismatch: "metadata_mismatch";
|
|
494
|
+
not_found: "not_found";
|
|
495
|
+
unverifiable: "unverifiable";
|
|
496
|
+
inconclusive: "inconclusive";
|
|
497
|
+
}>;
|
|
498
|
+
coverage: z.ZodEnum<{
|
|
499
|
+
none: "none";
|
|
500
|
+
complete: "complete";
|
|
501
|
+
partial: "partial";
|
|
502
|
+
}>;
|
|
503
|
+
}, z.core.$strip>;
|
|
504
|
+
export type CitationResolutionResult = z.infer<typeof CitationResolutionResultSchema>;
|
|
505
|
+
export interface CitationResolveOptions {
|
|
506
|
+
readonly signal?: AbortSignal;
|
|
507
|
+
}
|
|
508
|
+
export interface CitationResolver {
|
|
509
|
+
resolveOne(input: CitationInput, options?: CitationResolveOptions): Promise<CitationResolutionResult>;
|
|
510
|
+
resolveMany(inputs: readonly CitationInput[], options?: CitationResolveOptions): Promise<CitationResolutionResult[]>;
|
|
511
|
+
}
|
|
512
|
+
export declare const CitationSourceOperationSchema: z.ZodEnum<{
|
|
513
|
+
none: "none";
|
|
514
|
+
doi_exact: "doi_exact";
|
|
515
|
+
crossref_doi_if_owned: "crossref_doi_if_owned";
|
|
516
|
+
crossref_bibliographic: "crossref_bibliographic";
|
|
517
|
+
pubmed_exact: "pubmed_exact";
|
|
518
|
+
pubmed_doi: "pubmed_doi";
|
|
519
|
+
pubmed_structured: "pubmed_structured";
|
|
520
|
+
pubmed_title: "pubmed_title";
|
|
521
|
+
arxiv_exact: "arxiv_exact";
|
|
522
|
+
arxiv_bibliographic: "arxiv_bibliographic";
|
|
523
|
+
semantic_scholar_identifier: "semantic_scholar_identifier";
|
|
524
|
+
semantic_scholar_bibliographic: "semantic_scholar_bibliographic";
|
|
525
|
+
}>;
|
|
526
|
+
export type CitationSourceOperation = z.infer<typeof CitationSourceOperationSchema>;
|
|
527
|
+
export declare const CitationSourcePlanItemSchema: z.ZodObject<{
|
|
528
|
+
source: z.ZodEnum<{
|
|
529
|
+
arxiv: "arxiv";
|
|
530
|
+
doi_registry: "doi_registry";
|
|
531
|
+
crossref: "crossref";
|
|
532
|
+
pubmed: "pubmed";
|
|
533
|
+
semantic_scholar: "semantic_scholar";
|
|
534
|
+
}>;
|
|
535
|
+
applicable: z.ZodBoolean;
|
|
536
|
+
operation: z.ZodEnum<{
|
|
537
|
+
none: "none";
|
|
538
|
+
doi_exact: "doi_exact";
|
|
539
|
+
crossref_doi_if_owned: "crossref_doi_if_owned";
|
|
540
|
+
crossref_bibliographic: "crossref_bibliographic";
|
|
541
|
+
pubmed_exact: "pubmed_exact";
|
|
542
|
+
pubmed_doi: "pubmed_doi";
|
|
543
|
+
pubmed_structured: "pubmed_structured";
|
|
544
|
+
pubmed_title: "pubmed_title";
|
|
545
|
+
arxiv_exact: "arxiv_exact";
|
|
546
|
+
arxiv_bibliographic: "arxiv_bibliographic";
|
|
547
|
+
semantic_scholar_identifier: "semantic_scholar_identifier";
|
|
548
|
+
semantic_scholar_bibliographic: "semantic_scholar_bibliographic";
|
|
549
|
+
}>;
|
|
550
|
+
candidateGeneration: z.ZodBoolean;
|
|
551
|
+
reason: z.ZodString;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
export type CitationSourcePlanItem = z.infer<typeof CitationSourcePlanItemSchema>;
|
|
554
|
+
/**
|
|
555
|
+
* What the DOI registry established about who registered a DOI, for a source
|
|
556
|
+
* whose applicability turns on it.
|
|
557
|
+
*
|
|
558
|
+
* `undetermined` is not `absent`. A registry that timed out, was disabled, or
|
|
559
|
+
* never answered has established nothing, and a source that declines to run on
|
|
560
|
+
* that basis must report the gap rather than an ownership finding it never made
|
|
561
|
+
* — the difference between "another agency owns this" and "we could not tell"
|
|
562
|
+
* is exactly what a reader of `sourceOutcomes` needs.
|
|
563
|
+
*/
|
|
564
|
+
export type RegistrationAgencyEvidence = {
|
|
565
|
+
readonly status: "determined";
|
|
566
|
+
readonly agency: string;
|
|
567
|
+
} | {
|
|
568
|
+
readonly status: "absent";
|
|
569
|
+
} | {
|
|
570
|
+
readonly status: "undetermined";
|
|
571
|
+
readonly detail: string;
|
|
572
|
+
};
|
|
573
|
+
export interface CitationSourceRequest {
|
|
574
|
+
readonly input: CitationInput;
|
|
575
|
+
readonly normalized: NormalizedCitation;
|
|
576
|
+
readonly plan: CitationSourcePlanItem;
|
|
577
|
+
readonly registrationAgency: RegistrationAgencyEvidence;
|
|
578
|
+
}
|
|
579
|
+
export interface CitationSourceClient {
|
|
580
|
+
readonly source: CitationSource;
|
|
581
|
+
resolve(request: CitationSourceRequest, signal?: AbortSignal): Promise<CitationSourceOutcome>;
|
|
582
|
+
resolveMany?(requests: readonly CitationSourceRequest[], signal?: AbortSignal): Promise<CitationSourceOutcome[]>;
|
|
583
|
+
}
|