MCPcopy Create free account
hub / github.com/Noumena-Network/code / withoutSSHTunnelVars

Function withoutSSHTunnelVars

src/utils/managedEnv.ts:24–41  ·  view source on GitHub ↗

* `ncode ssh` remote: ANTHROPIC_UNIX_SOCKET routes auth through a -R forwarded * socket to a local proxy, and the launcher sets a handful of placeholder auth * env vars that the remote's ~/.claude settings.env MUST NOT clobber (see * isAnthropicAuthEnabled). Strip them from any settings-sourced e

(
  env: Record<string, string> | undefined,
)

Source from the content-addressed store, hash-verified

22 * isAnthropicAuthEnabled). Strip them from any settings-sourced env object.
23 */
24function withoutSSHTunnelVars(
25 env: Record<string, string> | undefined,
26): Record<string, string> {
27 if (!env || !process.env.ANTHROPIC_UNIX_SOCKET) return env || {}
28 const {
29 ANTHROPIC_UNIX_SOCKET: _1,
30 ANTHROPIC_BASE_URL: _2,
31 NOUMENA_API_KEY: _3,
32 ANTHROPIC_API_KEY: _4,
33 OPENAI_API_KEY: _5,
34 OPENAI_BASE_URL: _6,
35 OPENAI_MODEL: _7,
36 ANTHROPIC_AUTH_TOKEN: _8,
37 CLAUDE_CODE_OAUTH_TOKEN: _9,
38 ...rest
39 } = env
40 return rest
41}
42
43/**
44 * When the host owns inference routing (sets

Callers 1

filterSettingsEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected