@builder.io/ai-utils 0.5.34 → 0.5.35
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 +34 -12
- package/src/projects.d.ts +1 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -147,6 +147,10 @@ export interface GetScreenshotToolInput {
|
|
|
147
147
|
width?: number;
|
|
148
148
|
height?: number;
|
|
149
149
|
}
|
|
150
|
+
export interface WebFetchToolInput {
|
|
151
|
+
url: string;
|
|
152
|
+
prompt: string;
|
|
153
|
+
}
|
|
150
154
|
export interface CodeGenToolMap {
|
|
151
155
|
view_path: ViewPathToolInput;
|
|
152
156
|
glob_search: GlobSearchToolInput;
|
|
@@ -182,6 +186,7 @@ export interface CodeGenToolMap {
|
|
|
182
186
|
TodoWrite: TodoWriteToolInput;
|
|
183
187
|
BuilderEdit: BuilderEditToolInput;
|
|
184
188
|
LS: ListDirToolInput;
|
|
189
|
+
WebFetch: WebFetchToolInput;
|
|
185
190
|
}
|
|
186
191
|
export type CodeGenTools = keyof CodeGenToolMap;
|
|
187
192
|
export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
@@ -209,6 +214,8 @@ export interface CodeGenInputOptions {
|
|
|
209
214
|
workingDirectory?: string;
|
|
210
215
|
encryptKey?: string;
|
|
211
216
|
modelOverride?: string;
|
|
217
|
+
redactUserMessages?: boolean;
|
|
218
|
+
redactLLMMessages?: boolean;
|
|
212
219
|
builderContent?: BuilderContent;
|
|
213
220
|
framework?: CodeGenFramework;
|
|
214
221
|
styleLibrary?: CodeGenStyleLibrary;
|
|
@@ -227,6 +234,7 @@ export interface CodeGenInputOptions {
|
|
|
227
234
|
pingEvents?: boolean;
|
|
228
235
|
forceCompact?: boolean;
|
|
229
236
|
hadPagination?: boolean;
|
|
237
|
+
repair?: boolean;
|
|
230
238
|
searchResponse?: any | null;
|
|
231
239
|
prettierConfig?: PrettierOptions;
|
|
232
240
|
role?: "user" | "agent";
|
|
@@ -553,7 +561,7 @@ export interface UserSourceBuilder {
|
|
|
553
561
|
userId?: string;
|
|
554
562
|
userName?: string;
|
|
555
563
|
userEmail?: string;
|
|
556
|
-
role: "user";
|
|
564
|
+
role: "user" | "agent";
|
|
557
565
|
photoURL?: string;
|
|
558
566
|
principals?: string[];
|
|
559
567
|
}
|
|
@@ -588,7 +596,7 @@ export interface UserSourceBitbucket {
|
|
|
588
596
|
}
|
|
589
597
|
export interface UserSourceAgent {
|
|
590
598
|
source: "agent";
|
|
591
|
-
role: "agent";
|
|
599
|
+
role: "agent" | "user";
|
|
592
600
|
principals?: string[];
|
|
593
601
|
}
|
|
594
602
|
export type UserSource = UserSourceBuilder | UserSourceGithub | UserSourceGitlab | UserSourceAzure | UserSourceBitbucket | UserSourceAgent;
|
|
@@ -605,6 +613,7 @@ export interface GenerateUserMessage {
|
|
|
605
613
|
dropAbortedPrompt?: boolean;
|
|
606
614
|
modelOverride?: string;
|
|
607
615
|
maxCompletions?: number;
|
|
616
|
+
repair?: boolean;
|
|
608
617
|
}
|
|
609
618
|
export interface UserInput {
|
|
610
619
|
userMessage: GenerateUserMessage | undefined;
|
|
@@ -809,6 +818,28 @@ export type MachineConfig = (RemoteMachineConfig & {
|
|
|
809
818
|
arch: string;
|
|
810
819
|
environment: "local";
|
|
811
820
|
};
|
|
821
|
+
export interface PrivacyMode {
|
|
822
|
+
encrypt: boolean;
|
|
823
|
+
encryptKey?: string;
|
|
824
|
+
/**
|
|
825
|
+
* If true, the user messages will be redacted from the history.
|
|
826
|
+
*
|
|
827
|
+
* @default false
|
|
828
|
+
*/
|
|
829
|
+
redactUserMessages?: boolean;
|
|
830
|
+
/**
|
|
831
|
+
* If true, all the text messages from the LLM will be redacted.
|
|
832
|
+
*
|
|
833
|
+
* @default false
|
|
834
|
+
*/
|
|
835
|
+
redactLLMMessages?: boolean;
|
|
836
|
+
/**
|
|
837
|
+
* If true, the CLI will enable MCP servers during privacy mode.
|
|
838
|
+
*
|
|
839
|
+
* @default false
|
|
840
|
+
*/
|
|
841
|
+
mcpServers?: boolean;
|
|
842
|
+
}
|
|
812
843
|
export interface FusionConfig {
|
|
813
844
|
devCommand?: string;
|
|
814
845
|
checkCommand?: string;
|
|
@@ -829,16 +860,7 @@ export interface FusionConfig {
|
|
|
829
860
|
isLocal?: boolean;
|
|
830
861
|
envVariables?: Record<string, string>;
|
|
831
862
|
accessControl?: AclPolicy;
|
|
832
|
-
privacyMode?:
|
|
833
|
-
encrypt: boolean;
|
|
834
|
-
encryptKey?: string;
|
|
835
|
-
/**
|
|
836
|
-
* If true, the CLI will enable MCP servers during privacy mode.
|
|
837
|
-
*
|
|
838
|
-
* @default false
|
|
839
|
-
*/
|
|
840
|
-
mcpServers?: boolean;
|
|
841
|
-
};
|
|
863
|
+
privacyMode?: PrivacyMode;
|
|
842
864
|
repoIndexingConfig?: RepoIndexingConfig;
|
|
843
865
|
machine?: RemoteMachineConfig;
|
|
844
866
|
_attemptDryRunBackupGit?: boolean;
|
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" | "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" | "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;
|