@keystrokehq/semanticscholar 0.1.2 → 0.1.3
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/actions/details-about-a-paper-s-authors.cjs +1 -1
- package/dist/actions/details-about-a-paper-s-authors.cjs.map +1 -1
- package/dist/actions/details-about-a-paper-s-authors.d.cts +1 -1
- package/dist/actions/details-about-a-paper-s-authors.d.mts +1 -1
- package/dist/actions/details-about-a-paper-s-authors.mjs +1 -1
- package/dist/actions/details-about-a-paper-s-authors.mjs.map +1 -1
- package/dist/actions/details-about-a-paper-s-citations.cjs +9 -9
- package/dist/actions/details-about-a-paper-s-citations.cjs.map +1 -1
- package/dist/actions/details-about-a-paper-s-citations.d.cts +9 -9
- package/dist/actions/details-about-a-paper-s-citations.d.mts +9 -9
- package/dist/actions/details-about-a-paper-s-citations.mjs +9 -9
- package/dist/actions/details-about-a-paper-s-citations.mjs.map +1 -1
- package/dist/actions/details-about-a-paper-s-references.cjs +12 -12
- package/dist/actions/details-about-a-paper-s-references.cjs.map +1 -1
- package/dist/actions/details-about-a-paper-s-references.d.cts +14 -14
- package/dist/actions/details-about-a-paper-s-references.d.mts +14 -14
- package/dist/actions/details-about-a-paper-s-references.mjs +12 -12
- package/dist/actions/details-about-a-paper-s-references.mjs.map +1 -1
- package/dist/actions/details-about-an-author-s-papers.cjs +11 -11
- package/dist/actions/details-about-an-author-s-papers.cjs.map +1 -1
- package/dist/actions/details-about-an-author-s-papers.d.cts +12 -12
- package/dist/actions/details-about-an-author-s-papers.d.mts +12 -12
- package/dist/actions/details-about-an-author-s-papers.mjs +11 -11
- package/dist/actions/details-about-an-author-s-papers.mjs.map +1 -1
- package/dist/actions/details-about-an-author.cjs +1 -1
- package/dist/actions/details-about-an-author.cjs.map +1 -1
- package/dist/actions/details-about-an-author.d.cts +1 -1
- package/dist/actions/details-about-an-author.d.mts +1 -1
- package/dist/actions/details-about-an-author.mjs +1 -1
- package/dist/actions/details-about-an-author.mjs.map +1 -1
- package/dist/actions/get-dataset-diffs.cjs +2 -2
- package/dist/actions/get-dataset-diffs.cjs.map +1 -1
- package/dist/actions/get-dataset-diffs.d.cts +2 -2
- package/dist/actions/get-dataset-diffs.d.mts +2 -2
- package/dist/actions/get-dataset-diffs.mjs +2 -2
- package/dist/actions/get-dataset-diffs.mjs.map +1 -1
- package/dist/actions/get-dataset.cjs +1 -1
- package/dist/actions/get-dataset.cjs.map +1 -1
- package/dist/actions/get-dataset.d.cts +1 -1
- package/dist/actions/get-dataset.d.mts +1 -1
- package/dist/actions/get-dataset.mjs +1 -1
- package/dist/actions/get-dataset.mjs.map +1 -1
- package/dist/actions/get-paper-recommendations.cjs +12 -12
- package/dist/actions/get-paper-recommendations.cjs.map +1 -1
- package/dist/actions/get-paper-recommendations.d.cts +12 -12
- package/dist/actions/get-paper-recommendations.d.mts +12 -12
- package/dist/actions/get-paper-recommendations.mjs +12 -12
- package/dist/actions/get-paper-recommendations.mjs.map +1 -1
- package/dist/actions/get-recommendations-for-paper.cjs +5 -5
- package/dist/actions/get-recommendations-for-paper.cjs.map +1 -1
- package/dist/actions/get-recommendations-for-paper.d.cts +5 -5
- package/dist/actions/get-recommendations-for-paper.d.mts +5 -5
- package/dist/actions/get-recommendations-for-paper.mjs +5 -5
- package/dist/actions/get-recommendations-for-paper.mjs.map +1 -1
- package/dist/actions/get-release.cjs +2 -2
- package/dist/actions/get-release.cjs.map +1 -1
- package/dist/actions/get-release.d.cts +2 -2
- package/dist/actions/get-release.d.mts +2 -2
- package/dist/actions/get-release.mjs +2 -2
- package/dist/actions/get-release.mjs.map +1 -1
- package/dist/actions/list-releases.cjs +1 -1
- package/dist/actions/list-releases.cjs.map +1 -1
- package/dist/actions/list-releases.d.cts +1 -1
- package/dist/actions/list-releases.d.mts +1 -1
- package/dist/actions/list-releases.mjs +1 -1
- package/dist/actions/list-releases.mjs.map +1 -1
- package/dist/actions/paper-title-search.cjs +11 -11
- package/dist/actions/paper-title-search.cjs.map +1 -1
- package/dist/actions/paper-title-search.d.cts +11 -11
- package/dist/actions/paper-title-search.d.mts +11 -11
- package/dist/actions/paper-title-search.mjs +11 -11
- package/dist/actions/paper-title-search.mjs.map +1 -1
- package/dist/actions/search-bulk-papers.cjs +9 -9
- package/dist/actions/search-bulk-papers.cjs.map +1 -1
- package/dist/actions/search-bulk-papers.d.cts +9 -9
- package/dist/actions/search-bulk-papers.d.mts +9 -9
- package/dist/actions/search-bulk-papers.mjs +9 -9
- package/dist/actions/search-bulk-papers.mjs.map +1 -1
- package/dist/actions/search-for-authors-by-name.cjs +1 -1
- package/dist/actions/search-for-authors-by-name.cjs.map +1 -1
- package/dist/actions/search-for-authors-by-name.d.cts +1 -1
- package/dist/actions/search-for-authors-by-name.d.mts +1 -1
- package/dist/actions/search-for-authors-by-name.mjs +1 -1
- package/dist/actions/search-for-authors-by-name.mjs.map +1 -1
- package/dist/actions/search-papers.cjs +13 -13
- package/dist/actions/search-papers.cjs.map +1 -1
- package/dist/actions/search-papers.d.cts +14 -14
- package/dist/actions/search-papers.d.mts +14 -14
- package/dist/actions/search-papers.mjs +13 -13
- package/dist/actions/search-papers.mjs.map +1 -1
- package/dist/actions/suggest-paper-query-completions.cjs +2 -2
- package/dist/actions/suggest-paper-query-completions.cjs.map +1 -1
- package/dist/actions/suggest-paper-query-completions.d.cts +2 -2
- package/dist/actions/suggest-paper-query-completions.d.mts +2 -2
- package/dist/actions/suggest-paper-query-completions.mjs +2 -2
- package/dist/actions/suggest-paper-query-completions.mjs.map +1 -1
- package/dist/actions/text-snippet-search.cjs +10 -10
- package/dist/actions/text-snippet-search.cjs.map +1 -1
- package/dist/actions/text-snippet-search.d.cts +10 -10
- package/dist/actions/text-snippet-search.d.mts +10 -10
- package/dist/actions/text-snippet-search.mjs +10 -10
- package/dist/actions/text-snippet-search.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ const SemanticscholarSearchPapersInput = z.object({
|
|
|
17
17
|
const SemanticscholarSearchPapers_TldrInfoSchema = z.object({
|
|
18
18
|
text: z.string().describe("Summary text").nullable().optional(),
|
|
19
19
|
model: z.string().describe("Model version used for summary generation").nullable().optional()
|
|
20
|
-
}).describe("AI-generated summary (TLDR)");
|
|
20
|
+
}).passthrough().describe("AI-generated summary (TLDR)");
|
|
21
21
|
const SemanticscholarSearchPapers_AuthorInfoSchema = z.object({
|
|
22
22
|
url: z.string().describe("Author's Semantic Scholar profile URL").nullable().optional(),
|
|
23
23
|
name: z.string().describe("Author name").nullable().optional(),
|
|
@@ -25,40 +25,40 @@ const SemanticscholarSearchPapers_AuthorInfoSchema = z.object({
|
|
|
25
25
|
authorId: z.string().describe("Semantic Scholar author ID").nullable().optional(),
|
|
26
26
|
homepage: z.string().describe("Author's personal website").nullable().optional(),
|
|
27
27
|
paperCount: z.number().int().describe("Total number of papers authored").nullable().optional(),
|
|
28
|
-
externalIds: z.
|
|
28
|
+
externalIds: z.record(z.string(), z.unknown()).describe("External identifiers (ORCID, DBLP)").nullable().optional(),
|
|
29
29
|
affiliations: z.array(z.string()).describe("Organizational affiliations").nullable().optional(),
|
|
30
30
|
citationCount: z.number().int().describe("Total citations received").nullable().optional()
|
|
31
|
-
}).describe("Paper author information");
|
|
31
|
+
}).passthrough().describe("Paper author information");
|
|
32
32
|
const SemanticscholarSearchPapers_JournalInfoSchema = z.object({
|
|
33
33
|
name: z.string().describe("Journal name").nullable().optional(),
|
|
34
34
|
pages: z.string().describe("Page range").nullable().optional(),
|
|
35
35
|
volume: z.string().describe("Volume number").nullable().optional()
|
|
36
|
-
}).describe("Journal publication metadata");
|
|
36
|
+
}).passthrough().describe("Journal publication metadata");
|
|
37
37
|
const SemanticscholarSearchPapers_CitationReferenceInfoSchema = z.object({
|
|
38
38
|
title: z.string().describe("Paper title").nullable().optional(),
|
|
39
39
|
paperId: z.string().describe("Paper ID").nullable().optional()
|
|
40
|
-
}).describe("Citation or reference paper information");
|
|
40
|
+
}).passthrough().describe("Citation or reference paper information");
|
|
41
41
|
const SemanticscholarSearchPapers_EmbeddingInfoSchema = z.object({
|
|
42
42
|
model: z.string().describe("Embedding model version").nullable().optional(),
|
|
43
43
|
vector: z.array(z.number()).describe("Numerical embedding vector").nullable().optional()
|
|
44
|
-
}).describe("Spector vector embedding representation");
|
|
44
|
+
}).passthrough().describe("Spector vector embedding representation");
|
|
45
45
|
const SemanticscholarSearchPapers_OpenAccessPdfInfoSchema = z.object({
|
|
46
46
|
url: z.string().describe("URL to access the PDF").nullable().optional(),
|
|
47
47
|
status: z.string().describe("Open access status type").nullable().optional(),
|
|
48
48
|
license: z.string().describe("License information").nullable().optional(),
|
|
49
49
|
disclaimer: z.string().describe("Legal disclaimer if applicable").nullable().optional()
|
|
50
|
-
}).describe("Open access PDF information");
|
|
50
|
+
}).passthrough().describe("Open access PDF information");
|
|
51
51
|
const SemanticscholarSearchPapers_S2FieldOfStudyInfoSchema = z.object({
|
|
52
52
|
source: z.string().describe("Classification source (Semantic Scholar or external)").nullable().optional(),
|
|
53
53
|
category: z.string().describe("Field classification category").nullable().optional()
|
|
54
|
-
}).describe("Semantic Scholar field of study classification");
|
|
54
|
+
}).passthrough().describe("Semantic Scholar field of study classification");
|
|
55
55
|
const SemanticscholarSearchPapers_PublicationVenueInfoSchema = z.object({
|
|
56
56
|
id: z.string().describe("Unique venue identifier").nullable().optional(),
|
|
57
57
|
url: z.string().describe("Venue website URL").nullable().optional(),
|
|
58
58
|
name: z.string().describe("Venue name").nullable().optional(),
|
|
59
59
|
type: z.string().describe("Venue type (conference/journal)").nullable().optional(),
|
|
60
60
|
alternate_names: z.array(z.string()).describe("Alternative names for the venue").nullable().optional()
|
|
61
|
-
}).describe("Detailed publication venue information");
|
|
61
|
+
}).passthrough().describe("Detailed publication venue information");
|
|
62
62
|
const SemanticscholarSearchPapers_PaperInfoSchema = z.object({
|
|
63
63
|
url: z.string().describe("URL to paper on Semantic Scholar website").nullable().optional(),
|
|
64
64
|
tldr: SemanticscholarSearchPapers_TldrInfoSchema.nullable().optional(),
|
|
@@ -73,12 +73,12 @@ const SemanticscholarSearchPapers_PaperInfoSchema = z.object({
|
|
|
73
73
|
citations: z.array(SemanticscholarSearchPapers_CitationReferenceInfoSchema).describe("Papers citing this paper").nullable().optional(),
|
|
74
74
|
embedding: SemanticscholarSearchPapers_EmbeddingInfoSchema.nullable().optional(),
|
|
75
75
|
references: z.array(SemanticscholarSearchPapers_CitationReferenceInfoSchema).describe("Papers referenced by this paper").nullable().optional(),
|
|
76
|
-
externalIds: z.
|
|
76
|
+
externalIds: z.record(z.string(), z.unknown()).describe("External identifiers (ArXiv, DOI, PubMed, etc.)").nullable().optional(),
|
|
77
77
|
isOpenAccess: z.boolean().describe("Whether paper is open access").nullable().optional(),
|
|
78
78
|
citationCount: z.number().int().describe("Number of papers citing this paper").nullable().optional(),
|
|
79
79
|
fieldsOfStudy: z.array(z.string()).describe("High-level academic field classifications").nullable().optional(),
|
|
80
80
|
openAccessPdf: SemanticscholarSearchPapers_OpenAccessPdfInfoSchema.nullable().optional(),
|
|
81
|
-
citationStyles: z.
|
|
81
|
+
citationStyles: z.record(z.string(), z.unknown()).describe("Citation formats (BibTeX, etc.)").nullable().optional(),
|
|
82
82
|
referenceCount: z.number().int().describe("Number of papers this paper references").nullable().optional(),
|
|
83
83
|
publicationDate: z.string().describe("Publication date in YYYY-MM-DD format").nullable().optional(),
|
|
84
84
|
s2FieldsOfStudy: z.array(SemanticscholarSearchPapers_S2FieldOfStudyInfoSchema).describe("Detailed field classifications with sources").nullable().optional(),
|
|
@@ -86,7 +86,7 @@ const SemanticscholarSearchPapers_PaperInfoSchema = z.object({
|
|
|
86
86
|
publicationVenue: SemanticscholarSearchPapers_PublicationVenueInfoSchema.nullable().optional(),
|
|
87
87
|
textAvailability: z.string().describe("Text availability status (fulltext, abstract, none)").nullable().optional(),
|
|
88
88
|
influentialCitationCount: z.number().int().describe("Number of influential citations").nullable().optional()
|
|
89
|
-
}).describe("Paper information returned in search results");
|
|
89
|
+
}).passthrough().describe("Paper information returned in search results");
|
|
90
90
|
const semanticscholarSearchPapers = action("SEMANTICSCHOLAR_SEARCH_PAPERS", {
|
|
91
91
|
slug: "semanticscholar-search-papers",
|
|
92
92
|
name: "Search papers by relevance",
|
|
@@ -97,7 +97,7 @@ const semanticscholarSearchPapers = action("SEMANTICSCHOLAR_SEARCH_PAPERS", {
|
|
|
97
97
|
next: z.number().int().describe("Starting position for the next batch. Absent if no more data exists").nullable().optional(),
|
|
98
98
|
total: z.number().int().describe("Approximate number of matching search results").nullable(),
|
|
99
99
|
offset: z.number().int().describe("Starting position for this batch of results").nullable()
|
|
100
|
-
}).describe("Response schema for paper search")
|
|
100
|
+
}).passthrough().describe("Response schema for paper search")
|
|
101
101
|
});
|
|
102
102
|
//#endregion
|
|
103
103
|
export { semanticscholarSearchPapers };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-papers.mjs","names":[],"sources":["../../src/actions/search-papers.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarSearchPapersInput = z.object({\n year: z.string().describe(\"Filter by publication year or year range (inclusive). Examples: '2019' (in 2019), '2016-2020' (from 2016 to 2020), '2010-' (2010 or after), '-2015' (2015 or before)\").optional(),\n limit: z.number().int().default(100).describe(\"Maximum number of results to return per request. Must be between 1 and 100\").optional(),\n query: z.string().describe(\"Plain-text search query string. No special query syntax is supported. Use spaces instead of hyphens in search terms. Example: 'machine learning' or 'neural networks'\"),\n venue: z.string().describe(\"Comma-separated list of publication venues to filter by. Can use full names or ISO4 abbreviations. Examples: 'Nature', 'New England Journal of Medicine', 'N. Engl. J. Med.', 'Nature,Radiology'\").optional(),\n fields: z.string().describe(\"Comma-separated list of fields to return. paperId is always returned. If omitted, only paperId and title are returned. Available fields: title, abstract, year, venue, publicationDate, authors, citationCount, referenceCount, influentialCitationCount, isOpenAccess, openAccessPdf, fieldsOfStudy, s2FieldsOfStudy, publicationTypes, publicationVenue, journal, externalIds, url, embedding, citations, references, tldr. Use dot notation for subfields (e.g., 'authors.authorId,authors.name', 'citations.title', 'embedding.specter_v2'). Examples: 'title,abstract,year' or 'title,authors,citationCount,url'\").optional(),\n offset: z.number().int().default(0).describe(\"Pagination offset: number of results to skip before returning data. Used with limit for pagination\").optional(),\n fieldsOfStudy: z.string().describe(\"Comma-separated list of fields of study to filter by. Available fields: Computer Science, Medicine, Chemistry, Biology, Materials Science, Physics, Geology, Psychology, Art, History, Geography, Sociology, Business, Political Science, Economics, Philosophy, Mathematics, Engineering, Environmental Science, Agricultural and Food Sciences, Education, Law, Linguistics. Example: 'Physics,Mathematics'\").optional(),\n openAccessPdf: z.string().describe(\"Set to any value (e.g., '') to restrict results to papers with a public PDF available\").optional(),\n minCitationCount: z.number().int().describe(\"Minimum number of citations required. Restricts results to papers with at least this many citations. Must be non-negative\").optional(),\n publicationTypes: z.string().describe(\"Comma-separated list of publication types to filter by. Available types: Review, JournalArticle, CaseReport, ClinicalTrial, Conference, Dataset, Editorial, LettersAndComments, MetaAnalysis, News, Study, Book, BookSection. Example: 'Review,JournalArticle'\").optional(),\n publicationDateOrYear: z.string().describe(\"Filter by publication date or year range (inclusive). Format: '<startDate>:<endDate>' with dates in YYYY-MM-DD format. Each term is optional for open-ended ranges. Prefixes supported (e.g., '2020-06' for June 2020). Examples: '2019-03-05' (specific date), '2019-03' (March 2019), '2019' (entire 2019), '2016-03-05:2020-06-06' (date range), '1981-08-25:' (on or after), ':2015-01' (before or on), '2015:2020' (year range)\").optional(),\n}).describe(\"Request schema for searching papers by relevance\");\nconst SemanticscholarSearchPapers_TldrInfoSchema = z.object({\n text: z.string().describe(\"Summary text\").nullable().optional(),\n model: z.string().describe(\"Model version used for summary generation\").nullable().optional(),\n}).describe(\"AI-generated summary (TLDR)\");\nconst SemanticscholarSearchPapers_AuthorInfoSchema = z.object({\n url: z.string().describe(\"Author's Semantic Scholar profile URL\").nullable().optional(),\n name: z.string().describe(\"Author name\").nullable().optional(),\n hIndex: z.number().int().describe(\"h-index metric\").nullable().optional(),\n authorId: z.string().describe(\"Semantic Scholar author ID\").nullable().optional(),\n homepage: z.string().describe(\"Author's personal website\").nullable().optional(),\n paperCount: z.number().int().describe(\"Total number of papers authored\").nullable().optional(),\n externalIds: z.object({}).describe(\"External identifiers (ORCID, DBLP)\").nullable().optional(),\n affiliations: z.array(z.string()).describe(\"Organizational affiliations\").nullable().optional(),\n citationCount: z.number().int().describe(\"Total citations received\").nullable().optional(),\n}).describe(\"Paper author information\");\nconst SemanticscholarSearchPapers_JournalInfoSchema = z.object({\n name: z.string().describe(\"Journal name\").nullable().optional(),\n pages: z.string().describe(\"Page range\").nullable().optional(),\n volume: z.string().describe(\"Volume number\").nullable().optional(),\n}).describe(\"Journal publication metadata\");\nconst SemanticscholarSearchPapers_CitationReferenceInfoSchema = z.object({\n title: z.string().describe(\"Paper title\").nullable().optional(),\n paperId: z.string().describe(\"Paper ID\").nullable().optional(),\n}).describe(\"Citation or reference paper information\");\nconst SemanticscholarSearchPapers_EmbeddingInfoSchema = z.object({\n model: z.string().describe(\"Embedding model version\").nullable().optional(),\n vector: z.array(z.number()).describe(\"Numerical embedding vector\").nullable().optional(),\n}).describe(\"Spector vector embedding representation\");\nconst SemanticscholarSearchPapers_OpenAccessPdfInfoSchema = z.object({\n url: z.string().describe(\"URL to access the PDF\").nullable().optional(),\n status: z.string().describe(\"Open access status type\").nullable().optional(),\n license: z.string().describe(\"License information\").nullable().optional(),\n disclaimer: z.string().describe(\"Legal disclaimer if applicable\").nullable().optional(),\n}).describe(\"Open access PDF information\");\nconst SemanticscholarSearchPapers_S2FieldOfStudyInfoSchema = z.object({\n source: z.string().describe(\"Classification source (Semantic Scholar or external)\").nullable().optional(),\n category: z.string().describe(\"Field classification category\").nullable().optional(),\n}).describe(\"Semantic Scholar field of study classification\");\nconst SemanticscholarSearchPapers_PublicationVenueInfoSchema = z.object({\n id: z.string().describe(\"Unique venue identifier\").nullable().optional(),\n url: z.string().describe(\"Venue website URL\").nullable().optional(),\n name: z.string().describe(\"Venue name\").nullable().optional(),\n type: z.string().describe(\"Venue type (conference/journal)\").nullable().optional(),\n alternate_names: z.array(z.string()).describe(\"Alternative names for the venue\").nullable().optional(),\n}).describe(\"Detailed publication venue information\");\nconst SemanticscholarSearchPapers_PaperInfoSchema = z.object({\n url: z.string().describe(\"URL to paper on Semantic Scholar website\").nullable().optional(),\n tldr: SemanticscholarSearchPapers_TldrInfoSchema.nullable().optional(),\n year: z.number().int().describe(\"Publication year\").nullable().optional(),\n title: z.string().describe(\"Paper title\").nullable().optional(),\n venue: z.string().describe(\"Publication venue name\").nullable().optional(),\n authors: z.array(SemanticscholarSearchPapers_AuthorInfoSchema).describe(\"Paper authors\").nullable().optional(),\n journal: SemanticscholarSearchPapers_JournalInfoSchema.nullable().optional(),\n paperId: z.string().describe(\"Semantic Scholar's primary unique paper identifier\").nullable(),\n abstract: z.string().describe(\"Paper abstract (may be missing for legal reasons)\").nullable().optional(),\n corpusId: z.number().int().describe(\"Semantic Scholar's secondary unique identifier\").nullable().optional(),\n citations: z.array(SemanticscholarSearchPapers_CitationReferenceInfoSchema).describe(\"Papers citing this paper\").nullable().optional(),\n embedding: SemanticscholarSearchPapers_EmbeddingInfoSchema.nullable().optional(),\n references: z.array(SemanticscholarSearchPapers_CitationReferenceInfoSchema).describe(\"Papers referenced by this paper\").nullable().optional(),\n externalIds: z.object({}).describe(\"External identifiers (ArXiv, DOI, PubMed, etc.)\").nullable().optional(),\n isOpenAccess: z.boolean().describe(\"Whether paper is open access\").nullable().optional(),\n citationCount: z.number().int().describe(\"Number of papers citing this paper\").nullable().optional(),\n fieldsOfStudy: z.array(z.string()).describe(\"High-level academic field classifications\").nullable().optional(),\n openAccessPdf: SemanticscholarSearchPapers_OpenAccessPdfInfoSchema.nullable().optional(),\n citationStyles: z.object({}).describe(\"Citation formats (BibTeX, etc.)\").nullable().optional(),\n referenceCount: z.number().int().describe(\"Number of papers this paper references\").nullable().optional(),\n publicationDate: z.string().describe(\"Publication date in YYYY-MM-DD format\").nullable().optional(),\n s2FieldsOfStudy: z.array(SemanticscholarSearchPapers_S2FieldOfStudyInfoSchema).describe(\"Detailed field classifications with sources\").nullable().optional(),\n publicationTypes: z.array(z.string()).describe(\"Publication type(s)\").nullable().optional(),\n publicationVenue: SemanticscholarSearchPapers_PublicationVenueInfoSchema.nullable().optional(),\n textAvailability: z.string().describe(\"Text availability status (fulltext, abstract, none)\").nullable().optional(),\n influentialCitationCount: z.number().int().describe(\"Number of influential citations\").nullable().optional(),\n}).describe(\"Paper information returned in search results\");\nexport const SemanticscholarSearchPapersOutput = z.object({\n data: z.array(SemanticscholarSearchPapers_PaperInfoSchema).describe(\"List of papers matching the search criteria\"),\n next: z.number().int().describe(\"Starting position for the next batch. Absent if no more data exists\").nullable().optional(),\n total: z.number().int().describe(\"Approximate number of matching search results\").nullable(),\n offset: z.number().int().describe(\"Starting position for this batch of results\").nullable(),\n}).describe(\"Response schema for paper search\");\n\nexport const semanticscholarSearchPapers = action(\"SEMANTICSCHOLAR_SEARCH_PAPERS\", {\n slug: \"semanticscholar-search-papers\",\n name: \"Search papers by relevance\",\n description: \"Tool to search for academic papers by relevance in the Semantic Scholar database. Use when searching for papers on specific topics, keywords, or research areas. Returns papers ordered by relevance score with support for extensive filtering by publication type, date, venue, field of study, and citation metrics.\",\n input: SemanticscholarSearchPapersInput,\n output: SemanticscholarSearchPapersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAmC,EAAE,OAAO;CACvD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sKAAsK,CAAC,CAAC,SAAS;CAC3M,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACrI,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,uKAAuK;CAClM,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kMAAkM,CAAC,CAAC,SAAS;CAC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;CACjF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAZ+C,EAAE,OAAO;EACxD,MAAM,EAAE,MAAM,2CAA2C,CAAC,CAAC,SAAS,6CAA6C;EACjH,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3H,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;EAC3F,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CAC5F,CAAC,CAAC,CAAC,SAAS,kCAOF;AACV,CAAC"}
|
|
1
|
+
{"version":3,"file":"search-papers.mjs","names":[],"sources":["../../src/actions/search-papers.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarSearchPapersInput = z.object({\n year: z.string().describe(\"Filter by publication year or year range (inclusive). Examples: '2019' (in 2019), '2016-2020' (from 2016 to 2020), '2010-' (2010 or after), '-2015' (2015 or before)\").optional(),\n limit: z.number().int().default(100).describe(\"Maximum number of results to return per request. Must be between 1 and 100\").optional(),\n query: z.string().describe(\"Plain-text search query string. No special query syntax is supported. Use spaces instead of hyphens in search terms. Example: 'machine learning' or 'neural networks'\"),\n venue: z.string().describe(\"Comma-separated list of publication venues to filter by. Can use full names or ISO4 abbreviations. Examples: 'Nature', 'New England Journal of Medicine', 'N. Engl. J. Med.', 'Nature,Radiology'\").optional(),\n fields: z.string().describe(\"Comma-separated list of fields to return. paperId is always returned. If omitted, only paperId and title are returned. Available fields: title, abstract, year, venue, publicationDate, authors, citationCount, referenceCount, influentialCitationCount, isOpenAccess, openAccessPdf, fieldsOfStudy, s2FieldsOfStudy, publicationTypes, publicationVenue, journal, externalIds, url, embedding, citations, references, tldr. Use dot notation for subfields (e.g., 'authors.authorId,authors.name', 'citations.title', 'embedding.specter_v2'). Examples: 'title,abstract,year' or 'title,authors,citationCount,url'\").optional(),\n offset: z.number().int().default(0).describe(\"Pagination offset: number of results to skip before returning data. Used with limit for pagination\").optional(),\n fieldsOfStudy: z.string().describe(\"Comma-separated list of fields of study to filter by. Available fields: Computer Science, Medicine, Chemistry, Biology, Materials Science, Physics, Geology, Psychology, Art, History, Geography, Sociology, Business, Political Science, Economics, Philosophy, Mathematics, Engineering, Environmental Science, Agricultural and Food Sciences, Education, Law, Linguistics. Example: 'Physics,Mathematics'\").optional(),\n openAccessPdf: z.string().describe(\"Set to any value (e.g., '') to restrict results to papers with a public PDF available\").optional(),\n minCitationCount: z.number().int().describe(\"Minimum number of citations required. Restricts results to papers with at least this many citations. Must be non-negative\").optional(),\n publicationTypes: z.string().describe(\"Comma-separated list of publication types to filter by. Available types: Review, JournalArticle, CaseReport, ClinicalTrial, Conference, Dataset, Editorial, LettersAndComments, MetaAnalysis, News, Study, Book, BookSection. Example: 'Review,JournalArticle'\").optional(),\n publicationDateOrYear: z.string().describe(\"Filter by publication date or year range (inclusive). Format: '<startDate>:<endDate>' with dates in YYYY-MM-DD format. Each term is optional for open-ended ranges. Prefixes supported (e.g., '2020-06' for June 2020). Examples: '2019-03-05' (specific date), '2019-03' (March 2019), '2019' (entire 2019), '2016-03-05:2020-06-06' (date range), '1981-08-25:' (on or after), ':2015-01' (before or on), '2015:2020' (year range)\").optional(),\n}).describe(\"Request schema for searching papers by relevance\");\nconst SemanticscholarSearchPapers_TldrInfoSchema = z.object({\n text: z.string().describe(\"Summary text\").nullable().optional(),\n model: z.string().describe(\"Model version used for summary generation\").nullable().optional(),\n}).passthrough().describe(\"AI-generated summary (TLDR)\");\nconst SemanticscholarSearchPapers_AuthorInfoSchema = z.object({\n url: z.string().describe(\"Author's Semantic Scholar profile URL\").nullable().optional(),\n name: z.string().describe(\"Author name\").nullable().optional(),\n hIndex: z.number().int().describe(\"h-index metric\").nullable().optional(),\n authorId: z.string().describe(\"Semantic Scholar author ID\").nullable().optional(),\n homepage: z.string().describe(\"Author's personal website\").nullable().optional(),\n paperCount: z.number().int().describe(\"Total number of papers authored\").nullable().optional(),\n externalIds: z.record(z.string(), z.unknown()).describe(\"External identifiers (ORCID, DBLP)\").nullable().optional(),\n affiliations: z.array(z.string()).describe(\"Organizational affiliations\").nullable().optional(),\n citationCount: z.number().int().describe(\"Total citations received\").nullable().optional(),\n}).passthrough().describe(\"Paper author information\");\nconst SemanticscholarSearchPapers_JournalInfoSchema = z.object({\n name: z.string().describe(\"Journal name\").nullable().optional(),\n pages: z.string().describe(\"Page range\").nullable().optional(),\n volume: z.string().describe(\"Volume number\").nullable().optional(),\n}).passthrough().describe(\"Journal publication metadata\");\nconst SemanticscholarSearchPapers_CitationReferenceInfoSchema = z.object({\n title: z.string().describe(\"Paper title\").nullable().optional(),\n paperId: z.string().describe(\"Paper ID\").nullable().optional(),\n}).passthrough().describe(\"Citation or reference paper information\");\nconst SemanticscholarSearchPapers_EmbeddingInfoSchema = z.object({\n model: z.string().describe(\"Embedding model version\").nullable().optional(),\n vector: z.array(z.number()).describe(\"Numerical embedding vector\").nullable().optional(),\n}).passthrough().describe(\"Spector vector embedding representation\");\nconst SemanticscholarSearchPapers_OpenAccessPdfInfoSchema = z.object({\n url: z.string().describe(\"URL to access the PDF\").nullable().optional(),\n status: z.string().describe(\"Open access status type\").nullable().optional(),\n license: z.string().describe(\"License information\").nullable().optional(),\n disclaimer: z.string().describe(\"Legal disclaimer if applicable\").nullable().optional(),\n}).passthrough().describe(\"Open access PDF information\");\nconst SemanticscholarSearchPapers_S2FieldOfStudyInfoSchema = z.object({\n source: z.string().describe(\"Classification source (Semantic Scholar or external)\").nullable().optional(),\n category: z.string().describe(\"Field classification category\").nullable().optional(),\n}).passthrough().describe(\"Semantic Scholar field of study classification\");\nconst SemanticscholarSearchPapers_PublicationVenueInfoSchema = z.object({\n id: z.string().describe(\"Unique venue identifier\").nullable().optional(),\n url: z.string().describe(\"Venue website URL\").nullable().optional(),\n name: z.string().describe(\"Venue name\").nullable().optional(),\n type: z.string().describe(\"Venue type (conference/journal)\").nullable().optional(),\n alternate_names: z.array(z.string()).describe(\"Alternative names for the venue\").nullable().optional(),\n}).passthrough().describe(\"Detailed publication venue information\");\nconst SemanticscholarSearchPapers_PaperInfoSchema = z.object({\n url: z.string().describe(\"URL to paper on Semantic Scholar website\").nullable().optional(),\n tldr: SemanticscholarSearchPapers_TldrInfoSchema.nullable().optional(),\n year: z.number().int().describe(\"Publication year\").nullable().optional(),\n title: z.string().describe(\"Paper title\").nullable().optional(),\n venue: z.string().describe(\"Publication venue name\").nullable().optional(),\n authors: z.array(SemanticscholarSearchPapers_AuthorInfoSchema).describe(\"Paper authors\").nullable().optional(),\n journal: SemanticscholarSearchPapers_JournalInfoSchema.nullable().optional(),\n paperId: z.string().describe(\"Semantic Scholar's primary unique paper identifier\").nullable(),\n abstract: z.string().describe(\"Paper abstract (may be missing for legal reasons)\").nullable().optional(),\n corpusId: z.number().int().describe(\"Semantic Scholar's secondary unique identifier\").nullable().optional(),\n citations: z.array(SemanticscholarSearchPapers_CitationReferenceInfoSchema).describe(\"Papers citing this paper\").nullable().optional(),\n embedding: SemanticscholarSearchPapers_EmbeddingInfoSchema.nullable().optional(),\n references: z.array(SemanticscholarSearchPapers_CitationReferenceInfoSchema).describe(\"Papers referenced by this paper\").nullable().optional(),\n externalIds: z.record(z.string(), z.unknown()).describe(\"External identifiers (ArXiv, DOI, PubMed, etc.)\").nullable().optional(),\n isOpenAccess: z.boolean().describe(\"Whether paper is open access\").nullable().optional(),\n citationCount: z.number().int().describe(\"Number of papers citing this paper\").nullable().optional(),\n fieldsOfStudy: z.array(z.string()).describe(\"High-level academic field classifications\").nullable().optional(),\n openAccessPdf: SemanticscholarSearchPapers_OpenAccessPdfInfoSchema.nullable().optional(),\n citationStyles: z.record(z.string(), z.unknown()).describe(\"Citation formats (BibTeX, etc.)\").nullable().optional(),\n referenceCount: z.number().int().describe(\"Number of papers this paper references\").nullable().optional(),\n publicationDate: z.string().describe(\"Publication date in YYYY-MM-DD format\").nullable().optional(),\n s2FieldsOfStudy: z.array(SemanticscholarSearchPapers_S2FieldOfStudyInfoSchema).describe(\"Detailed field classifications with sources\").nullable().optional(),\n publicationTypes: z.array(z.string()).describe(\"Publication type(s)\").nullable().optional(),\n publicationVenue: SemanticscholarSearchPapers_PublicationVenueInfoSchema.nullable().optional(),\n textAvailability: z.string().describe(\"Text availability status (fulltext, abstract, none)\").nullable().optional(),\n influentialCitationCount: z.number().int().describe(\"Number of influential citations\").nullable().optional(),\n}).passthrough().describe(\"Paper information returned in search results\");\nexport const SemanticscholarSearchPapersOutput = z.object({\n data: z.array(SemanticscholarSearchPapers_PaperInfoSchema).describe(\"List of papers matching the search criteria\"),\n next: z.number().int().describe(\"Starting position for the next batch. Absent if no more data exists\").nullable().optional(),\n total: z.number().int().describe(\"Approximate number of matching search results\").nullable(),\n offset: z.number().int().describe(\"Starting position for this batch of results\").nullable(),\n}).passthrough().describe(\"Response schema for paper search\");\n\nexport const semanticscholarSearchPapers = action(\"SEMANTICSCHOLAR_SEARCH_PAPERS\", {\n slug: \"semanticscholar-search-papers\",\n name: \"Search papers by relevance\",\n description: \"Tool to search for academic papers by relevance in the Semantic Scholar database. Use when searching for papers on specific topics, keywords, or research areas. Returns papers ordered by relevance score with support for extensive filtering by publication type, date, venue, field of study, and citation metrics.\",\n input: SemanticscholarSearchPapersInput,\n output: SemanticscholarSearchPapersOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mCAAmC,EAAE,OAAO;CACvD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sKAAsK,CAAC,CAAC,SAAS;CAC3M,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,SAAS,4EAA4E,CAAC,CAAC,SAAS;CACrI,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,uKAAuK;CAClM,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,k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AAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACjH,0BAA0B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,8CAA8C;AAQxE,MAAa,8BAA8B,OAAO,iCAAiC;CACjF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAZ+C,EAAE,OAAO;EACxD,MAAM,EAAE,MAAM,2CAA2C,CAAC,CAAC,SAAS,6CAA6C;EACjH,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3H,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;EAC3F,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS;CAC5F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,kCAOhB;AACV,CAAC"}
|
|
@@ -6,8 +6,8 @@ const SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema = zod.z.objec
|
|
|
6
6
|
id: zod.z.string().describe("Semantic Scholar paper ID").nullable(),
|
|
7
7
|
title: zod.z.string().describe("Paper title").nullable(),
|
|
8
8
|
authorsYear: zod.z.string().describe("Authors and publication year (e.g., 'Vaswani et al., 2017')").nullable()
|
|
9
|
-
}).describe("A paper match from autocomplete suggestions");
|
|
10
|
-
const SemanticscholarSuggestPaperQueryCompletionsOutput = zod.z.object({ matches: zod.z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe("List of paper suggestions matching the query").nullable().optional() }).describe("Response schema for `SuggestPaperQueryCompletions`");
|
|
9
|
+
}).passthrough().describe("A paper match from autocomplete suggestions");
|
|
10
|
+
const SemanticscholarSuggestPaperQueryCompletionsOutput = zod.z.object({ matches: zod.z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe("List of paper suggestions matching the query").nullable().optional() }).passthrough().describe("Response schema for `SuggestPaperQueryCompletions`");
|
|
11
11
|
const semanticscholarSuggestPaperQueryCompletions = require_action.action("SEMANTICSCHOLAR_SUGGEST_PAPER_QUERY_COMPLETIONS", {
|
|
12
12
|
slug: "semanticscholar-suggest-paper-query-completions",
|
|
13
13
|
name: "Suggest paper query completions",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-paper-query-completions.cjs","names":["z","action"],"sources":["../../src/actions/suggest-paper-query-completions.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarSuggestPaperQueryCompletionsInput = z.object({\n query: z.string().describe(\"Plain-text partial query string for autocomplete suggestions. Must be at least 3 characters long. Will be truncated to first 100 characters.\"),\n}).describe(\"Request schema for `SuggestPaperQueryCompletions`\");\nconst SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema = z.object({\n id: z.string().describe(\"Semantic Scholar paper ID\").nullable(),\n title: z.string().describe(\"Paper title\").nullable(),\n authorsYear: z.string().describe(\"Authors and publication year (e.g., 'Vaswani et al., 2017')\").nullable(),\n}).describe(\"A paper match from autocomplete suggestions\");\nexport const SemanticscholarSuggestPaperQueryCompletionsOutput = z.object({\n matches: z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe(\"List of paper suggestions matching the query\").nullable().optional(),\n}).describe(\"Response schema for `SuggestPaperQueryCompletions`\");\n\nexport const semanticscholarSuggestPaperQueryCompletions = action(\"SEMANTICSCHOLAR_SUGGEST_PAPER_QUERY_COMPLETIONS\", {\n slug: \"semanticscholar-suggest-paper-query-completions\",\n name: \"Suggest paper query completions\",\n description: \"Get autocomplete suggestions for paper queries. Returns a list of papers matching the partial query string, useful for interactive search experiences. Each suggestion includes the paper ID, title, and authors with publication year. Example: For query \\\"machine learning\\\", returns papers like \\\"Machine learning - a probabilistic perspective\\\" by Murphy, 2012.\",\n input: SemanticscholarSuggestPaperQueryCompletionsInput,\n output: SemanticscholarSuggestPaperQueryCompletionsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mDAAmDA,IAAAA,EAAE,OAAO,EACvE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8IAA8I,EAC3K,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,+DAA+DA,IAAAA,EAAE,OAAO;CAC5E,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CAC9D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;CACnD,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,SAAS,6CAA6C;
|
|
1
|
+
{"version":3,"file":"suggest-paper-query-completions.cjs","names":["z","action"],"sources":["../../src/actions/suggest-paper-query-completions.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarSuggestPaperQueryCompletionsInput = z.object({\n query: z.string().describe(\"Plain-text partial query string for autocomplete suggestions. Must be at least 3 characters long. Will be truncated to first 100 characters.\"),\n}).describe(\"Request schema for `SuggestPaperQueryCompletions`\");\nconst SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema = z.object({\n id: z.string().describe(\"Semantic Scholar paper ID\").nullable(),\n title: z.string().describe(\"Paper title\").nullable(),\n authorsYear: z.string().describe(\"Authors and publication year (e.g., 'Vaswani et al., 2017')\").nullable(),\n}).passthrough().describe(\"A paper match from autocomplete suggestions\");\nexport const SemanticscholarSuggestPaperQueryCompletionsOutput = z.object({\n matches: z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe(\"List of paper suggestions matching the query\").nullable().optional(),\n}).passthrough().describe(\"Response schema for `SuggestPaperQueryCompletions`\");\n\nexport const semanticscholarSuggestPaperQueryCompletions = action(\"SEMANTICSCHOLAR_SUGGEST_PAPER_QUERY_COMPLETIONS\", {\n slug: \"semanticscholar-suggest-paper-query-completions\",\n name: \"Suggest paper query completions\",\n description: \"Get autocomplete suggestions for paper queries. Returns a list of papers matching the partial query string, useful for interactive search experiences. Each suggestion includes the paper ID, title, and authors with publication year. Example: For query \\\"machine learning\\\", returns papers like \\\"Machine learning - a probabilistic perspective\\\" by Murphy, 2012.\",\n input: SemanticscholarSuggestPaperQueryCompletionsInput,\n output: SemanticscholarSuggestPaperQueryCompletionsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mDAAmDA,IAAAA,EAAE,OAAO,EACvE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8IAA8I,EAC3K,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,+DAA+DA,IAAAA,EAAE,OAAO;CAC5E,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CAC9D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;CACnD,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6CAA6C;AACvE,MAAa,oDAAoDA,IAAAA,EAAE,OAAO,EACxE,SAASA,IAAAA,EAAE,MAAM,4DAA4D,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAC9J,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAAoD;AAE9E,MAAa,8CAA8CC,eAAAA,OAAO,mDAAmD;CACnH,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -9,8 +9,8 @@ declare const SemanticscholarSuggestPaperQueryCompletionsOutput: z.ZodObject<{
|
|
|
9
9
|
id: z.ZodNullable<z.ZodString>;
|
|
10
10
|
title: z.ZodNullable<z.ZodString>;
|
|
11
11
|
authorsYear: z.ZodNullable<z.ZodString>;
|
|
12
|
-
}, z.core.$
|
|
13
|
-
}, z.core.$
|
|
12
|
+
}, z.core.$loose>>>>;
|
|
13
|
+
}, z.core.$loose>;
|
|
14
14
|
declare const semanticscholarSuggestPaperQueryCompletions: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
15
15
|
query: string;
|
|
16
16
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -9,8 +9,8 @@ declare const SemanticscholarSuggestPaperQueryCompletionsOutput: z.ZodObject<{
|
|
|
9
9
|
id: z.ZodNullable<z.ZodString>;
|
|
10
10
|
title: z.ZodNullable<z.ZodString>;
|
|
11
11
|
authorsYear: z.ZodNullable<z.ZodString>;
|
|
12
|
-
}, z.core.$
|
|
13
|
-
}, z.core.$
|
|
12
|
+
}, z.core.$loose>>>>;
|
|
13
|
+
}, z.core.$loose>;
|
|
14
14
|
declare const semanticscholarSuggestPaperQueryCompletions: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
15
15
|
query: string;
|
|
16
16
|
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
@@ -6,13 +6,13 @@ const SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema = z.object({
|
|
|
6
6
|
id: z.string().describe("Semantic Scholar paper ID").nullable(),
|
|
7
7
|
title: z.string().describe("Paper title").nullable(),
|
|
8
8
|
authorsYear: z.string().describe("Authors and publication year (e.g., 'Vaswani et al., 2017')").nullable()
|
|
9
|
-
}).describe("A paper match from autocomplete suggestions");
|
|
9
|
+
}).passthrough().describe("A paper match from autocomplete suggestions");
|
|
10
10
|
const semanticscholarSuggestPaperQueryCompletions = action("SEMANTICSCHOLAR_SUGGEST_PAPER_QUERY_COMPLETIONS", {
|
|
11
11
|
slug: "semanticscholar-suggest-paper-query-completions",
|
|
12
12
|
name: "Suggest paper query completions",
|
|
13
13
|
description: "Get autocomplete suggestions for paper queries. Returns a list of papers matching the partial query string, useful for interactive search experiences. Each suggestion includes the paper ID, title, and authors with publication year. Example: For query \"machine learning\", returns papers like \"Machine learning - a probabilistic perspective\" by Murphy, 2012.",
|
|
14
14
|
input: SemanticscholarSuggestPaperQueryCompletionsInput,
|
|
15
|
-
output: z.object({ matches: z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe("List of paper suggestions matching the query").nullable().optional() }).describe("Response schema for `SuggestPaperQueryCompletions`")
|
|
15
|
+
output: z.object({ matches: z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe("List of paper suggestions matching the query").nullable().optional() }).passthrough().describe("Response schema for `SuggestPaperQueryCompletions`")
|
|
16
16
|
});
|
|
17
17
|
//#endregion
|
|
18
18
|
export { semanticscholarSuggestPaperQueryCompletions };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggest-paper-query-completions.mjs","names":[],"sources":["../../src/actions/suggest-paper-query-completions.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarSuggestPaperQueryCompletionsInput = z.object({\n query: z.string().describe(\"Plain-text partial query string for autocomplete suggestions. Must be at least 3 characters long. Will be truncated to first 100 characters.\"),\n}).describe(\"Request schema for `SuggestPaperQueryCompletions`\");\nconst SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema = z.object({\n id: z.string().describe(\"Semantic Scholar paper ID\").nullable(),\n title: z.string().describe(\"Paper title\").nullable(),\n authorsYear: z.string().describe(\"Authors and publication year (e.g., 'Vaswani et al., 2017')\").nullable(),\n}).describe(\"A paper match from autocomplete suggestions\");\nexport const SemanticscholarSuggestPaperQueryCompletionsOutput = z.object({\n matches: z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe(\"List of paper suggestions matching the query\").nullable().optional(),\n}).describe(\"Response schema for `SuggestPaperQueryCompletions`\");\n\nexport const semanticscholarSuggestPaperQueryCompletions = action(\"SEMANTICSCHOLAR_SUGGEST_PAPER_QUERY_COMPLETIONS\", {\n slug: \"semanticscholar-suggest-paper-query-completions\",\n name: \"Suggest paper query completions\",\n description: \"Get autocomplete suggestions for paper queries. Returns a list of papers matching the partial query string, useful for interactive search experiences. Each suggestion includes the paper ID, title, and authors with publication year. Example: For query \\\"machine learning\\\", returns papers like \\\"Machine learning - a probabilistic perspective\\\" by Murphy, 2012.\",\n input: SemanticscholarSuggestPaperQueryCompletionsInput,\n output: SemanticscholarSuggestPaperQueryCompletionsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mDAAmD,EAAE,OAAO,EACvE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8IAA8I,EAC3K,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,+DAA+D,EAAE,OAAO;CAC5E,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CAC9D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;CACnD,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,SAAS,6CAA6C;
|
|
1
|
+
{"version":3,"file":"suggest-paper-query-completions.mjs","names":[],"sources":["../../src/actions/suggest-paper-query-completions.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarSuggestPaperQueryCompletionsInput = z.object({\n query: z.string().describe(\"Plain-text partial query string for autocomplete suggestions. Must be at least 3 characters long. Will be truncated to first 100 characters.\"),\n}).describe(\"Request schema for `SuggestPaperQueryCompletions`\");\nconst SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema = z.object({\n id: z.string().describe(\"Semantic Scholar paper ID\").nullable(),\n title: z.string().describe(\"Paper title\").nullable(),\n authorsYear: z.string().describe(\"Authors and publication year (e.g., 'Vaswani et al., 2017')\").nullable(),\n}).passthrough().describe(\"A paper match from autocomplete suggestions\");\nexport const SemanticscholarSuggestPaperQueryCompletionsOutput = z.object({\n matches: z.array(SemanticscholarSuggestPaperQueryCompletions_PaperMatchSchema).describe(\"List of paper suggestions matching the query\").nullable().optional(),\n}).passthrough().describe(\"Response schema for `SuggestPaperQueryCompletions`\");\n\nexport const semanticscholarSuggestPaperQueryCompletions = action(\"SEMANTICSCHOLAR_SUGGEST_PAPER_QUERY_COMPLETIONS\", {\n slug: \"semanticscholar-suggest-paper-query-completions\",\n name: \"Suggest paper query completions\",\n description: \"Get autocomplete suggestions for paper queries. Returns a list of papers matching the partial query string, useful for interactive search experiences. Each suggestion includes the paper ID, title, and authors with publication year. Example: For query \\\"machine learning\\\", returns papers like \\\"Machine learning - a probabilistic perspective\\\" by Murphy, 2012.\",\n input: SemanticscholarSuggestPaperQueryCompletionsInput,\n output: SemanticscholarSuggestPaperQueryCompletionsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,mDAAmD,EAAE,OAAO,EACvE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8IAA8I,EAC3K,CAAC,CAAC,CAAC,SAAS,mDAAmD;AAC/D,MAAM,+DAA+D,EAAE,OAAO;CAC5E,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CAC9D,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,aAAa,CAAC,CAAC,SAAS;CACnD,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,6CAA6C;AAKvE,MAAa,8CAA8C,OAAO,mDAAmD;CACnH,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT+D,EAAE,OAAO,EACxE,SAAS,EAAE,MAAM,4DAA4D,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,EAC9J,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oDAOhB;AACV,CAAC"}
|
|
@@ -17,47 +17,47 @@ const SemanticscholarTextSnippetSearch_OpenAccessInfoSchema = zod.z.object({
|
|
|
17
17
|
status: zod.z.string().nullable().optional(),
|
|
18
18
|
license: zod.z.string().nullable().optional(),
|
|
19
19
|
disclaimer: zod.z.string().nullable().optional()
|
|
20
|
-
}).describe("Open access information for the paper");
|
|
20
|
+
}).passthrough().describe("Open access information for the paper");
|
|
21
21
|
const SemanticscholarTextSnippetSearch_PaperInfoSchema = zod.z.object({
|
|
22
22
|
title: zod.z.string().nullable().optional(),
|
|
23
23
|
authors: zod.z.array(zod.z.string()).nullable().optional(),
|
|
24
24
|
corpusId: zod.z.string().nullable().optional(),
|
|
25
25
|
openAccessInfo: SemanticscholarTextSnippetSearch_OpenAccessInfoSchema.nullable().optional()
|
|
26
|
-
}).describe("Basic paper metadata");
|
|
26
|
+
}).passthrough().describe("Basic paper metadata");
|
|
27
27
|
const SemanticscholarTextSnippetSearch_SentenceSchema = zod.z.object({
|
|
28
28
|
end: zod.z.number().int().nullable().optional(),
|
|
29
29
|
start: zod.z.number().int().nullable().optional()
|
|
30
|
-
}).describe("Sentence boundary marker");
|
|
30
|
+
}).passthrough().describe("Sentence boundary marker");
|
|
31
31
|
const SemanticscholarTextSnippetSearch_RefMentionSchema = zod.z.object({
|
|
32
32
|
end: zod.z.number().int().nullable().optional(),
|
|
33
33
|
start: zod.z.number().int().nullable().optional(),
|
|
34
34
|
matchedPaperCorpusId: zod.z.string().nullable().optional()
|
|
35
|
-
}).describe("Reference mention within the snippet");
|
|
35
|
+
}).passthrough().describe("Reference mention within the snippet");
|
|
36
36
|
const SemanticscholarTextSnippetSearch_AnnotationsSchema = zod.z.object({
|
|
37
37
|
sentences: zod.z.array(SemanticscholarTextSnippetSearch_SentenceSchema).nullable().optional(),
|
|
38
38
|
refMentions: zod.z.array(SemanticscholarTextSnippetSearch_RefMentionSchema).nullable().optional()
|
|
39
|
-
}).describe("Annotations within the snippet");
|
|
39
|
+
}).passthrough().describe("Annotations within the snippet");
|
|
40
40
|
const SemanticscholarTextSnippetSearch_SnippetOffsetSchema = zod.z.object({
|
|
41
41
|
end: zod.z.number().int().nullable().optional(),
|
|
42
42
|
start: zod.z.number().int().nullable().optional()
|
|
43
|
-
}).describe("Position of the snippet in the original paper");
|
|
43
|
+
}).passthrough().describe("Position of the snippet in the original paper");
|
|
44
44
|
const SemanticscholarTextSnippetSearch_SnippetDataSchema = zod.z.object({
|
|
45
45
|
text: zod.z.string().describe("Extracted text content (~500 words from the paper)").nullable().optional(),
|
|
46
46
|
section: zod.z.string().describe("Section name where snippet was extracted from").nullable().optional(),
|
|
47
47
|
annotations: SemanticscholarTextSnippetSearch_AnnotationsSchema.nullable().optional(),
|
|
48
48
|
snippetKind: zod.z.string().describe("Type of snippet: 'title', 'abstract', 'body', etc.").nullable().optional(),
|
|
49
49
|
snippetOffset: SemanticscholarTextSnippetSearch_SnippetOffsetSchema.nullable().optional()
|
|
50
|
-
}).describe("Text snippet details");
|
|
50
|
+
}).passthrough().describe("Text snippet details");
|
|
51
51
|
const SemanticscholarTextSnippetSearch_SnippetResultSchema = zod.z.object({
|
|
52
52
|
paper: SemanticscholarTextSnippetSearch_PaperInfoSchema.nullable().optional(),
|
|
53
53
|
score: zod.z.number().describe("Relevance score (higher is better)").nullable().optional(),
|
|
54
54
|
snippet: SemanticscholarTextSnippetSearch_SnippetDataSchema.nullable().optional()
|
|
55
|
-
}).describe("Single search result containing snippet and paper info");
|
|
55
|
+
}).passthrough().describe("Single search result containing snippet and paper info");
|
|
56
56
|
const SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema = zod.z.object({
|
|
57
57
|
data: zod.z.array(SemanticscholarTextSnippetSearch_SnippetResultSchema).describe("List of text snippets matching the query, sorted by relevance").nullable().optional(),
|
|
58
58
|
retrievalVersion: zod.z.string().describe("Version of the retrieval system").nullable().optional()
|
|
59
|
-
}).describe("Response data containing search results");
|
|
60
|
-
const SemanticscholarTextSnippetSearchOutput = zod.z.object({ data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable() }).describe("Response schema for `TextSnippetSearch`");
|
|
59
|
+
}).passthrough().describe("Response data containing search results");
|
|
60
|
+
const SemanticscholarTextSnippetSearchOutput = zod.z.object({ data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable() }).passthrough().describe("Response schema for `TextSnippetSearch`");
|
|
61
61
|
const semanticscholarTextSnippetSearch = require_action.action("SEMANTICSCHOLAR_TEXT_SNIPPET_SEARCH", {
|
|
62
62
|
slug: "semanticscholar-text-snippet-search",
|
|
63
63
|
name: "Text snippet search",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-snippet-search.cjs","names":["z","action"],"sources":["../../src/actions/text-snippet-search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarTextSnippetSearchInput = z.object({\n year: z.string().describe(\"Filter results by publication year. Supports specific years ('2022') or ranges ('2020-2023').\").optional(),\n limit: z.number().int().default(10).describe(\"Maximum number of snippet results to return. Must be between 1 and 1000. Default is 10. Use smaller limits for faster responses.\").optional(),\n query: z.string().describe(\"Plain-text search query to find matching text snippets in academic papers. No special query syntax is supported - just use natural language. Example: 'machine learning neural networks'\"),\n venue: z.string().describe(\"Filter results by publication venue (journal or conference name). Example: 'Nature' or 'ICML'\").optional(),\n fields: z.string().describe(\"Comma-separated list of snippet fields to include in the response. Available fields: text, snippetKind, section, snippetOffset, annotations. If not specified, all fields are returned by default.\").optional(),\n authors: z.string().describe(\"Filter results to papers by specific authors. Provide comma-separated author names (fuzzy matching supported). Uses AND logic - all authors must match. Maximum 10 authors.\").optional(),\n paperIds: z.string().describe(\"Filter results to only snippets from specific papers. Provide a comma-separated list of paper IDs (supports multiple ID formats: corpusId, DOI, arXiv ID, etc.). Maximum ~100 paper IDs.\").optional(),\n fieldsOfStudy: z.string().describe(\"Filter results by academic field. Comma-separated list of fields like 'Computer Science', 'Medicine', 'Physics', etc.\").optional(),\n minCitationCount: z.string().describe(\"Filter results to papers with at least this many citations. Useful for finding influential papers. Example: '10' or '100'\").optional(),\n publicationDateOrYear: z.string().describe(\"Filter results by publication date range. Supports ranges like '2020-2023' or specific years like '2022'.\").optional(),\n}).describe(\"Request schema for `TextSnippetSearch`\");\nconst SemanticscholarTextSnippetSearch_OpenAccessInfoSchema = z.object({\n status: z.string().nullable().optional(),\n license: z.string().nullable().optional(),\n disclaimer: z.string().nullable().optional(),\n}).describe(\"Open access information for the paper\");\nconst SemanticscholarTextSnippetSearch_PaperInfoSchema = z.object({\n title: z.string().nullable().optional(),\n authors: z.array(z.string()).nullable().optional(),\n corpusId: z.string().nullable().optional(),\n openAccessInfo: SemanticscholarTextSnippetSearch_OpenAccessInfoSchema.nullable().optional(),\n}).describe(\"Basic paper metadata\");\nconst SemanticscholarTextSnippetSearch_SentenceSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).describe(\"Sentence boundary marker\");\nconst SemanticscholarTextSnippetSearch_RefMentionSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n matchedPaperCorpusId: z.string().nullable().optional(),\n}).describe(\"Reference mention within the snippet\");\nconst SemanticscholarTextSnippetSearch_AnnotationsSchema = z.object({\n sentences: z.array(SemanticscholarTextSnippetSearch_SentenceSchema).nullable().optional(),\n refMentions: z.array(SemanticscholarTextSnippetSearch_RefMentionSchema).nullable().optional(),\n}).describe(\"Annotations within the snippet\");\nconst SemanticscholarTextSnippetSearch_SnippetOffsetSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).describe(\"Position of the snippet in the original paper\");\nconst SemanticscholarTextSnippetSearch_SnippetDataSchema = z.object({\n text: z.string().describe(\"Extracted text content (~500 words from the paper)\").nullable().optional(),\n section: z.string().describe(\"Section name where snippet was extracted from\").nullable().optional(),\n annotations: SemanticscholarTextSnippetSearch_AnnotationsSchema.nullable().optional(),\n snippetKind: z.string().describe(\"Type of snippet: 'title', 'abstract', 'body', etc.\").nullable().optional(),\n snippetOffset: SemanticscholarTextSnippetSearch_SnippetOffsetSchema.nullable().optional(),\n}).describe(\"Text snippet details\");\nconst SemanticscholarTextSnippetSearch_SnippetResultSchema = z.object({\n paper: SemanticscholarTextSnippetSearch_PaperInfoSchema.nullable().optional(),\n score: z.number().describe(\"Relevance score (higher is better)\").nullable().optional(),\n snippet: SemanticscholarTextSnippetSearch_SnippetDataSchema.nullable().optional(),\n}).describe(\"Single search result containing snippet and paper info\");\nconst SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema = z.object({\n data: z.array(SemanticscholarTextSnippetSearch_SnippetResultSchema).describe(\"List of text snippets matching the query, sorted by relevance\").nullable().optional(),\n retrievalVersion: z.string().describe(\"Version of the retrieval system\").nullable().optional(),\n}).describe(\"Response data containing search results\");\nexport const SemanticscholarTextSnippetSearchOutput = z.object({\n data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable(),\n}).describe(\"Response schema for `TextSnippetSearch`\");\n\nexport const semanticscholarTextSnippetSearch = action(\"SEMANTICSCHOLAR_TEXT_SNIPPET_SEARCH\", {\n slug: \"semanticscholar-text-snippet-search\",\n name: \"Text snippet search\",\n description: \"Search for text snippets (~500 words) within academic papers that match your natural language query. Returns relevant excerpts from papers' titles, abstracts, and body text, ranked by relevance score. Each result includes: snippet text, location in paper, citation references, and paper metadata (title, authors, corpus ID). Supports filtering by authors, publication date, venue, field of study, citation count, and specific paper IDs. Results sorted by relevance (highest score first). Use limit=10 (default, max 1000) to control result count.\",\n input: Seman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C;
|
|
1
|
+
{"version":3,"file":"text-snippet-search.cjs","names":["z","action"],"sources":["../../src/actions/text-snippet-search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarTextSnippetSearchInput = z.object({\n year: z.string().describe(\"Filter results by publication year. Supports specific years ('2022') or ranges ('2020-2023').\").optional(),\n limit: z.number().int().default(10).describe(\"Maximum number of snippet results to return. Must be between 1 and 1000. Default is 10. Use smaller limits for faster responses.\").optional(),\n query: z.string().describe(\"Plain-text search query to find matching text snippets in academic papers. No special query syntax is supported - just use natural language. Example: 'machine learning neural networks'\"),\n venue: z.string().describe(\"Filter results by publication venue (journal or conference name). Example: 'Nature' or 'ICML'\").optional(),\n fields: z.string().describe(\"Comma-separated list of snippet fields to include in the response. Available fields: text, snippetKind, section, snippetOffset, annotations. If not specified, all fields are returned by default.\").optional(),\n authors: z.string().describe(\"Filter results to papers by specific authors. Provide comma-separated author names (fuzzy matching supported). Uses AND logic - all authors must match. Maximum 10 authors.\").optional(),\n paperIds: z.string().describe(\"Filter results to only snippets from specific papers. Provide a comma-separated list of paper IDs (supports multiple ID formats: corpusId, DOI, arXiv ID, etc.). Maximum ~100 paper IDs.\").optional(),\n fieldsOfStudy: z.string().describe(\"Filter results by academic field. Comma-separated list of fields like 'Computer Science', 'Medicine', 'Physics', etc.\").optional(),\n minCitationCount: z.string().describe(\"Filter results to papers with at least this many citations. Useful for finding influential papers. Example: '10' or '100'\").optional(),\n publicationDateOrYear: z.string().describe(\"Filter results by publication date range. Supports ranges like '2020-2023' or specific years like '2022'.\").optional(),\n}).describe(\"Request schema for `TextSnippetSearch`\");\nconst SemanticscholarTextSnippetSearch_OpenAccessInfoSchema = z.object({\n status: z.string().nullable().optional(),\n license: z.string().nullable().optional(),\n disclaimer: z.string().nullable().optional(),\n}).passthrough().describe(\"Open access information for the paper\");\nconst SemanticscholarTextSnippetSearch_PaperInfoSchema = z.object({\n title: z.string().nullable().optional(),\n authors: z.array(z.string()).nullable().optional(),\n corpusId: z.string().nullable().optional(),\n openAccessInfo: SemanticscholarTextSnippetSearch_OpenAccessInfoSchema.nullable().optional(),\n}).passthrough().describe(\"Basic paper metadata\");\nconst SemanticscholarTextSnippetSearch_SentenceSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).passthrough().describe(\"Sentence boundary marker\");\nconst SemanticscholarTextSnippetSearch_RefMentionSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n matchedPaperCorpusId: z.string().nullable().optional(),\n}).passthrough().describe(\"Reference mention within the snippet\");\nconst SemanticscholarTextSnippetSearch_AnnotationsSchema = z.object({\n sentences: z.array(SemanticscholarTextSnippetSearch_SentenceSchema).nullable().optional(),\n refMentions: z.array(SemanticscholarTextSnippetSearch_RefMentionSchema).nullable().optional(),\n}).passthrough().describe(\"Annotations within the snippet\");\nconst SemanticscholarTextSnippetSearch_SnippetOffsetSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).passthrough().describe(\"Position of the snippet in the original paper\");\nconst SemanticscholarTextSnippetSearch_SnippetDataSchema = z.object({\n text: z.string().describe(\"Extracted text content (~500 words from the paper)\").nullable().optional(),\n section: z.string().describe(\"Section name where snippet was extracted from\").nullable().optional(),\n annotations: SemanticscholarTextSnippetSearch_AnnotationsSchema.nullable().optional(),\n snippetKind: z.string().describe(\"Type of snippet: 'title', 'abstract', 'body', etc.\").nullable().optional(),\n snippetOffset: SemanticscholarTextSnippetSearch_SnippetOffsetSchema.nullable().optional(),\n}).passthrough().describe(\"Text snippet details\");\nconst SemanticscholarTextSnippetSearch_SnippetResultSchema = z.object({\n paper: SemanticscholarTextSnippetSearch_PaperInfoSchema.nullable().optional(),\n score: z.number().describe(\"Relevance score (higher is better)\").nullable().optional(),\n snippet: SemanticscholarTextSnippetSearch_SnippetDataSchema.nullable().optional(),\n}).passthrough().describe(\"Single search result containing snippet and paper info\");\nconst SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema = z.object({\n data: z.array(SemanticscholarTextSnippetSearch_SnippetResultSchema).describe(\"List of text snippets matching the query, sorted by relevance\").nullable().optional(),\n retrievalVersion: z.string().describe(\"Version of the retrieval system\").nullable().optional(),\n}).passthrough().describe(\"Response data containing search results\");\nexport const SemanticscholarTextSnippetSearchOutput = z.object({\n data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for `TextSnippetSearch`\");\n\nexport const semanticscholarTextSnippetSearch = action(\"SEMANTICSCHOLAR_TEXT_SNIPPET_SEARCH\", {\n slug: \"semanticscholar-text-snippet-search\",\n name: \"Text snippet search\",\n description: \"Search for text snippets (~500 words) within academic papers that match your natural language query. Returns relevant excerpts from papers' titles, abstracts, and body text, ranked by relevance score. Each result includes: snippet text, location in paper, citation references, and paper metadata (title, authors, corpus ID). Supports filtering by authors, publication date, venue, field of study, citation count, and specific paper IDs. Results sorted by relevance (highest score first). Use limit=10 (default, max 1000) to control result count.\",\n input: SemanticscholarTextSnippetSearchInput,\n output: SemanticscholarTextSnippetSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wCAAwCA,IAAAA,EAAE,OAAO;CAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACpI,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,kIAAkI,CAAC,CAAC,SAAS;CAC1L,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0LAA0L;CACrN,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACrI,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oMAAoM,CAAC,CAAC,SAAS;CAC3O,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6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,CAAC,SAAS;CACpF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,eAAe,qDAAqD,SAAS,CAAC,CAAC,SAAS;AAC1F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,sBAAsB;AAChD,MAAM,uDAAuDA,IAAAA,EAAE,OAAO;CACpE,OAAO,iDAAiD,SAAS,CAAC,CAAC,SAAS;CAC5E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrF,SAAS,mDAAmD,SAAS,CAAC,CAAC,SAAS;AAClF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,wDAAwD;AAClF,MAAM,uEAAuEA,IAAAA,EAAE,OAAO;CACpF,MAAMA,IAAAA,EAAE,MAAM,oDAAoD,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClK,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/F,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,yCAAyC;AACnE,MAAa,yCAAyCA,IAAAA,EAAE,OAAO,EAC7D,MAAM,qEAAqE,SAAS,EACtF,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,yCAAyC;AAEnE,MAAa,mCAAmCC,eAAAA,OAAO,uCAAuC;CAC5F,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -24,8 +24,8 @@ declare const SemanticscholarTextSnippetSearchOutput: z.ZodObject<{
|
|
|
24
24
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
25
|
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
26
|
disclaimer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
-
}, z.core.$
|
|
28
|
-
}, z.core.$
|
|
27
|
+
}, z.core.$loose>>>;
|
|
28
|
+
}, z.core.$loose>>>;
|
|
29
29
|
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
30
30
|
snippet: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
31
31
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -34,23 +34,23 @@ declare const SemanticscholarTextSnippetSearchOutput: z.ZodObject<{
|
|
|
34
34
|
sentences: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
35
35
|
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
36
|
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
37
|
-
}, z.core.$
|
|
37
|
+
}, z.core.$loose>>>>;
|
|
38
38
|
refMentions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
39
39
|
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
40
40
|
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
41
|
matchedPaperCorpusId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
-
}, z.core.$
|
|
43
|
-
}, z.core.$
|
|
42
|
+
}, z.core.$loose>>>>;
|
|
43
|
+
}, z.core.$loose>>>;
|
|
44
44
|
snippetKind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
45
|
snippetOffset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
46
46
|
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
47
|
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
48
|
-
}, z.core.$
|
|
49
|
-
}, z.core.$
|
|
50
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$loose>>>;
|
|
49
|
+
}, z.core.$loose>>>;
|
|
50
|
+
}, z.core.$loose>>>>;
|
|
51
51
|
retrievalVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
-
}, z.core.$
|
|
53
|
-
}, z.core.$
|
|
52
|
+
}, z.core.$loose>>;
|
|
53
|
+
}, z.core.$loose>;
|
|
54
54
|
declare const semanticscholarTextSnippetSearch: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
55
55
|
query: string;
|
|
56
56
|
year?: string | undefined;
|
|
@@ -24,8 +24,8 @@ declare const SemanticscholarTextSnippetSearchOutput: z.ZodObject<{
|
|
|
24
24
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
25
|
license: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
26
|
disclaimer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
-
}, z.core.$
|
|
28
|
-
}, z.core.$
|
|
27
|
+
}, z.core.$loose>>>;
|
|
28
|
+
}, z.core.$loose>>>;
|
|
29
29
|
score: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
30
30
|
snippet: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
31
31
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -34,23 +34,23 @@ declare const SemanticscholarTextSnippetSearchOutput: z.ZodObject<{
|
|
|
34
34
|
sentences: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
35
35
|
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
36
|
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
37
|
-
}, z.core.$
|
|
37
|
+
}, z.core.$loose>>>>;
|
|
38
38
|
refMentions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
39
39
|
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
40
40
|
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
41
41
|
matchedPaperCorpusId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
-
}, z.core.$
|
|
43
|
-
}, z.core.$
|
|
42
|
+
}, z.core.$loose>>>>;
|
|
43
|
+
}, z.core.$loose>>>;
|
|
44
44
|
snippetKind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
45
|
snippetOffset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
46
46
|
end: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
47
47
|
start: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
48
|
-
}, z.core.$
|
|
49
|
-
}, z.core.$
|
|
50
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$loose>>>;
|
|
49
|
+
}, z.core.$loose>>>;
|
|
50
|
+
}, z.core.$loose>>>>;
|
|
51
51
|
retrievalVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
-
}, z.core.$
|
|
53
|
-
}, z.core.$
|
|
52
|
+
}, z.core.$loose>>;
|
|
53
|
+
}, z.core.$loose>;
|
|
54
54
|
declare const semanticscholarTextSnippetSearch: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
55
55
|
query: string;
|
|
56
56
|
year?: string | undefined;
|
|
@@ -17,52 +17,52 @@ const SemanticscholarTextSnippetSearch_OpenAccessInfoSchema = z.object({
|
|
|
17
17
|
status: z.string().nullable().optional(),
|
|
18
18
|
license: z.string().nullable().optional(),
|
|
19
19
|
disclaimer: z.string().nullable().optional()
|
|
20
|
-
}).describe("Open access information for the paper");
|
|
20
|
+
}).passthrough().describe("Open access information for the paper");
|
|
21
21
|
const SemanticscholarTextSnippetSearch_PaperInfoSchema = z.object({
|
|
22
22
|
title: z.string().nullable().optional(),
|
|
23
23
|
authors: z.array(z.string()).nullable().optional(),
|
|
24
24
|
corpusId: z.string().nullable().optional(),
|
|
25
25
|
openAccessInfo: SemanticscholarTextSnippetSearch_OpenAccessInfoSchema.nullable().optional()
|
|
26
|
-
}).describe("Basic paper metadata");
|
|
26
|
+
}).passthrough().describe("Basic paper metadata");
|
|
27
27
|
const SemanticscholarTextSnippetSearch_SentenceSchema = z.object({
|
|
28
28
|
end: z.number().int().nullable().optional(),
|
|
29
29
|
start: z.number().int().nullable().optional()
|
|
30
|
-
}).describe("Sentence boundary marker");
|
|
30
|
+
}).passthrough().describe("Sentence boundary marker");
|
|
31
31
|
const SemanticscholarTextSnippetSearch_RefMentionSchema = z.object({
|
|
32
32
|
end: z.number().int().nullable().optional(),
|
|
33
33
|
start: z.number().int().nullable().optional(),
|
|
34
34
|
matchedPaperCorpusId: z.string().nullable().optional()
|
|
35
|
-
}).describe("Reference mention within the snippet");
|
|
35
|
+
}).passthrough().describe("Reference mention within the snippet");
|
|
36
36
|
const SemanticscholarTextSnippetSearch_AnnotationsSchema = z.object({
|
|
37
37
|
sentences: z.array(SemanticscholarTextSnippetSearch_SentenceSchema).nullable().optional(),
|
|
38
38
|
refMentions: z.array(SemanticscholarTextSnippetSearch_RefMentionSchema).nullable().optional()
|
|
39
|
-
}).describe("Annotations within the snippet");
|
|
39
|
+
}).passthrough().describe("Annotations within the snippet");
|
|
40
40
|
const SemanticscholarTextSnippetSearch_SnippetOffsetSchema = z.object({
|
|
41
41
|
end: z.number().int().nullable().optional(),
|
|
42
42
|
start: z.number().int().nullable().optional()
|
|
43
|
-
}).describe("Position of the snippet in the original paper");
|
|
43
|
+
}).passthrough().describe("Position of the snippet in the original paper");
|
|
44
44
|
const SemanticscholarTextSnippetSearch_SnippetDataSchema = z.object({
|
|
45
45
|
text: z.string().describe("Extracted text content (~500 words from the paper)").nullable().optional(),
|
|
46
46
|
section: z.string().describe("Section name where snippet was extracted from").nullable().optional(),
|
|
47
47
|
annotations: SemanticscholarTextSnippetSearch_AnnotationsSchema.nullable().optional(),
|
|
48
48
|
snippetKind: z.string().describe("Type of snippet: 'title', 'abstract', 'body', etc.").nullable().optional(),
|
|
49
49
|
snippetOffset: SemanticscholarTextSnippetSearch_SnippetOffsetSchema.nullable().optional()
|
|
50
|
-
}).describe("Text snippet details");
|
|
50
|
+
}).passthrough().describe("Text snippet details");
|
|
51
51
|
const SemanticscholarTextSnippetSearch_SnippetResultSchema = z.object({
|
|
52
52
|
paper: SemanticscholarTextSnippetSearch_PaperInfoSchema.nullable().optional(),
|
|
53
53
|
score: z.number().describe("Relevance score (higher is better)").nullable().optional(),
|
|
54
54
|
snippet: SemanticscholarTextSnippetSearch_SnippetDataSchema.nullable().optional()
|
|
55
|
-
}).describe("Single search result containing snippet and paper info");
|
|
55
|
+
}).passthrough().describe("Single search result containing snippet and paper info");
|
|
56
56
|
const SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema = z.object({
|
|
57
57
|
data: z.array(SemanticscholarTextSnippetSearch_SnippetResultSchema).describe("List of text snippets matching the query, sorted by relevance").nullable().optional(),
|
|
58
58
|
retrievalVersion: z.string().describe("Version of the retrieval system").nullable().optional()
|
|
59
|
-
}).describe("Response data containing search results");
|
|
59
|
+
}).passthrough().describe("Response data containing search results");
|
|
60
60
|
const semanticscholarTextSnippetSearch = action("SEMANTICSCHOLAR_TEXT_SNIPPET_SEARCH", {
|
|
61
61
|
slug: "semanticscholar-text-snippet-search",
|
|
62
62
|
name: "Text snippet search",
|
|
63
63
|
description: "Search for text snippets (~500 words) within academic papers that match your natural language query. Returns relevant excerpts from papers' titles, abstracts, and body text, ranked by relevance score. Each result includes: snippet text, location in paper, citation references, and paper metadata (title, authors, corpus ID). Supports filtering by authors, publication date, venue, field of study, citation count, and specific paper IDs. Results sorted by relevance (highest score first). Use limit=10 (default, max 1000) to control result count.",
|
|
64
64
|
input: SemanticscholarTextSnippetSearchInput,
|
|
65
|
-
output: z.object({ data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable() }).describe("Response schema for `TextSnippetSearch`")
|
|
65
|
+
output: z.object({ data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable() }).passthrough().describe("Response schema for `TextSnippetSearch`")
|
|
66
66
|
});
|
|
67
67
|
//#endregion
|
|
68
68
|
export { semanticscholarTextSnippetSearch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-snippet-search.mjs","names":[],"sources":["../../src/actions/text-snippet-search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarTextSnippetSearchInput = z.object({\n year: z.string().describe(\"Filter results by publication year. Supports specific years ('2022') or ranges ('2020-2023').\").optional(),\n limit: z.number().int().default(10).describe(\"Maximum number of snippet results to return. Must be between 1 and 1000. Default is 10. Use smaller limits for faster responses.\").optional(),\n query: z.string().describe(\"Plain-text search query to find matching text snippets in academic papers. No special query syntax is supported - just use natural language. Example: 'machine learning neural networks'\"),\n venue: z.string().describe(\"Filter results by publication venue (journal or conference name). Example: 'Nature' or 'ICML'\").optional(),\n fields: z.string().describe(\"Comma-separated list of snippet fields to include in the response. Available fields: text, snippetKind, section, snippetOffset, annotations. If not specified, all fields are returned by default.\").optional(),\n authors: z.string().describe(\"Filter results to papers by specific authors. Provide comma-separated author names (fuzzy matching supported). Uses AND logic - all authors must match. Maximum 10 authors.\").optional(),\n paperIds: z.string().describe(\"Filter results to only snippets from specific papers. Provide a comma-separated list of paper IDs (supports multiple ID formats: corpusId, DOI, arXiv ID, etc.). Maximum ~100 paper IDs.\").optional(),\n fieldsOfStudy: z.string().describe(\"Filter results by academic field. Comma-separated list of fields like 'Computer Science', 'Medicine', 'Physics', etc.\").optional(),\n minCitationCount: z.string().describe(\"Filter results to papers with at least this many citations. Useful for finding influential papers. Example: '10' or '100'\").optional(),\n publicationDateOrYear: z.string().describe(\"Filter results by publication date range. Supports ranges like '2020-2023' or specific years like '2022'.\").optional(),\n}).describe(\"Request schema for `TextSnippetSearch`\");\nconst SemanticscholarTextSnippetSearch_OpenAccessInfoSchema = z.object({\n status: z.string().nullable().optional(),\n license: z.string().nullable().optional(),\n disclaimer: z.string().nullable().optional(),\n}).describe(\"Open access information for the paper\");\nconst SemanticscholarTextSnippetSearch_PaperInfoSchema = z.object({\n title: z.string().nullable().optional(),\n authors: z.array(z.string()).nullable().optional(),\n corpusId: z.string().nullable().optional(),\n openAccessInfo: SemanticscholarTextSnippetSearch_OpenAccessInfoSchema.nullable().optional(),\n}).describe(\"Basic paper metadata\");\nconst SemanticscholarTextSnippetSearch_SentenceSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).describe(\"Sentence boundary marker\");\nconst SemanticscholarTextSnippetSearch_RefMentionSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n matchedPaperCorpusId: z.string().nullable().optional(),\n}).describe(\"Reference mention within the snippet\");\nconst SemanticscholarTextSnippetSearch_AnnotationsSchema = z.object({\n sentences: z.array(SemanticscholarTextSnippetSearch_SentenceSchema).nullable().optional(),\n refMentions: z.array(SemanticscholarTextSnippetSearch_RefMentionSchema).nullable().optional(),\n}).describe(\"Annotations within the snippet\");\nconst SemanticscholarTextSnippetSearch_SnippetOffsetSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).describe(\"Position of the snippet in the original paper\");\nconst SemanticscholarTextSnippetSearch_SnippetDataSchema = z.object({\n text: z.string().describe(\"Extracted text content (~500 words from the paper)\").nullable().optional(),\n section: z.string().describe(\"Section name where snippet was extracted from\").nullable().optional(),\n annotations: SemanticscholarTextSnippetSearch_AnnotationsSchema.nullable().optional(),\n snippetKind: z.string().describe(\"Type of snippet: 'title', 'abstract', 'body', etc.\").nullable().optional(),\n snippetOffset: SemanticscholarTextSnippetSearch_SnippetOffsetSchema.nullable().optional(),\n}).describe(\"Text snippet details\");\nconst SemanticscholarTextSnippetSearch_SnippetResultSchema = z.object({\n paper: SemanticscholarTextSnippetSearch_PaperInfoSchema.nullable().optional(),\n score: z.number().describe(\"Relevance score (higher is better)\").nullable().optional(),\n snippet: SemanticscholarTextSnippetSearch_SnippetDataSchema.nullable().optional(),\n}).describe(\"Single search result containing snippet and paper info\");\nconst SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema = z.object({\n data: z.array(SemanticscholarTextSnippetSearch_SnippetResultSchema).describe(\"List of text snippets matching the query, sorted by relevance\").nullable().optional(),\n retrievalVersion: z.string().describe(\"Version of the retrieval system\").nullable().optional(),\n}).describe(\"Response data containing search results\");\nexport const SemanticscholarTextSnippetSearchOutput = z.object({\n data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable(),\n}).describe(\"Response schema for `TextSnippetSearch`\");\n\nexport const semanticscholarTextSnippetSearch = action(\"SEMANTICSCHOLAR_TEXT_SNIPPET_SEARCH\", {\n slug: \"semanticscholar-text-snippet-search\",\n name: \"Text snippet search\",\n description: \"Search for text snippets (~500 words) within academic papers that match your natural language query. Returns relevant excerpts from papers' titles, abstracts, and body text, ranked by relevance score. Each result includes: snippet text, location in paper, citation references, and paper metadata (title, authors, corpus ID). Supports filtering by authors, publication date, venue, field of study, citation count, and specific paper IDs. Results sorted by relevance (highest score first). Use limit=10 (default, max 1000) to control result count.\",\n input: SemanticscholarTextSnippetSearchInput,\n output: SemanticscholarTextSnippetSearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wCAAwC,EAAE,OAAO;CAC5D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACpI,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,kIAAkI,CAAC,CAAC,SAAS;CAC1L,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,0LAA0L;CACrN,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACrI,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oMAAoM,CAAC,CAAC,SAAS;CAC3O,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,6KAA6K,CAAC,CAAC,SAAS;CACrN,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,0LAA0L,CAAC,CAAC,SAAS;CACnO,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,uHAAuH,CAAC,CAAC,SAAS;CACrK,kBAAkB,EAAE,OAAO,CAAC,CAAC,SAAS,2HAA2H,CAAC,CAAC,SAAS;CAC5K,uBAAuB,EAAE,OAAO,CAAC,CAAC,SAAS,2GAA2G,CAAC,CAAC,SAAS;AACnK,CAAC,CAAC,CAAC,SAAS,wCAAwC;AACpD,MAAM,wDAAwD,EAAE,OAAO;CACrE,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvC,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxC,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC7C,CAAC,CAAC,CAAC,SAAS,uCAAuC;
|
|
1
|
+
{"version":3,"file":"text-snippet-search.mjs","names":[],"sources":["../../src/actions/text-snippet-search.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SemanticscholarTextSnippetSearchInput = z.object({\n year: z.string().describe(\"Filter results by publication year. Supports specific years ('2022') or ranges ('2020-2023').\").optional(),\n limit: z.number().int().default(10).describe(\"Maximum number of snippet results to return. Must be between 1 and 1000. Default is 10. Use smaller limits for faster responses.\").optional(),\n query: z.string().describe(\"Plain-text search query to find matching text snippets in academic papers. No special query syntax is supported - just use natural language. Example: 'machine learning neural networks'\"),\n venue: z.string().describe(\"Filter results by publication venue (journal or conference name). Example: 'Nature' or 'ICML'\").optional(),\n fields: z.string().describe(\"Comma-separated list of snippet fields to include in the response. Available fields: text, snippetKind, section, snippetOffset, annotations. If not specified, all fields are returned by default.\").optional(),\n authors: z.string().describe(\"Filter results to papers by specific authors. Provide comma-separated author names (fuzzy matching supported). Uses AND logic - all authors must match. Maximum 10 authors.\").optional(),\n paperIds: z.string().describe(\"Filter results to only snippets from specific papers. Provide a comma-separated list of paper IDs (supports multiple ID formats: corpusId, DOI, arXiv ID, etc.). Maximum ~100 paper IDs.\").optional(),\n fieldsOfStudy: z.string().describe(\"Filter results by academic field. Comma-separated list of fields like 'Computer Science', 'Medicine', 'Physics', etc.\").optional(),\n minCitationCount: z.string().describe(\"Filter results to papers with at least this many citations. Useful for finding influential papers. Example: '10' or '100'\").optional(),\n publicationDateOrYear: z.string().describe(\"Filter results by publication date range. Supports ranges like '2020-2023' or specific years like '2022'.\").optional(),\n}).describe(\"Request schema for `TextSnippetSearch`\");\nconst SemanticscholarTextSnippetSearch_OpenAccessInfoSchema = z.object({\n status: z.string().nullable().optional(),\n license: z.string().nullable().optional(),\n disclaimer: z.string().nullable().optional(),\n}).passthrough().describe(\"Open access information for the paper\");\nconst SemanticscholarTextSnippetSearch_PaperInfoSchema = z.object({\n title: z.string().nullable().optional(),\n authors: z.array(z.string()).nullable().optional(),\n corpusId: z.string().nullable().optional(),\n openAccessInfo: SemanticscholarTextSnippetSearch_OpenAccessInfoSchema.nullable().optional(),\n}).passthrough().describe(\"Basic paper metadata\");\nconst SemanticscholarTextSnippetSearch_SentenceSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).passthrough().describe(\"Sentence boundary marker\");\nconst SemanticscholarTextSnippetSearch_RefMentionSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n matchedPaperCorpusId: z.string().nullable().optional(),\n}).passthrough().describe(\"Reference mention within the snippet\");\nconst SemanticscholarTextSnippetSearch_AnnotationsSchema = z.object({\n sentences: z.array(SemanticscholarTextSnippetSearch_SentenceSchema).nullable().optional(),\n refMentions: z.array(SemanticscholarTextSnippetSearch_RefMentionSchema).nullable().optional(),\n}).passthrough().describe(\"Annotations within the snippet\");\nconst SemanticscholarTextSnippetSearch_SnippetOffsetSchema = z.object({\n end: z.number().int().nullable().optional(),\n start: z.number().int().nullable().optional(),\n}).passthrough().describe(\"Position of the snippet in the original paper\");\nconst SemanticscholarTextSnippetSearch_SnippetDataSchema = z.object({\n text: z.string().describe(\"Extracted text content (~500 words from the paper)\").nullable().optional(),\n section: z.string().describe(\"Section name where snippet was extracted from\").nullable().optional(),\n annotations: SemanticscholarTextSnippetSearch_AnnotationsSchema.nullable().optional(),\n snippetKind: z.string().describe(\"Type of snippet: 'title', 'abstract', 'body', etc.\").nullable().optional(),\n snippetOffset: SemanticscholarTextSnippetSearch_SnippetOffsetSchema.nullable().optional(),\n}).passthrough().describe(\"Text snippet details\");\nconst SemanticscholarTextSnippetSearch_SnippetResultSchema = z.object({\n paper: SemanticscholarTextSnippetSearch_PaperInfoSchema.nullable().optional(),\n score: z.number().describe(\"Relevance score (higher is better)\").nullable().optional(),\n snippet: SemanticscholarTextSnippetSearch_SnippetDataSchema.nullable().optional(),\n}).passthrough().describe(\"Single search result containing snippet and paper info\");\nconst SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema = z.object({\n data: z.array(SemanticscholarTextSnippetSearch_SnippetResultSchema).describe(\"List of text snippets matching the query, sorted by relevance\").nullable().optional(),\n retrievalVersion: z.string().describe(\"Version of the retrieval system\").nullable().optional(),\n}).passthrough().describe(\"Response data containing search results\");\nexport const SemanticscholarTextSnippetSearchOutput = z.object({\n data: SemanticscholarTextSnippetSearch_TextSnippetSearchResponseDataSchema.nullable(),\n}).passthrough().describe(\"Response schema for `TextSnippetSearch`\");\n\nexport const semanticscholarTextSnippetSearch = action(\"SEMANTICSCHOLAR_TEXT_SNIPPET_SEARCH\", {\n slug: \"semanticscholar-text-snippet-search\",\n name: \"Text snippet search\",\n description: \"Search for text snippets (~500 words) within academic papers that match your natural language query. Returns relevant excerpts from papers' titles, abstracts, and body text, ranked by relevance score. Each result includes: snippet text, location in paper, citation references, and paper metadata (title, authors, corpus ID). Supports filtering by authors, publication date, venue, field of study, citation count, and specific paper IDs. Results sorted by relevance (highest score first). Use limit=10 (default, max 1000) to control result count.\",\n input: SemanticscholarTextSnippetSearchInput,\n output: SemanticscholarTextSnippetSearchOutput,\n});\n"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