xpander-sdk 2.0.168__tar.gz → 2.0.170__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.
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/PKG-INFO +1 -1
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/setup.py +1 -1
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/compactization.py +12 -1
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/events.py +3 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/utils/mcp_oauth.py +5 -5
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/sub_modules/task.py +16 -2
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/agents/compactization_agent.py +31 -1
- xpander_sdk-2.0.170/src/xpander_sdk/utils/generic.py +5 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk.egg-info/PKG-INFO +1 -1
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk.egg-info/SOURCES.txt +1 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/LICENSE +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/README.md +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/pyproject.toml +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/setup.cfg +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/consts/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/consts/api_routes.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/core/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/core/module_base.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/core/state.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/core/xpander_api_client.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/exceptions/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/exceptions/module_exception.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/activity.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/configuration.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/deep_planning.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/frameworks.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/shared.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/models/user.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/agents_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/agent.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/agent_list.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/knowledge_bases.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/sub_modules/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/sub_modules/agent.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/utils/generic.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/backend_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/frameworks/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/frameworks/agno.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/frameworks/dispatch.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/on_boot.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/on_shutdown.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/on_task.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/events_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/models/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/models/deployments.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/models/events.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/utils/generic.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/utils/git_init.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/knowledge_bases_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/models/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/models/knowledge_bases.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/sub_modules/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/sub_modules/knowledge_base.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/sub_modules/knowledge_base_document_item.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/models/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/models/task.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/models/tasks_list.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/sub_modules/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/tasks_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/utils/files.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/decorators/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/decorators/register_tool.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/models/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/models/mcp.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/models/tool_invocation_result.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/sub_modules/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/sub_modules/tool.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/tools_repository_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/utils/generic.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/utils/local_tools.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/utils/schemas.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/agents/__init__.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/env.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/event_loop.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/tools.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk.egg-info/dependency_links.txt +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk.egg-info/requires.txt +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk.egg-info/top_level.txt +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_agents_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_api_client.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_backend_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_boot_shutdown_handlers.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_configuration.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_knowledge_bases_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_tasks_module.py +0 -0
- {xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/tests/test_tools_repository.py +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List
|
|
1
|
+
from typing import List, Literal, Union
|
|
2
2
|
|
|
3
3
|
from pydantic import Field
|
|
4
4
|
from xpander_sdk.models.deep_planning import DeepPlanningItem
|
|
@@ -34,6 +34,9 @@ class TaskCompactizationInput(XPanderSharedModel):
|
|
|
34
34
|
)
|
|
35
35
|
)
|
|
36
36
|
|
|
37
|
+
class TaskCompactizationRetryEvent(XPanderSharedModel):
|
|
38
|
+
is_retry: bool
|
|
39
|
+
|
|
37
40
|
class TaskCompactizationOutput(XPanderSharedModel):
|
|
38
41
|
new_task_prompt: str = Field(
|
|
39
42
|
...,
|
|
@@ -99,3 +102,11 @@ class TaskCompactizationOutput(XPanderSharedModel):
|
|
|
99
102
|
"- Focus on actionable, specific continuation steps.\n"
|
|
100
103
|
),
|
|
101
104
|
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class TaskCompactizationEvent(XPanderSharedModel):
|
|
108
|
+
type: Literal["retry", "summarization"]
|
|
109
|
+
data: Union[
|
|
110
|
+
TaskCompactizationOutput,
|
|
111
|
+
TaskCompactizationRetryEvent
|
|
112
|
+
]
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/utils/mcp_oauth.py
RENAMED
|
@@ -10,7 +10,7 @@ from xpander_sdk.modules.tools_repository.models.mcp import MCPOAuthGetTokenGene
|
|
|
10
10
|
POLLING_INTERVAL = 1 # every 1s
|
|
11
11
|
MAX_WAIT_FOR_LOGIN = 600 # 10 mintutes
|
|
12
12
|
|
|
13
|
-
async def push_event(task: Task, event: TaskUpdateEvent):
|
|
13
|
+
async def push_event(task: Task, event: TaskUpdateEvent, event_type: TaskUpdateEventType):
|
|
14
14
|
client = APIClient(configuration=task.configuration)
|
|
15
15
|
await client.make_request(
|
|
16
16
|
path=APIRoute.PushExecutionEventToQueue.format(task_id=task.id),
|
|
@@ -20,7 +20,7 @@ async def push_event(task: Task, event: TaskUpdateEvent):
|
|
|
20
20
|
task_id=task.id,
|
|
21
21
|
organization_id=task.organization_id,
|
|
22
22
|
time=datetime.now(timezone.utc).isoformat(),
|
|
23
|
-
type=
|
|
23
|
+
type=event_type,
|
|
24
24
|
data=event
|
|
25
25
|
).model_dump_safe()
|
|
26
26
|
]
|
|
@@ -59,7 +59,7 @@ async def authenticate_mcp_server(mcp_server: MCPServerDetails, task: Task, user
|
|
|
59
59
|
if result.type == MCPOAuthResponseType.LOGIN_REQUIRED:
|
|
60
60
|
logger.info(f"Initiating login for MCP Server {mcp_server.url}")
|
|
61
61
|
# Notify user about login requirement
|
|
62
|
-
await push_event(task=task, event=result)
|
|
62
|
+
await push_event(task=task, event=result, event_type=TaskUpdateEventType.AuthEvent)
|
|
63
63
|
|
|
64
64
|
# Poll for token with timeout
|
|
65
65
|
elapsed_time = 0
|
|
@@ -73,7 +73,7 @@ async def authenticate_mcp_server(mcp_server: MCPServerDetails, task: Task, user
|
|
|
73
73
|
logger.info(f"Successful login for MCP Server {mcp_server.url}")
|
|
74
74
|
redacted_token_result = MCPOAuthGetTokenResponse(**token_result.model_dump_safe())
|
|
75
75
|
redacted_token_result.data.access_token = "REDACTED"
|
|
76
|
-
await push_event(task=task, event=redacted_token_result)
|
|
76
|
+
await push_event(task=task, event=redacted_token_result, event_type=TaskUpdateEventType.AuthEvent)
|
|
77
77
|
return token_result
|
|
78
78
|
|
|
79
79
|
# Timeout reached
|
|
@@ -83,7 +83,7 @@ async def authenticate_mcp_server(mcp_server: MCPServerDetails, task: Task, user
|
|
|
83
83
|
logger.info(f"Token ready for MCP Server {mcp_server.url}")
|
|
84
84
|
redacted_token_result = MCPOAuthGetTokenResponse(**result.model_dump_safe())
|
|
85
85
|
redacted_token_result.data.access_token = "REDACTED"
|
|
86
|
-
await push_event(task=task, event=redacted_token_result)
|
|
86
|
+
await push_event(task=task, event=redacted_token_result, event_type=TaskUpdateEventType.AuthEvent)
|
|
87
87
|
|
|
88
88
|
return result
|
|
89
89
|
except Exception as e:
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/sub_modules/task.py
RENAMED
|
@@ -82,12 +82,13 @@ from xpander_sdk.modules.tools_repository.models.mcp import (
|
|
|
82
82
|
MCPServerDetails,
|
|
83
83
|
)
|
|
84
84
|
from xpander_sdk.utils.event_loop import run_sync
|
|
85
|
+
from xpander_sdk.models.compactization import TaskCompactizationEvent
|
|
85
86
|
|
|
86
87
|
# Type variable for Task class methods
|
|
87
88
|
T = TypeVar("T", bound="Task")
|
|
88
89
|
|
|
89
90
|
TaskUpdateEventData = Union[
|
|
90
|
-
T, ToolCallRequest, ToolCallResult, MCPOAuthGetTokenResponse, DeepPlanning
|
|
91
|
+
TaskCompactizationEvent, T, ToolCallRequest, ToolCallResult, MCPOAuthGetTokenResponse, DeepPlanning
|
|
91
92
|
]
|
|
92
93
|
|
|
93
94
|
|
|
@@ -552,7 +553,14 @@ class Task(XPanderSharedModel):
|
|
|
552
553
|
message += f"\n{json.dumps(f)}"
|
|
553
554
|
|
|
554
555
|
if self.deep_planning and self.deep_planning.enabled == True and self.deep_planning.started:
|
|
556
|
+
task_backup = self.model_copy() # backup result and status
|
|
557
|
+
|
|
555
558
|
self.reload()
|
|
559
|
+
|
|
560
|
+
# restore result and status
|
|
561
|
+
self.result = task_backup.result
|
|
562
|
+
self.status = task_backup.status
|
|
563
|
+
|
|
556
564
|
if not self.deep_planning.question_raised:
|
|
557
565
|
uncompleted_tasks = [task for task in self.deep_planning.tasks if not task.completed]
|
|
558
566
|
if len(uncompleted_tasks) != 0: # make a retry with compactization
|
|
@@ -800,7 +808,13 @@ class Task(XPanderSharedModel):
|
|
|
800
808
|
... print(f"Remaining tasks: {len(status.uncompleted_tasks)}")
|
|
801
809
|
"""
|
|
802
810
|
try:
|
|
803
|
-
|
|
811
|
+
task_backup = self.model_copy() # backup result and status
|
|
812
|
+
await self.areload() # reload
|
|
813
|
+
|
|
814
|
+
# restore result and status
|
|
815
|
+
self.result = task_backup.result
|
|
816
|
+
self.status = task_backup.status
|
|
817
|
+
|
|
804
818
|
if self.deep_planning and self.deep_planning.enabled and self.deep_planning.started and self.deep_planning.enforce:
|
|
805
819
|
|
|
806
820
|
# allow early exit to ask question
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/utils/agents/compactization_agent.py
RENAMED
|
@@ -2,18 +2,36 @@ from typing import TYPE_CHECKING, List, Union
|
|
|
2
2
|
from agno.agent import Agent as AgnoAgent
|
|
3
3
|
from loguru import logger
|
|
4
4
|
import json
|
|
5
|
-
from xpander_sdk.models.compactization import TaskCompactizationOutput, TaskCompactizationInput
|
|
5
|
+
from xpander_sdk.models.compactization import TaskCompactizationEvent, TaskCompactizationOutput, TaskCompactizationInput, TaskCompactizationRetryEvent
|
|
6
6
|
from xpander_sdk.models.deep_planning import DeepPlanningItem
|
|
7
|
+
from xpander_sdk.models.events import TaskUpdateEventType
|
|
7
8
|
from xpander_sdk.models.frameworks import Framework
|
|
8
9
|
from xpander_sdk.models.shared import Tokens
|
|
9
10
|
from xpander_sdk.modules.agents.agents_module import Agents
|
|
10
11
|
from xpander_sdk.modules.backend.backend_module import Backend
|
|
12
|
+
from xpander_sdk.modules.backend.utils.mcp_oauth import push_event
|
|
13
|
+
from xpander_sdk.modules.tasks.sub_modules.task import TaskUpdateEvent
|
|
14
|
+
from xpander_sdk.utils.event_loop import run_sync
|
|
15
|
+
from xpander_sdk.utils.generic import get_current_timestamp
|
|
11
16
|
|
|
12
17
|
if TYPE_CHECKING:
|
|
13
18
|
from xpander_sdk.modules.tasks.sub_modules.task import Task
|
|
14
19
|
|
|
15
20
|
def run_task_compactization(message: str, task: "Task", uncompleted_tasks: List[DeepPlanningItem]) -> Union[str, TaskCompactizationOutput]:
|
|
16
21
|
try:
|
|
22
|
+
|
|
23
|
+
# report retry event
|
|
24
|
+
try:
|
|
25
|
+
run_sync(
|
|
26
|
+
push_event(
|
|
27
|
+
task=task,
|
|
28
|
+
event=TaskCompactizationEvent(type="retry", data=TaskCompactizationRetryEvent(is_retry=True)),
|
|
29
|
+
event_type=TaskUpdateEventType.TaskCompactization
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
except Exception as e:
|
|
33
|
+
pass
|
|
34
|
+
|
|
17
35
|
# get agent to identify framework
|
|
18
36
|
agent = Agents(configuration=task.configuration).get(agent_id=task.agent_id,version=task.agent_version)
|
|
19
37
|
|
|
@@ -183,6 +201,18 @@ def run_task_compactization(message: str, task: "Task", uncompleted_tasks: List[
|
|
|
183
201
|
|
|
184
202
|
task.report_metrics(configuration=task.configuration)
|
|
185
203
|
|
|
204
|
+
# report compactization event
|
|
205
|
+
try:
|
|
206
|
+
run_sync(
|
|
207
|
+
push_event(
|
|
208
|
+
task=task,
|
|
209
|
+
event=TaskCompactizationEvent(type="summarization", data=run_result.content),
|
|
210
|
+
event_type=TaskUpdateEventType.TaskCompactization
|
|
211
|
+
)
|
|
212
|
+
)
|
|
213
|
+
except Exception as e:
|
|
214
|
+
pass
|
|
215
|
+
|
|
186
216
|
return run_result.content
|
|
187
217
|
except Exception as e:
|
|
188
218
|
logger.warning(f"Failed to run task compactization - {str(e)}")
|
|
@@ -88,6 +88,7 @@ src/xpander_sdk/modules/tools_repository/utils/schemas.py
|
|
|
88
88
|
src/xpander_sdk/utils/__init__.py
|
|
89
89
|
src/xpander_sdk/utils/env.py
|
|
90
90
|
src/xpander_sdk/utils/event_loop.py
|
|
91
|
+
src/xpander_sdk/utils/generic.py
|
|
91
92
|
src/xpander_sdk/utils/tools.py
|
|
92
93
|
src/xpander_sdk/utils/agents/__init__.py
|
|
93
94
|
src/xpander_sdk/utils/agents/compactization_agent.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/agent_list.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/models/knowledge_bases.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/sub_modules/__init__.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/sub_modules/agent.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/agents/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/backend_module.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/frameworks/__init__.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/frameworks/agno.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/frameworks/dispatch.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/backend/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/__init__.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/on_boot.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/on_shutdown.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/decorators/on_task.py
RENAMED
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/models/__init__.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/models/deployments.py
RENAMED
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/events/utils/git_init.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/knowledge_bases/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/models/tasks_list.py
RENAMED
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tasks/sub_modules/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{xpander_sdk-2.0.168 → xpander_sdk-2.0.170}/src/xpander_sdk/modules/tools_repository/models/mcp.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|