@keystrokehq/exa 0.0.9 → 0.0.16-integration-id-canonicalization.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/README.md +5 -0
- package/dist/contents.schema-BNgTB2DN.mjs +133 -0
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +3 -0
- package/dist/exa.credential-set-BGLENRlR.d.mts +14 -0
- package/dist/exa.credential-set-Ba-RsxL2.mjs +15 -0
- package/dist/index.d.mts +4 -1260
- package/dist/index.mjs +4 -576
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/schemas/index.d.mts +2 -0
- package/dist/schemas/index.mjs +3 -0
- package/dist/search.schema-Cw-d91N6.d.mts +204 -0
- package/dist/update-monitor.operation-D-vWJFP3.mjs +478 -0
- package/dist/update-monitor.operation-Dm50YoS7.d.mts +570 -0
- package/package.json +14 -6
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/integration-BBhYAh8z.mjs +0 -107
- package/dist/integration-Ml2KWc_6.d.mts +0 -28
package/dist/index.mjs
CHANGED
|
@@ -1,577 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { t as exaCredentialSet } from "./exa.credential-set-Ba-RsxL2.mjs";
|
|
2
|
+
import { a as exaMonitorRunListResponseSchema, c as exaTriggerMonitorResponseSchema, d as exaCostSchema, f as exaSearchResultSchema, i as exaMonitorListResponseSchema, l as exaAnswerCitationSchema, n as exaContentsResponseSchema, o as exaMonitorRunSchema, r as exaSearchResponseSchema, s as exaMonitorSchema, t as contentsOptionsSchema, u as exaAnswerResponseSchema } from "./contents.schema-BNgTB2DN.mjs";
|
|
3
|
+
import { a as listMonitorsOperation, c as getMonitorOperation, d as findSimilarOperation, f as deleteMonitorOperation, i as searchOperation, l as getContentsOperation, m as answerOperation, n as triggerMonitorOperation, o as listMonitorRunsOperation, p as createMonitorOperation, r as searchWithContentsOperation, s as getMonitorRunOperation, t as updateMonitorOperation, u as findSimilarWithContentsOperation } from "./update-monitor.operation-D-vWJFP3.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
function createExaClient(credentials) {
|
|
7
|
-
return new Exa(credentials.EXA_API_KEY);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/factory.ts
|
|
12
|
-
const exaOperation = createOfficialOperationFactory(exa);
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/schemas.ts
|
|
16
|
-
const exaSearchResultSchema = z.object({
|
|
17
|
-
id: z.string(),
|
|
18
|
-
url: z.string(),
|
|
19
|
-
title: z.string().nullable(),
|
|
20
|
-
publishedDate: z.string().nullable().optional(),
|
|
21
|
-
author: z.string().nullable().optional(),
|
|
22
|
-
score: z.number().optional(),
|
|
23
|
-
image: z.string().nullable().optional(),
|
|
24
|
-
favicon: z.string().nullable().optional(),
|
|
25
|
-
text: z.string().optional(),
|
|
26
|
-
highlights: z.array(z.string()).optional(),
|
|
27
|
-
highlightScores: z.array(z.number()).optional(),
|
|
28
|
-
summary: z.string().optional(),
|
|
29
|
-
subpages: z.array(z.unknown()).optional(),
|
|
30
|
-
entities: z.array(z.unknown()).optional()
|
|
31
|
-
});
|
|
32
|
-
const exaCostSchema = z.record(z.string(), z.unknown());
|
|
33
|
-
const exaSearchResponseSchema = z.object({
|
|
34
|
-
requestId: z.string().optional(),
|
|
35
|
-
results: z.array(exaSearchResultSchema),
|
|
36
|
-
searchType: z.string().optional(),
|
|
37
|
-
output: z.unknown().optional(),
|
|
38
|
-
costDollars: exaCostSchema.optional()
|
|
39
|
-
});
|
|
40
|
-
const exaContentsResponseSchema = z.object({
|
|
41
|
-
requestId: z.string().optional(),
|
|
42
|
-
results: z.array(exaSearchResultSchema),
|
|
43
|
-
statuses: z.array(z.unknown()).optional(),
|
|
44
|
-
costDollars: exaCostSchema.optional()
|
|
45
|
-
});
|
|
46
|
-
const exaAnswerCitationSchema = z.object({
|
|
47
|
-
id: z.string(),
|
|
48
|
-
url: z.string(),
|
|
49
|
-
title: z.string().nullable(),
|
|
50
|
-
author: z.string().nullable().optional(),
|
|
51
|
-
publishedDate: z.string().nullable().optional(),
|
|
52
|
-
text: z.string().optional(),
|
|
53
|
-
image: z.string().nullable().optional(),
|
|
54
|
-
favicon: z.string().nullable().optional()
|
|
55
|
-
});
|
|
56
|
-
const exaAnswerResponseSchema = z.object({
|
|
57
|
-
answer: z.union([z.string(), z.record(z.string(), z.unknown())]),
|
|
58
|
-
citations: z.array(exaAnswerCitationSchema),
|
|
59
|
-
requestId: z.string().optional(),
|
|
60
|
-
costDollars: exaCostSchema.optional()
|
|
61
|
-
});
|
|
62
|
-
const exaMonitorSchema = z.object({
|
|
63
|
-
id: z.string(),
|
|
64
|
-
name: z.string().nullable().optional(),
|
|
65
|
-
status: z.string().optional(),
|
|
66
|
-
search: z.unknown().optional(),
|
|
67
|
-
trigger: z.unknown().optional(),
|
|
68
|
-
outputSchema: z.unknown().optional(),
|
|
69
|
-
metadata: z.unknown().optional(),
|
|
70
|
-
webhook: z.unknown().optional(),
|
|
71
|
-
webhookSecret: z.string().optional(),
|
|
72
|
-
nextRunAt: z.string().nullable().optional(),
|
|
73
|
-
createdAt: z.string().optional(),
|
|
74
|
-
updatedAt: z.string().optional()
|
|
75
|
-
});
|
|
76
|
-
const exaMonitorRunSchema = z.object({
|
|
77
|
-
id: z.string(),
|
|
78
|
-
monitorId: z.string(),
|
|
79
|
-
status: z.string().optional(),
|
|
80
|
-
output: z.unknown().optional(),
|
|
81
|
-
failReason: z.string().nullable().optional(),
|
|
82
|
-
startedAt: z.string().nullable().optional(),
|
|
83
|
-
completedAt: z.string().nullable().optional(),
|
|
84
|
-
durationMs: z.number().nullable().optional(),
|
|
85
|
-
createdAt: z.string().optional(),
|
|
86
|
-
updatedAt: z.string().optional()
|
|
87
|
-
});
|
|
88
|
-
const exaMonitorListResponseSchema = z.object({
|
|
89
|
-
data: z.array(exaMonitorSchema),
|
|
90
|
-
hasMore: z.boolean().optional(),
|
|
91
|
-
nextCursor: z.string().nullable().optional()
|
|
92
|
-
});
|
|
93
|
-
const exaMonitorRunListResponseSchema = z.object({
|
|
94
|
-
data: z.array(exaMonitorRunSchema),
|
|
95
|
-
hasMore: z.boolean().optional(),
|
|
96
|
-
nextCursor: z.string().nullable().optional()
|
|
97
|
-
});
|
|
98
|
-
const exaTriggerMonitorResponseSchema = z.object({ triggered: z.boolean() });
|
|
99
|
-
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region src/answer.ts
|
|
102
|
-
const answer = exaOperation({
|
|
103
|
-
id: "exa.answer",
|
|
104
|
-
name: "Exa Answer",
|
|
105
|
-
description: "Get an AI-generated answer to a query with citations from web sources using Exa.",
|
|
106
|
-
input: z.object({
|
|
107
|
-
query: z.string(),
|
|
108
|
-
text: z.boolean().optional(),
|
|
109
|
-
model: z.enum(["exa"]).optional(),
|
|
110
|
-
systemPrompt: z.string().optional(),
|
|
111
|
-
outputSchema: z.record(z.string(), z.unknown()).optional(),
|
|
112
|
-
userLocation: z.string().optional()
|
|
113
|
-
}),
|
|
114
|
-
output: exaAnswerResponseSchema,
|
|
115
|
-
run: async (input, credentials) => {
|
|
116
|
-
const client = createExaClient(credentials);
|
|
117
|
-
const { query, ...options } = input;
|
|
118
|
-
return await client.answer(query, options);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
const answerTool = answer;
|
|
122
|
-
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/contents.ts
|
|
125
|
-
const getContents = exaOperation({
|
|
126
|
-
id: "exa.get-contents",
|
|
127
|
-
name: "Exa Get Contents",
|
|
128
|
-
description: "Retrieve page contents (text, highlights, summaries) for a list of URLs.",
|
|
129
|
-
input: z.object({
|
|
130
|
-
urls: z.array(z.string()).min(1),
|
|
131
|
-
text: z.union([z.literal(true), z.object({
|
|
132
|
-
maxCharacters: z.number().optional(),
|
|
133
|
-
includeHtmlTags: z.boolean().optional(),
|
|
134
|
-
verbosity: z.enum([
|
|
135
|
-
"compact",
|
|
136
|
-
"standard",
|
|
137
|
-
"full"
|
|
138
|
-
]).optional()
|
|
139
|
-
})]).optional(),
|
|
140
|
-
highlights: z.union([z.literal(true), z.object({
|
|
141
|
-
maxCharacters: z.number().optional(),
|
|
142
|
-
query: z.string().optional()
|
|
143
|
-
})]).optional(),
|
|
144
|
-
summary: z.object({
|
|
145
|
-
query: z.string().optional(),
|
|
146
|
-
schema: z.record(z.string(), z.unknown()).optional()
|
|
147
|
-
}).optional(),
|
|
148
|
-
livecrawl: z.enum([
|
|
149
|
-
"always",
|
|
150
|
-
"fallback",
|
|
151
|
-
"never",
|
|
152
|
-
"auto",
|
|
153
|
-
"preferred"
|
|
154
|
-
]).optional(),
|
|
155
|
-
livecrawlTimeout: z.number().optional(),
|
|
156
|
-
maxAgeHours: z.number().optional(),
|
|
157
|
-
subpages: z.number().optional(),
|
|
158
|
-
subpageTarget: z.union([z.string(), z.array(z.string())]).optional(),
|
|
159
|
-
extras: z.record(z.string(), z.unknown()).optional(),
|
|
160
|
-
filterEmptyResults: z.boolean().optional()
|
|
161
|
-
}),
|
|
162
|
-
output: exaContentsResponseSchema,
|
|
163
|
-
run: async (input, credentials) => {
|
|
164
|
-
const client = createExaClient(credentials);
|
|
165
|
-
const { urls, ...options } = input;
|
|
166
|
-
return await client.getContents(urls, options);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const getContentsTool = getContents;
|
|
170
|
-
|
|
171
|
-
//#endregion
|
|
172
|
-
//#region src/find-similar.ts
|
|
173
|
-
const findSimilar = exaOperation({
|
|
174
|
-
id: "exa.find-similar",
|
|
175
|
-
name: "Exa Find Similar",
|
|
176
|
-
description: "Find web pages similar to a given URL.",
|
|
177
|
-
input: z.object({
|
|
178
|
-
url: z.string(),
|
|
179
|
-
excludeSourceDomain: z.boolean().optional(),
|
|
180
|
-
numResults: z.number().min(1).max(100).optional(),
|
|
181
|
-
includeDomains: z.array(z.string()).optional(),
|
|
182
|
-
excludeDomains: z.array(z.string()).optional(),
|
|
183
|
-
startCrawlDate: z.string().optional(),
|
|
184
|
-
endCrawlDate: z.string().optional(),
|
|
185
|
-
startPublishedDate: z.string().optional(),
|
|
186
|
-
endPublishedDate: z.string().optional(),
|
|
187
|
-
includeText: z.array(z.string()).optional(),
|
|
188
|
-
excludeText: z.array(z.string()).optional(),
|
|
189
|
-
moderation: z.boolean().optional()
|
|
190
|
-
}),
|
|
191
|
-
output: exaSearchResponseSchema,
|
|
192
|
-
run: async (input, credentials) => {
|
|
193
|
-
const client = createExaClient(credentials);
|
|
194
|
-
const { url, ...options } = input;
|
|
195
|
-
return await client.findSimilar(url, {
|
|
196
|
-
...options,
|
|
197
|
-
contents: false
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
const findSimilarTool = findSimilar;
|
|
202
|
-
|
|
203
|
-
//#endregion
|
|
204
|
-
//#region src/find-similar-with-contents.ts
|
|
205
|
-
const findSimilarWithContents = exaOperation({
|
|
206
|
-
id: "exa.find-similar-with-contents",
|
|
207
|
-
name: "Exa Find Similar with Contents",
|
|
208
|
-
description: "Find web pages similar to a given URL and retrieve their contents in a single request.",
|
|
209
|
-
input: z.object({
|
|
210
|
-
url: z.string(),
|
|
211
|
-
excludeSourceDomain: z.boolean().optional(),
|
|
212
|
-
numResults: z.number().min(1).max(100).optional(),
|
|
213
|
-
includeDomains: z.array(z.string()).optional(),
|
|
214
|
-
excludeDomains: z.array(z.string()).optional(),
|
|
215
|
-
startCrawlDate: z.string().optional(),
|
|
216
|
-
endCrawlDate: z.string().optional(),
|
|
217
|
-
startPublishedDate: z.string().optional(),
|
|
218
|
-
endPublishedDate: z.string().optional(),
|
|
219
|
-
includeText: z.array(z.string()).optional(),
|
|
220
|
-
excludeText: z.array(z.string()).optional(),
|
|
221
|
-
moderation: z.boolean().optional(),
|
|
222
|
-
text: z.union([z.literal(true), z.object({
|
|
223
|
-
maxCharacters: z.number().optional(),
|
|
224
|
-
includeHtmlTags: z.boolean().optional(),
|
|
225
|
-
verbosity: z.enum([
|
|
226
|
-
"compact",
|
|
227
|
-
"standard",
|
|
228
|
-
"full"
|
|
229
|
-
]).optional()
|
|
230
|
-
})]).optional(),
|
|
231
|
-
highlights: z.union([z.literal(true), z.object({
|
|
232
|
-
maxCharacters: z.number().optional(),
|
|
233
|
-
query: z.string().optional()
|
|
234
|
-
})]).optional(),
|
|
235
|
-
summary: z.object({
|
|
236
|
-
query: z.string().optional(),
|
|
237
|
-
schema: z.record(z.string(), z.unknown()).optional()
|
|
238
|
-
}).optional(),
|
|
239
|
-
livecrawl: z.enum([
|
|
240
|
-
"always",
|
|
241
|
-
"fallback",
|
|
242
|
-
"never",
|
|
243
|
-
"auto",
|
|
244
|
-
"preferred"
|
|
245
|
-
]).optional(),
|
|
246
|
-
livecrawlTimeout: z.number().optional(),
|
|
247
|
-
maxAgeHours: z.number().optional(),
|
|
248
|
-
subpages: z.number().optional(),
|
|
249
|
-
subpageTarget: z.union([z.string(), z.array(z.string())]).optional(),
|
|
250
|
-
extras: z.record(z.string(), z.unknown()).optional(),
|
|
251
|
-
filterEmptyResults: z.boolean().optional()
|
|
252
|
-
}),
|
|
253
|
-
output: exaSearchResponseSchema,
|
|
254
|
-
run: async (input, credentials) => {
|
|
255
|
-
const client = createExaClient(credentials);
|
|
256
|
-
const { url, text, highlights, summary, livecrawl, livecrawlTimeout, maxAgeHours, subpages, subpageTarget, extras, filterEmptyResults, ...searchOptions } = input;
|
|
257
|
-
const contents = {
|
|
258
|
-
text,
|
|
259
|
-
highlights,
|
|
260
|
-
summary,
|
|
261
|
-
livecrawl,
|
|
262
|
-
livecrawlTimeout,
|
|
263
|
-
maxAgeHours,
|
|
264
|
-
subpages,
|
|
265
|
-
subpageTarget,
|
|
266
|
-
extras,
|
|
267
|
-
filterEmptyResults
|
|
268
|
-
};
|
|
269
|
-
return await client.findSimilar(url, {
|
|
270
|
-
...searchOptions,
|
|
271
|
-
contents
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
const findSimilarWithContentsTool = findSimilarWithContents;
|
|
276
|
-
|
|
277
|
-
//#endregion
|
|
278
|
-
//#region src/monitors.ts
|
|
279
|
-
const createMonitor = exaOperation({
|
|
280
|
-
id: "exa.create-monitor",
|
|
281
|
-
name: "Create Exa Monitor",
|
|
282
|
-
description: "Create a new Exa monitor to track search results over time.",
|
|
283
|
-
needsApproval: true,
|
|
284
|
-
input: z.object({
|
|
285
|
-
name: z.string().optional(),
|
|
286
|
-
search: z.object({
|
|
287
|
-
query: z.string(),
|
|
288
|
-
numResults: z.number().optional(),
|
|
289
|
-
contents: z.unknown().optional()
|
|
290
|
-
}),
|
|
291
|
-
trigger: z.object({
|
|
292
|
-
type: z.string(),
|
|
293
|
-
period: z.string().optional()
|
|
294
|
-
}).optional(),
|
|
295
|
-
outputSchema: z.record(z.string(), z.unknown()).optional(),
|
|
296
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
297
|
-
webhook: z.object({
|
|
298
|
-
url: z.string(),
|
|
299
|
-
events: z.array(z.string()).optional()
|
|
300
|
-
})
|
|
301
|
-
}),
|
|
302
|
-
output: exaMonitorSchema,
|
|
303
|
-
run: async (input, credentials) => {
|
|
304
|
-
return await createExaClient(credentials).monitors.create(input);
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
const createMonitorTool = createMonitor;
|
|
308
|
-
const listMonitors = exaOperation({
|
|
309
|
-
id: "exa.list-monitors",
|
|
310
|
-
name: "List Exa Monitors",
|
|
311
|
-
description: "List all Exa monitors with optional status filtering and pagination.",
|
|
312
|
-
input: z.object({
|
|
313
|
-
status: z.enum([
|
|
314
|
-
"active",
|
|
315
|
-
"paused",
|
|
316
|
-
"disabled"
|
|
317
|
-
]).optional(),
|
|
318
|
-
cursor: z.string().optional(),
|
|
319
|
-
limit: z.number().min(1).max(100).optional()
|
|
320
|
-
}),
|
|
321
|
-
output: exaMonitorListResponseSchema,
|
|
322
|
-
run: async (input, credentials) => {
|
|
323
|
-
return await createExaClient(credentials).monitors.list(input);
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
const listMonitorsTool = listMonitors;
|
|
327
|
-
const getMonitor = exaOperation({
|
|
328
|
-
id: "exa.get-monitor",
|
|
329
|
-
name: "Get Exa Monitor",
|
|
330
|
-
description: "Get details of a specific Exa monitor by ID.",
|
|
331
|
-
input: z.object({ monitorId: z.string() }),
|
|
332
|
-
output: exaMonitorSchema,
|
|
333
|
-
run: async (input, credentials) => {
|
|
334
|
-
return await createExaClient(credentials).monitors.get(input.monitorId);
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
const getMonitorTool = getMonitor;
|
|
338
|
-
const updateMonitor = exaOperation({
|
|
339
|
-
id: "exa.update-monitor",
|
|
340
|
-
name: "Update Exa Monitor",
|
|
341
|
-
description: "Update an existing Exa monitor configuration.",
|
|
342
|
-
needsApproval: true,
|
|
343
|
-
input: z.object({
|
|
344
|
-
monitorId: z.string(),
|
|
345
|
-
name: z.string().optional(),
|
|
346
|
-
search: z.object({
|
|
347
|
-
query: z.string(),
|
|
348
|
-
numResults: z.number().optional(),
|
|
349
|
-
contents: z.unknown().optional()
|
|
350
|
-
}).optional(),
|
|
351
|
-
trigger: z.object({
|
|
352
|
-
type: z.string(),
|
|
353
|
-
period: z.string().optional()
|
|
354
|
-
}).optional(),
|
|
355
|
-
outputSchema: z.record(z.string(), z.unknown()).optional(),
|
|
356
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
357
|
-
webhook: z.object({
|
|
358
|
-
url: z.string(),
|
|
359
|
-
events: z.array(z.string()).optional()
|
|
360
|
-
}).optional()
|
|
361
|
-
}),
|
|
362
|
-
output: exaMonitorSchema,
|
|
363
|
-
run: async (input, credentials) => {
|
|
364
|
-
const client = createExaClient(credentials);
|
|
365
|
-
const { monitorId, ...rest } = input;
|
|
366
|
-
return await client.monitors.update(monitorId, rest);
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
const updateMonitorTool = updateMonitor;
|
|
370
|
-
const deleteMonitor = exaOperation({
|
|
371
|
-
id: "exa.delete-monitor",
|
|
372
|
-
name: "Delete Exa Monitor",
|
|
373
|
-
description: "Delete an Exa monitor by ID. Returns the deleted monitor object.",
|
|
374
|
-
needsApproval: true,
|
|
375
|
-
input: z.object({ monitorId: z.string() }),
|
|
376
|
-
output: exaMonitorSchema,
|
|
377
|
-
run: async (input, credentials) => {
|
|
378
|
-
return await createExaClient(credentials).monitors.delete(input.monitorId);
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
const deleteMonitorTool = deleteMonitor;
|
|
382
|
-
const triggerMonitor = exaOperation({
|
|
383
|
-
id: "exa.trigger-monitor",
|
|
384
|
-
name: "Trigger Exa Monitor",
|
|
385
|
-
description: "Manually trigger an Exa monitor to run immediately.",
|
|
386
|
-
needsApproval: true,
|
|
387
|
-
input: z.object({ monitorId: z.string() }),
|
|
388
|
-
output: exaTriggerMonitorResponseSchema,
|
|
389
|
-
run: async (input, credentials) => {
|
|
390
|
-
return await createExaClient(credentials).monitors.trigger(input.monitorId);
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
const triggerMonitorTool = triggerMonitor;
|
|
394
|
-
const listMonitorRuns = exaOperation({
|
|
395
|
-
id: "exa.list-monitor-runs",
|
|
396
|
-
name: "List Exa Monitor Runs",
|
|
397
|
-
description: "List runs for a specific Exa monitor with pagination.",
|
|
398
|
-
input: z.object({
|
|
399
|
-
monitorId: z.string(),
|
|
400
|
-
cursor: z.string().optional(),
|
|
401
|
-
limit: z.number().min(1).max(100).optional()
|
|
402
|
-
}),
|
|
403
|
-
output: exaMonitorRunListResponseSchema,
|
|
404
|
-
run: async (input, credentials) => {
|
|
405
|
-
const client = createExaClient(credentials);
|
|
406
|
-
const { monitorId, ...rest } = input;
|
|
407
|
-
return await client.monitors.runs.list(monitorId, rest);
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
const listMonitorRunsTool = listMonitorRuns;
|
|
411
|
-
const getMonitorRun = exaOperation({
|
|
412
|
-
id: "exa.get-monitor-run",
|
|
413
|
-
name: "Get Exa Monitor Run",
|
|
414
|
-
description: "Get details of a specific Exa monitor run.",
|
|
415
|
-
input: z.object({
|
|
416
|
-
monitorId: z.string(),
|
|
417
|
-
runId: z.string()
|
|
418
|
-
}),
|
|
419
|
-
output: exaMonitorRunSchema,
|
|
420
|
-
run: async (input, credentials) => {
|
|
421
|
-
return await createExaClient(credentials).monitors.runs.get(input.monitorId, input.runId);
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
const getMonitorRunTool = getMonitorRun;
|
|
425
|
-
|
|
426
|
-
//#endregion
|
|
427
|
-
//#region src/search.ts
|
|
428
|
-
const search = exaOperation({
|
|
429
|
-
id: "exa.search",
|
|
430
|
-
name: "Exa Search",
|
|
431
|
-
description: "Search the web using Exa semantic, keyword, or hybrid search.",
|
|
432
|
-
input: z.object({
|
|
433
|
-
query: z.string(),
|
|
434
|
-
type: z.enum([
|
|
435
|
-
"auto",
|
|
436
|
-
"neural",
|
|
437
|
-
"fast",
|
|
438
|
-
"instant",
|
|
439
|
-
"deep-lite",
|
|
440
|
-
"deep",
|
|
441
|
-
"deep-reasoning",
|
|
442
|
-
"keyword",
|
|
443
|
-
"hybrid"
|
|
444
|
-
]).optional(),
|
|
445
|
-
category: z.enum([
|
|
446
|
-
"company",
|
|
447
|
-
"research paper",
|
|
448
|
-
"news",
|
|
449
|
-
"personal site",
|
|
450
|
-
"financial report",
|
|
451
|
-
"people",
|
|
452
|
-
"pdf"
|
|
453
|
-
]).optional(),
|
|
454
|
-
numResults: z.number().min(1).max(100).optional(),
|
|
455
|
-
includeDomains: z.array(z.string()).optional(),
|
|
456
|
-
excludeDomains: z.array(z.string()).optional(),
|
|
457
|
-
startPublishedDate: z.string().optional(),
|
|
458
|
-
endPublishedDate: z.string().optional(),
|
|
459
|
-
startCrawlDate: z.string().optional(),
|
|
460
|
-
endCrawlDate: z.string().optional(),
|
|
461
|
-
includeText: z.array(z.string()).optional(),
|
|
462
|
-
excludeText: z.array(z.string()).optional(),
|
|
463
|
-
moderation: z.boolean().optional(),
|
|
464
|
-
useAutoprompt: z.boolean().optional(),
|
|
465
|
-
userLocation: z.string().optional()
|
|
466
|
-
}),
|
|
467
|
-
output: exaSearchResponseSchema,
|
|
468
|
-
run: async (input, credentials) => {
|
|
469
|
-
const client = createExaClient(credentials);
|
|
470
|
-
const { query, ...options } = input;
|
|
471
|
-
return await client.search(query, {
|
|
472
|
-
...options,
|
|
473
|
-
contents: false
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
const searchTool = search;
|
|
478
|
-
|
|
479
|
-
//#endregion
|
|
480
|
-
//#region src/search-with-contents.ts
|
|
481
|
-
const contentsOptionsSchema = z.object({
|
|
482
|
-
text: z.union([z.literal(true), z.object({
|
|
483
|
-
maxCharacters: z.number().optional(),
|
|
484
|
-
includeHtmlTags: z.boolean().optional(),
|
|
485
|
-
verbosity: z.enum([
|
|
486
|
-
"compact",
|
|
487
|
-
"standard",
|
|
488
|
-
"full"
|
|
489
|
-
]).optional()
|
|
490
|
-
})]).optional(),
|
|
491
|
-
highlights: z.union([z.literal(true), z.object({
|
|
492
|
-
maxCharacters: z.number().optional(),
|
|
493
|
-
query: z.string().optional()
|
|
494
|
-
})]).optional(),
|
|
495
|
-
summary: z.object({
|
|
496
|
-
query: z.string().optional(),
|
|
497
|
-
schema: z.record(z.string(), z.unknown()).optional()
|
|
498
|
-
}).optional(),
|
|
499
|
-
livecrawl: z.enum([
|
|
500
|
-
"always",
|
|
501
|
-
"fallback",
|
|
502
|
-
"never",
|
|
503
|
-
"auto",
|
|
504
|
-
"preferred"
|
|
505
|
-
]).optional(),
|
|
506
|
-
livecrawlTimeout: z.number().optional(),
|
|
507
|
-
maxAgeHours: z.number().optional(),
|
|
508
|
-
subpages: z.number().optional(),
|
|
509
|
-
subpageTarget: z.union([z.string(), z.array(z.string())]).optional(),
|
|
510
|
-
extras: z.record(z.string(), z.unknown()).optional(),
|
|
511
|
-
filterEmptyResults: z.boolean().optional()
|
|
512
|
-
});
|
|
513
|
-
const searchWithContents = exaOperation({
|
|
514
|
-
id: "exa.search-with-contents",
|
|
515
|
-
name: "Exa Search with Contents",
|
|
516
|
-
description: "Search the web using Exa and retrieve page contents (text, highlights, summaries) in a single request.",
|
|
517
|
-
input: z.object({
|
|
518
|
-
query: z.string(),
|
|
519
|
-
type: z.enum([
|
|
520
|
-
"auto",
|
|
521
|
-
"neural",
|
|
522
|
-
"fast",
|
|
523
|
-
"instant",
|
|
524
|
-
"deep-lite",
|
|
525
|
-
"deep",
|
|
526
|
-
"deep-reasoning",
|
|
527
|
-
"keyword",
|
|
528
|
-
"hybrid"
|
|
529
|
-
]).optional(),
|
|
530
|
-
category: z.enum([
|
|
531
|
-
"company",
|
|
532
|
-
"research paper",
|
|
533
|
-
"news",
|
|
534
|
-
"personal site",
|
|
535
|
-
"financial report",
|
|
536
|
-
"people",
|
|
537
|
-
"pdf"
|
|
538
|
-
]).optional(),
|
|
539
|
-
numResults: z.number().min(1).max(100).optional(),
|
|
540
|
-
includeDomains: z.array(z.string()).optional(),
|
|
541
|
-
excludeDomains: z.array(z.string()).optional(),
|
|
542
|
-
startPublishedDate: z.string().optional(),
|
|
543
|
-
endPublishedDate: z.string().optional(),
|
|
544
|
-
startCrawlDate: z.string().optional(),
|
|
545
|
-
endCrawlDate: z.string().optional(),
|
|
546
|
-
includeText: z.array(z.string()).optional(),
|
|
547
|
-
excludeText: z.array(z.string()).optional(),
|
|
548
|
-
moderation: z.boolean().optional(),
|
|
549
|
-
useAutoprompt: z.boolean().optional(),
|
|
550
|
-
userLocation: z.string().optional()
|
|
551
|
-
}).merge(contentsOptionsSchema),
|
|
552
|
-
output: exaSearchResponseSchema,
|
|
553
|
-
run: async (input, credentials) => {
|
|
554
|
-
const client = createExaClient(credentials);
|
|
555
|
-
const { query, text, highlights, summary, livecrawl, livecrawlTimeout, maxAgeHours, subpages, subpageTarget, extras, filterEmptyResults, ...searchOptions } = input;
|
|
556
|
-
const contents = {
|
|
557
|
-
text,
|
|
558
|
-
highlights,
|
|
559
|
-
summary,
|
|
560
|
-
livecrawl,
|
|
561
|
-
livecrawlTimeout,
|
|
562
|
-
maxAgeHours,
|
|
563
|
-
subpages,
|
|
564
|
-
subpageTarget,
|
|
565
|
-
extras,
|
|
566
|
-
filterEmptyResults
|
|
567
|
-
};
|
|
568
|
-
return await client.search(query, {
|
|
569
|
-
...searchOptions,
|
|
570
|
-
contents
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
});
|
|
574
|
-
const searchWithContentsTool = searchWithContents;
|
|
575
|
-
|
|
576
|
-
//#endregion
|
|
577
|
-
export { answer, answerTool, createExaClient, createMonitor, createMonitorTool, deleteMonitor, deleteMonitorTool, exa, exaAnswerCitationSchema, exaAnswerResponseSchema, exaContentsResponseSchema, exaCostSchema, exaMonitorListResponseSchema, exaMonitorRunListResponseSchema, exaMonitorRunSchema, exaMonitorSchema, exaOperation, exaSearchResponseSchema, exaSearchResultSchema, exaTriggerMonitorResponseSchema, findSimilar, findSimilarTool, findSimilarWithContents, findSimilarWithContentsTool, getContents, getContentsTool, getMonitor, getMonitorRun, getMonitorRunTool, getMonitorTool, listMonitorRuns, listMonitorRunsTool, listMonitors, listMonitorsTool, search, searchTool, searchWithContents, searchWithContentsTool, triggerMonitor, triggerMonitorTool, updateMonitor, updateMonitorTool };
|
|
5
|
+
export { answerOperation, answerOperation as answerTool, contentsOptionsSchema, createMonitorOperation, createMonitorOperation as createMonitorTool, deleteMonitorOperation, deleteMonitorOperation as deleteMonitorTool, exaAnswerCitationSchema, exaAnswerResponseSchema, exaContentsResponseSchema, exaCostSchema, exaCredentialSet, exaMonitorListResponseSchema, exaMonitorRunListResponseSchema, exaMonitorRunSchema, exaMonitorSchema, exaSearchResponseSchema, exaSearchResultSchema, exaTriggerMonitorResponseSchema, findSimilarOperation, findSimilarOperation as findSimilarTool, findSimilarWithContentsOperation, findSimilarWithContentsOperation as findSimilarWithContentsTool, getContentsOperation, getContentsOperation as getContentsTool, getMonitorOperation, getMonitorOperation as getMonitorTool, getMonitorRunOperation, getMonitorRunOperation as getMonitorRunTool, listMonitorRunsOperation, listMonitorRunsOperation as listMonitorRunsTool, listMonitorsOperation, listMonitorsOperation as listMonitorsTool, searchOperation, searchOperation as searchTool, searchWithContentsOperation, searchWithContentsOperation as searchWithContentsTool, triggerMonitorOperation, triggerMonitorOperation as triggerMonitorTool, updateMonitorOperation, updateMonitorOperation as updateMonitorTool };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as listMonitorsOperation, c as getMonitorOperation, d as findSimilarOperation, f as deleteMonitorOperation, i as searchOperation, l as getContentsOperation, m as answerOperation, n as triggerMonitorOperation, o as listMonitorRunsOperation, p as createMonitorOperation, r as searchWithContentsOperation, s as getMonitorRunOperation, t as updateMonitorOperation, u as findSimilarWithContentsOperation } from "../update-monitor.operation-Dm50YoS7.mjs";
|
|
2
|
+
export { answerOperation, answerOperation as answerTool, createMonitorOperation, createMonitorOperation as createMonitorTool, deleteMonitorOperation, deleteMonitorOperation as deleteMonitorTool, findSimilarOperation, findSimilarOperation as findSimilarTool, findSimilarWithContentsOperation, findSimilarWithContentsOperation as findSimilarWithContentsTool, getContentsOperation, getContentsOperation as getContentsTool, getMonitorOperation, getMonitorOperation as getMonitorTool, getMonitorRunOperation, getMonitorRunOperation as getMonitorRunTool, listMonitorRunsOperation, listMonitorRunsOperation as listMonitorRunsTool, listMonitorsOperation, listMonitorsOperation as listMonitorsTool, searchOperation, searchOperation as searchTool, searchWithContentsOperation, searchWithContentsOperation as searchWithContentsTool, triggerMonitorOperation, triggerMonitorOperation as triggerMonitorTool, updateMonitorOperation, updateMonitorOperation as updateMonitorTool };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as listMonitorsOperation, c as getMonitorOperation, d as findSimilarOperation, f as deleteMonitorOperation, i as searchOperation, l as getContentsOperation, m as answerOperation, n as triggerMonitorOperation, o as listMonitorRunsOperation, p as createMonitorOperation, r as searchWithContentsOperation, s as getMonitorRunOperation, t as updateMonitorOperation, u as findSimilarWithContentsOperation } from "../update-monitor.operation-D-vWJFP3.mjs";
|
|
2
|
+
|
|
3
|
+
export { answerOperation, answerOperation as answerTool, createMonitorOperation, createMonitorOperation as createMonitorTool, deleteMonitorOperation, deleteMonitorOperation as deleteMonitorTool, findSimilarOperation, findSimilarOperation as findSimilarTool, findSimilarWithContentsOperation, findSimilarWithContentsOperation as findSimilarWithContentsTool, getContentsOperation, getContentsOperation as getContentsTool, getMonitorOperation, getMonitorOperation as getMonitorTool, getMonitorRunOperation, getMonitorRunOperation as getMonitorRunTool, listMonitorRunsOperation, listMonitorRunsOperation as listMonitorRunsTool, listMonitorsOperation, listMonitorsOperation as listMonitorsTool, searchOperation, searchOperation as searchTool, searchWithContentsOperation, searchWithContentsOperation as searchWithContentsTool, triggerMonitorOperation, triggerMonitorOperation as triggerMonitorTool, updateMonitorOperation, updateMonitorOperation as updateMonitorTool };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as exaAnswerResponseSchema, S as exaAnswerCitationSchema, _ as ExaSearchResult, a as ExaMonitorRun, b as ExaAnswerCitation, c as exaMonitorListResponseSchema, d as exaMonitorSchema, f as exaTriggerMonitorResponseSchema, g as ExaCost, h as exaContentsResponseSchema, i as ExaMonitorListResponse, l as exaMonitorRunListResponseSchema, m as contentsOptionsSchema, n as exaSearchResponseSchema, o as ExaMonitorRunListResponse, p as ExaContentsResponse, r as ExaMonitor, s as ExaTriggerMonitorResponse, t as ExaSearchResponse, u as exaMonitorRunSchema, v as exaCostSchema, x as ExaAnswerResponse, y as exaSearchResultSchema } from "../search.schema-Cw-d91N6.mjs";
|
|
2
|
+
export { type ExaAnswerCitation, type ExaAnswerResponse, type ExaContentsResponse, type ExaCost, type ExaMonitor, type ExaMonitorListResponse, type ExaMonitorRun, type ExaMonitorRunListResponse, type ExaSearchResponse, type ExaSearchResult, type ExaTriggerMonitorResponse, contentsOptionsSchema, exaAnswerCitationSchema, exaAnswerResponseSchema, exaContentsResponseSchema, exaCostSchema, exaMonitorListResponseSchema, exaMonitorRunListResponseSchema, exaMonitorRunSchema, exaMonitorSchema, exaSearchResponseSchema, exaSearchResultSchema, exaTriggerMonitorResponseSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as exaMonitorRunListResponseSchema, c as exaTriggerMonitorResponseSchema, d as exaCostSchema, f as exaSearchResultSchema, i as exaMonitorListResponseSchema, l as exaAnswerCitationSchema, n as exaContentsResponseSchema, o as exaMonitorRunSchema, r as exaSearchResponseSchema, s as exaMonitorSchema, t as contentsOptionsSchema, u as exaAnswerResponseSchema } from "../contents.schema-BNgTB2DN.mjs";
|
|
2
|
+
|
|
3
|
+
export { contentsOptionsSchema, exaAnswerCitationSchema, exaAnswerResponseSchema, exaContentsResponseSchema, exaCostSchema, exaMonitorListResponseSchema, exaMonitorRunListResponseSchema, exaMonitorRunSchema, exaMonitorSchema, exaSearchResponseSchema, exaSearchResultSchema, exaTriggerMonitorResponseSchema };
|