From 50a268ead4c9c8ebc6195a7949fff585fcafb04f Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Tue, 28 Jan 2025 14:33:54 -0800 Subject: [PATCH 1/3] fix composio package mismatch --- agentstack/_tools/composio/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" } From 2f3be81550691a0dd58498231dfc82e732983450 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Tue, 28 Jan 2025 14:34:29 -0800 Subject: [PATCH 2/3] upgrade crew default --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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", From 47d12bed5207b0012bd1e7a7463a73af635e77d6 Mon Sep 17 00:00:00 2001 From: Braelyn Boynton Date: Tue, 28 Jan 2025 14:43:36 -0800 Subject: [PATCH 3/3] retry logic for caching --- .gitignore | 2 ++ agentstack/packaging.py | 38 +++++++++++++++++++++++--------- docs/images/the_agent_stack.png | Bin 180943 -> 1250612 bytes 3 files changed, 29 insertions(+), 11 deletions(-) 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/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 bd1b7ad0b20fe54f23bd8d01096f3c0d3610ff28..0bb0212bba66cc73e5ab548bdf21758654e77911 100644 GIT binary patch literal 1250612 zcmV)oK%BpcP)N9nh@q_0!@@E?_uzdk&^`S&8<{3|#Ak`<-k&vPc<*H1F@ z&QORH0t1U((@!u%GF|+8a?z+lK-mPB>LrjwwGR6ub6>j^!5Gg#shM1Hd z<2_cj!}gTYQKbn|AQo)89+U}+jkW?(b57wS$S?Dz` z5&eMj8{aK!oXa68M2P@Q?`_a*9;?$* z<2Pi?Um3Wy*z#`uF!{u8%~ys-I7#d(e+JgQ%W0l_7r6D1E`usn?$