@langchain/anthropic 1.3.6 → 1.3.7-dev-1767822302252

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.
@@ -93,7 +93,7 @@ declare function bash_20250124(options?: Bash20250124Options): DynamicStructured
93
93
  command: string;
94
94
  } | {
95
95
  restart: true;
96
- }, unknown, string>;
96
+ }, unknown, string, string>;
97
97
  //#endregion
98
98
  export { Bash20250124Options, bash_20250124 };
99
99
  //# sourceMappingURL=bash.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash.d.cts","names":["zod_v4_core40","DynamicStructuredTool","Bash20250124Command","Bash20250124Options","Promise","bash_20250124","zod195","ZodString","$strip","ZodObject","ZodLiteral","ZodUnion"],"sources":["../../src/tools/bash.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type Bash20250124Command } from \"./types.js\";\n/**\n * Options for the bash tool.\n */\nexport interface Bash20250124Options {\n /**\n * Optional execute function that handles bash command execution.\n * This function receives the command input and should return the result\n * (stdout and stderr combined, or an error message).\n */\n execute?: (args: Bash20250124Command) => string | Promise<string>;\n}\n/**\n * Creates an Anthropic bash tool for Claude 4 models and Claude 3.7 that enables\n * shell command execution in a persistent bash session.\n *\n * The bash tool provides Claude with:\n * - **Persistent bash session**: Maintains state between commands\n * - **Shell command execution**: Run any shell command\n * - **Environment access**: Access to environment variables and working directory\n * - **Command chaining**: Support for pipes, redirects, and scripting\n *\n * Available commands:\n * - Execute a command: `{ command: \"ls -la\" }`\n * - Restart the session: `{ restart: true }`\n *\n * @warning The bash tool provides direct system access. Implement safety measures\n * such as running in isolated environments (Docker/VM), command filtering,\n * and resource limits.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import { execSync } from \"child_process\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const bash = tools.bash_20250124({\n * execute: async (args) => {\n * if (args.restart) {\n * // Reset session state\n * return \"Bash session restarted\";\n * }\n * try {\n * const output = execSync(args.command!, {\n * encoding: \"utf-8\",\n * timeout: 30000,\n * });\n * return output;\n * } catch (error) {\n * return `Error: ${error.message}`;\n * }\n * },\n * });\n *\n * const llmWithBash = llm.bindTools([bash]);\n * const response = await llmWithBash.invoke(\n * \"List all Python files in the current directory\"\n * );\n *\n * // Outputs: \"bash\"\n * console.log(response.tool_calls[0].name);\n * // Outputs: \"ls -la *.py 2>/dev/null || echo \\\"No Python files found in the current directory\\\"\n * console.log(response.tool_calls[0].args.command);\n * ```\n *\n * @example Multi-step automation\n * ```typescript\n * // Claude can chain commands in a persistent session:\n * // 1. cd /tmp\n * // 2. echo \"Hello\" > test.txt\n * // 3. cat test.txt // Works because we're still in /tmp\n * ```\n *\n * @param options - Configuration options for the bash tool\n * @param options.execute - Function that handles bash command execution\n * @returns The bash tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool\n */\nexport declare function bash_20250124(options?: Bash20250124Options): DynamicStructuredTool<import(\"zod\").ZodUnion<readonly [import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n restart: import(\"zod\").ZodLiteral<true>;\n}, import(\"zod/v4/core\").$strip>]>, {\n command: string;\n} | {\n restart: true;\n}, unknown, string>;\n//# sourceMappingURL=bash.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,mBAAAA;EAAAA;AA8EjB;;;;EAE+BG,OAF4GG,CAAAA,EAAAA,CAAAA,IAAAA,EAxEtHP,mBAwEsHO,EAAAA,GAAAA,MAAAA,GAxErFL,OAwEqFK,CAAAA,MAAAA,CAAAA;;;;;;AAAhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAnEJ,aAAAA,WAAwBF,sBAAsBF,sBAEbK,MAAAA,CAFiDK,mBAE3EL,MAAAA,CAF4GG;WAAxEH,MAAAA,CACxCC;GAASP,aAAAA,CACXQ,MAAAA,GAEMF,MAAAA,CAFiBG;WAFoGH,MAAAA,CAGzHI;GAAUV,aAAAA,CACZQ,MAAAA"}
1
+ {"version":3,"file":"bash.d.cts","names":["zod_v4_core40","DynamicStructuredTool","Bash20250124Command","Bash20250124Options","Promise","bash_20250124","zod195","ZodString","$strip","ZodObject","ZodLiteral","ZodUnion"],"sources":["../../src/tools/bash.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type Bash20250124Command } from \"./types.js\";\n/**\n * Options for the bash tool.\n */\nexport interface Bash20250124Options {\n /**\n * Optional execute function that handles bash command execution.\n * This function receives the command input and should return the result\n * (stdout and stderr combined, or an error message).\n */\n execute?: (args: Bash20250124Command) => string | Promise<string>;\n}\n/**\n * Creates an Anthropic bash tool for Claude 4 models and Claude 3.7 that enables\n * shell command execution in a persistent bash session.\n *\n * The bash tool provides Claude with:\n * - **Persistent bash session**: Maintains state between commands\n * - **Shell command execution**: Run any shell command\n * - **Environment access**: Access to environment variables and working directory\n * - **Command chaining**: Support for pipes, redirects, and scripting\n *\n * Available commands:\n * - Execute a command: `{ command: \"ls -la\" }`\n * - Restart the session: `{ restart: true }`\n *\n * @warning The bash tool provides direct system access. Implement safety measures\n * such as running in isolated environments (Docker/VM), command filtering,\n * and resource limits.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import { execSync } from \"child_process\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const bash = tools.bash_20250124({\n * execute: async (args) => {\n * if (args.restart) {\n * // Reset session state\n * return \"Bash session restarted\";\n * }\n * try {\n * const output = execSync(args.command!, {\n * encoding: \"utf-8\",\n * timeout: 30000,\n * });\n * return output;\n * } catch (error) {\n * return `Error: ${error.message}`;\n * }\n * },\n * });\n *\n * const llmWithBash = llm.bindTools([bash]);\n * const response = await llmWithBash.invoke(\n * \"List all Python files in the current directory\"\n * );\n *\n * // Outputs: \"bash\"\n * console.log(response.tool_calls[0].name);\n * // Outputs: \"ls -la *.py 2>/dev/null || echo \\\"No Python files found in the current directory\\\"\n * console.log(response.tool_calls[0].args.command);\n * ```\n *\n * @example Multi-step automation\n * ```typescript\n * // Claude can chain commands in a persistent session:\n * // 1. cd /tmp\n * // 2. echo \"Hello\" > test.txt\n * // 3. cat test.txt // Works because we're still in /tmp\n * ```\n *\n * @param options - Configuration options for the bash tool\n * @param options.execute - Function that handles bash command execution\n * @returns The bash tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool\n */\nexport declare function bash_20250124(options?: Bash20250124Options): DynamicStructuredTool<import(\"zod\").ZodUnion<readonly [import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n restart: import(\"zod\").ZodLiteral<true>;\n}, import(\"zod/v4/core\").$strip>]>, {\n command: string;\n} | {\n restart: true;\n}, unknown, string, string>;\n//# sourceMappingURL=bash.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,mBAAAA;EAAAA;AA8EjB;;;;EAE+BG,OAF4GG,CAAAA,EAAAA,CAAAA,IAAAA,EAxEtHP,mBAwEsHO,EAAAA,GAAAA,MAAAA,GAxErFL,OAwEqFK,CAAAA,MAAAA,CAAAA;;;;;;AAAhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAnEJ,aAAAA,WAAwBF,sBAAsBF,sBAEbK,MAAAA,CAFiDK,mBAE3EL,MAAAA,CAF4GG;WAAxEH,MAAAA,CACxCC;GAASP,aAAAA,CACXQ,MAAAA,GAEMF,MAAAA,CAFiBG;WAFoGH,MAAAA,CAGzHI;GAAUV,aAAAA,CACZQ,MAAAA"}
@@ -93,7 +93,7 @@ declare function bash_20250124(options?: Bash20250124Options): DynamicStructured
93
93
  command: string;
94
94
  } | {
95
95
  restart: true;
96
- }, unknown, string>;
96
+ }, unknown, string, string>;
97
97
  //#endregion
98
98
  export { Bash20250124Options, bash_20250124 };
