@librechat/agents 4.2.12 → 4.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/dist/cjs/graphs/Graph.cjs +11 -3
  2. package/dist/cjs/graphs/Graph.cjs.map +1 -1
  3. package/dist/cjs/llm/anthropic/index.cjs +4 -3
  4. package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
  5. package/dist/cjs/llm/anthropic/utils/container.cjs +37 -0
  6. package/dist/cjs/llm/anthropic/utils/container.cjs.map +1 -0
  7. package/dist/cjs/llm/anthropic/utils/message_inputs.cjs +25 -23
  8. package/dist/cjs/llm/anthropic/utils/message_inputs.cjs.map +1 -1
  9. package/dist/cjs/llm/anthropic/utils/message_outputs.cjs +15 -21
  10. package/dist/cjs/llm/anthropic/utils/message_outputs.cjs.map +1 -1
  11. package/dist/cjs/llm/anthropic/utils/stream_events.cjs +16 -14
  12. package/dist/cjs/llm/anthropic/utils/stream_events.cjs.map +1 -1
  13. package/dist/cjs/llm/bedrock/index.cjs +1 -1
  14. package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
  15. package/dist/cjs/llm/bedrock/toolCache.cjs +1 -1
  16. package/dist/cjs/llm/bedrock/utils/message_inputs.cjs +19 -13
  17. package/dist/cjs/llm/bedrock/utils/message_inputs.cjs.map +1 -1
  18. package/dist/cjs/llm/google/utils/common.cjs +59 -13
  19. package/dist/cjs/llm/google/utils/common.cjs.map +1 -1
  20. package/dist/cjs/llm/init.cjs +12 -2
  21. package/dist/cjs/llm/init.cjs.map +1 -1
  22. package/dist/cjs/llm/openai/index.cjs +1 -1
  23. package/dist/cjs/llm/openrouter/toolCache.cjs +1 -1
  24. package/dist/cjs/llm/prepareProviderRequest.cjs +1 -1
  25. package/dist/cjs/main.cjs +6 -3
  26. package/dist/cjs/messages/alternation.cjs +1 -1
  27. package/dist/cjs/messages/anthropicServerTools.cjs +20 -0
  28. package/dist/cjs/messages/anthropicServerTools.cjs.map +1 -0
  29. package/dist/cjs/messages/budget.cjs +1 -1
  30. package/dist/cjs/messages/core.cjs +3 -2
  31. package/dist/cjs/messages/core.cjs.map +1 -1
  32. package/dist/cjs/messages/format.cjs +2 -2
  33. package/dist/cjs/messages/index.cjs +1 -1
  34. package/dist/cjs/messages/prune.cjs +1 -1
  35. package/dist/cjs/messages/recency.cjs +1 -1
  36. package/dist/cjs/messages/toolResultTypes.cjs +21 -45
  37. package/dist/cjs/messages/toolResultTypes.cjs.map +1 -1
  38. package/dist/cjs/protection/providerText.cjs +4 -0
  39. package/dist/cjs/protection/providerText.cjs.map +1 -1
  40. package/dist/cjs/protection/toolResult.cjs +119 -0
  41. package/dist/cjs/protection/toolResult.cjs.map +1 -0
  42. package/dist/cjs/run.cjs +7 -1
  43. package/dist/cjs/run.cjs.map +1 -1
  44. package/dist/cjs/runtime/client.cjs +2 -0
  45. package/dist/cjs/runtime/client.cjs.map +1 -1
  46. package/dist/cjs/stream.cjs +1 -0
  47. package/dist/cjs/stream.cjs.map +1 -1
  48. package/dist/cjs/summarization/node.cjs +1 -1
  49. package/dist/cjs/tools/ToolNode.cjs +46 -13
  50. package/dist/cjs/tools/ToolNode.cjs.map +1 -1
  51. package/dist/cjs/tools/search/content.cjs +163 -42
  52. package/dist/cjs/tools/search/content.cjs.map +1 -1
  53. package/dist/cjs/tools/subagent/SubagentExecutor.cjs +4 -0
  54. package/dist/cjs/tools/subagent/SubagentExecutor.cjs.map +1 -1
  55. package/dist/cjs/utils/tokens.cjs +7 -2
  56. package/dist/cjs/utils/tokens.cjs.map +1 -1
  57. package/dist/esm/graphs/Graph.mjs +11 -3
  58. package/dist/esm/graphs/Graph.mjs.map +1 -1
  59. package/dist/esm/llm/anthropic/index.mjs +4 -3
  60. package/dist/esm/llm/anthropic/index.mjs.map +1 -1
  61. package/dist/esm/llm/anthropic/utils/container.mjs +37 -0
  62. package/dist/esm/llm/anthropic/utils/container.mjs.map +1 -0
  63. package/dist/esm/llm/anthropic/utils/message_inputs.mjs +25 -23
  64. package/dist/esm/llm/anthropic/utils/message_inputs.mjs.map +1 -1
  65. package/dist/esm/llm/anthropic/utils/message_outputs.mjs +15 -21
  66. package/dist/esm/llm/anthropic/utils/message_outputs.mjs.map +1 -1
  67. package/dist/esm/llm/anthropic/utils/stream_events.mjs +16 -14
  68. package/dist/esm/llm/anthropic/utils/stream_events.mjs.map +1 -1
  69. package/dist/esm/llm/bedrock/index.mjs +2 -2
  70. package/dist/esm/llm/bedrock/index.mjs.map +1 -1
  71. package/dist/esm/llm/bedrock/toolCache.mjs +1 -1
  72. package/dist/esm/llm/bedrock/utils/message_inputs.mjs +19 -14
  73. package/dist/esm/llm/bedrock/utils/message_inputs.mjs.map +1 -1
  74. package/dist/esm/llm/google/utils/common.mjs +59 -13
  75. package/dist/esm/llm/google/utils/common.mjs.map +1 -1
  76. package/dist/esm/llm/init.mjs +12 -2
  77. package/dist/esm/llm/init.mjs.map +1 -1
  78. package/dist/esm/llm/openai/index.mjs +1 -1
  79. package/dist/esm/llm/openrouter/toolCache.mjs +1 -1
  80. package/dist/esm/llm/prepareProviderRequest.mjs +1 -1
  81. package/dist/esm/main.mjs +5 -4
  82. package/dist/esm/messages/alternation.mjs +1 -1
  83. package/dist/esm/messages/anthropicServerTools.mjs +18 -0
  84. package/dist/esm/messages/anthropicServerTools.mjs.map +1 -0
  85. package/dist/esm/messages/budget.mjs +1 -1
  86. package/dist/esm/messages/core.mjs +3 -2
  87. package/dist/esm/messages/core.mjs.map +1 -1
  88. package/dist/esm/messages/format.mjs +2 -2
  89. package/dist/esm/messages/index.mjs +1 -1
  90. package/dist/esm/messages/prune.mjs +1 -1
  91. package/dist/esm/messages/recency.mjs +1 -1
  92. package/dist/esm/messages/toolResultTypes.mjs +21 -45
  93. package/dist/esm/messages/toolResultTypes.mjs.map +1 -1
  94. package/dist/esm/protection/providerText.mjs +4 -1
  95. package/dist/esm/protection/providerText.mjs.map +1 -1
  96. package/dist/esm/protection/toolResult.mjs +114 -0
  97. package/dist/esm/protection/toolResult.mjs.map +1 -0
  98. package/dist/esm/run.mjs +7 -1
  99. package/dist/esm/run.mjs.map +1 -1
  100. package/dist/esm/runtime/client.mjs +2 -0
  101. package/dist/esm/runtime/client.mjs.map +1 -1
  102. package/dist/esm/stream.mjs +1 -0
  103. package/dist/esm/stream.mjs.map +1 -1
  104. package/dist/esm/summarization/node.mjs +1 -1
  105. package/dist/esm/tools/ToolNode.mjs +46 -13
  106. package/dist/esm/tools/ToolNode.mjs.map +1 -1
  107. package/dist/esm/tools/search/content.mjs +163 -42
  108. package/dist/esm/tools/search/content.mjs.map +1 -1
  109. package/dist/esm/tools/subagent/SubagentExecutor.mjs +4 -0
  110. package/dist/esm/tools/subagent/SubagentExecutor.mjs.map +1 -1
  111. package/dist/esm/utils/tokens.mjs +7 -2
  112. package/dist/esm/utils/tokens.mjs.map +1 -1
  113. package/dist/types/common/index.d.ts +2 -2
  114. package/dist/types/decisions/breaker.d.ts +2 -2
  115. package/dist/types/decisions/core.d.ts +13 -13
  116. package/dist/types/decisions/dialect.d.ts +1 -1
  117. package/dist/types/decisions/http.d.ts +2 -2
  118. package/dist/types/decisions/index.d.ts +5 -5
  119. package/dist/types/decisions/node.d.ts +2 -2
  120. package/dist/types/decisions/presets.d.ts +2 -2
  121. package/dist/types/decisions/probe.d.ts +1 -1
  122. package/dist/types/decisions/questions.d.ts +1 -1
  123. package/dist/types/decisions/structuredChat.d.ts +2 -2
  124. package/dist/types/decisions/transport.d.ts +1 -1
  125. package/dist/types/eventActor/EventActorExecutor.d.ts +1 -1
  126. package/dist/types/eventActor/index.d.ts +2 -2
  127. package/dist/types/graphs/Graph.d.ts +4 -2
  128. package/dist/types/graphs/MultiAgentGraph.d.ts +1 -1
  129. package/dist/types/graphs/applyGraphRuntimeConfig.d.ts +1 -1
  130. package/dist/types/graphs/graphFactory.d.ts +1 -1
  131. package/dist/types/graphs/index.d.ts +5 -5
  132. package/dist/types/harness/fileBindings.d.ts +2 -2
  133. package/dist/types/harness/fileService.d.ts +2 -2
  134. package/dist/types/harness/fileStream.d.ts +1 -1
  135. package/dist/types/harness/index.d.ts +15 -15
  136. package/dist/types/harness/model.d.ts +1 -1
  137. package/dist/types/harness/modelService.d.ts +2 -2
  138. package/dist/types/harness/modelStreamCallbacks.d.ts +1 -1
  139. package/dist/types/harness/providerText.d.ts +1 -1
  140. package/dist/types/hitl/index.d.ts +3 -3
  141. package/dist/types/hooks/HookRegistry.d.ts +1 -1
  142. package/dist/types/hooks/createToolPolicyHook.d.ts +1 -1
  143. package/dist/types/hooks/createWorkspacePolicyHook.d.ts +1 -1
  144. package/dist/types/hooks/executeHooks.d.ts +2 -2
  145. package/dist/types/hooks/index.d.ts +11 -11
  146. package/dist/types/index.d.ts +62 -60
  147. package/dist/types/langchain/index.d.ts +8 -8
  148. package/dist/types/llm/anthropic/utils/container.d.ts +4 -0
  149. package/dist/types/llm/anthropic/utils/message_inputs.d.ts +1 -1
  150. package/dist/types/llm/anthropic/utils/message_outputs.d.ts +1 -1
  151. package/dist/types/llm/anthropic/utils/stream_events.d.ts +1 -1
  152. package/dist/types/llm/bedrock/index.d.ts +2 -3
  153. package/dist/types/llm/bedrock/utils/harmony.d.ts +1 -1
  154. package/dist/types/llm/bedrock/utils/index.d.ts +2 -2
  155. package/dist/types/llm/bedrock/utils/message_inputs.d.ts +3 -12
  156. package/dist/types/llm/bedrock/utils/message_outputs.d.ts +1 -1
  157. package/dist/types/llm/google/index.d.ts +2 -2
  158. package/dist/types/llm/google/utils/common.d.ts +1 -1
  159. package/dist/types/llm/google/utils/tools.d.ts +1 -1
  160. package/dist/types/llm/openai/index.d.ts +1 -1
  161. package/dist/types/llm/providerRegistry.d.ts +1 -1
  162. package/dist/types/llm/providers.d.ts +1 -1
  163. package/dist/types/messages/anthropicServerTools.d.ts +13 -0
  164. package/dist/types/messages/contextPruning.d.ts +1 -1
  165. package/dist/types/messages/core.d.ts +4 -4
  166. package/dist/types/messages/format.d.ts +1 -1
  167. package/dist/types/messages/index.d.ts +21 -21
  168. package/dist/types/messages/prune.d.ts +1 -1
  169. package/dist/types/openai/index.d.ts +2 -2
  170. package/dist/types/openai/toolProjection.d.ts +1 -1
  171. package/dist/types/prompts/index.d.ts +2 -2
  172. package/dist/types/protection/providerText.d.ts +3 -1
  173. package/dist/types/protection/toolResult.d.ts +69 -0
  174. package/dist/types/provider-registration.d.ts +1 -1
  175. package/dist/types/rerank/bm25.d.ts +1 -1
  176. package/dist/types/rerank/core.d.ts +17 -17
  177. package/dist/types/rerank/crossEncoder.d.ts +3 -3
  178. package/dist/types/rerank/fallback.d.ts +1 -1
  179. package/dist/types/rerank/index.d.ts +2 -2
  180. package/dist/types/rerank/outcome.d.ts +2 -2
  181. package/dist/types/rerank/pin.d.ts +2 -2
  182. package/dist/types/rerank/search.d.ts +1 -1
  183. package/dist/types/rerank/systemone.d.ts +4 -4
  184. package/dist/types/rerank/types.d.ts +1 -1
  185. package/dist/types/run.d.ts +1 -0
  186. package/dist/types/runtime/admission.d.ts +1 -1
  187. package/dist/types/runtime/checkpoint.d.ts +1 -1
  188. package/dist/types/runtime/client.d.ts +2 -2
  189. package/dist/types/runtime/files.d.ts +3 -3
  190. package/dist/types/runtime/hostTools.d.ts +2 -2
  191. package/dist/types/runtime/index.d.ts +12 -12
  192. package/dist/types/runtime/model.d.ts +5 -5
  193. package/dist/types/runtime/policy.d.ts +3 -3
  194. package/dist/types/runtime/recovery/client.d.ts +3 -3
  195. package/dist/types/runtime/recovery/log.d.ts +2 -2
  196. package/dist/types/runtime/recovery/redis.d.ts +1 -1
  197. package/dist/types/runtime/recovery/server.d.ts +3 -3
  198. package/dist/types/runtime/resume.d.ts +1 -1
  199. package/dist/types/runtime/server.d.ts +3 -3
  200. package/dist/types/runtime/snapshot.d.ts +1 -1
  201. package/dist/types/runtime/types.d.ts +2 -2
  202. package/dist/types/session/AgentSession.d.ts +2 -2
  203. package/dist/types/session/JsonlSessionStore.d.ts +1 -1
  204. package/dist/types/session/deriveMessages.d.ts +1 -1
  205. package/dist/types/session/handlers.d.ts +1 -1
  206. package/dist/types/session/index.d.ts +7 -7
  207. package/dist/types/session/messageSerialization.d.ts +1 -1
  208. package/dist/types/session/sessionProjection.d.ts +3 -3
  209. package/dist/types/summarization/index.d.ts +2 -2
  210. package/dist/types/tools/BashProgrammaticToolCalling.d.ts +1 -1
  211. package/dist/types/tools/GitHubCompare.d.ts +6 -6
  212. package/dist/types/tools/ProgrammaticToolCalling.d.ts +1 -1
  213. package/dist/types/tools/ReadFile.d.ts +6 -6
  214. package/dist/types/tools/SkillTool.d.ts +6 -6
  215. package/dist/types/tools/ToolNode.d.ts +5 -1
  216. package/dist/types/tools/cloudflare/index.d.ts +4 -4
  217. package/dist/types/tools/local/FileCheckpointer.d.ts +1 -1
  218. package/dist/types/tools/local/LocalExecutionEngine.d.ts +1 -1
  219. package/dist/types/tools/local/attachments.d.ts +1 -1
  220. package/dist/types/tools/local/index.d.ts +12 -12
  221. package/dist/types/tools/search/anthropic.d.ts +1 -1
  222. package/dist/types/tools/search/content.d.ts +38 -1
  223. package/dist/types/tools/search/crw-scraper.d.ts +1 -1
  224. package/dist/types/tools/search/crw-search.d.ts +1 -1
  225. package/dist/types/tools/search/firecrawl.d.ts +1 -1
  226. package/dist/types/tools/search/format.d.ts +1 -1
  227. package/dist/types/tools/search/highlights.d.ts +1 -1
  228. package/dist/types/tools/search/index.d.ts +3 -3
  229. package/dist/types/tools/search/keenable-scraper.d.ts +1 -1
  230. package/dist/types/tools/search/keenable-search.d.ts +1 -1
  231. package/dist/types/tools/search/metrics.d.ts +1 -1
  232. package/dist/types/tools/search/rerankers.d.ts +1 -1
  233. package/dist/types/tools/search/schema.d.ts +6 -6
  234. package/dist/types/tools/search/search.d.ts +1 -1
  235. package/dist/types/tools/search/serper-scraper.d.ts +1 -1
  236. package/dist/types/tools/search/tavily-scraper.d.ts +1 -1
  237. package/dist/types/tools/search/tavily-search.d.ts +1 -1
  238. package/dist/types/tools/search/tool.d.ts +3 -3
  239. package/dist/types/tools/search/types.d.ts +2 -2
  240. package/dist/types/tools/search/utils.d.ts +3 -3
  241. package/dist/types/tools/subagent/SubagentExecutionRegistry.d.ts +1 -1
  242. package/dist/types/tools/subagent/SubagentExecutor.d.ts +6 -3
  243. package/dist/types/tools/subagent/diagnostics.d.ts +1 -1
  244. package/dist/types/tools/subagent/index.d.ts +7 -7
  245. package/dist/types/types/attachments.d.ts +1 -1
  246. package/dist/types/types/graph.d.ts +4 -1
  247. package/dist/types/types/index.d.ts +14 -14
  248. package/dist/types/types/llm.d.ts +2 -2
  249. package/dist/types/types/run.d.ts +3 -1
  250. package/dist/types/types/subagentTasks.d.ts +2 -2
  251. package/dist/types/types/tools.d.ts +6 -3
  252. package/dist/types/utils/index.d.ts +10 -10
  253. package/dist/types/utils/tokens.d.ts +1 -0
  254. package/package.json +3 -2
  255. package/src/graphs/Graph.ts +22 -0
  256. package/src/index.ts +8 -0
  257. package/src/llm/anthropic/index.ts +11 -3
  258. package/src/llm/anthropic/utils/container.ts +63 -0
  259. package/src/llm/anthropic/utils/message_inputs.ts +57 -51
  260. package/src/llm/anthropic/utils/message_outputs.ts +12 -39
  261. package/src/llm/anthropic/utils/stream_events.ts +17 -12
  262. package/src/llm/bedrock/index.ts +7 -5
  263. package/src/llm/bedrock/utils/message_inputs.ts +28 -35
  264. package/src/llm/google/utils/common.ts +88 -36
  265. package/src/llm/init.ts +35 -3
  266. package/src/messages/anthropicServerTools.ts +24 -0
  267. package/src/messages/core.ts +12 -11
  268. package/src/messages/toolResultTypes.ts +80 -88
  269. package/src/protection/providerText.ts +127 -40
  270. package/src/protection/toolResult.ts +272 -0
  271. package/src/run.ts +15 -4
  272. package/src/runtime/client.ts +3 -0
  273. package/src/stream.ts +5 -0
  274. package/src/tools/ToolNode.ts +112 -17
  275. package/src/tools/search/content.ts +282 -62
  276. package/src/tools/subagent/SubagentExecutor.ts +6 -0
  277. package/src/types/graph.ts +3 -0
  278. package/src/types/run.ts +3 -0
  279. package/src/types/tools.ts +3 -0
  280. package/src/utils/tokens.ts +28 -2
