@builder.io/ai-utils 0.36.0 → 0.37.1

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.36.0",
3
+ "version": "0.37.1",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -576,6 +576,12 @@ export interface ReadBranchToolInput {
576
576
  projectId: string;
577
577
  branchName: string;
578
578
  }
579
+ export interface ArchiveBranchToolInput {
580
+ projectId: string;
581
+ branchName: string;
582
+ builderUserId: string;
583
+ reason?: string;
584
+ }
579
585
  /** Comment for PR review - used by both SubmitPRReview and SubmitRecording */
580
586
  export interface PRReviewComment {
581
587
  file_path: string;
@@ -684,6 +690,7 @@ export interface CodeGenToolMap {
684
690
  SendMessage: SendMessageToolInput;
685
691
  SpawnBranch: SpawnBranchToolInput;
686
692
  ReadBranch: ReadBranchToolInput;
693
+ ArchiveBranch: ArchiveBranchToolInput;
687
694
  RunningAgents: RunningAgentsToolInput;
688
695
  }
689
696
  export type CodeGenTools = keyof CodeGenToolMap;
@@ -1352,6 +1359,7 @@ export interface GetSessionTurnsResult {
1352
1359
  updatedUnixTime: number | undefined;
1353
1360
  canLoadMore: boolean;
1354
1361
  sessionMode?: SessionMode;
1362
+ hasPlanToApply?: boolean;
1355
1363
  metadata?: Record<string, any>;
1356
1364
  }
1357
1365
  export interface CodegenFeedback {
@@ -1378,11 +1386,13 @@ export interface CodegenFinalize {
1378
1386
  lastCommit?: GitSnapshot;
1379
1387
  commitFailed?: boolean;
1380
1388
  metadata?: Record<string, any>;
1389
+ hasPlanToApply?: boolean;
1381
1390
  }
1382
1391
  export interface CodegenSetLastCompletion {
1383
1392
  sessionId: string;
1384
1393
  lastCompletionId: string | undefined;
1385
1394
  metadata?: Record<string, any>;
1395
+ hasPlanToApply?: boolean;
1386
1396
  }
1387
1397
  export interface GenerateCodeEventDone {
1388
1398
  type: "done";
package/src/projects.d.ts CHANGED
@@ -197,7 +197,7 @@ export interface GitDiagnostics {
197
197
  */
198
198
  likelyCause?: LikelyCause;
199
199
  }
200
- export type EnsureContainerErrorCode = "FAILED_TO_START_MACHINE_ERROR" | "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" | "FLY_MACHINE_LIMIT_ERROR" | "KUBE_CAPACITY_ERROR" | "KUBE_PERMISSIONS_ERROR" | "KUBE_POD_LIMIT_ERROR" | "KUBE_RESOURCE_QUOTA_ERROR" | "KUBE_NAMESPACE_CHECK_ERROR" | "KUBE_PVC_CREATE_ERROR" | "KUBE_PVC_CHECK_ERROR" | "KUBE_POD_CREATE_ERROR" | "KUBE_SERVICE_CREATE_ERROR" | "KUBE_INGRESS_CREATE_ERROR" | "KUBE_POD_FAILED_TO_START_ERROR" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-deleted" | "project-branch-not-found" | "project-branch-deleted" | "project-branch-no-session-id" | "project-repo-full-name-not-found" | "project-org-not-found" | "invalid-project-repo-url-already-in-use" | "no-available-regions" | "invalid-backup-without-volume-id" | "missing-app-with-machine-or-volume" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `machine-image-exited-immediately` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "missing-container-url" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
200
+ export type EnsureContainerErrorCode = "FAILED_TO_START_MACHINE_ERROR" | "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" | "FLY_MACHINE_LIMIT_ERROR" | "KUBE_CAPACITY_ERROR" | "KUBE_PERMISSIONS_ERROR" | "KUBE_POD_LIMIT_ERROR" | "KUBE_RESOURCE_QUOTA_ERROR" | "KUBE_NAMESPACE_CHECK_ERROR" | "KUBE_PVC_CREATE_ERROR" | "KUBE_PVC_CHECK_ERROR" | "KUBE_POD_CREATE_ERROR" | "KUBE_POD_DELETE_ERROR" | "KUBE_SERVICE_CREATE_ERROR" | "KUBE_INGRESS_CREATE_ERROR" | "KUBE_POD_FAILED_TO_START_ERROR" | "KUBE_POD_STATUS_TIMEOUT" | "KUBE_NAMESPACE_CREATE_ERROR" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-deleted" | "project-branch-not-found" | "project-branch-deleted" | "project-branch-no-session-id" | "project-repo-full-name-not-found" | "project-org-not-found" | "invalid-project-repo-url-already-in-use" | "no-available-regions" | "invalid-backup-without-volume-id" | "missing-app-with-machine-or-volume" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `machine-image-exited-immediately` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "missing-container-url" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
201
201
  export interface ErrorStateMessage extends BaseMessage {
202
202
  state: "error";
203
203
  message: string;
@@ -466,6 +466,8 @@ export interface BranchSharedData {
466
466
  metadata?: BranchMetadata;
467
467
  memoriesExtracted?: boolean;
468
468
  needsCleanup?: boolean;
469
+ /** Reason provided when archiving the branch (optional, max 500 chars) */
470
+ archiveReason?: string;
469
471
  /** @deprecated Use `state` field instead. Kept for backwards compatibility. */
470
472
  deleted?: boolean;
471
473
  /** MIGRATION: accepts both string and number during migration period */
@@ -994,4 +996,15 @@ export interface OrgCronConfigOptions {
994
996
  projectId: string;
995
997
  branchName: string;
996
998
  }
999
+ export interface ShouldDeletePodBody {
1000
+ projectId: string;
1001
+ branchName: string;
1002
+ ownerId: string;
1003
+ branchType: string;
1004
+ }
1005
+ export interface ShouldDeletePodResponse {
1006
+ shouldDelete: boolean;
1007
+ reason: "branch_inactive" | "force_delete_flag" | "project_not_found" | "branch_not_found" | "ok" | "error";
1008
+ error?: string;
1009
+ }
997
1010
  export {};