@http-forge/core 0.3.2 → 0.4.0

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.
@@ -110,6 +110,36 @@ export interface ProxyConfig {
110
110
  /** List of hosts to bypass proxy */
111
111
  bypass?: string[];
112
112
  }
113
+ /**
114
+ * Cloud secret provider configuration (used in SecretsConfig.providers)
115
+ */
116
+ export interface SecretProviderEntry {
117
+ /** Provider type */
118
+ provider: 'aws' | 'azure' | 'gcp' | 'vault' | '1password' | 'doppler';
119
+ /** AWS region (aws only) */
120
+ region?: string;
121
+ /** Azure Key Vault URL (azure only) */
122
+ vaultUrl?: string;
123
+ /** GCP project ID (gcp only) */
124
+ projectId?: string;
125
+ /** Vault server address (vault only) */
126
+ address?: string;
127
+ /** Vault mount path (vault only, default "secret") */
128
+ mountPath?: string;
129
+ /** Vault namespace (vault only, Enterprise/HCP) */
130
+ namespace?: string;
131
+ /** 1Password vault name (1password only) */
132
+ vault?: string;
133
+ /** Doppler service token (doppler only; falls back to DOPPLER_TOKEN env var) */
134
+ serviceToken?: string;
135
+ }
136
+ /**
137
+ * Top-level secrets block in http-forge.config.json
138
+ * Configures named cloud secret providers for {{secret:alias/path}} tokens.
139
+ */
140
+ export interface SecretsConfig {
141
+ providers: Record<string, SecretProviderEntry>;
142
+ }
113
143
  /**
114
144
  * Main HTTP Forge configuration (http-forge.config.json)
115
145
  */
@@ -132,6 +162,8 @@ export interface HttpForgeConfig {
132
162
  mcp?: McpConfig;
133
163
  /** Proxy configuration (optional) */
134
164
  proxy?: ProxyConfig | null;
165
+ /** Cloud secret provider configuration (optional) */
166
+ secrets?: SecretsConfig;
135
167
  }
136
168
  /**
137
169
  * Configuration service interface
@@ -5,13 +5,14 @@
5
5
  * VS Code's workspaceState/globalState.
6
6
  */
7
7
  import type { IEnvironmentConfigService, ImportedEnvironment, LocalConfig, ResolvedEnvironment, SharedConfig } from '../../types/environment-config';
8
- import { IFileWatcherFactory, IKeyValueStore } from '../../types/platform';
8
+ import { IFileWatcherFactory, IKeyValueStore, ISecretStore } from '../../types/platform';
9
9
  import { IConfigService } from '../config';