99
99
  //# sourceMappingURL=bash.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bash.d.ts","names":["zod_v4_core40","DynamicStructuredTool","Bash20250124Command","Bash20250124Options","Promise","bash_20250124","zod195","ZodString","$strip","ZodObject","ZodLiteral","ZodUnion"],"sources":["../../src/tools/bash.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type Bash20250124Command } from \"./types.js\";\n/**\n * Options for the bash tool.\n */\nexport interface Bash20250124Options {\n /**\n * Optional execute function that handles bash command execution.\n * This function receives the command input and should return the result\n * (stdout and stderr combined, or an error message).\n */\n execute?: (args: Bash20250124Command) => string | Promise<string>;\n}\n/**\n * Creates an Anthropic bash tool for Claude 4 models and Claude 3.7 that enables\n * shell command execution in a persistent bash session.\n *\n * The bash tool provides Claude with:\n * - **Persistent bash session**: Maintains state between commands\n * - **Shell command execution**: Run any shell command\n * - **Environment access**: Access to environment variables and working directory\n * - **Command chaining**: Support for pipes, redirects, and scripting\n *\n * Available commands:\n * - Execute a command: `{ command: \"ls -la\" }`\n * - Restart the session: `{ restart: true }`\n *\n * @warning The bash tool provides direct system access. Implement safety measures\n * such as running in isolated environments (Docker/VM), command filtering,\n * and resource limits.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import { execSync } from \"child_process\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const bash = tools.bash_20250124({\n * execute: async (args) => {\n * if (args.restart) {\n * // Reset session state\n * return \"Bash session restarted\";\n * }\n * try {\n * const output = execSync(args.command!, {\n * encoding: \"utf-8\",\n * timeout: 30000,\n * });\n * return output;\n * } catch (error) {\n * return `Error: ${error.message}`;\n * }\n * },\n * });\n *\n * const llmWithBash = llm.bindTools([bash]);\n * const response = await llmWithBash.invoke(\n * \"List all Python files in the current directory\"\n * );\n *\n * // Outputs: \"bash\"\n * console.log(response.tool_calls[0].name);\n * // Outputs: \"ls -la *.py 2>/dev/null || echo \\\"No Python files found in the current directory\\\"\n * console.log(response.tool_calls[0].args.command);\n * ```\n *\n * @example Multi-step automation\n * ```typescript\n * // Claude can chain commands in a persistent session:\n * // 1. cd /tmp\n * // 2. echo \"Hello\" > test.txt\n * // 3. cat test.txt // Works because we're still in /tmp\n * ```\n *\n * @param options - Configuration options for the bash tool\n * @param options.execute - Function that handles bash command execution\n * @returns The bash tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool\n */\nexport declare function bash_20250124(options?: Bash20250124Options): DynamicStructuredTool<import(\"zod\").ZodUnion<readonly [import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n restart: import(\"zod\").ZodLiteral<true>;\n}, import(\"zod/v4/core\").$strip>]>, {\n command: string;\n} | {\n restart: true;\n}, unknown, string>;\n//# sourceMappingURL=bash.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,mBAAAA;EAAAA;AA8EjB;;;;EAE+BG,OAF4GG,CAAAA,EAAAA,CAAAA,IAAAA,EAxEtHP,mBAwEsHO,EAAAA,GAAAA,MAAAA,GAxErFL,OAwEqFK,CAAAA,MAAAA,CAAAA;;;;;;AAAhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAnEJ,aAAAA,WAAwBF,sBAAsBF,sBAEbK,MAAAA,CAFiDK,mBAE3EL,MAAAA,CAF4GG;WAAxEH,MAAAA,CACxCC;GAASP,aAAAA,CACXQ,MAAAA,GAEMF,MAAAA,CAFiBG;WAFoGH,MAAAA,CAGzHI;GAAUV,aAAAA,CACZQ,MAAAA"}
1
+ {"version":3,"file":"bash.d.ts","names":["zod_v4_core40","DynamicStructuredTool","Bash20250124Command","Bash20250124Options","Promise","bash_20250124","zod195","ZodString","$strip","ZodObject","ZodLiteral","ZodUnion"],"sources":["../../src/tools/bash.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type Bash20250124Command } from \"./types.js\";\n/**\n * Options for the bash tool.\n */\nexport interface Bash20250124Options {\n /**\n * Optional execute function that handles bash command execution.\n * This function receives the command input and should return the result\n * (stdout and stderr combined, or an error message).\n */\n execute?: (args: Bash20250124Command) => string | Promise<string>;\n}\n/**\n * Creates an Anthropic bash tool for Claude 4 models and Claude 3.7 that enables\n * shell command execution in a persistent bash session.\n *\n * The bash tool provides Claude with:\n * - **Persistent bash session**: Maintains state between commands\n * - **Shell command execution**: Run any shell command\n * - **Environment access**: Access to environment variables and working directory\n * - **Command chaining**: Support for pipes, redirects, and scripting\n *\n * Available commands:\n * - Execute a command: `{ command: \"ls -la\" }`\n * - Restart the session: `{ restart: true }`\n *\n * @warning The bash tool provides direct system access. Implement safety measures\n * such as running in isolated environments (Docker/VM), command filtering,\n * and resource limits.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import { execSync } from \"child_process\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const bash = tools.bash_20250124({\n * execute: async (args) => {\n * if (args.restart) {\n * // Reset session state\n * return \"Bash session restarted\";\n * }\n * try {\n * const output = execSync(args.command!, {\n * encoding: \"utf-8\",\n * timeout: 30000,\n * });\n * return output;\n * } catch (error) {\n * return `Error: ${error.message}`;\n * }\n * },\n * });\n *\n * const llmWithBash = llm.bindTools([bash]);\n * const response = await llmWithBash.invoke(\n * \"List all Python files in the current directory\"\n * );\n *\n * // Outputs: \"bash\"\n * console.log(response.tool_calls[0].name);\n * // Outputs: \"ls -la *.py 2>/dev/null || echo \\\"No Python files found in the current directory\\\"\n * console.log(response.tool_calls[0].args.command);\n * ```\n *\n * @example Multi-step automation\n * ```typescript\n * // Claude can chain commands in a persistent session:\n * // 1. cd /tmp\n * // 2. echo \"Hello\" > test.txt\n * // 3. cat test.txt // Works because we're still in /tmp\n * ```\n *\n * @param options - Configuration options for the bash tool\n * @param options.execute - Function that handles bash command execution\n * @returns The bash tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/bash-tool\n */\nexport declare function bash_20250124(options?: Bash20250124Options): DynamicStructuredTool<import(\"zod\").ZodUnion<readonly [import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n restart: import(\"zod\").ZodLiteral<true>;\n}, import(\"zod/v4/core\").$strip>]>, {\n command: string;\n} | {\n restart: true;\n}, unknown, string, string>;\n//# sourceMappingURL=bash.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,mBAAAA;EAAAA;AA8EjB;;;;EAE+BG,OAF4GG,CAAAA,EAAAA,CAAAA,IAAAA,EAxEtHP,mBAwEsHO,EAAAA,GAAAA,MAAAA,GAxErFL,OAwEqFK,CAAAA,MAAAA,CAAAA;;;;;;AAAhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAnEJ,aAAAA,WAAwBF,sBAAsBF,sBAEbK,MAAAA,CAFiDK,mBAE3EL,MAAAA,CAF4GG;WAAxEH,MAAAA,CACxCC;GAASP,aAAAA,CACXQ,MAAAA,GAEMF,MAAAA,CAFiBG;WAFoGH,MAAAA,CAGzHI;GAAUV,aAAAA,CACZQ,MAAAA"}
@@ -149,7 +149,7 @@ declare function computer_20251124(options: Computer20251124Options): DynamicStr
149
149
  }, zod_v4_core9.$strip>, zod46.ZodObject<{
150
150
  action: zod46.ZodLiteral<"zoom">;
151
151
  region: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber, zod46.ZodNumber, zod46.ZodNumber], null>;
152
- }, zod_v4_core9.$strip>], "action">, Computer20251124Action, any, ToolMessage<any>>;
152
+ }, zod_v4_core9.$strip>], "action">, Computer20251124Action, any, ToolMessage<any>, string>;
153
153
  /**
154
154
  * Options for the computer use tool.
155
155
  *
@@ -283,7 +283,7 @@ declare function computer_20250124(options: Computer20250124Options): DynamicStr
283
283
  }, zod_v4_core9.$strip>, zod46.ZodObject<{
284
284
  action: zod46.ZodLiteral<"wait">;
285
285
  duration: zod46.ZodOptional<zod46.ZodNumber>;
286
- }, zod_v4_core9.$strip>], "action">, Computer20250124Action, any, ComputerUseReturnType>;
286
+ }, zod_v4_core9.$strip>], "action">, Computer20250124Action, any, ComputerUseReturnType, string>;
287
287
  //#endregion
288
288
  export { Computer20250124Options, Computer20251124Options, ComputerUseReturnType, computer_20250124, computer_20251124 };
289
289
  //# sourceMappingURL=computer.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"computer.d.cts","names":["zod_v4_core9","ToolMessage","DynamicStructuredTool","ToolRuntime","Computer20251124Action","Computer20250124Action","ComputerUseReturnType","Promise","Computer20251124Options","TState","TContext","computer_20251124","zod46","ZodLiteral","$strip","ZodObject","ZodNumber","ZodTuple","ZodEnum","ZodString","ZodOptional","ZodDiscriminatedUnion","Computer20250124Options","computer_20250124"],"sources":["../../src/tools/computer.d.ts"],"sourcesContent":["import { ToolMessage } from \"@langchain/core/messages\";\nimport type { DynamicStructuredTool, ToolRuntime } from \"@langchain/core/tools\";\nimport type { Computer20251124Action, Computer20250124Action } from \"./types.js\";\nexport type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;\n/**\n * Options for the computer use tool (Claude Opus 4.5 only version).\n *\n * @template TState - The type of the state schema (when used with `ReactAgent`)\n * @template TContext - The type of the context schema (when used with `ReactAgent`)\n */\nexport interface Computer20251124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Enable zoom action for detailed screen region inspection.\n * When enabled, Claude can zoom into specific screen regions.\n * @default false\n */\n enableZoom?: boolean;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20251124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool for Claude Opus 4.5 that provides\n * screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n * - **Zoom**: View specific screen regions at full resolution (when enabled)\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-opus-4-5-20251101\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-11-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20251124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * enableZoom: true,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20251124(options: Computer20251124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"zoom\">;\n region: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20251124Action, any, ToolMessage<any>>;\n/**\n * Options for the computer use tool.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n */\nexport interface Computer20250124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20250124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool that provides screenshot capabilities and mouse/keyboard control\n * for autonomous desktop interaction.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-01-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20250124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20250124(options: Computer20250124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20250124Action,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jBc,MAAAA,GAGMF,KAAAA,CAHiBG;UAJSH,KAAAA,CAK/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAUMF,KAAAA,CAViBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;oBAAzCJ,KAAAA,CACFM;;;;;;iBAAON,KAAAA,CAMVI;GAAShB,YAAAA,CACjBc,MAAAA,GAGMF,KAAAA,CAHiBG;UAVSH,KAAAA,CAW/BC;QAAUD,KAAAA,CACZO;GAASnB,YAAAA,CACRc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;YACqCD,KAAAA,CAAnCQ,YADQR,KAAAA,CACkBI,SAAAA;GAAfhB,YAAAA,CACdc,MAAAA,eAAqBT,6BAA6BC"}
1
+ {"version":3,"file":"computer.d.cts","names":["zod_v4_core9","ToolMessage","DynamicStructuredTool","ToolRuntime","Computer20251124Action","Computer20250124Action","ComputerUseReturnType","Promise","Computer20251124Options","TState","TContext","computer_20251124","zod46","ZodLiteral","$strip","ZodObject","ZodNumber","ZodTuple","ZodEnum","ZodString","ZodOptional","ZodDiscriminatedUnion","Computer20250124Options","computer_20250124"],"sources":["../../src/tools/computer.d.ts"],"sourcesContent":["import { ToolMessage } from \"@langchain/core/messages\";\nimport type { DynamicStructuredTool, ToolRuntime } from \"@langchain/core/tools\";\nimport type { Computer20251124Action, Computer20250124Action } from \"./types.js\";\nexport type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;\n/**\n * Options for the computer use tool (Claude Opus 4.5 only version).\n *\n * @template TState - The type of the state schema (when used with `ReactAgent`)\n * @template TContext - The type of the context schema (when used with `ReactAgent`)\n */\nexport interface Computer20251124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Enable zoom action for detailed screen region inspection.\n * When enabled, Claude can zoom into specific screen regions.\n * @default false\n */\n enableZoom?: boolean;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20251124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool for Claude Opus 4.5 that provides\n * screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n * - **Zoom**: View specific screen regions at full resolution (when enabled)\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-opus-4-5-20251101\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-11-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20251124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * enableZoom: true,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20251124(options: Computer20251124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"zoom\">;\n region: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20251124Action, any, ToolMessage<any>, string>;\n/**\n * Options for the computer use tool.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n */\nexport interface Computer20250124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20250124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool that provides screenshot capabilities and mouse/keyboard control\n * for autonomous desktop interaction.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-01-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20250124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20250124(options: Computer20250124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20250124Action, any, ComputerUseReturnType, string>;\n//# sourceMappingURL=computer.d.ts.map"],"mappings":";;;;;;;KAGYM,qBAAAA,YAAiCC,kBAAkBN,mBAAmBM,QAAQN;;;;AAA1F;;;AAA0FA,UAOzEO,uBAPyEP,CAAAA,SAAAA,GAAAA,EAAAA,WAAAA,GAAAA,CAAAA,CAAAA;EAARM;AAAO;AAOzF;EAwBqBH,cAAAA,EAAAA,MAAAA;EAA6CK;;;EAAsBH,eAAAA,EAAAA,MAAAA;EAAqB;AA0D7G;;EAA0EM,aAChDC,CAAAA,EAAAA,MAAAA;EAAUb;;;;;EAGoDY,UAA1DK,CAAAA,EAAAA,OAAAA;EAAQjB;;;;;EAGkDY,OAA1DK,CAAAA,EAAAA,CAAAA,IAAAA,EAjETb,sBAiESa,EAAAA,OAAAA,EAjEwBd,WAiExBc,CAjEoCR,MAiEpCQ,EAjE4CP,QAiE5CO,CAAAA,EAAAA,GAjE0DX,qBAiE1DW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCJJ,iBA5CFF,iBAAAA,CA4CEE,OAAAA,EA5CyB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ASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;YACqCD,KAAAA,CAAnCQ,YADQR,KAAAA,CACkBI,SAAAA;GAAfhB,YAAAA,CACdc,MAAAA,eAAqBT,6BAA6BC"}
@@ -149,7 +149,7 @@ declare function computer_20251124(options: Computer20251124Options): DynamicStr
149
149
  }, zod_v4_core9.$strip>, zod46.ZodObject<{
150
150
  action: zod46.ZodLiteral<"zoom">;
151
151
  region: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber, zod46.ZodNumber, zod46.ZodNumber], null>;
152
- }, zod_v4_core9.$strip>], "action">, Computer20251124Action, any, ToolMessage<any>>;
152
+ }, zod_v4_core9.$strip>], "action">, Computer20251124Action, any, ToolMessage<any>, string>;
153
153
  /**
154
154
  * Options for the computer use tool.
155
155
  *
@@ -283,7 +283,7 @@ declare function computer_20250124(options: Computer20250124Options): DynamicStr
283
283
  }, zod_v4_core9.$strip>, zod46.ZodObject<{
284
284
  action: zod46.ZodLiteral<"wait">;
285
285
  duration: zod46.ZodOptional<zod46.ZodNumber>;
286
- }, zod_v4_core9.$strip>], "action">, Computer20250124Action, any, ComputerUseReturnType>;
286
+ }, zod_v4_core9.$strip>], "action">, Computer20250124Action, any, ComputerUseReturnType, string>;
287
287
  //#endregion
288
288
  export { Computer20250124Options, Computer20251124Options, ComputerUseReturnType, computer_20250124, computer_20251124 };
289
289
  //# sourceMappingURL=computer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"computer.d.ts","names":["zod_v4_core9","ToolMessage","DynamicStructuredTool","ToolRuntime","Computer20251124Action","Computer20250124Action","ComputerUseReturnType","Promise","Computer20251124Options","TState","TContext","computer_20251124","zod46","ZodLiteral","$strip","ZodObject","ZodNumber","ZodTuple","ZodEnum","ZodString","ZodOptional","ZodDiscriminatedUnion","Computer20250124Options","computer_20250124"],"sources":["../../src/tools/computer.d.ts"],"sourcesContent":["import { ToolMessage } from \"@langchain/core/messages\";\nimport type { DynamicStructuredTool, ToolRuntime } from \"@langchain/core/tools\";\nimport type { Computer20251124Action, Computer20250124Action } from \"./types.js\";\nexport type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;\n/**\n * Options for the computer use tool (Claude Opus 4.5 only version).\n *\n * @template TState - The type of the state schema (when used with `ReactAgent`)\n * @template TContext - The type of the context schema (when used with `ReactAgent`)\n */\nexport interface Computer20251124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Enable zoom action for detailed screen region inspection.\n * When enabled, Claude can zoom into specific screen regions.\n * @default false\n */\n enableZoom?: boolean;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20251124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool for Claude Opus 4.5 that provides\n * screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n * - **Zoom**: View specific screen regions at full resolution (when enabled)\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-opus-4-5-20251101\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-11-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20251124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * enableZoom: true,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20251124(options: Computer20251124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"zoom\">;\n region: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20251124Action, any, ToolMessage<any>>;\n/**\n * Options for the computer use tool.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n */\nexport interface Computer20250124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20250124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool that provides screenshot capabilities and mouse/keyboard control\n * for autonomous desktop interaction.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-01-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20250124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20250124(options: Computer20250124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20250124Action, any, ComputerUseReturnType>;\n//# sourceMappingURL=computer.d.ts.map"],"mappings":";;;;;;;KAGYM,qBAAAA,YAAiCC,kBAAkBN,mBAAmBM,QAAQN;;;;AAA1F;;;AAA0FA,UAOzEO,uBAPyEP,CAAAA,SAAAA,GAAAA,EAAAA,WAAAA,GAAAA,CAAAA,CAAAA;EAARM;AAAO;AAOzF;EAwBqBH,cAAAA,EAAAA,MAAAA;EAA6CK;;;EAAsBH,eAAAA,EAAAA,MAAAA;EAAqB;AA0D7G;;EAA0EM,aAChDC,CAAAA,EAAAA,MAAAA;EAAUb;;;;;EAGoDY,UAA1DK,CAAAA,EAAAA,OAAAA;EAAQjB;;;;;EAGkDY,OAA1DK,CAAAA,EAAAA,CAAAA,IAAAA,EAjETb,sBAiESa,EAAAA,OAAAA,EAjEwBd,WAiExBc,CAjEoCR,MAiEpCQ,EAjE4CP,QAiE5CO,CAAAA,EAAAA,GAjE0DX,qBAiE1DW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;YACqCD,KAAAA,CAAnCQ,YADQR,KAAAA,CACkBI,SAAAA;GAAfhB,YAAAA,CACdc,MAAAA,eAAqBT,6BAA6BC"}
1
+ {"version":3,"file":"computer.d.ts","names":["zod_v4_core9","ToolMessage","DynamicStructuredTool","ToolRuntime","Computer20251124Action","Computer20250124Action","ComputerUseReturnType","Promise","Computer20251124Options","TState","TContext","computer_20251124","zod46","ZodLiteral","$strip","ZodObject","ZodNumber","ZodTuple","ZodEnum","ZodString","ZodOptional","ZodDiscriminatedUnion","Computer20250124Options","computer_20250124"],"sources":["../../src/tools/computer.d.ts"],"sourcesContent":["import { ToolMessage } from \"@langchain/core/messages\";\nimport type { DynamicStructuredTool, ToolRuntime } from \"@langchain/core/tools\";\nimport type { Computer20251124Action, Computer20250124Action } from \"./types.js\";\nexport type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;\n/**\n * Options for the computer use tool (Claude Opus 4.5 only version).\n *\n * @template TState - The type of the state schema (when used with `ReactAgent`)\n * @template TContext - The type of the context schema (when used with `ReactAgent`)\n */\nexport interface Computer20251124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Enable zoom action for detailed screen region inspection.\n * When enabled, Claude can zoom into specific screen regions.\n * @default false\n */\n enableZoom?: boolean;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20251124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool for Claude Opus 4.5 that provides\n * screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n * - **Zoom**: View specific screen regions at full resolution (when enabled)\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-opus-4-5-20251101\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-11-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20251124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * enableZoom: true,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20251124(options: Computer20251124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"zoom\">;\n region: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20251124Action, any, ToolMessage<any>, string>;\n/**\n * Options for the computer use tool.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n */\nexport interface Computer20250124Options<TState = any, TContext = any> {\n /**\n * The width of the display in pixels.\n */\n displayWidthPx: number;\n /**\n * The height of the display in pixels.\n */\n displayHeightPx: number;\n /**\n * Optional display number for X11 environments.\n */\n displayNumber?: number;\n /**\n * Optional execute function that handles computer action execution.\n * This function receives the action input and should return the result\n * (typically a base64-encoded screenshot or action confirmation).\n */\n execute?: (args: Computer20250124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;\n}\n/**\n * Creates an Anthropic computer use tool that provides screenshot capabilities and mouse/keyboard control\n * for autonomous desktop interaction.\n *\n * Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.\n *\n * The computer use tool enables Claude to interact with desktop environments through:\n * - **Screenshot capture**: See what's currently displayed on screen\n * - **Mouse control**: Click, drag, and move the cursor\n * - **Keyboard input**: Type text and use keyboard shortcuts\n *\n * @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine\n * or container with minimal privileges. Avoid giving access to sensitive data.\n *\n * @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * clientOptions: {\n * defaultHeaders: {\n * \"anthropic-beta\": \"computer-use-2025-01-24\",\n * },\n * },\n * });\n *\n * const computer = tools.computer_20250124({\n * displayWidthPx: 1024,\n * displayHeightPx: 768,\n * displayNumber: 1,\n * execute: async (action) => {\n * if (action.action === \"screenshot\") {\n * // Capture and return base64-encoded screenshot\n * return captureScreenshot();\n * }\n * if (action.action === \"left_click\") {\n * // Click at the specified coordinates\n * await click(action.coordinate[0], action.coordinate[1]);\n * return captureScreenshot();\n * }\n * // Handle other actions...\n * },\n * });\n *\n * const llmWithComputer = llm.bindTools([computer]);\n * const response = await llmWithComputer.invoke(\n * \"Save a picture of a cat to my desktop.\"\n * );\n * ```\n *\n * @param options - Configuration options for the computer use tool\n * @returns The computer use tool object that can be passed to `bindTools`\n */\nexport declare function computer_20250124(options: Computer20250124Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"screenshot\">;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"right_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"middle_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"double_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"triple_click\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_click_drag\">;\n start_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n end_coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_down\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"left_mouse_up\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"scroll\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n scroll_direction: import(\"zod\").ZodEnum<{\n down: \"down\";\n left: \"left\";\n right: \"right\";\n up: \"up\";\n }>;\n scroll_amount: import(\"zod\").ZodNumber;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"type\">;\n text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"mouse_move\">;\n coordinate: import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"hold_key\">;\n key: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n action: import(\"zod\").ZodLiteral<\"wait\">;\n duration: import(\"zod\").ZodOptional<import(\"zod\").ZodNumber>;\n}, import(\"zod/v4/core\").$strip>], \"action\">, Computer20250124Action, any, ComputerUseReturnType, string>;\n//# sourceMappingURL=computer.d.ts.map"],"mappings":";;;;;;;KAGYM,qBAAAA,YAAiCC,kBAAkBN,mBAAmBM,QAAQN;;;;AAA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AAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAUMF,KAAAA,CAViBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;oBAAzCJ,KAAAA,CACFM;;;;;;iBAAON,KAAAA,CAMVI;GAAShB,YAAAA,CACjBc,MAAAA,GAGMF,KAAAA,CAHiBG;UAVSH,KAAAA,CAW/BC;QAAUD,KAAAA,CACZO;GAASnB,YAAAA,CACRc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;cAC8DD,KAAAA,CAA1DK,UADML,KAAAA,CACkBI,SAAAA,EAASJ,KAAAA,CAAgBI,SAAAA;GAAzChB,YAAAA,CACbc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;OAAUD,KAAAA,CACbO;GAASnB,YAAAA,CACPc,MAAAA,GAGMF,KAAAA,CAHiBG;UAHSH,KAAAA,CAI/BC;YACqCD,KAAAA,CAAnCQ,YADQR,KAAAA,CACkBI,SAAAA;GAAfhB,YAAAA,CACdc,MAAAA,eAAqBT,6BAA6BC"}
@@ -86,7 +86,7 @@ declare function memory_20250818(options?: MemoryTool20250818Options): DynamicSt
86
86
  command: "rename";
87
87
  old_path: string;
88
88
  new_path: string;
89
- }, unknown, string | Promise<string>>;
89
+ }, unknown, string | Promise<string>, string>;
90
90
  //#endregion
91
91
  export { memory_20250818 };
92
92
  //# sourceMappingURL=memory.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.cts","names":["zod_v4_core0","DynamicStructuredTool","MemoryTool20250818Options","memory_20250818","zod0","ZodLiteral","ZodString","$strip","ZodObject","ZodNumber","ZodDiscriminatedUnion","Promise"],"sources":["../../src/tools/memory.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type MemoryTool20250818Options } from \"./types.js\";\n/**\n * Creates an Anthropic memory tool that can be used with ChatAnthropic.\n *\n * The memory tool enables Claude to store and retrieve information across conversations\n * through a memory file directory. Claude can create, read, update, and delete files that\n * persist between sessions, allowing it to build knowledge over time without keeping\n * everything in the context window.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, memory_20250818 } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\"\n * });\n *\n * const memory = memory_20250818({\n * execute: async (args) => {\n * // handle memory command execution\n * // ...\n * },\n * });\n * const llmWithMemory = llm.bindTools([memory]);\n *\n * const response = await llmWithMemory.invoke(\"Remember that I like Python\");\n * ```\n *\n * @param options - Optional configuration for the memory tool (currently unused)\n * @param options.execute - Optional execute function that handles memory command execution.\n * @returns The memory tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/memory-tool\n */\nexport declare function memory_20250818(options?: MemoryTool20250818Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n insert_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"delete\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"rename\">;\n old_path: import(\"zod\").ZodString;\n new_path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n insert_text: string;\n} | {\n command: \"delete\";\n path: string;\n} | {\n command: \"rename\";\n old_path: string;\n new_path: string;\n}, unknown, string | Promise<string>>;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;;;;;;;;;;AAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuB4BM,iBAvBJH,eAAAA,CAuBIG,OAAAA,CAAAA,EAvBsBJ,yBAuBtBI,CAAAA,EAvBkDL,qBAuBlDK,CAH6BF,IAAAA,CApByDM,qBAuBtFJ,CAAAA,CApBGF,IAAAA,CAHwHI,SAuB3HF,CAAAA;EAASN,OAAAA,EAvBsCI,IAAAA,CAChDC,UAuBFE,CAAAA,MAAAA,CAAAA;EAAMH,IAJiBI,EAnBXJ,IAAAA,CACbE,SAkBwBE;CAASJ,EAlBxBJ,YAAAA,CACRO,MAAAA,CAHyFG,EAOnFN,IAAAA,CAJiBI,SAHkEE,CAAAA;EAgD7FC,OAAAA,EAhD2IP,IAAAA,CAIrIC,UA4CNM,CAAAA,QAAAA,CAAAA;EAhDyDV,IAAAA,EAIzCG,IAAAA,CACbE,SALsDL;EAAqB,SAAA,EAKlEG,IAAAA,CACJE,SANsE;GAM7DN,YAAAA,CACbO,MAAAA,GAKMH,IAAAA,CALiBI;WAJSJ,IAAAA,CAK9BC;QAAUD,IAAAA,CACbE;WAASF,IAAAA,CACNE;WAASF,IAAAA,CACTE;GAASN,YAAAA,CACXO,MAAAA,GAKMH,IAAAA,CALiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;eAASF,IAAAA,CACFK;eAASL,IAAAA,CACTE;GAASN,YAAAA,CACfO,MAAAA,GAGMH,IAAAA,CAHiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;GAASN,YAAAA,CACRO,MAAAA,GAIMH,IAAAA,CAJiBI;WAHSJ,IAAAA,CAI9BC;YAAUD,IAAAA,CACTE;YAASF,IAAAA,CACTE;GAASN,YAAAA,CACZO,MAAAA;;;;;;;;;;;;;;;;;;;;;;;;qBAwBJI"}
1
+ {"version":3,"file":"memory.d.cts","names":["zod_v4_core0","DynamicStructuredTool","MemoryTool20250818Options","memory_20250818","zod0","ZodLiteral","ZodString","$strip","ZodObject","ZodNumber","ZodDiscriminatedUnion","Promise"],"sources":["../../src/tools/memory.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type MemoryTool20250818Options } from \"./types.js\";\n/**\n * Creates an Anthropic memory tool that can be used with ChatAnthropic.\n *\n * The memory tool enables Claude to store and retrieve information across conversations\n * through a memory file directory. Claude can create, read, update, and delete files that\n * persist between sessions, allowing it to build knowledge over time without keeping\n * everything in the context window.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, memory_20250818 } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\"\n * });\n *\n * const memory = memory_20250818({\n * execute: async (args) => {\n * // handle memory command execution\n * // ...\n * },\n * });\n * const llmWithMemory = llm.bindTools([memory]);\n *\n * const response = await llmWithMemory.invoke(\"Remember that I like Python\");\n * ```\n *\n * @param options - Optional configuration for the memory tool (currently unused)\n * @param options.execute - Optional execute function that handles memory command execution.\n * @returns The memory tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/memory-tool\n */\nexport declare function memory_20250818(options?: MemoryTool20250818Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n insert_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"delete\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"rename\">;\n old_path: import(\"zod\").ZodString;\n new_path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n insert_text: string;\n} | {\n command: \"delete\";\n path: string;\n} | {\n command: \"rename\";\n old_path: string;\n new_path: string;\n}, unknown, string | Promise<string>, string>;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;;;;;;;;;;AAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuB4BM,iBAvBJH,eAAAA,CAuBIG,OAAAA,CAAAA,EAvBsBJ,yBAuBtBI,CAAAA,EAvBkDL,qBAuBlDK,CAH6BF,IAAAA,CApByDM,qBAuBtFJ,CAAAA,CApBGF,IAAAA,CAHwHI,SAuB3HF,CAAAA;EAASN,OAAAA,EAvBsCI,IAAAA,CAChDC,UAuBFE,CAAAA,MAAAA,CAAAA;EAAMH,IAJiBI,EAnBXJ,IAAAA,CACbE,SAkBwBE;CAASJ,EAlBxBJ,YAAAA,CACRO,MAAAA,CAHyFG,EAOnFN,IAAAA,CAJiBI,SAHkEE,CAAAA;EAgD7FC,OAAAA,EAhD2IP,IAAAA,CAIrIC,UA4CNM,CAAAA,QAAAA,CAAAA;EAhDyDV,IAAAA,EAIzCG,IAAAA,CACbE,SALsDL;EAAqB,SAAA,EAKlEG,IAAAA,CACJE,SANsE;GAM7DN,YAAAA,CACbO,MAAAA,GAKMH,IAAAA,CALiBI;WAJSJ,IAAAA,CAK9BC;QAAUD,IAAAA,CACbE;WAASF,IAAAA,CACNE;WAASF,IAAAA,CACTE;GAASN,YAAAA,CACXO,MAAAA,GAKMH,IAAAA,CALiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;eAASF,IAAAA,CACFK;eAASL,IAAAA,CACTE;GAASN,YAAAA,CACfO,MAAAA,GAGMH,IAAAA,CAHiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;GAASN,YAAAA,CACRO,MAAAA,GAIMH,IAAAA,CAJiBI;WAHSJ,IAAAA,CAI9BC;YAAUD,IAAAA,CACTE;YAASF,IAAAA,CACTE;GAASN,YAAAA,CACZO,MAAAA;;;;;;;;;;;;;;;;;;;;;;;;qBAwBJI"}
@@ -86,7 +86,7 @@ declare function memory_20250818(options?: MemoryTool20250818Options): DynamicSt
86
86
  command: "rename";
87
87
  old_path: string;
88
88
  new_path: string;
89
- }, unknown, string | Promise<string>>;
89
+ }, unknown, string | Promise<string>, string>;
90
90
  //#endregion
91
91
  export { memory_20250818 };
92
92
  //# sourceMappingURL=memory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","names":["zod_v4_core0","DynamicStructuredTool","MemoryTool20250818Options","memory_20250818","zod0","ZodLiteral","ZodString","$strip","ZodObject","ZodNumber","ZodDiscriminatedUnion","Promise"],"sources":["../../src/tools/memory.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type MemoryTool20250818Options } from \"./types.js\";\n/**\n * Creates an Anthropic memory tool that can be used with ChatAnthropic.\n *\n * The memory tool enables Claude to store and retrieve information across conversations\n * through a memory file directory. Claude can create, read, update, and delete files that\n * persist between sessions, allowing it to build knowledge over time without keeping\n * everything in the context window.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, memory_20250818 } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\"\n * });\n *\n * const memory = memory_20250818({\n * execute: async (args) => {\n * // handle memory command execution\n * // ...\n * },\n * });\n * const llmWithMemory = llm.bindTools([memory]);\n *\n * const response = await llmWithMemory.invoke(\"Remember that I like Python\");\n * ```\n *\n * @param options - Optional configuration for the memory tool (currently unused)\n * @param options.execute - Optional execute function that handles memory command execution.\n * @returns The memory tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/memory-tool\n */\nexport declare function memory_20250818(options?: MemoryTool20250818Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n insert_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"delete\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"rename\">;\n old_path: import(\"zod\").ZodString;\n new_path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n insert_text: string;\n} | {\n command: \"delete\";\n path: string;\n} | {\n command: \"rename\";\n old_path: string;\n new_path: string;\n}, unknown, string | Promise<string>>;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;;;;;;;;;;AAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuB4BM,iBAvBJH,eAAAA,CAuBIG,OAAAA,CAAAA,EAvBsBJ,yBAuBtBI,CAAAA,EAvBkDL,qBAuBlDK,CAH6BF,IAAAA,CApByDM,qBAuBtFJ,CAAAA,CApBGF,IAAAA,CAHwHI,SAuB3HF,CAAAA;EAASN,OAAAA,EAvBsCI,IAAAA,CAChDC,UAuBFE,CAAAA,MAAAA,CAAAA;EAAMH,IAJiBI,EAnBXJ,IAAAA,CACbE,SAkBwBE;CAASJ,EAlBxBJ,YAAAA,CACRO,MAAAA,CAHyFG,EAOnFN,IAAAA,CAJiBI,SAHkEE,CAAAA;EAgD7FC,OAAAA,EAhD2IP,IAAAA,CAIrIC,UA4CNM,CAAAA,QAAAA,CAAAA;EAhDyDV,IAAAA,EAIzCG,IAAAA,CACbE,SALsDL;EAAqB,SAAA,EAKlEG,IAAAA,CACJE,SANsE;GAM7DN,YAAAA,CACbO,MAAAA,GAKMH,IAAAA,CALiBI;WAJSJ,IAAAA,CAK9BC;QAAUD,IAAAA,CACbE;WAASF,IAAAA,CACNE;WAASF,IAAAA,CACTE;GAASN,YAAAA,CACXO,MAAAA,GAKMH,IAAAA,CALiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;eAASF,IAAAA,CACFK;eAASL,IAAAA,CACTE;GAASN,YAAAA,CACfO,MAAAA,GAGMH,IAAAA,CAHiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;GAASN,YAAAA,CACRO,MAAAA,GAIMH,IAAAA,CAJiBI;WAHSJ,IAAAA,CAI9BC;YAAUD,IAAAA,CACTE;YAASF,IAAAA,CACTE;GAASN,YAAAA,CACZO,MAAAA;;;;;;;;;;;;;;;;;;;;;;;;qBAwBJI"}
1
+ {"version":3,"file":"memory.d.ts","names":["zod_v4_core0","DynamicStructuredTool","MemoryTool20250818Options","memory_20250818","zod0","ZodLiteral","ZodString","$strip","ZodObject","ZodNumber","ZodDiscriminatedUnion","Promise"],"sources":["../../src/tools/memory.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type MemoryTool20250818Options } from \"./types.js\";\n/**\n * Creates an Anthropic memory tool that can be used with ChatAnthropic.\n *\n * The memory tool enables Claude to store and retrieve information across conversations\n * through a memory file directory. Claude can create, read, update, and delete files that\n * persist between sessions, allowing it to build knowledge over time without keeping\n * everything in the context window.\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, memory_20250818 } from \"@langchain/anthropic\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\"\n * });\n *\n * const memory = memory_20250818({\n * execute: async (args) => {\n * // handle memory command execution\n * // ...\n * },\n * });\n * const llmWithMemory = llm.bindTools([memory]);\n *\n * const response = await llmWithMemory.invoke(\"Remember that I like Python\");\n * ```\n *\n * @param options - Optional configuration for the memory tool (currently unused)\n * @param options.execute - Optional execute function that handles memory command execution.\n * @returns The memory tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/memory-tool\n */\nexport declare function memory_20250818(options?: MemoryTool20250818Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n insert_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"delete\">;\n path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"rename\">;\n old_path: import(\"zod\").ZodString;\n new_path: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n insert_text: string;\n} | {\n command: \"delete\";\n path: string;\n} | {\n command: \"rename\";\n old_path: string;\n new_path: string;\n}, unknown, string | Promise<string>, string>;\n//# sourceMappingURL=memory.d.ts.map"],"mappings":";;;;;;;;;;;AAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuB4BM,iBAvBJH,eAAAA,CAuBIG,OAAAA,CAAAA,EAvBsBJ,yBAuBtBI,CAAAA,EAvBkDL,qBAuBlDK,CAH6BF,IAAAA,CApByDM,qBAuBtFJ,CAAAA,CApBGF,IAAAA,CAHwHI,SAuB3HF,CAAAA;EAASN,OAAAA,EAvBsCI,IAAAA,CAChDC,UAuBFE,CAAAA,MAAAA,CAAAA;EAAMH,IAJiBI,EAnBXJ,IAAAA,CACbE,SAkBwBE;CAASJ,EAlBxBJ,YAAAA,CACRO,MAAAA,CAHyFG,EAOnFN,IAAAA,CAJiBI,SAHkEE,CAAAA;EAgD7FC,OAAAA,EAhD2IP,IAAAA,CAIrIC,UA4CNM,CAAAA,QAAAA,CAAAA;EAhDyDV,IAAAA,EAIzCG,IAAAA,CACbE,SALsDL;EAAqB,SAAA,EAKlEG,IAAAA,CACJE,SANsE;GAM7DN,YAAAA,CACbO,MAAAA,GAKMH,IAAAA,CALiBI;WAJSJ,IAAAA,CAK9BC;QAAUD,IAAAA,CACbE;WAASF,IAAAA,CACNE;WAASF,IAAAA,CACTE;GAASN,YAAAA,CACXO,MAAAA,GAKMH,IAAAA,CALiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;eAASF,IAAAA,CACFK;eAASL,IAAAA,CACTE;GAASN,YAAAA,CACfO,MAAAA,GAGMH,IAAAA,CAHiBI;WALSJ,IAAAA,CAM9BC;QAAUD,IAAAA,CACbE;GAASN,YAAAA,CACRO,MAAAA,GAIMH,IAAAA,CAJiBI;WAHSJ,IAAAA,CAI9BC;YAAUD,IAAAA,CACTE;YAASF,IAAAA,CACTE;GAASN,YAAAA,CACZO,MAAAA;;;;;;;;;;;;;;;;;;;;;;;;qBAwBJI"}
@@ -108,7 +108,7 @@ declare function textEditor_20250728(options?: TextEditor20250728Options): Dynam
108
108
  path: string;
109
109
  insert_line: number;
110
110
  new_str: string;
111
- }, unknown, string | Promise<string>>;
111
+ }, unknown, string | Promise<string>, string>;
112
112
  //#endregion
113
113
  export { TextEditor20250728Options, textEditor_20250728 };
114
114
  //# sourceMappingURL=textEditor.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"textEditor.d.cts","names":["zod_v4_core5","DynamicStructuredTool","TextEditor20250728Command","TextEditor20250728Options","Promise","textEditor_20250728","zod24","ZodLiteral","ZodString","ZodNumber","ZodTuple","ZodOptional","$strip","ZodObject","ZodDiscriminatedUnion"],"sources":["../../src/tools/textEditor.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type TextEditor20250728Command } from \"./types.js\";\n/**\n * Options for the text editor tool (Claude 4.x version).\n */\nexport interface TextEditor20250728Options {\n /**\n * Optional execute function that handles text editor command execution.\n * This function receives the command input and should return the result.\n */\n execute?: (args: TextEditor20250728Command) => string | Promise<string>;\n /**\n * Optional maximum characters to return when viewing files.\n * If the file content exceeds this limit, it will be truncated.\n */\n maxCharacters?: number;\n}\n/**\n * Creates an Anthropic text editor tool for Claude 4.x models that can view and modify text files.\n *\n * The text editor tool enables Claude to view and modify text files, helping debug, fix,\n * and improve code or other text documents. Claude can directly interact with files,\n * providing hands-on assistance rather than just suggesting changes.\n *\n * Available commands:\n * - `view`: Examine file contents or list directory contents\n * - `str_replace`: Replace specific text in a file\n * - `create`: Create a new file with specified content\n * - `insert`: Insert text at a specific line number\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import * as fs from \"fs\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const textEditor = tools.textEditor_20250728({\n * execute: async (args) => {\n * if (args.command === \"view\") {\n * const content = fs.readFileSync(args.path, \"utf-8\");\n * return content.split(\"\\n\").map((line, i) => `${i + 1}: ${line}`).join(\"\\n\");\n * }\n * if (args.command === \"str_replace\") {\n * let content = fs.readFileSync(args.path, \"utf-8\");\n * content = content.replace(args.old_str!, args.new_str!);\n * fs.writeFileSync(args.path, content);\n * return \"Successfully replaced text.\";\n * }\n * // Handle other commands...\n * return \"Command executed\";\n * },\n * maxCharacters: 10000,\n * });\n *\n * const llmWithEditor = llm.bindTools([textEditor]);\n * const response = await llmWithEditor.invoke(\n * \"There's a syntax error in my primes.py file. Can you help me fix it?\"\n * );\n * ```\n *\n * @param options - Configuration options for the text editor tool\n * @param options.execute - Function that handles text editor command execution\n * @param options.maxCharacters - Maximum characters to return when viewing files\n * @returns The text editor tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool\n */\nexport declare function textEditor_20250728(options?: TextEditor20250728Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n view_range: import(\"zod\").ZodOptional<import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n view_range?: [number, number] | undefined;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n new_str: string;\n}, unknown, string | Promise<string>>;\n//# sourceMappingURL=textEditor.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,yBAAAA;EAAAA;AAiEjB;;;EACqCG,OACbE,CAAAA,EAAAA,CAAAA,IAAAA,EA9DHN,yBA8DGM,EAAAA,GAAAA,MAAAA,GA9DoCJ,OA8DpCI,CAAAA,MAAAA,CAAAA;EAASF;;;;EACQN,aAChBY,CAAAA,EAAAA,MAAAA;;;;;;;;;;;;;;;;;;;;;;AAJ8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA/EP,mBAAAA,WAA8BF,4BAA4BF,sBAazBK,KAAAA,CAb6DQ,uBAIvFR,KAAAA,CAJ4HO;WAA5EP,KAAAA,CACpDC;QAAUD,KAAAA,CACbE;cACwCF,KAAAA,CAAlCK,YAAoFL,KAAAA,CAA1DI,UADvBJ,KAAAA,CAC+CG,SAAAA,EAASH,KAAAA,CAAgBG,SAAAA;GAAhET,YAAAA,CAChBY,MAAAA,GAKMN,KAAAA,CALiBO;WAJoHP,KAAAA,CAKzIC;QAAUD,KAAAA,CACbE;WAASF,KAAAA,CACNE;WAASF,KAAAA,CACTE;GAASR,YAAAA,CACXY,MAAAA,GAIMN,KAAAA,CAJiBO;WALSP,KAAAA,CAM9BC;QAAUD,KAAAA,CACbE;aAASF,KAAAA,CACJE;GAASR,YAAAA,CACbY,MAAAA,GAKMN,KAAAA,CALiBO;WAJSP,KAAAA,CAK9BC;QAAUD,KAAAA,CACbE;eAASF,KAAAA,CACFG;WAASH,KAAAA,CACbE;GAASR,YAAAA,CACXY,MAAAA;;;;;;;;;;;;;;;;;;qBAkBJR"}
