codebuff 1.0.224 → 1.0.225
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/client.d.ts +5 -5
- package/dist/client.js +5 -0
- package/dist/client.js.map +1 -1
- package/dist/code-map/tsconfig.tsbuildinfo +1 -1
- package/dist/common/actions.d.ts +134 -134
- package/dist/common/advanced-analyzer.d.ts +19 -0
- package/dist/common/advanced-analyzer.js +140 -0
- package/dist/common/advanced-analyzer.js.map +1 -0
- package/dist/common/billing/balance-calculator.d.ts +1 -1
- package/dist/common/billing/check-auto-topup.d.ts +12 -0
- package/dist/common/billing/check-auto-topup.js +50 -0
- package/dist/common/billing/check-auto-topup.js.map +1 -0
- package/dist/common/billing/credit-check.d.ts +8 -0
- package/dist/common/billing/credit-check.js +45 -0
- package/dist/common/billing/credit-check.js.map +1 -0
- package/dist/common/billing/rollover-logic.d.ts +13 -0
- package/dist/common/billing/rollover-logic.js +174 -0
- package/dist/common/billing/rollover-logic.js.map +1 -0
- package/dist/common/billing/stripe-api.d.ts +31 -0
- package/dist/common/billing/stripe-api.js +104 -0
- package/dist/common/billing/stripe-api.js.map +1 -0
- package/dist/common/message-image-handling.d.ts +41 -0
- package/dist/common/message-image-handling.js +57 -0
- package/dist/common/message-image-handling.js.map +1 -0
- package/dist/common/types/billing.d.ts +16 -0
- package/dist/common/types/billing.js +3 -0
- package/dist/common/types/billing.js.map +1 -0
- package/dist/common/types/usage.d.ts +2 -2
- package/dist/common/util/process-stream.d.ts +8 -0
- package/dist/common/util/process-stream.js +102 -0
- package/dist/common/util/process-stream.js.map +1 -0
- package/dist/common/util/referral-credits.d.ts +1 -0
- package/dist/common/util/referral-credits.js +48 -0
- package/dist/common/util/referral-credits.js.map +1 -0
- package/dist/common/websockets/websocket-schema.d.ts +258 -258
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/common/logger.d.ts +0 -1
- package/dist/common/logger.js +0 -7
- package/dist/common/logger.js.map +0 -1
- package/dist/common/util/constants.d.ts +0 -1
- package/dist/common/util/constants.js +0 -7
- package/dist/common/util/constants.js.map +0 -1
- package/dist/common/util/helpers.d.ts +0 -1
- package/dist/common/util/helpers.js +0 -6
- package/dist/common/util/helpers.js.map +0 -1
- package/dist/common/util/token-counter.d.ts +0 -3
- package/dist/common/util/token-counter.js +0 -27
- package/dist/common/util/token-counter.js.map +0 -1
|
@@ -207,17 +207,17 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
207
207
|
type: "ephemeral";
|
|
208
208
|
}>>;
|
|
209
209
|
}, "strip", z.ZodTypeAny, {
|
|
210
|
-
type: "tool_use";
|
|
211
|
-
name: string;
|
|
212
210
|
id: string;
|
|
211
|
+
name: string;
|
|
212
|
+
type: "tool_use";
|
|
213
213
|
input: Record<string, any>;
|
|
214
214
|
cache_control?: {
|
|
215
215
|
type: "ephemeral";
|
|
216
216
|
} | undefined;
|
|
217
217
|
}, {
|
|
218
|
-
type: "tool_use";
|
|
219
|
-
name: string;
|
|
220
218
|
id: string;
|
|
219
|
+
name: string;
|
|
220
|
+
type: "tool_use";
|
|
221
221
|
input: Record<string, any>;
|
|
222
222
|
cache_control?: {
|
|
223
223
|
type: "ephemeral";
|
|
@@ -254,13 +254,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
254
254
|
media_type: z.ZodLiteral<"image/jpeg">;
|
|
255
255
|
data: z.ZodString;
|
|
256
256
|
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
data: string;
|
|
257
258
|
type: "base64";
|
|
258
259
|
media_type: "image/jpeg";
|
|
259
|
-
data: string;
|
|
260
260
|
}, {
|
|
261
|
+
data: string;
|
|
261
262
|
type: "base64";
|
|
262
263
|
media_type: "image/jpeg";
|
|
263
|
-
data: string;
|
|
264
264
|
}>;
|
|
265
265
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
266
266
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -272,9 +272,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
272
272
|
}, "strip", z.ZodTypeAny, {
|
|
273
273
|
type: "image";
|
|
274
274
|
source: {
|
|
275
|
+
data: string;
|
|
275
276
|
type: "base64";
|
|
276
277
|
media_type: "image/jpeg";
|
|
277
|
-
data: string;
|
|
278
278
|
};
|
|
279
279
|
cache_control?: {
|
|
280
280
|
type: "ephemeral";
|
|
@@ -282,9 +282,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
282
282
|
}, {
|
|
283
283
|
type: "image";
|
|
284
284
|
source: {
|
|
285
|
+
data: string;
|
|
285
286
|
type: "base64";
|
|
286
287
|
media_type: "image/jpeg";
|
|
287
|
-
data: string;
|
|
288
288
|
};
|
|
289
289
|
cache_control?: {
|
|
290
290
|
type: "ephemeral";
|
|
@@ -298,9 +298,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
298
298
|
type: "ephemeral";
|
|
299
299
|
} | undefined;
|
|
300
300
|
} | {
|
|
301
|
-
type: "tool_use";
|
|
302
|
-
name: string;
|
|
303
301
|
id: string;
|
|
302
|
+
name: string;
|
|
303
|
+
type: "tool_use";
|
|
304
304
|
input: Record<string, any>;
|
|
305
305
|
cache_control?: {
|
|
306
306
|
type: "ephemeral";
|
|
@@ -315,9 +315,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
315
315
|
} | {
|
|
316
316
|
type: "image";
|
|
317
317
|
source: {
|
|
318
|
+
data: string;
|
|
318
319
|
type: "base64";
|
|
319
320
|
media_type: "image/jpeg";
|
|
320
|
-
data: string;
|
|
321
321
|
};
|
|
322
322
|
cache_control?: {
|
|
323
323
|
type: "ephemeral";
|
|
@@ -332,9 +332,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
332
332
|
type: "ephemeral";
|
|
333
333
|
} | undefined;
|
|
334
334
|
} | {
|
|
335
|
-
type: "tool_use";
|
|
336
|
-
name: string;
|
|
337
335
|
id: string;
|
|
336
|
+
name: string;
|
|
337
|
+
type: "tool_use";
|
|
338
338
|
input: Record<string, any>;
|
|
339
339
|
cache_control?: {
|
|
340
340
|
type: "ephemeral";
|
|
@@ -349,9 +349,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
349
349
|
} | {
|
|
350
350
|
type: "image";
|
|
351
351
|
source: {
|
|
352
|
+
data: string;
|
|
352
353
|
type: "base64";
|
|
353
354
|
media_type: "image/jpeg";
|
|
354
|
-
data: string;
|
|
355
355
|
};
|
|
356
356
|
cache_control?: {
|
|
357
357
|
type: "ephemeral";
|
|
@@ -397,9 +397,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
397
397
|
type: "ephemeral";
|
|
398
398
|
} | undefined;
|
|
399
399
|
} | {
|
|
400
|
-
type: "tool_use";
|
|
401
|
-
name: string;
|
|
402
400
|
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
type: "tool_use";
|
|
403
403
|
input: Record<string, any>;
|
|
404
404
|
cache_control?: {
|
|
405
405
|
type: "ephemeral";
|
|
@@ -414,9 +414,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
414
414
|
} | {
|
|
415
415
|
type: "image";
|
|
416
416
|
source: {
|
|
417
|
+
data: string;
|
|
417
418
|
type: "base64";
|
|
418
419
|
media_type: "image/jpeg";
|
|
419
|
-
data: string;
|
|
420
420
|
};
|
|
421
421
|
cache_control?: {
|
|
422
422
|
type: "ephemeral";
|
|
@@ -462,9 +462,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
462
462
|
type: "ephemeral";
|
|
463
463
|
} | undefined;
|
|
464
464
|
} | {
|
|
465
|
-
type: "tool_use";
|
|
466
|
-
name: string;
|
|
467
465
|
id: string;
|
|
466
|
+
name: string;
|
|
467
|
+
type: "tool_use";
|
|
468
468
|
input: Record<string, any>;
|
|
469
469
|
cache_control?: {
|
|
470
470
|
type: "ephemeral";
|
|
@@ -479,9 +479,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
479
479
|
} | {
|
|
480
480
|
type: "image";
|
|
481
481
|
source: {
|
|
482
|
+
data: string;
|
|
482
483
|
type: "base64";
|
|
483
484
|
media_type: "image/jpeg";
|
|
484
|
-
data: string;
|
|
485
485
|
};
|
|
486
486
|
cache_control?: {
|
|
487
487
|
type: "ephemeral";
|
|
@@ -496,12 +496,12 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
496
496
|
result: z.ZodString;
|
|
497
497
|
id: z.ZodString;
|
|
498
498
|
}, "strip", z.ZodTypeAny, {
|
|
499
|
-
name: string;
|
|
500
499
|
id: string;
|
|
500
|
+
name: string;
|
|
501
501
|
result: string;
|
|
502
502
|
}, {
|
|
503
|
-
name: string;
|
|
504
503
|
id: string;
|
|
504
|
+
name: string;
|
|
505
505
|
result: string;
|
|
506
506
|
}>, "many">;
|
|
507
507
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -547,9 +547,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
547
547
|
type: "ephemeral";
|
|
548
548
|
} | undefined;
|
|
549
549
|
} | {
|
|
550
|
-
type: "tool_use";
|
|
551
|
-
name: string;
|
|
552
550
|
id: string;
|
|
551
|
+
name: string;
|
|
552
|
+
type: "tool_use";
|
|
553
553
|
input: Record<string, any>;
|
|
554
554
|
cache_control?: {
|
|
555
555
|
type: "ephemeral";
|
|
@@ -564,9 +564,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
564
564
|
} | {
|
|
565
565
|
type: "image";
|
|
566
566
|
source: {
|
|
567
|
+
data: string;
|
|
567
568
|
type: "base64";
|
|
568
569
|
media_type: "image/jpeg";
|
|
569
|
-
data: string;
|
|
570
570
|
};
|
|
571
571
|
cache_control?: {
|
|
572
572
|
type: "ephemeral";
|
|
@@ -577,13 +577,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
577
577
|
consecutiveAssistantMessages?: number | undefined;
|
|
578
578
|
};
|
|
579
579
|
toolResults: {
|
|
580
|
-
name: string;
|
|
581
580
|
id: string;
|
|
581
|
+
name: string;
|
|
582
582
|
result: string;
|
|
583
583
|
}[];
|
|
584
|
+
model?: string | undefined;
|
|
584
585
|
prompt?: string | undefined;
|
|
585
586
|
authToken?: string | undefined;
|
|
586
|
-
model?: string | undefined;
|
|
587
587
|
}, {
|
|
588
588
|
type: "prompt";
|
|
589
589
|
promptId: string;
|
|
@@ -625,9 +625,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
625
625
|
type: "ephemeral";
|
|
626
626
|
} | undefined;
|
|
627
627
|
} | {
|
|
628
|
-
type: "tool_use";
|
|
629
|
-
name: string;
|
|
630
628
|
id: string;
|
|
629
|
+
name: string;
|
|
630
|
+
type: "tool_use";
|
|
631
631
|
input: Record<string, any>;
|
|
632
632
|
cache_control?: {
|
|
633
633
|
type: "ephemeral";
|
|
@@ -642,9 +642,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
642
642
|
} | {
|
|
643
643
|
type: "image";
|
|
644
644
|
source: {
|
|
645
|
+
data: string;
|
|
645
646
|
type: "base64";
|
|
646
647
|
media_type: "image/jpeg";
|
|
647
|
-
data: string;
|
|
648
648
|
};
|
|
649
649
|
cache_control?: {
|
|
650
650
|
type: "ephemeral";
|
|
@@ -655,14 +655,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
655
655
|
consecutiveAssistantMessages?: number | undefined;
|
|
656
656
|
};
|
|
657
657
|
toolResults: {
|
|
658
|
-
name: string;
|
|
659
658
|
id: string;
|
|
659
|
+
name: string;
|
|
660
660
|
result: string;
|
|
661
661
|
}[];
|
|
662
|
+
model?: string | undefined;
|
|
662
663
|
prompt?: string | undefined;
|
|
663
664
|
authToken?: string | undefined;
|
|
664
665
|
costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
|
|
665
|
-
model?: string | undefined;
|
|
666
666
|
}>, z.ZodObject<{
|
|
667
667
|
type: z.ZodLiteral<"read-files-response">;
|
|
668
668
|
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -867,7 +867,6 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
867
867
|
authToken?: string | undefined;
|
|
868
868
|
}>]>;
|
|
869
869
|
}, "strip", z.ZodTypeAny, {
|
|
870
|
-
type: "action";
|
|
871
870
|
data: {
|
|
872
871
|
type: "prompt";
|
|
873
872
|
promptId: string;
|
|
@@ -910,9 +909,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
910
909
|
type: "ephemeral";
|
|
911
910
|
} | undefined;
|
|
912
911
|
} | {
|
|
913
|
-
type: "tool_use";
|
|
914
|
-
name: string;
|
|
915
912
|
id: string;
|
|
913
|
+
name: string;
|
|
914
|
+
type: "tool_use";
|
|
916
915
|
input: Record<string, any>;
|
|
917
916
|
cache_control?: {
|
|
918
917
|
type: "ephemeral";
|
|
@@ -927,9 +926,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
927
926
|
} | {
|
|
928
927
|
type: "image";
|
|
929
928
|
source: {
|
|
929
|
+
data: string;
|
|
930
930
|
type: "base64";
|
|
931
931
|
media_type: "image/jpeg";
|
|
932
|
-
data: string;
|
|
933
932
|
};
|
|
934
933
|
cache_control?: {
|
|
935
934
|
type: "ephemeral";
|
|
@@ -940,13 +939,13 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
940
939
|
consecutiveAssistantMessages?: number | undefined;
|
|
941
940
|
};
|
|
942
941
|
toolResults: {
|
|
943
|
-
name: string;
|
|
944
942
|
id: string;
|
|
943
|
+
name: string;
|
|
945
944
|
result: string;
|
|
946
945
|
}[];
|
|
946
|
+
model?: string | undefined;
|
|
947
947
|
prompt?: string | undefined;
|
|
948
948
|
authToken?: string | undefined;
|
|
949
|
-
model?: string | undefined;
|
|
950
949
|
} | {
|
|
951
950
|
type: "read-files-response";
|
|
952
951
|
files: Record<string, string | null>;
|
|
@@ -988,9 +987,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
988
987
|
stagedChanges: string;
|
|
989
988
|
authToken?: string | undefined;
|
|
990
989
|
};
|
|
990
|
+
type: "action";
|
|
991
991
|
txid: number;
|
|
992
992
|
}, {
|
|
993
|
-
type: "action";
|
|
994
993
|
data: {
|
|
995
994
|
type: "prompt";
|
|
996
995
|
promptId: string;
|
|
@@ -1032,9 +1031,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1032
1031
|
type: "ephemeral";
|
|
1033
1032
|
} | undefined;
|
|
1034
1033
|
} | {
|
|
1035
|
-
type: "tool_use";
|
|
1036
|
-
name: string;
|
|
1037
1034
|
id: string;
|
|
1035
|
+
name: string;
|
|
1036
|
+
type: "tool_use";
|
|
1038
1037
|
input: Record<string, any>;
|
|
1039
1038
|
cache_control?: {
|
|
1040
1039
|
type: "ephemeral";
|
|
@@ -1049,9 +1048,9 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1049
1048
|
} | {
|
|
1050
1049
|
type: "image";
|
|
1051
1050
|
source: {
|
|
1051
|
+
data: string;
|
|
1052
1052
|
type: "base64";
|
|
1053
1053
|
media_type: "image/jpeg";
|
|
1054
|
-
data: string;
|
|
1055
1054
|
};
|
|
1056
1055
|
cache_control?: {
|
|
1057
1056
|
type: "ephemeral";
|
|
@@ -1062,14 +1061,14 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1062
1061
|
consecutiveAssistantMessages?: number | undefined;
|
|
1063
1062
|
};
|
|
1064
1063
|
toolResults: {
|
|
1065
|
-
name: string;
|
|
1066
1064
|
id: string;
|
|
1065
|
+
name: string;
|
|
1067
1066
|
result: string;
|
|
1068
1067
|
}[];
|
|
1068
|
+
model?: string | undefined;
|
|
1069
1069
|
prompt?: string | undefined;
|
|
1070
1070
|
authToken?: string | undefined;
|
|
1071
1071
|
costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
|
|
1072
|
-
model?: string | undefined;
|
|
1073
1072
|
} | {
|
|
1074
1073
|
type: "read-files-response";
|
|
1075
1074
|
files: Record<string, string | null>;
|
|
@@ -1111,6 +1110,7 @@ export declare const CLIENT_MESSAGE_SCHEMAS: {
|
|
|
1111
1110
|
stagedChanges: string;
|
|
1112
1111
|
authToken?: string | undefined;
|
|
1113
1112
|
};
|
|
1113
|
+
type: "action";
|
|
1114
1114
|
txid: number;
|
|
1115
1115
|
}>;
|
|
1116
1116
|
};
|
|
@@ -1317,17 +1317,17 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1317
1317
|
type: "ephemeral";
|
|
1318
1318
|
}>>;
|
|
1319
1319
|
}, "strip", z.ZodTypeAny, {
|
|
1320
|
-
type: "tool_use";
|
|
1321
|
-
name: string;
|
|
1322
1320
|
id: string;
|
|
1321
|
+
name: string;
|
|
1322
|
+
type: "tool_use";
|
|
1323
1323
|
input: Record<string, any>;
|
|
1324
1324
|
cache_control?: {
|
|
1325
1325
|
type: "ephemeral";
|
|
1326
1326
|
} | undefined;
|
|
1327
1327
|
}, {
|
|
1328
|
-
type: "tool_use";
|
|
1329
|
-
name: string;
|
|
1330
1328
|
id: string;
|
|
1329
|
+
name: string;
|
|
1330
|
+
type: "tool_use";
|
|
1331
1331
|
input: Record<string, any>;
|
|
1332
1332
|
cache_control?: {
|
|
1333
1333
|
type: "ephemeral";
|
|
@@ -1364,13 +1364,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1364
1364
|
media_type: z.ZodLiteral<"image/jpeg">;
|
|
1365
1365
|
data: z.ZodString;
|
|
1366
1366
|
}, "strip", z.ZodTypeAny, {
|
|
1367
|
+
data: string;
|
|
1367
1368
|
type: "base64";
|
|
1368
1369
|
media_type: "image/jpeg";
|
|
1369
|
-
data: string;
|
|
1370
1370
|
}, {
|
|
1371
|
+
data: string;
|
|
1371
1372
|
type: "base64";
|
|
1372
1373
|
media_type: "image/jpeg";
|
|
1373
|
-
data: string;
|
|
1374
1374
|
}>;
|
|
1375
1375
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
1376
1376
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -1382,9 +1382,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1382
1382
|
}, "strip", z.ZodTypeAny, {
|
|
1383
1383
|
type: "image";
|
|
1384
1384
|
source: {
|
|
1385
|
+
data: string;
|
|
1385
1386
|
type: "base64";
|
|
1386
1387
|
media_type: "image/jpeg";
|
|
1387
|
-
data: string;
|
|
1388
1388
|
};
|
|
1389
1389
|
cache_control?: {
|
|
1390
1390
|
type: "ephemeral";
|
|
@@ -1392,9 +1392,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1392
1392
|
}, {
|
|
1393
1393
|
type: "image";
|
|
1394
1394
|
source: {
|
|
1395
|
+
data: string;
|
|
1395
1396
|
type: "base64";
|
|
1396
1397
|
media_type: "image/jpeg";
|
|
1397
|
-
data: string;
|
|
1398
1398
|
};
|
|
1399
1399
|
cache_control?: {
|
|
1400
1400
|
type: "ephemeral";
|
|
@@ -1408,9 +1408,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1408
1408
|
type: "ephemeral";
|
|
1409
1409
|
} | undefined;
|
|
1410
1410
|
} | {
|
|
1411
|
-
type: "tool_use";
|
|
1412
|
-
name: string;
|
|
1413
1411
|
id: string;
|
|
1412
|
+
name: string;
|
|
1413
|
+
type: "tool_use";
|
|
1414
1414
|
input: Record<string, any>;
|
|
1415
1415
|
cache_control?: {
|
|
1416
1416
|
type: "ephemeral";
|
|
@@ -1425,9 +1425,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1425
1425
|
} | {
|
|
1426
1426
|
type: "image";
|
|
1427
1427
|
source: {
|
|
1428
|
+
data: string;
|
|
1428
1429
|
type: "base64";
|
|
1429
1430
|
media_type: "image/jpeg";
|
|
1430
|
-
data: string;
|
|
1431
1431
|
};
|
|
1432
1432
|
cache_control?: {
|
|
1433
1433
|
type: "ephemeral";
|
|
@@ -1442,9 +1442,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1442
1442
|
type: "ephemeral";
|
|
1443
1443
|
} | undefined;
|
|
1444
1444
|
} | {
|
|
1445
|
-
type: "tool_use";
|
|
1446
|
-
name: string;
|
|
1447
1445
|
id: string;
|
|
1446
|
+
name: string;
|
|
1447
|
+
type: "tool_use";
|
|
1448
1448
|
input: Record<string, any>;
|
|
1449
1449
|
cache_control?: {
|
|
1450
1450
|
type: "ephemeral";
|
|
@@ -1459,9 +1459,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1459
1459
|
} | {
|
|
1460
1460
|
type: "image";
|
|
1461
1461
|
source: {
|
|
1462
|
+
data: string;
|
|
1462
1463
|
type: "base64";
|
|
1463
1464
|
media_type: "image/jpeg";
|
|
1464
|
-
data: string;
|
|
1465
1465
|
};
|
|
1466
1466
|
cache_control?: {
|
|
1467
1467
|
type: "ephemeral";
|
|
@@ -1507,9 +1507,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1507
1507
|
type: "ephemeral";
|
|
1508
1508
|
} | undefined;
|
|
1509
1509
|
} | {
|
|
1510
|
-
type: "tool_use";
|
|
1511
|
-
name: string;
|
|
1512
1510
|
id: string;
|
|
1511
|
+
name: string;
|
|
1512
|
+
type: "tool_use";
|
|
1513
1513
|
input: Record<string, any>;
|
|
1514
1514
|
cache_control?: {
|
|
1515
1515
|
type: "ephemeral";
|
|
@@ -1524,9 +1524,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1524
1524
|
} | {
|
|
1525
1525
|
type: "image";
|
|
1526
1526
|
source: {
|
|
1527
|
+
data: string;
|
|
1527
1528
|
type: "base64";
|
|
1528
1529
|
media_type: "image/jpeg";
|
|
1529
|
-
data: string;
|
|
1530
1530
|
};
|
|
1531
1531
|
cache_control?: {
|
|
1532
1532
|
type: "ephemeral";
|
|
@@ -1572,9 +1572,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1572
1572
|
type: "ephemeral";
|
|
1573
1573
|
} | undefined;
|
|
1574
1574
|
} | {
|
|
1575
|
-
type: "tool_use";
|
|
1576
|
-
name: string;
|
|
1577
1575
|
id: string;
|
|
1576
|
+
name: string;
|
|
1577
|
+
type: "tool_use";
|
|
1578
1578
|
input: Record<string, any>;
|
|
1579
1579
|
cache_control?: {
|
|
1580
1580
|
type: "ephemeral";
|
|
@@ -1589,9 +1589,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1589
1589
|
} | {
|
|
1590
1590
|
type: "image";
|
|
1591
1591
|
source: {
|
|
1592
|
+
data: string;
|
|
1592
1593
|
type: "base64";
|
|
1593
1594
|
media_type: "image/jpeg";
|
|
1594
|
-
data: string;
|
|
1595
1595
|
};
|
|
1596
1596
|
cache_control?: {
|
|
1597
1597
|
type: "ephemeral";
|
|
@@ -1606,12 +1606,12 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1606
1606
|
result: z.ZodString;
|
|
1607
1607
|
id: z.ZodString;
|
|
1608
1608
|
}, "strip", z.ZodTypeAny, {
|
|
1609
|
-
name: string;
|
|
1610
1609
|
id: string;
|
|
1610
|
+
name: string;
|
|
1611
1611
|
result: string;
|
|
1612
1612
|
}, {
|
|
1613
|
-
name: string;
|
|
1614
1613
|
id: string;
|
|
1614
|
+
name: string;
|
|
1615
1615
|
result: string;
|
|
1616
1616
|
}>, "many">;
|
|
1617
1617
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1657,9 +1657,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1657
1657
|
type: "ephemeral";
|
|
1658
1658
|
} | undefined;
|
|
1659
1659
|
} | {
|
|
1660
|
-
type: "tool_use";
|
|
1661
|
-
name: string;
|
|
1662
1660
|
id: string;
|
|
1661
|
+
name: string;
|
|
1662
|
+
type: "tool_use";
|
|
1663
1663
|
input: Record<string, any>;
|
|
1664
1664
|
cache_control?: {
|
|
1665
1665
|
type: "ephemeral";
|
|
@@ -1674,9 +1674,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1674
1674
|
} | {
|
|
1675
1675
|
type: "image";
|
|
1676
1676
|
source: {
|
|
1677
|
+
data: string;
|
|
1677
1678
|
type: "base64";
|
|
1678
1679
|
media_type: "image/jpeg";
|
|
1679
|
-
data: string;
|
|
1680
1680
|
};
|
|
1681
1681
|
cache_control?: {
|
|
1682
1682
|
type: "ephemeral";
|
|
@@ -1687,13 +1687,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1687
1687
|
consecutiveAssistantMessages?: number | undefined;
|
|
1688
1688
|
};
|
|
1689
1689
|
toolResults: {
|
|
1690
|
-
name: string;
|
|
1691
1690
|
id: string;
|
|
1691
|
+
name: string;
|
|
1692
1692
|
result: string;
|
|
1693
1693
|
}[];
|
|
1694
|
+
model?: string | undefined;
|
|
1694
1695
|
prompt?: string | undefined;
|
|
1695
1696
|
authToken?: string | undefined;
|
|
1696
|
-
model?: string | undefined;
|
|
1697
1697
|
}, {
|
|
1698
1698
|
type: "prompt";
|
|
1699
1699
|
promptId: string;
|
|
@@ -1735,9 +1735,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1735
1735
|
type: "ephemeral";
|
|
1736
1736
|
} | undefined;
|
|
1737
1737
|
} | {
|
|
1738
|
-
type: "tool_use";
|
|
1739
|
-
name: string;
|
|
1740
1738
|
id: string;
|
|
1739
|
+
name: string;
|
|
1740
|
+
type: "tool_use";
|
|
1741
1741
|
input: Record<string, any>;
|
|
1742
1742
|
cache_control?: {
|
|
1743
1743
|
type: "ephemeral";
|
|
@@ -1752,9 +1752,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1752
1752
|
} | {
|
|
1753
1753
|
type: "image";
|
|
1754
1754
|
source: {
|
|
1755
|
+
data: string;
|
|
1755
1756
|
type: "base64";
|
|
1756
1757
|
media_type: "image/jpeg";
|
|
1757
|
-
data: string;
|
|
1758
1758
|
};
|
|
1759
1759
|
cache_control?: {
|
|
1760
1760
|
type: "ephemeral";
|
|
@@ -1765,14 +1765,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1765
1765
|
consecutiveAssistantMessages?: number | undefined;
|
|
1766
1766
|
};
|
|
1767
1767
|
toolResults: {
|
|
1768
|
-
name: string;
|
|
1769
1768
|
id: string;
|
|
1769
|
+
name: string;
|
|
1770
1770
|
result: string;
|
|
1771
1771
|
}[];
|
|
1772
|
+
model?: string | undefined;
|
|
1772
1773
|
prompt?: string | undefined;
|
|
1773
1774
|
authToken?: string | undefined;
|
|
1774
1775
|
costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
|
|
1775
|
-
model?: string | undefined;
|
|
1776
1776
|
}>, z.ZodObject<{
|
|
1777
1777
|
type: z.ZodLiteral<"read-files-response">;
|
|
1778
1778
|
files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
|
|
@@ -1977,7 +1977,6 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
1977
1977
|
authToken?: string | undefined;
|
|
1978
1978
|
}>]>;
|
|
1979
1979
|
}, "strip", z.ZodTypeAny, {
|
|
1980
|
-
type: "action";
|
|
1981
1980
|
data: {
|
|
1982
1981
|
type: "prompt";
|
|
1983
1982
|
promptId: string;
|
|
@@ -2020,9 +2019,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2020
2019
|
type: "ephemeral";
|
|
2021
2020
|
} | undefined;
|
|
2022
2021
|
} | {
|
|
2023
|
-
type: "tool_use";
|
|
2024
|
-
name: string;
|
|
2025
2022
|
id: string;
|
|
2023
|
+
name: string;
|
|
2024
|
+
type: "tool_use";
|
|
2026
2025
|
input: Record<string, any>;
|
|
2027
2026
|
cache_control?: {
|
|
2028
2027
|
type: "ephemeral";
|
|
@@ -2037,9 +2036,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2037
2036
|
} | {
|
|
2038
2037
|
type: "image";
|
|
2039
2038
|
source: {
|
|
2039
|
+
data: string;
|
|
2040
2040
|
type: "base64";
|
|
2041
2041
|
media_type: "image/jpeg";
|
|
2042
|
-
data: string;
|
|
2043
2042
|
};
|
|
2044
2043
|
cache_control?: {
|
|
2045
2044
|
type: "ephemeral";
|
|
@@ -2050,13 +2049,13 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2050
2049
|
consecutiveAssistantMessages?: number | undefined;
|
|
2051
2050
|
};
|
|
2052
2051
|
toolResults: {
|
|
2053
|
-
name: string;
|
|
2054
2052
|
id: string;
|
|
2053
|
+
name: string;
|
|
2055
2054
|
result: string;
|
|
2056
2055
|
}[];
|
|
2056
|
+
model?: string | undefined;
|
|
2057
2057
|
prompt?: string | undefined;
|
|
2058
2058
|
authToken?: string | undefined;
|
|
2059
|
-
model?: string | undefined;
|
|
2060
2059
|
} | {
|
|
2061
2060
|
type: "read-files-response";
|
|
2062
2061
|
files: Record<string, string | null>;
|
|
@@ -2098,9 +2097,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2098
2097
|
stagedChanges: string;
|
|
2099
2098
|
authToken?: string | undefined;
|
|
2100
2099
|
};
|
|
2100
|
+
type: "action";
|
|
2101
2101
|
txid: number;
|
|
2102
2102
|
}, {
|
|
2103
|
-
type: "action";
|
|
2104
2103
|
data: {
|
|
2105
2104
|
type: "prompt";
|
|
2106
2105
|
promptId: string;
|
|
@@ -2142,9 +2141,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2142
2141
|
type: "ephemeral";
|
|
2143
2142
|
} | undefined;
|
|
2144
2143
|
} | {
|
|
2145
|
-
type: "tool_use";
|
|
2146
|
-
name: string;
|
|
2147
2144
|
id: string;
|
|
2145
|
+
name: string;
|
|
2146
|
+
type: "tool_use";
|
|
2148
2147
|
input: Record<string, any>;
|
|
2149
2148
|
cache_control?: {
|
|
2150
2149
|
type: "ephemeral";
|
|
@@ -2159,9 +2158,9 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2159
2158
|
} | {
|
|
2160
2159
|
type: "image";
|
|
2161
2160
|
source: {
|
|
2161
|
+
data: string;
|
|
2162
2162
|
type: "base64";
|
|
2163
2163
|
media_type: "image/jpeg";
|
|
2164
|
-
data: string;
|
|
2165
2164
|
};
|
|
2166
2165
|
cache_control?: {
|
|
2167
2166
|
type: "ephemeral";
|
|
@@ -2172,14 +2171,14 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2172
2171
|
consecutiveAssistantMessages?: number | undefined;
|
|
2173
2172
|
};
|
|
2174
2173
|
toolResults: {
|
|
2175
|
-
name: string;
|
|
2176
2174
|
id: string;
|
|
2175
|
+
name: string;
|
|
2177
2176
|
result: string;
|
|
2178
2177
|
}[];
|
|
2178
|
+
model?: string | undefined;
|
|
2179
2179
|
prompt?: string | undefined;
|
|
2180
2180
|
authToken?: string | undefined;
|
|
2181
2181
|
costMode?: "lite" | "normal" | "max" | "experimental" | undefined;
|
|
2182
|
-
model?: string | undefined;
|
|
2183
2182
|
} | {
|
|
2184
2183
|
type: "read-files-response";
|
|
2185
2184
|
files: Record<string, string | null>;
|
|
@@ -2221,6 +2220,7 @@ export declare const CLIENT_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
2221
2220
|
stagedChanges: string;
|
|
2222
2221
|
authToken?: string | undefined;
|
|
2223
2222
|
};
|
|
2223
|
+
type: "action";
|
|
2224
2224
|
txid: number;
|
|
2225
2225
|
}>]>;
|
|
2226
2226
|
export type ClientMessageType = keyof typeof CLIENT_MESSAGE_SCHEMAS;
|
|
@@ -2298,16 +2298,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2298
2298
|
}>, "many">;
|
|
2299
2299
|
resetFileVersions: z.ZodBoolean;
|
|
2300
2300
|
}, {
|
|
2301
|
+
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2301
2302
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
2302
2303
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
2303
2304
|
balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
|
|
2304
|
-
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
2305
2305
|
nextMonthlyGrant: z.ZodOptional<z.ZodNumber>;
|
|
2306
2306
|
autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
2307
2307
|
}>, "strip", z.ZodTypeAny, {
|
|
2308
2308
|
type: "response-complete";
|
|
2309
|
-
userInputId: string;
|
|
2310
2309
|
response: string;
|
|
2310
|
+
userInputId: string;
|
|
2311
2311
|
changes: {
|
|
2312
2312
|
type: "patch" | "file";
|
|
2313
2313
|
path: string;
|
|
@@ -2323,16 +2323,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2323
2323
|
content: string;
|
|
2324
2324
|
}[];
|
|
2325
2325
|
resetFileVersions: boolean;
|
|
2326
|
+
next_quota_reset?: Date | null | undefined;
|
|
2326
2327
|
usage?: number | undefined;
|
|
2327
2328
|
remainingBalance?: number | undefined;
|
|
2328
2329
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
2329
|
-
next_quota_reset?: Date | null | undefined;
|
|
2330
2330
|
nextMonthlyGrant?: number | undefined;
|
|
2331
2331
|
autoTopupAdded?: number | undefined;
|
|
2332
2332
|
}, {
|
|
2333
2333
|
type: "response-complete";
|
|
2334
|
-
userInputId: string;
|
|
2335
2334
|
response: string;
|
|
2335
|
+
userInputId: string;
|
|
2336
2336
|
changes: {
|
|
2337
2337
|
type: "patch" | "file";
|
|
2338
2338
|
path: string;
|
|
@@ -2348,10 +2348,10 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2348
2348
|
content: string;
|
|
2349
2349
|
}[];
|
|
2350
2350
|
resetFileVersions: boolean;
|
|
2351
|
+
next_quota_reset?: Date | null | undefined;
|
|
2351
2352
|
usage?: number | undefined;
|
|
2352
2353
|
remainingBalance?: number | undefined;
|
|
2353
2354
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
2354
|
-
next_quota_reset?: Date | null | undefined;
|
|
2355
2355
|
nextMonthlyGrant?: number | undefined;
|
|
2356
2356
|
autoTopupAdded?: number | undefined;
|
|
2357
2357
|
}>, z.ZodObject<{
|
|
@@ -2505,17 +2505,17 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2505
2505
|
type: "ephemeral";
|
|
2506
2506
|
}>>;
|
|
2507
2507
|
}, "strip", z.ZodTypeAny, {
|
|
2508
|
-
type: "tool_use";
|
|
2509
|
-
name: string;
|
|
2510
2508
|
id: string;
|
|
2509
|
+
name: string;
|
|
2510
|
+
type: "tool_use";
|
|
2511
2511
|
input: Record<string, any>;
|
|
2512
2512
|
cache_control?: {
|
|
2513
2513
|
type: "ephemeral";
|
|
2514
2514
|
} | undefined;
|
|
2515
2515
|
}, {
|
|
2516
|
-
type: "tool_use";
|
|
2517
|
-
name: string;
|
|
2518
2516
|
id: string;
|
|
2517
|
+
name: string;
|
|
2518
|
+
type: "tool_use";
|
|
2519
2519
|
input: Record<string, any>;
|
|
2520
2520
|
cache_control?: {
|
|
2521
2521
|
type: "ephemeral";
|
|
@@ -2552,13 +2552,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2552
2552
|
media_type: z.ZodLiteral<"image/jpeg">;
|
|
2553
2553
|
data: z.ZodString;
|
|
2554
2554
|
}, "strip", z.ZodTypeAny, {
|
|
2555
|
+
data: string;
|
|
2555
2556
|
type: "base64";
|
|
2556
2557
|
media_type: "image/jpeg";
|
|
2557
|
-
data: string;
|
|
2558
2558
|
}, {
|
|
2559
|
+
data: string;
|
|
2559
2560
|
type: "base64";
|
|
2560
2561
|
media_type: "image/jpeg";
|
|
2561
|
-
data: string;
|
|
2562
2562
|
}>;
|
|
2563
2563
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
2564
2564
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -2570,9 +2570,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2570
2570
|
}, "strip", z.ZodTypeAny, {
|
|
2571
2571
|
type: "image";
|
|
2572
2572
|
source: {
|
|
2573
|
+
data: string;
|
|
2573
2574
|
type: "base64";
|
|
2574
2575
|
media_type: "image/jpeg";
|
|
2575
|
-
data: string;
|
|
2576
2576
|
};
|
|
2577
2577
|
cache_control?: {
|
|
2578
2578
|
type: "ephemeral";
|
|
@@ -2580,9 +2580,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2580
2580
|
}, {
|
|
2581
2581
|
type: "image";
|
|
2582
2582
|
source: {
|
|
2583
|
+
data: string;
|
|
2583
2584
|
type: "base64";
|
|
2584
2585
|
media_type: "image/jpeg";
|
|
2585
|
-
data: string;
|
|
2586
2586
|
};
|
|
2587
2587
|
cache_control?: {
|
|
2588
2588
|
type: "ephemeral";
|
|
@@ -2596,9 +2596,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2596
2596
|
type: "ephemeral";
|
|
2597
2597
|
} | undefined;
|
|
2598
2598
|
} | {
|
|
2599
|
-
type: "tool_use";
|
|
2600
|
-
name: string;
|
|
2601
2599
|
id: string;
|
|
2600
|
+
name: string;
|
|
2601
|
+
type: "tool_use";
|
|
2602
2602
|
input: Record<string, any>;
|
|
2603
2603
|
cache_control?: {
|
|
2604
2604
|
type: "ephemeral";
|
|
@@ -2613,9 +2613,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2613
2613
|
} | {
|
|
2614
2614
|
type: "image";
|
|
2615
2615
|
source: {
|
|
2616
|
+
data: string;
|
|
2616
2617
|
type: "base64";
|
|
2617
2618
|
media_type: "image/jpeg";
|
|
2618
|
-
data: string;
|
|
2619
2619
|
};
|
|
2620
2620
|
cache_control?: {
|
|
2621
2621
|
type: "ephemeral";
|
|
@@ -2630,9 +2630,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2630
2630
|
type: "ephemeral";
|
|
2631
2631
|
} | undefined;
|
|
2632
2632
|
} | {
|
|
2633
|
-
type: "tool_use";
|
|
2634
|
-
name: string;
|
|
2635
2633
|
id: string;
|
|
2634
|
+
name: string;
|
|
2635
|
+
type: "tool_use";
|
|
2636
2636
|
input: Record<string, any>;
|
|
2637
2637
|
cache_control?: {
|
|
2638
2638
|
type: "ephemeral";
|
|
@@ -2647,9 +2647,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2647
2647
|
} | {
|
|
2648
2648
|
type: "image";
|
|
2649
2649
|
source: {
|
|
2650
|
+
data: string;
|
|
2650
2651
|
type: "base64";
|
|
2651
2652
|
media_type: "image/jpeg";
|
|
2652
|
-
data: string;
|
|
2653
2653
|
};
|
|
2654
2654
|
cache_control?: {
|
|
2655
2655
|
type: "ephemeral";
|
|
@@ -2695,9 +2695,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2695
2695
|
type: "ephemeral";
|
|
2696
2696
|
} | undefined;
|
|
2697
2697
|
} | {
|
|
2698
|
-
type: "tool_use";
|
|
2699
|
-
name: string;
|
|
2700
2698
|
id: string;
|
|
2699
|
+
name: string;
|
|
2700
|
+
type: "tool_use";
|
|
2701
2701
|
input: Record<string, any>;
|
|
2702
2702
|
cache_control?: {
|
|
2703
2703
|
type: "ephemeral";
|
|
@@ -2712,9 +2712,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2712
2712
|
} | {
|
|
2713
2713
|
type: "image";
|
|
2714
2714
|
source: {
|
|
2715
|
+
data: string;
|
|
2715
2716
|
type: "base64";
|
|
2716
2717
|
media_type: "image/jpeg";
|
|
2717
|
-
data: string;
|
|
2718
2718
|
};
|
|
2719
2719
|
cache_control?: {
|
|
2720
2720
|
type: "ephemeral";
|
|
@@ -2760,9 +2760,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2760
2760
|
type: "ephemeral";
|
|
2761
2761
|
} | undefined;
|
|
2762
2762
|
} | {
|
|
2763
|
-
type: "tool_use";
|
|
2764
|
-
name: string;
|
|
2765
2763
|
id: string;
|
|
2764
|
+
name: string;
|
|
2765
|
+
type: "tool_use";
|
|
2766
2766
|
input: Record<string, any>;
|
|
2767
2767
|
cache_control?: {
|
|
2768
2768
|
type: "ephemeral";
|
|
@@ -2777,9 +2777,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2777
2777
|
} | {
|
|
2778
2778
|
type: "image";
|
|
2779
2779
|
source: {
|
|
2780
|
+
data: string;
|
|
2780
2781
|
type: "base64";
|
|
2781
2782
|
media_type: "image/jpeg";
|
|
2782
|
-
data: string;
|
|
2783
2783
|
};
|
|
2784
2784
|
cache_control?: {
|
|
2785
2785
|
type: "ephemeral";
|
|
@@ -2794,12 +2794,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2794
2794
|
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2795
2795
|
id: z.ZodString;
|
|
2796
2796
|
}, "strip", z.ZodTypeAny, {
|
|
2797
|
-
name: string;
|
|
2798
2797
|
id: string;
|
|
2798
|
+
name: string;
|
|
2799
2799
|
parameters: Record<string, string>;
|
|
2800
2800
|
}, {
|
|
2801
|
-
name: string;
|
|
2802
2801
|
id: string;
|
|
2802
|
+
name: string;
|
|
2803
2803
|
parameters: Record<string, string>;
|
|
2804
2804
|
}>, "many">;
|
|
2805
2805
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
@@ -2807,12 +2807,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2807
2807
|
result: z.ZodString;
|
|
2808
2808
|
id: z.ZodString;
|
|
2809
2809
|
}, "strip", z.ZodTypeAny, {
|
|
2810
|
-
name: string;
|
|
2811
2810
|
id: string;
|
|
2811
|
+
name: string;
|
|
2812
2812
|
result: string;
|
|
2813
2813
|
}, {
|
|
2814
|
-
name: string;
|
|
2815
2814
|
id: string;
|
|
2815
|
+
name: string;
|
|
2816
2816
|
result: string;
|
|
2817
2817
|
}>, "many">;
|
|
2818
2818
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -2855,9 +2855,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2855
2855
|
type: "ephemeral";
|
|
2856
2856
|
} | undefined;
|
|
2857
2857
|
} | {
|
|
2858
|
-
type: "tool_use";
|
|
2859
|
-
name: string;
|
|
2860
2858
|
id: string;
|
|
2859
|
+
name: string;
|
|
2860
|
+
type: "tool_use";
|
|
2861
2861
|
input: Record<string, any>;
|
|
2862
2862
|
cache_control?: {
|
|
2863
2863
|
type: "ephemeral";
|
|
@@ -2872,9 +2872,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2872
2872
|
} | {
|
|
2873
2873
|
type: "image";
|
|
2874
2874
|
source: {
|
|
2875
|
+
data: string;
|
|
2875
2876
|
type: "base64";
|
|
2876
2877
|
media_type: "image/jpeg";
|
|
2877
|
-
data: string;
|
|
2878
2878
|
};
|
|
2879
2879
|
cache_control?: {
|
|
2880
2880
|
type: "ephemeral";
|
|
@@ -2885,13 +2885,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2885
2885
|
consecutiveAssistantMessages?: number | undefined;
|
|
2886
2886
|
};
|
|
2887
2887
|
toolResults: {
|
|
2888
|
-
name: string;
|
|
2889
2888
|
id: string;
|
|
2889
|
+
name: string;
|
|
2890
2890
|
result: string;
|
|
2891
2891
|
}[];
|
|
2892
2892
|
toolCalls: {
|
|
2893
|
-
name: string;
|
|
2894
2893
|
id: string;
|
|
2894
|
+
name: string;
|
|
2895
2895
|
parameters: Record<string, string>;
|
|
2896
2896
|
}[];
|
|
2897
2897
|
}, {
|
|
@@ -2934,9 +2934,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2934
2934
|
type: "ephemeral";
|
|
2935
2935
|
} | undefined;
|
|
2936
2936
|
} | {
|
|
2937
|
-
type: "tool_use";
|
|
2938
|
-
name: string;
|
|
2939
2937
|
id: string;
|
|
2938
|
+
name: string;
|
|
2939
|
+
type: "tool_use";
|
|
2940
2940
|
input: Record<string, any>;
|
|
2941
2941
|
cache_control?: {
|
|
2942
2942
|
type: "ephemeral";
|
|
@@ -2951,9 +2951,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2951
2951
|
} | {
|
|
2952
2952
|
type: "image";
|
|
2953
2953
|
source: {
|
|
2954
|
+
data: string;
|
|
2954
2955
|
type: "base64";
|
|
2955
2956
|
media_type: "image/jpeg";
|
|
2956
|
-
data: string;
|
|
2957
2957
|
};
|
|
2958
2958
|
cache_control?: {
|
|
2959
2959
|
type: "ephemeral";
|
|
@@ -2964,13 +2964,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2964
2964
|
consecutiveAssistantMessages?: number | undefined;
|
|
2965
2965
|
};
|
|
2966
2966
|
toolResults: {
|
|
2967
|
-
name: string;
|
|
2968
2967
|
id: string;
|
|
2968
|
+
name: string;
|
|
2969
2969
|
result: string;
|
|
2970
2970
|
}[];
|
|
2971
2971
|
toolCalls: {
|
|
2972
|
-
name: string;
|
|
2973
2972
|
id: string;
|
|
2973
|
+
name: string;
|
|
2974
2974
|
parameters: Record<string, string>;
|
|
2975
2975
|
}[];
|
|
2976
2976
|
}>, z.ZodObject<{
|
|
@@ -2994,12 +2994,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
2994
2994
|
id: z.ZodString;
|
|
2995
2995
|
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
2996
2996
|
}, "strip", z.ZodTypeAny, {
|
|
2997
|
-
name: string;
|
|
2998
2997
|
id: string;
|
|
2998
|
+
name: string;
|
|
2999
2999
|
input: Record<string, any>;
|
|
3000
3000
|
}, {
|
|
3001
|
-
name: string;
|
|
3002
3001
|
id: string;
|
|
3002
|
+
name: string;
|
|
3003
3003
|
input: Record<string, any>;
|
|
3004
3004
|
}>;
|
|
3005
3005
|
changes: z.ZodArray<z.ZodObject<{
|
|
@@ -3040,14 +3040,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3040
3040
|
}>, "many">;
|
|
3041
3041
|
resetFileVersions: z.ZodBoolean;
|
|
3042
3042
|
}, "strip", z.ZodTypeAny, {
|
|
3043
|
-
type: "tool-call";
|
|
3044
3043
|
data: {
|
|
3045
|
-
name: string;
|
|
3046
3044
|
id: string;
|
|
3045
|
+
name: string;
|
|
3047
3046
|
input: Record<string, any>;
|
|
3048
3047
|
};
|
|
3049
|
-
|
|
3048
|
+
type: "tool-call";
|
|
3050
3049
|
response: string;
|
|
3050
|
+
userInputId: string;
|
|
3051
3051
|
changes: {
|
|
3052
3052
|
type: "patch" | "file";
|
|
3053
3053
|
path: string;
|
|
@@ -3064,14 +3064,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3064
3064
|
}[];
|
|
3065
3065
|
resetFileVersions: boolean;
|
|
3066
3066
|
}, {
|
|
3067
|
-
type: "tool-call";
|
|
3068
3067
|
data: {
|
|
3069
|
-
name: string;
|
|
3070
3068
|
id: string;
|
|
3069
|
+
name: string;
|
|
3071
3070
|
input: Record<string, any>;
|
|
3072
3071
|
};
|
|
3073
|
-
|
|
3072
|
+
type: "tool-call";
|
|
3074
3073
|
response: string;
|
|
3074
|
+
userInputId: string;
|
|
3075
3075
|
changes: {
|
|
3076
3076
|
type: "patch" | "file";
|
|
3077
3077
|
path: string;
|
|
@@ -3122,18 +3122,18 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3122
3122
|
nextMonthlyGrant: z.ZodNumber;
|
|
3123
3123
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
3124
3124
|
}, "type">>, "strip", z.ZodTypeAny, {
|
|
3125
|
+
next_quota_reset: Date | null;
|
|
3125
3126
|
type: "init-response";
|
|
3126
3127
|
usage: number;
|
|
3127
3128
|
remainingBalance: number;
|
|
3128
|
-
next_quota_reset: Date | null;
|
|
3129
3129
|
nextMonthlyGrant: number;
|
|
3130
3130
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3131
3131
|
autoTopupAdded?: number | undefined;
|
|
3132
3132
|
}, {
|
|
3133
|
+
next_quota_reset: Date | null;
|
|
3133
3134
|
type: "init-response";
|
|
3134
3135
|
usage: number;
|
|
3135
3136
|
remainingBalance: number;
|
|
3136
|
-
next_quota_reset: Date | null;
|
|
3137
3137
|
nextMonthlyGrant: number;
|
|
3138
3138
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3139
3139
|
autoTopupAdded?: number | undefined;
|
|
@@ -3146,18 +3146,18 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3146
3146
|
nextMonthlyGrant: z.ZodNumber;
|
|
3147
3147
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
3148
3148
|
}, "strip", z.ZodTypeAny, {
|
|
3149
|
+
next_quota_reset: Date | null;
|
|
3149
3150
|
type: "usage-response";
|
|
3150
3151
|
usage: number;
|
|
3151
3152
|
remainingBalance: number;
|
|
3152
|
-
next_quota_reset: Date | null;
|
|
3153
3153
|
nextMonthlyGrant: number;
|
|
3154
3154
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3155
3155
|
autoTopupAdded?: number | undefined;
|
|
3156
3156
|
}, {
|
|
3157
|
+
next_quota_reset: Date | null;
|
|
3157
3158
|
type: "usage-response";
|
|
3158
3159
|
usage: number;
|
|
3159
3160
|
remainingBalance: number;
|
|
3160
|
-
next_quota_reset: Date | null;
|
|
3161
3161
|
nextMonthlyGrant: number;
|
|
3162
3162
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3163
3163
|
autoTopupAdded?: number | undefined;
|
|
@@ -3167,12 +3167,12 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3167
3167
|
credits: z.ZodNumber;
|
|
3168
3168
|
}, "strip", z.ZodTypeAny, {
|
|
3169
3169
|
type: "message-cost-response";
|
|
3170
|
-
promptId: string;
|
|
3171
3170
|
credits: number;
|
|
3171
|
+
promptId: string;
|
|
3172
3172
|
}, {
|
|
3173
3173
|
type: "message-cost-response";
|
|
3174
|
-
promptId: string;
|
|
3175
3174
|
credits: number;
|
|
3175
|
+
promptId: string;
|
|
3176
3176
|
}>, z.ZodObject<{
|
|
3177
3177
|
type: z.ZodLiteral<"action-error">;
|
|
3178
3178
|
message: z.ZodString;
|
|
@@ -3181,13 +3181,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3181
3181
|
}, "strip", z.ZodTypeAny, {
|
|
3182
3182
|
type: "action-error";
|
|
3183
3183
|
message: string;
|
|
3184
|
-
remainingBalance?: number | undefined;
|
|
3185
3184
|
error?: string | undefined;
|
|
3185
|
+
remainingBalance?: number | undefined;
|
|
3186
3186
|
}, {
|
|
3187
3187
|
type: "action-error";
|
|
3188
3188
|
message: string;
|
|
3189
|
-
remainingBalance?: number | undefined;
|
|
3190
3189
|
error?: string | undefined;
|
|
3190
|
+
remainingBalance?: number | undefined;
|
|
3191
3191
|
}>, z.ZodObject<{
|
|
3192
3192
|
type: z.ZodLiteral<"commit-message-response">;
|
|
3193
3193
|
commitMessage: z.ZodString;
|
|
@@ -3199,27 +3199,26 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3199
3199
|
commitMessage: string;
|
|
3200
3200
|
}>]>;
|
|
3201
3201
|
}, "strip", z.ZodTypeAny, {
|
|
3202
|
-
type: "action";
|
|
3203
3202
|
data: {
|
|
3203
|
+
next_quota_reset: Date | null;
|
|
3204
3204
|
type: "usage-response";
|
|
3205
3205
|
usage: number;
|
|
3206
3206
|
remainingBalance: number;
|
|
3207
|
-
next_quota_reset: Date | null;
|
|
3208
3207
|
nextMonthlyGrant: number;
|
|
3209
3208
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3210
3209
|
autoTopupAdded?: number | undefined;
|
|
3211
3210
|
} | {
|
|
3211
|
+
next_quota_reset: Date | null;
|
|
3212
3212
|
type: "init-response";
|
|
3213
3213
|
usage: number;
|
|
3214
3214
|
remainingBalance: number;
|
|
3215
|
-
next_quota_reset: Date | null;
|
|
3216
3215
|
nextMonthlyGrant: number;
|
|
3217
3216
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3218
3217
|
autoTopupAdded?: number | undefined;
|
|
3219
3218
|
} | {
|
|
3220
3219
|
type: "response-complete";
|
|
3221
|
-
userInputId: string;
|
|
3222
3220
|
response: string;
|
|
3221
|
+
userInputId: string;
|
|
3223
3222
|
changes: {
|
|
3224
3223
|
type: "patch" | "file";
|
|
3225
3224
|
path: string;
|
|
@@ -3235,16 +3234,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3235
3234
|
content: string;
|
|
3236
3235
|
}[];
|
|
3237
3236
|
resetFileVersions: boolean;
|
|
3237
|
+
next_quota_reset?: Date | null | undefined;
|
|
3238
3238
|
usage?: number | undefined;
|
|
3239
3239
|
remainingBalance?: number | undefined;
|
|
3240
3240
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3241
|
-
next_quota_reset?: Date | null | undefined;
|
|
3242
3241
|
nextMonthlyGrant?: number | undefined;
|
|
3243
3242
|
autoTopupAdded?: number | undefined;
|
|
3244
3243
|
} | {
|
|
3245
3244
|
type: "message-cost-response";
|
|
3246
|
-
promptId: string;
|
|
3247
3245
|
credits: number;
|
|
3246
|
+
promptId: string;
|
|
3248
3247
|
} | {
|
|
3249
3248
|
type: "prompt-response";
|
|
3250
3249
|
promptId: string;
|
|
@@ -3285,9 +3284,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3285
3284
|
type: "ephemeral";
|
|
3286
3285
|
} | undefined;
|
|
3287
3286
|
} | {
|
|
3288
|
-
type: "tool_use";
|
|
3289
|
-
name: string;
|
|
3290
3287
|
id: string;
|
|
3288
|
+
name: string;
|
|
3289
|
+
type: "tool_use";
|
|
3291
3290
|
input: Record<string, any>;
|
|
3292
3291
|
cache_control?: {
|
|
3293
3292
|
type: "ephemeral";
|
|
@@ -3302,9 +3301,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3302
3301
|
} | {
|
|
3303
3302
|
type: "image";
|
|
3304
3303
|
source: {
|
|
3304
|
+
data: string;
|
|
3305
3305
|
type: "base64";
|
|
3306
3306
|
media_type: "image/jpeg";
|
|
3307
|
-
data: string;
|
|
3308
3307
|
};
|
|
3309
3308
|
cache_control?: {
|
|
3310
3309
|
type: "ephemeral";
|
|
@@ -3315,13 +3314,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3315
3314
|
consecutiveAssistantMessages?: number | undefined;
|
|
3316
3315
|
};
|
|
3317
3316
|
toolResults: {
|
|
3318
|
-
name: string;
|
|
3319
3317
|
id: string;
|
|
3318
|
+
name: string;
|
|
3320
3319
|
result: string;
|
|
3321
3320
|
}[];
|
|
3322
3321
|
toolCalls: {
|
|
3323
|
-
name: string;
|
|
3324
3322
|
id: string;
|
|
3323
|
+
name: string;
|
|
3325
3324
|
parameters: Record<string, string>;
|
|
3326
3325
|
}[];
|
|
3327
3326
|
} | {
|
|
@@ -3333,14 +3332,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3333
3332
|
requestId: string;
|
|
3334
3333
|
filePaths: string[];
|
|
3335
3334
|
} | {
|
|
3336
|
-
type: "tool-call";
|
|
3337
3335
|
data: {
|
|
3338
|
-
name: string;
|
|
3339
3336
|
id: string;
|
|
3337
|
+
name: string;
|
|
3340
3338
|
input: Record<string, any>;
|
|
3341
3339
|
};
|
|
3342
|
-
|
|
3340
|
+
type: "tool-call";
|
|
3343
3341
|
response: string;
|
|
3342
|
+
userInputId: string;
|
|
3344
3343
|
changes: {
|
|
3345
3344
|
type: "patch" | "file";
|
|
3346
3345
|
path: string;
|
|
@@ -3367,34 +3366,34 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3367
3366
|
} | {
|
|
3368
3367
|
type: "action-error";
|
|
3369
3368
|
message: string;
|
|
3370
|
-
remainingBalance?: number | undefined;
|
|
3371
3369
|
error?: string | undefined;
|
|
3370
|
+
remainingBalance?: number | undefined;
|
|
3372
3371
|
} | {
|
|
3373
3372
|
type: "commit-message-response";
|
|
3374
3373
|
commitMessage: string;
|
|
3375
3374
|
};
|
|
3376
|
-
}, {
|
|
3377
3375
|
type: "action";
|
|
3376
|
+
}, {
|
|
3378
3377
|
data: {
|
|
3378
|
+
next_quota_reset: Date | null;
|
|
3379
3379
|
type: "usage-response";
|
|
3380
3380
|
usage: number;
|
|
3381
3381
|
remainingBalance: number;
|
|
3382
|
-
next_quota_reset: Date | null;
|
|
3383
3382
|
nextMonthlyGrant: number;
|
|
3384
3383
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3385
3384
|
autoTopupAdded?: number | undefined;
|
|
3386
3385
|
} | {
|
|
3386
|
+
next_quota_reset: Date | null;
|
|
3387
3387
|
type: "init-response";
|
|
3388
3388
|
usage: number;
|
|
3389
3389
|
remainingBalance: number;
|
|
3390
|
-
next_quota_reset: Date | null;
|
|
3391
3390
|
nextMonthlyGrant: number;
|
|
3392
3391
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3393
3392
|
autoTopupAdded?: number | undefined;
|
|
3394
3393
|
} | {
|
|
3395
3394
|
type: "response-complete";
|
|
3396
|
-
userInputId: string;
|
|
3397
3395
|
response: string;
|
|
3396
|
+
userInputId: string;
|
|
3398
3397
|
changes: {
|
|
3399
3398
|
type: "patch" | "file";
|
|
3400
3399
|
path: string;
|
|
@@ -3410,16 +3409,16 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3410
3409
|
content: string;
|
|
3411
3410
|
}[];
|
|
3412
3411
|
resetFileVersions: boolean;
|
|
3412
|
+
next_quota_reset?: Date | null | undefined;
|
|
3413
3413
|
usage?: number | undefined;
|
|
3414
3414
|
remainingBalance?: number | undefined;
|
|
3415
3415
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3416
|
-
next_quota_reset?: Date | null | undefined;
|
|
3417
3416
|
nextMonthlyGrant?: number | undefined;
|
|
3418
3417
|
autoTopupAdded?: number | undefined;
|
|
3419
3418
|
} | {
|
|
3420
3419
|
type: "message-cost-response";
|
|
3421
|
-
promptId: string;
|
|
3422
3420
|
credits: number;
|
|
3421
|
+
promptId: string;
|
|
3423
3422
|
} | {
|
|
3424
3423
|
type: "prompt-response";
|
|
3425
3424
|
promptId: string;
|
|
@@ -3460,9 +3459,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3460
3459
|
type: "ephemeral";
|
|
3461
3460
|
} | undefined;
|
|
3462
3461
|
} | {
|
|
3463
|
-
type: "tool_use";
|
|
3464
|
-
name: string;
|
|
3465
3462
|
id: string;
|
|
3463
|
+
name: string;
|
|
3464
|
+
type: "tool_use";
|
|
3466
3465
|
input: Record<string, any>;
|
|
3467
3466
|
cache_control?: {
|
|
3468
3467
|
type: "ephemeral";
|
|
@@ -3477,9 +3476,9 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3477
3476
|
} | {
|
|
3478
3477
|
type: "image";
|
|
3479
3478
|
source: {
|
|
3479
|
+
data: string;
|
|
3480
3480
|
type: "base64";
|
|
3481
3481
|
media_type: "image/jpeg";
|
|
3482
|
-
data: string;
|
|
3483
3482
|
};
|
|
3484
3483
|
cache_control?: {
|
|
3485
3484
|
type: "ephemeral";
|
|
@@ -3490,13 +3489,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3490
3489
|
consecutiveAssistantMessages?: number | undefined;
|
|
3491
3490
|
};
|
|
3492
3491
|
toolResults: {
|
|
3493
|
-
name: string;
|
|
3494
3492
|
id: string;
|
|
3493
|
+
name: string;
|
|
3495
3494
|
result: string;
|
|
3496
3495
|
}[];
|
|
3497
3496
|
toolCalls: {
|
|
3498
|
-
name: string;
|
|
3499
3497
|
id: string;
|
|
3498
|
+
name: string;
|
|
3500
3499
|
parameters: Record<string, string>;
|
|
3501
3500
|
}[];
|
|
3502
3501
|
} | {
|
|
@@ -3508,14 +3507,14 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3508
3507
|
requestId: string;
|
|
3509
3508
|
filePaths: string[];
|
|
3510
3509
|
} | {
|
|
3511
|
-
type: "tool-call";
|
|
3512
3510
|
data: {
|
|
3513
|
-
name: string;
|
|
3514
3511
|
id: string;
|
|
3512
|
+
name: string;
|
|
3515
3513
|
input: Record<string, any>;
|
|
3516
3514
|
};
|
|
3517
|
-
|
|
3515
|
+
type: "tool-call";
|
|
3518
3516
|
response: string;
|
|
3517
|
+
userInputId: string;
|
|
3519
3518
|
changes: {
|
|
3520
3519
|
type: "patch" | "file";
|
|
3521
3520
|
path: string;
|
|
@@ -3542,12 +3541,13 @@ export declare const SERVER_MESSAGE_SCHEMAS: {
|
|
|
3542
3541
|
} | {
|
|
3543
3542
|
type: "action-error";
|
|
3544
3543
|
message: string;
|
|
3545
|
-
remainingBalance?: number | undefined;
|
|
3546
3544
|
error?: string | undefined;
|
|
3545
|
+
remainingBalance?: number | undefined;
|
|
3547
3546
|
} | {
|
|
3548
3547
|
type: "commit-message-response";
|
|
3549
3548
|
commitMessage: string;
|
|
3550
3549
|
};
|
|
3550
|
+
type: "action";
|
|
3551
3551
|
}>;
|
|
3552
3552
|
};
|
|
3553
3553
|
export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
@@ -3621,16 +3621,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3621
3621
|
}>, "many">;
|
|
3622
3622
|
resetFileVersions: z.ZodBoolean;
|
|
3623
3623
|
}, {
|
|
3624
|
+
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
3624
3625
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
3625
3626
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
3626
3627
|
balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<[import("../types/grant").GrantType, ...import("../types/grant").GrantType[]]>, z.ZodNumber>>>;
|
|
3627
|
-
next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
3628
3628
|
nextMonthlyGrant: z.ZodOptional<z.ZodNumber>;
|
|
3629
3629
|
autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
3630
3630
|
}>, "strip", z.ZodTypeAny, {
|
|
3631
3631
|
type: "response-complete";
|
|
3632
|
-
userInputId: string;
|
|
3633
3632
|
response: string;
|
|
3633
|
+
userInputId: string;
|
|
3634
3634
|
changes: {
|
|
3635
3635
|
type: "patch" | "file";
|
|
3636
3636
|
path: string;
|
|
@@ -3646,16 +3646,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3646
3646
|
content: string;
|
|
3647
3647
|
}[];
|
|
3648
3648
|
resetFileVersions: boolean;
|
|
3649
|
+
next_quota_reset?: Date | null | undefined;
|
|
3649
3650
|
usage?: number | undefined;
|
|
3650
3651
|
remainingBalance?: number | undefined;
|
|
3651
3652
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3652
|
-
next_quota_reset?: Date | null | undefined;
|
|
3653
3653
|
nextMonthlyGrant?: number | undefined;
|
|
3654
3654
|
autoTopupAdded?: number | undefined;
|
|
3655
3655
|
}, {
|
|
3656
3656
|
type: "response-complete";
|
|
3657
|
-
userInputId: string;
|
|
3658
3657
|
response: string;
|
|
3658
|
+
userInputId: string;
|
|
3659
3659
|
changes: {
|
|
3660
3660
|
type: "patch" | "file";
|
|
3661
3661
|
path: string;
|
|
@@ -3671,10 +3671,10 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3671
3671
|
content: string;
|
|
3672
3672
|
}[];
|
|
3673
3673
|
resetFileVersions: boolean;
|
|
3674
|
+
next_quota_reset?: Date | null | undefined;
|
|
3674
3675
|
usage?: number | undefined;
|
|
3675
3676
|
remainingBalance?: number | undefined;
|
|
3676
3677
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
3677
|
-
next_quota_reset?: Date | null | undefined;
|
|
3678
3678
|
nextMonthlyGrant?: number | undefined;
|
|
3679
3679
|
autoTopupAdded?: number | undefined;
|
|
3680
3680
|
}>, z.ZodObject<{
|
|
@@ -3828,17 +3828,17 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3828
3828
|
type: "ephemeral";
|
|
3829
3829
|
}>>;
|
|
3830
3830
|
}, "strip", z.ZodTypeAny, {
|
|
3831
|
-
type: "tool_use";
|
|
3832
|
-
name: string;
|
|
3833
3831
|
id: string;
|
|
3832
|
+
name: string;
|
|
3833
|
+
type: "tool_use";
|
|
3834
3834
|
input: Record<string, any>;
|
|
3835
3835
|
cache_control?: {
|
|
3836
3836
|
type: "ephemeral";
|
|
3837
3837
|
} | undefined;
|
|
3838
3838
|
}, {
|
|
3839
|
-
type: "tool_use";
|
|
3840
|
-
name: string;
|
|
3841
3839
|
id: string;
|
|
3840
|
+
name: string;
|
|
3841
|
+
type: "tool_use";
|
|
3842
3842
|
input: Record<string, any>;
|
|
3843
3843
|
cache_control?: {
|
|
3844
3844
|
type: "ephemeral";
|
|
@@ -3875,13 +3875,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3875
3875
|
media_type: z.ZodLiteral<"image/jpeg">;
|
|
3876
3876
|
data: z.ZodString;
|
|
3877
3877
|
}, "strip", z.ZodTypeAny, {
|
|
3878
|
+
data: string;
|
|
3878
3879
|
type: "base64";
|
|
3879
3880
|
media_type: "image/jpeg";
|
|
3880
|
-
data: string;
|
|
3881
3881
|
}, {
|
|
3882
|
+
data: string;
|
|
3882
3883
|
type: "base64";
|
|
3883
3884
|
media_type: "image/jpeg";
|
|
3884
|
-
data: string;
|
|
3885
3885
|
}>;
|
|
3886
3886
|
cache_control: z.ZodOptional<z.ZodObject<{
|
|
3887
3887
|
type: z.ZodLiteral<"ephemeral">;
|
|
@@ -3893,9 +3893,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3893
3893
|
}, "strip", z.ZodTypeAny, {
|
|
3894
3894
|
type: "image";
|
|
3895
3895
|
source: {
|
|
3896
|
+
data: string;
|
|
3896
3897
|
type: "base64";
|
|
3897
3898
|
media_type: "image/jpeg";
|
|
3898
|
-
data: string;
|
|
3899
3899
|
};
|
|
3900
3900
|
cache_control?: {
|
|
3901
3901
|
type: "ephemeral";
|
|
@@ -3903,9 +3903,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3903
3903
|
}, {
|
|
3904
3904
|
type: "image";
|
|
3905
3905
|
source: {
|
|
3906
|
+
data: string;
|
|
3906
3907
|
type: "base64";
|
|
3907
3908
|
media_type: "image/jpeg";
|
|
3908
|
-
data: string;
|
|
3909
3909
|
};
|
|
3910
3910
|
cache_control?: {
|
|
3911
3911
|
type: "ephemeral";
|
|
@@ -3919,9 +3919,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3919
3919
|
type: "ephemeral";
|
|
3920
3920
|
} | undefined;
|
|
3921
3921
|
} | {
|
|
3922
|
-
type: "tool_use";
|
|
3923
|
-
name: string;
|
|
3924
3922
|
id: string;
|
|
3923
|
+
name: string;
|
|
3924
|
+
type: "tool_use";
|
|
3925
3925
|
input: Record<string, any>;
|
|
3926
3926
|
cache_control?: {
|
|
3927
3927
|
type: "ephemeral";
|
|
@@ -3936,9 +3936,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3936
3936
|
} | {
|
|
3937
3937
|
type: "image";
|
|
3938
3938
|
source: {
|
|
3939
|
+
data: string;
|
|
3939
3940
|
type: "base64";
|
|
3940
3941
|
media_type: "image/jpeg";
|
|
3941
|
-
data: string;
|
|
3942
3942
|
};
|
|
3943
3943
|
cache_control?: {
|
|
3944
3944
|
type: "ephemeral";
|
|
@@ -3953,9 +3953,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3953
3953
|
type: "ephemeral";
|
|
3954
3954
|
} | undefined;
|
|
3955
3955
|
} | {
|
|
3956
|
-
type: "tool_use";
|
|
3957
|
-
name: string;
|
|
3958
3956
|
id: string;
|
|
3957
|
+
name: string;
|
|
3958
|
+
type: "tool_use";
|
|
3959
3959
|
input: Record<string, any>;
|
|
3960
3960
|
cache_control?: {
|
|
3961
3961
|
type: "ephemeral";
|
|
@@ -3970,9 +3970,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
3970
3970
|
} | {
|
|
3971
3971
|
type: "image";
|
|
3972
3972
|
source: {
|
|
3973
|
+
data: string;
|
|
3973
3974
|
type: "base64";
|
|
3974
3975
|
media_type: "image/jpeg";
|
|
3975
|
-
data: string;
|
|
3976
3976
|
};
|
|
3977
3977
|
cache_control?: {
|
|
3978
3978
|
type: "ephemeral";
|
|
@@ -4018,9 +4018,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4018
4018
|
type: "ephemeral";
|
|
4019
4019
|
} | undefined;
|
|
4020
4020
|
} | {
|
|
4021
|
-
type: "tool_use";
|
|
4022
|
-
name: string;
|
|
4023
4021
|
id: string;
|
|
4022
|
+
name: string;
|
|
4023
|
+
type: "tool_use";
|
|
4024
4024
|
input: Record<string, any>;
|
|
4025
4025
|
cache_control?: {
|
|
4026
4026
|
type: "ephemeral";
|
|
@@ -4035,9 +4035,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4035
4035
|
} | {
|
|
4036
4036
|
type: "image";
|
|
4037
4037
|
source: {
|
|
4038
|
+
data: string;
|
|
4038
4039
|
type: "base64";
|
|
4039
4040
|
media_type: "image/jpeg";
|
|
4040
|
-
data: string;
|
|
4041
4041
|
};
|
|
4042
4042
|
cache_control?: {
|
|
4043
4043
|
type: "ephemeral";
|
|
@@ -4083,9 +4083,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4083
4083
|
type: "ephemeral";
|
|
4084
4084
|
} | undefined;
|
|
4085
4085
|
} | {
|
|
4086
|
-
type: "tool_use";
|
|
4087
|
-
name: string;
|
|
4088
4086
|
id: string;
|
|
4087
|
+
name: string;
|
|
4088
|
+
type: "tool_use";
|
|
4089
4089
|
input: Record<string, any>;
|
|
4090
4090
|
cache_control?: {
|
|
4091
4091
|
type: "ephemeral";
|
|
@@ -4100,9 +4100,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4100
4100
|
} | {
|
|
4101
4101
|
type: "image";
|
|
4102
4102
|
source: {
|
|
4103
|
+
data: string;
|
|
4103
4104
|
type: "base64";
|
|
4104
4105
|
media_type: "image/jpeg";
|
|
4105
|
-
data: string;
|
|
4106
4106
|
};
|
|
4107
4107
|
cache_control?: {
|
|
4108
4108
|
type: "ephemeral";
|
|
@@ -4117,12 +4117,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4117
4117
|
parameters: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
4118
4118
|
id: z.ZodString;
|
|
4119
4119
|
}, "strip", z.ZodTypeAny, {
|
|
4120
|
-
name: string;
|
|
4121
4120
|
id: string;
|
|
4121
|
+
name: string;
|
|
4122
4122
|
parameters: Record<string, string>;
|
|
4123
4123
|
}, {
|
|
4124
|
-
name: string;
|
|
4125
4124
|
id: string;
|
|
4125
|
+
name: string;
|
|
4126
4126
|
parameters: Record<string, string>;
|
|
4127
4127
|
}>, "many">;
|
|
4128
4128
|
toolResults: z.ZodArray<z.ZodObject<{
|
|
@@ -4130,12 +4130,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4130
4130
|
result: z.ZodString;
|
|
4131
4131
|
id: z.ZodString;
|
|
4132
4132
|
}, "strip", z.ZodTypeAny, {
|
|
4133
|
-
name: string;
|
|
4134
4133
|
id: string;
|
|
4134
|
+
name: string;
|
|
4135
4135
|
result: string;
|
|
4136
4136
|
}, {
|
|
4137
|
-
name: string;
|
|
4138
4137
|
id: string;
|
|
4138
|
+
name: string;
|
|
4139
4139
|
result: string;
|
|
4140
4140
|
}>, "many">;
|
|
4141
4141
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4178,9 +4178,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4178
4178
|
type: "ephemeral";
|
|
4179
4179
|
} | undefined;
|
|
4180
4180
|
} | {
|
|
4181
|
-
type: "tool_use";
|
|
4182
|
-
name: string;
|
|
4183
4181
|
id: string;
|
|
4182
|
+
name: string;
|
|
4183
|
+
type: "tool_use";
|
|
4184
4184
|
input: Record<string, any>;
|
|
4185
4185
|
cache_control?: {
|
|
4186
4186
|
type: "ephemeral";
|
|
@@ -4195,9 +4195,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4195
4195
|
} | {
|
|
4196
4196
|
type: "image";
|
|
4197
4197
|
source: {
|
|
4198
|
+
data: string;
|
|
4198
4199
|
type: "base64";
|
|
4199
4200
|
media_type: "image/jpeg";
|
|
4200
|
-
data: string;
|
|
4201
4201
|
};
|
|
4202
4202
|
cache_control?: {
|
|
4203
4203
|
type: "ephemeral";
|
|
@@ -4208,13 +4208,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4208
4208
|
consecutiveAssistantMessages?: number | undefined;
|
|
4209
4209
|
};
|
|
4210
4210
|
toolResults: {
|
|
4211
|
-
name: string;
|
|
4212
4211
|
id: string;
|
|
4212
|
+
name: string;
|
|
4213
4213
|
result: string;
|
|
4214
4214
|
}[];
|
|
4215
4215
|
toolCalls: {
|
|
4216
|
-
name: string;
|
|
4217
4216
|
id: string;
|
|
4217
|
+
name: string;
|
|
4218
4218
|
parameters: Record<string, string>;
|
|
4219
4219
|
}[];
|
|
4220
4220
|
}, {
|
|
@@ -4257,9 +4257,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4257
4257
|
type: "ephemeral";
|
|
4258
4258
|
} | undefined;
|
|
4259
4259
|
} | {
|
|
4260
|
-
type: "tool_use";
|
|
4261
|
-
name: string;
|
|
4262
4260
|
id: string;
|
|
4261
|
+
name: string;
|
|
4262
|
+
type: "tool_use";
|
|
4263
4263
|
input: Record<string, any>;
|
|
4264
4264
|
cache_control?: {
|
|
4265
4265
|
type: "ephemeral";
|
|
@@ -4274,9 +4274,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4274
4274
|
} | {
|
|
4275
4275
|
type: "image";
|
|
4276
4276
|
source: {
|
|
4277
|
+
data: string;
|
|
4277
4278
|
type: "base64";
|
|
4278
4279
|
media_type: "image/jpeg";
|
|
4279
|
-
data: string;
|
|
4280
4280
|
};
|
|
4281
4281
|
cache_control?: {
|
|
4282
4282
|
type: "ephemeral";
|
|
@@ -4287,13 +4287,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4287
4287
|
consecutiveAssistantMessages?: number | undefined;
|
|
4288
4288
|
};
|
|
4289
4289
|
toolResults: {
|
|
4290
|
-
name: string;
|
|
4291
4290
|
id: string;
|
|
4291
|
+
name: string;
|
|
4292
4292
|
result: string;
|
|
4293
4293
|
}[];
|
|
4294
4294
|
toolCalls: {
|
|
4295
|
-
name: string;
|
|
4296
4295
|
id: string;
|
|
4296
|
+
name: string;
|
|
4297
4297
|
parameters: Record<string, string>;
|
|
4298
4298
|
}[];
|
|
4299
4299
|
}>, z.ZodObject<{
|
|
@@ -4317,12 +4317,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4317
4317
|
id: z.ZodString;
|
|
4318
4318
|
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
4319
4319
|
}, "strip", z.ZodTypeAny, {
|
|
4320
|
-
name: string;
|
|
4321
4320
|
id: string;
|
|
4321
|
+
name: string;
|
|
4322
4322
|
input: Record<string, any>;
|
|
4323
4323
|
}, {
|
|
4324
|
-
name: string;
|
|
4325
4324
|
id: string;
|
|
4325
|
+
name: string;
|
|
4326
4326
|
input: Record<string, any>;
|
|
4327
4327
|
}>;
|
|
4328
4328
|
changes: z.ZodArray<z.ZodObject<{
|
|
@@ -4363,14 +4363,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4363
4363
|
}>, "many">;
|
|
4364
4364
|
resetFileVersions: z.ZodBoolean;
|
|
4365
4365
|
}, "strip", z.ZodTypeAny, {
|
|
4366
|
-
type: "tool-call";
|
|
4367
4366
|
data: {
|
|
4368
|
-
name: string;
|
|
4369
4367
|
id: string;
|
|
4368
|
+
name: string;
|
|
4370
4369
|
input: Record<string, any>;
|
|
4371
4370
|
};
|
|
4372
|
-
|
|
4371
|
+
type: "tool-call";
|
|
4373
4372
|
response: string;
|
|
4373
|
+
userInputId: string;
|
|
4374
4374
|
changes: {
|
|
4375
4375
|
type: "patch" | "file";
|
|
4376
4376
|
path: string;
|
|
@@ -4387,14 +4387,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4387
4387
|
}[];
|
|
4388
4388
|
resetFileVersions: boolean;
|
|
4389
4389
|
}, {
|
|
4390
|
-
type: "tool-call";
|
|
4391
4390
|
data: {
|
|
4392
|
-
name: string;
|
|
4393
4391
|
id: string;
|
|
4392
|
+
name: string;
|
|
4394
4393
|
input: Record<string, any>;
|
|
4395
4394
|
};
|
|
4396
|
-
|
|
4395
|
+
type: "tool-call";
|
|
4397
4396
|
response: string;
|
|
4397
|
+
userInputId: string;
|
|
4398
4398
|
changes: {
|
|
4399
4399
|
type: "patch" | "file";
|
|
4400
4400
|
path: string;
|
|
@@ -4445,18 +4445,18 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4445
4445
|
nextMonthlyGrant: z.ZodNumber;
|
|
4446
4446
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
4447
4447
|
}, "type">>, "strip", z.ZodTypeAny, {
|
|
4448
|
+
next_quota_reset: Date | null;
|
|
4448
4449
|
type: "init-response";
|
|
4449
4450
|
usage: number;
|
|
4450
4451
|
remainingBalance: number;
|
|
4451
|
-
next_quota_reset: Date | null;
|
|
4452
4452
|
nextMonthlyGrant: number;
|
|
4453
4453
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4454
4454
|
autoTopupAdded?: number | undefined;
|
|
4455
4455
|
}, {
|
|
4456
|
+
next_quota_reset: Date | null;
|
|
4456
4457
|
type: "init-response";
|
|
4457
4458
|
usage: number;
|
|
4458
4459
|
remainingBalance: number;
|
|
4459
|
-
next_quota_reset: Date | null;
|
|
4460
4460
|
nextMonthlyGrant: number;
|
|
4461
4461
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4462
4462
|
autoTopupAdded?: number | undefined;
|
|
@@ -4469,18 +4469,18 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4469
4469
|
nextMonthlyGrant: z.ZodNumber;
|
|
4470
4470
|
autoTopupAdded: z.ZodOptional<z.ZodNumber>;
|
|
4471
4471
|
}, "strip", z.ZodTypeAny, {
|
|
4472
|
+
next_quota_reset: Date | null;
|
|
4472
4473
|
type: "usage-response";
|
|
4473
4474
|
usage: number;
|
|
4474
4475
|
remainingBalance: number;
|
|
4475
|
-
next_quota_reset: Date | null;
|
|
4476
4476
|
nextMonthlyGrant: number;
|
|
4477
4477
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4478
4478
|
autoTopupAdded?: number | undefined;
|
|
4479
4479
|
}, {
|
|
4480
|
+
next_quota_reset: Date | null;
|
|
4480
4481
|
type: "usage-response";
|
|
4481
4482
|
usage: number;
|
|
4482
4483
|
remainingBalance: number;
|
|
4483
|
-
next_quota_reset: Date | null;
|
|
4484
4484
|
nextMonthlyGrant: number;
|
|
4485
4485
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4486
4486
|
autoTopupAdded?: number | undefined;
|
|
@@ -4490,12 +4490,12 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4490
4490
|
credits: z.ZodNumber;
|
|
4491
4491
|
}, "strip", z.ZodTypeAny, {
|
|
4492
4492
|
type: "message-cost-response";
|
|
4493
|
-
promptId: string;
|
|
4494
4493
|
credits: number;
|
|
4494
|
+
promptId: string;
|
|
4495
4495
|
}, {
|
|
4496
4496
|
type: "message-cost-response";
|
|
4497
|
-
promptId: string;
|
|
4498
4497
|
credits: number;
|
|
4498
|
+
promptId: string;
|
|
4499
4499
|
}>, z.ZodObject<{
|
|
4500
4500
|
type: z.ZodLiteral<"action-error">;
|
|
4501
4501
|
message: z.ZodString;
|
|
@@ -4504,13 +4504,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4504
4504
|
}, "strip", z.ZodTypeAny, {
|
|
4505
4505
|
type: "action-error";
|
|
4506
4506
|
message: string;
|
|
4507
|
-
remainingBalance?: number | undefined;
|
|
4508
4507
|
error?: string | undefined;
|
|
4508
|
+
remainingBalance?: number | undefined;
|
|
4509
4509
|
}, {
|
|
4510
4510
|
type: "action-error";
|
|
4511
4511
|
message: string;
|
|
4512
|
-
remainingBalance?: number | undefined;
|
|
4513
4512
|
error?: string | undefined;
|
|
4513
|
+
remainingBalance?: number | undefined;
|
|
4514
4514
|
}>, z.ZodObject<{
|
|
4515
4515
|
type: z.ZodLiteral<"commit-message-response">;
|
|
4516
4516
|
commitMessage: z.ZodString;
|
|
@@ -4522,27 +4522,26 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4522
4522
|
commitMessage: string;
|
|
4523
4523
|
}>]>;
|
|
4524
4524
|
}, "strip", z.ZodTypeAny, {
|
|
4525
|
-
type: "action";
|
|
4526
4525
|
data: {
|
|
4526
|
+
next_quota_reset: Date | null;
|
|
4527
4527
|
type: "usage-response";
|
|
4528
4528
|
usage: number;
|
|
4529
4529
|
remainingBalance: number;
|
|
4530
|
-
next_quota_reset: Date | null;
|
|
4531
4530
|
nextMonthlyGrant: number;
|
|
4532
4531
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4533
4532
|
autoTopupAdded?: number | undefined;
|
|
4534
4533
|
} | {
|
|
4534
|
+
next_quota_reset: Date | null;
|
|
4535
4535
|
type: "init-response";
|
|
4536
4536
|
usage: number;
|
|
4537
4537
|
remainingBalance: number;
|
|
4538
|
-
next_quota_reset: Date | null;
|
|
4539
4538
|
nextMonthlyGrant: number;
|
|
4540
4539
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4541
4540
|
autoTopupAdded?: number | undefined;
|
|
4542
4541
|
} | {
|
|
4543
4542
|
type: "response-complete";
|
|
4544
|
-
userInputId: string;
|
|
4545
4543
|
response: string;
|
|
4544
|
+
userInputId: string;
|
|
4546
4545
|
changes: {
|
|
4547
4546
|
type: "patch" | "file";
|
|
4548
4547
|
path: string;
|
|
@@ -4558,16 +4557,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4558
4557
|
content: string;
|
|
4559
4558
|
}[];
|
|
4560
4559
|
resetFileVersions: boolean;
|
|
4560
|
+
next_quota_reset?: Date | null | undefined;
|
|
4561
4561
|
usage?: number | undefined;
|
|
4562
4562
|
remainingBalance?: number | undefined;
|
|
4563
4563
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4564
|
-
next_quota_reset?: Date | null | undefined;
|
|
4565
4564
|
nextMonthlyGrant?: number | undefined;
|
|
4566
4565
|
autoTopupAdded?: number | undefined;
|
|
4567
4566
|
} | {
|
|
4568
4567
|
type: "message-cost-response";
|
|
4569
|
-
promptId: string;
|
|
4570
4568
|
credits: number;
|
|
4569
|
+
promptId: string;
|
|
4571
4570
|
} | {
|
|
4572
4571
|
type: "prompt-response";
|
|
4573
4572
|
promptId: string;
|
|
@@ -4608,9 +4607,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4608
4607
|
type: "ephemeral";
|
|
4609
4608
|
} | undefined;
|
|
4610
4609
|
} | {
|
|
4611
|
-
type: "tool_use";
|
|
4612
|
-
name: string;
|
|
4613
4610
|
id: string;
|
|
4611
|
+
name: string;
|
|
4612
|
+
type: "tool_use";
|
|
4614
4613
|
input: Record<string, any>;
|
|
4615
4614
|
cache_control?: {
|
|
4616
4615
|
type: "ephemeral";
|
|
@@ -4625,9 +4624,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4625
4624
|
} | {
|
|
4626
4625
|
type: "image";
|
|
4627
4626
|
source: {
|
|
4627
|
+
data: string;
|
|
4628
4628
|
type: "base64";
|
|
4629
4629
|
media_type: "image/jpeg";
|
|
4630
|
-
data: string;
|
|
4631
4630
|
};
|
|
4632
4631
|
cache_control?: {
|
|
4633
4632
|
type: "ephemeral";
|
|
@@ -4638,13 +4637,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4638
4637
|
consecutiveAssistantMessages?: number | undefined;
|
|
4639
4638
|
};
|
|
4640
4639
|
toolResults: {
|
|
4641
|
-
name: string;
|
|
4642
4640
|
id: string;
|
|
4641
|
+
name: string;
|
|
4643
4642
|
result: string;
|
|
4644
4643
|
}[];
|
|
4645
4644
|
toolCalls: {
|
|
4646
|
-
name: string;
|
|
4647
4645
|
id: string;
|
|
4646
|
+
name: string;
|
|
4648
4647
|
parameters: Record<string, string>;
|
|
4649
4648
|
}[];
|
|
4650
4649
|
} | {
|
|
@@ -4656,14 +4655,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4656
4655
|
requestId: string;
|
|
4657
4656
|
filePaths: string[];
|
|
4658
4657
|
} | {
|
|
4659
|
-
type: "tool-call";
|
|
4660
4658
|
data: {
|
|
4661
|
-
name: string;
|
|
4662
4659
|
id: string;
|
|
4660
|
+
name: string;
|
|
4663
4661
|
input: Record<string, any>;
|
|
4664
4662
|
};
|
|
4665
|
-
|
|
4663
|
+
type: "tool-call";
|
|
4666
4664
|
response: string;
|
|
4665
|
+
userInputId: string;
|
|
4667
4666
|
changes: {
|
|
4668
4667
|
type: "patch" | "file";
|
|
4669
4668
|
path: string;
|
|
@@ -4690,34 +4689,34 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4690
4689
|
} | {
|
|
4691
4690
|
type: "action-error";
|
|
4692
4691
|
message: string;
|
|
4693
|
-
remainingBalance?: number | undefined;
|
|
4694
4692
|
error?: string | undefined;
|
|
4693
|
+
remainingBalance?: number | undefined;
|
|
4695
4694
|
} | {
|
|
4696
4695
|
type: "commit-message-response";
|
|
4697
4696
|
commitMessage: string;
|
|
4698
4697
|
};
|
|
4699
|
-
}, {
|
|
4700
4698
|
type: "action";
|
|
4699
|
+
}, {
|
|
4701
4700
|
data: {
|
|
4701
|
+
next_quota_reset: Date | null;
|
|
4702
4702
|
type: "usage-response";
|
|
4703
4703
|
usage: number;
|
|
4704
4704
|
remainingBalance: number;
|
|
4705
|
-
next_quota_reset: Date | null;
|
|
4706
4705
|
nextMonthlyGrant: number;
|
|
4707
4706
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4708
4707
|
autoTopupAdded?: number | undefined;
|
|
4709
4708
|
} | {
|
|
4709
|
+
next_quota_reset: Date | null;
|
|
4710
4710
|
type: "init-response";
|
|
4711
4711
|
usage: number;
|
|
4712
4712
|
remainingBalance: number;
|
|
4713
|
-
next_quota_reset: Date | null;
|
|
4714
4713
|
nextMonthlyGrant: number;
|
|
4715
4714
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4716
4715
|
autoTopupAdded?: number | undefined;
|
|
4717
4716
|
} | {
|
|
4718
4717
|
type: "response-complete";
|
|
4719
|
-
userInputId: string;
|
|
4720
4718
|
response: string;
|
|
4719
|
+
userInputId: string;
|
|
4721
4720
|
changes: {
|
|
4722
4721
|
type: "patch" | "file";
|
|
4723
4722
|
path: string;
|
|
@@ -4733,16 +4732,16 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4733
4732
|
content: string;
|
|
4734
4733
|
}[];
|
|
4735
4734
|
resetFileVersions: boolean;
|
|
4735
|
+
next_quota_reset?: Date | null | undefined;
|
|
4736
4736
|
usage?: number | undefined;
|
|
4737
4737
|
remainingBalance?: number | undefined;
|
|
4738
4738
|
balanceBreakdown?: Partial<Record<import("../types/grant").GrantType, number>> | undefined;
|
|
4739
|
-
next_quota_reset?: Date | null | undefined;
|
|
4740
4739
|
nextMonthlyGrant?: number | undefined;
|
|
4741
4740
|
autoTopupAdded?: number | undefined;
|
|
4742
4741
|
} | {
|
|
4743
4742
|
type: "message-cost-response";
|
|
4744
|
-
promptId: string;
|
|
4745
4743
|
credits: number;
|
|
4744
|
+
promptId: string;
|
|
4746
4745
|
} | {
|
|
4747
4746
|
type: "prompt-response";
|
|
4748
4747
|
promptId: string;
|
|
@@ -4783,9 +4782,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4783
4782
|
type: "ephemeral";
|
|
4784
4783
|
} | undefined;
|
|
4785
4784
|
} | {
|
|
4786
|
-
type: "tool_use";
|
|
4787
|
-
name: string;
|
|
4788
4785
|
id: string;
|
|
4786
|
+
name: string;
|
|
4787
|
+
type: "tool_use";
|
|
4789
4788
|
input: Record<string, any>;
|
|
4790
4789
|
cache_control?: {
|
|
4791
4790
|
type: "ephemeral";
|
|
@@ -4800,9 +4799,9 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4800
4799
|
} | {
|
|
4801
4800
|
type: "image";
|
|
4802
4801
|
source: {
|
|
4802
|
+
data: string;
|
|
4803
4803
|
type: "base64";
|
|
4804
4804
|
media_type: "image/jpeg";
|
|
4805
|
-
data: string;
|
|
4806
4805
|
};
|
|
4807
4806
|
cache_control?: {
|
|
4808
4807
|
type: "ephemeral";
|
|
@@ -4813,13 +4812,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4813
4812
|
consecutiveAssistantMessages?: number | undefined;
|
|
4814
4813
|
};
|
|
4815
4814
|
toolResults: {
|
|
4816
|
-
name: string;
|
|
4817
4815
|
id: string;
|
|
4816
|
+
name: string;
|
|
4818
4817
|
result: string;
|
|
4819
4818
|
}[];
|
|
4820
4819
|
toolCalls: {
|
|
4821
|
-
name: string;
|
|
4822
4820
|
id: string;
|
|
4821
|
+
name: string;
|
|
4823
4822
|
parameters: Record<string, string>;
|
|
4824
4823
|
}[];
|
|
4825
4824
|
} | {
|
|
@@ -4831,14 +4830,14 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4831
4830
|
requestId: string;
|
|
4832
4831
|
filePaths: string[];
|
|
4833
4832
|
} | {
|
|
4834
|
-
type: "tool-call";
|
|
4835
4833
|
data: {
|
|
4836
|
-
name: string;
|
|
4837
4834
|
id: string;
|
|
4835
|
+
name: string;
|
|
4838
4836
|
input: Record<string, any>;
|
|
4839
4837
|
};
|
|
4840
|
-
|
|
4838
|
+
type: "tool-call";
|
|
4841
4839
|
response: string;
|
|
4840
|
+
userInputId: string;
|
|
4842
4841
|
changes: {
|
|
4843
4842
|
type: "patch" | "file";
|
|
4844
4843
|
path: string;
|
|
@@ -4865,12 +4864,13 @@ export declare const SERVER_MESSAGE_SCHEMA: z.ZodUnion<[z.ZodObject<{
|
|
|
4865
4864
|
} | {
|
|
4866
4865
|
type: "action-error";
|
|
4867
4866
|
message: string;
|
|
4868
|
-
remainingBalance?: number | undefined;
|
|
4869
4867
|
error?: string | undefined;
|
|
4868
|
+
remainingBalance?: number | undefined;
|
|
4870
4869
|
} | {
|
|
4871
4870
|
type: "commit-message-response";
|
|
4872
4871
|
commitMessage: string;
|
|
4873
4872
|
};
|
|
4873
|
+
type: "action";
|
|
4874
4874
|
}>]>;
|
|
4875
4875
|
export type ServerMessageType = keyof typeof SERVER_MESSAGE_SCHEMAS;
|
|
4876
4876
|
export type ServerMessage<T extends ServerMessageType = ServerMessageType> = z.infer<(typeof SERVER_MESSAGE_SCHEMAS)[T]>;
|