@builder.io/ai-utils 0.6.1 → 0.6.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { Attachment, ContentMessageItemToolResult } from "./messages";
2
2
  import type { BuilderContent } from "./completion";
3
3
  import type { Options as PrettierOptions } from "prettier";
4
4
  import type { UserContext } from "./mapping";
5
+ import type { ForcedBackup } from "./projects";
5
6
  export type ImportType = "named" | "default";
6
7
  export interface ESMImport {
7
8
  importName: string;
@@ -764,7 +765,7 @@ export interface BranchBackup {
764
765
  at: number;
765
766
  size: number;
766
767
  gitBranchName: string;
767
- initialCommitHash: string;
768
+ initialCommitHash: string | undefined;
768
769
  lastCommitHash: string;
769
770
  partial: boolean;
770
771
  status: "initiated" | "completed";
@@ -772,6 +773,7 @@ export interface BranchBackup {
772
773
  empty?: boolean;
773
774
  repoUrl: string;
774
775
  version?: "v1" | "v2";
776
+ forced: ForcedBackup;
775
777
  }
776
778
  export interface CheckBackupDataResultValid {
777
779
  state: "valid";
@@ -779,6 +781,12 @@ export interface CheckBackupDataResultValid {
779
781
  message: string;
780
782
  backup: BranchBackup;
781
783
  }
784
+ export interface CheckBackupDataResultForcedBackup {
785
+ state: "forced-backup";
786
+ outcome: "forced-offline-full-backup";
787
+ message: string;
788
+ backup: BranchBackup;
789
+ }
782
790
  export interface CheckBackupDataResultStale {
783
791
  state: "stale";
784
792
  outcome: "hash-mismatch";
@@ -791,7 +799,7 @@ export interface CheckBackupDataResultInvalid {
791
799
  message: string;
792
800
  backup: BranchBackup | undefined;
793
801
  }
794
- export type CheckBackupDataResult = CheckBackupDataResultValid | CheckBackupDataResultStale | CheckBackupDataResultInvalid;
802
+ export type CheckBackupDataResult = CheckBackupDataResultValid | CheckBackupDataResultForcedBackup | CheckBackupDataResultStale | CheckBackupDataResultInvalid;
795
803
  export interface BackupMetadata {
796
804
  check: CheckBackupDataResultValid | CheckBackupDataResultStale;
797
805
  downloadUrl: GitBackupDownloadUrlResult | undefined;
@@ -865,7 +873,7 @@ export interface PrivacyMode {
865
873
  */
866
874
  mcpServers?: boolean;
867
875
  }
868
- export type Mode = "init-and-launch" | "backup";
876
+ export type Mode = "init-and-launch" | "backup" | "backup-force-full";
869
877
  export interface FusionConfig {
870
878
  devCommand?: string;
871
879
  checkCommand?: string;
package/src/projects.d.ts CHANGED
@@ -167,8 +167,6 @@ export interface GitBackupUploadUrlOptions {
167
167
  projectId: string;
168
168
  branchName: string;
169
169
  size: number;
170
- initialCommitHash: string;
171
- lastCommitHash: string;
172
170
  partial: boolean;
173
171
  contentMd5: string;
174
172
  }
@@ -178,12 +176,13 @@ export interface GitBackupDownloadUrlOptions {
178
176
  branchName: string;
179
177
  partial: boolean;
180
178
  }
179
+ export type ForcedBackup = "offline-full" | "offline" | undefined;
181
180
  export interface GitBackupRecordOptions {
182
181
  projectId: string;
183
182
  branchName: string;
184
183
  size: number;
185
184
  gitBranchName: string;
186
- initialCommitHash: string;
185
+ initialCommitHash: string | undefined;
187
186
  lastCommitHash: string;
188
187
  partial: boolean;
189
188
  empty: boolean;
@@ -191,6 +190,7 @@ export interface GitBackupRecordOptions {
191
190
  contentMd5?: string;
192
191
  repoUrl: string;
193
192
  version: "v1" | "v2";
193
+ forced: ForcedBackup;
194
194
  }
195
195
  export interface GitBackupRecordResult {
196
196
  success: boolean;