codebuff 1.0.167 → 1.0.169

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.
Files changed (53) hide show
  1. package/dist/browser-runner.js +7 -17
  2. package/dist/browser-runner.js.map +1 -1
  3. package/dist/chat-storage.js +7 -17
  4. package/dist/chat-storage.js.map +1 -1
  5. package/dist/cli.d.ts +1 -0
  6. package/dist/cli.js +146 -20
  7. package/dist/cli.js.map +1 -1
  8. package/dist/client.d.ts +2 -2
  9. package/dist/client.js +22 -34
  10. package/dist/client.js.map +1 -1
  11. package/dist/code-map/languages.js +7 -17
  12. package/dist/code-map/languages.js.map +1 -1
  13. package/dist/code-map/parse.js +7 -17
  14. package/dist/code-map/parse.js.map +1 -1
  15. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  16. package/dist/common/actions.d.ts +53 -53
  17. package/dist/common/util/credentials.d.ts +4 -4
  18. package/dist/common/websockets/websocket-schema.d.ts +122 -122
  19. package/dist/create-template-project.js +7 -17
  20. package/dist/create-template-project.js.map +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/menu.js +8 -18
  23. package/dist/menu.js.map +1 -1
  24. package/dist/project-files.js +7 -17
  25. package/dist/project-files.js.map +1 -1
  26. package/dist/tool-handlers.js +7 -17
  27. package/dist/tool-handlers.js.map +1 -1
  28. package/dist/utils/spinner.js +7 -17
  29. package/dist/utils/spinner.js.map +1 -1
  30. package/dist/utils/terminal.js +8 -17
  31. package/dist/utils/terminal.js.map +1 -1
  32. package/package.json +1 -1
  33. package/dist/common/logger.d.ts +0 -1
  34. package/dist/common/logger.js +0 -7
  35. package/dist/common/logger.js.map +0 -1
  36. package/dist/common/types/agent-state.d.ts +0 -461
  37. package/dist/common/types/agent-state.js +0 -30
  38. package/dist/common/types/agent-state.js.map +0 -1
  39. package/dist/common/types/message.d.ts +0 -311
  40. package/dist/common/types/message.js +0 -54
  41. package/dist/common/types/message.js.map +0 -1
  42. package/dist/common/types/tools.d.ts +0 -5
  43. package/dist/common/types/tools.js +0 -3
  44. package/dist/common/types/tools.js.map +0 -1
  45. package/dist/common/util/constants.d.ts +0 -1
  46. package/dist/common/util/constants.js +0 -7
  47. package/dist/common/util/constants.js.map +0 -1
  48. package/dist/common/util/helpers.d.ts +0 -1
  49. package/dist/common/util/helpers.js +0 -6
  50. package/dist/common/util/helpers.js.map +0 -1
  51. package/dist/common/util/token-counter.d.ts +0 -3
  52. package/dist/common/util/token-counter.js +0 -27
  53. package/dist/common/util/token-counter.js.map +0 -1
@@ -61,15 +61,15 @@ 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";
65
+ content: string;
66
66
  tool_use_id: string;
67
67
  cache_control?: {
68
68
  type: "ephemeral";
69
69
  } | undefined;
