@librechat/agents 4.2.9 → 4.2.11

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 (340) hide show
  1. package/dist/cjs/agents/AgentContext.cjs +32 -2
  2. package/dist/cjs/agents/AgentContext.cjs.map +1 -1
  3. package/dist/cjs/harness/fileBindings.cjs +93 -0
  4. package/dist/cjs/harness/fileBindings.cjs.map +1 -0
  5. package/dist/cjs/harness/fileService.cjs +141 -0
  6. package/dist/cjs/harness/fileService.cjs.map +1 -0
  7. package/dist/cjs/harness/fileStream.cjs +76 -0
  8. package/dist/cjs/harness/fileStream.cjs.map +1 -0
  9. package/dist/cjs/harness/files.cjs +106 -0
  10. package/dist/cjs/harness/files.cjs.map +1 -0
  11. package/dist/cjs/harness/index.cjs +3 -0
  12. package/dist/cjs/harness/index.cjs.map +1 -1
  13. package/dist/cjs/llm/google/utils/signatures.cjs +5 -3
  14. package/dist/cjs/llm/google/utils/signatures.cjs.map +1 -1
  15. package/dist/cjs/main.cjs +13 -0
  16. package/dist/cjs/runtime/admission.cjs +135 -0
  17. package/dist/cjs/runtime/admission.cjs.map +1 -0
  18. package/dist/cjs/runtime/checkpoint.cjs +40 -0
  19. package/dist/cjs/runtime/checkpoint.cjs.map +1 -0
  20. package/dist/cjs/runtime/client.cjs +435 -0
  21. package/dist/cjs/runtime/client.cjs.map +1 -0
  22. package/dist/cjs/runtime/files.cjs +301 -0
  23. package/dist/cjs/runtime/files.cjs.map +1 -0
  24. package/dist/cjs/runtime/hostTools.cjs +165 -0
  25. package/dist/cjs/runtime/hostTools.cjs.map +1 -0
  26. package/dist/cjs/runtime/index.cjs +11 -0
  27. package/dist/cjs/runtime/model.cjs +303 -0
  28. package/dist/cjs/runtime/model.cjs.map +1 -0
  29. package/dist/cjs/runtime/peer.cjs +209 -0
  30. package/dist/cjs/runtime/peer.cjs.map +1 -0
  31. package/dist/cjs/runtime/policy.cjs +77 -0
  32. package/dist/cjs/runtime/policy.cjs.map +1 -0
  33. package/dist/cjs/runtime/recovery/client.cjs +172 -0
  34. package/dist/cjs/runtime/recovery/client.cjs.map +1 -0
  35. package/dist/cjs/runtime/recovery/log.cjs +47 -0
  36. package/dist/cjs/runtime/recovery/log.cjs.map +1 -0
  37. package/dist/cjs/runtime/recovery/redis.cjs +239 -0
  38. package/dist/cjs/runtime/recovery/redis.cjs.map +1 -0
  39. package/dist/cjs/runtime/recovery/server.cjs +190 -0
  40. package/dist/cjs/runtime/recovery/server.cjs.map +1 -0
  41. package/dist/cjs/runtime/recovery/socket.cjs +298 -0
  42. package/dist/cjs/runtime/recovery/socket.cjs.map +1 -0
  43. package/dist/cjs/runtime/resume.cjs +115 -0
  44. package/dist/cjs/runtime/resume.cjs.map +1 -0
  45. package/dist/cjs/runtime/sealed.cjs +107 -0
  46. package/dist/cjs/runtime/sealed.cjs.map +1 -0
  47. package/dist/cjs/runtime/server.cjs +415 -0
  48. package/dist/cjs/runtime/server.cjs.map +1 -0
  49. package/dist/cjs/runtime/snapshot.cjs +61 -0
  50. package/dist/cjs/runtime/snapshot.cjs.map +1 -0
  51. package/dist/cjs/runtime/types.cjs +20 -0
  52. package/dist/cjs/runtime/types.cjs.map +1 -0
  53. package/dist/cjs/runtime/wire.cjs +84 -0
  54. package/dist/cjs/runtime/wire.cjs.map +1 -0
  55. package/dist/cjs/tools/BashProgrammaticToolCalling.cjs +3 -2
  56. package/dist/cjs/tools/BashProgrammaticToolCalling.cjs.map +1 -1
  57. package/dist/cjs/tools/ProgrammaticCallerPolicy.cjs +24 -1
  58. package/dist/cjs/tools/ProgrammaticCallerPolicy.cjs.map +1 -1
  59. package/dist/cjs/tools/ProgrammaticToolCalling.cjs +3 -2
  60. package/dist/cjs/tools/ProgrammaticToolCalling.cjs.map +1 -1
  61. package/dist/cjs/tools/local/LocalProgrammaticToolCalling.cjs +2 -1
  62. package/dist/cjs/tools/local/LocalProgrammaticToolCalling.cjs.map +1 -1
  63. package/dist/cjs/tools/subagent/SubagentExecutor.cjs +15 -3
  64. package/dist/cjs/tools/subagent/SubagentExecutor.cjs.map +1 -1
  65. package/dist/cjs/tools/subagent/childGraphConfig.cjs +13 -1
  66. package/dist/cjs/tools/subagent/childGraphConfig.cjs.map +1 -1
  67. package/dist/cjs/tools/subagent/hostArgs.cjs +2 -0
  68. package/dist/cjs/tools/subagent/hostArgs.cjs.map +1 -1
  69. package/dist/esm/agents/AgentContext.mjs +32 -2
  70. package/dist/esm/agents/AgentContext.mjs.map +1 -1
  71. package/dist/esm/harness/fileBindings.mjs +93 -0
  72. package/dist/esm/harness/fileBindings.mjs.map +1 -0
  73. package/dist/esm/harness/fileService.mjs +140 -0
  74. package/dist/esm/harness/fileService.mjs.map +1 -0
  75. package/dist/esm/harness/fileStream.mjs +76 -0
  76. package/dist/esm/harness/fileStream.mjs.map +1 -0
  77. package/dist/esm/harness/files.mjs +97 -0
  78. package/dist/esm/harness/files.mjs.map +1 -0
  79. package/dist/esm/harness/index.mjs +3 -0
  80. package/dist/esm/harness/index.mjs.map +1 -1
  81. package/dist/esm/llm/google/utils/signatures.mjs +5 -3
  82. package/dist/esm/llm/google/utils/signatures.mjs.map +1 -1
  83. package/dist/esm/main.mjs +5 -2
  84. package/dist/esm/runtime/admission.mjs +133 -0
  85. package/dist/esm/runtime/admission.mjs.map +1 -0
  86. package/dist/esm/runtime/checkpoint.mjs +39 -0
  87. package/dist/esm/runtime/checkpoint.mjs.map +1 -0
  88. package/dist/esm/runtime/client.mjs +432 -0
  89. package/dist/esm/runtime/client.mjs.map +1 -0
  90. package/dist/esm/runtime/files.mjs +299 -0
  91. package/dist/esm/runtime/files.mjs.map +1 -0
  92. package/dist/esm/runtime/hostTools.mjs +164 -0
  93. package/dist/esm/runtime/hostTools.mjs.map +1 -0
  94. package/dist/esm/runtime/index.mjs +5 -0
  95. package/dist/esm/runtime/model.mjs +301 -0
  96. package/dist/esm/runtime/model.mjs.map +1 -0
  97. package/dist/esm/runtime/peer.mjs +209 -0
  98. package/dist/esm/runtime/peer.mjs.map +1 -0
  99. package/dist/esm/runtime/policy.mjs +75 -0
  100. package/dist/esm/runtime/policy.mjs.map +1 -0
  101. package/dist/esm/runtime/recovery/client.mjs +172 -0
  102. package/dist/esm/runtime/recovery/client.mjs.map +1 -0
  103. package/dist/esm/runtime/recovery/log.mjs +46 -0
  104. package/dist/esm/runtime/recovery/log.mjs.map +1 -0
  105. package/dist/esm/runtime/recovery/redis.mjs +239 -0
  106. package/dist/esm/runtime/recovery/redis.mjs.map +1 -0
  107. package/dist/esm/runtime/recovery/server.mjs +189 -0
  108. package/dist/esm/runtime/recovery/server.mjs.map +1 -0
  109. package/dist/esm/runtime/recovery/socket.mjs +297 -0
  110. package/dist/esm/runtime/recovery/socket.mjs.map +1 -0
  111. package/dist/esm/runtime/resume.mjs +111 -0
  112. package/dist/esm/runtime/resume.mjs.map +1 -0
  113. package/dist/esm/runtime/sealed.mjs +106 -0
  114. package/dist/esm/runtime/sealed.mjs.map +1 -0
  115. package/dist/esm/runtime/server.mjs +413 -0
  116. package/dist/esm/runtime/server.mjs.map +1 -0
  117. package/dist/esm/runtime/snapshot.mjs +60 -0
  118. package/dist/esm/runtime/snapshot.mjs.map +1 -0
  119. package/dist/esm/runtime/types.mjs +19 -0
  120. package/dist/esm/runtime/types.mjs.map +1 -0
  121. package/dist/esm/runtime/wire.mjs +80 -0
  122. package/dist/esm/runtime/wire.mjs.map +1 -0
  123. package/dist/esm/tools/BashProgrammaticToolCalling.mjs +3 -2
  124. package/dist/esm/tools/BashProgrammaticToolCalling.mjs.map +1 -1
  125. package/dist/esm/tools/ProgrammaticCallerPolicy.mjs +24 -1
  126. package/dist/esm/tools/ProgrammaticCallerPolicy.mjs.map +1 -1
  127. package/dist/esm/tools/ProgrammaticToolCalling.mjs +3 -2
  128. package/dist/esm/tools/ProgrammaticToolCalling.mjs.map +1 -1
  129. package/dist/esm/tools/local/LocalProgrammaticToolCalling.mjs +2 -1
  130. package/dist/esm/tools/local/LocalProgrammaticToolCalling.mjs.map +1 -1
  131. package/dist/esm/tools/subagent/SubagentExecutor.mjs +15 -3
  132. package/dist/esm/tools/subagent/SubagentExecutor.mjs.map +1 -1
  133. package/dist/esm/tools/subagent/childGraphConfig.mjs +13 -1
  134. package/dist/esm/tools/subagent/childGraphConfig.mjs.map +1 -1
  135. package/dist/esm/tools/subagent/hostArgs.mjs +2 -1
  136. package/dist/esm/tools/subagent/hostArgs.mjs.map +1 -1
  137. package/dist/types/agents/AgentContext.d.ts +4 -4
  138. package/dist/types/agents/projection.d.ts +1 -1
  139. package/dist/types/events.d.ts +2 -2
  140. package/dist/types/graphs/Graph.d.ts +13 -13
  141. package/dist/types/graphs/MultiAgentGraph.d.ts +2 -2
  142. package/dist/types/graphs/acceptedModelResponse.d.ts +1 -1
  143. package/dist/types/graphs/createGraph.d.ts +4 -4
  144. package/dist/types/graphs/graphFactory.d.ts +1 -1
  145. package/dist/types/graphs/handoff.d.ts +1 -1
  146. package/dist/types/harness/fileBindings.d.ts +13 -0
  147. package/dist/types/harness/fileService.d.ts +37 -0
  148. package/dist/types/harness/fileStream.d.ts +7 -0
  149. package/dist/types/harness/files.d.ts +108 -0
  150. package/dist/types/harness/index.d.ts +8 -2
  151. package/dist/types/harness/model.d.ts +3 -3
  152. package/dist/types/harness/providerText.d.ts +2 -2
  153. package/dist/types/hitl/approvalReview.d.ts +1 -1
  154. package/dist/types/hitl/askUserQuestion.d.ts +1 -1
  155. package/dist/types/hitl/askUserQuestions.d.ts +1 -1
  156. package/dist/types/hitl/askUserQuestionsInterrupt.d.ts +1 -1
  157. package/dist/types/hooks/types.d.ts +2 -2
  158. package/dist/types/instrumentation.d.ts +1 -1
  159. package/dist/types/langfuse.d.ts +3 -3
  160. package/dist/types/langfuseConfig.d.ts +2 -2
  161. package/dist/types/langfuseRuntimeContext.d.ts +1 -1
  162. package/dist/types/langfuseRuntimeScope.d.ts +2 -2
  163. package/dist/types/langfuseSpanRegistry.d.ts +1 -1
  164. package/dist/types/langfuseToolOutputTracing.d.ts +3 -3
  165. package/dist/types/llm/anthropic/index.d.ts +1 -1
  166. package/dist/types/llm/bedrock/index.d.ts +1 -1
  167. package/dist/types/llm/bedrock/toolCache.d.ts +2 -2
  168. package/dist/types/llm/contextOverflowRecovery.d.ts +2 -2
  169. package/dist/types/llm/contextPressureMeter.d.ts +2 -2
  170. package/dist/types/llm/google/index.d.ts +1 -1
  171. package/dist/types/llm/init.d.ts +1 -1
  172. package/dist/types/llm/invoke.d.ts +9 -9
  173. package/dist/types/llm/mistral/index.d.ts +1 -1
  174. package/dist/types/llm/openai/index.d.ts +2 -2
  175. package/dist/types/llm/openrouter/index.d.ts +2 -2
  176. package/dist/types/llm/openrouter/toolCache.d.ts +2 -2
  177. package/dist/types/llm/prepareProviderRequest.d.ts +3 -3
  178. package/dist/types/llm/promptCacheTools.d.ts +1 -1
  179. package/dist/types/llm/providerRegistry.d.ts +1 -1
  180. package/dist/types/llm/providerTextBoundary.d.ts +2 -2
  181. package/dist/types/llm/providerTextControls.d.ts +1 -1
  182. package/dist/types/llm/providers.d.ts +2 -2
  183. package/dist/types/llm/request.d.ts +1 -1
  184. package/dist/types/llm/stream/chunkAdapters.d.ts +1 -1
  185. package/dist/types/llm/streamLimits.d.ts +1 -1
  186. package/dist/types/llm/truncation.d.ts +1 -1
  187. package/dist/types/llm/vertexai/index.d.ts +1 -1
  188. package/dist/types/messages/alternation.d.ts +1 -1
  189. package/dist/types/messages/anthropicToolCache.d.ts +2 -2
  190. package/dist/types/messages/assistantPhase.d.ts +3 -3
  191. package/dist/types/messages/budget.d.ts +1 -1
  192. package/dist/types/messages/cache.d.ts +1 -1
  193. package/dist/types/messages/contextPruning.d.ts +2 -2
  194. package/dist/types/messages/core.d.ts +1 -1
  195. package/dist/types/messages/fading.d.ts +1 -1
  196. package/dist/types/messages/format.d.ts +2 -2
  197. package/dist/types/messages/ids.d.ts +2 -2
  198. package/dist/types/messages/injected.d.ts +1 -1
  199. package/dist/types/messages/langchain.d.ts +1 -1
  200. package/dist/types/messages/prune.d.ts +4 -4
  201. package/dist/types/messages/recency.d.ts +1 -1
  202. package/dist/types/messages/toolResultTypes.d.ts +1 -1
  203. package/dist/types/openai/arguments.d.ts +1 -1
  204. package/dist/types/openai/index.d.ts +1 -1
  205. package/dist/types/openai/toolProjection.d.ts +1 -1
  206. package/dist/types/prompts/activityLabel.d.ts +2 -2
  207. package/dist/types/prompts/reasoningLabel.d.ts +1 -1
  208. package/dist/types/rerank/search.d.ts +1 -1
  209. package/dist/types/responses/index.d.ts +1 -1
  210. package/dist/types/run.d.ts +3 -3
  211. package/dist/types/runtime/admission.d.ts +30 -0
  212. package/dist/types/runtime/checkpoint.d.ts +14 -0
  213. package/dist/types/runtime/client.d.ts +12 -0
  214. package/dist/types/runtime/files.d.ts +75 -0
  215. package/dist/types/runtime/hostTools.d.ts +22 -0
  216. package/dist/types/runtime/identity.d.ts +2 -0
  217. package/dist/types/runtime/index.d.ts +12 -0
  218. package/dist/types/runtime/model.d.ts +42 -0
  219. package/dist/types/runtime/peer.d.ts +55 -0
  220. package/dist/types/runtime/policy.d.ts +43 -0
  221. package/dist/types/runtime/recovery/client.d.ts +12 -0
  222. package/dist/types/runtime/recovery/journal.d.ts +62 -0
  223. package/dist/types/runtime/recovery/log.d.ts +9 -0
  224. package/dist/types/runtime/recovery/redis.d.ts +17 -0
  225. package/dist/types/runtime/recovery/server.d.ts +37 -0
  226. package/dist/types/runtime/recovery/socket.d.ts +72 -0
  227. package/dist/types/runtime/resume.d.ts +66 -0
  228. package/dist/types/runtime/sealed.d.ts +19 -0
  229. package/dist/types/runtime/server.d.ts +21 -0
  230. package/dist/types/runtime/snapshot.d.ts +12 -0
  231. package/dist/types/runtime/types.d.ts +125 -0
  232. package/dist/types/runtime/wire.d.ts +3 -0
  233. package/dist/types/session/handlers.d.ts +1 -1
  234. package/dist/types/session/types.d.ts +1 -1
  235. package/dist/types/stream.d.ts +3 -3
  236. package/dist/types/summarization/index.d.ts +1 -1
  237. package/dist/types/summarization/input.d.ts +1 -1
  238. package/dist/types/summarization/node.d.ts +6 -6
  239. package/dist/types/summarization/retry.d.ts +2 -2
  240. package/dist/types/summarization/semanticIndex.d.ts +2 -2
  241. package/dist/types/summarization/toolBudget.d.ts +1 -1
  242. package/dist/types/summarization/usage.d.ts +1 -1
  243. package/dist/types/tools/ArtifactDelivery.d.ts +1 -1
  244. package/dist/types/tools/ArtifactTruncation.d.ts +1 -1
  245. package/dist/types/tools/BashExecutor.d.ts +2 -2
  246. package/dist/types/tools/BashProgrammaticToolCalling.d.ts +2 -2
  247. package/dist/types/tools/CallerCapabilities.d.ts +1 -1
  248. package/dist/types/tools/CodeExecutor.d.ts +4 -4
  249. package/dist/types/tools/CodeSessionFileSummary.d.ts +1 -1
  250. package/dist/types/tools/ProgrammaticCallerPolicy.d.ts +2 -1
  251. package/dist/types/tools/ProgrammaticToolCalling.d.ts +2 -2
  252. package/dist/types/tools/ReadFile.d.ts +1 -1
  253. package/dist/types/tools/SkillTool.d.ts +1 -1
  254. package/dist/types/tools/SubagentTool.d.ts +3 -3
  255. package/dist/types/tools/ToolNode.d.ts +5 -5
  256. package/dist/types/tools/ToolSearch.d.ts +2 -2
  257. package/dist/types/tools/cloudflare/CloudflareBridgeRuntime.d.ts +1 -1
  258. package/dist/types/tools/cloudflare/CloudflareProgrammaticToolCalling.d.ts +1 -1
  259. package/dist/types/tools/cloudflare/CloudflareSandboxExecutionEngine.d.ts +2 -2
  260. package/dist/types/tools/cloudflare/CloudflareSandboxTools.d.ts +1 -1
  261. package/dist/types/tools/diagnostics.d.ts +1 -1
  262. package/dist/types/tools/eagerEventExecution.d.ts +1 -1
  263. package/dist/types/tools/handlers.d.ts +3 -3
  264. package/dist/types/tools/intentArg.d.ts +1 -1
  265. package/dist/types/tools/local/CompileCheckTool.d.ts +2 -2
  266. package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
  267. package/dist/types/tools/local/LocalCodingTools.d.ts +2 -2
  268. package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
  269. package/dist/types/tools/local/LocalExecutionTools.d.ts +1 -1
  270. package/dist/types/tools/local/LocalProgrammaticToolCalling.d.ts +1 -1
  271. package/dist/types/tools/local/bashAst.d.ts +1 -1
  272. package/dist/types/tools/local/resolveLocalExecutionTools.d.ts +1 -1
  273. package/dist/types/tools/local/syntaxCheck.d.ts +1 -1
  274. package/dist/types/tools/ptcTimeout.d.ts +1 -1
  275. package/dist/types/tools/runStepResume.d.ts +1 -1
  276. package/dist/types/tools/schema.d.ts +1 -1
  277. package/dist/types/tools/search/anthropic.d.ts +1 -1
  278. package/dist/types/tools/skillCatalog.d.ts +1 -1
  279. package/dist/types/tools/subagent/InMemorySubagentTaskStore.d.ts +1 -1
  280. package/dist/types/tools/subagent/SubagentExecutor.d.ts +5 -5
  281. package/dist/types/tools/subagent/SubagentReplay.d.ts +3 -3
  282. package/dist/types/tools/subagent/childGraphConfig.d.ts +2 -2
  283. package/dist/types/tools/subagent/diagnostics.d.ts +2 -2
  284. package/dist/types/tools/subagent/hostArgs.d.ts +8 -2
  285. package/dist/types/tools/subagent/index.d.ts +1 -1
  286. package/dist/types/tools/toolBatchReplay.d.ts +3 -3
  287. package/dist/types/types/activityLabel.d.ts +2 -2
  288. package/dist/types/types/graph.d.ts +16 -13
  289. package/dist/types/types/llm.d.ts +9 -9
  290. package/dist/types/types/reasoningLabel.d.ts +1 -1
  291. package/dist/types/types/run.d.ts +8 -8
  292. package/dist/types/types/stream.d.ts +5 -5
  293. package/dist/types/types/summarize.d.ts +2 -2
  294. package/dist/types/types/tools.d.ts +8 -8
  295. package/dist/types/utils/errors.d.ts +1 -1
  296. package/dist/types/utils/events.d.ts +3 -3
  297. package/dist/types/utils/handlers.d.ts +3 -3
  298. package/dist/types/utils/llm.d.ts +2 -2
  299. package/dist/types/utils/llmConfig.d.ts +1 -1
  300. package/dist/types/utils/title.d.ts +1 -1
  301. package/dist/types/utils/toolSessions.d.ts +1 -1
  302. package/package.json +22 -3
  303. package/src/agents/AgentContext.ts +68 -2
  304. package/src/harness/fileBindings.ts +156 -0
  305. package/src/harness/fileService.ts +217 -0
  306. package/src/harness/fileStream.ts +99 -0
  307. package/src/harness/files.ts +185 -0
  308. package/src/harness/index.ts +24 -0
  309. package/src/llm/google/utils/signatures.ts +10 -3
  310. package/src/runtime/admission.ts +224 -0
  311. package/src/runtime/checkpoint.ts +66 -0
  312. package/src/runtime/client.ts +674 -0
  313. package/src/runtime/files.ts +503 -0
  314. package/src/runtime/hostTools.ts +243 -0
  315. package/src/runtime/identity.ts +3 -0
  316. package/src/runtime/index.ts +33 -0
  317. package/src/runtime/model.ts +452 -0
  318. package/src/runtime/peer.ts +262 -0
  319. package/src/runtime/policy.ts +150 -0
  320. package/src/runtime/recovery/client.ts +232 -0
  321. package/src/runtime/recovery/journal.ts +88 -0
  322. package/src/runtime/recovery/log.ts +70 -0
  323. package/src/runtime/recovery/redis.ts +342 -0
  324. package/src/runtime/recovery/server.ts +280 -0
  325. package/src/runtime/recovery/socket.ts +422 -0
  326. package/src/runtime/resume.ts +268 -0
  327. package/src/runtime/sealed.ts +144 -0
  328. package/src/runtime/server.ts +653 -0
  329. package/src/runtime/snapshot.ts +87 -0
  330. package/src/runtime/types.ts +184 -0
  331. package/src/runtime/wire.ts +96 -0
  332. package/src/tools/BashProgrammaticToolCalling.ts +5 -2
  333. package/src/tools/ProgrammaticCallerPolicy.ts +42 -3
  334. package/src/tools/ProgrammaticToolCalling.ts +4 -1
  335. package/src/tools/local/LocalProgrammaticToolCalling.ts +4 -0
  336. package/src/tools/subagent/SubagentExecutor.ts +98 -32
  337. package/src/tools/subagent/childGraphConfig.ts +33 -1
  338. package/src/tools/subagent/hostArgs.ts +7 -0
  339. package/src/tools/subagent/index.ts +1 -0
  340. package/src/types/graph.ts +6 -3
