paper-search-cli 0.1.2 → 0.2.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/.env.example +31 -3
- package/README-sc.md +151 -36
- package/README.md +150 -27
- package/dist/cli.js +21 -0
- package/dist/cli.js.map +1 -1
- package/dist/config/ConfigService.d.ts +1 -1
- package/dist/config/ConfigService.d.ts.map +1 -1
- package/dist/config/ConfigService.js +6 -1
- package/dist/config/ConfigService.js.map +1 -1
- package/dist/config/constants.d.ts +6 -0
- package/dist/config/constants.d.ts.map +1 -1
- package/dist/config/constants.js +4 -1
- package/dist/config/constants.js.map +1 -1
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/diagnostics.js +54 -12
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/handleToolCall.d.ts.map +1 -1
- package/dist/core/handleToolCall.js +77 -7
- package/dist/core/handleToolCall.js.map +1 -1
- package/dist/core/platformMetadata.d.ts +28 -0
- package/dist/core/platformMetadata.d.ts.map +1 -0
- package/dist/core/platformMetadata.js +258 -0
- package/dist/core/platformMetadata.js.map +1 -0
- package/dist/core/schemas.d.ts +134 -74
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +42 -38
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/searchers.d.ts +11 -0
- package/dist/core/searchers.d.ts.map +1 -1
- package/dist/core/searchers.js +17 -1
- package/dist/core/searchers.js.map +1 -1
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +82 -30
- package/dist/core/tools.js.map +1 -1
- package/dist/platforms/ACMSearcher.d.ts +16 -0
- package/dist/platforms/ACMSearcher.d.ts.map +1 -0
- package/dist/platforms/ACMSearcher.js +125 -0
- package/dist/platforms/ACMSearcher.js.map +1 -0
- package/dist/platforms/ArxivSearcher.d.ts.map +1 -1
- package/dist/platforms/ArxivSearcher.js +10 -2
- package/dist/platforms/ArxivSearcher.js.map +1 -1
- package/dist/platforms/DBLPSearcher.d.ts +16 -0
- package/dist/platforms/DBLPSearcher.d.ts.map +1 -0
- package/dist/platforms/DBLPSearcher.js +116 -0
- package/dist/platforms/DBLPSearcher.js.map +1 -0
- package/dist/platforms/IEEESearcher.d.ts +15 -0
- package/dist/platforms/IEEESearcher.d.ts.map +1 -0
- package/dist/platforms/IEEESearcher.js +123 -0
- package/dist/platforms/IEEESearcher.js.map +1 -0
- package/dist/platforms/OpenAIRESearcher.d.ts.map +1 -1
- package/dist/platforms/OpenAIRESearcher.js +9 -1
- package/dist/platforms/OpenAIRESearcher.js.map +1 -1
- package/dist/platforms/OpenReviewSearcher.d.ts +19 -0
- package/dist/platforms/OpenReviewSearcher.d.ts.map +1 -0
- package/dist/platforms/OpenReviewSearcher.js +141 -0
- package/dist/platforms/OpenReviewSearcher.js.map +1 -0
- package/dist/platforms/PaperSource.d.ts +6 -0
- package/dist/platforms/PaperSource.d.ts.map +1 -1
- package/dist/platforms/PaperSource.js.map +1 -1
- package/dist/platforms/PubMedSearcher.d.ts.map +1 -1
- package/dist/platforms/PubMedSearcher.js +8 -0
- package/dist/platforms/PubMedSearcher.js.map +1 -1
- package/dist/platforms/USENIXSearcher.d.ts +14 -0
- package/dist/platforms/USENIXSearcher.d.ts.map +1 -0
- package/dist/platforms/USENIXSearcher.js +75 -0
- package/dist/platforms/USENIXSearcher.js.map +1 -0
- package/dist/services/JournalMetricsService.d.ts +38 -0
- package/dist/services/JournalMetricsService.d.ts.map +1 -0
- package/dist/services/JournalMetricsService.js +142 -0
- package/dist/services/JournalMetricsService.js.map +1 -0
- package/dist/services/MultiSourceSearchService.d.ts.map +1 -1
- package/dist/services/MultiSourceSearchService.js +8 -34
- package/dist/services/MultiSourceSearchService.js.map +1 -1
- package/dist/services/OpenAccessFallbackService.d.ts +1 -0
- package/dist/services/OpenAccessFallbackService.d.ts.map +1 -1
- package/dist/services/OpenAccessFallbackService.js +2 -2
- package/dist/services/OpenAccessFallbackService.js.map +1 -1
- package/dist/utils/HttpClient.d.ts +6 -0
- package/dist/utils/HttpClient.d.ts.map +1 -0
- package/dist/utils/HttpClient.js +30 -0
- package/dist/utils/HttpClient.js.map +1 -0
- package/dist/utils/PdfDownload.d.ts.map +1 -1
- package/dist/utils/PdfDownload.js +106 -16
- package/dist/utils/PdfDownload.js.map +1 -1
- package/package.json +3 -1
- package/skills/paper-search/SKILL.md +38 -8
package/dist/core/schemas.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const SearchPapersSchema: z.ZodObject<{
|
|
3
3
|
query: z.ZodString;
|
|
4
|
-
platform: z.ZodDefault<z.ZodOptional<z.
|
|
4
|
+
platform: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodLiteral<"all">]>>>;
|
|
5
5
|
sources: z.ZodOptional<z.ZodString>;
|
|
6
6
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
7
7
|
year: z.ZodOptional<z.ZodString>;
|
|
@@ -14,32 +14,32 @@ export declare const SearchPapersSchema: z.ZodObject<{
|
|
|
14
14
|
sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["relevance", "date", "citations"]>>>;
|
|
15
15
|
sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
query: string;
|
|
18
|
-
platform: "arxiv" | "webofscience" | "pubmed" | "wos" | "biorxiv" | "medrxiv" | "semantic" | "iacr" | "googlescholar" | "scholar" | "scihub" | "sciencedirect" | "springer" | "scopus" | "crossref" | "openalex" | "unpaywall" | "pmc" | "europepmc" | "core" | "openaire" | "all";
|
|
19
17
|
maxResults: number;
|
|
20
|
-
sortOrder: "asc" | "desc";
|
|
21
18
|
sortBy: "relevance" | "date" | "citations";
|
|
22
|
-
|
|
19
|
+
sortOrder: "asc" | "desc";
|
|
20
|
+
query: string;
|
|
21
|
+
platform: string;
|
|
23
22
|
journal?: string | undefined;
|
|
24
23
|
year?: string | undefined;
|
|
24
|
+
author?: string | undefined;
|
|
25
|
+
category?: string | undefined;
|
|
26
|
+
days?: number | undefined;
|
|
25
27
|
fetchDetails?: boolean | undefined;
|
|
26
28
|
fieldsOfStudy?: string[] | undefined;
|
|
27
|
-
days?: number | undefined;
|
|
28
|
-
category?: string | undefined;
|
|
29
29
|
sources?: string | undefined;
|
|
30
30
|
}, {
|
|
31
31
|
query: string;
|
|
32
|
-
author?: string | undefined;
|
|
33
32
|
journal?: string | undefined;
|
|
34
|
-
platform?: "arxiv" | "webofscience" | "pubmed" | "wos" | "biorxiv" | "medrxiv" | "semantic" | "iacr" | "googlescholar" | "scholar" | "scihub" | "sciencedirect" | "springer" | "scopus" | "crossref" | "openalex" | "unpaywall" | "pmc" | "europepmc" | "core" | "openaire" | "all" | undefined;
|
|
35
33
|
year?: string | undefined;
|
|
36
34
|
maxResults?: number | undefined;
|
|
37
|
-
|
|
35
|
+
author?: string | undefined;
|
|
36
|
+
category?: string | undefined;
|
|
38
37
|
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
38
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
39
|
+
days?: number | undefined;
|
|
39
40
|
fetchDetails?: boolean | undefined;
|
|
40
41
|
fieldsOfStudy?: string[] | undefined;
|
|
41
|
-
|
|
42
|
-
category?: string | undefined;
|
|
42
|
+
platform?: string | undefined;
|
|
43
43
|
sources?: string | undefined;
|
|
44
44
|
}>;
|
|
45
45
|
export declare const SearchArxivSchema: z.ZodObject<{
|
|
@@ -51,21 +51,21 @@ export declare const SearchArxivSchema: z.ZodObject<{
|
|
|
51
51
|
sortBy: z.ZodOptional<z.ZodEnum<["relevance", "date", "citations"]>>;
|
|
52
52
|
sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
query: string;
|
|
55
54
|
maxResults: number;
|
|
56
|
-
|
|
55
|
+
query: string;
|
|
57
56
|
year?: string | undefined;
|
|
58
|
-
|
|
59
|
-
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
57
|
+
author?: string | undefined;
|
|
60
58
|
category?: string | undefined;
|
|
59
|
+
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
60
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
61
61
|
}, {
|
|
62
62
|
query: string;
|
|
63
|
-
author?: string | undefined;
|
|
64
63
|
year?: string | undefined;
|
|
65
64
|
maxResults?: number | undefined;
|
|
66
|
-
|
|
67
|
-
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
65
|
+
author?: string | undefined;
|
|
68
66
|
category?: string | undefined;
|
|
67
|
+
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
68
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
69
69
|
}>;
|
|
70
70
|
export declare const SearchWebOfScienceSchema: z.ZodObject<{
|
|
71
71
|
query: z.ZodString;
|
|
@@ -76,21 +76,21 @@ export declare const SearchWebOfScienceSchema: z.ZodObject<{
|
|
|
76
76
|
sortBy: z.ZodOptional<z.ZodEnum<["relevance", "date", "citations", "title", "author", "journal"]>>;
|
|
77
77
|
sortOrder: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
78
78
|
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
query: string;
|
|
80
79
|
maxResults: number;
|
|
81
|
-
|
|
80
|
+
query: string;
|
|
82
81
|
journal?: string | undefined;
|
|
83
82
|
year?: string | undefined;
|
|
83
|
+
author?: string | undefined;
|
|
84
|
+
sortBy?: "title" | "journal" | "relevance" | "date" | "citations" | "author" | undefined;
|
|
84
85
|
sortOrder?: "asc" | "desc" | undefined;
|
|
85
|
-
sortBy?: "relevance" | "date" | "citations" | "title" | "author" | "journal" | undefined;
|
|
86
86
|
}, {
|
|
87
87
|
query: string;
|
|
88
|
-
author?: string | undefined;
|
|
89
88
|
journal?: string | undefined;
|
|
90
89
|
year?: string | undefined;
|
|
91
90
|
maxResults?: number | undefined;
|
|
91
|
+
author?: string | undefined;
|
|
92
|
+
sortBy?: "title" | "journal" | "relevance" | "date" | "citations" | "author" | undefined;
|
|
92
93
|
sortOrder?: "asc" | "desc" | undefined;
|
|
93
|
-
sortBy?: "relevance" | "date" | "citations" | "title" | "author" | "journal" | undefined;
|
|
94
94
|
}>;
|
|
95
95
|
export declare const SearchPubMedSchema: z.ZodObject<{
|
|
96
96
|
query: z.ZodString;
|
|
@@ -101,19 +101,19 @@ export declare const SearchPubMedSchema: z.ZodObject<{
|
|
|
101
101
|
publicationType: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
102
102
|
sortBy: z.ZodOptional<z.ZodEnum<["relevance", "date"]>>;
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
query: string;
|
|
105
104
|
maxResults: number;
|
|
106
|
-
|
|
105
|
+
query: string;
|
|
107
106
|
journal?: string | undefined;
|
|
108
107
|
year?: string | undefined;
|
|
108
|
+
author?: string | undefined;
|
|
109
109
|
sortBy?: "relevance" | "date" | undefined;
|
|
110
110
|
publicationType?: string[] | undefined;
|
|
111
111
|
}, {
|
|
112
112
|
query: string;
|
|
113
|
-
author?: string | undefined;
|
|
114
113
|
journal?: string | undefined;
|
|
115
114
|
year?: string | undefined;
|
|
116
115
|
maxResults?: number | undefined;
|
|
116
|
+
author?: string | undefined;
|
|
117
117
|
sortBy?: "relevance" | "date" | undefined;
|
|
118
118
|
publicationType?: string[] | undefined;
|
|
119
119
|
}>;
|
|
@@ -123,15 +123,15 @@ export declare const SearchBioRxivSchema: z.ZodObject<{
|
|
|
123
123
|
days: z.ZodOptional<z.ZodNumber>;
|
|
124
124
|
category: z.ZodOptional<z.ZodString>;
|
|
125
125
|
}, "strip", z.ZodTypeAny, {
|
|
126
|
-
query: string;
|
|
127
126
|
maxResults: number;
|
|
128
|
-
|
|
127
|
+
query: string;
|
|
129
128
|
category?: string | undefined;
|
|
129
|
+
days?: number | undefined;
|
|
130
130
|
}, {
|
|
131
131
|
query: string;
|
|
132
132
|
maxResults?: number | undefined;
|
|
133
|
-
days?: number | undefined;
|
|
134
133
|
category?: string | undefined;
|
|
134
|
+
days?: number | undefined;
|
|
135
135
|
}>;
|
|
136
136
|
export declare const SearchMedRxivSchema: z.ZodObject<{
|
|
137
137
|
query: z.ZodString;
|
|
@@ -139,15 +139,15 @@ export declare const SearchMedRxivSchema: z.ZodObject<{
|
|
|
139
139
|
days: z.ZodOptional<z.ZodNumber>;
|
|
140
140
|
category: z.ZodOptional<z.ZodString>;
|
|
141
141
|
}, "strip", z.ZodTypeAny, {
|
|
142
|
-
query: string;
|
|
143
142
|
maxResults: number;
|
|
144
|
-
|
|
143
|
+
query: string;
|
|
145
144
|
category?: string | undefined;
|
|
145
|
+
days?: number | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
query: string;
|
|
148
148
|
maxResults?: number | undefined;
|
|
149
|
-
days?: number | undefined;
|
|
150
149
|
category?: string | undefined;
|
|
150
|
+
days?: number | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
export declare const SearchSemanticScholarSchema: z.ZodObject<{
|
|
153
153
|
query: z.ZodString;
|
|
@@ -155,8 +155,8 @@ export declare const SearchSemanticScholarSchema: z.ZodObject<{
|
|
|
155
155
|
year: z.ZodOptional<z.ZodString>;
|
|
156
156
|
fieldsOfStudy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
157
157
|
}, "strip", z.ZodTypeAny, {
|
|
158
|
-
query: string;
|
|
159
158
|
maxResults: number;
|
|
159
|
+
query: string;
|
|
160
160
|
year?: string | undefined;
|
|
161
161
|
fieldsOfStudy?: string[] | undefined;
|
|
162
162
|
}, {
|
|
@@ -179,21 +179,21 @@ export declare const SearchSemanticSnippetsSchema: z.ZodObject<{
|
|
|
179
179
|
}, "strip", z.ZodTypeAny, {
|
|
180
180
|
query: string;
|
|
181
181
|
limit: number;
|
|
182
|
-
year?: string | undefined;
|
|
183
|
-
fieldsOfStudy?: string | string[] | undefined;
|
|
184
182
|
authors?: string | string[] | undefined;
|
|
183
|
+
year?: string | undefined;
|
|
185
184
|
venue?: string | string[] | undefined;
|
|
185
|
+
fieldsOfStudy?: string | string[] | undefined;
|
|
186
186
|
fields?: string | string[] | undefined;
|
|
187
187
|
paperIds?: string | string[] | undefined;
|
|
188
188
|
minCitationCount?: number | undefined;
|
|
189
189
|
publicationDateOrYear?: string | undefined;
|
|
190
190
|
}, {
|
|
191
191
|
query: string;
|
|
192
|
-
year?: string | undefined;
|
|
193
|
-
limit?: number | undefined;
|
|
194
|
-
fieldsOfStudy?: string | string[] | undefined;
|
|
195
192
|
authors?: string | string[] | undefined;
|
|
193
|
+
year?: string | undefined;
|
|
196
194
|
venue?: string | string[] | undefined;
|
|
195
|
+
fieldsOfStudy?: string | string[] | undefined;
|
|
196
|
+
limit?: number | undefined;
|
|
197
197
|
fields?: string | string[] | undefined;
|
|
198
198
|
paperIds?: string | string[] | undefined;
|
|
199
199
|
minCitationCount?: number | undefined;
|
|
@@ -204,8 +204,8 @@ export declare const SearchIACRSchema: z.ZodObject<{
|
|
|
204
204
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
205
205
|
fetchDetails: z.ZodOptional<z.ZodBoolean>;
|
|
206
206
|
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
query: string;
|
|
208
207
|
maxResults: number;
|
|
208
|
+
query: string;
|
|
209
209
|
fetchDetails?: boolean | undefined;
|
|
210
210
|
}, {
|
|
211
211
|
query: string;
|
|
@@ -214,15 +214,15 @@ export declare const SearchIACRSchema: z.ZodObject<{
|
|
|
214
214
|
}>;
|
|
215
215
|
export declare const DownloadPaperSchema: z.ZodObject<{
|
|
216
216
|
paperId: z.ZodString;
|
|
217
|
-
platform: z.
|
|
217
|
+
platform: z.ZodEffects<z.ZodString, string, string>;
|
|
218
218
|
savePath: z.ZodOptional<z.ZodString>;
|
|
219
219
|
}, "strip", z.ZodTypeAny, {
|
|
220
220
|
paperId: string;
|
|
221
|
-
platform:
|
|
221
|
+
platform: string;
|
|
222
222
|
savePath?: string | undefined;
|
|
223
223
|
}, {
|
|
224
224
|
paperId: string;
|
|
225
|
-
platform:
|
|
225
|
+
platform: string;
|
|
226
226
|
savePath?: string | undefined;
|
|
227
227
|
}>;
|
|
228
228
|
export declare const SearchGoogleScholarSchema: z.ZodObject<{
|
|
@@ -232,15 +232,15 @@ export declare const SearchGoogleScholarSchema: z.ZodObject<{
|
|
|
232
232
|
yearHigh: z.ZodOptional<z.ZodNumber>;
|
|
233
233
|
author: z.ZodOptional<z.ZodString>;
|
|
234
234
|
}, "strip", z.ZodTypeAny, {
|
|
235
|
-
query: string;
|
|
236
235
|
maxResults: number;
|
|
236
|
+
query: string;
|
|
237
237
|
author?: string | undefined;
|
|
238
238
|
yearLow?: number | undefined;
|
|
239
239
|
yearHigh?: number | undefined;
|
|
240
240
|
}, {
|
|
241
241
|
query: string;
|
|
242
|
-
author?: string | undefined;
|
|
243
242
|
maxResults?: number | undefined;
|
|
243
|
+
author?: string | undefined;
|
|
244
244
|
yearLow?: number | undefined;
|
|
245
245
|
yearHigh?: number | undefined;
|
|
246
246
|
}>;
|
|
@@ -248,11 +248,11 @@ export declare const GetPaperByDoiSchema: z.ZodObject<{
|
|
|
248
248
|
doi: z.ZodString;
|
|
249
249
|
platform: z.ZodDefault<z.ZodOptional<z.ZodEnum<["arxiv", "webofscience", "pubmed", "crossref", "openalex", "unpaywall", "pmc", "europepmc", "core", "all"]>>>;
|
|
250
250
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
-
platform: "arxiv" | "webofscience" | "pubmed" | "crossref" | "openalex" | "unpaywall" | "pmc" | "europepmc" | "core" | "all";
|
|
252
251
|
doi: string;
|
|
252
|
+
platform: "crossref" | "openalex" | "pubmed" | "pmc" | "europepmc" | "arxiv" | "core" | "webofscience" | "unpaywall" | "all";
|
|
253
253
|
}, {
|
|
254
254
|
doi: string;
|
|
255
|
-
platform?: "
|
|
255
|
+
platform?: "crossref" | "openalex" | "pubmed" | "pmc" | "europepmc" | "arxiv" | "core" | "webofscience" | "unpaywall" | "all" | undefined;
|
|
256
256
|
}>;
|
|
257
257
|
export declare const SearchSciHubSchema: z.ZodObject<{
|
|
258
258
|
doiOrUrl: z.ZodString;
|
|
@@ -282,18 +282,18 @@ export declare const SearchScienceDirectSchema: z.ZodObject<{
|
|
|
282
282
|
journal: z.ZodOptional<z.ZodString>;
|
|
283
283
|
openAccess: z.ZodOptional<z.ZodBoolean>;
|
|
284
284
|
}, "strip", z.ZodTypeAny, {
|
|
285
|
-
query: string;
|
|
286
285
|
maxResults: number;
|
|
287
|
-
|
|
286
|
+
query: string;
|
|
288
287
|
journal?: string | undefined;
|
|
289
288
|
year?: string | undefined;
|
|
289
|
+
author?: string | undefined;
|
|
290
290
|
openAccess?: boolean | undefined;
|
|
291
291
|
}, {
|
|
292
292
|
query: string;
|
|
293
|
-
author?: string | undefined;
|
|
294
293
|
journal?: string | undefined;
|
|
295
294
|
year?: string | undefined;
|
|
296
295
|
maxResults?: number | undefined;
|
|
296
|
+
author?: string | undefined;
|
|
297
297
|
openAccess?: boolean | undefined;
|
|
298
298
|
}>;
|
|
299
299
|
export declare const SearchSpringerSchema: z.ZodObject<{
|
|
@@ -306,23 +306,23 @@ export declare const SearchSpringerSchema: z.ZodObject<{
|
|
|
306
306
|
openAccess: z.ZodOptional<z.ZodBoolean>;
|
|
307
307
|
type: z.ZodOptional<z.ZodEnum<["Journal", "Book", "Chapter"]>>;
|
|
308
308
|
}, "strip", z.ZodTypeAny, {
|
|
309
|
-
query: string;
|
|
310
309
|
maxResults: number;
|
|
311
|
-
|
|
312
|
-
author?: string | undefined;
|
|
310
|
+
query: string;
|
|
313
311
|
journal?: string | undefined;
|
|
314
312
|
year?: string | undefined;
|
|
315
|
-
|
|
313
|
+
author?: string | undefined;
|
|
316
314
|
openAccess?: boolean | undefined;
|
|
315
|
+
subject?: string | undefined;
|
|
316
|
+
type?: "Journal" | "Book" | "Chapter" | undefined;
|
|
317
317
|
}, {
|
|
318
318
|
query: string;
|
|
319
|
-
type?: "Journal" | "Book" | "Chapter" | undefined;
|
|
320
|
-
author?: string | undefined;
|
|
321
319
|
journal?: string | undefined;
|
|
322
320
|
year?: string | undefined;
|
|
323
321
|
maxResults?: number | undefined;
|
|
324
|
-
|
|
322
|
+
author?: string | undefined;
|
|
325
323
|
openAccess?: boolean | undefined;
|
|
324
|
+
subject?: string | undefined;
|
|
325
|
+
type?: "Journal" | "Book" | "Chapter" | undefined;
|
|
326
326
|
}>;
|
|
327
327
|
export declare const SearchWileySchema: z.ZodObject<{
|
|
328
328
|
query: z.ZodString;
|
|
@@ -342,24 +342,24 @@ export declare const SearchScopusSchema: z.ZodObject<{
|
|
|
342
342
|
openAccess: z.ZodOptional<z.ZodBoolean>;
|
|
343
343
|
documentType: z.ZodOptional<z.ZodEnum<["ar", "cp", "re", "bk", "ch"]>>;
|
|
344
344
|
}, "strip", z.ZodTypeAny, {
|
|
345
|
-
query: string;
|
|
346
345
|
maxResults: number;
|
|
347
|
-
|
|
346
|
+
query: string;
|
|
348
347
|
journal?: string | undefined;
|
|
349
348
|
year?: string | undefined;
|
|
350
|
-
|
|
351
|
-
subject?: string | undefined;
|
|
349
|
+
author?: string | undefined;
|
|
352
350
|
openAccess?: boolean | undefined;
|
|
351
|
+
subject?: string | undefined;
|
|
352
|
+
affiliation?: string | undefined;
|
|
353
353
|
documentType?: "ar" | "cp" | "re" | "bk" | "ch" | undefined;
|
|
354
354
|
}, {
|
|
355
355
|
query: string;
|
|
356
|
-
author?: string | undefined;
|
|
357
356
|
journal?: string | undefined;
|
|
358
357
|
year?: string | undefined;
|
|
359
358
|
maxResults?: number | undefined;
|
|
360
|
-
|
|
361
|
-
subject?: string | undefined;
|
|
359
|
+
author?: string | undefined;
|
|
362
360
|
openAccess?: boolean | undefined;
|
|
361
|
+
subject?: string | undefined;
|
|
362
|
+
affiliation?: string | undefined;
|
|
363
363
|
documentType?: "ar" | "cp" | "re" | "bk" | "ch" | undefined;
|
|
364
364
|
}>;
|
|
365
365
|
export declare const SearchCrossrefSchema: z.ZodObject<{
|
|
@@ -370,27 +370,27 @@ export declare const SearchCrossrefSchema: z.ZodObject<{
|
|
|
370
370
|
sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["relevance", "date", "citations"]>>>;
|
|
371
371
|
sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
372
372
|
}, "strip", z.ZodTypeAny, {
|
|
373
|
-
query: string;
|
|
374
373
|
maxResults: number;
|
|
375
|
-
sortOrder: "asc" | "desc";
|
|
376
374
|
sortBy: "relevance" | "date" | "citations";
|
|
377
|
-
|
|
375
|
+
sortOrder: "asc" | "desc";
|
|
376
|
+
query: string;
|
|
378
377
|
year?: string | undefined;
|
|
378
|
+
author?: string | undefined;
|
|
379
379
|
}, {
|
|
380
380
|
query: string;
|
|
381
|
-
author?: string | undefined;
|
|
382
381
|
year?: string | undefined;
|
|
383
382
|
maxResults?: number | undefined;
|
|
384
|
-
|
|
383
|
+
author?: string | undefined;
|
|
385
384
|
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
385
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
386
386
|
}>;
|
|
387
387
|
export declare const SearchOpenAlexSchema: z.ZodObject<{
|
|
388
388
|
query: z.ZodString;
|
|
389
389
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
390
390
|
year: z.ZodOptional<z.ZodString>;
|
|
391
391
|
}, "strip", z.ZodTypeAny, {
|
|
392
|
-
query: string;
|
|
393
392
|
maxResults: number;
|
|
393
|
+
query: string;
|
|
394
394
|
year?: string | undefined;
|
|
395
395
|
}, {
|
|
396
396
|
query: string;
|
|
@@ -401,8 +401,8 @@ export declare const SearchUnpaywallSchema: z.ZodObject<{
|
|
|
401
401
|
query: z.ZodString;
|
|
402
402
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
403
403
|
}, "strip", z.ZodTypeAny, {
|
|
404
|
-
query: string;
|
|
405
404
|
maxResults: number;
|
|
405
|
+
query: string;
|
|
406
406
|
}, {
|
|
407
407
|
query: string;
|
|
408
408
|
maxResults?: number | undefined;
|
|
@@ -412,13 +412,47 @@ export declare const SearchPMCStyleSchema: z.ZodObject<{
|
|
|
412
412
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
413
413
|
year: z.ZodOptional<z.ZodString>;
|
|
414
414
|
}, "strip", z.ZodTypeAny, {
|
|
415
|
+
maxResults: number;
|
|
416
|
+
query: string;
|
|
417
|
+
year?: string | undefined;
|
|
418
|
+
}, {
|
|
415
419
|
query: string;
|
|
420
|
+
year?: string | undefined;
|
|
421
|
+
maxResults?: number | undefined;
|
|
422
|
+
}>;
|
|
423
|
+
export declare const GenericPlatformSearchSchema: z.ZodObject<{
|
|
424
|
+
query: z.ZodString;
|
|
425
|
+
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
426
|
+
year: z.ZodOptional<z.ZodString>;
|
|
427
|
+
author: z.ZodOptional<z.ZodString>;
|
|
428
|
+
journal: z.ZodOptional<z.ZodString>;
|
|
429
|
+
venue: z.ZodOptional<z.ZodString>;
|
|
430
|
+
articleTitle: z.ZodOptional<z.ZodString>;
|
|
431
|
+
startRecord: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["relevance", "date", "citations"]>>>;
|
|
433
|
+
sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
434
|
+
}, "strip", z.ZodTypeAny, {
|
|
416
435
|
maxResults: number;
|
|
436
|
+
sortBy: "relevance" | "date" | "citations";
|
|
437
|
+
sortOrder: "asc" | "desc";
|
|
438
|
+
query: string;
|
|
439
|
+
journal?: string | undefined;
|
|
417
440
|
year?: string | undefined;
|
|
441
|
+
author?: string | undefined;
|
|
442
|
+
venue?: string | undefined;
|
|
443
|
+
articleTitle?: string | undefined;
|
|
444
|
+
startRecord?: number | undefined;
|
|
418
445
|
}, {
|
|
419
446
|
query: string;
|
|
447
|
+
journal?: string | undefined;
|
|
420
448
|
year?: string | undefined;
|
|
421
449
|
maxResults?: number | undefined;
|
|
450
|
+
author?: string | undefined;
|
|
451
|
+
venue?: string | undefined;
|
|
452
|
+
sortBy?: "relevance" | "date" | "citations" | undefined;
|
|
453
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
454
|
+
articleTitle?: string | undefined;
|
|
455
|
+
startRecord?: number | undefined;
|
|
422
456
|
}>;
|
|
423
457
|
export declare const DownloadWithFallbackSchema: z.ZodObject<{
|
|
424
458
|
source: z.ZodString;
|
|
@@ -428,10 +462,10 @@ export declare const DownloadWithFallbackSchema: z.ZodObject<{
|
|
|
428
462
|
savePath: z.ZodOptional<z.ZodString>;
|
|
429
463
|
useSciHub: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
430
464
|
}, "strip", z.ZodTypeAny, {
|
|
431
|
-
title: string;
|
|
432
465
|
paperId: string;
|
|
433
|
-
|
|
466
|
+
title: string;
|
|
434
467
|
source: string;
|
|
468
|
+
doi: string;
|
|
435
469
|
useSciHub: boolean;
|
|
436
470
|
savePath?: string | undefined;
|
|
437
471
|
}, {
|
|
@@ -449,6 +483,32 @@ export declare const GetPlatformStatusSchema: z.ZodObject<{
|
|
|
449
483
|
}, {
|
|
450
484
|
validate?: boolean | undefined;
|
|
451
485
|
}>;
|
|
452
|
-
export
|
|
486
|
+
export declare const QueryJournalMetricsSchema: z.ZodEffects<z.ZodObject<{
|
|
487
|
+
journal: z.ZodOptional<z.ZodString>;
|
|
488
|
+
journals: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
489
|
+
file: z.ZodOptional<z.ZodString>;
|
|
490
|
+
includeRaw: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
491
|
+
}, "strip", z.ZodTypeAny, {
|
|
492
|
+
includeRaw: boolean;
|
|
493
|
+
journal?: string | undefined;
|
|
494
|
+
journals?: string | string[] | undefined;
|
|
495
|
+
file?: string | undefined;
|
|
496
|
+
}, {
|
|
497
|
+
journal?: string | undefined;
|
|
498
|
+
journals?: string | string[] | undefined;
|
|
499
|
+
file?: string | undefined;
|
|
500
|
+
includeRaw?: boolean | undefined;
|
|
501
|
+
}>, {
|
|
502
|
+
includeRaw: boolean;
|
|
503
|
+
journal?: string | undefined;
|
|
504
|
+
journals?: string | string[] | undefined;
|
|
505
|
+
file?: string | undefined;
|
|
506
|
+
}, {
|
|
507
|
+
journal?: string | undefined;
|
|
508
|
+
journals?: string | string[] | undefined;
|
|
509
|
+
file?: string | undefined;
|
|
510
|
+
includeRaw?: boolean | undefined;
|
|
511
|
+
}>;
|
|
512
|
+
export type ToolName = string | 'search_papers' | 'search_arxiv' | 'search_webofscience' | 'search_pubmed' | 'search_biorxiv' | 'search_medrxiv' | 'search_semantic_scholar' | 'search_semantic_snippets' | 'search_iacr' | 'download_paper' | 'search_google_scholar' | 'get_paper_by_doi' | 'search_scihub' | 'check_scihub_mirrors' | 'get_platform_status' | 'search_sciencedirect' | 'search_springer' | 'search_wiley' | 'search_scopus' | 'search_crossref' | 'search_openalex' | 'search_unpaywall' | 'search_pmc' | 'search_europepmc' | 'search_core' | 'search_openaire' | 'download_with_fallback' | 'query_journal_metrics';
|
|
453
513
|
export declare function parseToolArgs(toolName: ToolName, args: unknown): any;
|
|
454
514
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/core/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBrB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;EAUpB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAY3B,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;EAUrB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAOtB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAAsB,CAAC;AAEvD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAO9B,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa/B,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAMnB,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAQtB,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAQ5B,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;EAmBtB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAMrB,CAAC;AAEX,eAAO,MAAM,wBAAwB;;;;;;EAI3B,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWvB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;EAIpB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EASvB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAMvB,CAAC;AAEX,eAAO,MAAM,qBAAqB;;;;;;;;;EAKxB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAMvB,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa9B,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;EAI1B,CAAC;AAEX,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;EAUlC,CAAC;AAEL,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,eAAe,GACf,cAAc,GACd,qBAAqB,GACrB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,yBAAyB,GACzB,0BAA0B,GAC1B,aAAa,GACb,gBAAgB,GAChB,uBAAuB,GACvB,kBAAkB,GAClB,eAAe,GACf,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,GACtB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,YAAY,GACZ,kBAAkB,GAClB,aAAa,GACb,iBAAiB,GACjB,wBAAwB,GACxB,uBAAuB,CAAC;AAE5B,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,GAAG,GAAG,CA8DpE"}
|
package/dist/core/schemas.js
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { getGenericSearchToolPlatform, isKnownSearchPlatform } from './platformMetadata.js';
|
|
2
3
|
const SortBySchema = z.enum(['relevance', 'date', 'citations']);
|
|
3
4
|
const SortOrderSchema = z.enum(['asc', 'desc']);
|
|
5
|
+
const SearchPlatformSchema = z
|
|
6
|
+
.string()
|
|
7
|
+
.min(1)
|
|
8
|
+
.refine(value => value === 'all' || isKnownSearchPlatform(value), {
|
|
9
|
+
message: 'Unsupported search platform'
|
|
10
|
+
});
|
|
4
11
|
export const SearchPapersSchema = z
|
|
5
12
|
.object({
|
|
6
13
|
query: z.string().min(1),
|
|
7
14
|
platform: z
|
|
8
|
-
.
|
|
9
|
-
'arxiv',
|
|
10
|
-
'webofscience',
|
|
11
|
-
'pubmed',
|
|
12
|
-
'wos',
|
|
13
|
-
'biorxiv',
|
|
14
|
-
'medrxiv',
|
|
15
|
-
'semantic',
|
|
16
|
-
'iacr',
|
|
17
|
-
'googlescholar',
|
|
18
|
-
'scholar',
|
|
19
|
-
'scihub',
|
|
20
|
-
'sciencedirect',
|
|
21
|
-
'springer',
|
|
22
|
-
'scopus',
|
|
23
|
-
'crossref',
|
|
24
|
-
'openalex',
|
|
25
|
-
'unpaywall',
|
|
26
|
-
'pmc',
|
|
27
|
-
'europepmc',
|
|
28
|
-
'core',
|
|
29
|
-
'openaire',
|
|
30
|
-
'all'
|
|
31
|
-
])
|
|
15
|
+
.union([SearchPlatformSchema, z.literal('all')])
|
|
32
16
|
.optional()
|
|
33
17
|
.default('crossref'),
|
|
34
18
|
sources: z.string().optional(),
|
|
@@ -120,19 +104,9 @@ export const SearchIACRSchema = z
|
|
|
120
104
|
export const DownloadPaperSchema = z
|
|
121
105
|
.object({
|
|
122
106
|
paperId: z.coerce.string().min(1),
|
|
123
|
-
platform: z.
|
|
124
|
-
'
|
|
125
|
-
|
|
126
|
-
'medrxiv',
|
|
127
|
-
'semantic',
|
|
128
|
-
'iacr',
|
|
129
|
-
'scihub',
|
|
130
|
-
'springer',
|
|
131
|
-
'wiley',
|
|
132
|
-
'pmc',
|
|
133
|
-
'europepmc',
|
|
134
|
-
'core'
|
|
135
|
-
]),
|
|
107
|
+
platform: z.coerce.string().min(1).refine(value => value === 'wiley' || isKnownSearchPlatform(value), {
|
|
108
|
+
message: 'Unsupported download platform'
|
|
109
|
+
}),
|
|
136
110
|
savePath: z.coerce.string().optional()
|
|
137
111
|
})
|
|
138
112
|
.strip();
|
|
@@ -247,6 +221,20 @@ export const SearchPMCStyleSchema = z
|
|
|
247
221
|
year: z.string().optional()
|
|
248
222
|
})
|
|
249
223
|
.strip();
|
|
224
|
+
export const GenericPlatformSearchSchema = z
|
|
225
|
+
.object({
|
|
226
|
+
query: z.string().min(1),
|
|
227
|
+
maxResults: z.number().int().min(1).max(100).optional().default(10),
|
|
228
|
+
year: z.string().optional(),
|
|
229
|
+
author: z.string().optional(),
|
|
230
|
+
journal: z.string().optional(),
|
|
231
|
+
venue: z.string().optional(),
|
|
232
|
+
articleTitle: z.string().optional(),
|
|
233
|
+
startRecord: z.number().int().min(1).optional(),
|
|
234
|
+
sortBy: SortBySchema.optional().default('relevance'),
|
|
235
|
+
sortOrder: SortOrderSchema.optional().default('desc')
|
|
236
|
+
})
|
|
237
|
+
.strip();
|
|
250
238
|
export const DownloadWithFallbackSchema = z
|
|
251
239
|
.object({
|
|
252
240
|
source: z.coerce.string().min(1),
|
|
@@ -254,7 +242,7 @@ export const DownloadWithFallbackSchema = z
|
|
|
254
242
|
doi: z.coerce.string().optional().default(''),
|
|
255
243
|
title: z.coerce.string().optional().default(''),
|
|
256
244
|
savePath: z.coerce.string().optional(),
|
|
257
|
-
useSciHub: z.boolean().optional().default(
|
|
245
|
+
useSciHub: z.boolean().optional().default(true)
|
|
258
246
|
})
|
|
259
247
|
.strip();
|
|
260
248
|
export const GetPlatformStatusSchema = z
|
|
@@ -262,7 +250,21 @@ export const GetPlatformStatusSchema = z
|
|
|
262
250
|
validate: z.boolean().optional().default(false)
|
|
263
251
|
})
|
|
264
252
|
.strip();
|
|
253
|
+
export const QueryJournalMetricsSchema = z
|
|
254
|
+
.object({
|
|
255
|
+
journal: z.string().optional(),
|
|
256
|
+
journals: z.union([z.string(), z.array(z.string())]).optional(),
|
|
257
|
+
file: z.string().optional(),
|
|
258
|
+
includeRaw: z.boolean().optional().default(false)
|
|
259
|
+
})
|
|
260
|
+
.strip()
|
|
261
|
+
.refine(value => Boolean(value.journal || value.journals || value.file), {
|
|
262
|
+
message: 'Provide journal, journals, or file'
|
|
263
|
+
});
|
|
265
264
|
export function parseToolArgs(toolName, args) {
|
|
265
|
+
if (getGenericSearchToolPlatform(String(toolName))) {
|
|
266
|
+
return GenericPlatformSearchSchema.parse(args);
|
|
267
|
+
}
|
|
266
268
|
switch (toolName) {
|
|
267
269
|
case 'search_papers':
|
|
268
270
|
return SearchPapersSchema.parse(args);
|
|
@@ -294,6 +296,8 @@ export function parseToolArgs(toolName, args) {
|
|
|
294
296
|
return CheckSciHubMirrorsSchema.parse(args);
|
|
295
297
|
case 'get_platform_status':
|
|
296
298
|
return GetPlatformStatusSchema.parse(args ?? {});
|
|
299
|
+
case 'query_journal_metrics':
|
|
300
|
+
return QueryJournalMetricsSchema.parse(args ?? {});
|
|
297
301
|
case 'search_sciencedirect':
|
|
298
302
|
return SearchScienceDirectSchema.parse(args);
|
|
299
303
|
case 'search_springer':
|