builder.io 1.9.22 → 1.10.0
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/cli/index.cjs +297 -295
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -4
- package/server/index.cjs +3 -3
- package/server/index.mjs +3 -3
- package/types/cli/code-tools.d.ts +1 -0
- package/types/cli/codegen.d.ts +9 -1
- package/types/cli/repo-indexing/component-indexing.d.ts +2 -1
- package/types/cli/repo-indexing/repo-indexing.d.ts +2 -2
- package/types/cli/repo-indexing/types.d.ts +5 -0
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -59,6 +59,7 @@ export interface ToolContext extends Partial<FusionContext> {
|
|
|
59
59
|
name?: string;
|
|
60
60
|
}>;
|
|
61
61
|
patchFusionConfig: (patch: Partial<FusionConfig>) => void;
|
|
62
|
+
passThrough: (toolCall: LLMToolCalls, signal: AbortSignal) => Promise<ToolResolution>;
|
|
62
63
|
readFile: (filePath: string) => Promise<string | null>;
|
|
63
64
|
writeFile: (filePath: string, content: string | Uint8Array) => Promise<boolean>;
|
|
64
65
|
deleteFile: (filePath: string) => Promise<boolean>;
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { DevToolsSys } from "../types";
|
|
|
2
2
|
import { type Credentials } from "./credentials";
|
|
3
3
|
import type { CodegenFeedback, CodeGenToolMap, CodegenTurn, CustomInstruction, FusionConfig, GenerateCompletionState, GenerateCompletionStep, GenerateCompletionStepGit, GenerateUserMessage, UserContext, WorkspaceConfiguration, WorkspaceFolder, LoadWholeSessionOptions, LoadWholeSessionResult, LoadHistoryResult, CodeGenMode, ApplyActionsResult } from "$/ai-utils";
|
|
4
4
|
import prettier from "prettier";
|
|
5
|
-
import { type FusionContext } from "./code-tools";
|
|
5
|
+
import { type FusionContext, type ToolResolution } from "./code-tools";
|
|
6
6
|
import EventEmitter from "node:events";
|
|
7
7
|
import { type RunGitOptions } from "./utils/git";
|
|
8
8
|
export interface SessionContext {
|
|
@@ -30,6 +30,7 @@ export interface CodeGenSessionOptionsBase {
|
|
|
30
30
|
workingDirectory?: string;
|
|
31
31
|
mcpServers?: boolean;
|
|
32
32
|
enabledTools?: (keyof CodeGenToolMap)[];
|
|
33
|
+
modelOverride?: string;
|
|
33
34
|
}
|
|
34
35
|
export interface CodeGenSessionOptionsSession extends CodeGenSessionOptionsBase {
|
|
35
36
|
sessionOrCompletionId?: string;
|
|
@@ -195,6 +196,13 @@ export declare class CodeGenSession {
|
|
|
195
196
|
abortSetupCommand(): void;
|
|
196
197
|
toolsRunning(): boolean;
|
|
197
198
|
abortAllTools(): void;
|
|
199
|
+
/**
|
|
200
|
+
* Fulfil a pending tool call (usually AskUser or any passThrough tool)
|
|
201
|
+
* Exposed via websocket as `toolFullfilment` for the Builder UI to send back
|
|
202
|
+
* the user's response.
|
|
203
|
+
*/
|
|
204
|
+
toolFullfilment(id: string, result: ToolResolution | string): boolean;
|
|
205
|
+
fulfillToolCall(id: string, result: ToolResolution): boolean;
|
|
198
206
|
abortToolCall(id: string): boolean;
|
|
199
207
|
abort(cleanCurrentMessage?: boolean): Promise<boolean>;
|
|
200
208
|
stopEventLoop(): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../../types";
|
|
2
2
|
import type { Credentials } from "../credentials";
|
|
3
|
-
import type { Component } from "./types";
|
|
3
|
+
import type { Component, ComponentIssue } from "./types";
|
|
4
4
|
import type { WorkspaceConfiguration } from "$/ai-utils";
|
|
5
5
|
export declare const processComponent: (sys: DevToolsSys, credentials: Credentials, sessionId: string, component: Component, opts?: {
|
|
6
6
|
designSystemId?: string | null;
|
|
@@ -10,5 +10,6 @@ export declare const processComponent: (sys: DevToolsSys, credentials: Credentia
|
|
|
10
10
|
storeRepoIndexing?: boolean;
|
|
11
11
|
workspaceConfig?: WorkspaceConfiguration;
|
|
12
12
|
debug?: boolean;
|
|
13
|
+
onIssue?: (issue: ComponentIssue) => void;
|
|
13
14
|
}) => Promise<void>;
|
|
14
15
|
export declare const deprecateObsoleteComponents: (credentials: Credentials, localComponents: Component[], remoteComponents: Component[]) => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { DevToolsSys } from "../../types";
|
|
2
2
|
import type { CLIArgs } from "../index";
|
|
3
3
|
import { type Credentials } from "../credentials";
|
|
4
|
-
import type { Component } from "./types";
|
|
5
|
-
export declare const displayComponentLibrarySummary: (components: Component[], indexedComponents: Component[], startTime: number, numFailed: number | undefined, isForce: boolean | undefined, designSystemName: string) => void;
|
|
4
|
+
import type { Component, ComponentIssue } from "./types";
|
|
5
|
+
export declare const displayComponentLibrarySummary: (components: Component[], indexedComponents: Component[], startTime: number, numFailed: number | undefined, isForce: boolean | undefined, designSystemName: string, issues?: ComponentIssue[]) => void;
|
|
6
6
|
export interface RepoIndexingDoc {
|
|
7
7
|
name: string;
|
|
8
8
|
content: string | {
|