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