aiecs 1.0.0__tar.gz → 1.0.2__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.

Potentially problematic release.


This version of aiecs might be problematic. Click here for more details.

Files changed (96) hide show
  1. {aiecs-1.0.0/aiecs.egg-info → aiecs-1.0.2}/PKG-INFO +1 -1
  2. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/__init__.py +1 -1
  3. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/persistence/database_manager.py +21 -0
  4. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/main.py +1 -1
  5. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/dependency_checker.py +64 -32
  6. {aiecs-1.0.0 → aiecs-1.0.2/aiecs.egg-info}/PKG-INFO +1 -1
  7. {aiecs-1.0.0 → aiecs-1.0.2}/pyproject.toml +29 -2
  8. {aiecs-1.0.0 → aiecs-1.0.2}/LICENSE +0 -0
  9. {aiecs-1.0.0 → aiecs-1.0.2}/MANIFEST.in +0 -0
  10. {aiecs-1.0.0 → aiecs-1.0.2}/README.md +0 -0
  11. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/__main__.py +0 -0
  12. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/aiecs_client.py +0 -0
  13. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/application/__init__.py +0 -0
  14. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/application/executors/__init__.py +0 -0
  15. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/application/executors/operation_executor.py +0 -0
  16. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/config/__init__.py +0 -0
  17. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/config/config.py +0 -0
  18. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/config/registry.py +0 -0
  19. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/core/__init__.py +0 -0
  20. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/core/interface/__init__.py +0 -0
  21. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/core/interface/execution_interface.py +0 -0
  22. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/core/interface/storage_interface.py +0 -0
  23. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/__init__.py +0 -0
  24. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/context/__init__.py +0 -0
  25. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/context/content_engine.py +0 -0
  26. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/context/conversation_models.py +0 -0
  27. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/execution/__init__.py +0 -0
  28. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/execution/model.py +0 -0
  29. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/task/__init__.py +0 -0
  30. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/task/dsl_processor.py +0 -0
  31. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/task/model.py +0 -0
  32. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/domain/task/task_context.py +0 -0
  33. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/__init__.py +0 -0
  34. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/messaging/__init__.py +0 -0
  35. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/messaging/celery_task_manager.py +0 -0
  36. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/messaging/websocket_manager.py +0 -0
  37. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/monitoring/__init__.py +0 -0
  38. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/monitoring/executor_metrics.py +0 -0
  39. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/monitoring/structured_logger.py +0 -0
  40. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/monitoring/tracing_manager.py +0 -0
  41. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/persistence/__init__.py +0 -0
  42. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/persistence/file_storage.py +0 -0
  43. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/infrastructure/persistence/redis_client.py +0 -0
  44. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/__init__.py +0 -0
  45. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/base_client.py +0 -0
  46. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/client_factory.py +0 -0
  47. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/custom_callbacks.py +0 -0
  48. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/openai_client.py +0 -0
  49. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/vertex_client.py +0 -0
  50. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/llm/xai_client.py +0 -0
  51. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/DEPENDENCY_SYSTEM_SUMMARY.md +0 -0
  52. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/README_DEPENDENCY_CHECKER.md +0 -0
  53. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/README_WEASEL_PATCH.md +0 -0
  54. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/__init__.py +0 -0
  55. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/dependency_fixer.py +0 -0
  56. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/download_nlp_data.py +0 -0
  57. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/fix_weasel_validator.py +0 -0
  58. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/fix_weasel_validator.sh +0 -0
  59. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/patch_weasel_library.sh +0 -0
  60. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/quick_dependency_check.py +0 -0
  61. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/run_weasel_patch.sh +0 -0
  62. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/scripts/setup_nlp_data.sh +0 -0
  63. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tasks/__init__.py +0 -0
  64. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tasks/worker.py +0 -0
  65. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/__init__.py +0 -0
  66. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/base_tool.py +0 -0
  67. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/langchain_adapter.py +0 -0
  68. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/__init__.py +0 -0
  69. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/chart_tool.py +0 -0
  70. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/classfire_tool.py +0 -0
  71. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/image_tool.py +0 -0
  72. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/office_tool.py +0 -0
  73. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/pandas_tool.py +0 -0
  74. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/report_tool.py +0 -0
  75. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/research_tool.py +0 -0
  76. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/scraper_tool.py +0 -0
  77. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/search_api.py +0 -0
  78. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/task_tools/stats_tool.py +0 -0
  79. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/temp_file_manager.py +0 -0
  80. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/tool_executor/__init__.py +0 -0
  81. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/tools/tool_executor/tool_executor.py +0 -0
  82. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/LLM_output_structor.py +0 -0
  83. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/__init__.py +0 -0
  84. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/base_callback.py +0 -0
  85. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/execution_utils.py +0 -0
  86. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/logging.py +0 -0
  87. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/prompt_loader.py +0 -0
  88. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/utils/token_usage_repository.py +0 -0
  89. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/ws/__init__.py +0 -0
  90. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs/ws/socket_server.py +0 -0
  91. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs.egg-info/SOURCES.txt +0 -0
  92. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs.egg-info/dependency_links.txt +0 -0
  93. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs.egg-info/entry_points.txt +0 -0
  94. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs.egg-info/requires.txt +0 -0
  95. {aiecs-1.0.0 → aiecs-1.0.2}/aiecs.egg-info/top_level.txt +0 -0
  96. {aiecs-1.0.0 → aiecs-1.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiecs
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: AI Execute Services - A middleware framework for AI-powered task execution and tool orchestration
5
5
  Author-email: AIECS Team <iretbl@gmail.com>
6
6
  License-Expression: MIT
@@ -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.0"
8
+ __version__ = "1.0.2"
9
9
  __author__ = "AIECS Team"
10
10
  __email__ = "iretbl@gmail.com"
11
11
 
@@ -23,6 +23,21 @@ class DatabaseManager:
23
23
  self.connection_pool = None
24
24
  self._initialized = False
25
25
 
26
+ async def connect(self, min_size: int = 10, max_size: int = 20):
27
+ """Connect to database and initialize connection pool"""
28
+ if self._initialized:
29
+ logger.info("Database already connected")
30
+ return
31
+
32
+ try:
33
+ await self.init_connection_pool(min_size, max_size)
34
+ await self.init_database_schema()
35
+ self._initialized = True
36
+ logger.info("Database connection and schema initialization completed")
37
+ except Exception as e:
38
+ logger.error(f"Failed to connect to database: {e}")
39
+ raise
40
+
26
41
  async def init_connection_pool(self, min_size: int = 10, max_size: int = 20):
27
42
  """Initialize database connection pool"""
28
43
  try:
@@ -279,6 +294,12 @@ class DatabaseManager:
279
294
  logger.error(f"Database error during cleanup: {e}")
280
295
  return False
281
296
 
297
+ async def disconnect(self):
298
+ """Disconnect from database and close connection pool"""
299
+ await self.close()
300
+ self._initialized = False
301
+ logger.info("Database disconnected")
302
+
282
303
  async def close(self):
283
304
  """Close database connection pool"""
284
305
  if self.connection_pool:
@@ -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.0",
109
+ version="1.0.2",
110
110
  lifespan=lifespan
111
111
  )
