@builder.io/ai-utils 0.7.8 → 0.8.0

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.7.8",
3
+ "version": "0.8.0",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -229,6 +229,7 @@ export interface CodeGenInputOptions {
229
229
  modelOverride?: string;
230
230
  redactUserMessages?: boolean;
231
231
  redactLLMMessages?: boolean;
232
+ environmentVariables?: EnvironmentVariable[];
232
233
  builderContent?: BuilderContent;
233
234
  framework?: CodeGenFramework;
234
235
  styleLibrary?: CodeGenStyleLibrary;
@@ -237,7 +238,17 @@ export interface CodeGenInputOptions {
237
238
  aclPolicy?: AclPolicy;
238
239
  repoIndexingConfig?: RepoIndexingConfig;
239
240
  enabledTools?: CodeGenTools[];
241
+ /**
242
+ * Maximum output tokens allowed in the LLM response. This will set the maximum
243
+ * token output for the LLM.
244
+ */
240
245
  maxTokens?: number;
246
+ /**
247
+ * Maximum input context window. This does not set the context window as that is
248
+ * determined by the LLM. Instead, this configures when internal systems such as
249
+ * compaction activate.
250
+ */
251
+ maxInputTokens?: number;
241
252
  maxPages?: number;
242
253
  autoContinue?: number;
243
254
  isManualContinue?: boolean;
@@ -260,7 +271,7 @@ export interface CodeGenInputOptions {
260
271
  /** @deprecated */
261
272
  vcpId?: string;
262
273
  }
263
- export type CodeGenErrorCodes = "credits-limit-daily" | "credits-limit-monthly" | "credits-limit-other" | "cli-genetic-error" | "git-update-error" | "prompt-too-long" | "context-too-long" | "unknown" | "failed-recover-state" | "ask-to-continue" | "bad-initial-url" | "invalid-last-message" | "corrupted-session" | "assertion" | "rate-limit" | "unknown-design-system";
274
+ 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";
264
275
  export type Feature = "component-mapping";
265
276
  export interface CodegenUsage {
266
277
  total: number;
@@ -886,6 +897,11 @@ export interface PrivacyMode {
886
897
  mcpServers?: boolean;
887
898
  }
888
899
  export type Mode = "init-and-launch" | "backup" | "backup-force-full";
900
+ export interface EnvironmentVariable {
901
+ key: string;
902
+ value: string;
903
+ isSecret: boolean;
904
+ }
889
905
  export interface FusionConfig {
890
906
  devCommand?: string;
891
907
  checkCommand?: string;
@@ -904,6 +920,8 @@ export interface FusionConfig {
904
920
  commitMode?: CommitMode;
905
921
  serverUrl?: string;
906
922
  isLocal?: boolean;
923
+ environmentVariables?: EnvironmentVariable[];
924
+ /** @deprecated */
907
925
  envVariables?: Record<string, string>;
908
926
  accessControl?: AclPolicy;
909
927
  privacyMode?: PrivacyMode;
@@ -15,6 +15,7 @@ interface OrganizationSettings {
15
15
  clientSecret: string;
16
16
  appId: string;
17
17
  pem: string;
18
+ secondaryHost?: string;
18
19
  };
19
20
  }
20
21
  interface RoleOptions {
package/src/projects.d.ts CHANGED
@@ -194,7 +194,7 @@ export interface GitBackupRecordOptions {
194
194
  repoUrl: string;
195
195
  version: "v1" | "v2";
196
196
  forced: ForcedBackup;
197
- metadata?: Record<string, string | undefined>;
197
+ metadata?: Record<string, string | string[] | undefined>;
198
198
  }
199
199
  export interface GitBackupRecordResult {
200
200
  success: boolean;