diff --git a/packages/provider-core/src/server/instanceEnvironment.test.ts b/packages/provider-core/src/server/instanceEnvironment.test.ts index f5dc3a3a915a5..6c9a905de88b8 100644 --- a/packages/provider-core/src/server/instanceEnvironment.test.ts +++ b/packages/provider-core/src/server/instanceEnvironment.test.ts @@ -26,12 +26,14 @@ describe("mergeProviderInstanceEnvironment", () => { const baseEnv = { CODEX_HOME: "~/.inherited-codex", CLAUDE_CONFIG_DIR: "~/.inherited-claude", + CLAUDE_SECURESTORAGE_CONFIG_DIR: "~/.inherited-claude-secure", GROK_HOME: "~/.inherited-grok", }; const environment = yield* mergeProviderInstanceEnvironment( [ { name: "CODEX_HOME", value, sensitive: false }, { name: "CLAUDE_CONFIG_DIR", value, sensitive: false }, + { name: "CLAUDE_SECURESTORAGE_CONFIG_DIR", value, sensitive: false }, { name: "GROK_HOME", value, sensitive: false }, { name: "CUSTOM_VALUE", value, sensitive: false }, ], @@ -41,6 +43,7 @@ describe("mergeProviderInstanceEnvironment", () => { expect(environment).toEqual({ CODEX_HOME: path.join("/home/ada", tail), CLAUDE_CONFIG_DIR: path.join("/home/ada", tail), + CLAUDE_SECURESTORAGE_CONFIG_DIR: path.join("/home/ada", tail), GROK_HOME: path.join("/home/ada", tail), CUSTOM_VALUE: value, OTEL_RESOURCE_ATTRIBUTES: LAUNCHED, @@ -48,6 +51,7 @@ describe("mergeProviderInstanceEnvironment", () => { expect(baseEnv).toEqual({ CODEX_HOME: "~/.inherited-codex", CLAUDE_CONFIG_DIR: "~/.inherited-claude", + CLAUDE_SECURESTORAGE_CONFIG_DIR: "~/.inherited-claude-secure", GROK_HOME: "~/.inherited-grok", }); }).pipe( diff --git a/packages/provider-core/src/server/pathExpansion.ts b/packages/provider-core/src/server/pathExpansion.ts index 6c5eab795000e..1aaef6e0903d0 100644 --- a/packages/provider-core/src/server/pathExpansion.ts +++ b/packages/provider-core/src/server/pathExpansion.ts @@ -11,7 +11,12 @@ export function expandHomePath(value: string, home: string): string { return value; } -const HOME_PATH_VARIABLES = new Set(["CODEX_HOME", "CLAUDE_CONFIG_DIR", "GROK_HOME"]); +const HOME_PATH_VARIABLES = new Set([ + "CODEX_HOME", + "CLAUDE_CONFIG_DIR", + "CLAUDE_SECURESTORAGE_CONFIG_DIR", + "GROK_HOME", +]); export function expandHomeVariable(name: string, value: string, home: string): string { return HOME_PATH_VARIABLES.has(name) ? expandHomePath(value, home) : value;