langchain 1.2.35 → 1.3.0-dev-1773962633795

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 (80) hide show
  1. package/CHANGELOG.md +0 -40
  2. package/dist/agents/ReactAgent.cjs +8 -26
  3. package/dist/agents/ReactAgent.cjs.map +1 -1
  4. package/dist/agents/ReactAgent.d.cts +1 -1
  5. package/dist/agents/ReactAgent.d.cts.map +1 -1
  6. package/dist/agents/ReactAgent.d.ts +1 -1
  7. package/dist/agents/ReactAgent.d.ts.map +1 -1
  8. package/dist/agents/ReactAgent.js +8 -26
  9. package/dist/agents/ReactAgent.js.map +1 -1
  10. package/dist/agents/nodes/ToolNode.cjs +0 -2
  11. package/dist/agents/nodes/ToolNode.cjs.map +1 -1
  12. package/dist/agents/nodes/ToolNode.js +0 -2
  13. package/dist/agents/nodes/ToolNode.js.map +1 -1
  14. package/dist/agents/types.d.cts +4 -12
  15. package/dist/agents/types.d.cts.map +1 -1
  16. package/dist/agents/types.d.ts +4 -12
  17. package/dist/agents/types.d.ts.map +1 -1
  18. package/dist/browser.cjs +3 -7
  19. package/dist/browser.cjs.map +1 -1
  20. package/dist/browser.d.cts +3 -2
  21. package/dist/browser.d.ts +3 -2
  22. package/dist/browser.js +2 -1
  23. package/dist/browser.js.map +1 -1
  24. package/dist/index.cjs +3 -7
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +3 -2
  27. package/dist/index.d.ts +3 -2
  28. package/dist/index.js +2 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/load/import_map.cjs +3 -1
  31. package/dist/load/import_map.cjs.map +1 -1
  32. package/dist/load/import_map.js +3 -1
  33. package/dist/load/import_map.js.map +1 -1
  34. package/dist/tools/headless.cjs +113 -0
  35. package/dist/tools/headless.cjs.map +1 -0
  36. package/dist/tools/headless.d.cts +122 -0
  37. package/dist/tools/headless.d.cts.map +1 -0
  38. package/dist/tools/headless.d.ts +122 -0
  39. package/dist/tools/headless.d.ts.map +1 -0
  40. package/dist/tools/headless.js +112 -0
  41. package/dist/tools/headless.js.map +1 -0
  42. package/dist/tools/index.cjs +15 -0
  43. package/dist/tools/index.cjs.map +1 -0
  44. package/dist/tools/index.d.cts +2 -0
  45. package/dist/tools/index.d.ts +2 -0
  46. package/dist/tools/index.js +8 -0
  47. package/dist/tools/index.js.map +1 -0
  48. package/package.json +16 -5
  49. package/chat_models/universal.cjs +0 -1
  50. package/chat_models/universal.d.cts +0 -1
  51. package/chat_models/universal.d.ts +0 -1
  52. package/chat_models/universal.js +0 -1
  53. package/hub/node.cjs +0 -1
  54. package/hub/node.d.cts +0 -1
  55. package/hub/node.d.ts +0 -1
  56. package/hub/node.js +0 -1
  57. package/hub.cjs +0 -1
  58. package/hub.d.cts +0 -1
  59. package/hub.d.ts +0 -1
  60. package/hub.js +0 -1
  61. package/load/serializable.cjs +0 -1
  62. package/load/serializable.d.cts +0 -1
  63. package/load/serializable.d.ts +0 -1
  64. package/load/serializable.js +0 -1
  65. package/load.cjs +0 -1
  66. package/load.d.cts +0 -1
  67. package/load.d.ts +0 -1
  68. package/load.js +0 -1
  69. package/storage/encoder_backed.cjs +0 -1
  70. package/storage/encoder_backed.d.cts +0 -1
  71. package/storage/encoder_backed.d.ts +0 -1
  72. package/storage/encoder_backed.js +0 -1
  73. package/storage/file_system.cjs +0 -1
  74. package/storage/file_system.d.cts +0 -1
  75. package/storage/file_system.d.ts +0 -1
  76. package/storage/file_system.js +0 -1
  77. package/storage/in_memory.cjs +0 -1
  78. package/storage/in_memory.d.cts +0 -1
  79. package/storage/in_memory.d.ts +0 -1
  80. package/storage/in_memory.js +0 -1
