MCPcopy Create free account
hub / github.com/agent-tower/core / buildPtyWrapperEnv

Function buildPtyWrapperEnv

packages/server/src/utils/process-launch.ts:18–30  ·  view source on GitHub ↗
(
  agentEnv: Record<string, string>,
  parentEnv: NodeJS.ProcessEnv = process.env,
)

Source from the content-addressed store, hash-verified

16 'ELECTRON_RUN_AS_NODE',
17] as const;
18
19export function buildPtyWrapperEnv(
20 agentEnv: Record<string, string>,
21 parentEnv: NodeJS.ProcessEnv = process.env,
22): Record<string, string> {
23 const wrapperEnv = { ...agentEnv };
24 for (const key of PTY_WRAPPER_ENV_KEYS) {
25 const value = parentEnv[key];
26 if (value !== undefined) {
27 wrapperEnv[key] = value;
28 }
29 }
30 return wrapperEnv;
31}
32
33const PTY_WRAPPER_SCRIPT = String.raw`

Callers 3

spawnInternalFunction · 0.85
spawnWithStdinFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected