🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
Auto-update documentation after merge [skip ci]
camel-docs-bot744697873b70
diff --git a/docs/mintlify/docs.json b/docs/mintlify/docs.jsonindex 6dd1059c1..3cd9e15a8 100644--- a/docs/mintlify/docs.json+++ b/docs/mintlify/docs.json@@ -610,6 +610,9 @@"reference/camel.toolkits.non_visual_browser_toolkit.browser_non_visual_toolkit","reference/camel.toolkits.non_visual_browser_toolkit.nv_browser_session","reference/camel.toolkits.non_visual_browser_toolkit.snapshot",+ "reference/camel.toolkits.terminal_toolkit.go_runtime",+ "reference/camel.toolkits.terminal_toolkit.java_runtime",+ "reference/camel.toolkits.terminal_toolkit.runtime_utils","reference/camel.toolkits.terminal_toolkit.terminal_toolkit","reference/camel.toolkits.terminal_toolkit.utils"]diff --git a/docs/mintlify/reference/camel.toolkits.terminal_toolkit.go_runtime.mdx b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.go_runtime.mdxnew file mode 100644index 000000000..b07102f6a--- /dev/null+++ b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.go_runtime.mdx@@ -0,0 +1,32 @@+<a id="camel.toolkits.terminal_toolkit.go_runtime"></a>++Go runtime auto-installation utilities.++This module provides functionality to detect, download, and configure+the Go programming language runtime. If Go is not already available+on the system, it is downloaded from the official Go website and+extracted to `__INLINE_CODE_0__`.++<a id="camel.toolkits.terminal_toolkit.go_runtime.ensure_go_available"></a>++## ensure_go_available++```python+def ensure_go_available(update_callback: UpdateCallback = None):+```++Ensure Go is available, downloading it if necessary.++Checks if Go is already installed on the system. If not, downloads+the official Go binary for the current platform and extracts it to+`__INLINE_CODE_0__`.++**Parameters:**++- **update_callback** (Callable[[str], None], optional): Callback function to receive status updates. (default: :obj:`None`)++**Returns:**++ Optional[str]: The path to the Go `__INLINE_CODE_0__` directory that+should be added to PATH, or `__INLINE_CODE_1__` if Go could not+be made available.diff --git a/docs/mintlify/reference/camel.toolkits.terminal_toolkit.java_runtime.mdx b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.java_runtime.mdxnew file mode 100644index 000000000..de97ee3d1--- /dev/null+++ b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.java_runtime.mdx@@ -0,0 +1,53 @@+<a id="camel.toolkits.terminal_toolkit.java_runtime"></a>++Java runtime auto-installation utilities.++This module provides functionality to detect, download, and configure+the Java (JDK) runtime. If Java is not already available on the+system, Eclipse Temurin (Adoptium) JDK 21 LTS is downloaded and+extracted to `__INLINE_CODE_0__`.++<a id="camel.toolkits.terminal_toolkit.java_runtime.ensure_java_available"></a>++## ensure_java_available++```python+def ensure_java_available(update_callback: UpdateCallback = None):+```++Ensure Java (JDK) is available, downloading if necessary.++Checks if Java is already installed on the system. If not,+downloads Eclipse Temurin (Adoptium) JDK 21 LTS for the current+platform and extracts it to `__INLINE_CODE_0__`.++**Parameters:**++- **update_callback** (Callable[[str], None], optional): Callback function to receive status updates. (default: :obj:`None`)++**Returns:**++ Optional[str]: The JAVA_HOME directory path, or `__INLINE_CODE_0__`+if Java could not be made available.++<a id="camel.toolkits.terminal_toolkit.java_runtime._find_java_home"></a>++## _find_java_home++```python+def _find_java_home(java_runtime_dir: str, os_name: SupportedOS):+```++Find the JAVA_HOME directory within the runtime directory.++Adoptium extracts to a versioned directory like+`__INLINE_CODE_0__`. This helper scans for it.++**Parameters:**++- **java_runtime_dir** (str): The parent directory where Java was extracted.+- **os_name** (SupportedOS): The operating system name.++**Returns:**++ Optional[str]: The path to JAVA_HOME, or None if not found.diff --git a/docs/mintlify/reference/camel.toolkits.terminal_toolkit.runtime_utils.mdx b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.runtime_utils.mdxnew file mode 100644index 000000000..632efecca--- /dev/null+++ b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.runtime_utils.mdx@@ -0,0 +1,114 @@+<a id="camel.toolkits.terminal_toolkit.runtime_utils"></a>++Shared utilities, constants, and types for runtime auto-installation.++This module provides common infrastructure used by the Go and Java+runtime installers, including platform detection, binary download+and extraction, and shared type definitions.++<a id="camel.toolkits.terminal_toolkit.runtime_utils.Runtime"></a>++## Runtime++```python+class Runtime(str, Enum):+```++Supported language runtimes.++<a id="camel.toolkits.terminal_toolkit.runtime_utils.RuntimeDownloadError"></a>++## RuntimeDownloadError++```python+class RuntimeDownloadError(Exception):+```++Raised when a runtime binary download fails.++<a id="camel.toolkits.terminal_toolkit.runtime_utils.RuntimeExtractionError"></a>++## RuntimeExtractionError++```python+class RuntimeExtractionError(Exception):+```++Raised when extracting a downloaded runtime archive fails.++<a id="camel.toolkits.terminal_toolkit.runtime_utils.RuntimeInstallError"></a>++## RuntimeInstallError++```python+class RuntimeInstallError(Exception):+```++Raised when a runtime installation fails for any reason.++<a id="camel.toolkits.terminal_toolkit.runtime_utils.get_platform_info"></a>++## get_platform_info++```python+def get_platform_info():+```++**Returns:**++ tuple[SupportedOS, SupportedArch]: A tuple of (os_name, arch)+suitable for constructing download URLs.++**Raises:**++- **RuntimeError**: If the OS or architecture is unsupported.++<a id="camel.toolkits.terminal_toolkit.runtime_utils.download_and_extract_runtime"></a>++## download_and_extract_runtime++```python+def download_and_extract_runtime(+ url: str,+ target_dir: str,+ archive_type: ArchiveType = 'tar.gz',+ checksum_url: Optional[str] = None,+ update_callback: UpdateCallback = None+):+```++Download and extract a runtime binary archive.++**Parameters:**++- **url** (str): URL of the archive to download.+- **target_dir** (str): Directory to extract the archive into.+- **archive_type** (ArchiveType): Type of archive, either `__INLINE_CODE_0____INLINE_CODE_1____INLINE_CODE_2____INLINE_CODE_3__tar.gz`)+- **checksum_url** (str, optional): URL to a SHA256 checksum file for verification. (default: :obj:`None`)+- **update_callback** (Callable[[str], None], optional): Callback function to receive status updates. (default: :obj:`None`)++**Raises:**++- **RuntimeDownloadError**: If the download fails.+- **RuntimeExtractionError**: If the archive extraction fails.+- **RuntimeInstallError**: If the installation fails for any++<a id="camel.toolkits.terminal_toolkit.runtime_utils._verify_checksum"></a>++## _verify_checksum++```python+def _verify_checksum(+ file_path: str,+ checksum_url: str,+ update_callback: UpdateCallback = None+):+```++Verify the SHA256 checksum of a downloaded file.++**Parameters:**++- **file_path** (str): Path to the file to verify.+- **checksum_url** (str): URL to the SHA256 checksum file.+- **update_callback** (Callable[[str], None], optional): Callback function to receive status updates. (default: :obj:`None`)diff --git a/docs/mintlify/reference/camel.toolkits.terminal_toolkit.terminal_toolkit.mdx b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.terminal_toolkit.mdxindex 234033375..e1233ac2f 100644--- a/docs/mintlify/reference/camel.toolkits.terminal_toolkit.terminal_toolkit.mdx+++ b/docs/mintlify/reference/camel.toolkits.terminal_toolkit.terminal_toolkit.mdx@@ -32,6 +32,7 @@ in either a local or a sandboxed Docker environment.- **allowed_commands** (Optional[List[str]]): List of allowed commands when safe_mode is True. If None, uses default safety rules.- **clone_current_env** (bool): Whether to clone the current Python environment for local execution. Defaults to False.- **install_dependencies** (List): A list of user specified libraries to install.+- **enable_other_runtimes** (list[Runtime]): List of additional language runtimes to auto-install. Supported values are `__INLINE_CODE_0____INLINE_CODE_1____INLINE_CODE_2____INLINE_CODE_3____INLINE_CODE_4__`.<a id="camel.toolkits.terminal_toolkit.terminal_toolkit.TerminalToolkit.__init__"></a>@@ -48,7 +49,8 @@ def __init__(safe_mode: bool = True,allowed_commands: Optional[List[str]] = None,clone_current_env: bool = False,- install_dependencies: Optional[List[str]] = None+ install_dependencies: Optional[List[str]] = None,+ enable_other_runtimes: list[Runtime] | None = None):```@@ -82,6 +84,36 @@ def _setup_initial_environment(self):Set up an initial environment with Python 3.10.+<a id="camel.toolkits.terminal_toolkit.terminal_toolkit.TerminalToolkit._setup_optional_runtimes"></a>++### _setup_optional_runtimes++```python+def _setup_optional_runtimes(self, update_callback):+```++Set up Go and/or Java runtimes if requested.++Stores runtime paths in `__INLINE_CODE_0__` instead of+mutating the process-global `__INLINE_CODE_1__`, so only commands+launched by this toolkit instance see the extra paths.++**Parameters:**++- **update_callback**: Callback for status messages.++<a id="camel.toolkits.terminal_toolkit.terminal_toolkit.TerminalToolkit._get_env_vars"></a>++### _get_env_vars++```python+def _get_env_vars(self):+```++**Returns:**++ dict[str, str]: Environment variables for subprocess.+<a id="camel.toolkits.terminal_toolkit.terminal_toolkit.TerminalToolkit._get_venv_path"></a>### _get_venv_path