langchain 1.2.2 → 1.2.3-dev-1766726832377

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 (66) hide show
  1. package/dist/agents/middleware/contextEditing.d.cts.map +1 -1
  2. package/dist/agents/middleware/contextEditing.d.ts.map +1 -1
  3. package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -1
  4. package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -1
  5. package/dist/agents/middleware/hitl.d.cts.map +1 -1
  6. package/dist/agents/middleware/hitl.d.ts.map +1 -1
  7. package/dist/agents/middleware/llmToolSelector.d.ts +4 -4
  8. package/dist/agents/middleware/llmToolSelector.d.ts.map +1 -1
  9. package/dist/agents/middleware/modelCallLimit.d.cts.map +1 -1
  10. package/dist/agents/middleware/modelCallLimit.d.ts.map +1 -1
  11. package/dist/agents/middleware/summarization.d.cts.map +1 -1
  12. package/dist/agents/middleware/summarization.d.ts +7 -7
  13. package/dist/agents/middleware/summarization.d.ts.map +1 -1
  14. package/dist/agents/middleware/todoListMiddleware.d.cts.map +1 -1
  15. package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -1
  16. package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -1
  17. package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -1
  18. package/dist/agents/middleware/utils.d.cts.map +1 -1
  19. package/dist/agents/middleware/utils.d.ts.map +1 -1
  20. package/dist/index.cjs +3 -0
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +2 -1
  23. package/dist/index.d.ts +2 -1
  24. package/dist/index.js +3 -1
  25. package/dist/index.js.map +1 -1
  26. package/dist/tools/browser.cjs +81 -0
  27. package/dist/tools/browser.cjs.map +1 -0
  28. package/dist/tools/browser.d.cts +96 -0
  29. package/dist/tools/browser.d.cts.map +1 -0
  30. package/dist/tools/browser.d.ts +96 -0
  31. package/dist/tools/browser.d.ts.map +1 -0
  32. package/dist/tools/browser.js +80 -0
  33. package/dist/tools/browser.js.map +1 -0
  34. package/package.json +4 -4
  35. package/chat_models/universal.cjs +0 -1
  36. package/chat_models/universal.d.cts +0 -1
  37. package/chat_models/universal.d.ts +0 -1
  38. package/chat_models/universal.js +0 -1
  39. package/hub/node.cjs +0 -1
  40. package/hub/node.d.cts +0 -1
  41. package/hub/node.d.ts +0 -1
  42. package/hub/node.js +0 -1
  43. package/hub.cjs +0 -1
  44. package/hub.d.cts +0 -1
  45. package/hub.d.ts +0 -1
  46. package/hub.js +0 -1
  47. package/load/serializable.cjs +0 -1
  48. package/load/serializable.d.cts +0 -1
  49. package/load/serializable.d.ts +0 -1
  50. package/load/serializable.js +0 -1
  51. package/load.cjs +0 -1
  52. package/load.d.cts +0 -1
  53. package/load.d.ts +0 -1
  54. package/load.js +0 -1
  55. package/storage/encoder_backed.cjs +0 -1
  56. package/storage/encoder_backed.d.cts +0 -1
  57. package/storage/encoder_backed.d.ts +0 -1
  58. package/storage/encoder_backed.js +0 -1
  59. package/storage/file_system.cjs +0 -1
  60. package/storage/file_system.d.cts +0 -1
  61. package/storage/file_system.d.ts +0 -1
  62. package/storage/file_system.js +0 -1
  63. package/storage/in_memory.cjs +0 -1
  64. package/storage/in_memory.d.cts +0 -1
  65. package/storage/in_memory.d.ts +0 -1
  66. package/storage/in_memory.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":["__types_js6","BaseMessage","AfterModelHook","AfterAgentHook","BeforeAgentHook","BeforeModelHook","JumpToTarget","countTokensApproximately","getHookConstraint","getHookFunction","___runtime_js0","AgentBuiltInState","Runtime","Partial","MiddlewareResult","Promise","sleep","calculateRetryDelay"],"sources":["../../../src/agents/middleware/utils.d.ts"],"sourcesContent":["import { type BaseMessage } from \"@langchain/core/messages\";\nimport { AfterModelHook, AfterAgentHook, BeforeAgentHook, BeforeModelHook } from \"./types.js\";\nimport { JumpToTarget } from \"../constants.js\";\n/**\n * Default token counter that approximates based on character count\n * @param messages Messages to count tokens for\n * @returns Approximate token count\n */\nexport declare function countTokensApproximately(messages: BaseMessage[]): number;\nexport declare function getHookConstraint(hook: BeforeAgentHook | BeforeModelHook | AfterAgentHook | AfterModelHook | undefined): JumpToTarget[] | undefined;\nexport declare function getHookFunction(arg: BeforeAgentHook | BeforeModelHook | AfterAgentHook | AfterModelHook): ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>) | ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>) | ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>) | ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>);\n/**\n * Sleep for the specified number of milliseconds.\n */\nexport declare function sleep(ms: number): Promise<void>;\n/**\n * Calculate delay for a retry attempt with exponential backoff and jitter.\n *\n * @param retryNumber - The retry attempt number (0-indexed)\n * @param config - Configuration for backoff calculation\n * @returns Delay in milliseconds before next retry\n *\n * @internal Exported for testing purposes\n */\nexport declare function calculateRetryDelay(config: {\n backoffFactor: number;\n initialDelayMs: number;\n maxDelayMs: number;\n jitter: boolean;\n}, retryNumber: number): number;\n//# sourceMappingURL=utils.d.ts.map"],"mappings":";;;;;;;;AAQA;;;iBAAwBO,wBAAAA,WAAmCN"}
1
+ {"version":3,"file":"utils.d.ts","names":["__types_js0","BaseMessage","AfterModelHook","AfterAgentHook","BeforeAgentHook","BeforeModelHook","JumpToTarget","countTokensApproximately","getHookConstraint","getHookFunction","___runtime_js0","AgentBuiltInState","Runtime","Partial","MiddlewareResult","Promise","sleep","calculateRetryDelay"],"sources":["../../../src/agents/middleware/utils.d.ts"],"sourcesContent":["import { type BaseMessage } from \"@langchain/core/messages\";\nimport { AfterModelHook, AfterAgentHook, BeforeAgentHook, BeforeModelHook } from \"./types.js\";\nimport { JumpToTarget } from \"../constants.js\";\n/**\n * Default token counter that approximates based on character count\n * @param messages Messages to count tokens for\n * @returns Approximate token count\n */\nexport declare function countTokensApproximately(messages: BaseMessage[]): number;\nexport declare function getHookConstraint(hook: BeforeAgentHook | BeforeModelHook | AfterAgentHook | AfterModelHook | undefined): JumpToTarget[] | undefined;\nexport declare function getHookFunction(arg: BeforeAgentHook | BeforeModelHook | AfterAgentHook | AfterModelHook): ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>) | ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>) | ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>) | ((state: import(\"../runtime.js\").AgentBuiltInState, runtime: import(\"../runtime.js\").Runtime<unknown>) => Promise<import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>> | import(\"./types.js\").MiddlewareResult<Partial<import(\"../runtime.js\").AgentBuiltInState>>);\n/**\n * Sleep for the specified number of milliseconds.\n */\nexport declare function sleep(ms: number): Promise<void>;\n/**\n * Calculate delay for a retry attempt with exponential backoff and jitter.\n *\n * @param retryNumber - The retry attempt number (0-indexed)\n * @param config - Configuration for backoff calculation\n * @returns Delay in milliseconds before next retry\n *\n * @internal Exported for testing purposes\n */\nexport declare function calculateRetryDelay(config: {\n backoffFactor: number;\n initialDelayMs: number;\n maxDelayMs: number;\n jitter: boolean;\n}, retryNumber: number): number;\n//# sourceMappingURL=utils.d.ts.map"],"mappings":";;;;;;;;AAQA;;;iBAAwBO,wBAAAA,WAAmCN"}
package/dist/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
2
2
  const require_chat_models_universal = require('./chat_models/universal.cjs');
3
+ const require_browser = require('./tools/browser.cjs');
3
4
  const require_errors = require('./agents/errors.cjs');
4
5
  const require_responses = require('./agents/responses.cjs');
5
6
  const require_utils = require('./agents/middleware/utils.cjs');