1
+ {"version":3,"file":"textEditor.d.cts","names":["zod_v4_core5","DynamicStructuredTool","TextEditor20250728Command","TextEditor20250728Options","Promise","textEditor_20250728","zod24","ZodLiteral","ZodString","ZodNumber","ZodTuple","ZodOptional","$strip","ZodObject","ZodDiscriminatedUnion"],"sources":["../../src/tools/textEditor.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type TextEditor20250728Command } from \"./types.js\";\n/**\n * Options for the text editor tool (Claude 4.x version).\n */\nexport interface TextEditor20250728Options {\n /**\n * Optional execute function that handles text editor command execution.\n * This function receives the command input and should return the result.\n */\n execute?: (args: TextEditor20250728Command) => string | Promise<string>;\n /**\n * Optional maximum characters to return when viewing files.\n * If the file content exceeds this limit, it will be truncated.\n */\n maxCharacters?: number;\n}\n/**\n * Creates an Anthropic text editor tool for Claude 4.x models that can view and modify text files.\n *\n * The text editor tool enables Claude to view and modify text files, helping debug, fix,\n * and improve code or other text documents. Claude can directly interact with files,\n * providing hands-on assistance rather than just suggesting changes.\n *\n * Available commands:\n * - `view`: Examine file contents or list directory contents\n * - `str_replace`: Replace specific text in a file\n * - `create`: Create a new file with specified content\n * - `insert`: Insert text at a specific line number\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import * as fs from \"fs\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const textEditor = tools.textEditor_20250728({\n * execute: async (args) => {\n * if (args.command === \"view\") {\n * const content = fs.readFileSync(args.path, \"utf-8\");\n * return content.split(\"\\n\").map((line, i) => `${i + 1}: ${line}`).join(\"\\n\");\n * }\n * if (args.command === \"str_replace\") {\n * let content = fs.readFileSync(args.path, \"utf-8\");\n * content = content.replace(args.old_str!, args.new_str!);\n * fs.writeFileSync(args.path, content);\n * return \"Successfully replaced text.\";\n * }\n * // Handle other commands...\n * return \"Command executed\";\n * },\n * maxCharacters: 10000,\n * });\n *\n * const llmWithEditor = llm.bindTools([textEditor]);\n * const response = await llmWithEditor.invoke(\n * \"There's a syntax error in my primes.py file. Can you help me fix it?\"\n * );\n * ```\n *\n * @param options - Configuration options for the text editor tool\n * @param options.execute - Function that handles text editor command execution\n * @param options.maxCharacters - Maximum characters to return when viewing files\n * @returns The text editor tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool\n */\nexport declare function textEditor_20250728(options?: TextEditor20250728Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n view_range: import(\"zod\").ZodOptional<import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n view_range?: [number, number] | undefined;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n new_str: string;\n}, unknown, string | Promise<string>, string>;\n//# sourceMappingURL=textEditor.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,yBAAAA;EAAAA;AAiEjB;;;EACqCG,OACbE,CAAAA,EAAAA,CAAAA,IAAAA,EA9DHN,yBA8DGM,EAAAA,GAAAA,MAAAA,GA9DoCJ,OA8DpCI,CAAAA,MAAAA,CAAAA;EAASF;;;;EACQN,aAChBY,CAAAA,EAAAA,MAAAA;;;;;;;;;;;;;;;;;;;;;;AAJ8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA/EP,mBAAAA,WAA8BF,4BAA4BF,sBAazBK,KAAAA,CAb6DQ,uBAIvFR,KAAAA,CAJ4HO;WAA5EP,KAAAA,CACpDC;QAAUD,KAAAA,CACbE;cACwCF,KAAAA,CAAlCK,YAAoFL,KAAAA,CAA1DI,UADvBJ,KAAAA,CAC+CG,SAAAA,EAASH,KAAAA,CAAgBG,SAAAA;GAAhET,YAAAA,CAChBY,MAAAA,GAKMN,KAAAA,CALiBO;WAJoHP,KAAAA,CAKzIC;QAAUD,KAAAA,CACbE;WAASF,KAAAA,CACNE;WAASF,KAAAA,CACTE;GAASR,YAAAA,CACXY,MAAAA,GAIMN,KAAAA,CAJiBO;WALSP,KAAAA,CAM9BC;QAAUD,KAAAA,CACbE;aAASF,KAAAA,CACJE;GAASR,YAAAA,CACbY,MAAAA,GAKMN,KAAAA,CALiBO;WAJSP,KAAAA,CAK9BC;QAAUD,KAAAA,CACbE;eAASF,KAAAA,CACFG;WAASH,KAAAA,CACbE;GAASR,YAAAA,CACXY,MAAAA;;;;;;;;;;;;;;;;;;qBAkBJR"}
@@ -108,7 +108,7 @@ declare function textEditor_20250728(options?: TextEditor20250728Options): Dynam
108
108
  path: string;
109
109
  insert_line: number;
110
110
  new_str: string;
111
- }, unknown, string | Promise<string>>;
111
+ }, unknown, string | Promise<string>, string>;
112
112
  //#endregion
113
113
  export { TextEditor20250728Options, textEditor_20250728 };
114
114
  //# sourceMappingURL=textEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"textEditor.d.ts","names":["zod_v4_core5","DynamicStructuredTool","TextEditor20250728Command","TextEditor20250728Options","Promise","textEditor_20250728","zod24","ZodLiteral","ZodString","ZodNumber","ZodTuple","ZodOptional","$strip","ZodObject","ZodDiscriminatedUnion"],"sources":["../../src/tools/textEditor.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type TextEditor20250728Command } from \"./types.js\";\n/**\n * Options for the text editor tool (Claude 4.x version).\n */\nexport interface TextEditor20250728Options {\n /**\n * Optional execute function that handles text editor command execution.\n * This function receives the command input and should return the result.\n */\n execute?: (args: TextEditor20250728Command) => string | Promise<string>;\n /**\n * Optional maximum characters to return when viewing files.\n * If the file content exceeds this limit, it will be truncated.\n */\n maxCharacters?: number;\n}\n/**\n * Creates an Anthropic text editor tool for Claude 4.x models that can view and modify text files.\n *\n * The text editor tool enables Claude to view and modify text files, helping debug, fix,\n * and improve code or other text documents. Claude can directly interact with files,\n * providing hands-on assistance rather than just suggesting changes.\n *\n * Available commands:\n * - `view`: Examine file contents or list directory contents\n * - `str_replace`: Replace specific text in a file\n * - `create`: Create a new file with specified content\n * - `insert`: Insert text at a specific line number\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import * as fs from \"fs\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const textEditor = tools.textEditor_20250728({\n * execute: async (args) => {\n * if (args.command === \"view\") {\n * const content = fs.readFileSync(args.path, \"utf-8\");\n * return content.split(\"\\n\").map((line, i) => `${i + 1}: ${line}`).join(\"\\n\");\n * }\n * if (args.command === \"str_replace\") {\n * let content = fs.readFileSync(args.path, \"utf-8\");\n * content = content.replace(args.old_str!, args.new_str!);\n * fs.writeFileSync(args.path, content);\n * return \"Successfully replaced text.\";\n * }\n * // Handle other commands...\n * return \"Command executed\";\n * },\n * maxCharacters: 10000,\n * });\n *\n * const llmWithEditor = llm.bindTools([textEditor]);\n * const response = await llmWithEditor.invoke(\n * \"There's a syntax error in my primes.py file. Can you help me fix it?\"\n * );\n * ```\n *\n * @param options - Configuration options for the text editor tool\n * @param options.execute - Function that handles text editor command execution\n * @param options.maxCharacters - Maximum characters to return when viewing files\n * @returns The text editor tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool\n */\nexport declare function textEditor_20250728(options?: TextEditor20250728Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n view_range: import(\"zod\").ZodOptional<import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n view_range?: [number, number] | undefined;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n new_str: string;\n}, unknown, string | Promise<string>>;\n//# sourceMappingURL=textEditor.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,yBAAAA;EAAAA;AAiEjB;;;EACqCG,OACbE,CAAAA,EAAAA,CAAAA,IAAAA,EA9DHN,yBA8DGM,EAAAA,GAAAA,MAAAA,GA9DoCJ,OA8DpCI,CAAAA,MAAAA,CAAAA;EAASF;;;;EACQN,aAChBY,CAAAA,EAAAA,MAAAA;;;;;;;;;;;;;;;;;;;;;;AAJ8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA/EP,mBAAAA,WAA8BF,4BAA4BF,sBAazBK,KAAAA,CAb6DQ,uBAIvFR,KAAAA,CAJ4HO;WAA5EP,KAAAA,CACpDC;QAAUD,KAAAA,CACbE;cACwCF,KAAAA,CAAlCK,YAAoFL,KAAAA,CAA1DI,UADvBJ,KAAAA,CAC+CG,SAAAA,EAASH,KAAAA,CAAgBG,SAAAA;GAAhET,YAAAA,CAChBY,MAAAA,GAKMN,KAAAA,CALiBO;WAJoHP,KAAAA,CAKzIC;QAAUD,KAAAA,CACbE;WAASF,KAAAA,CACNE;WAASF,KAAAA,CACTE;GAASR,YAAAA,CACXY,MAAAA,GAIMN,KAAAA,CAJiBO;WALSP,KAAAA,CAM9BC;QAAUD,KAAAA,CACbE;aAASF,KAAAA,CACJE;GAASR,YAAAA,CACbY,MAAAA,GAKMN,KAAAA,CALiBO;WAJSP,KAAAA,CAK9BC;QAAUD,KAAAA,CACbE;eAASF,KAAAA,CACFG;WAASH,KAAAA,CACbE;GAASR,YAAAA,CACXY,MAAAA;;;;;;;;;;;;;;;;;;qBAkBJR"}
