@nhtio/adk 0.1.0-master-e068b986 → 0.1.0-master-0c6d984f

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.
Files changed (210) hide show
  1. package/CHANGELOG.md +54 -9
  2. package/batteries/embeddings/openai/adapter.cjs +1 -1
  3. package/batteries/embeddings/openai/adapter.mjs +1 -1
  4. package/batteries/embeddings/webllm/adapter.cjs +1 -1
  5. package/batteries/embeddings/webllm/adapter.mjs +1 -1
  6. package/batteries/llm/ollama/adapter.cjs +5 -5
  7. package/batteries/llm/ollama/adapter.mjs +5 -5
  8. package/batteries/llm/ollama/helpers.cjs +2 -2
  9. package/batteries/llm/ollama/helpers.mjs +2 -2
  10. package/batteries/llm/ollama/validation.cjs +1 -1
  11. package/batteries/llm/ollama/validation.mjs +1 -1
  12. package/batteries/llm/openai_chat_completions/adapter.cjs +5 -5
  13. package/batteries/llm/openai_chat_completions/adapter.mjs +5 -5
  14. package/batteries/llm/openai_chat_completions/helpers.cjs +2 -2
  15. package/batteries/llm/openai_chat_completions/helpers.mjs +2 -2
  16. package/batteries/llm/openai_chat_completions/validation.cjs +1 -1
  17. package/batteries/llm/openai_chat_completions/validation.mjs +1 -1
  18. package/batteries/llm/webllm_chat_completions/adapter.cjs +5 -5
  19. package/batteries/llm/webllm_chat_completions/adapter.mjs +5 -5
  20. package/batteries/llm/webllm_chat_completions/validation.cjs +1 -1
  21. package/batteries/llm/webllm_chat_completions/validation.mjs +1 -1
  22. package/batteries/storage/flydrive.cjs +1 -1
  23. package/batteries/storage/flydrive.mjs +1 -1
  24. package/batteries/storage/in_memory.cjs +1 -1
  25. package/batteries/storage/in_memory.mjs +1 -1
  26. package/batteries/storage/opfs.cjs +1 -1
  27. package/batteries/storage/opfs.mjs +1 -1
  28. package/batteries/tools/_shared/index.d.ts +121 -0
  29. package/batteries/tools/_shared.cjs +157 -0
  30. package/batteries/tools/_shared.cjs.map +1 -0
  31. package/batteries/tools/_shared.mjs +149 -0
  32. package/batteries/tools/_shared.mjs.map +1 -0
  33. package/batteries/tools/color.cjs +2 -2
  34. package/batteries/tools/color.mjs +2 -2
  35. package/batteries/tools/comparison.cjs +3 -3
  36. package/batteries/tools/comparison.mjs +3 -3
  37. package/batteries/tools/data_structure.cjs +3 -3
  38. package/batteries/tools/data_structure.mjs +3 -3
  39. package/batteries/tools/datetime_extended.cjs +3 -3
  40. package/batteries/tools/datetime_extended.mjs +3 -3
  41. package/batteries/tools/datetime_math.cjs +3 -3
  42. package/batteries/tools/datetime_math.mjs +3 -3
  43. package/batteries/tools/encoding.cjs +3 -3
  44. package/batteries/tools/encoding.mjs +3 -3
  45. package/batteries/tools/formatting.cjs +3 -3
  46. package/batteries/tools/formatting.mjs +3 -3
  47. package/batteries/tools/geo_basics.cjs +2 -2
  48. package/batteries/tools/geo_basics.mjs +2 -2
  49. package/batteries/tools/index.d.ts +2 -0
  50. package/batteries/tools/math.cjs +3 -3
  51. package/batteries/tools/math.mjs +3 -3
  52. package/batteries/tools/memory.cjs +6 -6
  53. package/batteries/tools/memory.mjs +6 -6
  54. package/batteries/tools/parsing.cjs +4 -4
  55. package/batteries/tools/parsing.mjs +4 -4
  56. package/batteries/tools/retrievables.cjs +5 -5
  57. package/batteries/tools/retrievables.mjs +5 -5
  58. package/batteries/tools/scrapper/exceptions.d.ts +21 -0
  59. package/batteries/tools/scrapper/index.d.ts +172 -0
  60. package/batteries/tools/scrapper/shared.d.ts +139 -0
  61. package/batteries/tools/scrapper.cjs +8 -0
  62. package/batteries/tools/scrapper.mjs +2 -0
  63. package/batteries/tools/searxng/index.d.ts +47 -20
  64. package/batteries/tools/searxng.cjs +2 -1
  65. package/batteries/tools/searxng.mjs +2 -2
  66. package/batteries/tools/standing_instructions.cjs +4 -4
  67. package/batteries/tools/standing_instructions.mjs +4 -4
  68. package/batteries/tools/statistics.cjs +4 -4
  69. package/batteries/tools/statistics.mjs +4 -4
  70. package/batteries/tools/string_processing.cjs +3 -3
  71. package/batteries/tools/string_processing.mjs +3 -3
  72. package/batteries/tools/structured_data.cjs +3 -3
  73. package/batteries/tools/structured_data.mjs +3 -3
  74. package/batteries/tools/text_analysis.cjs +3 -3
  75. package/batteries/tools/text_analysis.mjs +3 -3
  76. package/batteries/tools/text_comparison.cjs +2 -2
  77. package/batteries/tools/text_comparison.mjs +2 -2
  78. package/batteries/tools/time.cjs +3 -3
  79. package/batteries/tools/time.mjs +3 -3
  80. package/batteries/tools/unit_conversion.cjs +2 -2
  81. package/batteries/tools/unit_conversion.mjs +2 -2
  82. package/batteries/tools/web_retrieval/index.d.ts +186 -0
  83. package/batteries/tools/web_retrieval.cjs +206 -0
  84. package/batteries/tools/web_retrieval.cjs.map +1 -0
  85. package/batteries/tools/web_retrieval.mjs +201 -0
  86. package/batteries/tools/web_retrieval.mjs.map +1 -0
  87. package/batteries/tools.cjs +13 -1
  88. package/batteries/tools.mjs +4 -2
  89. package/batteries/vector/arangodb.cjs +1 -1
  90. package/batteries/vector/arangodb.mjs +1 -1
  91. package/batteries/vector/clickhouse.cjs +1 -1
  92. package/batteries/vector/clickhouse.mjs +1 -1
  93. package/batteries/vector/cloudflare.cjs +1 -1
  94. package/batteries/vector/cloudflare.mjs +1 -1
  95. package/batteries/vector/couchbase.cjs +1 -1
  96. package/batteries/vector/couchbase.mjs +1 -1
  97. package/batteries/vector/duckdb.cjs +1 -1
  98. package/batteries/vector/duckdb.mjs +1 -1
  99. package/batteries/vector/elasticsearch.cjs +1 -1
  100. package/batteries/vector/elasticsearch.mjs +1 -1
  101. package/batteries/vector/filters.cjs +1 -1
  102. package/batteries/vector/filters.mjs +1 -1
  103. package/batteries/vector/hnswlib.cjs +1 -1
  104. package/batteries/vector/hnswlib.mjs +1 -1
  105. package/batteries/vector/lancedb.cjs +1 -1
  106. package/batteries/vector/lancedb.mjs +1 -1
  107. package/batteries/vector/mariadb.cjs +1 -1
  108. package/batteries/vector/mariadb.mjs +1 -1
  109. package/batteries/vector/meilisearch.cjs +1 -1
  110. package/batteries/vector/meilisearch.mjs +1 -1
  111. package/batteries/vector/migrate.cjs +1 -1
  112. package/batteries/vector/migrate.mjs +1 -1
  113. package/batteries/vector/mongodb.cjs +1 -1
  114. package/batteries/vector/mongodb.mjs +1 -1
  115. package/batteries/vector/neo4j.cjs +1 -1
  116. package/batteries/vector/neo4j.mjs +1 -1
  117. package/batteries/vector/opensearch.cjs +1 -1
  118. package/batteries/vector/opensearch.mjs +1 -1
  119. package/batteries/vector/oracle23ai.cjs +1 -1
  120. package/batteries/vector/oracle23ai.mjs +1 -1
  121. package/batteries/vector/pinecone.cjs +1 -1
  122. package/batteries/vector/pinecone.mjs +1 -1
  123. package/batteries/vector/redis.cjs +1 -1
  124. package/batteries/vector/redis.mjs +1 -1
  125. package/batteries/vector/retrievable.cjs +1 -1
  126. package/batteries/vector/retrievable.mjs +1 -1
  127. package/batteries/vector/s3vectors.cjs +1 -1
  128. package/batteries/vector/s3vectors.mjs +1 -1
  129. package/batteries/vector/solr.cjs +1 -1
  130. package/batteries/vector/solr.mjs +1 -1
  131. package/batteries/vector/surrealdb.cjs +1 -1
  132. package/batteries/vector/surrealdb.mjs +1 -1
  133. package/batteries/vector/typesense.cjs +1 -1
  134. package/batteries/vector/typesense.mjs +1 -1
  135. package/batteries/vector/vespa.cjs +1 -1
  136. package/batteries/vector/vespa.mjs +1 -1
  137. package/batteries/vector/weaviate.cjs +1 -1
  138. package/batteries/vector/weaviate.mjs +1 -1
  139. package/batteries.cjs +13 -1
  140. package/batteries.mjs +4 -2
  141. package/{common-DwyIhf5B.mjs → common-DYDUi99O.mjs} +7 -7
  142. package/{common-DwyIhf5B.mjs.map → common-DYDUi99O.mjs.map} +1 -1
  143. package/{common-Do0PmqEC.js → common-DZl3ADJs.js} +7 -7
  144. package/{common-Do0PmqEC.js.map → common-DZl3ADJs.js.map} +1 -1
  145. package/common.cjs +7 -7
  146. package/common.d.ts +1 -1
  147. package/common.mjs +7 -7
  148. package/{dispatch_runner-Bh12zRee.mjs → dispatch_runner--ZhdDWRZ.mjs} +3 -3
  149. package/{dispatch_runner-Bh12zRee.mjs.map → dispatch_runner--ZhdDWRZ.mjs.map} +1 -1
  150. package/{dispatch_runner-BCfDikZn.js → dispatch_runner-nHDKkxye.js} +3 -3
  151. package/{dispatch_runner-BCfDikZn.js.map → dispatch_runner-nHDKkxye.js.map} +1 -1
  152. package/dispatch_runner.cjs +1 -1
  153. package/dispatch_runner.mjs +1 -1
  154. package/eslint/rules.cjs +2 -2
  155. package/eslint/rules.mjs +2 -2
  156. package/eslint.cjs +3 -3
  157. package/eslint.mjs +3 -3
  158. package/forge.cjs +4 -4
  159. package/forge.mjs +4 -4
  160. package/guards.cjs +8 -8
  161. package/guards.mjs +8 -8
  162. package/index.cjs +10 -10
  163. package/index.mjs +10 -10
  164. package/mcp/adk-docs-corpus.json +1 -1
  165. package/package.json +202 -187
  166. package/scrapper-CR-MFDCm.js +462 -0
  167. package/scrapper-CR-MFDCm.js.map +1 -0
  168. package/scrapper-Djl6ga2K.mjs +432 -0
  169. package/scrapper-Djl6ga2K.mjs.map +1 -0
  170. package/{searxng-COD67eJC.js → searxng-CMhRD5xo.js} +84 -88
  171. package/searxng-CMhRD5xo.js.map +1 -0
  172. package/{searxng-oL3Z5Qo2.mjs → searxng-yWwuON_Y.mjs} +77 -87
  173. package/searxng-yWwuON_Y.mjs.map +1 -0
  174. package/skills/adk-assembly/SKILL.md +2 -2
  175. package/{spooled_artifact-BsM1EfRB.mjs → spooled_artifact-7eePq7JA.mjs} +3 -3
  176. package/{spooled_artifact-BsM1EfRB.mjs.map → spooled_artifact-7eePq7JA.mjs.map} +1 -1
  177. package/{spooled_artifact-B6XRZYFt.js → spooled_artifact-DX8LLyUX.js} +3 -3
  178. package/{spooled_artifact-B6XRZYFt.js.map → spooled_artifact-DX8LLyUX.js.map} +1 -1
  179. package/spooled_artifact.cjs +2 -2
  180. package/spooled_artifact.mjs +2 -2
  181. package/{spooled_markdown_artifact-DyevhaL6.js → spooled_markdown_artifact-ClX72lek.js} +3 -3
  182. package/{spooled_markdown_artifact-DyevhaL6.js.map → spooled_markdown_artifact-ClX72lek.js.map} +1 -1
  183. package/{spooled_markdown_artifact-DJnjD3Ti.mjs → spooled_markdown_artifact-wkrBF3oX.mjs} +3 -3
  184. package/{spooled_markdown_artifact-DJnjD3Ti.mjs.map → spooled_markdown_artifact-wkrBF3oX.mjs.map} +1 -1
  185. package/{thought-DzcSu2Y6.mjs → thought-B_vxAiKU.mjs} +3 -3
  186. package/{thought-DzcSu2Y6.mjs.map → thought-B_vxAiKU.mjs.map} +1 -1
  187. package/{thought-DhElxSkZ.js → thought-DLwpF7MI.js} +3 -3
  188. package/{thought-DhElxSkZ.js.map → thought-DLwpF7MI.js.map} +1 -1
  189. package/{tool-DjUJeSzk.js → tool-D5WGVIcI.js} +3 -3
  190. package/{tool-DjUJeSzk.js.map → tool-D5WGVIcI.js.map} +1 -1
  191. package/{tool-DMvZFz9h.mjs → tool-wMYMVl60.mjs} +3 -3
  192. package/{tool-DMvZFz9h.mjs.map → tool-wMYMVl60.mjs.map} +1 -1
  193. package/{tool_call-DhAW70EY.mjs → tool_call-B4-_-vjG.mjs} +4 -4
  194. package/{tool_call-DhAW70EY.mjs.map → tool_call-B4-_-vjG.mjs.map} +1 -1
  195. package/{tool_call-CGec5078.js → tool_call-DixVlW40.js} +4 -4
  196. package/{tool_call-CGec5078.js.map → tool_call-DixVlW40.js.map} +1 -1
  197. package/{tool_registry-BuMKln6b.mjs → tool_registry-791Vrjtf.mjs} +142 -142
  198. package/tool_registry-791Vrjtf.mjs.map +1 -0
  199. package/{tool_registry-C5wfDxaq.js → tool_registry-CKJPze3j.js} +141 -141
  200. package/tool_registry-CKJPze3j.js.map +1 -0
  201. package/{turn_runner-CfrZZ-ZJ.js → turn_runner-HXImLGIn.js} +5 -5
  202. package/{turn_runner-CfrZZ-ZJ.js.map → turn_runner-HXImLGIn.js.map} +1 -1
  203. package/{turn_runner-BQCupiHC.mjs → turn_runner-ZyYO-Kti.mjs} +5 -5
  204. package/{turn_runner-BQCupiHC.mjs.map → turn_runner-ZyYO-Kti.mjs.map} +1 -1
  205. package/turn_runner.cjs +1 -1
  206. package/turn_runner.mjs +1 -1
  207. package/searxng-COD67eJC.js.map +0 -1
  208. package/searxng-oL3Z5Qo2.mjs.map +0 -1
  209. package/tool_registry-BuMKln6b.mjs.map +0 -1
  210. package/tool_registry-C5wfDxaq.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { o as isError } from "../../tool_registry-BuMKln6b.mjs";
