empathy-framework 5.1.1__py3-none-any.whl → 5.3.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.
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/METADATA +79 -6
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/RECORD +83 -64
- empathy_os/__init__.py +1 -1
- empathy_os/cache/hybrid.py +5 -1
- empathy_os/cli/commands/batch.py +8 -0
- empathy_os/cli/commands/profiling.py +4 -0
- empathy_os/cli/commands/workflow.py +8 -4
- empathy_os/cli_router.py +9 -0
- empathy_os/config.py +15 -2
- empathy_os/core_modules/__init__.py +15 -0
- empathy_os/dashboard/simple_server.py +62 -30
- empathy_os/mcp/__init__.py +10 -0
- empathy_os/mcp/server.py +506 -0
- empathy_os/memory/control_panel.py +1 -131
- empathy_os/memory/control_panel_support.py +145 -0
- empathy_os/memory/encryption.py +159 -0
- empathy_os/memory/long_term.py +46 -631
- empathy_os/memory/long_term_types.py +99 -0
- empathy_os/memory/mixins/__init__.py +25 -0
- empathy_os/memory/mixins/backend_init_mixin.py +249 -0
- empathy_os/memory/mixins/capabilities_mixin.py +208 -0
- empathy_os/memory/mixins/handoff_mixin.py +208 -0
- empathy_os/memory/mixins/lifecycle_mixin.py +49 -0
- empathy_os/memory/mixins/long_term_mixin.py +352 -0
- empathy_os/memory/mixins/promotion_mixin.py +109 -0
- empathy_os/memory/mixins/short_term_mixin.py +182 -0
- empathy_os/memory/short_term.py +61 -12
- empathy_os/memory/simple_storage.py +302 -0
- empathy_os/memory/storage_backend.py +167 -0
- empathy_os/memory/types.py +8 -3
- empathy_os/memory/unified.py +21 -1120
- empathy_os/meta_workflows/cli_commands/__init__.py +56 -0
- empathy_os/meta_workflows/cli_commands/agent_commands.py +321 -0
- empathy_os/meta_workflows/cli_commands/analytics_commands.py +442 -0
- empathy_os/meta_workflows/cli_commands/config_commands.py +232 -0
- empathy_os/meta_workflows/cli_commands/memory_commands.py +182 -0
- empathy_os/meta_workflows/cli_commands/template_commands.py +354 -0
- empathy_os/meta_workflows/cli_commands/workflow_commands.py +382 -0
- empathy_os/meta_workflows/cli_meta_workflows.py +52 -1802
- empathy_os/models/telemetry/__init__.py +71 -0
- empathy_os/models/telemetry/analytics.py +594 -0
- empathy_os/models/telemetry/backend.py +196 -0
- empathy_os/models/telemetry/data_models.py +431 -0
- empathy_os/models/telemetry/storage.py +489 -0
- empathy_os/orchestration/__init__.py +35 -0
- empathy_os/orchestration/execution_strategies.py +481 -0
- empathy_os/orchestration/meta_orchestrator.py +488 -1
- empathy_os/routing/workflow_registry.py +36 -0
- empathy_os/telemetry/agent_coordination.py +2 -3
- empathy_os/telemetry/agent_tracking.py +26 -7
- empathy_os/telemetry/approval_gates.py +18 -24
- empathy_os/telemetry/cli.py +19 -724
- empathy_os/telemetry/commands/__init__.py +14 -0
- empathy_os/telemetry/commands/dashboard_commands.py +696 -0
- empathy_os/telemetry/event_streaming.py +7 -3
- empathy_os/telemetry/feedback_loop.py +28 -15
- empathy_os/tools.py +183 -0
- empathy_os/workflows/__init__.py +5 -0
- empathy_os/workflows/autonomous_test_gen.py +860 -161
- empathy_os/workflows/base.py +6 -2
- empathy_os/workflows/code_review.py +4 -1
- empathy_os/workflows/document_gen/__init__.py +25 -0
- empathy_os/workflows/document_gen/config.py +30 -0
- empathy_os/workflows/document_gen/report_formatter.py +162 -0
- empathy_os/workflows/{document_gen.py → document_gen/workflow.py} +5 -184
- empathy_os/workflows/output.py +4 -1
- empathy_os/workflows/progress.py +8 -2
- empathy_os/workflows/security_audit.py +2 -2
- empathy_os/workflows/security_audit_phase3.py +7 -4
- empathy_os/workflows/seo_optimization.py +633 -0
- empathy_os/workflows/test_gen/__init__.py +52 -0
- empathy_os/workflows/test_gen/ast_analyzer.py +249 -0
- empathy_os/workflows/test_gen/config.py +88 -0
- empathy_os/workflows/test_gen/data_models.py +38 -0
- empathy_os/workflows/test_gen/report_formatter.py +289 -0
- empathy_os/workflows/test_gen/test_templates.py +381 -0
- empathy_os/workflows/test_gen/workflow.py +655 -0
- empathy_os/workflows/test_gen.py +42 -1905
- empathy_os/cli/parsers/cache 2.py +0 -65
- empathy_os/cli_router 2.py +0 -416
- empathy_os/dashboard/app 2.py +0 -512
- empathy_os/dashboard/simple_server 2.py +0 -403
- empathy_os/dashboard/standalone_server 2.py +0 -536
- empathy_os/memory/types 2.py +0 -441
- empathy_os/models/adaptive_routing 2.py +0 -437
- empathy_os/models/telemetry.py +0 -1660
- empathy_os/project_index/scanner_parallel 2.py +0 -291
- empathy_os/telemetry/agent_coordination 2.py +0 -478
- empathy_os/telemetry/agent_tracking 2.py +0 -350
- empathy_os/telemetry/approval_gates 2.py +0 -563
- empathy_os/telemetry/event_streaming 2.py +0 -405
- empathy_os/telemetry/feedback_loop 2.py +0 -557
- empathy_os/vscode_bridge 2.py +0 -173
- empathy_os/workflows/progressive/__init__ 2.py +0 -92
- empathy_os/workflows/progressive/cli 2.py +0 -242
- empathy_os/workflows/progressive/core 2.py +0 -488
- empathy_os/workflows/progressive/orchestrator 2.py +0 -701
- empathy_os/workflows/progressive/reports 2.py +0 -528
- empathy_os/workflows/progressive/telemetry 2.py +0 -280
- empathy_os/workflows/progressive/test_gen 2.py +0 -514
- empathy_os/workflows/progressive/workflow 2.py +0 -628
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/WHEEL +0 -0
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/entry_points.txt +0 -0
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/licenses/LICENSE +0 -0
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/licenses/LICENSE_CHANGE_ANNOUNCEMENT.md +0 -0
- {empathy_framework-5.1.1.dist-info → empathy_framework-5.3.0.dist-info}/top_level.txt +0 -0
empathy_os/cli_router.py
CHANGED
|
@@ -101,6 +101,14 @@ class HybridRouter:
|
|
|
101
101
|
"explain": ("docs", "explain"),
|
|
102
102
|
"document": ("docs", "generate"),
|
|
103
103
|
"overview": ("docs", "overview"),
|
|
104
|
+
"docs-seo": ("workflows", "run seo-optimization --mode audit"),
|
|
105
|
+
# SEO commands → /workflows skill
|
|
106
|
+
"seo": ("workflows", "run seo-optimization --mode audit"),
|
|
107
|
+
"seo-audit": ("workflows", "run seo-optimization --mode audit"),
|
|
108
|
+
"seo-optimize": ("workflows", "run seo-optimization --mode fix"),
|
|
109
|
+
"optimize-seo": ("workflows", "run seo-optimization --mode suggest"),
|
|
110
|
+
"meta-tags": ("workflows", "run seo-optimization --mode audit"),
|
|
111
|
+
"check-seo": ("workflows", "run seo-optimization --mode audit"),
|
|
104
112
|
# Plan commands → /plan skill
|
|
105
113
|
"plan": ("plan", ""),
|
|
106
114
|
"tdd": ("plan", "tdd"),
|
|
@@ -340,6 +348,7 @@ class HybridRouter:
|
|
|
340
348
|
"code-review": ("dev", "review"),
|
|
341
349
|
"test-gen": ("testing", "gen"),
|
|
342
350
|
"perf-audit": ("workflows", "run perf-audit"),
|
|
351
|
+
"seo-optimization": ("workflows", "run seo-optimization"),
|
|
343
352
|
"commit": ("dev", "commit"),
|
|
344
353
|
"refactor": ("dev", "refactor"),
|
|
345
354
|
"debug": ("dev", "debug"),
|
empathy_os/config.py
CHANGED
|
@@ -61,9 +61,22 @@ def _validate_file_path(path: str, allowed_dir: str | None = None) -> Path:
|
|
|
61
61
|
raise ValueError(f"path must be within {allowed_dir}")
|
|
62
62
|
|
|
63
63
|
# Check for dangerous system paths
|
|
64
|
-
|
|
64
|
+
# Note: On macOS, /etc is a symlink to /private/etc, so we check both
|
|
65
|
+
dangerous_paths = [
|
|
66
|
+
"/etc",
|
|
67
|
+
"/sys",
|
|
68
|
+
"/proc",
|
|
69
|
+
"/dev",
|
|
70
|
+
"/private/etc", # macOS: /etc -> /private/etc
|
|
71
|
+
"/private/var/root", # macOS: root's home directory
|
|
72
|
+
"/usr/bin", # System binaries
|
|
73
|
+
"/usr/sbin", # System admin binaries
|
|
74
|
+
"/bin", # Essential binaries
|
|
75
|
+
"/sbin", # System binaries
|
|
76
|
+
]
|
|
77
|
+
resolved_str = str(resolved)
|
|
65
78
|
for dangerous in dangerous_paths:
|
|
66
|
-
if
|
|
79
|
+
if resolved_str.startswith(dangerous + "/") or resolved_str == dangerous:
|
|
67
80
|
raise ValueError(f"Cannot write to system directory: {dangerous}")
|
|
68
81
|
|
|
69
82
|
return resolved
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Core EmpathyOS Modules.
|
|
2
|
+
|
|
3
|
+
Modular implementation of EmpathyOS functionality.
|
|
4
|
+
|
|
5
|
+
Copyright 2025 Smart AI Memory, LLC
|
|
6
|
+
Licensed under Fair Source 0.9
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
# Core classes
|
|
10
|
+
from ..core import CollaborationState, EmpathyOS
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"EmpathyOS",
|
|
14
|
+
"CollaborationState",
|
|
15
|
+
]
|
|
@@ -39,6 +39,8 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
39
39
|
# Route requests
|
|
40
40
|
if path == "/" or path == "/index.html":
|
|
41
41
|
self.serve_file("index.html", "text/html")
|
|
42
|
+
elif path == "/test.html":
|
|
43
|
+
self.serve_file("test.html", "text/html")
|
|
42
44
|
elif path == "/static/style.css":
|
|
43
45
|
self.serve_file("style.css", "text/css")
|
|
44
46
|
elif path == "/static/app.js":
|
|
@@ -132,12 +134,15 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
132
134
|
def api_health(self):
|
|
133
135
|
"""System health endpoint."""
|
|
134
136
|
try:
|
|
135
|
-
|
|
136
|
-
has_redis = coordinator.memory is not None
|
|
137
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
137
138
|
|
|
139
|
+
memory = RedisShortTermMemory()
|
|
140
|
+
has_redis = memory._client is not None
|
|
141
|
+
|
|
142
|
+
coordinator = HeartbeatCoordinator(memory=memory)
|
|
138
143
|
active_agents = len(coordinator.get_active_agents()) if has_redis else 0
|
|
139
144
|
|
|
140
|
-
gate = ApprovalGate()
|
|
145
|
+
gate = ApprovalGate(memory=memory)
|
|
141
146
|
pending_approvals = len(gate.get_pending_approvals()) if has_redis else 0
|
|
142
147
|
|
|
143
148
|
self.send_json(
|
|
@@ -155,22 +160,24 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
155
160
|
def api_agents(self):
|
|
156
161
|
"""List active agents."""
|
|
157
162
|
try:
|
|
158
|
-
|
|
163
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
164
|
+
|
|
165
|
+
memory = RedisShortTermMemory()
|
|
166
|
+
coordinator = HeartbeatCoordinator(memory=memory)
|
|
159
167
|
active_agents = coordinator.get_active_agents()
|
|
160
168
|
|
|
161
169
|
result = []
|
|
162
|
-
for
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
)
|
|
170
|
+
for agent in active_agents:
|
|
171
|
+
result.append(
|
|
172
|
+
{
|
|
173
|
+
"agent_id": agent.agent_id,
|
|
174
|
+
"display_name": agent.display_name,
|
|
175
|
+
"status": agent.status,
|
|
176
|
+
"last_seen": agent.last_beat.isoformat(),
|
|
177
|
+
"progress": agent.progress,
|
|
178
|
+
"current_task": agent.current_task,
|
|
179
|
+
}
|
|
180
|
+
)
|
|
174
181
|
|
|
175
182
|
self.send_json(result)
|
|
176
183
|
except Exception as e:
|
|
@@ -180,8 +187,11 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
180
187
|
def api_agent_detail(self, agent_id: str):
|
|
181
188
|
"""Get specific agent details."""
|
|
182
189
|
try:
|
|
183
|
-
|
|
184
|
-
|
|
190
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
191
|
+
|
|
192
|
+
memory = RedisShortTermMemory()
|
|
193
|
+
coordinator = HeartbeatCoordinator(memory=memory)
|
|
194
|
+
heartbeat = coordinator.get_agent_status(agent_id)
|
|
185
195
|
|
|
186
196
|
if not heartbeat:
|
|
187
197
|
self.send_json({"error": f"Agent {agent_id} not found"}, status=404)
|
|
@@ -189,9 +199,9 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
189
199
|
|
|
190
200
|
self.send_json(
|
|
191
201
|
{
|
|
192
|
-
"agent_id": agent_id,
|
|
202
|
+
"agent_id": heartbeat.agent_id,
|
|
193
203
|
"status": heartbeat.status,
|
|
194
|
-
"last_seen": heartbeat.
|
|
204
|
+
"last_seen": heartbeat.last_beat.isoformat(),
|
|
195
205
|
"progress": heartbeat.progress,
|
|
196
206
|
"current_task": heartbeat.current_task,
|
|
197
207
|
"metadata": heartbeat.metadata,
|
|
@@ -203,8 +213,12 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
203
213
|
def api_signals(self, limit: int):
|
|
204
214
|
"""Get recent coordination signals."""
|
|
205
215
|
try:
|
|
206
|
-
|
|
207
|
-
|
|
216
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
217
|
+
|
|
218
|
+
memory = RedisShortTermMemory()
|
|
219
|
+
# Use broadcast target to get all signals (not just for dashboard)
|
|
220
|
+
signals = CoordinationSignals(memory=memory, agent_id="*")
|
|
221
|
+
recent = signals.get_pending_signals()[:limit]
|
|
208
222
|
|
|
209
223
|
result = [
|
|
210
224
|
{
|
|
@@ -225,15 +239,18 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
225
239
|
def api_events(self, event_type: str | None, limit: int):
|
|
226
240
|
"""Get recent events."""
|
|
227
241
|
try:
|
|
228
|
-
|
|
242
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
243
|
+
|
|
244
|
+
memory = RedisShortTermMemory()
|
|
245
|
+
streamer = EventStreamer(memory=memory)
|
|
229
246
|
|
|
230
247
|
if event_type:
|
|
231
|
-
events = list(streamer.get_recent_events(event_type,
|
|
248
|
+
events = list(streamer.get_recent_events(event_type, count=limit))
|
|
232
249
|
else:
|
|
233
250
|
# Get events from multiple streams
|
|
234
251
|
all_events = []
|
|
235
252
|
for evt_type in ["agent_heartbeat", "coordination_signal", "workflow_progress"]:
|
|
236
|
-
events = list(streamer.get_recent_events(evt_type,
|
|
253
|
+
events = list(streamer.get_recent_events(evt_type, count=20))
|
|
237
254
|
all_events.extend(events)
|
|
238
255
|
|
|
239
256
|
all_events.sort(key=lambda e: e.timestamp, reverse=True)
|
|
@@ -258,7 +275,10 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
258
275
|
def api_approvals(self):
|
|
259
276
|
"""Get pending approvals."""
|
|
260
277
|
try:
|
|
261
|
-
|
|
278
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
279
|
+
|
|
280
|
+
memory = RedisShortTermMemory()
|
|
281
|
+
gate = ApprovalGate(memory=memory)
|
|
262
282
|
pending = gate.get_pending_approvals()
|
|
263
283
|
|
|
264
284
|
result = [
|
|
@@ -281,7 +301,10 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
281
301
|
def api_approve(self, request_id: str, reason: str):
|
|
282
302
|
"""Approve request."""
|
|
283
303
|
try:
|
|
284
|
-
|
|
304
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
305
|
+
|
|
306
|
+
memory = RedisShortTermMemory()
|
|
307
|
+
gate = ApprovalGate(memory=memory)
|
|
285
308
|
success = gate.respond_to_approval(
|
|
286
309
|
request_id=request_id, approved=True, responder="dashboard", reason=reason
|
|
287
310
|
)
|
|
@@ -296,7 +319,10 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
296
319
|
def api_reject(self, request_id: str, reason: str):
|
|
297
320
|
"""Reject request."""
|
|
298
321
|
try:
|
|
299
|
-
|
|
322
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
323
|
+
|
|
324
|
+
memory = RedisShortTermMemory()
|
|
325
|
+
gate = ApprovalGate(memory=memory)
|
|
300
326
|
success = gate.respond_to_approval(
|
|
301
327
|
request_id=request_id, approved=False, responder="dashboard", reason=reason
|
|
302
328
|
)
|
|
@@ -311,7 +337,10 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
311
337
|
def api_feedback_workflows(self):
|
|
312
338
|
"""Get workflow quality metrics."""
|
|
313
339
|
try:
|
|
314
|
-
|
|
340
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
341
|
+
|
|
342
|
+
memory = RedisShortTermMemory()
|
|
343
|
+
feedback = FeedbackLoop(memory=memory)
|
|
315
344
|
|
|
316
345
|
workflows = ["code-review", "test-generation", "refactoring"]
|
|
317
346
|
results = []
|
|
@@ -340,7 +369,10 @@ class DashboardHandler(BaseHTTPRequestHandler):
|
|
|
340
369
|
def api_underperforming(self, threshold: float):
|
|
341
370
|
"""Get underperforming stages."""
|
|
342
371
|
try:
|
|
343
|
-
|
|
372
|
+
from empathy_os.memory.short_term import RedisShortTermMemory
|
|
373
|
+
|
|
374
|
+
memory = RedisShortTermMemory()
|
|
375
|
+
feedback = FeedbackLoop(memory=memory)
|
|
344
376
|
|
|
345
377
|
workflows = ["code-review", "test-generation", "refactoring"]
|
|
346
378
|
all_underperforming = []
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Empathy Framework MCP Server.
|
|
2
|
+
|
|
3
|
+
Model Context Protocol integration for Claude Code.
|
|
4
|
+
Exposes Empathy workflows, agents, and telemetry as MCP tools.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
__version__ = "5.1.1"
|
|
8
|
+
__all__ = ["EmpathyMCPServer", "create_server"]
|
|
9
|
+
|
|
10
|
+
from empathy_os.mcp.server import EmpathyMCPServer, create_server
|