112
112
 
@@ -298,16 +298,24 @@ class DependencyChecker:
298
298
  is_critical=False
299
299
  ))
300
300
 
301
- # Python packages
302
- python_packages = ["tika", "python-docx", "python-pptx", "openpyxl", "pdfplumber", "pytesseract", "PIL"]
303
- for pkg in python_packages:
304
- status = self.check_python_package(pkg)
301
+ # Python packages (package_name: import_name)
302
+ python_packages = {
303
+ "tika": "tika",
304
+ "python-docx": "docx", # Package name vs import name
305
+ "python-pptx": "pptx", # Package name vs import name
306
+ "openpyxl": "openpyxl",
307
+ "pdfplumber": "pdfplumber",
308
+ "pytesseract": "pytesseract",
309
+ "PIL": "PIL"
310
+ }
311
+ for pkg_name, import_name in python_packages.items():
312
+ status = self.check_python_package(import_name)
305
313
  python_deps.append(DependencyInfo(
306
- name=pkg,
314
+ name=pkg_name,
307
315
  status=status,
308
- description=f"Python package: {pkg}",
309
- install_command=f"pip install {pkg}",
310
- impact=f"{pkg} functionality will be unavailable",
316
+ description=f"Python package: {pkg_name}",
317
+ install_command=f"pip install {pkg_name}",
318
+ impact=f"{pkg_name} functionality will be unavailable",
311
319
  is_critical=True
312
320
  ))
313
321
 
@@ -348,16 +356,24 @@ class DependencyChecker:
348
356
  is_critical=False
349
357
  ))
350
358
 
351
- # Python packages
352
- python_packages = ["pandas", "numpy", "scipy", "scikit-learn", "statsmodels", "pyreadstat", "openpyxl"]
353
- for pkg in python_packages:
354
- status = self.check_python_package(pkg)
359
+ # Python packages (package_name: import_name)
360
+ python_packages = {
361
+ "pandas": "pandas",
362
+ "numpy": "numpy",
363
+ "scipy": "scipy",
364
+ "scikit-learn": "sklearn", # Package name vs import name
365
+ "statsmodels": "statsmodels",
366
+ "pyreadstat": "pyreadstat",
367
+ "openpyxl": "openpyxl"
368
+ }
369
+ for pkg_name, import_name in python_packages.items():
370
+ status = self.check_python_package(import_name)
355
371
  python_deps.append(DependencyInfo(
356
- name=pkg,
372
+ name=pkg_name,
357
373
  status=status,
358
- description=f"Python package: {pkg}",
359
- install_command=f"pip install {pkg}",
360
- impact=f"{pkg} functionality will be unavailable",
374
+ description=f"Python package: {pkg_name}",
375
+ install_command=f"pip install {pkg_name}",
376
+ impact=f"{pkg_name} functionality will be unavailable",
361
377
  is_critical=True
362
378
  ))
363
379
 
@@ -398,16 +414,26 @@ class DependencyChecker:
398
414
  is_critical=False
399
415
  ))
