openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
2 lines • 856 B
JavaScript
//!src/agents/sandbox/config-contract.ts
function resolveSandboxDependencyStore(e){const t=e.env?.PNPM_CONFIG_STORE_DIR??e.env?.npm_config_store_dir??`/tmp/openclaw-deps/data/pnpm/store`;return{...e,tmpfs:[...e.tmpfs,`/tmp/openclaw-deps:mode=1777`],env:{XDG_CACHE_HOME:`/tmp/openclaw-deps/cache`,npm_config_cache:`/tmp/openclaw-deps/cache/npm`,BUN_INSTALL_CACHE_DIR:`/tmp/openclaw-deps/cache/bun`,PIP_CACHE_DIR:`/tmp/openclaw-deps/cache/pip`,UV_CACHE_DIR:`/tmp/openclaw-deps/cache/uv`,...e.env,npm_config_store_dir:t,PNPM_CONFIG_STORE_DIR:t}}}function resolveSandboxScope(e){return e.scope??`agent`}function resolveSandboxDockerEnv(e){const t=e.scope===`shared`?void 0:e.agentEnv;return t?{...e.globalEnv??{LANG:`C.UTF-8`},...t}:e.globalEnv??{LANG:`C.UTF-8`}}export{resolveSandboxDockerEnv as n,resolveSandboxScope as r,resolveSandboxDependencyStore as t};