@builder.io/ai-utils 0.8.8 → 0.8.10
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 +8 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/messages.d.ts +1 -0
- package/src/organization.d.ts +7 -0
- package/src/projects.d.ts +2 -2
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { BuilderContent } from "./completion";
|
|
|
3
3
|
import type { Options as PrettierOptions } from "prettier";
|
|
4
4
|
import type { UserContext } from "./mapping";
|
|
5
5
|
import type { ForcedBackup } from "./projects";
|
|
6
|
+
import type { Feature } from "./features";
|
|
6
7
|
export type ImportType = "named" | "default";
|
|
7
8
|
export interface ESMImport {
|
|
8
9
|
importName: string;
|
|
@@ -180,7 +181,6 @@ export interface CodeGenToolMap {
|
|
|
180
181
|
write_file: WriteFileInput;
|
|
181
182
|
search_replace_file: SearchReplaceInput;
|
|
182
183
|
find_media: FindMediaToolInput;
|
|
183
|
-
memory: MemoryToolInput;
|
|
184
184
|
Read: ViewPathToolInput;
|
|
185
185
|
Write: WriteFileInput;
|
|
186
186
|
Edit: SearchReplaceInput;
|
|
@@ -248,6 +248,9 @@ export interface CodeGenInputOptions {
|
|
|
248
248
|
aclPolicy?: AclPolicy;
|
|
249
249
|
repoIndexingConfig?: RepoIndexingConfig;
|
|
250
250
|
enabledTools?: CodeGenTools[];
|
|
251
|
+
enabledMCPs?: string[];
|
|
252
|
+
maxAgentLoops?: number;
|
|
253
|
+
maxAgentTiming?: number;
|
|
251
254
|
/**
|
|
252
255
|
* Maximum output tokens allowed in the LLM response. This will set the maximum
|
|
253
256
|
* token output for the LLM.
|
|
@@ -284,7 +287,6 @@ export interface CodeGenInputOptions {
|
|
|
284
287
|
repair?: boolean;
|
|
285
288
|
}
|
|
286
289
|
export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "abrupt-end" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit" | "unknown-design-system";
|
|
287
|
-
export type Feature = "component-mapping";
|
|
288
290
|
export interface CodegenUsage {
|
|
289
291
|
total: number;
|
|
290
292
|
fast: number;
|
|
@@ -659,6 +661,8 @@ export interface GenerateUserMessage {
|
|
|
659
661
|
isManualContinue?: boolean;
|
|
660
662
|
category?: CodeGenCategory;
|
|
661
663
|
metadata?: Record<string, any>;
|
|
664
|
+
autoPush?: "force-push" | "merge-push" | "ff-push" | "none";
|
|
665
|
+
enabledMCPs?: string[];
|
|
662
666
|
/** @deprecated */
|
|
663
667
|
repair?: boolean;
|
|
664
668
|
}
|
|
@@ -675,6 +679,7 @@ export interface UserInput {
|
|
|
675
679
|
patchFusionConfig?: Partial<FusionConfig> | undefined;
|
|
676
680
|
modelOverride?: string;
|
|
677
681
|
category?: CodeGenCategory;
|
|
682
|
+
enabledMCPs?: string[];
|
|
678
683
|
/** @deprecated */
|
|
679
684
|
repair?: boolean;
|
|
680
685
|
}
|
|
@@ -1066,6 +1071,7 @@ export interface PushChangesOptions {
|
|
|
1066
1071
|
actor?: string;
|
|
1067
1072
|
refreshRemote?: boolean;
|
|
1068
1073
|
pullFirst?: boolean;
|
|
1074
|
+
forcePush?: boolean;
|
|
1069
1075
|
updateRepo?: {
|
|
1070
1076
|
repoFullName: string;
|
|
1071
1077
|
repoUrl: string;
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
package/src/messages.d.ts
CHANGED
package/src/organization.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export interface GithubEnterpriseSetupValue {
|
|
|
6
6
|
pem: string;
|
|
7
7
|
secondaryHost?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface BitbucketEnterprisePAT {
|
|
10
|
+
token: string;
|
|
11
|
+
host: string;
|
|
12
|
+
botUsername: string;
|
|
13
|
+
}
|
|
9
14
|
interface OrganizationSettings {
|
|
10
15
|
attribution?: string[];
|
|
11
16
|
visualEditorAiStyleInspirationURL?: string;
|
|
@@ -19,6 +24,8 @@ interface OrganizationSettings {
|
|
|
19
24
|
isUserPluginIntegrationRequestGranted?: boolean;
|
|
20
25
|
shopify?: boolean;
|
|
21
26
|
githubEnterpriseSetupValue?: GithubEnterpriseSetupValue;
|
|
27
|
+
fusionProviderOverride?: "ssh";
|
|
28
|
+
bitbucketEnterprisePAT?: BitbucketEnterprisePAT;
|
|
22
29
|
}
|
|
23
30
|
interface RoleOptions {
|
|
24
31
|
read?: 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 = "FAILED_TO_START_MACHINE_ERROR" | "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" | "FLY_MACHINE_LIMIT_ERROR" | "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}`;
|
|
138
|
+
export type EnsureContainerErrorCode = "FAILED_TO_START_MACHINE_ERROR" | "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" | "FLY_MACHINE_LIMIT_ERROR" | "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}` | `machine-image-exited-immediately` | `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;
|
|
@@ -153,7 +153,7 @@ export interface CleanupCompletedMessage extends BaseMessage {
|
|
|
153
153
|
export type ProjectsChunkMessage = InitializingMessage | FetchingGithubTokenMessage | FetchingFusionKeyMessage | CheckingAppMessage | CleaningUpAppMessage | CreatingAppMessage | CheckingIPMessage | AllocatingIPMessage | CheckingMachineMessage | CheckingVolumeMessage | ForkingVolumeMessage | RetryingWithNewRegionMessage | WaitingBeforePollingMessage | PollingMachineStatusMessage | WarningStateMessage | PingMessage | DebugMessage | ErrorMessage | InfoMessage | WarningMessage | MachineStatusMessage | LogsMessage | ConfigStatusMessage | AppCreatedMessage | MachineCreatedMessage | IpAllocatedMessage | VolumeForkedMessage | ReadyMessage | ErrorStateMessage | CleanupCompletedMessage;
|
|
154
154
|
export type GitConfig = {
|
|
155
155
|
url: string;
|
|
156
|
-
provider: "github" | "bitbucket" | "gitlab" | "azure";
|
|
156
|
+
provider: "github" | "bitbucket" | "gitlab" | "azure" | "unknown";
|
|
157
157
|
};
|
|
158
158
|
export type GitConfigs = Record<string, GitConfig>;
|
|
159
159
|
export declare const EXAMPLE_REPOS: string[];
|