@builder.io/dev-tools 1.32.1-dev.202603131340.b521e1bad → 1.32.1-dev.202603131404.47db3c8d8

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.
Files changed (40) hide show
  1. package/cli/index.cjs +1268 -1166
  2. package/cli/index.cjs.map +4 -4
  3. package/core/index.cjs +1 -1
  4. package/core/index.mjs +1 -1
  5. package/node/index.cjs +1 -1
  6. package/node/index.mjs +1 -1
  7. package/package.json +1 -1
  8. package/server/index.cjs +70 -241
  9. package/server/index.mjs +70 -241
  10. package/types/_tests_/per-repo-gh-token.test.d.ts +1 -0
  11. package/types/cli/code-tools.d.ts +0 -2
  12. package/types/cli/codegen-git-snapshot.test.d.ts +1 -0
  13. package/types/cli/codegen.d.ts +9 -0
  14. package/types/cli/launch/InitStateMachine.d.ts +2 -0
  15. package/types/cli/mcp-local.d.ts +2 -2
  16. package/types/cli/repo-indexing.d.ts +17 -0
  17. package/types/cli/repo-indexing.mock.d.ts +5 -0
  18. package/types/cli/utils/codegen-utils.d.ts +1 -0
  19. package/types/cli/utils/git-snapshot.d.ts +17 -0
  20. package/types/cli/utils/git-snapshot.test.d.ts +1 -0
  21. package/types/cli/utils/git.d.ts +1 -0
  22. package/types/cli/utils/repo-indexing-group-prompts.d.ts +1 -0
  23. package/types/scripts/analyze-projects.d.ts +18 -0
  24. package/types/scripts/call-ensure-container.d.ts +4 -0
  25. package/types/scripts/check-backup.d.ts +1 -0
  26. package/types/scripts/cli.d.ts +1 -0
  27. package/types/scripts/download-projects.d.ts +12 -0
  28. package/types/scripts/utils/db.d.ts +3 -0
  29. package/types/scripts/utils/ensure-container.d.ts +7 -0
  30. package/types/scripts/utils/remove-machine-and-volume.d.ts +5 -0
  31. package/types/tsconfig.tsbuildinfo +1 -1
  32. package/types/common/logger.d.ts +0 -97
  33. package/types/core/component-map-builder.d.ts +0 -42
  34. package/types/server/source-map-resolver/cache.d.ts +0 -36
  35. package/types/server/source-map-resolver/indexed-map-resolver.d.ts +0 -10
  36. package/types/server/source-map-resolver/loader.d.ts +0 -16
  37. package/types/server/source-map-resolver/security.d.ts +0 -21
  38. package/types/server/source-map-resolver/types.d.ts +0 -41
  39. package/types/server/source-map-resolver/validation.d.ts +0 -16
  40. package/types/server/source-map-resolver.d.ts +0 -25
@@ -0,0 +1 @@
1
+ export {};
@@ -4,7 +4,6 @@ import { type DevServerOrchestrator } from "./launch/dev-server-orchestrator";
4
4
  import type { CodeGenEventEmitter } from "./codegen";
5
5
  import { CodeGenSession } from "./codegen";
6
6
  import type { Credentials } from "./credentials";
7
- import type { Logger } from "../common/logger";
8
7
  import type { LocalMCPClientManager } from "./mcp-local";
9
8
  import type { createFusionStatusMonitor } from "./launch/machine-health";
