@builder.io/ai-utils 0.5.1 → 0.5.3
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 +13 -1
- package/src/features.d.ts +3 -0
- package/src/features.js +4 -0
- package/src/organization.d.ts +68 -0
- package/src/organization.js +1 -0
- package/src/projects.d.ts +27 -2
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -100,11 +100,11 @@ export interface MemoryToolInput {
|
|
|
100
100
|
when?: string;
|
|
101
101
|
}
|
|
102
102
|
export interface AgentToolInput {
|
|
103
|
+
description: string;
|
|
103
104
|
prompt: string;
|
|
104
105
|
}
|
|
105
106
|
export interface ListDirToolInput {
|
|
106
107
|
path: string;
|
|
107
|
-
ignore?: string[];
|
|
108
108
|
}
|
|
109
109
|
export interface RevertToolInput {
|
|
110
110
|
checkpoint_id: string;
|
|
@@ -120,12 +120,19 @@ export interface TodoWriteToolInput {
|
|
|
120
120
|
id: string;
|
|
121
121
|
}[];
|
|
122
122
|
}
|
|
123
|
+
export interface GetScreenshotToolInput {
|
|
124
|
+
url: string;
|
|
125
|
+
selector?: string;
|
|
126
|
+
width?: number;
|
|
127
|
+
height?: number;
|
|
128
|
+
}
|
|
123
129
|
export interface CodeGenToolMap {
|
|
124
130
|
view_path: ViewPathToolInput;
|
|
125
131
|
glob_search: GlobSearchToolInput;
|
|
126
132
|
grep_search: GrepSearchToolInput;
|
|
127
133
|
get_rule: GetRuleToolInput;
|
|
128
134
|
get_style_inspiration: GetStyleInspirationToolInput;
|
|
135
|
+
get_screenshot: GetScreenshotToolInput;
|
|
129
136
|
dev_server_control: DevServerControlInput;
|
|
130
137
|
bash: BashToolInput;
|
|
131
138
|
web_search: WebSearchToolInput;
|
|
@@ -138,6 +145,7 @@ export interface CodeGenToolMap {
|
|
|
138
145
|
Edit: SearchReplaceInput;
|
|
139
146
|
ReadRule: GetRuleToolInput;
|
|
140
147
|
GetStyleInspiration: GetStyleInspirationToolInput;
|
|
148
|
+
GetScreenshot: GetScreenshotToolInput;
|
|
141
149
|
MultiEdit: MultiSearchReplaceInput;
|
|
142
150
|
FindMedia: FindMediaToolInput;
|
|
143
151
|
Memory: MemoryToolInput;
|
|
@@ -150,6 +158,7 @@ export interface CodeGenToolMap {
|
|
|
150
158
|
Revert: RevertToolInput;
|
|
151
159
|
TodoRead: TodoReadToolInput;
|
|
152
160
|
TodoWrite: TodoWriteToolInput;
|
|
161
|
+
LS: ListDirToolInput;
|
|
153
162
|
}
|
|
154
163
|
export type CodeGenTools = keyof CodeGenToolMap;
|
|
155
164
|
export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
@@ -708,6 +717,7 @@ export interface FusionConfig {
|
|
|
708
717
|
authenticateProxy?: boolean;
|
|
709
718
|
allowedCommands?: string[];
|
|
710
719
|
autoBackupGit?: boolean;
|
|
720
|
+
autoShutdown?: boolean;
|
|
711
721
|
commitMode?: CommitMode;
|
|
712
722
|
serverUrl?: string;
|
|
713
723
|
isLocal?: boolean;
|
|
@@ -771,4 +781,6 @@ export interface LaunchServerStatus {
|
|
|
771
781
|
initState?: InitState;
|
|
772
782
|
errorMessage?: string;
|
|
773
783
|
devToolsVersion: string;
|
|
784
|
+
lastRequestTime: number;
|
|
785
|
+
startTime: number;
|
|
774
786
|
}
|
package/src/features.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
interface OrganizationSettings {
|
|
2
|
+
attribution?: string[];
|
|
3
|
+
visualEditorAiStyleInspirationURL?: string;
|
|
4
|
+
techStack?: string[];
|
|
5
|
+
enableModelValidationHooks?: boolean;
|
|
6
|
+
enableOrgInsights?: boolean;
|
|
7
|
+
enableBuilderHosting?: boolean;
|
|
8
|
+
allowLegacyPlanSubscriptions?: boolean;
|
|
9
|
+
enforceMaxUsers?: boolean;
|
|
10
|
+
ssoRestrictedMode?: boolean;
|
|
11
|
+
isUserPluginIntegrationRequestGranted?: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface RoleOptions {
|
|
14
|
+
read?: boolean;
|
|
15
|
+
viewOnly?: boolean;
|
|
16
|
+
create?: boolean;
|
|
17
|
+
publish?: boolean;
|
|
18
|
+
editCode?: boolean;
|
|
19
|
+
editDesigns?: boolean;
|
|
20
|
+
admin?: boolean;
|
|
21
|
+
editLayouts?: boolean;
|
|
22
|
+
editLayers?: boolean;
|
|
23
|
+
editContentPriority?: boolean;
|
|
24
|
+
editFolders?: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface RoleEnvironment {
|
|
27
|
+
pushAllowedOrgIds?: string[];
|
|
28
|
+
sync?: boolean;
|
|
29
|
+
canPushToAllOrgs?: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface RoleLocales {
|
|
32
|
+
allowedLocalesEditList?: string[];
|
|
33
|
+
canEditAllLocales?: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface Role {
|
|
36
|
+
id?: string;
|
|
37
|
+
name?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
globalFilters?: Record<string, any>;
|
|
40
|
+
options?: RoleOptions;
|
|
41
|
+
models?: string;
|
|
42
|
+
environment?: RoleEnvironment;
|
|
43
|
+
locales?: RoleLocales;
|
|
44
|
+
}
|
|
45
|
+
export interface Organization {
|
|
46
|
+
name?: string;
|
|
47
|
+
id?: string;
|
|
48
|
+
createdDate?: number;
|
|
49
|
+
intent?: string;
|
|
50
|
+
ecommerceBackend?: string;
|
|
51
|
+
loadPlugins?: string[];
|
|
52
|
+
ownerId?: string;
|
|
53
|
+
parentOrganization?: string;
|
|
54
|
+
type?: string;
|
|
55
|
+
kind?: string;
|
|
56
|
+
"@version"?: number;
|
|
57
|
+
hasIntegrated?: string;
|
|
58
|
+
hasMadeSomethingInteractive?: boolean;
|
|
59
|
+
settings?: OrganizationSettings;
|
|
60
|
+
subscription?: string;
|
|
61
|
+
hasImportedFromFigma?: boolean;
|
|
62
|
+
hasIntegratedFigma?: boolean;
|
|
63
|
+
roles?: Role[];
|
|
64
|
+
subscriptionSettings?: string;
|
|
65
|
+
totalBytesStored?: number;
|
|
66
|
+
lastUpdateBy?: string | null;
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/projects.d.ts
CHANGED
|
@@ -134,8 +134,8 @@ export interface ReadyMessage extends BaseMessage {
|
|
|
134
134
|
}
|
|
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
|
-
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";
|
|
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" | "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" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
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" | `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;
|
|
@@ -166,5 +166,30 @@ export interface GitBackupUploadUrlOptions {
|
|
|
166
166
|
projectId: string;
|
|
167
167
|
branchName: string;
|
|
168
168
|
size: number;
|
|
169
|
+
initialCommitHash: string;
|
|
170
|
+
lastCommitHash: string;
|
|
171
|
+
partial: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface GitBackupDownloadUrlResult {
|
|
174
|
+
signedUrl: string;
|
|
175
|
+
filePath: string;
|
|
176
|
+
expiresAt: string;
|
|
177
|
+
exists: boolean;
|
|
178
|
+
}
|
|
179
|
+
export interface GitBackupDownloadUrlOptions {
|
|
180
|
+
projectId: string;
|
|
181
|
+
branchName: string;
|
|
182
|
+
}
|
|
183
|
+
export interface GitBackupRecordOptions {
|
|
184
|
+
projectId: string;
|
|
185
|
+
branchName: string;
|
|
186
|
+
size: number;
|
|
187
|
+
gitBranchName: string;
|
|
188
|
+
initialCommitHash?: string;
|
|
189
|
+
lastCommitHash?: string;
|
|
190
|
+
partial?: boolean;
|
|
191
|
+
}
|
|
192
|
+
export interface GitBackupRecordResult {
|
|
193
|
+
success: boolean;
|
|
169
194
|
}
|
|
170
195
|
export {};
|