codebuff 1.0.249 → 1.0.251

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 (29) hide show
  1. package/dist/common/actions.d.ts +32 -32
  2. package/dist/common/types/usage.d.ts +2 -2
  3. package/dist/common/websockets/websocket-schema.d.ts +68 -68
  4. package/package.json +1 -1
  5. package/dist/common/billing/auto-topup.d.ts +0 -8
  6. package/dist/common/billing/auto-topup.js +0 -192
  7. package/dist/common/billing/auto-topup.js.map +0 -1
  8. package/dist/common/billing/balance-calculator.d.ts +0 -57
  9. package/dist/common/billing/balance-calculator.js +0 -218
  10. package/dist/common/billing/balance-calculator.js.map +0 -1
  11. package/dist/common/billing/conversion.d.ts +0 -9
  12. package/dist/common/billing/conversion.js +0 -20
  13. package/dist/common/billing/conversion.js.map +0 -1
  14. package/dist/common/billing/credit-conversion.d.ts +0 -24
  15. package/dist/common/billing/credit-conversion.js +0 -48
  16. package/dist/common/billing/credit-conversion.js.map +0 -1
  17. package/dist/common/billing/grant-credits.d.ts +0 -43
  18. package/dist/common/billing/grant-credits.js +0 -266
  19. package/dist/common/billing/grant-credits.js.map +0 -1
  20. package/dist/common/billing/plans.d.ts +0 -13
  21. package/dist/common/billing/plans.js +0 -44
  22. package/dist/common/billing/plans.js.map +0 -1
  23. package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +0 -66
  24. package/dist/common/types/plan.d.ts +0 -24
  25. package/dist/common/types/plan.js +0 -3
  26. package/dist/common/types/plan.js.map +0 -1
  27. package/dist/common/util/server/referral.d.ts +0 -14
  28. package/dist/common/util/server/referral.js +0 -85
  29. package/dist/common/util/server/referral.js.map +0 -1
@@ -4,12 +4,12 @@ export declare const FileChangeSchema: z.ZodObject<{
4
4
  path: z.ZodString;
5
5
  content: z.ZodString;
6
6
  }, "strip", z.ZodTypeAny, {
7
- type: "patch" | "file";
8
7
  path: string;
8
+ type: "file" | "patch";
9
9
  content: string;
10
10
  }, {
11
- type: "patch" | "file";
12
11
  path: string;
12
+ type: "file" | "patch";
13
13
  content: string;
14
14
  }>;
15
15
  export type FileChange = z.infer<typeof FileChangeSchema>;
@@ -18,12 +18,12 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
18
18
  path: z.ZodString;
19
19
  content: z.ZodString;
20
20
  }, "strip", z.ZodTypeAny, {
21
- type: "patch" | "file";
22
21
  path: string;
22
+ type: "file" | "patch";
23
23
  content: string;
24
24
  }, {
25
- type: "patch" | "file";
26
25
  path: string;
26
+ type: "file" | "patch";
27
27
  content: string;
28
28
  }>, "many">;
29
29
  export type FileChanges = z.infer<typeof CHANGES>;
@@ -779,7 +779,6 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
779
779
  }>;
780
780
  }, "strip", z.ZodTypeAny, {
781
781
  type: "init";
782
- fingerprintId: string;
783
782
  fileContext: {
784
783
  currentWorkingDirectory: string;
785
784
  fileTree: import("./util/file").FileTreeNode[];
@@ -807,10 +806,10 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
807
806
  content: string;
808
807
  }[][] | undefined;
809
808
  };
809
+ fingerprintId: string;
810
810
  authToken?: string | undefined;
811
811
  }, {
812
812
  type: "init";
813
- fingerprintId: string;
814
813
  fileContext: {
815
814
  currentWorkingDirectory: string;
816
815
  fileTree: import("./util/file").FileTreeNode[];
@@ -838,6 +837,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
838
837
  content: string;
839
838
  }[][] | undefined;
840
839
  };
840
+ fingerprintId: string;
841
841
  authToken?: string | undefined;
842
842
  }>, z.ZodObject<{
843
843
  type: z.ZodLiteral<"generate-commit-message">;
@@ -913,12 +913,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
913
913
  path: z.ZodString;
914
914
  content: z.ZodString;
915
915
  }, "strip", z.ZodTypeAny, {
916
- type: "patch" | "file";
917
916
  path: string;
917
+ type: "file" | "patch";
918
918
  content: string;
919
919
  }, {
920
- type: "patch" | "file";
921
920
  path: string;
921
+ type: "file" | "patch";
922
922
  content: string;
923
923
  }>, "many">;
924
924
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -926,12 +926,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
926
926
  path: z.ZodString;
927
927
  content: z.ZodString;
928
928
  }, "strip", z.ZodTypeAny, {
929
- type: "patch" | "file";
930
929
  path: string;
930
+ type: "file" | "patch";
931
931
  content: string;
932
932
  }, {
933
- type: "patch" | "file";
934
933
  path: string;
934
+ type: "file" | "patch";
935
935
  content: string;
936
936
  }>, "many">;
937
937
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -956,13 +956,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
956
956
  userInputId: string;
957
957
  response: string;
958
958
  changes: {
959
- type: "patch" | "file";
960
959
  path: string;
960
+ type: "file" | "patch";
961
961
  content: string;
962
962
  }[];
963
963
  changesAlreadyApplied: {
964
- type: "patch" | "file";
965
964
  path: string;
965
+ type: "file" | "patch";
966
966
  content: string;
967
967
  }[];
968
968
  addedFileVersions: {
@@ -980,13 +980,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
980
980
  userInputId: string;
981
981
  response: string;
982
982
  changes: {
983
- type: "patch" | "file";
984
983
  path: string;
984
+ type: "file" | "patch";
985
985
  content: string;
986
986
  }[];
987
987
  changesAlreadyApplied: {
988
- type: "patch" | "file";
989
988
  path: string;
989
+ type: "file" | "patch";
990
990
  content: string;
991
991
  }[];
992
992
  addedFileVersions: {
@@ -1656,12 +1656,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1656
1656
  path: z.ZodString;
1657
1657
  content: z.ZodString;
1658
1658
  }, "strip", z.ZodTypeAny, {
1659
- type: "patch" | "file";
1660
1659
  path: string;
1660
+ type: "file" | "patch";
1661
1661
  content: string;
1662
1662
  }, {
1663
- type: "patch" | "file";
1664
1663
  path: string;
1664
+ type: "file" | "patch";
1665
1665
  content: string;
1666
1666
  }>, "many">;
1667
1667
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -1669,12 +1669,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1669
1669
  path: z.ZodString;
1670
1670
  content: z.ZodString;
1671
1671
  }, "strip", z.ZodTypeAny, {
1672
- type: "patch" | "file";
1673
1672
  path: string;
1673
+ type: "file" | "patch";
1674
1674
  content: string;
1675
1675
  }, {
1676
- type: "patch" | "file";
1677
1676
  path: string;
1677
+ type: "file" | "patch";
1678
1678
  content: string;
1679
1679
  }>, "many">;
1680
1680
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -1699,13 +1699,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1699
1699
  userInputId: string;
1700
1700
  response: string;
1701
1701
  changes: {
1702
- type: "patch" | "file";
1703
1702
  path: string;
1703
+ type: "file" | "patch";
1704
1704
  content: string;
1705
1705
  }[];
1706
1706
  changesAlreadyApplied: {
1707
- type: "patch" | "file";
1708
1707
  path: string;
1708
+ type: "file" | "patch";
1709
1709
  content: string;
1710
1710
  }[];
1711
1711
  addedFileVersions: {
@@ -1723,13 +1723,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
1723
1723
  userInputId: string;
1724
1724
  response: string;
1725
1725
  changes: {
1726
- type: "patch" | "file";
1727
1726
  path: string;
1727
+ type: "file" | "patch";
1728
1728
  content: string;
1729
1729
  }[];
1730
1730
  changesAlreadyApplied: {
1731
- type: "patch" | "file";
1732
1731
  path: string;
1732
+ type: "file" | "patch";
1733
1733
  content: string;
1734
1734
  }[];
1735
1735
  addedFileVersions: {
@@ -2395,12 +2395,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2395
2395
  path: z.ZodString;
2396
2396
  content: z.ZodString;
2397
2397
  }, "strip", z.ZodTypeAny, {
2398
- type: "patch" | "file";
2399
2398
  path: string;
2399
+ type: "file" | "patch";
2400
2400
  content: string;
2401
2401
  }, {
2402
- type: "patch" | "file";
2403
2402
  path: string;
2403
+ type: "file" | "patch";
2404
2404
  content: string;
2405
2405
  }>, "many">;
2406
2406
  changesAlreadyApplied: z.ZodArray<z.ZodObject<{
@@ -2408,12 +2408,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2408
2408
  path: z.ZodString;
2409
2409
  content: z.ZodString;
2410
2410
  }, "strip", z.ZodTypeAny, {
2411
- type: "patch" | "file";
2412
2411
  path: string;
2412
+ type: "file" | "patch";
2413
2413
  content: string;
2414
2414
  }, {
2415
- type: "patch" | "file";
2416
2415
  path: string;
2416
+ type: "file" | "patch";
2417
2417
  content: string;
2418
2418
  }>, "many">;
2419
2419
  addedFileVersions: z.ZodArray<z.ZodObject<{
@@ -2437,13 +2437,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2437
2437
  userInputId: string;
2438
2438
  response: string;
2439
2439
  changes: {
2440
- type: "patch" | "file";
2441
2440
  path: string;
2441
+ type: "file" | "patch";
2442
2442
  content: string;
2443
2443
  }[];
2444
2444
  changesAlreadyApplied: {
2445
- type: "patch" | "file";
2446
2445
  path: string;
2446
+ type: "file" | "patch";
2447
2447
  content: string;
2448
2448
  }[];
2449
2449
  addedFileVersions: {
@@ -2461,13 +2461,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2461
2461
  userInputId: string;
2462
2462
  response: string;
2463
2463
  changes: {
2464
- type: "patch" | "file";
2465
2464
  path: string;
2465
+ type: "file" | "patch";
2466
2466
  content: string;
2467
2467
  }[];
2468
2468
  changesAlreadyApplied: {
2469
- type: "patch" | "file";
2470
2469
  path: string;
2470
+ type: "file" | "patch";
2471
2471
  content: string;
2472
2472
  }[];
2473
2473
  addedFileVersions: {
@@ -2561,13 +2561,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
2561
2561
  error: z.ZodOptional<z.ZodString>;
2562
2562
  remainingBalance: z.ZodOptional<z.ZodNumber>;
2563
2563
  }, "strip", z.ZodTypeAny, {
2564
- type: "action-error";
2565
2564
  message: string;
2565
+ type: "action-error";
2566
2566
  remainingBalance?: number | undefined;
2567
2567
  error?: string | undefined;
2568
2568
  }, {
2569
- type: "action-error";
2570
2569
  message: string;
2570
+ type: "action-error";
2571
2571
  remainingBalance?: number | undefined;
2572
2572
  error?: string | undefined;
2573
2573
  }>, z.ZodObject<{
@@ -19,22 +19,22 @@ export declare const usageDataSchema: z.ZodObject<{
19
19
  }>;
20
20
  nextQuotaReset: z.ZodNullable<z.ZodDate>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- usageThisCycle: number;
23
22
  balance: {
24
23
  totalRemaining: number;
25
24
  totalDebt: number;
26
25
  netBalance: number;
27
26
  breakdown?: Record<string, number> | undefined;
28
27
  };
28
+ usageThisCycle: number;
29
29
  nextQuotaReset: Date | null;
30
30
  }, {
31
- usageThisCycle: number;
32
31
  balance: {
33
32
  totalRemaining: number;
34
33
  totalDebt: number;
35
34
  netBalance: number;
36
35
  breakdown?: Record<string, number> | undefined;
37
36
  };
37
+ usageThisCycle: number;
38
38
  nextQuotaReset: Date | null;
39
39
  }>;
40
40
  export type UsageData = z.infer<typeof usageDataSchema>;