2
- import { r as Memory } from "../../thought-DzcSu2Y6.mjs";
3
- import { t as Tool } from "../../tool-DMvZFz9h.mjs";
4
- import "../../common-DwyIhf5B.mjs";
5
- import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-DJnjD3Ti.mjs";
1
+ import { o as isError } from "../../tool_registry-791Vrjtf.mjs";
2
+ import { r as Memory } from "../../thought-B_vxAiKU.mjs";
3
+ import { t as Tool } from "../../tool-wMYMVl60.mjs";
4
+ import "../../common-DYDUi99O.mjs";
5
+ import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-wkrBF3oX.mjs";
6
6
  import "../../guards.mjs";
7
+ import { validator } from "@nhtio/validation";
7
8
  import { DateTime } from "luxon";
8
9
  import { v6 } from "uuid";
9
- import { validator } from "@nhtio/validation";
10
10
  //#region src/batteries/tools/memory/index.ts
11
11
  /**
12
12
  * Pre-constructed CRUD tools for model-visible ADK memory management.
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../tool_registry-C5wfDxaq.js");
4
- const require_tool = require("../../tool-DjUJeSzk.js");
5
- require("../../common-Do0PmqEC.js");
6
- const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-DyevhaL6.js");
3
+ const require_tool_registry = require("../../tool_registry-CKJPze3j.js");
4
+ const require_tool = require("../../tool-D5WGVIcI.js");
5
+ require("../../common-DZl3ADJs.js");
6
+ const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-ClX72lek.js");
7
7
  require("../../guards.cjs");
8
8
  let _nhtio_validation = require("@nhtio/validation");
9
9
  let js_yaml = require("js-yaml");
@@ -1,7 +1,7 @@
1
- import { o as isError } from "../../tool_registry-BuMKln6b.mjs";
2
- import { t as Tool } from "../../tool-DMvZFz9h.mjs";
3
- import "../../common-DwyIhf5B.mjs";
4
- import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-DJnjD3Ti.mjs";
1
+ import { o as isError } from "../../tool_registry-791Vrjtf.mjs";
2
+ import { t as Tool } from "../../tool-wMYMVl60.mjs";
3
+ import "../../common-DYDUi99O.mjs";
4
+ import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-wkrBF3oX.mjs";
5
5
  import "../../guards.mjs";
6
6
  import { validator } from "@nhtio/validation";
7
7
  import { load } from "js-yaml";
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../tool_registry-C5wfDxaq.js");
4
- const require_tool = require("../../tool-DjUJeSzk.js");
5
- const require_common = require("../../common-Do0PmqEC.js");
6
- const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-DyevhaL6.js");
3
+ const require_tool_registry = require("../../tool_registry-CKJPze3j.js");
4
+ const require_tool = require("../../tool-D5WGVIcI.js");
5
+ const require_common = require("../../common-DZl3ADJs.js");
6
+ const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-ClX72lek.js");
7
7
  require("../../guards.cjs");
8
+ let _nhtio_validation = require("@nhtio/validation");
8
9
  let luxon = require("luxon");
9
10
  let uuid = require("uuid");
10
- let _nhtio_validation = require("@nhtio/validation");
11
11
  //#region src/batteries/tools/retrievables/index.ts
12
12
  /**
13
13
  * Pre-constructed CRUD tools for model-visible retrievable and RAG-record management.
@@ -1,11 +1,11 @@
1
- import { o as isError } from "../../tool_registry-BuMKln6b.mjs";
2
- import { t as Tool } from "../../tool-DMvZFz9h.mjs";
3
- import { o as Retrievable } from "../../common-DwyIhf5B.mjs";
4
- import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-DJnjD3Ti.mjs";
1
+ import { o as isError } from "../../tool_registry-791Vrjtf.mjs";
2
+ import { t as Tool } from "../../tool-wMYMVl60.mjs";
3
+ import { o as Retrievable } from "../../common-DYDUi99O.mjs";
4
+ import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-wkrBF3oX.mjs";
5
5
  import "../../guards.mjs";
6
+ import { validator } from "@nhtio/validation";
6
7
  import { DateTime } from "luxon";
7
8
  import { v6 } from "uuid";
8
- import { validator } from "@nhtio/validation";
9
9
  //#region src/batteries/tools/retrievables/index.ts
10
10
  /**
11
11
  * Pre-constructed CRUD tools for model-visible retrievable and RAG-record management.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Battery-scoped exception constructors for the Scrapper web-extraction tool.
3
+ *
4
+ * @remarks
5
+ * Battery-scoped exception classes owned by the Scrapper tool battery (not the ADK core). Minted
6
+ * via `createException` from `@nhtio/adk/factories` and re-exported from the battery's barrel
7
+ * (`@nhtio/adk/batteries/tools/scrapper`). This file intentionally carries **no** `@module` tag:
8
+ * it is an internal sibling relative-imported by `index.ts`, so it does not mint its own
9
+ * `…/scrapper/exceptions` entrypoint (whose `exceptions` leaf basename would collide with sibling
10
+ * batteries under the `vite-plugin-dts` rolled-up `.d.ts` rule).
11
+ */
12
+ /**
13
+ * Thrown when a Scrapper factory receives invalid configuration.
14
+ *
15
+ * @remarks
16
+ * Fatal: config bugs (missing/unparseable `instanceUrl`, a bad `artifact` resolver, or an async
17
+ * resolver passed to a `*Sync` factory) fail loud at factory-call time rather than at first scrape.
18
+ */
19
+ export declare const E_INVALID_SCRAPPER_CONFIG: import("../../../factories").CreatedException<[
20
+ string
21
+ ]>;
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Factories for configured Scrapper web-extraction tools (article + links).
3
+ *
4
+ * @module @nhtio/adk/batteries/tools/scrapper
5
+ *
6
+ * @remarks
7
+ * [Scrapper](https://github.com/amerkurev/scrapper) is a self-hosted service that loads a page in a
8
+ * real headless browser and extracts either the readable article (`/api/article`) or the page's
9
+ * links (`/api/links`). It gives an agent browser-grade reading power — JS-rendered pages a
10
+ * renderless fetcher can't see — but as a **stateless** HTTP call: each request runs in a fresh
11
+ * incognito context, stores no session or credentials, and shares nothing with any other call.
12
+ *
13
+ * Like the SearXNG battery, this exports **factories** (not ready-made `Tool` constants), because a
14
+ * scrape tool needs per-deployment config (instance URL + custom auth headers). Two verbs, each with
15
+ * an async factory ({@link createScrapperArticleTool} / {@link createScrapperLinksTool}, accepting a
16
+ * dynamic-import `artifact` resolver) and a sync variant ({@link createScrapperArticleToolSync} /
17
+ * {@link createScrapperLinksToolSync}). Because these are factories, they MUST NOT be bulk-registered
18
+ * via `Object.values(batteries)` — call one, then register the returned tool.
19
+ *
20
+ * @see https://github.com/amerkurev/scrapper
21
+ */
22
+ import { type ScrapperBaseConfig } from "./shared";
23
+ import type { Tool } from "../../../forge";
24
+ import type { ArtifactResolver, SyncArtifactResolver } from "../_shared/index";
25
+ export { E_INVALID_SCRAPPER_CONFIG } from "./exceptions";
26
+ export type { ScrapperRequestContext, ScrapperResponseContext, ScrapperInputMiddlewareFn, ScrapperOutputMiddlewareFn, } from "./shared";
27
+ /** Model-facing params common to both verbs (snake_case; mapped to kebab on the wire). */
28
+ export interface ScrapperCommonParams {
29
+ /** Return a cached result when available instead of re-scraping. */
30
+ cache?: boolean;
31
+ /** Capture a screenshot; the result carries a `screenshotUri`. */
32
+ screenshot?: boolean;
33
+ /** Run in an incognito browser context (no persisted browsing data). Default true upstream. */
34
+ incognito?: boolean;
35
+ /** Browser navigation timeout in ms (`0` disables). Distinct from the tool's own fetch timeout. */
36
+ timeout?: number;
37
+ /** When navigation is considered finished. */
38
+ wait_until?: 'load' | 'domcontentloaded' | 'networkidle' | 'commit';
39
+ /** Wait this many ms after load before parsing. */
40
+ sleep?: number;
41
+ /** Scroll down N pixels for lazy-loading pages. Requires a positive `sleep`. */
42
+ scroll_down?: number;
43
+ /** Emulated device, e.g. `Desktop Chrome`. Overrides individual viewport/UA settings. */
44
+ device?: string;
45
+ /** Explicit user-agent (prefer `device`). */
46
+ user_agent?: string;
47
+ /** Extra headers the SCRAPER's browser sends to the TARGET site, `K:v;K2:v2` (NOT instance auth). */
48
+ extra_http_headers?: string;
49
+ /** Upstream proxy, e.g. `http://host:3128` or `socks5://host:1080`. */
50
+ proxy_server?: string;
51
+ }
52
+ /** Model-facing params for `/api/article`. */
53
+ export interface ScrapperArticleParams extends ScrapperCommonParams {
54
+ /** Populate `fullContent` with the page's full HTML. */
55
+ full_content?: boolean;
56
+ }
57
+ /** Model-facing params for `/api/links`. */
58
+ export interface ScrapperLinksParams extends ScrapperCommonParams {
59
+ /** Median link-text length threshold for the link parser. */
60
+ text_len_threshold?: number;
61
+ /** Median words-per-link threshold for the link parser. */
62
+ words_threshold?: number;
63
+ }
64
+ /** A normalised Scrapper article (loose/nullable upstream). */
65
+ export interface ScrapperArticle {
66
+ /** The page URL the article was extracted from. */
67
+ url?: string;
68
+ /** Article title. */
69
+ title?: string;
70
+ /** Author / byline metadata. */
71
+ byline?: string;
72
+ /** Short excerpt or description of the article. */
73
+ excerpt?: string;
74
+ /** Name of the site the article came from. */
75
+ siteName?: string;
76
+ /** Detected content language. */
77
+ lang?: string;
78
+ /** Character count of the extracted article text. */
79
+ length?: number;
80
+ /** Publication time, when the page exposed one. */
81
+ publishedTime?: string;
82
+ /** Scrapper's own date field for the result. */
83
+ date?: string;
84
+ /** Article text with HTML stripped. */
85
+ textContent?: string;
86
+ /** Processed article HTML; present when the caller requested it. */
87
+ content?: string;
88
+ /** Full page HTML; present only when `full_content` was set. */
89
+ fullContent?: string;
90
+ /** Screenshot URI; present only when `screenshot` was set. */
91
+ screenshotUri?: string;
92
+ }
93
+ /** A single link from `/api/links` (verified live: `{ url, text }`). */
94
+ export interface ScrapperLink {
95
+ /** The link's target URL. */
96
+ url?: string;
97
+ /** The link's anchor text. */
98
+ text?: string;
99
+ }
100
+ /** A normalised Scrapper links payload. */
101
+ export interface ScrapperLinks {
102
+ /** The page URL the links were collected from. */
103
+ url?: string;
104
+ /** The page title. */
105
+ title?: string;
106
+ /** The page's domain. */
107
+ domain?: string;
108
+ /** Scrapper's own date field for the result. */
109
+ date?: string;
110
+ /** The collected links, each `{ url, text }`. */
111
+ links: ScrapperLink[];
112
+ /** Screenshot URI; present only when `screenshot` was set. */
113
+ screenshotUri?: string;
114
+ }
115
+ /** Async-factory config for `/api/article` (full `artifact` resolver, incl. dynamic import). */
116
+ export type ScrapperArticleConfig = ScrapperBaseConfig<ScrapperArticleParams, ScrapperArticle, ArtifactResolver>;
117
+ /** Sync-factory config for `/api/article` (`artifact` narrowed to the sync subset). */
118
+ export type ScrapperArticleConfigSync = ScrapperBaseConfig<ScrapperArticleParams, ScrapperArticle, SyncArtifactResolver>;
119
+ /** Async-factory config for `/api/links`. */
120
+ export type ScrapperLinksConfig = ScrapperBaseConfig<ScrapperLinksParams, ScrapperLinks, ArtifactResolver>;
121
+ /** Sync-factory config for `/api/links`. */
122
+ export type ScrapperLinksConfigSync = ScrapperBaseConfig<ScrapperLinksParams, ScrapperLinks, SyncArtifactResolver>;
123
+ /**
124
+ * Create a configured Scrapper **article** {@link Tool} (async — accepts a dynamic-import `artifact`).
125
+ *
126
+ * @remarks
127
+ * Async because `artifact` may be an async / dynamic-import resolver, which must resolve to the sync
128
+ * `() => Ctor` `Tool.artifactConstructor` requires before the tool is built. For the common case,
129
+ * use {@link createScrapperArticleToolSync} and skip the `await`.
130
+ *
131
+ * @warning
132
+ * Two distinct "headers": `config.headers` authenticates to the Scrapper *instance*; the
133
+ * `extra_http_headers` *parameter* is what the scraper's browser sends to the *target site* — do not
134
+ * conflate them. Also note `scroll_down` requires a positive `sleep`, and `resultUri`/`screenshotUri`
135
+ * are instance-relative and may come back `http://` even over HTTPS — do not assume they match
136
+ * `instanceUrl`.
137
+ *
138
+ * @param config - Instance URL, instance-auth headers, output policy, `artifact` resolver,
139
+ * per-parameter disposition (`fixed`/`defaults`/`fixedQuery`), and middleware pipelines.
140
+ * @returns A promise of a `Tool` ready to register in a `ToolRegistry`.
141
+ * @throws {@link E_INVALID_SCRAPPER_CONFIG} when `instanceUrl` or `artifact` is invalid.
142
+ */
143
+ export declare const createScrapperArticleTool: (config: ScrapperArticleConfig) => Promise<Tool>;
144
+ /**
145
+ * Synchronous {@link createScrapperArticleTool} — `artifact` narrowed to the sync subset.
146
+ *
147
+ * @param config - Same as {@link createScrapperArticleTool}, with a sync-only `artifact`.
148
+ * @returns A `Tool` ready to register in a `ToolRegistry`.
149
+ * @throws {@link E_INVALID_SCRAPPER_CONFIG} when `instanceUrl` or `artifact` is invalid (incl. an async resolver).
150
+ */
151
+ export declare const createScrapperArticleToolSync: (config: ScrapperArticleConfigSync) => Tool;
152
+ /**
153
+ * Create a configured Scrapper **links** {@link Tool} (async — accepts a dynamic-import `artifact`).
154
+ *
155
+ * @remarks
156
+ * See {@link createScrapperArticleTool} for the two-headers caveat and the async rationale. Each
157
+ * `links` item is `{ url, text }`.
158
+ *
159
+ * @param config - Instance URL, instance-auth headers, output policy, `artifact` resolver,
160
+ * per-parameter disposition, and middleware pipelines.
161
+ * @returns A promise of a `Tool` ready to register in a `ToolRegistry`.
162
+ * @throws {@link E_INVALID_SCRAPPER_CONFIG} when `instanceUrl` or `artifact` is invalid.
163
+ */
164
+ export declare const createScrapperLinksTool: (config: ScrapperLinksConfig) => Promise<Tool>;
165
+ /**
166
+ * Synchronous {@link createScrapperLinksTool} — `artifact` narrowed to the sync subset.
167
+ *
168
+ * @param config - Same as {@link createScrapperLinksTool}, with a sync-only `artifact`.
169
+ * @returns A `Tool` ready to register in a `ToolRegistry`.
170
+ * @throws {@link E_INVALID_SCRAPPER_CONFIG} when `instanceUrl` or `artifact` is invalid (incl. an async resolver).
171
+ */
172
+ export declare const createScrapperLinksToolSync: (config: ScrapperLinksConfigSync) => Tool;
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Internal core shared by both Scrapper verbs (article / links).
3
+ *
4
+ * @remarks
5
+ * No `@module` tag — this is a sibling of `index.ts`, relative-imported, not its own entrypoint.
6
+ * Houses the per-parameter disposition machinery (schema building from `fixed`/`defaults`), the
7
+ * snake→kebab wire mapping, the request/response contexts, and the `fetch`+pipeline handler core.
8
+ * Generic harness helpers (artifact/header resolution, pipeline runners) come from `../_shared`.
9
+ */
10
+ import { Tool } from "../../../forge";
11
+ import { type ToolHeaders, type ToolHeadersResolver, type SpooledArtifactCtor } from "../_shared/index";
12
+ import type { Schema } from '@nhtio/validation';
13
+ import type { NextFn } from '@nhtio/middleware';
14
+ /** Throw the battery-scoped config error. */
15
+ export declare const failConfig: (reason: string) => never;
16
+ /** The wire type of a Scrapper query parameter — controls serialisation. */
17
+ export type ScrapperParamType = 'string' | 'number' | 'boolean';
18
+ /**
19
+ * One curated, model-facing Scrapper parameter: its snake_case key (used in the model schema and
20
+ * in `fixed`/`defaults`), its kebab-case wire name, its type, the base validator, and a description.
21
+ */
22
+ export interface ScrapperParamSpec {
23
+ /** snake_case key as seen by the model and in `config.fixed` / `config.defaults`. */
24
+ key: string;
25
+ /** kebab-case name sent to the Scrapper API. */
26
+ wire: string;
27
+ /** Wire type, controlling string/number/boolean serialisation. */
28
+ type: ScrapperParamType;
29
+ /** Base `@nhtio/validation` schema (no `.required()`/`.default()`/`.optional()` applied yet). */
30
+ schema: Schema;
31
+ /** Human-readable description surfaced to the model. */
32
+ description: string;
33
+ }
34
+ /**
35
+ * Build the model-facing input schema from a verb's param specs and the factory's disposition.
36
+ * `url` is always required. A `fixed` param is omitted (the model can't set it); a `defaults` param
37
+ * gets `.default(value)`; everything else is `.optional()`.
38
+ */
39
+ export declare const buildScrapperSchema: (specs: ScrapperParamSpec[], fixed: Record<string, unknown> | undefined, defaults: Record<string, unknown> | undefined, extra?: Record<string, Schema>) => Schema;
40
+ /**
41
+ * Assemble the wire-kebab query params for one request: each spec's value is `fixed` (if pinned)
42
+ * else the validated model/default value; then `fixedQuery` raw passthrough is layered on. `url`
43
+ * is handled separately (it is the search target, never pinned).
44
+ */
45
+ export declare const buildWireParams: (args: Record<string, unknown>, specs: ScrapperParamSpec[], fixed: Record<string, unknown> | undefined, fixedQuery: Record<string, string> | undefined) => Record<string, string>;
46
+ /**
47
+ * Mutable context handed to each input-pipeline stage **before** the HTTP request is sent.
48
+ * Identical for both verbs.
49
+ */
50
+ export interface ScrapperRequestContext {
51
+ /** The tool's name (read-only). */
52
+ readonly toolName: string;
53
+ /** The target page URL (the `url` argument). Mutable. */
54
+ url: string;
55
+ /** Wire-kebab query params (everything except `url`). Mutable. */
56
+ params: Record<string, string>;
57
+ /** Resolved request headers sent to the SCRAPPER INSTANCE (auth). Mutable. */
58
+ headers: ToolHeaders;
59
+ /** The Scrapper instance base URL (read-only). */
60
+ readonly instanceUrl: string;
61
+ /** Cross-stage scratch space; also carried onto the response context. */
62
+ readonly stash: Map<string, unknown>;
63
+ /** Skip the fetch and return `result` verbatim as the tool's output (e.g. a cache hit). */
64
+ shortCircuit(result: string): void;
65
+ }
66
+ /**
67
+ * Mutable context handed to each output-pipeline stage **after** the response JSON is parsed.
68
+ *
69
+ * @typeParam R - The verb's normalised result type (article object or links payload).
70
+ */
71
+ export interface ScrapperResponseContext<R> {
72
+ /** The tool's name (read-only). */
73
+ readonly toolName: string;
74
+ /** The request context as it was sent (post-input-pipeline). */
75
+ readonly request: ScrapperRequestContext;
76
+ /** The parsed Scrapper JSON body. Mutable (used when `format` is `raw`). */
77
+ raw: unknown;
78
+ /** The normalised result. Mutable — reshape, redact, enrich. */
79
+ result: R;
80
+ /** The effective payload shape for this call. */
81
+ format: 'normalized' | 'raw';
82
+ /** When set, used verbatim as the tool's output (overrides serialisation). */
83
+ output?: string;
84
+ /** Cross-stage scratch space; carried over from the request context. */
85
+ readonly stash: Map<string, unknown>;
86
+ }
87
+ /** An input-pipeline stage. Onion middleware over {@link ScrapperRequestContext}. */
88
+ export type ScrapperInputMiddlewareFn = (ctx: ScrapperRequestContext, next: NextFn) => void | Promise<void>;
89
+ /** An output-pipeline stage over a verb's {@link ScrapperResponseContext}. */
90
+ export type ScrapperOutputMiddlewareFn<R> = (ctx: ScrapperResponseContext<R>, next: NextFn) => void | Promise<void>;
91
+ /** Configuration common to every Scrapper factory. `A` is the accepted `artifact` resolver type. */
92
+ export interface ScrapperBaseConfig<P, R, A> {
93
+ /** Base URL of the Scrapper instance, e.g. `https://scrapper.example.org`. Required. */
94
+ instanceUrl: string;
95
+ /** Headers sent to the Scrapper INSTANCE for auth (X-API-Key / Basic) — static or resolver. */
96
+ headers?: ToolHeaders | ToolHeadersResolver;
97
+ /** The tool's own `fetch` AbortController timeout in ms. Default `65_000` (> Scrapper's 60s browser default). */
98
+ requestTimeoutMs?: number;
99
+ /** Output shape. `normalized`/`raw` pin it; `either` (default) exposes a `format` arg to the model. */
100
+ resultFormat?: 'normalized' | 'raw' | 'either';
101
+ /** Spool-artifact resolver for the output. Default `() => SpooledJsonArtifact`. */
102
+ artifact?: A;
103
+ /** Tool name override. */
104
+ name?: string;
105
+ /** Tool description override. */
106
+ description?: string;
107
+ /** Pinned params — sent always, removed from the model schema. */
108
+ fixed?: Partial<P>;
109
+ /** Model-overridable default param values. */
110
+ defaults?: Partial<P>;
111
+ /** Raw, un-modeled wire params (kebab keys) — always sent, never model-visible. Keeps the battery generic. */
112
+ fixedQuery?: Record<string, string>;
113
+ /** Stages run before the HTTP request. See {@link ScrapperRequestContext}. */
114
+ inputPipeline?: ScrapperInputMiddlewareFn[];
115
+ /** Stages run after the response is parsed. See {@link ScrapperResponseContext}. */
116
+ outputPipeline?: ScrapperOutputMiddlewareFn<R>[];
117
+ }
118
+ /** Verb-specific wiring passed to {@link assembleScrapperTool}. */
119
+ export interface ScrapperVerb<R> {
120
+ /** Scrapper endpoint path, e.g. `/api/article`. */
121
+ endpoint: string;
122
+ /** The curated param specs for this verb. */
123
+ specs: ScrapperParamSpec[];
124
+ /** Default tool name (`scrapper_article` / `scrapper_links`). */
125
+ defaultName: string;
126
+ /** Default tool description. */
127
+ defaultDescription: string;
128
+ /** Map a parsed Scrapper body to the verb's normalised result. */
129
+ normalize: (body: Record<string, unknown>) => R;
130
+ }
131
+ /**
132
+ * Build a configured Scrapper {@link Tool} from validated config + an already-resolved sync
133
+ * artifact constructor. Shared by every verb and by both the async and sync factories.
134
+ */
135
+ export declare const assembleScrapperTool: <P, R>(verb: ScrapperVerb<R>, config: ScrapperBaseConfig<P, R, unknown>, instanceUrl: string, artifactConstructor: () => SpooledArtifactCtor) => Tool;
136
+ /** Validate `instanceUrl` and return the trailing-slash-normalised base. */
137
+ export declare const validateScrapperInstanceUrl: (config: {
138
+ instanceUrl?: string;
139
+ }) => string;
@@ -0,0 +1,8 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ require("../../chunk-Ble4zEEl.js");
3
+ const require_scrapper = require("../../scrapper-CR-MFDCm.js");
4
+ exports.E_INVALID_SCRAPPER_CONFIG = require_scrapper.E_INVALID_SCRAPPER_CONFIG;
5
+ exports.createScrapperArticleTool = require_scrapper.createScrapperArticleTool;
6
+ exports.createScrapperArticleToolSync = require_scrapper.createScrapperArticleToolSync;
7
+ exports.createScrapperLinksTool = require_scrapper.createScrapperLinksTool;
8
+ exports.createScrapperLinksToolSync = require_scrapper.createScrapperLinksToolSync;
@@ -0,0 +1,2 @@
1
+ import { a as E_INVALID_SCRAPPER_CONFIG, i as createScrapperLinksToolSync, n as createScrapperArticleToolSync, r as createScrapperLinksTool, t as createScrapperArticleTool } from "../../scrapper-Djl6ga2K.mjs";
2
+ export { E_INVALID_SCRAPPER_CONFIG, createScrapperArticleTool, createScrapperArticleToolSync, createScrapperLinksTool, createScrapperLinksToolSync };
@@ -5,18 +5,19 @@
5
5
  *
6
6
  * @remarks
7
7
  * Unlike the other bundled tool categories — every one of which exports a ready-made,
8
- * stateless `Tool` constant — the SearXNG battery exports a **factory**,
9
- * {@link createSearxngSearchTool}. A search tool has to talk to a *specific* SearXNG instance,
10
- * usually behind custom authentication, so it needs per-deployment configuration (a base URL
11
- * and headers) that cannot be baked in at module load.
8
+ * stateless `Tool` constant — the SearXNG battery exports **factories**,
9
+ * {@link createSearxngSearchTool} (async) and {@link createSearxngSearchToolSync}. A search tool
10
+ * has to talk to a *specific* SearXNG instance, usually behind custom authentication, so it needs
11
+ * per-deployment configuration (a base URL and headers) that cannot be baked in at module load.
12
12
  *
13
- * Because this module exports a factory rather than a `Tool` instance, it MUST NOT be
14
- * bulk-registered via `Object.values(batteries)`. Call the factory first, then register the
15
- * returned tool: `new ToolRegistry([createSearxngSearchTool({ instanceUrl })])`.
13
+ * Because this module exports factories rather than `Tool` instances, they MUST NOT be
14
+ * bulk-registered via `Object.values(batteries)`. Call a factory first, then register the
15
+ * returned tool: `new ToolRegistry([await createSearxngSearchTool({ instanceUrl })])`.
16
16
  *
17
17
  * @see https://docs.searxng.org/dev/search_api.html
18
18
  */
19
- import { Tool, type ArtifactConstructorResolver } from "../../../common";
19
+ import { Tool } from "../../../forge";
20
+ import { type ArtifactResolver, type SyncArtifactResolver } from "../_shared/index";
20
21
  import type { NextFn } from '@nhtio/middleware';
21
22
  export { E_INVALID_SEARXNG_CONFIG } from "./exceptions";
22
23
  /** A static set of request headers (used for custom authentication). */
@@ -76,7 +77,7 @@ export interface SearxngRequestContext {
76
77
  * @remarks
77
78
  * Stages reshape, redact, enrich, or re-rank {@link SearxngResponseContext.results}, mutate the
78
79
  * raw body, or set {@link SearxngResponseContext.output} to override the serialised string
79
- * verbatim (e.g. to render markdown that matches a markdown `artifactConstructor`).
80
+ * verbatim (e.g. to render markdown that matches a markdown `artifact` resolver).
80
81
  */
81
82
  export interface SearxngResponseContext {
82
83
  /** The tool's name (read-only). */
@@ -98,8 +99,14 @@ export interface SearxngResponseContext {
98
99
  export type SearxngInputMiddlewareFn = (ctx: SearxngRequestContext, next: NextFn) => void | Promise<void>;
99
100
  /** An output-pipeline stage. Onion middleware over {@link SearxngResponseContext}. */
100
101
  export type SearxngOutputMiddlewareFn = (ctx: SearxngResponseContext, next: NextFn) => void | Promise<void>;
101
- /** Configuration for {@link createSearxngSearchTool}. */
102
- export interface SearxngToolConfig {
102
+ /**
103
+ * Configuration for {@link createSearxngSearchTool} (async) and
104
+ * {@link createSearxngSearchToolSync} (sync — `artifact` narrowed to the sync subset).
105
+ *
106
+ * @typeParam A - The {@link ArtifactResolver} variant accepted: the full resolver (async factory)
107
+ * or the sync subset ({@link createSearxngSearchToolSync}).
108
+ */
109
+ export interface SearxngToolConfig<A = ArtifactResolver> {
103
110
  /** Base URL of the SearXNG instance, e.g. `https://searx.example.org`. Required. */
104
111
  instanceUrl: string;
105
112
  /** Custom request headers — a static object or a (sync/async) resolver for refreshable auth. */
@@ -116,20 +123,26 @@ export interface SearxngToolConfig {
116
123
  /** Tool description override. */
117
124
  description?: string;
118
125
  /**
119
- * Spool artifact constructor for the tool's output. Default `() => SpooledJsonArtifact`.
120
- * Pass `() => SpooledMarkdownArtifact` (paired with an output stage that renders markdown into
121
- * `ctx.output`) or `() => SpooledArtifact` for plain text.
126
+ * Spool-artifact resolver for the tool's output. Default `() => SpooledJsonArtifact`. Accepts a
127
+ * constructor, a sync resolver, or — via {@link createSearxngSearchTool} — an async /
128
+ * dynamic-import resolver. Pass `() => SpooledMarkdownArtifact` (paired with an output stage that
129
+ * renders markdown into `ctx.output`) or `() => SpooledArtifact` for plain text.
122
130
  */
123
- artifactConstructor?: ArtifactConstructorResolver;
131
+ artifact?: A;
124
132
  /** Stages run before the HTTP request. See {@link SearxngRequestContext}. */
125
133
  inputPipeline?: SearxngInputMiddlewareFn[];
126
134
  /** Stages run after the response is parsed. See {@link SearxngResponseContext}. */
127
135
  outputPipeline?: SearxngOutputMiddlewareFn[];
128
136
  }
129
137
  /**
130
- * Create a configured SearXNG search {@link Tool}.
138
+ * Create a configured SearXNG search {@link Tool} (async — accepts a dynamic-import `artifact`).
131
139
  *
132
140
  * @remarks
141
+ * Async because `artifact` may be an async / dynamic-import resolver, which must be resolved to the
142
+ * sync `() => Ctor` that `Tool.artifactConstructor` requires before the tool is built (the
143
+ * wrap-site invokes it synchronously). For the common case where you reference the artifact class
144
+ * directly, use {@link createSearxngSearchToolSync} and skip the `await`.
145
+ *
133
146
  * The handler always requests `format=json`. Note that SearXNG ships with JSON output
134
147
  * **disabled** by default (it is abused by bots); an instance that has not enabled
135
148
  * `search.formats: [json]` in its `settings.yml` answers with HTTP 403, which the tool returns
@@ -142,9 +155,23 @@ export interface SearxngToolConfig {
142
155
  * {@link https://github.com/searxng/searxng/issues/2457 | searxng#2457}). The tool passes the
143
156
  * field through verbatim; use `results.length` as the authoritative count.
144
157
  *
145
- * @param config - The instance URL, optional custom headers, output-format policy, artifact
146
- * type, and input/output middleware pipelines. See {@link SearxngToolConfig}.
158
+ * @param config - The instance URL, optional custom headers, output-format policy, `artifact`
159
+ * resolver, and input/output middleware pipelines. See {@link SearxngToolConfig}.
160
+ * @returns A promise of a `Tool` ready to register in a `ToolRegistry`.
161
+ * @throws {@link E_INVALID_SEARXNG_CONFIG} when `instanceUrl` or `artifact` is invalid.
162
+ */
163
+ export declare const createSearxngSearchTool: (config: SearxngToolConfig<ArtifactResolver>) => Promise<Tool>;
164
+ /**
165
+ * Synchronous {@link createSearxngSearchTool} — the ergonomic common path.
166
+ *
167
+ * @remarks
168
+ * `artifact` is narrowed to the sync subset (a constructor or a sync resolver). Passing an async
169
+ * resolver is a compile-time type error and a runtime {@link E_INVALID_SEARXNG_CONFIG}; for
170
+ * dynamic-import resolvers use the async {@link createSearxngSearchTool}. See its docs for the
171
+ * `number_of_results` caveat and 403/JSON-disabled behaviour.
172
+ *
173
+ * @param config - Same as {@link SearxngToolConfig}, with `artifact` restricted to the sync subset.
147
174
  * @returns A `Tool` ready to register in a `ToolRegistry`.
148
- * @throws {@link E_INVALID_SEARXNG_CONFIG} when `instanceUrl` is missing or unparseable.
175
+ * @throws {@link E_INVALID_SEARXNG_CONFIG} when `instanceUrl` or `artifact` is invalid (incl. an async resolver).
149
176
  */
150
- export declare const createSearxngSearchTool: (config: SearxngToolConfig) => Tool;
177
+ export declare const createSearxngSearchToolSync: (config: SearxngToolConfig<SyncArtifactResolver>) => Tool;
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Ble4zEEl.js");
3
- const require_searxng = require("../../searxng-COD67eJC.js");
3
+ const require_searxng = require("../../searxng-CMhRD5xo.js");
4
4
  exports.E_INVALID_SEARXNG_CONFIG = require_searxng.E_INVALID_SEARXNG_CONFIG;
5
5
  exports.createSearxngSearchTool = require_searxng.createSearxngSearchTool;
6
+ exports.createSearxngSearchToolSync = require_searxng.createSearxngSearchToolSync;
@@ -1,2 +1,2 @@
1
- import { n as E_INVALID_SEARXNG_CONFIG, t as createSearxngSearchTool } from "../../searxng-oL3Z5Qo2.mjs";
2
- export { E_INVALID_SEARXNG_CONFIG, createSearxngSearchTool };
1
+ import { n as createSearxngSearchToolSync, r as E_INVALID_SEARXNG_CONFIG, t as createSearxngSearchTool } from "../../searxng-yWwuON_Y.mjs";
2
+ export { E_INVALID_SEARXNG_CONFIG, createSearxngSearchTool, createSearxngSearchToolSync };
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../tool_registry-C5wfDxaq.js");
4
- const require_tool = require("../../tool-DjUJeSzk.js");
5
- require("../../common-Do0PmqEC.js");
6
- const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-DyevhaL6.js");
3
+ const require_tool_registry = require("../../tool_registry-CKJPze3j.js");
4
+ const require_tool = require("../../tool-D5WGVIcI.js");
5
+ require("../../common-DZl3ADJs.js");
6
+ const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-ClX72lek.js");
7
7
  require("../../guards.cjs");
8
8
  let _nhtio_validation = require("@nhtio/validation");
9
9
  //#region src/batteries/tools/standing_instructions/index.ts
@@ -1,7 +1,7 @@
1
- import { o as isError } from "../../tool_registry-BuMKln6b.mjs";
2
- import { t as Tool } from "../../tool-DMvZFz9h.mjs";
3
- import "../../common-DwyIhf5B.mjs";
4
- import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-DJnjD3Ti.mjs";
1
+ import { o as isError } from "../../tool_registry-791Vrjtf.mjs";
2
+ import { t as Tool } from "../../tool-wMYMVl60.mjs";
3
+ import "../../common-DYDUi99O.mjs";
4
+ import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-wkrBF3oX.mjs";
5
5
  import "../../guards.mjs";
6
6
  import { validator } from "@nhtio/validation";
7
7
  //#region src/batteries/tools/standing_instructions/index.ts
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../tool_registry-C5wfDxaq.js");
4
- const require_tool = require("../../tool-DjUJeSzk.js");
5
- require("../../common-Do0PmqEC.js");
6
- const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-DyevhaL6.js");
3
+ const require_tool_registry = require("../../tool_registry-CKJPze3j.js");
4
+ const require_tool = require("../../tool-D5WGVIcI.js");
5
+ require("../../common-DZl3ADJs.js");
6
+ const require_spooled_markdown_artifact = require("../../spooled_markdown_artifact-ClX72lek.js");
7
7
  require("../../guards.cjs");
8
8
  const require_lib_helpers_bignum = require("../../lib/helpers/bignum.cjs");
9
9
  let _nhtio_validation = require("@nhtio/validation");
@@ -1,7 +1,7 @@
1
- import { o as isError } from "../../tool_registry-BuMKln6b.mjs";
2
- import { t as Tool } from "../../tool-DMvZFz9h.mjs";
3
- import "../../common-DwyIhf5B.mjs";
4
- import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-DJnjD3Ti.mjs";
1
+ import { o as isError } from "../../tool_registry-791Vrjtf.mjs";
2
+ import { t as Tool } from "../../tool-wMYMVl60.mjs";
3
+ import "../../common-DYDUi99O.mjs";
4
+ import { n as SpooledJsonArtifact } from "../../spooled_markdown_artifact-wkrBF3oX.mjs";
5
5
  import "../../guards.mjs";
6
6
  import { bigMean, bigSum, bigToNumber, formatBig } from "../../lib/helpers/bignum.mjs";
7
7
  import { validator } from "@nhtio/validation";
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../tool_registry-C5wfDxaq.js");
4
- const require_tool = require("../../tool-DjUJeSzk.js");
5
- require("../../common-Do0PmqEC.js");
3
+ const require_tool_registry = require("../../tool_registry-CKJPze3j.js");
4
+ const require_tool = require("../../tool-D5WGVIcI.js");
5
+ require("../../common-DZl3ADJs.js");
6
6
  require("../../guards.cjs");
7
7
  let _nhtio_validation = require("@nhtio/validation");
8
8
  let case_anything = require("case-anything");