@builder.io/ai-utils 0.18.6 → 0.19.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 +101 -1
- package/src/repo-indexing.d.ts +8 -0
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface CustomAgentDefinition {
|
|
|
41
41
|
systemPrompt?: string;
|
|
42
42
|
tools?: string[];
|
|
43
43
|
model?: string;
|
|
44
|
+
position?: string;
|
|
44
45
|
needDevServer?: boolean;
|
|
45
46
|
needValidation?: boolean;
|
|
46
47
|
includeMemories?: boolean;
|
|
@@ -224,6 +225,82 @@ export interface RecordFrameToolInput {
|
|
|
224
225
|
title: string;
|
|
225
226
|
frame: "last-image";
|
|
226
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Configuration values proposed by the setup analyzer agent
|
|
230
|
+
*/
|
|
231
|
+
export interface SetupAnalysisValues {
|
|
232
|
+
projectOverview: {
|
|
233
|
+
framework: string | null;
|
|
234
|
+
packageManager: "npm" | "yarn" | "pnpm" | "bun" | null;
|
|
235
|
+
isMonorepo: boolean;
|
|
236
|
+
detectedLanguage: "typescript" | "javascript" | null;
|
|
237
|
+
};
|
|
238
|
+
rootDirectory: {
|
|
239
|
+
path: string;
|
|
240
|
+
reason: string;
|
|
241
|
+
} | null;
|
|
242
|
+
installCommand: {
|
|
243
|
+
command: string;
|
|
244
|
+
reason: string;
|
|
245
|
+
} | null;
|
|
246
|
+
runtimeDependencies: Array<{
|
|
247
|
+
tool: string;
|
|
248
|
+
version: string;
|
|
249
|
+
source: string;
|
|
250
|
+
}>;
|
|
251
|
+
devServer: {
|
|
252
|
+
command: string;
|
|
253
|
+
url: string;
|
|
254
|
+
port: number;
|
|
255
|
+
reason: string;
|
|
256
|
+
} | null;
|
|
257
|
+
environmentVariables: Array<{
|
|
258
|
+
key: string;
|
|
259
|
+
description: string;
|
|
260
|
+
isRequired: boolean;
|
|
261
|
+
isSecret: boolean;
|
|
262
|
+
defaultValue: string | null;
|
|
263
|
+
source: string;
|
|
264
|
+
}>;
|
|
265
|
+
validationScript: {
|
|
266
|
+
command: string;
|
|
267
|
+
reason: string;
|
|
268
|
+
} | null;
|
|
269
|
+
npmrcContents: string | null;
|
|
270
|
+
}
|
|
271
|
+
export interface ProposeConfigToolInput {
|
|
272
|
+
config: SetupAnalysisValues;
|
|
273
|
+
message?: string;
|
|
274
|
+
}
|
|
275
|
+
export type SetupValueField = "installCommand" | "devServer" | "validationScript";
|
|
276
|
+
export interface UpdateSetupValueToolInput {
|
|
277
|
+
field: SetupValueField;
|
|
278
|
+
value: {
|
|
279
|
+
command: string;
|
|
280
|
+
url?: string;
|
|
281
|
+
port?: number;
|
|
282
|
+
};
|
|
283
|
+
reason: string;
|
|
284
|
+
}
|
|
285
|
+
export interface VerifyInstallCommandToolInput {
|
|
286
|
+
command: string;
|
|
287
|
+
timeout?: number;
|
|
288
|
+
}
|
|
289
|
+
export interface VerifyDevServerToolInput {
|
|
290
|
+
command: string;
|
|
291
|
+
url: string;
|
|
292
|
+
port: number;
|
|
293
|
+
timeout?: number;
|
|
294
|
+
}
|
|
295
|
+
export interface VerifyValidationScriptToolInput {
|
|
296
|
+
command: string;
|
|
297
|
+
timeout?: number;
|
|
298
|
+
}
|
|
299
|
+
export interface VerifyRuntimeDependencyToolInput {
|
|
300
|
+
tool: string;
|
|
301
|
+
version: string;
|
|
302
|
+
source?: string;
|
|
303
|
+
}
|
|
227
304
|
export interface AddQAReviewComment {
|
|
228
305
|
file_path: string;
|
|
229
306
|
line: number;
|
|
@@ -293,9 +370,15 @@ export interface CodeGenToolMap {
|
|
|
293
370
|
ExitPlanMode: ExitPlanModeToolInput;
|
|
294
371
|
ReadMcpResource: ReadMcpResourceToolInput;
|
|
295
372
|
RecordFrame: RecordFrameToolInput;
|
|
373
|
+
ProposeConfig: ProposeConfigToolInput;
|
|
374
|
+
UpdateSetupValue: UpdateSetupValueToolInput;
|
|
296
375
|
AddQAReview: AddQAReviewToolInput;
|
|
297
376
|
ResolveQAComments: ResolveQACommentsToolInput;
|
|
298
377
|
ReportUIIssue: ReportUIIssueToolInput;
|
|
378
|
+
VerifyInstallCommand: VerifyInstallCommandToolInput;
|
|
379
|
+
VerifyDevServer: VerifyDevServerToolInput;
|
|
380
|
+
VerifyValidationScript: VerifyValidationScriptToolInput;
|
|
381
|
+
VerifyRuntimeDependency: VerifyRuntimeDependencyToolInput;
|
|
299
382
|
}
|
|
300
383
|
export type CodeGenTools = keyof CodeGenToolMap;
|
|
301
384
|
export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
@@ -782,9 +865,24 @@ export interface GenerateCompletionStepTerminals {
|
|
|
782
865
|
type: "terminals";
|
|
783
866
|
terminals: CodegenApiTerminal[];
|
|
784
867
|
}
|
|
868
|
+
export interface GenerateCompletionStepProposeConfig {
|
|
869
|
+
type: "propose_config";
|
|
870
|
+
config: SetupAnalysisValues;
|
|
871
|
+
message?: string;
|
|
872
|
+
}
|
|
873
|
+
export interface GenerateCompletionStepUpdateSetupValue {
|
|
874
|
+
type: "update_setup_value";
|
|
875
|
+
field: SetupValueField;
|
|
876
|
+
value: {
|
|
877
|
+
command: string;
|
|
878
|
+
url?: string;
|
|
879
|
+
port?: number;
|
|
880
|
+
};
|
|
881
|
+
reason: string;
|
|
882
|
+
}
|
|
785
883
|
export type GenerateCompletionStep = {
|
|
786
884
|
timestamp?: number;
|
|
787
|
-
} & (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);
|
|
885
|
+
} & (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);
|
|
788
886
|
export interface ApplyActionsResult {
|
|
789
887
|
filePath: string;
|
|
790
888
|
addedLines: number;
|
|
@@ -864,6 +962,8 @@ export interface GenerateUserMessage {
|
|
|
864
962
|
enabledMCPs?: string[];
|
|
865
963
|
sessionMode?: SessionMode;
|
|
866
964
|
queue?: boolean;
|
|
965
|
+
/** Custom agent type to use for this message */
|
|
966
|
+
agentType?: string;
|
|
867
967
|
/** Enable AddQAReview tool for QA PR review branches */
|
|
868
968
|
enableQAReviewTool?: boolean;
|
|
869
969
|
/** @deprecated */
|
package/src/repo-indexing.d.ts
CHANGED
|
@@ -16,13 +16,21 @@ export interface TokenDocument extends DocumentBase {
|
|
|
16
16
|
type: "token";
|
|
17
17
|
hash: string;
|
|
18
18
|
relevantFiles: string[];
|
|
19
|
+
rawTokens?: string[];
|
|
20
|
+
tokenValues?: Record<string, string>;
|
|
19
21
|
}
|
|
20
22
|
export interface IconDocument extends DocumentBase {
|
|
21
23
|
type: "icon";
|
|
22
24
|
hash: string;
|
|
23
25
|
}
|
|
26
|
+
export interface RawComponent {
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
}
|
|
24
30
|
export interface AgentDocument extends DocumentBase {
|
|
25
31
|
type: "agent";
|
|
32
|
+
rawComponents?: RawComponent[];
|
|
33
|
+
rawTokenGroups?: string[];
|
|
26
34
|
}
|
|
27
35
|
export interface InstallationDocument extends DocumentBase {
|
|
28
36
|
type: "installation";
|