aiecs 1.0.2__py3-none-any.whl → 1.0.4__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.
Potentially problematic release.
This version of aiecs might be problematic. Click here for more details.
- aiecs/__init__.py +1 -1
- aiecs/domain/__init__.py +15 -0
- aiecs/domain/context/__init__.py +1 -0
- aiecs/domain/context/{content_engine.py → context_engine.py} +20 -11
- aiecs/domain/context/conversation_models.py +0 -1
- aiecs/main.py +1 -1
- aiecs/scripts/DEPENDENCY_SYSTEM_SUMMARY.md +1 -0
- aiecs/scripts/README_DEPENDENCY_CHECKER.md +1 -0
- aiecs/scripts/dependency_checker.py +1 -0
- aiecs/scripts/dependency_fixer.py +1 -0
- aiecs/scripts/patch_weasel_library.sh +1 -1
- aiecs/scripts/quick_dependency_check.py +1 -0
- {aiecs-1.0.2.dist-info → aiecs-1.0.4.dist-info}/METADATA +1 -1
- {aiecs-1.0.2.dist-info → aiecs-1.0.4.dist-info}/RECORD +18 -18
- {aiecs-1.0.2.dist-info → aiecs-1.0.4.dist-info}/WHEEL +0 -0
- {aiecs-1.0.2.dist-info → aiecs-1.0.4.dist-info}/entry_points.txt +0 -0
- {aiecs-1.0.2.dist-info → aiecs-1.0.4.dist-info}/licenses/LICENSE +0 -0
- {aiecs-1.0.2.dist-info → aiecs-1.0.4.dist-info}/top_level.txt +0 -0
aiecs/__init__.py
CHANGED
|
@@ -5,7 +5,7 @@ A powerful Python middleware framework for building AI-powered applications
|
|
|
5
5
|
with tool orchestration, task execution, and multi-provider LLM support.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "1.0.
|
|
8
|
+
__version__ = "1.0.4"
|
|
9
9
|
__author__ = "AIECS Team"
|
|
10
10
|
__email__ = "iretbl@gmail.com"
|
|
11
11
|
|
aiecs/domain/__init__.py
CHANGED
|
@@ -6,6 +6,11 @@ Contains business logic and domain models.
|
|
|
6
6
|
from .execution.model import TaskStepResult, TaskStatus, ErrorCode
|
|
7
7
|
from .task.model import TaskContext, DSLStep
|
|
8
8
|
from .task.dsl_processor import DSLProcessor
|
|
9
|
+
from .context import (
|
|
10
|
+
ContextEngine, SessionMetrics, ConversationMessage,
|
|
11
|
+
ConversationParticipant, ConversationSession, AgentCommunicationMessage,
|
|
12
|
+
create_session_key, validate_conversation_isolation_pattern
|
|
13
|
+
)
|
|
9
14
|
|
|
10
15
|
__all__ = [
|
|
11
16
|
# Execution domain
|
|
@@ -17,4 +22,14 @@ __all__ = [
|
|
|
17
22
|
"TaskContext",
|
|
18
23
|
"DSLStep",
|
|
19
24
|
"DSLProcessor",
|
|
25
|
+
|
|
26
|
+
# Context domain
|
|
27
|
+
"ContextEngine",
|
|
28
|
+
"SessionMetrics",
|
|
29
|
+
"ConversationMessage",
|
|
30
|
+
"ConversationParticipant",
|
|
31
|
+
"ConversationSession",
|
|
32
|
+
"AgentCommunicationMessage",
|
|
33
|
+
"create_session_key",
|
|
34
|
+
"validate_conversation_isolation_pattern",
|
|
20
35
|
]
|
aiecs/domain/context/__init__.py
CHANGED
|
@@ -22,16 +22,25 @@ from typing import Dict, Any, Optional, List, AsyncGenerator, Union
|
|
|
22
22
|
from dataclasses import dataclass, asdict
|
|
23
23
|
from contextlib import asynccontextmanager
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
class DateTimeEncoder(json.JSONEncoder):
|
|
27
|
+
"""Custom JSON encoder to handle datetime objects."""
|
|
28
|
+
|
|
29
|
+
def default(self, obj):
|
|
30
|
+
if isinstance(obj, datetime):
|
|
31
|
+
return obj.isoformat()
|
|
32
|
+
return super().default(obj)
|
|
33
|
+
|
|
25
34
|
# Import TaskContext for base functionality
|
|
26
|
-
from
|
|
35
|
+
from aiecs.domain.task.task_context import TaskContext, ContextUpdate
|
|
27
36
|
|
|
28
37
|
# Import core storage interfaces
|
|
29
|
-
from
|
|
38
|
+
from aiecs.core.interface.storage_interface import IStorageBackend, ICheckpointerBackend
|
|
30
39
|
|
|
31
40
|
# Redis client import - use existing infrastructure
|
|
32
41
|
try:
|
|
33
42
|
import redis.asyncio as redis
|
|
34
|
-
from
|
|
43
|
+
from aiecs.infrastructure.persistence.redis_client import get_redis_client
|
|
35
44
|
REDIS_AVAILABLE = True
|
|
36
45
|
except ImportError:
|
|
37
46
|
redis = None
|
|
@@ -142,7 +151,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
142
151
|
try:
|
|
143
152
|
if self.use_existing_redis and get_redis_client:
|
|
144
153
|
# First ensure Redis client is initialized
|
|
145
|
-
from
|
|
154
|
+
from aiecs.infrastructure.persistence.redis_client import initialize_redis_client
|
|
146
155
|
try:
|
|
147
156
|
await initialize_redis_client()
|
|
148
157
|
except Exception as init_error:
|
|
@@ -291,7 +300,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
291
300
|
await self.redis_client.hset(
|
|
292
301
|
"sessions",
|
|
293
302
|
session.session_id,
|
|
294
|
-
json.dumps(session.to_dict())
|
|
303
|
+
json.dumps(session.to_dict(), cls=DateTimeEncoder)
|
|
295
304
|
)
|
|
296
305
|
await self.redis_client.expire(f"sessions", self.session_ttl)
|
|
297
306
|
return
|
|
@@ -362,7 +371,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
362
371
|
# Add to list
|
|
363
372
|
await self.redis_client.lpush(
|
|
364
373
|
f"conversation:{session_id}",
|
|
365
|
-
json.dumps(message.to_dict())
|
|
374
|
+
json.dumps(message.to_dict(), cls=DateTimeEncoder)
|
|
366
375
|
)
|
|
367
376
|
# Trim to limit
|
|
368
377
|
await self.redis_client.ltrim(
|
|
@@ -413,7 +422,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
413
422
|
await self.redis_client.hset(
|
|
414
423
|
"task_contexts",
|
|
415
424
|
session_id,
|
|
416
|
-
json.dumps(context.to_dict())
|
|
425
|
+
json.dumps(context.to_dict(), cls=DateTimeEncoder)
|
|
417
426
|
)
|
|
418
427
|
await self.redis_client.expire("task_contexts", self.session_ttl)
|
|
419
428
|
return
|
|
@@ -466,7 +475,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
466
475
|
await self.redis_client.hset(
|
|
467
476
|
f"checkpoints:{thread_id}",
|
|
468
477
|
checkpoint_id,
|
|
469
|
-
json.dumps(checkpoint)
|
|
478
|
+
json.dumps(checkpoint, cls=DateTimeEncoder)
|
|
470
479
|
)
|
|
471
480
|
# Set TTL
|
|
472
481
|
await self.redis_client.expire(
|
|
@@ -719,7 +728,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
719
728
|
await self.redis_client.hset(
|
|
720
729
|
f"checkpoint_writes:{thread_id}",
|
|
721
730
|
f"{checkpoint_id}:{task_id}",
|
|
722
|
-
json.dumps(writes_payload)
|
|
731
|
+
json.dumps(writes_payload, cls=DateTimeEncoder)
|
|
723
732
|
)
|
|
724
733
|
await self.redis_client.expire(
|
|
725
734
|
f"checkpoint_writes:{thread_id}",
|
|
@@ -948,7 +957,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
948
957
|
await self.redis_client.hset(
|
|
949
958
|
"conversation_sessions",
|
|
950
959
|
session_key,
|
|
951
|
-
json.dumps(session_data)
|
|
960
|
+
json.dumps(session_data, cls=DateTimeEncoder)
|
|
952
961
|
)
|
|
953
962
|
await self.redis_client.expire("conversation_sessions", self.session_ttl)
|
|
954
963
|
return
|
|
@@ -971,7 +980,7 @@ class ContextEngine(IStorageBackend, ICheckpointerBackend):
|
|
|
971
980
|
await self.redis_client.hset(
|
|
972
981
|
"conversation_sessions",
|
|
973
982
|
session_key,
|
|
974
|
-
json.dumps(session_dict)
|
|
983
|
+
json.dumps(session_dict, cls=DateTimeEncoder)
|
|
975
984
|
)
|
|
976
985
|
return
|
|
977
986
|
except Exception as e:
|
aiecs/main.py
CHANGED
|
@@ -106,7 +106,7 @@ async def lifespan(app: FastAPI):
|
|
|
106
106
|
app = FastAPI(
|
|
107
107
|
title="AIECS - AI Execute Services",
|
|
108
108
|
description="Middleware service for AI-powered task execution and tool orchestration",
|
|
109
|
-
version="1.0.
|
|
109
|
+
version="1.0.4",
|
|
110
110
|
lifespan=lifespan
|
|
111
111
|
)
|
|
112
112
|
|
|
@@ -149,7 +149,7 @@ test_fix() {
|
|
|
149
149
|
import sys
|
|
150
150
|
sys.path.insert(0, '.')
|
|
151
151
|
try:
|
|
152
|
-
from
|
|
152
|
+
from aiecs.tools.task_tools.research_tool import *
|
|
153
153
|
print('✅ Import successful - fix appears to work!')
|
|
154
154
|
except Exception as e:
|
|
155
155
|
print(f'❌ Import still fails: {e}')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
aiecs/__init__.py,sha256=
|
|
1
|
+
aiecs/__init__.py,sha256=0G1Aq_7vMIAJ6ZQvk4L0dOX1Uf_ZT0UO5TtO4Vmyzcc,1859
|
|
2
2
|
aiecs/__main__.py,sha256=AfQpzy3SgwWuP4DuymYcm4MISMuzqwhxxGSYo53PBvY,1035
|
|
3
3
|
aiecs/aiecs_client.py,sha256=gJbCY6zuHR9TZPCgHhxd-d4CwCW9P_lUrtTSC5-ADWE,10527
|
|
4
|
-
aiecs/main.py,sha256=
|
|
4
|
+
aiecs/main.py,sha256=l5HQ4Ee8qWv90ZdmKOPuttKUBn0zOfyCE7KhH0prmhg,9306
|
|
5
5
|
aiecs/application/__init__.py,sha256=NkmrUH1DqxJ3vaVC8QwscNdlWqHfC7ZagL4k3nZ_qz4,192
|
|
6
6
|
aiecs/application/executors/__init__.py,sha256=WIl7L9HBsEhNfbNtJdvBvFUJXzESvNZVaiAA6tdtJcs,191
|
|
7
7
|
aiecs/application/executors/operation_executor.py,sha256=-7mFo1hUnWdehVPg0fnSiRhW3LACpIiyLSH-iu7bX4U,13818
|
|
@@ -12,10 +12,10 @@ aiecs/core/__init__.py,sha256=H0ZIk96q0KHKivcobnUCVJdJZmewucVJ9MKhRgUxmk0,1037
|
|
|
12
12
|
aiecs/core/interface/__init__.py,sha256=soI7zdoN3eQynVb9uiwmgXkM5E75JYffTILktHb48x8,688
|
|
13
13
|
aiecs/core/interface/execution_interface.py,sha256=6bXruts8dyAg647lxPDQkF-cdJG1W8ZqpxFQ6hjVrd4,4810
|
|
14
14
|
aiecs/core/interface/storage_interface.py,sha256=F7GQEZ_ZiRWeen7oZO6A4S0nW0VORYsygk2BYLw5aiY,5680
|
|
15
|
-
aiecs/domain/__init__.py,sha256=
|
|
16
|
-
aiecs/domain/context/__init__.py,sha256=
|
|
17
|
-
aiecs/domain/context/
|
|
18
|
-
aiecs/domain/context/conversation_models.py,sha256=
|
|
15
|
+
aiecs/domain/__init__.py,sha256=fwcoCiZxcRmXPhRUEiYVYdY9QAB29Dmst1oPJC9jYvU,875
|
|
16
|
+
aiecs/domain/context/__init__.py,sha256=FfKatEwU5-REwBNdVRtWUXYqhdAFD2O4sKafnS5sG8M,864
|
|
17
|
+
aiecs/domain/context/context_engine.py,sha256=HiUMAsUYx9ts242JzPZ0nJ9YjOYNpTnBY2lFI5RQ2FI,36439
|
|
18
|
+
aiecs/domain/context/conversation_models.py,sha256=GgHEZTnHs6U-ecfAJ-0GJUXF48AdXCw0O8Lb8BzQ3oU,13005
|
|
19
19
|
aiecs/domain/execution/__init__.py,sha256=usXYgPcS-j0CFBN5K1v1WuxQUHsgap3tsaZnDCcKVXs,216
|
|
20
20
|
aiecs/domain/execution/model.py,sha256=GEQLo8t6V4tvbY0mMuWb_YCNLfi809q_T_x16ZfoNQQ,1453
|
|
21
21
|
aiecs/domain/task/__init__.py,sha256=WtU0MPg3xpkKa4RUTbSEkppUxGdvn-ai_3UCRvMjLR8,226
|
|
@@ -41,17 +41,17 @@ aiecs/llm/custom_callbacks.py,sha256=DyEbd1iSwiD8rN3cn96thCxFqk0JFwpBJLZdHijRv7I
|
|
|
41
41
|
aiecs/llm/openai_client.py,sha256=Dmuo_91AiuM_57QuDiqkFdWFD3Jr-m4xJ89gKihivCs,4388
|
|
42
42
|
aiecs/llm/vertex_client.py,sha256=r_geBuF800g0CyUUAGmxYRjjTd9_X-H8rJ1vGeIvZ6U,8592
|
|
43
43
|
aiecs/llm/xai_client.py,sha256=CMCDdHh7uBGlFdYqTo4EKp7ZenjZIawtL5oWVVvLVCY,6800
|
|
44
|
-
aiecs/scripts/DEPENDENCY_SYSTEM_SUMMARY.md,sha256=
|
|
45
|
-
aiecs/scripts/README_DEPENDENCY_CHECKER.md,sha256=
|
|
44
|
+
aiecs/scripts/DEPENDENCY_SYSTEM_SUMMARY.md,sha256=u2OLwmXaRGuTwEfj3jQ_yzAO_Z49P1CBC1pV3iULuoE,5866
|
|
45
|
+
aiecs/scripts/README_DEPENDENCY_CHECKER.md,sha256=7sAyeiMN7I-RsTOudo_JO2CTbC5ObEV0z_YyGtjiMcI,6003
|
|
46
46
|
aiecs/scripts/README_WEASEL_PATCH.md,sha256=h0e3Xy6FArLgjika3pRZRhZRbyuj6iLzTU-AhHkWE7M,3581
|
|
47
47
|
aiecs/scripts/__init__.py,sha256=cVxQ5iqym520eDQSpV7B6hWolndCLMOVdvhC_D280PE,66
|
|
48
|
-
aiecs/scripts/dependency_checker.py,sha256=
|
|
49
|
-
aiecs/scripts/dependency_fixer.py,sha256=
|
|
48
|
+
aiecs/scripts/dependency_checker.py,sha256=XVBQQrPPyif7mfq4P7vs0IkmtiAddb9aSTtJCxyI_18,33837
|
|
49
|
+
aiecs/scripts/dependency_fixer.py,sha256=yXp5uj2elXGUrEco8_42nsD9VlUGSsyaG-qiMoF5Ab0,13962
|
|
50
50
|
aiecs/scripts/download_nlp_data.py,sha256=P2ObKS2P7oGCQU257mByU8Ca4-UXpfH8ZrgOUYT12Ys,10985
|
|
51
51
|
aiecs/scripts/fix_weasel_validator.py,sha256=w_s2VTIAgWPi-3VUXlrINBkLm9765QHdRf4g5RzBUug,4073
|
|
52
52
|
aiecs/scripts/fix_weasel_validator.sh,sha256=XqV3Yx1wi23dWXDbofFK6_SU0BVLr9E1HaIudIuem7Q,2736
|
|
53
|
-
aiecs/scripts/patch_weasel_library.sh,sha256=
|
|
54
|
-
aiecs/scripts/quick_dependency_check.py,sha256
|
|
53
|
+
aiecs/scripts/patch_weasel_library.sh,sha256=6OcbuJWLv8DDeKPgVrV4wG9UIm5ppN-y-OQPSBD9pSg,5491
|
|
54
|
+
aiecs/scripts/quick_dependency_check.py,sha256=KUDhwuPocaH2jYPCBfNVF0o1dtINAVf__UcQV-ZYswQ,9828
|
|
55
55
|
aiecs/scripts/run_weasel_patch.sh,sha256=bwyFyeaITwDmG2_3HsTd7PHeexahh6MhEZwUuAC_85c,1233
|
|
56
56
|
aiecs/scripts/setup_nlp_data.sh,sha256=CqO-bLVc_mLhNpsSoXZjvJKhtLUbA_gYBqfp3nzUuRI,5843
|
|
57
57
|
aiecs/tasks/__init__.py,sha256=__xkKqXWQ24FkySb8xtsCCJYLKnqmHKbAnojxeELEiE,90
|
|
@@ -82,9 +82,9 @@ aiecs/utils/prompt_loader.py,sha256=cBS2bZXpYQOWSiOGkhwIzyy3_bETqwIblRi_9qQT9iQ,
|
|
|
82
82
|
aiecs/utils/token_usage_repository.py,sha256=cSu2lQq7obNrjYBdtvqkCeWeApscHVcYa9JNgl3T3gU,10206
|
|
83
83
|
aiecs/ws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
84
|
aiecs/ws/socket_server.py,sha256=j_9idVY_rWlTsF51FgmuhWCWFVt7_gAHL8vNg3IxV5g,1476
|
|
85
|
-
aiecs-1.0.
|
|
86
|
-
aiecs-1.0.
|
|
87
|
-
aiecs-1.0.
|
|
88
|
-
aiecs-1.0.
|
|
89
|
-
aiecs-1.0.
|
|
90
|
-
aiecs-1.0.
|
|
85
|
+
aiecs-1.0.4.dist-info/licenses/LICENSE,sha256=_1YRaIS0eZu1pv6xfz245UkU0i1Va2B841hv3OWRwqg,12494
|
|
86
|
+
aiecs-1.0.4.dist-info/METADATA,sha256=uzy0OZ8kkSZjk-9qBfYgp2I8azynK4KLczg7FNVECpw,16388
|
|
87
|
+
aiecs-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
88
|
+
aiecs-1.0.4.dist-info/entry_points.txt,sha256=0Bj2pSaZM-ADKTktbCQ0KQxRe0s8mQFKVsg3IGDJGqA,342
|
|
89
|
+
aiecs-1.0.4.dist-info/top_level.txt,sha256=22IlUlOqh9Ni3jXlQNMNUqzbW8dcxXPeR_EQ-BJVcV8,6
|
|
90
|
+
aiecs-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|