@builder.io/dev-tools 1.25.0-dev.202602091727.eacc0b043 → 1.26.0-dev.202602091901.45f4b8d8b

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 (228) hide show
  1. package/cli/index.cjs +1698 -406
  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 +3 -3
  8. package/server/index.cjs +16 -90
  9. package/server/index.mjs +16 -90
  10. package/types/_tests_/utils.d.ts +48 -35
  11. package/types/cli/abort-signal-any.d.ts +3 -1
  12. package/types/cli/auth/auth-utils.d.ts +3 -1
  13. package/types/cli/auth/auth.d.ts +5 -1
  14. package/types/cli/backup.d.ts +114 -60
  15. package/types/cli/builder-add/interface.d.ts +21 -4
  16. package/types/cli/code-file-utils.d.ts +11 -8
  17. package/types/cli/code.d.ts +13 -3
  18. package/types/cli/codegen.d.ts +9 -1
  19. package/types/cli/credentials.d.ts +61 -45
  20. package/types/cli/detectors/nextjs.d.ts +4 -1
  21. package/types/cli/detectors/svelte.d.ts +4 -1
  22. package/types/cli/detectors/vue.d.ts +4 -1
  23. package/types/cli/doctor/doctor.d.ts +3 -0
  24. package/types/cli/download.d.ts +9 -4
  25. package/types/cli/dsi-mcp.d.ts +4 -1
  26. package/types/cli/figma-publish.d.ts +34 -17
  27. package/types/cli/figma-utils.d.ts +51 -21
  28. package/types/cli/figma.d.ts +9 -2
  29. package/types/cli/generate.d.ts +14 -11
  30. package/types/cli/incremental-tsc.d.ts +19 -7
  31. package/types/cli/index.d.ts +154 -154
  32. package/types/cli/launch/config.d.ts +13 -3
  33. package/types/cli/launch/dry-run-backup.d.ts +14 -7
  34. package/types/cli/launch/errors.d.ts +7 -2
  35. package/types/cli/launch/grafana.d.ts +5 -1
  36. package/types/cli/launch/helpers.d.ts +19 -10
  37. package/types/cli/launch/machine-health.d.ts +8 -3
  38. package/types/cli/launch/proxy.d.ts +11 -4
  39. package/types/cli/launch/server.d.ts +19 -12
  40. package/types/cli/launch/vscode-tunnel-manager.d.ts +77 -68
  41. package/types/cli/launch.d.ts +109 -106
  42. package/types/cli/prettier.d.ts +9 -2
  43. package/types/cli/repo-connect/env-collector.d.ts +16 -11
  44. package/types/cli/repo-connect/file-collector.d.ts +22 -15
  45. package/types/cli/repo-connect/git-detector.d.ts +13 -11
  46. package/types/cli/repo-connect/install-runner.d.ts +8 -5
  47. package/types/cli/repo-connect/package-detector.d.ts +12 -8
  48. package/types/cli/repo-connect/repo-connect.d.ts +4 -1
  49. package/types/cli/repo-indexing/component-discovery.d.ts +30 -17
  50. package/types/cli/repo-indexing/icons.d.ts +36 -24
  51. package/types/cli/repo-indexing/installation.d.ts +22 -14
  52. package/types/cli/repo-indexing/repo-indexing-utils.d.ts +138 -79
  53. package/types/cli/repo-indexing/repo-indexing.d.ts +37 -17
  54. package/types/cli/repo-indexing/repo-indexing.mock.d.ts +3 -3
  55. package/types/cli/repo-indexing/tokens.d.ts +44 -25
  56. package/types/cli/repo-metrics-utils.d.ts +13 -5
  57. package/types/cli/repo-metrics.d.ts +4 -1
  58. package/types/cli/report/figma-report.d.ts +63 -36
  59. package/types/cli/server-ws.d.ts +40 -32
  60. package/types/cli/spinner.d.ts +4 -4
  61. package/types/cli/track.d.ts +4 -1
  62. package/types/cli/utils/agent-discovery.d.ts +10 -5
  63. package/types/cli/utils/agent-parser.d.ts +0 -6
  64. package/types/cli/utils/codegen-utils.d.ts +10 -1
  65. package/types/cli/utils/component-group-mdx-prompt.d.ts +2 -1
  66. package/types/cli/utils/discovery-test-utils.d.ts +3 -1
  67. package/types/cli/utils/env-capture.d.ts +21 -15
  68. package/types/cli/utils/env-substitution.d.ts +4 -1
  69. package/types/cli/utils/feature-flags.d.ts +3 -1
  70. package/types/cli/utils/file-overrides-manager.d.ts +39 -23
  71. package/types/cli/utils/git.d.ts +28 -16
  72. package/types/cli/utils/hosts-file-manager.d.ts +7 -4
  73. package/types/cli/utils/lock-file.d.ts +10 -7
  74. package/types/cli/utils/parseGitDiff.d.ts +4 -1
  75. package/types/cli/utils/process-tracker.d.ts +85 -51
  76. package/types/cli/utils/rules-discovery.d.ts +10 -5
  77. package/types/cli/utils/rules-parser.d.ts +5 -1
  78. package/types/cli/utils/terminal-buffer.d.ts +23 -23
  79. package/types/cli/utils/workspace-path-resolver.d.ts +23 -16
  80. package/types/cli/utils/yaml-frontmatter.d.ts +10 -6
  81. package/types/client/client-api.d.ts +42 -10
  82. package/types/client/edit-button/document-listeners.d.ts +3 -1
  83. package/types/client/edit-button/index.d.ts +6 -6
  84. package/types/client/menu/index.d.ts +3 -3
  85. package/types/client/menu/pages/component-detail.d.ts +8 -2
  86. package/types/client/menu/pages/component-input.d.ts +5 -1
  87. package/types/client/menu/pages/component-list.d.ts +4 -1
  88. package/types/client/menu/toggle/menu-toggle.d.ts +4 -1
  89. package/types/client/setup-ui/overview.d.ts +2 -2
  90. package/types/client/tracking.d.ts +11 -11
  91. package/types/client/utils.d.ts +5 -3
  92. package/types/common/ast/app-dependencies.d.ts +8 -2
  93. package/types/common/ast/component-info.d.ts +26 -6
  94. package/types/common/ast/component-input-types.d.ts +28 -9
  95. package/types/common/ast/component-registry.d.ts +23 -8
  96. package/types/common/ast/convert-values.d.ts +40 -8
  97. package/types/common/ast/ensure-array-statement.d.ts +7 -3
  98. package/types/common/ast/ensure-comments.d.ts +5 -1
  99. package/types/common/ast/ensure-imports.d.ts +10 -5
  100. package/types/common/ast/exported-statements.d.ts +8 -4
  101. package/types/common/ast/imported-statements.d.ts +5 -1
  102. package/types/common/ast/normalize-statements.d.ts +12 -3
  103. package/types/common/ast/remove-unused-imports.d.ts +4 -1
  104. package/types/common/ast/transform.d.ts +13 -3
  105. package/types/common/ast/utils.d.ts +42 -19
  106. package/types/common/builder/builder-api.d.ts +32 -23
  107. package/types/common/builder/builder-sdks.d.ts +10 -8
  108. package/types/common/builder/content-generation.d.ts +10 -7
  109. package/types/common/builder/content-ids.d.ts +2 -1
  110. package/types/common/cache.d.ts +4 -1
  111. package/types/common/constants.d.ts +2 -1
  112. package/types/common/dotenv.d.ts +24 -5
  113. package/types/common/errors.d.ts +50 -22
  114. package/types/common/fs.d.ts +17 -4
  115. package/types/common/interactive-select-files.d.ts +16 -2
  116. package/types/common/mem-sys.d.ts +7 -5
  117. package/types/common/node-request.d.ts +4 -4
  118. package/types/common/path.d.ts +1 -3
  119. package/types/common/test-utils.d.ts +21 -7
  120. package/types/common/typescript.d.ts +26 -7
  121. package/types/common/utils.d.ts +36 -8
  122. package/types/core/adapters/angular/angular-api-key.d.ts +29 -6
  123. package/types/core/adapters/angular/angular-app-module-imports.d.ts +12 -2
  124. package/types/core/adapters/angular/angular-app-routes-update.d.ts +6 -1
  125. package/types/core/adapters/angular/angular-components.d.ts +40 -12
  126. package/types/core/adapters/angular/angular-ensure-builder-setup.d.ts +9 -3
  127. package/types/core/adapters/angular/angular-ensure-config-plugin.d.ts +16 -4
  128. package/types/core/adapters/angular/angular-fix-tsconfig.d.ts +3 -1
  129. package/types/core/adapters/angular/angular-registry-parse.d.ts +22 -10
  130. package/types/core/adapters/angular/angular-registry.d.ts +15 -2
  131. package/types/core/adapters/angular/angular-test-utils.d.ts +8 -4
  132. package/types/core/adapters/angular/index.d.ts +20 -12
  133. package/types/core/adapters/angular/types.d.ts +5 -5
  134. package/types/core/adapters/next/index.d.ts +26 -18
  135. package/types/core/adapters/next/next-api-key.d.ts +4 -1
  136. package/types/core/adapters/next/next-component-info.d.ts +9 -2
  137. package/types/core/adapters/next/next-components.d.ts +4 -1
  138. package/types/core/adapters/next/next-ensure-builder-setup.d.ts +6 -2
  139. package/types/core/adapters/next/next-ensure-config-plugin.d.ts +5 -1
  140. package/types/core/adapters/next/next-registry-parse.d.ts +21 -8
  141. package/types/core/adapters/next/next-registry.d.ts +15 -2
  142. package/types/core/adapters/next/next-test-utils.d.ts +21 -11
  143. package/types/core/adapters/qwik-city/index.d.ts +14 -6
  144. package/types/core/adapters/qwik-city/qwik-api-key.d.ts +4 -1
  145. package/types/core/adapters/qwik-city/qwik-component-source-inputs.d.ts +4 -1
  146. package/types/core/adapters/qwik-city/qwik-components.d.ts +23 -8
  147. package/types/core/adapters/qwik-city/qwik-ensure-builder-setup.d.ts +6 -2
  148. package/types/core/adapters/qwik-city/qwik-ensure-config-plugin.d.ts +5 -1
  149. package/types/core/adapters/qwik-city/qwik-registry-parse.d.ts +22 -10
  150. package/types/core/adapters/qwik-city/qwik-registry.d.ts +15 -2
  151. package/types/core/adapters/qwik-city/qwik-test-utils.d.ts +8 -4
  152. package/types/core/adapters/qwik-city/qwik-ts-program.d.ts +3 -1
  153. package/types/core/adapters/react/index.d.ts +19 -11
  154. package/types/core/adapters/react/react-api-key.d.ts +4 -1
  155. package/types/core/adapters/react/react-builder-sdk-setup.d.ts +3 -1
  156. package/types/core/adapters/react/react-component-info.d.ts +9 -2
  157. package/types/core/adapters/react/react-components.d.ts +37 -11
  158. package/types/core/adapters/react/react-ensure-builder-setup.d.ts +6 -2
  159. package/types/core/adapters/react/react-registry-parse.d.ts +21 -8
  160. package/types/core/adapters/react/react-registry.d.ts +15 -2
  161. package/types/core/adapters/react/react-test-utils.d.ts +11 -5
  162. package/types/core/adapters/react/react-ts-program.d.ts +3 -1
  163. package/types/core/adapters/remix/index.d.ts +19 -11
  164. package/types/core/adapters/remix/remix-api-key.d.ts +4 -1
  165. package/types/core/adapters/remix/remix-components.d.ts +4 -1
  166. package/types/core/adapters/remix/remix-ensure-builder-setup.d.ts +9 -3
  167. package/types/core/adapters/remix/remix-ensure-config-plugin.d.ts +5 -1
  168. package/types/core/adapters/remix/remix-registry-parse.d.ts +22 -10
  169. package/types/core/adapters/remix/remix-registry.d.ts +15 -2
  170. package/types/core/adapters/remix/remix-test-utils.d.ts +11 -5
  171. package/types/core/adapters/vite/vite-ensure-config-plugin.d.ts +12 -2
  172. package/types/core/adapters/vue/index.d.ts +20 -12
  173. package/types/core/adapters/vue/vue-api-key.d.ts +4 -1
  174. package/types/core/adapters/vue/vue-components.d.ts +10 -2
  175. package/types/core/adapters/vue/vue-ensure-builder-setup.d.ts +7 -3
  176. package/types/core/adapters/vue/vue-registry-parse.d.ts +19 -9
  177. package/types/core/adapters/vue/vue-registry.d.ts +6 -3
  178. package/types/core/adapters/webpack/webpack-config-helpers.d.ts +8 -3
  179. package/types/core/adapters/webpack/webpack-ensure-config-plugin.d.ts +5 -1
  180. package/types/core/create-dev-tools.d.ts +4 -1
  181. package/types/core/detect-frameworks.d.ts +7 -2
  182. package/types/core/ensure-config-plugin.d.ts +6 -2
  183. package/types/core/find-dependencies.d.ts +6 -3
  184. package/types/core/import-export-registry.d.ts +9 -2
  185. package/types/core/index.d.ts +18 -3
  186. package/types/figma/index.d.ts +95 -64
  187. package/types/node/node-sys.d.ts +13 -6
  188. package/types/remix/index.d.ts +5 -3
  189. package/types/server/auth.d.ts +4 -1
  190. package/types/server/builder-connect.d.ts +21 -6
  191. package/types/server/client-script.d.ts +6 -2
  192. package/types/server/create-dev-tools-server.d.ts +3 -1
  193. package/types/server/dev-tools-api.d.ts +4 -1
  194. package/types/server/dev-tools-http-server.d.ts +3 -1
  195. package/types/server/index.d.ts +28 -1
  196. package/types/server/request-handler.d.ts +6 -1
  197. package/types/tsconfig.tsbuildinfo +1 -1
  198. package/types/types/codegen-server.d.ts +1 -1
  199. package/types/types/connection-tracker.d.ts +34 -34
  200. package/types/types/proxy-middleware.d.ts +25 -15
  201. package/types/types/websocket-types.d.ts +9 -7
  202. package/types/types.d.ts +387 -358
  203. package/types/vite/main.d.ts +1 -1
  204. package/types/webpack/main.d.ts +5 -5
  205. package/vendors/darwin-arm64/complete/rg.bash +783 -0
  206. package/vendors/darwin-arm64/complete/rg.fish +175 -0
  207. package/vendors/darwin-arm64/doc/rg.1 +2178 -0
  208. package/vendors/darwin-arm64/rg +0 -0
  209. package/vendors/darwin-x64/complete/rg.bash +783 -0
  210. package/vendors/darwin-x64/complete/rg.fish +175 -0
  211. package/vendors/darwin-x64/doc/rg.1 +2178 -0
  212. package/vendors/darwin-x64/rg +0 -0
  213. package/vendors/linux-arm64/complete/rg.bash +783 -0
  214. package/vendors/linux-arm64/complete/rg.fish +175 -0
  215. package/vendors/linux-arm64/doc/rg.1 +2178 -0
  216. package/vendors/linux-arm64/rg +0 -0
  217. package/vendors/linux-x64/complete/rg.bash +783 -0
  218. package/vendors/linux-x64/complete/rg.fish +175 -0
  219. package/vendors/linux-x64/doc/rg.1 +2178 -0
  220. package/vendors/linux-x64/rg +0 -0
  221. package/vendors/win32-x64/rg.exe +0 -0
  222. package/types/cli/indexing.d.ts +0 -5
  223. package/types/cli/launch/github.d.ts +0 -3
  224. package/types/cli/repo-indexing.d.ts +0 -17
  225. package/types/cli/repo-indexing.mock.d.ts +0 -5
  226. package/types/cli/utils/dev-server-url-parser.d.ts +0 -12
  227. package/types/cli/utils/dev-server-url-parser.test.d.ts +0 -1
  228. package/types/cli/utils/repo-indexing-group-prompts.d.ts +0 -1
@@ -9,34 +9,40 @@ export declare function binaryExists(): boolean;
9
9
  */
10
10
  export declare function getBinaryPath(): string | null;
11
11
  interface CLI {
12
- output(): string;
13
- consumeOutput(): string;
14
- inputText(text: string): Promise<void>;
15
- inputEnter(text?: string): Promise<void>;
16
- inputArrowUp(): Promise<void>;
17
- inputArrowDown(): Promise<void>;
18
- inputArrowRight(): Promise<void>;
19
- inputArrowLeft(): Promise<void>;
20
- inputCtrlC(): Promise<void>;
21
- inputSpace(): Promise<void>;
22
- waitUntilText(text: string, timeout?: number): Promise<void>;
23
- waitUntilExit(): Promise<number>;
24
- wait(ms: number): Promise<void>;
25
- getProjectPath(): string;
26
- writeFile(path: string, content: string): Promise<void>;
27
- readFile(path: string): string;
28
- exists(path: string): boolean;
29
- readdir(path: string): string[];
30
- fsSnapshot(path: string): Promise<Snapshot>;
31
- fsDiff(oldSnap: Snapshot): Promise<{
32
- added: string[];
33
- removed: string[];
34
- modified: string[];
35
- }>;
36
- npm(...args: string[]): Promise<number>;
37
- spawn(command: string, args: string[]): Promise<number>;
12
+ output(): string;
13
+ consumeOutput(): string;
14
+ inputText(text: string): Promise<void>;
15
+ inputEnter(text?: string): Promise<void>;
16
+ inputArrowUp(): Promise<void>;
17
+ inputArrowDown(): Promise<void>;
18
+ inputArrowRight(): Promise<void>;
19
+ inputArrowLeft(): Promise<void>;
20
+ inputCtrlC(): Promise<void>;
21
+ inputSpace(): Promise<void>;
22
+ waitUntilText(text: string, timeout?: number): Promise<void>;
23
+ waitUntilExit(): Promise<number>;
24
+ wait(ms: number): Promise<void>;
25
+ getProjectPath(): string;
26
+ writeFile(path: string, content: string): Promise<void>;
27
+ readFile(path: string): string;
28
+ exists(path: string): boolean;
29
+ readdir(path: string): string[];
30
+ fsSnapshot(path: string): Promise<Snapshot>;
31
+ fsDiff(oldSnap: Snapshot): Promise<{
32
+ added: string[];
33
+ removed: string[];
34
+ modified: string[];
35
+ }>;
36
+ npm(...args: string[]): Promise<number>;
37
+ spawn(command: string, args: string[]): Promise<number>;
38
38
  }
39
- export declare function testCLI(name: string, template: string | undefined, handler: (cli: Handler, expect: ExpectStatic) => Promise<void>, timeout?: number, skip?: boolean): void;
39
+ export declare function testCLI(
40
+ name: string,
41
+ template: string | undefined,
42
+ handler: (cli: Handler, expect: ExpectStatic) => Promise<void>,
43
+ timeout?: number,
44
+ skip?: boolean,
45
+ ): void;
40
46
  /**
41
47
  * Command types for the CLI handler:
42
48
  * - "builderio": Run via Node.js (dist/dev-tools/cli/main.cjs)
@@ -44,17 +50,24 @@ export declare function testCLI(name: string, template: string | undefined, hand
44
50
  * - "binary": Run via compiled pkg binary (dist/fusion-binaries/.../builder-fusion)
45
51
  */
46
52
  export type CLICommand = "builderio" | "create-builderio" | "binary";
47
- type Handler = (cmd: CLICommand, args: string[], options?: {
48
- debug?: boolean;
49
- }) => CLI;
50
- export declare function createCLI(template: string | undefined, handler: (cli: Handler) => Promise<void>): Promise<void>;
53
+ type Handler = (
54
+ cmd: CLICommand,
55
+ args: string[],
56
+ options?: {
57
+ debug?: boolean;
58
+ },
59
+ ) => CLI;
60
+ export declare function createCLI(
61
+ template: string | undefined,
62
+ handler: (cli: Handler) => Promise<void>,
63
+ ): Promise<void>;
51
64
  /**
52
65
  * A snapshot maps a file's relative path to its hash.
53
66
  */
