@howells/fieldwork-sdk 0.10.2 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -16
- package/dist/{adapter-DWYJys20.js → adapter-CBSAfErv.js} +1 -1
- package/dist/adapter-J2yatZJ0.d.ts +73 -0
- package/dist/best-CO9liYDa.js +1436 -0
- package/dist/brave.d.ts +7 -6
- package/dist/brave.js +180 -173
- package/dist/browserbase.d.ts +4 -3
- package/dist/browserbase.js +185 -170
- package/dist/{document-DMIUCoDA.js → document-BSCwJgBM.js} +4 -4
- package/dist/{download-CP8noBdX.js → download-kuTqNnuZ.js} +1 -1
- package/dist/{adapter-DQrBP1tj.d.ts → errors-gMtejKHc.d.ts} +111 -70
- package/dist/exa.d.ts +18 -11
- package/dist/exa.js +306 -275
- package/dist/fieldwork-D7npPoUf.d.ts +35 -0
- package/dist/firecrawl.d.ts +4 -3
- package/dist/firecrawl.js +450 -417
- package/dist/{parse-Q7H4mrnO.js → http-CJcvTPnE.js} +223 -225
- package/dist/image.d.ts +253 -0
- package/dist/image.js +1 -0
- package/dist/index.d.ts +6 -7
- package/dist/index.js +67 -82
- package/dist/{job-DnavRq_s.js → job-JLEpszjr.js} +9 -9
- package/dist/kernel.d.ts +20 -2
- package/dist/kernel.js +65 -19
- package/dist/llamaparse.d.ts +3 -2
- package/dist/llamaparse.js +16 -16
- package/dist/parallel.d.ts +9 -9
- package/dist/parallel.js +423 -389
- package/dist/path-DO2llIdp.js +10 -0
- package/dist/perplexity.d.ts +6 -5
- package/dist/perplexity.js +21 -21
- package/dist/reducto.d.ts +3 -2
- package/dist/reducto.js +14 -14
- package/dist/{schema-BFjS6CSz.d.ts → schema-C9xzRkKJ.d.ts} +17 -6
- package/dist/{schema--iU4AXSM.js → schema-CJXFAZ-x.js} +12 -3
- package/dist/serpapi.d.ts +63 -5
- package/dist/serpapi.js +374 -144
- package/dist/tavily.d.ts +4 -3
- package/dist/tavily.js +247 -234
- package/dist/tools.d.ts +76 -15
- package/dist/tools.js +522 -154
- package/dist/{types-rc8bl8Em.js → types-mq6d6YOK.js} +1 -0
- package/dist/{util-DFUXQX6v.js → util-LvME_uOj.js} +35 -11
- package/package.json +7 -2
- package/dist/fieldwork-JCfyw58T.d.ts +0 -113
- package/dist/path-DL5P8XH2.js +0 -17
- package/dist/util-DhYr1OS3.d.ts +0 -1
- package/dist/{errors-DkFJysIM.js → errors-gpxg6Tnh.js} +5 -5
package/dist/exa.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as RawClient, t as Adapter } from "./adapter-J2yatZJ0.js";
|
|
2
|
+
import { B as Page, L as MonitorEvents, Q as SearchResponse, R as MonitorInfo, T as Extraction, V as PageBatch, Y as Research, a as Answer, at as JsonObject, l as CallOptions, z as MonitorSchedule } from "./errors-gMtejKHc.js";
|
|
3
|
+
import { t as OutputSchema } from "./schema-C9xzRkKJ.js";
|
|
3
4
|
/** Settings for the Exa adapter. */
|
|
4
5
|
interface ExaConfig {
|
|
5
6
|
/** Defaults to the EXA_API_KEY environment variable. */
|
|
@@ -22,7 +23,7 @@ type ExaOutputSchema = {
|
|
|
22
23
|
} | {
|
|
23
24
|
type: "object";
|
|
24
25
|
description?: string;
|
|
25
|
-
properties?:
|
|
26
|
+
properties?: JsonObject;
|
|
26
27
|
required?: string[];
|
|
27
28
|
additionalProperties?: boolean;
|
|
28
29
|
};
|
|
@@ -30,8 +31,6 @@ type ExaOutputSchema = {
|
|
|
30
31
|
interface ExaHighlightOptions {
|
|
31
32
|
/** Guides which passages Exa picks. Defaults to the search query. */
|
|
32
33
|
query?: string;
|
|
33
|
-
/** Total highlight length per page, in characters. */
|
|
34
|
-
maxCharacters?: number;
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* Options for `search`. Combinations Exa does not accept (`lite` with the
|
|
@@ -48,7 +47,8 @@ interface ExaSearchOptions extends CallOptions {
|
|
|
48
47
|
* `deep-reasoning` are legacy: Exa still accepts them and names `lite` (for
|
|
49
48
|
* the first two) and `deep` as their replacements. `lite` accepts only
|
|
50
49
|
* `limit`, `category`, `includeDomains`, `excludeDomains`, `publishedAfter`,
|
|
51
|
-
* `publishedBefore`, `country`, `moderation`, `content` and
|
|
50
|
+
* `publishedBefore`, `country`, `moderation`, `content`, `highlights` and
|
|
51
|
+
* `maxCharsPerResult`.
|
|
52
52
|
*/
|
|
53
53
|
type?: "auto" | "lite" | "deep-lite" | "deep" | "instant" | "fast" | "deep-reasoning";
|
|
54
54
|
/**
|
|
@@ -76,6 +76,11 @@ interface ExaSearchOptions extends CallOptions {
|
|
|
76
76
|
* page.
|
|
77
77
|
*/
|
|
78
78
|
highlights?: boolean | ExaHighlightOptions;
|
|
79
|
+
/**
|
|
80
|
+
* Cap on the characters of highlights returned for each result. Refused with
|
|
81
|
+
* `highlights: false`.
|
|
82
|
+
*/
|
|
83
|
+
maxCharsPerResult?: number;
|
|
79
84
|
/**
|
|
80
85
|
* A generated summary of each page, kept in `raw` (the normalized result has
|
|
81
86
|
* no summary field). Not available on `lite`.
|
|
@@ -104,8 +109,10 @@ interface ExaSearchOptions extends CallOptions {
|
|
|
104
109
|
interface ExaReadOptions extends CallOptions {
|
|
105
110
|
/** Return passages that answer this query as `excerpts`. */
|
|
106
111
|
query?: string;
|
|
107
|
-
/**
|
|
108
|
-
|
|
112
|
+
/** Cap on the characters of highlights returned as `excerpts` for each page. */
|
|
113
|
+
maxCharsPerResult?: number;
|
|
114
|
+
/** Cap on the characters of the page text returned as `markdown` for each page. */
|
|
115
|
+
maxContentChars?: number;
|
|
109
116
|
/** Seconds a cached copy may be old; 0 fetches fresh, a negative value reads only the cache. */
|
|
110
117
|
maxAge?: number;
|
|
111
118
|
/** Read Exa's stored copy of the page as of this ISO date or date-time. */
|
|
@@ -162,8 +169,8 @@ interface ExaResearchOptions<T = unknown> extends CallOptions {
|
|
|
162
169
|
systemPrompt?: string;
|
|
163
170
|
/** Records for the run to enrich, and records it must not return. */
|
|
164
171
|
input?: {
|
|
165
|
-
data?:
|
|
166
|
-
exclusion?:
|
|
172
|
+
data?: JsonObject[];
|
|
173
|
+
exclusion?: JsonObject[];
|
|
167
174
|
};
|
|
168
175
|
/** The `continuationId` of an earlier completed run, which this run builds on. */
|
|
169
176
|
continueFrom?: string;
|
|
@@ -234,7 +241,7 @@ interface ExaOperations {
|
|
|
234
241
|
monitor: ExaMonitor;
|
|
235
242
|
}
|
|
236
243
|
/**
|
|
237
|
-
* An adapter for Exa: search, read, readMany, extract, answer, research and monitor. Pass it to `
|
|
244
|
+
* An adapter for Exa: search, read, readMany, extract, answer, research and monitor. Pass it to `fieldwork({ adapter })`.
|
|
238
245
|
*
|
|
239
246
|
* Throws `Unauthorized` when neither `apiKey` nor `EXA_API_KEY` is set.
|
|
240
247
|
*/
|