blocks-cli 0.1.36__tar.gz → 0.1.38__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/PKG-INFO +1 -1
  2. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/push.py +7 -3
  3. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/registration.py +5 -2
  4. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/setup.py +1 -1
  5. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/LICENSE +0 -0
  6. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/MANIFEST.in +0 -0
  7. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/README.md +0 -0
  8. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/__init__.py +0 -0
  9. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/api.py +0 -0
  10. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/builds.py +0 -0
  11. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/bundles.py +0 -0
  12. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/__base__.py +0 -0
  13. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/__init__.py +0 -0
  14. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/configure.py +0 -0
  15. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/create.py +0 -0
  16. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/init.py +0 -0
  17. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/commands/test.py +0 -0
  18. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/config/__init__.py +0 -0
  19. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/config/auth.py +0 -0
  20. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/config/config.py +0 -0
  21. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/console.py +0 -0
  22. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/fs.py +0 -0
  23. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli/package.py +0 -0
  24. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/blocks_cli.egg-info/SOURCES.txt +0 -0
  25. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/requirements.txt +0 -0
  26. {blocks-cli-0.1.36 → blocks-cli-0.1.38}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: blocks-cli
3
- Version: 0.1.36
3
+ Version: 0.1.38
4
4
  Summary: CLI tool for Blocks, a platform for writing custom AI-enabled codebase automations in Python. Leverage a full codebase-aware API. Automatically trigger automations from Github, Slack, and other providers.
5
5
  Home-page: https://github.com/BlocksOrg/sdk
6
6
  Author: BlocksOrg
@@ -1,7 +1,6 @@
1
+ from typing import Optional
1
2
  import git
2
3
  import typer
3
- import importlib.util
4
- import sys
5
4
  import re
6
5
 
7
6
  from pathlib import Path
@@ -184,6 +183,10 @@ def push(
184
183
  "task_kwargs": {},
185
184
  }
186
185
 
186
+ # Extract is_agent flag if present
187
+ is_agent = task_kwargs.get("is_agent", False)
188
+ automation_config["is_agent"] = is_agent
189
+
187
190
  # Add any additional args that weren't explicitly handled
188
191
  additional_task_kwargs = {
189
192
  k: v
@@ -199,7 +202,8 @@ def push(
199
202
  "config_class",
200
203
  "plugins",
201
204
  "config_schema",
202
- "required_env_vars"
205
+ "required_env_vars",
206
+ "is_agent"
203
207
  ]
204
208
  }
205
209
  automation_config["trigger_kwargs"] = trigger_kwargs
@@ -21,12 +21,15 @@ def get_blocks_state_and_module_from_file(file: Path):
21
21
  automation_module = get_module_from_file(file)
22
22
  has_blocks_import = hasattr(automation_module, "blocks")
23
23
  has_task_import = hasattr(automation_module, "task")
24
+ has_agent_import = hasattr(automation_module, "agent")
24
25
 
25
- if not any([has_blocks_import, has_task_import]):
26
- raise Exception("No blocks or task import found in the specified file, likely not an automation file.")
26
+ if not any([has_blocks_import, has_task_import, has_agent_import]):
27
+ raise Exception("No blocks, task, or agent import found in the specified file, likely not an automation file.")
27
28
  if has_blocks_import:
28
29
  state = automation_module.state.dag
29
30
  elif has_task_import:
30
31
  state = automation_module.task.blocks_state
32
+ elif has_agent_import:
33
+ state = automation_module.agent.blocks_state
31
34
 
32
35
  return state, automation_module
@@ -6,7 +6,7 @@ with open("requirements.txt") as f:
6
6
 
7
7
  setup(
8
8
  name="blocks-cli",
9
- version="0.1.36",
9
+ version="0.1.38",
10
10
  packages=find_packages(),
11
11
  include_package_data=True,
12
12
  install_requires=requirements,
File without changes
File without changes
File without changes
File without changes