empathy-framework 4.0.2__py3-none-any.whl → 4.0.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: empathy-framework
3
- Version: 4.0.2
3
+ Version: 4.0.4
4
4
  Summary: AI collaboration framework with breakthrough meta-orchestration system enabling dynamic agent composition (6 composition patterns), intelligent caching (85% hit rate), tier routing (34-86% cost savings), performance optimizations (46% faster scans), XML-enhanced prompts, persistent memory, and multi-agent orchestration. Production workflows: Release Prep, Test Coverage Boost.
5
5
  Author-email: Patrick Roebuck <admin@smartaimemory.com>
6
6
  Maintainer-email: Smart-AI-Memory <admin@smartaimemory.com>
@@ -20,7 +20,7 @@ coach_wizards/refactoring_wizard.py,sha256=X0MTx3BHpOlOMAYDow-3HX5GyryY70JGAF5vA
20
20
  coach_wizards/scaling_wizard.py,sha256=n1RLtpWmj1RSEGSWssMiUPwCdpskO3z2Z3yhLlTdXro,2598
21
21
  coach_wizards/security_wizard.py,sha256=19SOClSxo6N-QqUc_QsFXOE7yEquiZF4kLi7jRomA7g,2605
22
22
  coach_wizards/testing_wizard.py,sha256=vKFgFG4uJfAVFmCIQbkrWNvZhIfLC6ve_XbvWZKrPg4,2563
23
- empathy_framework-4.0.2.dist-info/licenses/LICENSE,sha256=IJ9eeI5KSrD5P7alsn7sI_6_1bDihxBA5S4Sen4jf2k,4937
23
+ empathy_framework-4.0.4.dist-info/licenses/LICENSE,sha256=IJ9eeI5KSrD5P7alsn7sI_6_1bDihxBA5S4Sen4jf2k,4937
24
24
  empathy_healthcare_plugin/__init__.py,sha256=4NioL1_86UXzkd-QNkQZUSZ8rKTQGSP0TC9VXP32kQs,295
25
25
  empathy_healthcare_plugin/monitors/__init__.py,sha256=Udp8qfZR504QAq5_eQjvtIaE7v06Yguc7nuF40KllQc,196
26
26
  empathy_healthcare_plugin/monitors/clinical_protocol_monitor.py,sha256=MWE5t8tW9HWZn_SNo-inx8-0nhdTNGhbcB8ZeDWyXa0,11648
@@ -44,7 +44,7 @@ empathy_llm_toolkit/levels.py,sha256=Hu9G83iY-BRyjMJKNoDNYZ9xFD0Y0LIn_XEBc5aRWx0
44
44
  empathy_llm_toolkit/pattern_confidence.py,sha256=6plkrdDTb3GcjeNxohJlpeHnNWFRRcj5U76D2hvLSGA,14153
45
45
  empathy_llm_toolkit/pattern_resolver.py,sha256=VLTeGvEDfQyDwNy5u-t18A5c0BcCpp1FqdExxfqZSlw,9292
46
46
  empathy_llm_toolkit/pattern_summary.py,sha256=gA_rCXgfOT1Kp6FP5f1UZqXPp8_mkYXlAfTxc2lhOnc,12286
47
- empathy_llm_toolkit/providers.py,sha256=5yqWumb9zOwqTNoUu1ECafSgLgqMaNb0UQr4yu5G5aE,28334
47
+ empathy_llm_toolkit/providers.py,sha256=GA6ENQ4i36rkxxqc7Hr0quICoRDk-d14k3IwpB7hEVI,28596
48
48
  empathy_llm_toolkit/session_status.py,sha256=a8QPYf8Sp7jnzHkeRNOyXqoj0QwwoVwkvxPXW9qdvgc,25722
49
49
  empathy_llm_toolkit/state.py,sha256=diLXx8QKzfucVDhbKNWej40JXQFmIeM1Qvvzg92pmjU,8030
50
50
  empathy_llm_toolkit/agent_factory/__init__.py,sha256=Fxy-z9myQLTpn3fw2cDENItjzfq6SHuFK1PJ1lo9PaI,1471
@@ -617,9 +617,9 @@ empathy_os/optimization/context_optimizer.py,sha256=lPWXuG7K1OMVNZKOdQT2SlZhLfjM
617
617
  empathy_os/orchestration/__init__.py,sha256=BuIuXDQ2MWPOIkhVkjFCkKjbiDwAqCmrL096ou2NYFE,876
618
618
  empathy_os/orchestration/agent_templates.py,sha256=t8LxeqiTdgqYvW1BE8IXswAFamVTrScycb2VnG0qBCM,16283
619
619
  empathy_os/orchestration/config_store.py,sha256=TZLjzCr1g0nAP1eEZA9fMUy3OjF6XsWIQaJnX_PpLDY,16774
620
- empathy_os/orchestration/execution_strategies.py,sha256=FT7hw9fd7sCzsSDJQDjWaOab0rlmwZ7-iNYyL1S6898,26864
620
+ empathy_os/orchestration/execution_strategies.py,sha256=mMwunWgCiag-GejdMD6sfHHobwCkMFPp96E9pCBHa0s,26892
621
621
  empathy_os/orchestration/meta_orchestrator.py,sha256=lFyqXat7wULVzNkED2Uxst5Bol-JPOgUHU5U8LevIgM,21591
622
- empathy_os/orchestration/real_tools.py,sha256=zao5t0H5jIgreg0euujItwPN1sRzVvFTFaAo4br59Qs,31091
622
+ empathy_os/orchestration/real_tools.py,sha256=FC-nvuRv6ZMvub4IUuIrIlqXxmyX7URPX_SNLHLmHe4,31778
623
623
  empathy_os/orchestration/.mypy_cache/3.10/@plugins_snapshot.json,sha256=RBNvo1WzZ4oRRq0W9-hknpT7T8If536DEMBg9hyq_4o,2
624
624
  empathy_os/orchestration/.mypy_cache/3.10/__future__.data.json,sha256=SqqNnGvxtlPfSpapal-LKsRZXE6ofLatZraZ3Bt0Y-o,8664
625
625
  empathy_os/orchestration/.mypy_cache/3.10/__future__.meta.json,sha256=cNmz_rZqBL9AeasPgd57RSzR1vkqOGOLFiC-EIpMGZs,1677
@@ -4252,8 +4252,8 @@ workflow_scaffolding/__init__.py,sha256=UpX5vjjjPjIaAKyIV1D4GxJzLUZy5DzdzgSkePYM
4252
4252
  workflow_scaffolding/__main__.py,sha256=0qspuNoadTDqyskXTlT8Sahqau-XIxN35NHTSGVW6z4,236
4253
4253
  workflow_scaffolding/cli.py,sha256=yLgvMsPbqI-LHt7UKXMuj-Dc0-44EqWiChldysrw1YQ,6763
4254
4254
  workflow_scaffolding/generator.py,sha256=9eEmm324kVzf8BCtXEML090pyke06o0U7aGATzZIaPM,8869
4255
- empathy_framework-4.0.2.dist-info/METADATA,sha256=taEznXmBP4RuSzrLF_DCLPtlUBXalDl9T6TV5QACxJQ,53904
4256
- empathy_framework-4.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4257
- empathy_framework-4.0.2.dist-info/entry_points.txt,sha256=41rM9JgcKpkU8dr4VvPcbiPy2GQX68cEj10l3XMH0FQ,1519
4258
- empathy_framework-4.0.2.dist-info/top_level.txt,sha256=wrNU1aVMutVDACer58H-udv0P_171Dv6z_42sZtZ-xM,124
4259
- empathy_framework-4.0.2.dist-info/RECORD,,
4255
+ empathy_framework-4.0.4.dist-info/METADATA,sha256=dlRy10mnmGLCWP9UYPFSgehcNCjky9If1D9yQBntOYI,53904
4256
+ empathy_framework-4.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4257
+ empathy_framework-4.0.4.dist-info/entry_points.txt,sha256=41rM9JgcKpkU8dr4VvPcbiPy2GQX68cEj10l3XMH0FQ,1519
4258
+ empathy_framework-4.0.4.dist-info/top_level.txt,sha256=wrNU1aVMutVDACer58H-udv0P_171Dv6z_42sZtZ-xM,124
4259
+ empathy_framework-4.0.4.dist-info/RECORD,,
@@ -195,29 +195,32 @@ class AnthropicProvider(BaseLLMProvider):
195
195
 
196
196
  # Add cache performance metrics if available
197
197
  if hasattr(response.usage, "cache_creation_input_tokens"):
198
- cache_creation = response.usage.cache_creation_input_tokens
199
- cache_read = response.usage.cache_read_input_tokens
200
- metadata["cache_creation_tokens"] = cache_creation
201
- metadata["cache_read_tokens"] = cache_read
202
-
203
- # Log cache performance for monitoring with detailed cost savings
204
- # Cache reads cost 90% less than regular input tokens
205
- # Cache writes cost 25% more than regular input tokens
206
- if cache_read > 0:
207
- # Sonnet 4.5 input: $3/M tokens, cache read: $0.30/M tokens (90% discount)
208
- savings_per_token = 0.003 / 1000 * 0.9 # 90% of regular cost
209
- total_savings = cache_read * savings_per_token
210
- logger.info(
211
- f"Cache HIT: {cache_read:,} tokens read from cache "
212
- f"(saved ${total_savings:.4f} vs full price)"
213
- )
214
- if cache_creation > 0:
215
- # Cache write cost: $3.75/M tokens (25% markup)
216
- write_cost = cache_creation * 0.00375 / 1000
217
- logger.debug(
218
- f"Cache WRITE: {cache_creation:,} tokens written to cache "
219
- f"(cost ${write_cost:.4f})"
220
- )
198
+ cache_creation = getattr(response.usage, "cache_creation_input_tokens", 0)
199
+ cache_read = getattr(response.usage, "cache_read_input_tokens", 0)
200
+
201
+ # Ensure values are numeric (handle mock objects in tests)
202
+ if isinstance(cache_creation, int) and isinstance(cache_read, int):
203
+ metadata["cache_creation_tokens"] = cache_creation
204
+ metadata["cache_read_tokens"] = cache_read
205
+
206
+ # Log cache performance for monitoring with detailed cost savings
207
+ # Cache reads cost 90% less than regular input tokens
208
+ # Cache writes cost 25% more than regular input tokens
209
+ if cache_read > 0:
210
+ # Sonnet 4.5 input: $3/M tokens, cache read: $0.30/M tokens (90% discount)
211
+ savings_per_token = 0.003 / 1000 * 0.9 # 90% of regular cost
212
+ total_savings = cache_read * savings_per_token
213
+ logger.info(
214
+ f"Cache HIT: {cache_read:,} tokens read from cache "
215
+ f"(saved ${total_savings:.4f} vs full price)"
216
+ )
217
+ if cache_creation > 0:
218
+ # Cache write cost: $3.75/M tokens (25% markup)
219
+ write_cost = cache_creation * 0.00375 / 1000
220
+ logger.debug(
221
+ f"Cache WRITE: {cache_creation:,} tokens written to cache "
222
+ f"(cost ${write_cost:.4f})"
223
+ )
221
224
 