1
+ {"version":3,"file":"textEditor.d.ts","names":["zod_v4_core5","DynamicStructuredTool","TextEditor20250728Command","TextEditor20250728Options","Promise","textEditor_20250728","zod24","ZodLiteral","ZodString","ZodNumber","ZodTuple","ZodOptional","$strip","ZodObject","ZodDiscriminatedUnion"],"sources":["../../src/tools/textEditor.d.ts"],"sourcesContent":["import type { DynamicStructuredTool } from \"@langchain/core/tools\";\nimport { type TextEditor20250728Command } from \"./types.js\";\n/**\n * Options for the text editor tool (Claude 4.x version).\n */\nexport interface TextEditor20250728Options {\n /**\n * Optional execute function that handles text editor command execution.\n * This function receives the command input and should return the result.\n */\n execute?: (args: TextEditor20250728Command) => string | Promise<string>;\n /**\n * Optional maximum characters to return when viewing files.\n * If the file content exceeds this limit, it will be truncated.\n */\n maxCharacters?: number;\n}\n/**\n * Creates an Anthropic text editor tool for Claude 4.x models that can view and modify text files.\n *\n * The text editor tool enables Claude to view and modify text files, helping debug, fix,\n * and improve code or other text documents. Claude can directly interact with files,\n * providing hands-on assistance rather than just suggesting changes.\n *\n * Available commands:\n * - `view`: Examine file contents or list directory contents\n * - `str_replace`: Replace specific text in a file\n * - `create`: Create a new file with specified content\n * - `insert`: Insert text at a specific line number\n *\n * @example\n * ```typescript\n * import { ChatAnthropic, tools } from \"@langchain/anthropic\";\n * import * as fs from \"fs\";\n *\n * const llm = new ChatAnthropic({\n * model: \"claude-sonnet-4-5-20250929\",\n * });\n *\n * const textEditor = tools.textEditor_20250728({\n * execute: async (args) => {\n * if (args.command === \"view\") {\n * const content = fs.readFileSync(args.path, \"utf-8\");\n * return content.split(\"\\n\").map((line, i) => `${i + 1}: ${line}`).join(\"\\n\");\n * }\n * if (args.command === \"str_replace\") {\n * let content = fs.readFileSync(args.path, \"utf-8\");\n * content = content.replace(args.old_str!, args.new_str!);\n * fs.writeFileSync(args.path, content);\n * return \"Successfully replaced text.\";\n * }\n * // Handle other commands...\n * return \"Command executed\";\n * },\n * maxCharacters: 10000,\n * });\n *\n * const llmWithEditor = llm.bindTools([textEditor]);\n * const response = await llmWithEditor.invoke(\n * \"There's a syntax error in my primes.py file. Can you help me fix it?\"\n * );\n * ```\n *\n * @param options - Configuration options for the text editor tool\n * @param options.execute - Function that handles text editor command execution\n * @param options.maxCharacters - Maximum characters to return when viewing files\n * @returns The text editor tool object that can be passed to `bindTools`\n *\n * @see https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool\n */\nexport declare function textEditor_20250728(options?: TextEditor20250728Options): DynamicStructuredTool<import(\"zod\").ZodDiscriminatedUnion<[import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"view\">;\n path: import(\"zod\").ZodString;\n view_range: import(\"zod\").ZodOptional<import(\"zod\").ZodTuple<[import(\"zod\").ZodNumber, import(\"zod\").ZodNumber], null>>;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"str_replace\">;\n path: import(\"zod\").ZodString;\n old_str: import(\"zod\").ZodString;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"create\">;\n path: import(\"zod\").ZodString;\n file_text: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>, import(\"zod\").ZodObject<{\n command: import(\"zod\").ZodLiteral<\"insert\">;\n path: import(\"zod\").ZodString;\n insert_line: import(\"zod\").ZodNumber;\n new_str: import(\"zod\").ZodString;\n}, import(\"zod/v4/core\").$strip>], \"command\">, {\n command: \"view\";\n path: string;\n view_range?: [number, number] | undefined;\n} | {\n command: \"str_replace\";\n path: string;\n old_str: string;\n new_str: string;\n} | {\n command: \"create\";\n path: string;\n file_text: string;\n} | {\n command: \"insert\";\n path: string;\n insert_line: number;\n new_str: string;\n}, unknown, string | Promise<string>, string>;\n//# sourceMappingURL=textEditor.d.ts.map"],"mappings":";;;;;;;;;UAKiBG,yBAAAA;EAAAA;AAiEjB;;;EACqCG,OACbE,CAAAA,EAAAA,CAAAA,IAAAA,EA9DHN,yBA8DGM,EAAAA,GAAAA,MAAAA,GA9DoCJ,OA8DpCI,CAAAA,MAAAA,CAAAA;EAASF;;;;EACQN,aAChBY,CAAAA,EAAAA,MAAAA;;;;;;;;;;;;;;;;;;;;;;AAJ8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA/EP,mBAAAA,WAA8BF,4BAA4BF,sBAazBK,KAAAA,CAb6DQ,uBAIvFR,KAAAA,CAJ4HO;WAA5EP,KAAAA,CACpDC;QAAUD,KAAAA,CACbE;cACwCF,KAAAA,CAAlCK,YAAoFL,KAAAA,CAA1DI,UADvBJ,KAAAA,CAC+CG,SAAAA,EAASH,KAAAA,CAAgBG,SAAAA;GAAhET,YAAAA,CAChBY,MAAAA,GAKMN,KAAAA,CALiBO;WAJoHP,KAAAA,CAKzIC;QAAUD,KAAAA,CACbE;WAASF,KAAAA,CACNE;WAASF,KAAAA,CACTE;GAASR,YAAAA,CACXY,MAAAA,GAIMN,KAAAA,CAJiBO;WALSP,KAAAA,CAM9BC;QAAUD,KAAAA,CACbE;aAASF,KAAAA,CACJE;GAASR,YAAAA,CACbY,MAAAA,GAKMN,KAAAA,CALiBO;WAJSP,KAAAA,CAK9BC;QAAUD,KAAAA,CACbE;eAASF,KAAAA,CACFG;WAASH,KAAAA,CACbE;GAASR,YAAAA,CACXY,MAAAA;;;;;;;;;;;;;;;;;;qBAkBJR"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/anthropic",
3
- "version": "1.3.6",
3
+ "version": "1.3.7-dev-1767822302252",
4
4
  "description": "Anthropic integrations for LangChain.js",
5
5
  "author": "LangChain",
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "zod": "^3.25.76 || ^4"
19
19
  },
20
20
  "peerDependencies": {
21
- "@langchain/core": "1.1.11"
21
+ "@langchain/core": "1.1.12-dev-1767822302252"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@anthropic-ai/vertex-sdk": "^0.11.5",
@@ -33,9 +33,9 @@
33
33
  "typescript": "~5.8.3",
34
34
  "uuid": "^13.0.0",
35
35
  "vitest": "^3.2.4",
36
- "@langchain/core": "1.1.11",
36
+ "@langchain/core": "1.1.12-dev-1767822302252",
37
37
  "@langchain/eslint": "0.1.1",
38
- "@langchain/standard-tests": "0.0.14",
38
+ "@langchain/standard-tests": "0.0.15-dev-1767822302252",
39
39
  "@langchain/tsconfig": "0.0.1"
40
40
  },
41
41
  "publishConfig": {