@builder.io/ai-utils 0.17.1 → 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.1",
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;
@@ -1251,6 +1252,12 @@ export interface FusionConfig {
1251
1252
  * These are merged with filesystem-discovered agents.
1252
1253
  */
1253
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;
1254
1261
  /**
1255
1262
  * Array of regex patterns to ignore when checking for client-side errors.
1256
1263
  * Errors matching these patterns will not show the error popup.
@@ -1637,3 +1644,8 @@ export interface SystemReminderObj {
1637
1644
  ephemeral?: boolean;
1638
1645
  }
1639
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.
@@ -290,7 +290,7 @@ export interface PartialBranchData {
290
290
  branchName: string;
291
291
  };
292
292
  }
293
- export type EntityState = "active" | "deleted";
293
+ export type EntityState = "active" | "deleted" | "archived";
294
294
  /**
295
295
  * Metadata stored in branches for integration tracking and PR description generation.
296
296
  * This type documents the integration context that can be attached to a branch.
@@ -332,6 +332,7 @@ interface BranchSharedData {
332
332
  lastServerStateDate?: number | null;
333
333
  lastServerVersion?: string | null;
334
334
  name?: string;
335
+ agentType?: string | null;
335
336
  createdBy?: string;
336
337
  isPublic?: boolean;
337
338
  isDefault?: boolean;
@@ -481,6 +482,8 @@ export interface Project {
481
482
  includePatterns?: string[];
482
483
  environmentVariables?: EnvironmentVariable[];
483
484
  fileOverrides?: FileOverride[];
485
+ customInstructions?: CustomInstruction[];
486
+ customAgents?: CustomAgentDefinition[];
484
487
  commitMode?: CommitMode;
485
488
  defaultBranchType?: "shared" | "private";
486
489
  dockerImagePath?: string;
@@ -557,8 +560,13 @@ export declare const getBranchState: (branch: Branch) => EntityState;
557
560
  export declare const getProjectState: (project: Project) => EntityState;
558
561
  /**
559
562
  * Check if a branch is deleted, supporting both `state` and legacy `deleted` fields.
563
+ * Note: Archived branches are NOT considered deleted.
560
564
  */
561
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;
562
570
  /**
563
571
  * Check if a project is deleted, supporting both `state` and legacy `deleted` fields.
564
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
  */