builder.io 1.18.16 → 1.18.18

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.
@@ -92,6 +92,7 @@ interface RipgrepResult {
92
92
  matches: RipgrepMatch[];
93
93
  }
94
94
  export declare function runRipgrep(sys: DevToolsSys, bashWorkingDirectory: string, pattern: string, includeGlob?: string, excludeGlob?: string): Promise<RipgrepResult>;
95
+ export declare function getRipgrepExecutable(sys: DevToolsSys): Promise<string>;
95
96
  /**
96
97
  * Returns true if query is likely a string literal rather than a regex.
97
98
  * Returns false otherwise.
@@ -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, SessionMode, UserContext, UserSource, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, SuggestedActionBuildError, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, SetImportantFilesToolInput, MCPServerConfig, CodegenApiCreateTerminal, SyncChangesFromRemote } from "$/ai-utils";
3
+ import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, SessionMode, UserContext, UserSource, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, SuggestedActionBuildError, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, FolderWatchEvent, SetImportantFilesToolInput, MCPServerConfig, CodegenApiCreateTerminal, SyncChangesFromRemote, SearchFilesOptions, SearchFilesResult } from "$/ai-utils";
4
4
  import prettier from "prettier";
5
5
  import { type FusionContext, type ToolResolution } from "./code-tools";
6
6
  import { type SubAgent } from "./utils/agent-discovery";
@@ -166,6 +166,7 @@ export declare class CodeGenSession {
166
166
  deep?: number;
167
167
  truncate?: number;
168
168
  }): Promise<string[]>;
169
+ searchFiles(options: SearchFilesOptions): Promise<SearchFilesResult>;
169
170
  collectRepoMetrics(opts?: {
170
171
  rootPath?: string;
171
172
  }): Promise<RepoMetrics>;
@@ -261,6 +262,12 @@ export declare class CodeGenSession {
261
262
  stopEventLoop(): Promise<void>;
262
263
  requestRefresh(): void;
263
264
  configureDevOrchestrator(opts: ConfigureDevOrchestratorOpts): Promise<ConfigureDevOrchestratorUpdates>;
265
+ /**
266
+ * Subscribe to file change events for the entire working directory.
267
+ * Returns a dispose function to unsubscribe.
268
+ * The watcher is lazily initialized on first subscription and cleaned up on last unsubscribe.
269
+ */
270
+ subscribeToFileChanges(onEvent: (event: FolderWatchEvent) => void): () => Promise<void>;
264
271
  close(uploadGitBackup?: boolean): Promise<void>;
265
272
  emitGitStatus(): Promise<GenerateCompletionStepGit | null>;
266
273
  manualCommit(options: {
@@ -314,6 +321,23 @@ export declare class CodeGenSession {
314
321
  * @returns The file content or null if the file doesn't exist
315
322
  */
316
323
  readFile(filePath: string, skipAclCheck?: boolean): Promise<string | null>;
324
+ /**
325
+ * Gets file content at a specific git reference (e.g., origin/main, HEAD~1, commit hash)
326
+ * @param filePath - The file path relative to the workspace
327
+ * @param gitRef - The git reference (branch, commit, tag) - defaults to parent branch
328
+ * @returns The file content at that reference, or null if not found
329
+ */
330
+ getFileAtRef(filePath: string, gitRef?: string): Promise<string | null>;
331
+ /**
332
+ * Gets the diff information for a single file including full content
333
+ * @param filePath - The file path to get diff for
334
+ * @returns Object with oldContent (from parent branch) and newContent (current)
335
+ */
336
+ getSingleFileDiff(filePath: string): Promise<{
337
+ oldContent: string | null;
338
+ newContent: string | null;
339
+ action: "create" | "update" | "delete";
340
+ }>;
317
341
  /**
318
342
  * Checks if a file exists in the workspace
319
343
  * @param filePath A file path that may include a workspace prefix
@@ -69,3 +69,4 @@ export declare function mergeEnvironmentVariables(envVariables: EnvironmentVaria
69
69
  export declare function processPushChangesArgs(opts: PushChangesArgs): import("$/ai-utils").PushChangesOptions;
70
70
  export declare function getErrorMessage(err: unknown): string;
71
71
  export declare function waitImmediate(): Promise<void>;
72
+ export declare function waitRace(promise: Promise<any>, timeout: number): Promise<boolean>;
@@ -4,3 +4,4 @@
4
4
  * Keeps track of recently allocated ports to prevent race conditions
5
5
  */
6
6
  export declare function freePort(): Promise<number>;
7
+ export declare function isPortAvailable(port: number): Promise<boolean>;