codebuff 1.0.127 → 1.0.128
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 +2 -2
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/common/actions.d.ts +86 -86
- package/dist/common/billing/quota-manager.js +1 -1
- package/dist/common/billing/quota-manager.js.map +1 -1
- package/dist/common/constants.d.ts +20 -4
- package/dist/common/constants.js +64 -17
- package/dist/common/constants.js.map +1 -1
- package/dist/common/types/plan.d.ts +24 -0
- package/dist/common/types/plan.js +3 -0
- package/dist/common/types/plan.js.map +1 -0
- package/dist/common/util/promise.d.ts +7 -0
- package/dist/common/util/promise.js +23 -1
- package/dist/common/util/promise.js.map +1 -1
- package/dist/common/util/string.d.ts +1 -0
- package/dist/common/util/string.js +7 -1
- package/dist/common/util/string.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +176 -176
- package/dist/tool-handlers.js +4 -3
- package/dist/tool-handlers.js.map +1 -1
- 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
|
-
name: string;
|
|
39
38
|
id: string;
|
|
39
|
+
name: 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
|
-
name: string;
|
|
47
46
|
id: string;
|
|
47
|
+
name: string;
|
|
48
48
|
input: Record<string, any>;
|
|
49
49
|
cache_control?: {
|
|
50
50
|
type: "ephemeral";
|
|
@@ -61,16 +61,16 @@ declare const MessageContentObjectSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
61
61
|
type: "ephemeral";
|
|
62
62
|
}>>;
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
|
-
content: string;
|
|
65
64
|
type: "tool_result";
|
|
66
65
|
tool_use_id: string;
|
|
66
|
+
content: string;
|
|
67
67
|
cache_control?: {
|
|
68
68
|
type: "ephemeral";
|
|
69
69
|
} | undefined;
|
|
70
70
|
}, {
|
|
71
|
-
content: string;
|
|
72
71
|
type: "tool_result";
|
|
73
72
|
tool_use_id: string;
|
|
73
|
+
content: string;
|
|
74
74
|
cache_control?: {
|
|
75
75
|
type: "ephemeral";
|
|
76
76
|
} | undefined;
|
|
@@ -113,16 +113,16 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
113
113
|
}>>;
|
|
114
114
|
}, "strip", z.ZodTypeAny, {
|
|
115
115
|
type: "tool_use";
|
|
116
|
-
name: string;
|
|
117
116
|
id: string;
|
|
117
|
+
name: string;
|
|
118
118
|
input: Record<string, any>;
|
|
119
119
|
cache_control?: {
|
|
120
120
|
type: "ephemeral";
|
|
121
121
|
} | undefined;
|
|
122
122
|
}, {
|
|
123
123
|
type: "tool_use";
|
|
124
|
-
name: string;
|
|
125
124
|
id: string;
|
|
125
|
+
name: string;
|
|
126
126
|
input: Record<string, any>;
|
|
127
127
|
cache_control?: {
|
|
128
128
|
type: "ephemeral";
|
|
@@ -139,16 +139,16 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
139
139
|
type: "ephemeral";
|
|
140
140
|
}>>;
|
|
141
141
|
}, "strip", z.ZodTypeAny, {
|
|
142
|
-
content: string;
|
|
143
142
|
type: "tool_result";
|
|
144
143
|
tool_use_id: string;
|
|
144
|
+
content: string;
|
|
145
145
|
cache_control?: {
|
|
146
146
|
type: "ephemeral";
|
|
147
147
|
} | undefined;
|
|
148
148
|
}, {
|
|
149
|
-
content: string;
|
|
150
149
|
type: "tool_result";
|
|
151
150
|
tool_use_id: string;
|
|
151
|
+
content: string;
|
|
152
152
|
cache_control?: {
|
|
153
153
|
type: "ephemeral";
|
|
154
154
|
} | undefined;
|
|
@@ -162,16 +162,16 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
162
162
|
} | undefined;
|
|
163
163
|
} | {
|
|
164
164
|
type: "tool_use";
|
|
165
|
-
name: string;
|
|
166
165
|
id: string;
|
|
166
|
+
name: string;
|
|
167
167
|
input: Record<string, any>;
|
|
168
168
|
cache_control?: {
|
|
169
169
|
type: "ephemeral";
|
|
170
170
|
} | undefined;
|
|
171
171
|
} | {
|
|
172
|
-
content: string;
|
|
173
172
|
type: "tool_result";
|
|
174
173
|
tool_use_id: string;
|
|
174
|
+
content: string;
|
|
175
175
|
cache_control?: {
|
|
176
176
|
type: "ephemeral";
|
|
177
177
|
} | undefined;
|
|
@@ -186,16 +186,16 @@ declare const MessageSchema: z.ZodObject<{
|
|
|
186
186
|
} | undefined;
|
|
187
187
|
} | {
|
|
188
188
|
type: "tool_use";
|
|
189
|
-
name: string;
|
|
190
189
|
id: string;
|
|
190
|
+
name: string;
|
|
191
191
|
input: Record<string, any>;
|
|
192
192
|
cache_control?: {
|
|
193
193
|
type: "ephemeral";
|
|
194
194
|
} | undefined;
|
|
195
195
|
} | {
|
|
196
|
-
content: string;
|
|
197
196
|
type: "tool_result";
|
|
198
197
|
tool_use_id: string;
|
|
198
|
+
content: string;
|
|
199
199
|
cache_control?: {
|
|
200
200
|
type: "ephemeral";
|
|
201
201
|
} | undefined;
|
|
@@ -209,12 +209,12 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
209
209
|
filePath: z.ZodString;
|
|
210
210
|
content: z.ZodString;
|
|
211
211
|
}, "strip", z.ZodTypeAny, {
|
|
212
|
+
type: "patch" | "file";
|
|
212
213
|
content: string;
|
|
213
|
-
type: "file" | "patch";
|
|
214
214
|
filePath: string;
|
|
215
215
|
}, {
|
|
216
|
+
type: "patch" | "file";
|
|
216
217
|
content: string;
|
|
217
|
-
type: "file" | "patch";
|
|
218
218
|
filePath: string;
|
|
219
219
|
}>;
|
|
220
220
|
export type FileChange = z.infer<typeof FileChangeSchema>;
|
|
@@ -223,12 +223,12 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
223
223
|
filePath: z.ZodString;
|
|
224
224
|
content: z.ZodString;
|
|
225
225
|
}, "strip", z.ZodTypeAny, {
|
|
226
|
+
type: "patch" | "file";
|
|
226
227
|
content: string;
|
|
227
|
-
type: "file" | "patch";
|
|
228
228
|
filePath: string;
|
|
229
229
|
}, {
|
|
230
|
+
type: "patch" | "file";
|
|
230
231
|
content: string;
|
|
231
|
-
type: "file" | "patch";
|
|
232
232
|
filePath: string;
|
|
233
233
|
}>, "many">;
|
|
234
234
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
@@ -237,12 +237,12 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
237
237
|
id: z.ZodString;
|
|
238
238
|
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
239
239
|
}, "strip", z.ZodTypeAny, {
|
|
240
|
-
name: string;
|
|
241
240
|
id: string;
|
|
241
|
+
name: string;
|
|
242
242
|
input: Record<string, any>;
|
|
243
243
|
}, {
|
|
244
|
-
name: string;
|
|
245
244
|
id: string;
|
|
245
|
+
name: string;
|
|
246
246
|
input: Record<string, any>;
|
|
247
247
|
}>;
|
|
248
248
|
export type ToolCall = z.infer<typeof ToolCallSchema>;
|
|
@@ -289,16 +289,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
289
289
|
}>>;
|
|
290
290
|
}, "strip", z.ZodTypeAny, {
|
|
291
291
|
type: "tool_use";
|
|
292
|
-
name: string;
|
|
293
292
|
id: string;
|
|
293
|
+
name: string;
|
|
294
294
|
input: Record<string, any>;
|
|
295
295
|
cache_control?: {
|
|
296
296
|
type: "ephemeral";
|
|
297
297
|
} | undefined;
|
|
298
298
|
}, {
|
|
299
299
|
type: "tool_use";
|
|
300
|
-
name: string;
|
|
301
300
|
id: string;
|
|
301
|
+
name: string;
|
|
302
302
|
input: Record<string, any>;
|
|
303
303
|
cache_control?: {
|
|
304
304
|
type: "ephemeral";
|
|
@@ -315,16 +315,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
315
315
|
type: "ephemeral";
|
|
316
316
|
}>>;
|
|
317
317
|
}, "strip", z.ZodTypeAny, {
|
|
318
|
-
content: string;
|
|
319
318
|
type: "tool_result";
|
|
320
319
|
tool_use_id: string;
|
|
320
|
+
content: string;
|
|
321
321
|
cache_control?: {
|
|
322
322
|
type: "ephemeral";
|
|
323
323
|
} | undefined;
|
|
324
324
|
}, {
|
|
325
|
-
content: string;
|
|
326
325
|
type: "tool_result";
|
|
327
326
|
tool_use_id: string;
|
|
327
|
+
content: string;
|
|
328
328
|
cache_control?: {
|
|
329
329
|
type: "ephemeral";
|
|
330
330
|
} | undefined;
|
|
@@ -338,16 +338,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
338
338
|
} | undefined;
|
|
339
339
|
} | {
|
|
340
340
|
type: "tool_use";
|
|
341
|
-
name: string;
|
|
342
341
|
id: string;
|
|
342
|
+
name: string;
|
|
343
343
|
input: Record<string, any>;
|
|
344
344
|
cache_control?: {
|
|
345
345
|
type: "ephemeral";
|
|
346
346
|
} | undefined;
|
|
347
347
|
} | {
|
|
348
|
-
content: string;
|
|
349
348
|
type: "tool_result";
|
|
350
349
|
tool_use_id: string;
|
|
350
|
+
content: string;
|
|
351
351
|
cache_control?: {
|
|
352
352
|
type: "ephemeral";
|
|
353
353
|
} | undefined;
|
|
@@ -362,16 +362,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
362
362
|
} | undefined;
|
|
363
363
|
} | {
|
|
364
364
|
type: "tool_use";
|
|
365
|
-
name: string;
|
|
366
365
|
id: string;
|
|
366
|
+
name: string;
|
|
367
367
|
input: Record<string, any>;
|
|
368
368
|
cache_control?: {
|
|
369
369
|
type: "ephemeral";
|
|
370
370
|
} | undefined;
|
|
371
371
|
} | {
|
|
372
|
-
content: string;
|
|
373
372
|
type: "tool_result";
|
|
374
373
|
tool_use_id: string;
|
|
374
|
+
content: string;
|
|
375
375
|
cache_control?: {
|
|
376
376
|
type: "ephemeral";
|
|
377
377
|
} | undefined;
|
|
@@ -389,13 +389,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
389
389
|
diffCached: z.ZodString;
|
|
390
390
|
lastCommitMessages: z.ZodString;
|
|
391
391
|
}, "strip", z.ZodTypeAny, {
|
|
392
|
-
status: string;
|
|
393
392
|
diff: string;
|
|
393
|
+
status: string;
|
|
394
394
|
diffCached: string;
|
|
395
395
|
lastCommitMessages: string;
|
|
396
396
|
}, {
|
|
397
|
-
status: string;
|
|
398
397
|
diff: string;
|
|
398
|
+
status: string;
|
|
399
399
|
diffCached: string;
|
|
400
400
|
lastCommitMessages: string;
|
|
401
401
|
}>;
|
|
@@ -439,8 +439,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
439
439
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
440
440
|
knowledgeFiles: Record<string, string>;
|
|
441
441
|
gitChanges: {
|
|
442
|
-
status: string;
|
|
443
442
|
diff: string;
|
|
443
|
+
status: string;
|
|
444
444
|
diffCached: string;
|
|
445
445
|
lastCommitMessages: string;
|
|
446
446
|
};
|
|
@@ -464,8 +464,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
464
464
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
465
465
|
knowledgeFiles: Record<string, string>;
|
|
466
466
|
gitChanges: {
|
|
467
|
-
status: string;
|
|
468
467
|
diff: string;
|
|
468
|
+
status: string;
|
|
469
469
|
diffCached: string;
|
|
470
470
|
lastCommitMessages: string;
|
|
471
471
|
};
|
|
@@ -489,12 +489,12 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
489
489
|
filePath: z.ZodString;
|
|
490
490
|
content: z.ZodString;
|
|
491
491
|
}, "strip", z.ZodTypeAny, {
|
|
492
|
+
type: "patch" | "file";
|
|
492
493
|
content: string;
|
|
493
|
-
type: "file" | "patch";
|
|
494
494
|
filePath: string;
|
|
495
495
|
}, {
|
|
496
|
+
type: "patch" | "file";
|
|
496
497
|
content: string;
|
|
497
|
-
type: "file" | "patch";
|
|
498
498
|
filePath: string;
|
|
499
499
|
}>, "many">;
|
|
500
500
|
costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "pro"]>>>;
|
|
@@ -511,16 +511,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
511
511
|
} | undefined;
|
|
512
512
|
} | {
|
|
513
513
|
type: "tool_use";
|
|
514
|
-
name: string;
|
|
515
514
|
id: string;
|
|
515
|
+
name: string;
|
|
516
516
|
input: Record<string, any>;
|
|
517
517
|
cache_control?: {
|
|
518
518
|
type: "ephemeral";
|
|
519
519
|
} | undefined;
|
|
520
520
|
} | {
|
|
521
|
-
content: string;
|
|
522
521
|
type: "tool_result";
|
|
523
522
|
tool_use_id: string;
|
|
523
|
+
content: string;
|
|
524
524
|
cache_control?: {
|
|
525
525
|
type: "ephemeral";
|
|
526
526
|
} | undefined;
|
|
@@ -533,8 +533,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
533
533
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
534
534
|
knowledgeFiles: Record<string, string>;
|
|
535
535
|
gitChanges: {
|
|
536
|
-
status: string;
|
|
537
536
|
diff: string;
|
|
537
|
+
status: string;
|
|
538
538
|
diffCached: string;
|
|
539
539
|
lastCommitMessages: string;
|
|
540
540
|
};
|
|
@@ -554,8 +554,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
554
554
|
}[][];
|
|
555
555
|
};
|
|
556
556
|
changesAlreadyApplied: {
|
|
557
|
+
type: "patch" | "file";
|
|
557
558
|
content: string;
|
|
558
|
-
type: "file" | "patch";
|
|
559
559
|
filePath: string;
|
|
560
560
|
}[];
|
|
561
561
|
costMode: "lite" | "normal" | "pro";
|
|
@@ -573,16 +573,16 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
573
573
|
} | undefined;
|
|
574
574
|
} | {
|
|
575
575
|
type: "tool_use";
|
|
576
|
-
name: string;
|
|
577
576
|
id: string;
|
|
577
|
+
name: string;
|
|
578
578
|
input: Record<string, any>;
|
|
579
579
|
cache_control?: {
|
|
580
580
|
type: "ephemeral";
|
|
581
581
|
} | undefined;
|
|
582
582
|
} | {
|
|
583
|
-
content: string;
|
|
584
583
|
type: "tool_result";
|
|
585
584
|
tool_use_id: string;
|
|
585
|
+
content: string;
|
|
586
586
|
cache_control?: {
|
|
587
587
|
type: "ephemeral";
|
|
588
588
|
} | undefined;
|
|
@@ -595,8 +595,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
595
595
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
596
596
|
knowledgeFiles: Record<string, string>;
|
|
597
597
|
gitChanges: {
|
|
598
|
-
status: string;
|
|
599
598
|
diff: string;
|
|
599
|
+
status: string;
|
|
600
600
|
diffCached: string;
|
|
601
601
|
lastCommitMessages: string;
|
|
602
602
|
};
|
|
@@ -616,8 +616,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
616
616
|
}[][];
|
|
617
617
|
};
|
|
618
618
|
changesAlreadyApplied: {
|
|
619
|
+
type: "patch" | "file";
|
|
619
620
|
content: string;
|
|
620
|
-
type: "file" | "patch";
|
|
621
621
|
filePath: string;
|
|
622
622
|
}[];
|
|
623
623
|
authToken?: string | undefined;
|
|
@@ -646,13 +646,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
646
646
|
diffCached: z.ZodString;
|
|
647
647
|
lastCommitMessages: z.ZodString;
|
|
648
648
|
}, "strip", z.ZodTypeAny, {
|
|
649
|
-
status: string;
|
|
650
649
|
diff: string;
|
|
650
|
+
status: string;
|
|
651
651
|
diffCached: string;
|
|
652
652
|
lastCommitMessages: string;
|
|
653
653
|
}, {
|
|
654
|
-
status: string;
|
|
655
654
|
diff: string;
|
|
655
|
+
status: string;
|
|
656
656
|
diffCached: string;
|
|
657
657
|
lastCommitMessages: string;
|
|
658
658
|
}>;
|
|
@@ -696,8 +696,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
696
696
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
697
697
|
knowledgeFiles: Record<string, string>;
|
|
698
698
|
gitChanges: {
|
|
699
|
-
status: string;
|
|
700
699
|
diff: string;
|
|
700
|
+
status: string;
|
|
701
701
|
diffCached: string;
|
|
702
702
|
lastCommitMessages: string;
|
|
703
703
|
};
|
|
@@ -721,8 +721,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
721
721
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
722
722
|
knowledgeFiles: Record<string, string>;
|
|
723
723
|
gitChanges: {
|
|
724
|
-
status: string;
|
|
725
724
|
diff: string;
|
|
725
|
+
status: string;
|
|
726
726
|
diffCached: string;
|
|
727
727
|
lastCommitMessages: string;
|
|
728
728
|
};
|
|
@@ -750,8 +750,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
750
750
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
751
751
|
knowledgeFiles: Record<string, string>;
|
|
752
752
|
gitChanges: {
|
|
753
|
-
status: string;
|
|
754
753
|
diff: string;
|
|
754
|
+
status: string;
|
|
755
755
|
diffCached: string;
|
|
756
756
|
lastCommitMessages: string;
|
|
757
757
|
};
|
|
@@ -780,8 +780,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
780
780
|
fileTokenScores: Record<string, Record<string, number>>;
|
|
781
781
|
knowledgeFiles: Record<string, string>;
|
|
782
782
|
gitChanges: {
|
|
783
|
-
status: string;
|
|
784
783
|
diff: string;
|
|
784
|
+
status: string;
|
|
785
785
|
diffCached: string;
|
|
786
786
|
lastCommitMessages: string;
|
|
787
787
|
};
|
|
@@ -935,12 +935,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
935
935
|
filePath: z.ZodString;
|
|
936
936
|
content: z.ZodString;
|
|
937
937
|
}, "strip", z.ZodTypeAny, {
|
|
938
|
+
type: "patch" | "file";
|
|
938
939
|
content: string;
|
|
939
|
-
type: "file" | "patch";
|
|
940
940
|
filePath: string;
|
|
941
941
|
}, {
|
|
942
|
+
type: "patch" | "file";
|
|
942
943
|
content: string;
|
|
943
|
-
type: "file" | "patch";
|
|
944
944
|
filePath: string;
|
|
945
945
|
}>, "many">;
|
|
946
946
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -948,12 +948,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
948
948
|
filePath: z.ZodString;
|
|
949
949
|
content: z.ZodString;
|
|
950
950
|
}, "strip", z.ZodTypeAny, {
|
|
951
|
+
type: "patch" | "file";
|
|
951
952
|
content: string;
|
|
952
|
-
type: "file" | "patch";
|
|
953
953
|
filePath: string;
|
|
954
954
|
}, {
|
|
955
|
+
type: "patch" | "file";
|
|
955
956
|
content: string;
|
|
956
|
-
type: "file" | "patch";
|
|
957
957
|
filePath: string;
|
|
958
958
|
}>, "many">;
|
|
959
959
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -979,13 +979,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
979
979
|
response: string;
|
|
980
980
|
userInputId: string;
|
|
981
981
|
changesAlreadyApplied: {
|
|
982
|
+
type: "patch" | "file";
|
|
982
983
|
content: string;
|
|
983
|
-
type: "file" | "patch";
|
|
984
984
|
filePath: string;
|
|
985
985
|
}[];
|
|
986
986
|
changes: {
|
|
987
|
+
type: "patch" | "file";
|
|
987
988
|
content: string;
|
|
988
|
-
type: "file" | "patch";
|
|
989
989
|
filePath: string;
|
|
990
990
|
}[];
|
|
991
991
|
addedFileVersions: {
|
|
@@ -1004,13 +1004,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
1004
1004
|
response: string;
|
|
1005
1005
|
userInputId: string;
|
|
1006
1006
|
changesAlreadyApplied: {
|
|
1007
|
+
type: "patch" | "file";
|
|
1007
1008
|
content: string;
|
|
1008
|
-
type: "file" | "patch";
|
|
1009
1009
|
filePath: string;
|
|
1010
1010
|
}[];
|
|
1011
1011
|
changes: {
|
|
1012
|
+
type: "patch" | "file";
|
|
1012
1013
|
content: string;
|
|
1013
|
-
type: "file" | "patch";
|
|
1014
1014
|
filePath: string;
|
|
1015
1015
|
}[];
|
|
1016
1016
|
addedFileVersions: {
|
|
@@ -1046,12 +1046,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1046
1046
|
filePath: z.ZodString;
|
|
1047
1047
|
content: z.ZodString;
|
|
1048
1048
|
}, "strip", z.ZodTypeAny, {
|
|
1049
|
+
type: "patch" | "file";
|
|
1049
1050
|
content: string;
|
|
1050
|
-
type: "file" | "patch";
|
|
1051
1051
|
filePath: string;
|
|
1052
1052
|
}, {
|
|
1053
|
+
type: "patch" | "file";
|
|
1053
1054
|
content: string;
|
|
1054
|
-
type: "file" | "patch";
|
|
1055
1055
|
filePath: string;
|
|
1056
1056
|
}>, "many">;
|
|
1057
1057
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1059,12 +1059,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1059
1059
|
filePath: z.ZodString;
|
|
1060
1060
|
content: z.ZodString;
|
|
1061
1061
|
}, "strip", z.ZodTypeAny, {
|
|
1062
|
+
type: "patch" | "file";
|
|
1062
1063
|
content: string;
|
|
1063
|
-
type: "file" | "patch";
|
|
1064
1064
|
filePath: string;
|
|
1065
1065
|
}, {
|
|
1066
|
+
type: "patch" | "file";
|
|
1066
1067
|
content: string;
|
|
1067
|
-
type: "file" | "patch";
|
|
1068
1068
|
filePath: string;
|
|
1069
1069
|
}>, "many">;
|
|
1070
1070
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1090,13 +1090,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1090
1090
|
response: string;
|
|
1091
1091
|
userInputId: string;
|
|
1092
1092
|
changesAlreadyApplied: {
|
|
1093
|
+
type: "patch" | "file";
|
|
1093
1094
|
content: string;
|
|
1094
|
-
type: "file" | "patch";
|
|
1095
1095
|
filePath: string;
|
|
1096
1096
|
}[];
|
|
1097
1097
|
changes: {
|
|
1098
|
+
type: "patch" | "file";
|
|
1098
1099
|
content: string;
|
|
1099
|
-
type: "file" | "patch";
|
|
1100
1100
|
filePath: string;
|
|
1101
1101
|
}[];
|
|
1102
1102
|
addedFileVersions: {
|
|
@@ -1115,13 +1115,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1115
1115
|
response: string;
|
|
1116
1116
|
userInputId: string;
|
|
1117
1117
|
changesAlreadyApplied: {
|
|
1118
|
+
type: "patch" | "file";
|
|
1118
1119
|
content: string;
|
|
1119
|
-
type: "file" | "patch";
|
|
1120
1120
|
filePath: string;
|
|
1121
1121
|
}[];
|
|
1122
1122
|
changes: {
|
|
1123
|
+
type: "patch" | "file";
|
|
1123
1124
|
content: string;
|
|
1124
|
-
type: "file" | "patch";
|
|
1125
1125
|
filePath: string;
|
|
1126
1126
|
}[];
|
|
1127
1127
|
addedFileVersions: {
|
|
@@ -1153,12 +1153,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1153
1153
|
id: z.ZodString;
|
|
1154
1154
|
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1155
1155
|
}, "strip", z.ZodTypeAny, {
|
|
1156
|
-
name: string;
|
|
1157
1156
|
id: string;
|
|
1157
|
+
name: string;
|
|
1158
1158
|
input: Record<string, any>;
|
|
1159
1159
|
}, {
|
|
1160
|
-
name: string;
|
|
1161
1160
|
id: string;
|
|
1161
|
+
name: string;
|
|
1162
1162
|
input: Record<string, any>;
|
|
1163
1163
|
}>;
|
|
1164
1164
|
changes: z.ZodArray<z.ZodObject<{
|
|
@@ -1166,12 +1166,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1166
1166
|
filePath: z.ZodString;
|
|
1167
1167
|
content: z.ZodString;
|
|
1168
1168
|
}, "strip", z.ZodTypeAny, {
|
|
1169
|
+
type: "patch" | "file";
|
|
1169
1170
|
content: string;
|
|
1170
|
-
type: "file" | "patch";
|
|
1171
1171
|
filePath: string;
|
|
1172
1172
|
}, {
|
|
1173
|
+
type: "patch" | "file";
|
|
1173
1174
|
content: string;
|
|
1174
|
-
type: "file" | "patch";
|
|
1175
1175
|
filePath: string;
|
|
1176
1176
|
}>, "many">;
|
|
1177
1177
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1179,12 +1179,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1179
1179
|
filePath: z.ZodString;
|
|
1180
1180
|
content: z.ZodString;
|
|
1181
1181
|
}, "strip", z.ZodTypeAny, {
|
|
1182
|
+
type: "patch" | "file";
|
|
1182
1183
|
content: string;
|
|
1183
|
-
type: "file" | "patch";
|
|
1184
1184
|
filePath: string;
|
|
1185
1185
|
}, {
|
|
1186
|
+
type: "patch" | "file";
|
|
1186
1187
|
content: string;
|
|
1187
|
-
type: "file" | "patch";
|
|
1188
1188
|
filePath: string;
|
|
1189
1189
|
}>, "many">;
|
|
1190
1190
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1201,20 +1201,20 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1201
1201
|
}, "strip", z.ZodTypeAny, {
|
|
1202
1202
|
type: "tool-call";
|
|
1203
1203
|
data: {
|
|
1204
|
-
name: string;
|
|
1205
1204
|
id: string;
|
|
1205
|
+
name: string;
|
|
1206
1206
|
input: Record<string, any>;
|
|
1207
1207
|
};
|
|
1208
1208
|
response: string;
|
|
1209
1209
|
userInputId: string;
|
|
1210
1210
|
changesAlreadyApplied: {
|
|
1211
|
+
type: "patch" | "file";
|
|
1211
1212
|
content: string;
|
|
1212
|
-
type: "file" | "patch";
|
|
1213
1213
|
filePath: string;
|
|
1214
1214
|
}[];
|
|
1215
1215
|
changes: {
|
|
1216
|
+
type: "patch" | "file";
|
|
1216
1217
|
content: string;
|
|
1217
|
-
type: "file" | "patch";
|
|
1218
1218
|
filePath: string;
|
|
1219
1219
|
}[];
|
|
1220
1220
|
addedFileVersions: {
|
|
@@ -1225,20 +1225,20 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1225
1225
|
}, {
|
|
1226
1226
|
type: "tool-call";
|
|
1227
1227
|
data: {
|
|
1228
|
-
name: string;
|
|
1229
1228
|
id: string;
|
|
1229
|
+
name: string;
|
|
1230
1230
|
input: Record<string, any>;
|
|
1231
1231
|
};
|
|
1232
1232
|
response: string;
|
|
1233
1233
|
userInputId: string;
|
|
1234
1234
|
changesAlreadyApplied: {
|
|
1235
|
+
type: "patch" | "file";
|
|
1235
1236
|
content: string;
|
|
1236
|
-
type: "file" | "patch";
|
|
1237
1237
|
filePath: string;
|
|
1238
1238
|
}[];
|
|
1239
1239
|
changes: {
|
|
1240
|
+
type: "patch" | "file";
|
|
1240
1241
|
content: string;
|
|
1241
|
-
type: "file" | "patch";
|
|
1242
1242
|
filePath: string;
|
|
1243
1243
|
}[];
|
|
1244
1244
|
addedFileVersions: {
|
|
@@ -1306,39 +1306,39 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1306
1306
|
fingerprintId: z.ZodString;
|
|
1307
1307
|
fingerprintHash: z.ZodString;
|
|
1308
1308
|
}, "strip", z.ZodTypeAny, {
|
|
1309
|
-
email: string;
|
|
1310
|
-
name: string | null;
|
|
1311
1309
|
id: string;
|
|
1310
|
+
name: string | null;
|
|
1311
|
+
email: string;
|
|
1312
1312
|
fingerprintId: string;
|
|
1313
1313
|
authToken: string;
|
|
1314
1314
|
fingerprintHash: string;
|
|
1315
1315
|
}, {
|
|
1316
|
-
email: string;
|
|
1317
|
-
name: string | null;
|
|
1318
1316
|
id: string;
|
|
1317
|
+
name: string | null;
|
|
1318
|
+
email: string;
|
|
1319
1319
|
fingerprintId: string;
|
|
1320
1320
|
authToken: string;
|
|
1321
1321
|
fingerprintHash: string;
|
|
1322
1322
|
}>>;
|
|
1323
1323
|
message: z.ZodString;
|
|
1324
1324
|
}, "strip", z.ZodTypeAny, {
|
|
1325
|
-
message: string;
|
|
1326
1325
|
type: "auth-result";
|
|
1326
|
+
message: string;
|
|
1327
1327
|
user?: {
|
|
1328
|
-
email: string;
|
|
1329
|
-
name: string | null;
|
|
1330
1328
|
id: string;
|
|
1329
|
+
name: string | null;
|
|
1330
|
+
email: string;
|
|
1331
1331
|
fingerprintId: string;
|
|
1332
1332
|
authToken: string;
|
|
1333
1333
|
fingerprintHash: string;
|
|
1334
1334
|
} | undefined;
|
|
1335
1335
|
}, {
|
|
1336
|
-
message: string;
|
|
1337
1336
|
type: "auth-result";
|
|
1337
|
+
message: string;
|
|
1338
1338
|
user?: {
|
|
1339
|
-
email: string;
|
|
1340
|
-
name: string | null;
|
|
1341
1339
|
id: string;
|
|
1340
|
+
name: string | null;
|
|
1341
|
+
email: string;
|
|
1342
1342
|
fingerprintId: string;
|
|
1343
1343
|
authToken: string;
|
|
1344
1344
|
fingerprintHash: string;
|
|
@@ -1386,11 +1386,11 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1386
1386
|
type: z.ZodLiteral<"action-error">;
|
|
1387
1387
|
message: z.ZodString;
|
|
1388
1388
|
}, "strip", z.ZodTypeAny, {
|
|
1389
|
-
message: string;
|
|
1390
1389
|
type: "action-error";
|
|
1391
|
-
}, {
|
|
1392
1390
|
message: string;
|
|
1391
|
+
}, {
|
|
1393
1392
|
type: "action-error";
|
|
1393
|
+
message: string;
|
|
1394
1394
|
}>, z.ZodObject<{
|
|
1395
1395
|
type: z.ZodLiteral<"commit-message-response">;
|
|
1396
1396
|
commitMessage: z.ZodString;
|
|
@@ -103,7 +103,7 @@ class AuthenticatedQuotaManager {
|
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
105
|
let overageRate = null;
|
|
106
|
-
let quota = constants_1.CREDITS_USAGE_LIMITS.
|
|
106
|
+
let quota = constants_1.CREDITS_USAGE_LIMITS.PRO;
|
|
107
107
|
if (user?.stripe_customer_id && user?.stripe_price_id) {
|
|
108
108
|
const subscriptions = await stripe_1.stripeServer.subscriptions.list({
|
|
109
109
|
customer: user.stripe_customer_id,
|