codebuff 1.0.156 → 1.0.160
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/dist/browser-runner.js +53 -28
- package/dist/browser-runner.js.map +1 -1
- package/dist/chat-storage.js +0 -1
- package/dist/chat-storage.js.map +1 -1
- package/dist/cli.d.ts +0 -13
- package/dist/cli.js +11 -63
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +7 -3
- package/dist/client.js.map +1 -1
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +100 -100
- package/dist/common/browser-actions.d.ts +219 -159
- package/dist/common/browser-actions.js +11 -4
- package/dist/common/browser-actions.js.map +1 -1
- package/dist/common/constants.d.ts +2 -2
- package/dist/common/constants.js +2 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/util/__tests__/messages.test.d.ts +1 -0
- package/dist/common/util/__tests__/messages.test.js +70 -0
- package/dist/common/util/__tests__/messages.test.js.map +1 -0
- package/dist/common/util/credentials.d.ts +4 -4
- package/dist/common/util/messages.d.ts +6 -0
- package/dist/common/util/messages.js +22 -0
- package/dist/common/util/messages.js.map +1 -0
- package/dist/common/util/string.d.ts +11 -0
- package/dist/common/util/string.js +18 -1
- package/dist/common/util/string.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +184 -184
- package/dist/project-files.js +2 -3
- package/dist/project-files.js.map +1 -1
- package/dist/tool-handlers.js +5 -0
- package/dist/tool-handlers.js.map +1 -1
- package/dist/utils/spinner.d.ts +10 -0
- package/dist/utils/spinner.js +76 -0
- package/dist/utils/spinner.js.map +1 -0
- package/package.json +1 -1
package/dist/common/actions.d.ts
CHANGED
|
@@ -35,16 +35,16 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
35
35
|
}>>;
|
|
36
36
|
}, "strip", z.ZodTypeAny, {
|
|
37
37
|
type: "tool_use";
|
|
38
|
-
id: string;
|
|
39
38
|
name: string;
|
|
39
|
+
id: string;
|
|
40
40
|
input: Record<string, any>;
|
|
41
41
|
cache_control?: {
|
|
42
42
|
type: "ephemeral";
|
|
43
43
|
} | undefined;
|
|
44
44
|
}, {
|
|
45
45
|
type: "tool_use";
|
|
46
|
-
id: string;
|
|
47
46
|
name: string;
|
|
47
|
+
id: string;
|
|
48
48
|
input: Record<string, any>;
|
|
49
49
|
cache_control?: {
|
|
50
50
|
type: "ephemeral";
|
|
@@ -61,15 +61,15 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
61
61
|
type: "ephemeral";
|
|
62
62
|
}>>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
type: "tool_result";
|
|
65
64
|
content: string;
|
|
65
|
+
type: "tool_result";
|
|
66
66
|
tool_use_id: string;
|
|
67
67
|
cache_control?: {
|
|
68
68
|
type: "ephemeral";
|
|
69
69
|
} | undefined;
|
|
70
70
|
}, {
|
|
71
|
-
type: "tool_result";
|
|
72
71
|
content: string;
|
|
72
|
+
type: "tool_result";
|
|
73
73
|
tool_use_id: string;
|
|
74
74
|
cache_control?: {
|
|
75
75
|
type: "ephemeral";
|
|
@@ -82,12 +82,12 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
82
82
|
data: z.ZodString;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
type: "base64";
|
|
85
|
-
data: string;
|
|
86
85
|
media_type: "image/jpeg";
|
|
86
|
+
data: string;
|
|
87
87
|
}, {
|
|
88
88
|
type: "base64";
|
|
89
|
-
data: string;
|
|
90
89
|
media_type: "image/jpeg";
|
|
90
|
+
data: string;
|
|
91
91
|
}>;
|
|
92
92
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
93
93
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -100,8 +100,8 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
100
100
|
type: "image";
|
|
101
101
|
source: {
|
|
102
102
|
type: "base64";
|
|
103
|
-
data: string;
|
|
104
103
|
media_type: "image/jpeg";
|
|
104
|
+
data: string;
|
|
105
105
|
};
|
|
106
106
|
cache_control?: {
|
|
107
107
|
type: "ephemeral";
|
|
@@ -110,8 +110,8 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
110
110
|
type: "image";
|
|
111
111
|
source: {
|
|
112
112
|
type: "base64";
|
|
113
|
-
data: string;
|
|
114
113
|
media_type: "image/jpeg";
|
|
114
|
+
data: string;
|
|
115
115
|
};
|
|
116
116
|
cache_control?: {
|
|
117
117
|
type: "ephemeral";
|
|
@@ -155,16 +155,16 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
155
155
|
}>>;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
type: "tool_use";
|
|
158
|
-
id: string;
|
|
159
158
|
name: string;
|
|
159
|
+
id: string;
|
|
160
160
|
input: Record<string, any>;
|
|
161
161
|
cache_control?: {
|
|
162
162
|
type: "ephemeral";
|
|
163
163
|
} | undefined;
|
|
164
164
|
}, {
|
|
165
165
|
type: "tool_use";
|
|
166
|
-
id: string;
|
|
167
166
|
name: string;
|
|
167
|
+
id: string;
|
|
168
168
|
input: Record<string, any>;
|
|
169
169
|
cache_control?: {
|
|
170
170
|
type: "ephemeral";
|
|
@@ -181,15 +181,15 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
181
181
|
type: "ephemeral";
|
|
182
182
|
}>>;
|
|
183
183
|
}, "strip", z.ZodTypeAny, {
|
|
184
|
-
type: "tool_result";
|
|
185
184
|
content: string;
|
|
185
|
+
type: "tool_result";
|
|
186
186
|
tool_use_id: string;
|
|
187
187
|
cache_control?: {
|
|
188
188
|
type: "ephemeral";
|
|
189
189
|
} | undefined;
|
|
190
190
|
}, {
|
|
191
|
-
type: "tool_result";
|
|
192
191
|
content: string;
|
|
192
|
+
type: "tool_result";
|
|
193
193
|
tool_use_id: string;
|
|
194
194
|
cache_control?: {
|
|
195
195
|
type: "ephemeral";
|
|
@@ -202,12 +202,12 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
202
202
|
data: z.ZodString;
|
|
203
203
|
}, "strip", z.ZodTypeAny, {
|
|
204
204
|
type: "base64";
|
|
205
|
-
data: string;
|
|
206
205
|
media_type: "image/jpeg";
|
|
206
|
+
data: string;
|
|
207
207
|
}, {
|
|
208
208
|
type: "base64";
|
|
209
|
-
data: string;
|
|
210
209
|
media_type: "image/jpeg";
|
|
210
|
+
data: string;
|
|
211
211
|
}>;
|
|
212
212
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
213
213
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -220,8 +220,8 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
220
220
|
type: "image";
|
|
221
221
|
source: {
|
|
222
222
|
type: "base64";
|
|
223
|
-
data: string;
|
|
224
223
|
media_type: "image/jpeg";
|
|
224
|
+
data: string;
|
|
225
225
|
};
|
|
226
226
|
cache_control?: {
|
|
227
227
|
type: "ephemeral";
|
|
@@ -230,15 +230,14 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
230
230
|
type: "image";
|
|
231
231
|
source: {
|
|
232
232
|
type: "base64";
|
|
233
|
-
data: string;
|
|
234
233
|
media_type: "image/jpeg";
|
|
234
|
+
data: string;
|
|
235
235
|
};
|
|
236
236
|
cache_control?: {
|
|
237
237
|
type: "ephemeral";
|
|
238
238
|
} | undefined;
|
|
239
239
|
}>]>, "many">]>;
|
|
240
240
|
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
role: "user" | "assistant";
|
|
242
241
|
content: string | ({
|
|
243
242
|
type: "text";
|
|
244
243
|
text: string;
|
|
@@ -247,15 +246,15 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
247
246
|
} | undefined;
|
|
248
247
|
} | {
|
|
249
248
|
type: "tool_use";
|
|
250
|
-
id: string;
|
|
251
249
|
name: string;
|
|
250
|
+
id: string;
|
|
252
251
|
input: Record<string, any>;
|
|
253
252
|
cache_control?: {
|
|
254
253
|
type: "ephemeral";
|
|
255
254
|
} | undefined;
|
|
256
255
|
} | {
|
|
257
|
-
type: "tool_result";
|
|
258
256
|
content: string;
|
|
257
|
+
type: "tool_result";
|
|
259
258
|
tool_use_id: string;
|
|
260
259
|
cache_control?: {
|
|
261
260
|
type: "ephemeral";
|
|
@@ -264,15 +263,15 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
264
263
|
type: "image";
|
|
265
264
|
source: {
|
|
266
265
|
type: "base64";
|
|
267
|
-
data: string;
|
|
268
266
|
media_type: "image/jpeg";
|
|
267
|
+
data: string;
|
|
269
268
|
};
|
|
270
269
|
cache_control?: {
|
|
271
270
|
type: "ephemeral";
|
|
272
271
|
} | undefined;
|
|
273
272
|
})[];
|
|
274
|
-
}, {
|
|
275
273
|
role: "user" | "assistant";
|
|
274
|
+
}, {
|
|
276
275
|
content: string | ({
|
|
277
276
|
type: "text";
|
|
278
277
|
text: string;
|
|
@@ -281,15 +280,15 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
281
280
|
} | undefined;
|
|
282
281
|
} | {
|
|
283
282
|
type: "tool_use";
|
|
284
|
-
id: string;
|
|
285
283
|
name: string;
|
|
284
|
+
id: string;
|
|
286
285
|
input: Record<string, any>;
|
|
287
286
|
cache_control?: {
|
|
288
287
|
type: "ephemeral";
|
|
289
288
|
} | undefined;
|
|
290
289
|
} | {
|
|
291
|
-
type: "tool_result";
|
|
292
290
|
content: string;
|
|
291
|
+
type: "tool_result";
|
|
293
292
|
tool_use_id: string;
|
|
294
293
|
cache_control?: {
|
|
295
294
|
type: "ephemeral";
|
|
@@ -298,13 +297,14 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
298
297
|
type: "image";
|
|
299
298
|
source: {
|
|
300
299
|
type: "base64";
|
|
301
|
-
data: string;
|
|
302
300
|
media_type: "image/jpeg";
|
|
301
|
+
data: string;
|
|
303
302
|
};
|
|
304
303
|
cache_control?: {
|
|
305
304
|
type: "ephemeral";
|
|
306
305
|
} | undefined;
|
|
307
306
|
})[];
|
|
307
|
+
role: "user" | "assistant";
|
|
308
308
|
}>;
|
|
309
309
|
export type Message = z.infer<typeof MessageSchema>;
|
|
310
310
|
export type MessageContentObject = z.infer<typeof MessageContentObjectSchema>;
|
|
@@ -313,12 +313,12 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
313
313
|
filePath: z.ZodString;
|
|
314
314
|
content: z.ZodString;
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
|
-
type: "file" | "patch";
|
|
317
316
|
content: string;
|
|
317
|
+
type: "file" | "patch";
|
|
318
318
|
filePath: string;
|
|
319
319
|
}, {
|
|
320
|
-
type: "file" | "patch";
|
|
321
320
|
content: string;
|
|
321
|
+
type: "file" | "patch";
|
|
322
322
|
filePath: string;
|
|
323
323
|
}>;
|
|
324
324
|
export type FileChange = z.infer<typeof FileChangeSchema>;
|
|
@@ -327,12 +327,12 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
327
327
|
filePath: z.ZodString;
|
|
328
328
|
content: z.ZodString;
|
|
329
329
|
}, "strip", z.ZodTypeAny, {
|
|
330
|
-
type: "file" | "patch";
|
|
331
330
|
content: string;
|
|
331
|
+
type: "file" | "patch";
|
|
332
332
|
filePath: string;
|
|
333
333
|
}, {
|
|
334
|
-
type: "file" | "patch";
|
|
335
334
|
content: string;
|
|
335
|
+
type: "file" | "patch";
|
|
336
336
|
filePath: string;
|
|
337
337
|
}>, "many">;
|
|
338
338
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
@@ -341,12 +341,12 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
341
341
|
id: z.ZodString;
|
|
342
342
|
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
343
343
|
}, "strip", z.ZodTypeAny, {
|
|
344
|
-
id: string;
|
|
345
344
|
name: string;
|
|
345
|
+
id: string;
|
|
346
346
|
input: Record<string, any>;
|
|
347
347
|
}, {
|
|
348
|
-
id: string;
|
|
349
348
|
name: string;
|
|
349
|
+
id: string;
|
|
350
350
|
input: Record<string, any>;
|
|
351
351
|
}>;
|
|
352
352
|
export type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
@@ -393,16 +393,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
393
393
|
}>>;
|
|
394
394
|
}, "strip", z.ZodTypeAny, {
|
|
395
395
|
type: "tool_use";
|
|
396
|
-
id: string;
|
|
397
396
|
name: string;
|
|
397
|
+
id: string;
|
|
398
398
|
input: Record<string, any>;
|
|
399
399
|
cache_control?: {
|
|
400
400
|
type: "ephemeral";
|
|
401
401
|
} | undefined;
|
|
402
402
|
}, {
|
|
403
403
|
type: "tool_use";
|
|
404
|
-
id: string;
|
|
405
404
|
name: string;
|
|
405
|
+
id: string;
|
|
406
406
|
input: Record<string, any>;
|
|
407
407
|
cache_control?: {
|
|
408
408
|
type: "ephemeral";
|
|
@@ -419,15 +419,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
419
419
|
type: "ephemeral";
|
|
420
420
|
}>>;
|
|
421
421
|
}, "strip", z.ZodTypeAny, {
|
|
422
|
-
type: "tool_result";
|
|
423
422
|
content: string;
|
|
423
|
+
type: "tool_result";
|
|
424
424
|
tool_use_id: string;
|
|
425
425
|
cache_control?: {
|
|
426
426
|
type: "ephemeral";
|
|
427
427
|
} | undefined;
|
|
428
428
|
}, {
|
|
429
|
-
type: "tool_result";
|
|
430
429
|
content: string;
|
|
430
|
+
type: "tool_result";
|
|
431
431
|
tool_use_id: string;
|
|
432
432
|
cache_control?: {
|
|
433
433
|
type: "ephemeral";
|
|
@@ -440,12 +440,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
440
440
|
data: z.ZodString;
|
|
441
441
|
}, "strip", z.ZodTypeAny, {
|
|
442
442
|
type: "base64";
|
|
443
|
-
data: string;
|
|
444
443
|
media_type: "image/jpeg";
|
|
444
|
+
data: string;
|
|
445
445
|
}, {
|
|
446
446
|
type: "base64";
|
|
447
|
-
data: string;
|
|
448
447
|
media_type: "image/jpeg";
|
|
448
|
+
data: string;
|
|
449
449
|
}>;
|
|
450
450
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
451
451
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -458,8 +458,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
458
458
|
type: "image";
|
|
459
459
|
source: {
|
|
460
460
|
type: "base64";
|
|
461
|
-
data: string;
|
|
462
461
|
media_type: "image/jpeg";
|
|
462
|
+
data: string;
|
|
463
463
|
};
|
|
464
464
|
cache_control?: {
|
|
465
465
|
type: "ephemeral";
|
|
@@ -468,15 +468,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
468
468
|
type: "image";
|
|
469
469
|
source: {
|
|
470
470
|
type: "base64";
|
|
471
|
-
data: string;
|
|
472
471
|
media_type: "image/jpeg";
|
|
472
|
+
data: string;
|
|
473
473
|
};
|
|
474
474
|
cache_control?: {
|
|
475
475
|
type: "ephemeral";
|
|
476
476
|
} | undefined;
|
|
477
477
|
}>]>, "many">]>;
|
|
478
478
|
}, "strip", z.ZodTypeAny, {
|
|
479
|
-
role: "user" | "assistant";
|
|
480
479
|
content: string | ({
|
|
481
480
|
type: "text";
|
|
482
481
|
text: string;
|
|
@@ -485,15 +484,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
485
484
|
} | undefined;
|
|
486
485
|
} | {
|
|
487
486
|
type: "tool_use";
|
|
488
|
-
id: string;
|
|
489
487
|
name: string;
|
|
488
|
+
id: string;
|
|
490
489
|
input: Record<string, any>;
|
|
491
490
|
cache_control?: {
|
|
492
491
|
type: "ephemeral";
|
|
493
492
|
} | undefined;
|
|
494
493
|
} | {
|
|
495
|
-
type: "tool_result";
|
|
496
494
|
content: string;
|
|
495
|
+
type: "tool_result";
|
|
497
496
|
tool_use_id: string;
|
|
498
497
|
cache_control?: {
|
|
499
498
|
type: "ephemeral";
|
|
@@ -502,15 +501,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
502
501
|
type: "image";
|
|
503
502
|
source: {
|
|
504
503
|
type: "base64";
|
|
505
|
-
data: string;
|
|
506
504
|
media_type: "image/jpeg";
|
|
505
|
+
data: string;
|
|
507
506
|
};
|
|
508
507
|
cache_control?: {
|
|
509
508
|
type: "ephemeral";
|
|
510
509
|
} | undefined;
|
|
511
510
|
})[];
|
|
512
|
-
}, {
|
|
513
511
|
role: "user" | "assistant";
|
|
512
|
+
}, {
|
|
514
513
|
content: string | ({
|
|
515
514
|
type: "text";
|
|
516
515
|
text: string;
|
|
@@ -519,15 +518,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
519
518
|
} | undefined;
|
|
520
519
|
} | {
|
|
521
520
|
type: "tool_use";
|
|
522
|
-
id: string;
|
|
523
521
|
name: string;
|
|
522
|
+
id: string;
|
|
524
523
|
input: Record<string, any>;
|
|
525
524
|
cache_control?: {
|
|
526
525
|
type: "ephemeral";
|
|
527
526
|
} | undefined;
|
|
528
527
|
} | {
|
|
529
|
-
type: "tool_result";
|
|
530
528
|
content: string;
|
|
529
|
+
type: "tool_result";
|
|
531
530
|
tool_use_id: string;
|
|
532
531
|
cache_control?: {
|
|
533
532
|
type: "ephemeral";
|
|
@@ -536,13 +535,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
536
535
|
type: "image";
|
|
537
536
|
source: {
|
|
538
537
|
type: "base64";
|
|
539
|
-
data: string;
|
|
540
538
|
media_type: "image/jpeg";
|
|
539
|
+
data: string;
|
|
541
540
|
};
|
|
542
541
|
cache_control?: {
|
|
543
542
|
type: "ephemeral";
|
|
544
543
|
} | undefined;
|
|
545
544
|
})[];
|
|
545
|
+
role: "user" | "assistant";
|
|
546
546
|
}>, "many">;
|
|
547
547
|
fileContext: z.ZodObject<{
|
|
548
548
|
currentWorkingDirectory: z.ZodString;
|
|
@@ -658,12 +658,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
658
658
|
filePath: z.ZodString;
|
|
659
659
|
content: z.ZodString;
|
|
660
660
|
}, "strip", z.ZodTypeAny, {
|
|
661
|
-
type: "file" | "patch";
|
|
662
661
|
content: string;
|
|
662
|
+
type: "file" | "patch";
|
|
663
663
|
filePath: string;
|
|
664
664
|
}, {
|
|
665
|
-
type: "file" | "patch";
|
|
666
665
|
content: string;
|
|
666
|
+
type: "file" | "patch";
|
|
667
667
|
filePath: string;
|
|
668
668
|
}>, "many">;
|
|
669
669
|
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
|
|
@@ -672,7 +672,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
672
672
|
fingerprintId: string;
|
|
673
673
|
userInputId: string;
|
|
674
674
|
messages: {
|
|
675
|
-
role: "user" | "assistant";
|
|
676
675
|
content: string | ({
|
|
677
676
|
type: "text";
|
|
678
677
|
text: string;
|
|
@@ -681,15 +680,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
681
680
|
} | undefined;
|
|
682
681
|
} | {
|
|
683
682
|
type: "tool_use";
|
|
684
|
-
id: string;
|
|
685
683
|
name: string;
|
|
684
|
+
id: string;
|
|
686
685
|
input: Record<string, any>;
|
|
687
686
|
cache_control?: {
|
|
688
687
|
type: "ephemeral";
|
|
689
688
|
} | undefined;
|
|
690
689
|
} | {
|
|
691
|
-
type: "tool_result";
|
|
692
690
|
content: string;
|
|
691
|
+
type: "tool_result";
|
|
693
692
|
tool_use_id: string;
|
|
694
693
|
cache_control?: {
|
|
695
694
|
type: "ephemeral";
|
|
@@ -698,13 +697,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
698
697
|
type: "image";
|
|
699
698
|
source: {
|
|
700
699
|
type: "base64";
|
|
701
|
-
data: string;
|
|
702
700
|
media_type: "image/jpeg";
|
|
701
|
+
data: string;
|
|
703
702
|
};
|
|
704
703
|
cache_control?: {
|
|
705
704
|
type: "ephemeral";
|
|
706
705
|
} | undefined;
|
|
707
706
|
})[];
|
|
707
|
+
role: "user" | "assistant";
|
|
708
708
|
}[];
|
|
709
709
|
fileContext: {
|
|
710
710
|
currentWorkingDirectory: string;
|
|
@@ -734,8 +734,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
734
734
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
735
735
|
};
|
|
736
736
|
changesAlreadyApplied: {
|
|
737
|
-
type: "file" | "patch";
|
|
738
737
|
content: string;
|
|
738
|
+
type: "file" | "patch";
|
|
739
739
|
filePath: string;
|
|
740
740
|
}[];
|
|
741
741
|
costMode: "max" | "lite" | "normal";
|
|
@@ -745,7 +745,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
745
745
|
fingerprintId: string;
|
|
746
746
|
userInputId: string;
|
|
747
747
|
messages: {
|
|
748
|
-
role: "user" | "assistant";
|
|
749
748
|
content: string | ({
|
|
750
749
|
type: "text";
|
|
751
750
|
text: string;
|
|
@@ -754,15 +753,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
754
753
|
} | undefined;
|
|
755
754
|
} | {
|
|
756
755
|
type: "tool_use";
|
|
757
|
-
id: string;
|
|
758
756
|
name: string;
|
|
757
|
+
id: string;
|
|
759
758
|
input: Record<string, any>;
|
|
760
759
|
cache_control?: {
|
|
761
760
|
type: "ephemeral";
|
|
762
761
|
} | undefined;
|
|
763
762
|
} | {
|
|
764
|
-
type: "tool_result";
|
|
765
763
|
content: string;
|
|
764
|
+
type: "tool_result";
|
|
766
765
|
tool_use_id: string;
|
|
767
766
|
cache_control?: {
|
|
768
767
|
type: "ephemeral";
|
|
@@ -771,13 +770,14 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
771
770
|
type: "image";
|
|
772
771
|
source: {
|
|
773
772
|
type: "base64";
|
|
774
|
-
data: string;
|
|
775
773
|
media_type: "image/jpeg";
|
|
774
|
+
data: string;
|
|
776
775
|
};
|
|
777
776
|
cache_control?: {
|
|
778
777
|
type: "ephemeral";
|
|
779
778
|
} | undefined;
|
|
780
779
|
})[];
|
|
780
|
+
role: "user" | "assistant";
|
|
781
781
|
}[];
|
|
782
782
|
fileContext: {
|
|
783
783
|
currentWorkingDirectory: string;
|
|
@@ -807,8 +807,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
807
807
|
userKnowledgeFiles?: Record<string, string> | undefined;
|
|
808
808
|
};
|
|
809
809
|
changesAlreadyApplied: {
|
|
810
|
-
type: "file" | "patch";
|
|
811
810
|
content: string;
|
|
811
|
+
type: "file" | "patch";
|
|
812
812
|
filePath: string;
|
|
813
813
|
}[];
|
|
814
814
|
authToken?: string | undefined;
|
|
@@ -1131,12 +1131,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1131
1131
|
filePath: z.ZodString;
|
|
1132
1132
|
content: z.ZodString;
|
|
1133
1133
|
}, "strip", z.ZodTypeAny, {
|
|
1134
|
-
type: "file" | "patch";
|
|
1135
1134
|
content: string;
|
|
1135
|
+
type: "file" | "patch";
|
|
1136
1136
|
filePath: string;
|
|
1137
1137
|
}, {
|
|
1138
|
-
type: "file" | "patch";
|
|
1139
1138
|
content: string;
|
|
1139
|
+
type: "file" | "patch";
|
|
1140
1140
|
filePath: string;
|
|
1141
1141
|
}>, "many">;
|
|
1142
1142
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1144,12 +1144,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1144
1144
|
filePath: z.ZodString;
|
|
1145
1145
|
content: z.ZodString;
|
|
1146
1146
|
}, "strip", z.ZodTypeAny, {
|
|
1147
|
-
type: "file" | "patch";
|
|
1148
1147
|
content: string;
|
|
1148
|
+
type: "file" | "patch";
|
|
1149
1149
|
filePath: string;
|
|
1150
1150
|
}, {
|
|
1151
|
-
type: "file" | "patch";
|
|
1152
1151
|
content: string;
|
|
1152
|
+
type: "file" | "patch";
|
|
1153
1153
|
filePath: string;
|
|
1154
1154
|
}>, "many">;
|
|
1155
1155
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1174,14 +1174,14 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1174
1174
|
type: "response-complete";
|
|
1175
1175
|
userInputId: string;
|
|
1176
1176
|
changesAlreadyApplied: {
|
|
1177
|
-
type: "file" | "patch";
|
|
1178
1177
|
content: string;
|
|
1178
|
+
type: "file" | "patch";
|
|
1179
1179
|
filePath: string;
|
|
1180
1180
|
}[];
|
|
1181
1181
|
response: string;
|
|
1182
1182
|
changes: {
|
|
1183
|
-
type: "file" | "patch";
|
|
1184
1183
|
content: string;
|
|
1184
|
+
type: "file" | "patch";
|
|
1185
1185
|
filePath: string;
|
|
1186
1186
|
}[];
|
|
1187
1187
|
addedFileVersions: {
|
|
@@ -1199,14 +1199,14 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1199
1199
|
type: "response-complete";
|
|
1200
1200
|
userInputId: string;
|
|
1201
1201
|
changesAlreadyApplied: {
|
|
1202
|
-
type: "file" | "patch";
|
|
1203
1202
|
content: string;
|
|
1203
|
+
type: "file" | "patch";
|
|
1204
1204
|
filePath: string;
|
|
1205
1205
|
}[];
|
|
1206
1206
|
response: string;
|
|
1207
1207
|
changes: {
|
|
1208
|
-
type: "file" | "patch";
|
|
1209
1208
|
content: string;
|
|
1209
|
+
type: "file" | "patch";
|
|
1210
1210
|
filePath: string;
|
|
1211
1211
|
}[];
|
|
1212
1212
|
addedFileVersions: {
|
|
@@ -1251,12 +1251,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1251
1251
|
filePath: z.ZodString;
|
|
1252
1252
|
content: z.ZodString;
|
|
1253
1253
|
}, "strip", z.ZodTypeAny, {
|
|
1254
|
-
type: "file" | "patch";
|
|
1255
1254
|
content: string;
|
|
1255
|
+
type: "file" | "patch";
|
|
1256
1256
|
filePath: string;
|
|
1257
1257
|
}, {
|
|
1258
|
-
type: "file" | "patch";
|
|
1259
1258
|
content: string;
|
|
1259
|
+
type: "file" | "patch";
|
|
1260
1260
|
filePath: string;
|
|
1261
1261
|
}>, "many">;
|
|
1262
1262
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1264,12 +1264,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1264
1264
|
filePath: z.ZodString;
|
|
1265
1265
|
content: z.ZodString;
|
|
1266
1266
|
}, "strip", z.ZodTypeAny, {
|
|
1267
|
-
type: "file" | "patch";
|
|
1268
1267
|
content: string;
|
|
1268
|
+
type: "file" | "patch";
|
|
1269
1269
|
filePath: string;
|
|
1270
1270
|
}, {
|
|
1271
|
-
type: "file" | "patch";
|
|
1272
1271
|
content: string;
|
|
1272
|
+
type: "file" | "patch";
|
|
1273
1273
|
filePath: string;
|
|
1274
1274
|
}>, "many">;
|
|
1275
1275
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1294,14 +1294,14 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1294
1294
|
type: "response-complete";
|
|
1295
1295
|
userInputId: string;
|
|
1296
1296
|
changesAlreadyApplied: {
|
|
1297
|
-
type: "file" | "patch";
|
|
1298
1297
|
content: string;
|
|
1298
|
+
type: "file" | "patch";
|
|
1299
1299
|
filePath: string;
|
|
1300
1300
|
}[];
|
|
1301
1301
|
response: string;
|
|
1302
1302
|
changes: {
|
|
1303
|
-
type: "file" | "patch";
|
|
1304
1303
|
content: string;
|
|
1304
|
+
type: "file" | "patch";
|
|
1305
1305
|
filePath: string;
|
|
1306
1306
|
}[];
|
|
1307
1307
|
addedFileVersions: {
|
|
@@ -1319,14 +1319,14 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1319
1319
|
type: "response-complete";
|
|
1320
1320
|
userInputId: string;
|
|
1321
1321
|
changesAlreadyApplied: {
|
|
1322
|
-
type: "file" | "patch";
|
|
1323
1322
|
content: string;
|
|
1323
|
+
type: "file" | "patch";
|
|
1324
1324
|
filePath: string;
|
|
1325
1325
|
}[];
|
|
1326
1326
|
response: string;
|
|
1327
1327
|
changes: {
|
|
1328
|
-
type: "file" | "patch";
|
|
1329
1328
|
content: string;
|
|
1329
|
+
type: "file" | "patch";
|
|
1330
1330
|
filePath: string;
|
|
1331
1331
|
}[];
|
|
1332
1332
|
addedFileVersions: {
|
|
@@ -1358,12 +1358,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1358
1358
|
id: z.ZodString;
|
|
1359
1359
|
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1360
1360
|
}, "strip", z.ZodTypeAny, {
|
|
1361
|
-
id: string;
|
|
1362
1361
|
name: string;
|
|
1362
|
+
id: string;
|
|
1363
1363
|
input: Record<string, any>;
|
|
1364
1364
|
}, {
|
|
1365
|
-
id: string;
|
|
1366
1365
|
name: string;
|
|
1366
|
+
id: string;
|
|
1367
1367
|
input: Record<string, any>;
|
|
1368
1368
|
}>;
|
|
1369
1369
|
changes: z.ZodArray<z.ZodObject<{
|
|
@@ -1371,12 +1371,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1371
1371
|
filePath: z.ZodString;
|
|
1372
1372
|
content: z.ZodString;
|
|
1373
1373
|
}, "strip", z.ZodTypeAny, {
|
|
1374
|
-
type: "file" | "patch";
|
|
1375
1374
|
content: string;
|
|
1375
|
+
type: "file" | "patch";
|
|
1376
1376
|
filePath: string;
|
|
1377
1377
|
}, {
|
|
1378
|
-
type: "file" | "patch";
|
|
1379
1378
|
content: string;
|
|
1379
|
+
type: "file" | "patch";
|
|
1380
1380
|
filePath: string;
|
|
1381
1381
|
}>, "many">;
|
|
1382
1382
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1384,12 +1384,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1384
1384
|
filePath: z.ZodString;
|
|
1385
1385
|
content: z.ZodString;
|
|
1386
1386
|
}, "strip", z.ZodTypeAny, {
|
|
1387
|
-
type: "file" | "patch";
|
|
1388
1387
|
content: string;
|
|
1388
|
+
type: "file" | "patch";
|
|
1389
1389
|
filePath: string;
|
|
1390
1390
|
}, {
|
|
1391
|
-
type: "file" | "patch";
|
|
1392
1391
|
content: string;
|
|
1392
|
+
type: "file" | "patch";
|
|
1393
1393
|
filePath: string;
|
|
1394
1394
|
}>, "many">;
|
|
1395
1395
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1405,21 +1405,21 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1405
1405
|
resetFileVersions: z.ZodBoolean;
|
|
1406
1406
|
}, "strip", z.ZodTypeAny, {
|
|
1407
1407
|
type: "tool-call";
|
|
1408
|
+
userInputId: string;
|
|
1408
1409
|
data: {
|
|
1409
|
-
id: string;
|
|
1410
1410
|
name: string;
|
|
1411
|
+
id: string;
|
|
1411
1412
|
input: Record<string, any>;
|
|
1412
1413
|
};
|
|
1413
|
-
userInputId: string;
|
|
1414
1414
|
changesAlreadyApplied: {
|
|
1415
|
-
type: "file" | "patch";
|
|
1416
1415
|
content: string;
|
|
1416
|
+
type: "file" | "patch";
|
|
1417
1417
|
filePath: string;
|
|
1418
1418
|
}[];
|
|
1419
1419
|
response: string;
|
|
1420
1420
|
changes: {
|
|
1421
|
-
type: "file" | "patch";
|
|
1422
1421
|
content: string;
|
|
1422
|
+
type: "file" | "patch";
|
|
1423
1423
|
filePath: string;
|
|
1424
1424
|
}[];
|
|
1425
1425
|
addedFileVersions: {
|
|
@@ -1429,21 +1429,21 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1429
1429
|
resetFileVersions: boolean;
|
|
1430
1430
|
}, {
|
|
1431
1431
|
type: "tool-call";
|
|
1432
|
+
userInputId: string;
|
|
1432
1433
|
data: {
|
|
1433
|
-
id: string;
|
|
1434
1434
|
name: string;
|
|
1435
|
+
id: string;
|
|
1435
1436
|
input: Record<string, any>;
|
|
1436
1437
|
};
|
|
1437
|
-
userInputId: string;
|
|
1438
1438
|
changesAlreadyApplied: {
|
|
1439
|
-
type: "file" | "patch";
|
|
1440
1439
|
content: string;
|
|
1440
|
+
type: "file" | "patch";
|
|
1441
1441
|
filePath: string;
|
|
1442
1442
|
}[];
|
|
1443
1443
|
response: string;
|
|
1444
1444
|
changes: {
|
|
1445
|
-
type: "file" | "patch";
|
|
1446
1445
|
content: string;
|
|
1446
|
+
type: "file" | "patch";
|
|
1447
1447
|
filePath: string;
|
|
1448
1448
|
}[];
|
|
1449
1449
|
addedFileVersions: {
|
|
@@ -1511,39 +1511,39 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1511
1511
|
fingerprintId: z.ZodString;
|
|
1512
1512
|
fingerprintHash: z.ZodString;
|
|
1513
1513
|
}, "strip", z.ZodTypeAny, {
|
|
1514
|
-
id: string;
|
|
1515
|
-
name: string | null;
|
|
1516
1514
|
email: string;
|
|
1515
|
+
name: string | null;
|
|
1516
|
+
id: string;
|
|
1517
1517
|
authToken: string;
|
|
1518
1518
|
fingerprintId: string;
|
|
1519
1519
|
fingerprintHash: string;
|
|
1520
1520
|
}, {
|
|
1521
|
-
id: string;
|
|
1522
|
-
name: string | null;
|
|
1523
1521
|
email: string;
|
|
1522
|
+
name: string | null;
|
|
1523
|
+
id: string;
|
|
1524
1524
|
authToken: string;
|
|
1525
1525
|
fingerprintId: string;
|
|
1526
1526
|
fingerprintHash: string;
|
|
1527
1527
|
}>>;
|
|
1528
1528
|
message: z.ZodString;
|
|
1529
1529
|
}, "strip", z.ZodTypeAny, {
|
|
1530
|
-
type: "auth-result";
|
|
1531
1530
|
message: string;
|
|
1531
|
+
type: "auth-result";
|
|
1532
1532
|
user?: {
|
|
1533
|
-
id: string;
|
|
1534
|
-
name: string | null;
|
|
1535
1533
|
email: string;
|
|
1534
|
+
name: string | null;
|
|
1535
|
+
id: string;
|
|
1536
1536
|
authToken: string;
|
|
1537
1537
|
fingerprintId: string;
|
|
1538
1538
|
fingerprintHash: string;
|
|
1539
1539
|
} | undefined;
|
|
1540
1540
|
}, {
|
|
1541
|
-
type: "auth-result";
|
|
1542
1541
|
message: string;
|
|
1542
|
+
type: "auth-result";
|
|
1543
1543
|
user?: {
|
|
1544
|
-
id: string;
|
|
1545
|
-
name: string | null;
|
|
1546
1544
|
email: string;
|
|
1545
|
+
name: string | null;
|
|
1546
|
+
id: string;
|
|
1547
1547
|
authToken: string;
|
|
1548
1548
|
fingerprintId: string;
|
|
1549
1549
|
fingerprintHash: string;
|
|
@@ -1591,11 +1591,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1591
1591
|
type: z.ZodLiteral<"action-error">;
|
|
1592
1592
|
message: z.ZodString;
|
|
1593
1593
|
}, "strip", z.ZodTypeAny, {
|
|
1594
|
-
type: "action-error";
|
|
1595
1594
|
message: string;
|
|
1596
|
-
}, {
|
|
1597
1595
|
type: "action-error";
|
|
1596
|
+
}, {
|
|
1598
1597
|
message: string;
|
|
1598
|
+
type: "action-error";
|
|
1599
1599
|
}>, z.ZodObject<{
|
|
1600
1600
|
type: z.ZodLiteral<"commit-message-response">;
|
|
1601
1601
|
commitMessage: z.ZodString;
|