10
10
  export declare class EnvironmentConfigService implements IEnvironmentConfigService {
11
11
  private workspaceFolder;
12
12
  private workspaceStore;
13
13
  private configService;
14
14
  private fileWatcherFactory?;
15
+ private secretStore?;
15
16
  private environmentsPath;
16
17
  private sharedConfigPath;
17
18
  private localConfigPath;
@@ -27,12 +28,14 @@ export declare class EnvironmentConfigService implements IEnvironmentConfigServi
27
28
  */
28
29
  private localGlobalValues;
29
30
  private localEnvironmentValues;
31
+ /** In-memory cache of secret values fetched from SecretStorage — keyed by envName */
32
+ private secretValuesCache;
30
33
  /**
31
34
  * Callback invoked when environment files change on disk.
32
35
  * Set by the extension host to refresh tree views and panels.
33
36
  */
34
37
  onEnvironmentsChanged?: () => void;
35
- constructor(workspaceFolder: string, workspaceStore: IKeyValueStore, configService: IConfigService, fileWatcherFactory?: IFileWatcherFactory | undefined);
38
+ constructor(workspaceFolder: string, workspaceStore: IKeyValueStore, configService: IConfigService, fileWatcherFactory?: IFileWatcherFactory | undefined, secretStore?: ISecretStore | undefined);
36
39
  private setupFileWatcher;
37
40
  dispose(): void;
38
41
  getWorkspaceFolder(): string;
@@ -83,6 +86,27 @@ export declare class EnvironmentConfigService implements IEnvironmentConfigServi
83
86
  /** @deprecated Use getEnvironmentVariableLocal instead */
84
87
  hasSessionVariable(key: string): boolean;
85
88
  getResolvedEnvironment(envName?: string): ResolvedEnvironment | null;
89
+ /**
90
+ * Retrieve a secret variable value from SecretStorage.
91
+ * Returns undefined when no SecretStorage is available (e.g. CLI context).
92
+ */
93
+ getSecretVariable(envName: string, key: string): Promise<string | undefined>;
94
+ /**
95
+ * Store a secret variable value in SecretStorage.
96
+ * No-op when no SecretStorage is available (e.g. CLI context).
97
+ */
98
+ setSecretVariable(envName: string, key: string, value: string): Promise<void>;
99
+ /**
100
+ * Delete a secret variable from SecretStorage.
101
+ * No-op when no SecretStorage is available (e.g. CLI context).
102
+ */
103
+ deleteSecretVariable(envName: string, key: string): Promise<void>;
104
+ /**
105
+ * Pre-load all secret values for an environment into the in-memory cache.
106
+ * Call this when switching environments or on extension activation so that
107
+ * the synchronous getResolvedEnvironment() always has secret values available.
108
+ */
109
+ loadSecretVariables(envName?: string): Promise<void>;
86
110
  resolveVariables(input: string, envName?: string): string;
87
111
  exportEnvironmentsToFolder(outDir: string, mergeGlobals?: boolean): void;
88
112
  resolveVariablesWithExtra(input: string, extraVariables: Record<string, string>, envName?: string): string;
@@ -28,6 +28,11 @@ export interface EnvironmentEntry {
28
28
  description?: string;
29
29
  requiresConfirmation?: boolean;
30
30
  variables: Record<string, string>;
31
+ /**
32
+ * Names of variables whose values are stored in SecretStorage, not in the JSON file.
33
+ * These names are persisted in the JSON; the values are never written to disk.
34
+ */
35
+ secretVariables?: string[];
31
36
  }
32
37
  /**
33
38
  * Determine whether a filename is a system/meta file (not an environment file).
@@ -15,6 +15,7 @@ import { ExecutionRequest, PreparedRequest } from '../../types/types';
15
15
  import { IOAuth2TokenManager } from '../auth/interfaces';
16
16
  import { IHttpRequestService } from '../http/interfaces';
17
17
  import { IRequestPreprocessor } from '../http/request-preprocessor';
18
+ import { SecretResolverRegistry } from '../secrets/secret-resolver-registry';
18
19
  import { IRequestPreparer } from './request-preparer-interfaces';
19
20
  /**
20
21
  * RequestPreparer implementation
@@ -28,7 +29,8 @@ export declare class RequestPreparer implements IRequestPreparer {
28
29
  private readonly preprocessor;
29
30
  private readonly tokenManager?;
30
31
  private readonly appInfo?;
31
- constructor(envConfigService: IEnvironmentConfigService, httpService: IHttpRequestService, preprocessor: IRequestPreprocessor, tokenManager?: IOAuth2TokenManager | undefined, appInfo?: IApplicationInfo | undefined);
32
+ private readonly secretRegistry?;
33
+ constructor(envConfigService: IEnvironmentConfigService, httpService: IHttpRequestService, preprocessor: IRequestPreprocessor, tokenManager?: IOAuth2TokenManager | undefined, appInfo?: IApplicationInfo | undefined, secretRegistry?: SecretResolverRegistry | undefined);
32
34
  prepareRequest(input: ExecutionRequest, environment: string, resolvedEnv: ResolvedEnvironment, extraVariables?: Record<string, string>): Promise<PreparedRequest>;
33
35
  private applyOAuth2;
34
36
  private applyApiKey;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * AWS Secrets Manager resolver
3
+ *
4
+ * Uses the AWS SDK v3 credential chain — no credentials are stored in HTTP Forge config.
5
+ * Order: env vars → ~/.aws/credentials → IAM instance role → ECS task role
6
+ *
7
+ * Token syntax: {{secret:aws/<secretId>}}
8
+ * e.g. {{secret:aws/myapp/prod/db-password}}
9
+ * {{secret:aws/myapp/prod/api-key#field}} (JSON secret field)
10
+ */
11
+ import type { AwsSecretsConfig, ISecretResolver } from '../../types/secret-resolver';
12
+ export declare class AwsSecretResolver implements ISecretResolver {
13
+ readonly providerName = "aws";
14
+ private readonly region;
15
+ private readonly moduleRequire;
16
+ constructor(config: AwsSecretsConfig, moduleRequire?: (name: string) => any);
17
+ resolve(path: string): Promise<string | undefined>;
18
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Azure Key Vault resolver
3
+ *
4
+ * Uses DefaultAzureCredential — no credentials stored in HTTP Forge config.
5
+ * Order: env vars (AZURE_*) → managed identity → Azure CLI login → VS Code login
6
+ *
7
+ * Token syntax: {{secret:azure/<secretName>}}
8
+ * e.g. {{secret:azure/my-api-key}}
9
+ * {{secret:azure/my-api-key/1.0}} (specific version)
10
+ *
11
+ * Config requires vaultUrl, e.g. "https://myvault.vault.azure.net"
12
+ */
13
+ import type { AzureKeyVaultConfig, ISecretResolver } from '../../types/secret-resolver';
14
+ export declare class AzureKeyVaultResolver implements ISecretResolver {
15
+ readonly providerName = "azure";
16
+ private readonly vaultUrl;
17
+ private readonly moduleRequire;
18
+ constructor(config: AzureKeyVaultConfig, moduleRequire?: (name: string) => any);
19
+ resolve(path: string): Promise<string | undefined>;
20
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Doppler secret resolver
3
+ *
4
+ * Uses the Doppler REST API — no SDK required, just a service token.
5
+ * Credentials: DOPPLER_TOKEN env var (or serviceToken in config for per-project override)
6
+ *
7
+ * Token syntax: {{secret:doppler/<secretName>}}
8
+ * e.g. {{secret:doppler/API_KEY}}
9
+ * {{secret:doppler/DATABASE_URL}}
10
+ *
11
+ * The Doppler project/config are baked into the service token itself —
12
+ * no project or config fields needed in http-forge.config.json.
13
+ *
14
+ * Prerequisites: none (uses Node.js built-in https)
15
+ */
16
+ import type { DopplerConfig, ISecretResolver } from '../../types/secret-resolver';
17
+ export declare class DopplerResolver implements ISecretResolver {
18
+ readonly providerName = "doppler";
19
+ private readonly token;
20
+ constructor(config: DopplerConfig);
21
+ resolve(path: string): Promise<string | undefined>;
22
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Google Cloud Secret Manager resolver
3
+ *
4
+ * Uses Application Default Credentials — no credentials stored in HTTP Forge config.
5
+ * Order: GOOGLE_APPLICATION_CREDENTIALS env var → gcloud CLI login → Workload Identity (GKE)
6
+ * → Metadata server (Cloud Run, Compute Engine)
7
+ *
8
+ * Token syntax: {{secret:gcp/<secretName>}}
9
+ * {{secret:gcp/<secretName>/versions/<version>}} (specific version, default: latest)
10
+ *
11
+ * Config: { "provider": "gcp", "projectId": "my-project" }
12
+ * projectId falls back to GOOGLE_CLOUD_PROJECT / GCLOUD_PROJECT env vars.
13
+ */
14
+ import type { GcpSecretsConfig, ISecretResolver } from '../../types/secret-resolver';
15
+ export declare class GcpSecretResolver implements ISecretResolver {
16
+ readonly providerName = "gcp";
17
+ private readonly projectId;
18
+ private readonly moduleRequire;
19
+ constructor(config: GcpSecretsConfig, moduleRequire?: (name: string) => any);
20
+ resolve(path: string): Promise<string | undefined>;
21
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * HashiCorp Vault resolver
3
+ *
4
+ * Credentials are NEVER stored in HTTP Forge config.
5
+ * Authentication uses:
6
+ * VAULT_TOKEN env var (token auth)
7
+ * VAULT_ADDR env var (server address, overrides config)
8
+ * VAULT_NAMESPACE env var (Enterprise/HCP namespace, overridden by config.namespace)
9
+ *
10
+ * Token syntax: {{secret:vault/<mountPath>/<secretPath>#<field>}}
11
+ * e.g. {{secret:vault/secret/myapp/prod#db_password}}
12
+ * {{secret:vault/kv/myapp/config#api_key}}
13
+ *
14
+ * The path format after the provider prefix: <mount>/<path>#<field>
15
+ * If no field is specified and the secret has a single key "value", that is returned.
16
+ */
17
+ import type { HashiCorpVaultConfig, ISecretResolver } from '../../types/secret-resolver';
18
+ export declare class HashiCorpVaultResolver implements ISecretResolver {
19
+ readonly providerName = "vault";
20
+ private readonly address;
21
+ private readonly mountPath;
22
+ private readonly namespace;
23
+ constructor(config: HashiCorpVaultConfig);
24
+ resolve(path: string): Promise<string | undefined>;
25
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * 1Password Connect / Service Account resolver
3
+ *
4
+ * Credentials are NEVER stored in HTTP Forge config.
5
+ * Authentication uses:
6
+ * OP_SERVICE_ACCOUNT_TOKEN env var (1Password Service Account — recommended for CI)
7
+ * OP_CONNECT_TOKEN + OP_CONNECT_HOST env vars (1Password Connect Server)
8
+ *
9
+ * Token syntax: {{secret:1password/<vault>/<item>/<field>}}
10
+ * e.g. {{secret:1password/MyVault/MyApp/api_key}}
11
+ * {{secret:1password/Shared/prod-db/password}}
12
+ *
13
+ * If `vault` is specified in the provider config, the token path may omit it:
14
+ * {{secret:1password/<item>/<field>}}
15
+ *
16
+ * Uses the 1Password CLI (`op`) via child_process if SDK is unavailable.
17
+ */
18
+ import type { ISecretResolver, OnePasswordConfig } from '../../types/secret-resolver';
19
+ export declare class OnePasswordResolver implements ISecretResolver {
20
+ readonly providerName = "1password";
21
+ private readonly defaultVault;
22
+ constructor(config: OnePasswordConfig);
23
+ resolve(path: string): Promise<string | undefined>;
24
+ private tryResolveSdk;
25
+ private resolveViaCli;
26
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Secret Resolver Registry — Phase 3
3
+ *
4
+ * Builds and caches ISecretResolver instances from config, and provides
5
+ * async pre-resolution of {{secret:provider/path}} tokens in template strings.
6
+ *
7
+ * Design:
8
+ * - Registry is created once at startup from IConfigService
9
+ * - resolveSecretTokens() is called BEFORE variable interpolation per-request
10
+ * - Resolved values are injected as extraVariables so the sync VariableResolver
11
+ * picks them up transparently
12
+ * - Results are cached within a single request lifetime to avoid redundant API calls
13
+ */
14
+ import type { IConfigService } from '../config/config.interface';
15
+ export declare class SecretResolverRegistry {
16
+ private readonly resolvers;
17
+ /**
18
+ * Require function rooted at the user's project (via config `scripts.modulePaths`),
19
+ * so optional cloud SDKs resolve from the same place users install custom script
20
+ * modules — not from the extension's own bundle.
21
+ */
22
+ private readonly moduleRequire;
23
+ constructor(configService?: IConfigService);
24
+ /**
25
+ * Scan a string (or recursively, any object) for {{secret:alias/path}} tokens
26
+ * and resolve them all in parallel.
27
+ *
28
+ * Returns a flat map of "secret:alias/path" → plaintext value
29
+ * suitable for injection as extraVariables into VariableResolver.
30
+ */
31
+ resolveSecretTokens(input: any, cache?: Map<string, string>): Promise<Record<string, string>>;
32
+ /** Whether any providers are configured */
33
+ get hasProviders(): boolean;
34
+ private collectTokens;
35
+ private createResolver;
36
+ /**
37
+ * Build a `require` function rooted at the user's project, so optional cloud SDKs
38
+ * resolve from the same `node_modules` where users install custom script modules
39
+ * (via config `scripts.modulePaths`). Falls back to the default `require` so the
40
+ * CLI (which lists SDKs in optionalDependencies) still works without modulePaths.
41
+ */
42
+ private buildModuleRequire;
43
+ }
@@ -16,6 +16,17 @@ import { FullResultDetails } from '../test-suite/result-storage';
16
16
  * Returns a shallow copy with sensitive header values replaced.
17
17
  */
18
18
  export declare function redactHeaders(headers: Record<string, string | string[]>): Record<string, string | string[]>;
19
+ /**
20
+ * Redact sensitive values from a cookie array.
21
+ * Cookies with sensitive names have their values replaced.
22
+ */
23
+ export declare function redactCookies(cookies?: Array<{
24
+ name?: string;
25
+ value?: string;
26
+ }>): Array<{
27
+ name?: string;
28
+ value?: string;
29
+ }>;
19
30
  /**
20
31
  * Redact sensitive query parameters from a URL string.
21
32
  * E.g. `?token=abc&name=foo` → `?token=[REDACTED]&name=foo`
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Direct Execution APIs
3
+ *
4
+ * Execute requests, collections, and suites without requiring MCP server.
5
+ * Uses shared execution logic from core executors.
6
+ *
7
+ * Used by:
8
+ * - CLI commands (run-request, run-collection, run-suite)
9
+ * - Third-party Node apps that want to execute HTTP Forge collections programmatically
10
+ */
11
+ import type { RunCollectionOptions, RunRequestOptions, RunSuiteOptions } from './runtime-contracts';
12
+ /**
13
+ * Execute a single request without MCP server overhead.
14
+ * Returns typed result; never calls process.exit.
15
+ */
16
+ export declare function runRequest(options: RunRequestOptions): Promise<unknown>;
17
+ /**
18
+ * Execute a collection without MCP server overhead.
19
+ * Runs all enabled requests in sequence.
20
+ * Returns typed result; never calls process.exit.
21
+ */
22
+ export declare function runCollection(options: RunCollectionOptions): Promise<unknown>;
23
+ /**
24
+ * Execute a test suite without MCP server overhead.
25
+ * Returns typed result; never calls process.exit.
26
+ */
27
+ export declare function runSuite(options: RunSuiteOptions): Promise<unknown>;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Embeddable MCP Runtime
3
+ *
4
+ * Factory and lifecycle management for MCP runtime that can be embedded in Node.js apps.
5
+ * Supports:
6
+ * - In-process tool execution via executeTool()
7
+ * - Optional lightweight HTTP endpoint for external callers
8
+ */
9
+ import type { McpRuntimeHandle, McpRuntimeOptions } from './runtime-contracts';
10
+ /**
11
+ * Create an embeddable MCP runtime instance.
12
+ *
13
+ * The returned handle provides lifecycle control and tool execution.
14
+ * Multiple instances can coexist with different ports and workspaces.
15
+ *
16
+ * @param options Configuration for the runtime
17
+ * @returns Handle for controlling the runtime
18
+ */
19
+ export declare function createMcpRuntime(options: McpRuntimeOptions): Promise<McpRuntimeHandle>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Node.js Platform Adapters
3
+ *
4
+ * Implementations of platform abstractions for Node.js environments.
5
+ * Used by CLI and external third-party Node apps that don't have VS Code context.
6
+ */
7
+ import type { IFileWatcher, IFileWatcherFactory, IKeyValueStore, INotificationService } from '../types/platform';
8
+ export declare class NodeFileWatcherFactory implements IFileWatcherFactory {
9
+ createFileWatcher(base: string, glob: string): IFileWatcher;
10
+ }
11
+ export declare class NodeKeyValueStore implements IKeyValueStore {
12
+ private data;
13
+ private storeFile;
14
+ constructor(storePath: string);
15
+ private load;
16
+ private save;
17
+ get<T>(key: string, defaultValue?: T): T | undefined;
18
+ update(key: string, value: unknown): Promise<void>;
19
+ }
20
+ export declare class NodeNotificationService implements INotificationService {
21
+ showInformation(message: string): Promise<string | undefined>;
22
+ showWarning(message: string): Promise<string | undefined>;
23
+ showError(message: string): Promise<string | undefined>;
24
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Node.js Bootstrap
3
+ *
4
+ * Initialize HTTP Forge core services for Node.js environments (CLI, third-party apps).
5
+ * Provides a factory that creates initialized service containers with Node-specific adapters.
6
+ */
7
+ import { ServiceContainer } from '../di/service-container';
8
+ export interface NodeBootstrapOptions {
9
+ /** Workspace root folder path */
10
+ workspaceFolder: string;
11
+ /** Optional application info (name, version) */
12
+ appInfo?: {
13
+ name: string;
14
+ version: string;
15
+ };
16
+ }
17
+ /**
18
+ * Bootstrap HTTP Forge core services for Node.js environment.
19
+ * Creates and initializes a service container with Node-native platform adapters.
20
+ *
21
+ * @param options Bootstrap configuration
22
+ * @returns Initialized service container ready for use
23
+ */
24
+ export declare function bootstrapNodeRuntime(options: NodeBootstrapOptions): ServiceContainer;
25
+ /**
26
+ * Create and initialize service container for CLI or direct API use.
27
+ * This is a convenience wrapper that combines bootstrap and returns the container.
28
+ */
29
+ export declare function createNodeContainer(workspaceFolder: string): ServiceContainer;
@@ -0,0 +1,125 @@
1
+ /**
2
+ * HTTP Forge Runtime Contracts
3
+ *
4
+ * Public API surface for embeddable MCP runtime and direct execution.
5
+ * Used by CLI, third-party Node apps, and external integrations.
6
+ *
7
+ * Three consumption modes:
8
+ * 1. Embeddable MCP: createMcpRuntime() + lifecycle handle
9
+ * 2. Direct execution: runRequest/runCollection/runSuite without MCP
10
+ * 3. CLI: subcommands that use modes 1 and 2
11
+ */
12
+ /**
13
+ * Configuration for creating an embeddable MCP runtime instance.
14
+ */
15
+ export interface McpRuntimeOptions {
16
+ /** Workspace root folder path */
17
+ workspaceFolder: string;
18
+ /** Port to listen on (default: 3100) */
19
+ port?: number;
20
+ /** Host to bind to (default: 127.0.0.1) */
21
+ host?: string;
22
+ /** Config field overrides (e.g. { 'mcp.port': 3200 }) */
23
+ configOverrides?: Record<string, unknown>;
24
+ }
25
+ /**
26
+ * Handle for controlling an embeddable MCP runtime instance.
27
+ */
28
+ export interface McpRuntimeHandle {
29
+ /** Start the MCP server */
30
+ start(): Promise<void>;
31
+ /** Stop the MCP server */
32
+ stop(): Promise<void>;
33
+ /** Check if server is running */
34
+ isRunning(): boolean;
35
+ /** Get the port the server is listening on */
36
+ getPort(): number;
37
+ /** Execute a tool in-process (no protocol overhead) */
38
+ executeTool(name: string, args?: Record<string, unknown>): Promise<unknown>;
39
+ }
40
+ /**
41
+ * Factory to create and manage embeddable MCP runtime instances.
42
+ */
43
+ export declare function createMcpRuntime(options: McpRuntimeOptions): Promise<McpRuntimeHandle>;
44
+ /**
45
+ * Options for directly executing a single request without MCP.
46
+ */
47
+ export interface RunRequestOptions {
48
+ /** Workspace root folder path */
49
+ workspaceFolder: string;
50
+ /** Collection ID containing the request */
51
+ collectionId: string;
52
+ /** Request ID to execute */
53
+ requestId: string;
54
+ /** Environment name (defaults to currently selected) */
55
+ environment?: string;
56
+ /** Extra variables to inject into execution */
57
+ variables?: Record<string, unknown>;
58
+ /** Override or add request headers */
59
+ headers?: Record<string, string>;
60
+ /** Override query parameters */
61
+ query?: Record<string, string>;
62
+ /** Replace request body (JSON string) */
63
+ body?: string;
64
+ /** Extra response fields to include: headers, cookies, tests, consoleOutput, report */
65
+ include?: string[];
66
+ }
67
+ /**
68
+ * Options for directly executing all requests in a collection without MCP.
69
+ */
70
+ export interface RunCollectionOptions {
71
+ /** Workspace root folder path */
72
+ workspaceFolder: string;
73
+ /** Collection ID to execute */
74
+ collectionId: string;
75
+ /** Environment name (defaults to currently selected) */
76
+ environment?: string;
77
+ /** Extra variables injected into every request */
78
+ variables?: Record<string, unknown>;
79
+ /** Number of iterations (default: 1) */
80
+ iterations?: number;
81
+ /** Stop on first failure (default: false) */
82
+ stopOnError?: boolean;
83
+ /** Delay between requests in milliseconds (default: 0) */
84
+ delay?: number;
85
+ /** Extra response fields to include: perRequest, failedOnly, consoleOutput */
86
+ include?: string[];
87
+ }
88
+ /**
89
+ * Options for directly executing a test suite without MCP.
90
+ */
91
+ export interface RunSuiteOptions {
92
+ /** Workspace root folder path */
93
+ workspaceFolder: string;
94
+ /** Suite ID to execute */
95
+ suiteId: string;
96
+ /** Environment name (defaults to currently selected) */
97
+ environment?: string;
98
+ /** Extra variables injected into every request */
99
+ variables?: Record<string, unknown>;
100
+ /** Number of iterations (overrides suite default) */
101
+ iterations?: number;
102
+ /** Stop on first failure (overrides suite default) */
103
+ stopOnError?: boolean;
104
+ /** Delay between requests in ms (overrides suite default) */
105
+ delay?: number;
106
+ /** Run only requests whose names match one of these strings (case-insensitive) */
107
+ requestFilter?: string[];
108
+ /** Extra response fields to include: perRequest, failedOnly, consoleOutput */
109
+ include?: string[];
110
+ }
111
+ /**
112
+ * Execute a single request directly without MCP server.
113
+ * Returns typed result object; never calls process.exit.
114
+ */
115
+ export declare function runRequest(options: RunRequestOptions): Promise<unknown>;
116
+ /**
117
+ * Execute a collection directly without MCP server.
118
+ * Returns typed result object; never calls process.exit.
119
+ */
120
+ export declare function runCollection(options: RunCollectionOptions): Promise<unknown>;
121
+ /**
122
+ * Execute a test suite directly without MCP server.
123
+ * Returns typed result object; never calls process.exit.
124
+ */
125
+ export declare function runSuite(options: RunSuiteOptions): Promise<unknown>;
@@ -11,6 +11,11 @@ export interface EnvironmentConfig {
11
11
  description?: string;
12
12
  requiresConfirmation?: boolean;
13
13
  variables?: Record<string, string>;
14
+ /**
15
+ * Names of variables whose values are stored in SecretStorage rather than the JSON file.
16
+ * The JSON file stores the variable name only; the value is fetched at resolution time.
17
+ */
18
+ secretVariables?: string[];
14
19
  }
15
20
  /**
16
21
  * Shared configuration file structure
@@ -115,6 +120,14 @@ export interface IVariableManager {
115
120
  export interface IEnvironmentConfigService extends IEnvironmentConfigReader, IEnvironmentConfigWriter, IEnvironmentSelector, IVariableResolver, IVariableManager {
116
121
  loadConfigs(): void;
117
122
  exportEnvironmentsToFolder(outDir: string, mergeGlobals?: boolean): void;
123
+ /** Read a single secret variable from SecretStorage. */
124
+ getSecretVariable(envName: string, key: string): Promise<string | undefined>;
125
+ /** Store a secret variable value in SecretStorage. */
126
+ setSecretVariable(envName: string, key: string, value: string): Promise<void>;
127
+ /** Delete a secret variable from SecretStorage. */
128
+ deleteSecretVariable(envName: string, key: string): Promise<void>;
129
+ /** Load all secrets for an environment (or current) into cache. */
130
+ loadSecretVariables(envName?: string): Promise<void>;
118
131
  }
119
132
  /**
120
133
  * Interface for storing and retrieving environment variables