builder.io 1.18.0 → 1.18.3

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.
@@ -83,7 +83,7 @@ export declare class CodeGenSession {
83
83
  spawnNamedAgent(agentName: string | undefined, options: {
84
84
  prompt: string;
85
85
  user: UserSource;
86
- onStep?: (step: GenerateCompletionStep) => void;
86
+ onStep?: (step: GenerateCompletionStep, subagent_type: string) => void;
87
87
  signal?: AbortSignal;
88
88
  maxCompletions?: number;
89
89
  sessionId?: string;
@@ -226,9 +226,10 @@ export declare class CodeGenSession {
226
226
  clearSession(): Promise<void>;
227
227
  sendMessage(message: GenerateUserMessage): Promise<void>;
228
228
  spawnAgent(options: {
229
+ subagent_type: string;
229
230
  prompt: string;
230
231
  user: UserSource;
231
- onStep?: (step: GenerateCompletionStep) => void;
232
+ onStep?: (step: GenerateCompletionStep, subagent_type: string) => void;
232
233
  signal?: AbortSignal;
233
234
  maxCompletions?: number;
234
235
  sessionId?: string;
@@ -240,7 +241,8 @@ export declare class CodeGenSession {
240
241
  getTurns(): CodegenTurn[];
241
242
  getSessionContext(): SessionContext;
242
243
  runSetupCommand(): Promise<import("$/ai-utils").SetupCommandResult | undefined>;
243
- abortSetupCommand(): void;
244
+ abortSetupCommand(): Promise<import("$/ai-utils").SetupCommandResult | undefined> | undefined;
245
+ abortValidateCommand(): Promise<import("$/ai-utils").ValidateCommandResult | undefined> | undefined;
244
246
  toolsRunning(): boolean;
245
247
  abortAllTools(): void;
246
248
  /**
@@ -1 +1,11 @@
1
- export declare const safeFetch: typeof globalThis.fetch;
1
+ import { type RequestInit } from "undici";
2
+ import { NetworkError } from "../common/errors";
3
+ export declare const safeFetch: (input: string | URL, init?: RequestInit) => ReturnType<typeof globalThis.fetch>;
4
+ /**
5
+ * Checks the health of the Builder.io API by attempting to fetch the health endpoint.
6
+ * Retries up to 3 times with a delay between attempts.
7
+ * @param delayMs - The delay in milliseconds between retry attempts (default: 1000ms)
8
+ * @returns undefined if all attempts fail
9
+ * @throws NetworkError if all retry attempts fail
10
+ */
11
+ export declare function checkBuilderHealth(delayMs?: number): Promise<NetworkError | undefined>;
@@ -132,4 +132,10 @@ export interface CLIArgs {
132
132
  * Example: --instructions "Do not index mapper files."
133
133
  */
134
134
  instructions?: string;
135
+ /**
136
+ * Accept self-signed SSL certificates.
137
+ * Useful for development environments where SSL certificates are not trusted.
138
+ * Example: --acceptSelfSignedCertificates
139
+ */
140
+ acceptSelfSigned?: boolean;
135
141
  }
@@ -47,7 +47,8 @@ export interface DevServerOrchestrator {
47
47
  autoDetectDevServer: boolean;
48
48
  devCommandProcess: DevCommandProcess | undefined;
49
49
  autoDetectDevServerPatterns: string[] | undefined;
50
- abortSetupCommand: () => void;
50
+ abortSetupCommand: () => Promise<SetupCommandResult | undefined>;
51
+ abortValidateCommand: () => Promise<ValidateCommandResult | undefined>;
51
52
  clearEnvVariables: () => void;
52
53
  setEnvVariable: (key: string, value: string | undefined) => boolean;
53
54
  ensureDevCommand: (abortSignal?: AbortSignal) => Promise<boolean>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Substitutes environment variables in a string.
3
+ * Replaces ${VAR_NAME} patterns with their corresponding values from the env object.
4
+ * If a variable is not found in env, the pattern is left as-is.
5
+ *
6
+ * @param str - The string containing environment variable patterns
7
+ * @param env - A record of environment variable names to their values
8
+ * @returns The string with all ${VAR_NAME} patterns replaced
9
+ *
10
+ * @example
11
+ * substituteEnvVars("Hello ${USER}!", { USER: "Alice" })
12
+ * // Returns: "Hello Alice!"
13
+ *
14
+ * @example
15
+ * substituteEnvVars("Path: ${HOME}/docs", { HOME: "/Users/alice" })
16
+ * // Returns: "Path: /Users/alice/docs"
17
+ *
18
+ * @example
19
+ * substituteEnvVars("Missing: ${UNKNOWN}", {})
20
+ * // Returns: "Missing: ${UNKNOWN}"
21
+ */
22
+ export declare function substituteEnvVars(str: string, env: Record<string, string | undefined>): string;
@@ -0,0 +1 @@
1
+ export {};