@nhtio/adk 1.20260607.2 → 1.20260609.1

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 (521) hide show
  1. package/CHANGELOG.md +230 -0
  2. package/batteries/embeddings/openai/adapter.cjs +1 -1
  3. package/batteries/embeddings/openai/adapter.mjs +1 -1
  4. package/batteries/embeddings/openai/exceptions.cjs +1 -1
  5. package/batteries/embeddings/openai/exceptions.mjs +1 -1
  6. package/batteries/embeddings/openai/types.d.ts +7 -0
  7. package/batteries/embeddings/webllm/adapter.cjs +1 -1
  8. package/batteries/embeddings/webllm/adapter.mjs +1 -1
  9. package/batteries/embeddings/webllm/exceptions.cjs +1 -1
  10. package/batteries/embeddings/webllm/exceptions.mjs +1 -1
  11. package/batteries/llm/chat_common/helpers.d.ts +165 -0
  12. package/batteries/llm/chat_common/types.d.ts +309 -0
  13. package/batteries/llm/index.d.ts +5 -0
  14. package/batteries/llm/ollama/adapter.cjs +736 -0
  15. package/batteries/llm/ollama/adapter.cjs.map +1 -0
  16. package/batteries/llm/ollama/adapter.d.ts +64 -0
  17. package/batteries/llm/ollama/adapter.mjs +734 -0
  18. package/batteries/llm/ollama/adapter.mjs.map +1 -0
  19. package/batteries/llm/ollama/exceptions.cjs +105 -0
  20. package/batteries/llm/ollama/exceptions.cjs.map +1 -0
  21. package/batteries/llm/ollama/exceptions.d.ts +112 -0
  22. package/batteries/llm/ollama/exceptions.mjs +96 -0
  23. package/batteries/llm/ollama/exceptions.mjs.map +1 -0
  24. package/batteries/llm/ollama/helpers.cjs +487 -0
  25. package/batteries/llm/ollama/helpers.cjs.map +1 -0
  26. package/batteries/llm/ollama/helpers.d.ts +158 -0
  27. package/batteries/llm/ollama/helpers.mjs +450 -0
  28. package/batteries/llm/ollama/helpers.mjs.map +1 -0
  29. package/batteries/llm/ollama/index.d.ts +29 -0
  30. package/batteries/llm/ollama/types.cjs +2 -0
  31. package/batteries/llm/ollama/types.d.ts +334 -0
  32. package/batteries/llm/ollama/types.mjs +0 -0
  33. package/batteries/llm/ollama/validation.cjs +130 -0
  34. package/batteries/llm/ollama/validation.cjs.map +1 -0
  35. package/batteries/llm/ollama/validation.d.ts +31 -0
  36. package/batteries/llm/ollama/validation.mjs +127 -0
  37. package/batteries/llm/ollama/validation.mjs.map +1 -0
  38. package/batteries/llm/ollama.cjs +54 -0
  39. package/batteries/llm/ollama.mjs +6 -0
  40. package/batteries/llm/openai_chat_completions/adapter.cjs +36 -19
  41. package/batteries/llm/openai_chat_completions/adapter.cjs.map +1 -1
  42. package/batteries/llm/openai_chat_completions/adapter.mjs +23 -6
  43. package/batteries/llm/openai_chat_completions/adapter.mjs.map +1 -1
  44. package/batteries/llm/openai_chat_completions/exceptions.cjs +1 -1
  45. package/batteries/llm/openai_chat_completions/exceptions.mjs +1 -1
  46. package/batteries/llm/openai_chat_completions/helpers.cjs +80 -320
  47. package/batteries/llm/openai_chat_completions/helpers.cjs.map +1 -1
  48. package/batteries/llm/openai_chat_completions/helpers.d.ts +68 -144
  49. package/batteries/llm/openai_chat_completions/helpers.mjs +40 -280
  50. package/batteries/llm/openai_chat_completions/helpers.mjs.map +1 -1
  51. package/batteries/llm/openai_chat_completions/types.d.ts +273 -181
  52. package/batteries/llm/openai_chat_completions/validation.cjs +2 -2
  53. package/batteries/llm/openai_chat_completions/validation.cjs.map +1 -1
  54. package/batteries/llm/openai_chat_completions/validation.mjs +2 -2
  55. package/batteries/llm/openai_chat_completions/validation.mjs.map +1 -1
  56. package/batteries/llm/openai_chat_completions.cjs +29 -28
  57. package/batteries/llm/openai_chat_completions.mjs +2 -1
  58. package/batteries/llm/webllm_chat_completions/adapter.cjs +38 -19
  59. package/batteries/llm/webllm_chat_completions/adapter.cjs.map +1 -1
  60. package/batteries/llm/webllm_chat_completions/adapter.d.ts +18 -0
  61. package/batteries/llm/webllm_chat_completions/adapter.mjs +25 -6
  62. package/batteries/llm/webllm_chat_completions/adapter.mjs.map +1 -1
  63. package/batteries/llm/webllm_chat_completions/exceptions.cjs +1 -1
  64. package/batteries/llm/webllm_chat_completions/exceptions.mjs +1 -1
  65. package/batteries/llm/webllm_chat_completions/helpers.cjs +29 -28
  66. package/batteries/llm/webllm_chat_completions/helpers.mjs +2 -1
  67. package/batteries/llm/webllm_chat_completions/types.d.ts +21 -0
  68. package/batteries/llm/webllm_chat_completions/validation.cjs +13 -1
  69. package/batteries/llm/webllm_chat_completions/validation.cjs.map +1 -1
  70. package/batteries/llm/webllm_chat_completions/validation.d.ts +12 -0
  71. package/batteries/llm/webllm_chat_completions/validation.mjs +13 -1
  72. package/batteries/llm/webllm_chat_completions/validation.mjs.map +1 -1
  73. package/batteries/llm/webllm_chat_completions.cjs +29 -28
  74. package/batteries/llm/webllm_chat_completions.mjs +2 -1
  75. package/batteries/llm.cjs +44 -28
  76. package/batteries/llm.mjs +9 -4
  77. package/batteries/storage/flydrive.cjs +1 -1
  78. package/batteries/storage/flydrive.mjs +1 -1
  79. package/batteries/storage/in_memory/index.d.ts +1 -1
  80. package/batteries/storage/in_memory.cjs +2 -2
  81. package/batteries/storage/in_memory.cjs.map +1 -1
  82. package/batteries/storage/in_memory.mjs +2 -2
  83. package/batteries/storage/in_memory.mjs.map +1 -1
  84. package/batteries/storage/opfs/index.d.ts +19 -0
  85. package/batteries/storage/opfs.cjs +1 -1
  86. package/batteries/storage/opfs.cjs.map +1 -1
  87. package/batteries/storage/opfs.mjs +1 -1
  88. package/batteries/storage/opfs.mjs.map +1 -1
  89. package/batteries/tools/_shared/index.d.ts +121 -0
  90. package/batteries/tools/_shared.cjs +157 -0
  91. package/batteries/tools/_shared.cjs.map +1 -0
  92. package/batteries/tools/_shared.mjs +149 -0
  93. package/batteries/tools/_shared.mjs.map +1 -0
  94. package/batteries/tools/color.cjs +3 -2
  95. package/batteries/tools/color.cjs.map +1 -1
  96. package/batteries/tools/color.mjs +3 -2
  97. package/batteries/tools/color.mjs.map +1 -1
  98. package/batteries/tools/comparison.cjs +4 -3
  99. package/batteries/tools/comparison.cjs.map +1 -1
  100. package/batteries/tools/comparison.mjs +4 -3
  101. package/batteries/tools/comparison.mjs.map +1 -1
  102. package/batteries/tools/data_structure.cjs +30 -10
  103. package/batteries/tools/data_structure.cjs.map +1 -1
  104. package/batteries/tools/data_structure.mjs +30 -10
  105. package/batteries/tools/data_structure.mjs.map +1 -1
  106. package/batteries/tools/datetime_extended.cjs +5 -10
  107. package/batteries/tools/datetime_extended.cjs.map +1 -1
  108. package/batteries/tools/datetime_extended.mjs +5 -10
  109. package/batteries/tools/datetime_extended.mjs.map +1 -1
  110. package/batteries/tools/datetime_math.cjs +2 -2
  111. package/batteries/tools/datetime_math.mjs +2 -2
  112. package/batteries/tools/encoding.cjs +13 -4
  113. package/batteries/tools/encoding.cjs.map +1 -1
  114. package/batteries/tools/encoding.mjs +13 -4
  115. package/batteries/tools/encoding.mjs.map +1 -1
  116. package/batteries/tools/formatting.cjs +4 -4
  117. package/batteries/tools/formatting.cjs.map +1 -1
  118. package/batteries/tools/formatting.mjs +4 -4
  119. package/batteries/tools/formatting.mjs.map +1 -1
  120. package/batteries/tools/geo_basics.cjs +2 -2
  121. package/batteries/tools/geo_basics.mjs +2 -2
  122. package/batteries/tools/index.d.ts +3 -0
  123. package/batteries/tools/math.cjs +10 -8
  124. package/batteries/tools/math.cjs.map +1 -1
  125. package/batteries/tools/math.mjs +10 -8
  126. package/batteries/tools/math.mjs.map +1 -1
  127. package/batteries/tools/memory.cjs +5 -5
  128. package/batteries/tools/memory.mjs +5 -5
  129. package/batteries/tools/parsing.cjs +9 -5
  130. package/batteries/tools/parsing.cjs.map +1 -1
  131. package/batteries/tools/parsing.mjs +9 -5
  132. package/batteries/tools/parsing.mjs.map +1 -1
  133. package/batteries/tools/retrievables.cjs +4 -4
  134. package/batteries/tools/retrievables.mjs +4 -4
  135. package/batteries/tools/scrapper/exceptions.d.ts +21 -0
  136. package/batteries/tools/scrapper/index.d.ts +172 -0
  137. package/batteries/tools/scrapper/shared.d.ts +139 -0
  138. package/batteries/tools/scrapper.cjs +8 -0
  139. package/batteries/tools/scrapper.mjs +2 -0
  140. package/batteries/tools/searxng/exceptions.d.ts +21 -0
  141. package/batteries/tools/searxng/index.d.ts +177 -0
  142. package/batteries/tools/searxng.cjs +6 -0
  143. package/batteries/tools/searxng.mjs +2 -0
  144. package/batteries/tools/standing_instructions.cjs +4 -4
  145. package/batteries/tools/standing_instructions.mjs +4 -4
  146. package/batteries/tools/statistics.cjs +54 -43
  147. package/batteries/tools/statistics.cjs.map +1 -1
  148. package/batteries/tools/statistics.mjs +54 -43
  149. package/batteries/tools/statistics.mjs.map +1 -1
  150. package/batteries/tools/string_processing.cjs +5 -5
  151. package/batteries/tools/string_processing.cjs.map +1 -1
  152. package/batteries/tools/string_processing.mjs +5 -5
  153. package/batteries/tools/string_processing.mjs.map +1 -1
  154. package/batteries/tools/structured_data.cjs +8 -13
  155. package/batteries/tools/structured_data.cjs.map +1 -1
  156. package/batteries/tools/structured_data.mjs +8 -13
  157. package/batteries/tools/structured_data.mjs.map +1 -1
  158. package/batteries/tools/text_analysis.cjs +3 -3
  159. package/batteries/tools/text_analysis.mjs +3 -3
  160. package/batteries/tools/text_comparison.cjs +2 -2
  161. package/batteries/tools/text_comparison.mjs +2 -2
  162. package/batteries/tools/time.cjs +2 -2
  163. package/batteries/tools/time.mjs +2 -2
  164. package/batteries/tools/unit_conversion.cjs +10 -8
  165. package/batteries/tools/unit_conversion.cjs.map +1 -1
  166. package/batteries/tools/unit_conversion.mjs +10 -8
  167. package/batteries/tools/unit_conversion.mjs.map +1 -1
  168. package/batteries/tools/web_retrieval/index.d.ts +186 -0
  169. package/batteries/tools/web_retrieval.cjs +206 -0
  170. package/batteries/tools/web_retrieval.cjs.map +1 -0
  171. package/batteries/tools/web_retrieval.mjs +201 -0
  172. package/batteries/tools/web_retrieval.mjs.map +1 -0
  173. package/batteries/tools.cjs +15 -0
  174. package/batteries/tools.mjs +4 -1
  175. package/batteries/vector/arangodb/index.d.ts +2 -0
  176. package/batteries/vector/arangodb.cjs +2 -1
  177. package/batteries/vector/arangodb.cjs.map +1 -1
  178. package/batteries/vector/arangodb.mjs +2 -1
  179. package/batteries/vector/arangodb.mjs.map +1 -1
  180. package/batteries/vector/builder.cjs +31 -0
  181. package/batteries/vector/builder.cjs.map +1 -1
  182. package/batteries/vector/builder.d.ts +58 -0
  183. package/batteries/vector/builder.mjs +31 -0
  184. package/batteries/vector/builder.mjs.map +1 -1
  185. package/batteries/vector/chroma/index.d.ts +4 -0
  186. package/batteries/vector/chroma.cjs +3 -0
  187. package/batteries/vector/chroma.cjs.map +1 -1
  188. package/batteries/vector/chroma.mjs +3 -0
  189. package/batteries/vector/chroma.mjs.map +1 -1
  190. package/batteries/vector/clickhouse/index.d.ts +2 -0
  191. package/batteries/vector/clickhouse.cjs +2 -1
  192. package/batteries/vector/clickhouse.cjs.map +1 -1
  193. package/batteries/vector/clickhouse.mjs +2 -1
  194. package/batteries/vector/clickhouse.mjs.map +1 -1
  195. package/batteries/vector/cloudflare/index.d.ts +2 -0
  196. package/batteries/vector/cloudflare.cjs +2 -1
  197. package/batteries/vector/cloudflare.cjs.map +1 -1
  198. package/batteries/vector/cloudflare.mjs +2 -1
  199. package/batteries/vector/cloudflare.mjs.map +1 -1
  200. package/batteries/vector/conformance/index.d.ts +22 -0
  201. package/batteries/vector/conformance.cjs +22 -0
  202. package/batteries/vector/conformance.cjs.map +1 -1
  203. package/batteries/vector/conformance.mjs +22 -0
  204. package/batteries/vector/conformance.mjs.map +1 -1
  205. package/batteries/vector/contract.cjs +22 -0
  206. package/batteries/vector/contract.cjs.map +1 -1
  207. package/batteries/vector/contract.d.ts +51 -0
  208. package/batteries/vector/contract.mjs +22 -0
  209. package/batteries/vector/contract.mjs.map +1 -1
  210. package/batteries/vector/couchbase/index.d.ts +2 -0
  211. package/batteries/vector/couchbase.cjs +2 -1
  212. package/batteries/vector/couchbase.cjs.map +1 -1
  213. package/batteries/vector/couchbase.mjs +2 -1
  214. package/batteries/vector/couchbase.mjs.map +1 -1
  215. package/batteries/vector/duckdb/index.d.ts +2 -0
  216. package/batteries/vector/duckdb.cjs +2 -1
  217. package/batteries/vector/duckdb.cjs.map +1 -1
  218. package/batteries/vector/duckdb.mjs +2 -1
  219. package/batteries/vector/duckdb.mjs.map +1 -1
  220. package/batteries/vector/elasticsearch/index.d.ts +2 -0
  221. package/batteries/vector/elasticsearch.cjs +2 -1
  222. package/batteries/vector/elasticsearch.cjs.map +1 -1
  223. package/batteries/vector/elasticsearch.mjs +2 -1
  224. package/batteries/vector/elasticsearch.mjs.map +1 -1
  225. package/batteries/vector/exceptions.cjs +1 -1
  226. package/batteries/vector/exceptions.mjs +1 -1
  227. package/batteries/vector/factory.cjs +6 -0
  228. package/batteries/vector/factory.cjs.map +1 -1
  229. package/batteries/vector/factory.d.ts +14 -0
  230. package/batteries/vector/factory.mjs +6 -0
  231. package/batteries/vector/factory.mjs.map +1 -1
  232. package/batteries/vector/filters.cjs +22 -1
  233. package/batteries/vector/filters.cjs.map +1 -1
  234. package/batteries/vector/filters.d.ts +38 -0
  235. package/batteries/vector/filters.mjs +22 -1
  236. package/batteries/vector/filters.mjs.map +1 -1
  237. package/batteries/vector/helpers.cjs +13 -0
  238. package/batteries/vector/helpers.cjs.map +1 -1
  239. package/batteries/vector/helpers.d.ts +14 -0
  240. package/batteries/vector/helpers.mjs +13 -0
  241. package/batteries/vector/helpers.mjs.map +1 -1
  242. package/batteries/vector/hnswlib/index.d.ts +2 -0
  243. package/batteries/vector/hnswlib.cjs +2 -1
  244. package/batteries/vector/hnswlib.cjs.map +1 -1
  245. package/batteries/vector/hnswlib.mjs +2 -1
  246. package/batteries/vector/hnswlib.mjs.map +1 -1
  247. package/batteries/vector/in_memory/index.d.ts +1 -0
  248. package/batteries/vector/in_memory.cjs +1 -0
  249. package/batteries/vector/in_memory.cjs.map +1 -1
  250. package/batteries/vector/in_memory.mjs +1 -0
  251. package/batteries/vector/in_memory.mjs.map +1 -1
  252. package/batteries/vector/lancedb/index.d.ts +2 -0
  253. package/batteries/vector/lancedb.cjs +2 -1
  254. package/batteries/vector/lancedb.cjs.map +1 -1
  255. package/batteries/vector/lancedb.mjs +2 -1
  256. package/batteries/vector/lancedb.mjs.map +1 -1
  257. package/batteries/vector/mariadb/index.d.ts +2 -0
  258. package/batteries/vector/mariadb.cjs +2 -1
  259. package/batteries/vector/mariadb.cjs.map +1 -1
  260. package/batteries/vector/mariadb.mjs +2 -1
  261. package/batteries/vector/mariadb.mjs.map +1 -1
  262. package/batteries/vector/meilisearch/index.d.ts +2 -0
  263. package/batteries/vector/meilisearch.cjs +2 -1
  264. package/batteries/vector/meilisearch.cjs.map +1 -1
  265. package/batteries/vector/meilisearch.mjs +2 -1
  266. package/batteries/vector/meilisearch.mjs.map +1 -1
  267. package/batteries/vector/migrate.cjs +18 -1
  268. package/batteries/vector/migrate.cjs.map +1 -1
  269. package/batteries/vector/migrate.d.ts +31 -0
  270. package/batteries/vector/migrate.mjs +18 -1
  271. package/batteries/vector/migrate.mjs.map +1 -1
  272. package/batteries/vector/milvus/index.d.ts +5 -0
  273. package/batteries/vector/milvus.cjs +4 -0
  274. package/batteries/vector/milvus.cjs.map +1 -1
  275. package/batteries/vector/milvus.mjs +4 -0
  276. package/batteries/vector/milvus.mjs.map +1 -1
  277. package/batteries/vector/mongodb/index.d.ts +2 -0
  278. package/batteries/vector/mongodb.cjs +2 -1
  279. package/batteries/vector/mongodb.cjs.map +1 -1
  280. package/batteries/vector/mongodb.mjs +2 -1
  281. package/batteries/vector/mongodb.mjs.map +1 -1
  282. package/batteries/vector/neo4j/index.d.ts +2 -0
  283. package/batteries/vector/neo4j.cjs +2 -1
  284. package/batteries/vector/neo4j.cjs.map +1 -1
  285. package/batteries/vector/neo4j.mjs +2 -1
  286. package/batteries/vector/neo4j.mjs.map +1 -1
  287. package/batteries/vector/opensearch/index.d.ts +2 -0
  288. package/batteries/vector/opensearch.cjs +2 -1
  289. package/batteries/vector/opensearch.cjs.map +1 -1
  290. package/batteries/vector/opensearch.mjs +2 -1
  291. package/batteries/vector/opensearch.mjs.map +1 -1
  292. package/batteries/vector/oracle23ai/index.d.ts +2 -0
  293. package/batteries/vector/oracle23ai.cjs +2 -1
  294. package/batteries/vector/oracle23ai.cjs.map +1 -1
  295. package/batteries/vector/oracle23ai.mjs +2 -1
  296. package/batteries/vector/oracle23ai.mjs.map +1 -1
  297. package/batteries/vector/orama/index.d.ts +1 -0
  298. package/batteries/vector/orama.cjs +1 -0
  299. package/batteries/vector/orama.cjs.map +1 -1
  300. package/batteries/vector/orama.mjs +1 -0
  301. package/batteries/vector/orama.mjs.map +1 -1
  302. package/batteries/vector/pgvector/index.d.ts +9 -2
  303. package/batteries/vector/pgvector.cjs +4 -0
  304. package/batteries/vector/pgvector.cjs.map +1 -1
  305. package/batteries/vector/pgvector.mjs +4 -0
  306. package/batteries/vector/pgvector.mjs.map +1 -1
  307. package/batteries/vector/pinecone/index.d.ts +5 -0
  308. package/batteries/vector/pinecone.cjs +3 -1
  309. package/batteries/vector/pinecone.cjs.map +1 -1
  310. package/batteries/vector/pinecone.mjs +3 -1
  311. package/batteries/vector/pinecone.mjs.map +1 -1
  312. package/batteries/vector/plan.d.ts +27 -0
  313. package/batteries/vector/qdrant/index.d.ts +5 -0
  314. package/batteries/vector/qdrant.cjs +4 -0
  315. package/batteries/vector/qdrant.cjs.map +1 -1
  316. package/batteries/vector/qdrant.mjs +4 -0
  317. package/batteries/vector/qdrant.mjs.map +1 -1
  318. package/batteries/vector/redis/index.d.ts +2 -0
  319. package/batteries/vector/redis.cjs +2 -1
  320. package/batteries/vector/redis.cjs.map +1 -1
  321. package/batteries/vector/redis.mjs +2 -1
  322. package/batteries/vector/redis.mjs.map +1 -1
  323. package/batteries/vector/retrievable.cjs +9 -1
  324. package/batteries/vector/retrievable.cjs.map +1 -1
  325. package/batteries/vector/retrievable.mjs +9 -1
  326. package/batteries/vector/retrievable.mjs.map +1 -1
  327. package/batteries/vector/retrievable_glue.d.ts +21 -0
  328. package/batteries/vector/s3vectors/index.d.ts +2 -0
  329. package/batteries/vector/s3vectors.cjs +2 -1
  330. package/batteries/vector/s3vectors.cjs.map +1 -1
  331. package/batteries/vector/s3vectors.mjs +2 -1
  332. package/batteries/vector/s3vectors.mjs.map +1 -1
  333. package/batteries/vector/schema.cjs +28 -0
  334. package/batteries/vector/schema.cjs.map +1 -1
  335. package/batteries/vector/schema.d.ts +39 -0
  336. package/batteries/vector/schema.mjs +28 -0
  337. package/batteries/vector/schema.mjs.map +1 -1
  338. package/batteries/vector/solr/index.d.ts +2 -0
  339. package/batteries/vector/solr.cjs +2 -1
  340. package/batteries/vector/solr.cjs.map +1 -1
  341. package/batteries/vector/solr.mjs +2 -1
  342. package/batteries/vector/solr.mjs.map +1 -1
  343. package/batteries/vector/sqlite_vec/index.d.ts +6 -3
  344. package/batteries/vector/sqlite_vec.cjs +2 -0
  345. package/batteries/vector/sqlite_vec.cjs.map +1 -1
  346. package/batteries/vector/sqlite_vec.mjs +2 -0
  347. package/batteries/vector/sqlite_vec.mjs.map +1 -1
  348. package/batteries/vector/surrealdb/index.d.ts +2 -0
  349. package/batteries/vector/surrealdb.cjs +2 -1
  350. package/batteries/vector/surrealdb.cjs.map +1 -1
  351. package/batteries/vector/surrealdb.mjs +2 -1
  352. package/batteries/vector/surrealdb.mjs.map +1 -1
  353. package/batteries/vector/types.d.ts +27 -0
  354. package/batteries/vector/typesense/index.d.ts +2 -0
  355. package/batteries/vector/typesense.cjs +2 -1
  356. package/batteries/vector/typesense.cjs.map +1 -1
  357. package/batteries/vector/typesense.mjs +2 -1
  358. package/batteries/vector/typesense.mjs.map +1 -1
  359. package/batteries/vector/validation.cjs +14 -0
  360. package/batteries/vector/validation.cjs.map +1 -1
  361. package/batteries/vector/validation.d.ts +14 -0
  362. package/batteries/vector/validation.mjs +14 -0
  363. package/batteries/vector/validation.mjs.map +1 -1
  364. package/batteries/vector/vector_store_constructor.cjs +1 -1
  365. package/batteries/vector/vector_store_constructor.cjs.map +1 -1
  366. package/batteries/vector/vector_store_constructor.d.ts +1 -1
  367. package/batteries/vector/vector_store_constructor.mjs +1 -1
  368. package/batteries/vector/vector_store_constructor.mjs.map +1 -1
  369. package/batteries/vector/vespa/index.d.ts +2 -0
  370. package/batteries/vector/vespa.cjs +2 -1
  371. package/batteries/vector/vespa.cjs.map +1 -1
  372. package/batteries/vector/vespa.mjs +2 -1
  373. package/batteries/vector/vespa.mjs.map +1 -1
  374. package/batteries/vector/weaviate/index.d.ts +2 -0
  375. package/batteries/vector/weaviate.cjs +2 -1
  376. package/batteries/vector/weaviate.cjs.map +1 -1
  377. package/batteries/vector/weaviate.mjs +2 -1
  378. package/batteries/vector/weaviate.mjs.map +1 -1
  379. package/batteries.cjs +58 -28
  380. package/batteries.mjs +12 -5
  381. package/{common-BT0nfCi9.mjs → common-DYDUi99O.mjs} +9 -9
  382. package/common-DYDUi99O.mjs.map +1 -0
  383. package/{common-Cj8TaQ9U.js → common-DZl3ADJs.js} +9 -9
  384. package/common-DZl3ADJs.js.map +1 -0
  385. package/common.cjs +7 -7
  386. package/common.mjs +7 -7
  387. package/{dispatch_runner-DPcS7Y_M.mjs → dispatch_runner--ZhdDWRZ.mjs} +27 -5
  388. package/{dispatch_runner-DPcS7Y_M.mjs.map → dispatch_runner--ZhdDWRZ.mjs.map} +1 -1
  389. package/{dispatch_runner-BHBNupqp.js → dispatch_runner-nHDKkxye.js} +27 -5
  390. package/{dispatch_runner-BHBNupqp.js.map → dispatch_runner-nHDKkxye.js.map} +1 -1
  391. package/dispatch_runner.cjs +1 -1
  392. package/dispatch_runner.d.ts +1 -1
  393. package/dispatch_runner.mjs +1 -1
  394. package/eslint/rules/artifact_tool_forbids_artifact_constructor.cjs +1 -0
  395. package/eslint/rules/artifact_tool_forbids_artifact_constructor.cjs.map +1 -1
  396. package/eslint/rules/artifact_tool_forbids_artifact_constructor.d.ts +1 -0
  397. package/eslint/rules/artifact_tool_forbids_artifact_constructor.mjs +1 -0
  398. package/eslint/rules/artifact_tool_forbids_artifact_constructor.mjs.map +1 -1
  399. package/eslint/rules/no_model_in_tool_handler.cjs +1 -0
  400. package/eslint/rules/no_model_in_tool_handler.cjs.map +1 -1
  401. package/eslint/rules/no_model_in_tool_handler.d.ts +1 -0
  402. package/eslint/rules/no_model_in_tool_handler.mjs +1 -0
  403. package/eslint/rules/no_model_in_tool_handler.mjs.map +1 -1
  404. package/eslint/rules/require_validator_any_required.cjs +1 -0
  405. package/eslint/rules/require_validator_any_required.cjs.map +1 -1
  406. package/eslint/rules/require_validator_any_required.d.ts +1 -0
  407. package/eslint/rules/require_validator_any_required.mjs +1 -0
  408. package/eslint/rules/require_validator_any_required.mjs.map +1 -1
  409. package/eslint/rules/thought_payload_requires_replay_tag.cjs +1 -0
  410. package/eslint/rules/thought_payload_requires_replay_tag.cjs.map +1 -1
  411. package/eslint/rules/thought_payload_requires_replay_tag.d.ts +1 -0
  412. package/eslint/rules/thought_payload_requires_replay_tag.mjs +1 -0
  413. package/eslint/rules/thought_payload_requires_replay_tag.mjs.map +1 -1
  414. package/eslint/rules/token_encoding_requires_context_window.cjs +1 -0
  415. package/eslint/rules/token_encoding_requires_context_window.cjs.map +1 -1
  416. package/eslint/rules/token_encoding_requires_context_window.d.ts +1 -0
  417. package/eslint/rules/token_encoding_requires_context_window.mjs +1 -0
  418. package/eslint/rules/token_encoding_requires_context_window.mjs.map +1 -1
  419. package/eslint/rules.cjs +1 -1
  420. package/eslint/rules.mjs +1 -1
  421. package/eslint.cjs +2 -2
  422. package/eslint.mjs +2 -2
  423. package/{exceptions-BeWH2FwP.mjs → exceptions-BDhN0Xzr.mjs} +3 -2
  424. package/exceptions-BDhN0Xzr.mjs.map +1 -0
  425. package/{exceptions-CitH5wZI.js → exceptions-BRXrUKiW.js} +3 -2
  426. package/exceptions-BRXrUKiW.js.map +1 -0
  427. package/exceptions.cjs +2 -2
  428. package/exceptions.mjs +2 -2
  429. package/factories.cjs +1 -1
  430. package/factories.mjs +1 -1
  431. package/forge.cjs +4 -4
  432. package/forge.d.ts +1 -1
  433. package/forge.mjs +4 -4
  434. package/guards.cjs +9 -9
  435. package/guards.mjs +9 -9
  436. package/helpers-DSTFxTiC.js +497 -0
  437. package/helpers-DSTFxTiC.js.map +1 -0
  438. package/helpers-xhrQbMAG.mjs +306 -0
  439. package/helpers-xhrQbMAG.mjs.map +1 -0
  440. package/index.cjs +12 -12
  441. package/index.mjs +12 -12
  442. package/lib/classes/base_exception.d.ts +1 -0
  443. package/lib/classes/media.d.ts +10 -0
  444. package/lib/classes/retrievable.d.ts +1 -1
  445. package/lib/classes/spooled_json_artifact.d.ts +1 -1
  446. package/lib/classes/spooled_markdown_artifact.d.ts +1 -0
  447. package/lib/classes/tokenizable.d.ts +3 -0
  448. package/lib/classes/tool.d.ts +8 -0
  449. package/lib/classes/turn_gate.d.ts +6 -0
  450. package/lib/dispatch_runner.d.ts +4 -32
  451. package/lib/helpers/bignum.cjs +82 -0
  452. package/lib/helpers/bignum.cjs.map +1 -0
  453. package/lib/helpers/bignum.d.ts +52 -0
  454. package/lib/helpers/bignum.mjs +74 -0
  455. package/lib/helpers/bignum.mjs.map +1 -0
  456. package/lib/turn_runner.d.ts +1 -1
  457. package/lib/types/dispatch_runner.d.ts +83 -0
  458. package/lib/utils/exceptions.d.ts +1 -1
  459. package/lib/utils/retry.cjs.map +1 -1
  460. package/lib/utils/retry.d.ts +2 -0
  461. package/lib/utils/retry.mjs.map +1 -1
  462. package/mcp/adk-docs-corpus.json +1 -1
  463. package/package.json +259 -204
  464. package/{runtime-j92CNi5z.mjs → runtime-Bz5zA8wc.mjs} +2 -2
  465. package/{runtime-j92CNi5z.mjs.map → runtime-Bz5zA8wc.mjs.map} +1 -1
  466. package/{runtime-MFFcJrRv.js → runtime-DslE1aBw.js} +2 -2
  467. package/{runtime-MFFcJrRv.js.map → runtime-DslE1aBw.js.map} +1 -1
  468. package/scrapper-BHM1mCde.mjs +432 -0
  469. package/scrapper-BHM1mCde.mjs.map +1 -0
  470. package/scrapper-BeweWurk.js +462 -0
  471. package/scrapper-BeweWurk.js.map +1 -0
  472. package/searxng-BJFulNcK.mjs +247 -0
  473. package/searxng-BJFulNcK.mjs.map +1 -0
  474. package/searxng-B_D--V5q.js +265 -0
  475. package/searxng-B_D--V5q.js.map +1 -0
  476. package/skills/adk-assembly/SKILL.md +2 -2
  477. package/{spooled_artifact-CHoZgWwI.mjs → spooled_artifact-7eePq7JA.mjs} +5 -5
  478. package/{spooled_artifact-CHoZgWwI.mjs.map → spooled_artifact-7eePq7JA.mjs.map} +1 -1
  479. package/{spooled_artifact-BTq6Nzfy.js → spooled_artifact-DX8LLyUX.js} +5 -5
  480. package/{spooled_artifact-BTq6Nzfy.js.map → spooled_artifact-DX8LLyUX.js.map} +1 -1
  481. package/spooled_artifact.cjs +2 -2
  482. package/spooled_artifact.mjs +2 -2
  483. package/{spooled_markdown_artifact-CALSDxIx.js → spooled_markdown_artifact-ClX72lek.js} +4 -4
  484. package/spooled_markdown_artifact-ClX72lek.js.map +1 -0
  485. package/{spooled_markdown_artifact-Ci5UL7l4.mjs → spooled_markdown_artifact-wkrBF3oX.mjs} +4 -4
  486. package/spooled_markdown_artifact-wkrBF3oX.mjs.map +1 -0
  487. package/{thought-D34QQZZ9.mjs → thought-B_vxAiKU.mjs} +5 -5
  488. package/{thought-D34QQZZ9.mjs.map → thought-B_vxAiKU.mjs.map} +1 -1
  489. package/{thought-BbwhJ1wb.js → thought-DLwpF7MI.js} +5 -5
  490. package/{thought-BbwhJ1wb.js.map → thought-DLwpF7MI.js.map} +1 -1
  491. package/{tool-CVyZkFC7.js → tool-D5WGVIcI.js} +4 -4
  492. package/{tool-CVyZkFC7.js.map → tool-D5WGVIcI.js.map} +1 -1
  493. package/{tool-CMhaDRNd.mjs → tool-wMYMVl60.mjs} +4 -4
  494. package/{tool-CMhaDRNd.mjs.map → tool-wMYMVl60.mjs.map} +1 -1
  495. package/{tool_call-CV5qVNlb.mjs → tool_call-B4-_-vjG.mjs} +5 -5
  496. package/tool_call-B4-_-vjG.mjs.map +1 -0
  497. package/{tool_call-Db68hB7y.js → tool_call-DixVlW40.js} +5 -5
  498. package/tool_call-DixVlW40.js.map +1 -0
  499. package/{tool_registry-D1pSSlsd.mjs → tool_registry-791Vrjtf.mjs} +4 -3
  500. package/tool_registry-791Vrjtf.mjs.map +1 -0
  501. package/{tool_registry-DYUYqXvo.js → tool_registry-CKJPze3j.js} +4 -3
  502. package/tool_registry-CKJPze3j.js.map +1 -0
  503. package/{turn_runner-DqWHNP80.js → turn_runner-HXImLGIn.js} +7 -7
  504. package/turn_runner-HXImLGIn.js.map +1 -0
  505. package/{turn_runner-fg1Wc3dK.mjs → turn_runner-ZyYO-Kti.mjs} +7 -7
  506. package/turn_runner-ZyYO-Kti.mjs.map +1 -0
  507. package/turn_runner.cjs +1 -1
  508. package/turn_runner.mjs +1 -1
  509. package/types.d.ts +1 -1
  510. package/common-BT0nfCi9.mjs.map +0 -1
  511. package/common-Cj8TaQ9U.js.map +0 -1
  512. package/exceptions-BeWH2FwP.mjs.map +0 -1
  513. package/exceptions-CitH5wZI.js.map +0 -1
  514. package/spooled_markdown_artifact-CALSDxIx.js.map +0 -1
  515. package/spooled_markdown_artifact-Ci5UL7l4.mjs.map +0 -1
  516. package/tool_call-CV5qVNlb.mjs.map +0 -1
  517. package/tool_call-Db68hB7y.js.map +0 -1
  518. package/tool_registry-D1pSSlsd.mjs.map +0 -1
  519. package/tool_registry-DYUYqXvo.js.map +0 -1
  520. package/turn_runner-DqWHNP80.js.map +0 -1
  521. package/turn_runner-fg1Wc3dK.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,236 @@ All notable changes to `@nhtio/adk` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 2026-06-09
9
+
10
+ ### Fixed
11
+
12
+ - **OpenAI Chat Completions battery now accepts `reasoning_effort: 'none'`.** The request
13
+ validator constrained `reasoning_effort` to `['minimal', 'low', 'medium', 'high']` and rejects
14
+ unknown top-level keys (`.unknown(false)`), so there was no way to send `none` — the documented
15
+ value Ollama's OpenAI-compatible `/v1/chat/completions` needs to turn a thinking model's (e.g.
16
+ Gemma's) reasoning **off**. `'none'` is now in the enum (and the `reasoning_effort` type union);
17
+ it flows to the wire through the existing body-assembly passthrough, and the strict-unknown-key
18
+ protection is unchanged. The WebLLM battery is unaffected — upstream WebLLM has no
19
+ `reasoning_effort` field and disables thinking via `extra_body.enable_thinking`, already an open
20
+ passthrough there.
21
+
22
+ - **OpenAI Chat Completions battery now retries transport failures (HTTP status 0).** When `fetch`
23
+ rejected before any HTTP response arrived (DNS failure, connection refused, TLS error, socket
24
+ drop), the adapter immediately `nack`'d with status 0 **without consulting `retry.maxAttempts`** —
25
+ so a single transient network blip killed the turn even when retries were configured. The
26
+ transport-failure branch now retries with backoff up to `maxAttempts` before surfacing the error,
27
+ matching the request-timeout branch beside it and the sibling embeddings adapter. Governed by the
28
+ existing `retry.maxAttempts` knob; `retriableStatuses` is untouched (it gates HTTP responses,
29
+ which transport errors never produce).
30
+
31
+ - **Bundled deterministic tools now do exactly what their descriptions say.** A correctness audit
32
+ of the 17 deterministic tool batteries (`src/batteries/tools/*`) — driven by a schema-fuzzing
33
+ invariant harness and two independent model reviews, with every finding verified against the
34
+ running tool — surfaced a class of defects where a tool would throw an unexpected runtime error,
35
+ refuse work it advertised, or silently return a wrong value. All are fixed; each tool was changed
36
+ to meet its label (no description or test was weakened to match broken behaviour):
37
+ - **`json_transform`** — `top_n` returned the wrong end of the range (comparator inverted; `desc`
38
+ now returns the largest *n*, `asc` the smallest); `unique_by` never deduplicated object/array
39
+ key values (reference-identity `Set` → now value-serialised); `sum` over a non-numeric array
40
+ silently returned `0` (now a clear error); a `null` operation entry crashed the dispatch (now a
41
+ clean schema rejection).
42
+ - **`compare_records`** — a nested array and an integer-keyed object (`[1,2]` vs `{"0":1,"1":2}`)
43
+ were reported equal; they are now distinct.
44
+ - **`color_contrast` / `color_scheme` / `color_adjust`** — `hexToRgb` accepted hex strings with
45
+ trailing non-hex characters (`#1Z2Z3Z` → silent `rgb(1,2,3)`); invalid hex is now rejected.
46
+ - **`string_transform`** — `reverse` split astral characters/emoji into broken surrogate halves
47
+ (`A💥B` now reverses to `B💥A`); `slug` destroyed non-decomposing Latin-1 letters (`føtex` →
48
+ `f-tex`), now transliterated (`fotex`).
49
+ - **`parse_yaml`** — an empty/whitespace/BOM-only document returned a non-string (`undefined`),
50
+ now `null`; `.NaN` / `.inf` / `-.inf` were silently corrupted to `null`, now preserved.
51
+ - **`format_table`** — null/primitive rows threw; they now render empty cells or return a clear
52
+ "provide columns" error.
53
+ - **`format_list`** — an unbounded `indent` threw `RangeError`; it is now clamped to 100.
54
+ - **`evaluate_katex`** — scientific notation (`2e3`) misparsed, and `\log_b(x)` change-of-base
55
+ produced malformed output; both now evaluate correctly.
56
+ - **`encode_text`** — HTML-entity decoding of astral code points used `String.fromCharCode`
57
+ (truncating to 16 bits); `🎉` / `🎉` now decode to 🎉 via `String.fromCodePoint`.
58
+ - **`date_period`** — fiscal-quarter boundaries spanning the calendar-year boundary were computed
59
+ in the wrong year (e.g. FY-Feb, `2024-01-15` → now correctly `2023-11-01`).
60
+ - **`convert_unit`** — temperatures below absolute zero are now rejected instead of silently
61
+ returned.
62
+ - **`calculate`** — a non-finite scalar result (`1/0`, `2^5000`) now returns a clear error rather
63
+ than printing `Result: Infinity`.
64
+
65
+ - **Updated three stale functional tests to the corrected `stats_describe` contract.** The
66
+ `statistics`/`flydrive` through-runner tests still passed `stats_describe`'s `numbers` as a JSON
67
+ **string** and asserted numeric `mean`/`sum` — both invalidated by the tool-correctness pass above,
68
+ which retyped `numbers` to a real array (restoring NaN/∞/`>2^53` rejection) and emits computed
69
+ aggregates as precision-formatted BigNumber **strings**. The tests now pass actual arrays and
70
+ assert the string-valued aggregates; no production behaviour changed.
71
+
72
+ ### Added
73
+
74
+ - **Scrapper web-extraction tool battery (`@nhtio/adk/batteries/tools/scrapper`).** Tools for any
75
+ [Scrapper](https://github.com/amerkurev/scrapper) instance — a headless-browser service that gives
76
+ an agent browser-grade page reading (JS-rendered pages a plain fetch can't see) as a **stateless**
77
+ HTTP call: fresh incognito context per request, no stored session/cookies/credentials. Two verbs,
78
+ each with an async factory (accepts a dynamic-import `artifact` resolver) and a sync variant:
79
+ `createScrapperArticleTool`/`…Sync` (`/api/article`) and `createScrapperLinksTool`/`…Sync`
80
+ (`/api/links`). Like the SearXNG battery these are factories (not constants) and must not be
81
+ bulk-registered via `Object.values(batteries)`.
82
+ - **Per-parameter disposition** — for every modeled knob the factory chooses: `fixed` (pinned;
83
+ sent always, removed from the model schema), `defaults` (model-overridable), or open
84
+ (model-settable). `url` is always required; `fixedQuery` is a raw kebab passthrough for
85
+ un-modeled params, keeping the battery generic across instances/versions.
86
+ - **Two distinct header channels** — `config.headers` (static or sync/async resolver) authenticates
87
+ to the Scrapper *instance*; the `extra_http_headers` *param* (`'K:v;K2:v2'`) is what the scraper's
88
+ browser sends to the *target site*.
89
+ - Same SearXNG-style two-level output (`resultFormat` normalized/raw/either), `artifact` resolver,
90
+ and input/output middleware pipelines (`shortCircuit`, fresh runner per call). Errors degrade to
91
+ `Error:` strings (parses Scrapper's `{detail:[{msg}]}`; missing `url` → HTTP 422); bad config →
92
+ `E_INVALID_SCRAPPER_CONFIG`. Documented as a featured-battery page with TSDoc `@warning`s for the
93
+ `scroll_down`-needs-`sleep` and instance-relative-URI gotchas. Cross-env unit spec (stubbed
94
+ `fetch`, disposition, resolver, all-three-artifact round-trips) + env-gated live integration spec
95
+ (`TEST_SCRAPPER_URL` / `TEST_SCRAPPER_HEADERS`).
96
+
97
+ - **Web-retrieval RAG glue (`@nhtio/adk/batteries/tools/web_retrieval`).** The shared seam from
98
+ search/scrape results to turn `Retrievable`s, used by both the Scrapper and SearXNG batteries.
99
+ Pure converters — `searxngResultsToRetrievables`, `scrapperArticleToRetrievable`,
100
+ `scrapperLinksToRetrievables` — return plain `RawRetrievable[]` (zero core-class instantiation;
101
+ core referenced as `import type` only). `storeRetrievables(ctx, raws, { retrievable })` constructs
102
+ and stores records via a **resolver-injected** `Retrievable` constructor (ctor / sync / async /
103
+ dynamic-import), so the module never value-imports core. Long page text becomes a reader-backed
104
+ `SpooledArtifact` via a caller `spool` hook (the converter recommends an open
105
+ `ArtifactConstructorResolver` for the content — markdown/json/text — so a consumer's own subclass
106
+ works unchanged; no chunker). Web content defaults to `trustTier: 'third-party-public'` (a
107
+ constant, not URL inference — CONTRIBUTING DD#12).
108
+
109
+ - **Shared tool-battery helpers (`@nhtio/adk/batteries/tools/_shared`).** Internal building blocks
110
+ for the configured-HTTP tool batteries: `resolveArtifact`/`resolveArtifactSync` (resolver → sync
111
+ `() => Ctor`), the onion middleware-pipeline runners (fresh runner per call, short-circuit +
112
+ non-terminal detection), header resolution, and the `ArtifactResolver`/`SyncArtifactResolver`
113
+ types. SearXNG and Scrapper both build on it instead of carrying copies.
114
+
115
+ - **SearXNG search tool battery (`@nhtio/adk/batteries/tools/searxng`).** A web-search tool for any
116
+ [SearXNG](https://docs.searxng.org/dev/search_api.html) instance, exposed via **factories** —
117
+ async `createSearxngSearchTool(config)` and sync `createSearxngSearchToolSync(config)` — rather
118
+ than a ready-made constant. It is the first factory-style tool battery: a search tool has to know
119
+ *which* instance to query and is usually behind custom authentication, so it needs per-deployment
120
+ config that cannot be baked in at module load. Because it exports factories (not a `Tool`), they
121
+ must not be bulk-registered via `Object.values(batteries)` — call a factory first, then register
122
+ the returned tool.
123
+ - **Custom-header auth** — `config.headers` accepts a static `Record<string,string>` or a
124
+ sync/async resolver (`() => headers | Promise<headers>`); the resolver runs on every search, so
125
+ refreshable bearer tokens work. Caller headers override the default `Accept`/`User-Agent`.
126
+ - **Two-level output-format control** — `config.resultFormat: 'normalized' | 'raw' | 'either'`
127
+ (default `'either'`). Pinning it forces the shape AND removes the model-facing `format` arg from
128
+ the schema; leaving it neutral lets the model choose per call. `normalized` trims each result to
129
+ `{title,url,content,engine,score,publishedDate}` plus non-empty `answers`/`infoboxes`/
130
+ `suggestions`/`corrections`; `raw` returns the full SearXNG JSON.
131
+ - **Input/output middleware pipelines** — `config.inputPipeline` / `config.outputPipeline` are
132
+ onion middleware `(ctx, next)` built on `@nhtio/middleware`. Input stages mutate the
133
+ query/params/headers before the request or `ctx.shortCircuit(string)` to skip the fetch (cache
134
+ hit); output stages filter/re-rank `ctx.results`, mutate `ctx.raw`, or set `ctx.output` verbatim
135
+ (e.g. rendered markdown). A `ctx.stash` Map carries across both; a fresh runner is minted per
136
+ invocation (middleware runners are single-use).
137
+ - **Configurable spool artifact (resolver)** — `config.artifact` (default `() => SpooledJsonArtifact`)
138
+ is an open `ArtifactConstructorResolver`: a ctor, a sync resolver, or — via the async factory —
139
+ an async/dynamic-import resolver (`() => import('@nhtio/adk/spooled_artifact').then(m => m.SpooledMarkdownArtifact)`),
140
+ so a consumer's own `SpooledArtifact` subclass works with no battery change. The async factory
141
+ resolves it before building the `Tool` (whose `artifactConstructor` must be sync); the sync
142
+ factory accepts only the sync subset.
143
+ - **Graceful failures** — a disabled-JSON instance (SearXNG disables JSON by default → HTTP 403),
144
+ network errors, timeouts, and thrown pipeline stages all return `Error:` strings the model can
145
+ react to; only malformed args throw (`E_INVALID_TOOL_ARGS`). Invalid config throws the
146
+ battery-scoped `E_INVALID_SEARXNG_CONFIG` at factory-call time.
147
+ - Documented as a featured-battery page, with a TypeDoc `@warning` recording the upstream quirk
148
+ that SearXNG's `number_of_results` is frequently `0` even when results exist
149
+ ([searxng#2987](https://github.com/searxng/searxng/issues/2987),
150
+ [searxng#2457](https://github.com/searxng/searxng/issues/2457)) — the tool passes it through
151
+ verbatim; use `results.length`. Covered by a cross-env unit spec (stubbed `fetch`, all three
152
+ artifact types round-tripped) and an env-gated live integration spec
153
+ (`TEST_SEARXNG_URL` / `TEST_SEARXNG_HEADERS`).
154
+
155
+ - **Documentation-coverage gate (`bin/doc_coverage.ts`, `pnpm run doc:coverage`).** A standalone
156
+ helper that bootstraps TypeDoc read-only over the same entrypoints the published docs use
157
+ (`bin/utils/index.ts` `getEntries`) and reports every public API symbol missing a TSDoc comment,
158
+ grouped by its deepest `@module` submodule. Modes: a human report (default), `--json`, `--ci`
159
+ (non-zero exit when any non-allowlisted symbol is undocumented — wired into CI as a job, currently
160
+ `allow_failure: true`), `--hook` (emits a Claude Code `additionalContext` envelope and always exits
161
+ 0), and `--primary` (audits `@primaryExport` placement). The shared `blockTags` list moved to an
162
+ exported `BLOCK_TAGS` const so the helper and `makeApiDocs` never drift. **The entire public API
163
+ surface is now documented — the gate reports zero undocumented symbols.** Every interface,
164
+ type, class member, options field, wire shape, and exported function across the LLM, vector,
165
+ embeddings, storage, and ESLint-rule batteries carries an accurate TSDoc comment.
166
+
167
+ The API-doc build is also link-clean: every TypeDoc cross-reference now resolves. Types that
168
+ documented symbols referenced but that were not themselves exported are now public —
169
+ `ArtifactConstructorResolver` (`@nhtio/adk/forge`), the four `DispatchRetrievable*Fn` callback
170
+ types (`@nhtio/adk/types`), and the pgvector / sqlite-vec adapter options interfaces, renamed for
171
+ consistency with the other 24 adapters to `PgVectorStoreOptions` and
172
+ `SqliteVecVectorStoreOptions`. Vendor types referenced in comments (`BigNumber`, `Set`, `Disk`)
173
+ now link to their upstream docs via `externalSymbolLinkMappings`, and broken `{@link}` targets
174
+ (wrong or non-exported names) were corrected. The internal, sentinel-gated `DispatchRunner`
175
+ constructor is marked `@internal` (construct via the static `DispatchRunner.dispatch`).
176
+
177
+ - **Native Ollama LLM battery (`@nhtio/adk/batteries/llm/ollama`).** Ships `OllamaAdapter`, an
178
+ executor targeting Ollama's **native `/api/chat`** endpoint — distinct from pointing the OpenAI
179
+ Chat Completions battery at `/v1`, which it complements rather than replaces. Works with both
180
+ local Ollama (`http://localhost:11434`, no auth — the default `baseURL`) and cloud Ollama
181
+ (`https://ollama.com`, `apiKey` → `Authorization: Bearer`); only `baseURL` plus the auth header
182
+ differ. Native-only capabilities the `/v1` compat layer cannot express are first-class: per-request
183
+ context size via the nested `options.num_ctx`, native reasoning via `think`
184
+ (`boolean | 'low' | 'medium' | 'high'`) surfaced as `message.thinking`, structured output via
185
+ `format` (`'json'` or a JSON schema), and model lifecycle via `keep_alive`. Generation params live
186
+ in a nested `options` block (not at the top level, unlike the OpenAI wire). The adapter parses
187
+ NDJSON streaming (terminated by `done: true`, no `[DONE]` sentinel), takes tool-call `arguments` as
188
+ a JSON object (no `JSON.parse`), labels tool-result history messages with `tool_name` (not
189
+ `tool_call_id`), and follows every cross-battery design rule (trust-framed envelopes, per-tool
190
+ trust, swappable helpers, `ctx.stash.ollama` per-iteration overrides, `ToolCall.inline` handling,
191
+ trust-tier-distinct buckets). Native `/api/chat` carries images only; other modalities route
192
+ through `unsupportedMediaPolicy`. `tool_choice` is intentionally unsupported (native `/api/chat`
193
+ has no such field). Ollama is HTTP-only — Unix-socket deployments are reached via a bridge or a
194
+ custom `fetch`.
195
+
196
+ - **Dedicated generation-stats observability channel on `DispatchRunner`.** Executors can emit
197
+ provider-agnostic generation accounting (token counts, nanosecond durations, finish reason, model,
198
+ provider, plus the raw provider object) via a new `helpers.reportGenerationStats(stats)` method;
199
+ the runner enriches each record with `dispatchId` / `iteration` / `emittedAt` and fires it on a new
200
+ `generationStats` observability hook (subscribe through `observers.generationStats`). This is
201
+ additive and non-breaking — `DispatchExecutorHelpers` is runner-produced, so existing executors
202
+ gain the method without change. The native Ollama battery emits its terminal-chunk stats through
203
+ this channel; the new `GenerationStats` / `GenerationStatsEvent` types are exported from
204
+ `@nhtio/adk/dispatch_runner`.
205
+
206
+ - **Shared Chat-family helper submodule.** The wire-shape-agnostic translation helpers (trust
207
+ envelopes, memory/retrievable/standing-instruction rendering, system-prompt assembly, JSON-schema
208
+ and function-tool conversion, thought filtering) were extracted to an internal
209
+ `src/batteries/llm/chat_common` module shared by the OpenAI Chat Completions and native Ollama
210
+ batteries. Behaviour-preserving: every existing `@nhtio/adk/batteries/llm/openai_chat_completions`
211
+ helper export keeps its name and value identity (the battery re-exports the shared names), and the
212
+ WebLLM battery is untouched. The shared module is internal — not a public package subpath.
213
+
214
+ - **NDJSON cassette support in the cross-env test harness.** `tests/_fixtures/cassette.ts` gained an
215
+ `ndjson` response mode (parallel to the existing SSE `sse` mode) plus Ollama-native programmatic
216
+ builders (`buildOllamaChatResponse`, `buildOllamaStreamFrames`, `singleOllamaResponseCassette`,
217
+ `singleOllamaStreamCassette`) for deterministic native-wire replay.
218
+
219
+ - **Arbitrary-precision numeric handling across the math tools.** A shared
220
+ `src/lib/helpers/bignum.ts` (a BigNumber-configured `mathjs` instance) backs the numeric
221
+ batteries so float64 limitations no longer corrupt results: large in-range sums stay exact
222
+ instead of overflowing to `Infinity`, tiny ratios don't underflow to `0`, and precision is
223
+ preserved end-to-end (`sum([0.1, 0.2]) → 0.3`). `statistics`, `data_structure`, and
224
+ `unit_conversion` now compute aggregates/conversions through it. The `statistics` tools take
225
+ typed number arrays (`validator.array().items(validator.number())`) instead of JSON strings —
226
+ restoring schema rejection of `NaN`/`Infinity`/`> 2^53` at the boundary and removing the prior
227
+ silent-drop behaviour. Tools that format numeric output gained an optional `precision` argument
228
+ (significant digits, default 8). **This changes those tool signatures and some output shapes**
229
+ (computed aggregates may be precision-formatted strings).
230
+
231
+ - **Tool correctness test infrastructure.** A `callTool` helper in
232
+ `tests/_fixtures/tool_ctx_stub.ts` captures a tool invocation's resolve-vs-throw outcome as a
233
+ value (making the no-crash contract directly assertable), and a new
234
+ `tests/unit/batteries/tools/fuzz.node.spec.ts` invariant harness introspects every bundled tool's
235
+ schema, feeds adversarial input, and asserts each call either resolves to a string/`Uint8Array`
236
+ or rejects with `E_INVALID_TOOL_ARGS` — never any other throw.
237
+
8
238
  ## 2026-06-07
9
239
 
10
240
  ### Added
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../../tool_registry-DYUYqXvo.js");
3
+ const require_tool_registry = require("../../../tool_registry-CKJPze3j.js");
4
4
  require("../../../guards.cjs");
5
5
  const require_lib_utils_retry = require("../../../lib/utils/retry.cjs");
6
6
  const require_batteries_embeddings_openai_exceptions = require("./exceptions.cjs");
@@ -1,4 +1,4 @@
1
- import { o as isError } from "../../../tool_registry-D1pSSlsd.mjs";
1
+ import { o as isError } from "../../../tool_registry-791Vrjtf.mjs";
2
2
  import "../../../guards.mjs";
3
3
  import { computeBackoff, parseRetryAfter, sleepWithJitter } from "../../../lib/utils/retry.mjs";
4
4
  import { E_OPENAI_EMBEDDINGS_HTTP_ERROR, E_OPENAI_EMBEDDINGS_MALFORMED_RESPONSE, E_OPENAI_EMBEDDINGS_REQUEST_TIMEOUT } from "./exceptions.mjs";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../chunk-Ble4zEEl.js");
3
- const require_exceptions = require("../../../exceptions-CitH5wZI.js");
3
+ const require_exceptions = require("../../../exceptions-BRXrUKiW.js");
4
4
  require("../../../factories.cjs");
5
5
  //#region src/batteries/embeddings/openai/exceptions.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { t as createException } from "../../../exceptions-BeWH2FwP.mjs";
1
+ import { t as createException } from "../../../exceptions-BDhN0Xzr.mjs";
2
2
  import "../../../factories.mjs";
3
3
  //#region src/batteries/embeddings/openai/exceptions.ts
4
4
  /**
@@ -105,19 +105,26 @@ export interface OpenAIEmbeddingsAdapterOptions extends BaseEmbeddingsAdapterOpt
105
105
  * The JSON request body POSTed to `/v1/embeddings`.
106
106
  */
107
107
  export interface OpenAIEmbeddingsRequestBody {
108
+ /** ID of the embedding model to use. */
108
109
  model: string;
110
+ /** The batch of texts to embed. */
109
111
  input: string[];
112
+ /** Wire encoding for the returned vectors; always `'float'`. */
110
113
  encoding_format: 'float';
114
+ /** Optional output dimensionality for models that support truncation. */
111
115
  dimensions?: number;
112
116
  }
113
117
  /**
114
118
  * The relevant subset of the `/v1/embeddings` JSON response shape.
115
119
  */
116
120
  export interface OpenAIEmbeddingsResponseBody {
121
+ /** The embedding vectors, each tagged with its input `index`. */
117
122
  data: Array<{
118
123
  embedding: number[];
119
124
  index: number;
120
125
  }>;
126
+ /** Model that produced the embeddings. */
121
127
  model?: string;
128
+ /** Object type reported by the API (e.g. `'list'`). */
122
129
  object?: string;
123
130
  }
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../chunk-Ble4zEEl.js");
3
- const require_tool_registry = require("../../../tool_registry-DYUYqXvo.js");
3
+ const require_tool_registry = require("../../../tool_registry-CKJPze3j.js");
4
4
  require("../../../guards.cjs");
5
5
  const require_batteries_embeddings_openai_helpers = require("../openai/helpers.cjs");
6
6
  const require_batteries_embeddings_webllm_exceptions = require("./exceptions.cjs");
@@ -1,4 +1,4 @@
1
- import { o as isError } from "../../../tool_registry-D1pSSlsd.mjs";
1
+ import { o as isError } from "../../../tool_registry-791Vrjtf.mjs";
2
2
  import "../../../guards.mjs";
3
3
  import { applyEmbeddingPrefix } from "../openai/helpers.mjs";
4
4
  import { E_INVALID_WEBLLM_EMBEDDINGS_OPTIONS, E_WEBLLM_EMBEDDINGS_ENGINE_ERROR } from "./exceptions.mjs";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../../chunk-Ble4zEEl.js");
3
- const require_exceptions = require("../../../exceptions-CitH5wZI.js");
3
+ const require_exceptions = require("../../../exceptions-BRXrUKiW.js");
4
4
  require("../../../factories.cjs");
5
5
  //#region src/batteries/embeddings/webllm/exceptions.ts
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { t as createException } from "../../../exceptions-BeWH2FwP.mjs";
1
+ import { t as createException } from "../../../exceptions-BDhN0Xzr.mjs";
2
2
  import "../../../factories.mjs";
3
3
  //#region src/batteries/embeddings/webllm/exceptions.ts
4
4
  /**
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Wire-shape-agnostic translation helpers shared across the Chat-family LLM batteries.
3
+ *
4
+ * @remarks
5
+ * INTERNAL to the bundled LLM batteries — intentionally **not** `@module`-tagged, so it stays a
6
+ * private, inlined module (see the note in `./types`). These helpers turn ADK primitives into
7
+ * plain strings (or the family-identical JSON Schema / function-tool wire), independent of any
8
+ * single battery's message-object shape. The OpenAI Chat Completions battery and the native Ollama
9
+ * battery both re-export every name here from their own `helpers.ts` barrels (each under its
10
+ * unprefixed name AND a `default*` alias) so consumer override composition is unchanged.
11
+ *
12
+ * Helpers that compose other helpers receive their dependents via explicit `deps` arguments typed
13
+ * against {@link ChatHelpersCommon} — never against a battery-specific helper bag — so this module
14
+ * carries no import edge back to any individual battery.
15
+ */
16
+ import type { Tool, ArtifactTool, Tokenizable, Memory, Thought, Retrievable } from "../../../common";
17
+ import type { ChatCompletionsBucketOrder, ChatCompletionsTool, DescriptionLike, JsonSchema, MemoryAttrs, RetrievableAttrs, StandingInstructionAttrs, ThoughtAttrs, TrustedContentAttrs, UntrustedContentAttrs, ChatHelpersCommon } from "./types";
18
+ export declare const escapeXmlAttribute: (value: string) => string;
19
+ export declare const memoryToAttrs: (m: Memory) => {
20
+ memory: Memory;
21
+ attrs: MemoryAttrs;
22
+ };
23
+ export declare const retrievableToAttrs: (r: Retrievable) => {
24
+ retrievable: Retrievable;
25
+ attrs: RetrievableAttrs;
26
+ };
27
+ export declare const sanitiseNameField: (raw: string) => string;
28
+ /** Implements {@link ChatHelpersCommon.descriptionToChatCompletionsJsonSchema}. */
29
+ export declare const descriptionToChatCompletionsJsonSchema: (d: DescriptionLike) => JsonSchema;
30
+ /** Default JSON-Schema renderer; alias of {@link descriptionToChatCompletionsJsonSchema}. */
31
+ export declare const defaultDescriptionToChatCompletionsJsonSchema: (d: DescriptionLike) => JsonSchema;
32
+ /** Implements {@link ChatHelpersCommon.renderUntrustedContent}. */
33
+ export declare const renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string;
34
+ /** Default untrusted-content renderer; alias of {@link renderUntrustedContent}. */
35
+ export declare const defaultRenderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string;
36
+ /** Implements {@link ChatHelpersCommon.renderTrustedContent}. */
37
+ export declare const renderTrustedContent: (content: string, attrs: TrustedContentAttrs) => string;
38
+ /** Default trusted-content renderer; alias of {@link renderTrustedContent}. */
39
+ export declare const defaultRenderTrustedContent: (content: string, attrs: TrustedContentAttrs) => string;
40
+ /** Implements {@link ChatHelpersCommon.renderStandingInstructions}. */
41
+ export declare const renderStandingInstructions: (items: Iterable<Tokenizable>, attrs?: StandingInstructionAttrs) => string;
42
+ /** Default standing-instructions renderer; alias of {@link renderStandingInstructions}. */
43
+ export declare const defaultRenderStandingInstructions: (items: Iterable<Tokenizable>, attrs?: StandingInstructionAttrs) => string;
44
+ /** Implements {@link ChatHelpersCommon.renderMemories}. */
45
+ export declare const renderMemories: (items: Iterable<{
46
+ memory: Memory;
47
+ attrs: MemoryAttrs;
48
+ }>) => string;
49
+ /** Default memories renderer; alias of {@link renderMemories}. */
50
+ export declare const defaultRenderMemories: (items: Iterable<{
51
+ memory: Memory;
52
+ attrs: MemoryAttrs;
53
+ }>) => string;
54
+ /** Implements {@link ChatHelpersCommon.renderRetrievableSafetyDirective}. */
55
+ export declare const renderRetrievableSafetyDirective: () => string;
56
+ /** Default safety-directive renderer; alias of {@link renderRetrievableSafetyDirective}. */
57
+ export declare const defaultRenderRetrievableSafetyDirective: () => string;
58
+ /** Implements {@link ChatHelpersCommon.renderFirstPartyRetrievables}. */
59
+ export declare const renderFirstPartyRetrievables: (items: Iterable<{
60
+ retrievable: Retrievable;
61
+ attrs: RetrievableAttrs;
62
+ }>) => Promise<string>;
63
+ /** Default first-party retrievables renderer; alias of {@link renderFirstPartyRetrievables}. */
64
+ export declare const defaultRenderFirstPartyRetrievables: (items: Iterable<{
65
+ retrievable: Retrievable;
66
+ attrs: RetrievableAttrs;
67
+ }>) => Promise<string>;
68
+ /** Implements {@link ChatHelpersCommon.renderThirdPartyPublicRetrievables}. */
69
+ export declare const renderThirdPartyPublicRetrievables: (items: Iterable<{
70
+ retrievable: Retrievable;
71
+ attrs: RetrievableAttrs;
72
+ }>, deps: {
73
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
74
+ }) => Promise<string>;
75
+ /** Default third-party-public retrievables renderer; alias of {@link renderThirdPartyPublicRetrievables}. */
76
+ export declare const defaultRenderThirdPartyPublicRetrievables: (items: Iterable<{
77
+ retrievable: Retrievable;
78
+ attrs: RetrievableAttrs;
79
+ }>, deps: {
80
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
81
+ }) => Promise<string>;
82
+ /** Implements {@link ChatHelpersCommon.renderThirdPartyPrivateRetrievables}. */
83
+ export declare const renderThirdPartyPrivateRetrievables: (items: Iterable<{
84
+ retrievable: Retrievable;
85
+ attrs: RetrievableAttrs;
86
+ }>, deps: {
87
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
88
+ }) => Promise<string>;
89
+ /** Default third-party-private retrievables renderer; alias of {@link renderThirdPartyPrivateRetrievables}. */
90
+ export declare const defaultRenderThirdPartyPrivateRetrievables: (items: Iterable<{
91
+ retrievable: Retrievable;
92
+ attrs: RetrievableAttrs;
93
+ }>, deps: {
94
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
95
+ }) => Promise<string>;
96
+ /** Implements {@link ChatHelpersCommon.renderRetrievables}. */
97
+ export declare const renderRetrievables: (items: Iterable<{
98
+ retrievable: Retrievable;
99
+ attrs: RetrievableAttrs;
100
+ }>, deps: {
101
+ renderRetrievableSafetyDirective: ChatHelpersCommon["renderRetrievableSafetyDirective"];
102
+ renderFirstPartyRetrievables: ChatHelpersCommon["renderFirstPartyRetrievables"];
103
+ renderThirdPartyPublicRetrievables: ChatHelpersCommon["renderThirdPartyPublicRetrievables"];
104
+ renderThirdPartyPrivateRetrievables: ChatHelpersCommon["renderThirdPartyPrivateRetrievables"];
105
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
106
+ }) => Promise<string>;
107
+ /** Default retrievables orchestrator; alias of {@link renderRetrievables}. */
108
+ export declare const defaultRenderRetrievables: (items: Iterable<{
109
+ retrievable: Retrievable;
110
+ attrs: RetrievableAttrs;
111
+ }>, deps: {
112
+ renderRetrievableSafetyDirective: ChatHelpersCommon["renderRetrievableSafetyDirective"];
113
+ renderFirstPartyRetrievables: ChatHelpersCommon["renderFirstPartyRetrievables"];
114
+ renderThirdPartyPublicRetrievables: ChatHelpersCommon["renderThirdPartyPublicRetrievables"];
115
+ renderThirdPartyPrivateRetrievables: ChatHelpersCommon["renderThirdPartyPrivateRetrievables"];
116
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
117
+ }) => Promise<string>;
118
+ /** Implements {@link ChatHelpersCommon.renderThought}. */
119
+ export declare const renderThought: (content: string, attrs: ThoughtAttrs, payload?: unknown) => string;
120
+ /** Default thought renderer; alias of {@link renderThought}. */
121
+ export declare const defaultRenderThought: (content: string, attrs: ThoughtAttrs, payload?: unknown) => string;
122
+ /** Implements {@link ChatHelpersCommon.filterThoughts}. */
123
+ export declare const filterThoughts: (thoughts: Iterable<Thought>, mode: "all-self" | "latest-self" | "all", selfIdentity: string, replayCompatibility: ReadonlyArray<string>) => Thought[];
124
+ /** Default thought filter; alias of {@link filterThoughts}. */
125
+ export declare const defaultFilterThoughts: (thoughts: Iterable<Thought>, mode: "all-self" | "latest-self" | "all", selfIdentity: string, replayCompatibility: ReadonlyArray<string>) => Thought[];
126
+ /** Implements {@link ChatHelpersCommon.toolsToChatCompletionsTools}. */
127
+ export declare const toolsToChatCompletionsTools: (tools: ReadonlyArray<Tool | ArtifactTool>, deps: {
128
+ descriptionToChatCompletionsJsonSchema: (d: DescriptionLike) => JsonSchema;
129
+ }) => ChatCompletionsTool[];
130
+ /** Default tool-translation helper; alias of {@link toolsToChatCompletionsTools}. */
131
+ export declare const defaultToolsToChatCompletionsTools: (tools: ReadonlyArray<Tool | ArtifactTool>, deps: {
132
+ descriptionToChatCompletionsJsonSchema: (d: DescriptionLike) => JsonSchema;
133
+ }) => ChatCompletionsTool[];
134
+ /** Implements {@link ChatHelpersCommon.renderChatCompletionsSystemPrompt}. */
135
+ export declare const renderChatCompletionsSystemPrompt: (input: {
136
+ systemPrompt: Tokenizable;
137
+ standingInstructions: Iterable<Tokenizable>;
138
+ memories: Iterable<Memory>;
139
+ retrievables: Iterable<Retrievable>;
140
+ bucketOrder: ChatCompletionsBucketOrder;
141
+ renderStandingInstructions: ChatHelpersCommon["renderStandingInstructions"];
142
+ renderMemories: ChatHelpersCommon["renderMemories"];
143
+ renderRetrievables: ChatHelpersCommon["renderRetrievables"];
144
+ renderRetrievableSafetyDirective: ChatHelpersCommon["renderRetrievableSafetyDirective"];
145
+ renderFirstPartyRetrievables: ChatHelpersCommon["renderFirstPartyRetrievables"];
146
+ renderThirdPartyPublicRetrievables: ChatHelpersCommon["renderThirdPartyPublicRetrievables"];
147
+ renderThirdPartyPrivateRetrievables: ChatHelpersCommon["renderThirdPartyPrivateRetrievables"];
148
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
149
+ }) => Promise<string>;
150
+ /** Default system-prompt renderer; alias of {@link renderChatCompletionsSystemPrompt}. */
151
+ export declare const defaultRenderChatCompletionsSystemPrompt: (input: {
152
+ systemPrompt: Tokenizable;
153
+ standingInstructions: Iterable<Tokenizable>;
154
+ memories: Iterable<Memory>;
155
+ retrievables: Iterable<Retrievable>;
156
+ bucketOrder: ChatCompletionsBucketOrder;
157
+ renderStandingInstructions: ChatHelpersCommon["renderStandingInstructions"];
158
+ renderMemories: ChatHelpersCommon["renderMemories"];
159
+ renderRetrievables: ChatHelpersCommon["renderRetrievables"];
160
+ renderRetrievableSafetyDirective: ChatHelpersCommon["renderRetrievableSafetyDirective"];
161
+ renderFirstPartyRetrievables: ChatHelpersCommon["renderFirstPartyRetrievables"];
162
+ renderThirdPartyPublicRetrievables: ChatHelpersCommon["renderThirdPartyPublicRetrievables"];
163
+ renderThirdPartyPrivateRetrievables: ChatHelpersCommon["renderThirdPartyPrivateRetrievables"];
164
+ renderUntrustedContent: ChatHelpersCommon["renderUntrustedContent"];
165
+ }) => Promise<string>;