@builder.io/ai-utils 0.4.33 → 0.4.35

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.4.33",
3
+ "version": "0.4.35",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -30,6 +30,8 @@ export type CompletionStopReason = "max_tokens" | "stop_sequence" | "tool_use" |
30
30
  export interface ViewPathToolInput {
31
31
  file_path: string;
32
32
  view_range?: [number, number];
33
+ offset?: number;
34
+ limit?: number;
33
35
  }
34
36
  export interface GlobSearchToolInput {
35
37
  pattern: string;
@@ -72,6 +74,16 @@ export interface SearchReplaceInput {
72
74
  file_path: string;
73
75
  old_str: string;
74
76
  new_str: string;
77
+ replace_all?: boolean;
78
+ }
79
+ export interface MultiSearchReplaceInput {
80
+ title: string;
81
+ file_path: string;
82
+ edits: {
83
+ old_str: string;
84
+ new_str: string;
85
+ replace_all?: boolean;
86
+ }[];
75
87
  }
76
88
  export interface FindMediaToolInput {
77
89
  query: string;
@@ -85,6 +97,26 @@ export interface MemoryToolInput {
85
97
  memory_id?: string;
86
98
  when?: string;
87
99
  }
100
+ export interface AgentToolInput {
101
+ prompt: string;
102
+ }
103
+ export interface ListDirToolInput {
104
+ path: string;
105
+ ignore?: string[];
106
+ }
107
+ export interface RevertToolInput {
108
+ checkpoint_id: string;
109
+ }
110
+ export interface TodoReadToolInput {
111
+ }
112
+ export interface TodoWriteToolInput {
113
+ todos: {
114
+ content: string;
115
+ status: "pending" | "in_progress" | "completed";
116
+ priority: "high" | "medium" | "low";
117
+ id: string;
118
+ }[];
119
+ }
88
120
  export interface CodeGenToolMap {
89
121
  view_path: ViewPathToolInput;
90
122
  glob_search: GlobSearchToolInput;
@@ -98,14 +130,31 @@ export interface CodeGenToolMap {
98
130
  search_replace_file: SearchReplaceInput;
99
131
  find_media: FindMediaToolInput;
100
132
  memory: MemoryToolInput;
133
+ Read: ViewPathToolInput;
134
+ Write: WriteFileInput;
135
+ Edit: SearchReplaceInput;
136
+ GetStyleInspiration: GetStyleInspirationToolInput;
137
+ MultiEdit: MultiSearchReplaceInput;
138
+ FindMedia: FindMediaToolInput;
139
+ Memory: MemoryToolInput;
140
+ Bash: BashToolInput;
141
+ WebSearch: WebSearchToolInput;
142
+ Agent: AgentToolInput;
143
+ Grep: GrepSearchToolInput;
144
+ Glob: GlobSearchToolInput;
145
+ DevServerControl: DevServerControlInput;
146
+ Revert: RevertToolInput;
147
+ TodoRead: TodoReadToolInput;
148
+ TodoWrite: TodoWriteToolInput;
101
149
  }
102
150
  export type CodeGenTools = keyof CodeGenToolMap;
103
151
  export type AllCodeGenTools = CodeGenTools | "web_search";
152
+ export type CodeGenMode = "quality" | "quality-v3" | "quality-v4" | "quality-v4-agent";
104
153
  export interface CodeGenInputOptions {
105
154
  position: string;
106
155
  eventName?: string;
107
156
  sessionId: string;
108
- codeGenMode?: "fast" | "quality" | "quality-v3";
157
+ codeGenMode?: CodeGenMode;
109
158
  url?: string;
110
159
  diffActions?: boolean;
111
160
  planningPrompt?: boolean;
@@ -627,19 +676,19 @@ export interface AccessResult {
627
676
  message: string;
628
677
  }
629
678
  export interface FusionConfig {
630
- devCommand: string;
679
+ devCommand?: string;
631
680
  checkCommand?: string;
632
681
  setupCommand?: string;
633
682
  projectId?: string;
634
683
  branchName?: string;
635
- workingDirectory: string;
684
+ workingDirectory?: string;
636
685
  bashWorkingDirectory?: string;
637
686
  workspace?: WorkspaceConfiguration;
638
687
  authenticateProxy?: boolean;
639
688
  allowedCommands?: string[];
640
689
  autoBackupGit?: boolean;
641
- commitMode: CommitMode;
642
- serverUrl: string;
690
+ commitMode?: CommitMode;
691
+ serverUrl?: string;
643
692
  isLocal?: boolean;
644
693
  envVariables?: Record<string, string>;
645
694
  accessControl?: AclPolicy;
package/src/messages.d.ts CHANGED
@@ -132,6 +132,8 @@ export interface MCPServerURLDefinition {
132
132
  url: string;
133
133
  authorization_token?: string | null;
134
134
  tool_configuration?: MCPServerToolConfiguration | null;
135
+ token_expires_at?: number | null;
136
+ create_date?: number | null;
135
137
  }
136
138
  export interface MCPServerToolConfiguration {
137
139
  allowed_tools?: Array<string> | null;