empathy-framework 3.9.3__py3-none-any.whl → 3.10.1__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-3.9.3.dist-info → empathy_framework-3.10.1.dist-info}/METADATA +37 -5
- {empathy_framework-3.9.3.dist-info → empathy_framework-3.10.1.dist-info}/RECORD +12 -12
- empathy_os/cache/hybrid.py +69 -9
- empathy_os/cli.py +183 -18
- empathy_os/cli_unified.py +28 -3
- empathy_os/models/telemetry.py +900 -2
- empathy_os/workflows/health_check.py +37 -0
- empathy_os/workflows/new_sample_workflow1.py +3 -3
- {empathy_framework-3.9.3.dist-info → empathy_framework-3.10.1.dist-info}/WHEEL +0 -0
- {empathy_framework-3.9.3.dist-info → empathy_framework-3.10.1.dist-info}/entry_points.txt +0 -0
- {empathy_framework-3.9.3.dist-info → empathy_framework-3.10.1.dist-info}/licenses/LICENSE +0 -0
- {empathy_framework-3.9.3.dist-info → empathy_framework-3.10.1.dist-info}/top_level.txt +0 -0
|
@@ -87,6 +87,7 @@ class HealthCheckWorkflow(BaseWorkflow):
|
|
|
87
87
|
check_tests: bool = True,
|
|
88
88
|
check_deps: bool = True,
|
|
89
89
|
xml_prompts: bool = True,
|
|
90
|
+
health_score_threshold: int = 95,
|
|
90
91
|
**kwargs: Any,
|
|
91
92
|
):
|
|
92
93
|
"""Initialize health check workflow.
|
|
@@ -98,6 +99,8 @@ class HealthCheckWorkflow(BaseWorkflow):
|
|
|
98
99
|
check_tests: Run test checks
|
|
99
100
|
check_deps: Run dependency checks
|
|
100
101
|
xml_prompts: Use XML-enhanced prompts
|
|
102
|
+
health_score_threshold: Minimum health score required (0-100, default: 95)
|
|
103
|
+
100 = perfect health, 95 = very strict (default), 80 = moderate
|
|
101
104
|
**kwargs: Additional arguments passed to BaseWorkflow
|
|
102
105
|
|
|
103
106
|
"""
|
|
@@ -108,6 +111,7 @@ class HealthCheckWorkflow(BaseWorkflow):
|
|
|
108
111
|
self.check_tests = check_tests
|
|
109
112
|
self.check_deps = check_deps
|
|
110
113
|
self.xml_prompts = xml_prompts
|
|
114
|
+
self.health_score_threshold = health_score_threshold
|
|
111
115
|
self._crew: Any = None
|
|
112
116
|
self._crew_available = False
|
|
113
117
|
|
|
@@ -153,6 +157,39 @@ class HealthCheckWorkflow(BaseWorkflow):
|
|
|
153
157
|
return await self._fix(input_data, tier)
|
|
154
158
|
raise ValueError(f"Unknown stage: {stage_name}")
|
|
155
159
|
|
|
160
|
+
def validate_output(self, stage_output: dict) -> tuple[bool, str | None]:
|
|
161
|
+
"""Validate health check output quality.
|
|
162
|
+
|
|
163
|
+
For health-check workflow, we validate that:
|
|
164
|
+
1. Diagnosis data is present
|
|
165
|
+
2. Health score meets the configured threshold (default: 95 = very strict quality)
|
|
166
|
+
3. No critical execution errors occurred
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
stage_output: Output from diagnose or fix stage
|
|
170
|
+
|
|
171
|
+
Returns:
|
|
172
|
+
Tuple of (is_valid, failure_reason)
|
|
173
|
+
|
|
174
|
+
"""
|
|
175
|
+
# First run parent validation (checks for empty output, errors)
|
|
176
|
+
is_valid, reason = super().validate_output(stage_output)
|
|
177
|
+
if not is_valid:
|
|
178
|
+
return False, reason
|
|
179
|
+
|
|
180
|
+
# Check diagnosis data exists
|
|
181
|
+
diagnosis = stage_output.get("diagnosis", {})
|
|
182
|
+
if not diagnosis:
|
|
183
|
+
return False, "diagnosis_missing"
|
|
184
|
+
|
|
185
|
+
# Check health score meets configured threshold
|
|
186
|
+
health_score = diagnosis.get("health_score", 0)
|
|
187
|
+
if health_score < self.health_score_threshold:
|
|
188
|
+
return False, "health_score_low"
|
|
189
|
+
|
|
190
|
+
# All validation passed
|
|
191
|
+
return True, None
|
|
192
|
+
|
|
156
193
|
async def _diagnose(self, input_data: dict, tier: ModelTier) -> tuple[dict, int, int]:
|
|
157
194
|
"""Run health diagnosis using HealthCheckCrew.
|
|
158
195
|
|
|
@@ -80,7 +80,7 @@ class NewSampleWorkflow1Workflow(BaseWorkflow):
|
|
|
80
80
|
|
|
81
81
|
"""
|
|
82
82
|
# TODO: Implement analyze logic
|
|
83
|
-
prompt = f"
|
|
83
|
+
prompt = f"analyze stage: {input_data}"
|
|
84
84
|
|
|
85
85
|
if self.executor:
|
|
86
86
|
result = await self.executor.execute(
|
|
@@ -107,7 +107,7 @@ class NewSampleWorkflow1Workflow(BaseWorkflow):
|
|
|
107
107
|
|
|
108
108
|
"""
|
|
109
109
|
# TODO: Implement process logic
|
|
110
|
-
prompt = f"
|
|
110
|
+
prompt = f"process stage: {input_data}"
|
|
111
111
|
|
|
112
112
|
if self.executor:
|
|
113
113
|
result = await self.executor.execute(
|
|
@@ -134,7 +134,7 @@ class NewSampleWorkflow1Workflow(BaseWorkflow):
|
|
|
134
134
|
|
|
135
135
|
"""
|
|
136
136
|
# TODO: Implement report logic
|
|
137
|
-
prompt = f"
|
|
137
|
+
prompt = f"report stage: {input_data}"
|
|
138
138
|
|
|
139
139
|
if self.executor:
|
|
140
140
|
result = await self.executor.execute(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|