@builder.io/ai-utils 0.18.1 → 0.18.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.18.1",
3
+ "version": "0.18.3",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -676,6 +676,7 @@ export interface GenerateCompletionStepDevServerState {
676
676
  }
677
677
  export interface GenerateCompletionStepGit {
678
678
  type: "git";
679
+ folderName?: string;
679
680
  isSessionDirty: boolean;
680
681
  hasGeneratingPlaceholder: boolean;
681
682
  remoteBranchExists: boolean;
@@ -1080,6 +1081,43 @@ export interface WorkspaceConfiguration {
1080
1081
  agentsMD?: string;
1081
1082
  folders: WorkspaceFolder[];
1082
1083
  }
1084
+ /**
1085
+ * Runtime context for a git-enabled repository.
1086
+ * Used to track multiple git working directories in codegen.
1087
+ */
1088
+ export interface GitRepoContext {
1089
+ /** Folder name from WorkspaceFolder */
1090
+ folderName: string;
1091
+ /** Absolute path to the repository */
1092
+ path: string;
1093
+ /** Feature branch name */
1094
+ branchName: string;
1095
+ /** Original repo URL */
1096
+ repoUrl?: string;
1097
+ /** Repo name (e.g., owner/repo) */
1098
+ repoName?: string;
1099
+ /**
1100
+ * Initial commit when first checked
1101
+ */
1102
+ initialCommit?: string;
1103
+ }
1104
+ /**
1105
+ * Result from a multi-repo git operation.
1106
+ */
1107
+ export interface MultiRepoOperationResult<T = unknown> {
1108
+ /** True if all repos succeeded */
1109
+ success: boolean;
1110
+ /** True if some succeeded and some failed */
1111
+ partialSuccess: boolean;
1112
+ /** Per-repo results */
1113
+ results: Array<{
1114
+ folderName: string;
1115
+ success: boolean;
1116
+ result?: T;
1117
+ error?: Error;
1118
+ message?: string;
1119
+ }>;
1120
+ }
1083
1121
  export type Permission = "read" | "write" | "list";
1084
1122
  export interface AclEntry {
1085
1123
  action: "allow" | "deny";
@@ -1424,6 +1462,8 @@ export interface PushChangesOptions {
1424
1462
  repoFullName: string;
1425
1463
  repoUrl: string;
1426
1464
  };
1465
+ /** If specified, only push changes for this folder (multi-repo support) */
1466
+ folderName?: string;
1427
1467
  }
1428
1468
  export interface SyncChangesFromRemote {
1429
1469
  remoteBranches?: "both" | "main" | "ai";
@@ -181,6 +181,15 @@ export interface AiCreditsOverage {
181
181
  maxAllowedAiCredits: number;
182
182
  annualPrice: number;
183
183
  }
184
+ /**
185
+ * Information about AI credits that have been rolled over from previous billing periods
186
+ */
187
+ export interface AiCreditsRolloverInfo {
188
+ /** Number of AI credits rolled over from the previous billing period */
189
+ aiCreditsRolledOver?: number;
190
+ /** Timestamp when the credits were rolled over in milliseconds */
191
+ rolloverTimestamp?: number;
192
+ }
184
193
  export type PaymentError = "failed" | "unpaid" | "incomplete" | "incomplete_expired";
185
194
  export interface CustomPlan extends SubscriptionInfo {
186
195
  organizationId: string;
@@ -271,6 +280,13 @@ export interface FeatureMap {
271
280
  performanceInfrastructure?: boolean;
272
281
  previewPasswordProtection?: boolean;
273
282
  publicPreviews?: boolean;
283
+ privacyMode?: boolean;
284
+ usageInsights?: boolean;
285
+ designSystemIntelligence?: boolean;
286
+ gitProviderConnections?: boolean;
287
+ enterpriseGitProviders?: boolean;
288
+ agentCreditsRollover?: boolean;
289
+ selfHostedGitProviders?: boolean;
274
290
  }
275
291
  export interface SubscriptionInfo {
276
292
  price?: number;
@@ -281,7 +297,7 @@ export interface SubscriptionInfo {
281
297
  annualPrice?: number;
282
298
  annualDiscount?: number;
283
299
  isAnnual?: boolean;
284
- name: "free" | "development" | "basic" | "growth" | "enterprise" | "internal" | "partner" | "poc" | "legacy" | "pro";
300
+ name: "free" | "development" | "basic" | "growth" | "enterprise" | "internal" | "partner" | "poc" | "legacy" | "pro" | "team";
285
301
  limits: Limits;
286
302
  features: FeatureMap;
287
303
  trialDays?: number;
@@ -302,13 +318,17 @@ export interface SubscriptionInfo {
302
318
  useLegacyCreditsPlan?: boolean;
303
319
  currentBillingPeriodStart?: number;
304
320
  currentBillingPeriodEnd?: number;
321
+ downgradedAt?: number;
322
+ aiCreditsRolloverInfo?: AiCreditsRolloverInfo;
305
323
  upcomingLimits?: {
306
- effectiveDate: number;
324
+ effectiveDate?: number;
307
325
  users?: number;
308
326
  bandwidth?: number;
309
327
  pageviews?: number;
310
328
  aiCredits?: number;
329
+ upcomingSubscription?: string;
311
330
  };
331
+ subscriptionStatus?: string;
312
332
  }
313
333
  export type Subscription = keyof SubscriptionInfoMap;
314
334
  export interface SubscriptionInfoMap {
@@ -361,6 +381,9 @@ export interface SubscriptionInfoMap {
361
381
  "vcp:v1:enterprise": SubscriptionInfo;
362
382
  "vcp:v2:level1": SubscriptionInfo;
363
383
  "vcp:v2:level2": SubscriptionInfo;
384
+ "vcp:v3:level1": SubscriptionInfo;
385
+ "vcp:v3:level2": SubscriptionInfo;
386
+ "vcp:v3:level3": SubscriptionInfo;
364
387
  "shopify:v1:level1": SubscriptionInfo;
365
388
  "shopify:v1:level2": SubscriptionInfo;
366
389
  "shopify:v2:level1": SubscriptionInfo;
package/src/projects.d.ts CHANGED
@@ -292,6 +292,13 @@ export interface PartialBranchData {
292
292
  };
293
293
  }
294
294
  export type EntityState = "active" | "deleted" | "archived";
295
+ /**
296
+ * PR information for a single repository
297
+ */
298
+ export interface PrInfo {
299
+ prNumber: number;
300
+ prUrl: string;
301
+ }
295
302
  /**
296
303
  * Metadata stored in branches for integration tracking and PR description generation.
297
304
  * This type documents the integration context that can be attached to a branch.
@@ -320,6 +327,7 @@ interface BranchSharedData {
320
327
  appName?: string | null;
321
328
  prNumber?: number | null;
322
329
  prUrl?: string | null;
330
+ prInfoByFolder?: Record<string, PrInfo> | null;
323
331
  prStatus?: PRStatus;
324
332
  machineId?: string | null;
325
333
  lastMachineIdRemovedAt?: number | null;
@@ -499,6 +507,7 @@ export interface Project {
499
507
  addedBy?: string;
500
508
  repoProvider?: string;
501
509
  repoProtocol?: string;
510
+ enableGit?: boolean;
502
511
  }>;
503
512
  agentsMD?: string;
504
513
  initializationCommand?: string;