222
225
  # Add thinking content if present
223
226
  if thinking_content:
@@ -147,7 +147,7 @@ class ExecutionStrategy(ABC):
147
147
 
148
148
  elif agent.id == "test_coverage_analyzer" or "coverage" in agent.role.lower():
149
149
  analyzer = RealCoverageAnalyzer(project_root)
150
- report = analyzer.analyze(target_path)
150
+ report = analyzer.analyze() # Analyzes all packages automatically
151
151
 
152
152
  output = {
153
153
  "agent_role": agent.role,
@@ -72,11 +72,13 @@ class RealCoverageAnalyzer:
72
72
  """
73
73
  self.project_root = Path(project_root).resolve()
74
74
 
75
- def analyze(self, target_package: str = "src", use_existing: bool = True) -> CoverageReport:
76
- """Run coverage analysis on package.
75
+ def analyze(self, use_existing: bool = True) -> CoverageReport:
76
+ """Run coverage analysis on all project packages.
77
+
78
+ Analyzes coverage for: empathy_os, empathy_llm_toolkit,
79
+ empathy_software_plugin, empathy_healthcare_plugin
77
80
 
78
81
  Args:
79
- target_package: Package to analyze (default: src)
80
82
  use_existing: Use existing coverage.json if available (default: True)
81
83
 
82
84
  Returns:
@@ -85,7 +87,7 @@ class RealCoverageAnalyzer:
85
87
  Raises:
86
88
  RuntimeError: If coverage analysis fails
87
89
  """
88
- logger.info(f"Running coverage analysis on {target_package}")
90
+ logger.info("Running coverage analysis on all packages")
89
91
 
90
92
  coverage_file = self.project_root / "coverage.json"
91
93
 
@@ -107,10 +109,18 @@ class RealCoverageAnalyzer:
107
109
  try:
108
110
  # Run pytest with coverage on test suite
109
111
  logger.info("Running test suite to generate coverage (may take 2-5 minutes)")
112
+
113
+ # Use actual package names (match pyproject.toml configuration)
114
+ cov_packages = [
115
+ "empathy_os",
116
+ "empathy_llm_toolkit",
117
+ "empathy_software_plugin",
118
+ "empathy_healthcare_plugin",
119
+ ]
120
+
110
121
  cmd = [
111
122
  "pytest",
112
123
  "tests/", # Run all tests to measure coverage
113
- f"--cov={target_package}",
114
124
  "--cov-report=json",
115
125
  "--cov-report=term-missing",
116
126
  "-q",
@@ -118,6 +128,10 @@ class RealCoverageAnalyzer:
118
128
  "--maxfail=50", # Continue despite failures
119
129
  ]
120
130
 
131
+ # Add --cov for each package
132
+ for pkg in cov_packages:
133
+ cmd.append(f"--cov={pkg}")
134
+
121
135
  _result = subprocess.run( # Result not needed, only coverage.json
122
136
  cmd,
123
137
  cwd=self.project_root,
@@ -595,6 +609,7 @@ class RealSecurityAuditor:
595
609
  target_path,
596
610
  "-f",
597
611
  "json",
612
+ "-q", # Quiet mode - suppress progress bar and log messages
598
613
  "-ll", # Only report medium and above
599
614
  ]
600
615
 
@@ -609,9 +624,11 @@ class RealSecurityAuditor:
609
624
  # Parse JSON output
610
625
  try:
611
626
  bandit_data = json.loads(result.stdout)
612
- except json.JSONDecodeError:
613
- # Bandit might not be installed
614
- logger.warning("Bandit not available or returned invalid JSON")
627
+ except json.JSONDecodeError as e:
628
+ # Bandit might not be installed or JSON output malformed
629
+ logger.warning(f"Bandit not available or returned invalid JSON: {e}")
630
+ logger.debug(f"Bandit stdout: {result.stdout[:500]}")
631
+ logger.debug(f"Bandit stderr: {result.stderr[:500]}")
615
632
  return SecurityReport(
616
633
  total_issues=0,
617
634
  critical_count=0,