@@ -1,21 +1,21 @@
1
- export * from './core';
2
- export * from './ids';
3
- export * from './prune';
4
- export { syncBudgetDerivedFields } from './budget';
5
- export * from './format';
6
- export * from './cache';
7
- export * from './anthropicToolCache';
8
- export * from './content';
9
- export * from './tools';
10
- export * from './injected';
11
- export * from './alternation';
12
- export * from './handoffCue';
13
- export * from './contextPruning';
14
- export * from './contextPruningSettings';
15
- export * from './reducer';
16
- export * from './recency';
17
- export * from './assistantPhase';
18
- export * from './provenance';
19
- export * from './projectionInvariant';
20
- export * from './fading';
21
- export { toStoredMessage } from './stored';
1
+ export * from './core.js';
2
+ export * from './ids.js';
3
+ export * from './prune.js';
4
+ export { syncBudgetDerivedFields } from './budget.js';
5
+ export * from './format.js';
6
+ export * from './cache.js';
7
+ export * from './anthropicToolCache.js';
8
+ export * from './content.js';
9
+ export * from './tools.js';
10
+ export * from './injected.js';
11
+ export * from './alternation.js';
12
+ export * from './handoffCue.js';
13
+ export * from './contextPruning.js';
14
+ export * from './contextPruningSettings.js';
15
+ export * from './reducer.js';
16
+ export * from './recency.js';
17
+ export * from './assistantPhase.js';
18
+ export * from './provenance.js';
19
+ export * from './projectionInvariant.js';
20
+ export * from './fading.js';
21
+ export { toStoredMessage } from './stored.js';
@@ -1,6 +1,6 @@
1
1
  import { BaseMessage, UsageMetadata } from '@langchain/core/messages';
