@builder.io/ai-utils 0.44.5 → 0.44.6
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 -1
- package/src/codegen.js +17 -1
- package/src/events.d.ts +3 -21
- package/src/events.js +0 -8
- package/src/messages.d.ts +2 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -747,7 +747,8 @@ export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
|
747
747
|
export type SessionMode = "planning" | "normal" | "auto-planning" | "deep-research";
|
|
748
748
|
export type CodeGenMode = "quality" | "quality-v3" | "quality-v4" | "quality-v4-agent";
|
|
749
749
|
export type QueueMode = "next-turn" | "until-idle";
|
|
750
|
-
export
|
|
750
|
+
export declare const BASE_CODEGEN_POSITIONS: readonly ["fusion", "editor-ai", "repo-indexing", "cli", "create-app-firebase", "create-app-lovable", "builder-code-panel", "setup-project", "code-review-orchestrator", "project-configuration", "org-agent", "browser-testing", "projects-scheduler-memory-extraction", "unknown", "dsi-mcp"];
|
|
751
|
+
export type BaseCodeGenPosition = (typeof BASE_CODEGEN_POSITIONS)[number];
|
|
751
752
|
export type CodeGenPosition = BaseCodeGenPosition | `${BaseCodeGenPosition}-agent`;
|
|
752
753
|
export interface RepoIndexingConfig {
|
|
753
754
|
designSystems: string[];
|
package/src/codegen.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const BASE_CODEGEN_POSITIONS = [
|
|
2
|
+
"fusion",
|
|
3
|
+
"editor-ai",
|
|
4
|
+
"repo-indexing",
|
|
5
|
+
"cli",
|
|
6
|
+
"create-app-firebase",
|
|
7
|
+
"create-app-lovable",
|
|
8
|
+
"builder-code-panel",
|
|
9
|
+
"setup-project",
|
|
10
|
+
"code-review-orchestrator",
|
|
11
|
+
"project-configuration",
|
|
12
|
+
"org-agent",
|
|
13
|
+
"browser-testing",
|
|
14
|
+
"projects-scheduler-memory-extraction",
|
|
15
|
+
"unknown",
|
|
16
|
+
"dsi-mcp",
|
|
17
|
+
];
|
package/src/events.d.ts
CHANGED
|
@@ -395,6 +395,8 @@ export interface ThreadMessageCompleted extends AssistantMessage {
|
|
|
395
395
|
platformId: string;
|
|
396
396
|
threadId: string;
|
|
397
397
|
commitId?: string;
|
|
398
|
+
creditsUsed?: number;
|
|
399
|
+
model?: string;
|
|
398
400
|
}
|
|
399
401
|
export interface ThreadRunStepDeltaEvent {
|
|
400
402
|
type: "assistant.thread.run.step.delta";
|
|
@@ -452,26 +454,6 @@ export type FusionEventVariant<EventName extends string, ExtraData extends Recor
|
|
|
452
454
|
eventName: EventName;
|
|
453
455
|
};
|
|
454
456
|
};
|
|
455
|
-
export type AiTaskCompletedEvent = FusionEventVariant<"ai.task.completed", {
|
|
456
|
-
durationMs?: number;
|
|
457
|
-
success: boolean;
|
|
458
|
-
}, {
|
|
459
|
-
taskId: string;
|
|
460
|
-
}, 1>;
|
|
461
|
-
export declare const AiTaskCompletedEvent: {
|
|
462
|
-
eventName: "ai.task.completed";
|
|
463
|
-
version: "1";
|
|
464
|
-
};
|
|
465
|
-
export type AiTaskFailedEvent = FusionEventVariant<"ai.task.failed", {
|
|
466
|
-
durationMs?: number;
|
|
467
|
-
error: string;
|
|
468
|
-
}, {
|
|
469
|
-
taskId: string;
|
|
470
|
-
}, 1>;
|
|
471
|
-
export declare const AiTaskFailedEvent: {
|
|
472
|
-
eventName: "ai.task.failed";
|
|
473
|
-
version: "1";
|
|
474
|
-
};
|
|
475
457
|
export type GitPrCreatedV1 = FusionEventVariant<"git.pr.created", {
|
|
476
458
|
projectId: string;
|
|
477
459
|
branchName: string;
|
|
@@ -867,7 +849,7 @@ export declare const ClientDevtoolsToolResultV1: {
|
|
|
867
849
|
eventName: "client.devtools.tool.result";
|
|
868
850
|
version: "1";
|
|
869
851
|
};
|
|
870
|
-
export type FusionEvent =
|
|
852
|
+
export type FusionEvent = ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | ClientDevtoolsToolCallRequestV1 | ClientDevtoolsToolCallV1 | ClientDevtoolsToolResultV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | FusionBranchCreatedV1 | FusionContainerStartedV1 | FusionContainerFailedV1 | FusionBranchFailedV1 | BotMentionExternalPrV1 | ReviewSubmittedV1 | PrReviewRequestedV1;
|
|
871
853
|
export interface ModelPermissionRequiredEvent {
|
|
872
854
|
type: "assistant.model.permission.required";
|
|
873
855
|
data: {
|
package/src/events.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export const AiTaskCompletedEvent = {
|
|
2
|
-
eventName: "ai.task.completed",
|
|
3
|
-
version: "1",
|
|
4
|
-
};
|
|
5
|
-
export const AiTaskFailedEvent = {
|
|
6
|
-
eventName: "ai.task.failed",
|
|
7
|
-
version: "1",
|
|
8
|
-
};
|
|
9
1
|
export const GitPrCreatedV1 = {
|
|
10
2
|
eventName: "git.pr.created",
|
|
11
3
|
version: "1",
|
package/src/messages.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ export interface UserMessageParam {
|
|
|
224
224
|
/**
|
|
225
225
|
* The contents of the user message.
|
|
226
226
|
*/
|
|
227
|
-
content: string |
|
|
227
|
+
content: string | ContentUserMessageItem[];
|
|
228
228
|
responseId?: string;
|
|
229
229
|
/**
|
|
230
230
|
* The role of the messages author, in this case `user`.
|
|
@@ -232,6 +232,7 @@ export interface UserMessageParam {
|
|
|
232
232
|
role: "user";
|
|
233
233
|
id?: string;
|
|
234
234
|
}
|
|
235
|
+
export type ContentUserMessageItem = ContentMessageItemText | ContentMessageItemImage | ContentMessageItemDocument | ContentMessageItemVideo | ContentMessageItemToolResult;
|
|
235
236
|
export type AssistantMessageAction = "new-chat";
|
|
236
237
|
export interface AssistantMessageParam {
|
|
237
238
|
/**
|