aiecs 1.0.8__py3-none-any.whl → 1.2.0__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/aiecs_client.py +159 -1
- aiecs/config/config.py +6 -0
- aiecs/domain/__init__.py +95 -0
- aiecs/domain/community/__init__.py +159 -0
- aiecs/domain/community/agent_adapter.py +516 -0
- aiecs/domain/community/analytics.py +465 -0
- aiecs/domain/community/collaborative_workflow.py +99 -7
- aiecs/domain/community/communication_hub.py +649 -0
- aiecs/domain/community/community_builder.py +322 -0
- aiecs/domain/community/community_integration.py +365 -12
- aiecs/domain/community/community_manager.py +481 -5
- aiecs/domain/community/decision_engine.py +459 -13
- aiecs/domain/community/exceptions.py +238 -0
- aiecs/domain/community/models/__init__.py +36 -0
- aiecs/domain/community/resource_manager.py +1 -1
- aiecs/domain/community/shared_context_manager.py +621 -0
- aiecs/domain/context/__init__.py +24 -0
- aiecs/domain/context/context_engine.py +37 -33
- aiecs/main.py +20 -2
- aiecs/scripts/aid/VERSION_MANAGEMENT.md +97 -0
- aiecs/scripts/aid/__init__.py +15 -0
- aiecs/scripts/aid/version_manager.py +224 -0
- aiecs/scripts/dependance_check/__init__.py +18 -0
- aiecs/scripts/{download_nlp_data.py → dependance_check/download_nlp_data.py} +51 -8
- aiecs/scripts/dependance_patch/__init__.py +8 -0
- aiecs/scripts/dependance_patch/fix_weasel/__init__.py +12 -0
- aiecs/scripts/tools_develop/README.md +340 -0
- aiecs/scripts/tools_develop/__init__.py +16 -0
- aiecs/scripts/tools_develop/check_type_annotations.py +263 -0
- aiecs/scripts/tools_develop/validate_tool_schemas.py +346 -0
- aiecs/tools/__init__.py +53 -34
- aiecs/tools/docs/__init__.py +106 -0
- aiecs/tools/docs/ai_document_orchestrator.py +556 -0
- aiecs/tools/docs/ai_document_writer_orchestrator.py +2222 -0
- aiecs/tools/docs/content_insertion_tool.py +1234 -0
- aiecs/tools/docs/document_creator_tool.py +1179 -0
- aiecs/tools/docs/document_layout_tool.py +1105 -0
- aiecs/tools/docs/document_parser_tool.py +924 -0
- aiecs/tools/docs/document_writer_tool.py +1636 -0
- aiecs/tools/langchain_adapter.py +102 -51
- aiecs/tools/schema_generator.py +265 -0
- aiecs/tools/statistics/__init__.py +82 -0
- aiecs/tools/statistics/ai_data_analysis_orchestrator.py +581 -0
- aiecs/tools/statistics/ai_insight_generator_tool.py +473 -0
- aiecs/tools/statistics/ai_report_orchestrator_tool.py +629 -0
- aiecs/tools/statistics/data_loader_tool.py +518 -0
- aiecs/tools/statistics/data_profiler_tool.py +599 -0
- aiecs/tools/statistics/data_transformer_tool.py +531 -0
- aiecs/tools/statistics/data_visualizer_tool.py +460 -0
- aiecs/tools/statistics/model_trainer_tool.py +470 -0
- aiecs/tools/statistics/statistical_analyzer_tool.py +426 -0
- aiecs/tools/task_tools/chart_tool.py +2 -1
- aiecs/tools/task_tools/image_tool.py +43 -43
- aiecs/tools/task_tools/office_tool.py +48 -36
- aiecs/tools/task_tools/pandas_tool.py +37 -33
- aiecs/tools/task_tools/report_tool.py +67 -56
- aiecs/tools/task_tools/research_tool.py +32 -31
- aiecs/tools/task_tools/scraper_tool.py +53 -46
- aiecs/tools/task_tools/search_tool.py +1123 -0
- aiecs/tools/task_tools/stats_tool.py +20 -15
- {aiecs-1.0.8.dist-info → aiecs-1.2.0.dist-info}/METADATA +5 -1
- aiecs-1.2.0.dist-info/RECORD +135 -0
- aiecs-1.2.0.dist-info/entry_points.txt +10 -0
- aiecs/tools/task_tools/search_api.py +0 -7
- aiecs-1.0.8.dist-info/RECORD +0 -98
- aiecs-1.0.8.dist-info/entry_points.txt +0 -7
- /aiecs/scripts/{DEPENDENCY_SYSTEM_SUMMARY.md → dependance_check/DEPENDENCY_SYSTEM_SUMMARY.md} +0 -0
- /aiecs/scripts/{README_DEPENDENCY_CHECKER.md → dependance_check/README_DEPENDENCY_CHECKER.md} +0 -0
- /aiecs/scripts/{dependency_checker.py → dependance_check/dependency_checker.py} +0 -0
- /aiecs/scripts/{dependency_fixer.py → dependance_check/dependency_fixer.py} +0 -0
- /aiecs/scripts/{quick_dependency_check.py → dependance_check/quick_dependency_check.py} +0 -0
- /aiecs/scripts/{setup_nlp_data.sh → dependance_check/setup_nlp_data.sh} +0 -0
- /aiecs/scripts/{README_WEASEL_PATCH.md → dependance_patch/fix_weasel/README_WEASEL_PATCH.md} +0 -0
- /aiecs/scripts/{fix_weasel_validator.py → dependance_patch/fix_weasel/fix_weasel_validator.py} +0 -0
- /aiecs/scripts/{fix_weasel_validator.sh → dependance_patch/fix_weasel/fix_weasel_validator.sh} +0 -0
- /aiecs/scripts/{patch_weasel_library.sh → dependance_patch/fix_weasel/patch_weasel_library.sh} +0 -0
- /aiecs/scripts/{run_weasel_patch.sh → dependance_patch/fix_weasel/run_weasel_patch.sh} +0 -0
- {aiecs-1.0.8.dist-info → aiecs-1.2.0.dist-info}/WHEEL +0 -0
- {aiecs-1.0.8.dist-info → aiecs-1.2.0.dist-info}/licenses/LICENSE +0 -0
- {aiecs-1.0.8.dist-info → aiecs-1.2.0.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.2.0"
|
|
9
9
|
__author__ = "AIECS Team"
|
|
10
10
|
__email__ = "iretbl@gmail.com"
|
|
11
11
|
|
aiecs/aiecs_client.py
CHANGED
|
@@ -11,7 +11,8 @@ from contextlib import asynccontextmanager
|
|
|
11
11
|
from aiecs.config.config import get_settings, validate_required_settings
|
|
12
12
|
from aiecs.domain.task.task_context import TaskContext
|
|
13
13
|
from aiecs.tools import discover_tools, list_tools, get_tool
|
|
14
|
-
from aiecs.llm.client_factory import LLMClientFactory
|
|
14
|
+
from aiecs.llm.client_factory import LLMClientFactory, LLMClientManager, AIProvider
|
|
15
|
+
from aiecs.llm.base_client import LLMMessage
|
|
15
16
|
|
|
16
17
|
logger = logging.getLogger(__name__)
|
|
17
18
|
|
|
@@ -46,6 +47,7 @@ class AIECS:
|
|
|
46
47
|
self.db_manager = None
|
|
47
48
|
self.task_manager = None
|
|
48
49
|
self.operation_executor = None
|
|
50
|
+
self.llm_manager = None
|
|
49
51
|
|
|
50
52
|
# State
|
|
51
53
|
self._initialized = False
|
|
@@ -65,6 +67,10 @@ class AIECS:
|
|
|
65
67
|
self._tools_discovered = True
|
|
66
68
|
logger.info("Tools discovered and registered")
|
|
67
69
|
|
|
70
|
+
# Initialize LLM manager (available in both modes)
|
|
71
|
+
self.llm_manager = LLMClientManager()
|
|
72
|
+
logger.info("LLM manager initialized")
|
|
73
|
+
|
|
68
74
|
if self.mode == "simple":
|
|
69
75
|
# Simple mode: only tools, no database/Celery
|
|
70
76
|
logger.info("Simple mode: tools only")
|
|
@@ -210,6 +216,158 @@ class AIECS:
|
|
|
210
216
|
|
|
211
217
|
return get_tool(tool_name)
|
|
212
218
|
|
|
219
|
+
def process_task(self, task_context: TaskContext) -> Dict[str, Any]:
|
|
220
|
+
"""
|
|
221
|
+
Process a task synchronously (for compatibility with synchronous tool calls)
|
|
222
|
+
|
|
223
|
+
Args:
|
|
224
|
+
task_context: TaskContext containing the task data
|
|
225
|
+
|
|
226
|
+
Returns:
|
|
227
|
+
Task processing result with AI-generated response
|
|
228
|
+
"""
|
|
229
|
+
# Run the async method in a new event loop if needed
|
|
230
|
+
try:
|
|
231
|
+
loop = asyncio.get_event_loop()
|
|
232
|
+
if loop.is_running():
|
|
233
|
+
# If called from async context, create a new thread
|
|
234
|
+
import concurrent.futures
|
|
235
|
+
with concurrent.futures.ThreadPoolExecutor() as executor:
|
|
236
|
+
future = executor.submit(
|
|
237
|
+
asyncio.run,
|
|
238
|
+
self.process_task_async(task_context)
|
|
239
|
+
)
|
|
240
|
+
return future.result()
|
|
241
|
+
else:
|
|
242
|
+
# Run in current event loop
|
|
243
|
+
return loop.run_until_complete(self.process_task_async(task_context))
|
|
244
|
+
except RuntimeError:
|
|
245
|
+
# No event loop, create one
|
|
246
|
+
return asyncio.run(self.process_task_async(task_context))
|
|
247
|
+
|
|
248
|
+
async def process_task_async(self, task_context: TaskContext) -> Dict[str, Any]:
|
|
249
|
+
"""
|
|
250
|
+
Process a task asynchronously using AI providers
|
|
251
|
+
|
|
252
|
+
Args:
|
|
253
|
+
task_context: TaskContext containing the task data
|
|
254
|
+
|
|
255
|
+
Returns:
|
|
256
|
+
Task processing result with AI-generated response
|
|
257
|
+
"""
|
|
258
|
+
if not self._initialized:
|
|
259
|
+
await self.initialize()
|
|
260
|
+
|
|
261
|
+
if not self.llm_manager:
|
|
262
|
+
raise RuntimeError("LLM manager not initialized")
|
|
263
|
+
|
|
264
|
+
try:
|
|
265
|
+
# Extract data from TaskContext
|
|
266
|
+
context_dict = task_context.to_dict()
|
|
267
|
+
metadata = context_dict.get("metadata", {})
|
|
268
|
+
|
|
269
|
+
# Get AI provider preference from metadata
|
|
270
|
+
ai_preference = metadata.get("aiPreference", "default")
|
|
271
|
+
provider = None
|
|
272
|
+
model = None
|
|
273
|
+
|
|
274
|
+
# Parse AI preference
|
|
275
|
+
if isinstance(ai_preference, str):
|
|
276
|
+
# Simple string preference
|
|
277
|
+
if ai_preference.lower() != "default":
|
|
278
|
+
try:
|
|
279
|
+
provider = AIProvider(ai_preference)
|
|
280
|
+
except ValueError:
|
|
281
|
+
logger.warning(f"Unknown AI provider: {ai_preference}, using default")
|
|
282
|
+
elif isinstance(ai_preference, dict):
|
|
283
|
+
# Dictionary with provider and model
|
|
284
|
+
provider_str = ai_preference.get("provider")
|
|
285
|
+
if provider_str:
|
|
286
|
+
try:
|
|
287
|
+
provider = AIProvider(provider_str)
|
|
288
|
+
except ValueError:
|
|
289
|
+
logger.warning(f"Unknown AI provider: {provider_str}, using default")
|
|
290
|
+
model = ai_preference.get("model")
|
|
291
|
+
|
|
292
|
+
# Build prompt from context data
|
|
293
|
+
# The prompt could come from various sources in the context
|
|
294
|
+
prompt = None
|
|
295
|
+
|
|
296
|
+
# Check for direct prompt in metadata
|
|
297
|
+
if "prompt" in metadata:
|
|
298
|
+
prompt = metadata["prompt"]
|
|
299
|
+
# Check for input_data (common in document generation)
|
|
300
|
+
elif "input_data" in context_dict:
|
|
301
|
+
input_data = context_dict["input_data"]
|
|
302
|
+
if isinstance(input_data, dict) and "prompt" in input_data:
|
|
303
|
+
prompt = input_data["prompt"]
|
|
304
|
+
elif isinstance(input_data, str):
|
|
305
|
+
prompt = input_data
|
|
306
|
+
|
|
307
|
+
if not prompt:
|
|
308
|
+
# Fallback: construct a simple prompt from available data
|
|
309
|
+
prompt = f"Task: {context_dict.get('task_type', 'general')}\nData: {context_dict}"
|
|
310
|
+
|
|
311
|
+
# Get temperature and other parameters from metadata
|
|
312
|
+
temperature = metadata.get("temperature", 0.7)
|
|
313
|
+
max_tokens = metadata.get("max_tokens", 2000)
|
|
314
|
+
|
|
315
|
+
# Generate text using LLM manager
|
|
316
|
+
messages = [LLMMessage(role="user", content=prompt)]
|
|
317
|
+
|
|
318
|
+
response = await self.llm_manager.generate_text(
|
|
319
|
+
messages=messages,
|
|
320
|
+
provider=provider,
|
|
321
|
+
model=model,
|
|
322
|
+
context=context_dict,
|
|
323
|
+
temperature=temperature,
|
|
324
|
+
max_tokens=max_tokens
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
# Track model usage in context
|
|
328
|
+
if hasattr(task_context, 'track_model_usage'):
|
|
329
|
+
task_context.track_model_usage(
|
|
330
|
+
model_id=response.model,
|
|
331
|
+
provider_id=response.provider,
|
|
332
|
+
mode="generate"
|
|
333
|
+
)
|
|
334
|
+
|
|
335
|
+
# Return result in expected format
|
|
336
|
+
return {
|
|
337
|
+
"status": "completed",
|
|
338
|
+
"response": response.content,
|
|
339
|
+
"provider": response.provider,
|
|
340
|
+
"model": response.model,
|
|
341
|
+
"tokens_used": response.tokens_used,
|
|
342
|
+
"cost_estimate": response.cost_estimate,
|
|
343
|
+
"context_id": context_dict.get("chat_id", "unknown")
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
except Exception as e:
|
|
347
|
+
logger.error(f"Task processing failed: {e}", exc_info=True)
|
|
348
|
+
|
|
349
|
+
# For testing/development, provide a mock response when AI provider is unavailable
|
|
350
|
+
error_str = str(e).lower()
|
|
351
|
+
if "api key not configured" in error_str or "providernotavailable" in error_str:
|
|
352
|
+
logger.warning("AI provider unavailable, using mock response for testing")
|
|
353
|
+
mock_content = f"Mock AI-generated content for prompt: {prompt[:100] if len(prompt) > 100 else prompt}..."
|
|
354
|
+
return {
|
|
355
|
+
"status": "completed",
|
|
356
|
+
"response": mock_content,
|
|
357
|
+
"provider": "mock",
|
|
358
|
+
"model": "mock-model",
|
|
359
|
+
"tokens_used": len(mock_content.split()),
|
|
360
|
+
"cost_estimate": 0.0,
|
|
361
|
+
"context_id": context_dict.get("chat_id", "unknown"),
|
|
362
|
+
"mock": True
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
return {
|
|
366
|
+
"status": "failed",
|
|
367
|
+
"error": str(e),
|
|
368
|
+
"context_id": task_context.chat_id if hasattr(task_context, 'chat_id') else "unknown"
|
|
369
|
+
}
|
|
370
|
+
|
|
213
371
|
async def _wait_for_task_completion(self, task_id: str, timeout: int = 300) -> Dict[str, Any]:
|
|
214
372
|
"""
|
|
215
373
|
Wait for task completion with timeout
|
aiecs/config/config.py
CHANGED
|
@@ -9,6 +9,8 @@ class Settings(BaseSettings):
|
|
|
9
9
|
vertex_project_id: str = Field(default="", alias="VERTEX_PROJECT_ID")
|
|
10
10
|
vertex_location: str = Field(default="us-central1", alias="VERTEX_LOCATION")
|
|
11
11
|
google_application_credentials: str = Field(default="", alias="GOOGLE_APPLICATION_CREDENTIALS")
|
|
12
|
+
google_api_key: str = Field(default="", alias="GOOGLE_API_KEY")
|
|
13
|
+
google_cse_id: str = Field(default="", alias="GOOGLE_CSE_ID")
|
|
12
14
|
xai_api_key: str = Field(default="", alias="XAI_API_KEY")
|
|
13
15
|
grok_api_key: str = Field(default="", alias="GROK_API_KEY") # Backward compatibility
|
|
14
16
|
|
|
@@ -40,6 +42,10 @@ class Settings(BaseSettings):
|
|
|
40
42
|
# Vector store backend selection (Qdrant deprecated, using Vertex AI by default)
|
|
41
43
|
vector_store_backend: str = Field("vertex", alias="VECTOR_STORE_BACKEND") # "vertex" (qdrant deprecated)
|
|
42
44
|
|
|
45
|
+
# Development/Server Configuration
|
|
46
|
+
reload: bool = Field(default=False, alias="RELOAD")
|
|
47
|
+
port: int = Field(default=8000, alias="PORT")
|
|
48
|
+
|
|
43
49
|
model_config = ConfigDict(env_file=".env", env_file_encoding="utf-8")
|
|
44
50
|
|
|
45
51
|
@property
|
aiecs/domain/__init__.py
CHANGED
|
@@ -11,6 +11,35 @@ from .context import (
|
|
|
11
11
|
ConversationParticipant, ConversationSession, AgentCommunicationMessage,
|
|
12
12
|
create_session_key, validate_conversation_isolation_pattern
|
|
13
13
|
)
|
|
14
|
+
from .community import (
|
|
15
|
+
# Core managers
|
|
16
|
+
CommunityManager, CommunityIntegration, DecisionEngine, ResourceManager,
|
|
17
|
+
CollaborativeWorkflowEngine, CommunityAnalytics, MemberLifecycleHooks,
|
|
18
|
+
|
|
19
|
+
# Communication and context
|
|
20
|
+
CommunicationHub, Message, Event, MessageType, EventType,
|
|
21
|
+
SharedContextManager, SharedContext, ContextScope, ContextConflictStrategy,
|
|
22
|
+
|
|
23
|
+
# Agent adapters
|
|
24
|
+
AgentAdapter, StandardLLMAdapter, CustomAgentAdapter, AgentAdapterRegistry, AgentCapability,
|
|
25
|
+
|
|
26
|
+
# Builder
|
|
27
|
+
CommunityBuilder, builder,
|
|
28
|
+
|
|
29
|
+
# Enums
|
|
30
|
+
CommunityRole, GovernanceType, DecisionStatus, ResourceType,
|
|
31
|
+
ConsensusAlgorithm, ConflictResolutionStrategy,
|
|
32
|
+
|
|
33
|
+
# Models
|
|
34
|
+
CommunityMember, CommunityResource, CommunityDecision, AgentCommunity, CollaborationSession,
|
|
35
|
+
|
|
36
|
+
# Exceptions
|
|
37
|
+
CommunityException, CommunityNotFoundError, MemberNotFoundError, ResourceNotFoundError,
|
|
38
|
+
DecisionNotFoundError, AccessDeniedError, MembershipError, VotingError, GovernanceError,
|
|
39
|
+
CollaborationError, CommunityInitializationError, CommunityValidationError,
|
|
40
|
+
QuorumNotMetError, ConflictResolutionError, CommunityCapacityError,
|
|
41
|
+
AgentAdapterError, CommunicationError, ContextError,
|
|
42
|
+
)
|
|
14
43
|
|
|
15
44
|
__all__ = [
|
|
16
45
|
# Execution domain
|
|
@@ -32,4 +61,70 @@ __all__ = [
|
|
|
32
61
|
"AgentCommunicationMessage",
|
|
33
62
|
"create_session_key",
|
|
34
63
|
"validate_conversation_isolation_pattern",
|
|
64
|
+
|
|
65
|
+
# Community domain - Core managers
|
|
66
|
+
"CommunityManager",
|
|
67
|
+
"CommunityIntegration",
|
|
68
|
+
"DecisionEngine",
|
|
69
|
+
"ResourceManager",
|
|
70
|
+
"CollaborativeWorkflowEngine",
|
|
71
|
+
"CommunityAnalytics",
|
|
72
|
+
"MemberLifecycleHooks",
|
|
73
|
+
|
|
74
|
+
# Community domain - Communication and context
|
|
75
|
+
"CommunicationHub",
|
|
76
|
+
"Message",
|
|
77
|
+
"Event",
|
|
78
|
+
"MessageType",
|
|
79
|
+
"EventType",
|
|
80
|
+
"SharedContextManager",
|
|
81
|
+
"SharedContext",
|
|
82
|
+
"ContextScope",
|
|
83
|
+
"ContextConflictStrategy",
|
|
84
|
+
|
|
85
|
+
# Community domain - Agent adapters
|
|
86
|
+
"AgentAdapter",
|
|
87
|
+
"StandardLLMAdapter",
|
|
88
|
+
"CustomAgentAdapter",
|
|
89
|
+
"AgentAdapterRegistry",
|
|
90
|
+
"AgentCapability",
|
|
91
|
+
|
|
92
|
+
# Community domain - Builder
|
|
93
|
+
"CommunityBuilder",
|
|
94
|
+
"builder",
|
|
95
|
+
|
|
96
|
+
# Community domain - Enums
|
|
97
|
+
"CommunityRole",
|
|
98
|
+
"GovernanceType",
|
|
99
|
+
"DecisionStatus",
|
|
100
|
+
"ResourceType",
|
|
101
|
+
"ConsensusAlgorithm",
|
|
102
|
+
"ConflictResolutionStrategy",
|
|
103
|
+
|
|
104
|
+
# Community domain - Models
|
|
105
|
+
"CommunityMember",
|
|
106
|
+
"CommunityResource",
|
|
107
|
+
"CommunityDecision",
|
|
108
|
+
"AgentCommunity",
|
|
109
|
+
"CollaborationSession",
|
|
110
|
+
|
|
111
|
+
# Community domain - Exceptions
|
|
112
|
+
"CommunityException",
|
|
113
|
+
"CommunityNotFoundError",
|
|
114
|
+
"MemberNotFoundError",
|
|
115
|
+
"ResourceNotFoundError",
|
|
116
|
+
"DecisionNotFoundError",
|
|
117
|
+
"AccessDeniedError",
|
|
118
|
+
"MembershipError",
|
|
119
|
+
"VotingError",
|
|
120
|
+
"GovernanceError",
|
|
121
|
+
"CollaborationError",
|
|
122
|
+
"CommunityInitializationError",
|
|
123
|
+
"CommunityValidationError",
|
|
124
|
+
"QuorumNotMetError",
|
|
125
|
+
"ConflictResolutionError",
|
|
126
|
+
"CommunityCapacityError",
|
|
127
|
+
"AgentAdapterError",
|
|
128
|
+
"CommunicationError",
|
|
129
|
+
"ContextError",
|
|
35
130
|
]
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Community Domain Module
|
|
3
|
+
|
|
4
|
+
Provides agent community collaboration features including governance,
|
|
5
|
+
resource sharing, decision-making, and collaborative workflows.
|
|
6
|
+
|
|
7
|
+
This module enables developers to:
|
|
8
|
+
- Create and manage agent communities
|
|
9
|
+
- Facilitate agent-to-agent communication
|
|
10
|
+
- Share resources and knowledge between agents
|
|
11
|
+
- Make collective decisions through various governance models
|
|
12
|
+
- Run collaborative workflows and sessions
|
|
13
|
+
|
|
14
|
+
Version: 1.0.0
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
__version__ = "1.0.0"
|
|
18
|
+
|
|
19
|
+
# Core managers
|
|
20
|
+
from .community_manager import CommunityManager, MemberLifecycleHooks
|
|
21
|
+
from .community_integration import CommunityIntegration
|
|
22
|
+
from .decision_engine import DecisionEngine, ConsensusAlgorithm, ConflictResolutionStrategy
|
|
23
|
+
from .resource_manager import ResourceManager
|
|
24
|
+
from .collaborative_workflow import CollaborativeWorkflowEngine
|
|
25
|
+
from .analytics import CommunityAnalytics
|
|
26
|
+
|
|
27
|
+
# Communication and context
|
|
28
|
+
from .communication_hub import (
|
|
29
|
+
CommunicationHub,
|
|
30
|
+
Message,
|
|
31
|
+
Event,
|
|
32
|
+
MessageType,
|
|
33
|
+
EventType,
|
|
34
|
+
)
|
|
35
|
+
from .shared_context_manager import (
|
|
36
|
+
SharedContextManager,
|
|
37
|
+
SharedContext,
|
|
38
|
+
ContextScope,
|
|
39
|
+
ConflictResolutionStrategy as ContextConflictStrategy,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# Agent adapters
|
|
43
|
+
from .agent_adapter import (
|
|
44
|
+
AgentAdapter,
|
|
45
|
+
StandardLLMAdapter,
|
|
46
|
+
CustomAgentAdapter,
|
|
47
|
+
AgentAdapterRegistry,
|
|
48
|
+
AgentCapability,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Builder
|
|
52
|
+
from .community_builder import CommunityBuilder, builder
|
|
53
|
+
|
|
54
|
+
# Models
|
|
55
|
+
from .models import (
|
|
56
|
+
CommunityRole,
|
|
57
|
+
GovernanceType,
|
|
58
|
+
DecisionStatus,
|
|
59
|
+
ResourceType,
|
|
60
|
+
CommunityMember,
|
|
61
|
+
CommunityResource,
|
|
62
|
+
CommunityDecision,
|
|
63
|
+
AgentCommunity,
|
|
64
|
+
CollaborationSession,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Exceptions
|
|
68
|
+
from .exceptions import (
|
|
69
|
+
CommunityException,
|
|
70
|
+
CommunityNotFoundError,
|
|
71
|
+
MemberNotFoundError,
|
|
72
|
+
ResourceNotFoundError,
|
|
73
|
+
DecisionNotFoundError,
|
|
74
|
+
AccessDeniedError,
|
|
75
|
+
MembershipError,
|
|
76
|
+
VotingError,
|
|
77
|
+
GovernanceError,
|
|
78
|
+
CollaborationError,
|
|
79
|
+
CommunityInitializationError,
|
|
80
|
+
CommunityValidationError,
|
|
81
|
+
QuorumNotMetError,
|
|
82
|
+
ConflictResolutionError,
|
|
83
|
+
CommunityCapacityError,
|
|
84
|
+
AgentAdapterError,
|
|
85
|
+
CommunicationError,
|
|
86
|
+
ContextError,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
__all__ = [
|
|
90
|
+
# Version
|
|
91
|
+
"__version__",
|
|
92
|
+
|
|
93
|
+
# Core managers
|
|
94
|
+
"CommunityManager",
|
|
95
|
+
"CommunityIntegration",
|
|
96
|
+
"DecisionEngine",
|
|
97
|
+
"ResourceManager",
|
|
98
|
+
"CollaborativeWorkflowEngine",
|
|
99
|
+
"CommunityAnalytics",
|
|
100
|
+
"MemberLifecycleHooks",
|
|
101
|
+
|
|
102
|
+
# Communication and context
|
|
103
|
+
"CommunicationHub",
|
|
104
|
+
"Message",
|
|
105
|
+
"Event",
|
|
106
|
+
"MessageType",
|
|
107
|
+
"EventType",
|
|
108
|
+
"SharedContextManager",
|
|
109
|
+
"SharedContext",
|
|
110
|
+
"ContextScope",
|
|
111
|
+
"ContextConflictStrategy",
|
|
112
|
+
|
|
113
|
+
# Agent adapters
|
|
114
|
+
"AgentAdapter",
|
|
115
|
+
"StandardLLMAdapter",
|
|
116
|
+
"CustomAgentAdapter",
|
|
117
|
+
"AgentAdapterRegistry",
|
|
118
|
+
"AgentCapability",
|
|
119
|
+
|
|
120
|
+
# Builder
|
|
121
|
+
"CommunityBuilder",
|
|
122
|
+
"builder",
|
|
123
|
+
|
|
124
|
+
# Enums
|
|
125
|
+
"CommunityRole",
|
|
126
|
+
"GovernanceType",
|
|
127
|
+
"DecisionStatus",
|
|
128
|
+
"ResourceType",
|
|
129
|
+
"ConsensusAlgorithm",
|
|
130
|
+
"ConflictResolutionStrategy",
|
|
131
|
+
|
|
132
|
+
# Models
|
|
133
|
+
"CommunityMember",
|
|
134
|
+
"CommunityResource",
|
|
135
|
+
"CommunityDecision",
|
|
136
|
+
"AgentCommunity",
|
|
137
|
+
"CollaborationSession",
|
|
138
|
+
|
|
139
|
+
# Exceptions
|
|
140
|
+
"CommunityException",
|
|
141
|
+
"CommunityNotFoundError",
|
|
142
|
+
"MemberNotFoundError",
|
|
143
|
+
"ResourceNotFoundError",
|
|
144
|
+
"DecisionNotFoundError",
|
|
145
|
+
"AccessDeniedError",
|
|
146
|
+
"MembershipError",
|
|
147
|
+
"VotingError",
|
|
148
|
+
"GovernanceError",
|
|
149
|
+
"CollaborationError",
|
|
150
|
+
"CommunityInitializationError",
|
|
151
|
+
"CommunityValidationError",
|
|
152
|
+
"QuorumNotMetError",
|
|
153
|
+
"ConflictResolutionError",
|
|
154
|
+
"CommunityCapacityError",
|
|
155
|
+
"AgentAdapterError",
|
|
156
|
+
"CommunicationError",
|
|
157
|
+
"ContextError",
|
|
158
|
+
]
|
|
159
|
+
|