10
9
  export interface LLMToolCalls {
@@ -21,7 +20,6 @@ export interface ToolResolution {
21
20
  }
22
21
  export interface ToolContext {
23
22
  debug: boolean;
24
- logger: Logger;
25
23
  sys: DevToolsSys;
26
24
  credentials: Credentials;
27
25
  asyncSubAgents: boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -62,6 +62,8 @@ export interface CodeGenSessionOptionsBase {
62
62
  includeMemories?: boolean;
63
63
  fusionStatusMonitor?: FusionStatusMonitor;
64
64
  asyncSubAgents?: boolean;
65
+ /** Per-repo GitHub tokens from init phase (relative repo path → token) */
66
+ initialRepoTokens?: ReadonlyMap<string, string>;
65
67
  }
66
68
  export interface CodeGenSessionOptionsSession extends CodeGenSessionOptionsBase {
67
69
  sessionOrCompletionId?: string;
@@ -96,6 +98,13 @@ export declare class CodeGenSession {
96
98
  get gitEnabledFolders(): WorkspaceFolder[];
97
99
  /** Returns runtime git repo contexts for all enabled repos */
98
100
  get gitRepoContexts(): readonly GitRepoContext[];
101
+ getGhTokenForPath(workingDir: string): string | undefined;
102
+ /**
103
+ * Returns a map of all per-repo tokens keyed by repo path.
104
+ * Used to inject all tokens into environments where the target repo
105
+ * isn't known upfront (e.g. user terminals at workspace root).
106
+ */
107
+ getAllRepoTokens(): Map<string, string>;
99
108
  get workingDirectory(): string;
100
109
  get bashWorkingDirectory(): string;
101
110
  getSessionMode(): SessionMode;
@@ -88,6 +88,8 @@ export declare class InitStateMachine {
88
88
  private initializeGitRepo;
89
89
  private fetchGitConfigsOnce;
90
90
  private applyGitConfig;
91
+ /** Returns a read-only view of the per-repo token map (path → token). */
92
+ get repoTokenMap(): ReadonlyMap<string, string>;
91
93
  runInitializationCommand({ repo, tempCloningDir, repoPath, initCommand, }: {
92
94
  repo: ValidatedWorkspaceFolder;
93
95
  tempCloningDir: string;
@@ -74,7 +74,7 @@ export interface LocalMCPClientManager {
74
74
  /**
75
75
  * Create a local MCP client manager from server definitions
76
76
  */
77
- export declare function createLocalMCPClientManager(servers: MCPServerDefinition[], sys: DevToolsSys, workingDirectory: string, signal?: AbortSignal): Promise<LocalMCPClientManager>;
77
+ export declare function createLocalMCPClientManager(servers: MCPServerDefinition[], sys: DevToolsSys, workingDirectory: string, debug: boolean, signal?: AbortSignal): Promise<LocalMCPClientManager>;
78
78
  /**
79
79
  * Apply environment variable substitution to MCP server configuration
80
80
  * This is separated from loadMCPConfig to allow easy unit testing
@@ -91,4 +91,4 @@ export declare function applyEnvSubstitutionRemote(serverConfig: Omit<MCPServerR
91
91
  * If a server with the same name exists in both, fusionConfig takes precedence
92
92
  * Supports both stdio (command-based) and remote (http/sse) server definitions
93
93
  */
94
- export declare function loadMCPConfig(sys: DevToolsSys, workingDirectory: string, serverConfigs: MCPServerConfig, autoImportLocalMCPs: boolean, signal?: AbortSignal): Promise<MCPServerDefinition[]>;
94
+ export declare function loadMCPConfig(sys: DevToolsSys, workingDirectory: string, serverConfigs: MCPServerConfig, autoImportLocalMCPs: boolean, debug?: boolean, signal?: AbortSignal): Promise<MCPServerDefinition[]>;
@@ -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
+ };
@@ -95,4 +95,5 @@ export declare function generateGitStatusReminder(gitStatus: GenerateCompletionS
95
95
  trigger: "session-start" | "sync-success" | "push-success" | "pull-success";
96
96
  syncedBranches?: string[];
97
97
  pushedToRemote?: boolean;
98
+ hasGhToken?: boolean;
98
99
  }): string;
@@ -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 {};
@@ -3,6 +3,7 @@ import type { Credentials } from "../credentials";
3
3
  import type { GitConfigs, GitDiagnostics } from "$/ai-utils";
4
4
  export interface RunCommandOptions {
5
5
  cwd?: string;
6
+ debug?: boolean;
6
7
  sys: DevToolsSys;
7
8
  timeout?: number;
8
9
  skipLogging?: boolean;
@@ -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>;