@builder.io/ai-utils 0.61.0 → 0.63.0
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 +572 -481
- package/src/codegen.js +1 -0
- package/src/events.d.ts +50 -1
- package/src/events.js +16 -0
- package/src/messages.d.ts +49 -20
- package/src/projects.d.ts +1 -1
- package/src/proxy.d.ts +1 -1
package/src/codegen.js
CHANGED
|
@@ -1581,6 +1581,7 @@ export const LocalMCPToolsSchema = z
|
|
|
1581
1581
|
description: z.string().optional(),
|
|
1582
1582
|
inputSchema: z.any().optional(),
|
|
1583
1583
|
serverName: z.string(),
|
|
1584
|
+
deferLoading: z.boolean().optional(),
|
|
1584
1585
|
})
|
|
1585
1586
|
.meta({ title: "LocalMCPTools" });
|
|
1586
1587
|
export const CodeGenCategorySchema = z
|
package/src/events.d.ts
CHANGED
|
@@ -755,6 +755,55 @@ export declare const FusionBranchFailedV1: {
|
|
|
755
755
|
eventName: "fusion.branch.failed";
|
|
756
756
|
version: "1";
|
|
757
757
|
};
|
|
758
|
+
export type ProjectSnapshotRefreshV1 = FusionEventVariant<"project.snapshot.refresh", {
|
|
759
|
+
projectId: string;
|
|
760
|
+
requestedBy: string;
|
|
761
|
+
reason: string;
|
|
762
|
+
}, {
|
|
763
|
+
projectId: string;
|
|
764
|
+
}, 1>;
|
|
765
|
+
export declare const ProjectSnapshotRefreshV1: {
|
|
766
|
+
eventName: "project.snapshot.refresh";
|
|
767
|
+
version: "1";
|
|
768
|
+
};
|
|
769
|
+
export type ProjectSnapshotCapturedV1 = FusionEventVariant<"project.snapshot.captured", {
|
|
770
|
+
projectId: string;
|
|
771
|
+
snapshotName: string;
|
|
772
|
+
triggerEventId: string;
|
|
773
|
+
gitSha: string;
|
|
774
|
+
startedAtMs: number;
|
|
775
|
+
}, {
|
|
776
|
+
projectId: string;
|
|
777
|
+
}, 1>;
|
|
778
|
+
export declare const ProjectSnapshotCapturedV1: {
|
|
779
|
+
eventName: "project.snapshot.captured";
|
|
780
|
+
version: "1";
|
|
781
|
+
};
|
|
782
|
+
export type ProjectSnapshotCreatedV1 = FusionEventVariant<"project.snapshot.created", {
|
|
783
|
+
projectId: string;
|
|
784
|
+
snapshotName: string;
|
|
785
|
+
gitSha: string;
|
|
786
|
+
triggerEventId: string;
|
|
787
|
+
durationMs: number;
|
|
788
|
+
}, {
|
|
789
|
+
projectId: string;
|
|
790
|
+
}, 1>;
|
|
791
|
+
export declare const ProjectSnapshotCreatedV1: {
|
|
792
|
+
eventName: "project.snapshot.created";
|
|
793
|
+
version: "1";
|
|
794
|
+
};
|
|
795
|
+
export type ProjectSnapshotFailedV1 = FusionEventVariant<"project.snapshot.failed", {
|
|
796
|
+
projectId: string;
|
|
797
|
+
triggerEventId: string;
|
|
798
|
+
reason: string;
|
|
799
|
+
phase?: "init" | "build" | "dev-server" | "callback";
|
|
800
|
+
}, {
|
|
801
|
+
projectId: string;
|
|
802
|
+
}, 1>;
|
|
803
|
+
export declare const ProjectSnapshotFailedV1: {
|
|
804
|
+
eventName: "project.snapshot.failed";
|
|
805
|
+
version: "1";
|
|
806
|
+
};
|
|
758
807
|
export type VideoRecordingCompletedV1 = FusionEventVariant<"video.recording.completed", {
|
|
759
808
|
recordingId: string;
|
|
760
809
|
videoUrl: string;
|
|
@@ -872,7 +921,7 @@ export declare const ClientDevtoolsToolResultV1: {
|
|
|
872
921
|
eventName: "client.devtools.tool.result";
|
|
873
922
|
version: "1";
|
|
874
923
|
};
|
|
875
|
-
export type FusionEvent = ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | ClientDevtoolsToolCallRequestV1 | ClientDevtoolsToolCallV1 | ClientDevtoolsToolResultV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | TimelineRecordingReadyV1 | FusionBranchCreatedV1 | FusionContainerStartedV1 | FusionContainerFailedV1 | FusionBranchFailedV1 | BotMentionExternalPrV1 | ReviewSubmittedV1 | PrReviewRequestedV1;
|
|
924
|
+
export type FusionEvent = ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | ClientDevtoolsToolCallRequestV1 | ClientDevtoolsToolCallV1 | ClientDevtoolsToolResultV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | TimelineRecordingReadyV1 | FusionBranchCreatedV1 | FusionContainerStartedV1 | FusionContainerFailedV1 | FusionBranchFailedV1 | BotMentionExternalPrV1 | ReviewSubmittedV1 | PrReviewRequestedV1 | ProjectSnapshotRefreshV1 | ProjectSnapshotCapturedV1 | ProjectSnapshotCreatedV1 | ProjectSnapshotFailedV1;
|
|
876
925
|
export interface ModelPermissionRequiredEvent {
|
|
877
926
|
type: "assistant.model.permission.required";
|
|
878
927
|
data: {
|
package/src/events.js
CHANGED
|
@@ -74,6 +74,22 @@ export const FusionBranchFailedV1 = {
|
|
|
74
74
|
eventName: "fusion.branch.failed",
|
|
75
75
|
version: "1",
|
|
76
76
|
};
|
|
77
|
+
export const ProjectSnapshotRefreshV1 = {
|
|
78
|
+
eventName: "project.snapshot.refresh",
|
|
79
|
+
version: "1",
|
|
80
|
+
};
|
|
81
|
+
export const ProjectSnapshotCapturedV1 = {
|
|
82
|
+
eventName: "project.snapshot.captured",
|
|
83
|
+
version: "1",
|
|
84
|
+
};
|
|
85
|
+
export const ProjectSnapshotCreatedV1 = {
|
|
86
|
+
eventName: "project.snapshot.created",
|
|
87
|
+
version: "1",
|
|
88
|
+
};
|
|
89
|
+
export const ProjectSnapshotFailedV1 = {
|
|
90
|
+
eventName: "project.snapshot.failed",
|
|
91
|
+
version: "1",
|
|
92
|
+
};
|
|
77
93
|
export const VideoRecordingCompletedV1 = {
|
|
78
94
|
eventName: "video.recording.completed",
|
|
79
95
|
version: "1",
|
package/src/messages.d.ts
CHANGED
|
@@ -97,6 +97,35 @@ export interface MCPServerToolConfiguration {
|
|
|
97
97
|
allowed_tools?: Array<string> | null;
|
|
98
98
|
enabled?: boolean | null;
|
|
99
99
|
}
|
|
100
|
+
export interface MCPServerOAuthMetadata {
|
|
101
|
+
clientId: string;
|
|
102
|
+
clientSecret?: string | null;
|
|
103
|
+
scope: string[];
|
|
104
|
+
authorizationEndpoint: string;
|
|
105
|
+
tokenEndpoint: string;
|
|
106
|
+
registrationEndpoint?: string | null;
|
|
107
|
+
resource?: string | null;
|
|
108
|
+
discoveredAt: number;
|
|
109
|
+
}
|
|
110
|
+
export interface MCPServerDoc<TCreateDate = unknown, TLegacyTokenExpiresAt = never> {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
url: string;
|
|
114
|
+
ownerId: string;
|
|
115
|
+
type: "url";
|
|
116
|
+
createDate: TCreateDate;
|
|
117
|
+
provider?: string;
|
|
118
|
+
disabled?: boolean;
|
|
119
|
+
tool_configuration?: MCPServerToolConfiguration | null;
|
|
120
|
+
oauthMetadata?: MCPServerOAuthMetadata | null;
|
|
121
|
+
authorizationToken?: string;
|
|
122
|
+
refreshToken?: string | null;
|
|
123
|
+
tokenExpiresAt?: number | TLegacyTokenExpiresAt;
|
|
124
|
+
tokenType?: string;
|
|
125
|
+
requiresOAuth?: boolean;
|
|
126
|
+
discoveryFailed?: boolean;
|
|
127
|
+
discoveryError?: string | null;
|
|
128
|
+
}
|
|
100
129
|
export interface ContentMessageItemWebSearchToolResult {
|
|
101
130
|
content: ServerToolUseContent[] | ServerToolUseContentError;
|
|
102
131
|
tool_use_id: string;
|
|
@@ -225,7 +254,7 @@ export type GeneratingMessage = null | Partial<AssistantActionMessage | Assistan
|
|
|
225
254
|
export declare function getContentText(message: string | ContentMessage): string;
|
|
226
255
|
export declare function getContentAttachments(message: string | ContentMessage): ({
|
|
227
256
|
type: "base64";
|
|
228
|
-
media_type: "image/
|
|
257
|
+
media_type: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
|
|
229
258
|
data: string;
|
|
230
259
|
original_url?: string | undefined;
|
|
231
260
|
} | {
|
|
@@ -240,12 +269,12 @@ export type URL = z.infer<typeof URLSchema>;
|
|
|
240
269
|
export declare const FileUploadSchema: z.ZodObject<{
|
|
241
270
|
type: z.ZodLiteral<"upload">;
|
|
242
271
|
contentType: z.ZodEnum<{
|
|
243
|
-
"image/webp": "image/webp";
|
|
244
|
-
"image/png": "image/png";
|
|
245
|
-
"image/jpeg": "image/jpeg";
|
|
246
|
-
"image/gif": "image/gif";
|
|
247
|
-
"application/pdf": "application/pdf";
|
|
248
272
|
"application/json": "application/json";
|
|
273
|
+
"application/pdf": "application/pdf";
|
|
274
|
+
"image/gif": "image/gif";
|
|
275
|
+
"image/jpeg": "image/jpeg";
|
|
276
|
+
"image/png": "image/png";
|
|
277
|
+
"image/webp": "image/webp";
|
|
249
278
|
"text/plain": "text/plain";
|
|
250
279
|
}>;
|
|
251
280
|
name: z.ZodString;
|
|
@@ -276,12 +305,12 @@ export type FigmaContentAttachment = z.infer<typeof FigmaContentAttachmentSchema
|
|
|
276
305
|
export declare const AttachmentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
277
306
|
type: z.ZodLiteral<"upload">;
|
|
278
307
|
contentType: z.ZodEnum<{
|
|
279
|
-
"image/webp": "image/webp";
|
|
280
|
-
"image/png": "image/png";
|
|
281
|
-
"image/jpeg": "image/jpeg";
|
|
282
|
-
"image/gif": "image/gif";
|
|
283
|
-
"application/pdf": "application/pdf";
|
|
284
308
|
"application/json": "application/json";
|
|
309
|
+
"application/pdf": "application/pdf";
|
|
310
|
+
"image/gif": "image/gif";
|
|
311
|
+
"image/jpeg": "image/jpeg";
|
|
312
|
+
"image/png": "image/png";
|
|
313
|
+
"image/webp": "image/webp";
|
|
285
314
|
"text/plain": "text/plain";
|
|
286
315
|
}>;
|
|
287
316
|
name: z.ZodString;
|
|
@@ -373,10 +402,10 @@ export type TextCitationParam = z.infer<typeof TextCitationParamSchema>;
|
|
|
373
402
|
export declare const ImageBase64SourceSchema: z.ZodObject<{
|
|
374
403
|
type: z.ZodLiteral<"base64">;
|
|
375
404
|
media_type: z.ZodEnum<{
|
|
376
|
-
"image/webp": "image/webp";
|
|
377
|
-
"image/png": "image/png";
|
|
378
|
-
"image/jpeg": "image/jpeg";
|
|
379
405
|
"image/gif": "image/gif";
|
|
406
|
+
"image/jpeg": "image/jpeg";
|
|
407
|
+
"image/png": "image/png";
|
|
408
|
+
"image/webp": "image/webp";
|
|
380
409
|
}>;
|
|
381
410
|
data: z.ZodString;
|
|
382
411
|
original_url: z.ZodOptional<z.ZodString>;
|
|
@@ -429,10 +458,10 @@ export declare const ContentMessageItemImageSchema: z.ZodObject<{
|
|
|
429
458
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
430
459
|
type: z.ZodLiteral<"base64">;
|
|
431
460
|
media_type: z.ZodEnum<{
|
|
432
|
-
"image/webp": "image/webp";
|
|
433
|
-
"image/png": "image/png";
|
|
434
|
-
"image/jpeg": "image/jpeg";
|
|
435
461
|
"image/gif": "image/gif";
|
|
462
|
+
"image/jpeg": "image/jpeg";
|
|
463
|
+
"image/png": "image/png";
|
|
464
|
+
"image/webp": "image/webp";
|
|
436
465
|
}>;
|
|
437
466
|
data: z.ZodString;
|
|
438
467
|
original_url: z.ZodOptional<z.ZodString>;
|
|
@@ -500,10 +529,10 @@ export declare const ContentMessageItemToolResultSchema: z.ZodObject<{
|
|
|
500
529
|
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
501
530
|
type: z.ZodLiteral<"base64">;
|
|
502
531
|
media_type: z.ZodEnum<{
|
|
503
|
-
"image/webp": "image/webp";
|
|
504
|
-
"image/png": "image/png";
|
|
505
|
-
"image/jpeg": "image/jpeg";
|
|
506
532
|
"image/gif": "image/gif";
|
|
533
|
+
"image/jpeg": "image/jpeg";
|
|
534
|
+
"image/png": "image/png";
|
|
535
|
+
"image/webp": "image/webp";
|
|
507
536
|
}>;
|
|
508
537
|
data: z.ZodString;
|
|
509
538
|
original_url: z.ZodOptional<z.ZodString>;
|
package/src/projects.d.ts
CHANGED
|
@@ -460,7 +460,7 @@ export interface OrgAgentConfig {
|
|
|
460
460
|
enabledTools: string[];
|
|
461
461
|
longLived: boolean;
|
|
462
462
|
}
|
|
463
|
-
export type BranchType = "code-review" | "setup-project" | "org-agent" | "design-system-indexing" | "default";
|
|
463
|
+
export type BranchType = "code-review" | "setup-project" | "org-agent" | "snapshot-build" | "design-system-indexing" | "default";
|
|
464
464
|
/** Category of work a branch represents, auto-assigned during prompt analysis. */
|
|
465
465
|
export type BranchCategory = "feature" | "fix" | "research" | "other";
|
|
466
466
|
export interface BranchSharedData {
|
package/src/proxy.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface ProxyConfig {
|
|
|
20
20
|
*
|
|
21
21
|
* `proxyDestination` is always passed through unchanged.
|
|
22
22
|
*/
|
|
23
|
-
export declare function getProxyConfig({ devServerUrl, proxyOrigin, proxyDefaultOrigin, proxyDestination
|
|
23
|
+
export declare function getProxyConfig({ devServerUrl, proxyOrigin, proxyDefaultOrigin, proxyDestination }: ProxyConfig): {
|
|
24
24
|
proxyOrigin: string | undefined;
|
|
25
25
|
proxyDefaultOrigin: string | undefined;
|
|
26
26
|
proxyDestination: string | undefined;
|