@librechat/agents 4.2.10 → 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 (261) hide show
  1. package/dist/cjs/runtime/admission.cjs +135 -0
  2. package/dist/cjs/runtime/admission.cjs.map +1 -0
  3. package/dist/cjs/runtime/checkpoint.cjs +40 -0
  4. package/dist/cjs/runtime/checkpoint.cjs.map +1 -0
  5. package/dist/cjs/runtime/client.cjs +435 -0
  6. package/dist/cjs/runtime/client.cjs.map +1 -0
  7. package/dist/cjs/runtime/files.cjs +301 -0
  8. package/dist/cjs/runtime/files.cjs.map +1 -0
  9. package/dist/cjs/runtime/hostTools.cjs +165 -0
  10. package/dist/cjs/runtime/hostTools.cjs.map +1 -0
  11. package/dist/cjs/runtime/index.cjs +11 -0
  12. package/dist/cjs/runtime/model.cjs +303 -0
  13. package/dist/cjs/runtime/model.cjs.map +1 -0
  14. package/dist/cjs/runtime/peer.cjs +209 -0
  15. package/dist/cjs/runtime/peer.cjs.map +1 -0
  16. package/dist/cjs/runtime/policy.cjs +77 -0
  17. package/dist/cjs/runtime/policy.cjs.map +1 -0
  18. package/dist/cjs/runtime/recovery/client.cjs +172 -0
  19. package/dist/cjs/runtime/recovery/client.cjs.map +1 -0
  20. package/dist/cjs/runtime/recovery/log.cjs +47 -0
  21. package/dist/cjs/runtime/recovery/log.cjs.map +1 -0
  22. package/dist/cjs/runtime/recovery/redis.cjs +239 -0
  23. package/dist/cjs/runtime/recovery/redis.cjs.map +1 -0
  24. package/dist/cjs/runtime/recovery/server.cjs +190 -0
  25. package/dist/cjs/runtime/recovery/server.cjs.map +1 -0
  26. package/dist/cjs/runtime/recovery/socket.cjs +298 -0
  27. package/dist/cjs/runtime/recovery/socket.cjs.map +1 -0
  28. package/dist/cjs/runtime/resume.cjs +115 -0
  29. package/dist/cjs/runtime/resume.cjs.map +1 -0
  30. package/dist/cjs/runtime/sealed.cjs +107 -0
  31. package/dist/cjs/runtime/sealed.cjs.map +1 -0
  32. package/dist/cjs/runtime/server.cjs +415 -0
  33. package/dist/cjs/runtime/server.cjs.map +1 -0
  34. package/dist/cjs/runtime/snapshot.cjs +61 -0
  35. package/dist/cjs/runtime/snapshot.cjs.map +1 -0
  36. package/dist/cjs/runtime/types.cjs +20 -0
  37. package/dist/cjs/runtime/types.cjs.map +1 -0
  38. package/dist/cjs/runtime/wire.cjs +84 -0
  39. package/dist/cjs/runtime/wire.cjs.map +1 -0
  40. package/dist/esm/runtime/admission.mjs +133 -0
  41. package/dist/esm/runtime/admission.mjs.map +1 -0
  42. package/dist/esm/runtime/checkpoint.mjs +39 -0
  43. package/dist/esm/runtime/checkpoint.mjs.map +1 -0
  44. package/dist/esm/runtime/client.mjs +432 -0
  45. package/dist/esm/runtime/client.mjs.map +1 -0
  46. package/dist/esm/runtime/files.mjs +299 -0
  47. package/dist/esm/runtime/files.mjs.map +1 -0
  48. package/dist/esm/runtime/hostTools.mjs +164 -0
  49. package/dist/esm/runtime/hostTools.mjs.map +1 -0
  50. package/dist/esm/runtime/index.mjs +5 -0
  51. package/dist/esm/runtime/model.mjs +301 -0
  52. package/dist/esm/runtime/model.mjs.map +1 -0
  53. package/dist/esm/runtime/peer.mjs +209 -0
  54. package/dist/esm/runtime/peer.mjs.map +1 -0
  55. package/dist/esm/runtime/policy.mjs +75 -0
  56. package/dist/esm/runtime/policy.mjs.map +1 -0
  57. package/dist/esm/runtime/recovery/client.mjs +172 -0
  58. package/dist/esm/runtime/recovery/client.mjs.map +1 -0
  59. package/dist/esm/runtime/recovery/log.mjs +46 -0
  60. package/dist/esm/runtime/recovery/log.mjs.map +1 -0
  61. package/dist/esm/runtime/recovery/redis.mjs +239 -0
  62. package/dist/esm/runtime/recovery/redis.mjs.map +1 -0
  63. package/dist/esm/runtime/recovery/server.mjs +189 -0
  64. package/dist/esm/runtime/recovery/server.mjs.map +1 -0
  65. package/dist/esm/runtime/recovery/socket.mjs +297 -0
  66. package/dist/esm/runtime/recovery/socket.mjs.map +1 -0
  67. package/dist/esm/runtime/resume.mjs +111 -0
  68. package/dist/esm/runtime/resume.mjs.map +1 -0
  69. package/dist/esm/runtime/sealed.mjs +106 -0
  70. package/dist/esm/runtime/sealed.mjs.map +1 -0
  71. package/dist/esm/runtime/server.mjs +413 -0
  72. package/dist/esm/runtime/server.mjs.map +1 -0
  73. package/dist/esm/runtime/snapshot.mjs +60 -0
  74. package/dist/esm/runtime/snapshot.mjs.map +1 -0
  75. package/dist/esm/runtime/types.mjs +19 -0
  76. package/dist/esm/runtime/types.mjs.map +1 -0
  77. package/dist/esm/runtime/wire.mjs +80 -0
  78. package/dist/esm/runtime/wire.mjs.map +1 -0
  79. package/dist/types/agents/AgentContext.d.ts +4 -4
  80. package/dist/types/agents/projection.d.ts +1 -1
  81. package/dist/types/events.d.ts +2 -2
  82. package/dist/types/graphs/Graph.d.ts +13 -13
  83. package/dist/types/graphs/MultiAgentGraph.d.ts +2 -2
  84. package/dist/types/graphs/acceptedModelResponse.d.ts +1 -1
  85. package/dist/types/graphs/createGraph.d.ts +4 -4
  86. package/dist/types/graphs/graphFactory.d.ts +1 -1
  87. package/dist/types/graphs/handoff.d.ts +1 -1
  88. package/dist/types/harness/index.d.ts +2 -2
  89. package/dist/types/harness/model.d.ts +3 -3
  90. package/dist/types/harness/providerText.d.ts +2 -2
  91. package/dist/types/hitl/approvalReview.d.ts +1 -1
  92. package/dist/types/hitl/askUserQuestion.d.ts +1 -1
  93. package/dist/types/hitl/askUserQuestions.d.ts +1 -1
  94. package/dist/types/hitl/askUserQuestionsInterrupt.d.ts +1 -1
  95. package/dist/types/hooks/types.d.ts +2 -2
  96. package/dist/types/instrumentation.d.ts +1 -1
  97. package/dist/types/langfuse.d.ts +3 -3
  98. package/dist/types/langfuseConfig.d.ts +2 -2
  99. package/dist/types/langfuseRuntimeContext.d.ts +1 -1
  100. package/dist/types/langfuseRuntimeScope.d.ts +2 -2
  101. package/dist/types/langfuseSpanRegistry.d.ts +1 -1
  102. package/dist/types/langfuseToolOutputTracing.d.ts +3 -3
  103. package/dist/types/llm/anthropic/index.d.ts +1 -1
  104. package/dist/types/llm/bedrock/index.d.ts +1 -1
  105. package/dist/types/llm/bedrock/toolCache.d.ts +2 -2
  106. package/dist/types/llm/contextOverflowRecovery.d.ts +2 -2
  107. package/dist/types/llm/contextPressureMeter.d.ts +2 -2
  108. package/dist/types/llm/google/index.d.ts +1 -1
  109. package/dist/types/llm/init.d.ts +1 -1
  110. package/dist/types/llm/invoke.d.ts +9 -9
  111. package/dist/types/llm/mistral/index.d.ts +1 -1
  112. package/dist/types/llm/openai/index.d.ts +2 -2
  113. package/dist/types/llm/openrouter/index.d.ts +2 -2
  114. package/dist/types/llm/openrouter/toolCache.d.ts +2 -2
  115. package/dist/types/llm/prepareProviderRequest.d.ts +3 -3
  116. package/dist/types/llm/promptCacheTools.d.ts +1 -1
  117. package/dist/types/llm/providerRegistry.d.ts +1 -1
  118. package/dist/types/llm/providerTextBoundary.d.ts +2 -2
  119. package/dist/types/llm/providerTextControls.d.ts +1 -1
  120. package/dist/types/llm/providers.d.ts +2 -2
  121. package/dist/types/llm/request.d.ts +1 -1
  122. package/dist/types/llm/stream/chunkAdapters.d.ts +1 -1
  123. package/dist/types/llm/streamLimits.d.ts +1 -1
  124. package/dist/types/llm/truncation.d.ts +1 -1
  125. package/dist/types/llm/vertexai/index.d.ts +1 -1
  126. package/dist/types/messages/alternation.d.ts +1 -1
  127. package/dist/types/messages/anthropicToolCache.d.ts +2 -2
  128. package/dist/types/messages/assistantPhase.d.ts +3 -3
  129. package/dist/types/messages/budget.d.ts +1 -1
  130. package/dist/types/messages/cache.d.ts +1 -1
  131. package/dist/types/messages/contextPruning.d.ts +2 -2
  132. package/dist/types/messages/core.d.ts +1 -1
  133. package/dist/types/messages/fading.d.ts +1 -1
  134. package/dist/types/messages/format.d.ts +2 -2
  135. package/dist/types/messages/ids.d.ts +2 -2
  136. package/dist/types/messages/injected.d.ts +1 -1
  137. package/dist/types/messages/langchain.d.ts +1 -1
  138. package/dist/types/messages/prune.d.ts +4 -4
  139. package/dist/types/messages/recency.d.ts +1 -1
  140. package/dist/types/messages/toolResultTypes.d.ts +1 -1
  141. package/dist/types/openai/arguments.d.ts +1 -1
  142. package/dist/types/openai/index.d.ts +1 -1
  143. package/dist/types/openai/toolProjection.d.ts +1 -1
  144. package/dist/types/prompts/activityLabel.d.ts +2 -2
  145. package/dist/types/prompts/reasoningLabel.d.ts +1 -1
  146. package/dist/types/rerank/search.d.ts +1 -1
  147. package/dist/types/responses/index.d.ts +1 -1
  148. package/dist/types/run.d.ts +3 -3
  149. package/dist/types/runtime/admission.d.ts +30 -0
  150. package/dist/types/runtime/checkpoint.d.ts +14 -0
  151. package/dist/types/runtime/client.d.ts +12 -0
  152. package/dist/types/runtime/files.d.ts +75 -0
  153. package/dist/types/runtime/hostTools.d.ts +22 -0
  154. package/dist/types/runtime/identity.d.ts +2 -0
  155. package/dist/types/runtime/index.d.ts +12 -0
  156. package/dist/types/runtime/model.d.ts +42 -0
  157. package/dist/types/runtime/peer.d.ts +55 -0
  158. package/dist/types/runtime/policy.d.ts +43 -0
  159. package/dist/types/runtime/recovery/client.d.ts +12 -0
  160. package/dist/types/runtime/recovery/journal.d.ts +62 -0
  161. package/dist/types/runtime/recovery/log.d.ts +9 -0
  162. package/dist/types/runtime/recovery/redis.d.ts +17 -0
  163. package/dist/types/runtime/recovery/server.d.ts +37 -0
  164. package/dist/types/runtime/recovery/socket.d.ts +72 -0
  165. package/dist/types/runtime/resume.d.ts +66 -0
  166. package/dist/types/runtime/sealed.d.ts +19 -0
  167. package/dist/types/runtime/server.d.ts +21 -0
  168. package/dist/types/runtime/snapshot.d.ts +12 -0
  169. package/dist/types/runtime/types.d.ts +125 -0
  170. package/dist/types/runtime/wire.d.ts +3 -0
  171. package/dist/types/session/handlers.d.ts +1 -1
  172. package/dist/types/session/types.d.ts +1 -1
  173. package/dist/types/stream.d.ts +3 -3
  174. package/dist/types/summarization/index.d.ts +1 -1
  175. package/dist/types/summarization/input.d.ts +1 -1
  176. package/dist/types/summarization/node.d.ts +6 -6
  177. package/dist/types/summarization/retry.d.ts +2 -2
  178. package/dist/types/summarization/semanticIndex.d.ts +2 -2
  179. package/dist/types/summarization/toolBudget.d.ts +1 -1
  180. package/dist/types/summarization/usage.d.ts +1 -1
  181. package/dist/types/tools/ArtifactDelivery.d.ts +1 -1
  182. package/dist/types/tools/ArtifactTruncation.d.ts +1 -1
  183. package/dist/types/tools/BashExecutor.d.ts +2 -2
  184. package/dist/types/tools/BashProgrammaticToolCalling.d.ts +2 -2
  185. package/dist/types/tools/CallerCapabilities.d.ts +1 -1
  186. package/dist/types/tools/CodeExecutor.d.ts +4 -4
  187. package/dist/types/tools/CodeSessionFileSummary.d.ts +1 -1
  188. package/dist/types/tools/ProgrammaticCallerPolicy.d.ts +1 -1
  189. package/dist/types/tools/ProgrammaticToolCalling.d.ts +2 -2
  190. package/dist/types/tools/ReadFile.d.ts +1 -1
  191. package/dist/types/tools/SkillTool.d.ts +1 -1
  192. package/dist/types/tools/SubagentTool.d.ts +3 -3
  193. package/dist/types/tools/ToolNode.d.ts +5 -5
  194. package/dist/types/tools/ToolSearch.d.ts +2 -2
  195. package/dist/types/tools/cloudflare/CloudflareBridgeRuntime.d.ts +1 -1
  196. package/dist/types/tools/cloudflare/CloudflareProgrammaticToolCalling.d.ts +1 -1
  197. package/dist/types/tools/cloudflare/CloudflareSandboxExecutionEngine.d.ts +2 -2
  198. package/dist/types/tools/cloudflare/CloudflareSandboxTools.d.ts +1 -1
  199. package/dist/types/tools/diagnostics.d.ts +1 -1
  200. package/dist/types/tools/eagerEventExecution.d.ts +1 -1
  201. package/dist/types/tools/handlers.d.ts +3 -3
  202. package/dist/types/tools/intentArg.d.ts +1 -1
  203. package/dist/types/tools/local/CompileCheckTool.d.ts +2 -2
  204. package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
  205. package/dist/types/tools/local/LocalCodingTools.d.ts +2 -2
  206. package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
  207. package/dist/types/tools/local/LocalExecutionTools.d.ts +1 -1
  208. package/dist/types/tools/local/LocalProgrammaticToolCalling.d.ts +1 -1
  209. package/dist/types/tools/local/bashAst.d.ts +1 -1
  210. package/dist/types/tools/local/resolveLocalExecutionTools.d.ts +1 -1
  211. package/dist/types/tools/local/syntaxCheck.d.ts +1 -1
  212. package/dist/types/tools/ptcTimeout.d.ts +1 -1
  213. package/dist/types/tools/runStepResume.d.ts +1 -1
  214. package/dist/types/tools/schema.d.ts +1 -1
  215. package/dist/types/tools/search/anthropic.d.ts +1 -1
  216. package/dist/types/tools/skillCatalog.d.ts +1 -1
  217. package/dist/types/tools/subagent/InMemorySubagentTaskStore.d.ts +1 -1
  218. package/dist/types/tools/subagent/SubagentExecutor.d.ts +5 -5
  219. package/dist/types/tools/subagent/SubagentReplay.d.ts +3 -3
  220. package/dist/types/tools/subagent/childGraphConfig.d.ts +2 -2
  221. package/dist/types/tools/subagent/diagnostics.d.ts +2 -2
  222. package/dist/types/tools/subagent/hostArgs.d.ts +2 -2
  223. package/dist/types/tools/toolBatchReplay.d.ts +3 -3
  224. package/dist/types/types/activityLabel.d.ts +2 -2
  225. package/dist/types/types/graph.d.ts +10 -10
  226. package/dist/types/types/llm.d.ts +9 -9
  227. package/dist/types/types/reasoningLabel.d.ts +1 -1
  228. package/dist/types/types/run.d.ts +8 -8
  229. package/dist/types/types/stream.d.ts +5 -5
  230. package/dist/types/types/summarize.d.ts +2 -2
  231. package/dist/types/types/tools.d.ts +8 -8
  232. package/dist/types/utils/errors.d.ts +1 -1
  233. package/dist/types/utils/events.d.ts +3 -3
  234. package/dist/types/utils/handlers.d.ts +3 -3
  235. package/dist/types/utils/llm.d.ts +2 -2
  236. package/dist/types/utils/llmConfig.d.ts +1 -1
  237. package/dist/types/utils/title.d.ts +1 -1
  238. package/dist/types/utils/toolSessions.d.ts +1 -1
  239. package/package.json +22 -3
  240. package/src/runtime/admission.ts +224 -0
  241. package/src/runtime/checkpoint.ts +66 -0
  242. package/src/runtime/client.ts +674 -0
  243. package/src/runtime/files.ts +503 -0
  244. package/src/runtime/hostTools.ts +243 -0
  245. package/src/runtime/identity.ts +3 -0
  246. package/src/runtime/index.ts +33 -0
  247. package/src/runtime/model.ts +452 -0
  248. package/src/runtime/peer.ts +262 -0
  249. package/src/runtime/policy.ts +150 -0
  250. package/src/runtime/recovery/client.ts +232 -0
  251. package/src/runtime/recovery/journal.ts +88 -0
  252. package/src/runtime/recovery/log.ts +70 -0
  253. package/src/runtime/recovery/redis.ts +342 -0
  254. package/src/runtime/recovery/server.ts +280 -0
  255. package/src/runtime/recovery/socket.ts +422 -0
  256. package/src/runtime/resume.ts +268 -0
  257. package/src/runtime/sealed.ts +144 -0
  258. package/src/runtime/server.ts +653 -0
  259. package/src/runtime/snapshot.ts +87 -0
  260. package/src/runtime/types.ts +184 -0
  261. package/src/runtime/wire.ts +96 -0
