@builder.io/ai-utils 0.5.7 → 0.5.9

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.7",
3
+ "version": "0.5.9",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -2,6 +2,12 @@ import type { Attachment, ContentMessageItemToolResult } from "./messages";
2
2
  import type { BuilderContent } from "./completion";
3
3
  import type { Options as PrettierOptions } from "prettier";
4
4
  import type { UserContext } from "./mapping";
5
+ export interface LoadingState {
6
+ type: "tool_start" | "tool_end";
7
+ toolName?: string;
8
+ toolId?: string;
9
+ description?: string;
10
+ }
5
11
  export type ImportType = "named" | "default";
6
12
  export interface ESMImport {
7
13
  importName: string;
@@ -124,6 +130,11 @@ export interface TodoWriteToolInput {
124
130
  id: string;
125
131
  }[];
126
132
  }
133
+ export interface BuilderEditToolInput {
134
+ filePath: string;
135
+ old_str: string;
136
+ new_str: string;
137
+ }
127
138
  export interface GetScreenshotToolInput {
128
139
  url: string;
129
140
  selector?: string;
@@ -162,6 +173,7 @@ export interface CodeGenToolMap {
162
173
  Revert: RevertToolInput;
163
174
  TodoRead: TodoReadToolInput;
164
175
  TodoWrite: TodoWriteToolInput;
176
+ BuilderEdit: BuilderEditToolInput;
165
177
  LS: ListDirToolInput;
166
178
  }
167
179
  export type CodeGenTools = keyof CodeGenToolMap;
@@ -681,7 +693,15 @@ export interface GenerateCodeEventMCPStatus {
681
693
  type: "mcp-status";
682
694
  status: Record<string, MCPClientStatus>;
683
695
  }
684
- export type GenerateCodeEvent = ActionItem | GenerateCodeEventDone | GenerateCodeEventContinue | GenerateCodeEventPagination | GenerateCodeEventDelta | GenerateCodeEventError | GenerateCodeEventPing | GenerateCodeEventMCPStatus | GenerateCodeEventUser;
696
+ export type GenerateCodeEvent = ActionItem | GenerateCodeEventDone | GenerateCodeEventContinue | GenerateCodeEventPagination | GenerateCodeEventDelta | GenerateCodeEventError | GenerateCodeEventPing | GenerateCodeEventMCPStatus | GenerateCodeEventUser | GenerateCodeEventEditorAILoadingState;
697
+ export interface GenerateCodeEventEditorAILoadingState {
698
+ type: "loading_state";
699
+ loadingState: LoadingState;
700
+ content?: string;
701
+ actionTitle?: string;
702
+ artifactTitle?: string;
703
+ filePath?: string;
704
+ }
685
705
  export type CommitMode = "commits" | "draft-prs" | "prs";
686
706
  export interface WorkspaceFolder {
687
707
  enableGit?: boolean;
@@ -724,6 +744,7 @@ export interface FusionConfig {
724
744
  allowedCommands?: string[];
725
745
  autoBackupGit?: boolean;
726
746
  autoShutdown?: boolean;
747
+ autoShutdownThresholdMinutes?: number;
727
748
  commitMode?: CommitMode;
728
749
  serverUrl?: string;
729
750
  isLocal?: boolean;
@@ -785,6 +806,7 @@ export interface LaunchServerStatus {
785
806
  httpServerState?: HttpServerState;
786
807
  editorReady: boolean;
787
808
  initState?: InitState;
809
+ initStatusLogs?: InitStatusLog[];
788
810
  errorMessage?: string;
789
811
  devToolsVersion: string;
790
812
  lastRequestTime: number;
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;
@@ -8,4 +8,18 @@ export interface StoreComponentDocsInput {
8
8
  designSystemPackage?: string;
9
9
  designSystemVersion?: string;
10
10
  hash?: string;
11
+ designSystemId?: string;
12
+ }
13
+ export interface AddDesignSystemInput {
14
+ designSystemName: string;
15
+ status: string;
16
+ spaceId: string;
17
+ rootOrgId: string;
18
+ }
19
+ export interface UpdateDesignSystemInput {
20
+ id: string;
21
+ spaceId?: string;
22
+ rootOrgId?: string;
23
+ designSystemName?: string;
24
+ status?: "in-progress" | "completed" | "failed";
11
25
  }