@@ -1,10 +1,10 @@
1
1
  import { SystemMessage } from '@langchain/core/messages';
2
2
  import type { UsageMetadata, BaseMessage, BaseMessageLike } from '@langchain/core/messages';
3
3
  import type { RunnableConfig, Runnable } from '@langchain/core/runnables';
4
- import type { ExactTokenCountCache } from '@/llm/contextPressureMeter';
5
- import type * as t from '@/types';
6
- import { createPruneMessages } from '@/messages';
7
- import { ContentTypes } from '@/common';
4
+ import type { ExactTokenCountCache } from '../llm/contextPressureMeter.js';
5
+ import type * as t from '../types/index.js';
6
+ import { createPruneMessages } from '../messages/index.js';
7
+ import { ContentTypes } from '../common/index.js';
8
8
  /**
9
9
  * Encapsulates agent-specific state that can vary between agents in a multi-agent system
10
10
  */
@@ -1,5 +1,5 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type * as t from '@/types';
2
+ import type * as t from '../types/index.js';
3
3
  export interface ProjectAgentContextUsageParams {
4
4
  /** Same `AgentInputs` a run is built from (instructions, tools, model, window). */
5
5
  agent: t.AgentInputs;
@@ -1,7 +1,7 @@
1
1
  import type { BaseMessageFields, UsageMetadata } from '@langchain/core/messages';
2
2
  import type { Logger } from 'winston';
3
- import type { MultiAgentGraph, StandardGraph } from '@/graphs';
4
- import type * as t from '@/types';
3
+ import type { MultiAgentGraph, StandardGraph } from './graphs/index.js';
4
+ import type * as t from './types/index.js';
5
5
  export declare class HandlerRegistry {
6
6
  private handlers;
7
7
  register(eventType: string, handler: t.EventHandler): void;
@@ -3,20 +3,20 @@ import { RunnableConfig } from '@langchain/core/runnables';
3
3
  import type { UsageMetadata, BaseMessage } from '@langchain/core/messages';
4
4
  import type { BaseChannel, OverwriteValue } from '@langchain/langgraph';
5
5
  import type { ToolCall } from '@langchain/core/messages/tool';
6
- import type { SubagentGraphResumeState, SubagentToolNodeResumeState } from '@/tools/subagent/SubagentReplay';
7
- import type { ResolvedStreamLimits, RunBreakerScope, StreamedToolCallArgTally, StreamDeltaEventTally } from '@/llm/streamLimits';
8
- import type { GraphFactoryDependencies } from '@/graphs/graphFactory';
6
+ import type { SubagentGraphResumeState, SubagentToolNodeResumeState } from '../tools/subagent/SubagentReplay.js';
7
+ import type { ResolvedStreamLimits, RunBreakerScope, StreamedToolCallArgTally, StreamDeltaEventTally } from '../llm/streamLimits.js';
8
+ import type { GraphFactoryDependencies } from './graphFactory.js';
9
9
  import type { HandoffRouting } from './handoff';
10
- import type { HookRegistry } from '@/hooks';
11
- import type * as t from '@/types';
12
- import { StreamLimitExceededError } from '@/llm/streamLimits';
13
- import { SubagentExecutor } from '@/tools/subagent';
14
- import { ProviderTextProtectionError } from '@/protection/providerText';
15
- import { ToolOutputReferenceRegistry } from '@/tools/toolOutputReferences';
16
- import { PreparedSubagents, PreparedSubagentError } from '@/tools/preparedSubagents';
17
- import { ToolNode as CustomToolNode } from '@/tools/ToolNode';
18
- import { AgentContext } from '@/agents/AgentContext';
19
- import { HandlerRegistry } from '@/events';
10
+ import type { HookRegistry } from '../hooks/index.js';
11
+ import type * as t from '../types/index.js';
12
+ import { StreamLimitExceededError } from '../llm/streamLimits.js';
13
+ import { SubagentExecutor } from '../tools/subagent/index.js';
14
+ import { ProviderTextProtectionError } from '../protection/providerText.js';
15
+ import { ToolOutputReferenceRegistry } from '../tools/toolOutputReferences.js';
16
+ import { PreparedSubagents, PreparedSubagentError } from '../tools/preparedSubagents.js';
17
+ import { ToolNode as CustomToolNode } from '../tools/ToolNode.js';
18
+ import { AgentContext } from '../agents/AgentContext.js';
19
+ import { HandlerRegistry } from '../events.js';
20
20
  type RunStepStateChannel = BaseChannel<t.RunStepResumeState, t.RunStepResumeState | OverwriteValue<t.RunStepResumeState>>;
21
21
  export declare abstract class Graph<T extends t.BaseGraphState = t.BaseGraphState, _TNodeName extends string = string> {
22
22
  abstract resetValues(keepContent?: boolean, checkpointScope?: string): void;
@@ -1,5 +1,5 @@
1
- import type { GraphFactoryDependencies } from '@/graphs/graphFactory';
2
- import type * as t from '@/types';
1
+ import type { GraphFactoryDependencies } from './graphFactory.js';
2
+ import type * as t from '../types/index.js';
3
3
  import { StandardGraph } from './Graph';
4
4
  /**
5
5
  * MultiAgentGraph extends StandardGraph to support dynamic multi-agent workflows
@@ -1,5 +1,5 @@
1
1
  import type { AIMessageChunk } from '@langchain/core/messages';
2
- import type { ModelResponseEvent } from '@/types';
2
+ import type { ModelResponseEvent } from '../types/index.js';
3
3
  export declare class InvalidModelToolCallError extends Error {
4
4
  constructor(message: string);
5
5
  }
@@ -1,7 +1,7 @@
1
- import type { GraphFactoryRequest } from '@/graphs/graphFactory';
2
- import type { MultiAgentGraphInput, StandardGraphInput } from '@/types';
3
- import { MultiAgentGraph } from '@/graphs/MultiAgentGraph';
4
- import { StandardGraph } from '@/graphs/Graph';
1
+ import type { GraphFactoryRequest } from './graphFactory.js';
2
+ import type { MultiAgentGraphInput, StandardGraphInput } from '../types/index.js';
3
+ import { MultiAgentGraph } from './MultiAgentGraph.js';
4
+ import { StandardGraph } from './Graph.js';
5
5
  export declare function createGraph(request: {
6
6
  kind: 'standard';
7
7
  input: StandardGraphInput;
@@ -1,5 +1,5 @@
1
1
  import type { StandardGraph } from './Graph';
2
- import type * as t from '@/types';
2
+ import type * as t from '../types/index.js';
3
3
  export type GraphFactoryRequest = {
4
4
  kind: 'standard';
5
5
  input: t.StandardGraphInput;
@@ -1,7 +1,7 @@
1
1
  import { Command } from '@langchain/langgraph';
2
2
  import type { BaseChannel, OverwriteValue } from '@langchain/langgraph';
3
3
  import type { RunnableConfig } from '@langchain/core/runnables';
4
- import type { BaseGraphState, HandoffOutcome, HandoffState, HandoffTransition } from '@/types/graph';
4
+ import type { BaseGraphState, HandoffOutcome, HandoffState, HandoffTransition } from '../types/graph.js';
5
5
  export type HandoffRequest = Pick<HandoffTransition, 'sourceAgentId' | 'targetAgentId' | 'toolCallId' | 'scope'>;
6
6
  /** Union by identity makes checkpoint replay idempotent and parallel merges commutative. */
7
7
  export declare function mergeHandoffState(current: HandoffState | undefined, update: HandoffState | undefined): HandoffState | undefined;
@@ -0,0 +1,13 @@
1
+ import type { HostFileDescriptor, HostFileStageRequest, HostFilePublication, HostFileServiceDescriptor, HostFileService } from './files';
2
+ import type { ExecutionIdentity } from './identity';
3
+ export interface HostFileBindings {
4
+ read(file: HostFileDescriptor, signal?: AbortSignal): AsyncIterable<Uint8Array>;
5
+ stage(artifact: Omit<HostFileStageRequest, 'version' | 'identity'>, content: AsyncIterable<Uint8Array>, signal?: AbortSignal): Promise<HostFileDescriptor>;
6
+ publish(file: HostFileDescriptor, operationId: string, signal?: AbortSignal): Promise<HostFilePublication>;
7
+ }
8
+ /** Pull-based graph adapter; at most one range or upload chunk is requested at a time. */
9
+ export declare function createHostFileBindings(options: {
10
+ identity: Readonly<ExecutionIdentity>;
11
+ descriptor: HostFileServiceDescriptor;
12
+ service: HostFileService;
13
+ }): HostFileBindings;
@@ -0,0 +1,37 @@
1
+ import type { HostFileService, HostFileServiceDescriptor } from './files';
2
+ import type { ExecutionIdentity } from './identity';
3
+ /** Share across bindings in the host's quota scope. Hung storage retains its slot and byte reservation. */
4
+ export declare class HostFileAdmission {
5
+ private operations;
6
+ private bytes;
7
+ private readonly maxConcurrentOperations;
8
+ private readonly maxBufferedBytes;
9
+ constructor(limits: {
10
+ maxConcurrentOperations: number;
11
+ maxBufferedBytes: number;
12
+ });
13
+ snapshot(): Readonly<{
14
+ operations: number;
15
+ reservedBytes: number;
16
+ }>;
17
+ /** @internal Reservations are released only when storage and input cleanup settle. */
18
+ acquire(bytes: number): () => void;
19
+ }
20
+ /**
21
+ * The host adapter owns canonical ACL/revision checks on every operation, durable operation-ID
22
+ * reconciliation, private staging/cleanup, and publication through the native file pipeline.
23
+ * A request identity is asserted against the authenticated binding before any adapter call.
24
+ */
25
+ export type HostFileStore = Omit<HostFileService, 'version'>;
26
+ export declare function createHostFileService(options: {
27
+ identity: Readonly<ExecutionIdentity>;
28
+ descriptor: HostFileServiceDescriptor;
29
+ store: HostFileStore;
30
+ admission: HostFileAdmission;
31
+ timeoutMs: number;
32
+ /** Lifetime of the authenticated execution, independent of individual RPC cancellation. */
33
+ signal?: AbortSignal;
34
+ }): {
35
+ descriptor: HostFileServiceDescriptor;
36
+ service: HostFileService;
37
+ };
@@ -0,0 +1,7 @@
1
+ import type { HostFileStageRequest } from './files';
2
+ /** Single-consumer, bounded upload. Cleanup is owned by the operation, not the transport. */
3
+ export declare function createFileUpload(source: AsyncIterable<Uint8Array>, request: Pick<HostFileStageRequest, 'bytes' | 'sha256'>, maxChunkBytes: number, signal?: AbortSignal, hash?: boolean): {
4
+ content: AsyncIterable<Uint8Array>;
5
+ finish: () => string | undefined;
6
+ close: () => Promise<void>;
7
+ };
@@ -0,0 +1,108 @@
1
+ import { z } from 'zod';
2
+ /** Opaque host references and immutable revisions, never filesystem paths or signed URLs. */
3
+ export declare const hostFileDescriptorSchema: z.ZodObject<{
4
+ reference: z.ZodString;
5
+ revision: z.ZodString;
6
+ filename: z.ZodString;
7
+ mediaType: z.ZodString;
8
+ bytes: z.ZodNumber;
9
+ sha256: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export type HostFileDescriptor = Readonly<z.infer<typeof hostFileDescriptorSchema>>;
12
+ export declare const hostFileServiceDescriptorSchema: z.ZodObject<{
13
+ version: z.ZodLiteral<1>;
14
+ operations: z.ZodArray<z.ZodEnum<{
15
+ read: "read";
16
+ stage: "stage";
17
+ publish: "publish";
18
+ }>>;
19
+ maxFileBytes: z.ZodNumber;
20
+ maxChunkBytes: z.ZodNumber;
21
+ }, z.core.$strip>;
22
+ export type HostFileServiceDescriptor = Readonly<Omit<z.infer<typeof hostFileServiceDescriptorSchema>, 'operations'>> & {
23
+ readonly operations: readonly ('read' | 'stage' | 'publish')[];
24
+ };
25
+ export declare const hostFileReadRequestSchema: z.ZodObject<{
26
+ version: z.ZodLiteral<1>;
27
+ identity: z.ZodObject<{
28
+ runtimeId: z.ZodString;
29
+ agentId: z.ZodString;
30
+ runId: z.ZodString;
31
+ userId: z.ZodString;
32
+ tenantId: z.ZodOptional<z.ZodString>;
33
+ conversationId: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>;
35
+ reference: z.ZodString;
36
+ revision: z.ZodString;
37
+ offset: z.ZodNumber;
38
+ length: z.ZodNumber;
39
+ }, z.core.$strip>;
40
+ export declare const hostFileStageRequestSchema: z.ZodObject<{
41
+ version: z.ZodLiteral<1>;
42
+ identity: z.ZodObject<{
43
+ runtimeId: z.ZodString;
44
+ agentId: z.ZodString;
45
+ runId: z.ZodString;
46
+ userId: z.ZodString;
47
+ tenantId: z.ZodOptional<z.ZodString>;
48
+ conversationId: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ operationId: z.ZodString;
51
+ filename: z.ZodString;
52
+ mediaType: z.ZodString;
53
+ bytes: z.ZodNumber;
54
+ sha256: z.ZodOptional<z.ZodString>;
55
+ }, z.core.$strip>;
56
+ export declare const hostFilePublishRequestSchema: z.ZodObject<{
57
+ version: z.ZodLiteral<1>;
58
+ identity: z.ZodObject<{
59
+ runtimeId: z.ZodString;
60
+ agentId: z.ZodString;
61
+ runId: z.ZodString;
62
+ userId: z.ZodString;
63
+ tenantId: z.ZodOptional<z.ZodString>;
64
+ conversationId: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>;
66
+ operationId: z.ZodString;
67
+ reference: z.ZodString;
68
+ revision: z.ZodString;
69
+ }, z.core.$strip>;
70
+ export type HostFileReadRequest = Readonly<z.infer<typeof hostFileReadRequestSchema>>;
71
+ export type HostFileStageRequest = Readonly<z.infer<typeof hostFileStageRequestSchema>>;
72
+ export type HostFilePublishRequest = Readonly<z.infer<typeof hostFilePublishRequestSchema>>;
73
+ export interface HostFileChunk {
74
+ readonly reference: string;
75
+ readonly revision: string;
76
+ readonly offset: number;
77
+ readonly data: Uint8Array;
78
+ }
79
+ export interface HostFilePublication {
80
+ readonly operationId: string;
81
+ readonly file: HostFileDescriptor;
82
+ }
83
+ /**
84
+ * Authenticate the transport separately. Each operation must authorize the bound identity,
85
+ * reference and revision against canonical host storage. Staging is private; only publish
86
+ * enters the host's native attachment/event pipeline. Mutations are never automatically retried.
87
+ */
88
+ export interface HostFileService {
89
+ readonly version: 1;
90
+ read(request: HostFileReadRequest, signal?: AbortSignal): Promise<HostFileChunk>;
91
+ stage(request: HostFileStageRequest, content: AsyncIterable<Uint8Array>, signal?: AbortSignal): Promise<HostFileDescriptor>;
92
+ publish(request: HostFilePublishRequest, signal?: AbortSignal): Promise<HostFilePublication>;
93
+ }
94
+ declare const codes: readonly ["incompatible", "forbidden", "conflict", "overflow", "cancelled", "timeout", "unavailable"];
95
+ export type HostFileErrorCode = (typeof codes)[number];
96
+ export declare class HostFileServiceError extends Error {
97
+ readonly code: HostFileErrorCode;
98
+ constructor(code: HostFileErrorCode);
99
+ }
100
+ /** @internal Never forward adapter error text or abort reasons over the service boundary. */
101
+ export declare function normalizeHostFileError(error: unknown, signal?: AbortSignal): HostFileServiceError;
102
+ /** @internal Snapshot only public metadata, dropping host-specific fields. */
103
+ export declare function checkedHostFile(value: HostFileDescriptor): HostFileDescriptor;
104
+ /** @internal Reject mismatched/stale ranges before bytes enter a graph. */
105
+ export declare function checkedHostFileChunk(value: HostFileChunk, input: HostFileReadRequest): HostFileChunk;
106
+ /** @internal Negotiation validates limits before constructing any graph adapter. */
107
+ export declare function checkedHostFileService(value: HostFileServiceDescriptor): HostFileServiceDescriptor;
108
+ export {};
@@ -1,4 +1,4 @@
1
- import type { EventHandler, LCTool, ToolCallRequest, ToolExecuteBatchRequest, ToolExecuteResult } from '@/types';
1
+ import type { EventHandler, LCTool, ToolCallRequest, ToolExecuteBatchRequest, ToolExecuteResult } from '../types/index.js';
2
2
  import type { ExecutionIdentity } from './identity';
3
3
  export { snapshotExecutionIdentity } from './identity';
4
4
  export type { ExecutionIdentity } from './identity';
@@ -51,7 +51,13 @@ export declare function createHostToolBindings(options: {
51
51
  export { createHostProviderTextService, createHostProviderTextProtection, } from './providerText';
52
52
  export type { HostProviderTextDescriptor, HostProviderTextRequest, HostProviderTextService, } from './providerText';
53
53
  export { HostChatModel, HostModelServiceError } from './model';
54
- export type { ModelInvocationContext } from '@/llm/invocation';
54
+ export type { ModelInvocationContext } from '../llm/invocation.js';
55
55
  export type { HostModelDescriptor, HostModelRequest, HostModelService, HostModelToolChoice, HostModelErrorCode, } from './model';
56
56
  export { createHostModelService, HostModelAdmission } from './modelService';
57
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';
@@ -8,10 +8,10 @@ import type { BaseLanguageModelInput } from '@langchain/core/language_models/bas
8
8
  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
- import type { ModelInvocationContext } from '@/llm/invocation';
11
+ import type { ModelInvocationContext } from '../llm/invocation.js';
12
12
  import type { ExecutionIdentity } from './identity';
13
- import { PreparedSubagentError } from '@/tools/preparedSubagents';
14
- import { StreamLimitExceededError } from '@/llm/streamLimits';
13
+ import { PreparedSubagentError } from '../tools/preparedSubagents.js';
14
+ import { StreamLimitExceededError } from '../llm/streamLimits.js';
15
15
  type FunctionTool = ReturnType<typeof convertToOpenAITool>;
16
16
  /** Public configuration only. The authenticated host owns the actual model, credentials and callbacks. */
17
17
  export interface HostModelDescriptor {
@@ -1,5 +1,5 @@
1
- import type { ProviderTextAdmission } from '@/protection/providerTextAdmission';
2
- import type { ProviderTextProtection } from '@/protection/providerText';
1
+ import type { ProviderTextAdmission } from '../protection/providerTextAdmission.js';
2
+ import type { ProviderTextProtection } from '../protection/providerText.js';
3
3
  import type { ExecutionIdentity } from './identity';
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'>;
@@ -1,5 +1,5 @@
1
1
  import type { RunnableConfig } from '@langchain/core/runnables';
2
- import type { ToolApprovalInterruptPayload, ToolApprovalRequest, ToolApprovalReviewConfig } from '@/types/hitl';
2
+ import type { ToolApprovalInterruptPayload, ToolApprovalRequest, ToolApprovalReviewConfig } from '../types/hitl.js';
3
3
  /**
4
4
  * Private resume-only config entry populated from the checkpointed interrupt.
5
5
  * Hosts must never need to construct or inspect this value.
@@ -16,7 +16,7 @@
16
16
  * nodes (RunnableLambda, addNode callbacks) do not have that
17
17
  * constraint.
18
18
  */
19
- import type { AskUserQuestionRequest, AskUserQuestionResolution } from '@/types/hitl';
19
+ import type { AskUserQuestionRequest, AskUserQuestionResolution } from '../types/hitl.js';
20
20
  /**
21
21
  * Suspend the current graph node to ask the human a question. Returns
22
22
  * the host-supplied resolution after `Run.resume(resolution)` is
@@ -1,4 +1,4 @@
1
- import type { AskUserQuestionsRequest, AskUserQuestionsResolution } from '@/types/hitl';
1
+ import type { AskUserQuestionsRequest, AskUserQuestionsResolution } from '../types/hitl.js';
2
2
  /**
3
3
  * Suspend once to collect answers to several related questions. The first
4
4
  * question is also included in the legacy `question` field so existing hosts
@@ -1,4 +1,4 @@
1
- import type { AskUserQuestionRequest, AskUserQuestionsInterruptPayload } from '@/types/hitl';
1
+ import type { AskUserQuestionRequest, AskUserQuestionsInterruptPayload } from '../types/hitl.js';
2
2
  /** Maximum questions supported by one batched clarification interaction. */
3
3
  export declare const MAX_ASK_USER_QUESTIONS = 4;
4
4
  /** Safe identifier format for answer-map keys in a batched question. */
@@ -1,6 +1,6 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { SubagentExecutionContext } from '@/types/graph';
3
- import type { InjectedMessage } from '@/types/tools';
2
+ import type { SubagentExecutionContext } from '../types/graph.js';
3
+ import type { InjectedMessage } from '../types/tools.js';
4
4
  /**
5
5
  * Closed set of hook lifecycle events supported by the hooks system.
6
6
  *
@@ -1,5 +1,5 @@
1
1
  import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
2
- import type * as t from '@/types';
2
+ import type * as t from './types/index.js';
3
3
  export declare function ensureOpenTelemetryContextManager(): void;
4
4
  export declare function initializeLangfuseTracing(langfuse?: t.LangfuseConfig): BasicTracerProvider | undefined;
5
5
  export declare function initializeLangfuseTracingFromEnv(): BasicTracerProvider | undefined;
@@ -1,9 +1,9 @@
1
1
  import { CallbackHandler } from '@langfuse/langchain';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
3
  import type { SpanContext } from '@opentelemetry/api';
4
- import type { ResolvedLangfuseToolOutputTracingConfig } from '@/langfuseRuntimeContext';
5
- import type * as t from '@/types';
6
- import { hasLangfuseConfigCredentials, hasLangfuseEnvCredentials, hasLangfuseEnvConfig } from '@/langfuseConfig';
4
+ import type { ResolvedLangfuseToolOutputTracingConfig } from './langfuseRuntimeContext.js';
5
+ import type * as t from './types/index.js';
6
+ import { hasLangfuseConfigCredentials, hasLangfuseEnvCredentials, hasLangfuseEnvConfig } from './langfuseConfig.js';
7
7
  export { hasLangfuseConfigCredentials, hasLangfuseEnvCredentials, hasLangfuseEnvConfig, };
8
8
  export type LangfuseTraceMetadata = Record<string, string>;
9
9
  export type LangfuseTraceAttributes = Record<string, string | number | boolean>;
@@ -1,5 +1,5 @@
1
- import type { ResolvedLangfuseToolOutputTracingConfig } from '@/langfuseRuntimeContext';
2
- import type * as t from '@/types';
1
+ import type { ResolvedLangfuseToolOutputTracingConfig } from './langfuseRuntimeContext.js';
2
+ import type * as t from './types/index.js';
3
3
  export declare const LANGFUSE_TOOL_OUTPUT_REDACTION_TEXT = "[tool output redacted]";
4
4
  export declare function normalizeToolName(name: string): string;
5
5
  export declare function hasLangfuseConfigCredentials(langfuse?: t.LangfuseConfig): langfuse is t.LangfuseConfig & {
@@ -1,4 +1,4 @@
1
- import type * as t from '@/types';
1
+ import type * as t from './types/index.js';
2
2
  export type ResolvedLangfuseToolOutputTracingConfig = {
3
3
  enabled: boolean;
4
4
  redactedToolNames: Set<string>;
@@ -1,6 +1,6 @@
1
1
  import type { Context } from '@opentelemetry/api';
2
- import type { LangfuseRuntimeContext, ResolvedLangfuseToolOutputTracingConfig } from '@/langfuseRuntimeContext';
3
- import type * as t from '@/types';
2
+ import type { LangfuseRuntimeContext, ResolvedLangfuseToolOutputTracingConfig } from './langfuseRuntimeContext.js';
3
+ import type * as t from './types/index.js';
4
4
  export type LangfuseRuntimeScope = LangfuseRuntimeContext;
5
5
  export type ResolveLangfuseRuntimeScopeParams = {
6
6
  runLangfuse?: t.LangfuseConfig;
@@ -1,6 +1,6 @@
1
1
  import type { LangfuseSpanProcessorParams } from '@langfuse/otel';
2
2
  import type { Span, SpanContext } from '@opentelemetry/api';
3
- import type * as t from '@/types';
3
+ import type * as t from './types/index.js';
4
4
  export declare function registerLangfuseManagedSpan(span: Span, destinationKey: string): void;
5
5
  export declare function getLangfuseManagedSpanDestination(span: Span): string | undefined;
6
6
  /** Captures the first exported observation for a run and for each agent lane. */
@@ -1,8 +1,8 @@
1
1
  import type { ReadableSpan, SpanProcessor } from '@opentelemetry/sdk-trace-base';
2
2
  import type { LangfuseSpanProcessorParams } from '@langfuse/otel';
3
- import type { ResolvedLangfuseToolOutputTracingConfig } from '@/langfuseRuntimeContext';
4
- import type * as t from '@/types';
5
- import { LANGFUSE_TOOL_OUTPUT_REDACTION_TEXT, resolveLangfuseConfig } from '@/langfuseConfig';
3
+ import type { ResolvedLangfuseToolOutputTracingConfig } from './langfuseRuntimeContext.js';
4
+ import type * as t from './types/index.js';
5
+ import { LANGFUSE_TOOL_OUTPUT_REDACTION_TEXT, resolveLangfuseConfig } from './langfuseConfig.js';
6
6
  export { LANGFUSE_TOOL_OUTPUT_REDACTION_TEXT, resolveLangfuseConfig };
7
7
  export declare const LANGFUSE_OBSERVATION_METADATA_ARTIFACT_KEY = "librechatLangfuseObservationMetadata";
8
8
  /** Whether a tool's outputs are excluded from tracing (global disable or
@@ -6,7 +6,7 @@ import type { ChatModelStreamEvent } from '@langchain/core/language_models/event
6
6
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
7
7
  import type { AnthropicInput } from '@langchain/anthropic';
8
8
  import type { Anthropic } from '@anthropic-ai/sdk';
9
- import type { AnthropicMessageCreateParams, AnthropicStreamingMessageCreateParams, AnthropicOutputConfig, AnthropicBeta, AnthropicMCPServerURLDefinition, AnthropicContextManagementConfigParam, AnthropicRequestOptions } from '@/llm/anthropic/types';
9
+ import type { AnthropicMessageCreateParams, AnthropicStreamingMessageCreateParams, AnthropicOutputConfig, AnthropicBeta, AnthropicMCPServerURLDefinition, AnthropicContextManagementConfigParam, AnthropicRequestOptions } from './types.js';
10
10
  export declare function _documentsInParams(params: AnthropicMessageCreateParams | AnthropicStreamingMessageCreateParams): boolean;
11
11
  export type CustomAnthropicInput = AnthropicInput & {
12
12
  _lc_stream_delay?: number;
@@ -26,7 +26,7 @@ import { type GuardrailConfiguration, type GuardrailStreamConfiguration } from '
26
26
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
27
27
  import type { BaseMessage } from '@langchain/core/messages';
28
28
  import type { ChatBedrockConverseInput } from '@langchain/aws';
29
- import { type PromptCacheTtl } from '@/messages/cache';
29
+ import { type PromptCacheTtl } from '../../messages/cache.js';
30
30
  /**
31
31
  * A `200 OK` ConverseStream whose event stream closes before a single event: no
32
32
  * `messageStart`, no `messageStop`, no exception event. OpenAI models do this for a
@@ -1,5 +1,5 @@
1
1
  import type { ToolConfiguration } from '@aws-sdk/client-bedrock-runtime';
2
- import type { GraphTools } from '@/types';
3
- import { type PromptCacheTtl } from '@/messages/cache';
2
+ import type { GraphTools } from '../../types/index.js';
3
+ import { type PromptCacheTtl } from '../../messages/cache.js';
4
4
  export declare function partitionAndMarkBedrockToolCache(tools: GraphTools | undefined, isDeferred: (toolName: string) => boolean): GraphTools | undefined;
5
5
  export declare function insertBedrockToolCachePoint(toolConfig: ToolConfiguration | undefined, fallbackToEnd: boolean, ttl?: PromptCacheTtl): ToolConfiguration | undefined;
@@ -17,8 +17,8 @@
17
17
  * the pruner's conversion without folding the same correction into the
18
18
  * provider-space budget.
19
19
  */
20
- import type { ContextOverflowInfo } from '@/utils/errors';
21
- import type { ProviderName } from '@/types';
20
+ import type { ContextOverflowInfo } from '../utils/errors.js';
21
+ import type { ProviderName } from '../types/index.js';
22
22
  /** Bound on forced-compaction retries per agent, per run. */
23
23
  export declare const DEFAULT_MAX_OVERFLOW_RECOVERIES = 2;
24
24
  export interface OverflowRecoveryPlan {
@@ -1,6 +1,6 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { ProviderPayloadMeasurement } from '@/llm/prepareProviderRequest';
3
- import type * as t from '@/types';
2
+ import type { ProviderPayloadMeasurement } from './prepareProviderRequest.js';
3
+ import type * as t from '../types/index.js';
4
4
  interface ContextPressureUsage {
5
5
  contextBudget?: number;
6
6
  effectiveInstructionTokens?: number;
@@ -3,7 +3,7 @@ import { ChatGoogleGenerativeAI } from '@langchain/google-genai';
3
3
  import type { GenerateContentRequest, CachedContent, ModelParams, RequestOptions } from '@google/generative-ai';
4
4
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
5
5
  import type { BaseMessage } from '@langchain/core/messages';
6
- import type { GoogleClientOptions } from '@/types';
6
+ import type { GoogleClientOptions } from '../../types/index.js';
7
7
  export declare class CustomChatGoogleGenerativeAI extends ChatGoogleGenerativeAI {
8
8
  _lc_stream_delay: number;
9
9
  private transport;
@@ -1,5 +1,5 @@
1
1
  import type { Runnable } from '@langchain/core/runnables';
2
- import type * as t from '@/types';
2
+ import type * as t from '../types/index.js';
3
3
  type InitializeModelParams<P extends t.ProviderName> = {
4
4
  provider: P;
5
5
  tools?: t.GraphTools;
@@ -2,15 +2,15 @@ import { AIMessageChunk } 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 { BaseMessage } from '@langchain/core/messages';
5
- import type { ToolOutputReferenceRegistry } from '@/tools/toolOutputReferences';
6
- import type { PreparedProviderRequest } from '@/llm/prepareProviderRequest';
7
- import type { ProviderTextProtection } from '@/protection/providerText';
8
- import type { ContextOverflowContext } from '@/utils/errors';
9
- import type { StreamLimitState } from '@/llm/streamLimits';
10
- import type * as t from '@/types';
11
- import { ChatModelStreamHandler } from '@/stream';
12
- export { projectMessagesForProvider, resolveServingModelId, usesNativeOpenAIResponses, } from '@/llm/prepareProviderRequest';
13
- export type { PreparedProviderRequest, PrepareProviderRequestParams, ProviderMessageProjectionMode, ProviderPayloadMeasurement, ProviderRequestContext, } from '@/llm/prepareProviderRequest';
5
+ import type { ToolOutputReferenceRegistry } from '../tools/toolOutputReferences.js';
6
+ import type { PreparedProviderRequest } from './prepareProviderRequest.js';
7
+ import type { ProviderTextProtection } from '../protection/providerText.js';
8
+ import type { ContextOverflowContext } from '../utils/errors.js';
9
+ import type { StreamLimitState } from './streamLimits.js';
10
+ import type * as t from '../types/index.js';
11
+ import { ChatModelStreamHandler } from '../stream.js';
12
+ export { projectMessagesForProvider, resolveServingModelId, usesNativeOpenAIResponses, } from './prepareProviderRequest.js';
13
+ export type { PreparedProviderRequest, PrepareProviderRequestParams, ProviderMessageProjectionMode, ProviderPayloadMeasurement, ProviderRequestContext, } from './prepareProviderRequest.js';
14
14
  /**
15
15
  * Context passed to `attemptInvoke`. Matches the subset of Graph that
16
16
  * `ChatModelStreamHandler.handle` needs *plus* the explicit
@@ -2,7 +2,7 @@ import { ChatMistralAI } from '@langchain/mistralai';
2
2
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
3
3
  import type { ChatGenerationChunk } from '@langchain/core/outputs';
4
4
  import type { BaseMessage } from '@langchain/core/messages';
5
- import type { MistralAIClientOptions } from '@/types';
5
+ import type { MistralAIClientOptions } from '../../types/index.js';
6
6
  export declare class CustomChatMistralAI extends ChatMistralAI {
7
7
  _lc_stream_delay: number;
8
8
  static lc_name(): 'LibreChatMistralAI';
@@ -10,9 +10,9 @@ import type { BindToolsInput } from '@langchain/core/language_models/chat_models
10
10
  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
- import type { SmoothItem } from '@/llm/stream/smoother';
13
+ import type { SmoothItem } from '../stream/smoother.js';
14
14
  import type { HeaderValue, HeadersLike } from './types';
15
- import type { PromptCacheTtl } from '@/messages/cache';
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[]>;
18
18
  type OpenAICoreRequestOptions = OpenAIClient.RequestOptions;
@@ -2,8 +2,8 @@ import type { ChatOpenAICallOptions, OpenAIChatInput, OpenAIClient } from '@lang
2
2
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
3
3
  import type { ChatGenerationChunk } from '@langchain/core/outputs';
4
4
  import type { BaseMessage } from '@langchain/core/messages';
5
- import type { PromptCacheTtl } from '@/messages/cache';
6
- import { ChatOpenAI } from '@/llm/openai';
5
+ import type { PromptCacheTtl } from '../../messages/cache.js';
6
+ import { ChatOpenAI } from '../openai/index.js';
7
7
  export type OpenRouterReasoningEffort = 'xhigh' | 'high' | 'medium' | 'low' | 'minimal' | 'none';
8
8
  export interface OpenRouterReasoning {
9
9
  effort?: OpenRouterReasoningEffort;
@@ -1,3 +1,3 @@
1
- import type { GraphTools } from '@/types';
2
- import { type PromptCacheTtl } from '@/messages/cache';
1
+ import type { GraphTools } from '../../types/index.js';
2
+ import { type PromptCacheTtl } from '../../messages/cache.js';
3
3
  export declare function partitionAndMarkOpenRouterToolCache(tools: GraphTools | undefined, isDeferred: (toolName: string) => boolean, ttl?: PromptCacheTtl): GraphTools | undefined;
@@ -1,8 +1,8 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
- import type { ToolOutputReferenceRegistry } from '@/tools/toolOutputReferences';
4
- import type { ToolHistoryPreparation } from '@/messages/toolHistoryProjection';
5
- import type * as t from '@/types';
3
+ import type { ToolOutputReferenceRegistry } from '../tools/toolOutputReferences.js';
4
+ import type { ToolHistoryPreparation } from '../messages/toolHistoryProjection.js';
5
+ import type * as t from '../types/index.js';
6
6
  declare const preparedProviderRequestBrand: unique symbol;
7
7
  export type ProviderMessageProjectionMode = 'chat-messages' | 'openai-responses';
8
8
  export interface ProviderPayloadMeasurement {