@builder.io/ai-utils 0.35.0 → 0.37.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.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -576,6 +576,12 @@ export interface ReadBranchToolInput {
576
576
  projectId: string;
577
577
  branchName: string;
578
578
  }
579
+ export interface ArchiveBranchToolInput {
580
+ projectId: string;
581
+ branchName: string;
582
+ builderUserId: string;
583
+ reason?: string;
584
+ }
579
585
  /** Comment for PR review - used by both SubmitPRReview and SubmitRecording */
580
586
  export interface PRReviewComment {
581
587
  file_path: string;
@@ -684,6 +690,7 @@ export interface CodeGenToolMap {
684
690
  SendMessage: SendMessageToolInput;
685
691
  SpawnBranch: SpawnBranchToolInput;
686
692
  ReadBranch: ReadBranchToolInput;
693
+ ArchiveBranch: ArchiveBranchToolInput;
687
694
  RunningAgents: RunningAgentsToolInput;
688
695
  }
689
696
  export type CodeGenTools = keyof CodeGenToolMap;
@@ -1352,6 +1359,7 @@ export interface GetSessionTurnsResult {
1352
1359
  updatedUnixTime: number | undefined;
1353
1360
  canLoadMore: boolean;
1354
1361
  sessionMode?: SessionMode;
1362
+ hasPlanToApply?: boolean;
1355
1363
  metadata?: Record<string, any>;
1356
1364
  }
1357
1365
  export interface CodegenFeedback {
@@ -1378,11 +1386,13 @@ export interface CodegenFinalize {
1378
1386
  lastCommit?: GitSnapshot;
1379
1387
  commitFailed?: boolean;
1380
1388
  metadata?: Record<string, any>;
1389
+ hasPlanToApply?: boolean;
1381
1390
  }
1382
1391
  export interface CodegenSetLastCompletion {
1383
1392
  sessionId: string;
1384
1393
  lastCompletionId: string | undefined;
1385
1394
  metadata?: Record<string, any>;
1395
+ hasPlanToApply?: boolean;
1386
1396
  }
1387
1397
  export interface GenerateCodeEventDone {
1388
1398
  type: "done";
@@ -2054,6 +2064,8 @@ export interface CodegenApiTerminal {
2054
2064
  readonly: boolean;
2055
2065
  builtIn: boolean;
2056
2066
  state: "starting" | "running" | "exited" | "error";
2067
+ /** Whether this terminal has stale environment variables and should be restarted */
2068
+ stale?: boolean;
2057
2069
  exitCode: number | undefined;
2058
2070
  initialCommand?: string;
2059
2071
  }
package/src/events.d.ts CHANGED
@@ -496,6 +496,10 @@ export declare const ClientDevtoolsSessionStartedEvent: {
496
496
  export type ClientDevtoolsSessionIdleEventV1 = FusionEventVariant<"client.devtools.session.idle", {
497
497
  sessionId?: string;
498
498
  lastMessage?: string;
499
+ projectId?: string;
500
+ branchName?: string;
501
+ hasPlanToApply?: boolean;
502
+ sessionMode?: string;
499
503
  }, {}, 1>;
500
504
  export declare const ClientDevtoolsSessionIdleEventV1: {
501
505
  eventName: "client.devtools.session.idle";
package/src/projects.d.ts CHANGED
@@ -466,6 +466,8 @@ export interface BranchSharedData {
466
466
  metadata?: BranchMetadata;
467
467
  memoriesExtracted?: boolean;
468
468
  needsCleanup?: boolean;
469
+ /** Reason provided when archiving the branch (optional, max 500 chars) */
470
+ archiveReason?: string;
469
471
  /** @deprecated Use `state` field instead. Kept for backwards compatibility. */
470
472
  deleted?: boolean;
471
473
  /** MIGRATION: accepts both string and number during migration period */
@@ -489,6 +491,7 @@ export interface BranchSharedData {
489
491
  /** Whether the branch has unpushed changes (ahead > 0 or dirty working directory) */
490
492
  hasUnpushedChanges?: boolean;
491
493
  screenshot?: string | null;
494
+ agentState?: "running" | "waiting" | "idle";
492
495
  /** Screenshots indexed by normalized href (without query params, fragments, protocol) */
493
496
  screenshots?: Record<string, string>;
494
497
  /** Whether this branch is for a code review - affects enabled agents and tools */