@langchain/anthropic 1.2.3 → 1.3.0-dev-1765432861398
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.
- package/README.md +620 -3
- package/dist/chat_models.cjs +8 -5
- package/dist/chat_models.cjs.map +1 -1
- package/dist/chat_models.d.cts +13 -16
- package/dist/chat_models.d.cts.map +1 -0
- package/dist/chat_models.d.ts +13 -16
- package/dist/chat_models.d.ts.map +1 -0
- package/dist/chat_models.js +7 -4
- package/dist/chat_models.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.d.cts +12 -2
- package/dist/index.d.ts +12 -2
- package/dist/index.js +2 -1
- package/dist/tools/bash.cjs +95 -0
- package/dist/tools/bash.cjs.map +1 -0
- package/dist/tools/bash.d.cts +99 -0
- package/dist/tools/bash.d.cts.map +1 -0
- package/dist/tools/bash.d.ts +99 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +94 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/codeExecution.cjs +70 -0
- package/dist/tools/codeExecution.cjs.map +1 -0
- package/dist/tools/codeExecution.d.cts +75 -0
- package/dist/tools/codeExecution.d.cts.map +1 -0
- package/dist/tools/codeExecution.d.ts +75 -0
- package/dist/tools/codeExecution.d.ts.map +1 -0
- package/dist/tools/codeExecution.js +69 -0
- package/dist/tools/codeExecution.js.map +1 -0
- package/dist/tools/computer.cjs +161 -0
- package/dist/tools/computer.cjs.map +1 -0
- package/dist/tools/computer.d.cts +289 -0
- package/dist/tools/computer.d.cts.map +1 -0
- package/dist/tools/computer.d.ts +289 -0
- package/dist/tools/computer.d.ts.map +1 -0
- package/dist/tools/computer.js +159 -0
- package/dist/tools/computer.js.map +1 -0
- package/dist/tools/index.cjs +28 -0
- package/dist/tools/index.cjs.map +1 -0
- package/dist/tools/index.d.cts +28 -0
- package/dist/tools/index.d.cts.map +1 -0
- package/dist/tools/index.d.ts +28 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +28 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/mcpToolset.cjs +111 -0
- package/dist/tools/mcpToolset.cjs.map +1 -0
- package/dist/tools/mcpToolset.d.cts +141 -0
- package/dist/tools/mcpToolset.d.cts.map +1 -0
- package/dist/tools/mcpToolset.d.ts +141 -0
- package/dist/tools/mcpToolset.d.ts.map +1 -0
- package/dist/tools/mcpToolset.js +110 -0
- package/dist/tools/mcpToolset.js.map +1 -0
- package/dist/tools/memory.cjs +56 -0
- package/dist/tools/memory.cjs.map +1 -0
- package/dist/tools/memory.d.cts +92 -0
- package/dist/tools/memory.d.cts.map +1 -0
- package/dist/tools/memory.d.ts +92 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +55 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/textEditor.cjs +79 -0
- package/dist/tools/textEditor.cjs.map +1 -0
- package/dist/tools/textEditor.d.cts +114 -0
- package/dist/tools/textEditor.d.cts.map +1 -0
- package/dist/tools/textEditor.d.ts +114 -0
- package/dist/tools/textEditor.d.ts.map +1 -0
- package/dist/tools/textEditor.js +78 -0
- package/dist/tools/textEditor.js.map +1 -0
- package/dist/tools/toolSearch.cjs +110 -0
- package/dist/tools/toolSearch.cjs.map +1 -0
- package/dist/tools/toolSearch.d.cts +108 -0
- package/dist/tools/toolSearch.d.cts.map +1 -0
- package/dist/tools/toolSearch.d.ts +108 -0
- package/dist/tools/toolSearch.d.ts.map +1 -0
- package/dist/tools/toolSearch.js +108 -0
- package/dist/tools/toolSearch.js.map +1 -0
- package/dist/tools/types.cjs +204 -0
- package/dist/tools/types.cjs.map +1 -0
- package/dist/tools/types.d.cts +366 -0
- package/dist/tools/types.d.cts.map +1 -0
- package/dist/tools/types.d.ts +366 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +199 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/webFetch.cjs +70 -0
- package/dist/tools/webFetch.cjs.map +1 -0
- package/dist/tools/webFetch.d.cts +96 -0
- package/dist/tools/webFetch.d.cts.map +1 -0
- package/dist/tools/webFetch.d.ts +96 -0
- package/dist/tools/webFetch.d.ts.map +1 -0
- package/dist/tools/webFetch.js +69 -0
- package/dist/tools/webFetch.js.map +1 -0
- package/dist/tools/webSearch.cjs +57 -0
- package/dist/tools/webSearch.cjs.map +1 -0
- package/dist/tools/webSearch.d.cts +84 -0
- package/dist/tools/webSearch.d.cts.map +1 -0
- package/dist/tools/webSearch.d.ts +84 -0
- package/dist/tools/webSearch.d.ts.map +1 -0
- package/dist/tools/webSearch.js +56 -0
- package/dist/tools/webSearch.js.map +1 -0
- package/dist/types.d.cts +2 -3
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +2 -3
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/prompts.d.cts.map +1 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/tools.cjs +9 -2
- package/dist/utils/tools.cjs.map +1 -1
- package/dist/utils/tools.js +13 -6
- package/dist/utils/tools.js.map +1 -1
- package/package.json +8 -7
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { Computer20250124Action, Computer20251124Action } from "./types.js";
|
|
2
|
+
import { ToolMessage } from "@langchain/core/messages";
|
|
3
|
+
import { DynamicStructuredTool, ToolRuntime } from "@langchain/core/tools";
|
|
4
|
+
import * as zod46 from "zod";
|
|
5
|
+
import * as zod_v4_core9 from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
//#region src/tools/computer.d.ts
|
|
8
|
+
type ComputerUseReturnType = string | Promise<string> | ToolMessage<any> | Promise<ToolMessage<any>>;
|
|
9
|
+
/**
|
|
10
|
+
* Options for the computer use tool (Claude Opus 4.5 only version).
|
|
11
|
+
*
|
|
12
|
+
* @template TState - The type of the state schema (when used with `ReactAgent`)
|
|
13
|
+
* @template TContext - The type of the context schema (when used with `ReactAgent`)
|
|
14
|
+
*/
|
|
15
|
+
interface Computer20251124Options<TState = any, TContext = any> {
|
|
16
|
+
/**
|
|
17
|
+
* The width of the display in pixels.
|
|
18
|
+
*/
|
|
19
|
+
displayWidthPx: number;
|
|
20
|
+
/**
|
|
21
|
+
* The height of the display in pixels.
|
|
22
|
+
*/
|
|
23
|
+
displayHeightPx: number;
|
|
24
|
+
/**
|
|
25
|
+
* Optional display number for X11 environments.
|
|
26
|
+
*/
|
|
27
|
+
displayNumber?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Enable zoom action for detailed screen region inspection.
|
|
30
|
+
* When enabled, Claude can zoom into specific screen regions.
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
enableZoom?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Optional execute function that handles computer action execution.
|
|
36
|
+
* This function receives the action input and should return the result
|
|
37
|
+
* (typically a base64-encoded screenshot or action confirmation).
|
|
38
|
+
*/
|
|
39
|
+
execute?: (args: Computer20251124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Creates an Anthropic computer use tool for Claude Opus 4.5 that provides
|
|
43
|
+
* screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
44
|
+
*
|
|
45
|
+
* The computer use tool enables Claude to interact with desktop environments through:
|
|
46
|
+
* - **Screenshot capture**: See what's currently displayed on screen
|
|
47
|
+
* - **Mouse control**: Click, drag, and move the cursor
|
|
48
|
+
* - **Keyboard input**: Type text and use keyboard shortcuts
|
|
49
|
+
* - **Zoom**: View specific screen regions at full resolution (when enabled)
|
|
50
|
+
*
|
|
51
|
+
* @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine
|
|
52
|
+
* or container with minimal privileges. Avoid giving access to sensitive data.
|
|
53
|
+
*
|
|
54
|
+
* @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import { ChatAnthropic, tools } from "@langchain/anthropic";
|
|
59
|
+
*
|
|
60
|
+
* const llm = new ChatAnthropic({
|
|
61
|
+
* model: "claude-opus-4-5-20251101",
|
|
62
|
+
* clientOptions: {
|
|
63
|
+
* defaultHeaders: {
|
|
64
|
+
* "anthropic-beta": "computer-use-2025-11-24",
|
|
65
|
+
* },
|
|
66
|
+
* },
|
|
67
|
+
* });
|
|
68
|
+
*
|
|
69
|
+
* const computer = tools.computer_20251124({
|
|
70
|
+
* displayWidthPx: 1024,
|
|
71
|
+
* displayHeightPx: 768,
|
|
72
|
+
* displayNumber: 1,
|
|
73
|
+
* enableZoom: true,
|
|
74
|
+
* execute: async (action) => {
|
|
75
|
+
* if (action.action === "screenshot") {
|
|
76
|
+
* // Capture and return base64-encoded screenshot
|
|
77
|
+
* return captureScreenshot();
|
|
78
|
+
* }
|
|
79
|
+
* if (action.action === "left_click") {
|
|
80
|
+
* // Click at the specified coordinates
|
|
81
|
+
* await click(action.coordinate[0], action.coordinate[1]);
|
|
82
|
+
* return captureScreenshot();
|
|
83
|
+
* }
|
|
84
|
+
* // Handle other actions...
|
|
85
|
+
* },
|
|
86
|
+
* });
|
|
87
|
+
*
|
|
88
|
+
* const llmWithComputer = llm.bindTools([computer]);
|
|
89
|
+
* const response = await llmWithComputer.invoke(
|
|
90
|
+
* "Save a picture of a cat to my desktop."
|
|
91
|
+
* );
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @param options - Configuration options for the computer use tool
|
|
95
|
+
* @returns The computer use tool object that can be passed to `bindTools`
|
|
96
|
+
*/
|
|
97
|
+
declare function computer_20251124(options: Computer20251124Options): DynamicStructuredTool<zod46.ZodDiscriminatedUnion<[zod46.ZodObject<{
|
|
98
|
+
action: zod46.ZodLiteral<"screenshot">;
|
|
99
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
100
|
+
action: zod46.ZodLiteral<"left_click">;
|
|
101
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
102
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
103
|
+
action: zod46.ZodLiteral<"right_click">;
|
|
104
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
105
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
106
|
+
action: zod46.ZodLiteral<"middle_click">;
|
|
107
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
108
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
109
|
+
action: zod46.ZodLiteral<"double_click">;
|
|
110
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
111
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
112
|
+
action: zod46.ZodLiteral<"triple_click">;
|
|
113
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
114
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
115
|
+
action: zod46.ZodLiteral<"left_click_drag">;
|
|
116
|
+
start_coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
117
|
+
end_coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
118
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
119
|
+
action: zod46.ZodLiteral<"left_mouse_down">;
|
|
120
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
121
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
122
|
+
action: zod46.ZodLiteral<"left_mouse_up">;
|
|
123
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
124
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
125
|
+
action: zod46.ZodLiteral<"scroll">;
|
|
126
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
127
|
+
scroll_direction: zod46.ZodEnum<{
|
|
128
|
+
down: "down";
|
|
129
|
+
left: "left";
|
|
130
|
+
right: "right";
|
|
131
|
+
up: "up";
|
|
132
|
+
}>;
|
|
133
|
+
scroll_amount: zod46.ZodNumber;
|
|
134
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
135
|
+
action: zod46.ZodLiteral<"type">;
|
|
136
|
+
text: zod46.ZodString;
|
|
137
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
138
|
+
action: zod46.ZodLiteral<"key">;
|
|
139
|
+
key: zod46.ZodString;
|
|
140
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
141
|
+
action: zod46.ZodLiteral<"mouse_move">;
|
|
142
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
143
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
144
|
+
action: zod46.ZodLiteral<"hold_key">;
|
|
145
|
+
key: zod46.ZodString;
|
|
146
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
147
|
+
action: zod46.ZodLiteral<"wait">;
|
|
148
|
+
duration: zod46.ZodOptional<zod46.ZodNumber>;
|
|
149
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
150
|
+
action: zod46.ZodLiteral<"zoom">;
|
|
151
|
+
region: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber, zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
152
|
+
}, zod_v4_core9.$strip>], "action">, Computer20251124Action, any, ToolMessage<any>>;
|
|
153
|
+
/**
|
|
154
|
+
* Options for the computer use tool.
|
|
155
|
+
*
|
|
156
|
+
* Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.
|
|
157
|
+
*/
|
|
158
|
+
interface Computer20250124Options<TState = any, TContext = any> {
|
|
159
|
+
/**
|
|
160
|
+
* The width of the display in pixels.
|
|
161
|
+
*/
|
|
162
|
+
displayWidthPx: number;
|
|
163
|
+
/**
|
|
164
|
+
* The height of the display in pixels.
|
|
165
|
+
*/
|
|
166
|
+
displayHeightPx: number;
|
|
167
|
+
/**
|
|
168
|
+
* Optional display number for X11 environments.
|
|
169
|
+
*/
|
|
170
|
+
displayNumber?: number;
|
|
171
|
+
/**
|
|
172
|
+
* Optional execute function that handles computer action execution.
|
|
173
|
+
* This function receives the action input and should return the result
|
|
174
|
+
* (typically a base64-encoded screenshot or action confirmation).
|
|
175
|
+
*/
|
|
176
|
+
execute?: (args: Computer20250124Action, runtime: ToolRuntime<TState, TContext>) => ComputerUseReturnType;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Creates an Anthropic computer use tool that provides screenshot capabilities and mouse/keyboard control
|
|
180
|
+
* for autonomous desktop interaction.
|
|
181
|
+
*
|
|
182
|
+
* Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.
|
|
183
|
+
*
|
|
184
|
+
* The computer use tool enables Claude to interact with desktop environments through:
|
|
185
|
+
* - **Screenshot capture**: See what's currently displayed on screen
|
|
186
|
+
* - **Mouse control**: Click, drag, and move the cursor
|
|
187
|
+
* - **Keyboard input**: Type text and use keyboard shortcuts
|
|
188
|
+
*
|
|
189
|
+
* @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine
|
|
190
|
+
* or container with minimal privileges. Avoid giving access to sensitive data.
|
|
191
|
+
*
|
|
192
|
+
* @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```typescript
|
|
196
|
+
* import { ChatAnthropic, tools } from "@langchain/anthropic";
|
|
197
|
+
*
|
|
198
|
+
* const llm = new ChatAnthropic({
|
|
199
|
+
* model: "claude-sonnet-4-5-20250929",
|
|
200
|
+
* clientOptions: {
|
|
201
|
+
* defaultHeaders: {
|
|
202
|
+
* "anthropic-beta": "computer-use-2025-01-24",
|
|
203
|
+
* },
|
|
204
|
+
* },
|
|
205
|
+
* });
|
|
206
|
+
*
|
|
207
|
+
* const computer = tools.computer_20250124({
|
|
208
|
+
* displayWidthPx: 1024,
|
|
209
|
+
* displayHeightPx: 768,
|
|
210
|
+
* displayNumber: 1,
|
|
211
|
+
* execute: async (action) => {
|
|
212
|
+
* if (action.action === "screenshot") {
|
|
213
|
+
* // Capture and return base64-encoded screenshot
|
|
214
|
+
* return captureScreenshot();
|
|
215
|
+
* }
|
|
216
|
+
* if (action.action === "left_click") {
|
|
217
|
+
* // Click at the specified coordinates
|
|
218
|
+
* await click(action.coordinate[0], action.coordinate[1]);
|
|
219
|
+
* return captureScreenshot();
|
|
220
|
+
* }
|
|
221
|
+
* // Handle other actions...
|
|
222
|
+
* },
|
|
223
|
+
* });
|
|
224
|
+
*
|
|
225
|
+
* const llmWithComputer = llm.bindTools([computer]);
|
|
226
|
+
* const response = await llmWithComputer.invoke(
|
|
227
|
+
* "Save a picture of a cat to my desktop."
|
|
228
|
+
* );
|
|
229
|
+
* ```
|
|
230
|
+
*
|
|
231
|
+
* @param options - Configuration options for the computer use tool
|
|
232
|
+
* @returns The computer use tool object that can be passed to `bindTools`
|
|
233
|
+
*/
|
|
234
|
+
declare function computer_20250124(options: Computer20250124Options): DynamicStructuredTool<zod46.ZodDiscriminatedUnion<[zod46.ZodObject<{
|
|
235
|
+
action: zod46.ZodLiteral<"screenshot">;
|
|
236
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
237
|
+
action: zod46.ZodLiteral<"left_click">;
|
|
238
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
239
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
240
|
+
action: zod46.ZodLiteral<"right_click">;
|
|
241
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
242
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
243
|
+
action: zod46.ZodLiteral<"middle_click">;
|
|
244
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
245
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
246
|
+
action: zod46.ZodLiteral<"double_click">;
|
|
247
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
248
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
249
|
+
action: zod46.ZodLiteral<"triple_click">;
|
|
250
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
251
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
252
|
+
action: zod46.ZodLiteral<"left_click_drag">;
|
|
253
|
+
start_coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
254
|
+
end_coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
255
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
256
|
+
action: zod46.ZodLiteral<"left_mouse_down">;
|
|
257
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
258
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
259
|
+
action: zod46.ZodLiteral<"left_mouse_up">;
|
|
260
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
261
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
262
|
+
action: zod46.ZodLiteral<"scroll">;
|
|
263
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
264
|
+
scroll_direction: zod46.ZodEnum<{
|
|
265
|
+
down: "down";
|
|
266
|
+
left: "left";
|
|
267
|
+
right: "right";
|
|
268
|
+
up: "up";
|
|
269
|
+
}>;
|
|
270
|
+
scroll_amount: zod46.ZodNumber;
|
|
271
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
272
|
+
action: zod46.ZodLiteral<"type">;
|
|
273
|
+
text: zod46.ZodString;
|
|
274
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
275
|
+
action: zod46.ZodLiteral<"key">;
|
|
276
|
+
key: zod46.ZodString;
|
|
277
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
278
|
+
action: zod46.ZodLiteral<"mouse_move">;
|
|
279
|
+
coordinate: zod46.ZodTuple<[zod46.ZodNumber, zod46.ZodNumber], null>;
|
|
280
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
281
|
+
action: zod46.ZodLiteral<"hold_key">;
|
|
282
|
+
key: zod46.ZodString;
|
|
283
|
+
}, zod_v4_core9.$strip>, zod46.ZodObject<{
|
|
284
|
+
action: zod46.ZodLiteral<"wait">;
|
|
285
|
+
duration: zod46.ZodOptional<zod46.ZodNumber>;
|
|
286
|
+
}, zod_v4_core9.$strip>], "action">, Computer20250124Action, any, ComputerUseReturnType>;
|
|
287
|
+
//#endregion
|
|
288
|
+
export { Computer20250124Options, Computer20251124Options, ComputerUseReturnType, computer_20250124, computer_20251124 };
|
|
289
|
+
//# sourceMappingURL=computer.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCJJ,iBA5CFF,iBAAAA,CA4CEE,OAAAA,EA5CyBL,uBA4CzBK,CAAAA,EA5CmDX,qBA4CnDW,CAQ+BD,KAAAA,CApDwDS,qBA4CvFR,CAAAA,CA1CKD,KAAAA,CAFuHG,SA4C5HF,CAAAA;EAAUD,MACkBI,EA7CoBJ,KAAAA,CAChDC,UA4C4BG,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AAAA,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"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { Computer20250124ActionSchema, Computer20251124ActionSchema } from "./types.js";
|
|
2
|
+
import { tool } from "@langchain/core/tools";
|
|
3
|
+
|
|
4
|
+
//#region src/tools/computer.ts
|
|
5
|
+
const TOOL_NAME = "computer";
|
|
6
|
+
/**
|
|
7
|
+
* Creates an Anthropic computer use tool for Claude Opus 4.5 that provides
|
|
8
|
+
* screenshot capabilities and mouse/keyboard control for autonomous desktop interaction.
|
|
9
|
+
*
|
|
10
|
+
* The computer use tool enables Claude to interact with desktop environments through:
|
|
11
|
+
* - **Screenshot capture**: See what's currently displayed on screen
|
|
12
|
+
* - **Mouse control**: Click, drag, and move the cursor
|
|
13
|
+
* - **Keyboard input**: Type text and use keyboard shortcuts
|
|
14
|
+
* - **Zoom**: View specific screen regions at full resolution (when enabled)
|
|
15
|
+
*
|
|
16
|
+
* @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine
|
|
17
|
+
* or container with minimal privileges. Avoid giving access to sensitive data.
|
|
18
|
+
*
|
|
19
|
+
* @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import { ChatAnthropic, tools } from "@langchain/anthropic";
|
|
24
|
+
*
|
|
25
|
+
* const llm = new ChatAnthropic({
|
|
26
|
+
* model: "claude-opus-4-5-20251101",
|
|
27
|
+
* clientOptions: {
|
|
28
|
+
* defaultHeaders: {
|
|
29
|
+
* "anthropic-beta": "computer-use-2025-11-24",
|
|
30
|
+
* },
|
|
31
|
+
* },
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const computer = tools.computer_20251124({
|
|
35
|
+
* displayWidthPx: 1024,
|
|
36
|
+
* displayHeightPx: 768,
|
|
37
|
+
* displayNumber: 1,
|
|
38
|
+
* enableZoom: true,
|
|
39
|
+
* execute: async (action) => {
|
|
40
|
+
* if (action.action === "screenshot") {
|
|
41
|
+
* // Capture and return base64-encoded screenshot
|
|
42
|
+
* return captureScreenshot();
|
|
43
|
+
* }
|
|
44
|
+
* if (action.action === "left_click") {
|
|
45
|
+
* // Click at the specified coordinates
|
|
46
|
+
* await click(action.coordinate[0], action.coordinate[1]);
|
|
47
|
+
* return captureScreenshot();
|
|
48
|
+
* }
|
|
49
|
+
* // Handle other actions...
|
|
50
|
+
* },
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* const llmWithComputer = llm.bindTools([computer]);
|
|
54
|
+
* const response = await llmWithComputer.invoke(
|
|
55
|
+
* "Save a picture of a cat to my desktop."
|
|
56
|
+
* );
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param options - Configuration options for the computer use tool
|
|
60
|
+
* @returns The computer use tool object that can be passed to `bindTools`
|
|
61
|
+
*/
|
|
62
|
+
function computer_20251124(options) {
|
|
63
|
+
const name = TOOL_NAME;
|
|
64
|
+
const computerTool = tool(options.execute, {
|
|
65
|
+
name,
|
|
66
|
+
schema: Computer20251124ActionSchema
|
|
67
|
+
});
|
|
68
|
+
computerTool.extras = {
|
|
69
|
+
...computerTool.extras ?? {},
|
|
70
|
+
providerToolDefinition: {
|
|
71
|
+
type: "computer_20251124",
|
|
72
|
+
name,
|
|
73
|
+
display_width_px: options.displayWidthPx,
|
|
74
|
+
display_height_px: options.displayHeightPx,
|
|
75
|
+
...options.displayNumber !== void 0 && { display_number: options.displayNumber },
|
|
76
|
+
...options.enableZoom !== void 0 && { enable_zoom: options.enableZoom }
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return computerTool;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Creates an Anthropic computer use tool that provides screenshot capabilities and mouse/keyboard control
|
|
83
|
+
* for autonomous desktop interaction.
|
|
84
|
+
*
|
|
85
|
+
* Supported models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, and Sonnet 3.7 versions.
|
|
86
|
+
*
|
|
87
|
+
* The computer use tool enables Claude to interact with desktop environments through:
|
|
88
|
+
* - **Screenshot capture**: See what's currently displayed on screen
|
|
89
|
+
* - **Mouse control**: Click, drag, and move the cursor
|
|
90
|
+
* - **Keyboard input**: Type text and use keyboard shortcuts
|
|
91
|
+
*
|
|
92
|
+
* @warning Computer use is a beta feature with unique risks. Use a dedicated virtual machine
|
|
93
|
+
* or container with minimal privileges. Avoid giving access to sensitive data.
|
|
94
|
+
*
|
|
95
|
+
* @see {@link https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool | Anthropic Computer Use Documentation}
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* import { ChatAnthropic, tools } from "@langchain/anthropic";
|
|
100
|
+
*
|
|
101
|
+
* const llm = new ChatAnthropic({
|
|
102
|
+
* model: "claude-sonnet-4-5-20250929",
|
|
103
|
+
* clientOptions: {
|
|
104
|
+
* defaultHeaders: {
|
|
105
|
+
* "anthropic-beta": "computer-use-2025-01-24",
|
|
106
|
+
* },
|
|
107
|
+
* },
|
|
108
|
+
* });
|
|
109
|
+
*
|
|
110
|
+
* const computer = tools.computer_20250124({
|
|
111
|
+
* displayWidthPx: 1024,
|
|
112
|
+
* displayHeightPx: 768,
|
|
113
|
+
* displayNumber: 1,
|
|
114
|
+
* execute: async (action) => {
|
|
115
|
+
* if (action.action === "screenshot") {
|
|
116
|
+
* // Capture and return base64-encoded screenshot
|
|
117
|
+
* return captureScreenshot();
|
|
118
|
+
* }
|
|
119
|
+
* if (action.action === "left_click") {
|
|
120
|
+
* // Click at the specified coordinates
|
|
121
|
+
* await click(action.coordinate[0], action.coordinate[1]);
|
|
122
|
+
* return captureScreenshot();
|
|
123
|
+
* }
|
|
124
|
+
* // Handle other actions...
|
|
125
|
+
* },
|
|
126
|
+
* });
|
|
127
|
+
*
|
|
128
|
+
* const llmWithComputer = llm.bindTools([computer]);
|
|
129
|
+
* const response = await llmWithComputer.invoke(
|
|
130
|
+
* "Save a picture of a cat to my desktop."
|
|
131
|
+
* );
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @param options - Configuration options for the computer use tool
|
|
135
|
+
* @returns The computer use tool object that can be passed to `bindTools`
|
|
136
|
+
*/
|
|
137
|
+
function computer_20250124(options) {
|
|
138
|
+
const name = TOOL_NAME;
|
|
139
|
+
const computerTool = tool(options.execute, {
|
|
140
|
+
name,
|
|
141
|
+
description: "A tool for interacting with the computer",
|
|
142
|
+
schema: Computer20250124ActionSchema
|
|
143
|
+
});
|
|
144
|
+
computerTool.extras = {
|
|
145
|
+
...computerTool.extras ?? {},
|
|
146
|
+
providerToolDefinition: {
|
|
147
|
+
type: "computer_20250124",
|
|
148
|
+
name,
|
|
149
|
+
display_width_px: options.displayWidthPx,
|
|
150
|
+
display_height_px: options.displayHeightPx,
|
|
151
|
+
...options.displayNumber !== void 0 && { display_number: options.displayNumber }
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
return computerTool;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
//#endregion
|
|
158
|
+
export { computer_20250124, computer_20251124 };
|
|
159
|
+
//# sourceMappingURL=computer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer.js","names":["options: Computer20251124Options","options: Computer20250124Options"],"sources":["../../src/tools/computer.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport Anthropic from \"@anthropic-ai/sdk\";\nimport { tool } from \"@langchain/core/tools\";\nimport { ToolMessage } from \"@langchain/core/messages\";\nimport type { DynamicStructuredTool, ToolRuntime } from \"@langchain/core/tools\";\n\nimport type {\n Computer20251124Action,\n Computer20250124Action,\n} from \"./types.js\";\nimport {\n Computer20251124ActionSchema,\n Computer20250124ActionSchema,\n} from \"./types.js\";\n\nconst TOOL_NAME = \"computer\";\n\nexport type ComputerUseReturnType =\n | string\n | Promise<string>\n | ToolMessage<any>\n | Promise<ToolMessage<any>>;\n\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?: (\n args: Computer20251124Action,\n runtime: ToolRuntime<TState, TContext>\n ) => ComputerUseReturnType;\n}\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 function computer_20251124(options: Computer20251124Options) {\n const name = TOOL_NAME;\n const computerTool = tool(\n options.execute as (\n input: unknown,\n runtime: ToolRuntime<unknown, unknown>\n ) => ComputerUseReturnType,\n {\n name,\n schema: Computer20251124ActionSchema,\n }\n );\n\n computerTool.extras = {\n ...(computerTool.extras ?? {}),\n providerToolDefinition: {\n type: \"computer_20251124\",\n name,\n display_width_px: options.displayWidthPx,\n display_height_px: options.displayHeightPx,\n ...(options.displayNumber !== undefined && {\n display_number: options.displayNumber,\n }),\n ...(options.enableZoom !== undefined && {\n enable_zoom: options.enableZoom,\n }),\n } satisfies Anthropic.Beta.BetaToolComputerUse20251124,\n };\n\n return computerTool as DynamicStructuredTool<\n typeof Computer20251124ActionSchema,\n Computer20251124Action,\n any,\n ToolMessage<any>\n >;\n}\n\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?: (\n args: Computer20250124Action,\n runtime: ToolRuntime<TState, TContext>\n ) => ComputerUseReturnType;\n}\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 function computer_20250124(options: Computer20250124Options) {\n const name = TOOL_NAME;\n const computerTool = tool(\n options.execute as (\n input: unknown,\n runtime: ToolRuntime<unknown, unknown>\n ) => ComputerUseReturnType,\n {\n name,\n description: \"A tool for interacting with the computer\",\n schema: Computer20250124ActionSchema,\n }\n );\n\n computerTool.extras = {\n ...(computerTool.extras ?? {}),\n providerToolDefinition: {\n type: \"computer_20250124\",\n name,\n display_width_px: options.displayWidthPx,\n display_height_px: options.displayHeightPx,\n ...(options.displayNumber !== undefined && {\n display_number: options.displayNumber,\n }),\n } satisfies Anthropic.Beta.BetaToolComputerUse20250124,\n };\n\n return computerTool as DynamicStructuredTool<\n typeof Computer20250124ActionSchema,\n Computer20250124Action,\n any,\n ComputerUseReturnType\n >;\n}\n"],"mappings":";;;;AAeA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGlB,SAAgB,kBAAkBA,SAAkC;CAClE,MAAM,OAAO;CACb,MAAM,eAAe,KACnB,QAAQ,SAIR;EACE;EACA,QAAQ;CACT,EACF;CAED,aAAa,SAAS;EACpB,GAAI,aAAa,UAAU,CAAE;EAC7B,wBAAwB;GACtB,MAAM;GACN;GACA,kBAAkB,QAAQ;GAC1B,mBAAmB,QAAQ;GAC3B,GAAI,QAAQ,kBAAkB,UAAa,EACzC,gBAAgB,QAAQ,cACzB;GACD,GAAI,QAAQ,eAAe,UAAa,EACtC,aAAa,QAAQ,WACtB;EACF;CACF;AAED,QAAO;AAMR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFD,SAAgB,kBAAkBC,SAAkC;CAClE,MAAM,OAAO;CACb,MAAM,eAAe,KACnB,QAAQ,SAIR;EACE;EACA,aAAa;EACb,QAAQ;CACT,EACF;CAED,aAAa,SAAS;EACpB,GAAI,aAAa,UAAU,CAAE;EAC7B,wBAAwB;GACtB,MAAM;GACN;GACA,kBAAkB,QAAQ;GAC1B,mBAAmB,QAAQ;GAC3B,GAAI,QAAQ,kBAAkB,UAAa,EACzC,gBAAgB,QAAQ,cACzB;EACF;CACF;AAED,QAAO;AAMR"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const require_memory = require('./memory.cjs');
|
|
2
|
+
const require_webSearch = require('./webSearch.cjs');
|
|
3
|
+
const require_webFetch = require('./webFetch.cjs');
|
|
4
|
+
const require_toolSearch = require('./toolSearch.cjs');
|
|
5
|
+
const require_textEditor = require('./textEditor.cjs');
|
|
6
|
+
const require_computer = require('./computer.cjs');
|
|
7
|
+
const require_codeExecution = require('./codeExecution.cjs');
|
|
8
|
+
const require_bash = require('./bash.cjs');
|
|
9
|
+
const require_mcpToolset = require('./mcpToolset.cjs');
|
|
10
|
+
|
|
11
|
+
//#region src/tools/index.ts
|
|
12
|
+
const tools = {
|
|
13
|
+
memory_20250818: require_memory.memory_20250818,
|
|
14
|
+
webSearch_20250305: require_webSearch.webSearch_20250305,
|
|
15
|
+
webFetch_20250910: require_webFetch.webFetch_20250910,
|
|
16
|
+
toolSearchRegex_20251119: require_toolSearch.toolSearchRegex_20251119,
|
|
17
|
+
toolSearchBM25_20251119: require_toolSearch.toolSearchBM25_20251119,
|
|
18
|
+
textEditor_20250728: require_textEditor.textEditor_20250728,
|
|
19
|
+
computer_20251124: require_computer.computer_20251124,
|
|
20
|
+
computer_20250124: require_computer.computer_20250124,
|
|
21
|
+
codeExecution_20250825: require_codeExecution.codeExecution_20250825,
|
|
22
|
+
bash_20250124: require_bash.bash_20250124,
|
|
23
|
+
mcpToolset_20251120: require_mcpToolset.mcpToolset_20251120
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.tools = tools;
|
|
28
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/tools/index.ts"],"sourcesContent":["import { memory_20250818 } from \"./memory.js\";\nimport {\n webSearch_20250305,\n type WebSearch20250305Options,\n} from \"./webSearch.js\";\nimport { webFetch_20250910, type WebFetch20250910Options } from \"./webFetch.js\";\nimport {\n toolSearchRegex_20251119,\n toolSearchBM25_20251119,\n type ToolSearchOptions,\n} from \"./toolSearch.js\";\nimport {\n textEditor_20250728,\n type TextEditor20250728Options,\n} from \"./textEditor.js\";\nimport {\n computer_20251124,\n computer_20250124,\n type Computer20251124Options,\n type Computer20250124Options,\n type ComputerUseReturnType,\n} from \"./computer.js\";\nimport {\n codeExecution_20250825,\n type CodeExecution20250825Options,\n} from \"./codeExecution.js\";\nimport { bash_20250124, type Bash20250124Options } from \"./bash.js\";\nimport { mcpToolset_20251120, type MCPToolsetOptions } from \"./mcpToolset.js\";\n\nexport const tools = {\n memory_20250818,\n webSearch_20250305,\n webFetch_20250910,\n toolSearchRegex_20251119,\n toolSearchBM25_20251119,\n textEditor_20250728,\n computer_20251124,\n computer_20250124,\n codeExecution_20250825,\n bash_20250124,\n mcpToolset_20251120,\n};\n\nexport type {\n MCPToolsetOptions,\n Bash20250124Options,\n Computer20251124Options,\n Computer20250124Options,\n ComputerUseReturnType,\n CodeExecution20250825Options,\n TextEditor20250728Options,\n ToolSearchOptions,\n WebFetch20250910Options,\n WebSearch20250305Options,\n};\n\nexport type * from \"./types.js\";\n"],"mappings":";;;;;;;;;;;AA6BA,MAAa,QAAQ;CACnB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Bash20250124Command, Bash20250124CommandSchema, Bash20250124ExecuteCommand, Bash20250124ExecuteCommandSchema, Bash20250124RestartCommand, Bash20250124RestartCommandSchema, Computer20250124Action, Computer20250124ActionSchema, Computer20251124Action, Computer20251124ActionSchema, ComputerDoubleClickAction, ComputerDoubleClickActionSchema, ComputerHoldKeyAction, ComputerHoldKeyActionSchema, ComputerKeyAction, ComputerKeyActionSchema, ComputerLeftClickAction, ComputerLeftClickActionSchema, ComputerLeftClickDragAction, ComputerLeftClickDragActionSchema, ComputerLeftMouseDownAction, ComputerLeftMouseDownActionSchema, ComputerLeftMouseUpAction, ComputerLeftMouseUpActionSchema, ComputerMiddleClickAction, ComputerMiddleClickActionSchema, ComputerMouseMoveAction, ComputerMouseMoveActionSchema, ComputerRightClickAction, ComputerRightClickActionSchema, ComputerScreenshotAction, ComputerScreenshotActionSchema, ComputerScrollAction, ComputerScrollActionSchema, ComputerTripleClickAction, ComputerTripleClickActionSchema, ComputerTypeAction, ComputerTypeActionSchema, ComputerWaitAction, ComputerWaitActionSchema, ComputerZoomAction, ComputerZoomActionSchema, Memory20250818Command, Memory20250818CommandSchema, Memory20250818CreateCommand, Memory20250818CreateCommandSchema, Memory20250818DeleteCommand, Memory20250818DeleteCommandSchema, Memory20250818InsertCommand, Memory20250818InsertCommandSchema, Memory20250818RenameCommand, Memory20250818RenameCommandSchema, Memory20250818StrReplaceCommand, Memory20250818StrReplaceCommandSchema, Memory20250818ViewCommand, Memory20250818ViewCommandSchema, MemoryTool20250818, MemoryTool20250818Options, TextEditor20250728Command, TextEditor20250728CommandSchema, TextEditor20250728CreateCommand, TextEditor20250728CreateCommandSchema, TextEditor20250728InsertCommand, TextEditor20250728InsertCommandSchema, TextEditor20250728StrReplaceCommand, TextEditor20250728StrReplaceCommandSchema, TextEditor20250728ViewCommand, TextEditor20250728ViewCommandSchema } from "./types.cjs";
|
|
2
|
+
import { memory_20250818 } from "./memory.cjs";
|
|
3
|
+
import { WebSearch20250305Options, webSearch_20250305 } from "./webSearch.cjs";
|
|
4
|
+
import { WebFetch20250910Options, webFetch_20250910 } from "./webFetch.cjs";
|
|
5
|
+
import { ToolSearchOptions, toolSearchBM25_20251119, toolSearchRegex_20251119 } from "./toolSearch.cjs";
|
|
6
|
+
import { TextEditor20250728Options, textEditor_20250728 } from "./textEditor.cjs";
|
|
7
|
+
import { Computer20250124Options, Computer20251124Options, ComputerUseReturnType, computer_20250124, computer_20251124 } from "./computer.cjs";
|
|
8
|
+
import { CodeExecution20250825Options, codeExecution_20250825 } from "./codeExecution.cjs";
|
|
9
|
+
import { Bash20250124Options, bash_20250124 } from "./bash.cjs";
|
|
10
|
+
import { MCPToolsetOptions, mcpToolset_20251120 } from "./mcpToolset.cjs";
|
|
11
|
+
|
|
12
|
+
//#region src/tools/index.d.ts
|
|
13
|
+
declare const tools: {
|
|
14
|
+
memory_20250818: typeof memory_20250818;
|
|
15
|
+
webSearch_20250305: typeof webSearch_20250305;
|
|
16
|
+
webFetch_20250910: typeof webFetch_20250910;
|
|
17
|
+
toolSearchRegex_20251119: typeof toolSearchRegex_20251119;
|
|
18
|
+
toolSearchBM25_20251119: typeof toolSearchBM25_20251119;
|
|
19
|
+
textEditor_20250728: typeof textEditor_20250728;
|
|
20
|
+
computer_20251124: typeof computer_20251124;
|
|
21
|
+
computer_20250124: typeof computer_20250124;
|
|
22
|
+
codeExecution_20250825: typeof codeExecution_20250825;
|
|
23
|
+
bash_20250124: typeof bash_20250124;
|
|
24
|
+
mcpToolset_20251120: typeof mcpToolset_20251120;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { tools };
|
|
28
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":["memory_20250818","webSearch_20250305","WebSearch20250305Options","webFetch_20250910","WebFetch20250910Options","toolSearchRegex_20251119","toolSearchBM25_20251119","ToolSearchOptions","textEditor_20250728","TextEditor20250728Options","computer_20251124","computer_20250124","Computer20251124Options","Computer20250124Options","ComputerUseReturnType","codeExecution_20250825","CodeExecution20250825Options","bash_20250124","Bash20250124Options","mcpToolset_20251120","MCPToolsetOptions","tools"],"sources":["../../src/tools/index.d.ts"],"sourcesContent":["import { memory_20250818 } from \"./memory.js\";\nimport { webSearch_20250305, type WebSearch20250305Options } from \"./webSearch.js\";\nimport { webFetch_20250910, type WebFetch20250910Options } from \"./webFetch.js\";\nimport { toolSearchRegex_20251119, toolSearchBM25_20251119, type ToolSearchOptions } from \"./toolSearch.js\";\nimport { textEditor_20250728, type TextEditor20250728Options } from \"./textEditor.js\";\nimport { computer_20251124, computer_20250124, type Computer20251124Options, type Computer20250124Options, type ComputerUseReturnType } from \"./computer.js\";\nimport { codeExecution_20250825, type CodeExecution20250825Options } from \"./codeExecution.js\";\nimport { bash_20250124, type Bash20250124Options } from \"./bash.js\";\nimport { mcpToolset_20251120, type MCPToolsetOptions } from \"./mcpToolset.js\";\nexport declare const tools: {\n memory_20250818: typeof memory_20250818;\n webSearch_20250305: typeof webSearch_20250305;\n webFetch_20250910: typeof webFetch_20250910;\n toolSearchRegex_20251119: typeof toolSearchRegex_20251119;\n toolSearchBM25_20251119: typeof toolSearchBM25_20251119;\n textEditor_20250728: typeof textEditor_20250728;\n computer_20251124: typeof computer_20251124;\n computer_20250124: typeof computer_20250124;\n codeExecution_20250825: typeof codeExecution_20250825;\n bash_20250124: typeof bash_20250124;\n mcpToolset_20251120: typeof mcpToolset_20251120;\n};\nexport type { MCPToolsetOptions, Bash20250124Options, Computer20251124Options, Computer20250124Options, ComputerUseReturnType, CodeExecution20250825Options, TextEditor20250728Options, ToolSearchOptions, WebFetch20250910Options, WebSearch20250305Options, };\nexport type * from \"./types.js\";\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;;;;;;;cASqBqB;0BACOrB;6BACGC;EAFVoB,iBAYpB,EAAA,OAT6BlB,iBAS7B;EAX2BH,wBAAAA,EAAAA,OAGSK,wBAHTL;EACGC,uBAAAA,EAAAA,OAGKK,uBAHLL;EACDE,mBAAAA,EAAAA,OAGEK,mBAHFL;EACOE,iBAAAA,EAAAA,OAGPK,iBAHOL;EACDC,iBAAAA,EAAAA,OAGNK,iBAHML;EACJE,sBAAAA,EAAAA,OAGGO,sBAHHP;EACFE,aAAAA,EAAAA,OAGJO,aAHIP;EACAC,mBAAAA,EAAAA,OAGEQ,mBAHFR;CACKI"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Bash20250124Command, Bash20250124CommandSchema, Bash20250124ExecuteCommand, Bash20250124ExecuteCommandSchema, Bash20250124RestartCommand, Bash20250124RestartCommandSchema, Computer20250124Action, Computer20250124ActionSchema, Computer20251124Action, Computer20251124ActionSchema, ComputerDoubleClickAction, ComputerDoubleClickActionSchema, ComputerHoldKeyAction, ComputerHoldKeyActionSchema, ComputerKeyAction, ComputerKeyActionSchema, ComputerLeftClickAction, ComputerLeftClickActionSchema, ComputerLeftClickDragAction, ComputerLeftClickDragActionSchema, ComputerLeftMouseDownAction, ComputerLeftMouseDownActionSchema, ComputerLeftMouseUpAction, ComputerLeftMouseUpActionSchema, ComputerMiddleClickAction, ComputerMiddleClickActionSchema, ComputerMouseMoveAction, ComputerMouseMoveActionSchema, ComputerRightClickAction, ComputerRightClickActionSchema, ComputerScreenshotAction, ComputerScreenshotActionSchema, ComputerScrollAction, ComputerScrollActionSchema, ComputerTripleClickAction, ComputerTripleClickActionSchema, ComputerTypeAction, ComputerTypeActionSchema, ComputerWaitAction, ComputerWaitActionSchema, ComputerZoomAction, ComputerZoomActionSchema, Memory20250818Command, Memory20250818CommandSchema, Memory20250818CreateCommand, Memory20250818CreateCommandSchema, Memory20250818DeleteCommand, Memory20250818DeleteCommandSchema, Memory20250818InsertCommand, Memory20250818InsertCommandSchema, Memory20250818RenameCommand, Memory20250818RenameCommandSchema, Memory20250818StrReplaceCommand, Memory20250818StrReplaceCommandSchema, Memory20250818ViewCommand, Memory20250818ViewCommandSchema, MemoryTool20250818, MemoryTool20250818Options, TextEditor20250728Command, TextEditor20250728CommandSchema, TextEditor20250728CreateCommand, TextEditor20250728CreateCommandSchema, TextEditor20250728InsertCommand, TextEditor20250728InsertCommandSchema, TextEditor20250728StrReplaceCommand, TextEditor20250728StrReplaceCommandSchema, TextEditor20250728ViewCommand, TextEditor20250728ViewCommandSchema } from "./types.js";
|
|
2
|
+
import { memory_20250818 } from "./memory.js";
|
|
3
|
+
import { WebSearch20250305Options, webSearch_20250305 } from "./webSearch.js";
|
|
4
|
+
import { WebFetch20250910Options, webFetch_20250910 } from "./webFetch.js";
|
|
5
|
+
import { ToolSearchOptions, toolSearchBM25_20251119, toolSearchRegex_20251119 } from "./toolSearch.js";
|
|
6
|
+
import { TextEditor20250728Options, textEditor_20250728 } from "./textEditor.js";
|
|
7
|
+
import { Computer20250124Options, Computer20251124Options, ComputerUseReturnType, computer_20250124, computer_20251124 } from "./computer.js";
|
|
8
|
+
import { CodeExecution20250825Options, codeExecution_20250825 } from "./codeExecution.js";
|
|
9
|
+
import { Bash20250124Options, bash_20250124 } from "./bash.js";
|
|
10
|
+
import { MCPToolsetOptions, mcpToolset_20251120 } from "./mcpToolset.js";
|
|
11
|
+
|
|
12
|
+
//#region src/tools/index.d.ts
|
|
13
|
+
declare const tools: {
|
|
14
|
+
memory_20250818: typeof memory_20250818;
|
|
15
|
+
webSearch_20250305: typeof webSearch_20250305;
|
|
16
|
+
webFetch_20250910: typeof webFetch_20250910;
|
|
17
|
+
toolSearchRegex_20251119: typeof toolSearchRegex_20251119;
|
|
18
|
+
toolSearchBM25_20251119: typeof toolSearchBM25_20251119;
|
|
19
|
+
textEditor_20250728: typeof textEditor_20250728;
|
|
20
|
+
computer_20251124: typeof computer_20251124;
|
|
21
|
+
computer_20250124: typeof computer_20250124;
|
|
22
|
+
codeExecution_20250825: typeof codeExecution_20250825;
|
|
23
|
+
bash_20250124: typeof bash_20250124;
|
|
24
|
+
mcpToolset_20251120: typeof mcpToolset_20251120;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { tools };
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["memory_20250818","webSearch_20250305","WebSearch20250305Options","webFetch_20250910","WebFetch20250910Options","toolSearchRegex_20251119","toolSearchBM25_20251119","ToolSearchOptions","textEditor_20250728","TextEditor20250728Options","computer_20251124","computer_20250124","Computer20251124Options","Computer20250124Options","ComputerUseReturnType","codeExecution_20250825","CodeExecution20250825Options","bash_20250124","Bash20250124Options","mcpToolset_20251120","MCPToolsetOptions","tools"],"sources":["../../src/tools/index.d.ts"],"sourcesContent":["import { memory_20250818 } from \"./memory.js\";\nimport { webSearch_20250305, type WebSearch20250305Options } from \"./webSearch.js\";\nimport { webFetch_20250910, type WebFetch20250910Options } from \"./webFetch.js\";\nimport { toolSearchRegex_20251119, toolSearchBM25_20251119, type ToolSearchOptions } from \"./toolSearch.js\";\nimport { textEditor_20250728, type TextEditor20250728Options } from \"./textEditor.js\";\nimport { computer_20251124, computer_20250124, type Computer20251124Options, type Computer20250124Options, type ComputerUseReturnType } from \"./computer.js\";\nimport { codeExecution_20250825, type CodeExecution20250825Options } from \"./codeExecution.js\";\nimport { bash_20250124, type Bash20250124Options } from \"./bash.js\";\nimport { mcpToolset_20251120, type MCPToolsetOptions } from \"./mcpToolset.js\";\nexport declare const tools: {\n memory_20250818: typeof memory_20250818;\n webSearch_20250305: typeof webSearch_20250305;\n webFetch_20250910: typeof webFetch_20250910;\n toolSearchRegex_20251119: typeof toolSearchRegex_20251119;\n toolSearchBM25_20251119: typeof toolSearchBM25_20251119;\n textEditor_20250728: typeof textEditor_20250728;\n computer_20251124: typeof computer_20251124;\n computer_20250124: typeof computer_20250124;\n codeExecution_20250825: typeof codeExecution_20250825;\n bash_20250124: typeof bash_20250124;\n mcpToolset_20251120: typeof mcpToolset_20251120;\n};\nexport type { MCPToolsetOptions, Bash20250124Options, Computer20251124Options, Computer20250124Options, ComputerUseReturnType, CodeExecution20250825Options, TextEditor20250728Options, ToolSearchOptions, WebFetch20250910Options, WebSearch20250305Options, };\nexport type * from \"./types.js\";\n//# sourceMappingURL=index.d.ts.map"],"mappings":";;;;;;;;;;;;cASqBqB;0BACOrB;6BACGC;EAFVoB,iBAYpB,EAAA,OAT6BlB,iBAS7B;EAX2BH,wBAAAA,EAAAA,OAGSK,wBAHTL;EACGC,uBAAAA,EAAAA,OAGKK,uBAHLL;EACDE,mBAAAA,EAAAA,OAGEK,mBAHFL;EACOE,iBAAAA,EAAAA,OAGPK,iBAHOL;EACDC,iBAAAA,EAAAA,OAGNK,iBAHML;EACJE,sBAAAA,EAAAA,OAGGO,sBAHHP;EACFE,aAAAA,EAAAA,OAGJO,aAHIP;EACAC,mBAAAA,EAAAA,OAGEQ,mBAHFR;CACKI"}
|