@builder.io/ai-utils 0.11.26 → 0.11.27

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.11.26",
3
+ "version": "0.11.27",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -974,6 +974,18 @@ export interface EnvironmentVariable {
974
974
  value: string;
975
975
  isSecret: boolean;
976
976
  }
977
+ export interface FileOverride {
978
+ /**
979
+ * Absolute path where the file should be written in the container.
980
+ * Example: "/app/.env", "/etc/config/app.conf"
981
+ */
982
+ path: string;
983
+ /**
984
+ * Content to write to the file.
985
+ * Can be plain text or binary content (base64 encoded if needed).
986
+ */
987
+ content: string;
988
+ }
977
989
  export interface FusionConfig {
978
990
  devCommand?: string;
979
991
  checkCommand?: string;
@@ -1044,6 +1056,12 @@ export interface FusionConfig {
1044
1056
  * @default false
1045
1057
  */
1046
1058
  autoConfigureHosts?: boolean;
1059
+ /**
1060
+ * Array of files to inject into the container during setup.
1061
+ * These files will be written before setupCommand or devCommand is executed.
1062
+ * Useful for configuration files, credentials, or environment-specific overrides.
1063
+ */
1064
+ fileOverrides?: FileOverride[];
1047
1065
  /**
1048
1066
  * Local MCP server configurations.
1049
1067
  * Servers defined here will be merged with servers from mcp.json.
package/src/projects.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { LaunchServerState, LaunchServerStatus } from "./codegen";
1
+ import type { FileOverride, EnvironmentVariable, LaunchServerState, LaunchServerStatus, BranchBackup } from "./codegen";
2
2
  export interface ConfigStatus {
3
3
  isReady: boolean;
4
4
  lastUpdated: string;
@@ -255,4 +255,191 @@ export interface SetupScriptDependency {
255
255
  name: string;
256
256
  script: string;
257
257
  }
258
+ export type FusionExecutionEnvironment = "containerized" | "container-less" | "cloud";
259
+ export interface PartialBranchData {
260
+ name?: string;
261
+ createdBy: string;
262
+ friendlyName: string;
263
+ isDefault: boolean;
264
+ isPublic: boolean;
265
+ lockedFusionEnvironment: FusionExecutionEnvironment;
266
+ metadata?: Record<string, unknown>;
267
+ backup?: BranchBackup;
268
+ gitAiBranch?: string | null;
269
+ lastCommitHash?: string | null;
270
+ lastCommitDate?: number | null;
271
+ commitMode?: "commits" | "draft-prs" | "prs";
272
+ useHomeDir?: boolean;
273
+ cloneFrom?: {
274
+ projectId: string;
275
+ branchName: string;
276
+ };
277
+ }
278
+ export interface Branch {
279
+ lockedFusionEnvironment?: FusionExecutionEnvironment;
280
+ id?: string;
281
+ appName?: string | null;
282
+ prNumber?: number | null;
283
+ prUrl?: string | null;
284
+ machineId?: string | null;
285
+ lastMachineIdRemovedAt?: number | null;
286
+ volumeId?: string | null;
287
+ secondaryVolumeId?: string | null;
288
+ volumeName?: string | null;
289
+ gitAiBranch?: string | null;
290
+ lastCommitHash?: string | null;
291
+ lastCommitDate?: number | null;
292
+ lastServerState?: LaunchServerState | null;
293
+ lastServerStateDate?: number | null;
294
+ lastServerVersion?: string | null;
295
+ name?: string;
296
+ createdBy?: string;
297
+ isPublic?: boolean;
298
+ isDefault?: boolean;
299
+ sessionId?: string;
300
+ createdAt?: number | null;
301
+ friendlyName?: string;
302
+ useHomeDir?: boolean;
303
+ useCloudHomeDir?: boolean;
304
+ ipv4?: {
305
+ address: string | null;
306
+ allocated: boolean | null;
307
+ } | null;
308
+ ipv6?: {
309
+ address: string | null;
310
+ allocated: boolean | null;
311
+ } | null;
312
+ preRecoveryData?: Partial<Branch> & {
313
+ recoveryDate: Date;
314
+ };
315
+ backup?: BranchBackup;
316
+ metadata?: Record<string, unknown>;
317
+ needsCleanup?: boolean;
318
+ deleted?: boolean;
319
+ updatedAt?: string;
320
+ commitMode?: "commits" | "draft-prs" | "prs";
321
+ kubePodName?: string | null;
322
+ kubeNamespace?: string | null;
323
+ kubePvcName?: string | null;
324
+ kubeHostname?: string | null;
325
+ }
326
+ export type CpuKind = "performance" | "shared";
327
+ export type MachineAutoStop = "stop" | "off" | "suspend";
328
+ export interface Project {
329
+ id: string;
330
+ name: string;
331
+ ownerId: string;
332
+ repoFullName: string | undefined;
333
+ repoProvider: string;
334
+ repoProtocol: string | undefined;
335
+ repoDescription?: string;
336
+ repoPrivate: boolean;
337
+ repoUrl: string | undefined;
338
+ createdDate: string;
339
+ updatedAt: string;
340
+ pinned?: boolean;
341
+ archived?: boolean;
342
+ createdBy: string;
343
+ checkRunCounts?: Record<string, number>;
344
+ repoAddedBy?: string;
345
+ pipelineCounts?: Record<string, number>;
346
+ needSetup?: boolean;
347
+ domains?: string[];
348
+ settings: {
349
+ autoDetectDevServer?: boolean;
350
+ autoDetectDevServerPatterns?: string[];
351
+ fusionEnvironment?: FusionExecutionEnvironment;
352
+ devServerPort?: number;
353
+ devServerUrl?: string;
354
+ refreshPreview?: boolean;
355
+ installCommand?: string;
356
+ gitBranchNamingStrategy?: "ai-session" | "branch-name" | "custom";
357
+ setupDependencies?: SetupDependency[];
358
+ gitBranchNamingCustom?: string;
359
+ devServerCommand?: string;
360
+ memoryLimit?: 1024 | 2048 | 4096 | 8192 | 16384;
361
+ cpuKind?: CpuKind;
362
+ autoStop?: MachineAutoStop;
363
+ mainBranchName?: string;
364
+ minMachinesRunning?: number;
365
+ volumeSize?: 5 | 10 | 12 | 15 | 20;
366
+ includePath?: string;
367
+ includePatterns?: string[];
368
+ environmentVariables?: EnvironmentVariable[];
369
+ fileOverrides?: FileOverride[];
370
+ commitMode?: "commits" | "draft-prs" | "prs";
371
+ dockerImagePath?: string;
372
+ nodeVersion?: string;
373
+ designSystems?: string[];
374
+ useNI?: boolean;
375
+ folders?: Array<{
376
+ name: string;
377
+ remoteUrl: string;
378
+ mainBranchName?: string;
379
+ includePath?: string;
380
+ addedBy?: string;
381
+ repoProvider?: string;
382
+ repoProtocol?: string;
383
+ }>;
384
+ agentsMD?: string;
385
+ initializationCommand?: string;
386
+ repoSubpath?: string;
387
+ recommendedRoot?: string;
388
+ https?: boolean;
389
+ localHttpsDomain?: string;
390
+ httpsServerKeyPath?: string;
391
+ httpsServerCertPath?: string;
392
+ httpsServerCaPath?: string;
393
+ httpsServerKeyContent?: string;
394
+ httpsServerCertContent?: string;
395
+ httpsServerCaContent?: string;
396
+ httpsServerPfx?: string;
397
+ httpsServerPassphrase?: string;
398
+ httpsServerSecureProtocol?: string;
399
+ httpsServerSecureOptions?: number;
400
+ httpsServerCiphers?: string;
401
+ httpsServerHonorCipherOrder?: boolean;
402
+ httpsServerRequestCert?: boolean;
403
+ httpsServerRejectUnauthorized?: boolean;
404
+ };
405
+ screenshot: string | null;
406
+ isExample?: boolean;
407
+ isPublic?: boolean;
408
+ snapshotVolume?: {
409
+ volumeId: string;
410
+ appName: string;
411
+ createdAt: number;
412
+ };
413
+ isFromUserTemplate?: boolean;
414
+ templateId?: string | null;
415
+ localPath?: string | null;
416
+ }
417
+ export interface ProjectWithBranches extends Project {
418
+ branches: Record<string, Branch>;
419
+ }
420
+ export interface OrganizationPrivate {
421
+ ownerId: string;
422
+ id: string;
423
+ installs?: {
424
+ ids: number[];
425
+ host: string;
426
+ }[];
427
+ createdAt: number;
428
+ updatedAt: number;
429
+ }
430
+ export interface CreateProjectOptions {
431
+ name: string;
432
+ repoFullName: string;
433
+ repoProvider: string;
434
+ repoProtocol: string;
435
+ repoDescription?: string;
436
+ repoPrivate: boolean;
437
+ repoUrl: string;
438
+ needSetup: boolean;
439
+ domains?: string[];
440
+ settings?: Partial<Project["settings"]>;
441
+ isPublic?: boolean;
442
+ isExample?: boolean;
443
+ templateId?: string;
444
+ }
258
445
  export {};