@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.
- package/cli/index.cjs +4542 -2758
- 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 +2213 -647
- package/server/index.mjs +2213 -647
- package/types/cli/backup.d.ts +5 -2
- package/types/cli/code-tools.d.ts +1 -0
- package/types/cli/codegen-git-snapshot.test.d.ts +1 -0
- package/types/cli/codegen.d.ts +9 -3
- package/types/cli/indexing.d.ts +5 -0
- package/types/cli/launch/github.d.ts +3 -0
- package/types/cli/repo-indexing.d.ts +17 -0
- package/types/cli/repo-indexing.mock.d.ts +5 -0
- package/types/cli/utils/dev-server-url-parser.d.ts +12 -0
- package/types/cli/utils/dev-server-url-parser.test.d.ts +1 -0
- package/types/cli/utils/git-snapshot.d.ts +17 -0
- package/types/cli/utils/git-snapshot.test.d.ts +1 -0
- package/types/cli/utils/memory-sync.d.ts +25 -0
- package/types/cli/utils/memory-sync.test.d.ts +1 -0
- package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
- package/types/scripts/analyze-projects.d.ts +18 -0
- package/types/scripts/call-ensure-container.d.ts +4 -0
- package/types/scripts/check-backup.d.ts +1 -0
- package/types/scripts/cli.d.ts +1 -0
- package/types/scripts/download-projects.d.ts +12 -0
- package/types/scripts/utils/db.d.ts +3 -0
- package/types/scripts/utils/ensure-container.d.ts +7 -0
- package/types/scripts/utils/remove-machine-and-volume.d.ts +5 -0
- package/types/tsconfig.tsbuildinfo +1 -1
package/types/cli/backup.d.ts
CHANGED
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -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<
|
|
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,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,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 @@
|
|
|
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>;
|