@builder.io/ai-utils 0.34.0 → 0.36.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 +1 -1
- package/src/codegen.d.ts +2 -0
- package/src/connectivity/targets.js +1 -0
- package/src/connectivity/types.d.ts +1 -1
- package/src/events.d.ts +26 -1
- package/src/events.js +4 -0
- package/src/messages.d.ts +2 -0
- package/src/projects.d.ts +1 -0
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -2054,6 +2054,8 @@ export interface CodegenApiTerminal {
|
|
|
2054
2054
|
readonly: boolean;
|
|
2055
2055
|
builtIn: boolean;
|
|
2056
2056
|
state: "starting" | "running" | "exited" | "error";
|
|
2057
|
+
/** Whether this terminal has stale environment variables and should be restarted */
|
|
2058
|
+
stale?: boolean;
|
|
2057
2059
|
exitCode: number | undefined;
|
|
2058
2060
|
initialCommand?: string;
|
|
2059
2061
|
}
|
|
@@ -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
|
@@ -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";
|
|
@@ -544,6 +548,13 @@ export type ClawMessageSentV1 = FusionEventVariant<"claw.message.sent", {
|
|
|
544
548
|
messageContext?: string;
|
|
545
549
|
/** File attachments (images, PDFs, etc.) to include with the message. */
|
|
546
550
|
attachments?: FileUpload[];
|
|
551
|
+
/**
|
|
552
|
+
* When true, automatically create the org agent project if it doesn't exist.
|
|
553
|
+
* Set to true for human-initiated flows (Slack, Telegram, inbox).
|
|
554
|
+
* Set to false for system/worker flows that should not trigger project creation.
|
|
555
|
+
* Defaults to false.
|
|
556
|
+
*/
|
|
557
|
+
autoCreateProject?: boolean;
|
|
547
558
|
}, {}, 1>;
|
|
548
559
|
export declare const ClawMessageSentV1: {
|
|
549
560
|
eventName: "claw.message.sent";
|
|
@@ -591,6 +602,13 @@ export declare const CodegenUserPromptV1: {
|
|
|
591
602
|
eventName: "codegen.user.prompt";
|
|
592
603
|
version: "1";
|
|
593
604
|
};
|
|
605
|
+
export type GitWebhooksRegisterV1 = FusionEventVariant<"git.webhooks.register", {
|
|
606
|
+
projectId: string;
|
|
607
|
+
}, {}, 1>;
|
|
608
|
+
export declare const GitWebhooksRegisterV1: {
|
|
609
|
+
eventName: "git.webhooks.register";
|
|
610
|
+
version: "1";
|
|
611
|
+
};
|
|
594
612
|
export interface SendMessageToOrgAgentInput {
|
|
595
613
|
agentBranchName?: string;
|
|
596
614
|
agentProjectId?: string;
|
|
@@ -603,8 +621,15 @@ export interface SendMessageToOrgAgentInput {
|
|
|
603
621
|
dmId?: string;
|
|
604
622
|
userSource?: UserSource;
|
|
605
623
|
attachments?: FileUpload[];
|
|
624
|
+
/**
|
|
625
|
+
* When true, automatically create the org agent project if it doesn't exist.
|
|
626
|
+
* Set to true for human-initiated flows (Slack, Telegram, inbox).
|
|
627
|
+
* Set to false for system/worker flows that should not trigger project creation.
|
|
628
|
+
* Defaults to false.
|
|
629
|
+
*/
|
|
630
|
+
autoCreateProject?: boolean;
|
|
606
631
|
}
|
|
607
|
-
export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent | GitPrCreatedEvent | ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1;
|
|
632
|
+
export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent | GitPrCreatedEvent | ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1;
|
|
608
633
|
export interface ModelPermissionRequiredEvent {
|
|
609
634
|
type: "assistant.model.permission.required";
|
|
610
635
|
data: {
|
package/src/events.js
CHANGED
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
|
@@ -489,6 +489,7 @@ export interface BranchSharedData {
|
|
|
489
489
|
/** Whether the branch has unpushed changes (ahead > 0 or dirty working directory) */
|
|
490
490
|
hasUnpushedChanges?: boolean;
|
|
491
491
|
screenshot?: string | null;
|
|
492
|
+
agentState?: "running" | "waiting" | "idle";
|
|
492
493
|
/** Screenshots indexed by normalized href (without query params, fragments, protocol) */
|
|
493
494
|
screenshots?: Record<string, string>;
|
|
494
495
|
/** Whether this branch is for a code review - affects enabled agents and tools */
|