54
67
  type Snapshot = {
55
- cwd: string;
56
- hashes: {
57
- [file: string]: string;
58
- };
68
+ cwd: string;
69
+ hashes: {
70
+ [file: string]: string;
71
+ };
59
72
  };
60
73
  export {};
@@ -1 +1,3 @@
1
- export declare function abortSignalAny(input: (AbortSignal | undefined)[]): AbortSignal;
1
+ export declare function abortSignalAny(
2
+ input: (AbortSignal | undefined)[],
3
+ ): AbortSignal;
@@ -1,2 +1,4 @@
1
1
  import type { Credentials } from "../credentials";
2
- export declare function getUserSettingsByUserId(credentials: Credentials): Promise<any>;
2
+ export declare function getUserSettingsByUserId(
3
+ credentials: Credentials,
4
+ ): Promise<any>;
@@ -1,3 +1,7 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { CLIArgs } from "../index";
3
- export declare const runAuthCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
3
+ export declare const runAuthCommand: (
4
+ sys: DevToolsSys,
5
+ subCommand: string,
6
+ args: CLIArgs,
7
+ ) => Promise<void>;
@@ -1,23 +1,32 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { Credentials } from "./credentials";
3
- import { type GitBackupUploadUrlResult, type GitBackupUploadUrlOptions, type GitBackupRecordOptions, type GitBackupRecordResult, type BackupMetadata, type WorkspaceConfiguration, type CodegenRuntimeStatus, type BackupGitRepoResult } from "$/ai-utils";
3
+ import {
4
+ type GitBackupUploadUrlResult,
5
+ type GitBackupUploadUrlOptions,
6
+ type GitBackupRecordOptions,
7
+ type GitBackupRecordResult,
8
+ type BackupMetadata,
9
+ type WorkspaceConfiguration,
10
+ type CodegenRuntimeStatus,
11
+ type BackupGitRepoResult,
12
+ } from "$/ai-utils";
4
13
  interface BackupGitRepoOptions {
5
- sys: DevToolsSys;
6
- credentials: Credentials;
7
- projectId: string;
8
- branchName: string;
9
- repoPath: string;
10
- aiBranch: string;
11
- featureBranch: string;
12
- workspace: WorkspaceConfiguration | undefined;
13
- /**
14
- * If true, the system is connected to the git provider.
15
- * If false, the system is offline and will not fetch any branches from origin.
16
- */
17
- isConnectedToProvider: boolean;
18
- debug: boolean;
19
- forcedFullBackup: boolean;
20
- canAbortMerge: boolean;
14
+ sys: DevToolsSys;
15
+ credentials: Credentials;
16
+ projectId: string;
17
+ branchName: string;
18
+ repoPath: string;
19
+ aiBranch: string;
20
+ featureBranch: string;
21
+ workspace: WorkspaceConfiguration | undefined;
22
+ /**
23
+ * If true, the system is connected to the git provider.
24
+ * If false, the system is offline and will not fetch any branches from origin.
25
+ */
26
+ isConnectedToProvider: boolean;
27
+ debug: boolean;
28
+ forcedFullBackup: boolean;
29
+ canAbortMerge: boolean;
21
30
  }
22
31
  /**
23
32
  * Creates a backup of git repository changes made by the AI system.
@@ -31,20 +40,35 @@ interface BackupGitRepoOptions {
31
40
  * The aiBranch is where the AI creates commits as work progresses, while featureBranch
32
41
  * is the base branch where work started (usually "main").
33
42
  */
34
- export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, forcedFullBackup, canAbortMerge, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
35
- type InitialCommitHashResult = {
36
- initialBranch: string;
37
- initialCommitHash: string | undefined;
38
- partial: false;
39
- forcedFullBackup: true;
40
- tokenRefreshFailed?: boolean;
41
- } | {
42
- initialBranch: string;
43
- initialCommitHash: string;
44
- partial: boolean;
45
- forcedFullBackup: false;
46
- tokenRefreshFailed?: boolean;
47
- };
43
+ export declare function backupGitRepo({
44
+ sys,
45
+ credentials,
46
+ projectId,
47
+ branchName,
48
+ repoPath,
49
+ aiBranch,
50
+ featureBranch,
51
+ workspace,
52
+ isConnectedToProvider,
53
+ debug,
54
+ forcedFullBackup,
55
+ canAbortMerge,
56
+ }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
57
+ type InitialCommitHashResult =
58
+ | {
59
+ initialBranch: string;
60
+ initialCommitHash: string | undefined;
61
+ partial: false;
62
+ forcedFullBackup: true;
63
+ tokenRefreshFailed?: boolean;
64
+ }
65
+ | {
66
+ initialBranch: string;
67
+ initialCommitHash: string;
68
+ partial: boolean;
69
+ forcedFullBackup: false;
70
+ tokenRefreshFailed?: boolean;
71
+ };
48
72
  /**
49
73
  * Determines the initial commit hash and whether to create a partial or full backup.
50
74
  *
@@ -55,66 +79,96 @@ type InitialCommitHashResult = {
55
79
  * For partial backups, we fetch the latest state of the chosen upstream branch from origin
56
80
  * to ensure the backup has the correct commit range reference.
57
81
  */
58
- export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, isConnectedToProvider, forcedFullBackup, credentials, projectId, }: {
59
- sys: DevToolsSys;
60
- repoPath: string;
61
- featureBranch: string;
62
- debug: boolean;
63
- workspace: WorkspaceConfiguration | undefined;
64
- isConnectedToProvider: boolean;
65
- forcedFullBackup: boolean;
66
- credentials: Credentials;
67
- projectId: string;
82
+ export declare function getInitialCommitHash({
83
+ sys,
84
+ repoPath,
85
+ featureBranch,
86
+ debug,
87
+ workspace,
88
+ isConnectedToProvider,
89
+ forcedFullBackup,
90
+ credentials,
91
+ projectId,
92
+ }: {
93
+ sys: DevToolsSys;
94
+ repoPath: string;
95
+ featureBranch: string;
96
+ debug: boolean;
97
+ workspace: WorkspaceConfiguration | undefined;
98
+ isConnectedToProvider: boolean;
99
+ forcedFullBackup: boolean;
100
+ credentials: Credentials;
101
+ projectId: string;
68
102
  }): Promise<InitialCommitHashResult>;
69
103
  /**
70
104
  * Requests a signed upload URL for git backup
71
105
  */
72
- export declare function requestSignedUploadUrl(credentials: Credentials, body: GitBackupUploadUrlOptions): Promise<GitBackupUploadUrlResult | null>;
106
+ export declare function requestSignedUploadUrl(
107
+ credentials: Credentials,
108
+ body: GitBackupUploadUrlOptions,
109
+ ): Promise<GitBackupUploadUrlResult | null>;
73
110
  /**
74
111
  * Records a successful git backup in Firebase
75
112
  */
76
- export declare function recordBackup(credentials: Credentials, body: GitBackupRecordOptions): Promise<GitBackupRecordResult>;
113
+ export declare function recordBackup(
114
+ credentials: Credentials,
115
+ body: GitBackupRecordOptions,
116
+ ): Promise<GitBackupRecordResult>;
77
117
  export interface GitBackupDownloadResultValid {
78
- success: true;
79
- partial: boolean;
80
- bundlePath: string | undefined;
81
- bundleSize: number;
82
- gitBranchName: string;
83
- lastCommitHash: string;
118
+ success: true;
119
+ partial: boolean;
120
+ bundlePath: string | undefined;
121
+ bundleSize: number;
122
+ gitBranchName: string;
123
+ lastCommitHash: string;
84
124
  }
85
125
  export interface GitBackupDownloadResultInvalid {
86
- success: false;
87
- error: Error;
126
+ success: false;
127
+ error: Error;
88
128
  }
89
- export type GitBackupDownloadResult = GitBackupDownloadResultValid | GitBackupDownloadResultInvalid;
129
+ export type GitBackupDownloadResult =
130
+ | GitBackupDownloadResultValid
131
+ | GitBackupDownloadResultInvalid;
90
132
  /**
91
133
  * Downloads a git backup bundle from remote storage.
92
134
  * Handles both empty backups (no bundle file) and regular backups with bundle files.
93
135
  * @returns The path to the downloaded bundle file, or undefined if it's an empty backup
94
136
  */
95
- export declare function downloadGitBackup(sys: DevToolsSys, response: BackupMetadata): Promise<GitBackupDownloadResult>;
137
+ export declare function downloadGitBackup(
138
+ sys: DevToolsSys,
139
+ response: BackupMetadata,
140
+ ): Promise<GitBackupDownloadResult>;
96
141
  /**
97
142
  * Uploads a file stream to a signed URL (Google Cloud Storage).
98
143
  * Uses MD5 hash for content verification as required by GCS.
99
144
  */
100
- export declare function uploadFileStream(filePath: string, signedUrl: string, size: number, contentMd5: string): Promise<Response>;
145
+ export declare function uploadFileStream(
146
+ filePath: string,
147
+ signedUrl: string,
148
+ size: number,
149
+ contentMd5: string,
150
+ ): Promise<Response>;
101
151
  export declare function computeMD5Hash(bundlePath: string): Promise<{
102
- contentMd5: string;
103
- size: number;
152
+ contentMd5: string;
153
+ size: number;
104
154
  }>;
105
155
  /**
106
156
  * Updates the last commit hash in the database for tracking purposes.
107
157
  * This is called frequently throughout the codebase (after every commit creation)
108
158
  * to track the current state and determine if backups are up-to-date.
109
159
  */
110
- export declare function setRuntimeStatus(sys: DevToolsSys, credentials: Credentials, data: CodegenRuntimeStatus): Promise<any>;
160
+ export declare function setRuntimeStatus(
161
+ sys: DevToolsSys,
162
+ credentials: Credentials,
163
+ data: CodegenRuntimeStatus,
164
+ ): Promise<any>;
111
165
  /**
112
166
  * Computes a unique backup reference string that combines version, repo URL, and commit hash.
113
167
  * This reference can be used to identify and retrieve specific backups.
114
168
  */
115
169
  export declare function computeBackupRef(input: {
116
- version: string | undefined;
117
- originalRepoUrl: string | undefined;
118
- commitHash: string | undefined;
170
+ version: string | undefined;
171
+ originalRepoUrl: string | undefined;
172
+ commitHash: string | undefined;
119
173
  }): string | undefined;
120
174
  export {};
@@ -1,5 +1,22 @@
1
- import type { AddCliOptions, FileNode, FolderNode, Snippet, SyncInfo } from "../../types";
2
- export declare function addCommand(opts: AddCliOptions): Promise<SyncInfo | undefined>;
1
+ import type {
2
+ AddCliOptions,
3
+ FileNode,
4
+ FolderNode,
5
+ Snippet,
6
+ SyncInfo,
7
+ } from "../../types";
8
+ export declare function addCommand(
9
+ opts: AddCliOptions,
10
+ ): Promise<SyncInfo | undefined>;
3
11
  export declare function fetchSnippet(id: string): Promise<Snippet | null>;
4
- export declare function writeFiles(appRootDir: string, snippet: Snippet, files: Array<FileNode | FolderNode>, rootPath: string, addSessionLink: boolean): Promise<FileNode[]>;
5
- export declare function suggestRootPath(appRootDir: string, framework: string): string;
12
+ export declare function writeFiles(
13
+ appRootDir: string,
14
+ snippet: Snippet,
15
+ files: Array<FileNode | FolderNode>,
16
+ rootPath: string,
17
+ addSessionLink: boolean,
18
+ ): Promise<FileNode[]>;
19
+ export declare function suggestRootPath(
20
+ appRootDir: string,
21
+ framework: string,
22
+ ): string;
@@ -1,8 +1,11 @@
1
- export declare function shouldIncludeFile(inputFile: string, ctx: {
2
- foundFiles: string[];
3
- allFiles: string[];
4
- selectedFilePaths: Map<string, number>;
5
- cwd: string;
6
- appRootDir: string;
7
- fallbackImportance: number | 0;
8
- }): number | 0;
1
+ export declare function shouldIncludeFile(
2
+ inputFile: string,
3
+ ctx: {
4
+ foundFiles: string[];
5
+ allFiles: string[];
6
+ selectedFilePaths: Map<string, number>;
7
+ cwd: string;
8
+ appRootDir: string;
9
+ fallbackImportance: number | 0;
10
+ },
11
+ ): number | 0;
@@ -1,7 +1,17 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
3
  import { type UserContext } from "$/ai-utils";
4
- export declare const runCodeCommand: (sys: DevToolsSys, subCommand: string, args: CLIArgs) => Promise<void>;
5
- export declare const runCodeGen: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
6
- export declare function checkProjectRoot(sys: DevToolsSys, interactive: boolean): Promise<void>;
4
+ export declare const runCodeCommand: (
5
+ sys: DevToolsSys,
6
+ subCommand: string,
7
+ args: CLIArgs,
8
+ ) => Promise<void>;
9
+ export declare const runCodeGen: (
10
+ sys: DevToolsSys,
11
+ args: CLIArgs,
12
+ ) => Promise<undefined>;
13
+ export declare function checkProjectRoot(
14
+ sys: DevToolsSys,
15
+ interactive: boolean,
16
+ ): Promise<void>;
7
17
  export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
@@ -343,7 +343,15 @@ export declare class CodeGenSession {
343
343
  waitUntilBlockingPendingPromises(signal?: AbortSignal): Promise<void>;
344
344
  waitUntilIdle(signal?: AbortSignal): Promise<void>;
345
345
  waitForEventLoop(): Promise<void>;
346
- commitWorkInProgress(lastTurn: CodegenTurn, changedFiles: string[]): Promise<string | false>;
346
+ /**
347
+ * Stages and optionally commits work in progress.
348
+ *
349
+ * When `#batchCommitsEnabled` is false (default): stages AND commits immediately.
350
+ * When `#batchCommitsEnabled` is true: only stages files, sets #pendingCommit flag.
351
+ *
352
+ * @returns commit hash if committed, false if no changes or staged only
353
+ */
354
+ commitWorkInProgress(defaultCommitMessage: string, changedFiles: string[]): Promise<string | false>;
347
355
  getChangesReport(): Promise<{
348
356
  diff: string;
349
357
  files: string[];
@@ -2,61 +2,77 @@ import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
3
  import type { Feature } from "$/ai-utils";
4
4
  export interface CredentialsOptions {
5
- forceSpaceId?: string;
6
- builderPublicKey?: boolean;
7
- builderPrivateKey?: boolean;
8
- /**
9
- * `always`: Figma auth will be required even if Figma credentials have already been set.
10
- * `if-unset`: Figma auth will be required only if Figma credentials have not been set.
11
- * `undefined` (default): Figma auth will never be required.
12
- * */
13
- requireFigmaAuth?: "always" | "if-unset";
14
- /**
15
- * If `true`, Builder.io auth will be required even if Builder.io credentials have
16
- * already been set.
17
- */
18
- force?: boolean;
5
+ forceSpaceId?: string;
6
+ builderPublicKey?: boolean;
7
+ builderPrivateKey?: boolean;
8
+ /**
9
+ * `always`: Figma auth will be required even if Figma credentials have already been set.
10
+ * `if-unset`: Figma auth will be required only if Figma credentials have not been set.
11
+ * `undefined` (default): Figma auth will never be required.
12
+ * */
13
+ requireFigmaAuth?: "always" | "if-unset";
14
+ /**
15
+ * If `true`, Builder.io auth will be required even if Builder.io credentials have
16
+ * already been set.
17
+ */
18
+ force?: boolean;
19
19
  }
20
20
  export interface FigmaAuth {
21
- access_token: string;
22
- oauth: boolean;
21
+ access_token: string;
22
+ oauth: boolean;
23
23
  }
24
24
  export interface BuilderCodegenUsage {
25
- total: number | undefined;
26
- fast: number | undefined;
27
- quality: number | undefined;
28
- features?: Feature[];
29
- limits?: {
30
- aiGeneration: number;
31
- aiGenerationContextWindow: number;
32
- };
25
+ total: number | undefined;
26
+ fast: number | undefined;
27
+ quality: number | undefined;
28
+ features?: Feature[];
29
+ limits?: {
30
+ aiGeneration: number;
31
+ aiGenerationContextWindow: number;
32
+ };
33
33
  }
34
34
  export interface BuilderAuth {
35
- privateKey: string;
36
- spaceId: string;
37
- spaceName: string;
38
- userId: string;
35
+ privateKey: string;
36
+ spaceId: string;
37
+ spaceName: string;
38
+ userId: string;
39
39
  }
40
40
  export declare const isCI: (args: CLIArgs) => boolean;
41
41
  export interface Credentials {
42
- figmaAuth?: FigmaAuth;
43
- builderPublicKey?: string;
44
- builderPrivateKey?: string;
45
- spaceName?: string;
46
- userId?: string;
47
- timestamp?: string;
42
+ figmaAuth?: FigmaAuth;
43
+ builderPublicKey?: string;
44
+ builderPrivateKey?: string;
45
+ spaceName?: string;
46
+ userId?: string;
47
+ timestamp?: string;
48
48
  }
49
- export declare const readCredentials: (sys: DevToolsSys, args: CLIArgs) => {
50
- spaceName: string | undefined;
51
- userId: string | undefined;
52
- builderPublicKey: string | undefined;
53
- builderPrivateKey: string | undefined;
54
- figmaAuth: FigmaAuth | undefined;
55
- timestamp: string | undefined;
49
+ export declare const readCredentials: (
50
+ sys: DevToolsSys,
51
+ args: CLIArgs,
52
+ ) => {
53
+ spaceName: string | undefined;
54
+ userId: string | undefined;
55
+ builderPublicKey: string | undefined;
56
+ builderPrivateKey: string | undefined;
57
+ figmaAuth: FigmaAuth | undefined;
58
+ timestamp: string | undefined;
56
59
  };
57
- export declare const getCredentials: (sys: DevToolsSys, args: CLIArgs, opts: CredentialsOptions) => Promise<Credentials>;
60
+ export declare const getCredentials: (
61
+ sys: DevToolsSys,
62
+ args: CLIArgs,
63
+ opts: CredentialsOptions,
64
+ ) => Promise<Credentials>;
58
65
  export declare function getFigmaAuth(sys: DevToolsSys): Promise<FigmaAuth>;
59
- export declare function getBuilderCodegenUsage(builderPublicKey: string, builderPrivateKey: string): Promise<BuilderCodegenUsage>;
60
- export declare function getBuilderAuth(sys: DevToolsSys, preferSpaceId?: string): Promise<BuilderAuth>;
61
- export declare function storeCredentials(sys: DevToolsSys, credentials: Credentials): void;
66
+ export declare function getBuilderCodegenUsage(
67
+ builderPublicKey: string,
68
+ builderPrivateKey: string,
69
+ ): Promise<BuilderCodegenUsage>;
70
+ export declare function getBuilderAuth(
71
+ sys: DevToolsSys,
72
+ preferSpaceId?: string,
73
+ ): Promise<BuilderAuth>;
74
+ export declare function storeCredentials(
75
+ sys: DevToolsSys,
76
+ credentials: Credentials,
77
+ ): void;
62
78
  export declare function clearCredentials(sys: DevToolsSys): boolean;
@@ -10,4 +10,7 @@ import type { GuessedSettings } from "$/ai-utils";
10
10
  * 4. package.json has a "dev" script
11
11
  * 5. The dev script includes "next dev"
12
12
  */
13
- export declare function detectNextJsSettings(basePath: string, files: string[]): Promise<GuessedSettings | null>;
13
+ export declare function detectNextJsSettings(
14
+ basePath: string,
15
+ files: string[],
16
+ ): Promise<GuessedSettings | null>;
@@ -12,4 +12,7 @@ import type { GuessedSettings } from "$/ai-utils";
12
12
  * 6. Svelte is listed as a dependency
13
13
  * 7. Either @sveltejs/kit or @sveltejs/vite-plugin-svelte is a dependency
14
14
  */
15
- export declare function detectSvelteSettings(basePath: string, files: string[]): Promise<GuessedSettings | null>;
15
+ export declare function detectSvelteSettings(
16
+ basePath: string,
17
+ files: string[],
18
+ ): Promise<GuessedSettings | null>;
@@ -14,4 +14,7 @@ import type { GuessedSettings } from "$/ai-utils";
14
14
  * Note: This detector focuses on standard Vue projects (Vue 3 + Vite or Vue 2 + CLI).
15
15
  * Nuxt projects are handled separately as a different framework.
16
16
  */
17
- export declare function detectVueSettings(basePath: string, files: string[]): Promise<GuessedSettings | null>;
17
+ export declare function detectVueSettings(
18
+ basePath: string,
19
+ files: string[],
20
+ ): Promise<GuessedSettings | null>;
@@ -0,0 +1,3 @@
1
+ import type { DevToolsSys } from "../../types.js";
2
+ import type { CLIArgs } from "../index.js";
3
+ export declare function runDoctorCommand(sys: DevToolsSys, _subCommand: string | undefined, args: CLIArgs): Promise<void>;
@@ -2,9 +2,14 @@ import type { CLIArgs } from "./index";
2
2
  import type { DevToolsSys } from "../types";
3
3
  import type { FigmaBuilderLink } from "$/ai-utils";
4
4
  interface KVGetRequest {
5
- privateKey: string;
6
- spaceId: string;
5
+ privateKey: string;
6
+ spaceId: string;
7
7
  }
8
- export declare const runFigmaMigrate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
9
- export declare function getBuilderSpaceFigmaLinks(kvReq: KVGetRequest): Promise<FigmaBuilderLink[]>;
8
+ export declare const runFigmaMigrate: (
9
+ sys: DevToolsSys,
10
+ args: CLIArgs,
11
+ ) => Promise<undefined>;
12
+ export declare function getBuilderSpaceFigmaLinks(
13
+ kvReq: KVGetRequest,
14
+ ): Promise<FigmaBuilderLink[]>;
10
15
  export {};
@@ -1,3 +1,6 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
- export declare function runDsiMcpServer(sys: DevToolsSys, args: CLIArgs): Promise<void>;
3
+ export declare function runDsiMcpServer(
4
+ sys: DevToolsSys,
5
+ args: CLIArgs,
6
+ ): Promise<void>;