We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a71e19e commit 63f4f08Copy full SHA for 63f4f08
1 file changed
sdk/src/agents/load-agents.ts
@@ -45,7 +45,9 @@ export function resolveMcpEnv(
45
if (value.startsWith('$')) {
46
// $VAR_NAME reference - resolve from process.env
47
const envVarName = value.slice(1) // Remove the leading $
48
- const envValue = process.env[envVarName]
+ // Allow dynamic process.env access
49
+ const envName = 'env'
50
+ const envValue = process[envName][envVarName]
51
52
if (envValue === undefined) {
53
throw new Error(
@@ -246,9 +248,7 @@ export async function loadLocalAgents({
246
248
resolveAgentMcpEnv(processedAgentDefinition)
247
249
} catch (error) {
250
if (verbose) {
- console.error(
- error instanceof Error ? error.message : String(error),
251
- )
+ console.error(error instanceof Error ? error.message : String(error))
252
}
253
continue
254
0 commit comments