@builder.io/ai-utils 0.4.31 → 0.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.4.31",
3
+ "version": "0.4.32",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/codegen.d.ts CHANGED
@@ -309,7 +309,7 @@ export interface GenerateCompletionStepContinue {
309
309
  id: string;
310
310
  url: string;
311
311
  }
312
- export type DevCommandState = "running" | "stopped" | "failed" | "unset";
312
+ export type DevCommandState = "running" | "stopped" | "starting" | "failed" | "unset";
313
313
  export type SetupCommandState = "not-installed" | "installing" | "installed" | "install-failed";
314
314
  export type HttpServerState = "ok-2xx" | "error-4xx" | "error-5xx" | "error-fetch" | "stopped" | "connecting";
315
315
  export interface CodeGenHealthStatus {
@@ -340,10 +340,25 @@ export interface GenerateCompletionStepWaitForInput {
340
340
  state: GenerateCompletionState;
341
341
  suggestion?: SuggestedAction;
342
342
  }
343
- export interface GenerateCompletionStepBuilderAction {
343
+ export type GenerateCompletionStepBuilderAction = GenerateCompletionStepBuilderActionRefresh | GenerateCompletionStepBuilderActionOpenPath | GenerateCompletionStepBuilderActionMCPConnect;
344
+ export interface GenerateCompletionStepBuilderActionRefresh {
344
345
  type: "builder-action";
345
- action: "refresh" | "open-path";
346
- metadata: Record<string, any>;
346
+ action: "refresh";
347
+ metadata: {};
348
+ }
349
+ export interface GenerateCompletionStepBuilderActionOpenPath {
350
+ type: "builder-action";
351
+ action: "open-path";
352
+ metadata: {
353
+ path: string;
354
+ };
355
+ }
356
+ export interface GenerateCompletionStepBuilderActionMCPConnect {
357
+ type: "builder-action";
358
+ action: "mcp-connect";
359
+ metadata: {
360
+ mcpServer: string;
361
+ };
347
362
  }
348
363
  export interface GenerateCompletionStepAbort {
349
364
  type: "user-abort";
@@ -366,10 +381,14 @@ export interface GenerateCompletionStepDevServerState {
366
381
  devServerState: DevCommandState;
367
382
  setupState: SetupCommandState;
368
383
  httpServerState: HttpServerState;
384
+ devCommand: string | undefined;
385
+ setupCommand: string | undefined;
386
+ proxyServer: string | undefined;
369
387
  }
370
388
  export interface GenerateCompletionStepGit {
371
389
  type: "git";
372
390
  isSessionDirty: boolean;
391
+ hasGeneratingPlaceholder: boolean;
373
392
  remoteBranchExists: boolean;
374
393
  canPush: boolean;
375
394
  canPull: boolean;
package/src/messages.d.ts CHANGED
@@ -19,7 +19,7 @@ export interface ContentMessageItemImage {
19
19
  }
20
20
  export interface ContentMessageItemDocument {
21
21
  type: "document";
22
- source: DocumentBase64Source | DocumentUrlSource;
22
+ source: DocumentBase64Source | DocumentUrlSource | DocumentTextSource;
23
23
  cache?: boolean;
24
24
  ephemeral?: boolean;
25
25
  }
@@ -32,6 +32,11 @@ export interface DocumentUrlSource {
32
32
  type: "url";
33
33
  url: string;
34
34
  }
35
+ export interface DocumentTextSource {
36
+ type: "text";
37
+ media_type: "text/plain";
38
+ data: string;
39
+ }
35
40
  export interface ContentMessageItemToolResult {
36
41
  type: "tool_result";
37
42
  tool_use_id: string;
@@ -248,9 +253,10 @@ export interface URL {
248
253
  }
249
254
  export interface FileUpload {
250
255
  type: "upload";
251
- contentType: "image/webp" | "image/png" | "image/jpeg" | "image/gif" | "application/pdf";
256
+ contentType: "image/webp" | "image/png" | "image/jpeg" | "image/gif" | "application/pdf" | "application/json" | "text/plain";
252
257
  name: string;
253
258
  dataUrl: string;
259
+ text?: string;
254
260
  size: number;
255
261
  id: string;
256
262
  originalUrl?: string;