empathy-framework 4.7.1__py3-none-any.whl → 4.9.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-4.7.1.dist-info → empathy_framework-4.9.0.dist-info}/METADATA +65 -2
- {empathy_framework-4.7.1.dist-info → empathy_framework-4.9.0.dist-info}/RECORD +69 -59
- {empathy_framework-4.7.1.dist-info → empathy_framework-4.9.0.dist-info}/WHEEL +1 -1
- {empathy_framework-4.7.1.dist-info → empathy_framework-4.9.0.dist-info}/entry_points.txt +2 -1
- {empathy_framework-4.7.1.dist-info → empathy_framework-4.9.0.dist-info}/top_level.txt +0 -1
- empathy_os/__init__.py +2 -0
- empathy_os/cli/__init__.py +128 -238
- empathy_os/cli/__main__.py +5 -33
- empathy_os/cli/commands/__init__.py +1 -8
- empathy_os/cli/commands/help.py +331 -0
- empathy_os/cli/commands/info.py +140 -0
- empathy_os/cli/commands/inspect.py +437 -0
- empathy_os/cli/commands/metrics.py +92 -0
- empathy_os/cli/commands/orchestrate.py +184 -0
- empathy_os/cli/commands/patterns.py +207 -0
- empathy_os/cli/commands/provider.py +93 -81
- empathy_os/cli/commands/setup.py +96 -0
- empathy_os/cli/commands/status.py +235 -0
- empathy_os/cli/commands/sync.py +166 -0
- empathy_os/cli/commands/tier.py +121 -0
- empathy_os/cli/commands/workflow.py +574 -0
- empathy_os/cli/parsers/__init__.py +62 -0
- empathy_os/cli/parsers/help.py +41 -0
- empathy_os/cli/parsers/info.py +26 -0
- empathy_os/cli/parsers/inspect.py +66 -0
- empathy_os/cli/parsers/metrics.py +42 -0
- empathy_os/cli/parsers/orchestrate.py +61 -0
- empathy_os/cli/parsers/patterns.py +54 -0
- empathy_os/cli/parsers/provider.py +40 -0
- empathy_os/cli/parsers/setup.py +42 -0
- empathy_os/cli/parsers/status.py +47 -0
- empathy_os/cli/parsers/sync.py +31 -0
- empathy_os/cli/parsers/tier.py +33 -0
- empathy_os/cli/parsers/workflow.py +77 -0
- empathy_os/cli/utils/__init__.py +1 -0
- empathy_os/cli/utils/data.py +242 -0
- empathy_os/cli/utils/helpers.py +68 -0
- empathy_os/{cli.py → cli_legacy.py} +0 -26
- empathy_os/cli_minimal.py +662 -0
- empathy_os/cli_router.py +384 -0
- empathy_os/cli_unified.py +13 -2
- empathy_os/memory/short_term.py +146 -414
- empathy_os/memory/types.py +441 -0
- empathy_os/memory/unified.py +61 -48
- empathy_os/models/fallback.py +1 -1
- empathy_os/models/provider_config.py +59 -344
- empathy_os/models/registry.py +27 -176
- empathy_os/monitoring/alerts.py +14 -20
- empathy_os/monitoring/alerts_cli.py +24 -7
- empathy_os/project_index/__init__.py +2 -0
- empathy_os/project_index/index.py +210 -5
- empathy_os/project_index/scanner.py +48 -16
- empathy_os/project_index/scanner_parallel.py +291 -0
- empathy_os/workflow_commands.py +9 -9
- empathy_os/workflows/__init__.py +31 -2
- empathy_os/workflows/base.py +295 -317
- empathy_os/workflows/bug_predict.py +10 -2
- empathy_os/workflows/builder.py +273 -0
- empathy_os/workflows/caching.py +253 -0
- empathy_os/workflows/code_review_pipeline.py +1 -0
- empathy_os/workflows/history.py +512 -0
- empathy_os/workflows/perf_audit.py +129 -23
- empathy_os/workflows/routing.py +163 -0
- empathy_os/workflows/secure_release.py +1 -0
- empathy_os/workflows/security_audit.py +1 -0
- empathy_os/workflows/security_audit_phase3.py +352 -0
- empathy_os/workflows/telemetry_mixin.py +269 -0
- empathy_os/workflows/test_gen.py +7 -7
- empathy_os/dashboard/__init__.py +0 -15
- empathy_os/dashboard/server.py +0 -941
- empathy_os/vscode_bridge 2.py +0 -173
- empathy_os/workflows/progressive/README 2.md +0 -454
- 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
- patterns/README.md +0 -119
- patterns/__init__.py +0 -95
- patterns/behavior.py +0 -298
- patterns/code_review_memory.json +0 -441
- patterns/core.py +0 -97
- patterns/debugging.json +0 -3763
- patterns/empathy.py +0 -268
- patterns/health_check_memory.json +0 -505
- patterns/input.py +0 -161
- patterns/memory_graph.json +0 -8
- patterns/refactoring_memory.json +0 -1113
- patterns/registry.py +0 -663
- patterns/security_memory.json +0 -8
- patterns/structural.py +0 -415
- patterns/validation.py +0 -194
- {empathy_framework-4.7.1.dist-info → empathy_framework-4.9.0.dist-info}/licenses/LICENSE +0 -0
empathy_os/workflow_commands.py
CHANGED
|
@@ -137,7 +137,7 @@ def morning_workflow(
|
|
|
137
137
|
print("-" * 40)
|
|
138
138
|
|
|
139
139
|
total_bugs = len(patterns.get("debugging", []))
|
|
140
|
-
resolved_bugs =
|
|
140
|
+
resolved_bugs = sum(1 for p in patterns.get("debugging", []) if p.get("status") == "resolved")
|
|
141
141
|
security_decisions = len(patterns.get("security", []))
|
|
142
142
|
|
|
143
143
|
print(f" Bug patterns: {total_bugs} ({resolved_bugs} resolved)")
|
|
@@ -207,14 +207,14 @@ def morning_workflow(
|
|
|
207
207
|
checks_passed += 1
|
|
208
208
|
print(" Lint: OK")
|
|
209
209
|
else:
|
|
210
|
-
issues =
|
|
210
|
+
issues = sum(1 for line in output.split("\n") if line.strip())
|
|
211
211
|
print(f" Lint: {issues} issues")
|
|
212
212
|
|
|
213
213
|
# Check for uncommitted changes
|
|
214
214
|
checks_total += 1
|
|
215
215
|
success, output = _run_command(["git", "status", "--porcelain"])
|
|
216
216
|
if success:
|
|
217
|
-
changes =
|
|
217
|
+
changes = sum(1 for line in output.split("\n") if line.strip())
|
|
218
218
|
if changes == 0:
|
|
219
219
|
checks_passed += 1
|
|
220
220
|
print(" Git: Clean")
|
|
@@ -312,7 +312,7 @@ def _run_security_only(project_root: str = ".", verbose: bool = False) -> int:
|
|
|
312
312
|
if not success or not output.strip():
|
|
313
313
|
print(" PASS - No obvious hardcoded secrets")
|
|
314
314
|
else:
|
|
315
|
-
lines =
|
|
315
|
+
lines = sum(1 for line in output.split("\n") if line.strip())
|
|
316
316
|
issues.append(f"Secrets: {lines} potential hardcoded secrets")
|
|
317
317
|
print(f" WARN - {lines} potential hardcoded values found")
|
|
318
318
|
|
|
@@ -322,7 +322,7 @@ def _run_security_only(project_root: str = ".", verbose: bool = False) -> int:
|
|
|
322
322
|
if not output.strip():
|
|
323
323
|
print(" PASS - No sensitive files tracked")
|
|
324
324
|
else:
|
|
325
|
-
files =
|
|
325
|
+
files = sum(1 for line in output.split("\n") if line.strip())
|
|
326
326
|
issues.append(f"Files: {files} sensitive files in git")
|
|
327
327
|
print(f" WARN - {files} sensitive files tracked in git")
|
|
328
328
|
|
|
@@ -427,10 +427,10 @@ def ship_workflow(
|
|
|
427
427
|
print("4. Checking git status...")
|
|
428
428
|
success, output = _run_command(["git", "status", "--porcelain"])
|
|
429
429
|
if success:
|
|
430
|
-
staged =
|
|
431
|
-
|
|
430
|
+
staged = sum(
|
|
431
|
+
1 for line in output.split("\n") if line.startswith(("A ", "M ", "D ", "R "))
|
|
432
432
|
)
|
|
433
|
-
unstaged =
|
|
433
|
+
unstaged = sum(1 for line in output.split("\n") if line.startswith((" M", " D", "??")))
|
|
434
434
|
if staged > 0:
|
|
435
435
|
print(f" INFO - {staged} staged, {unstaged} unstaged")
|
|
436
436
|
elif unstaged > 0:
|
|
@@ -523,7 +523,7 @@ def fix_all_workflow(project_root: str = ".", dry_run: bool = False, verbose: bo
|
|
|
523
523
|
print(f" Fixed {fixed} issues")
|
|
524
524
|
else:
|
|
525
525
|
# Some issues couldn't be auto-fixed
|
|
526
|
-
unfixable =
|
|
526
|
+
unfixable = sum(1 for line in output.split("\n") if "error" in line.lower())
|
|
527
527
|
print(f" {unfixable} issues require manual fix")
|
|
528
528
|
if verbose:
|
|
529
529
|
print(output)
|
empathy_os/workflows/__init__.py
CHANGED
|
@@ -84,6 +84,18 @@ from .base import (
|
|
|
84
84
|
from .config import DEFAULT_MODELS, ModelConfig, WorkflowConfig, create_example_config, get_model
|
|
85
85
|
from .step_config import WorkflowStepConfig, steps_from_tier_map, validate_step_config
|
|
86
86
|
|
|
87
|
+
# Routing strategies (small, frequently needed for builder pattern)
|
|
88
|
+
from .routing import (
|
|
89
|
+
BalancedRouting,
|
|
90
|
+
CostOptimizedRouting,
|
|
91
|
+
PerformanceOptimizedRouting,
|
|
92
|
+
RoutingContext,
|
|
93
|
+
TierRoutingStrategy,
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
# Builder pattern for workflow construction
|
|
97
|
+
from .builder import WorkflowBuilder, workflow_builder
|
|
98
|
+
|
|
87
99
|
# Lazy import mapping for workflow classes
|
|
88
100
|
_LAZY_WORKFLOW_IMPORTS: dict[str, tuple[str, str]] = {
|
|
89
101
|
# Core workflows
|
|
@@ -99,9 +111,15 @@ _LAZY_WORKFLOW_IMPORTS: dict[str, tuple[str, str]] = {
|
|
|
99
111
|
"KeyboardShortcutWorkflow": (".keyboard_shortcuts", "KeyboardShortcutWorkflow"),
|
|
100
112
|
"ManageDocumentationCrew": (".manage_documentation", "ManageDocumentationCrew"),
|
|
101
113
|
"ManageDocumentationCrewResult": (".manage_documentation", "ManageDocumentationCrewResult"),
|
|
102
|
-
"OrchestratedHealthCheckWorkflow": (
|
|
114
|
+
"OrchestratedHealthCheckWorkflow": (
|
|
115
|
+
".orchestrated_health_check",
|
|
116
|
+
"OrchestratedHealthCheckWorkflow",
|
|
117
|
+
),
|
|
103
118
|
"HealthCheckReport": (".orchestrated_health_check", "HealthCheckReport"),
|
|
104
|
-
"OrchestratedReleasePrepWorkflow": (
|
|
119
|
+
"OrchestratedReleasePrepWorkflow": (
|
|
120
|
+
".orchestrated_release_prep",
|
|
121
|
+
"OrchestratedReleasePrepWorkflow",
|
|
122
|
+
),
|
|
105
123
|
"ReleaseReadinessReport": (".orchestrated_release_prep", "ReleaseReadinessReport"),
|
|
106
124
|
"PerformanceAuditWorkflow": (".perf_audit", "PerformanceAuditWorkflow"),
|
|
107
125
|
"PRReviewWorkflow": (".pr_review", "PRReviewWorkflow"),
|
|
@@ -141,6 +159,7 @@ def _lazy_import_workflow(name: str) -> object:
|
|
|
141
159
|
|
|
142
160
|
# Import the module and get the attribute
|
|
143
161
|
import importlib
|
|
162
|
+
|
|
144
163
|
module = importlib.import_module(module_path, package="empathy_os.workflows")
|
|
145
164
|
attr = getattr(module, attr_name)
|
|
146
165
|
|
|
@@ -148,6 +167,7 @@ def _lazy_import_workflow(name: str) -> object:
|
|
|
148
167
|
_loaded_workflow_modules[cache_key] = attr
|
|
149
168
|
return attr
|
|
150
169
|
|
|
170
|
+
|
|
151
171
|
# Re-export CLI commands from workflow_commands.py (lazy loaded)
|
|
152
172
|
_parent_dir = os.path.dirname(os.path.dirname(__file__))
|
|
153
173
|
_workflows_module_path = os.path.join(_parent_dir, "workflow_commands.py")
|
|
@@ -420,6 +440,15 @@ __all__ = [
|
|
|
420
440
|
"WORKFLOW_REGISTRY",
|
|
421
441
|
# Base classes
|
|
422
442
|
"BaseWorkflow",
|
|
443
|
+
# Routing strategies
|
|
444
|
+
"TierRoutingStrategy",
|
|
445
|
+
"RoutingContext",
|
|
446
|
+
"CostOptimizedRouting",
|
|
447
|
+
"PerformanceOptimizedRouting",
|
|
448
|
+
"BalancedRouting",
|
|
449
|
+
# Builder pattern
|
|
450
|
+
"WorkflowBuilder",
|
|
451
|
+
"workflow_builder",
|
|
423
452
|
# New high-value workflows
|
|
424
453
|
"BugPredictionWorkflow",
|
|
425
454
|
# Code review crew integration (v3.1)
|