@librechat/agents 4.2.12 → 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 (280) hide show
  1. package/dist/cjs/graphs/Graph.cjs +11 -3
  2. package/dist/cjs/graphs/Graph.cjs.map +1 -1
  3. package/dist/cjs/llm/anthropic/index.cjs +4 -3
  4. package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
  5. package/dist/cjs/llm/anthropic/utils/container.cjs +37 -0
  6. package/dist/cjs/llm/anthropic/utils/container.cjs.map +1 -0
  7. package/dist/cjs/llm/anthropic/utils/message_inputs.cjs +25 -23
  8. package/dist/cjs/llm/anthropic/utils/message_inputs.cjs.map +1 -1
  9. package/dist/cjs/llm/anthropic/utils/message_outputs.cjs +15 -21
  10. package/dist/cjs/llm/anthropic/utils/message_outputs.cjs.map +1 -1
  11. package/dist/cjs/llm/anthropic/utils/stream_events.cjs +16 -14
  12. package/dist/cjs/llm/anthropic/utils/stream_events.cjs.map +1 -1
  13. package/dist/cjs/llm/bedrock/index.cjs +1 -1
  14. package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
  15. package/dist/cjs/llm/bedrock/toolCache.cjs +1 -1
  16. package/dist/cjs/llm/bedrock/utils/message_inputs.cjs +19 -13
  17. package/dist/cjs/llm/bedrock/utils/message_inputs.cjs.map +1 -1
  18. package/dist/cjs/llm/google/utils/common.cjs +59 -13
  19. package/dist/cjs/llm/google/utils/common.cjs.map +1 -1
  20. package/dist/cjs/llm/init.cjs +12 -2
  21. package/dist/cjs/llm/init.cjs.map +1 -1
  22. package/dist/cjs/llm/openai/index.cjs +1 -1
  23. package/dist/cjs/llm/openrouter/toolCache.cjs +1 -1
  24. package/dist/cjs/llm/prepareProviderRequest.cjs +1 -1
  25. package/dist/cjs/main.cjs +6 -3
  26. package/dist/cjs/messages/alternation.cjs +1 -1
  27. package/dist/cjs/messages/anthropicServerTools.cjs +20 -0
  28. package/dist/cjs/messages/anthropicServerTools.cjs.map +1 -0
  29. package/dist/cjs/messages/budget.cjs +1 -1
  30. package/dist/cjs/messages/core.cjs +3 -2
  31. package/dist/cjs/messages/core.cjs.map +1 -1
  32. package/dist/cjs/messages/format.cjs +2 -2
  33. package/dist/cjs/messages/index.cjs +1 -1
  34. package/dist/cjs/messages/prune.cjs +1 -1
  35. package/dist/cjs/messages/recency.cjs +1 -1
  36. package/dist/cjs/messages/toolResultTypes.cjs +21 -45
  37. package/dist/cjs/messages/toolResultTypes.cjs.map +1 -1
  38. package/dist/cjs/protection/providerText.cjs +4 -0
  39. package/dist/cjs/protection/providerText.cjs.map +1 -1
  40. package/dist/cjs/protection/toolResult.cjs +119 -0
  41. package/dist/cjs/protection/toolResult.cjs.map +1 -0
  42. package/dist/cjs/run.cjs +7 -1
  43. package/dist/cjs/run.cjs.map +1 -1
  44. package/dist/cjs/runtime/client.cjs +2 -0
  45. package/dist/cjs/runtime/client.cjs.map +1 -1
  46. package/dist/cjs/stream.cjs +1 -0
  47. package/dist/cjs/stream.cjs.map +1 -1
  48. package/dist/cjs/summarization/node.cjs +1 -1
  49. package/dist/cjs/tools/ToolNode.cjs +46 -13
  50. package/dist/cjs/tools/ToolNode.cjs.map +1 -1
  51. package/dist/cjs/tools/search/content.cjs +163 -42
  52. package/dist/cjs/tools/search/content.cjs.map +1 -1
  53. package/dist/cjs/tools/subagent/SubagentExecutor.cjs +4 -0
  54. package/dist/cjs/tools/subagent/SubagentExecutor.cjs.map +1 -1
  55. package/dist/cjs/utils/tokens.cjs +7 -2
  56. package/dist/cjs/utils/tokens.cjs.map +1 -1
  57. package/dist/esm/graphs/Graph.mjs +11 -3
  58. package/dist/esm/graphs/Graph.mjs.map +1 -1
  59. package/dist/esm/llm/anthropic/index.mjs +4 -3
  60. package/dist/esm/llm/anthropic/index.mjs.map +1 -1
  61. package/dist/esm/llm/anthropic/utils/container.mjs +37 -0
  62. package/dist/esm/llm/anthropic/utils/container.mjs.map +1 -0
  63. package/dist/esm/llm/anthropic/utils/message_inputs.mjs +25 -23
  64. package/dist/esm/llm/anthropic/utils/message_inputs.mjs.map +1 -1
  65. package/dist/esm/llm/anthropic/utils/message_outputs.mjs +15 -21
  66. package/dist/esm/llm/anthropic/utils/message_outputs.mjs.map +1 -1
  67. package/dist/esm/llm/anthropic/utils/stream_events.mjs +16 -14
  68. package/dist/esm/llm/anthropic/utils/stream_events.mjs.map +1 -1
  69. package/dist/esm/llm/bedrock/index.mjs +2 -2
  70. package/dist/esm/llm/bedrock/index.mjs.map +1 -1
  71. package/dist/esm/llm/bedrock/toolCache.mjs +1 -1
  72. package/dist/esm/llm/bedrock/utils/message_inputs.mjs +19 -14
  73. package/dist/esm/llm/bedrock/utils/message_inputs.mjs.map +1 -1
  74. package/dist/esm/llm/google/utils/common.mjs +59 -13
  75. package/dist/esm/llm/google/utils/common.mjs.map +1 -1
  76. package/dist/esm/llm/init.mjs +12 -2
  77. package/dist/esm/llm/init.mjs.map +1 -1
  78. package/dist/esm/llm/openai/index.mjs +1 -1
  79. package/dist/esm/llm/openrouter/toolCache.mjs +1 -1
  80. package/dist/esm/llm/prepareProviderRequest.mjs +1 -1
  81. package/dist/esm/main.mjs +5 -4
  82. package/dist/esm/messages/alternation.mjs +1 -1
  83. package/dist/esm/messages/anthropicServerTools.mjs +18 -0
  84. package/dist/esm/messages/anthropicServerTools.mjs.map +1 -0
  85. package/dist/esm/messages/budget.mjs +1 -1
  86. package/dist/esm/messages/core.mjs +3 -2
  87. package/dist/esm/messages/core.mjs.map +1 -1
  88. package/dist/esm/messages/format.mjs +2 -2
  89. package/dist/esm/messages/index.mjs +1 -1
  90. package/dist/esm/messages/prune.mjs +1 -1
  91. package/dist/esm/messages/recency.mjs +1 -1
  92. package/dist/esm/messages/toolResultTypes.mjs +21 -45
  93. package/dist/esm/messages/toolResultTypes.mjs.map +1 -1
  94. package/dist/esm/protection/providerText.mjs +4 -1
  95. package/dist/esm/protection/providerText.mjs.map +1 -1
  96. package/dist/esm/protection/toolResult.mjs +114 -0
  97. package/dist/esm/protection/toolResult.mjs.map +1 -0
  98. package/dist/esm/run.mjs +7 -1
  99. package/dist/esm/run.mjs.map +1 -1
  100. package/dist/esm/runtime/client.mjs +2 -0
  101. package/dist/esm/runtime/client.mjs.map +1 -1
  102. package/dist/esm/stream.mjs +1 -0
  103. package/dist/esm/stream.mjs.map +1 -1
  104. package/dist/esm/summarization/node.mjs +1 -1
  105. package/dist/esm/tools/ToolNode.mjs +46 -13
  106. package/dist/esm/tools/ToolNode.mjs.map +1 -1
  107. package/dist/esm/tools/search/content.mjs +163 -42
  108. package/dist/esm/tools/search/content.mjs.map +1 -1
  109. package/dist/esm/tools/subagent/SubagentExecutor.mjs +4 -0
  110. package/dist/esm/tools/subagent/SubagentExecutor.mjs.map +1 -1
  111. package/dist/esm/utils/tokens.mjs +7 -2
  112. package/dist/esm/utils/tokens.mjs.map +1 -1
  113. package/dist/types/common/index.d.ts +2 -2
  114. package/dist/types/decisions/breaker.d.ts +2 -2
  115. package/dist/types/decisions/core.d.ts +13 -13
  116. package/dist/types/decisions/dialect.d.ts +1 -1
  117. package/dist/types/decisions/http.d.ts +2 -2
  118. package/dist/types/decisions/index.d.ts +5 -5
  119. package/dist/types/decisions/node.d.ts +2 -2
  120. package/dist/types/decisions/presets.d.ts +2 -2
  121. package/dist/types/decisions/probe.d.ts +1 -1
  122. package/dist/types/decisions/questions.d.ts +1 -1
  123. package/dist/types/decisions/structuredChat.d.ts +2 -2
  124. package/dist/types/decisions/transport.d.ts +1 -1
  125. package/dist/types/eventActor/EventActorExecutor.d.ts +1 -1
  126. package/dist/types/eventActor/index.d.ts +2 -2
  127. package/dist/types/graphs/Graph.d.ts +4 -2
  128. package/dist/types/graphs/MultiAgentGraph.d.ts +1 -1
  129. package/dist/types/graphs/applyGraphRuntimeConfig.d.ts +1 -1
  130. package/dist/types/graphs/graphFactory.d.ts +1 -1
  131. package/dist/types/graphs/index.d.ts +5 -5
  132. package/dist/types/harness/fileBindings.d.ts +2 -2
  133. package/dist/types/harness/fileService.d.ts +2 -2
  134. package/dist/types/harness/fileStream.d.ts +1 -1
  135. package/dist/types/harness/index.d.ts +15 -15
  136. package/dist/types/harness/model.d.ts +1 -1
  137. package/dist/types/harness/modelService.d.ts +2 -2
  138. package/dist/types/harness/modelStreamCallbacks.d.ts +1 -1
  139. package/dist/types/harness/providerText.d.ts +1 -1
  140. package/dist/types/hitl/index.d.ts +3 -3
  141. package/dist/types/hooks/HookRegistry.d.ts +1 -1
  142. package/dist/types/hooks/createToolPolicyHook.d.ts +1 -1
  143. package/dist/types/hooks/createWorkspacePolicyHook.d.ts +1 -1
  144. package/dist/types/hooks/executeHooks.d.ts +2 -2
  145. package/dist/types/hooks/index.d.ts +11 -11
  146. package/dist/types/index.d.ts +62 -60
  147. package/dist/types/langchain/index.d.ts +8 -8
  148. package/dist/types/llm/anthropic/utils/container.d.ts +4 -0
  149. package/dist/types/llm/anthropic/utils/message_inputs.d.ts +1 -1
  150. package/dist/types/llm/anthropic/utils/message_outputs.d.ts +1 -1
  151. package/dist/types/llm/anthropic/utils/stream_events.d.ts +1 -1
  152. package/dist/types/llm/bedrock/index.d.ts +2 -3
  153. package/dist/types/llm/bedrock/utils/harmony.d.ts +1 -1
  154. package/dist/types/llm/bedrock/utils/index.d.ts +2 -2
  155. package/dist/types/llm/bedrock/utils/message_inputs.d.ts +3 -12
  156. package/dist/types/llm/bedrock/utils/message_outputs.d.ts +1 -1
  157. package/dist/types/llm/google/index.d.ts +2 -2
  158. package/dist/types/llm/google/utils/common.d.ts +1 -1
  159. package/dist/types/llm/google/utils/tools.d.ts +1 -1
  160. package/dist/types/llm/openai/index.d.ts +1 -1
  161. package/dist/types/llm/providerRegistry.d.ts +1 -1
  162. package/dist/types/llm/providers.d.ts +1 -1
  163. package/dist/types/messages/anthropicServerTools.d.ts +13 -0
  164. package/dist/types/messages/contextPruning.d.ts +1 -1
  165. package/dist/types/messages/core.d.ts +4 -4
  166. package/dist/types/messages/format.d.ts +1 -1
  167. package/dist/types/messages/index.d.ts +21 -21
  168. package/dist/types/messages/prune.d.ts +1 -1
  169. package/dist/types/openai/index.d.ts +2 -2
  170. package/dist/types/openai/toolProjection.d.ts +1 -1
  171. package/dist/types/prompts/index.d.ts +2 -2
  172. package/dist/types/protection/providerText.d.ts +3 -1
  173. package/dist/types/protection/toolResult.d.ts +69 -0
  174. package/dist/types/provider-registration.d.ts +1 -1
  175. package/dist/types/rerank/bm25.d.ts +1 -1
  176. package/dist/types/rerank/core.d.ts +17 -17
  177. package/dist/types/rerank/crossEncoder.d.ts +3 -3
  178. package/dist/types/rerank/fallback.d.ts +1 -1
  179. package/dist/types/rerank/index.d.ts +2 -2
  180. package/dist/types/rerank/outcome.d.ts +2 -2
  181. package/dist/types/rerank/pin.d.ts +2 -2
  182. package/dist/types/rerank/search.d.ts +1 -1
  183. package/dist/types/rerank/systemone.d.ts +4 -4
  184. package/dist/types/rerank/types.d.ts +1 -1
  185. package/dist/types/run.d.ts +1 -0
  186. package/dist/types/runtime/admission.d.ts +1 -1
  187. package/dist/types/runtime/checkpoint.d.ts +1 -1
  188. package/dist/types/runtime/client.d.ts +2 -2
  189. package/dist/types/runtime/files.d.ts +3 -3
  190. package/dist/types/runtime/hostTools.d.ts +2 -2
  191. package/dist/types/runtime/index.d.ts +12 -12
  192. package/dist/types/runtime/model.d.ts +5 -5
  193. package/dist/types/runtime/policy.d.ts +3 -3
  194. package/dist/types/runtime/recovery/client.d.ts +3 -3
  195. package/dist/types/runtime/recovery/log.d.ts +2 -2
  196. package/dist/types/runtime/recovery/redis.d.ts +1 -1
  197. package/dist/types/runtime/recovery/server.d.ts +3 -3
  198. package/dist/types/runtime/resume.d.ts +1 -1
  199. package/dist/types/runtime/server.d.ts +3 -3
  200. package/dist/types/runtime/snapshot.d.ts +1 -1
  201. package/dist/types/runtime/types.d.ts +2 -2
  202. package/dist/types/session/AgentSession.d.ts +2 -2
  203. package/dist/types/session/JsonlSessionStore.d.ts +1 -1
  204. package/dist/types/session/deriveMessages.d.ts +1 -1
  205. package/dist/types/session/handlers.d.ts +1 -1
  206. package/dist/types/session/index.d.ts +7 -7
  207. package/dist/types/session/messageSerialization.d.ts +1 -1
  208. package/dist/types/session/sessionProjection.d.ts +3 -3
  209. package/dist/types/summarization/index.d.ts +2 -2
  210. package/dist/types/tools/BashProgrammaticToolCalling.d.ts +1 -1
  211. package/dist/types/tools/GitHubCompare.d.ts +6 -6
  212. package/dist/types/tools/ProgrammaticToolCalling.d.ts +1 -1
  213. package/dist/types/tools/ReadFile.d.ts +6 -6
  214. package/dist/types/tools/SkillTool.d.ts +6 -6
  215. package/dist/types/tools/ToolNode.d.ts +5 -1
  216. package/dist/types/tools/cloudflare/index.d.ts +4 -4
  217. package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
  218. package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
  219. package/dist/types/tools/local/attachments.d.ts +1 -1
  220. package/dist/types/tools/local/index.d.ts +12 -12
  221. package/dist/types/tools/search/anthropic.d.ts +1 -1
  222. package/dist/types/tools/search/content.d.ts +38 -1
  223. package/dist/types/tools/search/crw-scraper.d.ts +1 -1
  224. package/dist/types/tools/search/crw-search.d.ts +1 -1
  225. package/dist/types/tools/search/firecrawl.d.ts +1 -1
  226. package/dist/types/tools/search/format.d.ts +1 -1
  227. package/dist/types/tools/search/highlights.d.ts +1 -1
  228. package/dist/types/tools/search/index.d.ts +3 -3
  229. package/dist/types/tools/search/keenable-scraper.d.ts +1 -1
  230. package/dist/types/tools/search/keenable-search.d.ts +1 -1
  231. package/dist/types/tools/search/metrics.d.ts +1 -1
  232. package/dist/types/tools/search/rerankers.d.ts +1 -1
  233. package/dist/types/tools/search/schema.d.ts +6 -6
  234. package/dist/types/tools/search/search.d.ts +1 -1
  235. package/dist/types/tools/search/serper-scraper.d.ts +1 -1
  236. package/dist/types/tools/search/tavily-scraper.d.ts +1 -1
  237. package/dist/types/tools/search/tavily-search.d.ts +1 -1
  238. package/dist/types/tools/search/tool.d.ts +3 -3
  239. package/dist/types/tools/search/types.d.ts +2 -2
  240. package/dist/types/tools/search/utils.d.ts +3 -3
  241. package/dist/types/tools/subagent/SubagentExecutionRegistry.d.ts +1 -1
  242. package/dist/types/tools/subagent/SubagentExecutor.d.ts +6 -3
  243. package/dist/types/tools/subagent/diagnostics.d.ts +1 -1
  244. package/dist/types/tools/subagent/index.d.ts +7 -7
  245. package/dist/types/types/attachments.d.ts +1 -1
  246. package/dist/types/types/graph.d.ts +4 -1
  247. package/dist/types/types/index.d.ts +14 -14
  248. package/dist/types/types/llm.d.ts +2 -2
  249. package/dist/types/types/run.d.ts +3 -1
  250. package/dist/types/types/subagentTasks.d.ts +2 -2
  251. package/dist/types/types/tools.d.ts +6 -3
  252. package/dist/types/utils/index.d.ts +10 -10
  253. package/dist/types/utils/tokens.d.ts +1 -0
  254. package/package.json +3 -2
  255. package/src/graphs/Graph.ts +22 -0
  256. package/src/index.ts +8 -0
  257. package/src/llm/anthropic/index.ts +11 -3
  258. package/src/llm/anthropic/utils/container.ts +63 -0
  259. package/src/llm/anthropic/utils/message_inputs.ts +57 -51
  260. package/src/llm/anthropic/utils/message_outputs.ts +12 -39
  261. package/src/llm/anthropic/utils/stream_events.ts +17 -12
  262. package/src/llm/bedrock/index.ts +7 -5
  263. package/src/llm/bedrock/utils/message_inputs.ts +28 -35
  264. package/src/llm/google/utils/common.ts +88 -36
  265. package/src/llm/init.ts +35 -3
  266. package/src/messages/anthropicServerTools.ts +24 -0
  267. package/src/messages/core.ts +12 -11
  268. package/src/messages/toolResultTypes.ts +80 -88
  269. package/src/protection/providerText.ts +127 -40
  270. package/src/protection/toolResult.ts +272 -0
  271. package/src/run.ts +15 -4
  272. package/src/runtime/client.ts +3 -0
  273. package/src/stream.ts +5 -0
  274. package/src/tools/ToolNode.ts +112 -17
  275. package/src/tools/search/content.ts +282 -62
  276. package/src/tools/subagent/SubagentExecutor.ts +6 -0
  277. package/src/types/graph.ts +3 -0
  278. package/src/types/run.ts +3 -0
  279. package/src/types/tools.ts +3 -0
  280. package/src/utils/tokens.ts +28 -2
