install_package
Installs a package using its language's native manager (uv pip, npm, gem, go get, cargo add) into a session's workspace for import by executed code; without session_id, installs to the shared cache.
Instructions
Install a package for a language (uv pip / npm / gem / go get / cargo add...).
With session_id, installs into that session's workspace so executed code can import it. Without, installs into a shared cache.
NETWORK: yes, always. The package manager fetches from its registry (PyPI, npm, rubygems, crates.io). codecalc opens no socket itself; the child process does.
NOT SANDBOXED: the installer runs as a direct subprocess of the server, so install-time hooks (npm postinstall, Python build backends, Cargo build scripts) execute with the server user's filesystem access. The environment is still restricted to the allowlist, so secrets do not leak, but the filesystem is not confined. Do not point this at untrusted input. See SECURITY.md.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | ||
| version | No | ||
| language | Yes | ||
| session_id | No |