@builder.io/ai-utils 0.5.0 → 0.5.2
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 +17 -0
- 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,6 +100,7 @@ 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 {
|
|
@@ -120,12 +121,19 @@ export interface TodoWriteToolInput {
|
|
|
120
121
|
id: string;
|
|
121
122
|
}[];
|
|
122
123
|
}
|
|
124
|
+
export interface GetScreenshotToolInput {
|
|
125
|
+
url: string;
|
|
126
|
+
selector?: string;
|
|
127
|
+
width?: number;
|
|
128
|
+
height?: number;
|
|
129
|
+
}
|
|
123
130
|
export interface CodeGenToolMap {
|
|
124
131
|
view_path: ViewPathToolInput;
|
|
125
132
|
glob_search: GlobSearchToolInput;
|
|
126
133
|
grep_search: GrepSearchToolInput;
|
|
127
134
|
get_rule: GetRuleToolInput;
|
|
128
135
|
get_style_inspiration: GetStyleInspirationToolInput;
|
|
136
|
+
get_screenshot: GetScreenshotToolInput;
|
|
129
137
|
dev_server_control: DevServerControlInput;
|
|
130
138
|
bash: BashToolInput;
|
|
131
139
|
web_search: WebSearchToolInput;
|
|
@@ -138,6 +146,7 @@ export interface CodeGenToolMap {
|
|
|
138
146
|
Edit: SearchReplaceInput;
|
|
139
147
|
ReadRule: GetRuleToolInput;
|
|
140
148
|
GetStyleInspiration: GetStyleInspirationToolInput;
|
|
149
|
+
GetScreenshot: GetScreenshotToolInput;
|
|
141
150
|
MultiEdit: MultiSearchReplaceInput;
|
|
142
151
|
FindMedia: FindMediaToolInput;
|
|
143
152
|
Memory: MemoryToolInput;
|
|
@@ -362,6 +371,7 @@ export interface GenerateCompletionStepContinue {
|
|
|
362
371
|
type: "continue";
|
|
363
372
|
id: string;
|
|
364
373
|
url: string;
|
|
374
|
+
autoContinue: boolean;
|
|
365
375
|
}
|
|
366
376
|
export type DevCommandState = "running" | "stopped" | "starting" | "failed" | "unset";
|
|
367
377
|
export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed" | "install-aborted";
|
|
@@ -416,6 +426,7 @@ export interface GenerateCompletionStepBuilderActionMCPConnect {
|
|
|
416
426
|
}
|
|
417
427
|
export interface GenerateCompletionStepAbort {
|
|
418
428
|
type: "user-abort";
|
|
429
|
+
hasContinueMessage: boolean;
|
|
419
430
|
}
|
|
420
431
|
export interface GenerateCompletionStepRestore {
|
|
421
432
|
type: "restore";
|
|
@@ -576,6 +587,7 @@ export interface CodegenTurn {
|
|
|
576
587
|
beforeCommit: string | undefined;
|
|
577
588
|
afterCommit: string | undefined;
|
|
578
589
|
cachedToolResults?: ContentMessageItemToolResult[];
|
|
590
|
+
autoContinue: boolean;
|
|
579
591
|
}
|
|
580
592
|
export interface GetSessionTurnsResult {
|
|
581
593
|
turns: CodegenTurn[];
|
|
@@ -617,6 +629,7 @@ export interface GenerateCodeEventDone {
|
|
|
617
629
|
messageIndex: number;
|
|
618
630
|
sessionUsage: number;
|
|
619
631
|
nextUrl: string;
|
|
632
|
+
autoContinue: boolean;
|
|
620
633
|
}
|
|
621
634
|
export interface GenerateCodeEventError {
|
|
622
635
|
type: "error";
|
|
@@ -636,6 +649,7 @@ export interface GenerateCodeEventContinue {
|
|
|
636
649
|
type: "continue";
|
|
637
650
|
id: string;
|
|
638
651
|
nextUrl: string;
|
|
652
|
+
autoContinue: boolean;
|
|
639
653
|
}
|
|
640
654
|
export interface GenerateCodeEventDelta {
|
|
641
655
|
type: "delta";
|
|
@@ -703,6 +717,7 @@ export interface FusionConfig {
|
|
|
703
717
|
authenticateProxy?: boolean;
|
|
704
718
|
allowedCommands?: string[];
|
|
705
719
|
autoBackupGit?: boolean;
|
|
720
|
+
autoShutdown?: boolean;
|
|
706
721
|
commitMode?: CommitMode;
|
|
707
722
|
serverUrl?: string;
|
|
708
723
|
isLocal?: boolean;
|
|
@@ -766,4 +781,6 @@ export interface LaunchServerStatus {
|
|
|
766
781
|
initState?: InitState;
|
|
767
782
|
errorMessage?: string;
|
|
768
783
|
devToolsVersion: string;
|
|
784
|
+
lastRequestTime: number;
|
|
785
|
+
startTime: number;
|
|
769
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 {};
|