versionhq 1.2.1.10__py3-none-any.whl → 1.2.1.12__py3-none-any.whl

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.
versionhq/__init__.py CHANGED
@@ -31,7 +31,7 @@ from versionhq.task.formation import form_agent_network
31
31
  from versionhq.task_graph.draft import workflow
32
32
 
33
33
 
34
- __version__ = "1.2.1.10"
34
+ __version__ = "1.2.1.12"
35
35
  __all__ = [
36
36
  "Agent",
37
37
 
@@ -1,6 +1,6 @@
1
1
  import sys
2
2
  from typing import Type, Any
3
- from pydantic import BaseModel
3
+ from pydantic import BaseModel, create_model
4
4
  from pydantic._internal._model_construction import ModelMetaclass
5
5
  from textwrap import dedent
6
6
  if 'pydantic.main' not in sys.modules:
@@ -49,7 +49,7 @@ def workflow(final_output: Type[BaseModel], context: Any = None, human: bool = T
49
49
  )
50
50
 
51
51
  task = Task(
52
- description=dedent(f"Design a resource-efficient workflow to achieve the following goal: {final_output_prompt}. The workflow should consist of a list of detailed tasks that represent decision making points, each with the following information:\nname: A concise name of the task\ndescription: A concise description of the task.\nconnections: A list of target tasks that this task connects to.\ndependency_types: The type of dependency between this task and each of its connected task. \noutput: key output from the task.\n\nUse the following dependency types: {dep_type_prompt}.\n\nPrioritize minimizing resource consumption (computation, memory, and data transfer) when defining tasks, connections, and dependencies. Consider how data is passed between tasks and aim to reduce unnecessary data duplication or transfer. Explain any design choices made to optimize resource usage."),
52
+ description=dedent(f"Design a resource-efficient workflow to achieve the following goal: {final_output_prompt}. The workflow should consist of a list of detailed tasks that represent decision making points, each with the following information:\nname: A concise name of the task\ndescription: A concise description of the task.\nconnections: A list of target tasks that this task connects to.\ndependency_types: The type of dependency between this task and each of its connected task. \noutput: key output from the task in a word.\n\nUse the following dependency types: {dep_type_prompt}.\n\nPrioritize minimizing resource consumption (computation, memory, and data transfer) when defining tasks, connections, and dependencies. Consider how data is passed between tasks and aim to reduce unnecessary data duplication or transfer. Explain any design choices made to optimize resource usage."),
53
53
  response_fields=[
54
54
  ResponseField(title="tasks", data_type=list, items=dict, properties=[
55
55
  ResponseField(title="name", data_type=str),
@@ -68,15 +68,13 @@ def workflow(final_output: Type[BaseModel], context: Any = None, human: bool = T
68
68
 
69
69
  task_items = res.json_dict["tasks"]
70
70
  tasks, nodes = [], []
71
- for item in task_items:
72
- class Output(BaseModel):
73
- item["output"]: str
74
71
 
75
- task = Task(name=item["name"], description=item["description"], pydantic_output=Output)
72
+ for item in task_items:
73
+ key = item["output"].lower().replace(" ", "_") if item["output"] else "output"
74
+ task = Task(name=item["name"], description=item["description"], response_fields=[ResponseField(title=key, data_type=str)])
76
75
  tasks.append(task)
77
76
  nodes.append(Node(task=task))
78
77
 
79
-
80
78
  task_graph = TaskGraph(
81
79
  nodes={node.identifier: node for node in nodes},
82
80
  concl_format=final_output,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.1.10
3
+ Version: 1.2.1.12
4
4
  Summary: An agentic orchestration framework for building agent networks that handle task automation.
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- versionhq/__init__.py,sha256=ClLVOtkbqwq-6OR4_q7e_YoKHUYVPUtIkwVtq12gfQ8,2883
1
+ versionhq/__init__.py,sha256=uNfcqA6KXR3l8o5Df1_XZCdFKevMxrQ5ri-JJhTYJ1U,2883
2
2
  versionhq/_utils/__init__.py,sha256=dzoZr4cBlh-2QZuPzTdehPUCe9lP1dmRtauD7qTjUaA,158
3
3
  versionhq/_utils/i18n.py,sha256=TwA_PnYfDLA6VqlUDPuybdV9lgi3Frh_ASsb_X8jJo8,1483
4
4
  versionhq/_utils/logger.py,sha256=zgogTwAY-ujDLrdryAKhdtoaNe1nOFajmEN0V8aMR34,3155
@@ -52,7 +52,7 @@ versionhq/task/structured_response.py,sha256=4q-hQPu7oMMHHXEzh9YW4SJ7N5eCZ7OfZ65
52
52
  versionhq/task/TEMPLATES/Description.py,sha256=V-4kh8xpQTKOcDMi2xnuP-fcNk6kuoz1_5tYBlDLQWQ,420
53
53
  versionhq/task_graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  versionhq/task_graph/colors.py,sha256=naJCx4Vho4iuJtbW8USUXb-M5uYvd5ds2p8qbjUfRus,669
55
- versionhq/task_graph/draft.py,sha256=_I8H1Tgbox4xcWpZNWRNEPUhdb02H44gl9DDz2HArlU,5078
55
+ versionhq/task_graph/draft.py,sha256=tEymdNbDXPXe88rvTdocpx22djhKV_TmSHa6lqkJ8fY,5158
56
56
  versionhq/task_graph/model.py,sha256=njyHQyHrVTZP46iVkC6YvuMnGcS40vOy1wszRtf7DHY,23971
57
57
  versionhq/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  versionhq/tool/cache_handler.py,sha256=iL8FH7X0G-cdT0uhJwzuhLDaadTXOdfybZcDy151-es,1085
@@ -61,8 +61,8 @@ versionhq/tool/composio_tool_vars.py,sha256=FvBuEXsOQUYnN7RTFxT20kAkiEYkxWKkiVtg
61
61
  versionhq/tool/decorator.py,sha256=C4ZM7Xi2gwtEMaSeRo-geo_g_MAkY77WkSLkAuY0AyI,1205
62
62
  versionhq/tool/model.py,sha256=PO4zNWBZcJhYVur381YL1dy6zqurio2jWjtbxOxZMGI,12194
63
63
  versionhq/tool/tool_handler.py,sha256=2m41K8qo5bGCCbwMFferEjT-XZ-mE9F0mDUOBkgivOI,1416
64
- versionhq-1.2.1.10.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
65
- versionhq-1.2.1.10.dist-info/METADATA,sha256=7uewLR8nv9scszLK4QlDFhx47T_vhPwgXTkpm_D1ETg,22033
66
- versionhq-1.2.1.10.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
- versionhq-1.2.1.10.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
68
- versionhq-1.2.1.10.dist-info/RECORD,,
64
+ versionhq-1.2.1.12.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
65
+ versionhq-1.2.1.12.dist-info/METADATA,sha256=AMSEfWE5CXam7k5CpDG-3Ne8Ci-_uzpaDalsjSAHUSM,22033
66
+ versionhq-1.2.1.12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
+ versionhq-1.2.1.12.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
68
+ versionhq-1.2.1.12.dist-info/RECORD,,