Interface: SearxngRequestContext
Defined in: batteries/tools/searxng/index.ts:83
Mutable context handed to each input-pipeline stage before the HTTP request is sent.
Remarks
Stages mutate this in place (onion (ctx, next) style) to adjust the outgoing request — inject or rotate auth headers, force a language, rewrite the query — or call SearxngRequestContext.shortCircuit to skip the fetch entirely (e.g. a cache hit).
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
headers | public | SearxngHeaders | Resolved request headers. Mutable — inject, redact, or rotate auth here. | batteries/tools/searxng/index.ts:91 |
instanceUrl | readonly | string | The target instance base URL (read-only). | batteries/tools/searxng/index.ts:93 |
params | public | Record<string, string> | Extra SearXNG query parameters (categories, engines, language, …). Mutable. | batteries/tools/searxng/index.ts:89 |
query | public | string | The search query. Mutable. | batteries/tools/searxng/index.ts:87 |
stash | readonly | Map<string, unknown> | Cross-stage scratch space; also carried onto the response context. | batteries/tools/searxng/index.ts:95 |
toolName | readonly | string | The tool's name (read-only). | batteries/tools/searxng/index.ts:85 |
Methods
shortCircuit()
ts
shortCircuit(result: string): void;Defined in: batteries/tools/searxng/index.ts:97
Skip the fetch and return result verbatim as the tool's output.
Parameters
| Parameter | Type |
|---|---|
result | string |
Returns
void