versionhq 1.1.7.8__py3-none-any.whl → 1.1.8__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 +1 -1
- versionhq/clients/product/model.py +4 -1
- versionhq/clients/workflow/model.py +5 -5
- versionhq/storage/task_output_storage.py +19 -22
- versionhq/task/model.py +5 -9
- versionhq/team/model.py +3 -4
- {versionhq-1.1.7.8.dist-info → versionhq-1.1.8.dist-info}/METADATA +2 -2
- {versionhq-1.1.7.8.dist-info → versionhq-1.1.8.dist-info}/RECORD +11 -11
- {versionhq-1.1.7.8.dist-info → versionhq-1.1.8.dist-info}/LICENSE +0 -0
- {versionhq-1.1.7.8.dist-info → versionhq-1.1.8.dist-info}/WHEEL +0 -0
- {versionhq-1.1.7.8.dist-info → versionhq-1.1.8.dist-info}/top_level.txt +0 -0
versionhq/__init__.py
CHANGED
@@ -34,7 +34,10 @@ class Product(BaseModel):
|
|
34
34
|
id: UUID4 = Field(default_factory=uuid.uuid4, frozen=True)
|
35
35
|
name: Optional[str] = Field(default=None, description="product name")
|
36
36
|
description: Optional[str] = Field(
|
37
|
-
default=None,
|
37
|
+
default=None,
|
38
|
+
max_length=256,
|
39
|
+
description="product description scraped from landing url or client input. cascade to the agent"
|
40
|
+
)
|
38
41
|
provider: Optional[ProductProvider] = Field(default=None)
|
39
42
|
audience: Optional[str] = Field(default=None, description="target audience")
|
40
43
|
usp: Optional[str] = Field(default=None)
|
@@ -60,6 +60,7 @@ class MessagingComponent(ABC, BaseModel):
|
|
60
60
|
default=None, description="interval to move on to the next layer. if this is the last layer, set as `None`"
|
61
61
|
)
|
62
62
|
score: float | InstanceOf[Score] = Field(default=None)
|
63
|
+
condition: str = Field(default=None, max_length=128, description="condition to execute the next messaging component")
|
63
64
|
|
64
65
|
|
65
66
|
def store_scoring_result(self, scoring_subject: str, score_raw: int | Score | ScoreFormat = None):
|
@@ -106,7 +107,7 @@ class MessagingWorkflow(ABC, BaseModel):
|
|
106
107
|
default=None, description="store `Agent` instances responsible for autopiloting this workflow. if the team exsits, this field remains as `None`")
|
107
108
|
|
108
109
|
# metrics
|
109
|
-
destination: Optional[str] = Field(
|
110
|
+
destination: Optional[str | None] = Field(default=None, description="destination service to launch this workflow")
|
110
111
|
product: InstanceOf[Product] = Field(default=None)
|
111
112
|
customer: InstanceOf[Customer] = Field(default=None)
|
112
113
|
|
@@ -142,10 +143,9 @@ class MessagingWorkflow(ABC, BaseModel):
|
|
142
143
|
if self.customer is not None:
|
143
144
|
self.destination = self.customer.on
|
144
145
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
self.destination = destination_list[0]
|
146
|
+
elif self.product.provider is not None and self.product.provider.destinations:
|
147
|
+
self.destination = self.product.provider.destinations[0]
|
148
|
+
|
149
149
|
return self
|
150
150
|
|
151
151
|
|
@@ -11,11 +11,9 @@ from versionhq._utils.logger import Logger
|
|
11
11
|
|
12
12
|
load_dotenv(override=True)
|
13
13
|
|
14
|
-
|
15
14
|
def fetch_db_storage_path():
|
16
|
-
|
17
|
-
|
18
|
-
data_dir = Path(appdirs.user_data_dir(project_directory_name, app_author))
|
15
|
+
directory_name = Path.cwd().name
|
16
|
+
data_dir = Path(appdirs.user_data_dir(appname=directory_name, appauthor="Version IO Sdn Bhd.", version=None, roaming=False))
|
19
17
|
data_dir.mkdir(parents=True, exist_ok=True)
|
20
18
|
return data_dir
|
21
19
|
|
@@ -39,25 +37,25 @@ class TaskOutputSQLiteStorage:
|
|
39
37
|
Initializes the SQLite database and creates LTM table.
|
40
38
|
"""
|
41
39
|
|
42
|
-
try:
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
"""
|
47
|
-
CREATE TABLE IF NOT EXISTS task_outputs (
|
48
|
-
task_id TEXT PRIMARY KEY,
|
49
|
-
output JSON,
|
50
|
-
task_index INTEGER,
|
51
|
-
inputs JSON,
|
52
|
-
was_replayed BOOLEAN,
|
53
|
-
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
|
54
|
-
)
|
40
|
+
# try:
|
41
|
+
with sqlite3.connect(self.db_path) as conn:
|
42
|
+
cursor = conn.cursor()
|
43
|
+
cursor.execute(
|
55
44
|
"""
|
45
|
+
CREATE TABLE IF NOT EXISTS task_outputs (
|
46
|
+
task_id TEXT PRIMARY KEY,
|
47
|
+
output JSON,
|
48
|
+
task_index INTEGER,
|
49
|
+
inputs JSON,
|
50
|
+
was_replayed BOOLEAN,
|
51
|
+
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
|
56
52
|
)
|
57
|
-
|
53
|
+
"""
|
54
|
+
)
|
55
|
+
conn.commit()
|
58
56
|
|
59
|
-
except sqlite3.Error as e:
|
60
|
-
|
57
|
+
# except sqlite3.Error as e:
|
58
|
+
# self._logger.log(level="error", message=f"DATABASE INITIALIZATION ERROR: {e}", color="red")
|
61
59
|
|
62
60
|
|
63
61
|
def add(self, task, output: Dict[str, Any], task_index: int, was_replayed: bool = False, inputs: Dict[str, Any] = {}):
|
@@ -81,13 +79,12 @@ class TaskOutputSQLiteStorage:
|
|
81
79
|
try:
|
82
80
|
with sqlite3.connect(self.db_path) as conn:
|
83
81
|
cursor = conn.cursor()
|
84
|
-
|
85
82
|
fields, values = [], []
|
86
83
|
for k, v in kwargs.items():
|
87
84
|
fields.append(f"{k} = ?")
|
88
85
|
values.append(json.dumps(v) if isinstance(v, dict) else v)
|
89
86
|
|
90
|
-
query = f"UPDATE latest_kickoff_task_outputs SET {', '.join(fields)} WHERE task_index = ?"
|
87
|
+
query = f"UPDATE latest_kickoff_task_outputs SET {', '.join(fields)} WHERE task_index = ?"
|
91
88
|
values.append(task_index)
|
92
89
|
cursor.execute(query, tuple(values))
|
93
90
|
conn.commit()
|
versionhq/task/model.py
CHANGED
@@ -206,10 +206,10 @@ Your outputs MUST adhere to the following format and should NOT include any irre
|
|
206
206
|
@property
|
207
207
|
def summary(self) -> str:
|
208
208
|
return f"""
|
209
|
-
Task: {self.id}
|
210
|
-
"
|
211
|
-
"
|
212
|
-
"
|
209
|
+
Task ID: {str(self.id)}
|
210
|
+
"Description": {self.description}
|
211
|
+
"Prompt": {self.output_prompt}
|
212
|
+
"Tools": {", ".join([tool_called.tool.name for tool_called in self.tools_called])}
|
213
213
|
"""
|
214
214
|
|
215
215
|
|
@@ -382,11 +382,7 @@ Your outputs MUST adhere to the following format and should NOT include any irre
|
|
382
382
|
"""
|
383
383
|
|
384
384
|
future: Future[TaskOutput] = Future()
|
385
|
-
threading.Thread(
|
386
|
-
daemon=True,
|
387
|
-
target=self._execute_task_async,
|
388
|
-
args=(agent, context, tools, future),
|
389
|
-
).start()
|
385
|
+
threading.Thread(daemon=True, target=self._execute_task_async, args=(agent, context, tools, future)).start()
|
390
386
|
return future
|
391
387
|
|
392
388
|
|
versionhq/team/model.py
CHANGED
@@ -123,7 +123,7 @@ class Team(BaseModel):
|
|
123
123
|
__hash__ = object.__hash__
|
124
124
|
_execution_span: Any = PrivateAttr()
|
125
125
|
_logger: Logger = PrivateAttr()
|
126
|
-
|
126
|
+
_inputs: Optional[Dict[str, Any]] = PrivateAttr(default=None)
|
127
127
|
|
128
128
|
id: UUID4 = Field(default_factory=uuid.uuid4, frozen=True)
|
129
129
|
name: Optional[str] = Field(default=None)
|
@@ -382,14 +382,13 @@ class Team(BaseModel):
|
|
382
382
|
futures.append((task, future, task_index))
|
383
383
|
else:
|
384
384
|
context = create_raw_outputs(tasks=[task,], task_outputs=([last_sync_output,] if last_sync_output else [] ))
|
385
|
-
task_output = task.execute_sync(agent=responsible_agent, context=context, tools=responsible_agent.tools
|
386
|
-
)
|
385
|
+
task_output = task.execute_sync(agent=responsible_agent, context=context, tools=responsible_agent.tools)
|
387
386
|
if responsible_agent is self.manager_agent:
|
388
387
|
lead_task_output = task_output
|
389
388
|
|
390
389
|
task_outputs.append(task_output)
|
391
390
|
# self._process_task_result(task, task_output)
|
392
|
-
task._store_execution_log(task_index, was_replayed)
|
391
|
+
task._store_execution_log(task_index, was_replayed, self._inputs)
|
393
392
|
|
394
393
|
|
395
394
|
if futures:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.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
|
@@ -57,7 +57,7 @@ Requires-Dist: appdirs>=1.4.4
|
|
57
57
|
|
58
58
|

|
59
59
|
[](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
|
60
|
-

|
61
61
|

|
62
62
|

|
63
63
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
versionhq/__init__.py,sha256=
|
1
|
+
versionhq/__init__.py,sha256=YtlTcx7b6upkn7qw-E_a5JS6NBXrhuyaRX4acr10Goc,869
|
2
2
|
versionhq/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
versionhq/_utils/cache_handler.py,sha256=zDQKzIn7vp-M2-uepHFxgJstjfftZS5mzXKL_-4uVvI,370
|
4
4
|
versionhq/_utils/i18n.py,sha256=TwA_PnYfDLA6VqlUDPuybdV9lgi3Frh_ASsb_X8jJo8,1483
|
@@ -16,27 +16,27 @@ versionhq/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
16
16
|
versionhq/clients/customer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
versionhq/clients/customer/model.py,sha256=rQnCv_wdCdrYAsUjyB6X6ULiuWfqcBBoarXcQT5kj88,1762
|
18
18
|
versionhq/clients/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
-
versionhq/clients/product/model.py,sha256=
|
19
|
+
versionhq/clients/product/model.py,sha256=HxiSv8zq5L0H210jXWfjX_Yg1oyWhi2YASR68JEtmDY,2408
|
20
20
|
versionhq/clients/workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
versionhq/clients/workflow/model.py,sha256=
|
21
|
+
versionhq/clients/workflow/model.py,sha256=YI6sNpdbizUOqPPXrTCtdmVt619uQ5hQgGS0BcA0njI,5834
|
22
22
|
versionhq/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
versionhq/llm/llm_vars.py,sha256=YZoXqFBW7XpclUZ14_AAz7WOjoyCXnGcI959GSpX2q0,5343
|
24
24
|
versionhq/llm/model.py,sha256=mXzSuf1s6MebGT7_yqgNppde0NIlAF8bjIXAp2MZ9Uw,8247
|
25
25
|
versionhq/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
|
-
versionhq/storage/task_output_storage.py,sha256=
|
26
|
+
versionhq/storage/task_output_storage.py,sha256=xoBJHeqUyQt6iJoR1WQTghP-fyxXL66qslpX1QC2-4o,4827
|
27
27
|
versionhq/task/__init__.py,sha256=g4mCATnn1mUXxsfQ5p6IpPawr8O421wVIT8kMKEcxQw,180
|
28
28
|
versionhq/task/formatter.py,sha256=N8Kmk9vtrMtBdgJ8J7RmlKNMdZWSmV8O1bDexmCWgU0,643
|
29
29
|
versionhq/task/log_handler.py,sha256=KJRrcNZgFSKhlNzvtYFnvtp6xukaF1s7ifX9u4zWrN8,1683
|
30
|
-
versionhq/task/model.py,sha256=
|
30
|
+
versionhq/task/model.py,sha256=GoLri5JNn6k8vqOZF1JYQlGM4Nfn4vBFfNxHat4JTro,19233
|
31
31
|
versionhq/team/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
|
-
versionhq/team/model.py,sha256=
|
32
|
+
versionhq/team/model.py,sha256=qO3HQ-ZtsiHVQ9gWPSnG2ZHMdnh0yBeJBImH4M5_5no,18029
|
33
33
|
versionhq/team/team_planner.py,sha256=B1UOn_DYVVterUn2CAd80jfO4sViJCCXPJA3abSSugg,2143
|
34
34
|
versionhq/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
35
|
versionhq/tool/decorator.py,sha256=Y-j4jkoujD5LUvpe8uf3p5Zagk2XVaRKC9rkIE-2geo,1189
|
36
36
|
versionhq/tool/model.py,sha256=s-y8323ikd5m5U2HG59ATgFW6L7yIFiPLLdOpeXQ8RI,6874
|
37
37
|
versionhq/tool/tool_handler.py,sha256=esUqGp8HoREesai8fmh2klAf04Sjpsacmb03C7F6sNQ,1541
|
38
|
-
versionhq-1.1.
|
39
|
-
versionhq-1.1.
|
40
|
-
versionhq-1.1.
|
41
|
-
versionhq-1.1.
|
42
|
-
versionhq-1.1.
|
38
|
+
versionhq-1.1.8.dist-info/LICENSE,sha256=7CCXuMrAjPVsUvZrsBq9DsxI2rLDUSYXR_qj4yO_ZII,1077
|
39
|
+
versionhq-1.1.8.dist-info/METADATA,sha256=SkS49iJDRvQY8La6yBICT8xvD19zM-GiYqnIjz_fsfE,15917
|
40
|
+
versionhq-1.1.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
41
|
+
versionhq-1.1.8.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
|
42
|
+
versionhq-1.1.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|