@builder.io/ai-utils 0.16.0 → 0.17.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.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -29,6 +29,7 @@ export interface CustomInstruction {
29
29
  glob?: string;
30
30
  description?: string;
31
31
  allowedTools?: string[];
32
+ hideUI?: boolean;
32
33
  }
33
34
  export interface CustomAgentInfo {
34
35
  name: string;
@@ -308,6 +309,7 @@ export interface CodeGenInputOptions {
308
309
  recommendedRoot?: string;
309
310
  enabledTools?: CodeGenTools[];
310
311
  enabledMCPs?: string[];
312
+ skipFileDiff?: boolean;
311
313
  /**
312
314
  * Local MCP tool definitions from stdio servers (CLI-side only)
313
315
  * These tools will be executed on the client side and passed through from the server
@@ -682,6 +684,12 @@ export interface GenerateCompletionStepBatch {
682
684
  type: "batch";
683
685
  steps: GenerateCompletionStep[];
684
686
  }
687
+ export interface CustomInstructionDefinition {
688
+ name: string;
689
+ description: string;
690
+ type: "agent-mode" | "always";
691
+ glob?: string;
692
+ }
685
693
  export interface GenerateCompletionStepSession {
686
694
  type: "session";
687
695
  title: string | undefined;
@@ -694,6 +702,7 @@ export interface GenerateCompletionStepSession {
694
702
  sessionMode: SessionMode;
695
703
  fusionConfig: FusionConfig | undefined;
696
704
  hasBrowserAutomation: boolean;
705
+ customInstructions: CustomInstructionDefinition[];
697
706
  }
698
707
  export interface GenerateCompletionStepMetadata {
699
708
  type: "metadata";
@@ -19,47 +19,11 @@ export interface GitlabEnterprisePATValue {
19
19
  botUsername: string;
20
20
  secondaryHost?: string;
21
21
  }
22
- /**
23
- * Public metadata for GitLab fallback token (stored in organizations collection).
24
- */
25
22
  export interface GitlabCloudFallbackToken {
26
- configured: boolean;
27
- createdBy: string;
28
- createdAt: number;
29
- }
30
- /**
31
- * Public metadata for Azure fallback token (stored in organizations collection).
32
- */
33
- export interface AzureCloudFallbackToken {
34
- configured: boolean;
35
- organization: string;
36
- createdBy: string;
37
- createdAt: number;
38
- }
39
- /**
40
- * Public metadata for Bitbucket fallback token (stored in organizations collection).
41
- */
42
- export interface BitbucketCloudFallbackToken {
43
- configured: boolean;
44
- username: string;
45
- email: string;
23
+ token: string;
46
24
  createdBy: string;
47
25
  createdAt: number;
48
26
  }
49
- /**
50
- * Private fallback tokens stored in organizations_private collection.
51
- */
52
- export interface FallbackTokensPrivate {
53
- gitlab?: {
54
- token: string;
55
- };
56
- azure?: {
57
- token: string;
58
- };
59
- bitbucket?: {
60
- token: string;
61
- };
62
- }
63
27
  interface OrganizationSettings {
64
28
  attribution?: string[];
65
29
  visualEditorAiStyleInspirationURL?: string;
@@ -75,8 +39,6 @@ interface OrganizationSettings {
75
39
  githubEnterpriseSetupValue?: GithubEnterpriseSetupValue;
76
40
  gitlabEnterprisePAT?: GitlabEnterprisePATValue;
77
41
  gitlabCloudFallbackToken?: GitlabCloudFallbackToken;
78
- azureCloudFallbackToken?: AzureCloudFallbackToken;
79
- bitbucketCloudFallbackToken?: BitbucketCloudFallbackToken;
80
42
  bitbucketEnterprisePAT?: BitbucketEnterprisePAT;
81
43
  useProxy?: boolean;
82
44
  fusionShareableUrlSuffix?: string;
package/src/projects.d.ts CHANGED
@@ -1,5 +1,15 @@
1
1
  import type { FileOverride, EnvironmentVariable, LaunchServerState, LaunchServerStatus, BranchBackup, CommitMode } from "./codegen";
2
- import type { FallbackTokensPrivate } from "./organization";
2
+ /**
3
+ * Temporary type for date fields during migration.
4
+ * Handles both old (string) and new (number) formats.
5
+ * DELETE AFTER MIGRATION COMPLETES.
6
+ */
7
+ export type InMigrationDate = string | number;
8
+ /**
9
+ * Temporary type for nullable date fields during migration.
10
+ * DELETE AFTER MIGRATION COMPLETES.
11
+ */
12
+ export type InMigrationDateNullable = InMigrationDate | null | undefined;
3
13
  export interface ConfigStatus {
4
14
  isReady: boolean;
5
15
  lastUpdated: string;
@@ -302,10 +312,12 @@ export interface BranchMetadata {
302
312
  slackThreadTs?: string;
303
313
  [key: string]: unknown;
304
314
  }
315
+ export type PRStatus = "open" | "closed" | "merged" | "draft";
305
316
  interface BranchSharedData {
306
317
  appName?: string | null;
307
318
  prNumber?: number | null;
308
319
  prUrl?: string | null;
320
+ prStatus?: PRStatus;
309
321
  machineId?: string | null;
310
322
  lastMachineIdRemovedAt?: number | null;
311
323
  volumeId?: string | null;
@@ -337,7 +349,8 @@ interface BranchSharedData {
337
349
  needsCleanup?: boolean;
338
350
  /** @deprecated Use `state` field instead. Kept for backwards compatibility. */
339
351
  deleted?: boolean;
340
- deletedAt?: string;
352
+ /** MIGRATION: accepts both string and number during migration period */
353
+ deletedAt?: InMigrationDateNullable;
341
354
  deletedBy?: string;
342
355
  kubePodName?: string | null;
343
356
  kubeNamespace?: string | null;
@@ -347,6 +360,7 @@ interface BranchSharedData {
347
360
  vscodeTunnelUrl?: string | null;
348
361
  vscodeTunnelName?: string | null;
349
362
  vscodeTunnelExpiresAt?: string | null;
363
+ commitMode?: CommitMode;
350
364
  /** Timestamp when an AI agent started activity on this branch, null when inactive (in milliseconds since epoch) */
351
365
  lastAgentActivityAt?: number | null;
352
366
  /** Timestamp of last activity on this branch - includes both agent and user activity (in milliseconds since epoch) */
@@ -361,10 +375,11 @@ interface RequiredBranchSharedData {
361
375
  lockedFusionEnvironment: FusionExecutionEnvironment;
362
376
  id: string;
363
377
  sessionId: string;
364
- createdAt: number;
365
- updatedAt: string;
378
+ /** MIGRATION: accepts both string and number during migration period */
379
+ createdAt: InMigrationDate;
380
+ /** MIGRATION: accepts both string and number during migration period */
381
+ updatedAt: InMigrationDate;
366
382
  lastUpdatedAt: number;
367
- commitMode: CommitMode;
368
383
  }
369
384
  /**
370
385
  * LegacyBranch represents branch data as stored in the nested project.branches field.
@@ -417,8 +432,10 @@ export interface Project {
417
432
  repoDescription?: string;
418
433
  repoPrivate: boolean;
419
434
  repoUrl: string | undefined;
420
- createdDate: string;
421
- updatedAt: string;
435
+ /** MIGRATION: accepts both string and number during migration period */
436
+ createdDate: InMigrationDate;
437
+ /** MIGRATION: accepts both string and number during migration period */
438
+ updatedAt: InMigrationDate;
422
439
  pinned?: boolean;
423
440
  archived?: boolean;
424
441
  createdBy: string;
@@ -516,7 +533,8 @@ export interface Project {
516
533
  localPath?: string | null;
517
534
  /** The state of the project. Use `isProjectDeleted()` helper for backwards-compatible checks. */
518
535
  state?: EntityState;
519
- deletedAt?: string;
536
+ /** MIGRATION: accepts both string and number during migration period */
537
+ deletedAt?: InMigrationDateNullable;
520
538
  deletedBy?: string;
521
539
  /**
522
540
  * When true, branches are stored in the standalone `branches` collection
@@ -551,7 +569,6 @@ export interface OrganizationPrivate {
551
569
  ids: number[];
552
570
  host: string;
553
571
  }[];
554
- fallbackTokens?: FallbackTokensPrivate;
555
572
  createdAt: number;
556
573
  updatedAt: number;
557
574
  }