@builder.io/ai-utils 0.38.3 → 0.40.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 +11 -11
- package/src/codegen.d.ts +78 -27
- package/src/connectivity/checks/dns-check.js +1 -1
- package/src/events.d.ts +130 -6
- package/src/events.js +37 -1
- package/src/projects.d.ts +10 -1
- package/src/proxy.js +3 -1
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/ai-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "Builder.io AI utils",
|
|
5
|
+
"files": [
|
|
6
|
+
"src"
|
|
7
|
+
],
|
|
5
8
|
"type": "module",
|
|
6
9
|
"main": "src/index.js",
|
|
7
10
|
"types": "src/index.d.ts",
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
13
|
+
"types": "./src/index.d.ts",
|
|
14
|
+
"import": "./src/index.js"
|
|
12
15
|
},
|
|
13
16
|
"./src/connectivity/node": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
17
|
+
"types": "./src/connectivity/node.d.ts",
|
|
18
|
+
"import": "./src/connectivity/node.js"
|
|
16
19
|
},
|
|
17
20
|
"./src/connectivity/browser": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
21
|
+
"types": "./src/connectivity/browser.d.ts",
|
|
22
|
+
"import": "./src/connectivity/browser.js"
|
|
20
23
|
}
|
|
21
|
-
}
|
|
22
|
-
"files": [
|
|
23
|
-
"src"
|
|
24
|
-
]
|
|
24
|
+
}
|
|
25
25
|
}
|
package/src/codegen.d.ts
CHANGED
|
@@ -60,6 +60,13 @@ export interface CustomAgentDefinition {
|
|
|
60
60
|
filePath?: string;
|
|
61
61
|
/** Default reasoning effort level for this agent type. Overrides the session default. */
|
|
62
62
|
reasoning?: ReasoningEffort;
|
|
63
|
+
/**
|
|
64
|
+
* When true and the parent session has an explicit model override (e.g. set
|
|
65
|
+
* via org/project PR-reviewer settings), that model is used for this agent
|
|
66
|
+
* instead of the agent's own `model` / `roundRobinModels` defaults.
|
|
67
|
+
* Has no effect when no session-level model override is present.
|
|
68
|
+
*/
|
|
69
|
+
inheritSessionModel?: boolean;
|
|
63
70
|
}
|
|
64
71
|
export type CodeGenFramework = "react" | "html" | "mitosis" | "react-native" | "angular" | "vue" | "svelte" | "qwik" | "solid" | "marko" | "swiftui" | "jetpack-compose" | "flutter";
|
|
65
72
|
export type CodeGenStyleLibrary = "tailwind" | "tailwind-precise" | "emotion" | "styled-components" | "styled-jsx" | "react-native" | undefined;
|
|
@@ -169,16 +176,17 @@ export interface ScoreMemoriesToolInput {
|
|
|
169
176
|
outcome: "worked" | "failed" | "partial" | "unknown";
|
|
170
177
|
memory_scores: Record<string, "worked" | "failed" | "partial" | "unknown">;
|
|
171
178
|
}
|
|
172
|
-
export interface
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
description: string;
|
|
179
|
-
}[];
|
|
180
|
-
multiSelect?: boolean;
|
|
179
|
+
export interface AskUserQuestion {
|
|
180
|
+
question: string;
|
|
181
|
+
header: string;
|
|
182
|
+
options: {
|
|
183
|
+
label: string;
|
|
184
|
+
description: string;
|
|
181
185
|
}[];
|
|
186
|
+
multiSelect?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export interface AskUserQuestionToolInput {
|
|
189
|
+
questions: AskUserQuestion[];
|
|
182
190
|
answers?: Record<string, string>;
|
|
183
191
|
}
|
|
184
192
|
export interface AgentToolInput {
|
|
@@ -189,9 +197,6 @@ export interface AgentToolInput {
|
|
|
189
197
|
origin_channel_id?: string;
|
|
190
198
|
attachmentUrls?: string[];
|
|
191
199
|
}
|
|
192
|
-
export interface ListDirToolInput {
|
|
193
|
-
path: string;
|
|
194
|
-
}
|
|
195
200
|
export interface RevertToolInput {
|
|
196
201
|
checkpoint_id: string;
|
|
197
202
|
}
|
|
@@ -310,6 +315,27 @@ export interface TimelineRecording {
|
|
|
310
315
|
debugInfo?: string;
|
|
311
316
|
}>;
|
|
312
317
|
}
|
|
318
|
+
export interface CompileRecordingToolInput {
|
|
319
|
+
caption: string;
|
|
320
|
+
recording_caption: string;
|
|
321
|
+
summary?: string;
|
|
322
|
+
comments?: PRReviewComment[];
|
|
323
|
+
}
|
|
324
|
+
export interface TimelineSubmissionMetadata {
|
|
325
|
+
prNumber?: number;
|
|
326
|
+
repoFullName?: string;
|
|
327
|
+
hostname?: string;
|
|
328
|
+
prHeadSha?: string;
|
|
329
|
+
checkRunId?: number;
|
|
330
|
+
recordingCaption?: string;
|
|
331
|
+
summary?: string;
|
|
332
|
+
comments?: PRReviewComment[];
|
|
333
|
+
projectId?: string;
|
|
334
|
+
branchName?: string;
|
|
335
|
+
ownerId?: string;
|
|
336
|
+
configId?: string;
|
|
337
|
+
containerUrl?: string;
|
|
338
|
+
}
|
|
313
339
|
/**
|
|
314
340
|
* Configuration values proposed by the setup analyzer agent
|
|
315
341
|
*/
|
|
@@ -595,7 +621,7 @@ export interface ArchiveBranchToolInput {
|
|
|
595
621
|
builder_user_id: string;
|
|
596
622
|
reason?: string;
|
|
597
623
|
}
|
|
598
|
-
/** Comment for PR review - used by
|
|
624
|
+
/** Comment for PR review - used by SubmitPRReview and CompileRecording */
|
|
599
625
|
export interface PRReviewComment {
|
|
600
626
|
file_path: string;
|
|
601
627
|
line: number;
|
|
@@ -612,14 +638,6 @@ export interface SubmitPRReviewToolInput {
|
|
|
612
638
|
comments?: PRReviewComment[];
|
|
613
639
|
risk_level?: "high" | "medium" | "low";
|
|
614
640
|
}
|
|
615
|
-
/** SubmitRecording - Visual verification with recording (posted as separate review) */
|
|
616
|
-
export interface SubmitRecordingToolInput {
|
|
617
|
-
gif_id: string;
|
|
618
|
-
timeline_id?: string;
|
|
619
|
-
recording_caption: string;
|
|
620
|
-
summary?: string;
|
|
621
|
-
comments?: PRReviewComment[];
|
|
622
|
-
}
|
|
623
641
|
export interface ResolveQACommentsToolInput {
|
|
624
642
|
thread_node_ids: string[];
|
|
625
643
|
}
|
|
@@ -677,15 +695,14 @@ export interface CodeGenToolMap {
|
|
|
677
695
|
TodoRead: TodoReadToolInput;
|
|
678
696
|
TodoWrite: TodoWriteToolInput;
|
|
679
697
|
BuilderEdit: BuilderEditToolInput;
|
|
680
|
-
LS: ListDirToolInput;
|
|
681
698
|
WebFetch: WebFetchToolInput;
|
|
682
699
|
ExplorationMetadata: ExplorationMetadataToolInput;
|
|
683
700
|
EnterPlanMode: EnterPlanModeToolInput;
|
|
684
701
|
ExitPlanMode: ExitPlanModeToolInput;
|
|
685
702
|
ReadMcpResource: ReadMcpResourceToolInput;
|
|
686
703
|
RecordFrame: RecordFrameToolInput;
|
|
704
|
+
CompileRecording: CompileRecordingToolInput;
|
|
687
705
|
SubmitPRReview: SubmitPRReviewToolInput;
|
|
688
|
-
SubmitRecording: SubmitRecordingToolInput;
|
|
689
706
|
ProposeConfig: ProposeConfigToolInput;
|
|
690
707
|
UpdateSetupValue: UpdateSetupValueToolInput;
|
|
691
708
|
Exit: ExitToolInput;
|
|
@@ -706,6 +723,7 @@ export interface CodeGenToolMap {
|
|
|
706
723
|
ReadBranch: ReadBranchToolInput;
|
|
707
724
|
ArchiveBranch: ArchiveBranchToolInput;
|
|
708
725
|
RunningAgents: RunningAgentsToolInput;
|
|
726
|
+
IDEDiagnostics: IDEDiagnosticsToolInput;
|
|
709
727
|
}
|
|
710
728
|
export type CodeGenTools = keyof CodeGenToolMap;
|
|
711
729
|
export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
@@ -1078,10 +1096,12 @@ export interface SuggestedActionBuildError extends SuggestedActionBase {
|
|
|
1078
1096
|
export type SuggestedAction = SuggestedActionBuildError;
|
|
1079
1097
|
export interface GenerateCompletionStepWaitForInput {
|
|
1080
1098
|
type: "wait-for-input";
|
|
1099
|
+
id: string;
|
|
1081
1100
|
state: GenerateCompletionState;
|
|
1082
1101
|
suggestion?: SuggestedAction;
|
|
1083
1102
|
sessionMode: SessionMode;
|
|
1084
1103
|
hasPlanToApply: boolean;
|
|
1104
|
+
modelOverride?: string;
|
|
1085
1105
|
}
|
|
1086
1106
|
export type GenerateCompletionStepBuilderAction = GenerateCompletionStepBuilderActionRefresh | GenerateCompletionStepBuilderActionOpenPath | GenerateCompletionStepBuilderActionMCPConnect;
|
|
1087
1107
|
export interface GenerateCompletionStepBuilderActionRefresh {
|
|
@@ -1190,14 +1210,16 @@ export interface GenerateCompletionStepSession {
|
|
|
1190
1210
|
fusionConfig: FusionConfig | undefined;
|
|
1191
1211
|
hasBrowserAutomation: boolean;
|
|
1192
1212
|
customInstructions: CustomInstructionDefinition[];
|
|
1213
|
+
hasPlanToApply: boolean;
|
|
1193
1214
|
}
|
|
1194
1215
|
export interface GenerateCompletionStepMetadata {
|
|
1195
1216
|
type: "metadata";
|
|
1196
1217
|
[key: string]: unknown;
|
|
1197
1218
|
}
|
|
1219
|
+
export type MessageQueue = Pick<GenerateUserMessage, "idempotencyKey" | "displayPrompt" | "user">[];
|
|
1198
1220
|
export interface GenerateCompletionStepMessageQueue {
|
|
1199
1221
|
type: "message-queue";
|
|
1200
|
-
queue:
|
|
1222
|
+
queue: MessageQueue;
|
|
1201
1223
|
}
|
|
1202
1224
|
export interface GenerateCompletionStepServerToolResult {
|
|
1203
1225
|
type: "server_tool_result";
|
|
@@ -1223,6 +1245,31 @@ export interface GenerateCompletionStepTerminals {
|
|
|
1223
1245
|
type: "terminals";
|
|
1224
1246
|
terminals: CodegenApiTerminal[];
|
|
1225
1247
|
}
|
|
1248
|
+
export interface IdeContext {
|
|
1249
|
+
ideName: string;
|
|
1250
|
+
file: string | null;
|
|
1251
|
+
line: number | null;
|
|
1252
|
+
column: number | null;
|
|
1253
|
+
selection: string | null;
|
|
1254
|
+
}
|
|
1255
|
+
export interface DiagnosticEntry {
|
|
1256
|
+
file: string;
|
|
1257
|
+
severity: string;
|
|
1258
|
+
message: string;
|
|
1259
|
+
line: number;
|
|
1260
|
+
source: string | null;
|
|
1261
|
+
}
|
|
1262
|
+
export interface IDEDiagnosticsToolInput {
|
|
1263
|
+
file_path?: string;
|
|
1264
|
+
}
|
|
1265
|
+
export interface DiagnosticsResponse {
|
|
1266
|
+
ideName: string;
|
|
1267
|
+
diagnostics: DiagnosticEntry[];
|
|
1268
|
+
}
|
|
1269
|
+
export interface GenerateCompletionStepIde {
|
|
1270
|
+
type: "ide";
|
|
1271
|
+
context: IdeContext | null;
|
|
1272
|
+
}
|
|
1226
1273
|
export interface GenerateCompletionStepProposeConfig {
|
|
1227
1274
|
type: "propose_config";
|
|
1228
1275
|
config: SetupAnalysisValues;
|
|
@@ -1247,9 +1294,7 @@ export interface GenerateCompletionStepUpdateSetupValue {
|
|
|
1247
1294
|
};
|
|
1248
1295
|
reason: string;
|
|
1249
1296
|
}
|
|
1250
|
-
export type GenerateCompletionStep =
|
|
1251
|
-
timestamp?: number;
|
|
1252
|
-
} & (GenerateCompletionStepPlanning | GenerateCompletionStepStart | GenerateCompletionStepDelta | GenerateCompletionStepUser | GenerateCompletionStepFile | GenerateCompletionStepDiff | GenerateCompletionStepTool | GenerateCompletionStepError | GenerateCompletionStepContinue | GenerateCompletionStepWaitForInput | GenerateCompletionStepAbort | GenerateCompletionStepDone | GenerateCompletionStepUserInput | GenerateCompletionStepText | GenerateCompletionStepRestore | GenerateCompletionStepState | GenerateCompletionStepStdio | GenerateCompletionStepSession | GenerateCompletionStepServerToolResult | GenerateCompletionStepGit | GenerateCompletionStepBuilderAction | GenerateCompletionStepToolResult | GenerateCompletionStepFusionConfigPatch | GenerateCompletionStepToolCallRequest | GenerateCodeEventMCPStatus | GenerateCodeEventMCPAuthRequired | GenerateCompletionStepDevServerState | GenerateCompletionStepAgent | GenerateCompletionStepBatch | GenerateCompletionStepTerminals | GenerateCompletionStepMetadata | GenerateCompletionStepMessageQueue | GenerateCompletionStepProposeConfig | GenerateCompletionStepUpdateSetupValue);
|
|
1297
|
+
export type GenerateCompletionStep = GenerateCompletionStepPlanning | GenerateCompletionStepStart | GenerateCompletionStepDelta | GenerateCompletionStepUser | GenerateCompletionStepFile | GenerateCompletionStepDiff | GenerateCompletionStepTool | GenerateCompletionStepError | GenerateCompletionStepContinue | GenerateCompletionStepWaitForInput | GenerateCompletionStepAbort | GenerateCompletionStepDone | GenerateCompletionStepUserInput | GenerateCompletionStepText | GenerateCompletionStepRestore | GenerateCompletionStepState | GenerateCompletionStepStdio | GenerateCompletionStepSession | GenerateCompletionStepServerToolResult | GenerateCompletionStepGit | GenerateCompletionStepBuilderAction | GenerateCompletionStepToolResult | GenerateCompletionStepFusionConfigPatch | GenerateCompletionStepToolCallRequest | GenerateCodeEventMCPStatus | GenerateCodeEventMCPAuthRequired | GenerateCompletionStepDevServerState | GenerateCompletionStepAgent | GenerateCompletionStepBatch | GenerateCompletionStepTerminals | GenerateCompletionStepMetadata | GenerateCompletionStepMessageQueue | GenerateCompletionStepProposeConfig | GenerateCompletionStepUpdateSetupValue | GenerateCompletionStepIde;
|
|
1253
1298
|
export interface ApplyActionsResult {
|
|
1254
1299
|
filePath: string;
|
|
1255
1300
|
addedLines: number;
|
|
@@ -1721,6 +1766,7 @@ export interface MCPServerDefinition {
|
|
|
1721
1766
|
args?: string[];
|
|
1722
1767
|
env?: Record<string, string>;
|
|
1723
1768
|
envFile?: string;
|
|
1769
|
+
retries?: number;
|
|
1724
1770
|
}
|
|
1725
1771
|
export type MCPServerConfig = Record<string, MCPServerDefinition>;
|
|
1726
1772
|
export interface FusionConfig {
|
|
@@ -2318,3 +2364,8 @@ export interface CommitMessageResponse {
|
|
|
2318
2364
|
/** Optional extended description */
|
|
2319
2365
|
body?: string;
|
|
2320
2366
|
}
|
|
2367
|
+
export interface TodoItem {
|
|
2368
|
+
content: string;
|
|
2369
|
+
status: "pending" | "in_progress" | "completed";
|
|
2370
|
+
id: string;
|
|
2371
|
+
}
|
package/src/events.d.ts
CHANGED
|
@@ -472,15 +472,69 @@ export declare const AiTaskFailedEvent: {
|
|
|
472
472
|
eventName: "ai.task.failed";
|
|
473
473
|
version: "1";
|
|
474
474
|
};
|
|
475
|
-
export type
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
475
|
+
export type GitPrCreatedV1 = FusionEventVariant<"git.pr.created", {
|
|
476
|
+
projectId: string;
|
|
477
|
+
branchName: string;
|
|
478
|
+
branchId?: string;
|
|
479
|
+
provider: "github" | "gitlab" | "bitbucket" | "azure";
|
|
480
|
+
prNumber?: number | string;
|
|
479
481
|
}, {}, 1>;
|
|
480
|
-
export declare const
|
|
482
|
+
export declare const GitPrCreatedV1: {
|
|
481
483
|
eventName: "git.pr.created";
|
|
482
484
|
version: "1";
|
|
483
485
|
};
|
|
486
|
+
export type GitPrClosedV1 = FusionEventVariant<"git.pr.closed", {
|
|
487
|
+
projectId: string;
|
|
488
|
+
branchName: string;
|
|
489
|
+
branchId?: string;
|
|
490
|
+
provider: "github" | "gitlab" | "bitbucket" | "azure";
|
|
491
|
+
prNumber?: number | string;
|
|
492
|
+
}, {}, 1>;
|
|
493
|
+
export declare const GitPrClosedV1: {
|
|
494
|
+
eventName: "git.pr.closed";
|
|
495
|
+
version: "1";
|
|
496
|
+
};
|
|
497
|
+
export type GitPrMergedV1 = FusionEventVariant<"git.pr.merged", {
|
|
498
|
+
projectId: string;
|
|
499
|
+
branchName: string;
|
|
500
|
+
branchId?: string;
|
|
501
|
+
provider: "github" | "gitlab" | "bitbucket" | "azure";
|
|
502
|
+
prNumber?: number | string;
|
|
503
|
+
}, {}, 1>;
|
|
504
|
+
export declare const GitPrMergedV1: {
|
|
505
|
+
eventName: "git.pr.merged";
|
|
506
|
+
version: "1";
|
|
507
|
+
};
|
|
508
|
+
export type BotMentionExternalPrV1 = FusionEventVariant<"bot.mention.external-pr", {
|
|
509
|
+
projectId: string;
|
|
510
|
+
repoFullName: string;
|
|
511
|
+
prNumber: number;
|
|
512
|
+
comment: string;
|
|
513
|
+
commentLink?: string;
|
|
514
|
+
commentNumericId?: number;
|
|
515
|
+
commentIdStr: string;
|
|
516
|
+
deliveryId: string;
|
|
517
|
+
commentType: "issue" | "pr";
|
|
518
|
+
userName?: string;
|
|
519
|
+
gitUserId?: string;
|
|
520
|
+
hostname?: string;
|
|
521
|
+
prHeadRef?: string;
|
|
522
|
+
isFork?: boolean;
|
|
523
|
+
filePath?: string;
|
|
524
|
+
startLine?: number;
|
|
525
|
+
endLine?: number;
|
|
526
|
+
diffHunk?: string;
|
|
527
|
+
replyToCommentId?: number;
|
|
528
|
+
inReplyToCommentId?: number;
|
|
529
|
+
prTitle?: string;
|
|
530
|
+
authorAssociation?: string;
|
|
531
|
+
}, {
|
|
532
|
+
projectId: string;
|
|
533
|
+
}, 1>;
|
|
534
|
+
export declare const BotMentionExternalPrV1: {
|
|
535
|
+
eventName: "bot.mention.external-pr";
|
|
536
|
+
version: "1";
|
|
537
|
+
};
|
|
484
538
|
export type ClientDevtoolsSessionStartedEvent = FusionEventVariant<"client.devtools.session.started", {
|
|
485
539
|
sessionId?: string;
|
|
486
540
|
sessionType?: string;
|
|
@@ -609,6 +663,76 @@ export declare const GitWebhooksRegisterV1: {
|
|
|
609
663
|
eventName: "git.webhooks.register";
|
|
610
664
|
version: "1";
|
|
611
665
|
};
|
|
666
|
+
export type FusionProjectSettingsUpdatedV1 = FusionEventVariant<"fusion.project.settings.updated", {
|
|
667
|
+
projectId: string;
|
|
668
|
+
changedFields: string[];
|
|
669
|
+
}, {}, 1>;
|
|
670
|
+
export declare const FusionProjectSettingsUpdatedV1: {
|
|
671
|
+
eventName: "fusion.project.settings.updated";
|
|
672
|
+
version: "1";
|
|
673
|
+
};
|
|
674
|
+
export type FusionBranchCreatedV1 = FusionEventVariant<"fusion.branch.created", {
|
|
675
|
+
projectId: string;
|
|
676
|
+
branchName: string;
|
|
677
|
+
branchFriendlyName?: string;
|
|
678
|
+
actor: string;
|
|
679
|
+
}, {
|
|
680
|
+
projectId: string;
|
|
681
|
+
branchName: string;
|
|
682
|
+
}, 1>;
|
|
683
|
+
export declare const FusionBranchCreatedV1: {
|
|
684
|
+
eventName: "fusion.branch.created";
|
|
685
|
+
version: "1";
|
|
686
|
+
};
|
|
687
|
+
export type FusionBranchContainerStartedV1 = FusionEventVariant<"fusion.branch.container-started", {
|
|
688
|
+
projectId: string;
|
|
689
|
+
branchName: string;
|
|
690
|
+
url: string;
|
|
691
|
+
}, {
|
|
692
|
+
projectId: string;
|
|
693
|
+
branchName: string;
|
|
694
|
+
}, 1>;
|
|
695
|
+
export declare const FusionBranchContainerStartedV1: {
|
|
696
|
+
eventName: "fusion.branch.container-started";
|
|
697
|
+
version: "1";
|
|
698
|
+
};
|
|
699
|
+
export type FusionBranchMessageSentV1 = FusionEventVariant<"fusion.branch.message-sent", {
|
|
700
|
+
projectId: string;
|
|
701
|
+
branchName: string;
|
|
702
|
+
}, {
|
|
703
|
+
projectId: string;
|
|
704
|
+
branchName: string;
|
|
705
|
+
}, 1>;
|
|
706
|
+
export declare const FusionBranchMessageSentV1: {
|
|
707
|
+
eventName: "fusion.branch.message-sent";
|
|
708
|
+
version: "1";
|
|
709
|
+
};
|
|
710
|
+
export type FusionBranchFailedV1 = FusionEventVariant<"fusion.branch.failed", {
|
|
711
|
+
projectId: string;
|
|
712
|
+
branchName?: string;
|
|
713
|
+
error: string;
|
|
714
|
+
phase: string;
|
|
715
|
+
}, {
|
|
716
|
+
projectId: string;
|
|
717
|
+
branchName?: string;
|
|
718
|
+
}, 1>;
|
|
719
|
+
export declare const FusionBranchFailedV1: {
|
|
720
|
+
eventName: "fusion.branch.failed";
|
|
721
|
+
version: "1";
|
|
722
|
+
};
|
|
723
|
+
export type VideoRecordingCompletedV1 = FusionEventVariant<"video.recording.completed", {
|
|
724
|
+
recordingId: string;
|
|
725
|
+
videoUrl: string;
|
|
726
|
+
thumbnailUrl?: string;
|
|
727
|
+
projectId: string | null;
|
|
728
|
+
branchName: string | null;
|
|
729
|
+
}, {
|
|
730
|
+
recordingId: string;
|
|
731
|
+
}, 1>;
|
|
732
|
+
export declare const VideoRecordingCompletedV1: {
|
|
733
|
+
eventName: "video.recording.completed";
|
|
734
|
+
version: "1";
|
|
735
|
+
};
|
|
612
736
|
export interface SendMessageToOrgAgentInput {
|
|
613
737
|
agentBranchName?: string;
|
|
614
738
|
agentProjectId?: string;
|
|
@@ -629,7 +753,7 @@ export interface SendMessageToOrgAgentInput {
|
|
|
629
753
|
*/
|
|
630
754
|
autoCreateProject?: boolean;
|
|
631
755
|
}
|
|
632
|
-
export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent |
|
|
756
|
+
export type FusionEvent = AiTaskCompletedEvent | AiTaskFailedEvent | ClientDevtoolsSessionStartedEvent | ClientDevtoolsSessionIdleEventV1 | FusionProjectCreatedV1 | SetupAgentCompletedV1 | GitPrMergedV1 | GitPrCreatedV1 | GitPrClosedV1 | ForceSetupAgentV1 | ClawMessageSentV1 | CodegenCompletionV1 | CodegenUserPromptV1 | GitWebhooksRegisterV1 | FusionProjectSettingsUpdatedV1 | VideoRecordingCompletedV1 | FusionBranchCreatedV1 | FusionBranchContainerStartedV1 | FusionBranchMessageSentV1 | FusionBranchFailedV1 | BotMentionExternalPrV1;
|
|
633
757
|
export interface ModelPermissionRequiredEvent {
|
|
634
758
|
type: "assistant.model.permission.required";
|
|
635
759
|
data: {
|
package/src/events.js
CHANGED
|
@@ -6,10 +6,22 @@ export const AiTaskFailedEvent = {
|
|
|
6
6
|
eventName: "ai.task.failed",
|
|
7
7
|
version: "1",
|
|
8
8
|
};
|
|
9
|
-
export const
|
|
9
|
+
export const GitPrCreatedV1 = {
|
|
10
10
|
eventName: "git.pr.created",
|
|
11
11
|
version: "1",
|
|
12
12
|
};
|
|
13
|
+
export const GitPrClosedV1 = {
|
|
14
|
+
eventName: "git.pr.closed",
|
|
15
|
+
version: "1",
|
|
16
|
+
};
|
|
17
|
+
export const GitPrMergedV1 = {
|
|
18
|
+
eventName: "git.pr.merged",
|
|
19
|
+
version: "1",
|
|
20
|
+
};
|
|
21
|
+
export const BotMentionExternalPrV1 = {
|
|
22
|
+
eventName: "bot.mention.external-pr",
|
|
23
|
+
version: "1",
|
|
24
|
+
};
|
|
13
25
|
export const ClientDevtoolsSessionStartedEvent = {
|
|
14
26
|
eventName: "client.devtools.session.started",
|
|
15
27
|
version: "1",
|
|
@@ -46,3 +58,27 @@ export const GitWebhooksRegisterV1 = {
|
|
|
46
58
|
eventName: "git.webhooks.register",
|
|
47
59
|
version: "1",
|
|
48
60
|
};
|
|
61
|
+
export const FusionProjectSettingsUpdatedV1 = {
|
|
62
|
+
eventName: "fusion.project.settings.updated",
|
|
63
|
+
version: "1",
|
|
64
|
+
};
|
|
65
|
+
export const FusionBranchCreatedV1 = {
|
|
66
|
+
eventName: "fusion.branch.created",
|
|
67
|
+
version: "1",
|
|
68
|
+
};
|
|
69
|
+
export const FusionBranchContainerStartedV1 = {
|
|
70
|
+
eventName: "fusion.branch.container-started",
|
|
71
|
+
version: "1",
|
|
72
|
+
};
|
|
73
|
+
export const FusionBranchMessageSentV1 = {
|
|
74
|
+
eventName: "fusion.branch.message-sent",
|
|
75
|
+
version: "1",
|
|
76
|
+
};
|
|
77
|
+
export const FusionBranchFailedV1 = {
|
|
78
|
+
eventName: "fusion.branch.failed",
|
|
79
|
+
version: "1",
|
|
80
|
+
};
|
|
81
|
+
export const VideoRecordingCompletedV1 = {
|
|
82
|
+
eventName: "video.recording.completed",
|
|
83
|
+
version: "1",
|
|
84
|
+
};
|
package/src/projects.d.ts
CHANGED
|
@@ -338,7 +338,7 @@ export interface SetupScriptDependency {
|
|
|
338
338
|
script: string;
|
|
339
339
|
}
|
|
340
340
|
export type FusionExecutionEnvironment = "containerized" | "container-less" | "cloud" | "cloud-v2";
|
|
341
|
-
export type AgentType = "setup-project" | "project-configuration" | "org-agent";
|
|
341
|
+
export type AgentType = "setup-project" | "project-configuration" | "org-agent" | "code-review-orchestrator";
|
|
342
342
|
export interface PartialBranchData {
|
|
343
343
|
name?: string;
|
|
344
344
|
createdBy: string;
|
|
@@ -675,6 +675,11 @@ export interface Project {
|
|
|
675
675
|
httpsServerHonorCipherOrder?: boolean;
|
|
676
676
|
httpsServerRequestCert?: boolean;
|
|
677
677
|
httpsServerRejectUnauthorized?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* When true, this project is the preferred project for its connected repository.
|
|
680
|
+
* Agents will pick this project when asked to do something with the connected repository.
|
|
681
|
+
*/
|
|
682
|
+
isPreferredForRepo?: boolean;
|
|
678
683
|
};
|
|
679
684
|
screenshot: string | null;
|
|
680
685
|
isExample?: boolean;
|
|
@@ -706,6 +711,10 @@ export interface Project {
|
|
|
706
711
|
orgAgentConfig?: OrgAgentConfig;
|
|
707
712
|
/** When true, the project is hidden from normal project listings */
|
|
708
713
|
hidden?: boolean;
|
|
714
|
+
/** Status of the auto-setup process */
|
|
715
|
+
autoSetupStatus?: "idle" | "running" | "needs-input" | "completed" | "error";
|
|
716
|
+
/** True only when the user has explicitly chosen auto-setup via the UI; never set by backend infrastructure */
|
|
717
|
+
userInitiatedAutoSetup?: boolean;
|
|
709
718
|
/** When true, automatically apply verified setup configuration when the setup agent completes */
|
|
710
719
|
autoApplySetup?: boolean;
|
|
711
720
|
}
|
package/src/proxy.js
CHANGED
|
@@ -20,7 +20,9 @@ export function getProxyConfig({ devServerUrl, proxyOrigin, proxyDefaultOrigin,
|
|
|
20
20
|
try {
|
|
21
21
|
parsedUrl = new URL(devServerUrl);
|
|
22
22
|
}
|
|
23
|
-
catch (_a) {
|
|
23
|
+
catch (_a) {
|
|
24
|
+
// intentionally empty
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
27
|
if (!proxyOrigin && parsedUrl) {
|
|
26
28
|
if (isLocalhost(parsedUrl.hostname)) {
|