400
416
 
401
- # Python packages
402
- python_packages = ["jinja2", "matplotlib", "weasyprint", "bleach", "markdown", "pandas", "openpyxl", "python-docx", "python-pptx"]
403
- for pkg in python_packages:
404
- status = self.check_python_package(pkg)
417
+ # Python packages (package_name: import_name)
418
+ python_packages = {
419
+ "jinja2": "jinja2",
420
+ "matplotlib": "matplotlib",
421
+ "weasyprint": "weasyprint",
422
+ "bleach": "bleach",
423
+ "markdown": "markdown",
424
+ "pandas": "pandas",
425
+ "openpyxl": "openpyxl",
426
+ "python-docx": "docx", # Package name vs import name
427
+ "python-pptx": "pptx" # Package name vs import name
428
+ }
429
+ for pkg_name, import_name in python_packages.items():
430
+ status = self.check_python_package(import_name)
405
431
  python_deps.append(DependencyInfo(
406
- name=pkg,
432
+ name=pkg_name,
407
433
  status=status,
408
- description=f"Python package: {pkg}",
409
- install_command=f"pip install {pkg}",
410
- impact=f"{pkg} functionality will be unavailable",
434
+ description=f"Python package: {pkg_name}",
435
+ install_command=f"pip install {pkg_name}",
436
+ impact=f"{pkg_name} functionality will be unavailable",
411
437
  is_critical=True
412
438
  ))
413
439
 
@@ -448,16 +474,22 @@ class DependencyChecker:
448
474
  is_critical=False
449
475
  ))
450
476
 
451
- # Python packages
452
- python_packages = ["playwright", "scrapy", "httpx", "beautifulsoup4", "lxml"]
453
- for pkg in python_packages:
454
- status = self.check_python_package(pkg)
477
+ # Python packages (package_name: import_name)
478
+ python_packages = {
479
+ "playwright": "playwright",
480
+ "scrapy": "scrapy",
481
+ "httpx": "httpx",
482
+ "beautifulsoup4": "bs4", # Package name vs import name
483
+ "lxml": "lxml"
484
+ }
485
+ for pkg_name, import_name in python_packages.items():
486
+ status = self.check_python_package(import_name)
455
487
  python_deps.append(DependencyInfo(
456
- name=pkg,
488
+ name=pkg_name,
457
489
  status=status,
458
- description=f"Python package: {pkg}",
459
- install_command=f"pip install {pkg}",
460
- impact=f"{pkg} functionality will be unavailable",
490
+ description=f"Python package: {pkg_name}",
491
+ install_command=f"pip install {pkg_name}",
492
+ impact=f"{pkg_name} functionality will be unavailable",
461
493
  is_critical=True
462
494
  ))
463
495
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aiecs
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: AI Execute Services - A middleware framework for AI-powered task execution and tool orchestration
5
5
  Author-email: AIECS Team <iretbl@gmail.com>
6
6
  License-Expression: MIT
@@ -21,7 +21,7 @@ exclude = '''
21
21
 
22
22
  [project]
23
23
  name = "aiecs"
24
- version = "1.0.0"
24
+ version = "1.0.2"
25
25
  description = "AI Execute Services - A middleware framework for AI-powered task execution and tool orchestration"
26
26
  authors = [
27
27
  {name = "AIECS Team", email = "iretbl@gmail.com"}
@@ -143,7 +143,7 @@ dependencies = [
143
143
  "psutil (>=7.0.0,<8.0.0)", # System and process monitoring utilities
144
144
  ]
145
145
 
146
- # 开发依赖项 - 移动到 optional-dependencies
146
+ # 开发依赖项 - 移动到 optional-dependencies,use `pip install aiecs[dev]`
147
147
  [project.optional-dependencies]
148
148
  dev = [
149
149
  "pytest>=8.3.5", # Testing framework
@@ -184,3 +184,30 @@ py-modules = []
184
184
  [build-system]
185
185
  requires = ["setuptools>=68.0", "wheel"]
186
186
  build-backend = "setuptools.build_meta"
187
+
188
+ # Pytest configuration
189
+ [tool.pytest.ini_options]
190
+ asyncio_mode = "auto"
191
+ asyncio_default_fixture_loop_scope = "function"
192
+ testpaths = ["test"]
193
+ python_files = ["test_*.py"]
194
+ python_classes = ["Test*"]
195
+ python_functions = ["test_*"]
196
+ addopts = [
197
+ "-v",
198
+ "--tb=short",
199
+ "--strict-markers",
200
+ "--disable-warnings"
201
+ ]
202
+ markers = [
203
+ "asyncio: marks tests as async",
204
+ "slow: marks tests as slow (deselect with '-m \"not slow\"')",
205
+ "integration: marks tests as integration tests",
206
+ "security: marks tests as security tests",
207
+ "performance: marks tests as performance tests"
208
+ ]
209
+ filterwarnings = [
210
+ "ignore::DeprecationWarning",
211
+ "ignore::UserWarning",
212
+ "ignore::pytest.PytestUnknownMarkWarning"
213
+ ]
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
File without changes
File without changes
File without changes
File without changes