builder.io 1.11.11 → 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.
@@ -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<boolean>;
65
- deleteFile: (filePath: string) => Promise<boolean>;
66
- fileExists: (filePath: string) => Promise<boolean>;
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;
@@ -2,6 +2,6 @@ import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
3
  import { type UserContext } from "$/ai-utils";
4
4
  export declare const runCodeCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
5
- export declare const runCodeGen: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
5
+ export declare const runCodeGen: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
6
6
  export declare function checkProjectRoot(sys: DevToolsSys, interactive: boolean): Promise<void>;
7
7
  export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
@@ -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<void>;
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<boolean>;
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<boolean>;
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<boolean>;
359
+ deleteFile(filePath: string): Promise<string | null>;
313
360
  getLinesStats(): {
314
361
  net: number;
315
362
  added: number;
@@ -2,4 +2,5 @@ import { type FusionConfig } from "$/ai-utils";
2
2
  import type { LaunchArgs } from "../launch";
3
3
  import type { DevToolsSys } from "types";
4
4
  export declare function getFusionConfig(sys: DevToolsSys, args: LaunchArgs): Promise<FusionConfig>;
5
+ export declare function saveFusionConfig(sys: DevToolsSys, fusionConfig: FusionConfig): Promise<void>;
5
6
  export declare function trackConfigData(sys: DevToolsSys, fusionConfig: FusionConfig): void;
@@ -1,6 +1,6 @@
1
1
  import type { DevToolsSys } from "../../core";
2
2
  import { type Credentials } from "../credentials";
3
- import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, StoreComponentDocsInput, UpdateDesignSystemInput, DesignSystemScope } from "$/ai-utils";
3
+ import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, StoreComponentDocsInput, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem } from "$/ai-utils";
4
4
  export declare const AGENT_FILE = "AGENTS.md";
5
5
  export interface UserSettings {
6
6
  isAdminInOrganization: boolean;
@@ -17,6 +17,7 @@ export declare const runCodeGen: (sys: DevToolsSys, credentials: Credentials, se
17
17
  maxTokens?: number;
18
18
  }, metadata?: any) => Promise<string>;
19
19
  export declare const getAllDesignSystems: (credentials: Credentials, userSettings: UserSettings | null, onlyEditAccess?: boolean) => Promise<DesignSystem[]>;
20
+ export declare const getDisplayDesignSystems: (credentials: Credentials) => Promise<DisplayDesignSystem[]>;
20
21
  export declare const getDesignSystemsByScope: (scope: DesignSystemScope, designSystems: DesignSystem[]) => DesignSystem[];
21
22
  export declare const getDesignSystemByName: (designSystemName: string, designSystems: DesignSystem[]) => DesignSystem | null;
22
23
  export declare const getDesignSystemByNameAndScope: (credentials: Credentials, designSystemName: string, scope: DesignSystemScope, designSystems: DesignSystem[]) => DesignSystem | null;