@tonydua/dsh-web-search-exa 0.1.2 → 0.1.5
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.i18n.yaml +2 -2
- package/README.md +175 -14
- package/README.zh.md +146 -10
- package/cordis.patch.yml +9 -10
- package/lib/index.d.ts +386 -0
- package/lib/index.js +341 -212
- package/package.json +28 -12
- package/lib/types/index.d.ts +0 -54
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonydua/dsh-web-search-exa",
|
|
3
3
|
"description": "Zero-config Exa web search provider for DeepSeek Harness (dsh): keyless anonymous MCP fallback (mcp.exa.ai/mcp) plus keyed REST search — a drop-in WebSearchProvider for the ctx.web seam, no API key required.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
7
7
|
"dsh",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
},
|
|
28
28
|
"type": "module",
|
|
29
29
|
"main": "lib/index.js",
|
|
30
|
-
"types": "lib/
|
|
30
|
+
"types": "lib/index.d.ts",
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
33
|
-
"types": "./lib/
|
|
33
|
+
"types": "./lib/index.d.ts",
|
|
34
34
|
"default": "./lib/index.js"
|
|
35
35
|
},
|
|
36
36
|
"./package.json": "./package.json"
|
|
@@ -48,22 +48,38 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
|
-
"
|
|
51
|
+
"build": "tsdown",
|
|
52
|
+
"typecheck": "tsc --noEmit",
|
|
53
|
+
"pretest": "pnpm run build",
|
|
54
|
+
"test": "node --test test/index.test.js",
|
|
55
|
+
"test:only": "node --test test/index.test.js",
|
|
56
|
+
"prepublishOnly": "pnpm run build",
|
|
57
|
+
"compat": "bash scripts/compat-matrix.sh"
|
|
52
58
|
},
|
|
53
59
|
"peerDependencies": {
|
|
54
|
-
"@deepseek-ai/cordis": "
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
60
|
+
"@deepseek-ai/cordis": ">=4.0.2",
|
|
61
|
+
"@deepseek-ai/dsh-launch-environment": ">=0.1.2-alpha.2 || >=0.1.3-alpha.2 || >=0.1.4-0 || >=0.1.5-alpha.1 || >=0.1.6-alpha.1 || >=0.1.7-alpha.1 || >=0.1.8",
|
|
62
|
+
"@deepseek-ai/dsh-settings": ">=0.1.2-alpha.2 || >=0.1.3-alpha.2 || >=0.1.4-0 || >=0.1.5-alpha.1 || >=0.1.6-alpha.1 || >=0.1.7-alpha.1 || >=0.1.8",
|
|
63
|
+
"@deepseek-ai/dsh-web": ">=0.1.2-alpha.2 || >=0.1.3-alpha.2 || >=0.1.4-0 || >=0.1.5-alpha.1 || >=0.1.6-alpha.1 || >=0.1.7-alpha.1 || >=0.1.8"
|
|
64
|
+
},
|
|
65
|
+
"peerDependenciesMeta": {
|
|
66
|
+
"@deepseek-ai/dsh-settings": {
|
|
67
|
+
"optional": true
|
|
68
|
+
}
|
|
57
69
|
},
|
|
58
70
|
"dependencies": {
|
|
59
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
71
|
+
"@deepseek-ai/schemastery": "^3.18.2"
|
|
60
72
|
},
|
|
61
73
|
"devDependencies": {
|
|
62
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
74
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
75
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.5-rc.3",
|
|
76
|
+
"@deepseek-ai/dsh-settings": "^0.1.5-rc.3",
|
|
77
|
+
"@deepseek-ai/dsh-web": "^0.1.5-rc.3",
|
|
78
|
+
"@types/node": "^22.19.0",
|
|
79
|
+
"tsdown": "^0.23.0",
|
|
80
|
+
"typescript": "^5.9.0"
|
|
65
81
|
},
|
|
66
82
|
"engines": {
|
|
67
|
-
"node": ">=
|
|
83
|
+
"node": ">=22.19.0"
|
|
68
84
|
}
|
|
69
85
|
}
|
package/lib/types/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type declarations for `@tonydua/dsh-web-search-exa`.
|
|
3
|
-
* @module @tonydua/dsh-web-search-exa
|
|
4
|
-
*/
|
|
5
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
6
|
-
import type { WebSearchProvider } from '@deepseek-ai/dsh-web';
|
|
7
|
-
|
|
8
|
-
/** Config schema type (fields are optional at the load boundary). */
|
|
9
|
-
export interface ExaSearchProviderConfig {
|
|
10
|
-
/** Literal Exa API key; empty/missing enables the anonymous MCP path. */
|
|
11
|
-
apiKey?: string;
|
|
12
|
-
/** Environment variable consulted when no literal `apiKey` is configured. */
|
|
13
|
-
apiKeyEnv?: string;
|
|
14
|
-
/** REST search endpoint, used only when an API key is available. */
|
|
15
|
-
apiURL?: string;
|
|
16
|
-
/** Exa hosted MCP endpoint, used by the anonymous fallback. */
|
|
17
|
-
mcpURL?: string;
|
|
18
|
-
/** REST retrieval mode: `auto`, `keyword`, or `neural`. */
|
|
19
|
-
searchType?: 'auto' | 'keyword' | 'neural';
|
|
20
|
-
/** Default result count when the request carries no `maxResults`. */
|
|
21
|
-
numResults?: number;
|
|
22
|
-
/** Highlight sentences requested per result on the REST path. */
|
|
23
|
-
highlightsPerResult?: number;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** The Exa-backed provider with anonymous MCP fallback. */
|
|
27
|
-
export class ExaSearchProvider implements WebSearchProvider {
|
|
28
|
-
readonly id: string;
|
|
29
|
-
constructor(resolveOptions: () => {
|
|
30
|
-
apiKey: string;
|
|
31
|
-
apiKeyEnv: string;
|
|
32
|
-
apiURL: string;
|
|
33
|
-
mcpURL: string;
|
|
34
|
-
searchType: 'auto' | 'keyword' | 'neural';
|
|
35
|
-
numResults?: number;
|
|
36
|
-
highlightsPerResult: number;
|
|
37
|
-
});
|
|
38
|
-
available(): boolean;
|
|
39
|
-
search(request: { query: string; maxResults?: number }, signal?: AbortSignal): Promise<{
|
|
40
|
-
sources: ReadonlyArray<{ url: string; title?: string; snippet?: string; publishedAt?: string }>;
|
|
41
|
-
truncated: boolean;
|
|
42
|
-
}>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/** Cordis plugin name used by loader diagnostics. */
|
|
46
|
-
export const name: string;
|
|
47
|
-
/** The web seam this provider registers into. */
|
|
48
|
-
export const inject: readonly ['web'];
|
|
49
|
-
/** Config schema (schemastery). */
|
|
50
|
-
export const Config: import('@deepseek-ai/schemastery').Schema<ExaSearchProviderConfig>;
|
|
51
|
-
/** Settings namespace for the Web panel section. */
|
|
52
|
-
export const SETTINGS_NAMESPACE: string;
|
|
53
|
-
/** Register the Exa search provider with `ctx.web` and install its Settings section. */
|
|
54
|
-
export function apply(ctx: Context, config: ExaSearchProviderConfig): void;
|