@builder.io/ai-utils 0.100.1 → 0.101.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/events.d.ts +31 -1
- package/src/events.js +8 -0
- package/src/projects.d.ts +9 -0
- package/src/projects.js +16 -0
- package/src/publish-agent.js +10 -0
package/package.json
CHANGED
package/src/events.d.ts
CHANGED
|
@@ -965,6 +965,7 @@ export type ProjectSnapshotRefreshV1 = FusionEventVariant<"project.snapshot.refr
|
|
|
965
965
|
* producer.
|
|
966
966
|
*/
|
|
967
967
|
goldenTemplateId?: string;
|
|
968
|
+
gitSha?: string;
|
|
968
969
|
}, {
|
|
969
970
|
projectId: string;
|
|
970
971
|
}, 1>;
|
|
@@ -972,6 +973,32 @@ export declare const ProjectSnapshotRefreshV1: {
|
|
|
972
973
|
eventName: "project.snapshot.refresh";
|
|
973
974
|
version: "1";
|
|
974
975
|
};
|
|
976
|
+
export type ProjectSnapshotGoldenWatchdogV1 = FusionEventVariant<"project.snapshot.golden.watchdog", {
|
|
977
|
+
projectId: string;
|
|
978
|
+
triggerEventId: string;
|
|
979
|
+
goldenTemplateId: "agent-native-starter";
|
|
980
|
+
deadlineAtMs: number;
|
|
981
|
+
}, {
|
|
982
|
+
projectId: string;
|
|
983
|
+
}, 1>;
|
|
984
|
+
export declare const ProjectSnapshotGoldenWatchdogV1: {
|
|
985
|
+
eventName: "project.snapshot.golden.watchdog";
|
|
986
|
+
version: "1";
|
|
987
|
+
};
|
|
988
|
+
export type ProjectSnapshotGoldenRetryV1 = FusionEventVariant<"project.snapshot.golden.retry", {
|
|
989
|
+
projectId: string;
|
|
990
|
+
triggerEventId: string;
|
|
991
|
+
source: "project.snapshot.refresh";
|
|
992
|
+
gitSha?: string;
|
|
993
|
+
goldenTemplateId: "agent-native-starter";
|
|
994
|
+
retryAttempt: number;
|
|
995
|
+
}, {
|
|
996
|
+
projectId: string;
|
|
997
|
+
}, 1>;
|
|
998
|
+
export declare const ProjectSnapshotGoldenRetryV1: {
|
|
999
|
+
eventName: "project.snapshot.golden.retry";
|
|
1000
|
+
version: "1";
|
|
1001
|
+
};
|
|
975
1002
|
export type ProjectSnapshotCapturedV1 = FusionEventVariant<"project.snapshot.captured", {
|
|
976
1003
|
projectId: string;
|
|
977
1004
|
snapshotName: string;
|
|
@@ -991,6 +1018,7 @@ export type ProjectSnapshotCreatedV1 = FusionEventVariant<"project.snapshot.crea
|
|
|
991
1018
|
gitSha: string;
|
|
992
1019
|
triggerEventId: string;
|
|
993
1020
|
durationMs: number;
|
|
1021
|
+
goldenTemplateId?: string;
|
|
994
1022
|
}, {
|
|
995
1023
|
projectId: string;
|
|
996
1024
|
}, 1>;
|
|
@@ -1003,6 +1031,7 @@ export type ProjectSnapshotFailedV1 = FusionEventVariant<"project.snapshot.faile
|
|
|
1003
1031
|
triggerEventId: string;
|
|
1004
1032
|
reason: string;
|
|
1005
1033
|
phase?: "init" | "build" | "dev-server" | "callback";
|
|
1034
|
+
goldenTemplateId?: string;
|
|
1006
1035
|
}, {
|
|
1007
1036
|
projectId: string;
|
|
1008
1037
|
}, 1>;
|
|
@@ -1027,6 +1056,7 @@ export type ProjectSnapshotReadyCheckV1 = FusionEventVariant<"project.snapshot.r
|
|
|
1027
1056
|
/** When the VolumeSnapshot was created — used to compute the readiness timeout. */
|
|
1028
1057
|
capturedAtMs: number;
|
|
1029
1058
|
timeoutMs: number;
|
|
1059
|
+
goldenTemplateId?: string;
|
|
1030
1060
|
}, {
|
|
1031
1061
|
projectId: string;
|
|
1032
1062
|
}, 1>;
|
|
@@ -1429,7 +1459,7 @@ export declare const HostingCustomDomainDelegationCheckV1: {
|
|
|
1429
1459
|
eventName: "hosting.custom-domain.delegation-check";
|
|
1430
1460
|
version: "1";
|
|
1431
1461
|
};
|
|
1432
|
-
export type FusionEvent = ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | ClientDevtoolsToolCallRequestV1 | ClientDevtoolsToolCallV1 | ClientDevtoolsToolResultV1 | ClientDevtoolsBuildMigratedV1 | ClientDevtoolsBuildCompletedV1 | ClientDevtoolsBuildUploadedV1 | ClientDevtoolsBuildFailedV1 | FusionProjectCreatedV1 | FusionShapeIssuedV1 | FusionShapeAssembledV1 | FusionShapeResolvedV1 | FusionShapeQuestionAnsweredV1 | FusionShapeQuestionSkippedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | TimelineRecordingReadyV1 | FusionBranchCreatedV1 | FusionContainerStartedV1 | FusionContainerFailedV1 | FusionBranchFailedV1 | BotMentionGitHubExternalPrV1 | BotMentionGitHubInternalPrV1 | BotMentionGitLabPrV1 | BotMentionBitbucketPrV1 | BotMentionAzurePrV1 | ReviewSubmittedV1 | PrReviewRequestedV1 | FigmaDecodeJobV1 | ProjectSnapshotRefreshV1 | ProjectSnapshotCapturedV1 | ProjectSnapshotCreatedV1 | ProjectSnapshotFailedV1 | ProjectSnapshotReadyCheckV1 | ProjectSnapshotPodWatchV1 | McpPrototypePulledV1 | HostingCustomDomainCertCheckV1 | HostingCustomDomainServingCheckV1 | HostingCustomDomainDelegationCheckV1;
|
|
1462
|
+
export type FusionEvent = ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | ClientDevtoolsToolCallRequestV1 | ClientDevtoolsToolCallV1 | ClientDevtoolsToolResultV1 | ClientDevtoolsBuildMigratedV1 | ClientDevtoolsBuildCompletedV1 | ClientDevtoolsBuildUploadedV1 | ClientDevtoolsBuildFailedV1 | FusionProjectCreatedV1 | FusionShapeIssuedV1 | FusionShapeAssembledV1 | FusionShapeResolvedV1 | FusionShapeQuestionAnsweredV1 | FusionShapeQuestionSkippedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | TimelineRecordingReadyV1 | FusionBranchCreatedV1 | FusionContainerStartedV1 | FusionContainerFailedV1 | FusionBranchFailedV1 | BotMentionGitHubExternalPrV1 | BotMentionGitHubInternalPrV1 | BotMentionGitLabPrV1 | BotMentionBitbucketPrV1 | BotMentionAzurePrV1 | ReviewSubmittedV1 | PrReviewRequestedV1 | FigmaDecodeJobV1 | ProjectSnapshotRefreshV1 | ProjectSnapshotGoldenWatchdogV1 | ProjectSnapshotGoldenRetryV1 | ProjectSnapshotCapturedV1 | ProjectSnapshotCreatedV1 | ProjectSnapshotFailedV1 | ProjectSnapshotReadyCheckV1 | ProjectSnapshotPodWatchV1 | McpPrototypePulledV1 | HostingCustomDomainCertCheckV1 | HostingCustomDomainServingCheckV1 | HostingCustomDomainDelegationCheckV1;
|
|
1433
1463
|
export interface ModelPermissionRequiredEvent {
|
|
1434
1464
|
type: "assistant.model.permission.required";
|
|
1435
1465
|
data: {
|
package/src/events.js
CHANGED
|
@@ -114,6 +114,14 @@ export const ProjectSnapshotRefreshV1 = {
|
|
|
114
114
|
eventName: "project.snapshot.refresh",
|
|
115
115
|
version: "1",
|
|
116
116
|
};
|
|
117
|
+
export const ProjectSnapshotGoldenWatchdogV1 = {
|
|
118
|
+
eventName: "project.snapshot.golden.watchdog",
|
|
119
|
+
version: "1",
|
|
120
|
+
};
|
|
121
|
+
export const ProjectSnapshotGoldenRetryV1 = {
|
|
122
|
+
eventName: "project.snapshot.golden.retry",
|
|
123
|
+
version: "1",
|
|
124
|
+
};
|
|
117
125
|
export const ProjectSnapshotCapturedV1 = {
|
|
118
126
|
eventName: "project.snapshot.captured",
|
|
119
127
|
version: "1",
|
package/src/projects.d.ts
CHANGED
|
@@ -2602,6 +2602,8 @@ export declare const ProjectHostingSchema: z.ZodObject<{
|
|
|
2602
2602
|
skip: "skip";
|
|
2603
2603
|
}>>;
|
|
2604
2604
|
configUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
2605
|
+
originLockPendingAt: z.ZodOptional<z.ZodString>;
|
|
2606
|
+
originLockedAt: z.ZodOptional<z.ZodString>;
|
|
2605
2607
|
}, z.core.$strip>;
|
|
2606
2608
|
export type ProjectHosting = z.infer<typeof ProjectHostingSchema>;
|
|
2607
2609
|
/**
|
|
@@ -3177,6 +3179,7 @@ export declare const DeploySchema: z.ZodObject<{
|
|
|
3177
3179
|
uploading: "uploading";
|
|
3178
3180
|
}>;
|
|
3179
3181
|
netlifyDeployId: z.ZodOptional<z.ZodString>;
|
|
3182
|
+
netlifyOriginLockCodeSha: z.ZodOptional<z.ZodString>;
|
|
3180
3183
|
url: z.ZodOptional<z.ZodString>;
|
|
3181
3184
|
migrationApplied: z.ZodOptional<z.ZodBoolean>;
|
|
3182
3185
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -3414,6 +3417,10 @@ export declare const ReserveSlugResponseSchema: z.ZodObject<{
|
|
|
3414
3417
|
slug: z.ZodString;
|
|
3415
3418
|
}, z.core.$strip>;
|
|
3416
3419
|
export type ReserveSlugResponse = z.infer<typeof ReserveSlugResponseSchema>;
|
|
3420
|
+
export declare const GoldenSnapshotRefreshRequestSchema: z.ZodObject<{
|
|
3421
|
+
sourceCommitSha: z.ZodString;
|
|
3422
|
+
}, z.core.$strict>;
|
|
3423
|
+
export type GoldenSnapshotRefreshRequest = z.infer<typeof GoldenSnapshotRefreshRequestSchema>;
|
|
3417
3424
|
export declare const DeployRequestSchema: z.ZodObject<{
|
|
3418
3425
|
projectId: z.ZodString;
|
|
3419
3426
|
checkoutBranch: z.ZodOptional<z.ZodString>;
|
|
@@ -4402,6 +4409,8 @@ export declare const ProjectTemplateSchema: z.ZodObject<{
|
|
|
4402
4409
|
skip: "skip";
|
|
4403
4410
|
}>>;
|
|
4404
4411
|
configUpdatedAt: z.ZodOptional<z.ZodNumber>;
|
|
4412
|
+
originLockPendingAt: z.ZodOptional<z.ZodString>;
|
|
4413
|
+
originLockedAt: z.ZodOptional<z.ZodString>;
|
|
4405
4414
|
}, z.core.$strip>>;
|
|
4406
4415
|
}, z.core.$strip>;
|
|
4407
4416
|
export type ProjectTemplate = z.infer<typeof ProjectTemplateSchema>;
|
package/src/projects.js
CHANGED
|
@@ -1256,6 +1256,12 @@ export const ProjectHostingSchema = z.object({
|
|
|
1256
1256
|
configUpdatedAt: z.number().optional().meta({
|
|
1257
1257
|
description: "Epoch ms of the last change to a hosting field that requires a redeploy. Compare against `lastDeployAt`.",
|
|
1258
1258
|
}),
|
|
1259
|
+
originLockPendingAt: z.string().optional().meta({
|
|
1260
|
+
description: "ISO timestamp when origin-lock activation began. Route reconcilers preserve the header until activation completes.",
|
|
1261
|
+
}),
|
|
1262
|
+
originLockedAt: z.string().optional().meta({
|
|
1263
|
+
description: "ISO timestamp of the first successful origin-locked deploy. Absent means activation has not completed.",
|
|
1264
|
+
}),
|
|
1259
1265
|
});
|
|
1260
1266
|
/**
|
|
1261
1267
|
* Mask of the hosting sub-fields a client may write via `PATCH`. Everything
|
|
@@ -1450,6 +1456,9 @@ export const DeploySchema = z.object({
|
|
|
1450
1456
|
}),
|
|
1451
1457
|
status: DeployStatusSchema,
|
|
1452
1458
|
netlifyDeployId: z.string().optional(),
|
|
1459
|
+
netlifyOriginLockCodeSha: z.string().optional().meta({
|
|
1460
|
+
description: "Origin-lock edge-function SHA declared when the persisted Netlify deploy was created.",
|
|
1461
|
+
}),
|
|
1453
1462
|
url: z.string().optional(),
|
|
1454
1463
|
migrationApplied: z.boolean().optional().meta({
|
|
1455
1464
|
description: "Whether Drizzle migrations were applied during this deploy. Absent when no migration ran.",
|
|
@@ -1781,6 +1790,13 @@ export const ReserveSlugResponseSchema = z.object({
|
|
|
1781
1790
|
const gitCommitHashSchema = z
|
|
1782
1791
|
.string()
|
|
1783
1792
|
.regex(/^[0-9a-f]{7,40}$/i, "Must be a valid git commit hash (7–40 hex chars)");
|
|
1793
|
+
export const GoldenSnapshotRefreshRequestSchema = z
|
|
1794
|
+
.object({
|
|
1795
|
+
sourceCommitSha: z
|
|
1796
|
+
.string()
|
|
1797
|
+
.regex(/^[0-9a-f]{40}$/i, "Must be exactly 40 hexadecimal characters"),
|
|
1798
|
+
})
|
|
1799
|
+
.strict();
|
|
1784
1800
|
export const DeployRequestSchema = z.object({
|
|
1785
1801
|
projectId: z.string(),
|
|
1786
1802
|
checkoutBranch: z.string().optional(),
|
package/src/publish-agent.js
CHANGED
|
@@ -18,6 +18,16 @@ export const PUBLISH_AGENT_SKILLS_INFO = [
|
|
|
18
18
|
name: "create-page",
|
|
19
19
|
description: "Create a new page in the Builder CMS space. Use when the user asks to create, add, or scaffold a new page.",
|
|
20
20
|
},
|
|
21
|
+
{
|
|
22
|
+
id: "publish-agent-skill-scaffold-site",
|
|
23
|
+
name: "scaffold-site",
|
|
24
|
+
description: "Plan and scaffold a site's information architecture from a CSV, sitemap, or existing-site URL, with a review step before implementation.",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "publish-agent-skill-import-records",
|
|
28
|
+
name: "import-records",
|
|
29
|
+
description: "Import records from an attached CSV into an existing Builder model, with column mapping and a row preview before execution.",
|
|
30
|
+
},
|
|
21
31
|
];
|
|
22
32
|
export const PublishAgentSessionCursorSchema = z
|
|
23
33
|
.object({
|