@keystrokehq/exa 0.1.3 → 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.
Files changed (197) hide show
  1. package/README.md +7 -108
  2. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  3. package/dist/action.cjs +21 -0
  4. package/dist/action.cjs.map +1 -0
  5. package/dist/action.mjs +21 -0
  6. package/dist/action.mjs.map +1 -0
  7. package/dist/actions/answer.cjs +81 -0
  8. package/dist/actions/answer.cjs.map +1 -0
  9. package/dist/actions/answer.d.cts +9 -0
  10. package/dist/actions/answer.d.cts.map +1 -0
  11. package/dist/actions/answer.d.mts +9 -0
  12. package/dist/actions/answer.d.mts.map +1 -0
  13. package/dist/actions/answer.mjs +80 -0
  14. package/dist/actions/answer.mjs.map +1 -0
  15. package/dist/actions/create-import.cjs +41 -0
  16. package/dist/actions/create-import.cjs.map +1 -0
  17. package/dist/actions/create-import.d.cts +9 -0
  18. package/dist/actions/create-import.d.cts.map +1 -0
  19. package/dist/actions/create-import.d.mts +9 -0
  20. package/dist/actions/create-import.d.mts.map +1 -0
  21. package/dist/actions/create-import.mjs +40 -0
  22. package/dist/actions/create-import.mjs.map +1 -0
  23. package/dist/actions/create-monitor.cjs +81 -0
  24. package/dist/actions/create-monitor.cjs.map +1 -0
  25. package/dist/actions/create-monitor.d.cts +9 -0
  26. package/dist/actions/create-monitor.d.cts.map +1 -0
  27. package/dist/actions/create-monitor.d.mts +9 -0
  28. package/dist/actions/create-monitor.d.mts.map +1 -0
  29. package/dist/actions/create-monitor.mjs +80 -0
  30. package/dist/actions/create-monitor.mjs.map +1 -0
  31. package/dist/actions/create-research.cjs +45 -0
  32. package/dist/actions/create-research.cjs.map +1 -0
  33. package/dist/actions/create-research.d.cts +9 -0
  34. package/dist/actions/create-research.d.cts.map +1 -0
  35. package/dist/actions/create-research.d.mts +9 -0
  36. package/dist/actions/create-research.d.mts.map +1 -0
  37. package/dist/actions/create-research.mjs +44 -0
  38. package/dist/actions/create-research.mjs.map +1 -0
  39. package/dist/actions/create-webset.cjs +201 -0
  40. package/dist/actions/create-webset.cjs.map +1 -0
  41. package/dist/actions/create-webset.d.cts +9 -0
  42. package/dist/actions/create-webset.d.cts.map +1 -0
  43. package/dist/actions/create-webset.d.mts +9 -0
  44. package/dist/actions/create-webset.d.mts.map +1 -0
  45. package/dist/actions/create-webset.mjs +200 -0
  46. package/dist/actions/create-webset.mjs.map +1 -0
  47. package/dist/actions/delete-import.cjs +31 -0
  48. package/dist/actions/delete-import.cjs.map +1 -0
  49. package/dist/actions/delete-import.d.cts +9 -0
  50. package/dist/actions/delete-import.d.cts.map +1 -0
  51. package/dist/actions/delete-import.d.mts +9 -0
  52. package/dist/actions/delete-import.d.mts.map +1 -0
  53. package/dist/actions/delete-import.mjs +30 -0
  54. package/dist/actions/delete-import.mjs.map +1 -0
  55. package/dist/actions/delete-webset.cjs +153 -0
  56. package/dist/actions/delete-webset.cjs.map +1 -0
  57. package/dist/actions/delete-webset.d.cts +9 -0
  58. package/dist/actions/delete-webset.d.cts.map +1 -0
  59. package/dist/actions/delete-webset.d.mts +9 -0
  60. package/dist/actions/delete-webset.d.mts.map +1 -0
  61. package/dist/actions/delete-webset.mjs +152 -0
  62. package/dist/actions/delete-webset.mjs.map +1 -0
  63. package/dist/actions/get-api-key.cjs +21 -0
  64. package/dist/actions/get-api-key.cjs.map +1 -0
  65. package/dist/actions/get-api-key.d.cts +9 -0
  66. package/dist/actions/get-api-key.d.cts.map +1 -0
  67. package/dist/actions/get-api-key.d.mts +9 -0
  68. package/dist/actions/get-api-key.d.mts.map +1 -0
  69. package/dist/actions/get-api-key.mjs +18 -0
  70. package/dist/actions/get-api-key.mjs.map +1 -0
  71. package/dist/actions/get-contents-action.cjs +75 -0
  72. package/dist/actions/get-contents-action.cjs.map +1 -0
  73. package/dist/actions/get-contents-action.d.cts +9 -0
  74. package/dist/actions/get-contents-action.d.cts.map +1 -0
  75. package/dist/actions/get-contents-action.d.mts +9 -0
  76. package/dist/actions/get-contents-action.d.mts.map +1 -0
  77. package/dist/actions/get-contents-action.mjs +74 -0
  78. package/dist/actions/get-contents-action.mjs.map +1 -0
  79. package/dist/actions/get-event.cjs +140 -0
  80. package/dist/actions/get-event.cjs.map +1 -0
  81. package/dist/actions/get-event.d.cts +9 -0
  82. package/dist/actions/get-event.d.cts.map +1 -0
  83. package/dist/actions/get-event.d.mts +9 -0
  84. package/dist/actions/get-event.d.mts.map +1 -0
  85. package/dist/actions/get-event.mjs +139 -0
  86. package/dist/actions/get-event.mjs.map +1 -0
  87. package/dist/actions/get-research.cjs +47 -0
  88. package/dist/actions/get-research.cjs.map +1 -0
  89. package/dist/actions/get-research.d.cts +9 -0
  90. package/dist/actions/get-research.d.cts.map +1 -0
  91. package/dist/actions/get-research.d.mts +9 -0
  92. package/dist/actions/get-research.d.mts.map +1 -0
  93. package/dist/actions/get-research.mjs +46 -0
  94. package/dist/actions/get-research.mjs.map +1 -0
  95. package/dist/actions/index.cjs +34 -16
  96. package/dist/actions/index.d.cts +18 -2
  97. package/dist/actions/index.d.mts +18 -2
  98. package/dist/actions/index.mjs +18 -2
  99. package/dist/actions/list-events.cjs +32 -0
  100. package/dist/actions/list-events.cjs.map +1 -0
  101. package/dist/actions/list-events.d.cts +9 -0
  102. package/dist/actions/list-events.d.cts.map +1 -0
  103. package/dist/actions/list-events.d.mts +9 -0
  104. package/dist/actions/list-events.d.mts.map +1 -0
  105. package/dist/actions/list-events.mjs +31 -0
  106. package/dist/actions/list-events.mjs.map +1 -0
  107. package/dist/actions/list-imports.cjs +54 -0
  108. package/dist/actions/list-imports.cjs.map +1 -0
  109. package/dist/actions/list-imports.d.cts +9 -0
  110. package/dist/actions/list-imports.d.cts.map +1 -0
  111. package/dist/actions/list-imports.d.mts +9 -0
  112. package/dist/actions/list-imports.d.mts.map +1 -0
  113. package/dist/actions/list-imports.mjs +53 -0
  114. package/dist/actions/list-imports.mjs.map +1 -0
  115. package/dist/actions/list-research.cjs +49 -0
  116. package/dist/actions/list-research.cjs.map +1 -0
  117. package/dist/actions/list-research.d.cts +9 -0
  118. package/dist/actions/list-research.d.cts.map +1 -0
  119. package/dist/actions/list-research.d.mts +9 -0
  120. package/dist/actions/list-research.d.mts.map +1 -0
  121. package/dist/actions/list-research.mjs +48 -0
  122. package/dist/actions/list-research.mjs.map +1 -0
  123. package/dist/actions/list-webhooks.cjs +34 -0
  124. package/dist/actions/list-webhooks.cjs.map +1 -0
  125. package/dist/actions/list-webhooks.d.cts +9 -0
  126. package/dist/actions/list-webhooks.d.cts.map +1 -0
  127. package/dist/actions/list-webhooks.d.mts +9 -0
  128. package/dist/actions/list-webhooks.d.mts.map +1 -0
  129. package/dist/actions/list-webhooks.mjs +33 -0
  130. package/dist/actions/list-webhooks.mjs.map +1 -0
  131. package/dist/actions/search.cjs +145 -0
  132. package/dist/actions/search.cjs.map +1 -0
  133. package/dist/actions/search.d.cts +9 -0
  134. package/dist/actions/search.d.cts.map +1 -0
  135. package/dist/actions/search.d.mts +9 -0
  136. package/dist/actions/search.d.mts.map +1 -0
  137. package/dist/actions/search.mjs +144 -0
  138. package/dist/actions/search.mjs.map +1 -0
  139. package/dist/actions/update-import.cjs +35 -0
  140. package/dist/actions/update-import.cjs.map +1 -0
  141. package/dist/actions/update-import.d.cts +9 -0
  142. package/dist/actions/update-import.d.cts.map +1 -0
  143. package/dist/actions/update-import.d.mts +9 -0
  144. package/dist/actions/update-import.d.mts.map +1 -0
  145. package/dist/actions/update-import.mjs +34 -0
  146. package/dist/actions/update-import.mjs.map +1 -0
  147. package/dist/app.cjs +9 -0
  148. package/dist/app.cjs.map +1 -0
  149. package/dist/app.d.cts +5 -0
  150. package/dist/app.d.cts.map +1 -0
  151. package/dist/app.d.mts +5 -0
  152. package/dist/app.d.mts.map +1 -0
  153. package/dist/app.mjs +10 -0
  154. package/dist/app.mjs.map +1 -0
  155. package/dist/catalog.cjs +15 -0
  156. package/dist/catalog.cjs.map +1 -0
  157. package/dist/catalog.d.cts +14 -0
  158. package/dist/catalog.d.cts.map +1 -0
  159. package/dist/catalog.d.mts +14 -0
  160. package/dist/catalog.d.mts.map +1 -0
  161. package/dist/catalog.mjs +15 -0
  162. package/dist/catalog.mjs.map +1 -0
  163. package/dist/client.cjs +30 -2
  164. package/dist/client.cjs.map +1 -0
  165. package/dist/execute.cjs +18 -0
  166. package/dist/execute.cjs.map +1 -0
  167. package/dist/execute.mjs +18 -0
  168. package/dist/execute.mjs.map +1 -0
  169. package/dist/index.cjs +38 -14
  170. package/dist/index.d.cts +20 -17
  171. package/dist/index.d.mts +20 -17
  172. package/dist/index.mjs +21 -5
  173. package/package.json +13 -13
  174. package/dist/actions-CJq1Nyt_.mjs +0 -349
  175. package/dist/actions-CJq1Nyt_.mjs.map +0 -1
  176. package/dist/actions-LoQVlbiT.cjs +0 -438
  177. package/dist/actions-LoQVlbiT.cjs.map +0 -1
  178. package/dist/app-CBLUruR0.mjs +0 -15
  179. package/dist/app-CBLUruR0.mjs.map +0 -1
  180. package/dist/app-DMujvH6I.cjs +0 -26
  181. package/dist/app-DMujvH6I.cjs.map +0 -1
  182. package/dist/client-DlwHA71b.cjs +0 -56
  183. package/dist/client-DlwHA71b.cjs.map +0 -1
  184. package/dist/index-BwCGHs6v.d.cts +0 -357
  185. package/dist/index-BwCGHs6v.d.cts.map +0 -1
  186. package/dist/index-BwCGHs6v.d.mts +0 -357
  187. package/dist/index-BwCGHs6v.d.mts.map +0 -1
  188. package/dist/index.d.cts.map +0 -1
  189. package/dist/index.d.mts.map +0 -1
  190. package/dist/mcp.cjs +0 -57
  191. package/dist/mcp.cjs.map +0 -1
  192. package/dist/mcp.d.cts +0 -16
  193. package/dist/mcp.d.cts.map +0 -1
  194. package/dist/mcp.d.mts +0 -16
  195. package/dist/mcp.d.mts.map +0 -1
  196. package/dist/mcp.mjs +0 -54
  197. package/dist/mcp.mjs.map +0 -1
