MCPcopy Create free account
hub / github.com/callstack/agent-device / managedAgentBrowserEnv

Function managedAgentBrowserEnv

src/platforms/web/agent-browser-tool.ts:153–165  ·  view source on GitHub ↗
(
  status: AgentBrowserToolStatus,
  env: NodeJS.ProcessEnv,
)

Source from the content-addressed store, hash-verified

151}
152
153function managedAgentBrowserEnv(
154 status: AgentBrowserToolStatus,
155 env: NodeJS.ProcessEnv,
156): NodeJS.ProcessEnv {
157 fs.mkdirSync(status.homeDir, { recursive: true });
158 ensureRuntimeHomeDir(status);
159 fs.mkdirSync(status.socketDir, { recursive: true });
160 return {
161 ...env,
162 HOME: status.runtimeHomeDir,
163 AGENT_BROWSER_SOCKET_DIR: status.socketDir,
164 };
165}
166
167function ensureRuntimeHomeDir(status: AgentBrowserToolStatus): void {
168 if (status.runtimeHomeDir === status.homeDir) return;

Callers 2

createManagedToolFunction · 0.85
runManagedAgentBrowserFunction · 0.85

Calls 1

ensureRuntimeHomeDirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…