@builder.io/ai-utils 0.5.41 → 0.6.1
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 +22 -7
- package/src/projects.d.ts +28 -0
- package/src/repo-indexing.d.ts +1 -0
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -151,6 +151,14 @@ export interface WebFetchToolInput {
|
|
|
151
151
|
url: string;
|
|
152
152
|
prompt: string;
|
|
153
153
|
}
|
|
154
|
+
export interface SetImportantFilesToolInput {
|
|
155
|
+
important_files: {
|
|
156
|
+
file_path: string;
|
|
157
|
+
relevance: "high" | "medium" | "low";
|
|
158
|
+
offset?: number;
|
|
159
|
+
limit?: number;
|
|
160
|
+
}[];
|
|
161
|
+
}
|
|
154
162
|
export interface CodeGenToolMap {
|
|
155
163
|
view_path: ViewPathToolInput;
|
|
156
164
|
glob_search: GlobSearchToolInput;
|
|
@@ -187,6 +195,7 @@ export interface CodeGenToolMap {
|
|
|
187
195
|
BuilderEdit: BuilderEditToolInput;
|
|
188
196
|
LS: ListDirToolInput;
|
|
189
197
|
WebFetch: WebFetchToolInput;
|
|
198
|
+
SetImportantFiles: SetImportantFilesToolInput;
|
|
190
199
|
}
|
|
191
200
|
export type CodeGenTools = keyof CodeGenToolMap;
|
|
192
201
|
export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
@@ -249,7 +258,7 @@ export interface CodeGenInputOptions {
|
|
|
249
258
|
/** @deprecated */
|
|
250
259
|
vcpId?: string;
|
|
251
260
|
}
|
|
252
|
-
export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit";
|
|
261
|
+
export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit" | "unknown-design-system";
|
|
253
262
|
export type Feature = "component-mapping";
|
|
254
263
|
export interface CodegenUsage {
|
|
255
264
|
total: number;
|
|
@@ -765,20 +774,26 @@ export interface BranchBackup {
|
|
|
765
774
|
version?: "v1" | "v2";
|
|
766
775
|
}
|
|
767
776
|
export interface CheckBackupDataResultValid {
|
|
768
|
-
|
|
777
|
+
state: "valid";
|
|
769
778
|
outcome: "valid";
|
|
770
779
|
message: string;
|
|
771
780
|
backup: BranchBackup;
|
|
772
781
|
}
|
|
782
|
+
export interface CheckBackupDataResultStale {
|
|
783
|
+
state: "stale";
|
|
784
|
+
outcome: "hash-mismatch";
|
|
785
|
+
message: string;
|
|
786
|
+
backup: BranchBackup;
|
|
787
|
+
}
|
|
773
788
|
export interface CheckBackupDataResultInvalid {
|
|
774
|
-
|
|
775
|
-
outcome: "no-backup" | "
|
|
789
|
+
state: "invalid";
|
|
790
|
+
outcome: "no-backup" | "error" | "not-completed" | "no-session-id" | "no-last-commit-hash" | "no-backup-file" | "empty-full-backup" | "no-vcpCodeGenEvent" | "no-after-commit" | "no-signed-url" | "no-git-branch-name" | "repo-url-mismatch" | "branch-uninitialized" | "unexpected-partial-backup" | "unexpected-full-backup";
|
|
776
791
|
message: string;
|
|
777
792
|
backup: BranchBackup | undefined;
|
|
778
793
|
}
|
|
779
|
-
export type CheckBackupDataResult = CheckBackupDataResultValid | CheckBackupDataResultInvalid;
|
|
794
|
+
export type CheckBackupDataResult = CheckBackupDataResultValid | CheckBackupDataResultStale | CheckBackupDataResultInvalid;
|
|
780
795
|
export interface BackupMetadata {
|
|
781
|
-
check: CheckBackupDataResultValid;
|
|
796
|
+
check: CheckBackupDataResultValid | CheckBackupDataResultStale;
|
|
782
797
|
downloadUrl: GitBackupDownloadUrlResult | undefined;
|
|
783
798
|
}
|
|
784
799
|
export interface WorkspaceFolder {
|
|
@@ -928,7 +943,7 @@ export interface InitState {
|
|
|
928
943
|
branch: string;
|
|
929
944
|
}[];
|
|
930
945
|
}
|
|
931
|
-
export type LaunchServerState = "initial" | "init-running" | "init-complete" | "ready" | "active-session" | "error" | "closing";
|
|
946
|
+
export type LaunchServerState = "initial" | "init-running" | "init-complete" | "ready" | "active-session" | "init-error" | "session-error" | "error" | "closing";
|
|
932
947
|
export interface LaunchServerStatus {
|
|
933
948
|
status: "ok";
|
|
934
949
|
state: LaunchServerState;
|
package/src/projects.d.ts
CHANGED
|
@@ -209,4 +209,32 @@ export interface CodegenRuntimeStatus {
|
|
|
209
209
|
lastServerState?: LaunchServerState;
|
|
210
210
|
lastServerVersion?: string;
|
|
211
211
|
}
|
|
212
|
+
export interface BackupGitRepoResultValid {
|
|
213
|
+
success: true;
|
|
214
|
+
partial: boolean;
|
|
215
|
+
repoUrl: string;
|
|
216
|
+
empty: boolean;
|
|
217
|
+
lastCommitHash: string;
|
|
218
|
+
backupRef: string | undefined;
|
|
219
|
+
}
|
|
220
|
+
export interface BackupGitRepoResultInvalid {
|
|
221
|
+
success: false;
|
|
222
|
+
reason: "project_removed";
|
|
223
|
+
}
|
|
224
|
+
export type BackupGitRepoResult = BackupGitRepoResultValid | BackupGitRepoResultInvalid;
|
|
225
|
+
export type ShutdownResponse = {
|
|
226
|
+
success: true;
|
|
227
|
+
message: string;
|
|
228
|
+
skipped: boolean;
|
|
229
|
+
reason: string;
|
|
230
|
+
} | {
|
|
231
|
+
success: false;
|
|
232
|
+
message?: string;
|
|
233
|
+
skipped?: boolean;
|
|
234
|
+
reason?: string;
|
|
235
|
+
error?: Error;
|
|
236
|
+
} | BackupGitRepoResult;
|
|
237
|
+
export type ShutdownResponseSerialized = Omit<ShutdownResponse, "error"> & {
|
|
238
|
+
error?: string;
|
|
239
|
+
};
|
|
212
240
|
export {};
|
package/src/repo-indexing.d.ts
CHANGED