@@ -1,5 +1,5 @@
1
- import type { HostFileService, HostFileServiceDescriptor } from './files';
2
- import type { ExecutionIdentity } from './identity';
1
+ import type { HostFileService, HostFileServiceDescriptor } from './files.js';
2
+ import type { ExecutionIdentity } from './identity.js';
3
3
  /** Share across bindings in the host's quota scope. Hung storage retains its slot and byte reservation. */
4
4
  export declare class HostFileAdmission {
5
5
  private operations;
@@ -1,4 +1,4 @@
1
- import type { HostFileStageRequest } from './files';
1
+ import type { HostFileStageRequest } from './files.js';
2
2
  /** Single-consumer, bounded upload. Cleanup is owned by the operation, not the transport. */
3
3
  export declare function createFileUpload(source: AsyncIterable<Uint8Array>, request: Pick<HostFileStageRequest, 'bytes' | 'sha256'>, maxChunkBytes: number, signal?: AbortSignal, hash?: boolean): {
4
4
  content: AsyncIterable<Uint8Array>;
@@ -1,7 +1,7 @@
1
1
  import type { EventHandler, LCTool, ToolCallRequest, ToolExecuteBatchRequest, ToolExecuteResult } from '../types/index.js';
2
- import type { ExecutionIdentity } from './identity';
3
- export { snapshotExecutionIdentity } from './identity';
4
- export type { ExecutionIdentity } from './identity';
2
+ import type { ExecutionIdentity } from './identity.js';
3
+ export { snapshotExecutionIdentity } from './identity.js';
4
+ export type { ExecutionIdentity } from './identity.js';
5
5
  /** A host reference selects an authorized implementation, not a URL or executable name. */
6
6
  export interface HostToolDescriptor {
7
7
  definition: LCTool;
@@ -48,16 +48,16 @@ export declare function createHostToolBindings(options: {
48
48
  tools: readonly HostToolDescriptor[];
49
49
  service: HostToolService;
50
50
  }): HostToolBindings;
51
- export { createHostProviderTextService, createHostProviderTextProtection, } from './providerText';
52
- export type { HostProviderTextDescriptor, HostProviderTextRequest, HostProviderTextService, } from './providerText';
53
- export { HostChatModel, HostModelServiceError } from './model';
51
+ export { createHostProviderTextService, createHostProviderTextProtection, } from './providerText.js';
52
+ export type { HostProviderTextDescriptor, HostProviderTextRequest, HostProviderTextService, } from './providerText.js';
53
+ export { HostChatModel, HostModelServiceError } from './model.js';
54
54
  export type { ModelInvocationContext } from '../llm/invocation.js';
55
- export type { HostModelDescriptor, HostModelRequest, HostModelService, HostModelToolChoice, HostModelErrorCode, } from './model';
56
- export { createHostModelService, HostModelAdmission } from './modelService';
57
- export type { HostModelLimits } from './modelService';
58
- export { createHostFileService, HostFileAdmission } from './fileService';
59
- export type { HostFileStore } from './fileService';
60
- export { createHostFileBindings } from './fileBindings';
61
- export type { HostFileBindings } from './fileBindings';
62
- export { HostFileServiceError, hostFileDescriptorSchema, hostFileServiceDescriptorSchema, hostFileReadRequestSchema, hostFileStageRequestSchema, hostFilePublishRequestSchema, } from './files';
63
- export type { HostFileDescriptor, HostFileServiceDescriptor, HostFileService, HostFileReadRequest, HostFileStageRequest, HostFilePublishRequest, HostFileChunk, HostFilePublication, HostFileErrorCode, } from './files';
55
+ export type { HostModelDescriptor, HostModelRequest, HostModelService, HostModelToolChoice, HostModelErrorCode, } from './model.js';
56
+ export { createHostModelService, HostModelAdmission } from './modelService.js';
57
+ export type { HostModelLimits } from './modelService.js';
58
+ export { createHostFileService, HostFileAdmission } from './fileService.js';
59
+ export type { HostFileStore } from './fileService.js';
60
+ export { createHostFileBindings } from './fileBindings.js';
61
+ export type { HostFileBindings } from './fileBindings.js';
62
+ export { HostFileServiceError, hostFileDescriptorSchema, hostFileServiceDescriptorSchema, hostFileReadRequestSchema, hostFileStageRequestSchema, hostFilePublishRequestSchema, } from './files.js';
63
+ export type { HostFileDescriptor, HostFileServiceDescriptor, HostFileService, HostFileReadRequest, HostFileStageRequest, HostFilePublishRequest, HostFileChunk, HostFilePublication, HostFileErrorCode, } from './files.js';
@@ -9,7 +9,7 @@ import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager
9
9
  import type { Runnable } from '@langchain/core/runnables';
10
10
  import type { ChatResult } from '@langchain/core/outputs';
11
11
  import type { ModelInvocationContext } from '../llm/invocation.js';
12
- import type { ExecutionIdentity } from './identity';
12
+ import type { ExecutionIdentity } from './identity.js';
13
13
  import { PreparedSubagentError } from '../tools/preparedSubagents.js';
14
14
  import { StreamLimitExceededError } from '../llm/streamLimits.js';
15
15
  type FunctionTool = ReturnType<typeof convertToOpenAITool>;
@@ -1,7 +1,7 @@
1
1
  import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
- import type { HostModelDescriptor, HostModelService } from './model';
4
- import type { ExecutionIdentity } from './identity';
3
+ import type { HostModelDescriptor, HostModelService } from './model.js';
4
+ import type { ExecutionIdentity } from './identity.js';
5
5
  interface ModelLease {
6
6
  charge(bytes: number): void;
7
7
  retain(): void;
@@ -1,7 +1,7 @@
1
1
  import { AIMessageChunk } from '@langchain/core/messages';
2
2
  import type { UsageMetadata } from '@langchain/core/messages';
3
3
  import type { RunnableConfig } from '@langchain/core/runnables';
4
- import type { HostModelErrorCode } from './model';
4
+ import type { HostModelErrorCode } from './model.js';
5
5
  /** Observes native completion; only synthesizes an end when iterator return bypasses it. */
6
6
  export declare function modelStreamCallbacks(model: object, config: RunnableConfig): {
7
7
  config: RunnableConfig;
@@ -1,6 +1,6 @@
1
1
  import type { ProviderTextAdmission } from '../protection/providerTextAdmission.js';
2
2
  import type { ProviderTextProtection } from '../protection/providerText.js';
3
- import type { ExecutionIdentity } from './identity';
3
+ import type { ExecutionIdentity } from './identity.js';
4
4
  /** Host-owned limits, negotiated before executing a graph. Contains no credentials or callbacks. */
5
5
  export type HostProviderTextDescriptor = Pick<ProviderTextProtection, 'version' | 'timeoutMs' | 'maxAttemptBytes' | 'maxBufferedBytes'>;
6
6
  export interface HostProviderTextRequest {
@@ -3,6 +3,6 @@
3
3
  * and re-export from the top-level types barrel; runtime helpers (like
4
4
  * `askUserQuestion()`) live here.
5
5
  */
6
- export { askUserQuestion } from './askUserQuestion';
7
- export { askUserQuestions } from './askUserQuestions';
8
- export { ASK_USER_QUESTION_ID_PATTERN, isAskUserQuestionsInterrupt, MAX_ASK_USER_QUESTIONS, } from './askUserQuestionsInterrupt';
6
+ export { askUserQuestion } from './askUserQuestion.js';
7
+ export { askUserQuestions } from './askUserQuestions.js';
8
+ export { ASK_USER_QUESTION_ID_PATTERN, isAskUserQuestionsInterrupt, MAX_ASK_USER_QUESTIONS, } from './askUserQuestionsInterrupt.js';
@@ -1,4 +1,4 @@
1
- import type { HookEvent, HookMatcher, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult } from './types';
1
+ import type { HookEvent, HookMatcher, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult } from './types.js';
2
2
  /**
3
3
  * Snapshot of a halt request raised by a hook returning
4
4
  * `preventContinuation: true`. The SDK's run loop polls for this between
@@ -9,7 +9,7 @@
9
9
  * the cross-walk and `docs/hooks-design-report.md` for the broader hook
10
10
  * system context.
11
11
  */
12
- import type { HookCallback } from './types';
12
+ import type { HookCallback } from './types.js';
13
13
  /**
14
14
  * Permission mode controlling how tool calls that match no rule are
15
15
  * resolved. Mirrors Claude Code's `permissionMode`.
@@ -46,7 +46,7 @@
46
46
  * },
47
47
  * // …with the hook installed and humanInTheLoop.enabled = true.
48
48
  */
49
- import type { HookCallback } from './types';
49
+ import type { HookCallback } from './types.js';
50
50
  /**
51
51
  * What to do when a tool call references a path outside the workspace.
52
52
  *
@@ -1,6 +1,6 @@
1
1
  import type { Logger } from 'winston';
2
- import type { HookInput, ToolApprovalReplayKey, AggregatedHookResult } from './types';
3
- import type { HookRegistry } from './HookRegistry';
2
+ import type { HookInput, ToolApprovalReplayKey, AggregatedHookResult } from './types.js';
3
+ import type { HookRegistry } from './HookRegistry.js';
4
4
  /** Default per-hook timeout when a matcher doesn't set its own. */
5
5
  export declare const DEFAULT_HOOK_TIMEOUT_MS = 30000;
6
6
  /**
@@ -1,6 +1,6 @@
1
- export { HookRegistry } from './HookRegistry';
2
- export type { HookHaltSignal } from './HookRegistry';
3
- export { executeHooks, mergeAggregatedHookResults, DEFAULT_HOOK_TIMEOUT_MS, } from './executeHooks';
1
+ export { HookRegistry } from './HookRegistry.js';
2
+ export type { HookHaltSignal } from './HookRegistry.js';
3
+ export { executeHooks, mergeAggregatedHookResults, DEFAULT_HOOK_TIMEOUT_MS, } from './executeHooks.js';
4
4
  /**
5
5
  * Feature probe for hosts: hook outputs support `injectedMessages`
6
6
  * (per-message graph-state injection at the `PostToolBatch` boundary).
@@ -39,13 +39,13 @@ export declare const HOOK_STOP_CONTINUATION_CAPABLE = true;
39
39
  * exactly the window users reach for it most.
40
40
  */
41
41
  export declare const HOOK_PREEMPT_RESTART_CAPABLE = true;
42
- export { matchesQuery, hasNestedQuantifier, MAX_PATTERN_LENGTH, MAX_CACHE_SIZE, } from './matchers';
43
- export { createToolPolicyHook } from './createToolPolicyHook';
44
- export type { ToolPolicyMode, ToolPolicyConfig } from './createToolPolicyHook';
45
- export { createWorkspacePolicyHook } from './createWorkspacePolicyHook';
46
- export type { OutsideAccessPolicy, WorkspacePolicyConfig, PathExtractor, } from './createWorkspacePolicyHook';
47
- export { HOOK_EVENTS, TOOL_APPROVAL_EXECUTION_SCOPE_CONFIG_KEY } from './types';
48
- export type { HookEvent, HookInput, HookOutput, HookCallback, HookMatcher, HooksByEvent, HookInputByEvent, HookOutputByEvent, BaseHookInput, BaseHookOutput, ToolDecision, StopDecision, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult, RunStartHookInput, UserPromptSubmitHookInput, PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput, PostToolBatchHookInput, PostToolBatchEntry, PreemptBoundaryHookInput, PermissionDeniedHookInput, SubagentStartHookInput, SubagentStopHookInput, StopHookInput, StopFinalizeHookInput, StopFailureHookInput, PreCompactHookInput, PostCompactHookInput, RunStartHookOutput, UserPromptSubmitHookOutput, PreToolUseHookOutput, PostToolUseHookOutput, PostToolUseFailureHookOutput, PostToolBatchHookOutput, PreemptBoundaryHookOutput, PermissionDeniedHookOutput, SubagentStartHookOutput, SubagentStopHookOutput, StopHookOutput, StopFinalizeHookOutput, StopFailureHookOutput, PreCompactHookOutput, PostCompactHookOutput, } from './types';
49
- export type { ExecuteHooksOptions } from './executeHooks';
42
+ export { matchesQuery, hasNestedQuantifier, MAX_PATTERN_LENGTH, MAX_CACHE_SIZE, } from './matchers.js';
43
+ export { createToolPolicyHook } from './createToolPolicyHook.js';
44
+ export type { ToolPolicyMode, ToolPolicyConfig } from './createToolPolicyHook.js';
45
+ export { createWorkspacePolicyHook } from './createWorkspacePolicyHook.js';
46
+ export type { OutsideAccessPolicy, WorkspacePolicyConfig, PathExtractor, } from './createWorkspacePolicyHook.js';
47
+ export { HOOK_EVENTS, TOOL_APPROVAL_EXECUTION_SCOPE_CONFIG_KEY } from './types.js';
48
+ export type { HookEvent, HookInput, HookOutput, HookCallback, HookMatcher, HooksByEvent, HookInputByEvent, HookOutputByEvent, BaseHookInput, BaseHookOutput, ToolDecision, StopDecision, ToolApprovalReplayKey, ToolApprovalReplaySnapshot, AggregatedHookResult, RunStartHookInput, UserPromptSubmitHookInput, PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput, PostToolBatchHookInput, PostToolBatchEntry, PreemptBoundaryHookInput, PermissionDeniedHookInput, SubagentStartHookInput, SubagentStopHookInput, StopHookInput, StopFinalizeHookInput, StopFailureHookInput, PreCompactHookInput, PostCompactHookInput, RunStartHookOutput, UserPromptSubmitHookOutput, PreToolUseHookOutput, PostToolUseHookOutput, PostToolUseFailureHookOutput, PostToolBatchHookOutput, PreemptBoundaryHookOutput, PermissionDeniedHookOutput, SubagentStartHookOutput, SubagentStopHookOutput, StopHookOutput, StopFinalizeHookOutput, StopFailureHookOutput, PreCompactHookOutput, PostCompactHookOutput, } from './types.js';
49
+ export type { ExecuteHooksOptions } from './executeHooks.js';
50
50
  /** Hosts may opt into stable generation scopes across every ToolNode interrupt type. */
51
51
  export declare const TOOL_APPROVAL_EXECUTION_SCOPE_CAPABLE = true;
@@ -1,38 +1,38 @@
1
- export * from './run';
2
- export * from './stream';
3
- export * from './events';
4
- export * from './messages';
5
- export { LANGFUSE_OBSERVATION_METADATA_ARTIFACT_KEY } from './langfuseToolOutputTracing';
6
- export * from './graphs';
7
- export * from './agents/projection';
8
- export * from './summarization';
9
- export * from './tools/Calculator';
10
- export * from './tools/GitHubCompare';
11
- export * from './tools/CodeExecutor';
12
- export * from './tools/BashExecutor';
13
- export * from './tools/ProgrammaticToolCalling';
14
- export * from './tools/BashProgrammaticToolCalling';
15
- export * from './tools/SkillTool';
16
- export * from './tools/SubagentTool';
17
- export * from './tools/subagent';
18
- export * from './tools/ReadFile';
19
- export * from './tools/skillCatalog';
20
- export * from './tools/ToolSearch';
21
- export * from './tools/ToolNode';
22
- export * from './tools/intentArg';
23
- export * from './tools/schema';
24
- export * from './tools/handlers';
25
- export * from './tools/local';
26
- export * from './tools/cloudflare';
27
- export * from './tools/search';
28
- export * from './common';
29
- export * from './utils';
30
- export * from './hooks';
31
- export * from './session';
32
- export * from './eventActor';
33
- export * from './hitl';
34
- export type * from './types';
35
- export * from './langchain';
1
+ export * from './run.js';
2
+ export * from './stream.js';
3
+ export * from './events.js';
4
+ export * from './messages/index.js';
5
+ export { LANGFUSE_OBSERVATION_METADATA_ARTIFACT_KEY } from './langfuseToolOutputTracing.js';
6
+ export * from './graphs/index.js';
7
+ export * from './agents/projection.js';
8
+ export * from './summarization/index.js';
9
+ export * from './tools/Calculator.js';
10
+ export * from './tools/GitHubCompare.js';
11
+ export * from './tools/CodeExecutor.js';
12
+ export * from './tools/BashExecutor.js';
13
+ export * from './tools/ProgrammaticToolCalling.js';
14
+ export * from './tools/BashProgrammaticToolCalling.js';
15
+ export * from './tools/SkillTool.js';
16
+ export * from './tools/SubagentTool.js';
17
+ export * from './tools/subagent/index.js';
18
+ export * from './tools/ReadFile.js';
19
+ export * from './tools/skillCatalog.js';
20
+ export * from './tools/ToolSearch.js';
21
+ export * from './tools/ToolNode.js';
22
+ export * from './tools/intentArg.js';
23
+ export * from './tools/schema.js';
24
+ export * from './tools/handlers.js';
25
+ export * from './tools/local/index.js';
26
+ export * from './tools/cloudflare/index.js';
27
+ export * from './tools/search/index.js';
28
+ export * from './common/index.js';
29
+ export * from './utils/index.js';
30
+ export * from './hooks/index.js';
31
+ export * from './session/index.js';
32
+ export * from './eventActor/index.js';
33
+ export * from './hitl/index.js';
34
+ export type * from './types/index.js';
35
+ export * from './langchain/index.js';
36
36
  /**
37
37
  * HITL primitives re-exported from `@langchain/langgraph` so hosts that
38
38
  * build durable checkpoint savers, dispatch `Command({ resume })`, or
@@ -41,31 +41,33 @@ export * from './langchain';
41
41
  */
42
42
  export { Command, INTERRUPT, interrupt, MemorySaver, BaseCheckpointSaver, isInterrupted, } from '@langchain/langgraph';
43
43
  export type { Interrupt } from '@langchain/langgraph';
44
- export { markTokenCounterCacheCompatible } from './llm/tokenCounterCacheCompatibility';
44
+ export { markTokenCounterCacheCompatible } from './llm/tokenCounterCacheCompatibility.js';
45
45
  /** Provider chat-model classes moved off the root barrel: importing any of them here
46
46
  * forced every host to pay that provider SDK's module init at boot. They remain
47
47
  * available from their own entries, e.g. `@librechat/agents/llm/openai`. */
48
- export type { OpenRouterReasoning, OpenRouterReasoningEffort, ChatOpenRouterCallOptions, } from './llm/openrouter';
49
- export { getChatModelClass } from './llm/providers';
50
- export { registerProvider } from './provider-registration';
51
- export type { ProviderFamily, ProviderRegistrationOptions, } from './provider-registration';
52
- export { smoothStream, resolveStreamDelay, DEFAULT_STREAM_DELAY, computeAdaptivePieceSize, } from './llm/stream/smoother';
53
- export type { SmoothItem, SmoothPiece } from './llm/stream/smoother';
54
- export { FakeChatModel, createFakeStreamingLLM } from './llm/fake';
55
- export { initializeModel } from './llm/init';
56
- export { attemptInvoke, tryFallbackProviders } from './llm/invoke';
57
- export { prepareProviderRequest } from './llm/prepareProviderRequest';
58
- export type { PreparedProviderRequest, PrepareProviderRequestParams, ProviderMessageProjectionMode, ProviderPayloadMeasurement, ProviderRequestContext, } from './llm/prepareProviderRequest';
59
- export { canSealPreempt } from './llm/preempt';
60
- export { isThinkingEnabled, getMaxOutputTokensKey } from './llm/request';
61
- export { DEFAULT_MAX_TOOL_CALL_ARG_BYTES, StreamLimitExceededError, resolveStreamLimits, } from './llm/streamLimits';
62
- export type { StreamedToolCallArgTally, ResolvedStreamLimits, StreamLimitState, StreamLimitKind, } from './llm/streamLimits';
63
- export * from './decisions';
64
- export * from './rerank';
65
- export { PROVIDER_TEXT_PROTECTION_VERSION, ProviderTextProtectionError, serializeProviderTextProtectionError, deserializeProviderTextProtectionError, } from './protection/providerText';
66
- export type { ProviderTextProtection, ProviderTextProtectionResult, ProviderTextProtectionErrorCode, ProviderTextProtectionFailure, } from './protection/providerText';
67
- export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './llm/google/utils/signatures';
68
- export type { GeminiReplayPart } from './llm/google/utils/signatures';
69
- export * from './harness';
70
- export { ProviderTextAdmission } from './protection/providerTextAdmission';
71
- export type { ProviderTextAdmissionLimits, ProviderTextAdmissionSnapshot, } from './protection/providerTextAdmission';
48
+ export type { OpenRouterReasoning, OpenRouterReasoningEffort, ChatOpenRouterCallOptions, } from './llm/openrouter/index.js';
49
+ export { getChatModelClass } from './llm/providers.js';
50
+ export { registerProvider } from './provider-registration.js';
51
+ export type { ProviderFamily, ProviderRegistrationOptions, } from './provider-registration.js';
52
+ export { smoothStream, resolveStreamDelay, DEFAULT_STREAM_DELAY, computeAdaptivePieceSize, } from './llm/stream/smoother.js';
53
+ export type { SmoothItem, SmoothPiece } from './llm/stream/smoother.js';
54
+ export { FakeChatModel, createFakeStreamingLLM } from './llm/fake.js';
55
+ export { initializeModel } from './llm/init.js';
56
+ export { attemptInvoke, tryFallbackProviders } from './llm/invoke.js';
57
+ export { prepareProviderRequest } from './llm/prepareProviderRequest.js';
58
+ export type { PreparedProviderRequest, PrepareProviderRequestParams, ProviderMessageProjectionMode, ProviderPayloadMeasurement, ProviderRequestContext, } from './llm/prepareProviderRequest.js';
59
+ export { canSealPreempt } from './llm/preempt.js';
60
+ export { isThinkingEnabled, getMaxOutputTokensKey } from './llm/request.js';
61
+ export { DEFAULT_MAX_TOOL_CALL_ARG_BYTES, StreamLimitExceededError, resolveStreamLimits, } from './llm/streamLimits.js';
62
+ export type { StreamedToolCallArgTally, ResolvedStreamLimits, StreamLimitState, StreamLimitKind, } from './llm/streamLimits.js';
63
+ export * from './decisions/index.js';
64
+ export * from './rerank/index.js';
65
+ export { PROVIDER_TEXT_PROTECTION_VERSION, ProviderTextProtectionError, serializeProviderTextProtectionError, deserializeProviderTextProtectionError, } from './protection/providerText.js';
66
+ export type { ProviderTextProtection, ProviderTextProtectionResult, ProviderTextProtectionErrorCode, ProviderTextProtectionFailure, } from './protection/providerText.js';
67
+ export { TOOL_RESULT_PROTECTION_VERSION, ToolResultProtectionError, } from './protection/toolResult.js';
68
+ export type { ToolResultProtection, ToolResultProtectionResult, } from './protection/toolResult.js';
69
+ export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './llm/google/utils/signatures.js';
70
+ export type { GeminiReplayPart } from './llm/google/utils/signatures.js';
71
+ export * from './harness/index.js';
72
+ export { ProviderTextAdmission } from './protection/providerTextAdmission.js';
73
+ export type { ProviderTextAdmissionLimits, ProviderTextAdmissionSnapshot, } from './protection/providerTextAdmission.js';
@@ -1,8 +1,8 @@
1
- export * from './messages';
2
- export * from './prompts';
3
- export * from './runnables';
4
- export * from './tools';
5
- export * from './google-common';
6
- export * from './language_models/chat_models';
7
- export * from './messages/tool';
8
- export * from './openai';
1
+ export * from './messages.js';
2
+ export * from './prompts.js';
3
+ export * from './runnables.js';
4
+ export * from './tools.js';
5
+ export * from './google-common.js';
6
+ export * from './language_models/chat_models.js';
7
+ export * from './messages/tool.js';
8
+ export * from './openai.js';
@@ -0,0 +1,4 @@
1
+ import type { BaseMessage } from '@langchain/core/messages';
2
+ export declare function withCurrentTurnContainer<T extends {
3
+ container?: string;
4
+ }>(messages: readonly BaseMessage[], options: T): T;
@@ -1,6 +1,6 @@
1
1
  import { ToolCall } from '@langchain/core/messages/tool';
2
2
  import { type BaseMessage } from '@langchain/core/messages';
3
- import { AnthropicMessageCreateParams, AnthropicToolResponse } from '../types';
3
+ import { AnthropicMessageCreateParams, AnthropicToolResponse } from '../types.js';
4
4
  /**
5
5
  * Normalize a tool-call ID to satisfy Anthropic's `^[a-zA-Z0-9_-]+$` and 64-char
6
6
  * constraints. Pure and deterministic — same input always yields the same output,
@@ -3,7 +3,7 @@ import { AIMessageChunk } from '@langchain/core/messages';
3
3
  import type { UsageMetadata } from '@langchain/core/messages';
4
4
  import type { ChatGeneration } from '@langchain/core/outputs';
5
5
  import type Anthropic from '@anthropic-ai/sdk';
6
- import type { AnthropicMessageResponse } from '../types';
6
+ import type { AnthropicMessageResponse } from '../types.js';
7
7
  export interface AnthropicUsageData {
8
8
  input_tokens?: number | null;
9
9
  output_tokens?: number | null;
@@ -4,7 +4,7 @@
4
4
  * @module
5
5
  */
6
6
  import type { ChatModelStreamEvent } from '@langchain/core/language_models/event';
7
- import type { AnthropicMessageStreamEvent } from '../types';
7
+ import type { AnthropicMessageStreamEvent } from '../types.js';
8
8
  interface AnthropicStreamErrorEvent {
9
9
  type: 'error';
10
10
  error: {
@@ -146,9 +146,8 @@ export declare class CustomChatBedrockConverse extends ChatBedrockConverse {
146
146
  _generateNonStreaming(messages: BaseMessage[], options: this['ParsedCallOptions'] & CustomChatBedrockConverseCallOptions, runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
147
147
  /**
148
148
  * Non-streaming Converse through this package's converter, as the stream already uses.
149
- * The parent's converter replays reasoning and sends harmony control tokens as written,
150
- * both of which OpenAI models on Bedrock fail on, and it cannot strip a trailing
151
- * assistant prefill that Claude 4.6 and later reject.
149
+ * The parent's converter cannot omit unsupported reasoning replay, neutralize
150
+ * OpenAI Harmony tokens, or strip unsupported Claude assistant prefill.
152
151
  */
153
152
  private generateWithLocalConverter;
154
153
  /**
@@ -15,7 +15,7 @@
15
15
  * tolerated inside the match and kept.
16
16
  */
17
17
  import type { ConverseStreamCommandInput } from '@aws-sdk/client-bedrock-runtime';
18
- import type { BedrockMessage, BedrockSystemContentBlock } from '../types';
18
+ import type { BedrockMessage, BedrockSystemContentBlock } from '../types.js';
19
19
  /** The text with every harmony control token rendered inert; the same string when none. */
20
20
  export declare function neutralizeHarmonyControlTokens(text: string): string;
21
21
  type ToolConfiguration = NonNullable<ConverseStreamCommandInput['toolConfig']>;
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Bedrock Converse utility exports.
3
3
  */
4
- export { convertToConverseMessages, extractImageInfo, langchainReasoningBlockToBedrockReasoningBlock, concatenateLangchainReasoningBlocks, } from './message_inputs';
5
- export { convertConverseMessageToLangChainMessage, createConverseToolUseStopChunk, handleConverseStreamContentBlockStart, handleConverseStreamContentBlockDelta, handleConverseStreamMetadata, bedrockReasoningBlockToLangchainReasoningBlock, bedrockReasoningDeltaToLangchainPartialReasoningBlock, } from './message_outputs';
4
+ export { convertToConverseMessages, extractImageInfo, langchainReasoningBlockToBedrockReasoningBlock, concatenateLangchainReasoningBlocks, } from './message_inputs.js';
5
+ export { convertConverseMessageToLangChainMessage, createConverseToolUseStopChunk, handleConverseStreamContentBlockStart, handleConverseStreamContentBlockDelta, handleConverseStreamMetadata, bedrockReasoningBlockToLangchainReasoningBlock, bedrockReasoningDeltaToLangchainPartialReasoningBlock, } from './message_outputs.js';
@@ -3,7 +3,7 @@
3
3
  * Ported from @langchain/aws common.js
4
4
  */
5
5
  import { type BaseMessage, MessageContentComplex } from '@langchain/core/messages';
6
- import type { BedrockMessage, BedrockSystemContentBlock, BedrockContentBlock, MessageContentReasoningBlock } from '../types';
6
+ import type { BedrockMessage, BedrockSystemContentBlock, BedrockContentBlock, MessageContentReasoningBlock } from '../types.js';
7
7
  /**
8
8
  * Convert a LangChain reasoning block to a Bedrock reasoning block.
9
9
  */
@@ -30,18 +30,9 @@ export interface ConvertToConverseMessagesOptions {
30
30
  */
31
31
  model?: string;
32
32
  }
33
- /**
34
- * Whether the model is an identified OpenAI model on Bedrock (`openai.*`, a geo/global
35
- * inference profile such as `global.openai.*`, or an ARN naming one). Missing model IDs and
36
- * opaque resource ARNs are not identified.
37
- */
33
+ /** Identifies OpenAI models on Bedrock, including named inference profiles. */
38
34
  export declare function isBedrockOpenAIModel(model?: string): boolean;
39
- /**
40
- * OpenAI Bedrock models reject prior `reasoningContent`, including on Claude-to-GPT handoffs.
41
- * Only suppress replay for identified OpenAI targets; other model families retain the existing
42
- * behavior because their Bedrock reasoning-replay requirements have not been verified here.
43
- * Missing model IDs and opaque resource ARNs also retain the existing behavior.
44
- */
35
+ /** OpenAI and Grok 4.7 reject prior reasoning; opaque resources keep replay. */
45
36
  export declare function replaysBedrockReasoning(model?: string): boolean;
46
37
  /**
47
38
  * Convert LangChain messages to Bedrock Converse messages.
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { ChatGenerationChunk } from '@langchain/core/outputs';
6
6
  import { AIMessage } from '@langchain/core/messages';
7
- import type { BedrockMessage, ConverseResponse, ContentBlockDeltaEvent, ConverseStreamMetadataEvent, ContentBlockStartEvent, ReasoningContentBlock, ReasoningContentBlockDelta, MessageContentReasoningBlock, MessageContentReasoningBlockReasoningTextPartial, MessageContentReasoningBlockRedacted } from '../types';
7
+ import type { BedrockMessage, ConverseResponse, ContentBlockDeltaEvent, ConverseStreamMetadataEvent, ContentBlockStartEvent, ReasoningContentBlock, ReasoningContentBlockDelta, MessageContentReasoningBlock, MessageContentReasoningBlockReasoningTextPartial, MessageContentReasoningBlockRedacted } from '../types.js';
8
8
  /**
9
9
  * Convert a Bedrock reasoning block delta to a LangChain partial reasoning block.
10
10
  */
@@ -27,5 +27,5 @@ export declare class CustomChatGoogleGenerativeAI extends ChatGoogleGenerativeAI
27
27
  _streamResponseChunks(messages: BaseMessage[], options: this['ParsedCallOptions'], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
28
28
  private _streamProviderChunks;
29
29
  }
30
- export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './utils/signatures';
31
- export type { GeminiReplayPart } from './utils/signatures';
30
+ export { GEMINI_PARTS, GEMINI_REPLAY_UNSUPPORTED, captureGeminiReplayParts, restoreGeminiReplayParts, isGeminiReplayParts, } from './utils/signatures.js';
31
+ export type { GeminiReplayPart } from './utils/signatures.js';
@@ -2,7 +2,7 @@ import { ChatGenerationChunk } from '@langchain/core/outputs';
2
2
  import { BaseMessage, UsageMetadata } from '@langchain/core/messages';
3
3
  import { POSSIBLE_ROLES, type Part, type Content, type GenerateContentResponse, type EnhancedGenerateContentResponse, type FunctionDeclarationsTool as GoogleGenerativeAIFunctionDeclarationsTool } from '@google/generative-ai';
4
4
  import type { ChatResult } from '@langchain/core/outputs';
5
- import { GoogleGenerativeAIToolType } from '../types';
5
+ import { GoogleGenerativeAIToolType } from '../types.js';
6
6
  export declare const _FUNCTION_CALL_THOUGHT_SIGNATURES_MAP_KEY = "__gemini_function_call_thought_signatures__";
7
7
  type GoogleResponse = GenerateContentResponse & Partial<EnhancedGenerateContentResponse>;
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { ToolChoice } from '@langchain/core/language_models/chat_models';
2
2
  import { Tool as GenerativeAITool, ToolConfig } from '@google/generative-ai';
3
- import { GoogleGenerativeAIToolType } from '../types';
3
+ import { GoogleGenerativeAIToolType } from '../types.js';
4
4
  export declare function convertToolsToGenAI(tools: GoogleGenerativeAIToolType[], extra?: {
5
5
  toolChoice?: ToolChoice;
6
6
  allowedFunctionNames?: string[];
@@ -11,7 +11,7 @@ import type { ChatResult } from '@langchain/core/outputs';
11
11
  import type { ChatXAIInput } from '@langchain/xai';
12
12
  import type * as t from '@langchain/openai';
13
13
  import type { SmoothItem } from '../stream/smoother.js';
14
- import type { HeaderValue, HeadersLike } from './types';
14
+ import type { HeaderValue, HeadersLike } from './types.js';
15
15
  import type { PromptCacheTtl } from '../../messages/cache.js';
16
16
  export declare function isHeaders(headers: unknown): headers is Headers;
17
17
  export declare function normalizeHeaders(headers: HeadersLike): Record<string, HeaderValue | readonly HeaderValue[]>;
@@ -1,5 +1,5 @@
1
1
  import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
2
- import type { ProviderFamily, ProviderRegistrationOptions } from '../provider-registration';
2
+ import type { ProviderFamily, ProviderRegistrationOptions } from '../provider-registration.js';
3
3
  import type { ProviderModelConstructor, ProviderName } from '../types/index.js';
4
4
  type ProviderModelClass = new (config: never) => BaseChatModel;
5
5
  /** Registers one host provider until the returned disposer is called. */
@@ -1,4 +1,4 @@
1
1
  import type { ProviderModelConstructor, ProviderName } from '../types/index.js';
2
2
  export declare const getChatModelClass: <P extends ProviderName>(provider: P) => ProviderModelConstructor<P>;
3
3
  export { getProviderFamily, providerRequiresStrictAlternation, providerUsesManualToolStream, registerProvider, } from './providerRegistry.js';
4
- export type { ProviderFamily, ProviderRegistrationOptions, } from '../provider-registration';
4
+ export type { ProviderFamily, ProviderRegistrationOptions, } from '../provider-registration.js';
@@ -0,0 +1,13 @@
1
+ export declare const ANTHROPIC_SERVER_TOOL_NAMES_BY_RESULT_TYPE: {
2
+ readonly advisor_tool_result: readonly ["advisor"];
3
+ readonly bash_code_execution_tool_result: readonly ["bash_code_execution"];
4
+ readonly code_execution_tool_result: readonly ["code_execution"];
5
+ readonly text_editor_code_execution_tool_result: readonly ["text_editor_code_execution"];
6
+ readonly tool_search_tool_result: readonly ["tool_search_tool_regex", "tool_search_tool_bm25"];
7
+ readonly web_fetch_tool_result: readonly ["web_fetch"];
8
+ readonly web_search_tool_result: readonly ["web_search"];
9
+ };
10
+ type AnthropicServerToolResultType = keyof typeof ANTHROPIC_SERVER_TOOL_NAMES_BY_RESULT_TYPE;
11
+ export declare const ANTHROPIC_SERVER_TOOL_RESULT_TYPES: AnthropicServerToolResultType[];
12
+ export declare function isAnthropicServerToolResultType(type: string | undefined): type is AnthropicServerToolResultType;
13
+ export {};
@@ -13,7 +13,7 @@
13
13
  * they fit; oversized inline payloads are replaced with bounded placeholders.
14
14
  */
15
15
  import { type BaseMessage } from '@langchain/core/messages';
16
- import type { ContextPruningSettings } from './contextPruningSettings';
16
+ import type { ContextPruningSettings } from './contextPruningSettings.js';
17
17
  import type { ContextPruningConfig } from '../types/graph.js';
18
18
  import type { TokenCounter } from '../types/run.js';
19
19
  export interface ContextPruningResult {
@@ -1,6 +1,6 @@
1
1
  import { AIMessage, BaseMessage, ToolMessage, HumanMessage, AIMessageChunk } from '@langchain/core/messages';
2
+ import type { ToolHistoryPreparation } from './toolHistoryProjection.js';
2
3
  import type * as t from '../types/index.js';
3
- import type { ToolHistoryPreparation } from './toolHistoryProjection';
4
4
  export declare function getConverseOverrideMessage({ userMessage, lastMessageX, lastMessageY, }: {
5
5
  userMessage: string[];
6
6
  lastMessageX: AIMessageChunk | null;
@@ -20,15 +20,15 @@ export declare function getConverseOverrideMessage({ userMessage, lastMessageX,
20
20
  * Exact matching prevents unrelated custom block types that happen to share a
21
21
  * prefix from being silently classified as hidden reasoning.
22
22
  */
23
- export { isReasoningContentBlock } from './reasoningTypes';
23
+ export { isReasoningContentBlock } from './reasoningTypes.js';
24
24
  export declare function modifyDeltaProperties(provider: t.ProviderName, obj?: AIMessageChunk): AIMessageChunk | undefined;
25
25
  export declare function formatAnthropicMessage(message: AIMessageChunk): AIMessage;
26
26
  export declare function convertMessagesToContent(messages: BaseMessage[]): t.MessageContentComplex[];
27
27
  type ResponsesReplayProjection = 'fallback' | 'native';
28
- export { OPENAI_RESPONSES_REPLAY_POSITIONS_KEY } from './toolHistoryProjection';
28
+ export { OPENAI_RESPONSES_REPLAY_POSITIONS_KEY } from './toolHistoryProjection.js';
29
29
  /** Reasoning item currently streaming, so a terminal ciphertext seals against its own id. */
30
30
  export declare const OPENAI_RESPONSES_ACTIVE_REASONING_ID_KEY = "__openai_responses_active_reasoning_id__";
31
- export type { ResponsesReplayPosition } from './toolHistoryProjection';
31
+ export type { ResponsesReplayPosition } from './toolHistoryProjection.js';
32
32
  /** Drops incomplete streamed text blocks before provider-facing tool shaping. */
33
33
  export declare function dropIncompleteToolStreamContent(content: AIMessage['content']): AIMessage['content'];
34
34
  /** Applies sealed-Responses safety and drops incomplete streamed text input. */
@@ -2,7 +2,7 @@ import { AIMessage, ToolMessage, BaseMessage, HumanMessage, SystemMessage } from
2
2
  import type { MessageContentImageUrl } from '@langchain/core/messages';
3
3
  import type { RunnableConfig } from '@langchain/core/runnables';
4
4
  import type { MessageContentComplex, TPayload, ProviderName, CompactionSemanticIndex, CompactionSemanticIndexSnapshot } from '../types/index.js';
5
- import type { ToolHistoryPreparation } from './toolHistoryProjection';
5
+ import type { ToolHistoryPreparation } from './toolHistoryProjection.js';
6
6
  import { Providers } from '../common/index.js';
7
7
  interface MediaMessageParams {
8
8
  message: {