@builder.io/ai-utils 0.8.9 → 0.8.11

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.9",
3
+ "version": "0.8.11",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { BuilderContent } from "./completion";
3
3
  import type { Options as PrettierOptions } from "prettier";
4
4
  import type { UserContext } from "./mapping";
5
5
  import type { ForcedBackup } from "./projects";
6
+ import type { Feature } from "./features";
6
7
  export type ImportType = "named" | "default";
7
8
  export interface ESMImport {
8
9
  importName: string;
@@ -247,6 +248,9 @@ export interface CodeGenInputOptions {
247
248
  aclPolicy?: AclPolicy;
248
249
  repoIndexingConfig?: RepoIndexingConfig;
249
250
  enabledTools?: CodeGenTools[];
251
+ enabledMCPs?: string[];
252
+ maxAgentLoops?: number;
253
+ maxAgentTiming?: number;
250
254
  /**
251
255
  * Maximum output tokens allowed in the LLM response. This will set the maximum
252
256
  * token output for the LLM.
@@ -283,7 +287,6 @@ export interface CodeGenInputOptions {
283
287
  repair?: boolean;
284
288
  }
285
289
  export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "abrupt-end" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit" | "unknown-design-system";
286
- export type Feature = "component-mapping";
287
290
  export interface CodegenUsage {
288
291
  total: number;
289
292
  fast: number;
@@ -659,6 +662,7 @@ export interface GenerateUserMessage {
659
662
  category?: CodeGenCategory;
660
663
  metadata?: Record<string, any>;
661
664
  autoPush?: "force-push" | "merge-push" | "ff-push" | "none";
665
+ enabledMCPs?: string[];
662
666
  /** @deprecated */
663
667
  repair?: boolean;
664
668
  }
@@ -675,6 +679,7 @@ export interface UserInput {
675
679
  patchFusionConfig?: Partial<FusionConfig> | undefined;
676
680
  modelOverride?: string;
677
681
  category?: CodeGenCategory;
682
+ enabledMCPs?: string[];
678
683
  /** @deprecated */
679
684
  repair?: boolean;
680
685
  }
package/src/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from "./codegen.js";
7
7
  export * from "./projects.js";
8
8
  export * from "./repo-indexing.js";
9
9
  export * from "./organization.js";
10
+ export * from "./features.js";
package/src/index.js CHANGED
@@ -7,3 +7,4 @@ export * from "./codegen.js";
7
7
  export * from "./projects.js";
8
8
  export * from "./repo-indexing.js";
9
9
  export * from "./organization.js";
10
+ export * from "./features.js";
package/src/messages.d.ts CHANGED
@@ -23,6 +23,7 @@ export interface ContentMessageItemDocument {
23
23
  source: DocumentBase64Source | DocumentUrlSource | DocumentTextSource;
24
24
  cache?: boolean;
25
25
  ephemeral?: boolean;
26
+ title?: string;
26
27
  }
27
28
  export interface DocumentBase64Source {
28
29
  type: "base64";
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" | "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}`;
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}` | `machine-image-exited-immediately` | `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;