@@ -63,6 +64,7 @@ require_rolldown_runtime.__export(src_exports, {
63
64
  ToolStrategy: () => require_responses.ToolStrategy,
64
65
  anthropicPromptCachingMiddleware: () => require_promptCaching.anthropicPromptCachingMiddleware,
65
66
  applyStrategy: () => require_pii.applyStrategy,
67
+ browserTool: () => require_browser.browserTool,
66
68
  context: () => __langchain_core_utils_context.context,
67
69
  contextEditingMiddleware: () => require_contextEditing.contextEditingMiddleware,
68
70
  countTokensApproximately: () => require_utils.countTokensApproximately,
@@ -207,6 +209,7 @@ Object.defineProperty(exports, 'ToolMessageChunk', {
207
209
  exports.ToolStrategy = require_responses.ToolStrategy;
208
210
  exports.anthropicPromptCachingMiddleware = require_promptCaching.anthropicPromptCachingMiddleware;
209
211
  exports.applyStrategy = require_pii.applyStrategy;
212
+ exports.browserTool = require_browser.browserTool;
210
213
  Object.defineProperty(exports, 'context', {
211
214
  enumerable: true,
212
215
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * LangChain Messages\n */\nexport {\n BaseMessage,\n BaseMessageChunk,\n AIMessage,\n AIMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n type ContentBlock,\n filterMessages,\n trimMessages,\n} from \"@langchain/core/messages\";\n\n/**\n * Universal Chat Model\n */\nexport { initChatModel } from \"./chat_models/universal.js\";\n\n/**\n * LangChain Tools\n */\nexport {\n tool,\n Tool,\n type ToolRuntime,\n DynamicTool,\n StructuredTool,\n DynamicStructuredTool,\n} from \"@langchain/core/tools\";\n\n/**\n * LangChain utilities\n */\nexport { context } from \"@langchain/core/utils/context\";\n\n/**\n * LangChain Agents\n */\nexport * from \"./agents/index.js\";\n\n/**\n * `createAgent` pre-built middleware\n */\nexport * from \"./agents/middleware/index.js\";\n\n/**\n * LangChain Stores\n */\nexport { InMemoryStore } from \"@langchain/core/stores\";\n\n/**\n * LangChain Documents\n */\nexport { type DocumentInput, Document } from \"@langchain/core/documents\";\n"],"mappings":""}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * LangChain Messages\n */\nexport {\n BaseMessage,\n BaseMessageChunk,\n AIMessage,\n AIMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n type ContentBlock,\n filterMessages,\n trimMessages,\n} from \"@langchain/core/messages\";\n\n/**\n * Universal Chat Model\n */\nexport { initChatModel } from \"./chat_models/universal.js\";\n\n/**\n * LangChain Tools\n */\nexport {\n tool,\n Tool,\n type ToolRuntime,\n DynamicTool,\n StructuredTool,\n DynamicStructuredTool,\n} from \"@langchain/core/tools\";\n\n/**\n * Browser Tools\n */\nexport {\n browserTool,\n type BrowserTool,\n type BrowserToolParams,\n} from \"./tools/browser.js\";\n\n/**\n * LangChain utilities\n */\nexport { context } from \"@langchain/core/utils/context\";\n\n/**\n * LangChain Agents\n */\nexport * from \"./agents/index.js\";\n\n/**\n * `createAgent` pre-built middleware\n */\nexport * from \"./agents/middleware/index.js\";\n\n/**\n * LangChain Stores\n */\nexport { InMemoryStore } from \"@langchain/core/stores\";\n\n/**\n * LangChain Documents\n */\nexport { type DocumentInput, Document } from \"@langchain/core/documents\";\n"],"mappings":""}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { initChatModel } from "./chat_models/universal.cjs";
2
+ import { BrowserTool, BrowserToolParams, browserTool } from "./tools/browser.cjs";
2
3
  import { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError } from "./agents/errors.cjs";
3
4
  import { ProviderStrategy, ResponseFormat, ResponseFormatUndefined, ToolStrategy, providerStrategy, toolStrategy } from "./agents/responses.cjs";
4
5
  import { JumpToTarget } from "./agents/constants.cjs";
@@ -31,4 +32,4 @@ import { DynamicStructuredTool, DynamicTool, StructuredTool, Tool, ToolRuntime,
31
32
  import { context } from "@langchain/core/utils/context";
32
33
  import { InMemoryStore } from "@langchain/core/stores";
33
34
  import { Document, DocumentInput } from "@langchain/core/documents";
34
- export { AIMessage, AIMessageChunk, Action, ActionRequest, AfterAgentHook, AfterModelHook, AgentMiddleware, AnyAnnotationRoot, ApproveDecision, BaseMessage, BaseMessageChunk, BeforeAgentHook, BeforeModelHook, BuiltInPIIType, BuiltInState, ClearToolUsesEdit, ClearToolUsesEditConfig, type ContentBlock, ContextEdit, ContextEditingMiddlewareConfig, CreateAgentParams, Decision, DecisionType, DescriptionFactory, Document, type DocumentInput, DynamicStructuredTool, DynamicSystemPromptMiddlewareConfig, DynamicTool, EditDecision, ExecutedToolCall, ExtractZodArrayTypes, FakeToolCallingModel, HITLRequest, HITLResponse, HumanInTheLoopMiddlewareConfig, HumanMessage, HumanMessageChunk, InMemoryStore, InferChannelType, InferContextInput, InferMergedInputState, InferMergedState, InferMiddlewareContext, InferMiddlewareContextInput, InferMiddlewareContextInputs, InferMiddlewareContexts, InferMiddlewareInputState, InferMiddlewareInputStates, InferMiddlewareState, InferMiddlewareStates, InferSchemaInput, Interrupt, InterruptOnConfig, JumpTo, JumpToTarget, LLMToolSelectorConfig, MIDDLEWARE_BRAND, MiddlewareResult, ModelCallLimitMiddlewareConfig, ModelRetryMiddlewareConfig, MultipleStructuredOutputsError, MultipleToolsBoundError, N, NormalizedSchemaInput, OpenAIModerationMiddlewareOptions, PIIDetectionError, PIIDetector, PIIMatch, PIIMiddlewareConfig, PIIRedactionMiddlewareConfig, PIIStrategy, PromptCachingMiddlewareConfig, ProviderStrategy, ReactAgent, RedactionRuleConfig, RejectDecision, ResolvedRedactionRule, ResponseFormat, ResponseFormatUndefined, ReviewConfig, Runtime, StructuredOutputParsingError, StructuredTool, SummarizationMiddlewareConfig, SystemMessage, SystemMessageChunk, TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT, ToAnnotationRoot, TodoListMiddlewareOptions, TokenCounter, Tool, ToolCall, ToolCallHandler, ToolCallLimitConfig, ToolCallLimitExceededError, ToolCallRequest, ToolEmulatorOptions, ToolInvocationError, ToolMessage, ToolMessageChunk, ToolResult, ToolRetryMiddlewareConfig, type ToolRuntime, ToolStrategy, UserInput, WithStateGraphNodes, WrapModelCallHandler, WrapModelCallHook, WrapToolCallHook, anthropicPromptCachingMiddleware, applyStrategy, context, contextEditingMiddleware, countTokensApproximately, createAgent, createMiddleware, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, dynamicSystemPromptMiddleware, filterMessages, humanInTheLoopMiddleware, initChatModel, llmToolSelectorMiddleware, modelCallLimitMiddleware, modelFallbackMiddleware, modelRetryMiddleware, openAIModerationMiddleware, piiMiddleware, piiRedactionMiddleware, providerStrategy, resolveRedactionRule, summarizationMiddleware, todoListMiddleware, tool, toolCallLimitMiddleware, toolEmulatorMiddleware, toolRetryMiddleware, toolStrategy, trimMessages };
35
+ export { AIMessage, AIMessageChunk, Action, ActionRequest, AfterAgentHook, AfterModelHook, AgentMiddleware, AnyAnnotationRoot, ApproveDecision, BaseMessage, BaseMessageChunk, BeforeAgentHook, BeforeModelHook, type BrowserTool, type BrowserToolParams, BuiltInPIIType, BuiltInState, ClearToolUsesEdit, ClearToolUsesEditConfig, type ContentBlock, ContextEdit, ContextEditingMiddlewareConfig, CreateAgentParams, Decision, DecisionType, DescriptionFactory, Document, type DocumentInput, DynamicStructuredTool, DynamicSystemPromptMiddlewareConfig, DynamicTool, EditDecision, ExecutedToolCall, ExtractZodArrayTypes, FakeToolCallingModel, HITLRequest, HITLResponse, HumanInTheLoopMiddlewareConfig, HumanMessage, HumanMessageChunk, InMemoryStore, InferChannelType, InferContextInput, InferMergedInputState, InferMergedState, InferMiddlewareContext, InferMiddlewareContextInput, InferMiddlewareContextInputs, InferMiddlewareContexts, InferMiddlewareInputState, InferMiddlewareInputStates, InferMiddlewareState, InferMiddlewareStates, InferSchemaInput, Interrupt, InterruptOnConfig, JumpTo, JumpToTarget, LLMToolSelectorConfig, MIDDLEWARE_BRAND, MiddlewareResult, ModelCallLimitMiddlewareConfig, ModelRetryMiddlewareConfig, MultipleStructuredOutputsError, MultipleToolsBoundError, N, NormalizedSchemaInput, OpenAIModerationMiddlewareOptions, PIIDetectionError, PIIDetector, PIIMatch, PIIMiddlewareConfig, PIIRedactionMiddlewareConfig, PIIStrategy, PromptCachingMiddlewareConfig, ProviderStrategy, ReactAgent, RedactionRuleConfig, RejectDecision, ResolvedRedactionRule, ResponseFormat, ResponseFormatUndefined, ReviewConfig, Runtime, StructuredOutputParsingError, StructuredTool, SummarizationMiddlewareConfig, SystemMessage, SystemMessageChunk, TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT, ToAnnotationRoot, TodoListMiddlewareOptions, TokenCounter, Tool, ToolCall, ToolCallHandler, ToolCallLimitConfig, ToolCallLimitExceededError, ToolCallRequest, ToolEmulatorOptions, ToolInvocationError, ToolMessage, ToolMessageChunk, ToolResult, ToolRetryMiddlewareConfig, type ToolRuntime, ToolStrategy, UserInput, WithStateGraphNodes, WrapModelCallHandler, WrapModelCallHook, WrapToolCallHook, anthropicPromptCachingMiddleware, applyStrategy, browserTool, context, contextEditingMiddleware, countTokensApproximately, createAgent, createMiddleware, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, dynamicSystemPromptMiddleware, filterMessages, humanInTheLoopMiddleware, initChatModel, llmToolSelectorMiddleware, modelCallLimitMiddleware, modelFallbackMiddleware, modelRetryMiddleware, openAIModerationMiddleware, piiMiddleware, piiRedactionMiddleware, providerStrategy, resolveRedactionRule, summarizationMiddleware, todoListMiddleware, tool, toolCallLimitMiddleware, toolEmulatorMiddleware, toolRetryMiddleware, toolStrategy, trimMessages };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { initChatModel } from "./chat_models/universal.js";
2
+ import { BrowserTool, BrowserToolParams, browserTool } from "./tools/browser.js";
2
3
  import { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError } from "./agents/errors.js";
3
4
  import { ProviderStrategy, ResponseFormat, ResponseFormatUndefined, ToolStrategy, providerStrategy, toolStrategy } from "./agents/responses.js";
4
5
  import { JumpToTarget } from "./agents/constants.js";
@@ -32,4 +33,4 @@ import { DynamicStructuredTool, DynamicTool, StructuredTool, Tool, ToolRuntime,
32
33
  import { context } from "@langchain/core/utils/context";
33
34
  import { InMemoryStore } from "@langchain/core/stores";
34
35
  import { Document, DocumentInput } from "@langchain/core/documents";
35
- export { AIMessage, AIMessageChunk, Action, ActionRequest, AfterAgentHook, AfterModelHook, AgentMiddleware, AnyAnnotationRoot, ApproveDecision, BaseMessage, BaseMessageChunk, BeforeAgentHook, BeforeModelHook, BuiltInPIIType, BuiltInState, ClearToolUsesEdit, ClearToolUsesEditConfig, type ContentBlock, ContextEdit, ContextEditingMiddlewareConfig, CreateAgentParams, Decision, DecisionType, DescriptionFactory, Document, type DocumentInput, DynamicStructuredTool, DynamicSystemPromptMiddlewareConfig, DynamicTool, EditDecision, ExecutedToolCall, ExtractZodArrayTypes, FakeToolCallingModel, HITLRequest, HITLResponse, HumanInTheLoopMiddlewareConfig, HumanMessage, HumanMessageChunk, InMemoryStore, InferChannelType, InferContextInput, InferMergedInputState, InferMergedState, InferMiddlewareContext, InferMiddlewareContextInput, InferMiddlewareContextInputs, InferMiddlewareContexts, InferMiddlewareInputState, InferMiddlewareInputStates, InferMiddlewareState, InferMiddlewareStates, InferSchemaInput, Interrupt, InterruptOnConfig, JumpTo, JumpToTarget, LLMToolSelectorConfig, MIDDLEWARE_BRAND, MiddlewareResult, ModelCallLimitMiddlewareConfig, ModelRetryMiddlewareConfig, MultipleStructuredOutputsError, MultipleToolsBoundError, N, NormalizedSchemaInput, OpenAIModerationMiddlewareOptions, PIIDetectionError, PIIDetector, PIIMatch, PIIMiddlewareConfig, PIIRedactionMiddlewareConfig, PIIStrategy, PromptCachingMiddlewareConfig, ProviderStrategy, ReactAgent, RedactionRuleConfig, RejectDecision, ResolvedRedactionRule, ResponseFormat, ResponseFormatUndefined, ReviewConfig, Runtime, StructuredOutputParsingError, StructuredTool, SummarizationMiddlewareConfig, SystemMessage, SystemMessageChunk, TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT, ToAnnotationRoot, TodoListMiddlewareOptions, TokenCounter, Tool, ToolCall, ToolCallHandler, ToolCallLimitConfig, ToolCallLimitExceededError, ToolCallRequest, ToolEmulatorOptions, ToolInvocationError, ToolMessage, ToolMessageChunk, ToolResult, ToolRetryMiddlewareConfig, type ToolRuntime, ToolStrategy, UserInput, WithStateGraphNodes, WrapModelCallHandler, WrapModelCallHook, WrapToolCallHook, anthropicPromptCachingMiddleware, applyStrategy, context, contextEditingMiddleware, countTokensApproximately, createAgent, createMiddleware, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, dynamicSystemPromptMiddleware, filterMessages, humanInTheLoopMiddleware, initChatModel, llmToolSelectorMiddleware, modelCallLimitMiddleware, modelFallbackMiddleware, modelRetryMiddleware, openAIModerationMiddleware, piiMiddleware, piiRedactionMiddleware, providerStrategy, resolveRedactionRule, summarizationMiddleware, todoListMiddleware, tool, toolCallLimitMiddleware, toolEmulatorMiddleware, toolRetryMiddleware, toolStrategy, trimMessages };
36
+ export { AIMessage, AIMessageChunk, Action, ActionRequest, AfterAgentHook, AfterModelHook, AgentMiddleware, AnyAnnotationRoot, ApproveDecision, BaseMessage, BaseMessageChunk, BeforeAgentHook, BeforeModelHook, type BrowserTool, type BrowserToolParams, BuiltInPIIType, BuiltInState, ClearToolUsesEdit, ClearToolUsesEditConfig, type ContentBlock, ContextEdit, ContextEditingMiddlewareConfig, CreateAgentParams, Decision, DecisionType, DescriptionFactory, Document, type DocumentInput, DynamicStructuredTool, DynamicSystemPromptMiddlewareConfig, DynamicTool, EditDecision, ExecutedToolCall, ExtractZodArrayTypes, FakeToolCallingModel, HITLRequest, HITLResponse, HumanInTheLoopMiddlewareConfig, HumanMessage, HumanMessageChunk, InMemoryStore, InferChannelType, InferContextInput, InferMergedInputState, InferMergedState, InferMiddlewareContext, InferMiddlewareContextInput, InferMiddlewareContextInputs, InferMiddlewareContexts, InferMiddlewareInputState, InferMiddlewareInputStates, InferMiddlewareState, InferMiddlewareStates, InferSchemaInput, Interrupt, InterruptOnConfig, JumpTo, JumpToTarget, LLMToolSelectorConfig, MIDDLEWARE_BRAND, MiddlewareResult, ModelCallLimitMiddlewareConfig, ModelRetryMiddlewareConfig, MultipleStructuredOutputsError, MultipleToolsBoundError, N, NormalizedSchemaInput, OpenAIModerationMiddlewareOptions, PIIDetectionError, PIIDetector, PIIMatch, PIIMiddlewareConfig, PIIRedactionMiddlewareConfig, PIIStrategy, PromptCachingMiddlewareConfig, ProviderStrategy, ReactAgent, RedactionRuleConfig, RejectDecision, ResolvedRedactionRule, ResponseFormat, ResponseFormatUndefined, ReviewConfig, Runtime, StructuredOutputParsingError, StructuredTool, SummarizationMiddlewareConfig, SystemMessage, SystemMessageChunk, TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT, ToAnnotationRoot, TodoListMiddlewareOptions, TokenCounter, Tool, ToolCall, ToolCallHandler, ToolCallLimitConfig, ToolCallLimitExceededError, ToolCallRequest, ToolEmulatorOptions, ToolInvocationError, ToolMessage, ToolMessageChunk, ToolResult, ToolRetryMiddlewareConfig, type ToolRuntime, ToolStrategy, UserInput, WithStateGraphNodes, WrapModelCallHandler, WrapModelCallHook, WrapToolCallHook, anthropicPromptCachingMiddleware, applyStrategy, browserTool, context, contextEditingMiddleware, countTokensApproximately, createAgent, createMiddleware, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, dynamicSystemPromptMiddleware, filterMessages, humanInTheLoopMiddleware, initChatModel, llmToolSelectorMiddleware, modelCallLimitMiddleware, modelFallbackMiddleware, modelRetryMiddleware, openAIModerationMiddleware, piiMiddleware, piiRedactionMiddleware, providerStrategy, resolveRedactionRule, summarizationMiddleware, todoListMiddleware, tool, toolCallLimitMiddleware, toolEmulatorMiddleware, toolRetryMiddleware, toolStrategy, trimMessages };
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { __export } from "./_virtual/rolldown_runtime.js";
2
2
  import { initChatModel } from "./chat_models/universal.js";
3
+ import { browserTool } from "./tools/browser.js";
3
4
  import { MultipleStructuredOutputsError, MultipleToolsBoundError, StructuredOutputParsingError, ToolInvocationError } from "./agents/errors.js";
4
5
  import { ProviderStrategy, ToolStrategy, providerStrategy, toolStrategy } from "./agents/responses.js";
5
6
  import { countTokensApproximately } from "./agents/middleware/utils.js";
@@ -63,6 +64,7 @@ __export(src_exports, {
63
64
  ToolStrategy: () => ToolStrategy,
64
65
  anthropicPromptCachingMiddleware: () => anthropicPromptCachingMiddleware,
65
66
  applyStrategy: () => applyStrategy,
67
+ browserTool: () => browserTool,
66
68
  context: () => context,
67
69
  contextEditingMiddleware: () => contextEditingMiddleware,
68
70
  countTokensApproximately: () => countTokensApproximately,
@@ -97,5 +99,5 @@ __export(src_exports, {
97
99
  });
98
100
 
99
101
  //#endregion
100
- export { AIMessage, AIMessageChunk, BaseMessage, BaseMessageChunk, ClearToolUsesEdit, Document, DynamicStructuredTool, DynamicTool, FakeToolCallingModel, HumanMessage, HumanMessageChunk, InMemoryStore, MIDDLEWARE_BRAND, MultipleStructuredOutputsError, MultipleToolsBoundError, PIIDetectionError, ProviderStrategy, StructuredOutputParsingError, StructuredTool, SystemMessage, SystemMessageChunk, TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT, Tool, ToolCallLimitExceededError, ToolInvocationError, ToolMessage, ToolMessageChunk, ToolStrategy, anthropicPromptCachingMiddleware, applyStrategy, context, contextEditingMiddleware, countTokensApproximately, createAgent, createMiddleware, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, dynamicSystemPromptMiddleware, filterMessages, humanInTheLoopMiddleware, initChatModel, llmToolSelectorMiddleware, modelCallLimitMiddleware, modelFallbackMiddleware, modelRetryMiddleware, openAIModerationMiddleware, piiMiddleware, piiRedactionMiddleware, providerStrategy, resolveRedactionRule, src_exports, summarizationMiddleware, todoListMiddleware, tool, toolCallLimitMiddleware, toolEmulatorMiddleware, toolRetryMiddleware, toolStrategy, trimMessages };
102
+ export { AIMessage, AIMessageChunk, BaseMessage, BaseMessageChunk, ClearToolUsesEdit, Document, DynamicStructuredTool, DynamicTool, FakeToolCallingModel, HumanMessage, HumanMessageChunk, InMemoryStore, MIDDLEWARE_BRAND, MultipleStructuredOutputsError, MultipleToolsBoundError, PIIDetectionError, ProviderStrategy, StructuredOutputParsingError, StructuredTool, SystemMessage, SystemMessageChunk, TODO_LIST_MIDDLEWARE_SYSTEM_PROMPT, Tool, ToolCallLimitExceededError, ToolInvocationError, ToolMessage, ToolMessageChunk, ToolStrategy, anthropicPromptCachingMiddleware, applyStrategy, browserTool, context, contextEditingMiddleware, countTokensApproximately, createAgent, createMiddleware, detectCreditCard, detectEmail, detectIP, detectMacAddress, detectUrl, dynamicSystemPromptMiddleware, filterMessages, humanInTheLoopMiddleware, initChatModel, llmToolSelectorMiddleware, modelCallLimitMiddleware, modelFallbackMiddleware, modelRetryMiddleware, openAIModerationMiddleware, piiMiddleware, piiRedactionMiddleware, providerStrategy, resolveRedactionRule, src_exports, summarizationMiddleware, todoListMiddleware, tool, toolCallLimitMiddleware, toolEmulatorMiddleware, toolRetryMiddleware, toolStrategy, trimMessages };
101
103
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * LangChain Messages\n */\nexport {\n BaseMessage,\n BaseMessageChunk,\n AIMessage,\n AIMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n type ContentBlock,\n filterMessages,\n trimMessages,\n} from \"@langchain/core/messages\";\n\n/**\n * Universal Chat Model\n */\nexport { initChatModel } from \"./chat_models/universal.js\";\n\n/**\n * LangChain Tools\n */\nexport {\n tool,\n Tool,\n type ToolRuntime,\n DynamicTool,\n StructuredTool,\n DynamicStructuredTool,\n} from \"@langchain/core/tools\";\n\n/**\n * LangChain utilities\n */\nexport { context } from \"@langchain/core/utils/context\";\n\n/**\n * LangChain Agents\n */\nexport * from \"./agents/index.js\";\n\n/**\n * `createAgent` pre-built middleware\n */\nexport * from \"./agents/middleware/index.js\";\n\n/**\n * LangChain Stores\n */\nexport { InMemoryStore } from \"@langchain/core/stores\";\n\n/**\n * LangChain Documents\n */\nexport { type DocumentInput, Document } from \"@langchain/core/documents\";\n"],"mappings":""}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * LangChain Messages\n */\nexport {\n BaseMessage,\n BaseMessageChunk,\n AIMessage,\n AIMessageChunk,\n SystemMessage,\n SystemMessageChunk,\n HumanMessage,\n HumanMessageChunk,\n ToolMessage,\n ToolMessageChunk,\n type ContentBlock,\n filterMessages,\n trimMessages,\n} from \"@langchain/core/messages\";\n\n/**\n * Universal Chat Model\n */\nexport { initChatModel } from \"./chat_models/universal.js\";\n\n/**\n * LangChain Tools\n */\nexport {\n tool,\n Tool,\n type ToolRuntime,\n DynamicTool,\n StructuredTool,\n DynamicStructuredTool,\n} from \"@langchain/core/tools\";\n\n/**\n * Browser Tools\n */\nexport {\n browserTool,\n type BrowserTool,\n type BrowserToolParams,\n} from \"./tools/browser.js\";\n\n/**\n * LangChain utilities\n */\nexport { context } from \"@langchain/core/utils/context\";\n\n/**\n * LangChain Agents\n */\nexport * from \"./agents/index.js\";\n\n/**\n * `createAgent` pre-built middleware\n */\nexport * from \"./agents/middleware/index.js\";\n\n/**\n * LangChain Stores\n */\nexport { InMemoryStore } from \"@langchain/core/stores\";\n\n/**\n * LangChain Documents\n */\nexport { type DocumentInput, Document } from \"@langchain/core/documents\";\n"],"mappings":""}
@@ -0,0 +1,81 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ const __langchain_core_tools = require_rolldown_runtime.__toESM(require("@langchain/core/tools"));
3
+ const __langchain_langgraph = require_rolldown_runtime.__toESM(require("@langchain/langgraph"));
4
+
5
+ //#region src/tools/browser.ts
6
+ /**
7
+ * Check if we're running in a browser environment.
8
+ */
9
+ const isBrowserEnvironment = () => typeof window !== "undefined" && typeof navigator !== "undefined" && typeof document !== "undefined";
10
+ /**
11
+ * Creates a browser tool that interrupts on the server and executes on the client.
12
+ *
13
+ * Browser tools are defined once and work in both environments:
14
+ * - **Server**: Returns a `Command` that interrupts with the tool call details
15
+ * - **Browser**: Executes the tool directly using browser APIs
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * import { browserTool } from "langchain/tools/browser";
20
+ * import { z } from "zod";
21
+ *
22
+ * export const getLocation = browserTool({
23
+ * name: "get_location",
24
+ * description: "Get the user's current GPS location",
25
+ * schema: z.object({
26
+ * highAccuracy: z.boolean().optional().describe("Request high accuracy GPS"),
27
+ * }),
28
+ * execute: async ({ highAccuracy }) => {
29
+ * return new Promise((resolve, reject) => {
30
+ * navigator.geolocation.getCurrentPosition(
31
+ * (pos) => resolve({
32
+ * latitude: pos.coords.latitude,
33
+ * longitude: pos.coords.longitude,
34
+ * }),
35
+ * (err) => reject(new Error(err.message)),
36
+ * { enableHighAccuracy: highAccuracy }
37
+ * );
38
+ * });
39
+ * },
40
+ * });
41
+ *
42
+ * // Use in createAgent (server)
43
+ * const agent = createAgent({
44
+ * model: "openai:gpt-4o",
45
+ * tools: [getLocation],
46
+ * });
47
+ *
48
+ * // Use in useStream (client)
49
+ * const stream = useStream({
50
+ * assistantId: "agent",
51
+ * browserTools: [getLocation],
52
+ * });
53
+ * ```
54
+ *
55
+ * @param params - The browser tool configuration
56
+ * @returns A browser tool that can be used in both environments
57
+ */
58
+ function browserTool(params) {
59
+ const { execute, name, description, schema } = params;
60
+ const wrappedTool = (0, __langchain_core_tools.tool)(async (args, config) => {
61
+ if (isBrowserEnvironment()) return execute(args);
62
+ return (0, __langchain_langgraph.interrupt)({
63
+ type: "browser_tool",
64
+ toolCall: {
65
+ id: config?.toolCall?.id,
66
+ name,
67
+ args
68
+ }
69
+ });
70
+ }, {
71
+ name,
72
+ description,
73
+ schema,
74
+ metadata: { browserTool: true }
75
+ });
76
+ return Object.assign(wrappedTool, { execute });
77
+ }
78
+
79
+ //#endregion
80
+ exports.browserTool = browserTool;
81
+ //# sourceMappingURL=browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.cjs","names":["params: BrowserToolParams<SchemaT, OutputT>","args: InferInteropZodOutput<SchemaT>","config?: ToolRunnableConfig"],"sources":["../../src/tools/browser.ts"],"sourcesContent":["/**\n * Browser Tools for LangChain Agents\n *\n * This module provides the `browserTool` primitive for creating tools that\n * execute in the browser while the agent runs on the server.\n *\n * @module\n */\n\nimport {\n tool as coreTool,\n DynamicStructuredTool,\n type ToolRunnableConfig,\n} from \"@langchain/core/tools\";\nimport type {\n InteropZodObject,\n InferInteropZodOutput,\n} from \"@langchain/core/utils/types\";\nimport { interrupt } from \"@langchain/langgraph\";\n\n/**\n * Check if we're running in a browser environment.\n */\nconst isBrowserEnvironment = (): boolean =>\n typeof window !== \"undefined\" &&\n typeof navigator !== \"undefined\" &&\n typeof document !== \"undefined\";\n\n/**\n * Parameters for creating a browser tool.\n */\nexport interface BrowserToolParams<\n SchemaT extends InteropZodObject,\n OutputT = unknown\n> {\n /**\n * The name of the tool. Must be unique across all tools.\n */\n name: string;\n\n /**\n * A description of what the tool does. This is shown to the LLM\n * to help it decide when to use the tool.\n */\n description: string;\n\n /**\n * The Zod schema defining the input parameters for the tool.\n */\n schema: SchemaT;\n\n /**\n * The function that executes the tool in the browser.\n * This function only runs in browser environments.\n *\n * @param args - The parsed input arguments matching the schema\n * @returns The tool output\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n}\n\n/**\n * A browser tool that can be used in both server and client environments.\n *\n * On the server, it returns a Command that interrupts execution.\n * On the client, it executes the tool directly.\n */\nexport type BrowserTool<\n SchemaT extends InteropZodObject = InteropZodObject,\n OutputT = unknown\n> = DynamicStructuredTool<SchemaT> & {\n /**\n * The execute function for client-side use.\n * Called by `useStream` when the interrupt is received.\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n};\n\n/**\n * Creates a browser tool that interrupts on the server and executes on the client.\n *\n * Browser tools are defined once and work in both environments:\n * - **Server**: Returns a `Command` that interrupts with the tool call details\n * - **Browser**: Executes the tool directly using browser APIs\n *\n * @example\n * ```typescript\n * import { browserTool } from \"langchain/tools/browser\";\n * import { z } from \"zod\";\n *\n * export const getLocation = browserTool({\n * name: \"get_location\",\n * description: \"Get the user's current GPS location\",\n * schema: z.object({\n * highAccuracy: z.boolean().optional().describe(\"Request high accuracy GPS\"),\n * }),\n * execute: async ({ highAccuracy }) => {\n * return new Promise((resolve, reject) => {\n * navigator.geolocation.getCurrentPosition(\n * (pos) => resolve({\n * latitude: pos.coords.latitude,\n * longitude: pos.coords.longitude,\n * }),\n * (err) => reject(new Error(err.message)),\n * { enableHighAccuracy: highAccuracy }\n * );\n * });\n * },\n * });\n *\n * // Use in createAgent (server)\n * const agent = createAgent({\n * model: \"openai:gpt-4o\",\n * tools: [getLocation],\n * });\n *\n * // Use in useStream (client)\n * const stream = useStream({\n * assistantId: \"agent\",\n * browserTools: [getLocation],\n * });\n * ```\n *\n * @param params - The browser tool configuration\n * @returns A browser tool that can be used in both environments\n */\nexport function browserTool<\n SchemaT extends InteropZodObject,\n OutputT = unknown\n>(params: BrowserToolParams<SchemaT, OutputT>): BrowserTool<SchemaT, OutputT> {\n const { execute, name, description, schema } = params;\n\n // Create the underlying tool using @langchain/core's tool function\n const wrappedTool = coreTool(\n async (\n args: InferInteropZodOutput<SchemaT>,\n config?: ToolRunnableConfig\n ) => {\n // In browser: execute the tool directly\n if (isBrowserEnvironment()) {\n return execute(args);\n }\n\n // On server: interrupt and wait for client to execute\n // The interrupt value contains the tool call details for the client\n return interrupt({\n type: \"browser_tool\",\n toolCall: {\n id: config?.toolCall?.id,\n name,\n args,\n },\n });\n },\n {\n name,\n description,\n schema,\n // Mark as browser tool in metadata for detection\n metadata: {\n browserTool: true,\n },\n }\n );\n\n // Attach the execute function for explicit client-side use (e.g., in useStream)\n return Object.assign(wrappedTool, { execute }) as BrowserTool<\n SchemaT,\n OutputT\n >;\n}\n"],"mappings":";;;;;;;;AAuBA,MAAM,uBAAuB,MAC3B,OAAO,WAAW,eAClB,OAAO,cAAc,eACrB,OAAO,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGtB,SAAgB,YAGdA,QAA4E;CAC5E,MAAM,EAAE,SAAS,MAAM,aAAa,QAAQ,GAAG;CAG/C,MAAM,+CACJ,OACEC,MACAC,WACG;AAEH,MAAI,sBAAsB,CACxB,QAAO,QAAQ,KAAK;AAKtB,8CAAiB;GACf,MAAM;GACN,UAAU;IACR,IAAI,QAAQ,UAAU;IACtB;IACA;GACD;EACF,EAAC;CACH,GACD;EACE;EACA;EACA;EAEA,UAAU,EACR,aAAa,KACd;CACF,EACF;AAGD,QAAO,OAAO,OAAO,aAAa,EAAE,QAAS,EAAC;AAI/C"}
@@ -0,0 +1,96 @@
1
+ import { DynamicStructuredTool } from "@langchain/core/tools";
2
+ import { InferInteropZodOutput, InteropZodObject } from "@langchain/core/utils/types";
3
+
4
+ //#region src/tools/browser.d.ts
5
+
6
+ /**
7
+ * Parameters for creating a browser tool.
8
+ */
9
+ interface BrowserToolParams<SchemaT extends InteropZodObject, OutputT = unknown> {
10
+ /**
11
+ * The name of the tool. Must be unique across all tools.
12
+ */
13
+ name: string;
14
+ /**
15
+ * A description of what the tool does. This is shown to the LLM
16
+ * to help it decide when to use the tool.
17
+ */
18
+ description: string;
19
+ /**
20
+ * The Zod schema defining the input parameters for the tool.
21
+ */
22
+ schema: SchemaT;
23
+ /**
24
+ * The function that executes the tool in the browser.
25
+ * This function only runs in browser environments.
26
+ *
27
+ * @param args - The parsed input arguments matching the schema
28
+ * @returns The tool output
29
+ */
30
+ execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;
31
+ }
32
+ /**
33
+ * A browser tool that can be used in both server and client environments.
34
+ *
35
+ * On the server, it returns a Command that interrupts execution.
36
+ * On the client, it executes the tool directly.
37
+ */
38
+ type BrowserTool<SchemaT extends InteropZodObject = InteropZodObject, OutputT = unknown> = DynamicStructuredTool<SchemaT> & {
39
+ /**
40
+ * The execute function for client-side use.
41
+ * Called by `useStream` when the interrupt is received.
42
+ */
43
+ execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;
44
+ };
45
+ /**
46
+ * Creates a browser tool that interrupts on the server and executes on the client.
47
+ *
48
+ * Browser tools are defined once and work in both environments:
49
+ * - **Server**: Returns a `Command` that interrupts with the tool call details
50
+ * - **Browser**: Executes the tool directly using browser APIs
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * import { browserTool } from "langchain/tools/browser";
55
+ * import { z } from "zod";
56
+ *
57
+ * export const getLocation = browserTool({
58
+ * name: "get_location",
59
+ * description: "Get the user's current GPS location",
60
+ * schema: z.object({
61
+ * highAccuracy: z.boolean().optional().describe("Request high accuracy GPS"),
62
+ * }),
63
+ * execute: async ({ highAccuracy }) => {
64
+ * return new Promise((resolve, reject) => {
65
+ * navigator.geolocation.getCurrentPosition(
66
+ * (pos) => resolve({
67
+ * latitude: pos.coords.latitude,
68
+ * longitude: pos.coords.longitude,
69
+ * }),
70
+ * (err) => reject(new Error(err.message)),
71
+ * { enableHighAccuracy: highAccuracy }
72
+ * );
73
+ * });
74
+ * },
75
+ * });
76
+ *
77
+ * // Use in createAgent (server)
78
+ * const agent = createAgent({
79
+ * model: "openai:gpt-4o",
80
+ * tools: [getLocation],
81
+ * });
82
+ *
83
+ * // Use in useStream (client)
84
+ * const stream = useStream({
85
+ * assistantId: "agent",
86
+ * browserTools: [getLocation],
87
+ * });
88
+ * ```
89
+ *
90
+ * @param params - The browser tool configuration
91
+ * @returns A browser tool that can be used in both environments
92
+ */
93
+ declare function browserTool<SchemaT extends InteropZodObject, OutputT = unknown>(params: BrowserToolParams<SchemaT, OutputT>): BrowserTool<SchemaT, OutputT>;
94
+ //#endregion
95
+ export { BrowserTool, BrowserToolParams, browserTool };
96
+ //# sourceMappingURL=browser.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.cts","names":["DynamicStructuredTool","InteropZodObject","InferInteropZodOutput","BrowserToolParams","SchemaT","OutputT","Promise","BrowserTool","browserTool"],"sources":["../../src/tools/browser.d.ts"],"sourcesContent":["/**\n * Browser Tools for LangChain Agents\n *\n * This module provides the `browserTool` primitive for creating tools that\n * execute in the browser while the agent runs on the server.\n *\n * @module\n */\nimport { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport type { InteropZodObject, InferInteropZodOutput } from \"@langchain/core/utils/types\";\n/**\n * Parameters for creating a browser tool.\n */\nexport interface BrowserToolParams<SchemaT extends InteropZodObject, OutputT = unknown> {\n /**\n * The name of the tool. Must be unique across all tools.\n */\n name: string;\n /**\n * A description of what the tool does. This is shown to the LLM\n * to help it decide when to use the tool.\n */\n description: string;\n /**\n * The Zod schema defining the input parameters for the tool.\n */\n schema: SchemaT;\n /**\n * The function that executes the tool in the browser.\n * This function only runs in browser environments.\n *\n * @param args - The parsed input arguments matching the schema\n * @returns The tool output\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n}\n/**\n * A browser tool that can be used in both server and client environments.\n *\n * On the server, it returns a Command that interrupts execution.\n * On the client, it executes the tool directly.\n */\nexport type BrowserTool<SchemaT extends InteropZodObject = InteropZodObject, OutputT = unknown> = DynamicStructuredTool<SchemaT> & {\n /**\n * The execute function for client-side use.\n * Called by `useStream` when the interrupt is received.\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n};\n/**\n * Creates a browser tool that interrupts on the server and executes on the client.\n *\n * Browser tools are defined once and work in both environments:\n * - **Server**: Returns a `Command` that interrupts with the tool call details\n * - **Browser**: Executes the tool directly using browser APIs\n *\n * @example\n * ```typescript\n * import { browserTool } from \"langchain/tools/browser\";\n * import { z } from \"zod\";\n *\n * export const getLocation = browserTool({\n * name: \"get_location\",\n * description: \"Get the user's current GPS location\",\n * schema: z.object({\n * highAccuracy: z.boolean().optional().describe(\"Request high accuracy GPS\"),\n * }),\n * execute: async ({ highAccuracy }) => {\n * return new Promise((resolve, reject) => {\n * navigator.geolocation.getCurrentPosition(\n * (pos) => resolve({\n * latitude: pos.coords.latitude,\n * longitude: pos.coords.longitude,\n * }),\n * (err) => reject(new Error(err.message)),\n * { enableHighAccuracy: highAccuracy }\n * );\n * });\n * },\n * });\n *\n * // Use in createAgent (server)\n * const agent = createAgent({\n * model: \"openai:gpt-4o\",\n * tools: [getLocation],\n * });\n *\n * // Use in useStream (client)\n * const stream = useStream({\n * assistantId: \"agent\",\n * browserTools: [getLocation],\n * });\n * ```\n *\n * @param params - The browser tool configuration\n * @returns A browser tool that can be used in both environments\n */\nexport declare function browserTool<SchemaT extends InteropZodObject, OutputT = unknown>(params: BrowserToolParams<SchemaT, OutputT>): BrowserTool<SchemaT, OutputT>;\n//# sourceMappingURL=browser.d.ts.map"],"mappings":";;;;;;AAkC8D;AAQ9D;AAAwCC,UA7BvBE,iBA6BuBF,CAAAA,gBA7BWA,gBA6BXA,EAAAA,UAAAA,OAAAA,CAAAA,CAAAA;EAAmBA;;;EAKjBG,IAAAA,EAAAA,MAAAA;EAAtBF;;;AAA0C;EAkDtCM,WAAAA,EAAAA,MAAW;EAAiBP;;;EAA6CE,MAAAA,EAvErFC,OAuEqFD;EAAkDC;;;AAAD;;;;kBA/D9HF,sBAAsBE,aAAaE,QAAQD;;;;;;;;KAQnDE,4BAA4BN,mBAAmBA,uCAAuCD,sBAAsBI;;;;;kBAKpGF,sBAAsBE,aAAaE,QAAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDvCG,4BAA4BP,6CAA6CE,kBAAkBC,SAASC,WAAWE,YAAYH,SAASC"}
@@ -0,0 +1,96 @@
1
+ import { DynamicStructuredTool } from "@langchain/core/tools";
2
+ import { InferInteropZodOutput, InteropZodObject } from "@langchain/core/utils/types";
3
+
4
+ //#region src/tools/browser.d.ts
5
+
6
+ /**
7
+ * Parameters for creating a browser tool.
8
+ */
9
+ interface BrowserToolParams<SchemaT extends InteropZodObject, OutputT = unknown> {
10
+ /**
11
+ * The name of the tool. Must be unique across all tools.
12
+ */
13
+ name: string;
14
+ /**
15
+ * A description of what the tool does. This is shown to the LLM
16
+ * to help it decide when to use the tool.
17
+ */
18
+ description: string;
19
+ /**
20
+ * The Zod schema defining the input parameters for the tool.
21
+ */
22
+ schema: SchemaT;
23
+ /**
24
+ * The function that executes the tool in the browser.
25
+ * This function only runs in browser environments.
26
+ *
27
+ * @param args - The parsed input arguments matching the schema
28
+ * @returns The tool output
29
+ */
30
+ execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;
31
+ }
32
+ /**
33
+ * A browser tool that can be used in both server and client environments.
34
+ *
35
+ * On the server, it returns a Command that interrupts execution.
36
+ * On the client, it executes the tool directly.
37
+ */
38
+ type BrowserTool<SchemaT extends InteropZodObject = InteropZodObject, OutputT = unknown> = DynamicStructuredTool<SchemaT> & {
39
+ /**
40
+ * The execute function for client-side use.
41
+ * Called by `useStream` when the interrupt is received.
42
+ */
43
+ execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;
44
+ };
45
+ /**
46
+ * Creates a browser tool that interrupts on the server and executes on the client.
47
+ *
48
+ * Browser tools are defined once and work in both environments:
49
+ * - **Server**: Returns a `Command` that interrupts with the tool call details
50
+ * - **Browser**: Executes the tool directly using browser APIs
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * import { browserTool } from "langchain/tools/browser";
55
+ * import { z } from "zod";
56
+ *
57
+ * export const getLocation = browserTool({
58
+ * name: "get_location",
59
+ * description: "Get the user's current GPS location",
60
+ * schema: z.object({
61
+ * highAccuracy: z.boolean().optional().describe("Request high accuracy GPS"),
62
+ * }),
63
+ * execute: async ({ highAccuracy }) => {
64
+ * return new Promise((resolve, reject) => {
65
+ * navigator.geolocation.getCurrentPosition(
66
+ * (pos) => resolve({
67
+ * latitude: pos.coords.latitude,
68
+ * longitude: pos.coords.longitude,
69
+ * }),
70
+ * (err) => reject(new Error(err.message)),
71
+ * { enableHighAccuracy: highAccuracy }
72
+ * );
73
+ * });
74
+ * },
75
+ * });
76
+ *
77
+ * // Use in createAgent (server)
78
+ * const agent = createAgent({
79
+ * model: "openai:gpt-4o",
80
+ * tools: [getLocation],
81
+ * });
82
+ *
83
+ * // Use in useStream (client)
84
+ * const stream = useStream({
85
+ * assistantId: "agent",
86
+ * browserTools: [getLocation],
87
+ * });
88
+ * ```
89
+ *
90
+ * @param params - The browser tool configuration
91
+ * @returns A browser tool that can be used in both environments
92
+ */
93
+ declare function browserTool<SchemaT extends InteropZodObject, OutputT = unknown>(params: BrowserToolParams<SchemaT, OutputT>): BrowserTool<SchemaT, OutputT>;
94
+ //#endregion
95
+ export { BrowserTool, BrowserToolParams, browserTool };
96
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","names":["DynamicStructuredTool","InteropZodObject","InferInteropZodOutput","BrowserToolParams","SchemaT","OutputT","Promise","BrowserTool","browserTool"],"sources":["../../src/tools/browser.d.ts"],"sourcesContent":["/**\n * Browser Tools for LangChain Agents\n *\n * This module provides the `browserTool` primitive for creating tools that\n * execute in the browser while the agent runs on the server.\n *\n * @module\n */\nimport { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport type { InteropZodObject, InferInteropZodOutput } from \"@langchain/core/utils/types\";\n/**\n * Parameters for creating a browser tool.\n */\nexport interface BrowserToolParams<SchemaT extends InteropZodObject, OutputT = unknown> {\n /**\n * The name of the tool. Must be unique across all tools.\n */\n name: string;\n /**\n * A description of what the tool does. This is shown to the LLM\n * to help it decide when to use the tool.\n */\n description: string;\n /**\n * The Zod schema defining the input parameters for the tool.\n */\n schema: SchemaT;\n /**\n * The function that executes the tool in the browser.\n * This function only runs in browser environments.\n *\n * @param args - The parsed input arguments matching the schema\n * @returns The tool output\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n}\n/**\n * A browser tool that can be used in both server and client environments.\n *\n * On the server, it returns a Command that interrupts execution.\n * On the client, it executes the tool directly.\n */\nexport type BrowserTool<SchemaT extends InteropZodObject = InteropZodObject, OutputT = unknown> = DynamicStructuredTool<SchemaT> & {\n /**\n * The execute function for client-side use.\n * Called by `useStream` when the interrupt is received.\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n};\n/**\n * Creates a browser tool that interrupts on the server and executes on the client.\n *\n * Browser tools are defined once and work in both environments:\n * - **Server**: Returns a `Command` that interrupts with the tool call details\n * - **Browser**: Executes the tool directly using browser APIs\n *\n * @example\n * ```typescript\n * import { browserTool } from \"langchain/tools/browser\";\n * import { z } from \"zod\";\n *\n * export const getLocation = browserTool({\n * name: \"get_location\",\n * description: \"Get the user's current GPS location\",\n * schema: z.object({\n * highAccuracy: z.boolean().optional().describe(\"Request high accuracy GPS\"),\n * }),\n * execute: async ({ highAccuracy }) => {\n * return new Promise((resolve, reject) => {\n * navigator.geolocation.getCurrentPosition(\n * (pos) => resolve({\n * latitude: pos.coords.latitude,\n * longitude: pos.coords.longitude,\n * }),\n * (err) => reject(new Error(err.message)),\n * { enableHighAccuracy: highAccuracy }\n * );\n * });\n * },\n * });\n *\n * // Use in createAgent (server)\n * const agent = createAgent({\n * model: \"openai:gpt-4o\",\n * tools: [getLocation],\n * });\n *\n * // Use in useStream (client)\n * const stream = useStream({\n * assistantId: \"agent\",\n * browserTools: [getLocation],\n * });\n * ```\n *\n * @param params - The browser tool configuration\n * @returns A browser tool that can be used in both environments\n */\nexport declare function browserTool<SchemaT extends InteropZodObject, OutputT = unknown>(params: BrowserToolParams<SchemaT, OutputT>): BrowserTool<SchemaT, OutputT>;\n//# sourceMappingURL=browser.d.ts.map"],"mappings":";;;;;;AAkC8D;AAQ9D;AAAwCC,UA7BvBE,iBA6BuBF,CAAAA,gBA7BWA,gBA6BXA,EAAAA,UAAAA,OAAAA,CAAAA,CAAAA;EAAmBA;;;EAKjBG,IAAAA,EAAAA,MAAAA;EAAtBF;;;AAA0C;EAkDtCM,WAAAA,EAAAA,MAAW;EAAiBP;;;EAA6CE,MAAAA,EAvErFC,OAuEqFD;EAAkDC;;;AAAD;;;;kBA/D9HF,sBAAsBE,aAAaE,QAAQD;;;;;;;;KAQnDE,4BAA4BN,mBAAmBA,uCAAuCD,sBAAsBI;;;;;kBAKpGF,sBAAsBE,aAAaE,QAAQD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkDvCG,4BAA4BP,6CAA6CE,kBAAkBC,SAASC,WAAWE,YAAYH,SAASC"}
@@ -0,0 +1,80 @@
1
+ import { tool } from "@langchain/core/tools";
2
+ import { interrupt } from "@langchain/langgraph";
3
+
4
+ //#region src/tools/browser.ts
5
+ /**
6
+ * Check if we're running in a browser environment.
7
+ */
8
+ const isBrowserEnvironment = () => typeof window !== "undefined" && typeof navigator !== "undefined" && typeof document !== "undefined";
9
+ /**
10
+ * Creates a browser tool that interrupts on the server and executes on the client.
11
+ *
12
+ * Browser tools are defined once and work in both environments:
13
+ * - **Server**: Returns a `Command` that interrupts with the tool call details
14
+ * - **Browser**: Executes the tool directly using browser APIs
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * import { browserTool } from "langchain/tools/browser";
19
+ * import { z } from "zod";
20
+ *
21
+ * export const getLocation = browserTool({
22
+ * name: "get_location",
23
+ * description: "Get the user's current GPS location",
24
+ * schema: z.object({
25
+ * highAccuracy: z.boolean().optional().describe("Request high accuracy GPS"),
26
+ * }),
27
+ * execute: async ({ highAccuracy }) => {
28
+ * return new Promise((resolve, reject) => {
29
+ * navigator.geolocation.getCurrentPosition(
30
+ * (pos) => resolve({
31
+ * latitude: pos.coords.latitude,
32
+ * longitude: pos.coords.longitude,
33
+ * }),
34
+ * (err) => reject(new Error(err.message)),
35
+ * { enableHighAccuracy: highAccuracy }
36
+ * );
37
+ * });
38
+ * },
39
+ * });
40
+ *
41
+ * // Use in createAgent (server)
42
+ * const agent = createAgent({
43
+ * model: "openai:gpt-4o",
44
+ * tools: [getLocation],
45
+ * });
46
+ *
47
+ * // Use in useStream (client)
48
+ * const stream = useStream({
49
+ * assistantId: "agent",
50
+ * browserTools: [getLocation],
51
+ * });
52
+ * ```
53
+ *
54
+ * @param params - The browser tool configuration
55
+ * @returns A browser tool that can be used in both environments
56
+ */
57
+ function browserTool(params) {
58
+ const { execute, name, description, schema } = params;
59
+ const wrappedTool = tool(async (args, config) => {
60
+ if (isBrowserEnvironment()) return execute(args);
61
+ return interrupt({
62
+ type: "browser_tool",
63
+ toolCall: {
64
+ id: config?.toolCall?.id,
65
+ name,
66
+ args
67
+ }
68
+ });
69
+ }, {
70
+ name,
71
+ description,
72
+ schema,
73
+ metadata: { browserTool: true }
74
+ });
75
+ return Object.assign(wrappedTool, { execute });
76
+ }
77
+
78
+ //#endregion
79
+ export { browserTool };
80
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","names":["params: BrowserToolParams<SchemaT, OutputT>","coreTool","args: InferInteropZodOutput<SchemaT>","config?: ToolRunnableConfig"],"sources":["../../src/tools/browser.ts"],"sourcesContent":["/**\n * Browser Tools for LangChain Agents\n *\n * This module provides the `browserTool` primitive for creating tools that\n * execute in the browser while the agent runs on the server.\n *\n * @module\n */\n\nimport {\n tool as coreTool,\n DynamicStructuredTool,\n type ToolRunnableConfig,\n} from \"@langchain/core/tools\";\nimport type {\n InteropZodObject,\n InferInteropZodOutput,\n} from \"@langchain/core/utils/types\";\nimport { interrupt } from \"@langchain/langgraph\";\n\n/**\n * Check if we're running in a browser environment.\n */\nconst isBrowserEnvironment = (): boolean =>\n typeof window !== \"undefined\" &&\n typeof navigator !== \"undefined\" &&\n typeof document !== \"undefined\";\n\n/**\n * Parameters for creating a browser tool.\n */\nexport interface BrowserToolParams<\n SchemaT extends InteropZodObject,\n OutputT = unknown\n> {\n /**\n * The name of the tool. Must be unique across all tools.\n */\n name: string;\n\n /**\n * A description of what the tool does. This is shown to the LLM\n * to help it decide when to use the tool.\n */\n description: string;\n\n /**\n * The Zod schema defining the input parameters for the tool.\n */\n schema: SchemaT;\n\n /**\n * The function that executes the tool in the browser.\n * This function only runs in browser environments.\n *\n * @param args - The parsed input arguments matching the schema\n * @returns The tool output\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n}\n\n/**\n * A browser tool that can be used in both server and client environments.\n *\n * On the server, it returns a Command that interrupts execution.\n * On the client, it executes the tool directly.\n */\nexport type BrowserTool<\n SchemaT extends InteropZodObject = InteropZodObject,\n OutputT = unknown\n> = DynamicStructuredTool<SchemaT> & {\n /**\n * The execute function for client-side use.\n * Called by `useStream` when the interrupt is received.\n */\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n};\n\n/**\n * Creates a browser tool that interrupts on the server and executes on the client.\n *\n * Browser tools are defined once and work in both environments:\n * - **Server**: Returns a `Command` that interrupts with the tool call details\n * - **Browser**: Executes the tool directly using browser APIs\n *\n * @example\n * ```typescript\n * import { browserTool } from \"langchain/tools/browser\";\n * import { z } from \"zod\";\n *\n * export const getLocation = browserTool({\n * name: \"get_location\",\n * description: \"Get the user's current GPS location\",\n * schema: z.object({\n * highAccuracy: z.boolean().optional().describe(\"Request high accuracy GPS\"),\n * }),\n * execute: async ({ highAccuracy }) => {\n * return new Promise((resolve, reject) => {\n * navigator.geolocation.getCurrentPosition(\n * (pos) => resolve({\n * latitude: pos.coords.latitude,\n * longitude: pos.coords.longitude,\n * }),\n * (err) => reject(new Error(err.message)),\n * { enableHighAccuracy: highAccuracy }\n * );\n * });\n * },\n * });\n *\n * // Use in createAgent (server)\n * const agent = createAgent({\n * model: \"openai:gpt-4o\",\n * tools: [getLocation],\n * });\n *\n * // Use in useStream (client)\n * const stream = useStream({\n * assistantId: \"agent\",\n * browserTools: [getLocation],\n * });\n * ```\n *\n * @param params - The browser tool configuration\n * @returns A browser tool that can be used in both environments\n */\nexport function browserTool<\n SchemaT extends InteropZodObject,\n OutputT = unknown\n>(params: BrowserToolParams<SchemaT, OutputT>): BrowserTool<SchemaT, OutputT> {\n const { execute, name, description, schema } = params;\n\n // Create the underlying tool using @langchain/core's tool function\n const wrappedTool = coreTool(\n async (\n args: InferInteropZodOutput<SchemaT>,\n config?: ToolRunnableConfig\n ) => {\n // In browser: execute the tool directly\n if (isBrowserEnvironment()) {\n return execute(args);\n }\n\n // On server: interrupt and wait for client to execute\n // The interrupt value contains the tool call details for the client\n return interrupt({\n type: \"browser_tool\",\n toolCall: {\n id: config?.toolCall?.id,\n name,\n args,\n },\n });\n },\n {\n name,\n description,\n schema,\n // Mark as browser tool in metadata for detection\n metadata: {\n browserTool: true,\n },\n }\n );\n\n // Attach the execute function for explicit client-side use (e.g., in useStream)\n return Object.assign(wrappedTool, { execute }) as BrowserTool<\n SchemaT,\n OutputT\n >;\n}\n"],"mappings":";;;;;;;AAuBA,MAAM,uBAAuB,MAC3B,OAAO,WAAW,eAClB,OAAO,cAAc,eACrB,OAAO,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGtB,SAAgB,YAGdA,QAA4E;CAC5E,MAAM,EAAE,SAAS,MAAM,aAAa,QAAQ,GAAG;CAG/C,MAAM,cAAcC,KAClB,OACEC,MACAC,WACG;AAEH,MAAI,sBAAsB,CACxB,QAAO,QAAQ,KAAK;AAKtB,SAAO,UAAU;GACf,MAAM;GACN,UAAU;IACR,IAAI,QAAQ,UAAU;IACtB;IACA;GACD;EACF,EAAC;CACH,GACD;EACE;EACA;EACA;EAEA,UAAU,EACR,aAAa,KACd;CACF,EACF;AAGD,QAAO,OAAO,OAAO,aAAa,EAAE,QAAS,EAAC;AAI/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langchain",
3
- "version": "1.2.2",
3
+ "version": "1.2.3-dev-1766726832377",
4
4
  "description": "Typescript bindings for langchain",