70
70
  }, {
71
- content: string;
72
71
  type: "tool_result";
72
+ content: string;
73
73
  tool_use_id: string;
74
74
  cache_control?: {
75
75
  type: "ephemeral";
@@ -181,15 +181,15 @@ declare const MessageSchema: z.ZodObject<{
181
181
  type: "ephemeral";
182
182
  }>>;
183
183
  }, "strip", z.ZodTypeAny, {
184
- content: string;
185
184
  type: "tool_result";
185
+ content: string;
186
186
  tool_use_id: string;
187
187
  cache_control?: {
188
188
  type: "ephemeral";
189
189
  } | undefined;
190
190
  }, {
191
- content: string;
192
191
  type: "tool_result";
192
+ content: string;
193
193
  tool_use_id: string;
194
194
  cache_control?: {
195
195
  type: "ephemeral";
@@ -253,8 +253,8 @@ declare const MessageSchema: z.ZodObject<{
253
253
  type: "ephemeral";
254
254
  } | undefined;
255
255
  } | {
256
- content: string;
257
256
  type: "tool_result";
257
+ content: string;
258
258
  tool_use_id: string;
259
259
  cache_control?: {
260
260
  type: "ephemeral";
@@ -287,8 +287,8 @@ declare const MessageSchema: z.ZodObject<{
287
287
  type: "ephemeral";
288
288
  } | undefined;
289
289
  } | {
290
- content: string;
291
290
  type: "tool_result";
291
+ content: string;
292
292
  tool_use_id: string;
293
293
  cache_control?: {
294
294
  type: "ephemeral";
@@ -313,13 +313,13 @@ export declare const FileChangeSchema: z.ZodObject<{
313
313
  filePath: z.ZodString;
314
314
  content: z.ZodString;
315
315
  }, "strip", z.ZodTypeAny, {
316
- content: string;
317
316
  type: "file" | "patch";
318
317
  filePath: string;
319
- }, {
320
318
  content: string;
319
+ }, {
321
320
  type: "file" | "patch";
322
321
  filePath: string;
322
+ content: string;
323
323
  }>;
324
324
  export type FileChange = z.infer<typeof FileChangeSchema>;
325
325
  export declare const CHANGES: z.ZodArray<z.ZodObject<{
@@ -327,13 +327,13 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
327
327
  filePath: z.ZodString;
328
328
  content: z.ZodString;
329
329
  }, "strip", z.ZodTypeAny, {
330
- content: string;
331
330
  type: "file" | "patch";
332
331
  filePath: string;
333
- }, {
334
332
  content: string;
333
+ }, {
335
334
  type: "file" | "patch";
336
335
  filePath: string;
336
+ content: string;
337
337
  }>, "many">;
338
338
  export type FileChanges = z.infer<typeof CHANGES>;
339
339
  export declare const ToolCallSchema: z.ZodObject<{
@@ -413,26 +413,26 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
413
413
  filePath: z.ZodString;
414
414
  content: z.ZodString;
415
415
  }, "strip", z.ZodTypeAny, {
416
- content: string;
417
416
  type: "file" | "patch";
418
417
  filePath: string;
419
- }, {
420
418
  content: string;
419
+ }, {
421
420
  type: "file" | "patch";
422
421
  filePath: string;
422
+ content: string;
423
423
  }>, "many">;
424
424
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
425
425
  type: z.ZodEnum<["patch", "file"]>;
426
426
  filePath: z.ZodString;
427
427
  content: z.ZodString;
428
428
  }, "strip", z.ZodTypeAny, {
429
- content: string;
430
429
  type: "file" | "patch";
431
430
  filePath: string;
432
- }, {
433
431
  content: string;
432
+ }, {
434
433
  type: "file" | "patch";
435
434
  filePath: string;
435
+ content: string;
436
436
  }>, "many">;
437
437
  addedFileVersions: z.ZodArray<z.ZodObject<{
438
438
  path: z.ZodString;
@@ -457,14 +457,14 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
457
457
  userInputId: string;
458
458
  response: string;
459
459
  changes: {
460
- content: string;
461
460
  type: "file" | "patch";
462
461
  filePath: string;
462
+ content: string;
463
463
  }[];
464
464
  changesAlreadyApplied: {
465
- content: string;
466
465
  type: "file" | "patch";
467
466
  filePath: string;
467
+ content: string;
468
468
  }[];
469
469
  addedFileVersions: {
470
470
  path: string;
@@ -482,14 +482,14 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
482
482
  userInputId: string;
483
483
  response: string;
484
484
  changes: {
485
- content: string;
486
485
  type: "file" | "patch";
487
486
  filePath: string;
487
+ content: string;
488
488
  }[];
489
489
  changesAlreadyApplied: {
490
- content: string;
491
490
  type: "file" | "patch";
492
491
  filePath: string;
492
+ content: string;
493
493
  }[];
494
494
  addedFileVersions: {
495
495
  path: string;
@@ -572,15 +572,15 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
572
572
  type: "ephemeral";
573
573
  }>>;
574
574
  }, "strip", z.ZodTypeAny, {
575
- content: string;
576
575
  type: "tool_result";
576
+ content: string;
577
577
  tool_use_id: string;
578
578
  cache_control?: {
579
579
  type: "ephemeral";
580
580
  } | undefined;
581
581
  }, {
582
- content: string;
583
582
  type: "tool_result";
583
+ content: string;
584
584
  tool_use_id: string;
585
585
  cache_control?: {
586
586
  type: "ephemeral";
@@ -644,8 +644,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
644
644
  type: "ephemeral";
645
645
  } | undefined;
646
646
  } | {
647
- content: string;
648
647
  type: "tool_result";
648
+ content: string;
649
649
  tool_use_id: string;
650
650
  cache_control?: {
651
651
  type: "ephemeral";
@@ -678,8 +678,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
678
678
  type: "ephemeral";
679
679
  } | undefined;
680
680
  } | {
681
- content: string;
682
681
  type: "tool_result";
682
+ content: string;
683
683
  tool_use_id: string;
684
684
  cache_control?: {
685
685
  type: "ephemeral";
@@ -811,24 +811,24 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
811
811
  filePath: z.ZodString;
812
812
  content: z.ZodString;
813
813
  }, "strip", z.ZodTypeAny, {
814
- content: string;
815
814
  type: "file" | "patch";
816
815
  filePath: string;
817
- }, {
818
816
  content: string;
817
+ }, {
819
818
  type: "file" | "patch";
820
819
  filePath: string;
820
+ content: string;
821
821
  }>, "many">;
822
822
  costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max"]>>>;
823
823
  }, "strip", z.ZodTypeAny, {
824
824
  type: "user-input";
825
+ fingerprintId: string;
825
826
  userInputId: string;
826
827
  changesAlreadyApplied: {
827
- content: string;
828
828
  type: "file" | "patch";
829
829
  filePath: string;
830
+ content: string;
830
831
  }[];
831
- fingerprintId: string;
832
832
  messages: {
833
833
  content: string | ({
834
834
  type: "text";
@@ -845,8 +845,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
845
845
  type: "ephemeral";
846
846
  } | undefined;
847
847
  } | {
848
- content: string;
849
848
  type: "tool_result";
849
+ content: string;
850
850
  tool_use_id: string;
851
851
  cache_control?: {
852
852
  type: "ephemeral";
@@ -895,13 +895,13 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
895
895
  authToken?: string | undefined;
896
896
  }, {
897
897
  type: "user-input";
898
+ fingerprintId: string;
898
899
  userInputId: string;
899
900
  changesAlreadyApplied: {
900
- content: string;
901
901
  type: "file" | "patch";
902
902
  filePath: string;
903
+ content: string;
903
904
  }[];
904
- fingerprintId: string;
905
905
  messages: {
906
906
  content: string | ({
907
907
  type: "text";
@@ -918,8 +918,8 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
918
918
  type: "ephemeral";
919
919
  } | undefined;
920
920
  } | {
921
- content: string;
922
921
  type: "tool_result";
922
+ content: string;
923
923
  tool_use_id: string;
924
924
  cache_control?: {
925
925
  type: "ephemeral";
@@ -1203,26 +1203,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1203
1203
  filePath: z.ZodString;
1204
1204
  content: z.ZodString;
1205
1205
  }, "strip", z.ZodTypeAny, {
1206
- content: string;
1207
1206
  type: "file" | "patch";
1208
1207
  filePath: string;
1209
- }, {
1210
1208
  content: string;
1209
+ }, {
1211
1210
  type: "file" | "patch";
1212
1211
  filePath: string;
1212
+ content: string;
1213
1213
  }>, "many">;
1214
1214
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1215
1215
  type: z.ZodEnum<["patch", "file"]>;
1216
1216
  filePath: z.ZodString;
1217
1217
  content: z.ZodString;
1218
1218
  }, "strip", z.ZodTypeAny, {
1219
- content: string;
1220
1219
  type: "file" | "patch";
1221
1220
  filePath: string;
1222
- }, {
1223
1221
  content: string;
1222
+ }, {
1224
1223
  type: "file" | "patch";
1225
1224
  filePath: string;
1225
+ content: string;
1226
1226
  }>, "many">;
1227
1227
  addedFileVersions: z.ZodArray<z.ZodObject<{
1228
1228
  path: z.ZodString;
@@ -1247,14 +1247,14 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1247
1247
  userInputId: string;
1248
1248
  response: string;
1249
1249
  changes: {
1250
- content: string;
1251
1250
  type: "file" | "patch";
1252
1251
  filePath: string;
1252
+ content: string;
1253
1253
  }[];
1254
1254
  changesAlreadyApplied: {
1255
- content: string;
1256
1255
  type: "file" | "patch";
1257
1256
  filePath: string;
1257
+ content: string;
1258
1258
  }[];
1259
1259
  addedFileVersions: {
1260
1260
  path: string;
@@ -1272,14 +1272,14 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1272
1272
  userInputId: string;
1273
1273
  response: string;
1274
1274
  changes: {
1275
- content: string;
1276
1275
  type: "file" | "patch";
1277
1276
  filePath: string;
1277
+ content: string;
1278
1278
  }[];
1279
1279
  changesAlreadyApplied: {
1280
- content: string;
1281
1280
  type: "file" | "patch";
1282
1281
  filePath: string;
1282
+ content: string;
1283
1283
  }[];
1284
1284
  addedFileVersions: {
1285
1285
  path: string;
@@ -1326,26 +1326,26 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1326
1326
  filePath: z.ZodString;
1327
1327
  content: z.ZodString;
1328
1328
  }, "strip", z.ZodTypeAny, {
1329
- content: string;
1330
1329
  type: "file" | "patch";
1331
1330
  filePath: string;
1332
- }, {
1333
1331
  content: string;
1332
+ }, {
1334
1333
  type: "file" | "patch";
1335
1334
  filePath: string;
1335
+ content: string;
1336
1336
  }>, "many">;
1337
1337
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1338
1338
  type: z.ZodEnum<["patch", "file"]>;
1339
1339
  filePath: z.ZodString;
1340
1340
  content: z.ZodString;
1341
1341
  }, "strip", z.ZodTypeAny, {
1342
- content: string;
1343
1342
  type: "file" | "patch";
1344
1343
  filePath: string;
1345
- }, {
1346
1344
  content: string;
1345
+ }, {
1347
1346
  type: "file" | "patch";
1348
1347
  filePath: string;
1348
+ content: string;
1349
1349
  }>, "many">;
1350
1350
  addedFileVersions: z.ZodArray<z.ZodObject<{
1351
1351
  path: z.ZodString;
@@ -1360,52 +1360,52 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1360
1360
  resetFileVersions: z.ZodBoolean;
1361
1361
  }, "strip", z.ZodTypeAny, {
1362
1362
  type: "tool-call";
1363
+ data: {
1364
+ name: string;
1365
+ id: string;
1366
+ input: Record<string, any>;
1367
+ };
1363
1368
  userInputId: string;
1364
1369
  response: string;
1365
1370
  changes: {
1366
- content: string;
1367
1371
  type: "file" | "patch";
1368
1372
  filePath: string;
1373
+ content: string;
1369
1374
  }[];
1370
1375
  changesAlreadyApplied: {
1371
- content: string;
1372
1376
  type: "file" | "patch";
1373
1377
  filePath: string;
1378
+ content: string;
1374
1379
  }[];
1375
1380
  addedFileVersions: {
1376
1381
  path: string;
1377
1382
  content: string;
1378
1383
  }[];
1379
1384
  resetFileVersions: boolean;
1385
+ }, {
1386
+ type: "tool-call";
1380
1387
  data: {
1381
1388
  name: string;
1382
1389
  id: string;
1383
1390
  input: Record<string, any>;
1384
1391
  };
1385
- }, {
1386
- type: "tool-call";
1387
1392
  userInputId: string;
1388
1393
  response: string;
1389
1394
  changes: {
1390
- content: string;
1391
1395
  type: "file" | "patch";
1392
1396
  filePath: string;
1397
+ content: string;
1393
1398
  }[];
1394
1399
  changesAlreadyApplied: {
1395
- content: string;
1396
1400
  type: "file" | "patch";
1397
1401
  filePath: string;
1402
+ content: string;
1398
1403
  }[];
1399
1404
  addedFileVersions: {
1400
1405
  path: string;
1401
1406
  content: string;
1402
1407
  }[];
1403
1408
  resetFileVersions: boolean;
1404
- data: {
1405
- name: string;
1406
- id: string;
1407
- input: Record<string, any>;
1408
- };
1409
1409
  }>, z.ZodObject<{
1410
1410
  type: z.ZodLiteral<"terminal-command-result">;
1411
1411
  userInputId: z.ZodString;
@@ -7,18 +7,18 @@ export declare const userSchema: z.ZodObject<{
7
7
  fingerprintId: z.ZodString;
8
8
  fingerprintHash: z.ZodString;
9
9
  }, "strip", z.ZodTypeAny, {
10
- email: string;
11
10
  name: string | null;
11
+ email: string;
12
12
  id: string;
13
- fingerprintId: string;
14
13
  authToken: string;
14
+ fingerprintId: string;
15
15
  fingerprintHash: string;
16
16
  }, {
17
- email: string;
18
17
  name: string | null;
18
+ email: string;
19
19
  id: string;
20
- fingerprintId: string;
21
20
  authToken: string;
21
+ fingerprintId: string;
22
22
  fingerprintHash: string;
23
23
  }>;
24
24
  export type User = z.infer<typeof userSchema>;