@@ -7,6 +7,207 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ## [ 5.0.0] - 2026-01-27
11+
12+ ### 🚨 Breaking Changes
13+
14+ ** Agent Coordination System Migration**
15+
16+ The legacy coordination system in ` ShortTermMemory ` has been removed in favor of the new, enhanced ` CoordinationSignals ` API. This migration provides better security, more features, and cleaner architecture.
17+
18+ ** What Changed:**
19+ - ❌ ** Removed:** ` ShortTermMemory.send_signal() ` and ` receive_signals() ` methods
20+ - ❌ ** Removed:** ` TTLStrategy.COORDINATION ` constant
21+ - ❌ ** Changed:** Redis key format: ` empathy:coord:* ` → ` empathy:signal:* `
22+ - ✅ ** New API:** ` empathy_os.telemetry.CoordinationSignals ` (Pattern 2 from Agent Coordination Architecture)
23+
24+ ** Migration Guide:**
25+
26+ ``` python
27+ # Before (v4.x - REMOVED):
28+ from empathy_os.memory import ShortTermMemory, AgentCredentials
29+
30+ memory = ShortTermMemory()
31+ credentials = AgentCredentials(" agent-1" , AccessTier.CONTRIBUTOR )
32+ memory.send_signal(" task_complete" , {" status" : " done" }, credentials, target_agent = " agent-2" )
33+ signals = memory.receive_signals(credentials, signal_type = " task_complete" )
34+
35+ # After (v5.0 - NEW):
36+ from empathy_os.telemetry import CoordinationSignals
37+ from empathy_os.memory.types import AgentCredentials, AccessTier
38+
39+ coordinator = CoordinationSignals(agent_id = " agent-1" )
40+ credentials = AgentCredentials(" agent-1" , AccessTier.CONTRIBUTOR )
41+
42+ # Send signal (with permission check)
43+ coordinator.signal(
44+ signal_type = " task_complete" ,
45+ target_agent = " agent-2" ,
46+ payload = {" status" : " done" },
47+ credentials = credentials # Required for security
48+ )
49+
50+ # Receive signals
51+ signals = coordinator.get_pending_signals(signal_type = " task_complete" )
52+ ```
53+
54+ ** Benefits of Migration:**
55+ - ✅ ** Security:** Permission checks enforced (CONTRIBUTOR tier required)
56+ - ✅ ** Features:** Blocking wait with timeout, event streaming integration
57+ - ✅ ** Flexibility:** Per-signal TTL configuration (no fixed 5-minute limit)
58+ - ✅ ** Type Safety:** Structured ` CoordinationSignal ` dataclass with validation
59+ - ✅ ** Consistency:** Unified ` empathy: ` key namespace across framework
60+
61+ ### Added
62+
63+ ** Agent Coordination Patterns (Patterns 1-6)**
64+
65+ Complete implementation of agent coordination patterns for multi-agent workflows:
66+
67+ - ** Pattern 1: Heartbeat Tracking** (` HeartbeatCoordinator ` )
68+ - TTL-based agent liveness monitoring (30s heartbeat expiration)
69+ - Track agent status, progress, and current task
70+ - Detect stale/failed agents automatically
71+ - Files: ` src/empathy_os/telemetry/agent_tracking.py `
72+
73+ - ** Pattern 2: Coordination Signals** (` CoordinationSignals ` )
74+ - TTL-based inter-agent communication (60s default TTL)
75+ - Send targeted signals or broadcast to all agents
76+ - Blocking wait with timeout support
77+ - Permission enforcement (CONTRIBUTOR tier required)
78+ - Files: ` src/empathy_os/telemetry/agent_coordination.py `
79+
80+ - ** Pattern 4: Event Streaming** (` EventStreamer ` )
81+ - Real-time event streaming via Redis Streams
82+ - Publish workflow events for monitoring/audit
83+ - Subscribe with consumer groups
84+ - Files: ` src/empathy_os/telemetry/event_streaming.py `
85+
86+ - ** Pattern 5: Approval Gates** (` ApprovalGate ` )
87+ - Human-in-the-loop workflow control
88+ - Block workflow execution pending approval
89+ - Timeout handling for abandoned requests
90+ - Files: ` src/empathy_os/telemetry/approval_gates.py `
91+
92+ - ** Pattern 6: Quality Feedback Loop** (` FeedbackLoop ` )
93+ - Record quality scores per workflow/stage/tier
94+ - Automatic tier upgrade recommendations (quality < 0.7)
95+ - Adaptive routing based on historical performance
96+ - Files: ` src/empathy_os/telemetry/feedback_loop.py `
97+
98+ ** Agent Coordination Dashboard**
99+
100+ Web-based dashboard for real-time monitoring of all 6 coordination patterns:
101+
102+ - ** Zero-Dependency Design:** Uses Python stdlib ` http.server ` (no Flask/FastAPI required)
103+ - ** Three Implementation Tiers:**
104+ - Standalone: Direct Redis access (recommended)
105+ - Simple: Uses telemetry API classes
106+ - FastAPI: Advanced features (optional dependency)
107+ - ** Real-Time Updates:** Auto-refresh every 5 seconds
108+ - ** 7 Dashboard Panels:**
109+ - Active agents with heartbeat status
110+ - Coordination signals between agents
111+ - Event stream (real-time events)
112+ - Pending approval requests
113+ - Quality metrics by workflow/stage/tier
114+ - Underperforming stages (quality < 0.7)
115+ - System health status
116+ - ** CLI Integration:** ` empathy dashboard start [--host HOST] [--port PORT] `
117+ - ** VS Code Task:** ` Cmd+Shift+B ` to start dashboard and auto-open browser
118+ - ** Files:** ` src/empathy_os/dashboard/{standalone_server.py,simple_server.py,app.py,static/} `
119+
120+ ** Adaptive Model Routing**
121+
122+ Telemetry-based model selection for cost optimization:
123+
124+ - ** AdaptiveModelRouter:** Analyzes historical performance data
125+ - ** Auto-Upgrade:** Recommends tier upgrade when failure rate > 20%
126+ - ** Quality Tracking:** Per-workflow/stage/tier success rate monitoring
127+ - ** Workflow Integration:** ` enable_adaptive_routing=True ` parameter
128+ - ** CLI Commands:** ` empathy telemetry routing-stats ` , ` routing-check `
129+ - ** Files:** ` src/empathy_os/models/adaptive_routing.py `
130+
131+ ** Enhanced Telemetry CLI**
132+
133+ New commands for coordination and routing monitoring:
134+
135+ ``` bash
136+ empathy telemetry routing-stats [--workflow NAME] [--stage NAME] [--days N]
137+ empathy telemetry routing-check [--workflow NAME] [--threshold 0.7]
138+ empathy telemetry models [--days N]
139+ empathy telemetry agents [--status running| idle| failed]
140+ empathy telemetry signals --agent AGENT_ID [--type TYPE]
141+ ```
142+
143+ ** Comprehensive Documentation**
144+
145+ - ` docs/AGENT_COORDINATION_ARCHITECTURE.md ` - Pattern architecture (6 patterns)
146+ - ` docs/DASHBOARD_COMPLETE.md ` - Dashboard reference guide (500+ lines)
147+ - ` docs/DASHBOARD_GUIDE.md ` - Usage guide with examples
148+ - ` docs/DASHBOARD_USAGE.md ` - 5 methods to start dashboard
149+ - ` docs/ADAPTIVE_ROUTING_ANTHROPIC_NATIVE.md ` - Model selection guide
150+ - ` DASHBOARD_QUICKSTART.md ` - 3-command quick start
151+
152+ ### Changed
153+
154+ ** Improved Test Data**
155+
156+ Test data now uses descriptive agent names for better UX:
157+
158+ - ** Workflow Agents:** ` code-review ` , ` test-generation ` , ` security-audit ` , ` refactoring ` , ` bug-predict `
159+ - ** Role Agents:** ` orchestrator ` , ` validator ` , ` monitor `
160+ - Makes dashboard immediately understandable
161+ - Professional demo/screenshot appearance
162+ - File: ` scripts/populate_redis_direct.py `
163+
164+ ** Redis Key Namespace Unification**
165+
166+ All agent coordination keys now use consistent ` empathy: ` prefix:
167+
168+ - Signals: ` empathy:signal:{target}:{type}:{id} ` (was ` signal:* ` )
169+ - Maintains consistency with other keys: ` empathy:working:* ` , ` empathy:staged:* ` , etc.
170+
171+ ** Workflow Base Class Enhancements**
172+
173+ New opt-in features for workflows:
174+
175+ ``` python
176+ workflow = MyWorkflow(
177+ enable_adaptive_routing = True , # Pattern 3: Adaptive tier selection
178+ enable_heartbeat_tracking = True , # Pattern 1: Agent liveness
179+ enable_coordination = True , # Pattern 2: Inter-agent signals
180+ agent_id = " my-workflow-abc123" # Custom agent ID
181+ )
182+ ```
183+
184+ ### Fixed
185+
186+ ** Security:** Permission enforcement restored in coordination system
187+ - All coordination signals require CONTRIBUTOR tier or higher
188+ - Prevents unauthorized agent communication
189+ - Backward compatible (warns if credentials not provided)
190+
191+ ### Testing
192+
193+ ** Comprehensive Test Suite:**
194+ - ✅ 280 telemetry tests passing (including 8 new permission tests)
195+ - ✅ Pattern 1-6 tests (19 heartbeat, 28 coordination, 24 feedback, etc.)
196+ - ✅ Dashboard integration tests
197+ - ✅ Permission enforcement tests (OBSERVER blocked, CONTRIBUTOR allowed)
198+ - ✅ Key format migration verified
199+
200+ ** Test Files:**
201+ - ` tests/unit/telemetry/test_agent_tracking.py ` (19 tests)
202+ - ` tests/unit/telemetry/test_agent_coordination.py ` (28 tests, including 8 permission tests)
203+ - ` tests/unit/telemetry/test_event_streaming.py `
204+ - ` tests/unit/telemetry/test_approval_gates.py `
205+ - ` tests/unit/telemetry/test_feedback_loop.py ` (24 tests)
206+
207+ ### Deprecated
208+
209+ None (deprecated features removed in this major version)
210+
10211## [ 4.9.0] - 2026-01-27
11212
12213### 🚀 Performance & Memory Optimization Release
0 commit comments