@builder.io/ai-utils 0.5.30 → 0.5.32
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/package.json +1 -1
- package/src/codegen.d.ts +39 -19
- package/src/projects.d.ts +1 -1
package/package.json
CHANGED
package/src/codegen.d.ts
CHANGED
|
@@ -32,16 +32,16 @@ export type CompletionStopReason = "max_tokens" | "stop_sequence" | "tool_use" |
|
|
|
32
32
|
export interface ViewPathToolInput {
|
|
33
33
|
file_path: string;
|
|
34
34
|
view_range?: [number, number];
|
|
35
|
-
offset?: number;
|
|
36
|
-
limit?: number;
|
|
35
|
+
offset?: number | null;
|
|
36
|
+
limit?: number | null;
|
|
37
37
|
}
|
|
38
38
|
export interface GlobSearchToolInput {
|
|
39
39
|
pattern: string;
|
|
40
40
|
}
|
|
41
41
|
export interface GrepSearchToolInput {
|
|
42
42
|
query: string;
|
|
43
|
-
include_glob?: string;
|
|
44
|
-
exclude_glob?: string;
|
|
43
|
+
include_glob?: string | null;
|
|
44
|
+
exclude_glob?: string | null;
|
|
45
45
|
}
|
|
46
46
|
export interface GetRuleToolInput {
|
|
47
47
|
name: string;
|
|
@@ -52,18 +52,18 @@ export interface GetStyleInspirationToolInput {
|
|
|
52
52
|
export interface GetBuildOutputToolInput {
|
|
53
53
|
}
|
|
54
54
|
export interface DevServerControlInput {
|
|
55
|
-
restart?: boolean;
|
|
56
|
-
get_logs?: boolean;
|
|
57
|
-
set_proxy_port?: number;
|
|
58
|
-
set_dev_command?: string;
|
|
59
|
-
set_and_run_setup_command?: string;
|
|
60
|
-
set_env_variable?: [string, string];
|
|
55
|
+
restart?: boolean | null;
|
|
56
|
+
get_logs?: boolean | null;
|
|
57
|
+
set_proxy_port?: number | null;
|
|
58
|
+
set_dev_command?: string | null;
|
|
59
|
+
set_and_run_setup_command?: string | null;
|
|
60
|
+
set_env_variable?: [string, string] | null;
|
|
61
61
|
}
|
|
62
62
|
export interface BashToolInput {
|
|
63
|
-
command?: string;
|
|
64
|
-
timeout?: number;
|
|
65
|
-
description?: string;
|
|
66
|
-
restart?: boolean;
|
|
63
|
+
command?: string | null;
|
|
64
|
+
timeout?: number | null;
|
|
65
|
+
description?: string | null;
|
|
66
|
+
restart?: boolean | null;
|
|
67
67
|
}
|
|
68
68
|
export interface WebSearchToolInput {
|
|
69
69
|
query: string;
|
|
@@ -89,20 +89,33 @@ export interface MultiSearchReplaceInput {
|
|
|
89
89
|
new_str: string;
|
|
90
90
|
replace_all?: boolean;
|
|
91
91
|
}[];
|
|
92
|
-
apply_with_error?: boolean;
|
|
92
|
+
apply_with_error?: boolean | null;
|
|
93
93
|
}
|
|
94
94
|
export interface FindMediaToolInput {
|
|
95
95
|
query: string;
|
|
96
96
|
type: "image" | "video";
|
|
97
|
-
orientation?: "landscape" | "portrait" | "square";
|
|
98
|
-
hex_color?: string;
|
|
97
|
+
orientation?: "landscape" | "portrait" | "square" | null;
|
|
98
|
+
hex_color?: string | null;
|
|
99
99
|
}
|
|
100
100
|
export interface MemoryToolInput {
|
|
101
101
|
scope: "global" | "user" | "project";
|
|
102
102
|
memory: string;
|
|
103
|
-
memory_id?: string;
|
|
103
|
+
memory_id?: string | null;
|
|
104
104
|
when?: string;
|
|
105
105
|
}
|
|
106
|
+
export type FormFieldType = "text" | "color" | "select" | "number" | "url";
|
|
107
|
+
export interface FormField {
|
|
108
|
+
type: FormFieldType;
|
|
109
|
+
label: string;
|
|
110
|
+
default?: string;
|
|
111
|
+
options?: string[];
|
|
112
|
+
placeholder?: string;
|
|
113
|
+
min?: number;
|
|
114
|
+
max?: number;
|
|
115
|
+
}
|
|
116
|
+
export interface AskUserToolInput {
|
|
117
|
+
form: FormField[];
|
|
118
|
+
}
|
|
106
119
|
export interface AgentToolInput {
|
|
107
120
|
description: string;
|
|
108
121
|
prompt: string;
|
|
@@ -159,6 +172,7 @@ export interface CodeGenToolMap {
|
|
|
159
172
|
Memory: MemoryToolInput;
|
|
160
173
|
Bash: BashToolInput;
|
|
161
174
|
WebSearch: WebSearchToolInput;
|
|
175
|
+
AskUser: AskUserToolInput;
|
|
162
176
|
Agent: AgentToolInput;
|
|
163
177
|
Grep: GrepSearchToolInput;
|
|
164
178
|
Glob: GlobSearchToolInput;
|
|
@@ -516,9 +530,15 @@ export interface GenerateCompletionStepAgent {
|
|
|
516
530
|
id: string;
|
|
517
531
|
step: GenerateCompletionStep;
|
|
518
532
|
}
|
|
533
|
+
export interface GenerateCompletionStepToolCallRequest {
|
|
534
|
+
type: "tool-call-request";
|
|
535
|
+
id: string;
|
|
536
|
+
name: string;
|
|
537
|
+
input: any;
|
|
538
|
+
}
|
|
519
539
|
export type GenerateCompletionStep = {
|
|
520
540
|
timestamp?: number;
|
|
521
|
-
} & (GenerateCompletionStepPlanning | GenerateCompletionStepStart | GenerateCompletionStepDelta | GenerateCompletionStepUser | GenerateCompletionStepFile | GenerateCompletionStepDiff | GenerateCompletionStepTool | GenerateCompletionStepError | GenerateCompletionStepContinue | GenerateCompletionStepWaitForInput | GenerateCompletionStepAbort | GenerateCompletionStepDone | GenerateCompletionStepUserInput | GenerateCompletionStepText | GenerateCompletionStepRestore | GenerateCompletionStepState | GenerateCompletionStepStdio | GenerateCompletionStepSession | GenerateCompletionStepServerToolResult | GenerateCompletionStepGit | GenerateCompletionStepBuilderAction | GenerateCompletionStepToolResult | GenerateCompletionStepFusionConfigPatch | GenerateCodeEventMCPStatus | GenerateCompletionStepDevServerState | GenerateCompletionStepAgent | GenerateCompletionStepBatch);
|
|
541
|
+
} & (GenerateCompletionStepPlanning | GenerateCompletionStepStart | GenerateCompletionStepDelta | GenerateCompletionStepUser | GenerateCompletionStepFile | GenerateCompletionStepDiff | GenerateCompletionStepTool | GenerateCompletionStepError | GenerateCompletionStepContinue | GenerateCompletionStepWaitForInput | GenerateCompletionStepAbort | GenerateCompletionStepDone | GenerateCompletionStepUserInput | GenerateCompletionStepText | GenerateCompletionStepRestore | GenerateCompletionStepState | GenerateCompletionStepStdio | GenerateCompletionStepSession | GenerateCompletionStepServerToolResult | GenerateCompletionStepGit | GenerateCompletionStepBuilderAction | GenerateCompletionStepToolResult | GenerateCompletionStepFusionConfigPatch | GenerateCompletionStepToolCallRequest | GenerateCodeEventMCPStatus | GenerateCompletionStepDevServerState | GenerateCompletionStepAgent | GenerateCompletionStepBatch);
|
|
522
542
|
export interface ApplyActionsResult {
|
|
523
543
|
filePath: string;
|
|
524
544
|
addedLines: number;
|
package/src/projects.d.ts
CHANGED
|
@@ -135,7 +135,7 @@ export interface ReadyMessage extends BaseMessage {
|
|
|
135
135
|
export type MachineState = "unknown" | "created" | "starting" | "started" | "stopping" | "stopped" | "suspending" | "suspended" | "replacing" | "destroying" | "destroyed" | "not-found" | "running" | "failed";
|
|
136
136
|
export type FlyVolumeState = "unknown" | "creating" | "created" | "extending" | "restoring" | "enabling_remote_export" | "hydrating" | "recovering" | "scheduling_destroy" | "pending_destroy" | "failed";
|
|
137
137
|
export type GitAuthErrorCode = "git-auth-failed" | "git-auth-failed-root-repo" | "git-auth-failed-folder-added-by" | "git-auth-failed-folder-created-by" | "git-auth-failed-folder-server-token" | "git-auth-failed-root-repo-server-token";
|
|
138
|
-
export type EnsureContainerErrorCode = "FLY_APP_CHECK_ERROR" | "FLY_CAPACITY_ERROR" | "FLY_PERMISSIONS_TOKEN_ERROR" | "FLY_VOLUME_CREATE_ERROR" | "FLY_VOLUME_FORK_ERROR" | "FLY_VOLUME_DELETE_RECENTLY_FORKED_ERROR" | "FLY_MACHINE_CREATE_ERROR" | "FLY_VOLUME_CHECK_ERROR" | "FLY_NON_MOUNTABLE_VOLUME_ERROR" | "FLY_DEPRECATED_REGION_ERROR" | "FLY_VOLUME_NOT_FOUND" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-branch-not-found" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | "missing-app-with-machine-or-volume" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
138
|
+
export type EnsureContainerErrorCode = "FLY_APP_CHECK_ERROR" | "FLY_CAPACITY_ERROR" | "FLY_PERMISSIONS_TOKEN_ERROR" | "FLY_VOLUME_CREATE_ERROR" | "FLY_VOLUME_FORK_ERROR" | "FLY_VOLUME_DELETE_RECENTLY_FORKED_ERROR" | "FLY_MACHINE_CREATE_ERROR" | "FLY_VOLUME_CHECK_ERROR" | "FLY_NON_MOUNTABLE_VOLUME_ERROR" | "FLY_DEPRECATED_REGION_ERROR" | "FLY_VOLUME_NOT_FOUND" | "ensure-checking-existing-machines" | "found-multiple-failed-machine" | "maximun-retries-machine-creation" | GitAuthErrorCode | "unknown" | "project-bad-state" | "project-not-found" | "project-branch-not-found" | "project-repo-full-name-not-found" | "project-org-not-found" | "no-available-regions" | "invalid-backup-without-volume-id" | "missing-app-with-machine-or-volume" | "update-branch-info-in-firebase" | "update-branch-app-name-in-firebase" | `machine-status-polling-${MachineState}` | `volume-not-found-${FlyVolumeState}` | "trying-to-remove-used-volume" | "timeout" | "fatal:zod-validation-error" | `fatal:${string}`;
|
|
139
139
|
export interface ErrorStateMessage extends BaseMessage {
|
|
140
140
|
state: "error";
|
|
141
141
|
message: string;
|