@builder.io/ai-utils 0.50.0 → 0.50.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 +1 -1
- package/src/codegen.d.ts +41 -3
- package/src/events.d.ts +5 -2
- package/src/messages.d.ts +13 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -96,6 +96,11 @@ export interface GrepSearchToolInput {
|
|
|
96
96
|
exclude_glob?: string | null;
|
|
97
97
|
case_sensitive?: boolean | null;
|
|
98
98
|
}
|
|
99
|
+
export interface SkillToolInput {
|
|
100
|
+
skill: string;
|
|
101
|
+
/** Optional invocation arguments; forwarded with the skill body in the tool result. */
|
|
102
|
+
args?: string | null;
|
|
103
|
+
}
|
|
99
104
|
export interface GetRuleToolInput {
|
|
100
105
|
name: string;
|
|
101
106
|
}
|
|
@@ -222,6 +227,24 @@ export interface TodoWriteToolInput {
|
|
|
222
227
|
id: string;
|
|
223
228
|
}[];
|
|
224
229
|
}
|
|
230
|
+
export type TaskStatus = "pending" | "in_progress" | "completed";
|
|
231
|
+
export interface TaskCreateToolInput {
|
|
232
|
+
subject: string;
|
|
233
|
+
description: string;
|
|
234
|
+
metadata?: Record<string, unknown>;
|
|
235
|
+
}
|
|
236
|
+
export interface TaskUpdateToolInput {
|
|
237
|
+
taskId: string;
|
|
238
|
+
subject?: string;
|
|
239
|
+
description?: string;
|
|
240
|
+
status?: TaskStatus | "deleted";
|
|
241
|
+
owner?: string;
|
|
242
|
+
addBlocks?: string[];
|
|
243
|
+
addBlockedBy?: string[];
|
|
244
|
+
metadata?: Record<string, unknown>;
|
|
245
|
+
}
|
|
246
|
+
export interface TaskListToolInput {
|
|
247
|
+
}
|
|
225
248
|
export interface BuilderEditToolInput {
|
|
226
249
|
filePath: string;
|
|
227
250
|
old_str: string;
|
|
@@ -447,6 +470,7 @@ export interface ExitToolInput {
|
|
|
447
470
|
setupNeedsCredentials?: boolean;
|
|
448
471
|
devServerNeedsCredentials?: boolean;
|
|
449
472
|
needsVPN?: boolean;
|
|
473
|
+
autoReload?: boolean;
|
|
450
474
|
/** A human-readable description of what the project is about (not tech specs), used by fusion to route requests to the right project */
|
|
451
475
|
projectDescription?: string;
|
|
452
476
|
}
|
|
@@ -544,6 +568,7 @@ export interface ProposedConfig {
|
|
|
544
568
|
cost?: number;
|
|
545
569
|
durationMs?: number;
|
|
546
570
|
needsVPN?: boolean;
|
|
571
|
+
autoReload?: boolean;
|
|
547
572
|
}
|
|
548
573
|
/**
|
|
549
574
|
* Parameters for proposing a configuration to the backend
|
|
@@ -576,6 +601,7 @@ export interface ProposeConfigParams {
|
|
|
576
601
|
devServerNeedsCredentials?: boolean;
|
|
577
602
|
needsVPN?: boolean;
|
|
578
603
|
projectDescription?: string;
|
|
604
|
+
autoReload?: boolean;
|
|
579
605
|
}
|
|
580
606
|
export interface VerifySetupCommandToolInput {
|
|
581
607
|
command: string;
|
|
@@ -650,6 +676,7 @@ export interface ArchiveBranchToolInput {
|
|
|
650
676
|
builder_user_id: string;
|
|
651
677
|
reason?: string;
|
|
652
678
|
}
|
|
679
|
+
export type ReviewSeverity = "high" | "medium" | "low";
|
|
653
680
|
/** Comment for PR review - used by SubmitPRReview */
|
|
654
681
|
export interface PRReviewComment {
|
|
655
682
|
file_path: string;
|
|
@@ -657,15 +684,17 @@ export interface PRReviewComment {
|
|
|
657
684
|
start_line?: number;
|
|
658
685
|
title: string;
|
|
659
686
|
body: string;
|
|
660
|
-
severity:
|
|
687
|
+
severity: ReviewSeverity;
|
|
661
688
|
debugInfo?: string;
|
|
662
689
|
gif_id?: string;
|
|
663
690
|
}
|
|
691
|
+
export type ReviewVerdict = "looks_good" | "has_findings" | "blocking";
|
|
664
692
|
/** SubmitPRReview - Fast code review without recording */
|
|
665
693
|
export interface SubmitPRReviewToolInput {
|
|
666
694
|
summary: string;
|
|
667
695
|
comments?: PRReviewComment[];
|
|
668
|
-
risk_level?:
|
|
696
|
+
risk_level?: ReviewSeverity;
|
|
697
|
+
verdict?: ReviewVerdict;
|
|
669
698
|
}
|
|
670
699
|
export interface ResolveQACommentsToolInput {
|
|
671
700
|
thread_node_ids: string[];
|
|
@@ -680,7 +709,7 @@ export interface ReportIssueToolInput {
|
|
|
680
709
|
line: number;
|
|
681
710
|
start_line?: number;
|
|
682
711
|
title: string;
|
|
683
|
-
severity:
|
|
712
|
+
severity: ReviewSeverity;
|
|
684
713
|
body: string;
|
|
685
714
|
}
|
|
686
715
|
export interface CodeGenToolMap {
|
|
@@ -701,6 +730,7 @@ export interface CodeGenToolMap {
|
|
|
701
730
|
Write: WriteFileInput;
|
|
702
731
|
Edit: SearchReplaceInput;
|
|
703
732
|
ReadRule: GetRuleToolInput;
|
|
733
|
+
Skill: SkillToolInput;
|
|
704
734
|
GetStyleInspiration: GetStyleInspirationToolInput;
|
|
705
735
|
GetScreenshot: GetScreenshotToolInput;
|
|
706
736
|
NavigatePreview: NavigatePreviewToolInput;
|
|
@@ -723,6 +753,9 @@ export interface CodeGenToolMap {
|
|
|
723
753
|
Revert: RevertToolInput;
|
|
724
754
|
TodoRead: TodoReadToolInput;
|
|
725
755
|
TodoWrite: TodoWriteToolInput;
|
|
756
|
+
TaskCreate: TaskCreateToolInput;
|
|
757
|
+
TaskUpdate: TaskUpdateToolInput;
|
|
758
|
+
TaskList: TaskListToolInput;
|
|
726
759
|
BuilderEdit: BuilderEditToolInput;
|
|
727
760
|
WebFetch: WebFetchToolInput;
|
|
728
761
|
ExplorationMetadata: ExplorationMetadataToolInput;
|
|
@@ -2440,6 +2473,11 @@ export interface TodoItem {
|
|
|
2440
2473
|
content: string;
|
|
2441
2474
|
status: "pending" | "in_progress" | "completed";
|
|
2442
2475
|
id: string;
|
|
2476
|
+
description?: string;
|
|
2477
|
+
owner?: string;
|
|
2478
|
+
blocks?: string[];
|
|
2479
|
+
blockedBy?: string[];
|
|
2480
|
+
metadata?: Record<string, unknown>;
|
|
2443
2481
|
}
|
|
2444
2482
|
export interface SessionData {
|
|
2445
2483
|
lastCompletionId: string | undefined;
|
package/src/events.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BuilderContent, BuilderElement } from "@builder.io/sdk";
|
|
2
2
|
import type { AssistantMessage, AssistantMessageAction } from "./messages.js";
|
|
3
3
|
import type { AssistantSettings } from "./settings.js";
|
|
4
|
-
import type { ExitState, UserSource, CodeGenPosition } from "./codegen.js";
|
|
4
|
+
import type { ExitState, UserSource, CodeGenPosition, ReviewSeverity, ReviewVerdict } from "./codegen.js";
|
|
5
5
|
import type { FileUpload } from "./messages.js";
|
|
6
6
|
export type BuilderAssistantEventHandler = (ev: BuilderAssistantEvent) => void;
|
|
7
7
|
export type BuilderAssistantEvent = AssistantCompletionResultEvent | AssistantErrorEvent | AssistantStreamErrorEvent | AppCloseEvent | AppMessagesClickEvent | AppMessagesGenerationEvent | AppMessageEditCustomInstructionsEvent | AppPromptAbortEvent | AppPromptFocusEvent | AppPromptSubmitEvent | AppReadyEvent | AppSettingsSetEvent | AppThreadNewEvent | AssistantStatsEvent | AssistantThemeEvent | BuilderEditorAuthEvent | BuilderEditorStateEvent | ContentUpdateEvent | ContentApplySnapshotEvent | ModelUndoEvent | ModelRedoEvent | ResultEvent | ThreadCreatedEvent | ThreadMessageCompletedEvent | ThreadMessageCreatedEvent | ThreadMessageDeltaEvent | ThreadMessageFeedbackEvent | ThreadRunStepCreatedEvent | ThreadRunStepDeltaEvent | AppAcceptChangeEvent | AppAcceptRejectEvent | AssistantTrackEvent | AssistantEditorAuthMessage | AppAttachmentTemplateEvent | AppPasteSmartExportEvent | ThreadMessageRetryEvent | AppFigmaImportEvent | AppWebImportEvent | AppMcpServersEvent | AssistantContentInitialEvent | ThreadMessageSummaryEvent | ThreadMessageSummaryCodegenDeltaEvent | ThreadMessageThinkingDeltaEvent | AssistantHeartbeatEvent | ShowUpgradeDialogEvent | AssistantFusionSuggestionEvent | AppNavigateToFusionEvent | ModelPermissionRequiredEvent | ModelPermissionResponseEvent;
|
|
@@ -514,7 +514,10 @@ export type ReviewSubmittedV1 = FusionEventVariant<"review.submitted", {
|
|
|
514
514
|
start_line?: number | null;
|
|
515
515
|
body: string;
|
|
516
516
|
}>;
|
|
517
|
-
riskLevel:
|
|
517
|
+
riskLevel: ReviewSeverity;
|
|
518
|
+
verdict?: ReviewVerdict;
|
|
519
|
+
verdictOverridden?: boolean;
|
|
520
|
+
modelVerdict?: ReviewVerdict;
|
|
518
521
|
totalIssuesSubmitted: number;
|
|
519
522
|
issuesPosted: number;
|
|
520
523
|
issuesHigh: number;
|
package/src/messages.d.ts
CHANGED
|
@@ -206,7 +206,19 @@ export interface ContentMessageItemCodeExecutionToolResult {
|
|
|
206
206
|
content: any;
|
|
207
207
|
cache?: boolean;
|
|
208
208
|
}
|
|
209
|
-
export
|
|
209
|
+
export interface ContentMessageItemToolSearchToolResult {
|
|
210
|
+
type: "tool_search_tool_result";
|
|
211
|
+
tool_use_id: string;
|
|
212
|
+
content: {
|
|
213
|
+
type: "tool_search_tool_search_result";
|
|
214
|
+
tool_references: {
|
|
215
|
+
type: "tool_reference";
|
|
216
|
+
tool_name: string;
|
|
217
|
+
}[];
|
|
218
|
+
};
|
|
219
|
+
cache?: boolean;
|
|
220
|
+
}
|
|
221
|
+
export type ContentMessageItem = ContentMessageItemText | ContentMessageItemImage | ContentMessageItemResource | ContentMessageItemDocument | ContentMessageItemVideo | ContentMessageItemThinking | ContentMessageItemRedactedThinking | ContentMessageItemToolUse | ContentMessageItemToolResult | ContentMessageItemWebSearchToolResult | ContentMessageItemServerToolUse | ContentMessageItemMCPToolUse | ContentMessageItemMCPToolResult | ContentMessageItemContainerUpload | ContentMessageItemCodeExecutionToolResult | ContentMessageItemToolSearchToolResult;
|
|
210
222
|
export type ContentMessage = ContentMessageItem[];
|
|
211
223
|
export interface SystemMessageParam {
|
|
212
224
|
/**
|