@builder.io/ai-utils 0.4.32 → 0.4.34
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 +45 -6
- package/src/messages.d.ts +2 -0
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export type CompletionStopReason = "max_tokens" | "stop_sequence" | "tool_use" |
|
|
|
30
30
|
export interface ViewPathToolInput {
|
|
31
31
|
file_path: string;
|
|
32
32
|
view_range?: [number, number];
|
|
33
|
+
offset?: number;
|
|
34
|
+
limit?: number;
|
|
33
35
|
}
|
|
34
36
|
export interface GlobSearchToolInput {
|
|
35
37
|
pattern: string;
|
|
@@ -72,6 +74,16 @@ export interface SearchReplaceInput {
|
|
|
72
74
|
file_path: string;
|
|
73
75
|
old_str: string;
|
|
74
76
|
new_str: string;
|
|
77
|
+
replace_all?: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface MultiSearchReplaceInput {
|
|
80
|
+
title: string;
|
|
81
|
+
file_path: string;
|
|
82
|
+
edits: {
|
|
83
|
+
old_str: string;
|
|
84
|
+
new_str: string;
|
|
85
|
+
replace_all?: boolean;
|
|
86
|
+
}[];
|
|
75
87
|
}
|
|
76
88
|
export interface FindMediaToolInput {
|
|
77
89
|
query: string;
|
|
@@ -85,6 +97,16 @@ export interface MemoryToolInput {
|
|
|
85
97
|
memory_id?: string;
|
|
86
98
|
when?: string;
|
|
87
99
|
}
|
|
100
|
+
export interface AgentToolInput {
|
|
101
|
+
prompt: string;
|
|
102
|
+
}
|
|
103
|
+
export interface ListDirToolInput {
|
|
104
|
+
path: string;
|
|
105
|
+
ignore?: string[];
|
|
106
|
+
}
|
|
107
|
+
export interface RevertToolInput {
|
|
108
|
+
checkpoint_id: string;
|
|
109
|
+
}
|
|
88
110
|
export interface CodeGenToolMap {
|
|
89
111
|
view_path: ViewPathToolInput;
|
|
90
112
|
glob_search: GlobSearchToolInput;
|
|
@@ -98,14 +120,30 @@ export interface CodeGenToolMap {
|
|
|
98
120
|
search_replace_file: SearchReplaceInput;
|
|
99
121
|
find_media: FindMediaToolInput;
|
|
100
122
|
memory: MemoryToolInput;
|
|
123
|
+
Read: ViewPathToolInput;
|
|
124
|
+
Write: WriteFileInput;
|
|
125
|
+
Edit: SearchReplaceInput;
|
|
126
|
+
GetStyleInspiration: GetStyleInspirationToolInput;
|
|
127
|
+
MultiEdit: MultiSearchReplaceInput;
|
|
128
|
+
FindMedia: FindMediaToolInput;
|
|
129
|
+
LS: ListDirToolInput;
|
|
130
|
+
Memory: MemoryToolInput;
|
|
131
|
+
Bash: BashToolInput;
|
|
132
|
+
WebSearch: WebSearchToolInput;
|
|
133
|
+
Agent: AgentToolInput;
|
|
134
|
+
Grep: GrepSearchToolInput;
|
|
135
|
+
Glob: GlobSearchToolInput;
|
|
136
|
+
DevServerControl: DevServerControlInput;
|
|
137
|
+
Revert: RevertToolInput;
|
|
101
138
|
}
|
|
102
139
|
export type CodeGenTools = keyof CodeGenToolMap;
|
|
103
140
|
export type AllCodeGenTools = CodeGenTools | "web_search";
|
|
141
|
+
export type CodeGenMode = "quality" | "quality-v3" | "quality-v4" | "quality-v4-agent";
|
|
104
142
|
export interface CodeGenInputOptions {
|
|
105
143
|
position: string;
|
|
106
144
|
eventName?: string;
|
|
107
145
|
sessionId: string;
|
|
108
|
-
codeGenMode?:
|
|
146
|
+
codeGenMode?: CodeGenMode;
|
|
109
147
|
url?: string;
|
|
110
148
|
diffActions?: boolean;
|
|
111
149
|
planningPrompt?: boolean;
|
|
@@ -239,6 +277,7 @@ export interface GenerateCompletionStepUser {
|
|
|
239
277
|
id: string;
|
|
240
278
|
user: UserSource;
|
|
241
279
|
role: "user" | "agent";
|
|
280
|
+
compacting: boolean;
|
|
242
281
|
}
|
|
243
282
|
export interface GenerateCompletionStepFile {
|
|
244
283
|
type: "file";
|
|
@@ -310,7 +349,7 @@ export interface GenerateCompletionStepContinue {
|
|
|
310
349
|
url: string;
|
|
311
350
|
}
|
|
312
351
|
export type DevCommandState = "running" | "stopped" | "starting" | "failed" | "unset";
|
|
313
|
-
export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed";
|
|
352
|
+
export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed" | "install-aborted";
|
|
314
353
|
export type HttpServerState = "ok-2xx" | "error-4xx" | "error-5xx" | "error-fetch" | "stopped" | "connecting";
|
|
315
354
|
export interface CodeGenHealthStatus {
|
|
316
355
|
devServerState: DevCommandState;
|
|
@@ -626,19 +665,19 @@ export interface AccessResult {
|
|
|
626
665
|
message: string;
|
|
627
666
|
}
|
|
628
667
|
export interface FusionConfig {
|
|
629
|
-
devCommand
|
|
668
|
+
devCommand?: string;
|
|
630
669
|
checkCommand?: string;
|
|
631
670
|
setupCommand?: string;
|
|
632
671
|
projectId?: string;
|
|
633
672
|
branchName?: string;
|
|
634
|
-
workingDirectory
|
|
673
|
+
workingDirectory?: string;
|
|
635
674
|
bashWorkingDirectory?: string;
|
|
636
675
|
workspace?: WorkspaceConfiguration;
|
|
637
676
|
authenticateProxy?: boolean;
|
|
638
677
|
allowedCommands?: string[];
|
|
639
678
|
autoBackupGit?: boolean;
|
|
640
|
-
commitMode
|
|
641
|
-
serverUrl
|
|
679
|
+
commitMode?: CommitMode;
|
|
680
|
+
serverUrl?: string;
|
|
642
681
|
isLocal?: boolean;
|
|
643
682
|
envVariables?: Record<string, string>;
|
|
644
683
|
accessControl?: AclPolicy;
|
package/src/messages.d.ts
CHANGED
|
@@ -132,6 +132,8 @@ export interface MCPServerURLDefinition {
|
|
|
132
132
|
url: string;
|
|
133
133
|
authorization_token?: string | null;
|
|
134
134
|
tool_configuration?: MCPServerToolConfiguration | null;
|
|
135
|
+
token_expires_at?: number | null;
|
|
136
|
+
create_date?: number | null;
|
|
135
137
|
}
|
|
136
138
|
export interface MCPServerToolConfiguration {
|
|
137
139
|
allowed_tools?: Array<string> | null;
|