@builder.io/ai-utils 0.33.1 → 0.35.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.33.1",
3
+ "version": "0.35.0",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -1713,7 +1713,11 @@ export interface FusionConfig {
1713
1713
  proxyDefaultOrigin?: string;
1714
1714
  setupDependencies?: SetupDependency[];
1715
1715
  projectId?: string;
1716
+ /** Human-readable project name (e.g. "My App") */
1717
+ projectName?: string;
1716
1718
  branchName?: string;
1719
+ /** Human-readable branch name, AI-generated or user-set (e.g. "Add dark mode") */
1720
+ branchFriendlyName?: string;
1717
1721
  sessionId?: string;
1718
1722
  browserAutomationInstructions?: string;
1719
1723
  /** Whether this branch is for a code review - affects enabled agents and tools */
@@ -4,6 +4,7 @@ export const BUILDER_TARGETS = {
4
4
  "api.builder.io": "https://api.builder.io/codegen/health",
5
5
  "cdn.builder.io": "https://cdn.builder.io/api/v1/image/assets/TEMP/75a212ab82b6175c9862b125e0e23db8d369a58a?width=100",
6
6
  "builderio.xyz": "https://builderio.xyz/health",
7
+ "health.builderio.xyz": "https://health.builderio.xyz/health",
7
8
  "fly.dev": "https://fly.dev",
8
9
  };
9
10
  export const DEFAULT_PORTS = {
@@ -1,5 +1,5 @@
1
1
  export type Source = "local" | "cloud" | "static-ip";
2
- export type TestId = "builder.io" | "builder.codes" | "api.builder.io" | "cdn.builder.io" | "builderio.xyz" | "fly.dev" | "git-host:http" | "git-host:dns" | "git-host:tcp" | "git-host:tls" | "git-host:ssh";
2
+ export type TestId = "builder.io" | "builder.codes" | "api.builder.io" | "cdn.builder.io" | "builderio.xyz" | "health.builderio.xyz" | "fly.dev" | "git-host:http" | "git-host:dns" | "git-host:tcp" | "git-host:tls" | "git-host:ssh";
3
3
  export interface Test {
4
4
  source: Source;
5
5
  testId: TestId;
package/src/events.d.ts CHANGED
@@ -544,6 +544,13 @@ export type ClawMessageSentV1 = FusionEventVariant<"claw.message.sent", {
544
544
  messageContext?: string;
545
545
  /** File attachments (images, PDFs, etc.) to include with the message. */
546
546
  attachments?: FileUpload[];
547
+ /**
548
+ * When true, automatically create the org agent project if it doesn't exist.
549
+ * Set to true for human-initiated flows (Slack, Telegram, inbox).
550
+ * Set to false for system/worker flows that should not trigger project creation.
551
+ * Defaults to false.
552
+ */
553
+ autoCreateProject?: boolean;
547
554
  }, {}, 1>;
548
555
  export declare const ClawMessageSentV1: {
549
556
  eventName: "claw.message.sent";
@@ -591,6 +598,13 @@ export declare const CodegenUserPromptV1: {
591
598
  eventName: "codegen.user.prompt";
592
599
  version: "1";
593
600
  };
601
+ export type GitWebhooksRegisterV1 = FusionEventVariant<"git.webhooks.register", {
602
+ projectId: string;
603
+ }, {}, 1>;
604
+ export declare const GitWebhooksRegisterV1: {
605
+ eventName: "git.webhooks.register";
606
+ version: "1";
607
+ };
594
608
  export interface SendMessageToOrgAgentInput {
595
609
  agentBranchName?: string;
596
610
  agentProjectId?: string;
@@ -603,8 +617,15 @@ export interface SendMessageToOrgAgentInput {
603
617
  dmId?: string;
604
618
  userSource?: UserSource;
605
619
  attachments?: FileUpload[];
620
+ /**
621
+ * When true, automatically create the org agent project if it doesn't exist.
622
+ * Set to true for human-initiated flows (Slack, Telegram, inbox).
623
+ * Set to false for system/worker flows that should not trigger project creation.
624
+ * Defaults to false.
625
+ */
626
+ autoCreateProject?: boolean;
606
627
  }
607
- export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent | GitPrCreatedEvent | ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1;
628
+ export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent | GitPrCreatedEvent | ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1;
608
629
  export interface ModelPermissionRequiredEvent {
609
630
  type: "assistant.model.permission.required";
610
631
  data: {
package/src/events.js CHANGED
@@ -42,3 +42,7 @@ export const CodegenUserPromptV1 = {
42
42
  eventName: "codegen.user.prompt",
43
43
  version: "1",
44
44
  };
45
+ export const GitWebhooksRegisterV1 = {
46
+ eventName: "git.webhooks.register",
47
+ version: "1",
48
+ };
package/src/messages.d.ts CHANGED
@@ -154,6 +154,7 @@ export interface ContentMessageItemServerToolUse {
154
154
  id: string;
155
155
  name: "web_search" | "code_execution" | "web_fetch" | "bash_code_execution" | "text_editor_code_execution" | "tool_search_tool_regex" | "tool_search_tool_bm25";
156
156
  input: unknown;
157
+ caller?: any;
157
158
  completion?: string;
158
159
  content?: any;
159
160
  cache?: boolean;
@@ -177,6 +178,7 @@ export interface ContentMessageItemWebSearchToolResult {
177
178
  content: ServerToolUseContent[] | ServerToolUseContentError;
178
179
  tool_use_id: string;
179
180
  type: "web_search_tool_result";
181
+ caller?: any;
180
182
  cache?: boolean;
181
183
  }
182
184
  export interface ContentMessageItemMCPToolUse {
package/src/projects.d.ts CHANGED
@@ -363,6 +363,8 @@ export interface PartialBranchData {
363
363
  isFork?: boolean | null;
364
364
  /** Whether this branch is for a code review - affects enabled agents and tools*/
365
365
  type?: BranchType | null;
366
+ /** Auto-assigned category based on the user prompt (feature, fix, research, other) */
367
+ category?: BranchCategory | null;
366
368
  cloneFrom?: {
367
369
  projectId: string;
368
370
  branchName: string;
@@ -420,6 +422,8 @@ export interface OrgAgentConfig {
420
422
  longLived: boolean;
421
423
  }
422
424
  export type BranchType = "code-review" | "setup-project" | "org-agent" | "default";
425
+ /** Category of work a branch represents, auto-assigned during prompt analysis. */
426
+ export type BranchCategory = "feature" | "fix" | "research" | "other";
423
427
  export interface BranchSharedData {
424
428
  appName?: string | null;
425
429
  prNumber?: number | null;
@@ -489,6 +493,8 @@ export interface BranchSharedData {
489
493
  screenshots?: Record<string, string>;
490
494
  /** Whether this branch is for a code review - affects enabled agents and tools */
491
495
  type?: BranchType | null;
496
+ /** Auto-assigned category based on the user prompt (feature, fix, research, other) */
497
+ category?: BranchCategory | null;
492
498
  agentType?: AgentType | null;
493
499
  /** ID of the last PR review — doubles as the vcpCodeGenEvents completion ID for feedback */
494
500
  lastReviewId?: string | null;
@@ -808,6 +814,7 @@ export interface SettingUpContainerMessage extends BaseCreateBranchMessage {
808
814
  branchName: string;
809
815
  branchFriendlyName: string | undefined;
810
816
  branchDescription: string | undefined;
817
+ branchCategory: BranchCategory | undefined;
811
818
  }
812
819
  export interface ContainerReadyMessage extends BaseCreateBranchMessage {
813
820
  type: "container-ready";