@builder.io/ai-utils 0.25.3 → 0.25.4

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.25.3",
3
+ "version": "0.25.4",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -276,17 +276,24 @@ export interface ProposeConfigToolInput {
276
276
  config: SetupAnalysisValues;
277
277
  message?: string;
278
278
  }
279
- export type SetupValueField = "installCommand" | "devServer" | "validationScript";
279
+ export type SetupValueField = "installCommand" | "devServer" | "validationScript" | "environmentVariables";
280
280
  export interface UpdateSetupValueToolInput {
281
281
  field: SetupValueField;
282
282
  value: {
283
- command: string;
283
+ command?: string;
284
284
  url?: string;
285
285
  port?: number;
286
+ environmentVariables?: Array<{
287
+ key: string;
288
+ description?: string;
289
+ isRequired?: boolean;
290
+ isSecret?: boolean;
291
+ defaultValue?: string | null;
292
+ }>;
286
293
  };
287
294
  reason: string;
288
295
  }
289
- export type ExitState = "verified" | "more-disk" | "more-memory" | "user-question" | "other";
296
+ export type ExitState = "verified" | "more-disk" | "more-memory" | "user-question" | "other" | "started";
290
297
  export interface ExitToolInput {
291
298
  state: ExitState;
292
299
  summary: string;
@@ -1054,9 +1061,16 @@ export interface GenerateCompletionStepUpdateSetupValue {
1054
1061
  type: "update_setup_value";
1055
1062
  field: SetupValueField;
1056
1063
  value: {
1057
- command: string;
1064
+ command?: string;
1058
1065
  url?: string;
1059
1066
  port?: number;
1067
+ environmentVariables?: Array<{
1068
+ key: string;
1069
+ description?: string;
1070
+ isRequired?: boolean;
1071
+ isSecret?: boolean;
1072
+ defaultValue?: string | null;
1073
+ }>;
1060
1074
  };
1061
1075
  reason: string;
1062
1076
  }
package/src/events.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { BuilderContent, BuilderElement } from "@builder.io/sdk";
2
2
  import type { AssistantMessage, AssistantMessageAction } from "./messages.js";
3
3
  import type { AssistantSettings } from "./settings.js";
4
+ import type { ExitState } from "./codegen.js";
4
5
  export type BuilderAssistantEventHandler = (ev: BuilderAssistantEvent) => void;
5
6
  export type BuilderAssistantEvent = AssistantCompletionResultEvent | AssistantErrorEvent | AssistantStreamErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppMessageEditCustomInstructionsEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptSubmitEvent | AppReadyEvent | AppSettingsSetEvent | AppThreadNewEvent | AssistantStatsEvent | AssistantThemeEvent | BuilderEditorAuthEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ModelUndoEvent | ModelRedoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageCompletedEvent | ThreadMessageCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageFeedbackEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent | AppAcceptChangeEvent | AppAcceptRejectEvent | AssistantTrackEvent | AssistantEditorAuthMessage | AppAttachmentTemplateEvent | AppPasteSmartExportEvent | ThreadMessageRetryEvent | AppFigmaImportEvent | AppWebImportEvent | AppMcpServersEvent | AssistantContentInitialEvent | ThreadMessageSummaryEvent | ThreadMessageSummaryCodegenDeltaEvent | ThreadMessageThinkingDeltaEvent | AssistantHeartbeatEvent | ShowUpgradeDialogEvent | AssistantFusionSuggestionEvent | AppNavigateToFusionEvent;
6
7
  export interface AssistantCompletionResultEvent {
@@ -488,7 +489,8 @@ export declare const ClientDevtoolsSessionStartedEvent: {
488
489
  version: "1";
489
490
  };
490
491
  export type FusionProjectCreatedV1 = FusionEventVariant<"fusion.project.created", {
491
- projectId?: string;
492
+ projectId: string;
493
+ branchName?: string;
492
494
  branchId?: string;
493
495
  }, {}, 1>;
494
496
  export declare const FusionProjectCreatedV1: {
@@ -496,8 +498,11 @@ export declare const FusionProjectCreatedV1: {
496
498
  version: "1";
497
499
  };
498
500
  export type SetupAgentCompletedV1 = FusionEventVariant<"fusion.setup.completed", {
499
- projectId?: string;
501
+ proposedConfigId: string;
502
+ projectId: string;
503
+ branchName: string;
500
504
  branchId?: string;
505
+ state: ExitState;
501
506
  }, {}, 1>;
502
507
  export declare const SetupAgentCompletedV1: {
503
508
  eventName: "fusion.setup.completed";
package/src/projects.d.ts CHANGED
@@ -234,12 +234,16 @@ export interface GitBackupUploadUrlOptions {
234
234
  size: number;
235
235
  partial: boolean;
236
236
  contentMd5: string;
237
+ folderName?: string;
238
+ repoUrl?: string;
237
239
  }
238
240
  export interface GitBackupDownloadUrlOptions {
239
241
  ownerId: string;
240
242
  projectId: string;
241
243
  branchName: string;
242
244
  partial: boolean;
245
+ folderName?: string;
246
+ repoUrl?: string;
243
247
  }
244
248
  export type ForcedBackup = "offline-full" | "offline" | undefined;
245
249
  export interface GitBackupRecordOptions {
@@ -258,6 +262,7 @@ export interface GitBackupRecordOptions {
258
262
  version: "v1" | "v2";
259
263
  forced: ForcedBackup;
260
264
  metadata?: Record<string, string | string[] | undefined>;
265
+ folderName?: string;
261
266
  }
262
267
  export interface RecordScreenshotOptions {
263
268
  projectId: string;
@@ -267,6 +272,9 @@ export interface RecordScreenshotOptions {
267
272
  href?: string;
268
273
  meta?: Record<string, any>;
269
274
  }
275
+ export type GitBackupRecordBody = GitBackupRecordOptions | {
276
+ backups: GitBackupRecordOptions[];
277
+ };
270
278
  export interface GitBackupRecordResult {
271
279
  success: boolean;
272
280
  }
@@ -336,6 +344,7 @@ export interface PartialBranchData {
336
344
  lockedFusionEnvironment?: FusionExecutionEnvironment;
337
345
  metadata?: BranchMetadata;
338
346
  backup?: BranchBackup;
347
+ backups?: Record<string, BranchBackup>;
339
348
  hidden?: boolean;
340
349
  gitAiBranch?: string | null;
341
350
  lastCommitHash?: GitSnapshot | null;
@@ -394,7 +403,7 @@ export interface BranchReview {
394
403
  updatedAt: number;
395
404
  }
396
405
  export type BranchType = "code-review" | "setup-project";
397
- interface BranchSharedData {
406
+ export interface BranchSharedData {
398
407
  appName?: string | null;
399
408
  prNumber?: number | null;
400
409
  prUrl?: string | null;
@@ -430,6 +439,7 @@ interface BranchSharedData {
430
439
  allocated: boolean | null;
431
440
  } | null;
432
441
  backup?: BranchBackup;
442
+ backups?: Record<string, BranchBackup>;
433
443
  metadata?: BranchMetadata;
434
444
  memoriesExtracted?: boolean;
435
445
  needsCleanup?: boolean;
@@ -541,6 +551,7 @@ export interface Project {
541
551
  pinned?: boolean;
542
552
  archived?: boolean;
543
553
  createdBy: string;
554
+ lastUpdateBy?: string;
544
555
  checkRunCounts?: Record<string, number>;
545
556
  repoAddedBy?: string;
546
557
  pipelineCounts?: Record<string, number>;