@@ -0,0 +1,122 @@
1
+ import { DynamicStructuredTool, tool } from "@langchain/core/tools";
2
+ import { InferInteropZodInput, InferInteropZodOutput, InteropZodObject } from "@langchain/core/utils/types";
3
+
4
+ //#region src/tools/headless.d.ts
5
+ /**
6
+ * Configuration fields for creating a headless tool.
7
+ */
8
+ type HeadlessToolFields<SchemaT extends InteropZodObject, NameT extends string = string> = {
9
+ /** The name of the tool. Used by the client to match implementations. */name: NameT; /** Description of what the tool does. */
10
+ description: string; /** The Zod schema defining the tool's input. */
11
+ schema: SchemaT;
12
+ };
13
+ /**
14
+ * A tool implementation that pairs a headless tool with its execution function.
15
+ *
16
+ * Created by calling `.implement()` on a {@link HeadlessTool}.
17
+ * Pass to `useStream({ tools: [...] })` on the client side.
18
+ */
19
+ type HeadlessToolImplementation<SchemaT extends InteropZodObject = InteropZodObject, OutputT = unknown, NameT extends string = string> = {
20
+ tool: HeadlessTool<SchemaT, NameT>;
21
+ execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;
22
+ };
23
+ /**
24
+ * A headless tool that always interrupts agent execution on the server.
25
+ *
26
+ * The implementation is provided separately on the client via
27
+ * `useStream({ tools: [...] })` using `.implement()`.
28
+ */
29
+ type HeadlessTool<SchemaT extends InteropZodObject = InteropZodObject, NameT extends string = string> = DynamicStructuredTool<SchemaT, InferInteropZodOutput<SchemaT>, InferInteropZodInput<SchemaT>, unknown, unknown, NameT> & {
30
+ /**
31
+ * Pairs this headless tool with a client-side implementation.
32
+ *
33
+ * The returned object should be passed to `useStream({ tools: [...] })`.
34
+ * The SDK matches the implementation to the tool by name and calls
35
+ * `execute` with the typed arguments from the interrupt payload.
36
+ *
37
+ * @param execute - The function that implements the tool on the client
38
+ */
39
+ implement: <OutputT>(execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>) => HeadlessToolImplementation<SchemaT, OutputT, NameT>;
40
+ };
41
+ /**
42
+ * The headless overload signature added to the core `tool` function.
43
+ *
44
+ * When called **without** an implementation function — just `tool({ name, description, schema })` —
45
+ * returns a {@link HeadlessTool} that interrupts on every agent invocation.
46
+ * The client provides the implementation via `useStream({ tools: [...] })`.
47
+ */
48
+ type HeadlessToolOverload = {
49
+ <SchemaT extends InteropZodObject, NameT extends string>(fields: HeadlessToolFields<SchemaT, NameT>): HeadlessTool<SchemaT, NameT>;
50
+ };
51
+ /**
52
+ * Unified tool primitive for LangChain agents.
53
+ *
54
+ * Enhances the `tool` function from `@langchain/core/tools` with a headless
55
+ * overload: when called **without** an implementation function, the tool
56
+ * interrupts agent execution and lets the client supply the implementation.
57
+ *
58
+ * ---
59
+ *
60
+ * **Normal tool** — pass an implementation function as the first argument:
61
+ *
62
+ * ```typescript
63
+ * import { tool } from "langchain/tools";
64
+ * import { z } from "zod";
65
+ *
66
+ * const getWeather = tool(
67
+ * async ({ city }) => `The weather in ${city} is sunny.`,
68
+ * {
69
+ * name: "get_weather",
70
+ * description: "Get the weather for a city",
71
+ * schema: z.object({ city: z.string() }),
72
+ * }
73
+ * );
74
+ * ```
75
+ *
76
+ * ---
77
+ *
78
+ * **Headless tool** — omit the implementation; the client provides it later:
79
+ *
80
+ * ```typescript
81
+ * import { tool } from "langchain/tools";
82
+ * import { z } from "zod";
83
+ *
84
+ * // Server: define the tool shape — no implementation needed
85
+ * export const getLocation = tool({
86
+ * name: "get_location",
87
+ * description: "Get the user's current GPS location",
88
+ * schema: z.object({
89
+ * highAccuracy: z.boolean().optional().describe("Request high accuracy GPS"),
90
+ * }),
91
+ * });
92
+ *
93
+ * // Server: register with the agent
94
+ * const agent = createAgent({
95
+ * model: "openai:gpt-4o",
96
+ * tools: [getLocation],
97
+ * });
98
+ *
99
+ * // Client: provide the implementation in useStream
100
+ * const stream = useStream({
101
+ * assistantId: "agent",
102
+ * tools: [
103
+ * getLocation.implement(async ({ highAccuracy }) => {
104
+ * return new Promise((resolve, reject) => {
105
+ * navigator.geolocation.getCurrentPosition(
106
+ * (pos) => resolve({
107
+ * latitude: pos.coords.latitude,
108
+ * longitude: pos.coords.longitude,
109
+ * }),
110
+ * (err) => reject(new Error(err.message)),
111
+ * { enableHighAccuracy: highAccuracy }
112
+ * );
113
+ * });
114
+ * }),
115
+ * ],
116
+ * });
117
+ * ```
118
+ */
119
+ declare const tool$1: HeadlessToolOverload & typeof tool;
120
+ //#endregion
121
+ export { HeadlessTool, HeadlessToolFields, HeadlessToolImplementation, tool$1 as tool };
122
+ //# sourceMappingURL=headless.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless.d.ts","names":[],"sources":["../../src/tools/headless.ts"],"mappings":";;;;;;;KAyBY,kBAAA,iBACM,gBAAA;EAIV,yEAAN,IAAA,EAAM,KAAA,EAIN;EAFA,WAAA,UAEe;EAAf,MAAA,EAAQ,OAAA;AAAA;;;;;;;KASE,0BAAA,iBACM,gBAAA,GAAmB,gBAAA;EAInC,IAAA,EAAM,YAAA,CAAa,OAAA,EAAS,KAAA;EAC5B,OAAA,GAAU,IAAA,EAAM,qBAAA,CAAsB,OAAA,MAAa,OAAA,CAAQ,OAAA;AAAA;;;;;;;KASjD,YAAA,iBACM,gBAAA,GAAmB,gBAAA,mCAEjC,qBAAA,CACF,OAAA,EACA,qBAAA,CAAsB,OAAA,GACtB,oBAAA,CAAqB,OAAA,qBAGrB,KAAA;EArBA;;;;;;;;;EAgCA,SAAA,YACE,OAAA,GAAU,IAAA,EAAM,qBAAA,CAAsB,OAAA,MAAa,OAAA,CAAQ,OAAA,MACxD,0BAAA,CAA2B,OAAA,EAAS,OAAA,EAAS,KAAA;AAAA;;;AAtBpD;;;;;KA8EK,oBAAA;EAAA,iBACc,gBAAA,wBACf,MAAA,EAAQ,kBAAA,CAAmB,OAAA,EAAS,KAAA,IACnC,YAAA,CAAa,OAAA,EAAS,KAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1DzB;;;;;;;;;;;;;;;;;;;;;;;;AAiIF;;;;;cAAa,MAAA,EAAM,oBAAA,UAA8B,IAAA"}
@@ -0,0 +1,112 @@
1
+ import { tool } from "@langchain/core/tools";
2
+ //#region src/tools/headless.ts
3
+ /**
4
+ * Unified Tool Primitive for LangChain Agents
5
+ *
6
+ * This module re-exports the `tool` primitive from `@langchain/core/tools` with
7
+ * an additional overload: when called without an implementation function, it
8
+ * creates a **headless tool** that interrupts agent execution and delegates the
9
+ * implementation to the client (e.g. via `useStream({ tools: [...] })`).
10
+ *
11
+ * @module
12
+ */
13
+ function createHeadlessTool(fields) {
14
+ const { name, description, schema } = fields;
15
+ const wrappedTool = tool(async (args, config) => {
16
+ const { interrupt } = await import("@langchain/langgraph");
17
+ return interrupt({
18
+ type: "tool",
19
+ toolCall: {
20
+ id: config?.toolCall?.id,
21
+ name,
22
+ args
23
+ }
24
+ });
25
+ }, {
26
+ name,
27
+ description,
28
+ schema,
29
+ metadata: { headlessTool: true }
30
+ });
31
+ const headlessTool = Object.assign(wrappedTool, { implement: (execute) => ({
32
+ tool: headlessTool,
33
+ execute
34
+ }) });
35
+ return headlessTool;
36
+ }
37
+ /**
38
+ * Unified tool primitive for LangChain agents.
39
+ *
40
+ * Enhances the `tool` function from `@langchain/core/tools` with a headless
41
+ * overload: when called **without** an implementation function, the tool
42
+ * interrupts agent execution and lets the client supply the implementation.
43
+ *
44
+ * ---
45
+ *
46
+ * **Normal tool** — pass an implementation function as the first argument:
47
+ *
48
+ * ```typescript
49
+ * import { tool } from "langchain/tools";
50
+ * import { z } from "zod";
51
+ *
52
+ * const getWeather = tool(
53
+ * async ({ city }) => `The weather in ${city} is sunny.`,
54
+ * {
55
+ * name: "get_weather",
56
+ * description: "Get the weather for a city",
57
+ * schema: z.object({ city: z.string() }),
58
+ * }
59
+ * );
60
+ * ```
61
+ *
62
+ * ---
63
+ *
64
+ * **Headless tool** — omit the implementation; the client provides it later:
65
+ *
66
+ * ```typescript
67
+ * import { tool } from "langchain/tools";
68
+ * import { z } from "zod";
69
+ *
70
+ * // Server: define the tool shape — no implementation needed
71
+ * export const getLocation = tool({
72
+ * name: "get_location",
73
+ * description: "Get the user's current GPS location",
74
+ * schema: z.object({
75
+ * highAccuracy: z.boolean().optional().describe("Request high accuracy GPS"),
76
+ * }),
77
+ * });
78
+ *
79
+ * // Server: register with the agent
80
+ * const agent = createAgent({
81
+ * model: "openai:gpt-4o",
82
+ * tools: [getLocation],
83
+ * });
84
+ *
85
+ * // Client: provide the implementation in useStream
86
+ * const stream = useStream({
87
+ * assistantId: "agent",
88
+ * tools: [
89
+ * getLocation.implement(async ({ highAccuracy }) => {
90
+ * return new Promise((resolve, reject) => {
91
+ * navigator.geolocation.getCurrentPosition(
92
+ * (pos) => resolve({
93
+ * latitude: pos.coords.latitude,
94
+ * longitude: pos.coords.longitude,
95
+ * }),
96
+ * (err) => reject(new Error(err.message)),
97
+ * { enableHighAccuracy: highAccuracy }
98
+ * );
99
+ * });
100
+ * }),
101
+ * ],
102
+ * });
103
+ * ```
104
+ */
105
+ const tool$1 = ((funcOrFields, fields) => {
106
+ if (typeof funcOrFields !== "function") return createHeadlessTool(funcOrFields);
107
+ return tool(funcOrFields, fields);
108
+ });
109
+ //#endregion
110
+ export { tool$1 as tool };
111
+
112
+ //# sourceMappingURL=headless.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless.js","names":["coreTool","tool"],"sources":["../../src/tools/headless.ts"],"sourcesContent":["/**\n * Unified Tool Primitive for LangChain Agents\n *\n * This module re-exports the `tool` primitive from `@langchain/core/tools` with\n * an additional overload: when called without an implementation function, it\n * creates a **headless tool** that interrupts agent execution and delegates the\n * implementation to the client (e.g. via `useStream({ tools: [...] })`).\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 InferInteropZodInput,\n InferInteropZodOutput,\n} from \"@langchain/core/utils/types\";\n\n/**\n * Configuration fields for creating a headless tool.\n */\nexport type HeadlessToolFields<\n SchemaT extends InteropZodObject,\n NameT extends string = string,\n> = {\n /** The name of the tool. Used by the client to match implementations. */\n name: NameT;\n /** Description of what the tool does. */\n description: string;\n /** The Zod schema defining the tool's input. */\n schema: SchemaT;\n};\n\n/**\n * A tool implementation that pairs a headless tool with its execution function.\n *\n * Created by calling `.implement()` on a {@link HeadlessTool}.\n * Pass to `useStream({ tools: [...] })` on the client side.\n */\nexport type HeadlessToolImplementation<\n SchemaT extends InteropZodObject = InteropZodObject,\n OutputT = unknown,\n NameT extends string = string,\n> = {\n tool: HeadlessTool<SchemaT, NameT>;\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>;\n};\n\n/**\n * A headless tool that always interrupts agent execution on the server.\n *\n * The implementation is provided separately on the client via\n * `useStream({ tools: [...] })` using `.implement()`.\n */\nexport type HeadlessTool<\n SchemaT extends InteropZodObject = InteropZodObject,\n NameT extends string = string,\n> = DynamicStructuredTool<\n SchemaT,\n InferInteropZodOutput<SchemaT>,\n InferInteropZodInput<SchemaT>,\n unknown,\n unknown,\n NameT\n> & {\n /**\n * Pairs this headless tool with a client-side implementation.\n *\n * The returned object should be passed to `useStream({ tools: [...] })`.\n * The SDK matches the implementation to the tool by name and calls\n * `execute` with the typed arguments from the interrupt payload.\n *\n * @param execute - The function that implements the tool on the client\n */\n implement: <OutputT>(\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>\n ) => HeadlessToolImplementation<SchemaT, OutputT, NameT>;\n};\n\nfunction createHeadlessTool<\n SchemaT extends InteropZodObject,\n NameT extends string,\n>(fields: HeadlessToolFields<SchemaT, NameT>): HeadlessTool<SchemaT, NameT> {\n const { name, description, schema } = fields;\n\n const wrappedTool = coreTool(\n async (\n args: InferInteropZodOutput<SchemaT>,\n config?: ToolRunnableConfig\n ) => {\n const { interrupt } = await import(\"@langchain/langgraph\");\n return interrupt({\n type: \"tool\",\n toolCall: {\n id: config?.toolCall?.id,\n name,\n args,\n },\n });\n },\n {\n name,\n description,\n schema,\n metadata: {\n headlessTool: true,\n },\n }\n );\n\n const headlessTool: HeadlessTool<SchemaT, NameT> = Object.assign(\n wrappedTool,\n {\n implement: <OutputT>(\n execute: (args: InferInteropZodOutput<SchemaT>) => Promise<OutputT>\n ): HeadlessToolImplementation<SchemaT, OutputT, NameT> => ({\n tool: headlessTool,\n execute,\n }),\n }\n ) as HeadlessTool<SchemaT, NameT>;\n\n return headlessTool;\n}\n\n/**\n * The headless overload signature added to the core `tool` function.\n *\n * When called **without** an implementation function — just `tool({ name, description, schema })` —\n * returns a {@link HeadlessTool} that interrupts on every agent invocation.\n * The client provides the implementation via `useStream({ tools: [...] })`.\n */\ntype HeadlessToolOverload = {\n <SchemaT extends InteropZodObject, NameT extends string>(\n fields: HeadlessToolFields<SchemaT, NameT>\n ): HeadlessTool<SchemaT, NameT>;\n};\n\n/**\n * Unified tool primitive for LangChain agents.\n *\n * Enhances the `tool` function from `@langchain/core/tools` with a headless\n * overload: when called **without** an implementation function, the tool\n * interrupts agent execution and lets the client supply the implementation.\n *\n * ---\n *\n * **Normal tool** — pass an implementation function as the first argument:\n *\n * ```typescript\n * import { tool } from \"langchain/tools\";\n * import { z } from \"zod\";\n *\n * const getWeather = tool(\n * async ({ city }) => `The weather in ${city} is sunny.`,\n * {\n * name: \"get_weather\",\n * description: \"Get the weather for a city\",\n * schema: z.object({ city: z.string() }),\n * }\n * );\n * ```\n *\n * ---\n *\n * **Headless tool** — omit the implementation; the client provides it later:\n *\n * ```typescript\n * import { tool } from \"langchain/tools\";\n * import { z } from \"zod\";\n *\n * // Server: define the tool shape — no implementation needed\n * export const getLocation = tool({\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 * });\n *\n * // Server: register with the agent\n * const agent = createAgent({\n * model: \"openai:gpt-4o\",\n * tools: [getLocation],\n * });\n *\n * // Client: provide the implementation in useStream\n * const stream = useStream({\n * assistantId: \"agent\",\n * tools: [\n * getLocation.implement(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 * ```\n */\nexport const tool: HeadlessToolOverload & typeof coreTool = ((\n funcOrFields: unknown,\n fields?: unknown\n) => {\n if (typeof funcOrFields !== \"function\") {\n return createHeadlessTool(\n funcOrFields as HeadlessToolFields<InteropZodObject, string>\n );\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (coreTool as any)(funcOrFields, fields);\n}) as HeadlessToolOverload & typeof coreTool;\n"],"mappings":";;;;;;;;;;;;AAmFA,SAAS,mBAGP,QAA0E;CAC1E,MAAM,EAAE,MAAM,aAAa,WAAW;CAEtC,MAAM,cAAcA,KAClB,OACE,MACA,WACG;EACH,MAAM,EAAE,cAAc,MAAM,OAAO;AACnC,SAAO,UAAU;GACf,MAAM;GACN,UAAU;IACR,IAAI,QAAQ,UAAU;IACtB;IACA;IACD;GACF,CAAC;IAEJ;EACE;EACA;EACA;EACA,UAAU,EACR,cAAc,MACf;EACF,CACF;CAED,MAAM,eAA6C,OAAO,OACxD,aACA,EACE,YACE,aACyD;EACzD,MAAM;EACN;EACD,GACF,CACF;AAED,QAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFT,MAAaC,WACX,cACA,WACG;AACH,KAAI,OAAO,iBAAiB,WAC1B,QAAO,mBACL,aACD;AAGH,QAAQD,KAAiB,cAAc,OAAO"}
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
3
+ const require_headless = require("./headless.cjs");
4
+ //#region src/tools/index.ts
5
+ var tools_exports = /* @__PURE__ */ require_runtime.__exportAll({ tool: () => require_headless.tool });
6
+ //#endregion
7
+ exports.tool = require_headless.tool;
8
+ Object.defineProperty(exports, "tools_exports", {
9
+ enumerable: true,
10
+ get: function() {
11
+ return tools_exports;
12
+ }
13
+ });
14
+
15
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../src/tools/index.ts"],"sourcesContent":["/**\n * LangChain Tools\n *\n * This module provides tool utilities for LangChain agents.\n *\n * @module\n */\n\nexport {\n tool,\n type HeadlessTool,\n type HeadlessToolFields,\n type HeadlessToolImplementation,\n} from \"./headless.js\";\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { HeadlessTool, HeadlessToolFields, HeadlessToolImplementation, tool } from "./headless.cjs";
2
+ export { type HeadlessTool, type HeadlessToolFields, type HeadlessToolImplementation, tool };
@@ -0,0 +1,2 @@
1
+ import { HeadlessTool, HeadlessToolFields, HeadlessToolImplementation, tool } from "./headless.js";
2
+ export { type HeadlessTool, type HeadlessToolFields, type HeadlessToolImplementation, tool };
@@ -0,0 +1,8 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { tool } from "./headless.js";
3
+ //#region src/tools/index.ts
4
+ var tools_exports = /* @__PURE__ */ __exportAll({ tool: () => tool });
5
+ //#endregion
6
+ export { tool, tools_exports };
7
+
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/tools/index.ts"],"sourcesContent":["/**\n * LangChain Tools\n *\n * This module provides tool utilities for LangChain agents.\n *\n * @module\n */\n\nexport {\n tool,\n type HeadlessTool,\n type HeadlessToolFields,\n type HeadlessToolImplementation,\n} from \"./headless.js\";\n"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langchain",
3
- "version": "1.2.35",
3
+ "version": "1.3.0-dev-1773962633795",
4
4
  "description": "Typescript bindings for langchain",
