versionhq 1.1.7.7__tar.gz → 1.1.7.8__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 (71) hide show
  1. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/PKG-INFO +1 -1
  2. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/pyproject.toml +1 -1
  3. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/__init__.py +1 -1
  4. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/process_config.py +2 -4
  5. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/agent/model.py +4 -4
  6. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/agent/parser.py +2 -2
  7. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/workflow/model.py +13 -9
  8. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/llm/model.py +3 -3
  9. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/task/model.py +4 -4
  10. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/team/model.py +2 -6
  11. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/tool/model.py +2 -9
  12. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/tool/tool_handler.py +3 -2
  13. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq.egg-info/PKG-INFO +1 -1
  14. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/clients/workflow_test.py +11 -0
  15. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/task/task_test.py +5 -5
  16. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/uv.lock +1 -1
  17. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.github/workflows/publish.yml +0 -0
  18. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.github/workflows/publish_testpypi.yml +0 -0
  19. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.github/workflows/run_tests.yml +0 -0
  20. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.github/workflows/security_check.yml +0 -0
  21. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.gitignore +0 -0
  22. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.pre-commit-config.yaml +0 -0
  23. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/.python-version +0 -0
  24. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/LICENSE +0 -0
  25. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/README.md +0 -0
  26. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/SECURITY.md +0 -0
  27. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/db/preprocess.py +0 -0
  28. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/requirements-dev.txt +0 -0
  29. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/requirements.txt +0 -0
  30. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/runtime.txt +0 -0
  31. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/setup.cfg +0 -0
  32. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/__init__.py +0 -0
  33. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/cache_handler.py +0 -0
  34. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/i18n.py +0 -0
  35. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/logger.py +0 -0
  36. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/rpm_controller.py +0 -0
  37. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/_utils/usage_metrics.py +0 -0
  38. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  39. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  40. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/agent/__init__.py +0 -0
  41. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/cli/__init__.py +0 -0
  42. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/__init__.py +0 -0
  43. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/customer/__init__.py +0 -0
  44. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/customer/model.py +0 -0
  45. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/product/__init__.py +0 -0
  46. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/product/model.py +0 -0
  47. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/clients/workflow/__init__.py +0 -0
  48. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/llm/__init__.py +0 -0
  49. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/llm/llm_vars.py +0 -0
  50. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/storage/__init__.py +0 -0
  51. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/storage/task_output_storage.py +0 -0
  52. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/task/__init__.py +0 -0
  53. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/task/formatter.py +0 -0
  54. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/task/log_handler.py +0 -0
  55. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/team/__init__.py +0 -0
  56. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/team/team_planner.py +0 -0
  57. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/tool/__init__.py +0 -0
  58. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq/tool/decorator.py +0 -0
  59. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq.egg-info/SOURCES.txt +0 -0
  60. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq.egg-info/dependency_links.txt +0 -0
  61. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq.egg-info/requires.txt +0 -0
  62. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/src/versionhq.egg-info/top_level.txt +0 -0
  63. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/__init__.py +0 -0
  64. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/agent/__init__.py +0 -0
  65. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/agent/agent_test.py +0 -0
  66. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/cli/__init__.py +0 -0
  67. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/conftest.py +0 -0
  68. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/task/__init__.py +0 -0
  69. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/team/Prompts/Demo_test.py +0 -0
  70. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/team/__init__.py +0 -0
  71. {versionhq-1.1.7.7 → versionhq-1.1.7.8}/tests/team/team_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: versionhq
3
- Version: 1.1.7.7
3
+ Version: 1.1.7.8
4
4
  Summary: LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__"]
15
15
 
16
16
  [project]
17
17
  name = "versionhq"
18
- version = "1.1.7.7"
18
+ version = "1.1.7.8"
19
19
  authors = [{ name = "Kuriko Iwai", email = "kuriko@versi0n.io" }]
20
20
  description = "LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows"
21
21
  readme = "README.md"
@@ -17,7 +17,7 @@ from versionhq.team.model import Team, TeamOutput
17
17
  from versionhq.tool.model import Tool
18
18
 
19
19
 
