@librechat/agents 4.2.11 → 4.2.13

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 (348) hide show
  1. package/dist/cjs/graphs/Graph.cjs +15 -3
  2. package/dist/cjs/graphs/Graph.cjs.map +1 -1
  3. package/dist/cjs/langfuse.cjs +63 -35
  4. package/dist/cjs/langfuse.cjs.map +1 -1
  5. package/dist/cjs/langfuseConfig.cjs +6 -0
  6. package/dist/cjs/langfuseConfig.cjs.map +1 -1
  7. package/dist/cjs/langfuseToolOutputTracing.cjs +1 -1
  8. package/dist/cjs/langfuseToolOutputTracing.cjs.map +1 -1
  9. package/dist/cjs/langfuseTraceShaping.cjs +18 -8
  10. package/dist/cjs/langfuseTraceShaping.cjs.map +1 -1
  11. package/dist/cjs/llm/anthropic/index.cjs +4 -3
  12. package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
  13. package/dist/cjs/llm/anthropic/utils/container.cjs +37 -0
  14. package/dist/cjs/llm/anthropic/utils/container.cjs.map +1 -0
  15. package/dist/cjs/llm/anthropic/utils/message_inputs.cjs +25 -23
  16. package/dist/cjs/llm/anthropic/utils/message_inputs.cjs.map +1 -1
  17. package/dist/cjs/llm/anthropic/utils/message_outputs.cjs +15 -21
  18. package/dist/cjs/llm/anthropic/utils/message_outputs.cjs.map +1 -1
  19. package/dist/cjs/llm/anthropic/utils/stream_events.cjs +16 -14
  20. package/dist/cjs/llm/anthropic/utils/stream_events.cjs.map +1 -1
  21. package/dist/cjs/llm/bedrock/index.cjs +1 -1
  22. package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
  23. package/dist/cjs/llm/bedrock/toolCache.cjs +1 -1
  24. package/dist/cjs/llm/bedrock/utils/message_inputs.cjs +19 -13
  25. package/dist/cjs/llm/bedrock/utils/message_inputs.cjs.map +1 -1
  26. package/dist/cjs/llm/google/utils/common.cjs +59 -13
  27. package/dist/cjs/llm/google/utils/common.cjs.map +1 -1
  28. package/dist/cjs/llm/init.cjs +12 -2
  29. package/dist/cjs/llm/init.cjs.map +1 -1
  30. package/dist/cjs/llm/openai/index.cjs +15 -2
  31. package/dist/cjs/llm/openai/index.cjs.map +1 -1
  32. package/dist/cjs/llm/openai/responseToolArguments.cjs +62 -0
  33. package/dist/cjs/llm/openai/responseToolArguments.cjs.map +1 -0
  34. package/dist/cjs/llm/openrouter/index.cjs +11 -2
  35. package/dist/cjs/llm/openrouter/index.cjs.map +1 -1
  36. package/dist/cjs/llm/openrouter/toolCache.cjs +1 -1
  37. package/dist/cjs/llm/prepareProviderRequest.cjs +35 -7
  38. package/dist/cjs/llm/prepareProviderRequest.cjs.map +1 -1
  39. package/dist/cjs/main.cjs +9 -3
  40. package/dist/cjs/messages/alternation.cjs +1 -1
  41. package/dist/cjs/messages/anthropicServerTools.cjs +20 -0
  42. package/dist/cjs/messages/anthropicServerTools.cjs.map +1 -0
  43. package/dist/cjs/messages/budget.cjs +1 -1
  44. package/dist/cjs/messages/cache.cjs +14 -1
  45. package/dist/cjs/messages/cache.cjs.map +1 -1
  46. package/dist/cjs/messages/core.cjs +4 -3
  47. package/dist/cjs/messages/core.cjs.map +1 -1
  48. package/dist/cjs/messages/format.cjs +3 -3
  49. package/dist/cjs/messages/index.cjs +1 -1
  50. package/dist/cjs/messages/prune.cjs +1 -1
  51. package/dist/cjs/messages/recency.cjs +1 -1
  52. package/dist/cjs/messages/toolResultTypes.cjs +21 -45
  53. package/dist/cjs/messages/toolResultTypes.cjs.map +1 -1
  54. package/dist/cjs/protection/providerText.cjs +4 -0
  55. package/dist/cjs/protection/providerText.cjs.map +1 -1
  56. package/dist/cjs/protection/toolResult.cjs +119 -0
  57. package/dist/cjs/protection/toolResult.cjs.map +1 -0
  58. package/dist/cjs/run.cjs +31 -13
  59. package/dist/cjs/run.cjs.map +1 -1
  60. package/dist/cjs/runtime/admission.cjs +1 -1
  61. package/dist/cjs/runtime/client.cjs +3 -0
  62. package/dist/cjs/runtime/client.cjs.map +1 -1
  63. package/dist/cjs/stream.cjs +2 -1
  64. package/dist/cjs/stream.cjs.map +1 -1
  65. package/dist/cjs/summarization/node.cjs +9 -4
  66. package/dist/cjs/summarization/node.cjs.map +1 -1
  67. package/dist/cjs/tools/ProgrammaticToolCalling.cjs +1 -1
  68. package/dist/cjs/tools/ToolNode.cjs +47 -14
  69. package/dist/cjs/tools/ToolNode.cjs.map +1 -1
  70. package/dist/cjs/tools/local/CompileCheckTool.cjs +1 -1
  71. package/dist/cjs/tools/local/LocalCodingTools.cjs +1 -1
  72. package/dist/cjs/tools/search/content.cjs +163 -42
  73. package/dist/cjs/tools/search/content.cjs.map +1 -1
  74. package/dist/cjs/tools/subagent/SubagentExecutor.cjs +8 -0
  75. package/dist/cjs/tools/subagent/SubagentExecutor.cjs.map +1 -1
  76. package/dist/cjs/utils/events.cjs +2 -2
  77. package/dist/cjs/utils/events.cjs.map +1 -1
  78. package/dist/cjs/utils/tokens.cjs +7 -2
  79. package/dist/cjs/utils/tokens.cjs.map +1 -1
  80. package/dist/esm/graphs/Graph.mjs +15 -3
  81. package/dist/esm/graphs/Graph.mjs.map +1 -1
  82. package/dist/esm/langfuse.mjs +63 -35
  83. package/dist/esm/langfuse.mjs.map +1 -1
  84. package/dist/esm/langfuseConfig.mjs +6 -1
  85. package/dist/esm/langfuseConfig.mjs.map +1 -1
  86. package/dist/esm/langfuseToolOutputTracing.mjs +2 -2
  87. package/dist/esm/langfuseToolOutputTracing.mjs.map +1 -1
  88. package/dist/esm/langfuseTraceShaping.mjs +18 -9
  89. package/dist/esm/langfuseTraceShaping.mjs.map +1 -1
  90. package/dist/esm/llm/anthropic/index.mjs +4 -3
  91. package/dist/esm/llm/anthropic/index.mjs.map +1 -1
  92. package/dist/esm/llm/anthropic/utils/container.mjs +37 -0
  93. package/dist/esm/llm/anthropic/utils/container.mjs.map +1 -0
  94. package/dist/esm/llm/anthropic/utils/message_inputs.mjs +25 -23
  95. package/dist/esm/llm/anthropic/utils/message_inputs.mjs.map +1 -1
  96. package/dist/esm/llm/anthropic/utils/message_outputs.mjs +15 -21
  97. package/dist/esm/llm/anthropic/utils/message_outputs.mjs.map +1 -1
  98. package/dist/esm/llm/anthropic/utils/stream_events.mjs +16 -14
  99. package/dist/esm/llm/anthropic/utils/stream_events.mjs.map +1 -1
  100. package/dist/esm/llm/bedrock/index.mjs +2 -2
  101. package/dist/esm/llm/bedrock/index.mjs.map +1 -1
  102. package/dist/esm/llm/bedrock/toolCache.mjs +1 -1
  103. package/dist/esm/llm/bedrock/utils/message_inputs.mjs +19 -14
  104. package/dist/esm/llm/bedrock/utils/message_inputs.mjs.map +1 -1
  105. package/dist/esm/llm/google/utils/common.mjs +59 -13
  106. package/dist/esm/llm/google/utils/common.mjs.map +1 -1
  107. package/dist/esm/llm/init.mjs +12 -2
  108. package/dist/esm/llm/init.mjs.map +1 -1
  109. package/dist/esm/llm/openai/index.mjs +16 -3
  110. package/dist/esm/llm/openai/index.mjs.map +1 -1
  111. package/dist/esm/llm/openai/responseToolArguments.mjs +62 -0
  112. package/dist/esm/llm/openai/responseToolArguments.mjs.map +1 -0
  113. package/dist/esm/llm/openrouter/index.mjs +11 -2
  114. package/dist/esm/llm/openrouter/index.mjs.map +1 -1
  115. package/dist/esm/llm/openrouter/toolCache.mjs +1 -1
  116. package/dist/esm/llm/prepareProviderRequest.mjs +35 -7
  117. package/dist/esm/llm/prepareProviderRequest.mjs.map +1 -1
  118. package/dist/esm/main.mjs +5 -4
  119. package/dist/esm/messages/alternation.mjs +1 -1
  120. package/dist/esm/messages/anthropicServerTools.mjs +18 -0
  121. package/dist/esm/messages/anthropicServerTools.mjs.map +1 -0
  122. package/dist/esm/messages/budget.mjs +1 -1
  123. package/dist/esm/messages/cache.mjs +12 -2
  124. package/dist/esm/messages/cache.mjs.map +1 -1
  125. package/dist/esm/messages/core.mjs +4 -3
  126. package/dist/esm/messages/core.mjs.map +1 -1
  127. package/dist/esm/messages/format.mjs +3 -3
  128. package/dist/esm/messages/index.mjs +1 -1
  129. package/dist/esm/messages/prune.mjs +1 -1
  130. package/dist/esm/messages/recency.mjs +1 -1
  131. package/dist/esm/messages/toolResultTypes.mjs +21 -45
  132. package/dist/esm/messages/toolResultTypes.mjs.map +1 -1
  133. package/dist/esm/protection/providerText.mjs +4 -1
  134. package/dist/esm/protection/providerText.mjs.map +1 -1
  135. package/dist/esm/protection/toolResult.mjs +114 -0
  136. package/dist/esm/protection/toolResult.mjs.map +1 -0
  137. package/dist/esm/run.mjs +32 -14
  138. package/dist/esm/run.mjs.map +1 -1
  139. package/dist/esm/runtime/admission.mjs +1 -1
  140. package/dist/esm/runtime/client.mjs +3 -0
  141. package/dist/esm/runtime/client.mjs.map +1 -1
  142. package/dist/esm/stream.mjs +2 -1
  143. package/dist/esm/stream.mjs.map +1 -1
  144. package/dist/esm/summarization/node.mjs +9 -4
  145. package/dist/esm/summarization/node.mjs.map +1 -1
  146. package/dist/esm/tools/ProgrammaticToolCalling.mjs +1 -1
  147. package/dist/esm/tools/ToolNode.mjs +47 -14
  148. package/dist/esm/tools/ToolNode.mjs.map +1 -1
  149. package/dist/esm/tools/local/CompileCheckTool.mjs +1 -1
  150. package/dist/esm/tools/local/LocalCodingTools.mjs +1 -1
  151. package/dist/esm/tools/search/content.mjs +163 -42
  152. package/dist/esm/tools/search/content.mjs.map +1 -1
  153. package/dist/esm/tools/subagent/SubagentExecutor.mjs +8 -0
  154. package/dist/esm/tools/subagent/SubagentExecutor.mjs.map +1 -1
  155. package/dist/esm/utils/events.mjs +2 -2
  156. package/dist/esm/utils/events.mjs.map +1 -1
  157. package/dist/esm/utils/tokens.mjs +7 -2
  158. package/dist/esm/utils/tokens.mjs.map +1 -1
  159. package/dist/types/common/index.d.ts +2 -2
  160. package/dist/types/decisions/breaker.d.ts +2 -2
  161. package/dist/types/decisions/core.d.ts +13 -13
  162. package/dist/types/decisions/dialect.d.ts +1 -1
  163. package/dist/types/decisions/http.d.ts +2 -2
  164. package/dist/types/decisions/index.d.ts +5 -5
  165. package/dist/types/decisions/node.d.ts +2 -2
  166. package/dist/types/decisions/presets.d.ts +2 -2
  167. package/dist/types/decisions/probe.d.ts +1 -1
  168. package/dist/types/decisions/questions.d.ts +1 -1
  169. package/dist/types/decisions/structuredChat.d.ts +2 -2
  170. package/dist/types/decisions/transport.d.ts +1 -1
  171. package/dist/types/eventActor/EventActorExecutor.d.ts +1 -1
  172. package/dist/types/eventActor/index.d.ts +2 -2
  173. package/dist/types/graphs/Graph.d.ts +6 -2
  174. package/dist/types/graphs/MultiAgentGraph.d.ts +1 -1
  175. package/dist/types/graphs/applyGraphRuntimeConfig.d.ts +1 -1
  176. package/dist/types/graphs/graphFactory.d.ts +1 -1
  177. package/dist/types/graphs/index.d.ts +5 -5
  178. package/dist/types/harness/fileBindings.d.ts +2 -2
  179. package/dist/types/harness/fileService.d.ts +2 -2
  180. package/dist/types/harness/fileStream.d.ts +1 -1
  181. package/dist/types/harness/index.d.ts +15 -15
  182. package/dist/types/harness/model.d.ts +1 -1
  183. package/dist/types/harness/modelService.d.ts +2 -2
  184. package/dist/types/harness/modelStreamCallbacks.d.ts +1 -1
  185. package/dist/types/harness/providerText.d.ts +1 -1
  186. package/dist/types/hitl/index.d.ts +3 -3
  187. package/dist/types/hooks/HookRegistry.d.ts +1 -1
  188. package/dist/types/hooks/createToolPolicyHook.d.ts +1 -1
  189. package/dist/types/hooks/createWorkspacePolicyHook.d.ts +1 -1
  190. package/dist/types/hooks/executeHooks.d.ts +2 -2
  191. package/dist/types/hooks/index.d.ts +11 -11
  192. package/dist/types/index.d.ts +62 -60
  193. package/dist/types/langchain/index.d.ts +8 -8
  194. package/dist/types/langfuse.d.ts +7 -4
  195. package/dist/types/langfuseConfig.d.ts +5 -0
  196. package/dist/types/langfuseTraceShaping.d.ts +5 -0
  197. package/dist/types/llm/anthropic/utils/container.d.ts +4 -0
  198. package/dist/types/llm/anthropic/utils/message_inputs.d.ts +1 -1
  199. package/dist/types/llm/anthropic/utils/message_outputs.d.ts +1 -1
  200. package/dist/types/llm/anthropic/utils/stream_events.d.ts +1 -1
  201. package/dist/types/llm/bedrock/index.d.ts +2 -3
  202. package/dist/types/llm/bedrock/utils/harmony.d.ts +1 -1
  203. package/dist/types/llm/bedrock/utils/index.d.ts +2 -2
  204. package/dist/types/llm/bedrock/utils/message_inputs.d.ts +3 -12
  205. package/dist/types/llm/bedrock/utils/message_outputs.d.ts +1 -1
  206. package/dist/types/llm/google/index.d.ts +2 -2
  207. package/dist/types/llm/google/utils/common.d.ts +1 -1
  208. package/dist/types/llm/google/utils/tools.d.ts +1 -1
  209. package/dist/types/llm/openai/index.d.ts +2 -1
  210. package/dist/types/llm/openai/responseToolArguments.d.ts +7 -0
  211. package/dist/types/llm/openrouter/index.d.ts +1 -0
  212. package/dist/types/llm/prepareProviderRequest.d.ts +4 -1
  213. package/dist/types/llm/providerRegistry.d.ts +1 -1
  214. package/dist/types/llm/providers.d.ts +1 -1
  215. package/dist/types/messages/anthropicServerTools.d.ts +13 -0
  216. package/dist/types/messages/cache.d.ts +13 -0
  217. package/dist/types/messages/contextPruning.d.ts +1 -1
  218. package/dist/types/messages/core.d.ts +4 -4
  219. package/dist/types/messages/format.d.ts +1 -1
  220. package/dist/types/messages/index.d.ts +21 -21
  221. package/dist/types/messages/prune.d.ts +1 -1
  222. package/dist/types/openai/index.d.ts +2 -2
  223. package/dist/types/openai/toolProjection.d.ts +1 -1
  224. package/dist/types/prompts/index.d.ts +2 -2
  225. package/dist/types/protection/providerText.d.ts +3 -1
  226. package/dist/types/protection/toolResult.d.ts +69 -0
  227. package/dist/types/provider-registration.d.ts +1 -1
  228. package/dist/types/rerank/bm25.d.ts +1 -1
  229. package/dist/types/rerank/core.d.ts +17 -17
  230. package/dist/types/rerank/crossEncoder.d.ts +3 -3
  231. package/dist/types/rerank/fallback.d.ts +1 -1
  232. package/dist/types/rerank/index.d.ts +2 -2
  233. package/dist/types/rerank/outcome.d.ts +2 -2
  234. package/dist/types/rerank/pin.d.ts +2 -2
  235. package/dist/types/rerank/search.d.ts +1 -1
  236. package/dist/types/rerank/systemone.d.ts +4 -4
  237. package/dist/types/rerank/types.d.ts +1 -1
  238. package/dist/types/run.d.ts +2 -0
  239. package/dist/types/runtime/admission.d.ts +1 -1
  240. package/dist/types/runtime/checkpoint.d.ts +1 -1
  241. package/dist/types/runtime/client.d.ts +2 -2
  242. package/dist/types/runtime/files.d.ts +4 -4
  243. package/dist/types/runtime/hostTools.d.ts +2 -2
  244. package/dist/types/runtime/index.d.ts +12 -12
  245. package/dist/types/runtime/model.d.ts +5 -5
  246. package/dist/types/runtime/policy.d.ts +3 -3
  247. package/dist/types/runtime/recovery/client.d.ts +3 -3
  248. package/dist/types/runtime/recovery/log.d.ts +2 -2
  249. package/dist/types/runtime/recovery/redis.d.ts +1 -1
  250. package/dist/types/runtime/recovery/server.d.ts +3 -3
  251. package/dist/types/runtime/resume.d.ts +1 -1
  252. package/dist/types/runtime/server.d.ts +3 -3
  253. package/dist/types/runtime/snapshot.d.ts +1 -1
  254. package/dist/types/runtime/types.d.ts +2 -2
  255. package/dist/types/session/AgentSession.d.ts +2 -2
  256. package/dist/types/session/JsonlSessionStore.d.ts +1 -1
  257. package/dist/types/session/deriveMessages.d.ts +1 -1
  258. package/dist/types/session/handlers.d.ts +1 -1
  259. package/dist/types/session/index.d.ts +7 -7
  260. package/dist/types/session/messageSerialization.d.ts +1 -1
  261. package/dist/types/session/sessionProjection.d.ts +3 -3
  262. package/dist/types/summarization/index.d.ts +2 -2
  263. package/dist/types/summarization/node.d.ts +2 -0
  264. package/dist/types/tools/BashProgrammaticToolCalling.d.ts +1 -1
  265. package/dist/types/tools/GitHubCompare.d.ts +6 -6
  266. package/dist/types/tools/ProgrammaticToolCalling.d.ts +1 -1
  267. package/dist/types/tools/ReadFile.d.ts +6 -6
  268. package/dist/types/tools/SkillTool.d.ts +6 -6
  269. package/dist/types/tools/ToolNode.d.ts +5 -1
  270. package/dist/types/tools/cloudflare/index.d.ts +4 -4
  271. package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
  272. package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
  273. package/dist/types/tools/local/attachments.d.ts +1 -1
  274. package/dist/types/tools/local/index.d.ts +12 -12
  275. package/dist/types/tools/search/anthropic.d.ts +1 -1
  276. package/dist/types/tools/search/content.d.ts +38 -1
  277. package/dist/types/tools/search/crw-scraper.d.ts +1 -1
  278. package/dist/types/tools/search/crw-search.d.ts +1 -1
  279. package/dist/types/tools/search/firecrawl.d.ts +1 -1
  280. package/dist/types/tools/search/format.d.ts +1 -1
  281. package/dist/types/tools/search/highlights.d.ts +1 -1
  282. package/dist/types/tools/search/index.d.ts +3 -3
  283. package/dist/types/tools/search/keenable-scraper.d.ts +1 -1
  284. package/dist/types/tools/search/keenable-search.d.ts +1 -1
  285. package/dist/types/tools/search/metrics.d.ts +1 -1
  286. package/dist/types/tools/search/rerankers.d.ts +1 -1
  287. package/dist/types/tools/search/schema.d.ts +6 -6
  288. package/dist/types/tools/search/search.d.ts +1 -1
  289. package/dist/types/tools/search/serper-scraper.d.ts +1 -1
  290. package/dist/types/tools/search/tavily-scraper.d.ts +1 -1
  291. package/dist/types/tools/search/tavily-search.d.ts +1 -1
  292. package/dist/types/tools/search/tool.d.ts +3 -3
  293. package/dist/types/tools/search/types.d.ts +2 -2
  294. package/dist/types/tools/search/utils.d.ts +3 -3
  295. package/dist/types/tools/subagent/SubagentExecutionRegistry.d.ts +1 -1
  296. package/dist/types/tools/subagent/SubagentExecutor.d.ts +9 -3
  297. package/dist/types/tools/subagent/diagnostics.d.ts +1 -1
  298. package/dist/types/tools/subagent/index.d.ts +7 -7
  299. package/dist/types/types/attachments.d.ts +25 -0
  300. package/dist/types/types/graph.d.ts +15 -0
  301. package/dist/types/types/index.d.ts +14 -13
  302. package/dist/types/types/llm.d.ts +2 -2
  303. package/dist/types/types/run.d.ts +7 -2
  304. package/dist/types/types/subagentTasks.d.ts +2 -2
  305. package/dist/types/types/tools.d.ts +6 -3
  306. package/dist/types/utils/events.d.ts +2 -1
  307. package/dist/types/utils/index.d.ts +10 -10
  308. package/dist/types/utils/tokens.d.ts +1 -0
  309. package/package.json +14 -12
  310. package/src/graphs/Graph.ts +32 -1
  311. package/src/index.ts +8 -0
  312. package/src/langfuse.ts +129 -41
  313. package/src/langfuseConfig.ts +14 -0
  314. package/src/langfuseToolOutputTracing.ts +5 -4
  315. package/src/langfuseTraceShaping.ts +49 -12
  316. package/src/llm/anthropic/index.ts +11 -3
  317. package/src/llm/anthropic/utils/container.ts +63 -0
  318. package/src/llm/anthropic/utils/message_inputs.ts +57 -51
  319. package/src/llm/anthropic/utils/message_outputs.ts +12 -39
  320. package/src/llm/anthropic/utils/stream_events.ts +17 -12
  321. package/src/llm/bedrock/index.ts +7 -5
  322. package/src/llm/bedrock/utils/message_inputs.ts +28 -35
  323. package/src/llm/google/utils/common.ts +88 -36
  324. package/src/llm/init.ts +35 -3
  325. package/src/llm/openai/index.ts +17 -2
  326. package/src/llm/openai/responseToolArguments.ts +104 -0
  327. package/src/llm/openrouter/index.ts +13 -0
  328. package/src/llm/prepareProviderRequest.ts +75 -13
  329. package/src/messages/anthropicServerTools.ts +24 -0
  330. package/src/messages/cache.ts +25 -5
  331. package/src/messages/core.ts +12 -11
  332. package/src/messages/toolResultTypes.ts +80 -88
  333. package/src/protection/providerText.ts +127 -40
  334. package/src/protection/toolResult.ts +272 -0
  335. package/src/run.ts +112 -47
  336. package/src/runtime/client.ts +7 -0
  337. package/src/stream.ts +7 -1
  338. package/src/summarization/node.ts +17 -4
  339. package/src/tools/ToolNode.ts +114 -18
  340. package/src/tools/search/content.ts +282 -62
  341. package/src/tools/subagent/SubagentExecutor.ts +12 -0
  342. package/src/types/attachments.ts +31 -0
  343. package/src/types/graph.ts +12 -0
  344. package/src/types/index.ts +1 -0
  345. package/src/types/run.ts +8 -1
  346. package/src/types/tools.ts +3 -0
  347. package/src/utils/events.ts +9 -2
  348. package/src/utils/tokens.ts +28 -2
