@builder.io/ai-utils 0.8.1 → 0.8.3

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.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -66,6 +66,12 @@ export interface BashToolInput {
66
66
  description?: string | null;
67
67
  restart?: boolean | null;
68
68
  }
69
+ export interface PowerShellToolInput {
70
+ command?: string | null;
71
+ timeout?: number | null;
72
+ description?: string | null;
73
+ restart?: boolean | null;
74
+ }
69
75
  export interface WebSearchToolInput {
70
76
  query: string;
71
77
  }
@@ -150,7 +156,8 @@ export interface GetScreenshotToolInput {
150
156
  }
151
157
  export interface WebFetchToolInput {
152
158
  url: string;
153
- prompt: string;
159
+ prompt?: string;
160
+ include_styles?: boolean;
154
161
  }
155
162
  export interface SetImportantFilesToolInput {
156
163
  important_files: {
@@ -169,6 +176,7 @@ export interface CodeGenToolMap {
169
176
  get_screenshot: GetScreenshotToolInput;
170
177
  dev_server_control: DevServerControlInput;
171
178
  bash: BashToolInput;
179
+ powershell: PowerShellToolInput;
172
180
  web_search: WebSearchToolInput;
173
181
  write_file: WriteFileInput;
174
182
  search_replace_file: SearchReplaceInput;
@@ -184,6 +192,7 @@ export interface CodeGenToolMap {
184
192
  FindMedia: FindMediaToolInput;
185
193
  Memory: MemoryToolInput;
186
194
  Bash: BashToolInput;
195
+ PowerShell: PowerShellToolInput;
187
196
  WebSearch: WebSearchToolInput;
188
197
  AskUser: AskUserToolInput;
189
198
  Agent: AgentToolInput;
@@ -230,6 +239,7 @@ export interface CodeGenInputOptions {
230
239
  redactUserMessages?: boolean;
231
240
  redactLLMMessages?: boolean;
232
241
  environmentVariables?: EnvironmentVariable[];
242
+ dirtyEnvironmentVariables?: boolean;
233
243
  builderContent?: BuilderContent;
234
244
  framework?: CodeGenFramework;
235
245
  styleLibrary?: CodeGenStyleLibrary;
@@ -676,6 +686,7 @@ export interface CodegenTurn {
676
686
  userMessage: GenerateUserMessage | undefined;
677
687
  beforeCommit: string | undefined;
678
688
  afterCommit: string | undefined;
689
+ lastCommit: string | undefined;
679
690
  cachedToolResults?: ContentMessageItemToolResult[];
680
691
  autoContinue: boolean;
681
692
  }
@@ -704,6 +715,17 @@ export interface CodegenFeedback {
704
715
  commitFailed?: boolean;
705
716
  position?: CodeGenPosition;
706
717
  }
718
+ export interface CodegenFinalize {
719
+ sessionId: string;
720
+ completionId?: string;
721
+ projectId?: string;
722
+ branchName?: string;
723
+ userCompletionId?: string;
724
+ beforeCommit?: string;
725
+ afterCommit?: string;
726
+ lastCommit?: string;
727
+ commitFailed?: boolean;
728
+ }
707
729
  export interface CodegenSetLastCompletion {
708
730
  sessionId: string;
709
731
  lastCompletionId: string | undefined;
@@ -929,6 +951,7 @@ export interface FusionConfig {
929
951
  machine?: RemoteMachineConfig;
930
952
  _attemptDryRunBackupGit?: boolean;
931
953
  mode?: Mode;
954
+ autoDetectDevServer?: boolean;
932
955
  /** @deprecated use devCommand */
933
956
  command?: string;
934
957
  }
@@ -1,3 +1,11 @@
1
+ export interface GithubEnterpriseSetupValue {
2
+ host: string;
3
+ clientId: string;
4
+ clientSecret: string;
5
+ appId: string;
6
+ pem: string;
7
+ secondaryHost?: string;
8
+ }
1
9
  interface OrganizationSettings {
2
10
  attribution?: string[];
3
11
  visualEditorAiStyleInspirationURL?: string;
@@ -9,14 +17,7 @@ interface OrganizationSettings {
9
17
  enforceMaxUsers?: boolean;
10
18
  ssoRestrictedMode?: boolean;
11
19
  isUserPluginIntegrationRequestGranted?: boolean;
12
- githubEnterpriseSetupValue?: {
13
- host: string;
14
- clientId: string;
15
- clientSecret: string;
16
- appId: string;
17
- pem: string;
18
- secondaryHost?: string;
19
- };
20
+ githubEnterpriseSetupValue?: GithubEnterpriseSetupValue;
20
21
  }
21
22
  interface RoleOptions {
22
23
  read?: boolean;
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 = "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" | "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-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}` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
138
+ 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" | "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-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}` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
139
139
  export interface ErrorStateMessage extends BaseMessage {
140
140
  state: "error";
141
141
  message: string;
@@ -49,20 +49,12 @@ export interface AddDesignSystemInput {
49
49
  }
50
50
  export interface UpdateDesignSystemInput {
51
51
  id: string;
52
- designSystemName: string;
53
- scope: DesignSystemScope;
52
+ designSystemName?: string;
53
+ scope?: DesignSystemScope;
54
54
  designSystemPackage?: string;
55
55
  designSystemVersion?: string;
56
56
  status?: "in-progress" | "completed" | "failed";
57
57
  }
58
- export interface UpdateDesignSystemScopeInput {
59
- id: string;
60
- scope: DesignSystemScope;
61
- }
62
- export interface UpdateDesignSystemNameInput {
63
- id: string;
64
- designSystemName: string;
65
- }
66
58
  export interface DesignSystem {
67
59
  id: string;
68
60
  spaceId: string;