@builder.io/ai-utils 0.42.0 → 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 +9 -0
- package/src/events.d.ts +72 -1
- package/src/events.js +16 -0
- 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;
|
|
@@ -865,6 +866,10 @@ export interface CodeGenInputOptions {
|
|
|
865
866
|
* @internal - Set by middleware, not by clients
|
|
866
867
|
*/
|
|
867
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;
|
|
868
873
|
/** @deprecated */
|
|
869
874
|
prevId?: string;
|
|
870
875
|
/** @deprecated */
|
|
@@ -2413,6 +2418,10 @@ export interface SessionData {
|
|
|
2413
2418
|
description?: string;
|
|
2414
2419
|
hasPlanToApply?: boolean;
|
|
2415
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;
|
|
2416
2425
|
totalCompletions: number;
|
|
2417
2426
|
numUserMessages: number;
|
|
2418
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;
|
|
@@ -796,7 +798,76 @@ export interface SendMessageToOrgAgentInput {
|
|
|
796
798
|
*/
|
|
797
799
|
autoCreateProject?: boolean;
|
|
798
800
|
}
|
|
799
|
-
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;
|
|
800
871
|
export interface ModelPermissionRequiredEvent {
|
|
801
872
|
type: "assistant.model.permission.required";
|
|
802
873
|
data: {
|
package/src/events.js
CHANGED
|
@@ -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 {};
|