@builder.io/ai-utils 0.105.0 → 0.106.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.105.0",
3
+ "version": "0.106.0",
4
4
  "description": "Builder.io AI utils",
5
5
  "files": [
6
6
  "src"
package/src/codegen.d.ts CHANGED
@@ -2319,6 +2319,7 @@ export declare const PublishAgentMessageRequestSchema: z.ZodObject<{
2319
2319
  }, z.core.$strip>]>>>;
2320
2320
  requireConfirmation: z.ZodOptional<z.ZodBoolean>;
2321
2321
  skippedMCPs: z.ZodOptional<z.ZodArray<z.ZodString>>;
2322
+ customInstructions: z.ZodOptional<z.ZodString>;
2322
2323
  }, z.core.$strip>;
2323
2324
  export type PublishAgentMessageRequest = z.infer<typeof PublishAgentMessageRequestSchema>;
2324
2325
  export declare const RepoIndexingConfigSchema: z.ZodObject<{
package/src/codegen.js CHANGED
@@ -1824,6 +1824,9 @@ export const PublishAgentMessageRequestSchema = z
1824
1824
  skippedMCPs: z.array(z.string()).optional().meta({
1825
1825
  description: "Per-message denylist of MCP server ids to skip, e.g. a 'disable for this session' UI toggle.",
1826
1826
  }),
1827
+ customInstructions: z.string().max(100000).optional().meta({
1828
+ description: "The organization's Publish Agent instructions, applied as an always-on rule. Send on every request, including tool-result continuations.",
1829
+ }),
1827
1830
  })
1828
1831
  .refine(({ message, toolResults }) => Boolean(message) || Boolean(toolResults === null || toolResults === void 0 ? void 0 : toolResults.length), {
1829
1832
  path: ["message"],
package/src/events.d.ts CHANGED
@@ -943,6 +943,45 @@ export declare const FusionContainerFailedV1: {
943
943
  eventName: "fusion.container.failed";
944
944
  version: "1";
945
945
  };
946
+ /**
947
+ * Why the preview never came up. A closed set so the funnel can group by it;
948
+ * the detail belongs in the container's logs.
949
+ */
950
+ export type FusionPreviewFailureReason = "http-4xx" | "http-5xx" | "unreachable" | "dev-command-failed";
951
+ /**
952
+ * The first moment the user has something to look at. Deliberately not a reuse
953
+ * of `FusionContainerStartedV1`, which only means the box booted: conflating
954
+ * the two makes preview failure unmeasurable, since a container that serves
955
+ * nothing looks identical to a healthy one.
956
+ */
957
+ export type FusionPreviewReadyV1 = FusionEventVariant<"fusion.preview.ready", {
958
+ projectId: string;
959
+ branchName: string;
960
+ /** ms from the dev server being started to its first successful response. */
961
+ durationMs?: number;
962
+ }, {
963
+ projectId: string;
964
+ branchName: string;
965
+ }, 1>;
966
+ export declare const FusionPreviewReadyV1: {
967
+ eventName: "fusion.preview.ready";
968
+ version: "1";
969
+ };
970
+ /** The counterpart to {@link FusionPreviewReadyV1}: the preview never came up. */
971
+ export type FusionPreviewFailedV1 = FusionEventVariant<"fusion.preview.failed", {
972
+ projectId: string;
973
+ branchName: string;
974
+ reason: FusionPreviewFailureReason;
975
+ /** ms from the dev server being started to the failure being called. */
976
+ durationMs?: number;
977
+ }, {
978
+ projectId: string;
979
+ branchName: string;
980
+ }, 1>;
981
+ export declare const FusionPreviewFailedV1: {
982
+ eventName: "fusion.preview.failed";
983
+ version: "1";
984
+ };
946
985
  export type FusionBranchFailedV1 = FusionEventVariant<"fusion.branch.failed", {
947
986
  projectId: string;
948
987
  branchName?: string;
@@ -1460,7 +1499,7 @@ export declare const HostingCustomDomainDelegationCheckV1: {
1460
1499
  eventName: "hosting.custom-domain.delegation-check";
1461
1500
  version: "1";
1462
1501
  };
1463
- 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;
1502
+ 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 | FusionPreviewReadyV1 | FusionPreviewFailedV1 | FusionBranchFailedV1 | BotMentionGitHubExternalPrV1 | BotMentionGitHubInternalPrV1 | BotMentionGitLabPrV1 | BotMentionBitbucketPrV1 | BotMentionAzurePrV1 | ReviewSubmittedV1 | PrReviewRequestedV1 | FigmaDecodeJobV1 | ProjectSnapshotRefreshV1 | ProjectSnapshotGoldenWatchdogV1 | ProjectSnapshotGoldenRetryV1 | ProjectSnapshotCapturedV1 | ProjectSnapshotCreatedV1 | ProjectSnapshotFailedV1 | ProjectSnapshotReadyCheckV1 | ProjectSnapshotPodWatchV1 | McpPrototypePulledV1 | HostingCustomDomainCertCheckV1 | HostingCustomDomainServingCheckV1 | HostingCustomDomainDelegationCheckV1;
1464
1503
  export interface ModelPermissionRequiredEvent {
1465
1504
  type: "assistant.model.permission.required";
1466
1505
  data: {
package/src/events.js CHANGED
@@ -106,6 +106,14 @@ export const FusionContainerFailedV1 = {
106
106
  eventName: "fusion.container.failed",
107
107
  version: "1",
108
108
  };
109
+ export const FusionPreviewReadyV1 = {
110
+ eventName: "fusion.preview.ready",
111
+ version: "1",
112
+ };
113
+ export const FusionPreviewFailedV1 = {
114
+ eventName: "fusion.preview.failed",
115
+ version: "1",
116
+ };
109
117
  export const FusionBranchFailedV1 = {
110
118
  eventName: "fusion.branch.failed",
111
119
  version: "1",