@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
@@ -1,438 +0,0 @@
1
- const require_client = require("./client-DlwHA71b.cjs");
2
- const require_app = require("./app-DMujvH6I.cjs");
3
- let zod = require("zod");
4
- //#region src/schemas.ts
5
- const exaSearchTypeSchema = zod.z.enum([
6
- "instant",
7
- "fast",
8
- "auto",
9
- "deep-lite",
10
- "deep",
11
- "deep-reasoning"
12
- ]);
13
- const exaCategorySchema = zod.z.enum([
14
- "company",
15
- "people",
16
- "research paper",
17
- "news",
18
- "personal site",
19
- "financial report"
20
- ]);
21
- const exaSearchResultSchema = zod.z.object({
22
- title: zod.z.string().nullable().optional(),
23
- url: zod.z.string(),
24
- id: zod.z.string().optional(),
25
- publishedDate: zod.z.string().nullable().optional(),
26
- author: zod.z.string().nullable().optional(),
27
- text: zod.z.string().nullable().optional(),
28
- highlights: zod.z.array(zod.z.string()).optional(),
29
- summary: zod.z.string().nullable().optional(),
30
- entities: zod.z.unknown().optional()
31
- });
32
- const exaGroundingCitationSchema = zod.z.object({
33
- url: zod.z.string(),
34
- title: zod.z.string().optional()
35
- });
36
- const exaGroundingSchema = zod.z.object({
37
- field: zod.z.string(),
38
- citations: zod.z.array(exaGroundingCitationSchema),
39
- confidence: zod.z.enum([
40
- "low",
41
- "medium",
42
- "high"
43
- ]).optional()
44
- });
45
- const exaContentStatusSchema = zod.z.object({
46
- id: zod.z.string(),
47
- status: zod.z.enum(["success", "error"]),
48
- source: zod.z.enum(["cached", "crawled"]).optional(),
49
- error: zod.z.object({
50
- tag: zod.z.string().optional(),
51
- httpStatusCode: zod.z.number().optional()
52
- }).optional()
53
- });
54
- const exaCitationSchema = zod.z.object({
55
- title: zod.z.string().nullable().optional(),
56
- url: zod.z.string(),
57
- id: zod.z.string().optional(),
58
- publishedDate: zod.z.string().nullable().optional(),
59
- author: zod.z.string().nullable().optional(),
60
- text: zod.z.string().nullable().optional()
61
- });
62
- const restrictedCategory = new Set(["company", "people"]);
63
- function assertCategoryFilters(category, filters) {
64
- if (!category || !restrictedCategory.has(category)) return;
65
- if (filters.excludeDomains?.length) throw new Error("excludeDomains is not supported for company or people category searches");
66
- if (filters.startPublishedDate || filters.endPublishedDate) throw new Error("published date filters are not supported for company or people category searches");
67
- }
68
- function buildSearchContents(input) {
69
- const contents = {};
70
- if (input.highlights !== false) contents.highlights = input.highlights === true ? true : { maxCharacters: 4e3 };
71
- if (input.text) contents.text = true;
72
- if (input.summary) contents.summary = true;
73
- return Object.keys(contents).length > 0 ? contents : void 0;
74
- }
75
- function buildContentsOptions(input) {
76
- const body = {};
77
- if (input.highlights) body.highlights = typeof input.highlights === "boolean" ? true : input.highlights;
78
- if (input.text) body.text = true;
79
- if (input.summary) body.summary = true;
80
- if (!Object.keys(body).length) body.highlights = { maxCharacters: 4e3 };
81
- return body;
82
- }
83
- //#endregion
84
- //#region src/actions/answer.ts
85
- const ExaAnswerInput = zod.z.object({
86
- query: zod.z.string().describe("Natural-language question."),
87
- includeCitationText: zod.z.boolean().default(false).describe("Include full text bodies on citations."),
88
- outputSchema: zod.z.record(zod.z.string(), zod.z.unknown()).optional().describe("JSON Schema for structured answer output.")
89
- });
90
- const ExaAnswerOutput = zod.z.object({
91
- requestId: zod.z.string().optional(),
92
- answer: zod.z.unknown(),
93
- citations: zod.z.array(exaCitationSchema),
94
- costDollars: zod.z.object({ total: zod.z.number().optional() }).optional()
95
- });
96
- const exaAnswer = require_app.exa.action({
97
- slug: "exa-answer",
98
- name: "Exa Answer",
99
- description: "Search-backed grounded Q&A with citations.",
100
- input: ExaAnswerInput,
101
- output: ExaAnswerOutput,
102
- async run(input, credentials) {
103
- const client = require_client.createExaClient(credentials.exa.apiKey);
104
- const body = {
105
- query: input.query,
106
- text: input.includeCitationText
107
- };
108
- if (input.outputSchema) body.outputSchema = input.outputSchema;
109
- const response = await client.answer(body);
110
- return {
111
- requestId: response.requestId,
112
- answer: response.answer ?? null,
113
- citations: (response.citations ?? []).map((row) => exaCitationSchema.parse(row)),
114
- costDollars: response.costDollars
115
- };
116
- }
117
- });
118
- //#endregion
119
- //#region src/actions/get-contents.ts
120
- const ExaGetContentsInput = zod.z.object({
121
- urls: zod.z.array(zod.z.string().url()).min(1).max(100).describe("URLs to extract content from."),
122
- highlights: zod.z.boolean().optional().describe("Return token-efficient excerpts."),
123
- text: zod.z.boolean().optional().describe("Return full page markdown."),
124
- summary: zod.z.boolean().optional().describe("Return LLM summary per URL.")
125
- });
126
- const ExaGetContentsOutput = zod.z.object({
127
- requestId: zod.z.string().optional(),
128
- results: zod.z.array(exaSearchResultSchema),
129
- statuses: zod.z.array(exaContentStatusSchema),
130
- costDollars: zod.z.object({ total: zod.z.number().optional() }).optional()
131
- });
132
- const exaGetContents = require_app.exa.action({
133
- slug: "exa-get-contents",
134
- name: "Exa Get Contents",
135
- description: "Extract webpage content from known URLs. Check statuses for per-URL errors (API returns 200 with error statuses).",
136
- input: ExaGetContentsInput,
137
- output: ExaGetContentsOutput,
138
- async run(input, credentials) {
139
- const client = require_client.createExaClient(credentials.exa.apiKey);
140
- const body = {
141
- urls: input.urls,
142
- ...buildContentsOptions({
143
- highlights: input.highlights,
144
- text: input.text,
145
- summary: input.summary
146
- })
147
- };
148
- const response = await client.contents(body);
149
- return {
150
- requestId: response.requestId,
151
- results: (response.results ?? []).map((row) => exaSearchResultSchema.parse(row)),
152
- statuses: (response.statuses ?? []).map((row) => exaContentStatusSchema.parse(row)),
153
- costDollars: response.costDollars
154
- };
155
- }
156
- });
157
- //#endregion
158
- //#region src/actions/get-context.ts
159
- const ExaGetContextInput = zod.z.object({
160
- query: zod.z.string().min(1).max(2e3).describe("Code, API, or how-to question for Exa Code context."),
161
- tokensNum: zod.z.union([zod.z.number().int().min(50).max(1e5), zod.z.literal("dynamic")]).default("dynamic").describe("Max output tokens or dynamic sizing.")
162
- });
163
- const ExaGetContextOutput = zod.z.object({
164
- requestId: zod.z.string().optional(),
165
- query: zod.z.string().optional(),
166
- response: zod.z.string(),
167
- resultsCount: zod.z.number().optional(),
168
- searchTime: zod.z.number().optional(),
169
- outputTokens: zod.z.number().optional(),
170
- costDollars: zod.z.object({ total: zod.z.number().optional() }).optional()
171
- });
172
- const exaGetContext = require_app.exa.action({
173
- slug: "exa-get-context",
174
- name: "Exa Get Context",
175
- description: "Exa Code — token-efficient documentation and code snippets for coding agents.",
176
- input: ExaGetContextInput,
177
- output: ExaGetContextOutput,
178
- async run(input, credentials) {
179
- const response = await require_client.createExaClient(credentials.exa.apiKey).context({
180
- query: input.query,
181
- tokensNum: input.tokensNum
182
- });
183
- return {
184
- requestId: response.requestId,
185
- query: response.query,
186
- response: response.response ?? "",
187
- resultsCount: response.resultsCount,
188
- searchTime: response.searchTime,
189
- outputTokens: response.outputTokens,
190
- costDollars: response.costDollars
191
- };
192
- }
193
- });
194
- //#endregion
195
- //#region src/actions/search.ts
196
- const ExaSearchInput = zod.z.object({
197
- query: zod.z.string().describe("Natural-language search query."),
198
- type: exaSearchTypeSchema.default("auto").describe("Search latency/depth profile."),
199
- category: exaCategorySchema.optional().describe("Vertical index: company, people, research paper, news, personal site, financial report."),
200
- numResults: zod.z.number().int().min(1).max(100).default(10),
201
- includeDomains: zod.z.array(zod.z.string()).max(1200).optional(),
202
- excludeDomains: zod.z.array(zod.z.string()).max(1200).optional(),
203
- startPublishedDate: zod.z.string().optional().describe("ISO8601 published-after filter."),
204
- endPublishedDate: zod.z.string().optional().describe("ISO8601 published-before filter."),
205
- userLocation: zod.z.string().length(2).optional().describe("Two-letter ISO country code for localized results."),
206
- additionalQueries: zod.z.array(zod.z.string()).max(10).optional().describe("Extra queries for deep search types only."),
207
- systemPrompt: zod.z.string().optional().describe("Guides deep search planning."),
208
- highlights: zod.z.boolean().default(true).describe("Return token-efficient page excerpts (recommended)."),
209
- text: zod.z.boolean().optional().describe("Include full page markdown text."),
210
- summary: zod.z.boolean().optional().describe("Include LLM summary per result.")
211
- }).superRefine((input, ctx) => {
212
- try {
213
- assertCategoryFilters(input.category, {
214
- excludeDomains: input.excludeDomains,
215
- startPublishedDate: input.startPublishedDate,
216
- endPublishedDate: input.endPublishedDate
217
- });
218
- } catch (error) {
219
- ctx.addIssue({
220
- code: "custom",
221
- message: error instanceof Error ? error.message : "Invalid category filters"
222
- });
223
- }
224
- });
225
- const ExaSearchOutput = zod.z.object({
226
- requestId: zod.z.string().optional(),
227
- searchType: zod.z.string().optional(),
228
- results: zod.z.array(exaSearchResultSchema),
229
- costDollars: zod.z.object({ total: zod.z.number().optional() }).optional()
230
- });
231
- const exaSearch = require_app.exa.action({
232
- slug: "exa-search",
233
- name: "Exa Search",
234
- description: "Search the web with Exa. Supports categories (company, people, news, research paper, etc.), filters, and content modes.",
235
- input: ExaSearchInput,
236
- output: ExaSearchOutput,
237
- async run(input, credentials) {
238
- const client = require_client.createExaClient(credentials.exa.apiKey);
239
- const body = {
240
- query: input.query,
241
- type: input.type,
242
- numResults: input.numResults
243
- };
244
- if (input.category) body.category = input.category;
245
- if (input.includeDomains?.length) body.includeDomains = input.includeDomains;
246
- if (input.excludeDomains?.length) body.excludeDomains = input.excludeDomains;
247
- if (input.startPublishedDate) body.startPublishedDate = input.startPublishedDate;
248
- if (input.endPublishedDate) body.endPublishedDate = input.endPublishedDate;
249
- if (input.userLocation) body.userLocation = input.userLocation;
250
- if (input.additionalQueries?.length) body.additionalQueries = input.additionalQueries;
251
- if (input.systemPrompt) body.systemPrompt = input.systemPrompt;
252
- const contents = buildSearchContents({
253
- highlights: input.highlights,
254
- text: input.text,
255
- summary: input.summary
256
- });
257
- if (contents) body.contents = contents;
258
- const response = await client.search(body);
259
- return {
260
- requestId: response.requestId,
261
- searchType: response.searchType,
262
- results: (response.results ?? []).map((row) => exaSearchResultSchema.parse(row)),
263
- costDollars: response.costDollars
264
- };
265
- }
266
- });
267
- //#endregion
268
- //#region src/actions/search-structured.ts
269
- const ExaSearchStructuredInput = zod.z.object({
270
- query: zod.z.string().describe("Natural-language search query."),
271
- outputSchema: zod.z.record(zod.z.string(), zod.z.unknown()).describe("JSON Schema object for structured synthesis output."),
272
- type: exaSearchTypeSchema.default("deep").describe("Prefer deep or deep-reasoning for synthesis."),
273
- category: exaCategorySchema.optional(),
274
- numResults: zod.z.number().int().min(1).max(100).default(10),
275
- includeDomains: zod.z.array(zod.z.string()).max(1200).optional(),
276
- excludeDomains: zod.z.array(zod.z.string()).max(1200).optional(),
277
- startPublishedDate: zod.z.string().optional(),
278
- endPublishedDate: zod.z.string().optional(),
279
- systemPrompt: zod.z.string().optional(),
280
- additionalQueries: zod.z.array(zod.z.string()).max(10).optional(),
281
- highlights: zod.z.boolean().default(true),
282
- text: zod.z.boolean().optional()
283
- }).superRefine((input, ctx) => {
284
- try {
285
- assertCategoryFilters(input.category, {
286
- excludeDomains: input.excludeDomains,
287
- startPublishedDate: input.startPublishedDate,
288
- endPublishedDate: input.endPublishedDate
289
- });
290
- } catch (error) {
291
- ctx.addIssue({
292
- code: "custom",
293
- message: error instanceof Error ? error.message : "Invalid category filters"
294
- });
295
- }
296
- });
297
- const ExaSearchStructuredOutput = zod.z.object({
298
- requestId: zod.z.string().optional(),
299
- searchType: zod.z.string().optional(),
300
- results: zod.z.array(exaSearchResultSchema),
301
- output: zod.z.object({
302
- content: zod.z.unknown(),
303
- grounding: zod.z.array(exaGroundingSchema).optional()
304
- }).optional(),
305
- costDollars: zod.z.object({ total: zod.z.number().optional() }).optional()
306
- });
307
- const exaSearchStructured = require_app.exa.action({
308
- slug: "exa-search-structured",
309
- name: "Exa Structured Search",
310
- description: "Exa search with outputSchema for grounded structured JSON synthesis across sources.",
311
- input: ExaSearchStructuredInput,
312
- output: ExaSearchStructuredOutput,
313
- async run(input, credentials) {
314
- const client = require_client.createExaClient(credentials.exa.apiKey);
315
- const body = {
316
- query: input.query,
317
- type: input.type,
318
- numResults: input.numResults,
319
- outputSchema: input.outputSchema
320
- };
321
- if (input.category) body.category = input.category;
322
- if (input.includeDomains?.length) body.includeDomains = input.includeDomains;
323
- if (input.excludeDomains?.length) body.excludeDomains = input.excludeDomains;
324
- if (input.startPublishedDate) body.startPublishedDate = input.startPublishedDate;
325
- if (input.endPublishedDate) body.endPublishedDate = input.endPublishedDate;
326
- if (input.systemPrompt) body.systemPrompt = input.systemPrompt;
327
- if (input.additionalQueries?.length) body.additionalQueries = input.additionalQueries;
328
- const contents = buildSearchContents({
329
- highlights: input.highlights,
330
- text: input.text
331
- });
332
- if (contents) body.contents = contents;
333
- const response = await client.search(body);
334
- return {
335
- requestId: response.requestId,
336
- searchType: response.searchType,
337
- results: (response.results ?? []).map((row) => exaSearchResultSchema.parse(row)),
338
- output: response.output ? {
339
- content: response.output.content,
340
- grounding: response.output.grounding?.map((g) => exaGroundingSchema.parse(g))
341
- } : void 0,
342
- costDollars: response.costDollars
343
- };
344
- }
345
- });
346
- //#endregion
347
- Object.defineProperty(exports, "ExaAnswerInput", {
348
- enumerable: true,
349
- get: function() {
350
- return ExaAnswerInput;
351
- }
352
- });
353
- Object.defineProperty(exports, "ExaAnswerOutput", {
354
- enumerable: true,
355
- get: function() {
356
- return ExaAnswerOutput;
357
- }
358
- });
359
- Object.defineProperty(exports, "ExaGetContentsInput", {
360
- enumerable: true,
361
- get: function() {
362
- return ExaGetContentsInput;
363
- }
364
- });
365
- Object.defineProperty(exports, "ExaGetContentsOutput", {
366
- enumerable: true,
367
- get: function() {
368
- return ExaGetContentsOutput;
369
- }
370
- });
371
- Object.defineProperty(exports, "ExaGetContextInput", {
372
- enumerable: true,
373
- get: function() {
374
- return ExaGetContextInput;
375
- }
376
- });
377
- Object.defineProperty(exports, "ExaGetContextOutput", {
378
- enumerable: true,
379
- get: function() {
380
- return ExaGetContextOutput;
381
- }
382
- });
383
- Object.defineProperty(exports, "ExaSearchInput", {
384
- enumerable: true,
385
- get: function() {
386
- return ExaSearchInput;
387
- }
388
- });
389
- Object.defineProperty(exports, "ExaSearchOutput", {
390
- enumerable: true,
391
- get: function() {
392
- return ExaSearchOutput;
393
- }
394
- });
395
- Object.defineProperty(exports, "ExaSearchStructuredInput", {
396
- enumerable: true,
397
- get: function() {
398
- return ExaSearchStructuredInput;
399
- }
400
- });
401
- Object.defineProperty(exports, "ExaSearchStructuredOutput", {
402
- enumerable: true,
403
- get: function() {
404
- return ExaSearchStructuredOutput;
405
- }
406
- });
407
- Object.defineProperty(exports, "exaAnswer", {
408
- enumerable: true,
409
- get: function() {
410
- return exaAnswer;
411
- }
412
- });
413
- Object.defineProperty(exports, "exaGetContents", {
414
- enumerable: true,
415
- get: function() {
416
- return exaGetContents;
417
- }
418
- });
419
- Object.defineProperty(exports, "exaGetContext", {
420
- enumerable: true,
421
- get: function() {
422
- return exaGetContext;
423
- }
424
- });
425
- Object.defineProperty(exports, "exaSearch", {
426
- enumerable: true,
427
- get: function() {
428
- return exaSearch;
429
- }
430
- });
431
- Object.defineProperty(exports, "exaSearchStructured", {
432
- enumerable: true,
433
- get: function() {
434
- return exaSearchStructured;
435
- }
436
- });
437
-
438
- //# sourceMappingURL=actions-LoQVlbiT.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions-LoQVlbiT.cjs","names":["z","z","exa","createExaClient","z","exa","createExaClient","z","exa","createExaClient","z","exa","createExaClient","z","exa","createExaClient"],"sources":["../src/schemas.ts","../src/actions/answer.ts","../src/actions/get-contents.ts","../src/actions/get-context.ts","../src/actions/search.ts","../src/actions/search-structured.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const exaSearchTypeSchema = z.enum([\n \"instant\",\n \"fast\",\n \"auto\",\n \"deep-lite\",\n \"deep\",\n \"deep-reasoning\",\n]);\n\nexport const exaCategorySchema = z.enum([\n \"company\",\n \"people\",\n \"research paper\",\n \"news\",\n \"personal site\",\n \"financial report\",\n]);\n\nexport const exaSearchResultSchema = z.object({\n title: z.string().nullable().optional(),\n url: z.string(),\n id: z.string().optional(),\n publishedDate: z.string().nullable().optional(),\n author: z.string().nullable().optional(),\n text: z.string().nullable().optional(),\n highlights: z.array(z.string()).optional(),\n summary: z.string().nullable().optional(),\n entities: z.unknown().optional(),\n});\n\nexport const exaGroundingCitationSchema = z.object({\n url: z.string(),\n title: z.string().optional(),\n});\n\nexport const exaGroundingSchema = z.object({\n field: z.string(),\n citations: z.array(exaGroundingCitationSchema),\n confidence: z.enum([\"low\", \"medium\", \"high\"]).optional(),\n});\n\nexport const exaContentStatusSchema = z.object({\n id: z.string(),\n status: z.enum([\"success\", \"error\"]),\n source: z.enum([\"cached\", \"crawled\"]).optional(),\n error: z\n .object({\n tag: z.string().optional(),\n httpStatusCode: z.number().optional(),\n })\n .optional(),\n});\n\nexport const exaCitationSchema = z.object({\n title: z.string().nullable().optional(),\n url: z.string(),\n id: z.string().optional(),\n publishedDate: z.string().nullable().optional(),\n author: z.string().nullable().optional(),\n text: z.string().nullable().optional(),\n});\n\nconst restrictedCategory = new Set([\"company\", \"people\"]);\n\nexport function assertCategoryFilters(\n category: z.infer<typeof exaCategorySchema> | undefined,\n filters: {\n excludeDomains?: string[] | undefined;\n startPublishedDate?: string | undefined;\n endPublishedDate?: string | undefined;\n },\n): void {\n if (!category || !restrictedCategory.has(category)) {\n return;\n }\n if (filters.excludeDomains?.length) {\n throw new Error(\"excludeDomains is not supported for company or people category searches\");\n }\n if (filters.startPublishedDate || filters.endPublishedDate) {\n throw new Error(\n \"published date filters are not supported for company or people category searches\",\n );\n }\n}\n\nexport function buildSearchContents(input: {\n highlights?: boolean;\n text?: boolean;\n summary?: boolean;\n}): Record<string, unknown> | undefined {\n const contents: Record<string, unknown> = {};\n if (input.highlights !== false) {\n contents.highlights = input.highlights === true ? true : { maxCharacters: 4000 };\n }\n if (input.text) {\n contents.text = true;\n }\n if (input.summary) {\n contents.summary = true;\n }\n return Object.keys(contents).length > 0 ? contents : undefined;\n}\n\nexport function buildContentsOptions(input: {\n highlights?: boolean;\n text?: boolean;\n summary?: boolean;\n}): Record<string, unknown> {\n const body: Record<string, unknown> = {};\n if (input.highlights) {\n body.highlights = typeof input.highlights === \"boolean\" ? true : input.highlights;\n }\n if (input.text) {\n body.text = true;\n }\n if (input.summary) {\n body.summary = true;\n }\n if (!Object.keys(body).length) {\n body.highlights = { maxCharacters: 4000 };\n }\n return body;\n}\n","import { z } from \"zod\";\nimport { exa } from \"../app\";\nimport { createExaClient } from \"../client\";\nimport { exaCitationSchema } from \"../schemas\";\n\nexport const ExaAnswerInput = z.object({\n query: z.string().describe(\"Natural-language question.\"),\n includeCitationText: z\n .boolean()\n .default(false)\n .describe(\"Include full text bodies on citations.\"),\n outputSchema: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"JSON Schema for structured answer output.\"),\n});\n\nexport const ExaAnswerOutput = z.object({\n requestId: z.string().optional(),\n answer: z.unknown(),\n citations: z.array(exaCitationSchema),\n costDollars: z.object({ total: z.number().optional() }).optional(),\n});\n\nexport const exaAnswer = exa.action({\n slug: \"exa-answer\",\n name: \"Exa Answer\",\n description: \"Search-backed grounded Q&A with citations.\",\n input: ExaAnswerInput,\n output: ExaAnswerOutput,\n async run(input, credentials) {\n const client = createExaClient(credentials.exa.apiKey);\n\n const body: Record<string, unknown> = {\n query: input.query,\n text: input.includeCitationText,\n };\n if (input.outputSchema) body.outputSchema = input.outputSchema;\n\n const response = (await client.answer(body)) as {\n requestId?: string;\n answer?: unknown;\n citations?: unknown[];\n costDollars?: { total?: number };\n };\n\n return {\n requestId: response.requestId,\n answer: response.answer ?? null,\n citations: (response.citations ?? []).map((row) => exaCitationSchema.parse(row)),\n costDollars: response.costDollars,\n };\n },\n});\n","import { z } from \"zod\";\nimport { exa } from \"../app\";\nimport { createExaClient } from \"../client\";\nimport { buildContentsOptions, exaContentStatusSchema, exaSearchResultSchema } from \"../schemas\";\n\nexport const ExaGetContentsInput = z.object({\n urls: z.array(z.string().url()).min(1).max(100).describe(\"URLs to extract content from.\"),\n highlights: z.boolean().optional().describe(\"Return token-efficient excerpts.\"),\n text: z.boolean().optional().describe(\"Return full page markdown.\"),\n summary: z.boolean().optional().describe(\"Return LLM summary per URL.\"),\n});\n\nexport const ExaGetContentsOutput = z.object({\n requestId: z.string().optional(),\n results: z.array(exaSearchResultSchema),\n statuses: z.array(exaContentStatusSchema),\n costDollars: z.object({ total: z.number().optional() }).optional(),\n});\n\nexport const exaGetContents = exa.action({\n slug: \"exa-get-contents\",\n name: \"Exa Get Contents\",\n description:\n \"Extract webpage content from known URLs. Check statuses for per-URL errors (API returns 200 with error statuses).\",\n input: ExaGetContentsInput,\n output: ExaGetContentsOutput,\n async run(input, credentials) {\n const client = createExaClient(credentials.exa.apiKey);\n\n const body: Record<string, unknown> = {\n urls: input.urls,\n ...buildContentsOptions({\n highlights: input.highlights,\n text: input.text,\n summary: input.summary,\n }),\n };\n\n const response = (await client.contents(body)) as {\n requestId?: string;\n results?: unknown[];\n statuses?: unknown[];\n costDollars?: { total?: number };\n };\n\n return {\n requestId: response.requestId,\n results: (response.results ?? []).map((row) => exaSearchResultSchema.parse(row)),\n statuses: (response.statuses ?? []).map((row) => exaContentStatusSchema.parse(row)),\n costDollars: response.costDollars,\n };\n },\n});\n","import { z } from \"zod\";\nimport { exa } from \"../app\";\nimport { createExaClient } from \"../client\";\n\nexport const ExaGetContextInput = z.object({\n query: z\n .string()\n .min(1)\n .max(2000)\n .describe(\"Code, API, or how-to question for Exa Code context.\"),\n tokensNum: z\n .union([z.number().int().min(50).max(100_000), z.literal(\"dynamic\")])\n .default(\"dynamic\")\n .describe(\"Max output tokens or dynamic sizing.\"),\n});\n\nexport const ExaGetContextOutput = z.object({\n requestId: z.string().optional(),\n query: z.string().optional(),\n response: z.string(),\n resultsCount: z.number().optional(),\n searchTime: z.number().optional(),\n outputTokens: z.number().optional(),\n costDollars: z.object({ total: z.number().optional() }).optional(),\n});\n\nexport const exaGetContext = exa.action({\n slug: \"exa-get-context\",\n name: \"Exa Get Context\",\n description: \"Exa Code — token-efficient documentation and code snippets for coding agents.\",\n input: ExaGetContextInput,\n output: ExaGetContextOutput,\n async run(input, credentials) {\n const client = createExaClient(credentials.exa.apiKey);\n\n const response = (await client.context({\n query: input.query,\n tokensNum: input.tokensNum,\n })) as {\n requestId?: string;\n query?: string;\n response?: string;\n resultsCount?: number;\n searchTime?: number;\n outputTokens?: number;\n costDollars?: { total?: number };\n };\n\n return {\n requestId: response.requestId,\n query: response.query,\n response: response.response ?? \"\",\n resultsCount: response.resultsCount,\n searchTime: response.searchTime,\n outputTokens: response.outputTokens,\n costDollars: response.costDollars,\n };\n },\n});\n","import { z } from \"zod\";\nimport { exa } from \"../app\";\nimport { createExaClient } from \"../client\";\nimport {\n assertCategoryFilters,\n buildSearchContents,\n exaCategorySchema,\n exaSearchResultSchema,\n exaSearchTypeSchema,\n} from \"../schemas\";\n\nexport const ExaSearchInput = z\n .object({\n query: z.string().describe(\"Natural-language search query.\"),\n type: exaSearchTypeSchema.default(\"auto\").describe(\"Search latency/depth profile.\"),\n category: exaCategorySchema\n .optional()\n .describe(\n \"Vertical index: company, people, research paper, news, personal site, financial report.\",\n ),\n numResults: z.number().int().min(1).max(100).default(10),\n includeDomains: z.array(z.string()).max(1200).optional(),\n excludeDomains: z.array(z.string()).max(1200).optional(),\n startPublishedDate: z.string().optional().describe(\"ISO8601 published-after filter.\"),\n endPublishedDate: z.string().optional().describe(\"ISO8601 published-before filter.\"),\n userLocation: z\n .string()\n .length(2)\n .optional()\n .describe(\"Two-letter ISO country code for localized results.\"),\n additionalQueries: z\n .array(z.string())\n .max(10)\n .optional()\n .describe(\"Extra queries for deep search types only.\"),\n systemPrompt: z.string().optional().describe(\"Guides deep search planning.\"),\n highlights: z\n .boolean()\n .default(true)\n .describe(\"Return token-efficient page excerpts (recommended).\"),\n text: z.boolean().optional().describe(\"Include full page markdown text.\"),\n summary: z.boolean().optional().describe(\"Include LLM summary per result.\"),\n })\n .superRefine((input, ctx) => {\n try {\n assertCategoryFilters(input.category, {\n excludeDomains: input.excludeDomains,\n startPublishedDate: input.startPublishedDate,\n endPublishedDate: input.endPublishedDate,\n });\n } catch (error) {\n ctx.addIssue({\n code: \"custom\",\n message: error instanceof Error ? error.message : \"Invalid category filters\",\n });\n }\n });\n\nexport const ExaSearchOutput = z.object({\n requestId: z.string().optional(),\n searchType: z.string().optional(),\n results: z.array(exaSearchResultSchema),\n costDollars: z.object({ total: z.number().optional() }).optional(),\n});\n\nexport const exaSearch = exa.action({\n slug: \"exa-search\",\n name: \"Exa Search\",\n description:\n \"Search the web with Exa. Supports categories (company, people, news, research paper, etc.), filters, and content modes.\",\n input: ExaSearchInput,\n output: ExaSearchOutput,\n async run(input, credentials) {\n const client = createExaClient(credentials.exa.apiKey);\n\n const body: Record<string, unknown> = {\n query: input.query,\n type: input.type,\n numResults: input.numResults,\n };\n\n if (input.category) body.category = input.category;\n if (input.includeDomains?.length) body.includeDomains = input.includeDomains;\n if (input.excludeDomains?.length) body.excludeDomains = input.excludeDomains;\n if (input.startPublishedDate) body.startPublishedDate = input.startPublishedDate;\n if (input.endPublishedDate) body.endPublishedDate = input.endPublishedDate;\n if (input.userLocation) body.userLocation = input.userLocation;\n if (input.additionalQueries?.length) body.additionalQueries = input.additionalQueries;\n if (input.systemPrompt) body.systemPrompt = input.systemPrompt;\n\n const contents = buildSearchContents({\n highlights: input.highlights,\n text: input.text,\n summary: input.summary,\n });\n if (contents) body.contents = contents;\n\n const response = (await client.search(body)) as {\n requestId?: string;\n searchType?: string;\n results?: unknown[];\n costDollars?: { total?: number };\n };\n\n return {\n requestId: response.requestId,\n searchType: response.searchType,\n results: (response.results ?? []).map((row) => exaSearchResultSchema.parse(row)),\n costDollars: response.costDollars,\n };\n },\n});\n","import { z } from \"zod\";\nimport { exa } from \"../app\";\nimport { createExaClient } from \"../client\";\nimport {\n assertCategoryFilters,\n buildSearchContents,\n exaCategorySchema,\n exaGroundingSchema,\n exaSearchResultSchema,\n exaSearchTypeSchema,\n} from \"../schemas\";\n\nexport const ExaSearchStructuredInput = z\n .object({\n query: z.string().describe(\"Natural-language search query.\"),\n outputSchema: z\n .record(z.string(), z.unknown())\n .describe(\"JSON Schema object for structured synthesis output.\"),\n type: exaSearchTypeSchema\n .default(\"deep\")\n .describe(\"Prefer deep or deep-reasoning for synthesis.\"),\n category: exaCategorySchema.optional(),\n numResults: z.number().int().min(1).max(100).default(10),\n includeDomains: z.array(z.string()).max(1200).optional(),\n excludeDomains: z.array(z.string()).max(1200).optional(),\n startPublishedDate: z.string().optional(),\n endPublishedDate: z.string().optional(),\n systemPrompt: z.string().optional(),\n additionalQueries: z.array(z.string()).max(10).optional(),\n highlights: z.boolean().default(true),\n text: z.boolean().optional(),\n })\n .superRefine((input, ctx) => {\n try {\n assertCategoryFilters(input.category, {\n excludeDomains: input.excludeDomains,\n startPublishedDate: input.startPublishedDate,\n endPublishedDate: input.endPublishedDate,\n });\n } catch (error) {\n ctx.addIssue({\n code: \"custom\",\n message: error instanceof Error ? error.message : \"Invalid category filters\",\n });\n }\n });\n\nexport const ExaSearchStructuredOutput = z.object({\n requestId: z.string().optional(),\n searchType: z.string().optional(),\n results: z.array(exaSearchResultSchema),\n output: z\n .object({\n content: z.unknown(),\n grounding: z.array(exaGroundingSchema).optional(),\n })\n .optional(),\n costDollars: z.object({ total: z.number().optional() }).optional(),\n});\n\nexport const exaSearchStructured = exa.action({\n slug: \"exa-search-structured\",\n name: \"Exa Structured Search\",\n description:\n \"Exa search with outputSchema for grounded structured JSON synthesis across sources.\",\n input: ExaSearchStructuredInput,\n output: ExaSearchStructuredOutput,\n async run(input, credentials) {\n const client = createExaClient(credentials.exa.apiKey);\n\n const body: Record<string, unknown> = {\n query: input.query,\n type: input.type,\n numResults: input.numResults,\n outputSchema: input.outputSchema,\n };\n\n if (input.category) body.category = input.category;\n if (input.includeDomains?.length) body.includeDomains = input.includeDomains;\n if (input.excludeDomains?.length) body.excludeDomains = input.excludeDomains;\n if (input.startPublishedDate) body.startPublishedDate = input.startPublishedDate;\n if (input.endPublishedDate) body.endPublishedDate = input.endPublishedDate;\n if (input.systemPrompt) body.systemPrompt = input.systemPrompt;\n if (input.additionalQueries?.length) body.additionalQueries = input.additionalQueries;\n\n const contents = buildSearchContents({\n highlights: input.highlights,\n text: input.text,\n });\n if (contents) body.contents = contents;\n\n const response = (await client.search(body)) as {\n requestId?: string;\n searchType?: string;\n results?: unknown[];\n output?: { content?: unknown; grounding?: unknown[] };\n costDollars?: { total?: number };\n };\n\n return {\n requestId: response.requestId,\n searchType: response.searchType,\n results: (response.results ?? []).map((row) => exaSearchResultSchema.parse(row)),\n output: response.output\n ? {\n content: response.output.content,\n grounding: response.output.grounding?.map((g) => exaGroundingSchema.parse(g)),\n }\n : undefined,\n costDollars: response.costDollars,\n };\n },\n});\n"],"mappings":";;;;AAEA,MAAa,sBAAsBA,IAAAA,EAAE,KAAK;CACxC;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAa,oBAAoBA,IAAAA,EAAE,KAAK;CACtC;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAa,wBAAwBA,IAAAA,EAAE,OAAO;CAC5C,OAAOA,IAAAA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;CACtC,KAAKA,IAAAA,EAAE,OAAO;CACd,IAAIA,IAAAA,EAAE,OAAO,EAAE,SAAS;CACxB,eAAeA,IAAAA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;CAC9C,QAAQA,IAAAA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;CACvC,MAAMA,IAAAA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;CACrC,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,EAAE,SAAS;CACzC,SAASA,IAAAA,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS;CACxC,UAAUA,IAAAA,EAAE,QAAQ,EAAE,SAAS;AACjC,CAAC;AAED,MAAa,6BAA6BA,IAAAA,EAAE,OAAO;CACjD,KAAKA,IAAAA,EAAE,OAAO;CACd,OAAOA,IAAAA,EAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAED,MAAa,qBAAqBA,IAAAA,EAAE,OAAO;CACzC,OAAOA,IAAAA,EAAE,OAAO;CAChB,WAAWA,IAAAA,EAAE,MAAM,0BAA0B;CAC7C,YAAYA,IAAAA,EAAE,KAAK;EAA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AAW,oBAAoB;GACnC,YAAY,MAAM;GAClB,MAAM,MAAM;EACd,CAAC;EACD,IAAI,UAAU,KAAK,WAAW;EAE9B,MAAM,WAAY,MAAM,OAAO,OAAO,IAAI;EAQ1C,OAAO;GACL,WAAW,SAAS;GACpB,YAAY,SAAS;GACrB,UAAU,SAAS,WAAW,CAAC,GAAG,KAAK,QAAQ,sBAAsB,MAAM,GAAG,CAAC;GAC/E,QAAQ,SAAS,SACb;IACE,SAAS,SAAS,OAAO;IACzB,WAAW,SAAS,OAAO,WAAW,KAAK,MAAM,mBAAmB,MAAM,CAAC,CAAC;GAC9E,IACA,KAAA;GACJ,aAAa,SAAS;EACxB;CACF;AACF,CAAC"}
@@ -1,15 +0,0 @@
1
- import { defineApp } from "@keystrokehq/keystroke/app";
2
- import { z } from "zod";
3
- //#region src/app.ts
4
- /** Exa app — one static `apiKey` credential, actions defined via `exa.action(...)`. */
5
- const exa = defineApp({
6
- slug: "exa",
7
- auth: "api_key",
8
- credential: { apiKey: z.string() }
9
- });
10
- /** @deprecated Use `exa.credential`. */
11
- const exaCredential = exa.credential;
12
- //#endregion
13
- export { exaCredential as n, exa as t };
14
-
15
- //# sourceMappingURL=app-CBLUruR0.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-CBLUruR0.mjs","names":[],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\n/** Exa app — one static `apiKey` credential, actions defined via `exa.action(...)`. */\nexport const exa = defineApp({\n slug: \"exa\",\n auth: \"api_key\",\n credential: { apiKey: z.string() },\n});\n\n/** @deprecated Use `exa.credential`. */\nexport const exaCredential = exa.credential;\n"],"mappings":";;;;AAIA,MAAa,MAAM,UAAU;CAC3B,MAAM;CACN,MAAM;CACN,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE;AACnC,CAAC;;AAGD,MAAa,gBAAgB,IAAI"}
@@ -1,26 +0,0 @@
1
- let _keystrokehq_keystroke_app = require("@keystrokehq/keystroke/app");
2
- let zod = require("zod");
3
- //#region src/app.ts
4
- /** Exa app — one static `apiKey` credential, actions defined via `exa.action(...)`. */
5
- const exa = (0, _keystrokehq_keystroke_app.defineApp)({
6
- slug: "exa",
7
- auth: "api_key",
8
- credential: { apiKey: zod.z.string() }
9
- });
10
- /** @deprecated Use `exa.credential`. */
11
- const exaCredential = exa.credential;
12
- //#endregion
13
- Object.defineProperty(exports, "exa", {
14
- enumerable: true,
15
- get: function() {
16
- return exa;
17
- }
18
- });
19
- Object.defineProperty(exports, "exaCredential", {
20
- enumerable: true,
21
- get: function() {
22
- return exaCredential;
23
- }
24
- });
25
-
26
- //# sourceMappingURL=app-DMujvH6I.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-DMujvH6I.cjs","names":["z"],"sources":["../src/app.ts"],"sourcesContent":["import { defineApp } from \"@keystrokehq/keystroke/app\";\nimport { z } from \"zod\";\n\n/** Exa app — one static `apiKey` credential, actions defined via `exa.action(...)`. */\nexport const exa = defineApp({\n slug: \"exa\",\n auth: \"api_key\",\n credential: { apiKey: z.string() },\n});\n\n/** @deprecated Use `exa.credential`. */\nexport const exaCredential = exa.credential;\n"],"mappings":";;;;AAIA,MAAa,OAAA,GAAA,2BAAA,WAAgB;CAC3B,MAAM;CACN,MAAM;CACN,YAAY,EAAE,QAAQA,IAAAA,EAAE,OAAO,EAAE;AACnC,CAAC;;AAGD,MAAa,gBAAgB,IAAI"}
@@ -1,56 +0,0 @@
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
- let ky = require("ky");
24
- ky = __toESM(ky, 1);
25
- //#region src/client.ts
26
- const EXA_API_BASE = "https://api.exa.ai";
27
- function resolveCreateExaClientOptions(options) {
28
- return typeof options === "string" ? { apiKey: options } : options;
29
- }
30
- function createExaClient(options) {
31
- const resolved = resolveCreateExaClientOptions(options);
32
- const headers = {
33
- "Content-Type": "application/json",
34
- ...resolved.headers
35
- };
36
- if (resolved.apiKey) headers["x-api-key"] = resolved.apiKey;
37
- const api = ky.default.create({
38
- prefix: `${(resolved.baseUrl ?? EXA_API_BASE).replace(/\/+$/, "")}/`,
39
- headers
40
- });
41
- return {
42
- search: (body) => api.post("search", { json: body }).json(),
43
- contents: (body) => api.post("contents", { json: body }).json(),
44
- answer: (body) => api.post("answer", { json: body }).json(),
45
- context: (body) => api.post("context", { json: body }).json()
46
- };
47
- }
48
- //#endregion
49
- Object.defineProperty(exports, "createExaClient", {
50
- enumerable: true,
51
- get: function() {
52
- return createExaClient;
53
- }
54
- });
55
-
56
- //# sourceMappingURL=client-DlwHA71b.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-DlwHA71b.cjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import ky, { type KyInstance } from \"ky\";\n\nconst EXA_API_BASE = \"https://api.exa.ai\";\n\nexport type ExaClient = {\n search: (body: Record<string, unknown>) => Promise<unknown>;\n contents: (body: Record<string, unknown>) => Promise<unknown>;\n answer: (body: Record<string, unknown>) => Promise<unknown>;\n context: (body: Record<string, unknown>) => Promise<unknown>;\n};\n\nexport type CreateExaClientOptions = {\n /** Sent as x-api-key. Omit when using custom headers (e.g. platform proxy). */\n apiKey?: string;\n /** Defaults to https://api.exa.ai */\n baseUrl?: string;\n headers?: Record<string, string>;\n};\n\nfunction resolveCreateExaClientOptions(\n options: CreateExaClientOptions | string,\n): CreateExaClientOptions {\n return typeof options === \"string\" ? { apiKey: options } : options;\n}\n\nexport function createExaClient(options: CreateExaClientOptions | string): ExaClient {\n const resolved = resolveCreateExaClientOptions(options);\n const headers: Record<string, string> = {\n \"Content-Type\": \"application/json\",\n ...resolved.headers,\n };\n\n if (resolved.apiKey) {\n headers[\"x-api-key\"] = resolved.apiKey;\n }\n\n const api: KyInstance = ky.create({\n prefix: `${(resolved.baseUrl ?? EXA_API_BASE).replace(/\\/+$/, \"\")}/`,\n headers,\n });\n\n return {\n search: (body) => api.post(\"search\", { json: body }).json(),\n contents: (body) => api.post(\"contents\", { json: body }).json(),\n answer: (body) => api.post(\"answer\", { json: body }).json(),\n context: (body) => api.post(\"context\", { json: body }).json(),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,eAAe;AAiBrB,SAAS,8BACP,SACwB;CACxB,OAAO,OAAO,YAAY,WAAW,EAAE,QAAQ,QAAQ,IAAI;AAC7D;AAEA,SAAgB,gBAAgB,SAAqD;CACnF,MAAM,WAAW,8BAA8B,OAAO;CACtD,MAAM,UAAkC;EACtC,gBAAgB;EAChB,GAAG,SAAS;CACd;CAEA,IAAI,SAAS,QACX,QAAQ,eAAe,SAAS;CAGlC,MAAM,MAAkB,GAAA,QAAG,OAAO;EAChC,QAAQ,IAAI,SAAS,WAAW,cAAc,QAAQ,QAAQ,EAAE,EAAE;EAClE;CACF,CAAC;CAED,OAAO;EACL,SAAS,SAAS,IAAI,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC,EAAE,KAAK;EAC1D,WAAW,SAAS,IAAI,KAAK,YAAY,EAAE,MAAM,KAAK,CAAC,EAAE,KAAK;EAC9D,SAAS,SAAS,IAAI,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC,EAAE,KAAK;EAC1D,UAAU,SAAS,IAAI,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC,EAAE,KAAK;CAC9D;AACF"}