@builder.io/dev-tools 1.20.0 → 1.20.1
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 +644 -640
- 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 -1
- package/server/index.cjs +252 -252
- package/server/index.mjs +252 -252
- package/types/cli/launch/vscode-tunnel-manager.d.ts +2 -1
- package/types/cli/mcp-local.d.ts +23 -5
- package/types/cli/utils/env-substitution.d.ts +10 -1
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -73,7 +73,8 @@ export declare class VSCodeTunnelManager extends EventEmitter {
|
|
|
73
73
|
*/
|
|
74
74
|
getStatus(): TunnelStatus;
|
|
75
75
|
/**
|
|
76
|
-
* Check if tunnel is enabled
|
|
76
|
+
* Check if tunnel is enabled
|
|
77
|
+
* Enabled by default for cloud environments, can be disabled with VSCODE_TUNNEL_ENABLED=false
|
|
77
78
|
*/
|
|
78
79
|
static isEnabled(): boolean;
|
|
79
80
|
/**
|
package/types/cli/mcp-local.d.ts
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
import type { ContentMessageItemImage, ContentMessageItemText, MCPClientStatus, MCPServerConfig } from "$/ai-utils";
|
|
12
12
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
13
13
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
14
|
+
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
15
|
+
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
14
16
|
import type { DevToolsSys } from "../core";
|
|
15
17
|
export interface MCPServerStdioDefinition {
|
|
16
18
|
name: string;
|
|
@@ -19,15 +21,25 @@ export interface MCPServerStdioDefinition {
|
|
|
19
21
|
env?: Record<string, string>;
|
|
20
22
|
envFile?: string;
|
|
21
23
|
}
|
|
24
|
+
export interface MCPServerRemoteDefinition {
|
|
25
|
+
name: string;
|
|
26
|
+
type: "http" | "sse";
|
|
27
|
+
url: string;
|
|
28
|
+
headers?: Record<string, string>;
|
|
29
|
+
envFile?: string;
|
|
30
|
+
}
|
|
31
|
+
export type MCPServerDefinition = MCPServerStdioDefinition | MCPServerRemoteDefinition;
|
|
22
32
|
export interface MCPConfig {
|
|
23
|
-
mcpServers: Record<string, Omit<MCPServerStdioDefinition, "name">>;
|
|
33
|
+
mcpServers: Record<string, Omit<MCPServerStdioDefinition, "name"> | Omit<MCPServerRemoteDefinition, "name">>;
|
|
24
34
|
}
|
|
25
35
|
export interface LocalMCPClient {
|
|
26
36
|
client: Client | undefined;
|
|
27
|
-
transport: StdioClientTransport | undefined;
|
|
37
|
+
transport: StdioClientTransport | SSEClientTransport | StreamableHTTPClientTransport | undefined;
|
|
28
38
|
status: MCPClientStatus;
|
|
29
39
|
serverName: string;
|
|
30
|
-
|
|
40
|
+
serverType: "stdio" | "http" | "sse";
|
|
41
|
+
command?: string;
|
|
42
|
+
url?: string;
|
|
31
43
|
resources?: {
|
|
32
44
|
uri: string;
|
|
33
45
|
name?: string;
|
|
@@ -61,15 +73,21 @@ export interface LocalMCPClientManager {
|
|
|
61
73
|
/**
|
|
62
74
|
* Create a local MCP client manager from server definitions
|
|
63
75
|
*/
|
|
64
|
-
export declare function createLocalMCPClientManager(servers:
|
|
76
|
+
export declare function createLocalMCPClientManager(servers: MCPServerDefinition[], sys: DevToolsSys, workingDirectory: string, signal?: AbortSignal): Promise<LocalMCPClientManager>;
|
|
65
77
|
/**
|
|
66
78
|
* Apply environment variable substitution to MCP server configuration
|
|
67
79
|
* This is separated from loadMCPConfig to allow easy unit testing
|
|
68
80
|
*/
|
|
69
81
|
export declare function applyEnvSubstitution(serverConfig: Omit<MCPServerStdioDefinition, "name">, name: string, baseEnv: Record<string, string | undefined>, envFileVars: Record<string, string>): MCPServerStdioDefinition;
|
|
82
|
+
/**
|
|
83
|
+
* Apply environment variable substitution to remote MCP server configuration
|
|
84
|
+
* This is separated from loadMCPConfig to allow easy unit testing
|
|
85
|
+
*/
|
|
86
|
+
export declare function applyEnvSubstitutionRemote(serverConfig: Omit<MCPServerRemoteDefinition, "name">, name: string, baseEnv: Record<string, string | undefined>, envFileVars: Record<string, string>): MCPServerRemoteDefinition;
|
|
70
87
|
/**
|
|
71
88
|
* Discover and load MCP configuration from working directory and fusionConfig
|
|
72
89
|
* Servers from fusionConfig will be merged with servers from mcp.json
|
|
73
90
|
* If a server with the same name exists in both, fusionConfig takes precedence
|
|
91
|
+
* Supports both stdio (command-based) and remote (http/sse) server definitions
|
|
74
92
|
*/
|
|
75
|
-
export declare function loadMCPConfig(sys: DevToolsSys, workingDirectory: string, serverConfigs: MCPServerConfig, autoImportLocalMCPs: boolean): Promise<
|
|
93
|
+
export declare function loadMCPConfig(sys: DevToolsSys, workingDirectory: string, serverConfigs: MCPServerConfig, autoImportLocalMCPs: boolean): Promise<MCPServerDefinition[]>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Substitutes environment variables in a string.
|
|
3
3
|
* Replaces ${VAR_NAME} patterns with their corresponding values from the env object.
|
|
4
|
-
*
|
|
4
|
+
* Supports default values with ${VAR_NAME:-default} syntax.
|
|
5
|
+
* If a variable is not found in env and no default is provided, the pattern is left as-is.
|
|
5
6
|
*
|
|
6
7
|
* @param str - The string containing environment variable patterns
|
|
7
8
|
* @param env - A record of environment variable names to their values
|
|
@@ -18,5 +19,13 @@
|
|
|
18
19
|
* @example
|
|
19
20
|
* substituteEnvVars("Missing: ${UNKNOWN}", {})
|
|
20
21
|
* // Returns: "Missing: ${UNKNOWN}"
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* substituteEnvVars("URL: ${API_URL:-https://api.example.com}", {})
|
|
25
|
+
* // Returns: "URL: https://api.example.com"
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* substituteEnvVars("URL: ${API_URL:-https://api.example.com}", { API_URL: "https://custom.com" })
|
|
29
|
+
* // Returns: "URL: https://custom.com"
|
|
21
30
|
*/
|
|
22
31
|
export declare function substituteEnvVars(str: string, env: Record<string, string | undefined>): string;
|