@builder.io/ai-utils 0.5.12 → 0.5.14
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 +1 -1
- package/src/codegen.d.ts +36 -16
- package/src/projects.d.ts +4 -8
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -2,12 +2,6 @@ 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
|
-
export interface LoadingState {
|
|
6
|
-
type: "tool_start" | "tool_end";
|
|
7
|
-
toolName?: string;
|
|
8
|
-
toolId?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
}
|
|
11
5
|
export type ImportType = "named" | "default";
|
|
12
6
|
export interface ESMImport {
|
|
13
7
|
importName: string;
|
|
@@ -700,16 +694,41 @@ export interface GenerateCodeEventMCPStatus {
|
|
|
700
694
|
type: "mcp-status";
|
|
701
695
|
status: Record<string, MCPClientStatus>;
|
|
702
696
|
}
|
|
703
|
-
export type GenerateCodeEvent = ActionItem | GenerateCodeEventDone | GenerateCodeEventContinue | GenerateCodeEventPagination | GenerateCodeEventDelta | GenerateCodeEventError | GenerateCodeEventPing | GenerateCodeEventMCPStatus | GenerateCodeEventUser
|
|
704
|
-
export interface GenerateCodeEventEditorAILoadingState {
|
|
705
|
-
type: "loading_state";
|
|
706
|
-
loadingState: LoadingState;
|
|
707
|
-
content?: string;
|
|
708
|
-
actionTitle?: string;
|
|
709
|
-
artifactTitle?: string;
|
|
710
|
-
filePath?: string;
|
|
711
|
-
}
|
|
697
|
+
export type GenerateCodeEvent = ActionItem | GenerateCodeEventDone | GenerateCodeEventContinue | GenerateCodeEventPagination | GenerateCodeEventDelta | GenerateCodeEventError | GenerateCodeEventPing | GenerateCodeEventMCPStatus | GenerateCodeEventUser;
|
|
712
698
|
export type CommitMode = "commits" | "draft-prs" | "prs";
|
|
699
|
+
export interface GitBackupDownloadUrlResult {
|
|
700
|
+
signedUrl: string;
|
|
701
|
+
filePath: string;
|
|
702
|
+
expiresAt: string;
|
|
703
|
+
partial: boolean;
|
|
704
|
+
}
|
|
705
|
+
export interface BranchBackup {
|
|
706
|
+
at: number;
|
|
707
|
+
size: number;
|
|
708
|
+
gitBranchName: string;
|
|
709
|
+
initialCommitHash: string;
|
|
710
|
+
lastCommitHash: string;
|
|
711
|
+
partial: boolean;
|
|
712
|
+
status: "initiated" | "completed";
|
|
713
|
+
contentMd5: string;
|
|
714
|
+
}
|
|
715
|
+
export interface CheckBackupDataResultValid {
|
|
716
|
+
hasValidBackup: true;
|
|
717
|
+
outcome: "valid";
|
|
718
|
+
message: string;
|
|
719
|
+
backup: BranchBackup;
|
|
720
|
+
}
|
|
721
|
+
export interface CheckBackupDataResultInvalid {
|
|
722
|
+
hasValidBackup: false;
|
|
723
|
+
outcome: "valid" | "no-backup" | "hash-mismatch" | "error" | "not-completed" | "no-session-id" | "no-last-commit-hash" | "no-backup-file" | "no-vcpCodeGenEvent" | "no-after-commit" | "no-signed-url" | "no-git-branch-name";
|
|
724
|
+
message: string;
|
|
725
|
+
backup: BranchBackup | undefined;
|
|
726
|
+
}
|
|
727
|
+
export type CheckBackupDataResult = CheckBackupDataResultValid | CheckBackupDataResultInvalid;
|
|
728
|
+
export interface BackupMetadata {
|
|
729
|
+
check: CheckBackupDataResultValid;
|
|
730
|
+
downloadUrl: GitBackupDownloadUrlResult;
|
|
731
|
+
}
|
|
713
732
|
export interface WorkspaceFolder {
|
|
714
733
|
enableGit?: boolean;
|
|
715
734
|
path: string;
|
|
@@ -717,6 +736,7 @@ export interface WorkspaceFolder {
|
|
|
717
736
|
repoUrl?: string;
|
|
718
737
|
repoName?: string;
|
|
719
738
|
branchName?: string;
|
|
739
|
+
backupMetadata?: BackupMetadata;
|
|
720
740
|
}
|
|
721
741
|
export interface WorkspaceConfiguration {
|
|
722
742
|
agentsMD?: string;
|
|
@@ -804,7 +824,7 @@ export interface LoadHistoryResult {
|
|
|
804
824
|
updatedUnixTime: number;
|
|
805
825
|
turns: CodegenTurn[];
|
|
806
826
|
}
|
|
807
|
-
export type InitStateStep = "initial" | "init" | "validation" | "check-directories" | "create-directories" | "configure-git-repos" | "check-existing-git" | "update-remote-url" | "clone-repo" | "configure-git-user" | "stash-changes" | "collect-repo-info" | "init-success" | "init-failed";
|
|
827
|
+
export type InitStateStep = "initial" | "init" | "validation" | "check-directories" | "create-directories" | "configure-git-repos" | "check-existing-git" | "update-remote-url" | "clone-repo" | "apply-partial-backup" | "configure-git-user" | "stash-changes" | "collect-repo-info" | "init-success" | "init-failed";
|
|
808
828
|
export interface InitStatusLog {
|
|
809
829
|
id: number;
|
|
810
830
|
timestamp: string;
|
package/src/projects.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface ReadyMessage extends BaseMessage {
|
|
|
135
135
|
export type MachineState = "unknown" | "created" | "starting" | "started" | "stopping" | "stopped" | "suspending" | "suspended" | "replacing" | "destroying" | "destroyed" | "not-found" | "running" | "failed";
|
|
136
136
|
export type FlyVolumeState = "unknown" | "creating" | "created" | "extending" | "restoring" | "enabling_remote_export" | "hydrating" | "recovering" | "scheduling_destroy" | "pending_destroy" | "failed";
|
|
137
137
|
export type GitAuthErrorCode = "git-auth-failed" | "git-auth-failed-root-repo" | "git-auth-failed-folder-added-by" | "git-auth-failed-folder-created-by" | "git-auth-failed-folder-server-token" | "git-auth-failed-root-repo-server-token";
|
|
138
|
-
export type EnsureContainerErrorCode = "FLY_APP_CHECK_ERROR" | "FLY_CAPACITY_ERROR" | "FLY_PERMISSIONS_TOKEN_ERROR" | "FLY_VOLUME_CREATE_ERROR" | "FLY_VOLUME_FORK_ERROR" | "FLY_VOLUME_DELETE_RECENTLY_FORKED_ERROR" | "FLY_MACHINE_CREATE_ERROR" | "FLY_VOLUME_CHECK_ERROR" | "FLY_NON_MOUNTABLE_VOLUME_ERROR" | "FLY_DEPRECATED_REGION_ERROR" | "FLY_VOLUME_NOT_FOUND" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-branch-not-found" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
138
|
+
export type EnsureContainerErrorCode = "FLY_APP_CHECK_ERROR" | "FLY_CAPACITY_ERROR" | "FLY_PERMISSIONS_TOKEN_ERROR" | "FLY_VOLUME_CREATE_ERROR" | "FLY_VOLUME_FORK_ERROR" | "FLY_VOLUME_DELETE_RECENTLY_FORKED_ERROR" | "FLY_MACHINE_CREATE_ERROR" | "FLY_VOLUME_CHECK_ERROR" | "FLY_NON_MOUNTABLE_VOLUME_ERROR" | "FLY_DEPRECATED_REGION_ERROR" | "FLY_VOLUME_NOT_FOUND" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-branch-not-found" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | "missing-app-with-machine-or-volume" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
139
139
|
export interface ErrorStateMessage extends BaseMessage {
|
|
140
140
|
state: "error";
|
|
141
141
|
message: string;
|
|
@@ -170,15 +170,10 @@ export interface GitBackupUploadUrlOptions {
|
|
|
170
170
|
initialCommitHash: string;
|
|
171
171
|
lastCommitHash: string;
|
|
172
172
|
partial: boolean;
|
|
173
|
-
|
|
174
|
-
export interface GitBackupDownloadUrlResult {
|
|
175
|
-
signedUrl: string;
|
|
176
|
-
filePath: string;
|
|
177
|
-
expiresAt: string;
|
|
178
|
-
exists: boolean;
|
|
179
|
-
partial: boolean;
|
|
173
|
+
contentMd5: string;
|
|
180
174
|
}
|
|
181
175
|
export interface GitBackupDownloadUrlOptions {
|
|
176
|
+
spaceId: string;
|
|
182
177
|
projectId: string;
|
|
183
178
|
branchName: string;
|
|
184
179
|
}
|
|
@@ -191,6 +186,7 @@ export interface GitBackupRecordOptions {
|
|
|
191
186
|
lastCommitHash: string;
|
|
192
187
|
partial: boolean;
|
|
193
188
|
status: "initiated" | "completed";
|
|
189
|
+
contentMd5: string;
|
|
194
190
|
}
|
|
195
191
|
export interface GitBackupRecordResult {
|
|
196
192
|
success: boolean;
|