@ai-sdk/anthropic 2.0.25 → 2.0.26
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/CHANGELOG.md +7 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +376 -386
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -15
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +375 -385
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +14 -14
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,14 +15,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/index.ts
|
|
@@ -41,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
|
|
|
41
31
|
var import_provider_utils18 = require("@ai-sdk/provider-utils");
|
|
42
32
|
|
|
43
33
|
// src/version.ts
|
|
44
|
-
var VERSION = true ? "2.0.
|
|
34
|
+
var VERSION = true ? "2.0.26" : "0.0.0-test";
|
|
45
35
|
|
|
46
36
|
// src/anthropic-messages-language-model.ts
|
|
47
37
|
var import_provider3 = require("@ai-sdk/provider");
|
|
@@ -49,14 +39,14 @@ var import_provider_utils10 = require("@ai-sdk/provider-utils");
|
|
|
49
39
|
|
|
50
40
|
// src/anthropic-error.ts
|
|
51
41
|
var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
52
|
-
var
|
|
42
|
+
var import_v4 = require("zod/v4");
|
|
53
43
|
var anthropicErrorDataSchema = (0, import_provider_utils.lazySchema)(
|
|
54
44
|
() => (0, import_provider_utils.zodSchema)(
|
|
55
|
-
z.object({
|
|
56
|
-
type: z.literal("error"),
|
|
57
|
-
error: z.object({
|
|
58
|
-
type: z.string(),
|
|
59
|
-
message: z.string()
|
|
45
|
+
import_v4.z.object({
|
|
46
|
+
type: import_v4.z.literal("error"),
|
|
47
|
+
error: import_v4.z.object({
|
|
48
|
+
type: import_v4.z.string(),
|
|
49
|
+
message: import_v4.z.string()
|
|
60
50
|
})
|
|
61
51
|
})
|
|
62
52
|
)
|
|
@@ -68,377 +58,377 @@ var anthropicFailedResponseHandler = (0, import_provider_utils.createJsonErrorRe
|
|
|
68
58
|
|
|
69
59
|
// src/anthropic-messages-api.ts
|
|
70
60
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
71
|
-
var
|
|
61
|
+
var import_v42 = require("zod/v4");
|
|
72
62
|
var anthropicMessagesResponseSchema = (0, import_provider_utils2.lazySchema)(
|
|
73
63
|
() => (0, import_provider_utils2.zodSchema)(
|
|
74
|
-
|
|
75
|
-
type:
|
|
76
|
-
id:
|
|
77
|
-
model:
|
|
78
|
-
content:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
type:
|
|
82
|
-
text:
|
|
83
|
-
citations:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
type:
|
|
87
|
-
cited_text:
|
|
88
|
-
url:
|
|
89
|
-
title:
|
|
90
|
-
encrypted_index:
|
|
64
|
+
import_v42.z.object({
|
|
65
|
+
type: import_v42.z.literal("message"),
|
|
66
|
+
id: import_v42.z.string().nullish(),
|
|
67
|
+
model: import_v42.z.string().nullish(),
|
|
68
|
+
content: import_v42.z.array(
|
|
69
|
+
import_v42.z.discriminatedUnion("type", [
|
|
70
|
+
import_v42.z.object({
|
|
71
|
+
type: import_v42.z.literal("text"),
|
|
72
|
+
text: import_v42.z.string(),
|
|
73
|
+
citations: import_v42.z.array(
|
|
74
|
+
import_v42.z.discriminatedUnion("type", [
|
|
75
|
+
import_v42.z.object({
|
|
76
|
+
type: import_v42.z.literal("web_search_result_location"),
|
|
77
|
+
cited_text: import_v42.z.string(),
|
|
78
|
+
url: import_v42.z.string(),
|
|
79
|
+
title: import_v42.z.string(),
|
|
80
|
+
encrypted_index: import_v42.z.string()
|
|
91
81
|
}),
|
|
92
|
-
|
|
93
|
-
type:
|
|
94
|
-
cited_text:
|
|
95
|
-
document_index:
|
|
96
|
-
document_title:
|
|
97
|
-
start_page_number:
|
|
98
|
-
end_page_number:
|
|
82
|
+
import_v42.z.object({
|
|
83
|
+
type: import_v42.z.literal("page_location"),
|
|
84
|
+
cited_text: import_v42.z.string(),
|
|
85
|
+
document_index: import_v42.z.number(),
|
|
86
|
+
document_title: import_v42.z.string().nullable(),
|
|
87
|
+
start_page_number: import_v42.z.number(),
|
|
88
|
+
end_page_number: import_v42.z.number()
|
|
99
89
|
}),
|
|
100
|
-
|
|
101
|
-
type:
|
|
102
|
-
cited_text:
|
|
103
|
-
document_index:
|
|
104
|
-
document_title:
|
|
105
|
-
start_char_index:
|
|
106
|
-
end_char_index:
|
|
90
|
+
import_v42.z.object({
|
|
91
|
+
type: import_v42.z.literal("char_location"),
|
|
92
|
+
cited_text: import_v42.z.string(),
|
|
93
|
+
document_index: import_v42.z.number(),
|
|
94
|
+
document_title: import_v42.z.string().nullable(),
|
|
95
|
+
start_char_index: import_v42.z.number(),
|
|
96
|
+
end_char_index: import_v42.z.number()
|
|
107
97
|
})
|
|
108
98
|
])
|
|
109
99
|
).optional()
|
|
110
100
|
}),
|
|
111
|
-
|
|
112
|
-
type:
|
|
113
|
-
thinking:
|
|
114
|
-
signature:
|
|
101
|
+
import_v42.z.object({
|
|
102
|
+
type: import_v42.z.literal("thinking"),
|
|
103
|
+
thinking: import_v42.z.string(),
|
|
104
|
+
signature: import_v42.z.string()
|
|
115
105
|
}),
|
|
116
|
-
|
|
117
|
-
type:
|
|
118
|
-
data:
|
|
106
|
+
import_v42.z.object({
|
|
107
|
+
type: import_v42.z.literal("redacted_thinking"),
|
|
108
|
+
data: import_v42.z.string()
|
|
119
109
|
}),
|
|
120
|
-
|
|
121
|
-
type:
|
|
122
|
-
id:
|
|
123
|
-
name:
|
|
124
|
-
input:
|
|
110
|
+
import_v42.z.object({
|
|
111
|
+
type: import_v42.z.literal("tool_use"),
|
|
112
|
+
id: import_v42.z.string(),
|
|
113
|
+
name: import_v42.z.string(),
|
|
114
|
+
input: import_v42.z.unknown()
|
|
125
115
|
}),
|
|
126
|
-
|
|
127
|
-
type:
|
|
128
|
-
id:
|
|
129
|
-
name:
|
|
130
|
-
input:
|
|
116
|
+
import_v42.z.object({
|
|
117
|
+
type: import_v42.z.literal("server_tool_use"),
|
|
118
|
+
id: import_v42.z.string(),
|
|
119
|
+
name: import_v42.z.string(),
|
|
120
|
+
input: import_v42.z.record(import_v42.z.string(), import_v42.z.unknown()).nullish()
|
|
131
121
|
}),
|
|
132
|
-
|
|
133
|
-
type:
|
|
134
|
-
tool_use_id:
|
|
135
|
-
content:
|
|
136
|
-
|
|
137
|
-
type:
|
|
138
|
-
url:
|
|
139
|
-
retrieved_at:
|
|
140
|
-
content:
|
|
141
|
-
type:
|
|
142
|
-
title:
|
|
143
|
-
citations:
|
|
144
|
-
source:
|
|
145
|
-
type:
|
|
146
|
-
media_type:
|
|
147
|
-
data:
|
|
122
|
+
import_v42.z.object({
|
|
123
|
+
type: import_v42.z.literal("web_fetch_tool_result"),
|
|
124
|
+
tool_use_id: import_v42.z.string(),
|
|
125
|
+
content: import_v42.z.union([
|
|
126
|
+
import_v42.z.object({
|
|
127
|
+
type: import_v42.z.literal("web_fetch_result"),
|
|
128
|
+
url: import_v42.z.string(),
|
|
129
|
+
retrieved_at: import_v42.z.string(),
|
|
130
|
+
content: import_v42.z.object({
|
|
131
|
+
type: import_v42.z.literal("document"),
|
|
132
|
+
title: import_v42.z.string().nullable(),
|
|
133
|
+
citations: import_v42.z.object({ enabled: import_v42.z.boolean() }).optional(),
|
|
134
|
+
source: import_v42.z.object({
|
|
135
|
+
type: import_v42.z.literal("text"),
|
|
136
|
+
media_type: import_v42.z.string(),
|
|
137
|
+
data: import_v42.z.string()
|
|
148
138
|
})
|
|
149
139
|
})
|
|
150
140
|
}),
|
|
151
|
-
|
|
152
|
-
type:
|
|
153
|
-
error_code:
|
|
141
|
+
import_v42.z.object({
|
|
142
|
+
type: import_v42.z.literal("web_fetch_tool_result_error"),
|
|
143
|
+
error_code: import_v42.z.string()
|
|
154
144
|
})
|
|
155
145
|
])
|
|
156
146
|
}),
|
|
157
|
-
|
|
158
|
-
type:
|
|
159
|
-
tool_use_id:
|
|
160
|
-
content:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
type:
|
|
164
|
-
url:
|
|
165
|
-
title:
|
|
166
|
-
encrypted_content:
|
|
167
|
-
page_age:
|
|
147
|
+
import_v42.z.object({
|
|
148
|
+
type: import_v42.z.literal("web_search_tool_result"),
|
|
149
|
+
tool_use_id: import_v42.z.string(),
|
|
150
|
+
content: import_v42.z.union([
|
|
151
|
+
import_v42.z.array(
|
|
152
|
+
import_v42.z.object({
|
|
153
|
+
type: import_v42.z.literal("web_search_result"),
|
|
154
|
+
url: import_v42.z.string(),
|
|
155
|
+
title: import_v42.z.string(),
|
|
156
|
+
encrypted_content: import_v42.z.string(),
|
|
157
|
+
page_age: import_v42.z.string().nullish()
|
|
168
158
|
})
|
|
169
159
|
),
|
|
170
|
-
|
|
171
|
-
type:
|
|
172
|
-
error_code:
|
|
160
|
+
import_v42.z.object({
|
|
161
|
+
type: import_v42.z.literal("web_search_tool_result_error"),
|
|
162
|
+
error_code: import_v42.z.string()
|
|
173
163
|
})
|
|
174
164
|
])
|
|
175
165
|
}),
|
|
176
|
-
|
|
177
|
-
type:
|
|
178
|
-
tool_use_id:
|
|
179
|
-
content:
|
|
180
|
-
|
|
181
|
-
type:
|
|
182
|
-
stdout:
|
|
183
|
-
stderr:
|
|
184
|
-
return_code:
|
|
166
|
+
import_v42.z.object({
|
|
167
|
+
type: import_v42.z.literal("code_execution_tool_result"),
|
|
168
|
+
tool_use_id: import_v42.z.string(),
|
|
169
|
+
content: import_v42.z.union([
|
|
170
|
+
import_v42.z.object({
|
|
171
|
+
type: import_v42.z.literal("code_execution_result"),
|
|
172
|
+
stdout: import_v42.z.string(),
|
|
173
|
+
stderr: import_v42.z.string(),
|
|
174
|
+
return_code: import_v42.z.number()
|
|
185
175
|
}),
|
|
186
|
-
|
|
187
|
-
type:
|
|
188
|
-
error_code:
|
|
176
|
+
import_v42.z.object({
|
|
177
|
+
type: import_v42.z.literal("code_execution_tool_result_error"),
|
|
178
|
+
error_code: import_v42.z.string()
|
|
189
179
|
})
|
|
190
180
|
])
|
|
191
181
|
})
|
|
192
182
|
])
|
|
193
183
|
),
|
|
194
|
-
stop_reason:
|
|
195
|
-
stop_sequence:
|
|
196
|
-
usage:
|
|
197
|
-
input_tokens:
|
|
198
|
-
output_tokens:
|
|
199
|
-
cache_creation_input_tokens:
|
|
200
|
-
cache_read_input_tokens:
|
|
184
|
+
stop_reason: import_v42.z.string().nullish(),
|
|
185
|
+
stop_sequence: import_v42.z.string().nullish(),
|
|
186
|
+
usage: import_v42.z.looseObject({
|
|
187
|
+
input_tokens: import_v42.z.number(),
|
|
188
|
+
output_tokens: import_v42.z.number(),
|
|
189
|
+
cache_creation_input_tokens: import_v42.z.number().nullish(),
|
|
190
|
+
cache_read_input_tokens: import_v42.z.number().nullish()
|
|
201
191
|
})
|
|
202
192
|
})
|
|
203
193
|
)
|
|
204
194
|
);
|
|
205
195
|
var anthropicMessagesChunkSchema = (0, import_provider_utils2.lazySchema)(
|
|
206
196
|
() => (0, import_provider_utils2.zodSchema)(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
type:
|
|
210
|
-
message:
|
|
211
|
-
id:
|
|
212
|
-
model:
|
|
213
|
-
usage:
|
|
214
|
-
input_tokens:
|
|
215
|
-
cache_creation_input_tokens:
|
|
216
|
-
cache_read_input_tokens:
|
|
197
|
+
import_v42.z.discriminatedUnion("type", [
|
|
198
|
+
import_v42.z.object({
|
|
199
|
+
type: import_v42.z.literal("message_start"),
|
|
200
|
+
message: import_v42.z.object({
|
|
201
|
+
id: import_v42.z.string().nullish(),
|
|
202
|
+
model: import_v42.z.string().nullish(),
|
|
203
|
+
usage: import_v42.z.looseObject({
|
|
204
|
+
input_tokens: import_v42.z.number(),
|
|
205
|
+
cache_creation_input_tokens: import_v42.z.number().nullish(),
|
|
206
|
+
cache_read_input_tokens: import_v42.z.number().nullish()
|
|
217
207
|
})
|
|
218
208
|
})
|
|
219
209
|
}),
|
|
220
|
-
|
|
221
|
-
type:
|
|
222
|
-
index:
|
|
223
|
-
content_block:
|
|
224
|
-
|
|
225
|
-
type:
|
|
226
|
-
text:
|
|
210
|
+
import_v42.z.object({
|
|
211
|
+
type: import_v42.z.literal("content_block_start"),
|
|
212
|
+
index: import_v42.z.number(),
|
|
213
|
+
content_block: import_v42.z.discriminatedUnion("type", [
|
|
214
|
+
import_v42.z.object({
|
|
215
|
+
type: import_v42.z.literal("text"),
|
|
216
|
+
text: import_v42.z.string()
|
|
227
217
|
}),
|
|
228
|
-
|
|
229
|
-
type:
|
|
230
|
-
thinking:
|
|
218
|
+
import_v42.z.object({
|
|
219
|
+
type: import_v42.z.literal("thinking"),
|
|
220
|
+
thinking: import_v42.z.string()
|
|
231
221
|
}),
|
|
232
|
-
|
|
233
|
-
type:
|
|
234
|
-
id:
|
|
235
|
-
name:
|
|
222
|
+
import_v42.z.object({
|
|
223
|
+
type: import_v42.z.literal("tool_use"),
|
|
224
|
+
id: import_v42.z.string(),
|
|
225
|
+
name: import_v42.z.string()
|
|
236
226
|
}),
|
|
237
|
-
|
|
238
|
-
type:
|
|
239
|
-
data:
|
|
227
|
+
import_v42.z.object({
|
|
228
|
+
type: import_v42.z.literal("redacted_thinking"),
|
|
229
|
+
data: import_v42.z.string()
|
|
240
230
|
}),
|
|
241
|
-
|
|
242
|
-
type:
|
|
243
|
-
id:
|
|
244
|
-
name:
|
|
245
|
-
input:
|
|
231
|
+
import_v42.z.object({
|
|
232
|
+
type: import_v42.z.literal("server_tool_use"),
|
|
233
|
+
id: import_v42.z.string(),
|
|
234
|
+
name: import_v42.z.string(),
|
|
235
|
+
input: import_v42.z.record(import_v42.z.string(), import_v42.z.unknown()).nullish()
|
|
246
236
|
}),
|
|
247
|
-
|
|
248
|
-
type:
|
|
249
|
-
tool_use_id:
|
|
250
|
-
content:
|
|
251
|
-
|
|
252
|
-
type:
|
|
253
|
-
url:
|
|
254
|
-
retrieved_at:
|
|
255
|
-
content:
|
|
256
|
-
type:
|
|
257
|
-
title:
|
|
258
|
-
citations:
|
|
259
|
-
source:
|
|
260
|
-
type:
|
|
261
|
-
media_type:
|
|
262
|
-
data:
|
|
237
|
+
import_v42.z.object({
|
|
238
|
+
type: import_v42.z.literal("web_fetch_tool_result"),
|
|
239
|
+
tool_use_id: import_v42.z.string(),
|
|
240
|
+
content: import_v42.z.union([
|
|
241
|
+
import_v42.z.object({
|
|
242
|
+
type: import_v42.z.literal("web_fetch_result"),
|
|
243
|
+
url: import_v42.z.string(),
|
|
244
|
+
retrieved_at: import_v42.z.string(),
|
|
245
|
+
content: import_v42.z.object({
|
|
246
|
+
type: import_v42.z.literal("document"),
|
|
247
|
+
title: import_v42.z.string().nullable(),
|
|
248
|
+
citations: import_v42.z.object({ enabled: import_v42.z.boolean() }).optional(),
|
|
249
|
+
source: import_v42.z.object({
|
|
250
|
+
type: import_v42.z.literal("text"),
|
|
251
|
+
media_type: import_v42.z.string(),
|
|
252
|
+
data: import_v42.z.string()
|
|
263
253
|
})
|
|
264
254
|
})
|
|
265
255
|
}),
|
|
266
|
-
|
|
267
|
-
type:
|
|
268
|
-
error_code:
|
|
256
|
+
import_v42.z.object({
|
|
257
|
+
type: import_v42.z.literal("web_fetch_tool_result_error"),
|
|
258
|
+
error_code: import_v42.z.string()
|
|
269
259
|
})
|
|
270
260
|
])
|
|
271
261
|
}),
|
|
272
|
-
|
|
273
|
-
type:
|
|
274
|
-
tool_use_id:
|
|
275
|
-
content:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
type:
|
|
279
|
-
url:
|
|
280
|
-
title:
|
|
281
|
-
encrypted_content:
|
|
282
|
-
page_age:
|
|
262
|
+
import_v42.z.object({
|
|
263
|
+
type: import_v42.z.literal("web_search_tool_result"),
|
|
264
|
+
tool_use_id: import_v42.z.string(),
|
|
265
|
+
content: import_v42.z.union([
|
|
266
|
+
import_v42.z.array(
|
|
267
|
+
import_v42.z.object({
|
|
268
|
+
type: import_v42.z.literal("web_search_result"),
|
|
269
|
+
url: import_v42.z.string(),
|
|
270
|
+
title: import_v42.z.string(),
|
|
271
|
+
encrypted_content: import_v42.z.string(),
|
|
272
|
+
page_age: import_v42.z.string().nullish()
|
|
283
273
|
})
|
|
284
274
|
),
|
|
285
|
-
|
|
286
|
-
type:
|
|
287
|
-
error_code:
|
|
275
|
+
import_v42.z.object({
|
|
276
|
+
type: import_v42.z.literal("web_search_tool_result_error"),
|
|
277
|
+
error_code: import_v42.z.string()
|
|
288
278
|
})
|
|
289
279
|
])
|
|
290
280
|
}),
|
|
291
|
-
|
|
292
|
-
type:
|
|
293
|
-
tool_use_id:
|
|
294
|
-
content:
|
|
295
|
-
|
|
296
|
-
type:
|
|
297
|
-
stdout:
|
|
298
|
-
stderr:
|
|
299
|
-
return_code:
|
|
281
|
+
import_v42.z.object({
|
|
282
|
+
type: import_v42.z.literal("code_execution_tool_result"),
|
|
283
|
+
tool_use_id: import_v42.z.string(),
|
|
284
|
+
content: import_v42.z.union([
|
|
285
|
+
import_v42.z.object({
|
|
286
|
+
type: import_v42.z.literal("code_execution_result"),
|
|
287
|
+
stdout: import_v42.z.string(),
|
|
288
|
+
stderr: import_v42.z.string(),
|
|
289
|
+
return_code: import_v42.z.number()
|
|
300
290
|
}),
|
|
301
|
-
|
|
302
|
-
type:
|
|
303
|
-
error_code:
|
|
291
|
+
import_v42.z.object({
|
|
292
|
+
type: import_v42.z.literal("code_execution_tool_result_error"),
|
|
293
|
+
error_code: import_v42.z.string()
|
|
304
294
|
})
|
|
305
295
|
])
|
|
306
296
|
})
|
|
307
297
|
])
|
|
308
298
|
}),
|
|
309
|
-
|
|
310
|
-
type:
|
|
311
|
-
index:
|
|
312
|
-
delta:
|
|
313
|
-
|
|
314
|
-
type:
|
|
315
|
-
partial_json:
|
|
299
|
+
import_v42.z.object({
|
|
300
|
+
type: import_v42.z.literal("content_block_delta"),
|
|
301
|
+
index: import_v42.z.number(),
|
|
302
|
+
delta: import_v42.z.discriminatedUnion("type", [
|
|
303
|
+
import_v42.z.object({
|
|
304
|
+
type: import_v42.z.literal("input_json_delta"),
|
|
305
|
+
partial_json: import_v42.z.string()
|
|
316
306
|
}),
|
|
317
|
-
|
|
318
|
-
type:
|
|
319
|
-
text:
|
|
307
|
+
import_v42.z.object({
|
|
308
|
+
type: import_v42.z.literal("text_delta"),
|
|
309
|
+
text: import_v42.z.string()
|
|
320
310
|
}),
|
|
321
|
-
|
|
322
|
-
type:
|
|
323
|
-
thinking:
|
|
311
|
+
import_v42.z.object({
|
|
312
|
+
type: import_v42.z.literal("thinking_delta"),
|
|
313
|
+
thinking: import_v42.z.string()
|
|
324
314
|
}),
|
|
325
|
-
|
|
326
|
-
type:
|
|
327
|
-
signature:
|
|
315
|
+
import_v42.z.object({
|
|
316
|
+
type: import_v42.z.literal("signature_delta"),
|
|
317
|
+
signature: import_v42.z.string()
|
|
328
318
|
}),
|
|
329
|
-
|
|
330
|
-
type:
|
|
331
|
-
citation:
|
|
332
|
-
|
|
333
|
-
type:
|
|
334
|
-
cited_text:
|
|
335
|
-
url:
|
|
336
|
-
title:
|
|
337
|
-
encrypted_index:
|
|
319
|
+
import_v42.z.object({
|
|
320
|
+
type: import_v42.z.literal("citations_delta"),
|
|
321
|
+
citation: import_v42.z.discriminatedUnion("type", [
|
|
322
|
+
import_v42.z.object({
|
|
323
|
+
type: import_v42.z.literal("web_search_result_location"),
|
|
324
|
+
cited_text: import_v42.z.string(),
|
|
325
|
+
url: import_v42.z.string(),
|
|
326
|
+
title: import_v42.z.string(),
|
|
327
|
+
encrypted_index: import_v42.z.string()
|
|
338
328
|
}),
|
|
339
|
-
|
|
340
|
-
type:
|
|
341
|
-
cited_text:
|
|
342
|
-
document_index:
|
|
343
|
-
document_title:
|
|
344
|
-
start_page_number:
|
|
345
|
-
end_page_number:
|
|
329
|
+
import_v42.z.object({
|
|
330
|
+
type: import_v42.z.literal("page_location"),
|
|
331
|
+
cited_text: import_v42.z.string(),
|
|
332
|
+
document_index: import_v42.z.number(),
|
|
333
|
+
document_title: import_v42.z.string().nullable(),
|
|
334
|
+
start_page_number: import_v42.z.number(),
|
|
335
|
+
end_page_number: import_v42.z.number()
|
|
346
336
|
}),
|
|
347
|
-
|
|
348
|
-
type:
|
|
349
|
-
cited_text:
|
|
350
|
-
document_index:
|
|
351
|
-
document_title:
|
|
352
|
-
start_char_index:
|
|
353
|
-
end_char_index:
|
|
337
|
+
import_v42.z.object({
|
|
338
|
+
type: import_v42.z.literal("char_location"),
|
|
339
|
+
cited_text: import_v42.z.string(),
|
|
340
|
+
document_index: import_v42.z.number(),
|
|
341
|
+
document_title: import_v42.z.string().nullable(),
|
|
342
|
+
start_char_index: import_v42.z.number(),
|
|
343
|
+
end_char_index: import_v42.z.number()
|
|
354
344
|
})
|
|
355
345
|
])
|
|
356
346
|
})
|
|
357
347
|
])
|
|
358
348
|
}),
|
|
359
|
-
|
|
360
|
-
type:
|
|
361
|
-
index:
|
|
349
|
+
import_v42.z.object({
|
|
350
|
+
type: import_v42.z.literal("content_block_stop"),
|
|
351
|
+
index: import_v42.z.number()
|
|
362
352
|
}),
|
|
363
|
-
|
|
364
|
-
type:
|
|
365
|
-
error:
|
|
366
|
-
type:
|
|
367
|
-
message:
|
|
353
|
+
import_v42.z.object({
|
|
354
|
+
type: import_v42.z.literal("error"),
|
|
355
|
+
error: import_v42.z.object({
|
|
356
|
+
type: import_v42.z.string(),
|
|
357
|
+
message: import_v42.z.string()
|
|
368
358
|
})
|
|
369
359
|
}),
|
|
370
|
-
|
|
371
|
-
type:
|
|
372
|
-
delta:
|
|
373
|
-
stop_reason:
|
|
374
|
-
stop_sequence:
|
|
360
|
+
import_v42.z.object({
|
|
361
|
+
type: import_v42.z.literal("message_delta"),
|
|
362
|
+
delta: import_v42.z.object({
|
|
363
|
+
stop_reason: import_v42.z.string().nullish(),
|
|
364
|
+
stop_sequence: import_v42.z.string().nullish()
|
|
375
365
|
}),
|
|
376
|
-
usage:
|
|
377
|
-
output_tokens:
|
|
378
|
-
cache_creation_input_tokens:
|
|
366
|
+
usage: import_v42.z.looseObject({
|
|
367
|
+
output_tokens: import_v42.z.number(),
|
|
368
|
+
cache_creation_input_tokens: import_v42.z.number().nullish()
|
|
379
369
|
})
|
|
380
370
|
}),
|
|
381
|
-
|
|
382
|
-
type:
|
|
371
|
+
import_v42.z.object({
|
|
372
|
+
type: import_v42.z.literal("message_stop")
|
|
383
373
|
}),
|
|
384
|
-
|
|
385
|
-
type:
|
|
374
|
+
import_v42.z.object({
|
|
375
|
+
type: import_v42.z.literal("ping")
|
|
386
376
|
})
|
|
387
377
|
])
|
|
388
378
|
)
|
|
389
379
|
);
|
|
390
380
|
var anthropicReasoningMetadataSchema = (0, import_provider_utils2.lazySchema)(
|
|
391
381
|
() => (0, import_provider_utils2.zodSchema)(
|
|
392
|
-
|
|
393
|
-
signature:
|
|
394
|
-
redactedData:
|
|
382
|
+
import_v42.z.object({
|
|
383
|
+
signature: import_v42.z.string().optional(),
|
|
384
|
+
redactedData: import_v42.z.string().optional()
|
|
395
385
|
})
|
|
396
386
|
)
|
|
397
387
|
);
|
|
398
388
|
|
|
399
389
|
// src/anthropic-messages-options.ts
|
|
400
|
-
var
|
|
401
|
-
var anthropicFilePartProviderOptions =
|
|
390
|
+
var import_v43 = require("zod/v4");
|
|
391
|
+
var anthropicFilePartProviderOptions = import_v43.z.object({
|
|
402
392
|
/**
|
|
403
393
|
* Citation configuration for this document.
|
|
404
394
|
* When enabled, this document will generate citations in the response.
|
|
405
395
|
*/
|
|
406
|
-
citations:
|
|
396
|
+
citations: import_v43.z.object({
|
|
407
397
|
/**
|
|
408
398
|
* Enable citations for this document
|
|
409
399
|
*/
|
|
410
|
-
enabled:
|
|
400
|
+
enabled: import_v43.z.boolean()
|
|
411
401
|
}).optional(),
|
|
412
402
|
/**
|
|
413
403
|
* Custom title for the document.
|
|
414
404
|
* If not provided, the filename will be used.
|
|
415
405
|
*/
|
|
416
|
-
title:
|
|
406
|
+
title: import_v43.z.string().optional(),
|
|
417
407
|
/**
|
|
418
408
|
* Context about the document that will be passed to the model
|
|
419
409
|
* but not used towards cited content.
|
|
420
410
|
* Useful for storing document metadata as text or stringified JSON.
|
|
421
411
|
*/
|
|
422
|
-
context:
|
|
412
|
+
context: import_v43.z.string().optional()
|
|
423
413
|
});
|
|
424
|
-
var anthropicProviderOptions =
|
|
425
|
-
sendReasoning:
|
|
426
|
-
thinking:
|
|
427
|
-
type:
|
|
428
|
-
budgetTokens:
|
|
414
|
+
var anthropicProviderOptions = import_v43.z.object({
|
|
415
|
+
sendReasoning: import_v43.z.boolean().optional(),
|
|
416
|
+
thinking: import_v43.z.object({
|
|
417
|
+
type: import_v43.z.union([import_v43.z.literal("enabled"), import_v43.z.literal("disabled")]),
|
|
418
|
+
budgetTokens: import_v43.z.number().optional()
|
|
429
419
|
}).optional(),
|
|
430
420
|
/**
|
|
431
421
|
* Whether to disable parallel function calling during tool use. Default is false.
|
|
432
422
|
* When set to true, Claude will use at most one tool per response.
|
|
433
423
|
*/
|
|
434
|
-
disableParallelToolUse:
|
|
424
|
+
disableParallelToolUse: import_v43.z.boolean().optional(),
|
|
435
425
|
/**
|
|
436
426
|
* Cache control settings for this message.
|
|
437
427
|
* See https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching
|
|
438
428
|
*/
|
|
439
|
-
cacheControl:
|
|
440
|
-
type:
|
|
441
|
-
ttl:
|
|
429
|
+
cacheControl: import_v43.z.object({
|
|
430
|
+
type: import_v43.z.literal("ephemeral"),
|
|
431
|
+
ttl: import_v43.z.union([import_v43.z.literal("5m"), import_v43.z.literal("1h")]).optional()
|
|
442
432
|
}).optional()
|
|
443
433
|
});
|
|
444
434
|
|
|
@@ -455,25 +445,25 @@ function getCacheControl(providerMetadata) {
|
|
|
455
445
|
|
|
456
446
|
// src/tool/text-editor_20250728.ts
|
|
457
447
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
458
|
-
var
|
|
448
|
+
var import_v44 = require("zod/v4");
|
|
459
449
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
460
450
|
var textEditor_20250728ArgsSchema = (0, import_provider_utils4.lazySchema)(
|
|
461
451
|
() => (0, import_provider_utils4.zodSchema)(
|
|
462
|
-
|
|
463
|
-
maxCharacters:
|
|
452
|
+
import_v44.z.object({
|
|
453
|
+
maxCharacters: import_v44.z.number().optional()
|
|
464
454
|
})
|
|
465
455
|
)
|
|
466
456
|
);
|
|
467
457
|
var textEditor_20250728InputSchema = (0, import_provider_utils4.lazySchema)(
|
|
468
458
|
() => (0, import_provider_utils4.zodSchema)(
|
|
469
|
-
|
|
470
|
-
command:
|
|
471
|
-
path:
|
|
472
|
-
file_text:
|
|
473
|
-
insert_line:
|
|
474
|
-
new_str:
|
|
475
|
-
old_str:
|
|
476
|
-
view_range:
|
|
459
|
+
import_v44.z.object({
|
|
460
|
+
command: import_v44.z.enum(["view", "create", "str_replace", "insert"]),
|
|
461
|
+
path: import_v44.z.string(),
|
|
462
|
+
file_text: import_v44.z.string().optional(),
|
|
463
|
+
insert_line: import_v44.z.number().int().optional(),
|
|
464
|
+
new_str: import_v44.z.string().optional(),
|
|
465
|
+
old_str: import_v44.z.string().optional(),
|
|
466
|
+
view_range: import_v44.z.array(import_v44.z.number().int()).optional()
|
|
477
467
|
})
|
|
478
468
|
)
|
|
479
469
|
);
|
|
@@ -488,40 +478,40 @@ var textEditor_20250728 = (args = {}) => {
|
|
|
488
478
|
|
|
489
479
|
// src/tool/web-search_20250305.ts
|
|
490
480
|
var import_provider_utils5 = require("@ai-sdk/provider-utils");
|
|
491
|
-
var
|
|
481
|
+
var import_v45 = require("zod/v4");
|
|
492
482
|
var webSearch_20250305ArgsSchema = (0, import_provider_utils5.lazySchema)(
|
|
493
483
|
() => (0, import_provider_utils5.zodSchema)(
|
|
494
|
-
|
|
495
|
-
maxUses:
|
|
496
|
-
allowedDomains:
|
|
497
|
-
blockedDomains:
|
|
498
|
-
userLocation:
|
|
499
|
-
type:
|
|
500
|
-
city:
|
|
501
|
-
region:
|
|
502
|
-
country:
|
|
503
|
-
timezone:
|
|
484
|
+
import_v45.z.object({
|
|
485
|
+
maxUses: import_v45.z.number().optional(),
|
|
486
|
+
allowedDomains: import_v45.z.array(import_v45.z.string()).optional(),
|
|
487
|
+
blockedDomains: import_v45.z.array(import_v45.z.string()).optional(),
|
|
488
|
+
userLocation: import_v45.z.object({
|
|
489
|
+
type: import_v45.z.literal("approximate"),
|
|
490
|
+
city: import_v45.z.string().optional(),
|
|
491
|
+
region: import_v45.z.string().optional(),
|
|
492
|
+
country: import_v45.z.string().optional(),
|
|
493
|
+
timezone: import_v45.z.string().optional()
|
|
504
494
|
}).optional()
|
|
505
495
|
})
|
|
506
496
|
)
|
|
507
497
|
);
|
|
508
498
|
var webSearch_20250305OutputSchema = (0, import_provider_utils5.lazySchema)(
|
|
509
499
|
() => (0, import_provider_utils5.zodSchema)(
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
url:
|
|
513
|
-
title:
|
|
514
|
-
pageAge:
|
|
515
|
-
encryptedContent:
|
|
516
|
-
type:
|
|
500
|
+
import_v45.z.array(
|
|
501
|
+
import_v45.z.object({
|
|
502
|
+
url: import_v45.z.string(),
|
|
503
|
+
title: import_v45.z.string(),
|
|
504
|
+
pageAge: import_v45.z.string().nullable(),
|
|
505
|
+
encryptedContent: import_v45.z.string(),
|
|
506
|
+
type: import_v45.z.literal("web_search_result")
|
|
517
507
|
})
|
|
518
508
|
)
|
|
519
509
|
)
|
|
520
510
|
);
|
|
521
511
|
var webSearch_20250305InputSchema = (0, import_provider_utils5.lazySchema)(
|
|
522
512
|
() => (0, import_provider_utils5.zodSchema)(
|
|
523
|
-
|
|
524
|
-
query:
|
|
513
|
+
import_v45.z.object({
|
|
514
|
+
query: import_v45.z.string()
|
|
525
515
|
})
|
|
526
516
|
)
|
|
527
517
|
);
|
|
@@ -537,48 +527,48 @@ var webSearch_20250305 = (args = {}) => {
|
|
|
537
527
|
|
|
538
528
|
// src/tool/web-fetch-20250910.ts
|
|
539
529
|
var import_provider_utils6 = require("@ai-sdk/provider-utils");
|
|
540
|
-
var
|
|
530
|
+
var import_v46 = require("zod/v4");
|
|
541
531
|
var webFetch_20250910ArgsSchema = (0, import_provider_utils6.lazySchema)(
|
|
542
532
|
() => (0, import_provider_utils6.zodSchema)(
|
|
543
|
-
|
|
544
|
-
maxUses:
|
|
545
|
-
allowedDomains:
|
|
546
|
-
blockedDomains:
|
|
547
|
-
citations:
|
|
548
|
-
maxContentTokens:
|
|
533
|
+
import_v46.z.object({
|
|
534
|
+
maxUses: import_v46.z.number().optional(),
|
|
535
|
+
allowedDomains: import_v46.z.array(import_v46.z.string()).optional(),
|
|
536
|
+
blockedDomains: import_v46.z.array(import_v46.z.string()).optional(),
|
|
537
|
+
citations: import_v46.z.object({ enabled: import_v46.z.boolean() }).optional(),
|
|
538
|
+
maxContentTokens: import_v46.z.number().optional()
|
|
549
539
|
})
|
|
550
540
|
)
|
|
551
541
|
);
|
|
552
542
|
var webFetch_20250910OutputSchema = (0, import_provider_utils6.lazySchema)(
|
|
553
543
|
() => (0, import_provider_utils6.zodSchema)(
|
|
554
|
-
|
|
555
|
-
type:
|
|
556
|
-
url:
|
|
557
|
-
content:
|
|
558
|
-
type:
|
|
559
|
-
title:
|
|
560
|
-
citations:
|
|
561
|
-
source:
|
|
562
|
-
|
|
563
|
-
type:
|
|
564
|
-
mediaType:
|
|
565
|
-
data:
|
|
544
|
+
import_v46.z.object({
|
|
545
|
+
type: import_v46.z.literal("web_fetch_result"),
|
|
546
|
+
url: import_v46.z.string(),
|
|
547
|
+
content: import_v46.z.object({
|
|
548
|
+
type: import_v46.z.literal("document"),
|
|
549
|
+
title: import_v46.z.string(),
|
|
550
|
+
citations: import_v46.z.object({ enabled: import_v46.z.boolean() }).optional(),
|
|
551
|
+
source: import_v46.z.union([
|
|
552
|
+
import_v46.z.object({
|
|
553
|
+
type: import_v46.z.literal("base64"),
|
|
554
|
+
mediaType: import_v46.z.literal("application/pdf"),
|
|
555
|
+
data: import_v46.z.string()
|
|
566
556
|
}),
|
|
567
|
-
|
|
568
|
-
type:
|
|
569
|
-
mediaType:
|
|
570
|
-
data:
|
|
557
|
+
import_v46.z.object({
|
|
558
|
+
type: import_v46.z.literal("text"),
|
|
559
|
+
mediaType: import_v46.z.literal("text/plain"),
|
|
560
|
+
data: import_v46.z.string()
|
|
571
561
|
})
|
|
572
562
|
])
|
|
573
563
|
}),
|
|
574
|
-
retrievedAt:
|
|
564
|
+
retrievedAt: import_v46.z.string().nullable()
|
|
575
565
|
})
|
|
576
566
|
)
|
|
577
567
|
);
|
|
578
568
|
var webFetch_20250910InputSchema = (0, import_provider_utils6.lazySchema)(
|
|
579
569
|
() => (0, import_provider_utils6.zodSchema)(
|
|
580
|
-
|
|
581
|
-
url:
|
|
570
|
+
import_v46.z.object({
|
|
571
|
+
url: import_v46.z.string()
|
|
582
572
|
})
|
|
583
573
|
)
|
|
584
574
|
);
|
|
@@ -805,21 +795,21 @@ var import_provider_utils9 = require("@ai-sdk/provider-utils");
|
|
|
805
795
|
|
|
806
796
|
// src/tool/code-execution_20250522.ts
|
|
807
797
|
var import_provider_utils8 = require("@ai-sdk/provider-utils");
|
|
808
|
-
var
|
|
798
|
+
var import_v47 = require("zod/v4");
|
|
809
799
|
var codeExecution_20250522OutputSchema = (0, import_provider_utils8.lazySchema)(
|
|
810
800
|
() => (0, import_provider_utils8.zodSchema)(
|
|
811
|
-
|
|
812
|
-
type:
|
|
813
|
-
stdout:
|
|
814
|
-
stderr:
|
|
815
|
-
return_code:
|
|
801
|
+
import_v47.z.object({
|
|
802
|
+
type: import_v47.z.literal("code_execution_result"),
|
|
803
|
+
stdout: import_v47.z.string(),
|
|
804
|
+
stderr: import_v47.z.string(),
|
|
805
|
+
return_code: import_v47.z.number()
|
|
816
806
|
})
|
|
817
807
|
)
|
|
818
808
|
);
|
|
819
809
|
var codeExecution_20250522InputSchema = (0, import_provider_utils8.lazySchema)(
|
|
820
810
|
() => (0, import_provider_utils8.zodSchema)(
|
|
821
|
-
|
|
822
|
-
code:
|
|
811
|
+
import_v47.z.object({
|
|
812
|
+
code: import_v47.z.string()
|
|
823
813
|
})
|
|
824
814
|
)
|
|
825
815
|
);
|
|
@@ -2214,12 +2204,12 @@ var AnthropicMessagesLanguageModel = class {
|
|
|
2214
2204
|
|
|
2215
2205
|
// src/tool/bash_20241022.ts
|
|
2216
2206
|
var import_provider_utils11 = require("@ai-sdk/provider-utils");
|
|
2217
|
-
var
|
|
2207
|
+
var import_v48 = require("zod/v4");
|
|
2218
2208
|
var bash_20241022InputSchema = (0, import_provider_utils11.lazySchema)(
|
|
2219
2209
|
() => (0, import_provider_utils11.zodSchema)(
|
|
2220
|
-
|
|
2221
|
-
command:
|
|
2222
|
-
restart:
|
|
2210
|
+
import_v48.z.object({
|
|
2211
|
+
command: import_v48.z.string(),
|
|
2212
|
+
restart: import_v48.z.boolean().optional()
|
|
2223
2213
|
})
|
|
2224
2214
|
)
|
|
2225
2215
|
);
|
|
@@ -2231,12 +2221,12 @@ var bash_20241022 = (0, import_provider_utils11.createProviderDefinedToolFactory
|
|
|
2231
2221
|
|
|
2232
2222
|
// src/tool/bash_20250124.ts
|
|
2233
2223
|
var import_provider_utils12 = require("@ai-sdk/provider-utils");
|
|
2234
|
-
var
|
|
2224
|
+
var import_v49 = require("zod/v4");
|
|
2235
2225
|
var bash_20250124InputSchema = (0, import_provider_utils12.lazySchema)(
|
|
2236
2226
|
() => (0, import_provider_utils12.zodSchema)(
|
|
2237
|
-
|
|
2238
|
-
command:
|
|
2239
|
-
restart:
|
|
2227
|
+
import_v49.z.object({
|
|
2228
|
+
command: import_v49.z.string(),
|
|
2229
|
+
restart: import_v49.z.boolean().optional()
|
|
2240
2230
|
})
|
|
2241
2231
|
)
|
|
2242
2232
|
);
|
|
@@ -2248,11 +2238,11 @@ var bash_20250124 = (0, import_provider_utils12.createProviderDefinedToolFactory
|
|
|
2248
2238
|
|
|
2249
2239
|
// src/tool/computer_20241022.ts
|
|
2250
2240
|
var import_provider_utils13 = require("@ai-sdk/provider-utils");
|
|
2251
|
-
var
|
|
2241
|
+
var import_v410 = require("zod/v4");
|
|
2252
2242
|
var computer_20241022InputSchema = (0, import_provider_utils13.lazySchema)(
|
|
2253
2243
|
() => (0, import_provider_utils13.zodSchema)(
|
|
2254
|
-
|
|
2255
|
-
action:
|
|
2244
|
+
import_v410.z.object({
|
|
2245
|
+
action: import_v410.z.enum([
|
|
2256
2246
|
"key",
|
|
2257
2247
|
"type",
|
|
2258
2248
|
"mouse_move",
|
|
@@ -2264,8 +2254,8 @@ var computer_20241022InputSchema = (0, import_provider_utils13.lazySchema)(
|
|
|
2264
2254
|
"screenshot",
|
|
2265
2255
|
"cursor_position"
|
|
2266
2256
|
]),
|
|
2267
|
-
coordinate:
|
|
2268
|
-
text:
|
|
2257
|
+
coordinate: import_v410.z.array(import_v410.z.number().int()).optional(),
|
|
2258
|
+
text: import_v410.z.string().optional()
|
|
2269
2259
|
})
|
|
2270
2260
|
)
|
|
2271
2261
|
);
|
|
@@ -2277,11 +2267,11 @@ var computer_20241022 = (0, import_provider_utils13.createProviderDefinedToolFac
|
|
|
2277
2267
|
|
|
2278
2268
|
// src/tool/computer_20250124.ts
|
|
2279
2269
|
var import_provider_utils14 = require("@ai-sdk/provider-utils");
|
|
2280
|
-
var
|
|
2270
|
+
var import_v411 = require("zod/v4");
|
|
2281
2271
|
var computer_20250124InputSchema = (0, import_provider_utils14.lazySchema)(
|
|
2282
2272
|
() => (0, import_provider_utils14.zodSchema)(
|
|
2283
|
-
|
|
2284
|
-
action:
|
|
2273
|
+
import_v411.z.object({
|
|
2274
|
+
action: import_v411.z.enum([
|
|
2285
2275
|
"key",
|
|
2286
2276
|
"hold_key",
|
|
2287
2277
|
"type",
|
|
@@ -2299,12 +2289,12 @@ var computer_20250124InputSchema = (0, import_provider_utils14.lazySchema)(
|
|
|
2299
2289
|
"wait",
|
|
2300
2290
|
"screenshot"
|
|
2301
2291
|
]),
|
|
2302
|
-
coordinate:
|
|
2303
|
-
duration:
|
|
2304
|
-
scroll_amount:
|
|
2305
|
-
scroll_direction:
|
|
2306
|
-
start_coordinate:
|
|
2307
|
-
text:
|
|
2292
|
+
coordinate: import_v411.z.tuple([import_v411.z.number().int(), import_v411.z.number().int()]).optional(),
|
|
2293
|
+
duration: import_v411.z.number().optional(),
|
|
2294
|
+
scroll_amount: import_v411.z.number().optional(),
|
|
2295
|
+
scroll_direction: import_v411.z.enum(["up", "down", "left", "right"]).optional(),
|
|
2296
|
+
start_coordinate: import_v411.z.tuple([import_v411.z.number().int(), import_v411.z.number().int()]).optional(),
|
|
2297
|
+
text: import_v411.z.string().optional()
|
|
2308
2298
|
})
|
|
2309
2299
|
)
|
|
2310
2300
|
);
|
|
@@ -2316,17 +2306,17 @@ var computer_20250124 = (0, import_provider_utils14.createProviderDefinedToolFac
|
|
|
2316
2306
|
|
|
2317
2307
|
// src/tool/text-editor_20241022.ts
|
|
2318
2308
|
var import_provider_utils15 = require("@ai-sdk/provider-utils");
|
|
2319
|
-
var
|
|
2309
|
+
var import_v412 = require("zod/v4");
|
|
2320
2310
|
var textEditor_20241022InputSchema = (0, import_provider_utils15.lazySchema)(
|
|
2321
2311
|
() => (0, import_provider_utils15.zodSchema)(
|
|
2322
|
-
|
|
2323
|
-
command:
|
|
2324
|
-
path:
|
|
2325
|
-
file_text:
|
|
2326
|
-
insert_line:
|
|
2327
|
-
new_str:
|
|
2328
|
-
old_str:
|
|
2329
|
-
view_range:
|
|
2312
|
+
import_v412.z.object({
|
|
2313
|
+
command: import_v412.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
2314
|
+
path: import_v412.z.string(),
|
|
2315
|
+
file_text: import_v412.z.string().optional(),
|
|
2316
|
+
insert_line: import_v412.z.number().int().optional(),
|
|
2317
|
+
new_str: import_v412.z.string().optional(),
|
|
2318
|
+
old_str: import_v412.z.string().optional(),
|
|
2319
|
+
view_range: import_v412.z.array(import_v412.z.number().int()).optional()
|
|
2330
2320
|
})
|
|
2331
2321
|
)
|
|
2332
2322
|
);
|
|
@@ -2338,17 +2328,17 @@ var textEditor_20241022 = (0, import_provider_utils15.createProviderDefinedToolF
|
|
|
2338
2328
|
|
|
2339
2329
|
// src/tool/text-editor_20250124.ts
|
|
2340
2330
|
var import_provider_utils16 = require("@ai-sdk/provider-utils");
|
|
2341
|
-
var
|
|
2331
|
+
var import_v413 = require("zod/v4");
|
|
2342
2332
|
var textEditor_20250124InputSchema = (0, import_provider_utils16.lazySchema)(
|
|
2343
2333
|
() => (0, import_provider_utils16.zodSchema)(
|
|
2344
|
-
|
|
2345
|
-
command:
|
|
2346
|
-
path:
|
|
2347
|
-
file_text:
|
|
2348
|
-
insert_line:
|
|
2349
|
-
new_str:
|
|
2350
|
-
old_str:
|
|
2351
|
-
view_range:
|
|
2334
|
+
import_v413.z.object({
|
|
2335
|
+
command: import_v413.z.enum(["view", "create", "str_replace", "insert", "undo_edit"]),
|
|
2336
|
+
path: import_v413.z.string(),
|
|
2337
|
+
file_text: import_v413.z.string().optional(),
|
|
2338
|
+
insert_line: import_v413.z.number().int().optional(),
|
|
2339
|
+
new_str: import_v413.z.string().optional(),
|
|
2340
|
+
old_str: import_v413.z.string().optional(),
|
|
2341
|
+
view_range: import_v413.z.array(import_v413.z.number().int()).optional()
|
|
2352
2342
|
})
|
|
2353
2343
|
)
|
|
2354
2344
|
);
|
|
@@ -2360,17 +2350,17 @@ var textEditor_20250124 = (0, import_provider_utils16.createProviderDefinedToolF
|
|
|
2360
2350
|
|
|
2361
2351
|
// src/tool/text-editor_20250429.ts
|
|
2362
2352
|
var import_provider_utils17 = require("@ai-sdk/provider-utils");
|
|
2363
|
-
var
|
|
2353
|
+
var import_v414 = require("zod/v4");
|
|
2364
2354
|
var textEditor_20250429InputSchema = (0, import_provider_utils17.lazySchema)(
|
|
2365
2355
|
() => (0, import_provider_utils17.zodSchema)(
|
|
2366
|
-
|
|
2367
|
-
command:
|
|
2368
|
-
path:
|
|
2369
|
-
file_text:
|
|
2370
|
-
insert_line:
|
|
2371
|
-
new_str:
|
|
2372
|
-
old_str:
|
|
2373
|
-
view_range:
|
|
2356
|
+
import_v414.z.object({
|
|
2357
|
+
command: import_v414.z.enum(["view", "create", "str_replace", "insert"]),
|
|
2358
|
+
path: import_v414.z.string(),
|
|
2359
|
+
file_text: import_v414.z.string().optional(),
|
|
2360
|
+
insert_line: import_v414.z.number().int().optional(),
|
|
2361
|
+
new_str: import_v414.z.string().optional(),
|
|
2362
|
+
old_str: import_v414.z.string().optional(),
|
|
2363
|
+
view_range: import_v414.z.array(import_v414.z.number().int()).optional()
|
|
2374
2364
|
})
|
|
2375
2365
|
)
|
|
2376
2366
|
);
|