@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
@@ -7,13 +7,13 @@ export declare const GitHubCompareToolSchema: {
7
7
  readonly intent: {
8
8
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
9
9
  readonly enum?: string[];
10
- readonly items?: import("..").JsonSchemaType;
11
- readonly properties?: Record<string, import("..").JsonSchemaType>;
10
+ readonly items?: import("../index.js").JsonSchemaType;
11
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
12
12
  readonly required?: string[];
13
13
  readonly description?: string;
14
14
  readonly pattern?: string;
15
15
  readonly maxLength?: number;
16
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
16
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
17
17
  };
18
18
  readonly owner: {
19
19
  readonly type: "string";
@@ -43,13 +43,13 @@ export declare const GitHubCompareToolDefinition: {
43
43
  readonly intent: {
44
44
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
45
45
  readonly enum?: string[];
46
- readonly items?: import("..").JsonSchemaType;
47
- readonly properties?: Record<string, import("..").JsonSchemaType>;
46
+ readonly items?: import("../index.js").JsonSchemaType;
47
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
48
48
  readonly required?: string[];
49
49
  readonly description?: string;
50
50
  readonly pattern?: string;
51
51
  readonly maxLength?: number;
52
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
52
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
53
53
  };
54
54
  readonly owner: {
55
55
  readonly type: "string";
@@ -1,5 +1,5 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout';
2
+ import type { ProgrammaticToolCallingJsonSchema } from './ptcTimeout.js';
3
3
  import type * as t from '../types/index.js';
4
4
  import { Constants } from '../common/index.js';
5
5
  export declare function createProgrammaticToolCallingSchema(maxRunTimeoutMs?: number): ProgrammaticToolCallingJsonSchema;
@@ -7,13 +7,13 @@ export declare const ReadFileToolSchema: {
7
7
  readonly intent: {
8
8
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
9
9
  readonly enum?: string[];
10
- readonly items?: import("..").JsonSchemaType;
11
- readonly properties?: Record<string, import("..").JsonSchemaType>;
10
+ readonly items?: import("../index.js").JsonSchemaType;
11
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
12
12
  readonly required?: string[];
13
13
  readonly description?: string;
14
14
  readonly pattern?: string;
15
15
  readonly maxLength?: number;
16
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
16
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
17
17
  };
18
18
  readonly path: {
19
19
  readonly type: "string";
@@ -31,13 +31,13 @@ export declare const ReadFileToolDefinition: {
31
31
  readonly intent: {
32
32
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
33
33
  readonly enum?: string[];
34
- readonly items?: import("..").JsonSchemaType;
35
- readonly properties?: Record<string, import("..").JsonSchemaType>;
34
+ readonly items?: import("../index.js").JsonSchemaType;
35
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
36
36
  readonly required?: string[];
37
37
  readonly description?: string;
38
38
  readonly pattern?: string;
39
39
  readonly maxLength?: number;
40
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
40
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
41
41
  };
42
42
  readonly path: {
43
43
  readonly type: "string";
@@ -12,13 +12,13 @@ export declare const SkillToolSchema: {
12
12
  readonly intent: {
13
13
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
14
14
  readonly enum?: string[];
15
- readonly items?: import("..").JsonSchemaType;
16
- readonly properties?: Record<string, import("..").JsonSchemaType>;
15
+ readonly items?: import("../index.js").JsonSchemaType;
16
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
17
17
  readonly required?: string[];
18
18
  readonly description?: string;
19
19
  readonly pattern?: string;
20
20
  readonly maxLength?: number;
21
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
21
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
22
22
  };
23
23
  readonly skillName: {
24
24
  readonly type: "string";
@@ -40,13 +40,13 @@ export declare const SkillToolDefinition: {
40
40
  readonly intent: {
41
41
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
42
42
  readonly enum?: string[];
43
- readonly items?: import("..").JsonSchemaType;
44
- readonly properties?: Record<string, import("..").JsonSchemaType>;
43
+ readonly items?: import("../index.js").JsonSchemaType;
44
+ readonly properties?: Record<string, import("../index.js").JsonSchemaType>;
45
45
  readonly required?: string[];
46
46
  readonly description?: string;
47
47
  readonly pattern?: string;
48
48
  readonly maxLength?: number;
49
- readonly additionalProperties?: boolean | import("..").JsonSchemaType;
49
+ readonly additionalProperties?: boolean | import("../index.js").JsonSchemaType;
50
50
  };
51
51
  readonly skillName: {
52
52
  readonly type: "string";
@@ -102,6 +102,7 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
102
102
  private agentLangfuse?;
103
103
  toolCallStepIds?: Map<string, string>;
104
104
  errorHandler?: t.ToolNodeConstructorParams['errorHandler'];
105
+ private toolResultGate?;
105
106
  /**
106
107
  * Fallback error-completion ownership for calls that reach `runTool`
107
108
  * outside a batch context (direct `runTool` use in tests / embedders).
@@ -230,7 +231,7 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
230
231
  */
231
232
  private anonBatchCounter;
232
233
  private handoffRouting?;
233
- constructor({ handoffRouting, tools, toolMap, name, tags, trace, runLangfuse, agentLangfuse, errorHandler, toolCallStepIds, handleToolErrors, loadRuntimeTools, toolRegistry, toolDefinitions, getDiscoveredToolNames, sessions, codeSessionKey, eventDrivenMode, eagerEventToolExecution, eagerEventToolExecutions, eagerEventToolUsageCount, eagerEventToolSuppressions, agentId, executingAgentId, executionContext, executingAgentName, rootAgentId, rootAgentName, directToolNames, interruptingToolNames, codeSessionToolNames, maxContextTokens, maxToolResultChars, hookRegistry, humanInTheLoop, toolOutputReferences, toolOutputRegistry, toolExecution, fileCheckpointer, getBreakerSignal, getRunScope, preparedSubagents, restoreRunStepResumeState, createRunStepResumeState, onToolCallsClaimed, }: t.ToolNodeConstructorParams);
234
+ constructor({ handoffRouting, tools, toolMap, name, tags, trace, runLangfuse, agentLangfuse, errorHandler, toolCallStepIds, handleToolErrors, loadRuntimeTools, toolRegistry, toolDefinitions, getDiscoveredToolNames, sessions, codeSessionKey, eventDrivenMode, eagerEventToolExecution, eagerEventToolExecutions, eagerEventToolUsageCount, eagerEventToolSuppressions, agentId, executingAgentId, executionContext, executingAgentName, rootAgentId, rootAgentName, directToolNames, interruptingToolNames, codeSessionToolNames, maxContextTokens, maxToolResultChars, hookRegistry, humanInTheLoop, toolOutputReferences, toolOutputRegistry, toolResultProtection, toolExecution, fileCheckpointer, getBreakerSignal, getRunScope, preparedSubagents, restoreRunStepResumeState, createRunStepResumeState, onToolCallsClaimed, }: t.ToolNodeConstructorParams);
234
235
  invoke(input: any, options?: Partial<RunnableConfig>): Promise<any>;
235
236
  private withToolScope;
236
237
  /**
@@ -311,6 +312,9 @@ export declare class ToolNode<T = any> extends RunnableCallable<T, T> {
311
312
  * substitutions. Omit when no registration should occur.
312
313
  */
313
314
  protected runTool(call: ToolCall, config: RunnableConfig, batchContext?: RunToolBatchContext<T>): Promise<BaseMessage | Command>;
315
+ /** The gate when host result protection selects `toolName`. */
316
+ private protectedResultGate;
317
+ private inspectHostResults;
314
318
  private unresolvedReferenceMessage;
315
319
  /**
316
320
  * Runs a single in-process tool call with the same lifecycle hooks
@@ -1,4 +1,4 @@
1
- export * from './CloudflareBridgeRuntime';
2
- export * from './CloudflareProgrammaticToolCalling';
3
- export * from './CloudflareSandboxExecutionEngine';
4
- export * from './CloudflareSandboxTools';
1
+ export * from './CloudflareBridgeRuntime.js';
2
+ export * from './CloudflareProgrammaticToolCalling.js';
3
+ export * from './CloudflareSandboxExecutionEngine.js';
4
+ export * from './CloudflareSandboxTools.js';
@@ -1,4 +1,4 @@
1
- import type { WorkspaceFS } from './workspaceFS';
1
+ import type { WorkspaceFS } from './workspaceFS.js';
2
2
  import type * as t from '../../types/index.js';
3
3
  /**
4
4
  * Per-Run snapshot store for write_file / edit_file. Captures the
@@ -1,4 +1,4 @@
1
- import type { WorkspaceFS } from './workspaceFS';
1
+ import type { WorkspaceFS } from './workspaceFS.js';
2
2
  import type * as t from '../../types/index.js';
3
3
  /** Produces a stable, non-plaintext key for environment-sensitive probes. */
4
4
  export declare function commandAvailabilityEnvCacheKey(env: NodeJS.ProcessEnv | undefined): string;
@@ -32,7 +32,7 @@
32
32
  * size; oversize attachments degrade to a stub describing the
33
33
  * refusal so the model isn't surprised.
34
34
  */
35
- import type { WorkspaceFS } from './workspaceFS';
35
+ import type { WorkspaceFS } from './workspaceFS.js';
36
36
  export type AttachmentMode = 'images-only' | 'images-and-pdf' | 'off';
37
37
  export type Attachment = {
38
38
  kind: 'image';
@@ -1,12 +1,12 @@
1
- export * from './CompileCheckTool';
2
- export * from './FileCheckpointer';
3
- export * from './LocalCodingTools';
4
- export * from './LocalExecutionEngine';
5
- export * from './LocalExecutionTools';
6
- export * from './LocalProgrammaticToolCalling';
7
- export * from './resolveLocalExecutionTools';
8
- export * from './attachments';
9
- export * from './bashAst';
10
- export * from './editStrategies';
11
- export * from './syntaxCheck';
12
- export * from './textEncoding';
1
+ export * from './CompileCheckTool.js';
2
+ export * from './FileCheckpointer.js';
3
+ export * from './LocalCodingTools.js';
4
+ export * from './LocalExecutionEngine.js';
5
+ export * from './LocalExecutionTools.js';
6
+ export * from './LocalProgrammaticToolCalling.js';
7
+ export * from './resolveLocalExecutionTools.js';
8
+ export * from './attachments.js';
9
+ export * from './bashAst.js';
10
+ export * from './editStrategies.js';
11
+ export * from './syntaxCheck.js';
12
+ export * from './textEncoding.js';
@@ -1,5 +1,5 @@
1
1
  import type { AnthropicTextBlockParam, AnthropicWebSearchResultBlockParam } from '../../llm/anthropic/types.js';
2
- import type { SearchResultData } from './types';
2
+ import type { SearchResultData } from './types.js';
3
3
  /**
4
4
  * Coerces Anthropic web search results to the SearchResultData format
5
5
  * @param results - Array of Anthropic web search results
@@ -1,4 +1,41 @@
1
- import type { References } from './types';
1
+ import type { References, MediaReference } from './types.js';
2
+ type ReferenceType = 'image' | 'video' | 'iframe' | 'link';
3
+ interface ReferenceTarget {
4
+ type: ReferenceType;
5
+ idx: number;
6
+ }
7
+ /**
8
+ * Aho-Corasick automaton over `(` followed by every referenced URL, held in
9
+ * typed arrays: 18 bytes per node and no object per node. Nodes are numbered
10
+ * breadth first, so the children of `node` are the nodes from
11
+ * `firstChild[node]` up to `firstChild[node + 1]`, sorted by `code`.
12
+ */
13
+ export interface ReferenceMatcher {
14
+ firstChild: Int32Array;
15
+ code: Uint16Array;
16
+ depth: Int32Array;
17
+ fail: Int32Array;
18
+ /** Nearest node on the fail chain, itself included, that ends a URL, or -1. */
19
+ output: Int32Array;
20
+ targets: Map<number, ReferenceTarget>;
21
+ }
22
+ /**
23
+ * Largest automaton built for one page. Nodes are the distinct URL prefixes, at
24
+ * most the URL characters on the page: 2^21 of them measured 36 MiB and 0.15 s
25
+ * to build, about 100 times a long Wikipedia article. A page above the cap
26
+ * keeps its markdown as is.
27
+ */
28
+ export declare const MAX_MATCHER_NODES: number;
29
+ /**
30
+ * Indexes every referenced URL once, or returns `undefined` when the automaton
31
+ * would exceed `MAX_MATCHER_NODES`. A URL listed under several types keeps the
32
+ * first, in image, video, iframe, link order, which is the order the replacement
33
+ * has always preferred. Sorting the URLs gives the exact node count before
34
+ * anything is allocated, and lets each node take its children from one
35
+ * contiguous run of URLs.
36
+ */
37
+ export declare function buildMatcher(groups: ReadonlyArray<[ReferenceType, Map<string, MediaReference>]>): ReferenceMatcher | undefined;
2
38
  export declare function processContent(html: string, markdown: string): {
3
39
  markdown: string;
4
40
  } & References;
41
+ export {};
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * fastCRW scraper. Firecrawl-compatible web scraper; single binary;
4
4
  * self-host or cloud. Posts to {base}/v1/scrape.
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createCrwAPI: (apiKey?: string, apiUrl?: string, options?: t.CrwSearchOptions) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Firecrawl scraper implementation
4
4
  * Uses the Firecrawl API to scrape web pages
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const MISSING_SEARCH_RESULT_DATA_ERROR = "Search provider returned no result data";
3
3
  /** Resolves the per-search highlight budget from config, the
4
4
  * `SEARCH_MAX_LLM_OUTPUT_CHARS` env var, or the default (50,000 chars). */
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Expand highlights in search results using smart boundary detection.
4
4
  *
@@ -1,3 +1,3 @@
1
- export * from './tool';
2
- export * from './schema';
3
- export type * from './types';
1
+ export * from './tool.js';
2
+ export * from './schema.js';
3
+ export type * from './types.js';
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare class KeenableScraper implements t.BaseScraper {
3
3
  private apiKey;
4
4
  private apiUrl;
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createKeenableAPI: (apiKey?: string, apiUrl?: string, options?: t.KeenableSearchOptions) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const classifyFailure: (message?: string) => string;
3
3
  /**
4
4
  * Creates the counter set for one `web_search` call.
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Ranking used whenever no reranker scores the chunks: the candidates' own
4
4
  * order, capped at `topK`, with a neutral score.
@@ -39,13 +39,13 @@ export declare const WebSearchToolSchema: {
39
39
  readonly intent: {
40
40
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
41
41
  readonly enum?: string[];
42
- readonly items?: import("../..").JsonSchemaType;
43
- readonly properties?: Record<string, import("../..").JsonSchemaType>;
42
+ readonly items?: import("../../index.js").JsonSchemaType;
43
+ readonly properties?: Record<string, import("../../index.js").JsonSchemaType>;
44
44
  readonly required?: string[];
45
45
  readonly description?: string;
46
46
  readonly pattern?: string;
47
47
  readonly maxLength?: number;
48
- readonly additionalProperties?: boolean | import("../..").JsonSchemaType;
48
+ readonly additionalProperties?: boolean | import("../../index.js").JsonSchemaType;
49
49
  };
50
50
  readonly query: {
51
51
  readonly type: "string";
@@ -86,13 +86,13 @@ export declare const WebSearchToolDefinition: {
86
86
  readonly intent: {
87
87
  readonly type: "string" | "number" | "integer" | "float" | "boolean" | "array" | "object";
88
88
  readonly enum?: string[];
89
- readonly items?: import("../..").JsonSchemaType;
90
- readonly properties?: Record<string, import("../..").JsonSchemaType>;
89
+ readonly items?: import("../../index.js").JsonSchemaType;
90
+ readonly properties?: Record<string, import("../../index.js").JsonSchemaType>;
91
91
  readonly required?: string[];
92
92
  readonly description?: string;
93
93
  readonly pattern?: string;
94
94
  readonly maxLength?: number;
95
- readonly additionalProperties?: boolean | import("../..").JsonSchemaType;
95
+ readonly additionalProperties?: boolean | import("../../index.js").JsonSchemaType;
96
96
  };
97
97
  readonly query: {
98
98
  readonly type: "string";
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createSearchAPI: (config: t.SearchConfig) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  /**
3
3
  * Serper scraper implementation
4
4
  * Uses the Serper Scrape API (https://scrape.serper.dev) to scrape web pages
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare class TavilyScraper implements t.BaseScraper {
3
3
  private apiKey;
4
4
  private apiUrl;
@@ -1,4 +1,4 @@
1
- import type * as t from './types';
1
+ import type * as t from './types.js';
2
2
  export declare const createTavilyAPI: (apiKey?: string, apiUrl?: string, options?: t.TavilySearchOptions) => {
3
3
  getSources: (params: t.GetSourcesParams) => Promise<t.SearchResult>;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { DynamicStructuredTool } from '@langchain/core/tools';
2
- import type * as t from './types';
3
- import { DATE_RANGE } from './schema';
4
- import { createSearchAPI } from './search';
2
+ import type * as t from './types.js';
3
+ import { DATE_RANGE } from './schema.js';
4
+ import { createSearchAPI } from './search.js';
5
5
  /**
6
6
  * Settled label for a `web_search` call's intent (see `intentArg.ts`).
7
7
  *
@@ -2,8 +2,8 @@ import type { RunnableConfig } from '@langchain/core/runnables';
2
2
  import type { Logger as WinstonLogger } from 'winston';
3
3
  import type { Agent as HttpsAgent } from 'https';
4
4
  import type { Agent as HttpAgent } from 'http';
5
- import type { BaseReranker } from './rerankers';
6
- import { DATE_RANGE } from './schema';
5
+ import type { BaseReranker } from './rerankers.js';
6
+ import { DATE_RANGE } from './schema.js';
7
7
  export type { HttpAgent, HttpsAgent };
8
8
  export interface HttpAgentConfig {
9
9
  httpAgent?: HttpAgent;
@@ -1,6 +1,6 @@
1
- import type { SafeErrorLog } from './types';
2
- import type * as t from './types';
3
- export type { SafeErrorLog } from './types';
1
+ import type { SafeErrorLog } from './types.js';
2
+ import type * as t from './types.js';
3
+ export type { SafeErrorLog } from './types.js';
4
4
  /**
5
5
  * Creates a default logger that maps to console methods
6
6
  * Uses a singleton pattern to avoid creating multiple instances
@@ -1,5 +1,5 @@
1
1
  import type { RunnableConfig } from '@langchain/core/runnables';
2
- import type { SubagentResumeExecution } from './SubagentReplay';
2
+ import type { SubagentResumeExecution } from './SubagentReplay.js';
3
3
  export type SubagentExecutionAddressInput = {
4
4
  threadId?: string;
5
5
  parentToolCallId: string;
@@ -2,13 +2,13 @@ import { BaseMessage } from '@langchain/core/messages';
2
2
  import type { RunnableConfig } from '@langchain/core/runnables';
3
3
  import type { ToolCall } from '@langchain/core/messages/tool';
4
4
  import type { MultiAgentGraphState, HumanInTheLoopConfig, StandardGraphInput, ExecutableSubagentConfigEntry, SubagentExecutionContext, SubagentContextAdapter, SubagentContextResult, SubagentTaskConfig, SubagentTaskRuntime, SubagentHostArgs, SubagentUsageSink, TokenCounter } from '../../types/index.js';
5
- import type { SubagentResolutionPhase, SubagentResolutionCause, SubagentHostArgumentFailure, SubagentResolutionFailureHandler } from './diagnostics';
6
- import type { SubagentResumeManifest, SettledSubagentToolOutput } from './SubagentReplay';
5
+ import type { SubagentResolutionPhase, SubagentResolutionCause, SubagentHostArgumentFailure, SubagentResolutionFailureHandler } from './diagnostics.js';
6
+ import type { SubagentResumeManifest, SettledSubagentToolOutput } from './SubagentReplay.js';
7
7
  import type { GraphFactory } from '../../graphs/graphFactory.js';
8
8
  import type { StandardGraph } from '../../graphs/Graph.js';
9
9
  import { HookRegistry } from '../../hooks/index.js';
10
10
  import { HandlerRegistry } from '../../events.js';
11
- export { buildChildInputs, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, } from './childGraphConfig';
11
+ export { buildChildInputs, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, } from './childGraphConfig.js';
12
12
  export declare const DEFAULT_SUBAGENT_DESCRIPTION = "No task description provided";
13
13
  export type SubagentExecuteParams = {
14
14
  description: string;
@@ -127,6 +127,8 @@ export type SubagentExecutorOptions = {
127
127
  * revert to the defaults.
128
128
  */
129
129
  providerTextProtection?: StandardGraphInput['providerTextProtection'];
130
+ /** The parent's tool result protection, so a child inspects the same tools. */
131
+ toolResultProtection?: StandardGraphInput['toolResultProtection'];
130
132
  /** The parent's attachment resolver, so a child resolves the references it inherits. */
131
133
  resolveAttachment?: StandardGraphInput['resolveAttachment'];
132
134
  streamLimits?: StandardGraphInput['streamLimits'];
@@ -197,6 +199,7 @@ export declare class SubagentExecutor {
197
199
  private readonly langfuse?;
198
200
  private readonly tokenCounter?;
199
201
  private readonly providerTextProtection?;
202
+ private readonly toolResultProtection?;
200
203
  private readonly resolveAttachment?;
201
204
  private readonly streamLimits?;
202
205
  private readonly humanInTheLoop?;
@@ -1,5 +1,5 @@
1
1
  import type { SubagentHostArgs } from '../../types/graph.js';
2
- import { SubagentSettlementBindingError, SubagentDefinitionBindingError, SubagentInvocationBindingError, SubagentExecutionInvalidatedError } from './SubagentExecutionRegistry';
2
+ import { SubagentSettlementBindingError, SubagentDefinitionBindingError, SubagentInvocationBindingError, SubagentExecutionInvalidatedError } from './SubagentExecutionRegistry.js';
3
3
  import { describeCodeApiError } from '../diagnostics.js';
4
4
  /** Which step of child start-up failed: execution identity, then host config resolution. */
5
5
  export type SubagentResolutionPhase = 'identity' | 'config';
@@ -1,7 +1,7 @@
1
- export { DEFAULT_SUBAGENT_DESCRIPTION, SubagentExecutor, filterSubagentResult, filterGraphSubagentResult, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, buildChildInputs, summarizeEvent, } from './SubagentExecutor';
2
- export type { SubagentExecuteParams, SubagentExecuteResult, SubagentExecutorOptions, ChildGraphFactory, } from './SubagentExecutor';
3
- export { InMemorySubagentTaskStore } from './InMemorySubagentTaskStore';
4
- export type { InMemorySubagentTaskStoreOptions } from './InMemorySubagentTaskStore';
5
- export { SubagentResolutionError, SubagentHostArgumentError, getSubagentResolutionFailureMessage, getSubagentHostArgumentFailureMessage, } from './diagnostics';
6
- export { SUBAGENT_HOST_ARG_LIMITS, SELF_SUBAGENT_HOST_ARGS_SUPPORTED, buildSubagentHostArgProperties, resolveSubagentHostArgs, } from './hostArgs';
7
- export type { SubagentHostArgumentFailure, SubagentHostArgumentRejection, SubagentResolutionPhase, SubagentResolutionCause, SubagentResolutionContext, SubagentResolutionDiagnostic, SubagentResolutionFailureHandler, } from './diagnostics';
1
+ export { DEFAULT_SUBAGENT_DESCRIPTION, SubagentExecutor, filterSubagentResult, filterGraphSubagentResult, isGraphSubagentConfig, normalizeSubagentConfigs, normalizeSubagentConfigEntries, resolveSubagentConfigs, resolveSubagentConfigEntries, buildChildInputs, summarizeEvent, } from './SubagentExecutor.js';
2
+ export type { SubagentExecuteParams, SubagentExecuteResult, SubagentExecutorOptions, ChildGraphFactory, } from './SubagentExecutor.js';
3
+ export { InMemorySubagentTaskStore } from './InMemorySubagentTaskStore.js';
4
+ export type { InMemorySubagentTaskStoreOptions } from './InMemorySubagentTaskStore.js';
5
+ export { SubagentResolutionError, SubagentHostArgumentError, getSubagentResolutionFailureMessage, getSubagentHostArgumentFailureMessage, } from './diagnostics.js';
6
+ export { SUBAGENT_HOST_ARG_LIMITS, SELF_SUBAGENT_HOST_ARGS_SUPPORTED, buildSubagentHostArgProperties, resolveSubagentHostArgs, } from './hostArgs.js';
7
+ export type { SubagentHostArgumentFailure, SubagentHostArgumentRejection, SubagentResolutionPhase, SubagentResolutionCause, SubagentResolutionContext, SubagentResolutionDiagnostic, SubagentResolutionFailureHandler, } from './diagnostics.js';
@@ -1,6 +1,6 @@
1
1
  import type { Data, MessageContentComplex } from '@langchain/core/messages';
2
2
  import type { ProviderMessageProjectionMode } from '../llm/prepareProviderRequest.js';
3
- import type { ProviderName } from './llm';
3
+ import type { ProviderName } from './llm.js';
4
4
  /** An attachment a message carries by reference: LangChain's `source_type: 'id'` data block. */
5
5
  export type AttachmentReference = Data.IDContentBlock;
6
6
  /** The provider request a reference is being resolved for. */
@@ -1,5 +1,6 @@
1
1
  import type { ProviderTextProtection } from '../protection/providerText.js';
2
- import type { AttachmentResolver } from './attachments';
2
+ import type { ToolResultProtection } from '../protection/toolResult.js';
3
+ import type { AttachmentResolver } from './attachments.js';
3
4
  import type { BaseMessage, AIMessageChunk, SystemMessage, UsageMetadata } from '@langchain/core/messages';
4
5
  import type { BindToolsInput } from '@langchain/core/language_models/chat_models';
5
6
  import type { START, StateGraph, StateGraphArgs } from '@langchain/langgraph';
@@ -290,6 +291,8 @@ export type ModelEndData = (StreamEventData & {
290
291
  export type GraphTools = GenericTool[] | BindToolsInput[] | GoogleAIToolType[];
291
292
  export type StandardGraphInput = {
292
293
  providerTextProtection?: ProviderTextProtection;
294
+ /** Host inspection of selected tools' result text, for every graph of the run. */
295
+ toolResultProtection?: ToolResultProtection;
293
296
  /** Resolves attachments that messages carry by reference; see {@link AttachmentResolver}. */
294
297
  resolveAttachment?: AttachmentResolver;
295
298
  runId?: string;
@@ -1,14 +1,14 @@
1
- export * from './attachments';
2
- export * from './graph';
3
- export * from './hitl';
4
- export * from './llm';
5
- export * from './messages';
6
- export * from './run';
7
- export * from './skill';
8
- export * from './stream';
9
- export * from './subagentTasks';
10
- export * from './tools';
11
- export * from './summarize';
12
- export * from './activityLabel';
13
- export * from './assistantPhase';
14
- export * from './reasoningLabel';
1
+ export * from './attachments.js';
2
+ export * from './graph.js';
3
+ export * from './hitl.js';
4
+ export * from './llm.js';
5
+ export * from './messages.js';
6
+ export * from './run.js';
7
+ export * from './skill.js';
8
+ export * from './stream.js';
9
+ export * from './subagentTasks.js';
10
+ export * from './tools.js';
11
+ export * from './summarize.js';
12
+ export * from './activityLabel.js';
13
+ export * from './assistantPhase.js';
14
+ export * from './reasoningLabel.js';
@@ -12,7 +12,7 @@ import type { AnthropicInput } from '@langchain/anthropic';
12
12
  import type { Runnable } from '@langchain/core/runnables';
13
13
  import type { OpenAI as OpenAIClient } from 'openai';
14
14
  import type { ChatXAIInput } from '@langchain/xai';
15
- import type { CustomProviderOptionsMap } from '../provider-registration';
15
+ import type { CustomProviderOptionsMap } from '../provider-registration.js';
16
16
  import type { ChatOpenRouterCallOptions } from '../llm/openrouter/index.js';
17
17
  import type { PromptCacheTtl } from '../messages/cache.js';
18
18
  import { AzureChatOpenAI, ChatDeepSeek, ChatMoonshot, ChatOpenAI, ChatXAI } from '../llm/openai/index.js';
@@ -221,4 +221,4 @@ export type ChatModelInstance = BaseChatModel;
221
221
  export type ModelWithTools = BaseChatModel & {
222
222
  bindTools(tools: CommonToolType[]): Runnable;
223
223
  };
224
- export type { CustomProviderOptionsMap } from '../provider-registration';
224
+ export type { CustomProviderOptionsMap } from '../provider-registration.js';
@@ -27,7 +27,7 @@ export type LegacyGraphConfig = BaseGraphConfig & {
27
27
  * would type-check but be silently ignored by `createLegacyGraph`.
28
28
  * Required provider-text protection also belongs only to RunConfig, as
29
29
  * does the attachment resolver. */
30
- 'provider' | 'clientOptions' | 'agents' | 'streamLimits' | 'providerTextProtection' | 'resolveAttachment'> & Omit<g.AgentInputs, 'provider' | 'clientOptions' | 'agentId'>;
30
+ 'provider' | 'clientOptions' | 'agents' | 'streamLimits' | 'providerTextProtection' | 'toolResultProtection' | 'resolveAttachment'> & Omit<g.AgentInputs, 'provider' | 'clientOptions' | 'agentId'>;
31
31
  export type SupervisedGraphConfig = BaseGraphConfig & {
32
32
  type: 'supervised';
33
33
  /** Enable supervised router; when false, fall back to standard loop */
@@ -320,6 +320,8 @@ export type RunConfig = {
320
320
  * opt-in. See {@link StreamLimits}.
321
321
  */
322
322
  providerTextProtection?: g.StandardGraphInput['providerTextProtection'];
323
+ /** Host inspection of selected tools' result text. Default off. */
324
+ toolResultProtection?: g.StandardGraphInput['toolResultProtection'];
323
325
  /** Resolves attachments that messages carry by reference, for every graph of the run. */
324
326
  resolveAttachment?: g.StandardGraphInput['resolveAttachment'];
325
327
  streamLimits?: StreamLimits;
@@ -1,6 +1,6 @@
1
1
  import type { BaseMessage } from '@langchain/core/messages';
2
- import type { SubagentUpdateEvent } from './graph';
3
- import type { InjectedMessage } from './tools';
2
+ import type { SubagentUpdateEvent } from './graph.js';
3
+ import type { InjectedMessage } from './tools.js';
4
4
  /** Terminal and in-flight states for a detached subagent task. */
5
5
  export type SubagentTaskStatus = 'running' | 'completed' | 'error' | 'cancelled';
6
6
  /** Where a pending parent message may enter the child run. */