diff --git a/.gitignore b/.gitignore index 2edc46f7..128a69ab 100644 --- a/.gitignore +++ b/.gitignore @@ -181,3 +181,5 @@ examples/tests/**/* uv.lock .DS_Store +.python-version + diff --git a/agentstack/_tools/composio/config.json b/agentstack/_tools/composio/config.json index cc6bbe7d..e2b56f82 100644 --- a/agentstack/_tools/composio/config.json +++ b/agentstack/_tools/composio/config.json @@ -12,7 +12,7 @@ "find_actions_by_tags" ], "dependencies": [ - "composio>=1.0.0" + "composio-core>=0.6.0" ], "cta": "!!! Composio provides 150+ tools. Additional setup is required in agentstack/tools/composio/__init__.py" } diff --git a/agentstack/packaging.py b/agentstack/packaging.py index e45de5c6..bdb1bed8 100644 --- a/agentstack/packaging.py +++ b/agentstack/packaging.py @@ -48,11 +48,22 @@ def on_progress(line: str): def on_error(line: str): log.error(f"uv: [error]\n {line.strip()}") - _wrap_command_with_callbacks( - [get_uv_bin(), 'pip', 'install', '--python', '.venv/bin/python', '.'], - on_progress=on_progress, - on_error=on_error, - ) + try: + result = _wrap_command_with_callbacks( + [get_uv_bin(), 'pip', 'install', '--python', '.venv/bin/python', '.'], + on_progress=on_progress, + on_error=on_error, + ) + if result is False: + log.info("Retrying uv installation with --no-cache flag...") + _wrap_command_with_callbacks( + [get_uv_bin(), 'pip', 'install', '--no-cache', '--python', '.venv/bin/python', '.'], + on_progress=on_progress, + on_error=on_error, + ) + except Exception as e: + log.error(f"Installation failed: {str(e)}") + raise def remove(package: str): @@ -137,8 +148,9 @@ def _wrap_command_with_callbacks( on_progress: Callable[[str], None] = lambda x: None, on_complete: Callable[[str], None] = lambda x: None, on_error: Callable[[str], None] = lambda x: None, -) -> None: - """Run a command with progress callbacks.""" +) -> bool: + """Run a command with progress callbacks. Returns bool for cmd success.""" + process = None try: all_lines = '' process = subprocess.Popen( @@ -165,12 +177,16 @@ def _wrap_command_with_callbacks( if process.wait() == 0: # return code: success on_complete(all_lines) + return True else: on_error(all_lines) + return False except Exception as e: on_error(str(e)) + return False finally: - try: - process.terminate() - except: - pass + if process: + try: + process.terminate() + except: + pass diff --git a/docs/images/the_agent_stack.png b/docs/images/the_agent_stack.png index bd1b7ad0..0bb0212b 100644 Binary files a/docs/images/the_agent_stack.png and b/docs/images/the_agent_stack.png differ diff --git a/pyproject.toml b/pyproject.toml index 95669e16..eb708eaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,8 +44,8 @@ test = [ "tox", ] crewai = [ - "crewai==0.83.0", - "crewai-tools==0.14.0", + "crewai==0.100.0", + "crewai-tools==0.33.0", ] langgraph = [ "langgraph>=0.2.61",