@builder.io/ai-utils 0.7.2 → 0.7.5
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 +5 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/organization.d.ts +20 -0
- package/src/projects.d.ts +5 -1
- package/src/projects.js +1 -0
- package/src/repo-indexing.d.ts +3 -0
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -438,6 +438,7 @@ export interface CodeGenHealthStatus {
|
|
|
438
438
|
proxyServer: string | undefined;
|
|
439
439
|
devCommand: string | undefined;
|
|
440
440
|
setupCommand: string | undefined;
|
|
441
|
+
hasMergeConflict: boolean;
|
|
441
442
|
logs: string | undefined;
|
|
442
443
|
prompt: string;
|
|
443
444
|
message: string;
|
|
@@ -515,6 +516,7 @@ export interface GenerateCompletionStepGit {
|
|
|
515
516
|
canSync: boolean;
|
|
516
517
|
ahead: number;
|
|
517
518
|
behind: number;
|
|
519
|
+
hasMergeConflict: boolean;
|
|
518
520
|
currentCommit: string;
|
|
519
521
|
currentBranch: string;
|
|
520
522
|
remoteBranch: string;
|
|
@@ -687,6 +689,7 @@ export interface CodegenFeedback {
|
|
|
687
689
|
afterCommit?: string;
|
|
688
690
|
linesOfCodeAdded?: number;
|
|
689
691
|
linesOfCodeRemoved?: number;
|
|
692
|
+
commitFailed?: boolean;
|
|
690
693
|
position?: CodeGenPosition;
|
|
691
694
|
}
|
|
692
695
|
export interface CodegenSetLastCompletion {
|
|
@@ -770,6 +773,7 @@ export interface BranchBackup {
|
|
|
770
773
|
at: number;
|
|
771
774
|
size: number;
|
|
772
775
|
gitBranchName: string;
|
|
776
|
+
initialBranch: string | undefined;
|
|
773
777
|
initialCommitHash: string | undefined;
|
|
774
778
|
lastCommitHash: string;
|
|
775
779
|
partial: boolean;
|
|
@@ -779,6 +783,7 @@ export interface BranchBackup {
|
|
|
779
783
|
repoUrl: string;
|
|
780
784
|
version?: "v1" | "v2";
|
|
781
785
|
forced: ForcedBackup;
|
|
786
|
+
metadata?: Record<string, any>;
|
|
782
787
|
}
|
|
783
788
|
export interface CheckBackupDataResultValid {
|
|
784
789
|
state: "valid";
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
package/src/organization.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ interface OrganizationSettings {
|
|
|
9
9
|
enforceMaxUsers?: boolean;
|
|
10
10
|
ssoRestrictedMode?: boolean;
|
|
11
11
|
isUserPluginIntegrationRequestGranted?: boolean;
|
|
12
|
+
githubEnterpriseSetupValue?: {
|
|
13
|
+
host: string;
|
|
14
|
+
clientId: string;
|
|
15
|
+
clientSecret: string;
|
|
16
|
+
appId: string;
|
|
17
|
+
pem: string;
|
|
18
|
+
};
|
|
12
19
|
}
|
|
13
20
|
interface RoleOptions {
|
|
14
21
|
read?: boolean;
|
|
@@ -32,6 +39,16 @@ interface RoleLocales {
|
|
|
32
39
|
allowedLocalesEditList?: string[];
|
|
33
40
|
canEditAllLocales?: boolean;
|
|
34
41
|
}
|
|
42
|
+
export interface ProjectRole {
|
|
43
|
+
options?: {
|
|
44
|
+
view?: boolean;
|
|
45
|
+
editCode?: boolean;
|
|
46
|
+
sendPullRequests?: boolean;
|
|
47
|
+
createBranches?: boolean;
|
|
48
|
+
modifyMcpServers?: boolean;
|
|
49
|
+
modifyProjectSettings?: boolean;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
35
52
|
interface Role {
|
|
36
53
|
id?: string;
|
|
37
54
|
name?: string;
|
|
@@ -41,6 +58,7 @@ interface Role {
|
|
|
41
58
|
models?: string;
|
|
42
59
|
environment?: RoleEnvironment;
|
|
43
60
|
locales?: RoleLocales;
|
|
61
|
+
projects?: "all" | Record<string, ProjectRole>;
|
|
44
62
|
}
|
|
45
63
|
export interface Organization {
|
|
46
64
|
name?: string;
|
|
@@ -65,5 +83,7 @@ export interface Organization {
|
|
|
65
83
|
totalBytesStored?: number;
|
|
66
84
|
lastUpdateBy?: string | null;
|
|
67
85
|
enterpriseTrialEndDate?: number;
|
|
86
|
+
fusionReferrals?: string;
|
|
87
|
+
githubInstallationIds?: number[];
|
|
68
88
|
}
|
|
69
89
|
export {};
|
package/src/projects.d.ts
CHANGED
|
@@ -135,12 +135,13 @@ 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-branch-no-session-id" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | "invalid-backup-without-volume-id" | "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}` | "trying-to-remove-used-volume" | "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-branch-no-session-id" | "project-repo-full-name-not-found" | "project-org-not-found" | "invalid-project-repo-url-already-in-use" | "no-available-regions" | "invalid-backup-without-volume-id" | "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}` | "trying-to-remove-used-volume" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
139
139
|
export interface ErrorStateMessage extends BaseMessage {
|
|
140
140
|
state: "error";
|
|
141
141
|
message: string;
|
|
142
142
|
error: string;
|
|
143
143
|
code: EnsureContainerErrorCode;
|
|
144
|
+
causeError: string;
|
|
144
145
|
}
|
|
145
146
|
export interface CleanupCompletedMessage extends BaseMessage {
|
|
146
147
|
state: "cleanupCompleted";
|
|
@@ -158,6 +159,7 @@ export type GitConfigs = Record<string, GitConfig>;
|
|
|
158
159
|
export declare const EXAMPLE_REPOS: string[];
|
|
159
160
|
export declare const STARTER_REPO = "BuilderIO/fusion-starter";
|
|
160
161
|
export declare const EXAMPLE_OR_STARTER_REPOS: string[];
|
|
162
|
+
export declare const EXAMPLE_OR_STARTER_REPOS_URLS: string[];
|
|
161
163
|
export interface GitBackupUploadUrlResult {
|
|
162
164
|
signedUrl: string;
|
|
163
165
|
filePath: string;
|
|
@@ -182,6 +184,7 @@ export interface GitBackupRecordOptions {
|
|
|
182
184
|
branchName: string;
|
|
183
185
|
size: number;
|
|
184
186
|
gitBranchName: string;
|
|
187
|
+
initialBranch: string;
|
|
185
188
|
initialCommitHash: string | undefined;
|
|
186
189
|
lastCommitHash: string;
|
|
187
190
|
partial: boolean;
|
|
@@ -191,6 +194,7 @@ export interface GitBackupRecordOptions {
|
|
|
191
194
|
repoUrl: string;
|
|
192
195
|
version: "v1" | "v2";
|
|
193
196
|
forced: ForcedBackup;
|
|
197
|
+
metadata?: Record<string, string | undefined>;
|
|
194
198
|
}
|
|
195
199
|
export interface GitBackupRecordResult {
|
|
196
200
|
success: boolean;
|
package/src/projects.js
CHANGED
|
@@ -9,3 +9,4 @@ export const EXAMPLE_REPOS = [
|
|
|
9
9
|
];
|
|
10
10
|
export const STARTER_REPO = "BuilderIO/fusion-starter";
|
|
11
11
|
export const EXAMPLE_OR_STARTER_REPOS = [...EXAMPLE_REPOS, STARTER_REPO];
|
|
12
|
+
export const EXAMPLE_OR_STARTER_REPOS_URLS = EXAMPLE_OR_STARTER_REPOS.map((repo) => `https://github.com/${repo}`);
|