@builder.io/dev-tools 1.6.35 → 1.6.36-dev.202505071705.9fdb0d5a

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.
@@ -46,5 +46,5 @@ export declare function updateFileRelationships(fileInfoMap: Map<string, GitFile
46
46
  */
47
47
  export declare function calculateGitImportance(file: string, gitFiles: Map<string, GitFileInfo>, baseImportance: number, relevantPaths: string[]): number;
48
48
  export declare function shouldIncludeHiddenFile(sys: DevToolsSys, file: string): boolean;
49
- export declare function performSearch(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, sessionContext: SessionContext, repoInfo: RepoInfo, files: string[], hiddenFiles: string[], userPrompt: string, allFiles: string[], packageJson: any, signal: AbortSignal | undefined): Promise<CodebaseSearchResponse | null>;
49
+ export declare function performSearch(sys: DevToolsSys, appRootDir: string, credentials: Credentials, args: CLIArgs, sessionContext: SessionContext, repoInfo: RepoInfo, files: string[], hiddenFiles: string[], userPrompt: string, allFiles: string[], packageJson: any, signal: AbortSignal | undefined): Promise<CodebaseSearchResponse | null>;
50
50
  export declare function searchCodeBase(sys: DevToolsSys, credentials: Credentials, args: CLIArgs, signal: AbortSignal | undefined, body: CodebaseSearchOptions): Promise<CodebaseSearchResponse | null>;
File without changes
@@ -19,6 +19,7 @@ export interface ToolContext extends ProvidedToolContext {
19
19
  sys: DevToolsSys;
20
20
  files: ProjectFile[];
21
21
  signal: AbortSignal | undefined;
22
+ workingDirectory: string;
22
23
  }
23
24
  export declare function resolveToolCalls(toolContext: ToolContext, toolCalls: LLMToolCalls[]): Promise<ContentMessageItemToolResult[]>;
24
25
  interface RipgrepMatch {
@@ -29,5 +30,5 @@ interface RipgrepMatch {
29
30
  interface RipgrepResult {
30
31
  matches: RipgrepMatch[];
31
32
  }
32
- export declare function runRipgrep(sys: DevToolsSys, pattern: string, includeGlob?: string, excludeGlob?: string): Promise<RipgrepResult>;
33
+ export declare function runRipgrep(workingDirectory: string, pattern: string, includeGlob?: string, excludeGlob?: string): Promise<RipgrepResult>;
33
34
  export {};
@@ -45,6 +45,7 @@ export interface CodeGenSessionOptionsBase {
45
45
  builtInCustomInstructions?: CustomInstruction[];
46
46
  featureBranch?: string;
47
47
  providedToolContext?: ProvidedToolContext;
48
+ workingDirectory?: string;
48
49
  }
49
50
  export interface CodeGenSessionOptionsSession extends CodeGenSessionOptionsBase {
50
51
  sessionOrCompletionId?: string;
@@ -57,6 +58,7 @@ export declare function createCodeSession(options: CodeGenSessionOptions): Promi
57
58
  export declare class CodeGenSession {
58
59
  #private;
59
60
  constructor(options: CodeGenSessionOptions);
61
+ get workingDirectory(): string;
60
62
  initializeSession(): Promise<void>;
61
63
  /**
62
64
  * Get the current commit hash
@@ -0,0 +1,86 @@
1
+ import { type SelectOptions, type ConfirmOptions, type TextOptions } from "@clack/prompts";
2
+ import { spinner } from "./spinner";
3
+ import type { WebSocket } from "ws";
4
+ export interface IOService {
5
+ log(str: string): void;
6
+ info(str: string): void;
7
+ warn(str: string): void;
8
+ error(str: string): void;
9
+ write(text: string): void;
10
+ writeMetadata(metadata: Record<string, any>): void;
11
+ confirm(options: ConfirmOptions): Promise<boolean | symbol>;
12
+ text(options: TextOptions): Promise<string | symbol>;
13
+ select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
14
+ createSpinner(): ReturnType<typeof spinner>;
15
+ isInteractive(): boolean;
16
+ isTTY(): boolean;
17
+ exit(code: number): Promise<void>;
18
+ }
19
+ export declare class ConsoleIOService implements IOService {
20
+ log(str: string): void;
21
+ info(str: string): void;
22
+ warn(str: string): void;
23
+ error(str: string): void;
24
+ write(text: string): void;
25
+ writeMetadata(_: Record<string, any>): void;
26
+ confirm(options: ConfirmOptions): Promise<boolean | symbol>;
27
+ text(options: TextOptions): Promise<string | symbol>;
28
+ select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
29
+ createSpinner(): ReturnType<typeof spinner>;
30
+ isInteractive(): boolean;
31
+ isTTY(): boolean;
32
+ exit(code: number): Promise<void>;
33
+ }
34
+ export interface BaseMessage {
35
+ type: string;
36
+ [key: string]: any;
37
+ }
38
+ export interface LogMessage extends BaseMessage {
39
+ type: "log";
40
+ level: "info" | "warn" | "error";
41
+ message: string;
42
+ }
43
+ export interface WriteMessage extends BaseMessage {
44
+ type: "write";
45
+ text: string;
46
+ }
47
+ export interface SpinnerMessage extends BaseMessage {
48
+ type: "spinner";
49
+ status: "start" | "stop";
50
+ message: string;
51
+ code?: number;
52
+ }
53
+ export interface PromptRequest extends BaseMessage {
54
+ type: "prompt";
55
+ promptType: "text" | "confirm" | "select";
56
+ options: any;
57
+ requestId: string;
58
+ }
59
+ export interface PromptResponse extends BaseMessage {
60
+ type: "prompt_response";
61
+ requestId: string;
62
+ value: any;
63
+ cancelled?: boolean;
64
+ }
65
+ export declare class WebSocketIOService implements IOService {
66
+ private ws;
67
+ private promptCallbacks;
68
+ private messageQueue;
69
+ private isProcessing;
70
+ constructor(ws: WebSocket);
71
+ private sendMessage;
72
+ private prompt;
73
+ log(...args: any[]): void;
74
+ info(...args: any[]): void;
75
+ warn(...args: any[]): void;
76
+ error(...args: any[]): void;
77
+ write(text: string): void;
78
+ writeMetadata(metadata: Record<string, any>): void;
79
+ confirm(options: ConfirmOptions): Promise<boolean | symbol>;
80
+ text(options: TextOptions): Promise<string | symbol>;
81
+ select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
82
+ createSpinner(): ReturnType<typeof spinner>;
83
+ isInteractive(): boolean;
84
+ isTTY(): boolean;
85
+ exit(code: number): Promise<void>;
86
+ }
@@ -31,6 +31,10 @@ export type LaunchStatus = {
31
31
  configured?: boolean;
32
32
  repo?: string;
33
33
  branch?: string;
34
+ /**
35
+ * The branch whose contents are being pushed to the remote repo (whether to a PR or directly to the repo).
36
+ */
37
+ branchTargettingRemote?: string;
34
38
  error?: string | undefined;
35
39
  current?: string | undefined;
36
40
  expected?: string | undefined;
@@ -5,7 +5,7 @@ import type { CLIArgs } from "./index";
5
5
  */
6
6
  export declare const PROXY_PORT = 48752;
7
7
  export interface LaunchArgs extends CLIArgs {
8
- volumePath?: string;
8
+ cwdAgent?: string;
9
9
  /** Fusion project ID */
10
10
  projectId?: string;
11
11
  /** Silent mode for launch command */
@@ -17,7 +17,7 @@ export declare const NUMBER_TYPES: string[];
17
17
  export declare const BOOLEAN_TYPES: string[];
18
18
  export declare const ARRAY_TYPES: string[];
19
19
  export declare const OBJECT_TYPES: string[];
20
- export declare function getPrimitiveType(t: string): "number" | "string" | "boolean" | "object" | "array";
20
+ export declare function getPrimitiveType(t: string): "string" | "object" | "number" | "boolean" | "array";
21
21
  export declare function removeQuotes(text: string): string;
22
22
  export declare const resolveType: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string[] | undefined;
23
23
  export declare const typeToString: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string;
@@ -8,4 +8,4 @@ export declare function objectExpressionToObjectValue(sys: DevToolsSys, objectLi
8
8
  };
9
9
  export declare function convertArrayExpressionToJsArray(sys: DevToolsSys, arr: ts.ArrayLiteralExpression): any[];
10
10
  export declare function getTextOfPropertyName(sys: DevToolsSys, prop: ts.PropertyAssignment | ts.ObjectLiteralElementLike | undefined): string | undefined;
11
- export declare function valueToExpression(sys: DevToolsSys, val: any): ts.ObjectLiteralExpression | ts.Identifier | ts.StringLiteral | ts.NumericLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.ArrayLiteralExpression;
11
+ export declare function valueToExpression(sys: DevToolsSys, val: any): ts.ObjectLiteralExpression | ts.Identifier | ts.StringLiteral | ts.NumericLiteral | ts.ArrayLiteralExpression | ts.TrueLiteral | ts.FalseLiteral;
@@ -0,0 +1,6 @@
1
+ import type { DevToolsSys } from "../..";
2
+ import type { EnsureConfigResult } from "../../../types";
3
+ /**
4
+ * Ensure the Remix Vite config has the necessary plugins and settings
5
+ */
6
+ export declare function ensureRemixConfig(sys: DevToolsSys, configFilePath: string, configContent: string): Promise<EnsureConfigResult>;
@@ -0,0 +1,10 @@
1
+ import type { DevToolsSys } from "../..";
2
+ import type ts from "typescript";
3
+ /**
4
+ * Check if the current project is using Remix framework
5
+ */
6
+ export declare function isRemixFramework(sys: DevToolsSys): boolean;
7
+ /**
8
+ * Update an object literal to include the external dependencies for Remix
9
+ */
10
+ export declare function updateCommonJsLibrary(sys: DevToolsSys, config: ts.ObjectLiteralExpression): ts.ObjectLiteralExpression | null;
@@ -0,0 +1,6 @@
1
+ import type { DevToolsSys } from "../..";
2
+ import type { EnsureConfigResult } from "../../../types";
3
+ /**
4
+ * Update a Vite config file to include a plugin
5
+ */
6
+ export declare function updateViteConfig(sys: DevToolsSys, configFilePath: string, configContent: string, pluginName: string, importPath: string): Promise<EnsureConfigResult>;