builder.io 1.17.25 → 1.17.27

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.
@@ -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, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics } from "$/ai-utils";
3
+ import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, SessionMode, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult, PrivacyMode, CodeGenPosition, BackupGitRepoResult, PushChangesArgs, CodegenApiResult, CodegenApiTerminal, ConfigureDevOrchestratorOpts, ConfigureDevOrchestratorUpdates, RepoMetrics, CodegenApiCreateTerminal } from "$/ai-utils";
4
4
  import prettier from "prettier";
5
5
  import { type FusionContext, type ToolResolution } from "./code-tools";
6
6
  import EventEmitter from "node:events";
@@ -101,17 +101,7 @@ export declare class CodeGenSession {
101
101
  getAiBranch(): string;
102
102
  git(args: string[], opts?: string | RunCommandOptions): Promise<string>;
103
103
  setDebug(debug: boolean): void;
104
- createTerminal(options?: {
105
- terminalId?: string;
106
- title?: string;
107
- cwd?: string;
108
- env?: Record<string, string | undefined>;
109
- cols?: number;
110
- rows?: number;
111
- shell?: string;
112
- createdBy?: string;
113
- emitTerminals?: boolean;
114
- }): Promise<CodegenApiTerminal>;
104
+ createTerminal(options?: CodegenApiCreateTerminal): Promise<CodegenApiTerminal>;
115
105
  emitTerminals(): void;
116
106
  updateTerminal({ terminalId, cols, rows, title, }: {
117
107
  terminalId: string;
@@ -1,3 +1,4 @@
1
+ import type { DesignSystemScope } from "$/ai-utils";
1
2
  export interface CLIArgs {
2
3
  /** Figma access token */
3
4
  figmaToken?: string;
@@ -48,6 +49,8 @@ export interface CLIArgs {
48
49
  * Example: --includeDirectories "packages/foo, packages/bar"
49
50
  **/
50
51
  includeDirectories?: string;
52
+ /** The scope of the design system to index */
53
+ scope?: DesignSystemScope;
51
54
  /** Token to use for figma */
52
55
  token?: string;
53
56
  /** Url to start from */
@@ -1,7 +1,7 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { Credentials } from "../credentials";
3
- import type { WorkspaceConfiguration } from "$/ai-utils";
4
- import type { ComponentDocument, ComponentTask } from "./types";
3
+ import type { WorkspaceConfiguration, ComponentDocument } from "$/ai-utils";
4
+ import type { ComponentTask } from "./types";
5
5
  export declare const discoverComponents: (sys: DevToolsSys, credentials: Credentials, sessionId: string, remoteComponents: ComponentDocument[], opts?: {
6
6
  force?: boolean;
7
7
  designSystemPackage?: string;
@@ -1,7 +1,7 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { Credentials } from "../credentials";
3
- import type { ComponentTask, IndexDocument, Task } from "./types";
4
- import type { WorkspaceConfiguration } from "$/ai-utils";
3
+ import type { ComponentTask, Task } from "./types";
4
+ import type { WorkspaceConfiguration, IndexDocumentV1 } from "$/ai-utils";
5
5
  export declare const processComponent: (sys: DevToolsSys, credentials: Credentials, sessionId: string, component: ComponentTask, opts: {
6
6
  designSystemId: string;
7
7
  designSystemPackage?: string;
@@ -16,4 +16,4 @@ export declare const processAgent: (sys: DevToolsSys, credentials: Credentials,
16
16
  retriesAllowed?: number;
17
17
  debug?: boolean;
18
18
  }) => Promise<void>;
19
- export declare const deprecateObsoleteComponents: (credentials: Credentials, localComponents: Task[], remoteComponents: IndexDocument[]) => Promise<void>;
19
+ export declare const deprecateObsoleteComponents: (credentials: Credentials, localComponents: Task[], remoteComponents: IndexDocumentV1[]) => Promise<void>;
@@ -9,7 +9,7 @@ export declare const discoverIcons: (sys: DevToolsSys, credentials: Credentials,
9
9
  icons: string[];
10
10
  usage: string;
11
11
  hash: string | undefined;
12
- }>;
12
+ } | undefined>;
13
13
  export declare const processIcons: (credentials: Credentials, iconDiscovery: {
14
14
  icons: string[];
15
15
  usage: string;
@@ -0,0 +1,13 @@
1
+ import type { DevToolsSys } from "../../types";
2
+ import type { Credentials } from "../credentials";
3
+ import type { WorkspaceConfiguration } from "$/ai-utils";
4
+ export declare const discoverInstallation: (sys: DevToolsSys, credentials: Credentials, sessionId: string, opts: {
5
+ designSystemId: string;
6
+ designSystemPackage?: string;
7
+ designSystemVersion?: string;
8
+ workspaceConfig?: WorkspaceConfiguration;
9
+ debug?: boolean;
10
+ }) => Promise<{
11
+ hash: string;
12
+ relevantFiles: string[];
13
+ } | undefined>;
@@ -1,21 +1,21 @@
1
1
  import type { DevToolsSys } from "../../core";
2
2
  import { type Credentials } from "../credentials";
3
- import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem } from "$/ai-utils";
4
- import type { IndexDocument } from "./types";
3
+ import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem, IndexDocumentV1 } from "$/ai-utils";
5
4
  export declare const AGENT_FILE = "AGENTS.md";
6
5
  export declare const ICONS_FILE = "icons.mdx";
7
6
  export declare const TOKENS_FILE = "tokens.mdx";
7
+ export declare const INSTALLATION_FILE = "installation.md";
8
8
  export declare const REPO_INDEXING_FOLDER = "repo-indexing";
9
9
  export interface UserSettings {
10
10
  isAdminInOrganization: boolean;
11
11
  email: string;
12
12
  }
13
- export declare const promptForDesignSystemScope: (credentials: Credentials, userSettings: UserSettings | null) => Promise<DesignSystemScope | undefined>;
13
+ export declare const promptForDesignSystemScope: (credentials: Credentials, userSettings: UserSettings | null, selectedScope?: DesignSystemScope) => Promise<DesignSystemScope | undefined>;
14
14
  export declare const parseDesignSystem: (sys: DevToolsSys, designSystemPackage?: string) => Promise<{
15
15
  name: any;
16
16
  version: string | undefined;
17
17
  }>;
18
- export declare const storeComponentDocs: (credentials: Credentials, body: IndexDocument, debug?: boolean) => Promise<any>;
18
+ export declare const storeComponentDocs: (credentials: Credentials, body: IndexDocumentV1, debug?: boolean) => Promise<any>;
19
19
  export declare const runCodeGen: (sys: DevToolsSys, credentials: Credentials, sessionId: string, message: GenerateUserMessage, debug?: boolean, designSystemPackage?: string, workspaceConfig?: WorkspaceConfiguration, opts?: {
20
20
  tags?: object;
21
21
  maxTokens?: number;
@@ -1,7 +1,7 @@
1
1
  import type { DevToolsSys } from "../../types";
2
- import type { TokenDocument, TokenTask } from "./types";
2
+ import type { TokenTask } from "./types";
3
3
  import type { Credentials } from "../credentials";
4
- import type { WorkspaceConfiguration } from "$/ai-utils";
4
+ import type { WorkspaceConfiguration, TokenDocument } from "$/ai-utils";
5
5
  export declare const discoverTokens: (sys: DevToolsSys, credentials: Credentials, sessionId: string, remoteTokens: TokenDocument[], opts?: {
6
6
  force?: boolean;
7
7
  designSystemPackage?: string;
@@ -1,37 +1,3 @@
1
- export type IndexDocument = ComponentDocument | TokenDocument | IconDocument | AgentDocument;
2
- export interface DocumentBase {
3
- id?: string;
4
- name: string;
5
- description: string;
6
- content: string;
7
- designSystemId: string;
8
- designSystemPackage?: string;
9
- designSystemVersion?: string;
10
- tokens?: number;
11
- sessionId?: string;
12
- }
13
- export declare const isAgentDocument: (doc: IndexDocument) => doc is AgentDocument;
14
- export declare const isIconDocument: (doc: IndexDocument) => doc is IconDocument;
15
- export declare const isTokenDocument: (doc: IndexDocument) => doc is TokenDocument;
16
- export declare const isComponentDocument: (doc: IndexDocument) => doc is ComponentDocument;
17
- export interface ComponentDocument extends DocumentBase {
18
- type: "component";
19
- relatedComponents: string[];
20
- relevantFiles: string[];
21
- hash: string;
22
- }
23
- export interface TokenDocument extends DocumentBase {
24
- type: "token";
25
- hash: string;
26
- relevantFiles: string[];
27
- }
28
- export interface IconDocument extends DocumentBase {
29
- type: "icon";
30
- hash: string;
31
- }
32
- export interface AgentDocument extends DocumentBase {
33
- type: "agent";
34
- }
35
1
  interface BaseTask {
36
2
  name: string;
37
3
  }
@@ -53,5 +19,10 @@ export interface TokenTask extends BaseTask {
53
19
  export interface IconTask extends BaseTask {
54
20
  type: "icon";
55
21
  }
56
- export type Task = ComponentTask | TokenTask | IconTask;
22
+ export interface InstallationTask extends BaseTask {
23
+ type: "installation";
24
+ relevantFiles: string[];
25
+ hash: string;
26
+ }
27
+ export type Task = ComponentTask | TokenTask | IconTask | InstallationTask;
57
28
  export {};