5
5
  "author": "LangChain",
6
6
  "license": "MIT",
@@ -52,15 +52,15 @@
52
52
  "typescript": "~5.8.3",
53
53
  "vitest": "^3.2.4",
54
54
  "yaml": "^2.8.1",
55
- "@langchain/anthropic": "1.3.25",
55
+ "@langchain/anthropic": "1.3.24-dev-1773962633795",
56
56
  "@langchain/cohere": "1.0.4",
57
- "@langchain/core": "^1.1.34",
57
+ "@langchain/core": "^1.1.33-dev-1773962633795",
58
+ "@langchain/openai": "1.3.0-dev-1773962633795",
58
59
  "@langchain/eslint": "0.1.1",
59
- "@langchain/openai": "1.3.0",
60
60
  "@langchain/tsconfig": "0.0.1"
61
61
  },
62
62
  "peerDependencies": {
63
- "@langchain/core": "^1.1.34"
63
+ "@langchain/core": "^1.1.33-dev-1773962633795"
64
64
  },
65
65
  "dependencies": {
66
66
  "@langchain/langgraph": "^1.1.2",
@@ -200,6 +200,17 @@
200
200
  "default": "./dist/storage/in_memory.js"
201
201
  }
202
202
  },
203
+ "./tools": {
204
+ "input": "./src/tools/index.ts",
205
+ "require": {
206
+ "types": "./dist/tools/index.d.cts",
207
+ "default": "./dist/tools/index.cjs"
208
+ },
209
+ "import": {
210
+ "types": "./dist/tools/index.d.ts",
211
+ "default": "./dist/tools/index.js"
212
+ }
213
+ },
203
214
  "./package.json": "./package.json"
