@builder.io/dev-tools 1.6.37-dev.202505072018.94c91702 → 1.6.38
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/angular/index.cjs +1 -46
- package/angular/index.mjs +1 -21
- package/cli/index.cjs +3428 -105047
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +820 -13625
- package/core/index.mjs +820 -13615
- package/figma/index.cjs +1 -39
- package/figma/index.mjs +1 -19
- package/node/index.cjs +105 -25304
- package/node/index.mjs +105 -25308
- package/package.json +1 -1
- package/remix/build.cjs +1 -132
- package/remix/index.mjs +1 -113
- package/server/index.cjs +1372 -15003
- package/server/index.mjs +1371 -14995
- package/types/cli/code-tools.d.ts +8 -1
- package/types/cli/codegen.d.ts +12 -4
- package/types/cli/launch.d.ts +0 -4
- package/types/tsconfig.tsbuildinfo +1 -1
- package/vite/index.cjs +3 -153
- package/vite/index.mjs +3 -119
- package/webpack/index.cjs +27 -2883
- package/webpack/index.mjs +27 -2871
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { CodeGenTools, ContentMessageItemToolResult, ProjectFile } from "$/ai-utils";
|
|
1
|
+
import type { CodeGenTools, ContentMessageItemToolResult, GenerateCompletionStep, ProjectFile } from "$/ai-utils";
|
|
2
2
|
import type { DevToolsSys } from "../core";
|
|
3
3
|
import type { RunCommandCtx } from "./codegen";
|
|
4
|
+
import type EventEmitter from "events";
|
|
4
5
|
export interface LLMToolCalls {
|
|
5
6
|
name: CodeGenTools;
|
|
6
7
|
input: Record<string, any>;
|
|
@@ -13,11 +14,17 @@ export interface ToolResolution {
|
|
|
13
14
|
}
|
|
14
15
|
export interface ProvidedToolContext {
|
|
15
16
|
commandCtx?: RunCommandCtx;
|
|
17
|
+
checkCommand?: string;
|
|
18
|
+
localServerUrl?: string;
|
|
16
19
|
allowedCommands?: RegExp[];
|
|
20
|
+
commitMode?: "auto" | "manual";
|
|
17
21
|
}
|
|
18
22
|
export interface ToolContext extends ProvidedToolContext {
|
|
19
23
|
sys: DevToolsSys;
|
|
20
24
|
files: ProjectFile[];
|
|
25
|
+
emitter: EventEmitter<{
|
|
26
|
+
step: [GenerateCompletionStep];
|
|
27
|
+
}>;
|
|
21
28
|
signal: AbortSignal | undefined;
|
|
22
29
|
workingDirectory: string;
|
|
23
30
|
}
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import prettier from "prettier";
|
|
|
6
6
|
import { type ProvidedToolContext } from "./code-tools";
|
|
7
7
|
export interface RunCommandCtx {
|
|
8
8
|
command: string;
|
|
9
|
-
state: "running" | "
|
|
9
|
+
state: "running" | "stopped";
|
|
10
10
|
ensureRunning: () => Promise<boolean>;
|
|
11
11
|
addCheckpoint: () => void;
|
|
12
|
-
getCheckpoints: (n: number) => string;
|
|
12
|
+
getCheckpoints: (n: number, mode: "all" | "out" | "err") => string;
|
|
13
13
|
getAllStdout: () => string;
|
|
14
14
|
getAllStderr: () => string;
|
|
15
15
|
getOutput: () => string;
|
|
@@ -17,7 +17,7 @@ export interface RunCommandCtx {
|
|
|
17
17
|
onClose: (callback: (code: number | null) => void) => void;
|
|
18
18
|
onStdout: (callback: (data: string) => void) => void;
|
|
19
19
|
onStderr: (callback: (data: string) => void) => void;
|
|
20
|
-
restart: () => Promise<void>;
|
|
20
|
+
restart: (waitMs?: number) => Promise<void>;
|
|
21
21
|
}
|
|
22
22
|
export interface SessionContext {
|
|
23
23
|
sessionId: string;
|
|
@@ -76,6 +76,13 @@ export declare class CodeGenSession {
|
|
|
76
76
|
* Helper to run git commands
|
|
77
77
|
*/
|
|
78
78
|
runGitCommand(command: string): Promise<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Helper to run git commands
|
|
81
|
+
*/
|
|
82
|
+
runCheckCommand(): Promise<{
|
|
83
|
+
code: number;
|
|
84
|
+
logs: string;
|
|
85
|
+
} | null>;
|
|
79
86
|
/**
|
|
80
87
|
* Check if Fusion is enabled for this session
|
|
81
88
|
*/
|
|
@@ -108,7 +115,7 @@ export declare class CodeGenSession {
|
|
|
108
115
|
getNextMessage(): Promise<GenerateUserMessage>;
|
|
109
116
|
sendFeedback(sentiment: "positive" | "negative" | "undo", message?: string, lastCompletionId?: string | undefined): Promise<void>;
|
|
110
117
|
lastTurnHasChanges(): Promise<boolean>;
|
|
111
|
-
sendMessage(message: GenerateUserMessage): void;
|
|
118
|
+
sendMessage(message: GenerateUserMessage, immediate?: boolean): void;
|
|
112
119
|
getTurns(): CodegenTurn[];
|
|
113
120
|
getSessionContext(): SessionContext;
|
|
114
121
|
abort(): void;
|
|
@@ -127,3 +134,4 @@ export declare class CodeGenSession {
|
|
|
127
134
|
export declare function transformStream(body: ReadableStream<Uint8Array> | null): AsyncGenerator<string, void, unknown>;
|
|
128
135
|
export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
|
|
129
136
|
export declare function makeAsyncIterator<T>(): readonly [AsyncGenerator<T, void, void>, (event: T) => void, () => void];
|
|
137
|
+
export declare function isServerResponding(url: string, maxRetries?: number, retryDelay?: number): Promise<boolean>;
|
package/types/cli/launch.d.ts
CHANGED
|
@@ -4,10 +4,6 @@ import type { CLIArgs } from "./index";
|
|
|
4
4
|
* Large random-ish port number that is unlikely to be used
|
|
5
5
|
*/
|
|
6
6
|
export declare const PROXY_PORT = 48752;
|
|
7
|
-
/**
|
|
8
|
-
* Maximum number of attempts to generate PR description
|
|
9
|
-
*/
|
|
10
|
-
export declare const MAX_PR_CONTENT_ATTEMPTS = 2;
|
|
11
7
|
export interface LaunchArgs extends CLIArgs {
|
|
12
8
|
cwdAgent?: string;
|
|
13
9
|
/** Fusion project ID */
|