@howells/fieldwork-sdk 0.8.0 → 0.9.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 +1 -1
- package/dist/{adapter-Dqy-6BiH.d.ts → adapter-DuJkoVWY.d.ts} +9 -0
- package/dist/brave.d.ts +1 -1
- package/dist/browserbase.d.ts +1 -1
- package/dist/exa.d.ts +2 -2
- package/dist/{fieldwork-CAGMQ2Cu.d.ts → fieldwork-Bhl4401B.d.ts} +1 -1
- package/dist/firecrawl.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/llamaparse.d.ts +2 -2
- package/dist/llamaparse.js +40 -15
- package/dist/parallel.d.ts +2 -2
- package/dist/perplexity.d.ts +2 -2
- package/dist/reducto.d.ts +1 -1
- package/dist/{schema-B23Z08Ds.d.ts → schema-_iwQlBZE.d.ts} +1 -1
- package/dist/serpapi.d.ts +1 -1
- package/dist/tavily.d.ts +2 -2
- package/dist/tools.d.ts +2 -2
- package/dist/tools.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ Every result is normalized and keeps the provider's response in `raw`. Most also
|
|
|
104
104
|
- `answer` returns `{ answer, output, citations, continuationId }`.
|
|
105
105
|
- `research` returns `{ id, status, output, sources, fields, continuationId }`. `output` follows your schema when you pass one, otherwise it is the report text.
|
|
106
106
|
- `crawl` returns `{ pages, failed, robotsBlocked, total }`.
|
|
107
|
-
- `parse` returns `{ id, markdown, pages, blocks, pageCount }`. With `blocks: true`, `blocks` lists the layout in reading order: each block's `page`, `type` (the provider's own word), `text` and `box`. With `wordBoxes: true` (LlamaParse and Reducto), blocks also carry `words` and table `cells`, each with its own box. LlamaParse also places each line: a block's `lines` and a cell's `lines` are `{ text, box }`, the text being the line's part of the block's or cell's text, Markdown included. A table's `words` and `lines` are its cells', in reading order. Reducto places no lines. With `pageImages: true` (LlamaParse), each page carries `image`, an address for a picture of the page that expires after about an hour; `parse({ resume: id, pageImages: true })` collects fresh addresses without the file. Every box is `{ left, top, width, height }` in fractions of the page from its top-left corner, whatever units the provider used, so boxes from different providers line up.
|
|
107
|
+
- `parse` returns `{ id, markdown, pages, blocks, pageCount }`. With `blocks: true`, `blocks` lists the layout in reading order: each block's `page`, `type` (the provider's own word), `text` and `box`. With `wordBoxes: true` (LlamaParse and Reducto), blocks also carry `words` and table `cells`, each with its own box. LlamaParse also places each line: a block's `lines` and a cell's `lines` are `{ text, box }`, the text being the line's part of the block's or cell's text, Markdown included. A table's `words` and `lines` are its cells', in reading order. Reducto places no lines. LlamaParse also gives a cell that sits in several boxes each of them as `boxes`, with `box` enclosing them; marks a block read out of a page header or footer with `container: "header"` or `"footer"`; and, with `blocks` or `wordBoxes`, gives each page its `width` and `height` in points. With `pageImages: true` (LlamaParse), each page carries `image`, an address for a picture of the page that expires after about an hour; `parse({ resume: id, pageImages: true })` collects fresh addresses without the file. Every box is `{ left, top, width, height }` in fractions of the page from its top-left corner, whatever units the provider used, so boxes from different providers line up.
|
|
108
108
|
|
|
109
109
|
A job that stopped early but produced output, for example on a credit or step limit, returns `status: "partial"` with `stopReason`. A job with no usable output throws `JobFailed`.
|
|
110
110
|
|
|
@@ -392,6 +392,10 @@ interface DocumentPage {
|
|
|
392
392
|
markdown: string;
|
|
393
393
|
/** An address for a picture of the page, when the parse asked for page images. It expires. */
|
|
394
394
|
image?: string;
|
|
395
|
+
/** The page's width in points (1/72 inch), when the provider gives it with the blocks. */
|
|
396
|
+
width?: number;
|
|
397
|
+
/** The page's height in points (1/72 inch), when the provider gives it with the blocks. */
|
|
398
|
+
height?: number;
|
|
395
399
|
}
|
|
396
400
|
/**
|
|
397
401
|
* Where something sits on its page, as fractions of the page's width and
|
|
@@ -423,7 +427,10 @@ interface TableCell {
|
|
|
423
427
|
/** Columns the cell spans, when more than one. */
|
|
424
428
|
columnSpan?: number;
|
|
425
429
|
text: string;
|
|
430
|
+
/** Encloses every box of the cell. */
|
|
426
431
|
box?: Box;
|
|
432
|
+
/** Each box the provider gives for the cell, in its order, when it gives them one by one: a cell can sit in several. */
|
|
433
|
+
boxes?: Box[];
|
|
427
434
|
/** Where each line of the cell sits, when the provider places lines. */
|
|
428
435
|
lines?: LineBox[];
|
|
429
436
|
}
|
|
@@ -436,6 +443,8 @@ interface DocumentBlock {
|
|
|
436
443
|
/** The block's content as the provider gave it: Markdown, or HTML for some tables. */
|
|
437
444
|
text: string;
|
|
438
445
|
box?: Box;
|
|
446
|
+
/** The page header or footer the provider read this block out of, when it was in one. */
|
|
447
|
+
container?: "header" | "footer";
|
|
439
448
|
/** Where each word sits, when the parse asked for word boxes. */
|
|
440
449
|
words?: WordBox[];
|
|
441
450
|
/** Where each line sits, a table's cell lines included, when the parse asked for word boxes and the provider places lines. */
|
package/dist/brave.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Recency, M as ImageSearch, Z as SearchResponse, a as RawClient, l as Answer, p as CallOptions, t as Adapter } from "./adapter-
|
|
1
|
+
import { J as Recency, M as ImageSearch, Z as SearchResponse, a as RawClient, l as Answer, p as CallOptions, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
/** Settings for `brave()`. */
|
|
3
3
|
interface BraveConfig {
|
|
4
4
|
/** Defaults to the BRAVE_API_KEY environment variable. */
|
package/dist/browserbase.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Page, Z as SearchResponse, a as RawClient, d as BrowserSession, p as CallOptions, s as AccountUsage, t as Adapter } from "./adapter-
|
|
1
|
+
import { B as Page, Z as SearchResponse, a as RawClient, d as BrowserSession, p as CallOptions, s as AccountUsage, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
/** Settings for `browserbase()`. */
|
|
3
3
|
export interface BrowserbaseConfig {
|
|
4
4
|
/** Defaults to the BROWSERBASE_API_KEY environment variable. */
|
package/dist/exa.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Page, D as Extraction, L as MonitorEvents, R as MonitorInfo, V as PageBatch, Y as Research, Z as SearchResponse, a as RawClient, l as Answer, p as CallOptions, t as Adapter, z as MonitorSchedule } from "./adapter-
|
|
2
|
-
import { t as OutputSchema } from "./schema-
|
|
1
|
+
import { B as Page, D as Extraction, L as MonitorEvents, R as MonitorInfo, V as PageBatch, Y as Research, Z as SearchResponse, a as RawClient, l as Answer, p as CallOptions, t as Adapter, z as MonitorSchedule } from "./adapter-DuJkoVWY.js";
|
|
2
|
+
import { t as OutputSchema } from "./schema-_iwQlBZE.js";
|
|
3
3
|
/** Settings for the Exa adapter. */
|
|
4
4
|
interface ExaConfig {
|
|
5
5
|
/** Defaults to the EXA_API_KEY environment variable. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as Capability, n as AnyAdapter } from "./adapter-
|
|
1
|
+
import { m as Capability, n as AnyAdapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
/** Why a call failed. Branch on this, not on the message, which can change. */
|
|
3
3
|
type FieldworkErrorCode =
|
|
4
4
|
/** The adapter's provider does not offer this capability. */
|
package/dist/firecrawl.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Page, C as DocumentInput, D as Extraction, G as Product, H as ParsedDocument, J as Recency, L as MonitorEvents, M as ImageSearch, R as MonitorInfo, V as PageBatch, Y as Research, Z as SearchResponse, _ as Crawl, a as RawClient, c as ActResult, d as BrowserSession, et as SiteMap, p as CallOptions, s as AccountUsage, t as Adapter, z as MonitorSchedule } from "./adapter-
|
|
2
|
-
import { t as OutputSchema } from "./schema-
|
|
1
|
+
import { B as Page, C as DocumentInput, D as Extraction, G as Product, H as ParsedDocument, J as Recency, L as MonitorEvents, M as ImageSearch, R as MonitorInfo, V as PageBatch, Y as Research, Z as SearchResponse, _ as Crawl, a as RawClient, c as ActResult, d as BrowserSession, et as SiteMap, p as CallOptions, s as AccountUsage, t as Adapter, z as MonitorSchedule } from "./adapter-DuJkoVWY.js";
|
|
2
|
+
import { t as OutputSchema } from "./schema-_iwQlBZE.js";
|
|
3
3
|
/** Settings for the Firecrawl adapter. */
|
|
4
4
|
interface FirecrawlConfig {
|
|
5
5
|
/** Defaults to the FIRECRAWL_API_KEY environment variable. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as SiteLink, A as GROUP_CAPABILITIES, B as Page, C as DocumentInput, D as Extraction, E as Entity, F as Meta, G as Product, H as ParsedDocument, I as MonitorEvent, J as Recency, K as ProductImage, L as MonitorEvents, M as ImageSearch, N as JsonSchema, O as FailedUrl, P as LineBox, Q as SearchResult, R as MonitorInfo, S as DocumentBlock, T as DocumentUrl, U as Place, V as PageBatch, W as Price, X as RunStatus, Y as Research, Z as SearchResponse, _ as Crawl, a as RawClient, b as Decisions, c as ActResult, d as BrowserSession, et as SiteMap, f as CAPABILITIES, g as Condition, h as Citation, i as defineAdapter, j as ImageResult, k as FieldSource, l as Answer, m as Capability, n as AnyAdapter, nt as Usage, o as RequestOptions, p as CallOptions, q as ProductVariant, r as Operations, rt as WordBox, s as AccountUsage, t as Adapter, tt as TableCell, u as Box, v as DecisionAnswer, w as DocumentPage, x as Discovery, y as DecisionQuestion, z as MonitorSchedule } from "./adapter-
|
|
2
|
-
import { i as FieldworkErrorCode, n as FieldworkOptions, r as FieldworkError, t as Fieldwork } from "./fieldwork-
|
|
3
|
-
import { n as StandardSchemaWithJSON, t as OutputSchema } from "./schema-
|
|
1
|
+
import { $ as SiteLink, A as GROUP_CAPABILITIES, B as Page, C as DocumentInput, D as Extraction, E as Entity, F as Meta, G as Product, H as ParsedDocument, I as MonitorEvent, J as Recency, K as ProductImage, L as MonitorEvents, M as ImageSearch, N as JsonSchema, O as FailedUrl, P as LineBox, Q as SearchResult, R as MonitorInfo, S as DocumentBlock, T as DocumentUrl, U as Place, V as PageBatch, W as Price, X as RunStatus, Y as Research, Z as SearchResponse, _ as Crawl, a as RawClient, b as Decisions, c as ActResult, d as BrowserSession, et as SiteMap, f as CAPABILITIES, g as Condition, h as Citation, i as defineAdapter, j as ImageResult, k as FieldSource, l as Answer, m as Capability, n as AnyAdapter, nt as Usage, o as RequestOptions, p as CallOptions, q as ProductVariant, r as Operations, rt as WordBox, s as AccountUsage, t as Adapter, tt as TableCell, u as Box, v as DecisionAnswer, w as DocumentPage, x as Discovery, y as DecisionQuestion, z as MonitorSchedule } from "./adapter-DuJkoVWY.js";
|
|
2
|
+
import { i as FieldworkErrorCode, n as FieldworkOptions, r as FieldworkError, t as Fieldwork } from "./fieldwork-Bhl4401B.js";
|
|
3
|
+
import { n as StandardSchemaWithJSON, t as OutputSchema } from "./schema-_iwQlBZE.js";
|
|
4
4
|
/** Which adapter serves each capability, for `router`. */
|
|
5
5
|
type Routes = Partial<Record<Capability, AnyAdapter>>;
|
|
6
6
|
/** Each route must name an adapter whose provider offers that capability. */
|
package/dist/kernel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as Page, a as RawClient, d as BrowserSession, p as CallOptions, t as Adapter } from "./adapter-
|
|
1
|
+
import { B as Page, a as RawClient, d as BrowserSession, p as CallOptions, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
/** Settings for `kernel()`. */
|
|
3
3
|
export interface KernelConfig {
|
|
4
4
|
/** Defaults to the KERNEL_API_KEY environment variable. */
|
package/dist/llamaparse.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as DocumentInput, H as ParsedDocument, T as DocumentUrl, a as RawClient, p as CallOptions, t as Adapter } from "./adapter-
|
|
1
|
+
import { C as DocumentInput, H as ParsedDocument, T as DocumentUrl, a as RawClient, p as CallOptions, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
/** Settings for `llamaparse()`. */
|
|
3
3
|
export interface LlamaParseConfig {
|
|
4
4
|
/** Defaults to the LLAMA_CLOUD_API_KEY environment variable. */
|
|
@@ -21,7 +21,7 @@ export interface LlamaParseParseOptions extends CallOptions {
|
|
|
21
21
|
tier?: LlamaParseTier;
|
|
22
22
|
/** The parser version: "latest" (the default) or a date such as "2026-09-28". */
|
|
23
23
|
version?: string;
|
|
24
|
-
/** Return layout blocks with positions. */
|
|
24
|
+
/** Return layout blocks with positions, and each page's size in points. */
|
|
25
25
|
blocks?: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Also return where each word, line and table cell sits in each block, and
|
package/dist/llamaparse.js
CHANGED
|
@@ -23,8 +23,12 @@ const Line = looseObject({
|
|
|
23
23
|
span: arrayOf(z.number()),
|
|
24
24
|
words: arrayOf(Word)
|
|
25
25
|
});
|
|
26
|
+
const OneBox = z.record(z.string(), z.unknown());
|
|
27
|
+
const BoxList = arrayOf(PointBox);
|
|
28
|
+
/** A list of boxes; one box on its own reads as a list of one, and anything else as none. */
|
|
29
|
+
const PointBoxes = z.prefault(z.pipe(z.unknown(), z.transform((value) => z.parse(BoxList, z.safeParse(OneBox, value).success ? [value] : value))), []);
|
|
26
30
|
const Cell = looseObject({
|
|
27
|
-
bbox:
|
|
31
|
+
bbox: PointBoxes,
|
|
28
32
|
lines: arrayOf(Line)
|
|
29
33
|
});
|
|
30
34
|
/** An item of a page. Its own `items` (a header's, a list's) are read one level at a time. */
|
|
@@ -107,8 +111,10 @@ const tableOf = (item, size) => {
|
|
|
107
111
|
const text = item.rows[row]?.[column];
|
|
108
112
|
if (text !== void 0) {
|
|
109
113
|
const inCell = grounded(cell.lines, text, size);
|
|
114
|
+
const boxes = cell.bbox.map((box) => fraction(box, size)).filter((box) => box !== void 0);
|
|
110
115
|
cells.push(compact({
|
|
111
|
-
box:
|
|
116
|
+
box: enclosing(boxes),
|
|
117
|
+
boxes: boxes.length > 0 ? boxes : void 0,
|
|
112
118
|
column,
|
|
113
119
|
lines: inCell.lines.length > 0 ? inCell.lines : void 0,
|
|
114
120
|
row,
|
|
@@ -124,14 +130,17 @@ const tableOf = (item, size) => {
|
|
|
124
130
|
words
|
|
125
131
|
};
|
|
126
132
|
};
|
|
127
|
-
|
|
128
|
-
|
|
133
|
+
/** The page header or footer an item is, if it is one. */
|
|
134
|
+
const containerOf = (item) => item.type === "header" || item.type === "footer" ? item.type : void 0;
|
|
135
|
+
const blocksOfItem = (item, page, size, container) => {
|
|
136
|
+
if (item.items.length > 0) return item.items.flatMap((child) => blocksOfItem(z.parse(Item, child), page, size, container ?? containerOf(item)));
|
|
129
137
|
const text = item.md ?? item.value ?? "";
|
|
130
|
-
if (size === void 0) return [{
|
|
138
|
+
if (size === void 0) return [compact({
|
|
139
|
+
container,
|
|
131
140
|
page,
|
|
132
141
|
text,
|
|
133
142
|
type: item.type ?? "unknown"
|
|
134
|
-
}];
|
|
143
|
+
})];
|
|
135
144
|
const table = tableOf(item, size);
|
|
136
145
|
const own = grounded(item.grounding.lines, text, size);
|
|
137
146
|
const lines = [...own.lines, ...table.lines];
|
|
@@ -139,6 +148,7 @@ const blocksOfItem = (item, page, size) => {
|
|
|
139
148
|
return [compact({
|
|
140
149
|
box: around(item.bbox, size),
|
|
141
150
|
cells: table.cells.length > 0 ? table.cells : void 0,
|
|
151
|
+
container,
|
|
142
152
|
lines: lines.length > 0 ? lines : void 0,
|
|
143
153
|
page,
|
|
144
154
|
text,
|
|
@@ -146,14 +156,25 @@ const blocksOfItem = (item, page, size) => {
|
|
|
146
156
|
words: words.length > 0 ? words : void 0
|
|
147
157
|
})];
|
|
148
158
|
};
|
|
159
|
+
/** A page's size in points, when LlamaParse gave a usable one. */
|
|
160
|
+
const sizeOf = (entry) => entry.page_width !== void 0 && entry.page_height !== void 0 && entry.page_width > 0 && entry.page_height > 0 ? {
|
|
161
|
+
height: entry.page_height,
|
|
162
|
+
width: entry.page_width
|
|
163
|
+
} : void 0;
|
|
164
|
+
/** Each page's size in points, by page number. */
|
|
165
|
+
const pageSizes = (pages) => {
|
|
166
|
+
const sizes = /* @__PURE__ */ new Map();
|
|
167
|
+
for (const entry of pages) {
|
|
168
|
+
const size = sizeOf(entry);
|
|
169
|
+
if (entry.page_number !== void 0 && size !== void 0) sizes.set(entry.page_number, size);
|
|
170
|
+
}
|
|
171
|
+
return sizes;
|
|
172
|
+
};
|
|
149
173
|
/** The blocks of each page, its boxes turned from points into fractions of the page. */
|
|
150
174
|
const documentBlocks = (pages) => pages.flatMap((entry) => {
|
|
151
175
|
const page = entry.page_number;
|
|
152
176
|
if (page === void 0) return [];
|
|
153
|
-
const size = entry
|
|
154
|
-
height: entry.page_height,
|
|
155
|
-
width: entry.page_width
|
|
156
|
-
} : void 0;
|
|
177
|
+
const size = sizeOf(entry);
|
|
157
178
|
return entry.items.flatMap((item) => blocksOfItem(item, page, size));
|
|
158
179
|
});
|
|
159
180
|
// src/adapters/llamaparse.ts
|
|
@@ -243,6 +264,10 @@ const parsedDocument = async (found, id, o, read) => {
|
|
|
243
264
|
});
|
|
244
265
|
const grounded = o.wordBoxes === true ? await groundedPages(found, read) : void 0;
|
|
245
266
|
const images = o.pageImages === true ? pageImageAddresses(found, id) : void 0;
|
|
267
|
+
let laidOut;
|
|
268
|
+
if (grounded !== void 0) laidOut = grounded.map((row) => z.parse(ItemsPage, row));
|
|
269
|
+
else if (o.blocks === true) laidOut = found.value.items.pages;
|
|
270
|
+
const sizes = laidOut === void 0 ? void 0 : pageSizes(laidOut);
|
|
246
271
|
const pages = found.value.markdown.pages.flatMap((page) => {
|
|
247
272
|
if (page.page_number === void 0) return [];
|
|
248
273
|
const image = images?.get(page.page_number);
|
|
@@ -250,17 +275,17 @@ const parsedDocument = async (found, id, o, read) => {
|
|
|
250
275
|
cause: found.original,
|
|
251
276
|
provider
|
|
252
277
|
});
|
|
278
|
+
const size = sizes?.get(page.page_number);
|
|
253
279
|
return [compact({
|
|
280
|
+
height: size?.height,
|
|
254
281
|
image,
|
|
255
282
|
markdown: page.markdown ?? "",
|
|
256
|
-
pageNumber: page.page_number
|
|
283
|
+
pageNumber: page.page_number,
|
|
284
|
+
width: size?.width
|
|
257
285
|
})];
|
|
258
286
|
});
|
|
259
|
-
let laidOut;
|
|
260
|
-
if (grounded !== void 0) laidOut = documentBlocks(grounded.map((row) => z.parse(ItemsPage, row)));
|
|
261
|
-
else if (o.blocks === true) laidOut = documentBlocks(found.value.items.pages);
|
|
262
287
|
return compact({
|
|
263
|
-
blocks: laidOut,
|
|
288
|
+
blocks: laidOut === void 0 ? void 0 : documentBlocks(laidOut),
|
|
264
289
|
id,
|
|
265
290
|
markdown: pages.map((page) => page.markdown).join("\n\n"),
|
|
266
291
|
meta: meta({ credits: found.value.job.usage.credits }),
|
package/dist/parallel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Page, D as Extraction, L as MonitorEvents, M as ImageSearch, R as MonitorInfo, V as PageBatch, Y as Research, Z as SearchResponse, a as RawClient, b as Decisions, g as Condition, l as Answer, p as CallOptions, t as Adapter, x as Discovery, y as DecisionQuestion, z as MonitorSchedule } from "./adapter-
|
|
2
|
-
import { t as OutputSchema } from "./schema-
|
|
1
|
+
import { B as Page, D as Extraction, L as MonitorEvents, M as ImageSearch, R as MonitorInfo, V as PageBatch, Y as Research, Z as SearchResponse, a as RawClient, b as Decisions, g as Condition, l as Answer, p as CallOptions, t as Adapter, x as Discovery, y as DecisionQuestion, z as MonitorSchedule } from "./adapter-DuJkoVWY.js";
|
|
2
|
+
import { t as OutputSchema } from "./schema-_iwQlBZE.js";
|
|
3
3
|
import "./util-DhYr1OS3.js";
|
|
4
4
|
/** Settings for `parallel()`. */
|
|
5
5
|
interface ParallelConfig {
|
package/dist/perplexity.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as Recency, Y as Research, Z as SearchResponse, a as RawClient, b as Decisions, l as Answer, p as CallOptions, t as Adapter, y as DecisionQuestion } from "./adapter-
|
|
2
|
-
import { t as OutputSchema } from "./schema-
|
|
1
|
+
import { J as Recency, Y as Research, Z as SearchResponse, a as RawClient, b as Decisions, l as Answer, p as CallOptions, t as Adapter, y as DecisionQuestion } from "./adapter-DuJkoVWY.js";
|
|
2
|
+
import { t as OutputSchema } from "./schema-_iwQlBZE.js";
|
|
3
3
|
/** Settings for `perplexity()`. */
|
|
4
4
|
interface PerplexityConfig {
|
|
5
5
|
/** Defaults to the PERPLEXITY_API_KEY environment variable. */
|
package/dist/reducto.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as DocumentInput, H as ParsedDocument, T as DocumentUrl, a as RawClient, p as CallOptions, t as Adapter } from "./adapter-
|
|
1
|
+
import { C as DocumentInput, H as ParsedDocument, T as DocumentUrl, a as RawClient, p as CallOptions, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
/** Settings for `reducto()`. */
|
|
3
3
|
export interface ReductoConfig {
|
|
4
4
|
/** Defaults to the REDUCTO_API_KEY environment variable. */
|
package/dist/serpapi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as Recency, M as ImageSearch, Z as SearchResponse, a as RawClient, p as CallOptions, s as AccountUsage, t as Adapter } from "./adapter-
|
|
1
|
+
import { J as Recency, M as ImageSearch, Z as SearchResponse, a as RawClient, p as CallOptions, s as AccountUsage, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
2
|
import "./util-DhYr1OS3.js";
|
|
3
3
|
/** Settings for `serpapi()`. */
|
|
4
4
|
interface SerpApiConfig {
|
package/dist/tavily.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as Page, J as Recency, M as ImageSearch, V as PageBatch, Y as Research, Z as SearchResponse, _ as Crawl, a as RawClient, et as SiteMap, l as Answer, p as CallOptions, s as AccountUsage, t as Adapter } from "./adapter-
|
|
2
|
-
import { t as OutputSchema } from "./schema-
|
|
1
|
+
import { B as Page, J as Recency, M as ImageSearch, V as PageBatch, Y as Research, Z as SearchResponse, _ as Crawl, a as RawClient, et as SiteMap, l as Answer, p as CallOptions, s as AccountUsage, t as Adapter } from "./adapter-DuJkoVWY.js";
|
|
2
|
+
import { t as OutputSchema } from "./schema-_iwQlBZE.js";
|
|
3
3
|
/** Settings for the Tavily adapter. */
|
|
4
4
|
interface TavilyConfig {
|
|
5
5
|
/** Defaults to the TAVILY_API_KEY environment variable. */
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as FieldworkErrorCode, t as Fieldwork } from "./fieldwork-
|
|
2
|
-
import { N as JsonSchema, m as Capability, n as AnyAdapter, p as CallOptions } from "./adapter-
|
|
1
|
+
import { i as FieldworkErrorCode, t as Fieldwork } from "./fieldwork-Bhl4401B.js";
|
|
2
|
+
import { N as JsonSchema, m as Capability, n as AnyAdapter, p as CallOptions } from "./adapter-DuJkoVWY.js";
|
|
3
3
|
/** Any JSON value. */
|
|
4
4
|
type JsonValue = string | number | boolean | null | JsonValue[] | JsonObject;
|
|
5
5
|
/** A JSON object. A key may be undefined, which reads as absent and is not serialized. */
|
package/dist/tools.js
CHANGED
|
@@ -472,6 +472,7 @@ const PARSE_OUTPUT = object({
|
|
|
472
472
|
box,
|
|
473
473
|
cells: list(object({
|
|
474
474
|
box,
|
|
475
|
+
boxes: list(box, "Each box the cell sits in, when the provider gives them one by one; box encloses them."),
|
|
475
476
|
column: whole("The column, from 0.", 0),
|
|
476
477
|
columnSpan: whole("Columns the cell spans.", 1),
|
|
477
478
|
lines: list(placedText),
|
|
@@ -483,6 +484,7 @@ const PARSE_OUTPUT = object({
|
|
|
483
484
|
"column",
|
|
484
485
|
"text"
|
|
485
486
|
])),
|
|
487
|
+
container: choice("The page header or footer the block was read out of.", ["header", "footer"]),
|
|
486
488
|
lines: list(placedText),
|
|
487
489
|
page: whole("The physical page number, starting at 1.", 1),
|
|
488
490
|
text: str,
|
|
@@ -498,8 +500,10 @@ const PARSE_OUTPUT = object({
|
|
|
498
500
|
meta,
|
|
499
501
|
pageCount: whole("Pages in the file.", 0),
|
|
500
502
|
pages: list(object({
|
|
503
|
+
height: number("The page's height in points."),
|
|
501
504
|
markdown: str,
|
|
502
|
-
pageNumber: whole("The physical page number, starting at 1.", 1)
|
|
505
|
+
pageNumber: whole("The physical page number, starting at 1.", 1),
|
|
506
|
+
width: number("The page's width in points.")
|
|
503
507
|
}, ["pageNumber", "markdown"]))
|
|
504
508
|
}, ["markdown"]);
|
|
505
509
|
/** The result of `create_monitor` and `get_monitor`, a `MonitorInfo`. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howells/fieldwork-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "One API for web search, page reading, extraction, crawling, answers, research, browser sessions, monitoring and document parsing across Exa, Firecrawl, Tavily, Parallel, Perplexity, Brave, SerpApi, Browserbase, Kernel, LlamaParse and Reducto.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|