Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions DESIGN_SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -2318,10 +2318,17 @@ ai-company/
│ │ ├── meeting_engine.py # Meeting coordination (M4)
│ │ └── hr_engine.py # Hiring, firing, performance (M7)
│ ├── communication/ # Inter-agent communication
│ │ ├── bus_memory.py # InMemoryMessageBus implementation
│ │ ├── bus_protocol.py # MessageBus protocol interface
│ │ ├── channel.py # Channel model
│ │ ├── message.py # Message model
│ │ ├── config.py # Communication config
│ │ └── enums.py # Communication enums
│ │ ├── dispatcher.py # MessageDispatcher + DispatchResult
│ │ ├── enums.py # Communication enums
│ │ ├── errors.py # Communication error hierarchy
│ │ ├── handler.py # MessageHandler protocol, FunctionHandler, HandlerRegistration
│ │ ├── message.py # Message model
│ │ ├── messenger.py # AgentMessenger per-agent facade
│ │ └── subscription.py # Subscription + DeliveryEnvelope models
│ ├── memory/ # Agent memory system (M5, stubs only)
│ │ ├── store.py # Memory storage backend (M5)
│ │ ├── retrieval.py # Memory retrieval & ranking (M5)
Expand All @@ -2336,6 +2343,7 @@ ai-company/
│ │ ├── events/ # Per-domain event constants
│ │ │ ├── __init__.py # Package marker with usage docs; no re-exports
│ │ │ ├── budget.py # BUDGET_* constants
│ │ │ ├── communication.py # COMM_* constants
│ │ │ ├── config.py # CONFIG_* constants
│ │ │ ├── correlation.py # CORRELATION_* constants
│ │ │ ├── execution.py # EXECUTION_* constants
Expand Down
38 changes: 38 additions & 0 deletions src/ai_company/communication/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Communication domain models for the AI company framework."""

from ai_company.communication.bus_memory import InMemoryMessageBus
from ai_company.communication.bus_protocol import MessageBus
from ai_company.communication.channel import Channel
from ai_company.communication.config import (
CircuitBreakerConfig,
Expand All @@ -9,8 +11,10 @@
MeetingsConfig,
MeetingTypeConfig,
MessageBusConfig,
MessageRetentionConfig,
RateLimitConfig,
)
from ai_company.communication.dispatcher import DispatchResult, MessageDispatcher
from ai_company.communication.enums import (
AttachmentType,
ChannelType,
Expand All @@ -19,25 +23,59 @@
MessagePriority,
MessageType,
)
from ai_company.communication.errors import (
ChannelAlreadyExistsError,
ChannelNotFoundError,
CommunicationError,
MessageBusAlreadyRunningError,
MessageBusNotRunningError,
NotSubscribedError,
)
from ai_company.communication.handler import (
FunctionHandler,
HandlerRegistration,
MessageHandler,
MessageHandlerFunc,
)
from ai_company.communication.message import Attachment, Message, MessageMetadata
from ai_company.communication.messenger import AgentMessenger
from ai_company.communication.subscription import DeliveryEnvelope, Subscription

__all__ = [
"AgentMessenger",
"Attachment",
"AttachmentType",
"Channel",
"ChannelAlreadyExistsError",
"ChannelNotFoundError",
"ChannelType",
"CircuitBreakerConfig",
"CommunicationConfig",
"CommunicationError",
"CommunicationPattern",
"DeliveryEnvelope",
"DispatchResult",
"FunctionHandler",
"HandlerRegistration",
"HierarchyConfig",
"InMemoryMessageBus",
"LoopPreventionConfig",
"MeetingTypeConfig",
"MeetingsConfig",
"Message",
"MessageBus",
"MessageBusAlreadyRunningError",
"MessageBusBackend",
"MessageBusConfig",
"MessageBusNotRunningError",
"MessageDispatcher",
"MessageHandler",
"MessageHandlerFunc",
"MessageMetadata",
"MessagePriority",
"MessageRetentionConfig",
"MessageType",
"NotSubscribedError",
"RateLimitConfig",
"Subscription",
]
Loading