@builder.io/ai-utils 0.41.1 → 0.43.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 +30 -0
- package/src/events.d.ts +81 -9
- package/src/events.js +20 -4
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/organization.d.ts +6 -0
- package/src/projects.d.ts +3 -0
- package/src/vpc-peering.d.ts +24 -0
- package/src/vpc-peering.js +1 -0
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export interface CustomAgentDefinition {
|
|
|
57
57
|
mcpServers?: boolean;
|
|
58
58
|
asyncSubAgents?: boolean;
|
|
59
59
|
queueMode?: QueueMode;
|
|
60
|
+
softContextWindow?: number;
|
|
60
61
|
filePath?: string;
|
|
61
62
|
/** Default reasoning effort level for this agent type. Overrides the session default. */
|
|
62
63
|
reasoning?: ReasoningEffort;
|
|
@@ -264,6 +265,25 @@ export interface ReportTestOutcomeToolInput {
|
|
|
264
265
|
outcome: TestOutcome;
|
|
265
266
|
summary: string;
|
|
266
267
|
details?: string;
|
|
268
|
+
test_case_id?: string;
|
|
269
|
+
evidence_frame_count?: number;
|
|
270
|
+
failure_category?: TestCaseFailureCategory;
|
|
271
|
+
failure_detail?: string;
|
|
272
|
+
console_errors?: string;
|
|
273
|
+
network_failures?: string;
|
|
274
|
+
steps_attempted?: string;
|
|
275
|
+
urls_tested?: string[];
|
|
276
|
+
}
|
|
277
|
+
export type TestCaseFailureCategory = "env_issue" | "creds_missing" | "needs_user_input" | "server_not_ready" | "feature_not_reachable" | "timeout" | "assertion_failed" | "unexpected_error" | "not_applicable";
|
|
278
|
+
export interface RegisterTestPlanToolInput {
|
|
279
|
+
mode: "quick" | "thorough";
|
|
280
|
+
test_cases: Array<{
|
|
281
|
+
id: string;
|
|
282
|
+
description: string;
|
|
283
|
+
expected_outcome: string;
|
|
284
|
+
priority: "critical" | "high" | "medium" | "low";
|
|
285
|
+
source?: string;
|
|
286
|
+
}>;
|
|
267
287
|
}
|
|
268
288
|
export type TimelineEventCategory = "navigation" | "interaction" | "assertion" | "error" | "milestone" | "code-change" | "observation";
|
|
269
289
|
export interface TimelineEvent {
|
|
@@ -710,6 +730,7 @@ export interface CodeGenToolMap {
|
|
|
710
730
|
ReportUIIssue: ReportUIIssueToolInput;
|
|
711
731
|
ReportIssue: ReportIssueToolInput;
|
|
712
732
|
ReportTestOutcome: ReportTestOutcomeToolInput;
|
|
733
|
+
RegisterTestPlan: RegisterTestPlanToolInput;
|
|
713
734
|
VerifySetupCommand: VerifySetupCommandToolInput;
|
|
714
735
|
VerifyDevCommand: VerifyDevCommandToolInput;
|
|
715
736
|
VerifyDevServer: VerifyDevServerToolInput;
|
|
@@ -845,6 +866,10 @@ export interface CodeGenInputOptions {
|
|
|
845
866
|
* @internal - Set by middleware, not by clients
|
|
846
867
|
*/
|
|
847
868
|
branchAgentTypeChecked?: boolean;
|
|
869
|
+
/**
|
|
870
|
+
* The parent session ID, used to roll up sub-agent costs into the parent session's extraCost.
|
|
871
|
+
*/
|
|
872
|
+
parentSessionId?: string;
|
|
848
873
|
/** @deprecated */
|
|
849
874
|
prevId?: string;
|
|
850
875
|
/** @deprecated */
|
|
@@ -2340,6 +2365,7 @@ export interface LaunchInitializeSessionOptions {
|
|
|
2340
2365
|
sessionId?: string;
|
|
2341
2366
|
customInstructions?: CustomInstruction[];
|
|
2342
2367
|
privacyMode?: PrivacyMode;
|
|
2368
|
+
forceSessionReload?: boolean;
|
|
2343
2369
|
}
|
|
2344
2370
|
/**
|
|
2345
2371
|
* Request for generating a commit message via LLM
|
|
@@ -2392,6 +2418,10 @@ export interface SessionData {
|
|
|
2392
2418
|
description?: string;
|
|
2393
2419
|
hasPlanToApply?: boolean;
|
|
2394
2420
|
cost: number;
|
|
2421
|
+
/** Cost from tools (e.g. WebSearch LLM calls) and sub-agent roll-ups. Total session cost = cost + extraCost. */
|
|
2422
|
+
extraCost?: number;
|
|
2423
|
+
/** If set, this session is a sub-agent of the given parent session. Used to avoid double-counting in aggregations. */
|
|
2424
|
+
parentSessionId?: string;
|
|
2395
2425
|
totalCompletions: number;
|
|
2396
2426
|
numUserMessages: number;
|
|
2397
2427
|
numNormalUserMessages: number;
|
package/src/events.d.ts
CHANGED
|
@@ -592,6 +592,8 @@ export type ClientDevtoolsSessionIdleEventV1 = FusionEventVariant<"client.devtoo
|
|
|
592
592
|
branchName?: string;
|
|
593
593
|
hasPlanToApply?: boolean;
|
|
594
594
|
sessionMode?: string;
|
|
595
|
+
gifId?: string;
|
|
596
|
+
planContent?: string;
|
|
595
597
|
}, {
|
|
596
598
|
projectId?: string;
|
|
597
599
|
branchName?: string;
|
|
@@ -717,7 +719,8 @@ export type FusionBranchCreatedV1 = FusionEventVariant<"fusion.branch.created",
|
|
|
717
719
|
projectId: string;
|
|
718
720
|
branchName: string;
|
|
719
721
|
branchFriendlyName?: string;
|
|
720
|
-
|
|
722
|
+
createdBy: string;
|
|
723
|
+
actor?: string;
|
|
721
724
|
}, {
|
|
722
725
|
projectId: string;
|
|
723
726
|
branchName: string;
|
|
@@ -726,7 +729,7 @@ export declare const FusionBranchCreatedV1: {
|
|
|
726
729
|
eventName: "fusion.branch.created";
|
|
727
730
|
version: "1";
|
|
728
731
|
};
|
|
729
|
-
export type
|
|
732
|
+
export type FusionContainerStartedV1 = FusionEventVariant<"fusion.container.started", {
|
|
730
733
|
projectId: string;
|
|
731
734
|
branchName: string;
|
|
732
735
|
url: string;
|
|
@@ -734,26 +737,26 @@ export type FusionBranchContainerStartedV1 = FusionEventVariant<"fusion.branch.c
|
|
|
734
737
|
projectId: string;
|
|
735
738
|
branchName: string;
|
|
736
739
|
}, 1>;
|
|
737
|
-
export declare const
|
|
738
|
-
eventName: "fusion.
|
|
740
|
+
export declare const FusionContainerStartedV1: {
|
|
741
|
+
eventName: "fusion.container.started";
|
|
739
742
|
version: "1";
|
|
740
743
|
};
|
|
741
|
-
export type
|
|
744
|
+
export type FusionContainerFailedV1 = FusionEventVariant<"fusion.container.failed", {
|
|
742
745
|
projectId: string;
|
|
743
746
|
branchName: string;
|
|
747
|
+
error: string;
|
|
744
748
|
}, {
|
|
745
749
|
projectId: string;
|
|
746
750
|
branchName: string;
|
|
747
751
|
}, 1>;
|
|
748
|
-
export declare const
|
|
749
|
-
eventName: "fusion.
|
|
752
|
+
export declare const FusionContainerFailedV1: {
|
|
753
|
+
eventName: "fusion.container.failed";
|
|
750
754
|
version: "1";
|
|
751
755
|
};
|
|
752
756
|
export type FusionBranchFailedV1 = FusionEventVariant<"fusion.branch.failed", {
|
|
753
757
|
projectId: string;
|
|
754
758
|
branchName?: string;
|
|
755
759
|
error: string;
|
|
756
|
-
phase: string;
|
|
757
760
|
}, {
|
|
758
761
|
projectId: string;
|
|
759
762
|
branchName?: string;
|
|
@@ -795,7 +798,76 @@ export interface SendMessageToOrgAgentInput {
|
|
|
795
798
|
*/
|
|
796
799
|
autoCreateProject?: boolean;
|
|
797
800
|
}
|
|
798
|
-
export type
|
|
801
|
+
export type PrReviewRequestedV1 = FusionEventVariant<"pr.review.requested", {
|
|
802
|
+
repoFullName: string;
|
|
803
|
+
repoHtmlUrl?: string;
|
|
804
|
+
prNumber: number;
|
|
805
|
+
prTitle: string;
|
|
806
|
+
prDescription: string;
|
|
807
|
+
headRef: string;
|
|
808
|
+
headSha: string;
|
|
809
|
+
isDraft?: boolean;
|
|
810
|
+
forceRun?: boolean;
|
|
811
|
+
triggerSource?: string;
|
|
812
|
+
isSynchronize?: boolean;
|
|
813
|
+
isFork?: boolean;
|
|
814
|
+
forceBrowserTesting?: boolean;
|
|
815
|
+
}, {}, 1>;
|
|
816
|
+
export declare const PrReviewRequestedV1: {
|
|
817
|
+
eventName: "pr.review.requested";
|
|
818
|
+
version: "1";
|
|
819
|
+
};
|
|
820
|
+
export type ClientDevtoolsToolCallRequestV1 = FusionEventVariant<"client.devtools.tool.call-request", {
|
|
821
|
+
toolUseId: string;
|
|
822
|
+
toolName: string;
|
|
823
|
+
input?: unknown;
|
|
824
|
+
sessionId?: string;
|
|
825
|
+
projectId?: string;
|
|
826
|
+
branchName?: string;
|
|
827
|
+
messageValid?: boolean;
|
|
828
|
+
}, {
|
|
829
|
+
toolName: string;
|
|
830
|
+
projectId?: string;
|
|
831
|
+
branchName?: string;
|
|
832
|
+
}, 1>;
|
|
833
|
+
export declare const ClientDevtoolsToolCallRequestV1: {
|
|
834
|
+
eventName: "client.devtools.tool.call-request";
|
|
835
|
+
version: "1";
|
|
836
|
+
};
|
|
837
|
+
export type ClientDevtoolsToolCallV1 = FusionEventVariant<"client.devtools.tool.call", {
|
|
838
|
+
toolUseId: string;
|
|
839
|
+
toolName: string;
|
|
840
|
+
content?: string;
|
|
841
|
+
sessionId?: string;
|
|
842
|
+
projectId?: string;
|
|
843
|
+
branchName?: string;
|
|
844
|
+
}, {
|
|
845
|
+
toolName: string;
|
|
846
|
+
projectId?: string;
|
|
847
|
+
branchName?: string;
|
|
848
|
+
}, 1>;
|
|
849
|
+
export declare const ClientDevtoolsToolCallV1: {
|
|
850
|
+
eventName: "client.devtools.tool.call";
|
|
851
|
+
version: "1";
|
|
852
|
+
};
|
|
853
|
+
export type ClientDevtoolsToolResultV1 = FusionEventVariant<"client.devtools.tool.result", {
|
|
854
|
+
toolUseId: string;
|
|
855
|
+
toolName: string;
|
|
856
|
+
result?: unknown;
|
|
857
|
+
isError?: boolean;
|
|
858
|
+
sessionId?: string;
|
|
859
|
+
projectId?: string;
|
|
860
|
+
branchName?: string;
|
|
861
|
+
}, {
|
|
862
|
+
toolName: string;
|
|
863
|
+
projectId?: string;
|
|
864
|
+
branchName?: string;
|
|
865
|
+
}, 1>;
|
|
866
|
+
export declare const ClientDevtoolsToolResultV1: {
|
|
867
|
+
eventName: "client.devtools.tool.result";
|
|
868
|
+
version: "1";
|
|
869
|
+
};
|
|
870
|
+
export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent | ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | ClientDevtoolsToolCallRequestV1 | ClientDevtoolsToolCallV1 | ClientDevtoolsToolResultV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | FusionBranchCreatedV1 | FusionContainerStartedV1 | FusionContainerFailedV1 | FusionBranchFailedV1 | BotMentionExternalPrV1 | ReviewSubmittedV1 | PrReviewRequestedV1;
|
|
799
871
|
export interface ModelPermissionRequiredEvent {
|
|
800
872
|
type: "assistant.model.permission.required";
|
|
801
873
|
data: {
|
package/src/events.js
CHANGED
|
@@ -70,12 +70,12 @@ export const FusionBranchCreatedV1 = {
|
|
|
70
70
|
eventName: "fusion.branch.created",
|
|
71
71
|
version: "1",
|
|
72
72
|
};
|
|
73
|
-
export const
|
|
74
|
-
eventName: "fusion.
|
|
73
|
+
export const FusionContainerStartedV1 = {
|
|
74
|
+
eventName: "fusion.container.started",
|
|
75
75
|
version: "1",
|
|
76
76
|
};
|
|
77
|
-
export const
|
|
78
|
-
eventName: "fusion.
|
|
77
|
+
export const FusionContainerFailedV1 = {
|
|
78
|
+
eventName: "fusion.container.failed",
|
|
79
79
|
version: "1",
|
|
80
80
|
};
|
|
81
81
|
export const FusionBranchFailedV1 = {
|
|
@@ -86,3 +86,19 @@ export const VideoRecordingCompletedV1 = {
|
|
|
86
86
|
eventName: "video.recording.completed",
|
|
87
87
|
version: "1",
|
|
88
88
|
};
|
|
89
|
+
export const PrReviewRequestedV1 = {
|
|
90
|
+
eventName: "pr.review.requested",
|
|
91
|
+
version: "1",
|
|
92
|
+
};
|
|
93
|
+
export const ClientDevtoolsToolCallRequestV1 = {
|
|
94
|
+
eventName: "client.devtools.tool.call-request",
|
|
95
|
+
version: "1",
|
|
96
|
+
};
|
|
97
|
+
export const ClientDevtoolsToolCallV1 = {
|
|
98
|
+
eventName: "client.devtools.tool.call",
|
|
99
|
+
version: "1",
|
|
100
|
+
};
|
|
101
|
+
export const ClientDevtoolsToolResultV1 = {
|
|
102
|
+
eventName: "client.devtools.tool.result",
|
|
103
|
+
version: "1",
|
|
104
|
+
};
|
package/src/index.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export * from "./vscode-tunnel.js";
|
|
|
12
12
|
export * from "./claw.js";
|
|
13
13
|
export * from "./kube-error.js";
|
|
14
14
|
export * from "./connectivity/types.js";
|
|
15
|
+
export * from "./vpc-peering.js";
|
|
15
16
|
export { connectivityErrorCodeToLikelyCause, mapConnectivityErrorMessage, } from "./connectivity/error-codes.js";
|
package/src/index.js
CHANGED
|
@@ -12,4 +12,5 @@ export * from "./vscode-tunnel.js";
|
|
|
12
12
|
export * from "./claw.js";
|
|
13
13
|
export * from "./kube-error.js";
|
|
14
14
|
export * from "./connectivity/types.js";
|
|
15
|
+
export * from "./vpc-peering.js";
|
|
15
16
|
export { connectivityErrorCodeToLikelyCause, mapConnectivityErrorMessage, } from "./connectivity/error-codes.js";
|
package/src/organization.d.ts
CHANGED
|
@@ -101,6 +101,12 @@ interface OrganizationSettings {
|
|
|
101
101
|
ticketAssessmentModel?: string;
|
|
102
102
|
ticketAssessmentDailyLimit?: number;
|
|
103
103
|
fusionWebhooks?: FusionWebhook[];
|
|
104
|
+
/** Default VPC peering ID for this space. References a document in the vpcPeerings collection.
|
|
105
|
+
* Projects can override this with their own vpcPeering setting. */
|
|
106
|
+
defaultVpcPeering?: string;
|
|
107
|
+
controlModelAvailability?: boolean;
|
|
108
|
+
allowedAiModels?: string[];
|
|
109
|
+
autoModelOverride?: string;
|
|
104
110
|
}
|
|
105
111
|
interface RoleOptions {
|
|
106
112
|
read?: boolean;
|
package/src/projects.d.ts
CHANGED
|
@@ -682,6 +682,9 @@ export interface Project {
|
|
|
682
682
|
* Agents will pick this project when asked to do something with the connected repository.
|
|
683
683
|
*/
|
|
684
684
|
isPreferredForRepo?: boolean;
|
|
685
|
+
/** VPC peering ID for this project. Overrides the space-level defaultVpcPeering.
|
|
686
|
+
* References a document in the vpcPeerings collection. */
|
|
687
|
+
vpcPeering?: string;
|
|
685
688
|
};
|
|
686
689
|
screenshot: string | null;
|
|
687
690
|
isExample?: boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface VpcPeering {
|
|
2
|
+
id: string;
|
|
3
|
+
ownerId: string;
|
|
4
|
+
cloud: "gcp";
|
|
5
|
+
gcpRegion: string;
|
|
6
|
+
gcpProjectId: string;
|
|
7
|
+
gcpNetworkName: string;
|
|
8
|
+
bridgeCidr: string;
|
|
9
|
+
customerDnsServers: string[];
|
|
10
|
+
importCustomRoutes: boolean;
|
|
11
|
+
proxyIp: string;
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
createdAt: number;
|
|
14
|
+
updatedAt: number;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateVpcPeeringParams {
|
|
17
|
+
cloud: "gcp";
|
|
18
|
+
gcpRegion: string;
|
|
19
|
+
gcpProjectId: string;
|
|
20
|
+
gcpNetworkName: string;
|
|
21
|
+
bridgeCidr: string;
|
|
22
|
+
customerDnsServers: string[];
|
|
23
|
+
importCustomRoutes?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|