paper-search-cli 0.3.1 → 0.3.2
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/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/capabilities/body-snippet-search/handler.d.ts +9 -0
- package/dist/capabilities/body-snippet-search/handler.d.ts.map +1 -0
- package/dist/capabilities/body-snippet-search/handler.js +17 -0
- package/dist/capabilities/body-snippet-search/handler.js.map +1 -0
- package/dist/capabilities/body-snippet-search/index.d.ts +7 -0
- package/dist/capabilities/body-snippet-search/index.d.ts.map +1 -0
- package/dist/capabilities/body-snippet-search/index.js +6 -0
- package/dist/capabilities/body-snippet-search/index.js.map +1 -0
- package/dist/capabilities/body-snippet-search/schemas.d.ts +36 -0
- package/dist/capabilities/body-snippet-search/schemas.d.ts.map +1 -0
- package/dist/capabilities/body-snippet-search/schemas.js +16 -0
- package/dist/capabilities/body-snippet-search/schemas.js.map +1 -0
- package/dist/capabilities/body-snippet-search/service.d.ts +4 -0
- package/dist/capabilities/body-snippet-search/service.d.ts.map +1 -0
- package/dist/capabilities/body-snippet-search/service.js +4 -0
- package/dist/capabilities/body-snippet-search/service.js.map +1 -0
- package/dist/capabilities/body-snippet-search/tools.d.ts +187 -0
- package/dist/capabilities/body-snippet-search/tools.d.ts.map +1 -0
- package/dist/capabilities/body-snippet-search/tools.js +49 -0
- package/dist/capabilities/body-snippet-search/tools.js.map +1 -0
- package/dist/capabilities/body-snippet-search/types.d.ts +14 -0
- package/dist/capabilities/body-snippet-search/types.d.ts.map +1 -0
- package/dist/capabilities/body-snippet-search/types.js +2 -0
- package/dist/capabilities/body-snippet-search/types.js.map +1 -0
- package/dist/capabilities/citation-expansion/CitationService.d.ts +47 -0
- package/dist/capabilities/citation-expansion/CitationService.d.ts.map +1 -0
- package/dist/capabilities/citation-expansion/CitationService.js +243 -0
- package/dist/capabilities/citation-expansion/CitationService.js.map +1 -0
- package/dist/capabilities/citation-expansion/handler.d.ts +36 -0
- package/dist/capabilities/citation-expansion/handler.d.ts.map +1 -0
- package/dist/capabilities/citation-expansion/handler.js +44 -0
- package/dist/capabilities/citation-expansion/handler.js.map +1 -0
- package/dist/capabilities/citation-expansion/index.d.ts +6 -0
- package/dist/capabilities/citation-expansion/index.d.ts.map +1 -0
- package/dist/capabilities/citation-expansion/index.js +5 -0
- package/dist/capabilities/citation-expansion/index.js.map +1 -0
- package/dist/capabilities/citation-expansion/schemas.d.ts +28 -0
- package/dist/capabilities/citation-expansion/schemas.d.ts.map +1 -0
- package/dist/capabilities/citation-expansion/schemas.js +13 -0
- package/dist/capabilities/citation-expansion/schemas.js.map +1 -0
- package/dist/capabilities/citation-expansion/tools.d.ts +82 -0
- package/dist/capabilities/citation-expansion/tools.d.ts.map +1 -0
- package/dist/capabilities/citation-expansion/tools.js +48 -0
- package/dist/capabilities/citation-expansion/tools.js.map +1 -0
- package/dist/capabilities/citation-expansion/types.d.ts +22 -0
- package/dist/capabilities/citation-expansion/types.d.ts.map +1 -0
- package/dist/capabilities/citation-expansion/types.js +2 -0
- package/dist/capabilities/citation-expansion/types.js.map +1 -0
- package/dist/capabilities/journal-metrics/JournalMetricsService.d.ts +3 -0
- package/dist/capabilities/journal-metrics/JournalMetricsService.d.ts.map +1 -0
- package/dist/capabilities/journal-metrics/JournalMetricsService.js +142 -0
- package/dist/capabilities/journal-metrics/JournalMetricsService.js.map +1 -0
- package/dist/capabilities/journal-metrics/handler.d.ts +12 -0
- package/dist/capabilities/journal-metrics/handler.d.ts.map +1 -0
- package/dist/capabilities/journal-metrics/handler.js +38 -0
- package/dist/capabilities/journal-metrics/handler.js.map +1 -0
- package/dist/capabilities/journal-metrics/index.d.ts +6 -0
- package/dist/capabilities/journal-metrics/index.d.ts.map +1 -0
- package/dist/capabilities/journal-metrics/index.js +5 -0
- package/dist/capabilities/journal-metrics/index.js.map +1 -0
- package/dist/capabilities/journal-metrics/schemas.d.ts +28 -0
- package/dist/capabilities/journal-metrics/schemas.d.ts.map +1 -0
- package/dist/capabilities/journal-metrics/schemas.js +13 -0
- package/dist/capabilities/journal-metrics/schemas.js.map +1 -0
- package/dist/capabilities/journal-metrics/tools.d.ts +67 -0
- package/dist/capabilities/journal-metrics/tools.d.ts.map +1 -0
- package/dist/capabilities/journal-metrics/tools.js +27 -0
- package/dist/capabilities/journal-metrics/tools.js.map +1 -0
- package/dist/capabilities/journal-metrics/types.d.ts +36 -0
- package/dist/capabilities/journal-metrics/types.d.ts.map +1 -0
- package/dist/capabilities/journal-metrics/types.js +2 -0
- package/dist/capabilities/journal-metrics/types.js.map +1 -0
- package/dist/capabilities/metadata-search/MultiSourceSearchService.d.ts +9 -0
- package/dist/capabilities/metadata-search/MultiSourceSearchService.d.ts.map +1 -0
- package/dist/capabilities/metadata-search/MultiSourceSearchService.js +78 -0
- package/dist/capabilities/metadata-search/MultiSourceSearchService.js.map +1 -0
- package/dist/capabilities/metadata-search/handler.d.ts +23 -0
- package/dist/capabilities/metadata-search/handler.d.ts.map +1 -0
- package/dist/capabilities/metadata-search/handler.js +163 -0
- package/dist/capabilities/metadata-search/handler.js.map +1 -0
- package/dist/capabilities/metadata-search/index.d.ts +6 -0
- package/dist/capabilities/metadata-search/index.d.ts.map +1 -0
- package/dist/capabilities/metadata-search/index.js +5 -0
- package/dist/capabilities/metadata-search/index.js.map +1 -0
- package/dist/capabilities/metadata-search/schemas.d.ts +83 -0
- package/dist/capabilities/metadata-search/schemas.d.ts.map +1 -0
- package/dist/capabilities/metadata-search/schemas.js +81 -0
- package/dist/capabilities/metadata-search/schemas.js.map +1 -0
- package/dist/capabilities/metadata-search/tools.d.ts +178 -0
- package/dist/capabilities/metadata-search/tools.d.ts.map +1 -0
- package/dist/capabilities/metadata-search/tools.js +75 -0
- package/dist/capabilities/metadata-search/tools.js.map +1 -0
- package/dist/capabilities/metadata-search/types.d.ts +13 -0
- package/dist/capabilities/metadata-search/types.d.ts.map +1 -0
- package/dist/capabilities/metadata-search/types.js +2 -0
- package/dist/capabilities/metadata-search/types.js.map +1 -0
- package/dist/capabilities/pdf-discovery/DownloadTier.d.ts +22 -0
- package/dist/capabilities/pdf-discovery/DownloadTier.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/DownloadTier.js +2 -0
- package/dist/capabilities/pdf-discovery/DownloadTier.js.map +1 -0
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.d.ts +10 -0
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.js +53 -0
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.js.map +1 -0
- package/dist/capabilities/pdf-discovery/handler.d.ts +19 -0
- package/dist/capabilities/pdf-discovery/handler.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/handler.js +56 -0
- package/dist/capabilities/pdf-discovery/handler.js.map +1 -0
- package/dist/capabilities/pdf-discovery/index.d.ts +7 -0
- package/dist/capabilities/pdf-discovery/index.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/index.js +5 -0
- package/dist/capabilities/pdf-discovery/index.js.map +1 -0
- package/dist/capabilities/pdf-discovery/schemas.d.ts +37 -0
- package/dist/capabilities/pdf-discovery/schemas.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/schemas.js +22 -0
- package/dist/capabilities/pdf-discovery/schemas.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.d.ts +3 -0
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.js +27 -0
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/primary.d.ts +3 -0
- package/dist/capabilities/pdf-discovery/tiers/primary.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/primary.js +21 -0
- package/dist/capabilities/pdf-discovery/tiers/primary.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/repositories.d.ts +3 -0
- package/dist/capabilities/pdf-discovery/tiers/repositories.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/repositories.js +35 -0
- package/dist/capabilities/pdf-discovery/tiers/repositories.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/scihub.d.ts +3 -0
- package/dist/capabilities/pdf-discovery/tiers/scihub.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/scihub.js +21 -0
- package/dist/capabilities/pdf-discovery/tiers/scihub.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.d.ts +3 -0
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.js +29 -0
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tools.d.ts +114 -0
- package/dist/capabilities/pdf-discovery/tools.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tools.js +42 -0
- package/dist/capabilities/pdf-discovery/tools.js.map +1 -0
- package/dist/capabilities/pdf-discovery/types.d.ts +19 -0
- package/dist/capabilities/pdf-discovery/types.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/types.js +2 -0
- package/dist/capabilities/pdf-discovery/types.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/cli.js.map +1 -1
- package/dist/core/capabilityProfile.d.ts +1 -17
- package/dist/core/capabilityProfile.d.ts.map +1 -1
- package/dist/core/capabilityProfile.js +1 -166
- package/dist/core/capabilityProfile.js.map +1 -1
- package/dist/core/diagnostics.d.ts +1 -42
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/diagnostics.js +1 -585
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/handleToolCall.d.ts +1 -0
- package/dist/core/handleToolCall.d.ts.map +1 -1
- package/dist/core/handleToolCall.js +265 -509
- package/dist/core/handleToolCall.js.map +1 -1
- package/dist/core/httpPolicies.d.ts +2 -0
- package/dist/core/httpPolicies.d.ts.map +1 -0
- package/dist/core/httpPolicies.js +2 -0
- package/dist/core/httpPolicies.js.map +1 -0
- package/dist/core/liveSmoke.d.ts +1 -41
- package/dist/core/liveSmoke.d.ts.map +1 -1
- package/dist/core/liveSmoke.js +1 -225
- package/dist/core/liveSmoke.js.map +1 -1
- package/dist/core/platformFactories.d.ts +2 -0
- package/dist/core/platformFactories.d.ts.map +1 -0
- package/dist/core/platformFactories.js +2 -0
- package/dist/core/platformFactories.js.map +1 -0
- package/dist/core/platformMetadata.d.ts +1 -27
- package/dist/core/platformMetadata.d.ts.map +1 -1
- package/dist/core/platformMetadata.js +1 -257
- package/dist/core/platformMetadata.js.map +1 -1
- package/dist/core/schemas.d.ts +10 -202
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +11 -118
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/searchers.d.ts +24 -24
- package/dist/core/searchers.d.ts.map +1 -1
- package/dist/core/searchers.js +14 -79
- package/dist/core/searchers.js.map +1 -1
- package/dist/core/textReports.d.ts +1 -20
- package/dist/core/textReports.d.ts.map +1 -1
- package/dist/core/textReports.js +1 -84
- package/dist/core/textReports.js.map +1 -1
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +15 -237
- package/dist/core/tools.js.map +1 -1
- package/dist/infrastructure/cache/RequestCache.d.ts +26 -0
- package/dist/infrastructure/cache/RequestCache.d.ts.map +1 -0
- package/dist/infrastructure/cache/RequestCache.js +66 -0
- package/dist/infrastructure/cache/RequestCache.js.map +1 -0
- package/dist/infrastructure/http/ErrorHandler.d.ts +99 -0
- package/dist/infrastructure/http/ErrorHandler.d.ts.map +1 -0
- package/dist/infrastructure/http/ErrorHandler.js +266 -0
- package/dist/infrastructure/http/ErrorHandler.js.map +1 -0
- package/dist/infrastructure/http/HttpClient.d.ts +31 -0
- package/dist/infrastructure/http/HttpClient.d.ts.map +1 -0
- package/dist/infrastructure/http/HttpClient.js +50 -0
- package/dist/infrastructure/http/HttpClient.js.map +1 -0
- package/dist/infrastructure/pdf/PDFExtractor.d.ts +34 -0
- package/dist/infrastructure/pdf/PDFExtractor.d.ts.map +1 -0
- package/dist/infrastructure/pdf/PDFExtractor.js +130 -0
- package/dist/infrastructure/pdf/PDFExtractor.js.map +1 -0
- package/dist/infrastructure/pdf/PdfDownload.d.ts +7 -0
- package/dist/infrastructure/pdf/PdfDownload.d.ts.map +1 -0
- package/dist/infrastructure/pdf/PdfDownload.js +175 -0
- package/dist/infrastructure/pdf/PdfDownload.js.map +1 -0
- package/dist/infrastructure/rate-limit/RateLimiter.d.ts +50 -0
- package/dist/infrastructure/rate-limit/RateLimiter.d.ts.map +1 -0
- package/dist/infrastructure/rate-limit/RateLimiter.js +128 -0
- package/dist/infrastructure/rate-limit/RateLimiter.js.map +1 -0
- package/dist/infrastructure/security/SecurityUtils.d.ts +80 -0
- package/dist/infrastructure/security/SecurityUtils.d.ts.map +1 -0
- package/dist/infrastructure/security/SecurityUtils.js +357 -0
- package/dist/infrastructure/security/SecurityUtils.js.map +1 -0
- package/dist/management/capability-profile/index.d.ts +18 -0
- package/dist/management/capability-profile/index.d.ts.map +1 -0
- package/dist/management/capability-profile/index.js +167 -0
- package/dist/management/capability-profile/index.js.map +1 -0
- package/dist/management/config/index.d.ts +2 -0
- package/dist/management/config/index.d.ts.map +1 -0
- package/dist/management/config/index.js +2 -0
- package/dist/management/config/index.js.map +1 -0
- package/dist/management/diagnostics/index.d.ts +43 -0
- package/dist/management/diagnostics/index.d.ts.map +1 -0
- package/dist/management/diagnostics/index.js +586 -0
- package/dist/management/diagnostics/index.js.map +1 -0
- package/dist/management/reports/index.d.ts +21 -0
- package/dist/management/reports/index.d.ts.map +1 -0
- package/dist/management/reports/index.js +85 -0
- package/dist/management/reports/index.js.map +1 -0
- package/dist/management/skills/index.d.ts +2 -0
- package/dist/management/skills/index.d.ts.map +1 -0
- package/dist/management/skills/index.js +2 -0
- package/dist/management/skills/index.js.map +1 -0
- package/dist/management/smoke/index.d.ts +42 -0
- package/dist/management/smoke/index.d.ts.map +1 -0
- package/dist/management/smoke/index.js +226 -0
- package/dist/management/smoke/index.js.map +1 -0
- package/dist/registry/aliases.d.ts +2 -0
- package/dist/registry/aliases.d.ts.map +1 -0
- package/dist/registry/aliases.js +2 -0
- package/dist/registry/aliases.js.map +1 -0
- package/dist/registry/httpPolicies.d.ts +3 -0
- package/dist/registry/httpPolicies.d.ts.map +1 -0
- package/dist/registry/httpPolicies.js +17 -0
- package/dist/registry/httpPolicies.js.map +1 -0
- package/dist/registry/platformFactories.d.ts +8 -0
- package/dist/registry/platformFactories.d.ts.map +1 -0
- package/dist/registry/platformFactories.js +55 -0
- package/dist/registry/platformFactories.js.map +1 -0
- package/dist/registry/platformMetadata.d.ts +39 -0
- package/dist/registry/platformMetadata.d.ts.map +1 -0
- package/dist/registry/platformMetadata.js +321 -0
- package/dist/registry/platformMetadata.js.map +1 -0
- package/dist/services/CitationService.d.ts +2 -65
- package/dist/services/CitationService.d.ts.map +1 -1
- package/dist/services/CitationService.js +1 -242
- package/dist/services/CitationService.js.map +1 -1
- package/dist/services/JournalMetricsService.d.ts +2 -37
- package/dist/services/JournalMetricsService.d.ts.map +1 -1
- package/dist/services/JournalMetricsService.js +1 -141
- package/dist/services/JournalMetricsService.js.map +1 -1
- package/dist/services/MultiSourceSearchService.d.ts +2 -18
- package/dist/services/MultiSourceSearchService.d.ts.map +1 -1
- package/dist/services/MultiSourceSearchService.js +1 -77
- package/dist/services/MultiSourceSearchService.js.map +1 -1
- package/dist/services/OpenAccessFallbackService.d.ts +3 -40
- package/dist/services/OpenAccessFallbackService.d.ts.map +1 -1
- package/dist/services/OpenAccessFallbackService.js +1 -146
- package/dist/services/OpenAccessFallbackService.js.map +1 -1
- package/dist/utils/ErrorHandler.d.ts +2 -98
- package/dist/utils/ErrorHandler.d.ts.map +1 -1
- package/dist/utils/ErrorHandler.js +2 -265
- package/dist/utils/ErrorHandler.js.map +1 -1
- package/dist/utils/HttpClient.d.ts +1 -5
- package/dist/utils/HttpClient.d.ts.map +1 -1
- package/dist/utils/HttpClient.js +1 -29
- package/dist/utils/HttpClient.js.map +1 -1
- package/dist/utils/PDFExtractor.d.ts +2 -33
- package/dist/utils/PDFExtractor.d.ts.map +1 -1
- package/dist/utils/PDFExtractor.js +2 -129
- package/dist/utils/PDFExtractor.js.map +1 -1
- package/dist/utils/PdfDownload.d.ts +1 -6
- package/dist/utils/PdfDownload.d.ts.map +1 -1
- package/dist/utils/PdfDownload.js +1 -141
- package/dist/utils/PdfDownload.js.map +1 -1
- package/dist/utils/RateLimiter.d.ts +1 -49
- package/dist/utils/RateLimiter.d.ts.map +1 -1
- package/dist/utils/RateLimiter.js +1 -127
- package/dist/utils/RateLimiter.js.map +1 -1
- package/dist/utils/RequestCache.d.ts +2 -25
- package/dist/utils/RequestCache.d.ts.map +1 -1
- package/dist/utils/RequestCache.js +2 -65
- package/dist/utils/RequestCache.js.map +1 -1
- package/dist/utils/SecurityUtils.d.ts +2 -79
- package/dist/utils/SecurityUtils.d.ts.map +1 -1
- package/dist/utils/SecurityUtils.js +2 -356
- package/dist/utils/SecurityUtils.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Paper Search CLI is an agent-facing Skill + CLI package built on a standalone No
|
|
|
8
8
|

