openclaw-exa-search 1.0.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -15
- package/dist/index.js +84 -114
- package/openclaw.plugin.json +1 -1
- package/package.json +31 -3
package/dist/index.d.ts
CHANGED
|
@@ -4,21 +4,13 @@
|
|
|
4
4
|
* Registers 6 tools: web_search, code_search, company_research,
|
|
5
5
|
* twitter_search, people_search, financial_report_search
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import type { OpenClawPluginApi, AnyAgentTool } from "openclaw/plugin-sdk/plugin-entry";
|
|
8
|
+
declare const TOOLS: AnyAgentTool[];
|
|
9
|
+
declare const _default: {
|
|
10
|
+
id: string;
|
|
8
11
|
name: string;
|
|
9
12
|
description: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: string;
|
|
14
|
-
text: string;
|
|
15
|
-
}>;
|
|
16
|
-
isError?: boolean;
|
|
17
|
-
}>;
|
|
18
|
-
}
|
|
19
|
-
interface PluginAPI {
|
|
20
|
-
registerTool: (tool: ToolDefinition) => void;
|
|
21
|
-
}
|
|
22
|
-
declare const TOOLS: ToolDefinition[];
|
|
23
|
-
export default function (api: PluginAPI): void;
|
|
13
|
+
register(api: OpenClawPluginApi): void;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
24
16
|
export { TOOLS };
|
package/dist/index.js
CHANGED
|
@@ -4,164 +4,134 @@
|
|
|
4
4
|
* Registers 6 tools: web_search, code_search, company_research,
|
|
5
5
|
* twitter_search, people_search, financial_report_search
|
|
6
6
|
*/
|
|
7
|
+
import { Type } from "@sinclair/typebox";
|
|
7
8
|
import { webSearch, codeSearch, companyResearch, twitterSearch, peopleSearch, financialSearch, } from "./exa-mcp-client.js";
|
|
9
|
+
// ─── Helper ────────────────────────────────────────────────────────
|
|
8
10
|
function wrapExecute(fn) {
|
|
9
11
|
return async (_id, params) => {
|
|
10
12
|
try {
|
|
11
13
|
const result = await fn(params);
|
|
12
|
-
return { content: [{ type: "text", text: result }] };
|
|
14
|
+
return { content: [{ type: "text", text: result }], details: {} };
|
|
13
15
|
}
|
|
14
16
|
catch (error) {
|
|
15
17
|
const message = error instanceof Error ? error.message : String(error);
|
|
16
18
|
return {
|
|
17
19
|
content: [{ type: "text", text: `Error: ${message}` }],
|
|
18
|
-
isError: true,
|
|
20
|
+
details: { isError: true },
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
};
|
|
22
24
|
}
|
|
25
|
+
// ─── Tool definitions ──────────────────────────────────────────────
|
|
23
26
|
const TOOLS = [
|
|
24
27
|
{
|
|
25
28
|
name: "exa_web_search",
|
|
29
|
+
label: "Exa Web Search",
|
|
26
30
|
description: "Search the web using Exa AI neural search. Find current information, news, facts, or answer questions about any topic. Returns clean, formatted content ready for LLM use.",
|
|
27
|
-
parameters: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
enum: ["auto", "fast", "deep"],
|
|
38
|
-
description: "Search type - 'auto': balanced search (default), 'fast': quick results, 'deep': comprehensive research",
|
|
39
|
-
},
|
|
40
|
-
livecrawl: {
|
|
41
|
-
type: "string",
|
|
42
|
-
enum: ["fallback", "preferred"],
|
|
43
|
-
description: "Live crawl mode - 'fallback': use live crawling as backup if cached unavailable, 'preferred': prioritize live crawling",
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
required: ["query"],
|
|
47
|
-
},
|
|
31
|
+
parameters: Type.Object({
|
|
32
|
+
query: Type.String({ description: "Web search query" }),
|
|
33
|
+
numResults: Type.Optional(Type.Number({ description: "Number of search results to return (default: 8)" })),
|
|
34
|
+
type: Type.Optional(Type.Union([Type.Literal("auto"), Type.Literal("fast"), Type.Literal("deep")], {
|
|
35
|
+
description: "Search type - 'auto': balanced search (default), 'fast': quick results, 'deep': comprehensive research",
|
|
36
|
+
})),
|
|
37
|
+
livecrawl: Type.Optional(Type.Union([Type.Literal("fallback"), Type.Literal("preferred")], {
|
|
38
|
+
description: "Live crawl mode - 'fallback': use live crawling as backup if cached unavailable, 'preferred': prioritize live crawling",
|
|
39
|
+
})),
|
|
40
|
+
}),
|
|
48
41
|
execute: wrapExecute(webSearch),
|
|
49
42
|
},
|
|
50
43
|
{
|
|
51
44
|
name: "exa_code_search",
|
|
45
|
+
label: "Exa Code Search",
|
|
52
46
|
description: "Find code examples, documentation, and programming solutions from GitHub, Stack Overflow, and official docs. Useful for API usage, library examples, code snippets, and debugging help.",
|
|
53
|
-
parameters: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
type: "number",
|
|
62
|
-
description: "Number of tokens to return (1000-50000). Lower for focused queries, higher for comprehensive docs (default: 5000)",
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
required: ["query"],
|
|
66
|
-
},
|
|
47
|
+
parameters: Type.Object({
|
|
48
|
+
query: Type.String({
|
|
49
|
+
description: "Search query for code context - e.g., 'React useState hook examples', 'Python pandas dataframe filtering'",
|
|
50
|
+
}),
|
|
51
|
+
tokensNum: Type.Optional(Type.Number({
|
|
52
|
+
description: "Number of tokens to return (1000-50000). Lower for focused queries, higher for comprehensive docs (default: 5000)",
|
|
53
|
+
})),
|
|
54
|
+
}),
|
|
67
55
|
execute: wrapExecute(codeSearch),
|
|
68
56
|
},
|
|
69
57
|
{
|
|
70
58
|
name: "exa_company_research",
|
|
59
|
+
label: "Exa Company Research",
|
|
71
60
|
description: "Research any company to get business information, news, and insights. Returns information from trusted business sources about products, services, recent news, or industry position.",
|
|
72
|
-
parameters: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
type: "number",
|
|
81
|
-
description: "Number of search results to return (default: 5)",
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
required: ["companyName"],
|
|
85
|
-
},
|
|
61
|
+
parameters: Type.Object({
|
|
62
|
+
companyName: Type.String({
|
|
63
|
+
description: "Name of the company to research",
|
|
64
|
+
}),
|
|
65
|
+
numResults: Type.Optional(Type.Number({
|
|
66
|
+
description: "Number of search results to return (default: 5)",
|
|
67
|
+
})),
|
|
68
|
+
}),
|
|
86
69
|
execute: wrapExecute(companyResearch),
|
|
87
70
|
},
|
|
88
71
|
{
|
|
89
72
|
name: "exa_twitter_search",
|
|
73
|
+
label: "Exa Twitter Search",
|
|
90
74
|
description: "Search Twitter/X posts. Find tweets, discussions, and social commentary on any topic. Useful for tracking public sentiment, announcements, and trending discussions.",
|
|
91
|
-
parameters: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
endPublishedDate: {
|
|
107
|
-
type: "string",
|
|
108
|
-
description: "Filter tweets published before this date (ISO 8601 format)",
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
required: ["query"],
|
|
112
|
-
},
|
|
75
|
+
parameters: Type.Object({
|
|
76
|
+
query: Type.String({
|
|
77
|
+
description: "Search query for Twitter/X posts",
|
|
78
|
+
}),
|
|
79
|
+
numResults: Type.Optional(Type.Number({
|
|
80
|
+
description: "Number of tweets to return (default: 10)",
|
|
81
|
+
})),
|
|
82
|
+
startPublishedDate: Type.Optional(Type.String({
|
|
83
|
+
description: "Filter tweets published after this date (ISO 8601 format, e.g., '2024-01-01T00:00:00.000Z')",
|
|
84
|
+
})),
|
|
85
|
+
endPublishedDate: Type.Optional(Type.String({
|
|
86
|
+
description: "Filter tweets published before this date (ISO 8601 format)",
|
|
87
|
+
})),
|
|
88
|
+
}),
|
|
113
89
|
execute: wrapExecute(twitterSearch),
|
|
114
90
|
},
|
|
115
91
|
{
|
|
116
92
|
name: "exa_people_search",
|
|
93
|
+
label: "Exa People Search",
|
|
117
94
|
description: "Find people and their professional profiles. Search for individuals by name, role, company, or expertise. Returns public LinkedIn and professional profile data.",
|
|
118
|
-
parameters: {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
type: "number",
|
|
127
|
-
description: "Number of results to return (default: 5)",
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
required: ["query"],
|
|
131
|
-
},
|
|
95
|
+
parameters: Type.Object({
|
|
96
|
+
query: Type.String({
|
|
97
|
+
description: "Search query for people - e.g., 'CTO at Anthropic', 'machine learning researchers Stanford'",
|
|
98
|
+
}),
|
|
99
|
+
numResults: Type.Optional(Type.Number({
|
|
100
|
+
description: "Number of results to return (default: 5)",
|
|
101
|
+
})),
|
|
102
|
+
}),
|
|
132
103
|
execute: wrapExecute(peopleSearch),
|
|
133
104
|
},
|
|
134
105
|
{
|
|
135
106
|
name: "exa_financial_report_search",
|
|
107
|
+
label: "Exa Financial Report Search",
|
|
136
108
|
description: "Search financial reports — 10-K, 10-Q, annual reports, quarterly earnings, and SEC filings for public companies.",
|
|
137
|
-
parameters: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
endPublishedDate: {
|
|
153
|
-
type: "string",
|
|
154
|
-
description: "Filter reports published before this date (ISO 8601 format)",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
required: ["query"],
|
|
158
|
-
},
|
|
109
|
+
parameters: Type.Object({
|
|
110
|
+
query: Type.String({
|
|
111
|
+
description: "Search query for financial reports - e.g., 'Apple 2024 Q4 earnings', 'Tesla annual report 2024'",
|
|
112
|
+
}),
|
|
113
|
+
numResults: Type.Optional(Type.Number({
|
|
114
|
+
description: "Number of results to return (default: 10)",
|
|
115
|
+
})),
|
|
116
|
+
startPublishedDate: Type.Optional(Type.String({
|
|
117
|
+
description: "Filter reports published after this date (ISO 8601 format)",
|
|
118
|
+
})),
|
|
119
|
+
endPublishedDate: Type.Optional(Type.String({
|
|
120
|
+
description: "Filter reports published before this date (ISO 8601 format)",
|
|
121
|
+
})),
|
|
122
|
+
}),
|
|
159
123
|
execute: wrapExecute(financialSearch),
|
|
160
124
|
},
|
|
161
125
|
];
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
126
|
+
// ─── Plugin entry ──────────────────────────────────────────────────
|
|
127
|
+
export default {
|
|
128
|
+
id: "openclaw-exa-search",
|
|
129
|
+
name: "Exa Search",
|
|
130
|
+
description: "Exa AI search integration for OpenClaw — web, code, company, Twitter/X, people, and financial report search. No API key required.",
|
|
131
|
+
register(api) {
|
|
132
|
+
for (const tool of TOOLS) {
|
|
133
|
+
api.registerTool(tool);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
};
|
|
167
137
|
export { TOOLS };
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-exa-search",
|
|
3
3
|
"name": "Exa Search",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"description": "Exa AI search integration for OpenClaw — web, code, company, Twitter/X, people, and financial report search. No API key required.",
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openclaw-exa-search",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Exa AI search integration for OpenClaw — web, code, company, Twitter/X, people, and financial report search. No API key required.",
|
|
5
6
|
"engines": {
|
|
6
7
|
"node": ">=18"
|
|
@@ -14,16 +15,43 @@
|
|
|
14
15
|
"test:watch": "vitest",
|
|
15
16
|
"typecheck": "tsc --noEmit"
|
|
16
17
|
},
|
|
17
|
-
"keywords": [
|
|
18
|
+
"keywords": [
|
|
19
|
+
"openclaw",
|
|
20
|
+
"openclaw-plugin",
|
|
21
|
+
"exa",
|
|
22
|
+
"search",
|
|
23
|
+
"web-search",
|
|
24
|
+
"code-search",
|
|
25
|
+
"company-research",
|
|
26
|
+
"twitter-search",
|
|
27
|
+
"people-search",
|
|
28
|
+
"financial-reports",
|
|
29
|
+
"ai",
|
|
30
|
+
"neural-search",
|
|
31
|
+
"mcp"
|
|
32
|
+
],
|
|
18
33
|
"author": "sawyer0x110",
|
|
19
34
|
"license": "MIT",
|
|
20
35
|
"openclaw": {
|
|
21
|
-
"extensions": [
|
|
36
|
+
"extensions": [
|
|
37
|
+
"./dist/index.js"
|
|
38
|
+
]
|
|
22
39
|
},
|
|
23
40
|
"repository": {
|
|
24
41
|
"type": "git",
|
|
25
42
|
"url": "https://github.com/sawyer0x110/openclaw-exa-search"
|
|
26
43
|
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"openclaw": ">=2025.0.0"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"openclaw": {
|
|
49
|
+
"optional": true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@sinclair/typebox": "^0.34.0"
|
|
54
|
+
},
|
|
27
55
|
"devDependencies": {
|
|
28
56
|
"typescript": "^5.7.0",
|
|
29
57
|
"vitest": "^3.0.0"
|