@@ -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;
@@ -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,7 @@ 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';
@@ -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 {
@@ -1,4 +1,4 @@
1
- import type * as t from '@/types';
1
+ import type * as t from '../types/index.js';
2
2
  export declare function prepareToolsForPromptCache(params: {
3
3
  provider: t.ProviderName;
4
4
  clientOptions?: t.ClientOptions;
@@ -1,6 +1,6 @@
1
1
  import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
2
2
  import type { ProviderFamily, ProviderRegistrationOptions } from '../provider-registration';
3
- import type { ProviderModelConstructor, ProviderName } from '@/types';
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. */
6
6
  export declare function registerProvider<TOptions extends object, TModel extends BaseChatModel>(options: ProviderRegistrationOptions<TOptions, TModel>): () => void;
@@ -1,4 +1,4 @@
1
- import type { ProviderTextProtection } from '@/protection/providerText';
2
- import type { ChatModel, ProviderName } from '@/types';
1
+ import type { ProviderTextProtection } from '../protection/providerText.js';
2
+ import type { ChatModel, ProviderName } from '../types/index.js';
3
3
  /** Clone only known runnable shells. Never mutate a shared provider or its callback configuration. */
4
4
  export declare function withProviderTextBoundary(model: ChatModel, policy: ProviderTextProtection, provider?: ProviderName): ChatModel;
@@ -1,5 +1,5 @@
1
1
  import type { AIMessageChunk } from '@langchain/core/messages';
2
- import type { ProviderTextAttempt } from '@/protection/providerText';
2
+ import type { ProviderTextAttempt } from '../protection/providerText.js';
3
3
  export declare const GEMINI_SIGNATURES = "__gemini_function_call_thought_signatures__";
4
4
  export declare const RESPONSES_POSITIONS = "__openai_responses_replay_positions__";
5
5
  export declare function keys(value: unknown, allowed: readonly string[]): value is Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import type { ProviderModelConstructor, ProviderName } from '@/types';
1
+ import type { ProviderModelConstructor, ProviderName } from '../types/index.js';
2
2
  export declare const getChatModelClass: <P extends ProviderName>(provider: P) => ProviderModelConstructor<P>;
3
- export { getProviderFamily, providerRequiresStrictAlternation, providerUsesManualToolStream, registerProvider, } from '@/llm/providerRegistry';
3
+ export { getProviderFamily, providerRequiresStrictAlternation, providerUsesManualToolStream, registerProvider, } from './providerRegistry.js';
4
4
  export type { ProviderFamily, ProviderRegistrationOptions, } from '../provider-registration';
@@ -1,4 +1,4 @@
1
- import type * as t from '@/types';
1
+ import type * as t from '../types/index.js';
2
2
  /**
3
3
  * Returns true when the provider + clientOptions indicate extended thinking
4
4
  * is enabled. Works across Anthropic (direct), Bedrock (additionalModelRequestFields),
@@ -1,7 +1,7 @@
1
1
  import { AIMessageChunk } from '@langchain/core/messages';
2
2
  import { ChatGenerationChunk } from '@langchain/core/outputs';
3
3
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
4
- import type { SmoothItem, SmoothPiece } from '@/llm/stream/smoother';
4
+ import type { SmoothItem, SmoothPiece } from './smoother.js';
5
5
  /**
6
6
  * Rebuilds a generation chunk carrying one piece of a split plain-text chunk.
7
7
  * Unsplit pieces return the original chunk untouched, so disabled smoothing is
@@ -1,5 +1,5 @@
1
1
  import type { ToolCallChunk } from '@langchain/core/messages/tool';
2
- import type * as t from '@/types';
2
+ import type * as t from '../types/index.js';
3
3
  /**
4
4
  * Circuit breakers for pathological model streams.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import type { AIMessageChunk, BaseMessage } from '@langchain/core/messages';
2
- import type { ProviderName } from '@/types';
2
+ import type { ProviderName } from '../types/index.js';
3
3
  /**
4
4
  * Normalized truncation reasons across providers. Providers disagree on the
5
5
  * key and the value: Anthropic/Bedrock use `max_tokens`, OpenAI uses `length`,
@@ -4,7 +4,7 @@ import type { GeminiContent, GoogleAIModelRequestParams, GoogleAbstractedClient
4
4
  import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
5
5
  import type { ChatGenerationChunk } from '@langchain/core/outputs';
6
6
  import type { BaseMessage, UsageMetadata } from '@langchain/core/messages';
7
- import type { GoogleThinkingConfig, VertexAIClientOptions } from '@/types';
7
+ import type { GoogleThinkingConfig, VertexAIClientOptions } from '../../types/index.js';
8
8
  /**
9
9
  * `@langchain/google-common`'s `_streamResponseChunks` emits usage on TWO
10
10
  * different paths within the same stream:
@@ -1,5 +1,5 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import { Providers } from '@/common';
2
+ import { Providers } from '../common/index.js';
3
3
  /**
4
4
  * Providers whose APIs specify strict user/assistant alternation. Mistral
5
5
  * rejects consecutive user turns outright. Bedrock's Converse API documents
@@ -24,8 +24,8 @@
24
24
  * never mutating the original tool instance, since callers may share them
25
25
  * across runs.
26
26
  */
27
- import type { GraphTools } from '@/types';
28
- import { type PromptCacheTtl } from '@/messages/cache';
27
+ import type { GraphTools } from '../types/index.js';
28
+ import { type PromptCacheTtl } from './cache.js';
29
29
  /**
30
30
  * Returns a callable that reports whether a given tool *name* is deferred
31
31
  * according to the supplied registry of tool definitions. Tools without
@@ -1,6 +1,6 @@
1
- import type { AssistantTextPhase } from '@/types/assistantPhase';
2
- import type { MessageContentComplex } from '@/types/stream';
3
- import { ContentTypes } from '@/common';
1
+ import type { AssistantTextPhase } from '../types/assistantPhase.js';
2
+ import type { MessageContentComplex } from '../types/stream.js';
3
+ import { ContentTypes } from '../common/index.js';
4
4
  export type MessageCreationContentMetadata = {
5
5
  content_type?: ContentTypes.TEXT | ContentTypes.THINK;
6
6
  phase?: AssistantTextPhase;
@@ -1,6 +1,6 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
- import type * as t from '@/types';
3
+ import type * as t from '../types/index.js';
4
4
  /** Counts retained tool exchanges without serializing arguments or result content. */
5
5
  export interface ToolMessageUsageAccumulator {
6
6
  add(message: BaseMessage, getRawTokens: () => number): void;
@@ -1,5 +1,5 @@
1
1
  import { BaseMessage, MessageContentComplex } from '@langchain/core/messages';
2
- import type { AnthropicMessage } from '@/types/messages';
2
+ import type { AnthropicMessage } from '../types/messages.js';
3
3
  type MessageWithContent = {
4
4
  content?: string | MessageContentComplex[];
5
5
  };
@@ -14,8 +14,8 @@
14
14
  */
15
15
  import { type BaseMessage } from '@langchain/core/messages';
16
16
  import type { ContextPruningSettings } from './contextPruningSettings';
17
- import type { ContextPruningConfig } from '@/types/graph';
18
- import type { TokenCounter } from '@/types/run';
17
+ import type { ContextPruningConfig } from '../types/graph.js';
18
+ import type { TokenCounter } from '../types/run.js';
19
19
  export interface ContextPruningResult {
20
20
  /** Number of messages that were soft-trimmed. */
21
21
  softTrimmed: number;
@@ -1,5 +1,5 @@
1
1
  import { AIMessage, BaseMessage, ToolMessage, HumanMessage, AIMessageChunk } from '@langchain/core/messages';
2
- import type * as t from '@/types';
2
+ import type * as t from '../types/index.js';
3
3
  import type { ToolHistoryPreparation } from './toolHistoryProjection';
4
4
  export declare function getConverseOverrideMessage({ userMessage, lastMessageX, lastMessageY, }: {
5
5
  userMessage: string[];
@@ -1,4 +1,4 @@
1
- import type { FadingTier } from '@/types/graph';
1
+ import type { FadingTier } from '../types/graph.js';
2
2
  /**
3
3
  * Version 2: exchange width counts only the current turn. Version 1 tiers may
4
4
  * have latched on history whose steps storage had merged into one assistant
@@ -1,9 +1,9 @@
1
1
  import { AIMessage, ToolMessage, BaseMessage, HumanMessage, SystemMessage } from '@langchain/core/messages';
2
2
  import type { MessageContentImageUrl } from '@langchain/core/messages';
3
3
  import type { RunnableConfig } from '@langchain/core/runnables';
4
- import type { MessageContentComplex, TPayload, ProviderName, CompactionSemanticIndex, CompactionSemanticIndexSnapshot } from '@/types';
4
+ import type { MessageContentComplex, TPayload, ProviderName, CompactionSemanticIndex, CompactionSemanticIndexSnapshot } from '../types/index.js';
5
5
  import type { ToolHistoryPreparation } from './toolHistoryProjection';
6
- import { Providers } from '@/common';
6
+ import { Providers } from '../common/index.js';
7
7
  interface MediaMessageParams {
8
8
  message: {
9
9
  role: string;
@@ -1,3 +1,3 @@
1
- import type { Graph } from '@/graphs';
2
- import type * as t from '@/types';
1
+ import type { Graph } from '../graphs/index.js';
2
+ import type * as t from '../types/index.js';
3
3
  export declare const getMessageId: (stepKey: string, graph: Graph<t.BaseGraphState>, returnExistingId?: boolean) => string | undefined;
@@ -1,3 +1,3 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { InjectedMessage } from '@/types/tools';
2
+ import type { InjectedMessage } from '../types/tools.js';
3
3
  export declare function convertInjectedMessages(messages: InjectedMessage[]): BaseMessage[];