204
215
  },
205
216
  "module": "./dist/index.js",
@@ -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");
package/load.d.cts DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/load/index.js";
package/load.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/load/index.js";
package/load.js DELETED
@@ -1 +0,0 @@
1
- export * from "./dist/load/index.js";
@@ -1 +0,0 @@
1
- module.exports = require("../dist/storage/encoder_backed.cjs");
@@ -1 +0,0 @@
1
- export * from "../dist/storage/encoder_backed.js";
@@ -1 +0,0 @@
1
- export * from "../dist/storage/encoder_backed.js";
@@ -1 +0,0 @@
1
- export * from "../dist/storage/encoder_backed.js";
@@ -1 +0,0 @@
1
- module.exports = require("../dist/storage/file_system.cjs");
@@ -1 +0,0 @@
1
- export * from "../dist/storage/file_system.js";
@@ -1 +0,0 @@
1
- export * from "../dist/storage/file_system.js";
@@ -1 +0,0 @@
1
- export * from "../dist/storage/file_system.js";
@@ -1 +0,0 @@
1
- module.exports = require("../dist/storage/in_memory.cjs");
@@ -1 +0,0 @@
1
- export * from "../dist/storage/in_memory.js";
@@ -1 +0,0 @@
1
- export * from "../dist/storage/in_memory.js";
@@ -1 +0,0 @@
1
- export * from "../dist/storage/in_memory.js";