|
|
9
9
|

|
|
10
10
|

|
|
11
|
-

|
|
12
12
|
[](https://linux.do)
|
|
13
13
|
|
|
14
14
|
[Quick Start](#quick-start) | [Architecture](#architecture) | [Configuration](#configuration) | [Agent Skill](#agent-skill) | [Supported Platforms](#supported-platforms) | [Commands](#commands) | [Troubleshooting](#troubleshooting)
|
package/README.zh.md
CHANGED
|
@@ -8,7 +8,7 @@ Paper Search CLI 是一个面向 AI agent 的 Skill + CLI 包,基于独立的
|
|
|
8
8
|

|
|
9
9
|

|
|
10
10
|

|
|
11
|
-

|
|
12
12
|
[](https://linux.do)
|
|
13
13
|
|
|
14
14
|
[快速开始](#快速开始) | [架构说明](#架构说明) | [配置](#配置) | [Agent Skill](#agent-skill) | [支持平台](#支持平台) | [命令](#命令) | [排障](#排障)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Searchers } from '../../core/searchers.js';
|
|
2
|
+
import type { SemanticSnippetSearchArgs } from './types.js';
|
|
3
|
+
export declare function handleSemanticSnippets(args: SemanticSnippetSearchArgs, searchers: Searchers): Promise<{
|
|
4
|
+
content: {
|
|
5
|
+
type: "text";
|
|
6
|
+
text: string;
|
|
7
|
+
}[];
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAa5D,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,yBAAyB,EAAE,SAAS,EAAE,SAAS;;;;;GAWjG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { searchBodySnippets } from './service.js';
|
|
2
|
+
function jsonTextResponse(text) {
|
|
3
|
+
return {
|
|
4
|
+
content: [
|
|
5
|
+
{
|
|
6
|
+
type: 'text',
|
|
7
|
+
text
|
|
8
|
+
}
|
|
9
|
+
]
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export async function handleSemanticSnippets(args, searchers) {
|
|
13
|
+
const results = await searchBodySnippets(searchers, args);
|
|
14
|
+
const bodyCount = results.filter(result => result.snippet.snippetKind === 'body').length;
|
|
15
|
+
return jsonTextResponse(`Found ${results.length} Semantic Scholar snippet(s), including ${bodyCount} body snippet(s).\n\n${JSON.stringify(results, null, 2)}`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/handler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlD,SAAS,gBAAgB,CAAC,IAAY;IACpC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI;aACL;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAA+B,EAAE,SAAoB;IAChG,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC1D,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IAEzF,OAAO,gBAAgB,CACrB,SAAS,OAAO,CAAC,MAAM,2CAA2C,SAAS,wBAAwB,IAAI,CAAC,SAAS,CAC/G,OAAO,EACP,IAAI,EACJ,CAAC,CACF,EAAE,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { SemanticScholarSearcher } from '../../platforms/SemanticScholarSearcher.js';
|
|
2
|
+
export { handleSemanticSnippets } from './handler.js';
|
|
3
|
+
export { SearchSemanticSnippetsSchema } from './schemas.js';
|
|
4
|
+
export { searchBodySnippets } from './service.js';
|
|
5
|
+
export { BODY_SNIPPET_SEARCH_TOOLS, SEARCH_SEMANTIC_SNIPPETS_TOOL } from './tools.js';
|
|
6
|
+
export type { SemanticSnippetResult, SemanticSnippetSearchArgs } from './types.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEtF,YAAY,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { SemanticScholarSearcher } from '../../platforms/SemanticScholarSearcher.js';
|
|
2
|
+
export { handleSemanticSnippets } from './handler.js';
|
|
3
|
+
export { SearchSemanticSnippetsSchema } from './schemas.js';
|
|
4
|
+
export { searchBodySnippets } from './service.js';
|
|
5
|
+
export { BODY_SNIPPET_SEARCH_TOOLS, SEARCH_SEMANTIC_SNIPPETS_TOOL } from './tools.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SearchSemanticSnippetsSchema: z.ZodObject<{
|
|
3
|
+
query: z.ZodString;
|
|
4
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
5
|
+
year: z.ZodOptional<z.ZodString>;
|
|
6
|
+
fieldsOfStudy: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
7
|
+
paperIds: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
8
|
+
authors: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
9
|
+
venue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
10
|
+
minCitationCount: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
publicationDateOrYear: z.ZodOptional<z.ZodString>;
|
|
12
|
+
fields: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
query: string;
|
|
15
|
+
limit: number;
|
|
16
|
+
authors?: string | string[] | undefined;
|
|
17
|
+
year?: string | undefined;
|
|
18
|
+
venue?: string | string[] | undefined;
|
|
19
|
+
fieldsOfStudy?: string | string[] | undefined;
|
|
20
|
+
fields?: string | string[] | undefined;
|
|
21
|
+
paperIds?: string | string[] | undefined;
|
|
22
|
+
minCitationCount?: number | undefined;
|
|
23
|
+
publicationDateOrYear?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
query: string;
|
|
26
|
+
authors?: string | string[] | undefined;
|
|
27
|
+
year?: string | undefined;
|
|
28
|
+
venue?: string | string[] | undefined;
|
|
29
|
+
fieldsOfStudy?: string | string[] | undefined;
|
|
30
|
+
limit?: number | undefined;
|
|
31
|
+
fields?: string | string[] | undefined;
|
|
32
|
+
paperIds?: string | string[] | undefined;
|
|
33
|
+
minCitationCount?: number | undefined;
|
|
34
|
+
publicationDateOrYear?: string | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa/B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const SearchSemanticSnippetsSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
query: z.string().min(1),
|
|
5
|
+
limit: z.number().int().min(1).max(1000).optional().default(5),
|
|
6
|
+
year: z.string().optional(),
|
|
7
|
+
fieldsOfStudy: z.union([z.string(), z.array(z.string())]).optional(),
|
|
8
|
+
paperIds: z.union([z.string(), z.array(z.string())]).optional(),
|
|
9
|
+
authors: z.union([z.string(), z.array(z.string())]).optional(),
|
|
10
|
+
venue: z.union([z.string(), z.array(z.string())]).optional(),
|
|
11
|
+
minCitationCount: z.number().int().min(0).optional(),
|
|
12
|
+
publicationDateOrYear: z.string().optional(),
|
|
13
|
+
fields: z.union([z.string(), z.array(z.string())]).optional()
|
|
14
|
+
})
|
|
15
|
+
.strip();
|
|
16
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC/D,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC9D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5D,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpD,qBAAqB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC9D,CAAC;KACD,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Searchers } from '../../core/searchers.js';
|
|
2
|
+
import type { SemanticSnippetResult, SemanticSnippetSearchArgs } from './types.js';
|
|
3
|
+
export declare function searchBodySnippets(searchers: Searchers, args: SemanticSnippetSearchArgs): Promise<SemanticSnippetResult[]>;
|
|
4
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEnF,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAElC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/service.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,SAAoB,EACpB,IAA+B;IAE/B,OAAO,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
export declare const SEARCH_SEMANTIC_SNIPPETS_TOOL: {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
query: {
|
|
8
|
+
type: string;
|
|
9
|
+
description: string;
|
|
10
|
+
};
|
|
11
|
+
limit: {
|
|
12
|
+
type: string;
|
|
13
|
+
minimum: number;
|
|
14
|
+
maximum: number;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
year: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
fieldsOfStudy: {
|
|
22
|
+
anyOf: ({
|
|
23
|
+
type: string;
|
|
24
|
+
items?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
type: string;
|
|
27
|
+
items: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
})[];
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
paperIds: {
|
|
34
|
+
anyOf: ({
|
|
35
|
+
type: string;
|
|
36
|
+
items?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
type: string;
|
|
39
|
+
items: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
})[];
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
authors: {
|
|
46
|
+
anyOf: ({
|
|
47
|
+
type: string;
|
|
48
|
+
items?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
type: string;
|
|
51
|
+
items: {
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
})[];
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
venue: {
|
|
58
|
+
anyOf: ({
|
|
59
|
+
type: string;
|
|
60
|
+
items?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
type: string;
|
|
63
|
+
items: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
})[];
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
minCitationCount: {
|
|
70
|
+
type: string;
|
|
71
|
+
minimum: number;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
publicationDateOrYear: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
fields: {
|
|
79
|
+
anyOf: ({
|
|
80
|
+
type: string;
|
|
81
|
+
items?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
type: string;
|
|
84
|
+
items: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
})[];
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
required: string[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare const BODY_SNIPPET_SEARCH_TOOLS: {
|
|
95
|
+
name: string;
|
|
96
|
+
description: string;
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: string;
|
|
99
|
+
properties: {
|
|
100
|
+
query: {
|
|
101
|
+
type: string;
|
|
102
|
+
description: string;
|
|
103
|
+
};
|
|
104
|
+
limit: {
|
|
105
|
+
type: string;
|
|
106
|
+
minimum: number;
|
|
107
|
+
maximum: number;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
year: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
fieldsOfStudy: {
|
|
115
|
+
anyOf: ({
|
|
116
|
+
type: string;
|
|
117
|
+
items?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
type: string;
|
|
120
|
+
items: {
|
|
121
|
+
type: string;
|
|
122
|
+
};
|
|
123
|
+
})[];
|
|
124
|
+
description: string;
|
|
125
|
+
};
|
|
126
|
+
paperIds: {
|
|
127
|
+
anyOf: ({
|
|
128
|
+
type: string;
|
|
129
|
+
items?: undefined;
|
|
130
|
+
} | {
|
|
131
|
+
type: string;
|
|
132
|
+
items: {
|
|
133
|
+
type: string;
|
|
134
|
+
};
|
|
135
|
+
})[];
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
authors: {
|
|
139
|
+
anyOf: ({
|
|
140
|
+
type: string;
|
|
141
|
+
items?: undefined;
|
|
142
|
+
} | {
|
|
143
|
+
type: string;
|
|
144
|
+
items: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
147
|
+
})[];
|
|
148
|
+
description: string;
|
|
149
|
+
};
|
|
150
|
+
venue: {
|
|
151
|
+
anyOf: ({
|
|
152
|
+
type: string;
|
|
153
|
+
items?: undefined;
|
|
154
|
+
} | {
|
|
155
|
+
type: string;
|
|
156
|
+
items: {
|
|
157
|
+
type: string;
|
|
158
|
+
};
|
|
159
|
+
})[];
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
minCitationCount: {
|
|
163
|
+
type: string;
|
|
164
|
+
minimum: number;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
publicationDateOrYear: {
|
|
168
|
+
type: string;
|
|
169
|
+
description: string;
|
|
170
|
+
};
|
|
171
|
+
fields: {
|
|
172
|
+
anyOf: ({
|
|
173
|
+
type: string;
|
|
174
|
+
items?: undefined;
|
|
175
|
+
} | {
|
|
176
|
+
type: string;
|
|
177
|
+
items: {
|
|
178
|
+
type: string;
|
|
179
|
+
};
|
|
180
|
+
})[];
|
|
181
|
+
description: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
required: string[];
|
|
185
|
+
};
|
|
186
|
+
}[];
|
|
187
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/tools.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CzC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAkC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export const SEARCH_SEMANTIC_SNIPPETS_TOOL = {
|
|
2
|
+
name: 'search_semantic_snippets',
|
|
3
|
+
description: 'Search Semantic Scholar Open Access snippet index for text excerpts from titles, abstracts, and body text. Requires SEMANTIC_SCHOLAR_API_KEY.',
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
query: { type: 'string', description: 'Natural-language query for text snippets' },
|
|
8
|
+
limit: {
|
|
9
|
+
type: 'number',
|
|
10
|
+
minimum: 1,
|
|
11
|
+
maximum: 1000,
|
|
12
|
+
description: 'Maximum number of snippet results to return. Default: 5'
|
|
13
|
+
},
|
|
14
|
+
year: { type: 'string', description: 'Publication year filter, e.g. "2020-2024"' },
|
|
15
|
+
fieldsOfStudy: {
|
|
16
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
17
|
+
description: 'Field-of-study filter, e.g. "Medicine" or ["Medicine","Biology"]'
|
|
18
|
+
},
|
|
19
|
+
paperIds: {
|
|
20
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
21
|
+
description: 'Optional paper IDs to restrict results to, comma-separated or array'
|
|
22
|
+
},
|
|
23
|
+
authors: {
|
|
24
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
25
|
+
description: 'Optional author-name filter, comma-separated or array'
|
|
26
|
+
},
|
|
27
|
+
venue: {
|
|
28
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
29
|
+
description: 'Optional venue filter, comma-separated or array'
|
|
30
|
+
},
|
|
31
|
+
minCitationCount: {
|
|
32
|
+
type: 'number',
|
|
33
|
+
minimum: 0,
|
|
34
|
+
description: 'Only return snippets from papers with at least this many citations'
|
|
35
|
+
},
|
|
36
|
+
publicationDateOrYear: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Publication date/year range, e.g. "2020-01-01:2024-12-31"'
|
|
39
|
+
},
|
|
40
|
+
fields: {
|
|
41
|
+
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
42
|
+
description: 'Optional Semantic Scholar snippet fields to return'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
required: ['query']
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export const BODY_SNIPPET_SEARCH_TOOLS = [SEARCH_SEMANTIC_SNIPPETS_TOOL];
|
|
49
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/tools.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,IAAI,EAAE,0BAA0B;IAChC,WAAW,EACT,+IAA+I;IACjJ,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;YAClF,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,yDAAyD;aACvE;YACD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;YAClF,aAAa,EAAE;gBACb,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;gBACzE,WAAW,EAAE,kEAAkE;aAChF;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;gBACzE,WAAW,EAAE,qEAAqE;aACnF;YACD,OAAO,EAAE;gBACP,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;gBACzE,WAAW,EAAE,uDAAuD;aACrE;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;gBACzE,WAAW,EAAE,iDAAiD;aAC/D;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,oEAAoE;aAClF;YACD,qBAAqB,EAAE;gBACrB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2DAA2D;aACzE;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;gBACzE,WAAW,EAAE,oDAAoD;aAClE;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type { SemanticSnippetResult } from '../../platforms/SemanticScholarSearcher.js';
|
|
2
|
+
export interface SemanticSnippetSearchArgs {
|
|
3
|
+
query: string;
|
|
4
|
+
limit?: number;
|
|
5
|
+
year?: string;
|
|
6
|
+
fieldsOfStudy?: string | string[];
|
|
7
|
+
paperIds?: string | string[];
|
|
8
|
+
authors?: string | string[];
|
|
9
|
+
venue?: string | string[];
|
|
10
|
+
minCitationCount?: number;
|
|
11
|
+
publicationDateOrYear?: string;
|
|
12
|
+
fields?: string | string[];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAExF,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/capabilities/body-snippet-search/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { BatchCitationRequest, CitationData } from './types.js';
|
|
2
|
+
export type { BatchCitationRequest, CitationData } from './types.js';
|
|
3
|
+
export declare class CitationService {
|
|
4
|
+
private client;
|
|
5
|
+
private cache;
|
|
6
|
+
private rateLimiter;
|
|
7
|
+
private apiKey?;
|
|
8
|
+
constructor(apiKey?: string);
|
|
9
|
+
/**
|
|
10
|
+
* Get citation data for a single paper by ID
|
|
11
|
+
*/
|
|
12
|
+
getCitationData(paperId: string, forceRefresh?: boolean): Promise<CitationData | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Get citation data by DOI
|
|
15
|
+
*/
|
|
16
|
+
getCitationDataByDoi(doi: string, forceRefresh?: boolean): Promise<CitationData | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Get citation data by arXiv ID
|
|
19
|
+
*/
|
|
20
|
+
getCitationDataByArxiv(arxivId: string, forceRefresh?: boolean): Promise<CitationData | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Batch lookup citations for multiple papers
|
|
23
|
+
*/
|
|
24
|
+
batchLookup(requests: BatchCitationRequest[]): Promise<Map<string, CitationData | null>>;
|
|
25
|
+
/**
|
|
26
|
+
* Get references for a paper
|
|
27
|
+
*/
|
|
28
|
+
getReferences(paperId: string, limit?: number): Promise<CitationData[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Get citations for a paper
|
|
31
|
+
*/
|
|
32
|
+
getCitations(paperId: string, limit?: number): Promise<CitationData[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Parse Semantic Scholar response to CitationData
|
|
35
|
+
*/
|
|
36
|
+
private parseCitationData;
|
|
37
|
+
/**
|
|
38
|
+
* Get cache statistics
|
|
39
|
+
*/
|
|
40
|
+
getCacheStats(): import("../../utils/RequestCache.js").CacheStats;
|
|
41
|
+
/**
|
|
42
|
+
* Clear cache
|
|
43
|
+
*/
|
|
44
|
+
clearCache(): void;
|
|
45
|
+
}
|
|
46
|
+
export default CitationService;
|
|
47
|
+
//# sourceMappingURL=CitationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CitationService.d.ts","sourceRoot":"","sources":["../../../src/capabilities/citation-expansion/CitationService.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAErE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAErE,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,KAAK,CAA6B;IAC1C,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAEZ,MAAM,CAAC,EAAE,MAAM;IA0B3B;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,GAAE,OAAe,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAkDnG;;OAEG;IACG,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,OAAe,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAUpG;;OAEG;IACG,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,GAAE,OAAe,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAU1G;;OAEG;IACG,WAAW,CAAC,QAAQ,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC,CAAC;IAqC9F;;OAEG;IACG,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAqClF;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,MAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAqCjF;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAkBzB;;OAEG;IACH,aAAa;IAIb;;OAEG;IACH,UAAU;CAGX;AAED,eAAe,eAAe,CAAC"}
|