@builder.io/ai-utils 0.17.0 → 0.17.2

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.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -153,6 +153,7 @@ export interface AgentToolInput {
153
153
  description: string;
154
154
  prompt: string;
155
155
  subagent_type?: string;
156
+ resume?: string;
156
157
  }
157
158
  export interface ListDirToolInput {
158
159
  path: string;
@@ -1159,6 +1160,10 @@ export interface FusionConfig {
1159
1160
  browserAutomationInstructions?: string;
1160
1161
  featureBranch?: string;
1161
1162
  aiBranch?: string;
1163
+ /** Whether this is a fork PR - affects git operations (read-only, can't push) */
1164
+ isFork?: boolean;
1165
+ /** PR number for fork PRs - used for fetching refs/pulls/x/head */
1166
+ prNumber?: number;
1162
1167
  refreshPreview?: boolean;
1163
1168
  workingDirectory?: string;
1164
1169
  bashWorkingDirectory?: string;
@@ -1247,6 +1252,12 @@ export interface FusionConfig {
1247
1252
  * These are merged with filesystem-discovered agents.
1248
1253
  */
1249
1254
  customAgents?: CustomAgentDefinition[];
1255
+ /**
1256
+ * Agent type to initialize the session as.
1257
+ * When specified, the session will be configured with settings from the named agent.
1258
+ * Useful for direct agent initialization without going through spawnAgent.
1259
+ */
1260
+ agentType?: string;
1250
1261
  /**
1251
1262
  * Array of regex patterns to ignore when checking for client-side errors.
1252
1263
  * Errors matching these patterns will not show the error popup.
@@ -1633,3 +1644,8 @@ export interface SystemReminderObj {
1633
1644
  ephemeral?: boolean;
1634
1645
  }
1635
1646
  export type SystemReminder = string | SystemReminderObj;
1647
+ export interface LaunchInitializeSessionOptions {
1648
+ sessionId?: string;
1649
+ customInstructions?: CustomInstruction[];
1650
+ privacyMode?: PrivacyMode;
1651
+ }
package/src/projects.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { FileOverride, EnvironmentVariable, LaunchServerState, LaunchServerStatus, BranchBackup, CommitMode } from "./codegen";
1
+ import type { FileOverride, EnvironmentVariable, LaunchServerState, LaunchServerStatus, BranchBackup, CommitMode, CustomInstruction, CustomAgentDefinition } from "./codegen";
2
2
  /**
3
3
  * Temporary type for date fields during migration.
4
4
  * Handles both old (string) and new (number) formats.
@@ -283,12 +283,14 @@ export interface PartialBranchData {
283
283
  commitMode?: CommitMode;
284
284
  useHomeDir?: boolean;
285
285
  checkoutBranch?: string | null;
286
+ /** Whether this branch is for a fork PR - affects git operations (read-only, can't push) */
287
+ isFork?: boolean | null;
286
288
  cloneFrom?: {
287
289
  projectId: string;
288
290
  branchName: string;
289
291
  };
290
292
  }
291
- export type EntityState = "active" | "deleted";
293
+ export type EntityState = "active" | "deleted" | "archived";
292
294
  /**
293
295
  * Metadata stored in branches for integration tracking and PR description generation.
294
296
  * This type documents the integration context that can be attached to a branch.
@@ -330,6 +332,7 @@ interface BranchSharedData {
330
332
  lastServerStateDate?: number | null;
331
333
  lastServerVersion?: string | null;
332
334
  name?: string;
335
+ agentType?: string | null;
333
336
  createdBy?: string;
334
337
  isPublic?: boolean;
335
338
  isDefault?: boolean;
@@ -357,6 +360,8 @@ interface BranchSharedData {
357
360
  kubePvcName?: string | null;
358
361
  kubeHostname?: string | null;
359
362
  checkoutBranch?: string | null;
363
+ /** Whether this branch is for a fork PR - affects git operations (read-only, can't push) */
364
+ isFork?: boolean | null;
360
365
  vscodeTunnelUrl?: string | null;
361
366
  vscodeTunnelName?: string | null;
362
367
  vscodeTunnelExpiresAt?: string | null;
@@ -477,6 +482,8 @@ export interface Project {
477
482
  includePatterns?: string[];
478
483
  environmentVariables?: EnvironmentVariable[];
479
484
  fileOverrides?: FileOverride[];
485
+ customInstructions?: CustomInstruction[];
486
+ customAgents?: CustomAgentDefinition[];
480
487
  commitMode?: CommitMode;
481
488
  defaultBranchType?: "shared" | "private";
482
489
  dockerImagePath?: string;
@@ -553,8 +560,13 @@ export declare const getBranchState: (branch: Branch) => EntityState;
553
560
  export declare const getProjectState: (project: Project) => EntityState;
554
561
  /**
555
562
  * Check if a branch is deleted, supporting both `state` and legacy `deleted` fields.
563
+ * Note: Archived branches are NOT considered deleted.
556
564
  */
557
565
  export declare const isBranchDeleted: (branch: Branch) => boolean;
566
+ /**
567
+ * Check if a branch is archived.
568
+ */
569
+ export declare const isBranchArchived: (branch: Branch) => boolean;
558
570
  /**
559
571
  * Check if a project is deleted, supporting both `state` and legacy `deleted` fields.
560
572
  */
package/src/projects.js CHANGED
@@ -30,10 +30,17 @@ export const getProjectState = (project) => {
30
30
  };
31
31
  /**
32
32
  * Check if a branch is deleted, supporting both `state` and legacy `deleted` fields.
33
+ * Note: Archived branches are NOT considered deleted.
33
34
  */
34
35
  export const isBranchDeleted = (branch) => {
35
36
  return getBranchState(branch) === "deleted";
36
37
  };
38
+ /**
39
+ * Check if a branch is archived.
40
+ */
41
+ export const isBranchArchived = (branch) => {
42
+ return getBranchState(branch) === "archived";
43
+ };
37
44
  /**
38
45
  * Check if a project is deleted, supporting both `state` and legacy `deleted` fields.
39
46
  */