package/README.md CHANGED
@@ -1,118 +1,17 @@
1
1
  # @keystrokehq/exa
2
2
 
3
- Exa Search API integration — static API key credential and importable agent actions.
3
+ Keystroke-managed integration.
4
4
 
5
- Reference for building a **custom integration package**: credential → actions → optional MCP → publish as `@your-org/my-api`.
6
-
7
- ## Package layout
8
-
9
- ```
10
- src/
11
- app.ts # defineApp — vault key "exa", api_key auth
12
- actions/ # exa.action() exports
13
- mcp.ts # defineMcp (uses exa.credential)
14
- client.ts # raw HTTP client
15
- index.ts # public exports
16
- ```
17
-
18
- ## App + credential
19
-
20
- ```ts
21
- // src/app.ts
22
- import { defineApp } from "@keystrokehq/keystroke/app";
23
- import { z } from "zod";
24
-
25
- export const exa = defineApp({
26
- slug: "exa",
27
- auth: "api_key",
28
- credential: { apiKey: z.string() },
29
- });
30
- ```
31
-
32
- Actions are minted from the app — no separate credential import:
33
-
34
- ```ts
35
- export const exaSearch = exa.action({
36
- slug: "exa-search",
37
- input: ExaSearchInput,
38
- output: ExaSearchOutput,
39
- async run(input, { exa: { apiKey } }) {
40
- const client = createExaClient(apiKey);
41
- // ...
42
- },
43
- });
44
- ```
45
-
46
- ```bash
47
- keystroke credentials set exa --scope org --set apiKey=...
48
- ```
49
-
50
- ## Setup
51
-
52
- 1. Get an API key from [Exa Dashboard](https://dashboard.exa.ai/api-keys).
53
- 2. Store on vault key `exa` (org/project/user scope per your credential chain).
54
-
55
- ## Actions
56
-
57
- | Key | Description |
58
- | ----------------------- | ---------------------------------------------------------------- |
59
- | `exa-search` | Web search with category, type, filters, highlights/text/summary |
60
- | `exa-search-structured` | Search + `outputSchema` for grounded structured JSON |
61
- | `exa-get-contents` | Extract content from known URLs |
62
- | `exa-answer` | Grounded Q&A with citations |
63
- | `exa-get-context` | Exa Code — docs/snippets for coding agents |
5
+ **App:** `exa`
6
+ **Version:** `20260615_00`
7
+ **Actions:** 17
64
8
 
65
9
  ```ts
66
10
  import { defineAgent } from "@keystrokehq/keystroke/agent";
67
- import { exaSearch, exaAnswer } from "@keystrokehq/exa/actions";
11
+ import { exaAnswer } from "@keystrokehq/exa/actions";
68
12
 
69
13
  export default defineAgent({
70
- key: "researcher",
71
- tools: [exaSearch, exaAnswer],
14
+ key: "exa-agent",
15
+ tools: [exaAnswer],
72
16
  });
73
17
  ```
74
-
75
- ## MCP
76
-
77
- | Export | Server | Docs |
78
- | --------------- | ------------------------------- | -------------------------------------------------------- |
79
- | `exaSearchMcp` | `https://mcp.exa.ai/mcp` | [Web Search MCP](https://exa.ai/docs/reference/exa-mcp) |
80
- | `exaWebsetsMcp` | `https://websetsmcp.exa.ai/mcp` | [Websets MCP](https://exa.ai/docs/reference/websets-mcp) |
81
-
82
- Both use `exaCredential` and resolve the API key at agent runtime.
83
-
84
- ```ts
85
- import { exaSearchMcp, exaWebsetsMcp } from "@keystrokehq/exa/mcp";
86
-
87
- tools: [exaSearchMcp, exaWebsetsMcp],
88
- ```
89
-
90
- ## Client
91
-
92
- ```ts
93
- import { exaCredential } from "@keystrokehq/exa";
94
- import { createExaClient } from "@keystrokehq/exa/client";
95
-
96
- // Direct API key
97
- const client = createExaClient("your-api-key");
98
-
99
- // Platform proxy or custom base URL
100
- const proxied = createExaClient({
101
- baseUrl: "https://platform.example/internal/projects/p1/web-search",
102
- headers: { Authorization: "Bearer worker-token" },
103
- });
104
- ```
105
-
106
- ## Dependencies
107
-
108
- ```json
109
- {
110
- "dependencies": {
111
- "@keystrokehq/keystroke": "^0.0.3",
112
- "@keystrokehq/credentials": "^0.0.3",
113
- "@keystrokehq/mcp": "^0.0.3"
114
- }
115
- }
116
- ```
117
-
118
- Author with `@keystrokehq/keystroke/*`. Use `@keystrokehq/credentials` only when wiring MCP OAuth/auth mappers.
@@ -0,0 +1,23 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ exports.__toESM = __toESM;
@@ -0,0 +1,21 @@
1
+ const require_app = require("./app.cjs");
2
+ const require_execute = require("./execute.cjs");
3
+ require("zod");
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return require_app.exa.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await require_execute.executeExaTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ exports.action = action;
20
+
21
+ //# sourceMappingURL=action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.cjs","names":["exa","executeExaTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { exa } from \"./app\";\nimport { executeExaTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return exa.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeExaTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,IAAI,OAAO;EAChB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,eAAe,MAAM,KAAgC,CAAC;EACtF;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { exa } from "./app.mjs";
2
+ import { executeExaTool } from "./execute.mjs";
3
+ import "zod";
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return exa.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await executeExaTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { action };
20
+
21
+ //# sourceMappingURL=action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { exa } from \"./app\";\nimport { executeExaTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return exa.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeExaTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,IAAI,OAAO;EAChB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,eAAe,MAAM,KAAgC,CAAC;EACtF;CACF,CAAC;AACH"}
@@ -0,0 +1,81 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/answer.ts
4
+ const ExaAnswerInput = zod.z.object({
5
+ text: zod.z.boolean().default(false).describe("Set to `true` to include the full text content of the cited source documents in the `citations` part of the response. Defaults to `false`.").optional(),
6
+ model: zod.z.enum(["exa", "exa-pro"]).default("exa").describe("Specifies the search model to use. 'exa' uses a single, direct query. 'exa-pro' uses two expanded queries for potentially more comprehensive results. Allowed values are 'exa' or 'exa-pro'. Defaults to 'exa'.").optional(),
7
+ query: zod.z.string().describe("The natural language question or search query for which an answer is sought. The query should be specific enough to guide the search effectively. Include concrete entities, dates, locations, or jurisdictions to avoid ambiguous results. For time-sensitive data, include explicit time framing (e.g., 'as of 2024') since results may reflect stale information."),
8
+ stream: zod.z.boolean().default(false).describe("Set to `true` to receive the response as a stream of server-sent events (SSE). This is useful for displaying results incrementally. Defaults to `false`.").optional()
9
+ }).describe("Request model for generating an answer based on a query.");
10
+ const ExaAnswer_AnswerSourceSchema = zod.z.object({
11
+ url: zod.z.string().describe("URL of the source document.").optional(),
12
+ title: zod.z.string().describe("Title of the source, if available from Exa's /answer 'sources' field.").optional(),
13
+ documentId: zod.z.string().describe("ID of the source document if it was an uploaded document.").optional()
14
+ }).describe("Represents a primary source used for generating the answer.");
15
+ const ExaAnswer_CitationSchema = zod.z.object({
16
+ id: zod.z.string().describe("A unique temporary identifier assigned to the cited document within this response.").optional(),
17
+ url: zod.z.string().describe("The direct URL of the original web page or document that serves as a source for the answer.").optional(),
18
+ text: zod.z.string().describe("The full text content of the cited document. This field is populated only if the `text` parameter in the `AnswerRequest` was set to `true`. Use sparingly — `text=true` produces large payloads with higher latency and cost.").optional(),
19
+ image: zod.z.string().describe("A URL for an image associated with the cited document, if available.").optional(),
20
+ score: zod.z.number().describe("Relevance score of the result").optional(),
21
+ title: zod.z.string().describe("The title of the web page or document cited.").optional(),
22
+ author: zod.z.string().describe("The author(s) of the cited content, if this information is available.").optional(),
23
+ favicon: zod.z.string().describe("A URL for the favicon of the website hosting the cited document, if available.").optional(),
24
+ snippet: zod.z.string().describe("A short snippet from the search result").optional(),
25
+ publishedDate: zod.z.string().describe("The publication date of the cited content, formatted as YYYY-MM-DD, if available.").optional()
26
+ }).describe("Model for citation information in the response, detailing a source document.");
27
+ const ExaAnswer_CitedChunkSchema = zod.z.object({
28
+ text: zod.z.string().describe("The excerpt of text cited from a source.").optional(),
29
+ documentId: zod.z.string().describe("ID of the document from which the chunk is cited.").optional(),
30
+ source_url: zod.z.string().describe("URL of the document from which the chunk is cited.").optional()
31
+ }).describe("Represents a specific chunk of text cited from a source document.");
32
+ const ExaAnswer_CostBreakdownDetailSchema = zod.z.object({
33
+ contentText: zod.z.number().describe("Cost of text content retrieval."),
34
+ neuralSearch: zod.z.number().describe("Cost of neural search operations."),
35
+ keywordSearch: zod.z.number().describe("Cost of keyword search operations."),
36
+ contentSummary: zod.z.number().describe("Cost of summary generation."),
37
+ contentHighlight: zod.z.number().describe("Cost of highlight generation.")
38
+ }).describe("Detailed breakdown of costs for search and content operations.");
39
+ const ExaAnswer_CostBreakdownItemSchema = zod.z.object({
40
+ search: zod.z.number().describe("Cost of search operations."),
41
+ contents: zod.z.number().describe("Cost of content operations."),
42
+ breakdown: ExaAnswer_CostBreakdownDetailSchema.nullable()
43
+ }).describe("Item in the cost breakdown, detailing search and content costs.");
44
+ const ExaAnswer_PerPagePricesSchema = zod.z.object({
45
+ contentText: zod.z.number().describe("Standard price per page for text content."),
46
+ contentSummary: zod.z.number().describe("Standard price per page for summaries."),
47
+ contentHighlight: zod.z.number().describe("Standard price per page for highlights.")
48
+ }).describe("Standard price per page for different content operations.");
49
+ const ExaAnswer_PerRequestPricesSchema = zod.z.object({
50
+ neuralSearch_1_25_results: zod.z.number().describe("Standard price for neural search with 1-25 results."),
51
+ keywordSearch_1_100_results: zod.z.number().describe("Standard price for keyword search with 1-100 results."),
52
+ neuralSearch_26_100_results: zod.z.number().describe("Standard price for neural search with 26-100 results."),
53
+ neuralSearch_100_plus_results: zod.z.number().describe("Standard price for neural search with 100+ results."),
54
+ keywordSearch_100_plus_results: zod.z.number().describe("Standard price for keyword search with 100+ results.")
55
+ }).describe("Standard price per request for different operations.");
56
+ const ExaAnswer_CostDollarsSchema = zod.z.object({
57
+ total: zod.z.number().describe("Total dollar cost for the request."),
58
+ breakDown: zod.z.array(ExaAnswer_CostBreakdownItemSchema).describe("Breakdown of costs by operation type.").optional(),
59
+ perPagePrices: ExaAnswer_PerPagePricesSchema.nullable().optional(),
60
+ perRequestPrices: ExaAnswer_PerRequestPricesSchema.nullable().optional()
61
+ }).describe("Model for cost information in the response.");
62
+ const ExaAnswerOutput = zod.z.object({
63
+ answer: zod.z.string().describe("The synthesized, natural language answer to the input query, generated from the information found in the cited sources.").optional(),
64
+ sources: zod.z.array(ExaAnswer_AnswerSourceSchema).describe("List of primary source identifiers (URLs/IDs) used to formulate the answer.").optional(),
65
+ answerId: zod.z.string().describe("A unique identifier for this answer interaction, if provided by Exa.").optional(),
66
+ citations: zod.z.array(ExaAnswer_CitationSchema).describe("A list of `Citation` objects, each detailing a source document that contributed to the generated answer. Provides evidence and links to original content."),
67
+ citedChunks: zod.z.array(ExaAnswer_CitedChunkSchema).describe("Specific text excerpts cited from sources supporting the answer.").optional(),
68
+ costDollars: ExaAnswer_CostDollarsSchema.nullable().optional(),
69
+ followupQuestions: zod.z.array(zod.z.string()).describe("Suggested follow-up questions related to the query.").optional()
70
+ }).describe("Response model containing the generated answer and its citations.");
71
+ const exaAnswer = require_action.action("EXA_ANSWER", {
72
+ slug: "exa-answer",
73
+ name: "Generate an answer",
74
+ description: "Generates a direct, citation-backed answer to a clear natural language question or topic using Exa's search, adept at both specific answers and detailed summaries for open-ended queries. Response contains an `answer` field (summary) and a `citations` field (supporting URLs). Citations may include low-credibility sources; verify authoritative references for factual use.",
75
+ input: ExaAnswerInput,
76
+ output: ExaAnswerOutput
77
+ });
78
+ //#endregion
79
+ exports.exaAnswer = exaAnswer;
80
+
81
+ //# sourceMappingURL=answer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.cjs","names":["z","action"],"sources":["../../src/actions/answer.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaAnswerInput: z.ZodTypeAny = z.object({\n text: z.boolean().default(false).describe(\"Set to `true` to include the full text content of the cited source documents in the `citations` part of the response. Defaults to `false`.\").optional(),\n model: z.enum([\"exa\", \"exa-pro\"]).default(\"exa\").describe(\"Specifies the search model to use. 'exa' uses a single, direct query. 'exa-pro' uses two expanded queries for potentially more comprehensive results. Allowed values are 'exa' or 'exa-pro'. Defaults to 'exa'.\").optional(),\n query: z.string().describe(\"The natural language question or search query for which an answer is sought. The query should be specific enough to guide the search effectively. Include concrete entities, dates, locations, or jurisdictions to avoid ambiguous results. For time-sensitive data, include explicit time framing (e.g., 'as of 2024') since results may reflect stale information.\"),\n stream: z.boolean().default(false).describe(\"Set to `true` to receive the response as a stream of server-sent events (SSE). This is useful for displaying results incrementally. Defaults to `false`.\").optional(),\n}).describe(\"Request model for generating an answer based on a query.\");\nconst ExaAnswer_AnswerSourceSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the source document.\").optional(),\n title: z.string().describe(\"Title of the source, if available from Exa's /answer 'sources' field.\").optional(),\n documentId: z.string().describe(\"ID of the source document if it was an uploaded document.\").optional(),\n}).describe(\"Represents a primary source used for generating the answer.\");\nconst ExaAnswer_CitationSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"A unique temporary identifier assigned to the cited document within this response.\").optional(),\n url: z.string().describe(\"The direct URL of the original web page or document that serves as a source for the answer.\").optional(),\n text: z.string().describe(\"The full text content of the cited document. This field is populated only if the `text` parameter in the `AnswerRequest` was set to `true`. Use sparingly — `text=true` produces large payloads with higher latency and cost.\").optional(),\n image: z.string().describe(\"A URL for an image associated with the cited document, if available.\").optional(),\n score: z.number().describe(\"Relevance score of the result\").optional(),\n title: z.string().describe(\"The title of the web page or document cited.\").optional(),\n author: z.string().describe(\"The author(s) of the cited content, if this information is available.\").optional(),\n favicon: z.string().describe(\"A URL for the favicon of the website hosting the cited document, if available.\").optional(),\n snippet: z.string().describe(\"A short snippet from the search result\").optional(),\n publishedDate: z.string().describe(\"The publication date of the cited content, formatted as YYYY-MM-DD, if available.\").optional(),\n}).describe(\"Model for citation information in the response, detailing a source document.\");\nconst ExaAnswer_CitedChunkSchema: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The excerpt of text cited from a source.\").optional(),\n documentId: z.string().describe(\"ID of the document from which the chunk is cited.\").optional(),\n source_url: z.string().describe(\"URL of the document from which the chunk is cited.\").optional(),\n}).describe(\"Represents a specific chunk of text cited from a source document.\");\nconst ExaAnswer_CostBreakdownDetailSchema: z.ZodTypeAny = z.object({\n contentText: z.number().describe(\"Cost of text content retrieval.\"),\n neuralSearch: z.number().describe(\"Cost of neural search operations.\"),\n keywordSearch: z.number().describe(\"Cost of keyword search operations.\"),\n contentSummary: z.number().describe(\"Cost of summary generation.\"),\n contentHighlight: z.number().describe(\"Cost of highlight generation.\"),\n}).describe(\"Detailed breakdown of costs for search and content operations.\");\nconst ExaAnswer_CostBreakdownItemSchema: z.ZodTypeAny = z.object({\n search: z.number().describe(\"Cost of search operations.\"),\n contents: z.number().describe(\"Cost of content operations.\"),\n breakdown: ExaAnswer_CostBreakdownDetailSchema.nullable(),\n}).describe(\"Item in the cost breakdown, detailing search and content costs.\");\nconst ExaAnswer_PerPagePricesSchema: z.ZodTypeAny = z.object({\n contentText: z.number().describe(\"Standard price per page for text content.\"),\n contentSummary: z.number().describe(\"Standard price per page for summaries.\"),\n contentHighlight: z.number().describe(\"Standard price per page for highlights.\"),\n}).describe(\"Standard price per page for different content operations.\");\nconst ExaAnswer_PerRequestPricesSchema: z.ZodTypeAny = z.object({\n neuralSearch_1_25_results: z.number().describe(\"Standard price for neural search with 1-25 results.\"),\n keywordSearch_1_100_results: z.number().describe(\"Standard price for keyword search with 1-100 results.\"),\n neuralSearch_26_100_results: z.number().describe(\"Standard price for neural search with 26-100 results.\"),\n neuralSearch_100_plus_results: z.number().describe(\"Standard price for neural search with 100+ results.\"),\n keywordSearch_100_plus_results: z.number().describe(\"Standard price for keyword search with 100+ results.\"),\n}).describe(\"Standard price per request for different operations.\");\nconst ExaAnswer_CostDollarsSchema: z.ZodTypeAny = z.object({\n total: z.number().describe(\"Total dollar cost for the request.\"),\n breakDown: z.array(ExaAnswer_CostBreakdownItemSchema).describe(\"Breakdown of costs by operation type.\").optional(),\n perPagePrices: ExaAnswer_PerPagePricesSchema.nullable().optional(),\n perRequestPrices: ExaAnswer_PerRequestPricesSchema.nullable().optional(),\n}).describe(\"Model for cost information in the response.\");\nexport const ExaAnswerOutput: z.ZodTypeAny = z.object({\n answer: z.string().describe(\"The synthesized, natural language answer to the input query, generated from the information found in the cited sources.\").optional(),\n sources: z.array(ExaAnswer_AnswerSourceSchema).describe(\"List of primary source identifiers (URLs/IDs) used to formulate the answer.\").optional(),\n answerId: z.string().describe(\"A unique identifier for this answer interaction, if provided by Exa.\").optional(),\n citations: z.array(ExaAnswer_CitationSchema).describe(\"A list of `Citation` objects, each detailing a source document that contributed to the generated answer. Provides evidence and links to original content.\"),\n citedChunks: z.array(ExaAnswer_CitedChunkSchema).describe(\"Specific text excerpts cited from sources supporting the answer.\").optional(),\n costDollars: ExaAnswer_CostDollarsSchema.nullable().optional(),\n followupQuestions: z.array(z.string()).describe(\"Suggested follow-up questions related to the query.\").optional(),\n}).describe(\"Response model containing the generated answer and its citations.\");\n\nexport const exaAnswer = action(\"EXA_ANSWER\", {\n slug: \"exa-answer\",\n name: \"Generate an answer\",\n description: \"Generates a direct, citation-backed answer to a clear natural language question or topic using Exa's search, adept at both specific answers and detailed summaries for open-ended queries. Response contains an `answer` field (summary) and a `citations` field (supporting URLs). Citations may include low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ClH,CAAC,EAAE,SAAS,mEAAmE;AAE/E,MAAa,YAAYC,eAAAA,OAAO,cAAc;CAC5C,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/answer.d.ts
4
+ declare const ExaAnswerInput: z.ZodTypeAny;
5
+ declare const ExaAnswerOutput: z.ZodTypeAny;
6
+ declare const exaAnswer: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { exaAnswer };
9
+ //# sourceMappingURL=answer.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.d.cts","names":[],"sources":["../../src/actions/answer.ts"],"mappings":";;;cAIa,cAAA,EAAgB,CAAA,CAAE,UAKwC;AAAA,cAqD1D,eAAA,EAAiB,CAAA,CAAE,UAQgD;AAAA,cAEnE,SAAA,gCAAS,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/answer.d.ts
4
+ declare const ExaAnswerInput: z.ZodTypeAny;
5
+ declare const ExaAnswerOutput: z.ZodTypeAny;
6
+ declare const exaAnswer: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { exaAnswer };
9
+ //# sourceMappingURL=answer.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.d.mts","names":[],"sources":["../../src/actions/answer.ts"],"mappings":";;;cAIa,cAAA,EAAgB,CAAA,CAAE,UAKwC;AAAA,cAqD1D,eAAA,EAAiB,CAAA,CAAE,UAQgD;AAAA,cAEnE,SAAA,gCAAS,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/answer.ts
4
+ const ExaAnswerInput = z.object({
5
+ text: z.boolean().default(false).describe("Set to `true` to include the full text content of the cited source documents in the `citations` part of the response. Defaults to `false`.").optional(),
6
+ model: z.enum(["exa", "exa-pro"]).default("exa").describe("Specifies the search model to use. 'exa' uses a single, direct query. 'exa-pro' uses two expanded queries for potentially more comprehensive results. Allowed values are 'exa' or 'exa-pro'. Defaults to 'exa'.").optional(),
7
+ query: z.string().describe("The natural language question or search query for which an answer is sought. The query should be specific enough to guide the search effectively. Include concrete entities, dates, locations, or jurisdictions to avoid ambiguous results. For time-sensitive data, include explicit time framing (e.g., 'as of 2024') since results may reflect stale information."),
8
+ stream: z.boolean().default(false).describe("Set to `true` to receive the response as a stream of server-sent events (SSE). This is useful for displaying results incrementally. Defaults to `false`.").optional()
9
+ }).describe("Request model for generating an answer based on a query.");
10
+ const ExaAnswer_AnswerSourceSchema = z.object({
11
+ url: z.string().describe("URL of the source document.").optional(),
12
+ title: z.string().describe("Title of the source, if available from Exa's /answer 'sources' field.").optional(),
13
+ documentId: z.string().describe("ID of the source document if it was an uploaded document.").optional()
14
+ }).describe("Represents a primary source used for generating the answer.");
15
+ const ExaAnswer_CitationSchema = z.object({
16
+ id: z.string().describe("A unique temporary identifier assigned to the cited document within this response.").optional(),
17
+ url: z.string().describe("The direct URL of the original web page or document that serves as a source for the answer.").optional(),
18
+ text: z.string().describe("The full text content of the cited document. This field is populated only if the `text` parameter in the `AnswerRequest` was set to `true`. Use sparingly — `text=true` produces large payloads with higher latency and cost.").optional(),
19
+ image: z.string().describe("A URL for an image associated with the cited document, if available.").optional(),
20
+ score: z.number().describe("Relevance score of the result").optional(),
21
+ title: z.string().describe("The title of the web page or document cited.").optional(),
22
+ author: z.string().describe("The author(s) of the cited content, if this information is available.").optional(),
23
+ favicon: z.string().describe("A URL for the favicon of the website hosting the cited document, if available.").optional(),
24
+ snippet: z.string().describe("A short snippet from the search result").optional(),
25
+ publishedDate: z.string().describe("The publication date of the cited content, formatted as YYYY-MM-DD, if available.").optional()
26
+ }).describe("Model for citation information in the response, detailing a source document.");
27
+ const ExaAnswer_CitedChunkSchema = z.object({
28
+ text: z.string().describe("The excerpt of text cited from a source.").optional(),
29
+ documentId: z.string().describe("ID of the document from which the chunk is cited.").optional(),
30
+ source_url: z.string().describe("URL of the document from which the chunk is cited.").optional()
31
+ }).describe("Represents a specific chunk of text cited from a source document.");
32
+ const ExaAnswer_CostBreakdownDetailSchema = z.object({
33
+ contentText: z.number().describe("Cost of text content retrieval."),
34
+ neuralSearch: z.number().describe("Cost of neural search operations."),
35
+ keywordSearch: z.number().describe("Cost of keyword search operations."),
36
+ contentSummary: z.number().describe("Cost of summary generation."),
37
+ contentHighlight: z.number().describe("Cost of highlight generation.")
38
+ }).describe("Detailed breakdown of costs for search and content operations.");
39
+ const ExaAnswer_CostBreakdownItemSchema = z.object({
40
+ search: z.number().describe("Cost of search operations."),
41
+ contents: z.number().describe("Cost of content operations."),
42
+ breakdown: ExaAnswer_CostBreakdownDetailSchema.nullable()
43
+ }).describe("Item in the cost breakdown, detailing search and content costs.");
44
+ const ExaAnswer_PerPagePricesSchema = z.object({
45
+ contentText: z.number().describe("Standard price per page for text content."),
46
+ contentSummary: z.number().describe("Standard price per page for summaries."),
47
+ contentHighlight: z.number().describe("Standard price per page for highlights.")
48
+ }).describe("Standard price per page for different content operations.");
49
+ const ExaAnswer_PerRequestPricesSchema = z.object({
50
+ neuralSearch_1_25_results: z.number().describe("Standard price for neural search with 1-25 results."),
51
+ keywordSearch_1_100_results: z.number().describe("Standard price for keyword search with 1-100 results."),
52
+ neuralSearch_26_100_results: z.number().describe("Standard price for neural search with 26-100 results."),
53
+ neuralSearch_100_plus_results: z.number().describe("Standard price for neural search with 100+ results."),
54
+ keywordSearch_100_plus_results: z.number().describe("Standard price for keyword search with 100+ results.")
55
+ }).describe("Standard price per request for different operations.");
56
+ const ExaAnswer_CostDollarsSchema = z.object({
57
+ total: z.number().describe("Total dollar cost for the request."),
58
+ breakDown: z.array(ExaAnswer_CostBreakdownItemSchema).describe("Breakdown of costs by operation type.").optional(),
59
+ perPagePrices: ExaAnswer_PerPagePricesSchema.nullable().optional(),
60
+ perRequestPrices: ExaAnswer_PerRequestPricesSchema.nullable().optional()
61
+ }).describe("Model for cost information in the response.");
62
+ const exaAnswer = action("EXA_ANSWER", {
63
+ slug: "exa-answer",
64
+ name: "Generate an answer",
65
+ description: "Generates a direct, citation-backed answer to a clear natural language question or topic using Exa's search, adept at both specific answers and detailed summaries for open-ended queries. Response contains an `answer` field (summary) and a `citations` field (supporting URLs). Citations may include low-credibility sources; verify authoritative references for factual use.",
66
+ input: ExaAnswerInput,
67
+ output: z.object({
68
+ answer: z.string().describe("The synthesized, natural language answer to the input query, generated from the information found in the cited sources.").optional(),
69
+ sources: z.array(ExaAnswer_AnswerSourceSchema).describe("List of primary source identifiers (URLs/IDs) used to formulate the answer.").optional(),
70
+ answerId: z.string().describe("A unique identifier for this answer interaction, if provided by Exa.").optional(),
71
+ citations: z.array(ExaAnswer_CitationSchema).describe("A list of `Citation` objects, each detailing a source document that contributed to the generated answer. Provides evidence and links to original content."),
72
+ citedChunks: z.array(ExaAnswer_CitedChunkSchema).describe("Specific text excerpts cited from sources supporting the answer.").optional(),
73
+ costDollars: ExaAnswer_CostDollarsSchema.nullable().optional(),
74
+ followupQuestions: z.array(z.string()).describe("Suggested follow-up questions related to the query.").optional()
75
+ }).describe("Response model containing the generated answer and its citations.")
76
+ });
77
+ //#endregion
78
+ export { exaAnswer };
79
+
80
+ //# sourceMappingURL=answer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer.mjs","names":[],"sources":["../../src/actions/answer.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaAnswerInput: z.ZodTypeAny = z.object({\n text: z.boolean().default(false).describe(\"Set to `true` to include the full text content of the cited source documents in the `citations` part of the response. Defaults to `false`.\").optional(),\n model: z.enum([\"exa\", \"exa-pro\"]).default(\"exa\").describe(\"Specifies the search model to use. 'exa' uses a single, direct query. 'exa-pro' uses two expanded queries for potentially more comprehensive results. Allowed values are 'exa' or 'exa-pro'. Defaults to 'exa'.\").optional(),\n query: z.string().describe(\"The natural language question or search query for which an answer is sought. The query should be specific enough to guide the search effectively. Include concrete entities, dates, locations, or jurisdictions to avoid ambiguous results. For time-sensitive data, include explicit time framing (e.g., 'as of 2024') since results may reflect stale information.\"),\n stream: z.boolean().default(false).describe(\"Set to `true` to receive the response as a stream of server-sent events (SSE). This is useful for displaying results incrementally. Defaults to `false`.\").optional(),\n}).describe(\"Request model for generating an answer based on a query.\");\nconst ExaAnswer_AnswerSourceSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL of the source document.\").optional(),\n title: z.string().describe(\"Title of the source, if available from Exa's /answer 'sources' field.\").optional(),\n documentId: z.string().describe(\"ID of the source document if it was an uploaded document.\").optional(),\n}).describe(\"Represents a primary source used for generating the answer.\");\nconst ExaAnswer_CitationSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"A unique temporary identifier assigned to the cited document within this response.\").optional(),\n url: z.string().describe(\"The direct URL of the original web page or document that serves as a source for the answer.\").optional(),\n text: z.string().describe(\"The full text content of the cited document. This field is populated only if the `text` parameter in the `AnswerRequest` was set to `true`. Use sparingly — `text=true` produces large payloads with higher latency and cost.\").optional(),\n image: z.string().describe(\"A URL for an image associated with the cited document, if available.\").optional(),\n score: z.number().describe(\"Relevance score of the result\").optional(),\n title: z.string().describe(\"The title of the web page or document cited.\").optional(),\n author: z.string().describe(\"The author(s) of the cited content, if this information is available.\").optional(),\n favicon: z.string().describe(\"A URL for the favicon of the website hosting the cited document, if available.\").optional(),\n snippet: z.string().describe(\"A short snippet from the search result\").optional(),\n publishedDate: z.string().describe(\"The publication date of the cited content, formatted as YYYY-MM-DD, if available.\").optional(),\n}).describe(\"Model for citation information in the response, detailing a source document.\");\nconst ExaAnswer_CitedChunkSchema: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The excerpt of text cited from a source.\").optional(),\n documentId: z.string().describe(\"ID of the document from which the chunk is cited.\").optional(),\n source_url: z.string().describe(\"URL of the document from which the chunk is cited.\").optional(),\n}).describe(\"Represents a specific chunk of text cited from a source document.\");\nconst ExaAnswer_CostBreakdownDetailSchema: z.ZodTypeAny = z.object({\n contentText: z.number().describe(\"Cost of text content retrieval.\"),\n neuralSearch: z.number().describe(\"Cost of neural search operations.\"),\n keywordSearch: z.number().describe(\"Cost of keyword search operations.\"),\n contentSummary: z.number().describe(\"Cost of summary generation.\"),\n contentHighlight: z.number().describe(\"Cost of highlight generation.\"),\n}).describe(\"Detailed breakdown of costs for search and content operations.\");\nconst ExaAnswer_CostBreakdownItemSchema: z.ZodTypeAny = z.object({\n search: z.number().describe(\"Cost of search operations.\"),\n contents: z.number().describe(\"Cost of content operations.\"),\n breakdown: ExaAnswer_CostBreakdownDetailSchema.nullable(),\n}).describe(\"Item in the cost breakdown, detailing search and content costs.\");\nconst ExaAnswer_PerPagePricesSchema: z.ZodTypeAny = z.object({\n contentText: z.number().describe(\"Standard price per page for text content.\"),\n contentSummary: z.number().describe(\"Standard price per page for summaries.\"),\n contentHighlight: z.number().describe(\"Standard price per page for highlights.\"),\n}).describe(\"Standard price per page for different content operations.\");\nconst ExaAnswer_PerRequestPricesSchema: z.ZodTypeAny = z.object({\n neuralSearch_1_25_results: z.number().describe(\"Standard price for neural search with 1-25 results.\"),\n keywordSearch_1_100_results: z.number().describe(\"Standard price for keyword search with 1-100 results.\"),\n neuralSearch_26_100_results: z.number().describe(\"Standard price for neural search with 26-100 results.\"),\n neuralSearch_100_plus_results: z.number().describe(\"Standard price for neural search with 100+ results.\"),\n keywordSearch_100_plus_results: z.number().describe(\"Standard price for keyword search with 100+ results.\"),\n}).describe(\"Standard price per request for different operations.\");\nconst ExaAnswer_CostDollarsSchema: z.ZodTypeAny = z.object({\n total: z.number().describe(\"Total dollar cost for the request.\"),\n breakDown: z.array(ExaAnswer_CostBreakdownItemSchema).describe(\"Breakdown of costs by operation type.\").optional(),\n perPagePrices: ExaAnswer_PerPagePricesSchema.nullable().optional(),\n perRequestPrices: ExaAnswer_PerRequestPricesSchema.nullable().optional(),\n}).describe(\"Model for cost information in the response.\");\nexport const ExaAnswerOutput: z.ZodTypeAny = z.object({\n answer: z.string().describe(\"The synthesized, natural language answer to the input query, generated from the information found in the cited sources.\").optional(),\n sources: z.array(ExaAnswer_AnswerSourceSchema).describe(\"List of primary source identifiers (URLs/IDs) used to formulate the answer.\").optional(),\n answerId: z.string().describe(\"A unique identifier for this answer interaction, if provided by Exa.\").optional(),\n citations: z.array(ExaAnswer_CitationSchema).describe(\"A list of `Citation` objects, each detailing a source document that contributed to the generated answer. Provides evidence and links to original content.\"),\n citedChunks: z.array(ExaAnswer_CitedChunkSchema).describe(\"Specific text excerpts cited from sources supporting the answer.\").optional(),\n costDollars: ExaAnswer_CostDollarsSchema.nullable().optional(),\n followupQuestions: z.array(z.string()).describe(\"Suggested follow-up questions related to the query.\").optional(),\n}).describe(\"Response model containing the generated answer and its citations.\");\n\nexport const exaAnswer = action(\"EXA_ANSWER\", {\n slug: \"exa-answer\",\n name: \"Generate an answer\",\n description: \"Generates a direct, citation-backed answer to a clear natural language question or topic using Exa's search, adept at both specific answers and detailed summaries for open-ended queries. Response contains an `answer` field (summary) and a `citations` field (supporting URLs). Citations may include low-credibility sources; verify authoritative references for factual use.\",\n input: ExaAnswerInput,\n output: ExaAnswerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,iBAA+B,EAAE,OAAO;CACnD,MAAM,EAAE,QAAQ,EAAE,QAAQ,KAAK,EAAE,SAAS,4IAA4I,EAAE,SAAS;CACjM,OAAO,EAAE,KAAK,CAAC,OAAO,SAAS,CAAC,EAAE,QAAQ,KAAK,EAAE,S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ACjE,kBAAkB,iCAAiC,SAAS,EAAE,SAAS;AACzE,CAAC,EAAE,SAAS,6CAA6C;AAWzD,MAAa,YAAY,OAAO,cAAc;CAC5C,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAf2C,EAAE,OAAO;EACpD,QAAQ,EAAE,OAAO,EAAE,SAAS,yHAAyH,EAAE,SAAS;EAChK,SAAS,EAAE,MAAM,4BAA4B,EAAE,SAAS,6EAA6E,EAAE,SAAS;EAChJ,UAAU,EAAE,OAAO,EAAE,SAAS,sEAAsE,EAAE,SAAS;EAC/G,WAAW,EAAE,MAAM,wBAAwB,EAAE,SAAS,2JAA2J;EACjN,aAAa,EAAE,MAAM,0BAA0B,EAAE,SAAS,kEAAkE,EAAE,SAAS;EACvI,aAAa,4BAA4B,SAAS,EAAE,SAAS;EAC7D,mBAAmB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,qDAAqD,EAAE,SAAS;CAClH,CAAC,EAAE,SAAS,mEAOF;AACV,CAAC"}
@@ -0,0 +1,41 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-import.ts
4
+ const ExaCreateImportInput = zod.z.object({
5
+ csv: zod.z.object({ identifier: zod.z.number().int().describe("Identifier for the CSV import.").optional() }).describe("CSV-specific settings for the import.").optional(),
6
+ size: zod.z.number().int().describe("Size of the import in bytes.").optional(),
7
+ count: zod.z.number().int().describe("Number of items in the import.").optional(),
8
+ title: zod.z.string().describe("Title of the import.").optional(),
9
+ entity: zod.z.object({ type: zod.z.string().describe("Type of entity for the import (e.g., 'company').") }).describe("Entity information for the import."),
10
+ format: zod.z.string().describe("Format of the import file (e.g., 'csv')."),
11
+ metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Additional metadata for the import.").optional()
12
+ }).describe("Parameters to create a new import for data ingestion into a Webset.");
13
+ const ExaCreateImport_ImportEntitySchema = zod.z.object({ type: zod.z.string().describe("Type of entity for the import (e.g., 'company').") }).describe("Entity details for the import.");
14
+ const ExaCreateImportOutput = zod.z.object({
15
+ id: zod.z.string().describe("Unique identifier for the import."),
16
+ count: zod.z.number().int().describe("Number of items in the import.").optional(),
17
+ title: zod.z.string().describe("Title of the import.").optional(),
18
+ entity: ExaCreateImport_ImportEntitySchema.nullable(),
19
+ format: zod.z.string().describe("Format of the import file."),
20
+ object: zod.z.string().describe("Type of object (e.g., 'import')."),
21
+ status: zod.z.string().describe("Status of the import (e.g., 'pending')."),
22
+ failedAt: zod.z.string().describe("Timestamp when the import failed, if applicable.").optional(),
23
+ metadata: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Additional metadata for the import.").optional(),
24
+ createdAt: zod.z.string().describe("Timestamp when the import was created."),
25
+ updatedAt: zod.z.string().describe("Timestamp when the import was last updated."),
26
+ uploadUrl: zod.z.string().describe("URL to upload the import file."),
27
+ failedReason: zod.z.string().describe("Reason for failure, if the import failed.").optional(),
28
+ failedMessage: zod.z.string().describe("Failure message, if applicable.").optional(),
29
+ uploadValidUntil: zod.z.string().describe("Timestamp until the upload URL is valid.")
30
+ }).describe("Response schema for a newly created import.");
31
+ const exaCreateImport = require_action.action("EXA_CREATE_IMPORT", {
32
+ slug: "exa-create-import",
33
+ name: "Create Import",
34
+ description: "Tool to create a new import to upload data into a Webset. Use when you need to initialize an import before uploading the data file.",
35
+ input: ExaCreateImportInput,
36
+ output: ExaCreateImportOutput
37
+ });
38
+ //#endregion
39
+ exports.exaCreateImport = exaCreateImport;
40
+
41
+ //# sourceMappingURL=create-import.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-import.cjs","names":["z","action"],"sources":["../../src/actions/create-import.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaCreateImportInput: z.ZodTypeAny = z.object({\n csv: z.object({\n identifier: z.number().int().describe(\"Identifier for the CSV import.\").optional(),\n}).describe(\"CSV-specific settings for the import.\").optional(),\n size: z.number().int().describe(\"Size of the import in bytes.\").optional(),\n count: z.number().int().describe(\"Number of items in the import.\").optional(),\n title: z.string().describe(\"Title of the import.\").optional(),\n entity: z.object({\n type: z.string().describe(\"Type of entity for the import (e.g., 'company').\"),\n}).describe(\"Entity information for the import.\"),\n format: z.string().describe(\"Format of the import file (e.g., 'csv').\"),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional metadata for the import.\").optional(),\n}).describe(\"Parameters to create a new import for data ingestion into a Webset.\");\nconst ExaCreateImport_ImportEntitySchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of entity for the import (e.g., 'company').\"),\n}).describe(\"Entity details for the import.\");\nexport const ExaCreateImportOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the import.\"),\n count: z.number().int().describe(\"Number of items in the import.\").optional(),\n title: z.string().describe(\"Title of the import.\").optional(),\n entity: ExaCreateImport_ImportEntitySchema.nullable(),\n format: z.string().describe(\"Format of the import file.\"),\n object: z.string().describe(\"Type of object (e.g., 'import').\"),\n status: z.string().describe(\"Status of the import (e.g., 'pending').\"),\n failedAt: z.string().describe(\"Timestamp when the import failed, if applicable.\").optional(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional metadata for the import.\").optional(),\n createdAt: z.string().describe(\"Timestamp when the import was created.\"),\n updatedAt: z.string().describe(\"Timestamp when the import was last updated.\"),\n uploadUrl: z.string().describe(\"URL to upload the import file.\"),\n failedReason: z.string().describe(\"Reason for failure, if the import failed.\").optional(),\n failedMessage: z.string().describe(\"Failure message, if applicable.\").optional(),\n uploadValidUntil: z.string().describe(\"Timestamp until the upload URL is valid.\"),\n}).describe(\"Response schema for a newly created import.\");\n\nexport const exaCreateImport = action(\"EXA_CREATE_IMPORT\", {\n slug: \"exa-create-import\",\n name: \"Create Import\",\n description: \"Tool to create a new import to upload data into a Webset. Use when you need to initialize an import before uploading the data file.\",\n input: ExaCreateImportInput,\n output: ExaCreateImportOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAqCA,IAAAA,EAAE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EAAE,OAAO,EAAE,SAAS,yCAAyC;CACrE,UAAUA,IAAAA,EAAE,OAAO,EAAE,SAAS,kDAAkD,EAAE,SAAS;CAC3F,UAAUA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,EAAE,SAAS,qCAAqC,EAAE,SAAS;CACrG,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,wCAAwC;CACvE,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,6CAA6C;CAC5E,WAAWA,IAAAA,EAAE,OAAO,EAAE,SAAS,gCAAgC;CAC/D,cAAcA,IAAAA,EAAE,OAAO,EAAE,SAAS,2CAA2C,EAAE,SAAS;CACxF,eAAeA,IAAAA,EAAE,OAAO,EAAE,SAAS,iCAAiC,EAAE,SAAS;CAC/E,kBAAkBA,IAAAA,EAAE,OAAO,EAAE,SAAS,0CAA0C;AAClF,CAAC,EAAE,SAAS,6CAA6C;AAEzD,MAAa,kBAAkBC,eAAAA,OAAO,qBAAqB;CACzD,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-import.d.ts
4
+ declare const ExaCreateImportInput: z.ZodTypeAny;
5
+ declare const ExaCreateImportOutput: z.ZodTypeAny;
6
+ declare const exaCreateImport: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { exaCreateImport };
9
+ //# sourceMappingURL=create-import.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-import.d.cts","names":[],"sources":["../../src/actions/create-import.ts"],"mappings":";;;cAIa,oBAAA,EAAsB,CAAA,CAAE,UAY6C;AAAA,cAIrE,qBAAA,EAAuB,CAAA,CAAE,UAgBoB;AAAA,cAE7C,eAAA,gCAAe,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-import.d.ts
4
+ declare const ExaCreateImportInput: z.ZodTypeAny;
5
+ declare const ExaCreateImportOutput: z.ZodTypeAny;
6
+ declare const exaCreateImport: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { exaCreateImport };
9
+ //# sourceMappingURL=create-import.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-import.d.mts","names":[],"sources":["../../src/actions/create-import.ts"],"mappings":";;;cAIa,oBAAA,EAAsB,CAAA,CAAE,UAY6C;AAAA,cAIrE,qBAAA,EAAuB,CAAA,CAAE,UAgBoB;AAAA,cAE7C,eAAA,gCAAe,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,40 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/create-import.ts
4
+ const ExaCreateImportInput = z.object({
5
+ csv: z.object({ identifier: z.number().int().describe("Identifier for the CSV import.").optional() }).describe("CSV-specific settings for the import.").optional(),
6
+ size: z.number().int().describe("Size of the import in bytes.").optional(),
7
+ count: z.number().int().describe("Number of items in the import.").optional(),
8
+ title: z.string().describe("Title of the import.").optional(),
9
+ entity: z.object({ type: z.string().describe("Type of entity for the import (e.g., 'company').") }).describe("Entity information for the import."),
10
+ format: z.string().describe("Format of the import file (e.g., 'csv')."),
11
+ metadata: z.record(z.string(), z.unknown()).describe("Additional metadata for the import.").optional()
12
+ }).describe("Parameters to create a new import for data ingestion into a Webset.");
13
+ const ExaCreateImport_ImportEntitySchema = z.object({ type: z.string().describe("Type of entity for the import (e.g., 'company').") }).describe("Entity details for the import.");
14
+ const exaCreateImport = action("EXA_CREATE_IMPORT", {
15
+ slug: "exa-create-import",
16
+ name: "Create Import",
17
+ description: "Tool to create a new import to upload data into a Webset. Use when you need to initialize an import before uploading the data file.",
18
+ input: ExaCreateImportInput,
19
+ output: z.object({
20
+ id: z.string().describe("Unique identifier for the import."),
21
+ count: z.number().int().describe("Number of items in the import.").optional(),
22
+ title: z.string().describe("Title of the import.").optional(),
23
+ entity: ExaCreateImport_ImportEntitySchema.nullable(),
24
+ format: z.string().describe("Format of the import file."),
25
+ object: z.string().describe("Type of object (e.g., 'import')."),
26
+ status: z.string().describe("Status of the import (e.g., 'pending')."),
27
+ failedAt: z.string().describe("Timestamp when the import failed, if applicable.").optional(),
28
+ metadata: z.record(z.string(), z.unknown()).describe("Additional metadata for the import.").optional(),
29
+ createdAt: z.string().describe("Timestamp when the import was created."),
30
+ updatedAt: z.string().describe("Timestamp when the import was last updated."),
31
+ uploadUrl: z.string().describe("URL to upload the import file."),
32
+ failedReason: z.string().describe("Reason for failure, if the import failed.").optional(),
33
+ failedMessage: z.string().describe("Failure message, if applicable.").optional(),
34
+ uploadValidUntil: z.string().describe("Timestamp until the upload URL is valid.")
35
+ }).describe("Response schema for a newly created import.")
36
+ });
37
+ //#endregion
38
+ export { exaCreateImport };
39
+
40
+ //# sourceMappingURL=create-import.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-import.mjs","names":[],"sources":["../../src/actions/create-import.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ExaCreateImportInput: z.ZodTypeAny = z.object({\n csv: z.object({\n identifier: z.number().int().describe(\"Identifier for the CSV import.\").optional(),\n}).describe(\"CSV-specific settings for the import.\").optional(),\n size: z.number().int().describe(\"Size of the import in bytes.\").optional(),\n count: z.number().int().describe(\"Number of items in the import.\").optional(),\n title: z.string().describe(\"Title of the import.\").optional(),\n entity: z.object({\n type: z.string().describe(\"Type of entity for the import (e.g., 'company').\"),\n}).describe(\"Entity information for the import.\"),\n format: z.string().describe(\"Format of the import file (e.g., 'csv').\"),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional metadata for the import.\").optional(),\n}).describe(\"Parameters to create a new import for data ingestion into a Webset.\");\nconst ExaCreateImport_ImportEntitySchema: z.ZodTypeAny = z.object({\n type: z.string().describe(\"Type of entity for the import (e.g., 'company').\"),\n}).describe(\"Entity details for the import.\");\nexport const ExaCreateImportOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier for the import.\"),\n count: z.number().int().describe(\"Number of items in the import.\").optional(),\n title: z.string().describe(\"Title of the import.\").optional(),\n entity: ExaCreateImport_ImportEntitySchema.nullable(),\n format: z.string().describe(\"Format of the import file.\"),\n object: z.string().describe(\"Type of object (e.g., 'import').\"),\n status: z.string().describe(\"Status of the import (e.g., 'pending').\"),\n failedAt: z.string().describe(\"Timestamp when the import failed, if applicable.\").optional(),\n metadata: z.record(z.string(), z.unknown()).describe(\"Additional metadata for the import.\").optional(),\n createdAt: z.string().describe(\"Timestamp when the import was created.\"),\n updatedAt: z.string().describe(\"Timestamp when the import was last updated.\"),\n uploadUrl: z.string().describe(\"URL to upload the import file.\"),\n failedReason: z.string().describe(\"Reason for failure, if the import failed.\").optional(),\n failedMessage: z.string().describe(\"Failure message, if applicable.\").optional(),\n uploadValidUntil: z.string().describe(\"Timestamp until the upload URL is valid.\"),\n}).describe(\"Response schema for a newly created import.\");\n\nexport const exaCreateImport = action(\"EXA_CREATE_IMPORT\", {\n slug: \"exa-create-import\",\n name: \"Create Import\",\n description: \"Tool to create a new import to upload data into a Webset. Use when you need to initialize an import before uploading the data file.\",\n input: ExaCreateImportInput,\n output: ExaCreateImportOutput,\n});\n"],"mappings":";;;AAIA,MAAa,uBAAqC,EAAE,OAAO;CACzD,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,gCAAgC,EAAE,SAAS,EACnF,CAAC,EAAE,SAAS,uCAAuC,EAAE,SAAS;CAC5D,M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