builder.io 1.11.12 → 1.11.13
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/cli/index.cjs +276 -270
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +190 -190
- package/server/index.mjs +190 -190
- package/types/cli/backup.d.ts +3 -2
- package/types/cli/code-tools.d.ts +10 -4
- package/types/cli/codegen.d.ts +53 -6
- package/types/tsconfig.tsbuildinfo +1 -1
package/types/cli/backup.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface BackupGitRepoOptions {
|
|
|
17
17
|
isConnectedToProvider: boolean;
|
|
18
18
|
debug: boolean;
|
|
19
19
|
forcedFullBackup: boolean;
|
|
20
|
+
canAbortMerge: boolean;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* Creates a backup of git repository changes made by the AI system.
|
|
@@ -30,10 +31,10 @@ interface BackupGitRepoOptions {
|
|
|
30
31
|
* The aiBranch is where the AI creates commits as work progresses, while featureBranch
|
|
31
32
|
* is the base branch where work started (usually "main").
|
|
32
33
|
*/
|
|
33
|
-
export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, forcedFullBackup, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
|
|
34
|
+
export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, forcedFullBackup, canAbortMerge, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
|
|
34
35
|
type InitialCommitHashResult = {
|
|
35
36
|
initialBranch: string;
|
|
36
|
-
initialCommitHash: undefined;
|
|
37
|
+
initialCommitHash: string | undefined;
|
|
37
38
|
partial: false;
|
|
38
39
|
forcedFullBackup: true;
|
|
39
40
|
} | {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CodeGenPosition, CodeGenTools, CodegenTurn, ContentMessageItemToolResult, FusionConfig, GenerateCompletionStep, ProjectFile, UserSource, WorkspaceFolder } from "$/ai-utils";
|
|
1
|
+
import type { AccessResult, CodeGenPosition, CodeGenTools, CodegenTurn, ContentMessageItemToolResult, FusionConfig, GenerateCompletionStep, Permission, ProjectFile, UserSource, WorkspaceFolder } from "$/ai-utils";
|
|
2
2
|
import type { DevToolsSys } from "../core";
|
|
3
3
|
import { type DevServerOrchestrator } from "./launch/dev-server-orchestrator";
|
|
4
4
|
import type { CodeGenEventEmitter } from "./codegen";
|
|
@@ -61,10 +61,16 @@ export interface ToolContext extends Partial<FusionContext> {
|
|
|
61
61
|
patchFusionConfig: (patch: Partial<FusionConfig>) => void;
|
|
62
62
|
passThrough: (toolCall: LLMToolCalls, signal: AbortSignal) => Promise<ToolResolution>;
|
|
63
63
|
readFile: (filePath: string) => Promise<string | null>;
|
|
64
|
-
writeFile: (filePath: string, content: string | Uint8Array) => Promise<
|
|
65
|
-
deleteFile: (filePath: string) => Promise<
|
|
66
|
-
fileExists: (filePath: string) => Promise<
|
|
64
|
+
writeFile: (filePath: string, content: string | Uint8Array) => Promise<string | null>;
|
|
65
|
+
deleteFile: (filePath: string) => Promise<string | null>;
|
|
66
|
+
fileExists: (filePath: string) => Promise<{
|
|
67
|
+
absolutePath: string | undefined;
|
|
68
|
+
recommendedPath: string | undefined;
|
|
69
|
+
workspaceFolder: WorkspaceFolder | undefined;
|
|
70
|
+
virtual: boolean;
|
|
71
|
+
}>;
|
|
67
72
|
listDir: (dirPath: string) => Promise<string[]>;
|
|
73
|
+
evaluateAccess: (resource: string, permission: Permission) => AccessResult;
|
|
68
74
|
stat: (filePath: string) => Promise<{
|
|
69
75
|
isDirectory: () => boolean;
|
|
70
76
|
isFile: () => boolean;
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -63,6 +63,16 @@ export declare class CodeGenSession {
|
|
|
63
63
|
success: boolean;
|
|
64
64
|
error: string;
|
|
65
65
|
details?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
success: boolean;
|
|
68
|
+
message: string;
|
|
69
|
+
output?: undefined;
|
|
70
|
+
upToDate?: undefined;
|
|
71
|
+
createdBranch?: undefined;
|
|
72
|
+
setUpToStream?: undefined;
|
|
73
|
+
status?: undefined;
|
|
74
|
+
error?: undefined;
|
|
75
|
+
details?: undefined;
|
|
66
76
|
} | {
|
|
67
77
|
output: string;
|
|
68
78
|
upToDate: boolean;
|
|
@@ -70,6 +80,7 @@ export declare class CodeGenSession {
|
|
|
70
80
|
setUpToStream: boolean;
|
|
71
81
|
status: GenerateCompletionStepGit | null;
|
|
72
82
|
success: boolean;
|
|
83
|
+
message?: undefined;
|
|
73
84
|
error?: undefined;
|
|
74
85
|
details?: undefined;
|
|
75
86
|
} | {
|
|
@@ -87,11 +98,21 @@ export declare class CodeGenSession {
|
|
|
87
98
|
}>;
|
|
88
99
|
getCommitMode(): import("$/ai-utils").CommitMode;
|
|
89
100
|
pushChanges(pullFirst?: boolean): Promise<{
|
|
101
|
+
success: boolean;
|
|
102
|
+
message: string;
|
|
103
|
+
output?: undefined;
|
|
104
|
+
upToDate?: undefined;
|
|
105
|
+
createdBranch?: undefined;
|
|
106
|
+
setUpToStream?: undefined;
|
|
107
|
+
status?: undefined;
|
|
108
|
+
} | {
|
|
90
109
|
output: string;
|
|
91
110
|
upToDate: boolean;
|
|
92
111
|
createdBranch: boolean;
|
|
93
112
|
setUpToStream: boolean;
|
|
94
113
|
status: GenerateCompletionStepGit | null;
|
|
114
|
+
success?: undefined;
|
|
115
|
+
message?: undefined;
|
|
95
116
|
}>;
|
|
96
117
|
hasChangesRelativeToRemote(): Promise<boolean>;
|
|
97
118
|
pullLatestFromRemote(): Promise<{
|
|
@@ -103,11 +124,32 @@ export declare class CodeGenSession {
|
|
|
103
124
|
conflicts: boolean;
|
|
104
125
|
message: string;
|
|
105
126
|
}>;
|
|
127
|
+
abortMerge(emitStatus?: boolean): Promise<{
|
|
128
|
+
success: boolean;
|
|
129
|
+
message: string;
|
|
130
|
+
}>;
|
|
131
|
+
syncChangesFromRemote(): Promise<{
|
|
132
|
+
success: boolean;
|
|
133
|
+
message: string;
|
|
134
|
+
conflicts?: undefined;
|
|
135
|
+
} | {
|
|
136
|
+
success: boolean;
|
|
137
|
+
conflicts: boolean;
|
|
138
|
+
message: string;
|
|
139
|
+
}>;
|
|
106
140
|
syncChangesFromMain(arg: string | {
|
|
107
141
|
mainBranchName: string;
|
|
108
142
|
allowUnrelatedHistory?: boolean;
|
|
109
143
|
pullCurrentBranch?: boolean;
|
|
110
|
-
}): Promise<
|
|
144
|
+
}): Promise<{
|
|
145
|
+
success: boolean;
|
|
146
|
+
message: string;
|
|
147
|
+
conflicts?: undefined;
|
|
148
|
+
} | {
|
|
149
|
+
success: boolean;
|
|
150
|
+
conflicts: boolean;
|
|
151
|
+
message: string;
|
|
152
|
+
}>;
|
|
111
153
|
/**
|
|
112
154
|
* Get the current commit hash
|
|
113
155
|
*/
|
|
@@ -242,7 +284,7 @@ export declare class CodeGenSession {
|
|
|
242
284
|
connectToEventLoop(shouldReplay: boolean, onStep: (step: GenerateCompletionStep) => void): () => void;
|
|
243
285
|
waitUntilIdle(): Promise<void>;
|
|
244
286
|
waitForEventLoop(): Promise<void>;
|
|
245
|
-
commitWorkInProgress(lastTurn: CodegenTurn): Promise<string | undefined>;
|
|
287
|
+
commitWorkInProgress(lastTurn: CodegenTurn, changedFiles: string[]): Promise<string | false | undefined>;
|
|
246
288
|
getChangesReport(): Promise<{
|
|
247
289
|
diff: string;
|
|
248
290
|
files: string[];
|
|
@@ -275,7 +317,12 @@ export declare class CodeGenSession {
|
|
|
275
317
|
* @param filePath A file path that may include a workspace prefix
|
|
276
318
|
* @returns True if the file exists, false otherwise
|
|
277
319
|
*/
|
|
278
|
-
fileExists(filePath: string): Promise<
|
|
320
|
+
fileExists(filePath: string): Promise<{
|
|
321
|
+
absolutePath: string | undefined;
|
|
322
|
+
recommendedPath: string | undefined;
|
|
323
|
+
workspaceFolder: WorkspaceFolder | undefined;
|
|
324
|
+
virtual: boolean;
|
|
325
|
+
}>;
|
|
279
326
|
/**
|
|
280
327
|
* Reads a file from the workspace synchronously
|
|
281
328
|
* @param filePath A file path that may include a workspace prefix
|
|
@@ -288,7 +335,7 @@ export declare class CodeGenSession {
|
|
|
288
335
|
* @param content The content to write
|
|
289
336
|
* @returns True if the write was successful, false otherwise
|
|
290
337
|
*/
|
|
291
|
-
writeFile(filePath: string, content: string | Uint8Array): Promise<
|
|
338
|
+
writeFile(filePath: string, content: string | Uint8Array): Promise<string | null>;
|
|
292
339
|
/**
|
|
293
340
|
* Lists files in a directory in the workspace
|
|
294
341
|
* @param dirPath A directory path that may include a workspace prefix
|
|
@@ -300,7 +347,7 @@ export declare class CodeGenSession {
|
|
|
300
347
|
* @param filePath A file path that may include a workspace prefix
|
|
301
348
|
* @returns The file stats or null if the file doesn't exist
|
|
302
349
|
*/
|
|
303
|
-
stat(filePath: string): Promise<{
|
|
350
|
+
stat(filePath: string, skipAclCheck?: boolean): Promise<{
|
|
304
351
|
isDirectory: () => boolean;
|
|
305
352
|
isFile: () => boolean;
|
|
306
353
|
} | null>;
|
|
@@ -309,7 +356,7 @@ export declare class CodeGenSession {
|
|
|
309
356
|
* @param filePath A file path that may include a workspace prefix
|
|
310
357
|
* @returns True if the delete was successful, false otherwise
|
|
311
358
|
*/
|
|
312
|
-
deleteFile(filePath: string): Promise<
|
|
359
|
+
deleteFile(filePath: string): Promise<string | null>;
|
|
313
360
|
getLinesStats(): {
|
|
314
361
|
net: number;
|
|
315
362
|
added: number;
|