Skip to content
1 min read · 216 words

Interface: ScrapperResponseContext<R>

Defined in: batteries/tools/scrapper/shared.ts:137

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.batteries/tools/scrapper/shared.ts:147
output?publicstringWhen set, used verbatim as the tool's output (overrides serialisation).batteries/tools/scrapper/shared.ts:149
rawpublicunknownThe parsed Scrapper JSON body. Mutable (used when format is raw).batteries/tools/scrapper/shared.ts:143
requestreadonlyScrapperRequestContextThe request context as it was sent (post-input-pipeline).batteries/tools/scrapper/shared.ts:141
resultpublicRThe normalised result. Mutable — reshape, redact, enrich.batteries/tools/scrapper/shared.ts:145
stashreadonlyMap<string, unknown>Cross-stage scratch space; carried over from the request context.batteries/tools/scrapper/shared.ts:151
toolNamereadonlystringThe tool's name (read-only).batteries/tools/scrapper/shared.ts:139