@builder.io/ai-utils 0.5.8 → 0.5.10

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.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -560,12 +560,19 @@ export interface UserSourceAzure {
560
560
  role: "user" | "agent";
561
561
  principals?: string[];
562
562
  }
563
+ export interface UserSourceBitbucket {
564
+ source: "bitbucket";
565
+ userName: string;
566
+ link?: string;
567
+ role: "user" | "agent";
568
+ principals?: string[];
569
+ }
563
570
  export interface UserSourceAgent {
564
571
  source: "agent";
565
572
  role: "agent";
566
573
  principals?: string[];
567
574
  }
568
- export type UserSource = UserSourceBuilder | UserSourceGithub | UserSourceGitlab | UserSourceAzure | UserSourceAgent;
575
+ export type UserSource = UserSourceBuilder | UserSourceGithub | UserSourceGitlab | UserSourceAzure | UserSourceBitbucket | UserSourceAgent;
569
576
  export interface GenerateUserMessage {
570
577
  user?: UserSource;
571
578
  userPrompt: string;
@@ -731,6 +738,22 @@ export interface AccessResult {
731
738
  allowed: boolean;
732
739
  message: string;
733
740
  }
741
+ export type RemoteMachineConfig = {
742
+ cpus: number;
743
+ memory: number;
744
+ region: string;
745
+ cpuKind: "performance" | "shared";
746
+ volumeSize: number;
747
+ };
748
+ export type MachineConfig = (RemoteMachineConfig & {
749
+ environment: "remote";
750
+ }) | {
751
+ cpus: number;
752
+ memory: number;
753
+ platform: string;
754
+ arch: string;
755
+ environment: "local";
756
+ };
734
757
  export interface FusionConfig {
735
758
  devCommand?: string;
736
759
  checkCommand?: string;
@@ -744,11 +767,13 @@ export interface FusionConfig {
744
767
  allowedCommands?: string[];
745
768
  autoBackupGit?: boolean;
746
769
  autoShutdown?: boolean;
770
+ autoShutdownThresholdMinutes?: number;
747
771
  commitMode?: CommitMode;
748
772
  serverUrl?: string;
749
773
  isLocal?: boolean;
750
774
  envVariables?: Record<string, string>;
751
775
  accessControl?: AclPolicy;
776
+ machine?: RemoteMachineConfig;
752
777
  /** @deprecated use devCommand */
753
778
  command?: string;
754
779
  }
@@ -805,8 +830,27 @@ export interface LaunchServerStatus {
805
830
  httpServerState?: HttpServerState;
806
831
  editorReady: boolean;
807
832
  initState?: InitState;
833
+ initStatusLogs?: InitStatusLog[];
808
834
  errorMessage?: string;
809
835
  devToolsVersion: string;
810
836
  lastRequestTime: number;
811
837
  startTime: number;
838
+ machine?: MachineConfig;
839
+ projectId?: string;
840
+ }
841
+ export interface FusionStatus {
842
+ status: "ok";
843
+ state: LaunchServerState;
844
+ setupState?: SetupCommandState;
845
+ devState?: DevCommandState;
846
+ editorReady: boolean;
847
+ httpServerState?: HttpServerState;
848
+ initState?: InitState;
849
+ errorMessage?: string;
850
+ devToolsVersion: string;
851
+ idleTime: number;
852
+ upTime: number;
853
+ machine?: MachineConfig;
854
+ projectId?: string;
855
+ secondsActive?: number;
812
856
  }
package/src/projects.d.ts CHANGED
@@ -135,7 +135,7 @@ export interface ReadyMessage extends BaseMessage {
135
135
  export type MachineState = "unknown" | "created" | "starting" | "started" | "stopping" | "stopped" | "suspending" | "suspended" | "replacing" | "destroying" | "destroyed" | "not-found" | "running" | "failed";
136
136
  export type FlyVolumeState = "unknown" | "creating" | "created" | "extending" | "restoring" | "enabling_remote_export" | "hydrating" | "recovering" | "scheduling_destroy" | "pending_destroy" | "failed";
137
137
  export type GitAuthErrorCode = "git-auth-failed" | "git-auth-failed-root-repo" | "git-auth-failed-folder-added-by" | "git-auth-failed-folder-created-by" | "git-auth-failed-folder-server-token" | "git-auth-failed-root-repo-server-token";
138
- export type EnsureContainerErrorCode = "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" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-branch-not-found" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
138
+ export type EnsureContainerErrorCode = "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" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-branch-not-found" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
139
139
  export interface ErrorStateMessage extends BaseMessage {
140
140
  state: "error";
141
141
  message: string;