builder.io 1.9.22 → 1.9.23
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 +23 -23
- 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/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>;
|