5
5
  "author": "LangChain",
6
6
  "license": "MIT",
@@ -53,15 +53,15 @@
53
53
  "typescript": "~5.8.3",
54
54
  "vitest": "^3.2.4",
55
55
  "yaml": "^2.8.1",
56
- "@langchain/anthropic": "1.3.2",
56
+ "@langchain/anthropic": "1.3.3-dev-1766726832377",
57
57
  "@langchain/cohere": "1.0.1",
58
- "@langchain/core": "1.1.7",
58
+ "@langchain/core": "1.1.8-dev-1766726832377",
59
59
  "@langchain/eslint": "0.1.1",
60
60
  "@langchain/openai": "1.2.0",
61
61
  "@langchain/tsconfig": "0.0.1"
62
62
  },
63
63
  "peerDependencies": {
64
- "@langchain/core": "1.1.7"
64
+ "@langchain/core": "1.1.8-dev-1766726832377"
65
65
  },
66
66
  "dependencies": {
67
67
  "@langchain/langgraph": "^1.0.0",
@@ -1 +0,0 @@
1
- module.exports = require("../dist/chat_models/universal.cjs");
@@ -1 +0,0 @@
1
- export * from "../dist/chat_models/universal.js";
@@ -1 +0,0 @@
1
- export * from "../dist/chat_models/universal.js";
@@ -1 +0,0 @@
1
- export * from "../dist/chat_models/universal.js";
package/hub/node.cjs DELETED
@@ -1 +0,0 @@
1
- module.exports = require("../dist/hub/node.cjs");
package/hub/node.d.cts DELETED
@@ -1 +0,0 @@
1
- export * from "../dist/hub/node.js";
package/hub/node.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "../dist/hub/node.js";
package/hub/node.js DELETED
@@ -1 +0,0 @@
1
- export * from "../dist/hub/node.js";
package/hub.cjs DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./dist/hub/index.cjs");
package/hub.d.cts DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/hub/index.js";
package/hub.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/hub/index.js";
package/hub.js DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/hub/index.js";
@@ -1 +0,0 @@
1
- module.exports = require("../dist/load/serializable.cjs");
@@ -1 +0,0 @@
1
- export * from "../dist/load/serializable.js";
@@ -1 +0,0 @@
1
- export * from "../dist/load/serializable.js";
@@ -1 +0,0 @@
1
- export * from "../dist/load/serializable.js";
package/load.cjs DELETED
@@ -1 +0,0 @@
1
- module.exports = require("./dist/load/index.cjs");