@keystrokehq/exa 0.1.4 → 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.md +7 -108
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/answer.cjs +81 -0
- package/dist/actions/answer.cjs.map +1 -0
- package/dist/actions/answer.d.cts +9 -0
- package/dist/actions/answer.d.cts.map +1 -0
- package/dist/actions/answer.d.mts +9 -0
- package/dist/actions/answer.d.mts.map +1 -0
- package/dist/actions/answer.mjs +80 -0
- package/dist/actions/answer.mjs.map +1 -0
- package/dist/actions/create-import.cjs +41 -0
- package/dist/actions/create-import.cjs.map +1 -0
- package/dist/actions/create-import.d.cts +9 -0
- package/dist/actions/create-import.d.cts.map +1 -0
- package/dist/actions/create-import.d.mts +9 -0
- package/dist/actions/create-import.d.mts.map +1 -0
- package/dist/actions/create-import.mjs +40 -0
- package/dist/actions/create-import.mjs.map +1 -0
- package/dist/actions/create-monitor.cjs +81 -0
- package/dist/actions/create-monitor.cjs.map +1 -0
- package/dist/actions/create-monitor.d.cts +9 -0
- package/dist/actions/create-monitor.d.cts.map +1 -0
- package/dist/actions/create-monitor.d.mts +9 -0
- package/dist/actions/create-monitor.d.mts.map +1 -0
- package/dist/actions/create-monitor.mjs +80 -0
- package/dist/actions/create-monitor.mjs.map +1 -0
- package/dist/actions/create-research.cjs +45 -0
- package/dist/actions/create-research.cjs.map +1 -0
- package/dist/actions/create-research.d.cts +9 -0
- package/dist/actions/create-research.d.cts.map +1 -0
- package/dist/actions/create-research.d.mts +9 -0
- package/dist/actions/create-research.d.mts.map +1 -0
- package/dist/actions/create-research.mjs +44 -0
- package/dist/actions/create-research.mjs.map +1 -0
- package/dist/actions/create-webset.cjs +201 -0
- package/dist/actions/create-webset.cjs.map +1 -0
- package/dist/actions/create-webset.d.cts +9 -0
- package/dist/actions/create-webset.d.cts.map +1 -0
- package/dist/actions/create-webset.d.mts +9 -0
- package/dist/actions/create-webset.d.mts.map +1 -0
- package/dist/actions/create-webset.mjs +200 -0
- package/dist/actions/create-webset.mjs.map +1 -0
- package/dist/actions/delete-import.cjs +31 -0
- package/dist/actions/delete-import.cjs.map +1 -0
- package/dist/actions/delete-import.d.cts +9 -0
- package/dist/actions/delete-import.d.cts.map +1 -0
- package/dist/actions/delete-import.d.mts +9 -0
- package/dist/actions/delete-import.d.mts.map +1 -0
- package/dist/actions/delete-import.mjs +30 -0
- package/dist/actions/delete-import.mjs.map +1 -0
- package/dist/actions/delete-webset.cjs +153 -0
- package/dist/actions/delete-webset.cjs.map +1 -0
- package/dist/actions/delete-webset.d.cts +9 -0
- package/dist/actions/delete-webset.d.cts.map +1 -0
- package/dist/actions/delete-webset.d.mts +9 -0
- package/dist/actions/delete-webset.d.mts.map +1 -0
- package/dist/actions/delete-webset.mjs +152 -0
- package/dist/actions/delete-webset.mjs.map +1 -0
- package/dist/actions/get-api-key.cjs +21 -0
- package/dist/actions/get-api-key.cjs.map +1 -0
- package/dist/actions/get-api-key.d.cts +9 -0
- package/dist/actions/get-api-key.d.cts.map +1 -0
- package/dist/actions/get-api-key.d.mts +9 -0
- package/dist/actions/get-api-key.d.mts.map +1 -0
- package/dist/actions/get-api-key.mjs +18 -0
- package/dist/actions/get-api-key.mjs.map +1 -0
- package/dist/actions/get-contents-action.cjs +75 -0
- package/dist/actions/get-contents-action.cjs.map +1 -0
- package/dist/actions/get-contents-action.d.cts +9 -0
- package/dist/actions/get-contents-action.d.cts.map +1 -0
- package/dist/actions/get-contents-action.d.mts +9 -0
- package/dist/actions/get-contents-action.d.mts.map +1 -0
- package/dist/actions/get-contents-action.mjs +74 -0
- package/dist/actions/get-contents-action.mjs.map +1 -0
- package/dist/actions/get-event.cjs +140 -0
- package/dist/actions/get-event.cjs.map +1 -0
- package/dist/actions/get-event.d.cts +9 -0
- package/dist/actions/get-event.d.cts.map +1 -0
- package/dist/actions/get-event.d.mts +9 -0
- package/dist/actions/get-event.d.mts.map +1 -0
- package/dist/actions/get-event.mjs +139 -0
- package/dist/actions/get-event.mjs.map +1 -0
- package/dist/actions/get-research.cjs +47 -0
- package/dist/actions/get-research.cjs.map +1 -0
- package/dist/actions/get-research.d.cts +9 -0
- package/dist/actions/get-research.d.cts.map +1 -0
- package/dist/actions/get-research.d.mts +9 -0
- package/dist/actions/get-research.d.mts.map +1 -0
- package/dist/actions/get-research.mjs +46 -0
- package/dist/actions/get-research.mjs.map +1 -0
- package/dist/actions/index.cjs +34 -16
- package/dist/actions/index.d.cts +18 -2
- package/dist/actions/index.d.mts +18 -2
- package/dist/actions/index.mjs +18 -2
- package/dist/actions/list-events.cjs +32 -0
- package/dist/actions/list-events.cjs.map +1 -0
- package/dist/actions/list-events.d.cts +9 -0
- package/dist/actions/list-events.d.cts.map +1 -0
- package/dist/actions/list-events.d.mts +9 -0
- package/dist/actions/list-events.d.mts.map +1 -0
- package/dist/actions/list-events.mjs +31 -0
- package/dist/actions/list-events.mjs.map +1 -0
- package/dist/actions/list-imports.cjs +54 -0
- package/dist/actions/list-imports.cjs.map +1 -0
- package/dist/actions/list-imports.d.cts +9 -0
- package/dist/actions/list-imports.d.cts.map +1 -0
- package/dist/actions/list-imports.d.mts +9 -0
- package/dist/actions/list-imports.d.mts.map +1 -0
- package/dist/actions/list-imports.mjs +53 -0
- package/dist/actions/list-imports.mjs.map +1 -0
- package/dist/actions/list-research.cjs +49 -0
- package/dist/actions/list-research.cjs.map +1 -0
- package/dist/actions/list-research.d.cts +9 -0
- package/dist/actions/list-research.d.cts.map +1 -0
- package/dist/actions/list-research.d.mts +9 -0
- package/dist/actions/list-research.d.mts.map +1 -0
- package/dist/actions/list-research.mjs +48 -0
- package/dist/actions/list-research.mjs.map +1 -0
- package/dist/actions/list-webhooks.cjs +34 -0
- package/dist/actions/list-webhooks.cjs.map +1 -0
- package/dist/actions/list-webhooks.d.cts +9 -0
- package/dist/actions/list-webhooks.d.cts.map +1 -0
- package/dist/actions/list-webhooks.d.mts +9 -0
- package/dist/actions/list-webhooks.d.mts.map +1 -0
- package/dist/actions/list-webhooks.mjs +33 -0
- package/dist/actions/list-webhooks.mjs.map +1 -0
- package/dist/actions/search.cjs +145 -0
- package/dist/actions/search.cjs.map +1 -0
- package/dist/actions/search.d.cts +9 -0
- package/dist/actions/search.d.cts.map +1 -0
- package/dist/actions/search.d.mts +9 -0
- package/dist/actions/search.d.mts.map +1 -0
- package/dist/actions/search.mjs +144 -0
- package/dist/actions/search.mjs.map +1 -0
- package/dist/actions/update-import.cjs +35 -0
- package/dist/actions/update-import.cjs.map +1 -0
- package/dist/actions/update-import.d.cts +9 -0
- package/dist/actions/update-import.d.cts.map +1 -0
- package/dist/actions/update-import.d.mts +9 -0
- package/dist/actions/update-import.d.mts.map +1 -0
- package/dist/actions/update-import.mjs +34 -0
- package/dist/actions/update-import.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/client.cjs +30 -2
- package/dist/client.cjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +38 -14
- package/dist/index.d.cts +20 -17
- package/dist/index.d.mts +20 -17
- package/dist/index.mjs +21 -5
- package/package.json +13 -13
- package/dist/actions-CJq1Nyt_.mjs +0 -349
- package/dist/actions-CJq1Nyt_.mjs.map +0 -1
- package/dist/actions-LoQVlbiT.cjs +0 -438
- package/dist/actions-LoQVlbiT.cjs.map +0 -1
- package/dist/app-CBLUruR0.mjs +0 -15
- package/dist/app-CBLUruR0.mjs.map +0 -1
- package/dist/app-DMujvH6I.cjs +0 -26
- package/dist/app-DMujvH6I.cjs.map +0 -1
- package/dist/client-DlwHA71b.cjs +0 -56
- package/dist/client-DlwHA71b.cjs.map +0 -1
- package/dist/index-BwCGHs6v.d.cts +0 -357
- package/dist/index-BwCGHs6v.d.cts.map +0 -1
- package/dist/index-BwCGHs6v.d.mts +0 -357
- package/dist/index-BwCGHs6v.d.mts.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/mcp.cjs +0 -57
- package/dist/mcp.cjs.map +0 -1
- package/dist/mcp.d.cts +0 -16
- package/dist/mcp.d.cts.map +0 -1
- package/dist/mcp.d.mts +0 -16
- package/dist/mcp.d.mts.map +0 -1
- package/dist/mcp.mjs +0 -54
- package/dist/mcp.mjs.map +0 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-monitor.ts
|
|
4
|
+
const ExaCreateMonitorInput = zod.z.object({
|
|
5
|
+
cadence: zod.z.object({
|
|
6
|
+
cron: zod.z.string().describe("Cron expression for monitor cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day."),
|
|
7
|
+
timezone: zod.z.string().default("Etc/UTC").describe("IANA timezone (e.g., 'America/New_York').").optional()
|
|
8
|
+
}).describe("How often the monitor will run."),
|
|
9
|
+
behavior: zod.z.object({
|
|
10
|
+
type: zod.z.string().default("search").describe("Type of behavior to execute when monitor runs.").optional(),
|
|
11
|
+
config: zod.z.object({
|
|
12
|
+
count: zod.z.number().int().describe("Number of results to return.").optional(),
|
|
13
|
+
query: zod.z.string().describe("The search query string to use for the monitor run.").optional(),
|
|
14
|
+
entity: zod.z.object({ type: zod.z.string().describe("Type of entity to search for (e.g., 'company').") }).describe("Entity filter for the search run.").optional(),
|
|
15
|
+
behavior: zod.z.string().describe("Behavior to apply to results (e.g., 'append', 'replace').").optional(),
|
|
16
|
+
criteria: zod.z.array(zod.z.object({ description: zod.z.string().describe("A condition or filter description for the monitor's behavior configuration.") })).describe("List of criteria objects defining additional conditions for the search run.").optional()
|
|
17
|
+
}).describe("Configuration for the behavior execution.")
|
|
18
|
+
}).describe("Behavior to perform when monitor runs."),
|
|
19
|
+
metadata: zod.z.object({}).describe("Key-value pairs to associate with the Monitor.").optional(),
|
|
20
|
+
websetId: zod.z.string().describe("The ID of the Webset to attach this Monitor to.")
|
|
21
|
+
}).describe("Parameters to create a new Monitor for automated Webset updates.");
|
|
22
|
+
const ExaCreateMonitor_ResponseCadenceSchema = zod.z.object({
|
|
23
|
+
cron: zod.z.string().describe("Cron expression for monitor cadence."),
|
|
24
|
+
timezone: zod.z.string().describe("IANA timezone for the schedule.")
|
|
25
|
+
});
|
|
26
|
+
const ExaCreateMonitor_MonitorLastRunSchema = zod.z.object({
|
|
27
|
+
id: zod.z.string().describe("The unique identifier for the Monitor Run."),
|
|
28
|
+
type: zod.z.enum(["search", "refresh"]).describe("The run type."),
|
|
29
|
+
object: zod.z.string().describe("The type of object."),
|
|
30
|
+
status: zod.z.enum([
|
|
31
|
+
"created",
|
|
32
|
+
"running",
|
|
33
|
+
"completed",
|
|
34
|
+
"canceled",
|
|
35
|
+
"failed"
|
|
36
|
+
]).describe("The status of the Monitor Run."),
|
|
37
|
+
failedAt: zod.z.string().describe("Timestamp when the run failed.").optional(),
|
|
38
|
+
createdAt: zod.z.string().describe("Timestamp when the run was created."),
|
|
39
|
+
monitorId: zod.z.string().describe("ID of the Monitor associated with this run."),
|
|
40
|
+
updatedAt: zod.z.string().describe("Timestamp when the run was last updated."),
|
|
41
|
+
canceledAt: zod.z.string().describe("Timestamp when the run was canceled.").optional(),
|
|
42
|
+
completedAt: zod.z.string().describe("Timestamp when the run completed.").optional(),
|
|
43
|
+
failedReason: zod.z.string().describe("Reason the run failed.").optional()
|
|
44
|
+
});
|
|
45
|
+
const ExaCreateMonitor_MonitorEntitySchema = zod.z.object({ type: zod.z.string().describe("Entity type used in the monitor.") });
|
|
46
|
+
const ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema = zod.z.object({ description: zod.z.string().describe("Criteria description for the monitor.") });
|
|
47
|
+
const ExaCreateMonitor_MonitorBehaviorConfigSchema = zod.z.object({
|
|
48
|
+
count: zod.z.number().int().describe("Number of results returned per run."),
|
|
49
|
+
query: zod.z.string().describe("Search query used by the monitor."),
|
|
50
|
+
entity: ExaCreateMonitor_MonitorEntitySchema.nullable(),
|
|
51
|
+
behavior: zod.z.string().describe("Behavior applied to results (e.g., 'append')."),
|
|
52
|
+
criteria: zod.z.array(ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema).describe("List of criteria applied during the monitor run.")
|
|
53
|
+
});
|
|
54
|
+
const ExaCreateMonitor_MonitorBehaviorSchema = zod.z.object({
|
|
55
|
+
type: zod.z.string().describe("Type of behavior."),
|
|
56
|
+
config: ExaCreateMonitor_MonitorBehaviorConfigSchema.nullable()
|
|
57
|
+
});
|
|
58
|
+
const ExaCreateMonitorOutput = zod.z.object({
|
|
59
|
+
id: zod.z.string().describe("The unique identifier for the Monitor."),
|
|
60
|
+
object: zod.z.string().describe("The type of object."),
|
|
61
|
+
status: zod.z.enum(["enabled", "disabled"]).describe("The status of the Monitor."),
|
|
62
|
+
cadence: ExaCreateMonitor_ResponseCadenceSchema.nullable(),
|
|
63
|
+
lastRun: ExaCreateMonitor_MonitorLastRunSchema.nullable().optional(),
|
|
64
|
+
behavior: ExaCreateMonitor_MonitorBehaviorSchema.nullable(),
|
|
65
|
+
metadata: zod.z.object({}).describe("Associated metadata key-value pairs."),
|
|
66
|
+
websetId: zod.z.string().describe("The id of the Webset the Monitor belongs to."),
|
|
67
|
+
createdAt: zod.z.string().describe("Timestamp when the Monitor was created."),
|
|
68
|
+
nextRunAt: zod.z.string().describe("Timestamp for the next scheduled run.").optional(),
|
|
69
|
+
updatedAt: zod.z.string().describe("Timestamp when the Monitor was last updated.")
|
|
70
|
+
}).describe("Response model for a newly created Monitor.");
|
|
71
|
+
const exaCreateMonitor = require_action.action("EXA_CREATE_MONITOR", {
|
|
72
|
+
slug: "exa-create-monitor",
|
|
73
|
+
name: "Create a Monitor",
|
|
74
|
+
description: "Tool to create a new Monitor. Use when you need to schedule automated updates for a Webset without manual runs.",
|
|
75
|
+
input: ExaCreateMonitorInput,
|
|
76
|
+
output: ExaCreateMonitorOutput
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
exports.exaCreateMonitor = exaCreateMonitor;
|
|
80
|
+
|
|
81
|
+
//# sourceMappingURL=create-monitor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-monitor.cjs","names":["z","action"],"sources":["../../src/actions/create-monitor.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaCreateMonitorInput: z.ZodTypeAny = z.object({\n cadence: z.object({\n cron: z.string().describe(\"Cron expression for monitor cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day.\"),\n timezone: z.string().default(\"Etc/UTC\").describe(\"IANA timezone (e.g., 'America/New_York').\").optional(),\n}).describe(\"How often the monitor will run.\"),\n behavior: z.object({\n type: z.string().default(\"search\").describe(\"Type of behavior to execute when monitor runs.\").optional(),\n config: z.object({\n count: z.number().int().describe(\"Number of results to return.\").optional(),\n query: z.string().describe(\"The search query string to use for the monitor run.\").optional(),\n entity: z.object({\n type: z.string().describe(\"Type of entity to search for (e.g., 'company').\"),\n}).describe(\"Entity filter for the search run.\").optional(),\n behavior: z.string().describe(\"Behavior to apply to results (e.g., 'append', 'replace').\").optional(),\n criteria: z.array(z.object({\n description: z.string().describe(\"A condition or filter description for the monitor's behavior configuration.\"),\n})).describe(\"List of criteria objects defining additional conditions for the search run.\").optional(),\n}).describe(\"Configuration for the behavior execution.\"),\n}).describe(\"Behavior to perform when monitor runs.\"),\n metadata: z.object({}).describe(\"Key-value pairs to associate with the Monitor.\").optional(),\n websetId: z.string().describe(\"The ID of the Webset to attach this Monitor to.\"),\n}).describe(\"Parameters to create a new Monitor for automated Webset updates.\");\nconst ExaCreateMonitor_ResponseCadenceSchema: z.ZodTypeAny = z.object({\n cron: z.string().describe(\"Cron expression for monitor cadence.\"),\n timezone: z.string().describe(\"IANA timezone for the schedule.\"),\n});\nconst ExaCreateMonitor_MonitorLastRunSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the Monitor Run.\"),\n type: z.enum([\"search\", \"refresh\"]).describe(\"The run type.\"),\n object: z.string().describe(\"The type of object.\"),\n status: z.enum([\"created\", \"running\", \"completed\", \"canceled\", \"failed\"]).describe(\"The status of the Monitor Run.\"),\n failedAt: z.string().describe(\"Timestamp when the run failed.\").optional(),\n createdAt: z.string().describe(\"Timestamp when the run was created.\"),\n monitorId: z.string().describe(\"ID of the Monitor associated with this run.\"),\n updatedAt: z.string().describe(\"Timestamp when the run was last updated.\"),\n canceledAt: z.string().describe(\"Timestamp when the run was canceled.\").optional(),\n completedAt: z.string().describe(\"Timestamp when the run completed.\").optional(),\n failedReason: z.string().describe(\"Reason the run failed.\").optional(),\n});\nconst ExaCreateMonitor_MonitorEntitySchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Entity type used in the monitor.\"),\n});\nconst ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema: z.ZodTypeAny = z.object({\n description: z.string().describe(\"Criteria description for the monitor.\"),\n});\nconst ExaCreateMonitor_MonitorBehaviorConfigSchema: z.ZodTypeAny = z.object({\n count: z.number().int().describe(\"Number of results returned per run.\"),\n query: z.string().describe(\"Search query used by the monitor.\"),\n entity: ExaCreateMonitor_MonitorEntitySchema.nullable(),\n behavior: z.string().describe(\"Behavior applied to results (e.g., 'append').\"),\n criteria: z.array(ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema).describe(\"List of criteria applied during the monitor run.\"),\n});\nconst ExaCreateMonitor_MonitorBehaviorSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of behavior.\"),\n config: ExaCreateMonitor_MonitorBehaviorConfigSchema.nullable(),\n});\nexport const ExaCreateMonitorOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the Monitor.\"),\n object: z.string().describe(\"The type of object.\"),\n status: z.enum([\"enabled\", \"disabled\"]).describe(\"The status of the Monitor.\"),\n cadence: ExaCreateMonitor_ResponseCadenceSchema.nullable(),\n lastRun: ExaCreateMonitor_MonitorLastRunSchema.nullable().optional(),\n behavior: ExaCreateMonitor_MonitorBehaviorSchema.nullable(),\n metadata: z.object({}).describe(\"Associated metadata key-value pairs.\"),\n websetId: z.string().describe(\"The id of the Webset the Monitor belongs to.\"),\n createdAt: z.string().describe(\"Timestamp when the Monitor was created.\"),\n nextRunAt: z.string().describe(\"Timestamp for the next scheduled run.\").optional(),\n updatedAt: z.string().describe(\"Timestamp when the Monitor was last updated.\"),\n}).describe(\"Response model for a newly created Monitor.\");\n\nexport const exaCreateMonitor = action(\"EXA_CREATE_MONITOR\", {\n slug: \"exa-create-monitor\",\n name: \"Create a Monitor\",\n description: \"Tool to create a new Monitor. Use when you need to schedule automated updates for a Webset without manual runs.\",\n input: ExaCreateMonitorInput,\n output: ExaCreateMonitorOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wBAAsCA,IAAAA,EAAE,OAAO;CAC1D,SAASA,IAAAA,EAAE,OAAO;EAClB,MAAMA,IAAAA,EAAE,OAAO,EAAE,SAAS,gIAAgI;EAC1J,UAAUA,IAAAA,EAAE,OAAO,EAAE,QAAQ,SAAS,EAAE,SAAS,2CAA2C,EAAE,SAAS;CACzG,CAAC,EAAE,SAAS,iCAAiC;CAC3C,UAAUA,IAAAA,EA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;CAC3D,IAAIA,IAAAA,EAAE,OAAO,EAAE,SAAS,wCAAwC;CAChE,QAAQA,IAAAA,EAAE,OAAO,EAAE,SAAS,qBAAqB;CACjD,QAAQA,IAAAA,EAAE,KAAK,CAAC,WAAW,UAAU,CAAC,EAAE,SAAS,4BAA4B;CAC7E,SAAS,uCAAuC,SAAS;CACzD,SAAS,sCAAsC,SAAS,EAAE,SAAS;CACnE,UAAU,uCAAuC,SAAS;CAC1D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,EAAE,SAAS,sCAAsC;CACtE,UAAUA,IAAAA,EAAE,OAAO,EAAE,SAAS,8CAA8C;CAC5E,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,yCAAyC;CACxE,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,uCAAuC,EAAE,SAAS;CACjF,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,8CAA8C;AAC/E,CAAC,EAAE,SAAS,6CAA6C;AAEzD,MAAa,mBAAmBC,eAAAA,OAAO,sBAAsB;CAC3D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-monitor.d.ts
|
|
4
|
+
declare const ExaCreateMonitorInput: z.ZodTypeAny;
|
|
5
|
+
declare const ExaCreateMonitorOutput: z.ZodTypeAny;
|
|
6
|
+
declare const exaCreateMonitor: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { exaCreateMonitor };
|
|
9
|
+
//# sourceMappingURL=create-monitor.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-monitor.d.cts","names":[],"sources":["../../src/actions/create-monitor.ts"],"mappings":";;;cAIa,qBAAA,EAAuB,CAAA,CAAE,UAqByC;AAAA,cAmClE,sBAAA,EAAwB,CAAA,CAAE,UAYmB;AAAA,cAE7C,gBAAA,gCAAgB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-monitor.d.ts
|
|
4
|
+
declare const ExaCreateMonitorInput: z.ZodTypeAny;
|
|
5
|
+
declare const ExaCreateMonitorOutput: z.ZodTypeAny;
|
|
6
|
+
declare const exaCreateMonitor: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { exaCreateMonitor };
|
|
9
|
+
//# sourceMappingURL=create-monitor.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-monitor.d.mts","names":[],"sources":["../../src/actions/create-monitor.ts"],"mappings":";;;cAIa,qBAAA,EAAuB,CAAA,CAAE,UAqByC;AAAA,cAmClE,sBAAA,EAAwB,CAAA,CAAE,UAYmB;AAAA,cAE7C,gBAAA,gCAAgB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-monitor.ts
|
|
4
|
+
const ExaCreateMonitorInput = z.object({
|
|
5
|
+
cadence: z.object({
|
|
6
|
+
cron: z.string().describe("Cron expression for monitor cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day."),
|
|
7
|
+
timezone: z.string().default("Etc/UTC").describe("IANA timezone (e.g., 'America/New_York').").optional()
|
|
8
|
+
}).describe("How often the monitor will run."),
|
|
9
|
+
behavior: z.object({
|
|
10
|
+
type: z.string().default("search").describe("Type of behavior to execute when monitor runs.").optional(),
|
|
11
|
+
config: z.object({
|
|
12
|
+
count: z.number().int().describe("Number of results to return.").optional(),
|
|
13
|
+
query: z.string().describe("The search query string to use for the monitor run.").optional(),
|
|
14
|
+
entity: z.object({ type: z.string().describe("Type of entity to search for (e.g., 'company').") }).describe("Entity filter for the search run.").optional(),
|
|
15
|
+
behavior: z.string().describe("Behavior to apply to results (e.g., 'append', 'replace').").optional(),
|
|
16
|
+
criteria: z.array(z.object({ description: z.string().describe("A condition or filter description for the monitor's behavior configuration.") })).describe("List of criteria objects defining additional conditions for the search run.").optional()
|
|
17
|
+
}).describe("Configuration for the behavior execution.")
|
|
18
|
+
}).describe("Behavior to perform when monitor runs."),
|
|
19
|
+
metadata: z.object({}).describe("Key-value pairs to associate with the Monitor.").optional(),
|
|
20
|
+
websetId: z.string().describe("The ID of the Webset to attach this Monitor to.")
|
|
21
|
+
}).describe("Parameters to create a new Monitor for automated Webset updates.");
|
|
22
|
+
const ExaCreateMonitor_ResponseCadenceSchema = z.object({
|
|
23
|
+
cron: z.string().describe("Cron expression for monitor cadence."),
|
|
24
|
+
timezone: z.string().describe("IANA timezone for the schedule.")
|
|
25
|
+
});
|
|
26
|
+
const ExaCreateMonitor_MonitorLastRunSchema = z.object({
|
|
27
|
+
id: z.string().describe("The unique identifier for the Monitor Run."),
|
|
28
|
+
type: z.enum(["search", "refresh"]).describe("The run type."),
|
|
29
|
+
object: z.string().describe("The type of object."),
|
|
30
|
+
status: z.enum([
|
|
31
|
+
"created",
|
|
32
|
+
"running",
|
|
33
|
+
"completed",
|
|
34
|
+
"canceled",
|
|
35
|
+
"failed"
|
|
36
|
+
]).describe("The status of the Monitor Run."),
|
|
37
|
+
failedAt: z.string().describe("Timestamp when the run failed.").optional(),
|
|
38
|
+
createdAt: z.string().describe("Timestamp when the run was created."),
|
|
39
|
+
monitorId: z.string().describe("ID of the Monitor associated with this run."),
|
|
40
|
+
updatedAt: z.string().describe("Timestamp when the run was last updated."),
|
|
41
|
+
canceledAt: z.string().describe("Timestamp when the run was canceled.").optional(),
|
|
42
|
+
completedAt: z.string().describe("Timestamp when the run completed.").optional(),
|
|
43
|
+
failedReason: z.string().describe("Reason the run failed.").optional()
|
|
44
|
+
});
|
|
45
|
+
const ExaCreateMonitor_MonitorEntitySchema = z.object({ type: z.string().describe("Entity type used in the monitor.") });
|
|
46
|
+
const ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema = z.object({ description: z.string().describe("Criteria description for the monitor.") });
|
|
47
|
+
const ExaCreateMonitor_MonitorBehaviorConfigSchema = z.object({
|
|
48
|
+
count: z.number().int().describe("Number of results returned per run."),
|
|
49
|
+
query: z.string().describe("Search query used by the monitor."),
|
|
50
|
+
entity: ExaCreateMonitor_MonitorEntitySchema.nullable(),
|
|
51
|
+
behavior: z.string().describe("Behavior applied to results (e.g., 'append')."),
|
|
52
|
+
criteria: z.array(ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema).describe("List of criteria applied during the monitor run.")
|
|
53
|
+
});
|
|
54
|
+
const ExaCreateMonitor_MonitorBehaviorSchema = z.object({
|
|
55
|
+
type: z.string().describe("Type of behavior."),
|
|
56
|
+
config: ExaCreateMonitor_MonitorBehaviorConfigSchema.nullable()
|
|
57
|
+
});
|
|
58
|
+
const exaCreateMonitor = action("EXA_CREATE_MONITOR", {
|
|
59
|
+
slug: "exa-create-monitor",
|
|
60
|
+
name: "Create a Monitor",
|
|
61
|
+
description: "Tool to create a new Monitor. Use when you need to schedule automated updates for a Webset without manual runs.",
|
|
62
|
+
input: ExaCreateMonitorInput,
|
|
63
|
+
output: z.object({
|
|
64
|
+
id: z.string().describe("The unique identifier for the Monitor."),
|
|
65
|
+
object: z.string().describe("The type of object."),
|
|
66
|
+
status: z.enum(["enabled", "disabled"]).describe("The status of the Monitor."),
|
|
67
|
+
cadence: ExaCreateMonitor_ResponseCadenceSchema.nullable(),
|
|
68
|
+
lastRun: ExaCreateMonitor_MonitorLastRunSchema.nullable().optional(),
|
|
69
|
+
behavior: ExaCreateMonitor_MonitorBehaviorSchema.nullable(),
|
|
70
|
+
metadata: z.object({}).describe("Associated metadata key-value pairs."),
|
|
71
|
+
websetId: z.string().describe("The id of the Webset the Monitor belongs to."),
|
|
72
|
+
createdAt: z.string().describe("Timestamp when the Monitor was created."),
|
|
73
|
+
nextRunAt: z.string().describe("Timestamp for the next scheduled run.").optional(),
|
|
74
|
+
updatedAt: z.string().describe("Timestamp when the Monitor was last updated.")
|
|
75
|
+
}).describe("Response model for a newly created Monitor.")
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { exaCreateMonitor };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=create-monitor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-monitor.mjs","names":[],"sources":["../../src/actions/create-monitor.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaCreateMonitorInput: z.ZodTypeAny = z.object({\n cadence: z.object({\n cron: z.string().describe(\"Cron expression for monitor cadence (must be a valid Unix cron with 5 fields). The schedule must trigger at most once per day.\"),\n timezone: z.string().default(\"Etc/UTC\").describe(\"IANA timezone (e.g., 'America/New_York').\").optional(),\n}).describe(\"How often the monitor will run.\"),\n behavior: z.object({\n type: z.string().default(\"search\").describe(\"Type of behavior to execute when monitor runs.\").optional(),\n config: z.object({\n count: z.number().int().describe(\"Number of results to return.\").optional(),\n query: z.string().describe(\"The search query string to use for the monitor run.\").optional(),\n entity: z.object({\n type: z.string().describe(\"Type of entity to search for (e.g., 'company').\"),\n}).describe(\"Entity filter for the search run.\").optional(),\n behavior: z.string().describe(\"Behavior to apply to results (e.g., 'append', 'replace').\").optional(),\n criteria: z.array(z.object({\n description: z.string().describe(\"A condition or filter description for the monitor's behavior configuration.\"),\n})).describe(\"List of criteria objects defining additional conditions for the search run.\").optional(),\n}).describe(\"Configuration for the behavior execution.\"),\n}).describe(\"Behavior to perform when monitor runs.\"),\n metadata: z.object({}).describe(\"Key-value pairs to associate with the Monitor.\").optional(),\n websetId: z.string().describe(\"The ID of the Webset to attach this Monitor to.\"),\n}).describe(\"Parameters to create a new Monitor for automated Webset updates.\");\nconst ExaCreateMonitor_ResponseCadenceSchema: z.ZodTypeAny = z.object({\n cron: z.string().describe(\"Cron expression for monitor cadence.\"),\n timezone: z.string().describe(\"IANA timezone for the schedule.\"),\n});\nconst ExaCreateMonitor_MonitorLastRunSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the Monitor Run.\"),\n type: z.enum([\"search\", \"refresh\"]).describe(\"The run type.\"),\n object: z.string().describe(\"The type of object.\"),\n status: z.enum([\"created\", \"running\", \"completed\", \"canceled\", \"failed\"]).describe(\"The status of the Monitor Run.\"),\n failedAt: z.string().describe(\"Timestamp when the run failed.\").optional(),\n createdAt: z.string().describe(\"Timestamp when the run was created.\"),\n monitorId: z.string().describe(\"ID of the Monitor associated with this run.\"),\n updatedAt: z.string().describe(\"Timestamp when the run was last updated.\"),\n canceledAt: z.string().describe(\"Timestamp when the run was canceled.\").optional(),\n completedAt: z.string().describe(\"Timestamp when the run completed.\").optional(),\n failedReason: z.string().describe(\"Reason the run failed.\").optional(),\n});\nconst ExaCreateMonitor_MonitorEntitySchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Entity type used in the monitor.\"),\n});\nconst ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema: z.ZodTypeAny = z.object({\n description: z.string().describe(\"Criteria description for the monitor.\"),\n});\nconst ExaCreateMonitor_MonitorBehaviorConfigSchema: z.ZodTypeAny = z.object({\n count: z.number().int().describe(\"Number of results returned per run.\"),\n query: z.string().describe(\"Search query used by the monitor.\"),\n entity: ExaCreateMonitor_MonitorEntitySchema.nullable(),\n behavior: z.string().describe(\"Behavior applied to results (e.g., 'append').\"),\n criteria: z.array(ExaCreateMonitor_MonitorBehaviorConfigCriteriaItemSchema).describe(\"List of criteria applied during the monitor run.\"),\n});\nconst ExaCreateMonitor_MonitorBehaviorSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of behavior.\"),\n config: ExaCreateMonitor_MonitorBehaviorConfigSchema.nullable(),\n});\nexport const ExaCreateMonitorOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier for the Monitor.\"),\n object: z.string().describe(\"The type of object.\"),\n status: z.enum([\"enabled\", \"disabled\"]).describe(\"The status of the Monitor.\"),\n cadence: ExaCreateMonitor_ResponseCadenceSchema.nullable(),\n lastRun: ExaCreateMonitor_MonitorLastRunSchema.nullable().optional(),\n behavior: ExaCreateMonitor_MonitorBehaviorSchema.nullable(),\n metadata: z.object({}).describe(\"Associated metadata key-value pairs.\"),\n websetId: z.string().describe(\"The id of the Webset the Monitor belongs to.\"),\n createdAt: z.string().describe(\"Timestamp when the Monitor was created.\"),\n nextRunAt: z.string().describe(\"Timestamp for the next scheduled run.\").optional(),\n updatedAt: z.string().describe(\"Timestamp when the Monitor was last updated.\"),\n}).describe(\"Response model for a newly created Monitor.\");\n\nexport const exaCreateMonitor = action(\"EXA_CREATE_MONITOR\", {\n slug: \"exa-create-monitor\",\n name: \"Create a Monitor\",\n description: \"Tool to create a new Monitor. Use when you need to schedule automated updates for a Webset without manual runs.\",\n input: ExaCreateMonitorInput,\n output: ExaCreateMonitorOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wBAAsC,EAAE,OAAO;CAC1D,SAAS,EAAE,OAAO;EAClB,MAAM,EAAE,OAAO,EAAE,SAAS,gIAAgI;EAC1J,UAAU,EAAE,OAAO,EAAE,QAAQ,SAAS,EAAE,SAAS,2CAA2C,EAAE,SAAS;CACzG,CAAC,EAAE,SAAS,iCAAiC;CAC3C,UAAU,EAAE,OAAO;EACnB,MAAM,EAAE,OAAO,EAAE,QAAQ,QAAQ,EAAE,SAAS,gDAAgD,EAAE,SAAS;EACvG,QAAQ,EAAE,OAAO;G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E,WAAW,EAAE,OAAO,EAAE,SAAS,yCAAyC;EACxE,WAAW,EAAE,OAAO,EAAE,SAAS,uCAAuC,EAAE,SAAS;EACjF,WAAW,EAAE,OAAO,EAAE,SAAS,8CAA8C;CAC/E,CAAC,EAAE,SAAS,6CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-research.ts
|
|
4
|
+
const ExaCreateResearchInput = zod.z.object({
|
|
5
|
+
model: zod.z.enum(["exa-research", "exa-research-pro"]).default("exa-research").describe("Research models available for Exa research tasks.").optional(),
|
|
6
|
+
instructions: zod.z.string().describe("Instructions for what research should be conducted. This is the natural language prompt describing the research question or topic to explore."),
|
|
7
|
+
outputSchema: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Optional JSON schema to structure the research output. If provided, the API will return structured JSON matching this schema. If omitted, the API returns a detailed markdown report.").optional()
|
|
8
|
+
}).describe("Parameters for creating an asynchronous research task.");
|
|
9
|
+
const ExaCreateResearch_ResearchEventSchema = zod.z.object({
|
|
10
|
+
type: zod.z.string().describe("Type of event").optional(),
|
|
11
|
+
message: zod.z.string().describe("Event message or description").optional(),
|
|
12
|
+
timestamp: zod.z.number().describe("Unix timestamp when the event occurred").optional()
|
|
13
|
+
}).passthrough().describe("Event tracking progress of a research task.");
|
|
14
|
+
const ExaCreateResearch_ResearchOutputSchema = zod.z.object({
|
|
15
|
+
content: zod.z.string().describe("Main research content or findings").optional(),
|
|
16
|
+
citations: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("List of source citations").optional()
|
|
17
|
+
}).passthrough().describe("Research output containing findings and citations.");
|
|
18
|
+
const ExaCreateResearch_CostDollarsSchema = zod.z.object({
|
|
19
|
+
total: zod.z.number().describe("Total cost in USD").optional(),
|
|
20
|
+
search: zod.z.number().describe("Search cost in USD").optional(),
|
|
21
|
+
content: zod.z.number().describe("Content retrieval cost in USD").optional()
|
|
22
|
+
}).passthrough().describe("Cost information for the research task.");
|
|
23
|
+
const ExaCreateResearchOutput = zod.z.object({
|
|
24
|
+
error: zod.z.string().describe("Error message if the research task failed (only present when status is 'failed').").optional(),
|
|
25
|
+
model: zod.z.string().describe("The research model used for this task.").optional(),
|
|
26
|
+
events: zod.z.array(ExaCreateResearch_ResearchEventSchema).describe("List of events tracking the progress of the research task (if available).").optional(),
|
|
27
|
+
output: ExaCreateResearch_ResearchOutputSchema.nullable().optional(),
|
|
28
|
+
status: zod.z.string().describe("Current status of the research task (e.g., 'pending', 'running', 'completed', 'failed')."),
|
|
29
|
+
createdAt: zod.z.number().describe("Unix timestamp (in milliseconds) when the research task was created."),
|
|
30
|
+
researchId: zod.z.string().describe("Unique identifier for the research task. Use this ID to poll for completion status and retrieve results."),
|
|
31
|
+
costDollars: ExaCreateResearch_CostDollarsSchema.nullable().optional(),
|
|
32
|
+
instructions: zod.z.string().describe("The instructions provided for this research task."),
|
|
33
|
+
outputSchema: zod.z.record(zod.z.string(), zod.z.unknown()).describe("The output schema that was provided in the request (echoed back).").optional()
|
|
34
|
+
}).describe("Response schema for a newly created research task.");
|
|
35
|
+
const exaCreateResearch = require_action.action("EXA_CREATE_RESEARCH", {
|
|
36
|
+
slug: "exa-create-research",
|
|
37
|
+
name: "Create Research Task",
|
|
38
|
+
description: "Creates an asynchronous research task that explores the web, gathers sources, synthesizes findings, and returns results with citations. The API responds immediately with a researchId for polling completion status. Use this when you need to generate: 1. Structured JSON matching an outputSchema you provide 2. A detailed markdown report when no schema is provided After creation, poll the research task status using the researchId to retrieve the final results when completed.",
|
|
39
|
+
input: ExaCreateResearchInput,
|
|
40
|
+
output: ExaCreateResearchOutput
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
exports.exaCreateResearch = exaCreateResearch;
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=create-research.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-research.cjs","names":["z","action"],"sources":["../../src/actions/create-research.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaCreateResearchInput: z.ZodTypeAny = z.object({\n model: z.enum([\"exa-research\", \"exa-research-pro\"]).default(\"exa-research\").describe(\"Research models available for Exa research tasks.\").optional(),\n instructions: z.string().describe(\"Instructions for what research should be conducted. This is the natural language prompt describing the research question or topic to explore.\"),\n outputSchema: z.record(z.string(), z.unknown()).describe(\"Optional JSON schema to structure the research output. If provided, the API will return structured JSON matching this schema. If omitted, the API returns a detailed markdown report.\").optional(),\n}).describe(\"Parameters for creating an asynchronous research task.\");\nconst ExaCreateResearch_ResearchEventSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of event\").optional(),\n message: z.string().describe(\"Event message or description\").optional(),\n timestamp: z.number().describe(\"Unix timestamp when the event occurred\").optional(),\n}).passthrough().describe(\"Event tracking progress of a research task.\");\nconst ExaCreateResearch_ResearchOutputSchema: z.ZodTypeAny = z.object({\n content: z.string().describe(\"Main research content or findings\").optional(),\n citations: z.array(z.record(z.string(), z.unknown())).describe(\"List of source citations\").optional(),\n}).passthrough().describe(\"Research output containing findings and citations.\");\nconst ExaCreateResearch_CostDollarsSchema: z.ZodTypeAny = z.object({\n total: z.number().describe(\"Total cost in USD\").optional(),\n search: z.number().describe(\"Search cost in USD\").optional(),\n content: z.number().describe(\"Content retrieval cost in USD\").optional(),\n}).passthrough().describe(\"Cost information for the research task.\");\nexport const ExaCreateResearchOutput: z.ZodTypeAny = z.object({\n error: z.string().describe(\"Error message if the research task failed (only present when status is 'failed').\").optional(),\n model: z.string().describe(\"The research model used for this task.\").optional(),\n events: z.array(ExaCreateResearch_ResearchEventSchema).describe(\"List of events tracking the progress of the research task (if available).\").optional(),\n output: ExaCreateResearch_ResearchOutputSchema.nullable().optional(),\n status: z.string().describe(\"Current status of the research task (e.g., 'pending', 'running', 'completed', 'failed').\"),\n createdAt: z.number().describe(\"Unix timestamp (in milliseconds) when the research task was created.\"),\n researchId: z.string().describe(\"Unique identifier for the research task. Use this ID to poll for completion status and retrieve results.\"),\n costDollars: ExaCreateResearch_CostDollarsSchema.nullable().optional(),\n instructions: z.string().describe(\"The instructions provided for this research task.\"),\n outputSchema: z.record(z.string(), z.unknown()).describe(\"The output schema that was provided in the request (echoed back).\").optional(),\n}).describe(\"Response schema for a newly created research task.\");\n\nexport const exaCreateResearch = action(\"EXA_CREATE_RESEARCH\", {\n slug: \"exa-create-research\",\n name: \"Create Research Task\",\n description: \"Creates an asynchronous research task that explores the web, gathers sources, synthesizes findings, and returns results with citations. The API responds immediately with a researchId for polling completion status. Use this when you need to generate: 1. Structured JSON matching an outputSchema you provide 2. A detailed markdown report when no schema is provided After creation, poll the research task status using the researchId to retrieve the final results when completed.\",\n input: ExaCreateResearchInput,\n output: ExaCreateResearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuCA,IAAAA,EAAE,OAAO;CAC3D,OAAOA,IAAAA,EAAE,KAAK,CAAC,gBAAgB,kBAAkB,CAAC,EAAE,QAAQ,cAAc,EAAE,SAAS,mDAAmD,EAAE,SAAS;CACnJ,cAAcA,IAAAA,EAAE,OAAO,EAAE,SAAS,+IAA+I;CACjL,cAAcA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,EAAE,SAAS,uLAAuL,EAAE,SAAS;AAC7P,CAAC,EAAE,SAAS,wDAAwD;AACpE,MAAM,wCAAsDA,IAAAA,EAAE,OAAO;CACnE,MAAMA,IAAAA,EAAE,OAAO,EAAE,SAAS,eAAe,EAAE,SAAS;CACpD,SAASA,IAAAA,EAAE,OAAO,EAAE,SAAS,8BAA8B,EAAE,SAAS;CACtE,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,wCAAwC,EAAE,SAAS;AACpF,CAAC,EAAE,YAAY,EAAE,SAAS,6CAA6C;AACvE,MAAM,yCAAuDA,IAAAA,EAAE,OA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AEhE,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-research.d.ts
|
|
4
|
+
declare const ExaCreateResearchInput: z.ZodTypeAny;
|
|
5
|
+
declare const ExaCreateResearchOutput: z.ZodTypeAny;
|
|
6
|
+
declare const exaCreateResearch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { exaCreateResearch };
|
|
9
|
+
//# sourceMappingURL=create-research.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-research.d.cts","names":[],"sources":["../../src/actions/create-research.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAI8B;AAAA,cAexD,uBAAA,EAAyB,CAAA,CAAE,UAWyB;AAAA,cAEpD,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-research.d.ts
|
|
4
|
+
declare const ExaCreateResearchInput: z.ZodTypeAny;
|
|
5
|
+
declare const ExaCreateResearchOutput: z.ZodTypeAny;
|
|
6
|
+
declare const exaCreateResearch: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { exaCreateResearch };
|
|
9
|
+
//# sourceMappingURL=create-research.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-research.d.mts","names":[],"sources":["../../src/actions/create-research.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAI8B;AAAA,cAexD,uBAAA,EAAyB,CAAA,CAAE,UAWyB;AAAA,cAEpD,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-research.ts
|
|
4
|
+
const ExaCreateResearchInput = z.object({
|
|
5
|
+
model: z.enum(["exa-research", "exa-research-pro"]).default("exa-research").describe("Research models available for Exa research tasks.").optional(),
|
|
6
|
+
instructions: z.string().describe("Instructions for what research should be conducted. This is the natural language prompt describing the research question or topic to explore."),
|
|
7
|
+
outputSchema: z.record(z.string(), z.unknown()).describe("Optional JSON schema to structure the research output. If provided, the API will return structured JSON matching this schema. If omitted, the API returns a detailed markdown report.").optional()
|
|
8
|
+
}).describe("Parameters for creating an asynchronous research task.");
|
|
9
|
+
const ExaCreateResearch_ResearchEventSchema = z.object({
|
|
10
|
+
type: z.string().describe("Type of event").optional(),
|
|
11
|
+
message: z.string().describe("Event message or description").optional(),
|
|
12
|
+
timestamp: z.number().describe("Unix timestamp when the event occurred").optional()
|
|
13
|
+
}).passthrough().describe("Event tracking progress of a research task.");
|
|
14
|
+
const ExaCreateResearch_ResearchOutputSchema = z.object({
|
|
15
|
+
content: z.string().describe("Main research content or findings").optional(),
|
|
16
|
+
citations: z.array(z.record(z.string(), z.unknown())).describe("List of source citations").optional()
|
|
17
|
+
}).passthrough().describe("Research output containing findings and citations.");
|
|
18
|
+
const ExaCreateResearch_CostDollarsSchema = z.object({
|
|
19
|
+
total: z.number().describe("Total cost in USD").optional(),
|
|
20
|
+
search: z.number().describe("Search cost in USD").optional(),
|
|
21
|
+
content: z.number().describe("Content retrieval cost in USD").optional()
|
|
22
|
+
}).passthrough().describe("Cost information for the research task.");
|
|
23
|
+
const exaCreateResearch = action("EXA_CREATE_RESEARCH", {
|
|
24
|
+
slug: "exa-create-research",
|
|
25
|
+
name: "Create Research Task",
|
|
26
|
+
description: "Creates an asynchronous research task that explores the web, gathers sources, synthesizes findings, and returns results with citations. The API responds immediately with a researchId for polling completion status. Use this when you need to generate: 1. Structured JSON matching an outputSchema you provide 2. A detailed markdown report when no schema is provided After creation, poll the research task status using the researchId to retrieve the final results when completed.",
|
|
27
|
+
input: ExaCreateResearchInput,
|
|
28
|
+
output: z.object({
|
|
29
|
+
error: z.string().describe("Error message if the research task failed (only present when status is 'failed').").optional(),
|
|
30
|
+
model: z.string().describe("The research model used for this task.").optional(),
|
|
31
|
+
events: z.array(ExaCreateResearch_ResearchEventSchema).describe("List of events tracking the progress of the research task (if available).").optional(),
|
|
32
|
+
output: ExaCreateResearch_ResearchOutputSchema.nullable().optional(),
|
|
33
|
+
status: z.string().describe("Current status of the research task (e.g., 'pending', 'running', 'completed', 'failed')."),
|
|
34
|
+
createdAt: z.number().describe("Unix timestamp (in milliseconds) when the research task was created."),
|
|
35
|
+
researchId: z.string().describe("Unique identifier for the research task. Use this ID to poll for completion status and retrieve results."),
|
|
36
|
+
costDollars: ExaCreateResearch_CostDollarsSchema.nullable().optional(),
|
|
37
|
+
instructions: z.string().describe("The instructions provided for this research task."),
|
|
38
|
+
outputSchema: z.record(z.string(), z.unknown()).describe("The output schema that was provided in the request (echoed back).").optional()
|
|
39
|
+
}).describe("Response schema for a newly created research task.")
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { exaCreateResearch };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=create-research.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-research.mjs","names":[],"sources":["../../src/actions/create-research.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaCreateResearchInput: z.ZodTypeAny = z.object({\n model: z.enum([\"exa-research\", \"exa-research-pro\"]).default(\"exa-research\").describe(\"Research models available for Exa research tasks.\").optional(),\n instructions: z.string().describe(\"Instructions for what research should be conducted. This is the natural language prompt describing the research question or topic to explore.\"),\n outputSchema: z.record(z.string(), z.unknown()).describe(\"Optional JSON schema to structure the research output. If provided, the API will return structured JSON matching this schema. If omitted, the API returns a detailed markdown report.\").optional(),\n}).describe(\"Parameters for creating an asynchronous research task.\");\nconst ExaCreateResearch_ResearchEventSchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of event\").optional(),\n message: z.string().describe(\"Event message or description\").optional(),\n timestamp: z.number().describe(\"Unix timestamp when the event occurred\").optional(),\n}).passthrough().describe(\"Event tracking progress of a research task.\");\nconst ExaCreateResearch_ResearchOutputSchema: z.ZodTypeAny = z.object({\n content: z.string().describe(\"Main research content or findings\").optional(),\n citations: z.array(z.record(z.string(), z.unknown())).describe(\"List of source citations\").optional(),\n}).passthrough().describe(\"Research output containing findings and citations.\");\nconst ExaCreateResearch_CostDollarsSchema: z.ZodTypeAny = z.object({\n total: z.number().describe(\"Total cost in USD\").optional(),\n search: z.number().describe(\"Search cost in USD\").optional(),\n content: z.number().describe(\"Content retrieval cost in USD\").optional(),\n}).passthrough().describe(\"Cost information for the research task.\");\nexport const ExaCreateResearchOutput: z.ZodTypeAny = z.object({\n error: z.string().describe(\"Error message if the research task failed (only present when status is 'failed').\").optional(),\n model: z.string().describe(\"The research model used for this task.\").optional(),\n events: z.array(ExaCreateResearch_ResearchEventSchema).describe(\"List of events tracking the progress of the research task (if available).\").optional(),\n output: ExaCreateResearch_ResearchOutputSchema.nullable().optional(),\n status: z.string().describe(\"Current status of the research task (e.g., 'pending', 'running', 'completed', 'failed').\"),\n createdAt: z.number().describe(\"Unix timestamp (in milliseconds) when the research task was created.\"),\n researchId: z.string().describe(\"Unique identifier for the research task. Use this ID to poll for completion status and retrieve results.\"),\n costDollars: ExaCreateResearch_CostDollarsSchema.nullable().optional(),\n instructions: z.string().describe(\"The instructions provided for this research task.\"),\n outputSchema: z.record(z.string(), z.unknown()).describe(\"The output schema that was provided in the request (echoed back).\").optional(),\n}).describe(\"Response schema for a newly created research task.\");\n\nexport const exaCreateResearch = action(\"EXA_CREATE_RESEARCH\", {\n slug: \"exa-create-research\",\n name: \"Create Research Task\",\n description: \"Creates an asynchronous research task that explores the web, gathers sources, synthesizes findings, and returns results with citations. The API responds immediately with a researchId for polling completion status. Use this when you need to generate: 1. Structured JSON matching an outputSchema you provide 2. A detailed markdown report when no schema is provided After creation, poll the research task status using the researchId to retrieve the final results when completed.\",\n input: ExaCreateResearchInput,\n output: ExaCreateResearchOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuC,EAAE,OAAO;CAC3D,OAAO,EAAE,KAAK,CAAC,gBAAgB,kBAAkB,CAAC,EAAE,QAAQ,cAAc,EAAE,SAAS,mDAAmD,EAAE,SAAS;CACnJ,cAAc,EAAE,OAAO,EAAE,SAAS,+IAA+I;CACjL,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAAE,SAAS,uLAAuL,EAAE,SAAS;AAC7P,CAAC,EAAE,SAAS,wDAAwD;AACpE,MAAM,wCAAsD,EAAE,OAAO;CACnE,MAAM,EAAE,OAAO,EAAE,SAAS,eAAe,EAAE,SAAS;CACpD,SAAS,EAAE,OAAO,EAAE,SAAS,8BAA8B,EAAE,SAAS;CACtE,WAAW,EAAE,OAAO,EAAE,SAAS,wCAAwC,EAAE,SAAS;AACpF,CAAC,EAAE,YAAY,EAAE,SAAS,6CAA6C;AACvE,MAAM,yCAAuD,EAAE,OAAO;CACpE,SAAS,EAAE,OAAO,EAAE,SAAS,mCAAmC,EAAE,SAAS;CAC3E,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,EAAE,SAAS,0BAA0B,EAAE,SAAS;AACtG,CAAC,EAAE,YAAY,EAAE,SAAS,oDAAoD;AAC9E,MAAM,sCAAoD,EAAE,OAAO;CACjE,OAAO,EAAE,OAAO,EAAE,SAAS,mBAAmB,EAAE,SAAS;CACzD,QAAQ,EAAE,OAAO,EAAE,SAAS,oBAAoB,EAAE,SAAS;CAC3D,SAAS,EAAE,OAAO,EAAE,SAAS,+BAA+B,EAAE,SAAS;AACzE,CAAC,EAAE,YAAY,EAAE,SAAS,yCAAyC;AAcnE,MAAa,oBAAoB,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAlBmD,EAAE,OAAO;EAC5D,OAAO,EAAE,OAAO,EAAE,SAAS,mFAAmF,EAAE,SAAS;EACzH,OAAO,EAAE,OAAO,EAAE,SAAS,wCAAwC,EAAE,SAAS;EAC9E,QAAQ,EAAE,MAAM,qCAAqC,EAAE,SAAS,2EAA2E,EAAE,SAAS;EACtJ,QAAQ,uCAAuC,SAAS,EAAE,SAAS;EACnE,QAAQ,EAAE,OAAO,EAAE,SAAS,0FAA0F;EACtH,WAAW,EAAE,OAAO,EAAE,SAAS,sEAAsE;EACrG,YAAY,EAAE,OAAO,EAAE,SAAS,0GAA0G;EAC1I,aAAa,oCAAoC,SAAS,EAAE,SAAS;EACrE,cAAc,EAAE,OAAO,EAAE,SAAS,mDAAmD;EACrF,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAAE,SAAS,mEAAmE,EAAE,SAAS;CACzI,CAAC,EAAE,SAAS,oDAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-webset.ts
|
|
4
|
+
const ExaCreateWebsetInput = zod.z.object({
|
|
5
|
+
"import": zod.z.array(zod.z.object({
|
|
6
|
+
id: zod.z.string().describe("Identifier of the import or webset to include."),
|
|
7
|
+
source: zod.z.enum(["import", "webset"]).describe("The type of source to import ('import' or 'webset').")
|
|
8
|
+
}).describe("Import existing data into the Webset.")).describe("Import data from existing Websets or Imports.").optional(),
|
|
9
|
+
search: zod.z.object({
|
|
10
|
+
count: zod.z.number().int().default(10).describe("Number of items the Webset will attempt to find.").optional(),
|
|
11
|
+
query: zod.z.string().describe("Natural language search query describing what you are looking for."),
|
|
12
|
+
scope: zod.z.array(zod.z.object({
|
|
13
|
+
id: zod.z.string().describe("Identifier of the source to include or exclude."),
|
|
14
|
+
source: zod.z.enum(["import", "webset"]).describe("The type of source ('import' or 'webset').")
|
|
15
|
+
}).describe("Source to include or exclude in search.")).describe("Limit the search to specific sources.").optional(),
|
|
16
|
+
entity: zod.z.object({ type: zod.z.enum([
|
|
17
|
+
"company",
|
|
18
|
+
"person",
|
|
19
|
+
"article",
|
|
20
|
+
"research_paper",
|
|
21
|
+
"custom"
|
|
22
|
+
]).default("company").describe("Allowed entity types for the search or import.").optional() }).describe("Entity type for searches and imports.").optional(),
|
|
23
|
+
recall: zod.z.boolean().describe("Whether to estimate total relevant results available for this search.").optional(),
|
|
24
|
+
exclude: zod.z.array(zod.z.object({
|
|
25
|
+
id: zod.z.string().describe("Identifier of the source to include or exclude."),
|
|
26
|
+
source: zod.z.enum(["import", "webset"]).describe("The type of source ('import' or 'webset').")
|
|
27
|
+
}).describe("Source to include or exclude in search.")).describe("Sources to exclude from search results.").optional(),
|
|
28
|
+
criteria: zod.z.array(zod.z.object({
|
|
29
|
+
description: zod.z.string().describe("Description of the evaluation criterion."),
|
|
30
|
+
successRate: zod.z.number().int().describe("Success rate percentage for this criterion.").optional()
|
|
31
|
+
}).describe("Criterion to evaluate search results against.")).describe("Custom criteria to evaluate items against.").optional()
|
|
32
|
+
}).describe("Initial search configuration for the Webset."),
|
|
33
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Arbitrary key-value pairs to associate with this Webset.").optional(),
|
|
34
|
+
externalId: zod.z.string().describe("External identifier to reference the Webset in your system.").optional(),
|
|
35
|
+
enrichments: zod.z.array(zod.z.object({
|
|
36
|
+
title: zod.z.string().describe("Title of the enrichment task."),
|
|
37
|
+
format: zod.z.string().describe("Format of the enrichment output, e.g., 'text'.").optional(),
|
|
38
|
+
options: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Additional options for enrichment.").optional(),
|
|
39
|
+
description: zod.z.string().describe("Description of what to enrich for.").optional(),
|
|
40
|
+
instructions: zod.z.string().describe("Instructions for the enrichment process.").optional()
|
|
41
|
+
}).describe("Parameters to create an enrichment.")).describe("Enrichments to apply to Webset items.").optional()
|
|
42
|
+
}).describe("Parameters to create a new Webset with initial search, imports, and enrichments.");
|
|
43
|
+
const ExaCreateWebset_EntitySchema = zod.z.object({ type: zod.z.enum([
|
|
44
|
+
"company",
|
|
45
|
+
"person",
|
|
46
|
+
"article",
|
|
47
|
+
"research_paper",
|
|
48
|
+
"custom"
|
|
49
|
+
]).default("company").describe("Allowed entity types for the search or import.").optional() }).describe("Entity type for searches and imports.");
|
|
50
|
+
const ExaCreateWebset_ImportItemSchema = zod.z.object({
|
|
51
|
+
id: zod.z.string().describe("Unique identifier for the import."),
|
|
52
|
+
count: zod.z.number().int().describe("Number of items in the import.").optional(),
|
|
53
|
+
title: zod.z.string().describe("Title of the import.").optional(),
|
|
54
|
+
entity: ExaCreateWebset_EntitySchema.nullable(),
|
|
55
|
+
format: zod.z.string().describe("Format of the import."),
|
|
56
|
+
object: zod.z.string().describe("Object type, always 'import'."),
|
|
57
|
+
status: zod.z.string().describe("Status of the import."),
|
|
58
|
+
failedAt: zod.z.string().describe("Failure timestamp.").optional(),
|
|
59
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Metadata for the import."),
|
|
60
|
+
createdAt: zod.z.string().describe("Creation timestamp of the import."),
|
|
61
|
+
updatedAt: zod.z.string().describe("Last update timestamp of the import."),
|
|
62
|
+
failedReason: zod.z.string().describe("Reason for import failure.").optional(),
|
|
63
|
+
failedMessage: zod.z.string().describe("Failure message.").optional()
|
|
64
|
+
}).describe("Represents an import performed on the Webset.");
|
|
65
|
+
const ExaCreateWebset_CadenceSchema = zod.z.object({
|
|
66
|
+
cron: zod.z.string().describe("Cron expression for scheduling."),
|
|
67
|
+
timezone: zod.z.string().describe("Timezone for the schedule, e.g. 'Etc/UTC'.")
|
|
68
|
+
}).describe("Schedule cadence for a monitor.");
|
|
69
|
+
const ExaCreateWebset_MonitorRunSchema = zod.z.object({
|
|
70
|
+
id: zod.z.string().describe("Run identifier."),
|
|
71
|
+
type: zod.z.string().describe("Type of run."),
|
|
72
|
+
object: zod.z.string().describe("Object type."),
|
|
73
|
+
status: zod.z.string().describe("Status of the run."),
|
|
74
|
+
failedAt: zod.z.string().describe("Failure timestamp.").optional(),
|
|
75
|
+
createdAt: zod.z.string().describe("Creation timestamp."),
|
|
76
|
+
monitorId: zod.z.string().describe("Identifier of the monitor."),
|
|
77
|
+
updatedAt: zod.z.string().describe("Last update timestamp."),
|
|
78
|
+
canceledAt: zod.z.string().describe("Cancelation timestamp.").optional(),
|
|
79
|
+
completedAt: zod.z.string().describe("Completion timestamp.").optional(),
|
|
80
|
+
failedReason: zod.z.string().describe("Reason for failure.").optional()
|
|
81
|
+
}).describe("Represents the last run of a monitor.");
|
|
82
|
+
const ExaCreateWebset_CriterionSchema = zod.z.object({
|
|
83
|
+
description: zod.z.string().describe("Description of the evaluation criterion."),
|
|
84
|
+
successRate: zod.z.number().int().describe("Success rate percentage for this criterion.").optional()
|
|
85
|
+
}).describe("Criterion to evaluate search results against.");
|
|
86
|
+
const ExaCreateWebset_BehaviorConfigSchema = zod.z.object({
|
|
87
|
+
count: zod.z.number().int().describe("Number of items to find each run."),
|
|
88
|
+
query: zod.z.string().describe("Search query for monitor runs."),
|
|
89
|
+
entity: ExaCreateWebset_EntitySchema.nullable(),
|
|
90
|
+
behavior: zod.z.string().describe("Behavior mode for monitor, e.g. 'append'."),
|
|
91
|
+
criteria: zod.z.array(ExaCreateWebset_CriterionSchema).describe("Criteria to evaluate monitor results.")
|
|
92
|
+
}).describe("Configuration for monitor behavior.");
|
|
93
|
+
const ExaCreateWebset_MonitorBehaviorSchema = zod.z.object({
|
|
94
|
+
type: zod.z.string().describe("Type of monitor behavior."),
|
|
95
|
+
config: ExaCreateWebset_BehaviorConfigSchema.nullable()
|
|
96
|
+
}).describe("Defines monitor behavior and config.");
|
|
97
|
+
const ExaCreateWebset_MonitorItemSchema = zod.z.object({
|
|
98
|
+
id: zod.z.string().describe("Unique identifier for the monitor."),
|
|
99
|
+
object: zod.z.string().describe("Object type."),
|
|
100
|
+
status: zod.z.string().describe("Status of the monitor."),
|
|
101
|
+
cadence: ExaCreateWebset_CadenceSchema.nullable(),
|
|
102
|
+
lastRun: ExaCreateWebset_MonitorRunSchema.nullable(),
|
|
103
|
+
behavior: ExaCreateWebset_MonitorBehaviorSchema.nullable(),
|
|
104
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Metadata for the monitor."),
|
|
105
|
+
websetId: zod.z.string().describe("Identifier of the parent webset."),
|
|
106
|
+
createdAt: zod.z.string().describe("Creation timestamp of the monitor."),
|
|
107
|
+
nextRunAt: zod.z.string().describe("Next scheduled run timestamp.").optional(),
|
|
108
|
+
updatedAt: zod.z.string().describe("Last update timestamp of the monitor.")
|
|
109
|
+
}).describe("Represents a monitor configured on the Webset.");
|
|
110
|
+
const ExaCreateWebset_SourceItemSchema = zod.z.object({
|
|
111
|
+
id: zod.z.string().describe("Identifier of the source to include or exclude."),
|
|
112
|
+
source: zod.z.enum(["import", "webset"]).describe("The type of source ('import' or 'webset').")
|
|
113
|
+
}).describe("Source to include or exclude in search.");
|
|
114
|
+
const ExaCreateWebset_BoundsSchema = zod.z.object({
|
|
115
|
+
max: zod.z.number().int().describe("Maximum estimated count."),
|
|
116
|
+
min: zod.z.number().int().describe("Minimum estimated count.")
|
|
117
|
+
});
|
|
118
|
+
const ExaCreateWebset_ExpectedSchema = zod.z.object({
|
|
119
|
+
total: zod.z.number().int().describe("Estimated total relevant results."),
|
|
120
|
+
bounds: ExaCreateWebset_BoundsSchema.nullable(),
|
|
121
|
+
confidence: zod.z.enum([
|
|
122
|
+
"low",
|
|
123
|
+
"medium",
|
|
124
|
+
"high"
|
|
125
|
+
]).describe("Confidence level of the estimate.")
|
|
126
|
+
});
|
|
127
|
+
const ExaCreateWebset_RecallSchema = zod.z.object({
|
|
128
|
+
expected: ExaCreateWebset_ExpectedSchema.nullable(),
|
|
129
|
+
reasoning: zod.z.string().describe("Reasoning behind the recall estimate.").optional()
|
|
130
|
+
});
|
|
131
|
+
const ExaCreateWebset_ProgressSchema = zod.z.object({
|
|
132
|
+
found: zod.z.number().int().describe("Number of items found so far."),
|
|
133
|
+
analyzed: zod.z.number().int().describe("Number of items analyzed so far."),
|
|
134
|
+
timeLeft: zod.z.number().int().describe("Estimated time left in seconds."),
|
|
135
|
+
completion: zod.z.number().int().describe("Percent completion of the search.")
|
|
136
|
+
});
|
|
137
|
+
const ExaCreateWebset_WebsetSearchItemSchema = zod.z.object({
|
|
138
|
+
id: zod.z.string().describe("Unique identifier for the search."),
|
|
139
|
+
count: zod.z.number().int().describe("Number of items requested to find."),
|
|
140
|
+
query: zod.z.string().describe("Search query used."),
|
|
141
|
+
scope: zod.z.array(ExaCreateWebset_SourceItemSchema).describe("Sources specifically scoped for this search."),
|
|
142
|
+
entity: ExaCreateWebset_EntitySchema.nullable(),
|
|
143
|
+
object: zod.z.string().describe("Object type, always 'webset_search'."),
|
|
144
|
+
recall: ExaCreateWebset_RecallSchema.nullable(),
|
|
145
|
+
status: zod.z.string().describe("Status of the search."),
|
|
146
|
+
exclude: zod.z.array(ExaCreateWebset_SourceItemSchema).describe("Sources excluded from this search."),
|
|
147
|
+
behavior: zod.z.string().describe("Behavior used for this search, e.g. 'override'."),
|
|
148
|
+
criteria: zod.z.array(ExaCreateWebset_CriterionSchema).describe("Evaluation criteria used."),
|
|
149
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Metadata for the search."),
|
|
150
|
+
progress: ExaCreateWebset_ProgressSchema.nullable(),
|
|
151
|
+
createdAt: zod.z.string().describe("Creation timestamp of the search."),
|
|
152
|
+
updatedAt: zod.z.string().describe("Last update timestamp of the search."),
|
|
153
|
+
canceledAt: zod.z.string().describe("Timestamp when search was canceled.").optional(),
|
|
154
|
+
canceledReason: zod.z.string().describe("Reason search was canceled.").optional()
|
|
155
|
+
}).describe("Represents a search performed within the Webset.");
|
|
156
|
+
const ExaCreateWebset_EnrichmentOptionSchema = zod.z.object({ label: zod.z.string().describe("Label of the enrichment option.") }).describe("Option for enrichment output.");
|
|
157
|
+
const ExaCreateWebset_EnrichmentItemSchema = zod.z.object({
|
|
158
|
+
id: zod.z.string().describe("Unique identifier for the enrichment."),
|
|
159
|
+
title: zod.z.string().describe("Title of the enrichment."),
|
|
160
|
+
format: zod.z.string().describe("Format of enrichment output."),
|
|
161
|
+
object: zod.z.string().describe("Object type."),
|
|
162
|
+
status: zod.z.string().describe("Status of the enrichment."),
|
|
163
|
+
options: zod.z.array(ExaCreateWebset_EnrichmentOptionSchema).describe("Available options for the enrichment."),
|
|
164
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Metadata for the enrichment."),
|
|
165
|
+
websetId: zod.z.string().describe("Identifier of the parent webset."),
|
|
166
|
+
createdAt: zod.z.string().describe("Creation timestamp of the enrichment."),
|
|
167
|
+
updatedAt: zod.z.string().describe("Last update timestamp of the enrichment."),
|
|
168
|
+
description: zod.z.string().describe("Description of the enrichment.").optional(),
|
|
169
|
+
instructions: zod.z.string().describe("Instructions for the enrichment.").optional()
|
|
170
|
+
}).describe("Represents an enrichment task within the Webset.");
|
|
171
|
+
const ExaCreateWebsetOutput = zod.z.object({
|
|
172
|
+
id: zod.z.string().describe("Unique identifier for the webset."),
|
|
173
|
+
title: zod.z.string().describe("Title of the webset, if set.").optional(),
|
|
174
|
+
object: zod.z.string().describe("Object type."),
|
|
175
|
+
status: zod.z.enum([
|
|
176
|
+
"idle",
|
|
177
|
+
"pending",
|
|
178
|
+
"running",
|
|
179
|
+
"paused"
|
|
180
|
+
]).describe("Status of the webset."),
|
|
181
|
+
imports: zod.z.array(ExaCreateWebset_ImportItemSchema).describe("Imports performed on the webset."),
|
|
182
|
+
streams: zod.z.array(zod.z.unknown()).describe("Streams associated with the webset."),
|
|
183
|
+
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Metadata for the webset."),
|
|
184
|
+
monitors: zod.z.array(ExaCreateWebset_MonitorItemSchema).describe("Monitors configured on the webset."),
|
|
185
|
+
searches: zod.z.array(ExaCreateWebset_WebsetSearchItemSchema).describe("Searches performed on the webset."),
|
|
186
|
+
createdAt: zod.z.string().describe("Creation timestamp of the webset."),
|
|
187
|
+
updatedAt: zod.z.string().describe("Last update timestamp of the webset."),
|
|
188
|
+
externalId: zod.z.string().describe("External identifier, if set.").optional(),
|
|
189
|
+
enrichments: zod.z.array(ExaCreateWebset_EnrichmentItemSchema).describe("Enrichments in the webset.")
|
|
190
|
+
}).describe("Response schema for the created Webset.");
|
|
191
|
+
const exaCreateWebset = require_action.action("EXA_CREATE_WEBSET", {
|
|
192
|
+
slug: "exa-create-webset",
|
|
193
|
+
name: "Create Webset",
|
|
194
|
+
description: "Tool to create a new Webset with search, import, and enrichment setup. Use when you need to configure and seed a Webset in one call.",
|
|
195
|
+
input: ExaCreateWebsetInput,
|
|
196
|
+
output: ExaCreateWebsetOutput
|
|
197
|
+
});
|
|
198
|
+
//#endregion
|
|
199
|
+
exports.exaCreateWebset = exaCreateWebset;
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=create-webset.cjs.map
|