20
- __version__ = "1.1.7.7"
20
+ __version__ = "1.1.7.8"
21
21
  __all__ = [
22
22
  "Agent",
23
23
  "Customer",
@@ -2,9 +2,7 @@ from typing import Any, Dict, Type
2
2
  from pydantic import BaseModel
3
3
 
4
4
 
5
- def process_config(
6
- values_to_update: Dict[str, Any], model_class: Type[BaseModel]
7
- ) -> Dict[str, Any]:
5
+ def process_config(values_to_update: Dict[str, Any], model_class: Type[BaseModel]) -> Dict[str, Any]:
8
6
  """
9
7
  Process the config dictionary and update the values accordingly.
10
8
  Refer to the Pydantic model class for field validation.
@@ -15,7 +13,7 @@ def process_config(
15
13
  else:
16
14
  return values_to_update
17
15
 
18
- # copy values from config to the model's attributes if the attribute isn't already set.
16
+
19
17
  for key, value in config.items():
20
18
  if key not in model_class.model_fields or values_to_update.get(key) is not None:
21
19
  continue
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import uuid
3
3
  from abc import ABC
4
- from typing import Any, Dict, List, Optional, TypeVar, Union
4
+ from typing import Any, Dict, List, Optional, TypeVar
5
5
  from dotenv import load_dotenv
6
6
  from pydantic import UUID4, BaseModel, Field, InstanceOf, PrivateAttr, model_validator, field_validator
7
7
  from pydantic_core import PydanticCustomError
@@ -22,7 +22,7 @@ load_dotenv(override=True)
22
22
  T = TypeVar("T", bound="Agent")
23
23
 
24
24
 
25
- # def _format_answer(agent, answer: str) -> Union[AgentAction, AgentFinish]:
25
+ # def _format_answer(agent, answer: str) -> AgentAction | AgentFinish:
26
26
  # return AgentParser(agent=agent).parse(answer)
27
27
 
28
28
  # def mock_agent_ops_provider():
@@ -111,8 +111,8 @@ class Agent(ABC, BaseModel):
111
111
  step_callback: Optional[Any] = Field(default=None,description="Callback to be executed after each step of the agent execution")
112
112
 
113
113
  # llm settings cascaded to the LLM model
114
- llm: Union[str, InstanceOf[LLM], Any] = Field(default=None)
115
- function_calling_llm: Union[str, InstanceOf[LLM], Any] = Field(default=None)
114
+ llm: str | InstanceOf[LLM] | Any = Field(default=None)
115
+ function_calling_llm: str | InstanceOf[LLM] | Any = Field(default=None)
116
116
  respect_context_window: bool = Field(default=True,description="Keep messages under the context window size by summarizing content")
117
117
  max_tokens: Optional[int] = Field(default=None, description="max. number of tokens for the agent's execution")
118
118
  max_execution_time: Optional[int] = Field(default=None, description="max. execution time for an agent to execute a task")
@@ -1,5 +1,5 @@
1
1
  import re
2
- from typing import Any, Union
2
+ from typing import Any
3
3
  from json_repair import repair_json
4
4
 
5
5
  from versionhq._utils.i18n import I18N
@@ -70,7 +70,7 @@ class AgentParser:
70
70
  def __init__(self, agent: Any):
71
71
  self.agent = agent
72
72
 
73
- def parse(self, text: str) -> Union[AgentAction, AgentFinish]:
73
+ def parse(self, text: str) -> AgentAction | AgentFinish:
74
74
  thought = self._extract_thought(text)
75
75
  includes_answer = FINAL_ANSWER_ACTION in text
76
76
  regex = (
@@ -1,8 +1,8 @@
1
1
  import uuid
2
2
  from abc import ABC
3
3
  from datetime import date, datetime, time, timedelta
4
- from typing import Any, Dict, List, Union, Callable, Type, Optional, get_args, get_origin
5
- from pydantic import UUID4, InstanceOf, BaseModel, ConfigDict, Field, create_model, field_validator, model_validator
4
+ from typing import Any, Dict, List, Callable, Type, Optional, get_args, get_origin
5
+ from pydantic import UUID4, InstanceOf, BaseModel, ConfigDict, Field, field_validator, model_validator
6
6
  from pydantic_core import PydanticCustomError
7
7
 
8
8
  from versionhq.clients.product.model import Product
@@ -12,7 +12,7 @@ from versionhq.team.model import Team
12
12
 
13
13
 
14
14
  class ScoreFormat:
15
- def __init__(self, rate: Union[float, int] = 0, weight: int = 1):
15
+ def __init__(self, rate: float | int = 0, weight: int = 1):
16
16
  self.rate = rate
17
17
  self.weight = weight
18
18
  self.aggregate = rate * weight
@@ -39,7 +39,7 @@ class Score:
39
39
 
40
40
 
41
41
  def result(self) -> int:
42
- aggregate_score = self.brand_tone.aggregate + self.audience.aggregate + self.track_record.aggregate
42
+ aggregate_score = int(self.brand_tone.aggregate) + int(self.audience.aggregate) + int(self.track_record.aggregate)
43
43
  denominator = self.brand_tone.weight + self.audience.weight + self.track_record.weight
44
44
 
45
45
  for k, v in self.kwargs.items():
@@ -57,11 +57,12 @@ class MessagingComponent(ABC, BaseModel):
57
57
  layer_id: int = Field(default=0, description="add id of the layer: 0, 1, 2")
58
58
  message: str = Field(default=None, max_length=1024, description="text message content to be sent")
59
59
  interval: Optional[str] = Field(
60
- default=None,description="interval to move on to the next layer. if this is the last layer, set as `None`")
61
- score: Union[float, InstanceOf[Score]] = Field(default=None)
60
+ default=None, description="interval to move on to the next layer. if this is the last layer, set as `None`"
61
+ )
62
+ score: float | InstanceOf[Score] = Field(default=None)
62
63
 
63
64
 
64
- def store_scoring_result(self, scoring_subject: str, score_raw: Union[int, Score, ScoreFormat] = None):
65
+ def store_scoring_result(self, scoring_subject: str, score_raw: int | Score | ScoreFormat = None):
65
66
  """
66
67
  Set up the `score` field
67
68
  """
@@ -109,8 +110,11 @@ class MessagingWorkflow(ABC, BaseModel):
109
110
  product: InstanceOf[Product] = Field(default=None)
110
111
  customer: InstanceOf[Customer] = Field(default=None)
111
112
 
112
- metrics: Union[List[Dict[str, Any]], List[str]] = Field(
113
- default=None, max_length=256, description="store metrics that used to predict and track the performance of this workflow.")
113
+ metrics: List[Dict[str, Any]] | List[str] = Field(
114
+ default=None,
115
+ max_length=256,
116
+ description="store metrics that used to predict and track the performance of this workflow."
117
+ )
114
118
 
115
119
 
116
120
  @property
@@ -7,7 +7,7 @@ import litellm
7
7
  from dotenv import load_dotenv
8
8
  from litellm import get_supported_openai_params
9
9
  from contextlib import contextmanager
10
- from typing import Any, Dict, List, Optional, Union
10
+ from typing import Any, Dict, List, Optional
11
11
 
12
12
  from versionhq.llm.llm_vars import LLM_CONTEXT_WINDOW_SIZES
13
13
  from versionhq.task import TaskOutputFormat
@@ -103,7 +103,7 @@ class LLM:
103
103
  def __init__(
104
104
  self,
105
105
  model: str,
106
- timeout: Optional[Union[float, int]] = None,
106
+ timeout: Optional[float | int] = None,
107
107
  max_tokens: Optional[int] = None,
108
108
  max_completion_tokens: Optional[int] = None,
109
109
  context_window_size: Optional[int] = DEFAULT_CONTEXT_WINDOW,
@@ -111,7 +111,7 @@ class LLM:
111
111
  temperature: Optional[float] = None,
112
112
  top_p: Optional[float] = None,
113
113
  n: Optional[int] = None,
114
- stop: Optional[Union[str, List[str]]] = None,
114
+ stop: Optional[str | List[str]] = None,
115
115
  presence_penalty: Optional[float] = None,
116
116
  frequency_penalty: Optional[float] = None,
117
117
  logit_bias: Optional[Dict[int, float]] = None,
@@ -3,10 +3,10 @@ import threading
3
3
  import uuid
4
4
  from concurrent.futures import Future
5
5
  from hashlib import md5
6
- from typing import Any, Dict, List, Set, Optional, Tuple, Callable, Union, Type
6
+ from typing import Any, Dict, List, Set, Optional, Tuple, Callable, Type
7
7
  from typing_extensions import Annotated
8
8
 
9
- from pydantic import UUID4, BaseModel, Field, PrivateAttr, field_validator, model_validator, create_model
9
+ from pydantic import UUID4, BaseModel, Field, PrivateAttr, field_validator, model_validator, create_model, InstanceOf
10
10
  from pydantic_core import PydanticCustomError
11
11
 
12
12
  from versionhq._utils.process_config import process_config
@@ -49,7 +49,7 @@ class ResponseField(BaseModel):
49
49
  return value
50
50
 
51
51
 
52
- def create_pydantic_model(self, result: Dict, base_model: Union[BaseModel | Any]) -> Any:
52
+ def create_pydantic_model(self, result: Dict, base_model: InstanceOf[BaseModel] | Any) -> Any:
53
53
  for k, v in result.items():
54
54
  if k is not self.title:
55
55
  pass
@@ -70,7 +70,7 @@ class TaskOutput(BaseModel):
70
70
 
71
71
  task_id: UUID4 = Field(default_factory=uuid.uuid4, frozen=True, description="store Task ID")
72
72
  raw: str = Field(default="", description="Raw output of the task")
73
- json_dict: Union[Dict[str, Any]] = Field(default=None, description="`raw` converted to dictionary")
73
+ json_dict: Dict[str, Any] = Field(default=None, description="`raw` converted to dictionary")
74
74
  pydantic: Optional[Any] = Field(default=None, description="`raw` converted to the abs. pydantic model")
75
75
 
76
76
  def __str__(self) -> str:
@@ -6,7 +6,7 @@ from enum import Enum
6
6
  from dotenv import load_dotenv
7
7
  from concurrent.futures import Future
8
8
  from hashlib import md5
9
- from typing import Any, Dict, List, TYPE_CHECKING, Callable, Optional, Tuple, Union
9
+ from typing import Any, Dict, List, TYPE_CHECKING, Callable, Optional, Tuple
10
10
  from pydantic import UUID4, InstanceOf, Json, BaseModel, Field, PrivateAttr, field_validator, model_validator
11
11
  from pydantic._internal._generate_schema import GenerateSchema
12
12
  from pydantic_core import PydanticCustomError, core_schema
@@ -61,7 +61,7 @@ class TeamOutput(BaseModel):
61
61
  team_id: UUID4 = Field(default_factory=uuid.uuid4, frozen=True, description="store the team ID that generate the TeamOutput")
62
62
  raw: str = Field(default="", description="raw output of the team lead task handled by the team leader")
63
63
  pydantic: Optional[Any] = Field(default=None, description="`raw` converted to the abs. pydantic model")
64
- json_dict: Union[Dict[str, Any]] = Field(default=None, description="`raw` converted to dictionary")
64
+ json_dict: Dict[str, Any] = Field(default=None, description="`raw` converted to dictionary")
65
65
  task_output_list: list[TaskOutput] = Field(default=list, description="store output of all the tasks that the team has executed")
66
66
  token_usage: UsageMetrics = Field(default=dict, description="processed token summary")
67
67
 
@@ -200,10 +200,6 @@ class Team(BaseModel):
200
200
  if v:
201
201
  raise PydanticCustomError("may_not_set_field", "The 'id' field cannot be set by the user.", {})
202
202
 
203
- # @field_validator("config", mode="before")
204
- # @classmethod
205
- # def check_config_type(cls, v: Union[Json, Dict[str, Any]]) -> Union[Json, Dict[str, Any]]:
206
- # return json.loads(v) if isinstance(v, Json) else v
207
203
 
208
204
  @model_validator(mode="after")
209
205
  def check_manager_llm(self):
@@ -1,15 +1,7 @@
1
1
  from abc import ABC
2
2
  from inspect import signature
3
3
  from typing import Any, Dict, Callable, Type, Optional, get_args, get_origin
4
- from pydantic import (
5
- InstanceOf,
6
- BaseModel,
7
- ConfigDict,
8
- Field,
9
- create_model,
10
- field_validator,
11
- model_validator,
12
- )
4
+ from pydantic import InstanceOf, BaseModel, ConfigDict, Field, create_model, field_validator, model_validator
13
5
 
14
6
  from versionhq._utils.cache_handler import CacheHandler
15
7
 
@@ -135,6 +127,7 @@ class Tool(ABC, BaseModel):
135
127
 
136
128
  return cls(name=tool_name, func=func, args_schema=args_schema)
137
129
 
130
+
138
131
  def run(self, *args, **kwargs) -> Any:
139
132
  """
140
133
  Use the tool.
@@ -1,4 +1,5 @@
1
- from typing import Any, Optional, Union
1
+ from typing import Any, Optional
2
+ from pydantic import InstanceOf
2
3
  from versionhq.tool.model import ToolCalled, InstructorToolCalled, CacheTool
3
4
  from versionhq._utils.cache_handler import CacheHandler
4
5
 
@@ -23,7 +24,7 @@ class ToolHandler:
23
24
 
24
25
  def record_last_tool_used(
25
26
  self,
26
- last_used_tool: Union[ToolCalled, InstructorToolCalled],
27
+ last_used_tool: InstanceOf[ToolCalled] | InstanceOf[InstructorToolCalled],
27
28
  output: str,
28
29
  should_cache: bool = True,
29
30
  ) -> Any:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: versionhq
3
- Version: 1.1.7.7
3
+ Version: 1.1.7.8
4
4
  Summary: LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -19,3 +19,14 @@ def test_store_scores():
19
19
 
20
20
  assert messaging_component.score is not None
21
21
  assert messaging_component.score.result() is not None
22
+
23
+
24
+ def test_score_result():
25
+ messaging_component = MessagingComponent(message="demo")
26
+ score_raw = 15
27
+ messaging_component.store_scoring_result("demo", score_raw=score_raw)
28
+
29
+ result = messaging_component.score.result()
30
+
31
+ assert result is not None
32
+ assert result != 0
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import pytest
3
3
  from unittest.mock import patch
4
- from typing import Union, Dict, Any
4
+ from typing import Dict, Any
5
5
  from versionhq.agent.model import Agent
6
6
  from versionhq.task.model import Task, ResponseField, TaskOutput, ConditionalTask
7
7
 
@@ -119,11 +119,11 @@ def test_sync_execute_task_with_task_context():
119
119
  else:
120
120
  assert hasattr(res.pydantic, "test1")
121
121
  if res.pydantic.test1:
122
- assert type(res.pydantic.test1) == Union[int, str]
122
+ assert type(res.pydantic.test1) == int | str
123
123
 
124
124
  assert hasattr(res.pydantic, "test2")
125
125
  if res.pydantic.test2:
126
- assert type(res.pydantic.test2) == Union[list, str]
126
+ assert type(res.pydantic.test2) == list | str
127
127
 
128
128
  assert sub_task.output is not None
129
129
  assert sub_task.output.json_dict is not None
@@ -179,11 +179,11 @@ def test_sync_execute_task_with_prompt_context():
179
179
  else:
180
180
  assert hasattr(res.pydantic, "test1")
181
181
  if res.pydantic.test1:
182
- assert type(res.pydantic.test1) == Union[int, str]
182
+ assert type(res.pydantic.test1) == int | str
183
183
 
184
184
  assert hasattr(res.pydantic, "test2")
185
185
  if res.pydantic.test2:
186
- assert type(res.pydantic.test2) == Union[list, str]
186
+ assert type(res.pydantic.test2) == list | str
187
187
 
188
188
  assert sub_task.output is not None
189
189
  assert sub_task.output.json_dict is not None
@@ -1644,7 +1644,7 @@ wheels = [
1644
1644
 
1645
1645
  [[package]]
1646
1646
  name = "versionhq"
1647
- version = "1.1.7.7"
1647
+ version = "1.1.7.8"
1648
1648
  source = { editable = "." }
1649
1649
  dependencies = [
1650
1650
  { name = "appdirs" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes