@builder.io/dev-tools 1.28.8-dev.202602231640.c42808f8a → 1.28.9-dev.202602241603.943fe65da

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.
@@ -18,6 +18,8 @@ interface BackupGitRepoOptions {
18
18
  debug: boolean;
19
19
  forcedFullBackup: boolean;
20
20
  canAbortMerge: boolean;
21
+ folderName?: string;
22
+ repoUrl?: string;
21
23
  }
22
24
  /**
23
25
  * Creates a backup of git repository changes made by the AI system.
@@ -31,7 +33,7 @@ interface BackupGitRepoOptions {
31
33
  * The aiBranch is where the AI creates commits as work progresses, while featureBranch
32
34
  * is the base branch where work started (usually "main").
33
35
  */
34
- export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, forcedFullBackup, canAbortMerge, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
36
+ export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, forcedFullBackup, canAbortMerge, folderName, repoUrl, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
35
37
  type InitialCommitHashResult = {
36
38
  initialBranch: string;
37
39
  initialCommitHash: string | undefined;
@@ -55,7 +57,7 @@ type InitialCommitHashResult = {
55
57
  * For partial backups, we fetch the latest state of the chosen upstream branch from origin
56
58
  * to ensure the backup has the correct commit range reference.
57
59
  */
58
- export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, isConnectedToProvider, forcedFullBackup, credentials, projectId, }: {
60
+ export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, isConnectedToProvider, forcedFullBackup, credentials, projectId, folderName, }: {
59
61
  sys: DevToolsSys;
60
62
  repoPath: string;
61
63
  featureBranch: string;
@@ -65,6 +67,7 @@ export declare function getInitialCommitHash({ sys, repoPath, featureBranch, deb
65
67
  forcedFullBackup: boolean;
66
68
  credentials: Credentials;
67
69
  projectId: string;
70
+ folderName?: string;
68
71
  }): Promise<InitialCommitHashResult>;
69
72
  /**
70
73
  * Requests a signed upload URL for git backup
@@ -19,6 +19,7 @@ export interface ToolResolution {
19
19
  title?: string;
20
20
  }
21
21
  export interface ToolContext {
22
+ debug: boolean;
22
23
  sys: DevToolsSys;
23
24
  credentials: Credentials;
24
25
  files: ProjectFile[];
@@ -0,0 +1 @@
1
+ export {};
@@ -1,11 +1,12 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import { type Credentials } from "./credentials";
3
- import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateUserMessage, SessionMode, UserContext, UserSource, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, SuggestedActionBuildError, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, FolderWatchEvent, MCPServerConfig, CodegenApiCreateTerminal, SyncChangesFromRemote, SearchFilesOptions, SearchFilesResult, SearchFileTreeOptions, SearchFileTreeResult, HttpServerState, ExplorationMetadataToolInput, CodegenAbortOptions, MessageUpdateOptions, GitRepoContext, SystemReminderObj, GitSnapshot } from "$/ai-utils";
3
+ import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateUserMessage, SessionMode, UserContext, UserSource, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, SuggestedActionBuildError, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, FolderWatchEvent, MCPServerConfig, CodegenApiCreateTerminal, SyncChangesFromRemote, SearchFilesOptions, SearchFilesResult, SearchFileTreeOptions, SearchFileTreeResult, HttpServerState, ExplorationMetadataToolInput, CodegenAbortOptions, MessageUpdateOptions, GitRepoContext, SystemReminderObj, GitSnapshot, AutoPushMode } from "$/ai-utils";
4
4
  import { type ToolResolution } from "./code-tools";
5
5
  import { type SubAgent } from "./utils/agent-discovery";
6
6
  import EventEmitter from "node:events";
7
7
  import { type RunCommandOptions } from "./utils/git";
8
8
  import { type DevServerOrchestrator } from "./launch/dev-server-orchestrator";
9
+ import { type MemorySummary } from "./utils/memory-sync";
9
10
  import type { FusionStatusMonitor } from "./launch/machine-health";
10
11
  export interface SyncChangesFromBranches {
11
12
  canPush: boolean;
@@ -98,9 +99,15 @@ export declare class CodeGenSession {
98
99
  getSessionMode(): SessionMode;
99
100
  switchSessionMode(newMode: SessionMode): Promise<void>;
100
101
  removeSystemReminder(tag: string): void;
102
+ /**
103
+ * Returns memories whose glob matches the given file path, excluding ones
104
+ * already injected this session. Marks returned memories as reminded.
105
+ */
106
+ getMemoriesForFile(filePath: string): MemorySummary[];
101
107
  queueSystemReminder(reminder: SystemReminderObj): {
102
108
  operation: string;
103
109
  };
110
+ setDefaultAutoPush(autoPush: AutoPushMode | undefined): void;
104
111
  setPrivacyMode(privacyMode: PrivacyMode | undefined): Promise<void>;
105
112
  initializeSession(opts?: {
106
113
  skipSessionLoading?: boolean;
@@ -395,12 +402,11 @@ export declare class CodeGenSession {
395
402
  *
396
403
  * @returns commit hash if committed, false if no changes or staged only
397
404
  */
398
- commitWorkInProgress(defaultCommitMessage: string, changedFiles: string[]): Promise<null>;
405
+ commitWorkInProgress(defaultCommitMessage: string, changedFiles: string[]): Promise<void>;
399
406
  getChangesReport(): Promise<{
400
407
  diff: string;
401
408
  files: string[];
402
409
  } | undefined>;
403
- isCleanWorkTree(repoPath?: string): Promise<boolean>;
404
410
  /**
405
411
  * Resolves a workspace file path to its actual file system path
406
412
  * @param filePath A file path that may include a workspace prefix (e.g., "workspace1/path/to/file.js")
@@ -0,0 +1,5 @@
1
+ import type { DevToolsSys } from "../types";
2
+ import type { CLIArgs } from "./index";
3
+ import { type Credentials } from "./credentials";
4
+ export declare const runCodeIndexing: (_sys: DevToolsSys, _args: CLIArgs) => Promise<void>;
5
+ export declare const codeIndexing: (sys: DevToolsSys, credentials: Credentials) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ export declare const getKVHiddenComment: (key: string, value: string) => string;
2
+ export declare const getPreviewUrl: (projectId: string, branchName: string) => string;
3
+ export declare const getInitialDescription: (projectId: string, branchName: string) => string;
@@ -0,0 +1,17 @@
1
+ import type { DevToolsSys } from "../types";
2
+ import type { CLIArgs } from "./index";
3
+ export interface RepoIndexingDoc {
4
+ name: string;
5
+ content: string | {
6
+ name: string;
7
+ description: string;
8
+ components: string[];
9
+ relevantFiles: string[];
10
+ }[];
11
+ createdDate: string;
12
+ description: string;
13
+ id: string;
14
+ ownerId: string;
15
+ userId: string;
16
+ }
17
+ export declare const runRepoIndexing: (sys: DevToolsSys, args: CLIArgs) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ export declare const mockDeps: {
2
+ getStoredComponentDocs: () => Promise<never[]>;
3
+ storeComponentDocs: () => Promise<{}>;
4
+ runCodeGen: () => Promise<string>;
5
+ };
@@ -0,0 +1,12 @@
1
+ export interface DevServerUrlInfo {
2
+ url: string;
3
+ port: number;
4
+ }
5
+ /**
6
+ * Parse dev server output to extract URL and port information
7
+ *
8
+ * @param output - The command output string to parse
9
+ * @param customPatterns - Optional array of custom regex patterns to try first
10
+ * @returns Object with url and port, or null if no valid URL found
11
+ */
12
+ export declare function parseDevServerOutput(output: string, customPatterns?: string[]): DevServerUrlInfo | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Parse multi-repo snapshot: "folder1:hash1,folder2:hash2" → { folder1: "hash1", ... }
3
+ * Backward compat: "abc123" (no colon) → { [primaryFolderName]: "abc123" }
4
+ */
5
+ export declare function parseGitSnapshot(snapshot: string | undefined, primaryFolderName?: string): Record<string, string>;
6
+ /**
7
+ * Serialize commits: { folder1: "hash1", ... } → "folder1:hash1,folder2:hash2"
8
+ * For single-repo, returns the full format with folder name
9
+ */
10
+ export declare function serializeGitSnapshot(commits: Record<string, string>): string;
11
+ /**
12
+ * Get commit for specific folder from snapshot
13
+ * @param snapshot - The snapshot string to parse
14
+ * @param folderName - The folder name to look up
15
+ * @param primaryFolderName - The primary folder name for parsing old format (optional, defaults to "code")
16
+ */
17
+ export declare function getCommitFromSnapshot(snapshot: string | undefined, folderName: string, primaryFolderName?: string): string | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import type { DevToolsSys } from "../../core";
2
+ import type { Credentials } from "../credentials";
3
+ export interface MemorySummary {
4
+ id: string;
5
+ category: string;
6
+ memory: string;
7
+ when: string;
8
+ glob: string | null;
9
+ updatedAt: number;
10
+ }
11
+ /**
12
+ * Find memories whose glob pattern matches a given file path.
13
+ * Uses minimatch for glob matching, with a fallback to substring check for plain paths.
14
+ */
15
+ export declare function matchMemoriesForFile(memories: MemorySummary[], filePath: string): MemorySummary[];
16
+ /**
17
+ * Fetch all memories for the current project.
18
+ * Returns an empty array on error to avoid blocking session initialization.
19
+ */
20
+ export declare function loadMemories(sys: DevToolsSys, credentials: Credentials, projectId: string, signal?: AbortSignal): Promise<MemorySummary[]>;
21
+ /**
22
+ * Write memories to `.builder/memories/` as markdown files grouped by category.
23
+ * Errors are silently swallowed to avoid blocking session initialization.
24
+ */
25
+ export declare function syncMemoriesToDisk(sys: DevToolsSys, memories: MemorySummary[], rootDir: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare const REPO_INDEXING_GROUP_PROMPT: string;
@@ -0,0 +1,18 @@
1
+ export declare function analyzeProjects(inputPath?: string): Promise<{
2
+ success: boolean;
3
+ error: string;
4
+ projectsCount?: undefined;
5
+ branchesCount?: undefined;
6
+ csvRowsCount?: undefined;
7
+ outputPath?: undefined;
8
+ } | {
9
+ success: boolean;
10
+ projectsCount: number;
11
+ branchesCount: number;
12
+ csvRowsCount: number;
13
+ outputPath: string;
14
+ error?: undefined;
15
+ }>;
16
+ export declare function handleAnalyzeProjects(args: {
17
+ inputPath?: string;
18
+ }): Promise<void>;
@@ -0,0 +1,4 @@
1
+ export declare function handleCallEnsureContainer(args: {
2
+ appName: string;
3
+ branchName: string;
4
+ }): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function handleCheckBackup(): Promise<void>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare function downloadProjects(): Promise<{
2
+ success: boolean;
3
+ count: number;
4
+ outputPath: string;
5
+ error?: undefined;
6
+ } | {
7
+ success: boolean;
8
+ error: string;
9
+ count?: undefined;
10
+ outputPath?: undefined;
11
+ }>;
12
+ export declare function handleDownloadProjects(): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import admin from "firebase-admin";
2
+ export declare const db: admin.firestore.Firestore;
3
+ export declare const storage: admin.storage.Storage;
@@ -0,0 +1,7 @@
1
+ export declare function ensureContainer(projectId: string, branchName: string): Promise<{
2
+ success: boolean;
3
+ error?: undefined;
4
+ } | {
5
+ success: boolean;
6
+ error: any;
7
+ }>;
@@ -0,0 +1,5 @@
1
+ export declare function forceRemoveMachineAndVolume({ projectId, branchName, shouldDeleteVolume, }: {
2
+ projectId: string;
3
+ branchName: string;
4
+ shouldDeleteVolume?: boolean;
5
+ }): Promise<void>;