Skip to content
1 min read · 216 words

Interface: ScrapperResponseContext<R>

Defined in: src/batteries/tools/scrapper/shared.ts:147

Mutable context handed to each output-pipeline stage after the response JSON is parsed.

Type Parameters

Type ParameterDescription
RThe verb's normalised result type (article object or links payload).

Properties

PropertyModifierTypeDescriptionDefined in
formatpublic"raw" | "normalized"The effective payload shape for this call.src/batteries/tools/scrapper/shared.ts:157
output?publicstringWhen set, used verbatim as the tool's output (overrides serialisation).src/batteries/tools/scrapper/shared.ts:159
rawpublicunknownThe parsed Scrapper JSON body. Mutable (used when format is raw).src/batteries/tools/scrapper/shared.ts:153
requestreadonlyScrapperRequestContextThe request context as it was sent (post-input-pipeline).src/batteries/tools/scrapper/shared.ts:151
resultpublicRThe normalised result. Mutable — reshape, redact, enrich.src/batteries/tools/scrapper/shared.ts:155
stashreadonlyMap<string, unknown>Cross-stage scratch space; carried over from the request context.src/batteries/tools/scrapper/shared.ts:161
toolNamereadonlystringThe tool's name (read-only).src/batteries/tools/scrapper/shared.ts:149