@@ -1,6 +1,6 @@
1
1
  import type { RunStep, AgentInputs, createHostFileService, HostFileBindings, HostFileDescriptor, HostFileServiceDescriptor, createHostProviderTextService, createHostModelService, HostModelDescriptor, HostChatModel, HostProviderTextDescriptor, HostToolDescriptor, HostToolBindings, Run, RunConfig, EventHandler, IState, HookEvent } from '../index.js';
2
- import type { HostModelLifecycle } from './admission';
3
- import type { SdkAgentIdentity } from './identity';
2
+ import type { HostModelLifecycle } from './admission.js';
3
+ import type { SdkAgentIdentity } from './identity.js';
4
4
  export interface RemoteSdkRecoveryOptions {
5
5
  /** Operator-allowlisted direct worker routes, keyed by stable owner identity. */
6
6
  routes?: Record<string, string>;
@@ -1,6 +1,6 @@
1
1
  import type { BaseCheckpointSaver } from '@langchain/langgraph';
2
- import type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, SessionBranchOptions, SessionCompactOptions, SessionForkOptions } from './types';
3
- import { JsonlSessionStore } from './JsonlSessionStore';
2
+ import type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, SessionBranchOptions, SessionCompactOptions, SessionForkOptions } from './types.js';
3
+ import { JsonlSessionStore } from './JsonlSessionStore.js';
4
4
  export declare class AgentSession {
5
5
  private runConfig;
6
6
  private store;
@@ -1,5 +1,5 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { CreateSessionFileOptions, SessionBranchOptions, SessionEntry, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionCheckpointEntry, SessionCompactionEntry, SessionRunEventEntry, SessionSummaryEntry, SessionStateEntry, SessionFadingState, SessionTreeNode } from './types';
2
+ import type { CreateSessionFileOptions, SessionBranchOptions, SessionEntry, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionCheckpointEntry, SessionCompactionEntry, SessionRunEventEntry, SessionSummaryEntry, SessionStateEntry, SessionFadingState, SessionTreeNode } from './types.js';
3
3
  export declare class JsonlSessionStore {
4
4
  readonly path: string;
5
5
  readonly header: SessionHeader;
@@ -1,5 +1,5 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { SessionEntry } from './types';
2
+ import type { SessionEntry } from './types.js';
3
3
  export interface DerivedSessionMessages {
4
4
  initialSummary?: {
5
5
  text: string;
@@ -1,4 +1,4 @@
1
- import type { AgentSessionHandlersResult, AgentSessionStreamEvent } from './types';
1
+ import type { AgentSessionHandlersResult, AgentSessionStreamEvent } from './types.js';
2
2
  import type * as t from '../types/index.js';
3
3
  export declare function createRunHandlers(params: {
4
4
  runId: string;
@@ -1,7 +1,7 @@
1
- export { AgentSession, createAgentSession } from './AgentSession';
2
- export { deriveMessages } from './deriveMessages';
3
- export { JsonlSessionStore, SessionManager } from './JsonlSessionStore';
4
- export { createRunHandlers } from './handlers';
5
- export { serializeMessage, deserializeMessage, extractTextFromContent, } from './messageSerialization';
6
- export type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionCheckpointing, AgentSessionCheckpointingOptions, AgentSessionHandlersResult, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, AgentSessionStreamEvent, AgentSessionUsage, CreateSessionFileOptions, JsonObject, JsonPrimitive, JsonValue, SerializedSessionMessage, SessionBranchOptions, SessionCompactOptions, SessionCheckpointEntry, SessionCompactionEntry, SessionEntry, SessionEntryBase, SessionEntryType, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionPosition, SessionRunEventEntry, SessionStateEntry, SessionSummaryEntry, SessionTreeNode, } from './types';
7
- export type { DerivedSessionMessages } from './deriveMessages';
1
+ export { AgentSession, createAgentSession } from './AgentSession.js';
2
+ export { deriveMessages } from './deriveMessages.js';
3
+ export { JsonlSessionStore, SessionManager } from './JsonlSessionStore.js';
4
+ export { createRunHandlers } from './handlers.js';
5
+ export { serializeMessage, deserializeMessage, extractTextFromContent, } from './messageSerialization.js';
6
+ export type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionCheckpointing, AgentSessionCheckpointingOptions, AgentSessionHandlersResult, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, AgentSessionStreamEvent, AgentSessionUsage, CreateSessionFileOptions, JsonObject, JsonPrimitive, JsonValue, SerializedSessionMessage, SessionBranchOptions, SessionCompactOptions, SessionCheckpointEntry, SessionCompactionEntry, SessionEntry, SessionEntryBase, SessionEntryType, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionPosition, SessionRunEventEntry, SessionStateEntry, SessionSummaryEntry, SessionTreeNode, } from './types.js';
7
+ export type { DerivedSessionMessages } from './deriveMessages.js';
@@ -1,5 +1,5 @@
1
1
  import { BaseMessage } from '@langchain/core/messages';
2
- import type { JsonValue, SerializedSessionMessage } from './types';
2
+ import type { JsonValue, SerializedSessionMessage } from './types.js';
3
3
  export declare function toJsonValue(value: unknown): JsonValue;
4
4
  export declare function serializeMessage(message: BaseMessage): SerializedSessionMessage;
5
5
  export declare function deserializeMessage(serialized: SerializedSessionMessage): BaseMessage;
@@ -1,6 +1,6 @@
1
- import type { DerivedSessionMessages } from './deriveMessages';
2
- import type { SessionEntry } from './types';
3
- import type { JsonlSessionStore } from './JsonlSessionStore';
1
+ import type { DerivedSessionMessages } from './deriveMessages.js';
2
+ import type { SessionEntry } from './types.js';
3
+ import type { JsonlSessionStore } from './JsonlSessionStore.js';
4
4
  /** Internal: only AgentSession's unexposed stores may reuse log topology. */
5
5
  export declare function initializeSessionProjection(store: JsonlSessionStore, entries: readonly SessionEntry[]): void;
6
6
  /** Forks share entry references, so exposing either disables the whole family. */
@@ -4,8 +4,8 @@ import type { SummarizationTrigger } from '../types/index.js';
4
4
  * default prompts stay out of it: LibreChat's manual flow deliberately words
5
5
  * its own, so exporting these would publish an API with no consumer.
6
6
  */
7
- export { buildSummarizationInstruction, buildSummaryCarrierText, separateSummarizationParameters, ManualSummarizationSkippedError, } from './shared';
8
- export type { ManualSummarizationSkipReason } from './shared';
7
+ export { buildSummarizationInstruction, buildSummaryCarrierText, separateSummarizationParameters, ManualSummarizationSkippedError, } from './shared.js';
8
+ export type { ManualSummarizationSkipReason } from './shared.js';
9
9
  /** For tests only. Resets the dedup set so warnings can be observed again. */
10
10
  export declare function _resetUnrecognizedTriggerWarnings(): void;
11
11
  /**
@@ -26,6 +26,8 @@ interface CreateSummarizeNodeParams {
26
26
  contentIndexMap: Map<string, number>;
27
27
  config?: RunnableConfig;
28
28
  runId?: string;
29
+ /** The graph's attachment resolver: a summary request carries the same references. */
30
+ resolveAttachment?: t.AttachmentResolver;
29
31
  isMultiAgent: boolean;
30
32
  getSubagentExecutionContext?: () => t.SubagentExecutionContext | undefined;
31
33
  hookRegistry?: HookRegistry;
@@ -1,5 +1,5 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout';
2
+ import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout.js';
3
3
  import type * as t from '../types/index.js';
4
4
  import { Constants } from '../common/index.js';
5
5
  export declare function createBashProgrammaticToolCallingSchema(maxRunTimeoutMs?: number): ProgrammaticToolCallingJsonSchema;
@@ -7,13 +7,13 @@ export declare const GitHubCompareToolSchema: {
7
7
  readonly intent: {
8
8
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
9
9
  readonly enum?: string[];
10
- readonly items?: import("..").JsonSchemaType;
11
- readonly properties?: Record<string, import("..").JsonSchemaType>;
10
+ readonly items?: import("../index.js").JsonSchemaType;
11
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
12
12
  readonly required?: string[];
13
13
  readonly description?: string;
14
14
  readonly pattern?: string;
15
15
  readonly maxLength?: number;
16
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
16
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
17
17
  };
18
18
  readonly owner: {
19
19
  readonly type: "string";
@@ -43,13 +43,13 @@ export declare const GitHubCompareToolDefinition: {
43
43
  readonly intent: {
44
44
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
45
45
  readonly enum?: string[];
46
- readonly items?: import("..").JsonSchemaType;
47
- readonly properties?: Record<string, import("..").JsonSchemaType>;
46
+ readonly items?: import("../index.js").JsonSchemaType;
47
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
48
48
  readonly required?: string[];
49
49
  readonly description?: string;
50
50
  readonly pattern?: string;
51
51
  readonly maxLength?: number;
52
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
52
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
53
53
  };
54
54
  readonly owner: {
55
55
  readonly type: "string";
@@ -1,5 +1,5 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout';
2
+ import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout.js';
3
3
  import type * as t from '../types/index.js';
4
4
  import { Constants } from '../common/index.js';
5
5
  export declare function createProgrammaticToolCallingSchema(maxRunTimeoutMs?: number): ProgrammaticToolCallingJsonSchema;
@@ -7,13 +7,13 @@ export declare const ReadFileToolSchema: {
7
7
  readonly intent: {
8
8
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
9
9
  readonly enum?: string[];
10
- readonly items?: import("..").JsonSchemaType;
11
- readonly properties?: Record<string, import("..").JsonSchemaType>;
10
+ readonly items?: import("../index.js").JsonSchemaType;
11
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
12
12
  readonly required?: string[];
13
13
  readonly description?: string;
14
14
  readonly pattern?: string;
15
15
  readonly maxLength?: number;
16
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
16
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
17
17
  };
18
18
  readonly path: {
19
19
  readonly type: "string";
@@ -31,13 +31,13 @@ export declare const ReadFileToolDefinition: {
31
31
  readonly intent: {
32
32
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
33
33
  readonly enum?: string[];
34
- readonly items?: import("..").JsonSchemaType;
35
- readonly properties?: Record<string, import("..").JsonSchemaType>;
34
+ readonly items?: import("../index.js").JsonSchemaType;
35
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
36
36
  readonly required?: string[];
37
37
  readonly description?: string;
38
38
  readonly pattern?: string;
39
39
  readonly maxLength?: number;
40
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
40
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
41
41
  };
42
42
  readonly path: {
43
43
  readonly type: "string";
@@ -12,13 +12,13 @@ export declare const SkillToolSchema: {
12
12
  readonly intent: {
13
13
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
14
14
  readonly enum?: string[];
15
- readonly items?: import("..").JsonSchemaType;
16
- readonly properties?: Record<string, import("..").JsonSchemaType>;
15
+ readonly items?: import("../index.js").JsonSchemaType;
16
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
17
17
  readonly required?: string[];
18
18
  readonly description?: string;
19
19
  readonly pattern?: string;
20
20
  readonly maxLength?: number;
21
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
21
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
22
22
  };
23
23
  readonly skillName: {
24
24
  readonly type: "string";
@@ -40,13 +40,13 @@ export declare const SkillToolDefinition: {
40
40
  readonly intent: {
41
41
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
42
42
  readonly enum?: string[];
43
- readonly items?: import("..").JsonSchemaType;
44
- readonly properties?: Record<string, import("..").JsonSchemaType>;
43
+ readonly items?: import("../index.js").JsonSchemaType;
44
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
45
45
  readonly required?: string[];
46
46
  readonly description?: string;
47
47
  readonly pattern?: string;
48
48
  readonly maxLength?: number;
49
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
49
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
50
50
  };
51
51
  readonly skillName: {
52
52
  readonly type: "string";
@@ -102,6 +102,7 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
102
102
  private agentLangfuse?;
103
103
  toolCallStepIds?: Map<string, string>;
104
104
  errorHandler?: t.ToolNodeConstructorParams['errorHandler'];
105
+ private toolResultGate?;
105
106
  /**
106
107
  * Fallback error-completion ownership for calls that reach `runTool`
107
108
  * outside a batch context (direct `runTool` use in tests / embedders).
@@ -230,7 +231,7 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
230
231
  */
231
232
  private anonBatchCounter;
232
233
  private handoffRouting?;
233
- constructor({ handoffRouting, tools, toolMap, name, tags, trace, runLangfuse, agentLangfuse, errorHandler, toolCallStepIds, handleToolErrors, loadRuntimeTools, toolRegistry, toolDefinitions, getDiscoveredToolNames, sessions, codeSessionKey, eventDrivenMode, eagerEventToolExecution, eagerEventToolExecutions, eagerEventToolUsageCount, eagerEventToolSuppressions, agentId, executingAgentId, executionContext, executingAgentName, rootAgentId, rootAgentName, directToolNames, interruptingToolNames, codeSessionToolNames, maxContextTokens, maxToolResultChars, hookRegistry, humanInTheLoop, toolOutputReferences, toolOutputRegistry, toolExecution, fileCheckpointer, getBreakerSignal, getRunScope, preparedSubagents, restoreRunStepResumeState, createRunStepResumeState, onToolCallsClaimed, }: t.ToolNodeConstructorParams);
234
+ constructor({ handoffRouting, tools, toolMap, name, tags, trace, runLangfuse, agentLangfuse, errorHandler, toolCallStepIds, handleToolErrors, loadRuntimeTools, toolRegistry, toolDefinitions, getDiscoveredToolNames, sessions, codeSessionKey, eventDrivenMode, eagerEventToolExecution, eagerEventToolExecutions, eagerEventToolUsageCount, eagerEventToolSuppressions, agentId, executingAgentId, executionContext, executingAgentName, rootAgentId, rootAgentName, directToolNames, interruptingToolNames, codeSessionToolNames, maxContextTokens, maxToolResultChars, hookRegistry, humanInTheLoop, toolOutputReferences, toolOutputRegistry, toolResultProtection, toolExecution, fileCheckpointer, getBreakerSignal, getRunScope, preparedSubagents, restoreRunStepResumeState, createRunStepResumeState, onToolCallsClaimed, }: t.ToolNodeConstructorParams);
234
235
  invoke(input: any, options?: Partial<RunnableConfig>): Promise<any>;
235
236
  private withToolScope;
236
237
  /**
@@ -311,6 +312,9 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
311
312
  * substitutions. Omit when no registration should occur.
312
313
  */
313
314
  protected runTool(call: ToolCall, config: RunnableConfig, batchContext?: RunToolBatchContext<T>): Promise<BaseMessage | Command>;
315
+ /** The gate when host result protection selects `toolName`. */
316
+ private protectedResultGate;
317
+ private inspectHostResults;
314
318
  private unresolvedReferenceMessage;
315
319
  /**
316
320
  * Runs a single in-process tool call with the same lifecycle hooks
@@ -1,4 +1,4 @@
1
- export * from './CloudflareBridgeRuntime';
2
- export * from './CloudflareProgrammaticToolCalling';
3
- export * from './CloudflareSandboxExecutionEngine';
4
- export * from './CloudflareSandboxTools';
1
+ export * from './CloudflareBridgeRuntime.js';
2
+ export * from './CloudflareProgrammaticToolCalling.js';
3
+ export * from './CloudflareSandboxExecutionEngine.js';
4
+ export * from './CloudflareSandboxTools.js';
@@ -1,4 +1,4 @@
1
- import type { WorkspaceFS } from './workspaceFS';
1
+ import type { WorkspaceFS } from './workspaceFS.js';
2
2
  import type * as t from '../../types/index.js';
3
3
  /**
4
4
  * Per-Run snapshot store for write_file / edit_file. Captures the
@@ -1,4 +1,4 @@
1
- import type { WorkspaceFS } from './workspaceFS';
1
+ import type { WorkspaceFS } from './workspaceFS.js';
2
2
  import type * as t from '../../types/index.js';
3
3
  /** Produces a stable, non-plaintext key for environment-sensitive probes. */
4
4
  export declare function commandAvailabilityEnvCacheKey(env: NodeJS.ProcessEnv | undefined): string;
@@ -32,7 +32,7 @@
32
32
  * size; oversize attachments degrade to a stub describing the
33
33
  * refusal so the model isn't surprised.
34
34
  */
35
- import type { WorkspaceFS } from './workspaceFS';
35
+ import type { WorkspaceFS } from './workspaceFS.js';
36
36
  export type AttachmentMode = 'images-only' | 'images-and-pdf' | 'off';
37
37
  export type Attachment = {
38
38
  kind: 'image';
@@ -1,12 +1,12 @@
1
- export * from './CompileCheckTool';
2
- export * from './FileCheckpointer';
3
- export * from './LocalCodingTools';
4
- export * from './LocalExecutionEngine';
5
- export * from './LocalExecutionTools';
6
- export * from './LocalProgrammaticToolCalling';
7
- export * from './resolveLocalExecutionTools';
8
- export * from './attachments';
9
- export * from './bashAst';
10
- export * from './editStrategies';
11
- export * from './syntaxCheck';
12
- export * from './textEncoding';
1
+ export * from './CompileCheckTool.js';
2
+ export * from './FileCheckpointer.js';
3
+ export * from './LocalCodingTools.js';
4
+ export * from './LocalExecutionEngine.js';
5
+ export * from './LocalExecutionTools.js';
6
+ export * from './LocalProgrammaticToolCalling.js';
7
+ export * from './resolveLocalExecutionTools.js';
8
+ export * from './attachments.js';
9
+ export * from './bashAst.js';
10
+ export * from './editStrategies.js';
11
+ export * from './syntaxCheck.js';
12
+ export * from './textEncoding.js';
@@ -1,5 +1,5 @@
1
1
  import type { AnthropicTextBlockParam, AnthropicWebSearchResultBlockParam } from '../../llm/anthropic/types.js';
2
- import type { SearchResultData } from './types';
2
+ import type { SearchResultData } from './types.js';
3
3
  /**
4
4
  * Coerces Anthropic web search results to the SearchResultData format
5
5
  * @param results - Array of Anthropic web search results
@@ -1,4 +1,41 @@
1
- import type { References } from './types';
1
+ import type { References, MediaReference } from './types.js';
2
+ type ReferenceType = 'image' | 'video' | 'iframe' | 'link';
3
+ interface ReferenceTarget {
4
+ type: ReferenceType;
5
+ idx: number;
6
+ }
7
+ /**
8
+ * Aho-Corasick automaton over `(` followed by every referenced URL, held in
9
+ * typed arrays: 18 bytes per node and no object per node. Nodes are numbered
10
+ * breadth first, so the children of `node` are the nodes from
11
+ * `firstChild[node]` up to `firstChild[node + 1]`, sorted by `code`.
12
+ */
13
+ export interface ReferenceMatcher {
14
+ firstChild: Int32Array;
15
+ code: Uint16Array;
16
+ depth: Int32Array;
17
+ fail: Int32Array;
18
+ /** Nearest node on the fail chain, itself included, that ends a URL, or -1. */
19
+ output: Int32Array;
20
+ targets: Map<number, ReferenceTarget>;
21
+ }
22
+ /**
23
+ * Largest automaton built for one page. Nodes are the distinct URL prefixes, at
24
+ * most the URL characters on the page: 2^21 of them measured 36 MiB and 0.15 s
25
+ * to build, about 100 times a long Wikipedia article. A page above the cap
26
+ * keeps its markdown as is.
27
+ */
28
+ export declare const MAX_MATCHER_NODES: number;
29
+ /**
30
+ * Indexes every referenced URL once, or returns `undefined` when the automaton
31
+ * would exceed `MAX_MATCHER_NODES`. A URL listed under several types keeps the
32
+ * first, in image, video, iframe, link order, which is the order the replacement
33
+ * has always preferred. Sorting the URLs gives the exact node count before
34
+ * anything is allocated, and lets each node take its children from one
35
+ * contiguous run of URLs.
36
+ */
37
+ export declare function buildMatcher(groups: ReadonlyArray<[ReferenceType, Map<string, MediaReference>]>): ReferenceMatcher | undefined;
2
38
  export declare function processContent(html: string, markdown: string): {
3
39
  markdown: string;
4
40
  } & References;
41
+ export {};
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * fastCRW scraper. Firecrawl-compatible web scraper; single binary;
4
4
  * self-host or cloud. Posts to {base}/v1/scrape.
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createCrwAPI: (apiKey?: string, apiUrl?: string, options?: t.CrwSearchOptions) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Firecrawl scraper implementation
4
4
  * Uses the Firecrawl API to scrape web pages
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const MISSING_SEARCH_RESULT_DATA_ERROR = "Search provider returned no result data";
3
3
  /** Resolves the per-search highlight budget from config, the
4
4
  * `SEARCH_MAX_LLM_OUTPUT_CHARS` env var, or the default (50,000 chars). */
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Expand highlights in search results using smart boundary detection.
4
4
  *
@@ -1,3 +1,3 @@
1
- export * from './tool';
2
- export * from './schema';
3
- export type * from './types';
1
+ export * from './tool.js';
2
+ export * from './schema.js';
3
+ export type * from './types.js';
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare class KeenableScraper implements t.BaseScraper {
3
3
  private apiKey;
4
4
  private apiUrl;
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createKeenableAPI: (apiKey?: string, apiUrl?: string, options?: t.KeenableSearchOptions) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const classifyFailure: (message?: string) => string;
3
3
  /**
4
4
  * Creates the counter set for one `web_search` call.
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Ranking used whenever no reranker scores the chunks: the candidates' own
4
4
  * order, capped at `topK`, with a neutral score.
@@ -39,13 +39,13 @@ export declare const WebSearchToolSchema: {
39
39
  readonly intent: {
40
40
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
41
41
  readonly enum?: string[];
42
- readonly items?: import("../..").JsonSchemaType;
43
- readonly properties?: Record<string, import("../..").JsonSchemaType>;
42
+ readonly items?: import("../../index.js").JsonSchemaType;
43
+ readonly properties?: Record<string, import("../../index.js").JsonSchemaType>;
44
44
  readonly required?: string[];
45
45
  readonly description?: string;
46
46
  readonly pattern?: string;
47
47
  readonly maxLength?: number;
48
- readonly additionalProperties?: boolean | import("../..").JsonSchemaType;
48
+ readonly additionalProperties?: boolean | import("../../index.js").JsonSchemaType;
49
49
  };
50
50
  readonly query: {
51
51
  readonly type: "string";
@@ -86,13 +86,13 @@ export declare const WebSearchToolDefinition: {
86
86
  readonly intent: {
87
87
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
88
88
  readonly enum?: string[];
89
- readonly items?: import("../..").JsonSchemaType;
90
- readonly properties?: Record<string, import("../..").JsonSchemaType>;
89
+ readonly items?: import("../../index.js").JsonSchemaType;
90
+ readonly properties?: Record<string, import("../../index.js").JsonSchemaType>;
91
91
  readonly required?: string[];
92
92
  readonly description?: string;
93
93
  readonly pattern?: string;
94
94
  readonly maxLength?: number;
95
- readonly additionalProperties?: boolean | import("../..").JsonSchemaType;
95
+ readonly additionalProperties?: boolean | import("../../index.js").JsonSchemaType;
96
96
  };
97
97
  readonly query: {
98
98
  readonly type: "string";
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createSearchAPI: (config: t.SearchConfig) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Serper scraper implementation
4
4
  * Uses the Serper Scrape API (https://scrape.serper.dev) to scrape web pages
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare class TavilyScraper implements t.BaseScraper {
3
3
  private apiKey;
4
4
  private apiUrl;
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createTavilyAPI: (apiKey?: string, apiUrl?: string, options?: t.TavilySearchOptions) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from './types';
3
- import { DATE_RANGE } from './schema';
4
- import { createSearchAPI } from './search';
2
+ import type * as t from './types.js';
3
+ import { DATE_RANGE } from './schema.js';
4
+ import { createSearchAPI } from './search.js';
5
5
  /**
6
6
  * Settled label for a `web_search` call's intent (see `intentArg.ts`).
7
7
  *
@@ -2,8 +2,8 @@ import type { RunnableConfig } from '@langchain/core/runnables';
2
2
  import type { Logger as WinstonLogger } from 'winston';
3
3
  import type { Agent as HttpsAgent } from 'https';
4
4
  import type { Agent as HttpAgent } from 'http';
5
- import type { BaseReranker } from './rerankers';
6
- import { DATE_RANGE } from './schema';
5
+ import type { BaseReranker } from './rerankers.js';
6
+ import { DATE_RANGE } from './schema.js';
7
7
  export type { HttpAgent, HttpsAgent };
8
8
  export interface HttpAgentConfig {
9
9
  httpAgent?: HttpAgent;
@@ -1,6 +1,6 @@
1
- import type { SafeErrorLog } from './types';
2
- import type * as t from './types';
3
- export type { SafeErrorLog } from './types';
1
+ import type { SafeErrorLog } from './types.js';
2
+ import type * as t from './types.js';
3
+ export type { SafeErrorLog } from './types.js';
4
4
  /**
5
5
  * Creates a default logger that maps to console methods
6
6
  * Uses a singleton pattern to avoid creating multiple instances
@@ -1,5 +1,5 @@
1
1
  import type { RunnableConfig } from '@langchain/core/runnables';
2
- import type { SubagentResumeExecution } from './SubagentReplay';
2
+ import type { SubagentResumeExecution } from './SubagentReplay.js';
3
3
  export type SubagentExecutionAddressInput = {
4
4
  threadId?: string;
5
5
  parentToolCallId: string;
@@ -2,13 +2,13 @@ import { BaseMessage } from '@langchain/core/messages';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
3
  import type { ToolCall } from '@langchain/core/messages/tool';
4
4
  import type { MultiAgentGraphState, HumanInTheLoopConfig, StandardGraphInput, ExecutableSubagentConfigEntry, SubagentExecutionContext, SubagentContextAdapter, SubagentContextResult, SubagentTaskConfig, SubagentTaskRuntime, SubagentHostArgs, SubagentUsageSink, TokenCounter } from '../../types/index.js';
5
- import type { SubagentResolutionPhase, SubagentResolutionCause, SubagentHostArgumentFailure, SubagentResolutionFailureHandler } from './diagnostics';
6
- import type { SubagentResumeManifest, SettledSubagentToolOutput } from './SubagentReplay';
5
+ import type { SubagentResolutionPhase, SubagentResolutionCause, SubagentHostArgumentFailure, SubagentResolutionFailureHandler } from './diagnostics.js';
6
+ import type { SubagentResumeManifest, SettledSubagentToolOutput } from './SubagentReplay.js';
7
7
  import type { GraphFactory } from '../../graphs/graphFactory.js';
8
8
  import type { StandardGraph } from '../../graphs/Graph.js';
9
9
  import { HookRegistry } from '../../hooks/index.js';
10
10
  import { HandlerRegistry } from '../../events.js';
11
- export { buildChildInputs, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, } from './childGraphConfig';
11
+ export { buildChildInputs, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, } from './childGraphConfig.js';
12
12
  export declare const DEFAULT_SUBAGENT_DESCRIPTION = "No task description provided";
13
13
  export type SubagentExecuteParams = {
14
14
  description: string;
@@ -127,6 +127,10 @@ export type SubagentExecutorOptions = {
127
127
  * revert to the defaults.
128
128
  */
129
129
  providerTextProtection?: StandardGraphInput['providerTextProtection'];
130
+ /** The parent's tool result protection, so a child inspects the same tools. */
131
+ toolResultProtection?: StandardGraphInput['toolResultProtection'];
132
+ /** The parent's attachment resolver, so a child resolves the references it inherits. */
133
+ resolveAttachment?: StandardGraphInput['resolveAttachment'];
130
134
  streamLimits?: StandardGraphInput['streamLimits'];
131
135
  humanInTheLoop?: HumanInTheLoopConfig;
132
136
  /** Shared durable saver used to recover outer tool lifecycle results before
@@ -195,6 +199,8 @@ export declare class SubagentExecutor {
195
199
  private readonly langfuse?;
196
200
  private readonly tokenCounter?;
197
201
  private readonly providerTextProtection?;
202
+ private readonly toolResultProtection?;
203
+ private readonly resolveAttachment?;
198
204
  private readonly streamLimits?;
199
205
  private readonly humanInTheLoop?;
200
206
  private readonly checkpointer?;
@@ -1,5 +1,5 @@
1
1
  import type { SubagentHostArgs } from '../../types/graph.js';
2
- import { SubagentSettlementBindingError, SubagentDefinitionBindingError, SubagentInvocationBindingError, SubagentExecutionInvalidatedError } from './SubagentExecutionRegistry';
2
+ import { SubagentSettlementBindingError, SubagentDefinitionBindingError, SubagentInvocationBindingError, SubagentExecutionInvalidatedError } from './SubagentExecutionRegistry.js';
3
3
  import { describeCodeApiError } from '../diagnostics.js';
4
4
  /** Which step of child start-up failed: execution identity, then host config resolution. */
5
5
  export type SubagentResolutionPhase = 'identity' | 'config';