2
2
  import type { ContextPruningConfig, FadingTier } from '../types/graph.js';
3
- import type { FadingCaps } from './fading';
3
+ import type { FadingCaps } from './fading.js';
4
4
  import type { TokenCounter } from '../types/run.js';
5
5
  import type { ProviderName } from '../types/index.js';
6
6
  import { ContentTypes } from '../common/index.js';
@@ -73,5 +73,5 @@ export declare function createChatCompletionUsageChunk(context: OpenAIResponseCo
73
73
  export declare function writeOpenAISSE(writer: OpenAICompatibleWriter, data: OpenAIChatCompletionChunk | '[DONE]'): Promise<void>;
74
74
  export declare function createOpenAIHandlers(config: OpenAIHandlerConfig): Record<string, t.EventHandler>;
75
75
  export declare function sendOpenAIFinalChunk(config: OpenAIHandlerConfig, finishReason?: OpenAIChatCompletionChunkChoice['finish_reason']): Promise<void>;
76
- export { createOpenAIToolCallStream } from './toolProjection';
77
- export type { OpenAIToolCallStream, OpenAIToolCallStreamConfig, } from './toolProjection';
76
+ export { createOpenAIToolCallStream } from './toolProjection.js';
77
+ export type { OpenAIToolCallStream, OpenAIToolCallStreamConfig, } from './toolProjection.js';
@@ -1,4 +1,4 @@
1
- import type { OpenAIChatCompletionChunkChoice, OpenAIToolCall, OpenAIStreamTracker } from './index';
1
+ import type { OpenAIChatCompletionChunkChoice, OpenAIToolCall, OpenAIStreamTracker } from './index.js';
2
2
  import type { EventHandler } from '../types/index.js';
3
3
  interface OpenAIToolCallStreamOptions {
4
4
  /** Synchronous framing only. Async transport/backpressure is a separate boundary. */
@@ -1,2 +1,2 @@
1
- export * from './collab';
2
- export * from './taskmanager';
1
+ export * from './collab.js';
2
+ export * from './taskmanager.js';
@@ -1,4 +1,4 @@
1
- import type { ProviderTextAdmission } from './providerTextAdmission';
1
+ import type { ProviderTextAdmission } from './providerTextAdmission.js';
2
2
  export declare const PROVIDER_TEXT_PROTECTION_VERSION = 1;
3
3
  export type ProviderTextProtectionErrorCode = 'blocked' | 'unavailable' | 'timeout' | 'overflow' | 'cancelled' | 'unsupported' | 'incompatible';
4
4
  export type ProviderTextProtectionResult = {
@@ -89,3 +89,5 @@ export declare class ProviderTextAttempt {
89
89
  release(): Promise<string>;
90
90
  finish(): void;
91
91
  }
92
+ /** Returns the canonical text of a host inspection result, or throws its failure code. */
93
+ export declare function readProviderTextResult(result: ProviderTextProtectionResult): string;
@@ -0,0 +1,69 @@
1
+ import { ToolMessage } from '@langchain/core/messages';
2
+ import type { ProviderTextProtection, ProviderTextProtectionResult, ProviderTextProtectionErrorCode } from './providerText.js';
3
+ import type { ToolExecuteResult } from '../types/tools.js';
4
+ import { ProviderTextProtectionError } from './providerText.js';
5
+ export declare const TOOL_RESULT_PROTECTION_VERSION = 1;
6
+ export type ToolResultProtectionResult = ProviderTextProtectionResult;
7
+ /**
8
+ * Host inspection of the text returned by selected tools. Default off.
9
+ *
10
+ * The SDK calls `inspect` on a selected tool's text before anything else reads
11
+ * it: hooks, completion events, the output reference registry, checkpoints and
12
+ * the model all receive the inspected text. A failed inspection ends the run
13
+ * with a {@link ToolResultProtectionError}.
14
+ *
15
+ * Trust boundary: the tool's text is untrusted data; code running in the host
16
+ * process is trusted. Tools, hooks, event handlers, callbacks and checkpoint
17
+ * savers are not defended against, text they author is not inspected, and
18
+ * history the host supplies is the host's to have inspected. Tracing observes
19
+ * a selected tool's raw result; redact those tools with the tracing
20
+ * configuration.
21
+ *
22
+ * Selected tools must return plain text. A structured result, an artifact or a
23
+ * `Command` fails as `unsupported`. Selected tools are not offered to
24
+ * programmatic tool calling, are not started eagerly, and cannot be client
25
+ * delegated. Unselected tools are untouched.
26
+ */
27
+ export interface ToolResultProtection {
28
+ readonly version: 1;
29
+ readonly toolNames: readonly string[];
30
+ readonly timeoutMs: number;
31
+ readonly maxAttemptBytes: number;
32
+ /** Shared across all inspections using this policy, including child graphs. */
33
+ readonly maxBufferedBytes: number;
34
+ readonly classify: (content: string) => 'prose' | 'unsupported';
35
+ readonly inspect: (input: {
36
+ readonly version: 1;
37
+ readonly content: string;
38
+ readonly toolName: string;
39
+ readonly toolCallId: string;
40
+ readonly target: {
41
+ readonly source: 'tool_argument';
42
+ readonly field: 'output';
43
+ readonly provenance: 'tool';
44
+ readonly outcome: ToolResultOutcome;
45
+ };
46
+ readonly signal: AbortSignal;
47
+ }) => ToolResultProtectionResult | Promise<ToolResultProtectionResult>;
48
+ }
49
+ export declare class ToolResultProtectionError extends ProviderTextProtectionError {
50
+ constructor(code: ProviderTextProtectionErrorCode);
51
+ }
52
+ export type ToolResultOutcome = 'success' | 'error';
53
+ export interface ToolResultCall {
54
+ readonly name: string;
55
+ readonly id: string;
56
+ }
57
+ /** A validated policy. One per policy object, so every graph of a run shares its byte budget. */
58
+ export interface ToolResultGate {
59
+ readonly policy: ToolResultProtection;
60
+ readonly toolNames: ReadonlySet<string>;
61
+ readonly budget: ProviderTextProtection;
62
+ }
63
+ export declare function createToolResultGate(policy: ToolResultProtection): ToolResultGate;
64
+ /** Returns the inspected text, or throws; the raw text and inspector errors never leave. */
65
+ export declare function inspectToolText(gate: ToolResultGate, call: ToolResultCall, content: string, outcome: ToolResultOutcome, signal?: AbortSignal): Promise<string>;
66
+ /** Inspects what a selected in-process tool returned. */
67
+ export declare function inspectToolOutput(gate: ToolResultGate, call: ToolResultCall, output: unknown, signal?: AbortSignal): Promise<ToolMessage | string>;
68
+ /** Inspects what the host returned for a selected tool call. */
69
+ export declare function inspectToolExecuteResult(gate: ToolResultGate, call: ToolResultCall, result: ToolExecuteResult, signal?: AbortSignal): Promise<ToolExecuteResult>;
@@ -12,4 +12,4 @@ export interface ProviderRegistrationOptions<TOptions extends object, TModel ext
12
12
  manualToolStream?: boolean;
13
13
  strictAlternation?: boolean;
14
14
  }
15
- export { registerProvider } from './llm/providers';
15
+ export { registerProvider } from './llm/providers.js';
@@ -1,4 +1,4 @@
1
- import type { OutcomeReranker } from './types';
1
+ import type { OutcomeReranker } from './types.js';
2
2
  /**
3
3
  * Codegraph's measured BM25 tokenizer for code and its prose: camelCase,
4
4
  * snake_case, kebab-case, dotted names, and paths split into words, which
@@ -5,20 +5,20 @@
5
5
  * import. The web-search adapter stays on the root entry because it extends
6
6
  * the search tool's reranker.
7
7
  */
8
- export type * from './types';
9
- export { createSystemOneReranker } from './systemone';
10
- export type { SystemOnePin, SystemOneMode, SystemOneReranker, SystemOneRerankerOptions, } from './systemone';
11
- export { createCrossEncoderReranker } from './crossEncoder';
12
- export type { CrossEncoderRerankerOptions } from './crossEncoder';
13
- export { createBm25Reranker, corpusStats, tokenizeCode } from './bm25';
14
- export type { Bm25RerankerOptions, CorpusStats, Tokenize } from './bm25';
15
- export { noneReranker, withFallback, STEP_GRACE_MS } from './fallback';
16
- export type { FallbackStep, FallbackOptions, FallbackReranker, } from './fallback';
17
- export { probePin, PIN_SENTINEL_MODEL } from './pin';
18
- export type { PinProbe, PinProbeOptions } from './pin';
19
- export { createSemaphore } from './semaphore';
20
- export type { RerankSemaphore } from './semaphore';
21
- export { createScoreCache } from './cache';
22
- export type { RerankCacheKey, RerankScoreCache, MemoryScoreCache, ScoreCacheOptions, } from './cache';
23
- export { rerankCost, rankedEntries, estimatedUsage, identityOutcome, emptyRerankUsage, toOutcomeReranker, isRerankPermutation, ESTIMATED_TOKENS_PER_DOCUMENT, } from './outcome';
24
- export type { RerankCost, RerankPrice, RerankPrices } from './outcome';
8
+ export type * from './types.js';
9
+ export { createSystemOneReranker } from './systemone.js';
10
+ export type { SystemOnePin, SystemOneMode, SystemOneReranker, SystemOneRerankerOptions, } from './systemone.js';
11
+ export { createCrossEncoderReranker } from './crossEncoder.js';
12
+ export type { CrossEncoderRerankerOptions } from './crossEncoder.js';
13
+ export { createBm25Reranker, corpusStats, tokenizeCode } from './bm25.js';
14
+ export type { Bm25RerankerOptions, CorpusStats, Tokenize } from './bm25.js';
15
+ export { noneReranker, withFallback, STEP_GRACE_MS } from './fallback.js';
16
+ export type { FallbackStep, FallbackOptions, FallbackReranker, } from './fallback.js';
17
+ export { probePin, PIN_SENTINEL_MODEL } from './pin.js';
18
+ export type { PinProbe, PinProbeOptions } from './pin.js';
19
+ export { createSemaphore } from './semaphore.js';
20
+ export type { RerankSemaphore } from './semaphore.js';
21
+ export { createScoreCache } from './cache.js';
22
+ export type { RerankCacheKey, RerankScoreCache, MemoryScoreCache, ScoreCacheOptions, } from './cache.js';
23
+ export { rerankCost, rankedEntries, estimatedUsage, identityOutcome, emptyRerankUsage, toOutcomeReranker, isRerankPermutation, ESTIMATED_TOKENS_PER_DOCUMENT, } from './outcome.js';
24
+ export type { RerankCost, RerankPrice, RerankPrices } from './outcome.js';
@@ -1,6 +1,6 @@
1
- import type { OutcomeReranker } from './types';
2
- import type { DecisionCredential } from '../decisions/types';
3
- import type { DecisionFetch } from '../decisions/transport';
1
+ import type { OutcomeReranker } from './types.js';
2
+ import type { DecisionCredential } from '../decisions/types.js';
3
+ import type { DecisionFetch } from '../decisions/transport.js';
4
4
  export interface CrossEncoderRerankerOptions {
5
5
  /**
6
6
  * Full URL of a Cohere-shaped rerank endpoint: Cohere's `/v2/rerank`,
@@ -1,4 +1,4 @@
1
- import type { RerankOutcome, OutcomeReranker } from './types';
1
+ import type { RerankOutcome, OutcomeReranker } from './types.js';
2
2
  /**
3
3
  * Identity order, never a request: the last step of a chain, or the whole
4
4
  * chain when nothing is configured. Its one attempt is `skipped` with
@@ -1,2 +1,2 @@
1
- export * from './core';
2
- export { createWebSearchReranker } from './search';
1
+ export * from './core.js';
2
+ export { createWebSearchReranker } from './search.js';
@@ -1,5 +1,5 @@
1
- import type { Reranker, RerankKind, RerankEntry, RerankUsage, RerankReason, RerankOutcome, OutcomeReranker } from './types';
2
- import { DecisionError } from '../decisions/types';
1
+ import type { Reranker, RerankKind, RerankEntry, RerankUsage, RerankReason, RerankOutcome, OutcomeReranker } from './types.js';
2
+ import { DecisionError } from '../decisions/types.js';
3
3
  /** Longest deadline a step may have; matches `withDecisionDeadline`. */
4
4
  export declare const MAX_RERANK_DEADLINE_MS = 3600000;
5
5
  /**
@@ -1,5 +1,5 @@
1
- import type { DecisionModel } from '../decisions/types';
2
- import type { RerankReason } from './types';
1
+ import type { DecisionModel } from '../decisions/types.js';
2
+ import type { RerankReason } from './types.js';
3
3
  /** A model id no host serves: a host that answers it echoes whatever it is asked, so its echo proves nothing. */
4
4
  export declare const PIN_SENTINEL_MODEL = "jev-0.0.0-pin-sentinel";
5
5
  export interface PinProbeOptions {
@@ -1,5 +1,5 @@
1
1
  import type { Logger, SearchReranker } from '../tools/search/types.js';
2
- import type { Reranker } from './types';
2
+ import type { Reranker } from './types.js';
3
3
  /** Adapts index-based rankings to web-search highlights and its existing metrics/fallback policy. */
4
4
  export declare function createWebSearchReranker(reranker: Reranker, options?: {
5
5
  timeoutMs?: number;
@@ -1,7 +1,7 @@
1
- import type { Reranker, OutcomeReranker } from './types';
2
- import type { DecisionText, DecisionState, DecisionModel } from '../decisions/types';
3
- import type { RerankScoreCache } from './cache';
4
- import type { RerankSemaphore } from './semaphore';
1
+ import type { Reranker, OutcomeReranker } from './types.js';
2
+ import type { DecisionText, DecisionState, DecisionModel } from '../decisions/types.js';
3
+ import type { RerankScoreCache } from './cache.js';
4
+ import type { RerankSemaphore } from './semaphore.js';
5
5
  /**
6
6
  * `document` (the default) asks one score question per candidate, one request
7
7
  * each. `batch` asks every candidate in one request; its scores follow input
@@ -1,4 +1,4 @@
1
- import type { DecisionUsage } from '../decisions/types';
1
+ import type { DecisionUsage } from '../decisions/types.js';
2
2
  export interface RerankRequest {
3
3
  query: string;
4
4
  documents: readonly string[];
@@ -22,6 +22,7 @@ export declare class Run<_T extends t.BaseGraphState> {
22
22
  private preemption?;
23
23
  private maxStopContinuations;
24
24
  private providerTextProtection?;
25
+ private toolResultProtection?;
25
26
  private resolveAttachment?;
26
27
  private streamLimits?;
27
28
  private subagentTasks?;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import type { Callbacks } from '@langchain/core/callbacks/manager';
3
3
  import type { BaseCallbackHandler } from '@langchain/core/callbacks/base';
4
- import type { SdkRpc } from './peer';
4
+ import type { SdkRpc } from './peer.js';
5
5
  import { HostChatModel } from '../index.js';
6
6
  export interface RemoteModelAttempt {
7
7
  nodeId: string;
@@ -1,4 +1,4 @@
1
- import type { SdkRpc } from './peer';
1
+ import type { SdkRpc } from './peer.js';
2
2
  import { BaseCheckpointSaver } from '../index.js';
3
3
  type Saver = BaseCheckpointSaver;
4
4
  /** The host retains its durable saver; the worker never receives database credentials. */
@@ -1,6 +1,6 @@
1
1
  import type { RunConfig } from '../index.js';
2
- import type { RemoteSdkHostServices, RemoteSdkOptions, RemoteSdkResumeState } from './types';
3
- import type { SdkAgentIdentity } from './identity';
2
+ import type { RemoteSdkHostServices, RemoteSdkOptions, RemoteSdkResumeState } from './types.js';
3
+ import type { SdkAgentIdentity } from './identity.js';
4
4
  import { Run } from '../index.js';
5
5
  /** Construct a real local Run whose execution is delegated to one operator-trusted runtime. */
6
6
  export declare function createRemoteSdkRun({ config, identity, remote, resumeState, hostServices, }: {
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import type { HostFileDescriptor, HostFileBindings } from '../index.js';
3
- import type { RemoteSdkHostServices, RemoteSdkLimits, RemoteSdkStart } from './types';
4
- import type { SdkAgentIdentity } from './identity';
5
- import type { SdkRpc } from './peer';
3
+ import type { RemoteSdkHostServices, RemoteSdkLimits, RemoteSdkStart } from './types.js';
4
+ import type { SdkAgentIdentity } from './identity.js';
5
+ import type { SdkRpc } from './peer.js';
6
6
  export declare const fileChannelSchema: z.ZodObject<{
7
7
  version: z.ZodLiteral<1>;
8
8
  publicKey: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  import type { EventHandler, HostToolDescriptor, HostToolService, ToolExecuteResult } from '../index.js';
2
- import type { SdkAgentIdentity } from './identity';
3
- import type { SdkRpc } from './peer';
2
+ import type { SdkAgentIdentity } from './identity.js';
3
+ import type { SdkRpc } from './peer.js';
4
4
  /** Local credentials/configuration are supplied by the authenticated host, never by the worker. */
5
5
  export declare function createHostToolService(options: {
6
6
  identity: Readonly<SdkAgentIdentity>;
@@ -1,12 +1,12 @@
1
- export { createRemoteSdkServer } from './server';
2
- export { createRemoteSdkRun } from './client';
3
- export { createRedisRuntimeJournal } from './recovery/redis';
4
- export type { RemoteSdkServerOptions } from './server';
5
- export type { SdkAgentIdentity } from './identity';
6
- export type { RemoteSdkFactoryInput, RemoteSdkHostServices, RemoteSdkOptions, RemoteSdkResumeState, RemoteSdkLimits, RemoteSdkModelProfile, } from './types';
7
- export type { HostModelLifecycle, RemoteModelAttempt } from './admission';
8
- export type { RuntimeJournalRedis, RuntimeJournalLimits, } from './recovery/redis';
9
- export type { RuntimeJournal, RuntimeJournalSession, RuntimeJournalLease, RuntimeJournalResult, RuntimeJournalState, RuntimeJournalFailure, } from './recovery/journal';
10
- export type { RuntimeRecoveryOptions } from './recovery/server';
11
- export type { RemoteSdkRecoveryOptions } from './types';
12
- export { normalizeResumeRunStepIndices, hydrateResumeRunSteps, createContentIndexOffsetHandlers, } from './resume';
1
+ export { createRemoteSdkServer } from './server.js';
2
+ export { createRemoteSdkRun } from './client.js';
3
+ export { createRedisRuntimeJournal } from './recovery/redis.js';
4
+ export type { RemoteSdkServerOptions } from './server.js';
5
+ export type { SdkAgentIdentity } from './identity.js';
6
+ export type { RemoteSdkFactoryInput, RemoteSdkHostServices, RemoteSdkOptions, RemoteSdkResumeState, RemoteSdkLimits, RemoteSdkModelProfile, } from './types.js';
7
+ export type { HostModelLifecycle, RemoteModelAttempt } from './admission.js';
8
+ export type { RuntimeJournalRedis, RuntimeJournalLimits, } from './recovery/redis.js';
9
+ export type { RuntimeJournal, RuntimeJournalSession, RuntimeJournalLease, RuntimeJournalResult, RuntimeJournalState, RuntimeJournalFailure, } from './recovery/journal.js';
10
+ export type { RuntimeRecoveryOptions } from './recovery/server.js';
11
+ export type { RemoteSdkRecoveryOptions } from './types.js';
12
+ export { normalizeResumeRunStepIndices, hydrateResumeRunSteps, createContentIndexOffsetHandlers, } from './resume.js';
@@ -1,9 +1,9 @@
1
- import type { RemoteSdkFactoryInput, RemoteSdkHostServices, RemoteSdkLimits, RemoteSdkStart } from './types';
1
+ import type { RemoteSdkFactoryInput, RemoteSdkHostServices, RemoteSdkLimits, RemoteSdkStart } from './types.js';
2
2
  import type { HostModelErrorCode } from '../index.js';
3
- import type { HostModelLifecycle, WorkerModelLifecycle } from './admission';
4
- import type { SdkAgentIdentity } from './identity';
5
- import type { SdkRpc } from './peer';
6
- import { createPolicySender } from './sealed';
3
+ import type { HostModelLifecycle, WorkerModelLifecycle } from './admission.js';
4
+ import type { SdkAgentIdentity } from './identity.js';
5
+ import type { SdkRpc } from './peer.js';
6
+ import { createPolicySender } from './sealed.js';
7
7
  type ModelFailure = {
8
8
  version: 1;
9
9
  ok: false;
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import type { HostProviderTextDescriptor, ProviderTextProtectionErrorCode, ProviderTextProtection } from '../index.js';
3
- import type { RemoteSdkHostServices, RemoteSdkStart, RemoteSdkLimits } from './types';
4
- import type { SdkAgentIdentity } from './identity';
5
- import type { SdkRpc } from './peer';
3
+ import type { RemoteSdkHostServices, RemoteSdkStart, RemoteSdkLimits } from './types.js';
4
+ import type { SdkAgentIdentity } from './identity.js';
5
+ import type { SdkRpc } from './peer.js';
6
6
  export declare const policyDescriptorSchema: z.ZodObject<{
7
7
  version: z.ZodLiteral<1>;
8
8
  publicKey: z.ZodString;
@@ -1,6 +1,6 @@
1
- import type { RemoteSdkLimits, RemoteSdkRecoveryOptions } from '../types';
2
- import type { RecoveryClaim } from './server';
3
- import { RecoverySocket } from './socket';
1
+ import type { RemoteSdkLimits, RemoteSdkRecoveryOptions } from '../types.js';
2
+ import type { RecoveryClaim } from './server.js';
3
+ import { RecoverySocket } from './socket.js';
4
4
  export declare function connectRecoveringSdkSocket(options: {
5
5
  url: string;
6
6
  token: (claim: RecoveryClaim) => string;
@@ -1,5 +1,5 @@
1
- import type { RuntimeJournal, RuntimeJournalLease, RuntimeJournalSession, RuntimeJournalResult } from './journal';
2
- import type { RecoveryLog } from './socket';
1
+ import type { RuntimeJournal, RuntimeJournalLease, RuntimeJournalSession, RuntimeJournalResult } from './journal.js';
2
+ import type { RecoveryLog } from './socket.js';
3
3
  export declare function journalValue<T>(result: RuntimeJournalResult<T>): T;
4
4
  export declare function createJournalRecoveryLog(options: {
5
5
  journal: RuntimeJournal;
@@ -1,4 +1,4 @@
1
- import type { RuntimeJournal } from './journal';
1
+ import type { RuntimeJournal } from './journal.js';
2
2
  /** Operator-supplied client; no app singleton or credentials cross the runtime boundary. */
3
3
  export interface RuntimeJournalRedis {
4
4
  evalsha?(sha: string, numberOfKeys: number, ...args: Array<string | number>): Promise<unknown>;
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import type { WebSocket } from 'ws';
3
- import type { RuntimeJournal, RuntimeJournalState } from './journal';
4
- import type { SdkAgentIdentity } from '../identity';
5
- import { RecoverySocket } from './socket';
3
+ import type { RuntimeJournal, RuntimeJournalState } from './journal.js';
4
+ import type { SdkAgentIdentity } from '../identity.js';
5
+ import { RecoverySocket } from './socket.js';
6
6
  export interface RecoveryClaim {
7
7
  ownerId?: string;
8
8
  sessionId: string;
@@ -1,5 +1,5 @@
1
1
  import type { EventHandler, MessageContentComplex, RunStep } from '../index.js';
2
- import type { RemoteSdkSnapshot } from './types';
2
+ import type { RemoteSdkSnapshot } from './types.js';
3
3
  type ResumableRunStep = {
4
4
  id: string;
5
5
  index: number;
@@ -1,7 +1,7 @@
1
1
  import type { Server } from 'node:http';
2
- import type { RemoteSdkFactoryInput, RemoteSdkLimits, SdkRun } from './types';
3
- import type { RuntimeRecoveryOptions } from './recovery/server';
4
- import type { SdkAgentIdentity } from './identity';
2
+ import type { RemoteSdkFactoryInput, RemoteSdkLimits, SdkRun } from './types.js';
3
+ import type { RuntimeRecoveryOptions } from './recovery/server.js';
4
+ import type { SdkAgentIdentity } from './identity.js';
5
5
  export interface RemoteSdkServerOptions extends Partial<RemoteSdkLimits> {
6
6
  recovery?: RuntimeRecoveryOptions;
7
7
  runtimeId: string;
@@ -1,4 +1,4 @@
1
- import type { RemoteSdkSnapshot, RemoteSdkLimits } from './types';
1
+ import type { RemoteSdkSnapshot, RemoteSdkLimits } from './types.js';
2
2
  /** One bounded transfer per execution; chunks precede the terminal receipt in the ordered durable stream. */
3
3
  export declare function createSnapshotReceiver(maxBytes: number): {
4
4
  accept(data: unknown): null;
@@ -1,6 +1,6 @@
1
1
  import type { RunStep, AgentInputs, createHostFileService, HostFileBindings, HostFileDescriptor, HostFileServiceDescriptor, createHostProviderTextService, createHostModelService, HostModelDescriptor, HostChatModel, HostProviderTextDescriptor, HostToolDescriptor, HostToolBindings, Run, RunConfig, EventHandler, IState, HookEvent } from '../index.js';
2
- import type { HostModelLifecycle } from './admission';
3
- import type { SdkAgentIdentity } from './identity';
2
+ import type { HostModelLifecycle } from './admission.js';
3
+ import type { SdkAgentIdentity } from './identity.js';
4
4
  export interface RemoteSdkRecoveryOptions {
5
5
  /** Operator-allowlisted direct worker routes, keyed by stable owner identity. */
6
6
  routes?: Record<string, string>;
@@ -1,6 +1,6 @@
1
1
  import type { BaseCheckpointSaver } from '@langchain/langgraph';
2
- import type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, SessionBranchOptions, SessionCompactOptions, SessionForkOptions } from './types';
3
- import { JsonlSessionStore } from './JsonlSessionStore';
2
+ import type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, SessionBranchOptions, SessionCompactOptions, SessionForkOptions } from './types.js';
3
+ import { JsonlSessionStore } from './JsonlSessionStore.js';
4
4
  export declare class AgentSession {
5
5
  private runConfig;
6
6
  private store;
@@ -1,5 +1,5 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { CreateSessionFileOptions, SessionBranchOptions, SessionEntry, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionCheckpointEntry, SessionCompactionEntry, SessionRunEventEntry, SessionSummaryEntry, SessionStateEntry, SessionFadingState, SessionTreeNode } from './types';
2
+ import type { CreateSessionFileOptions, SessionBranchOptions, SessionEntry, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionCheckpointEntry, SessionCompactionEntry, SessionRunEventEntry, SessionSummaryEntry, SessionStateEntry, SessionFadingState, SessionTreeNode } from './types.js';
3
3
  export declare class JsonlSessionStore {
4
4
  readonly path: string;
5
5
  readonly header: SessionHeader;
@@ -1,5 +1,5 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { SessionEntry } from './types';
2
+ import type { SessionEntry } from './types.js';
3
3
  export interface DerivedSessionMessages {
4
4
  initialSummary?: {
5
5
  text: string;
@@ -1,4 +1,4 @@
1
- import type { AgentSessionHandlersResult, AgentSessionStreamEvent } from './types';
1
+ import type { AgentSessionHandlersResult, AgentSessionStreamEvent } from './types.js';
2
2
  import type * as t from '../types/index.js';
3
3
  export declare function createRunHandlers(params: {
4
4
  runId: string;
@@ -1,7 +1,7 @@
1
- export { AgentSession, createAgentSession } from './AgentSession';
2
- export { deriveMessages } from './deriveMessages';
3
- export { JsonlSessionStore, SessionManager } from './JsonlSessionStore';
4
- export { createRunHandlers } from './handlers';
5
- export { serializeMessage, deserializeMessage, extractTextFromContent, } from './messageSerialization';
6
- export type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionCheckpointing, AgentSessionCheckpointingOptions, AgentSessionHandlersResult, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, AgentSessionStreamEvent, AgentSessionUsage, CreateSessionFileOptions, JsonObject, JsonPrimitive, JsonValue, SerializedSessionMessage, SessionBranchOptions, SessionCompactOptions, SessionCheckpointEntry, SessionCompactionEntry, SessionEntry, SessionEntryBase, SessionEntryType, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionPosition, SessionRunEventEntry, SessionStateEntry, SessionSummaryEntry, SessionTreeNode, } from './types';
7
- export type { DerivedSessionMessages } from './deriveMessages';
1
+ export { AgentSession, createAgentSession } from './AgentSession.js';
2
+ export { deriveMessages } from './deriveMessages.js';
3
+ export { JsonlSessionStore, SessionManager } from './JsonlSessionStore.js';
4
+ export { createRunHandlers } from './handlers.js';
5
+ export { serializeMessage, deserializeMessage, extractTextFromContent, } from './messageSerialization.js';
6
+ export type { AgentSessionConfig, AgentSessionCheckpointLookupOptions, AgentSessionCheckpointReference, AgentSessionCheckpointing, AgentSessionCheckpointingOptions, AgentSessionHandlersResult, AgentSessionInput, AgentSessionRunOptions, AgentSessionRunResult, AgentSessionStream, AgentSessionStreamEvent, AgentSessionUsage, CreateSessionFileOptions, JsonObject, JsonPrimitive, JsonValue, SerializedSessionMessage, SessionBranchOptions, SessionCompactOptions, SessionCheckpointEntry, SessionCompactionEntry, SessionEntry, SessionEntryBase, SessionEntryType, SessionForkOptions, SessionHeader, SessionLabelEntry, SessionListItem, SessionMessageEntry, SessionPosition, SessionRunEventEntry, SessionStateEntry, SessionSummaryEntry, SessionTreeNode, } from './types.js';
7
+ export type { DerivedSessionMessages } from './deriveMessages.js';
@@ -1,5 +1,5 @@
1
1
  import { BaseMessage } from '@langchain/core/messages';
2
- import type { JsonValue, SerializedSessionMessage } from './types';
2
+ import type { JsonValue, SerializedSessionMessage } from './types.js';
3
3
  export declare function toJsonValue(value: unknown): JsonValue;
4
4
  export declare function serializeMessage(message: BaseMessage): SerializedSessionMessage;
5
5
  export declare function deserializeMessage(serialized: SerializedSessionMessage): BaseMessage;
@@ -1,6 +1,6 @@
1
- import type { DerivedSessionMessages } from './deriveMessages';
2
- import type { SessionEntry } from './types';
3
- import type { JsonlSessionStore } from './JsonlSessionStore';
1
+ import type { DerivedSessionMessages } from './deriveMessages.js';
2
+ import type { SessionEntry } from './types.js';
3
+ import type { JsonlSessionStore } from './JsonlSessionStore.js';
4
4
  /** Internal: only AgentSession's unexposed stores may reuse log topology. */
5
5
  export declare function initializeSessionProjection(store: JsonlSessionStore, entries: readonly SessionEntry[]): void;
6
6
  /** Forks share entry references, so exposing either disables the whole family. */
@@ -4,8 +4,8 @@ import type { SummarizationTrigger } from '../types/index.js';
4
4
  * default prompts stay out of it: LibreChat's manual flow deliberately words
5
5
  * its own, so exporting these would publish an API with no consumer.
6
6
  */
7
- export { buildSummarizationInstruction, buildSummaryCarrierText, separateSummarizationParameters, ManualSummarizationSkippedError, } from './shared';
8
- export type { ManualSummarizationSkipReason } from './shared';
7
+ export { buildSummarizationInstruction, buildSummaryCarrierText, separateSummarizationParameters, ManualSummarizationSkippedError, } from './shared.js';
8
+ export type { ManualSummarizationSkipReason } from './shared.js';
9
9
  /** For tests only. Resets the dedup set so warnings can be observed again. */
10
10
  export declare function _resetUnrecognizedTriggerWarnings(): void;
11
11
  /**
@@ -1,5 +1,5 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout';
2
+ import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout.js';
3
3
  import type * as t from '../types/index.js';
4
4
  import { Constants } from '../common/index.js';
5
5
  export declare function createBashProgrammaticToolCallingSchema(maxRunTimeoutMs?: number): ProgrammaticToolCallingJsonSchema;