builder.io 1.11.31 → 1.11.32

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.
@@ -1,6 +1,6 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import { type Credentials } from "./credentials";
3
- import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult } from "$/ai-utils";
3
+ import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, PushChangesArgs, CodegenApiResult } from "$/ai-utils";
4
4
  import prettier from "prettier";
5
5
  import { type FusionContext, type ToolResolution } from "./code-tools";
6
6
  import EventEmitter from "node:events";
@@ -60,35 +60,7 @@ export declare class CodeGenSession {
60
60
  pushRepoV2(repoInfo: {
61
61
  repoFullName: string;
62
62
  repoUrl: string;
63
- }): Promise<{
64
- success: boolean;
65
- error: string;
66
- details?: undefined;
67
- } | {
68
- success: boolean;
69
- message: string;
70
- output?: undefined;
71
- upToDate?: undefined;
72
- createdBranch?: undefined;
73
- setUpToStream?: undefined;
74
- status?: undefined;
75
- error?: undefined;
76
- details?: undefined;
77
- } | {
78
- output: string;
79
- upToDate: boolean;
80
- createdBranch: boolean;
81
- setUpToStream: boolean;
82
- status: GenerateCompletionStepGit | null;
83
- success: boolean;
84
- message?: undefined;
85
- error?: undefined;
86
- details?: undefined;
87
- } | {
88
- success: boolean;
89
- error: string;
90
- details: string;
91
- }>;
63
+ }): Promise<CodegenApiResult>;
92
64
  zipFolder(folderName: string): Promise<string>;
93
65
  archiveProject(): Promise<string>;
94
66
  isIdle(): boolean;
@@ -98,59 +70,10 @@ export declare class CodeGenSession {
98
70
  error: Error;
99
71
  }>;
100
72
  getCommitMode(): import("$/ai-utils").CommitMode;
101
- pushChanges(pullFirst?: boolean): Promise<{
102
- success: boolean;
103
- message: string;
104
- output?: undefined;
105
- upToDate?: undefined;
106
- createdBranch?: undefined;
107
- setUpToStream?: undefined;
108
- status?: undefined;
109
- } | {
110
- output: string;
111
- upToDate: boolean;
112
- createdBranch: boolean;
113
- setUpToStream: boolean;
114
- status: GenerateCompletionStepGit | null;
115
- success?: undefined;
116
- message?: undefined;
117
- }>;
118
- hasChangesRelativeToRemote(): Promise<boolean>;
119
- pullLatestFromRemote(): Promise<{
120
- success: boolean;
121
- message: string;
122
- conflicts?: undefined;
123
- } | {
124
- success: boolean;
125
- conflicts: boolean;
126
- message: string;
127
- }>;
128
- abortMerge(emitStatus?: boolean): Promise<{
129
- success: boolean;
130
- message: string;
131
- }>;
132
- syncChangesFromRemote(): Promise<{
133
- success: boolean;
134
- message: string;
135
- conflicts?: undefined;
136
- } | {
137
- success: boolean;
138
- conflicts: boolean;
139
- message: string;
140
- }>;
141
- syncChangesFromMain(arg: string | {
142
- mainBranchName: string;
143
- allowUnrelatedHistory?: boolean;
144
- pullCurrentBranch?: boolean;
145
- }): Promise<{
146
- success: boolean;
147
- message: string;
148
- conflicts?: undefined;
149
- } | {
150
- success: boolean;
151
- conflicts: boolean;
152
- message: string;
153
- }>;
73
+ pushChanges(opts: PushChangesArgs): Promise<CodegenApiResult>;
74
+ pullLatestFromRemote(): Promise<CodegenApiResult>;
75
+ abortMerge(emitStatus?: boolean): Promise<CodegenApiResult>;
76
+ syncChangesFromRemote(): Promise<CodegenApiResult>;
154
77
  /**
155
78
  * Get the current commit hash
156
79
  */
@@ -165,13 +88,6 @@ export declare class CodeGenSession {
165
88
  */
166
89
  getAiBranch(): string;
167
90
  git(args: string[], opts?: string | RunCommandOptions): Promise<string>;
168
- /**
169
- * Helper to run git commands
170
- */
171
- runCheckCommand(): Promise<{
172
- code: number;
173
- logs: string;
174
- } | null>;
175
91
  setDebug(debug: boolean): void;
176
92
  getAllFiles(options?: {
177
93
  getDotFiles?: boolean;
@@ -202,14 +118,6 @@ export declare class CodeGenSession {
202
118
  undone: string[] | null;
203
119
  message: string;
204
120
  }>;
205
- restoreHEAD(): Promise<{
206
- undone: string[] | null;
207
- message: string;
208
- }>;
209
- restoreAll(): Promise<{
210
- undone: string[] | null;
211
- message: string;
212
- }>;
213
121
  restoreFromCompletionId({ location, completionId, forceReplay, }: {
214
122
  location: "before" | "after";
215
123
  completionId: string;
@@ -423,7 +331,8 @@ export declare class BashError extends Error {
423
331
  readonly code: number | string | undefined;
424
332
  readonly stdout: string;
425
333
  readonly stderr: string;
426
- constructor(message: string, code: number | string | undefined, stdout: string, stderr: string, opts: {
334
+ readonly command: string;
335
+ constructor(command: string, code: number | string | undefined, stdout: string, stderr: string, opts?: {
427
336
  cause?: Error;
428
337
  });
429
338
  }