empathy-framework 4.8.0__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.
Files changed (38) hide show
  1. {empathy_framework-4.8.0.dist-info → empathy_framework-4.9.0.dist-info}/METADATA +1 -1
  2. {empathy_framework-4.8.0.dist-info → empathy_framework-4.9.0.dist-info}/RECORD +27 -38
  3. empathy_os/cache/hash_only.py +3 -6
  4. empathy_os/cache/hybrid.py +3 -6
  5. empathy_os/cli_legacy.py +1 -27
  6. empathy_os/cli_unified.py +0 -25
  7. empathy_os/memory/__init__.py +5 -19
  8. empathy_os/memory/short_term.py +132 -10
  9. empathy_os/memory/types.py +4 -0
  10. empathy_os/models/registry.py +4 -4
  11. empathy_os/project_index/scanner.py +3 -2
  12. empathy_os/socratic/ab_testing.py +1 -1
  13. empathy_os/workflow_commands.py +9 -9
  14. empathy_os/workflows/__init__.py +4 -4
  15. empathy_os/workflows/base.py +8 -54
  16. empathy_os/workflows/bug_predict.py +2 -2
  17. empathy_os/workflows/history.py +5 -3
  18. empathy_os/workflows/perf_audit.py +4 -4
  19. empathy_os/workflows/progress.py +22 -324
  20. empathy_os/workflows/routing.py +0 -5
  21. empathy_os/workflows/security_audit.py +0 -189
  22. empathy_os/workflows/security_audit_phase3.py +26 -2
  23. empathy_os/workflows/test_gen.py +7 -7
  24. empathy_os/vscode_bridge 2.py +0 -173
  25. empathy_os/workflows/output.py +0 -410
  26. empathy_os/workflows/progressive/README 2.md +0 -454
  27. empathy_os/workflows/progressive/__init__ 2.py +0 -92
  28. empathy_os/workflows/progressive/cli 2.py +0 -242
  29. empathy_os/workflows/progressive/core 2.py +0 -488
  30. empathy_os/workflows/progressive/orchestrator 2.py +0 -701
  31. empathy_os/workflows/progressive/reports 2.py +0 -528
  32. empathy_os/workflows/progressive/telemetry 2.py +0 -280
  33. empathy_os/workflows/progressive/test_gen 2.py +0 -514
  34. empathy_os/workflows/progressive/workflow 2.py +0 -628
  35. {empathy_framework-4.8.0.dist-info → empathy_framework-4.9.0.dist-info}/WHEEL +0 -0
  36. {empathy_framework-4.8.0.dist-info → empathy_framework-4.9.0.dist-info}/entry_points.txt +0 -0
  37. {empathy_framework-4.8.0.dist-info → empathy_framework-4.9.0.dist-info}/licenses/LICENSE +0 -0
  38. {empathy_framework-4.8.0.dist-info → empathy_framework-4.9.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: empathy-framework
3
- Version: 4.8.0
3
+ Version: 4.9.0
4
4
  Summary: AI collaboration framework with real LLM agent execution, AskUserQuestion tool integration, Socratic agent generation, progressive tier escalation (70-85% cost savings), meta-orchestration, dynamic agent composition (6 patterns), intelligent caching (85% hit rate), semantic workflow discovery, visual workflow editor, MCP integration for Claude Code, and multi-agent orchestration.
5
5
  Author-email: Patrick Roebuck <admin@smartaimemory.com>
6
6
  Maintainer-email: Smart-AI-Memory <admin@smartaimemory.com>
@@ -1,4 +1,4 @@
1
- empathy_framework-4.8.0.dist-info/licenses/LICENSE,sha256=IJ9eeI5KSrD5P7alsn7sI_6_1bDihxBA5S4Sen4jf2k,4937
1
+ empathy_framework-4.9.0.dist-info/licenses/LICENSE,sha256=IJ9eeI5KSrD5P7alsn7sI_6_1bDihxBA5S4Sen4jf2k,4937
2
2
  empathy_healthcare_plugin/__init__.py,sha256=4NioL1_86UXzkd-QNkQZUSZ8rKTQGSP0TC9VXP32kQs,295
3
3
  empathy_healthcare_plugin/monitors/__init__.py,sha256=Udp8qfZR504QAq5_eQjvtIaE7v06Yguc7nuF40KllQc,196
4
4
  empathy_healthcare_plugin/monitors/clinical_protocol_monitor.py,sha256=MWE5t8tW9HWZn_SNo-inx8-0nhdTNGhbcB8ZeDWyXa0,11648
@@ -98,10 +98,10 @@ empathy_os/__init__.py,sha256=CWBbmb2sK9MvWJURtIUW33VCeA9tIwY5R7pW4Y7Ldsg,12046
98
98
  empathy_os/agent_monitoring.py,sha256=s4seLC_J4AtQ3PYWrRPO8YHM-Fbm0Q36kPEdlTHf2HI,13375
99
99
  empathy_os/cache_monitor.py,sha256=lcBqODhYY9iPaH35PWkOSgyMavdvXneHv9F57dPmjnc,11190
100
100
  empathy_os/cache_stats.py,sha256=rWJPBNFEfhuLwKYKy89D_Qa9GPIyVso2jdCKp_cdJhI,10232
101
- empathy_os/cli_legacy.py,sha256=x5z48dIfBcUHdhkMLT2q99iVZ2o7UFXyk46P4bgfj0s,140265
101
+ empathy_os/cli_legacy.py,sha256=4qAlcfoQpiPXh9GHXRw0K1-bfk0BnW2LrCoTLUjZ6t0,139456
102
102
  empathy_os/cli_minimal.py,sha256=mLFVTdjQPZ3WPzSGsVbgw4k6wPsMFU94rdYXGAwDexU,21754
103
103
  empathy_os/cli_router.py,sha256=erZADIYt4vFt_RPMV5Ao-tiJAdX4TTHSr4CQ6DA2ZBI,12569
104
- empathy_os/cli_unified.py,sha256=w80cyED93QFu3puC4qiIrrLtTmsfTi2stPsHGqroUfI,25387
104
+ empathy_os/cli_unified.py,sha256=kPy92SVUz0-v7eDHVwehg2LhpmsvB5ykwrz9mGbKDW8,24611
105
105
  empathy_os/config.py,sha256=jsFQuXpZP_jt6UrZtfLlkBZwPUSNbnW5VVtMS5JIhbA,16276
106
106
  empathy_os/coordination.py,sha256=E2HvHxKk1xbYswtgxhnVKB6DRxfXUV5pCt-XWHOvNKM,28509
107
107
  empathy_os/core.py,sha256=JSqejXdUIced5FZpoOr2_DF5BaRfWnXlZkuDDQkg5Cw,53968
@@ -122,16 +122,15 @@ empathy_os/redis_memory.py,sha256=MYhW_M41AoWhxxh8YggWUHxZaUoQZ7XxqeBB2qDqyww,23
122
122
  empathy_os/templates.py,sha256=B5fzlc6wU3lwdaKK4ZUdytqOYrM6TEnFteZ0nCSp_EI,17220
123
123
  empathy_os/tier_recommender.py,sha256=oYOKhnrTG2sqYsDvojQyaKuyC4ac_weSz4Xv0j0TuP8,14305
124
124
  empathy_os/trust_building.py,sha256=z2ZsQWK5QjX6d7pxFWrFD54J1keUguTog6YztZJVPKI,19180
125
- empathy_os/vscode_bridge 2.py,sha256=SgFmWFCoAoPww-g2hsRC2VeqAMTqUmXXxJ3hglykxP4,4967
126
125
  empathy_os/vscode_bridge.py,sha256=SgFmWFCoAoPww-g2hsRC2VeqAMTqUmXXxJ3hglykxP4,4967
127
- empathy_os/workflow_commands.py,sha256=J1KcEI_bNJ3OOZ0T8utcCZzXMmx6NzWUjlsbW0bYEfc,25520
126
+ empathy_os/workflow_commands.py,sha256=tps6norBiw7Q2hV0qdqwdX4B7Kedt_FwYBQWhc2oEYg,25482
128
127
  empathy_os/adaptive/__init__.py,sha256=07m_Gsdxmm9mDBjJRFz7a8wZK-Tdd2QFRQOUw6yCc1w,342
129
128
  empathy_os/adaptive/task_complexity.py,sha256=XhQgubrTxqV2V6CBD4kKZ_0kPCjchzg94HaUFIY6Q3c,3783
130
129
  empathy_os/cache/__init__.py,sha256=nKHyWnQmyBU6f24UOq5iZ4ULUFys5Dhl6dFZlU0jlHU,3232
131
130
  empathy_os/cache/base.py,sha256=1waj2OZ_5gRhwYhSfsSfgQs1N_ftZcAq6UAV9RctSek,3968
132
131
  empathy_os/cache/dependency_manager.py,sha256=lObktgRVeN-Z1ajGpAPuTvW1bOlLaHBNvoeGoCdOhAo,7747
133
- empathy_os/cache/hash_only.py,sha256=N9fJw-IGOzgfDOuKe15e3AzLrxkjDBbwDXEgR1DYXAo,7492
134
- empathy_os/cache/hybrid.py,sha256=urBT47GOmvc0ez1a-h92p9_ul9aTDsvmSwnTDBIOJbw,15336
132
+ empathy_os/cache/hash_only.py,sha256=CdyZvl81lbargRyVhWVBJB4VDUNay4KIf3knUmqvZCo,7427
133
+ empathy_os/cache/hybrid.py,sha256=Qjjqr6V3EPQADinVDTFf8sAuiE4RI6DEyBWMjb7KOrc,15256
135
134
  empathy_os/cache/storage.py,sha256=eTXP8rZRlalNRlsZxsaolMg81JNfjDrD129e-p9Wjk0,7792
136
135
  empathy_os/cli/__init__.py,sha256=7PFURX1O4_sX14kWvNrnAV1Ndeixrx_nI8IN8eLQpQs,4951
137
136
  empathy_os/cli/__main__.py,sha256=md0GsFpiTgifmJ0MJQ_E6Daq9JCxyCUgOUJRdJ69Ews,215
@@ -178,7 +177,7 @@ empathy_os/hot_reload/integration.py,sha256=UX5XnxRyPTlhHbwToGd8nwlOPBo6KHA6T5gM
178
177
  empathy_os/hot_reload/reloader.py,sha256=xjecGV0IWjaP5yPAyTbFSRTiEmq-hqap3bOJeAnxJEE,9509
179
178
  empathy_os/hot_reload/watcher.py,sha256=BZX-Iq9ktOHQTHfEqe1ybRK_BJHPeR_965bzKd1Kwm8,5268
180
179
  empathy_os/hot_reload/websocket.py,sha256=jH4I1nHQqXV2ixkjcG42YVB7SCp5h3WR-tujbrFP25s,5092
181
- empathy_os/memory/__init__.py,sha256=obQLmHNsNI027mggpCp4SCYT5_QRy20JiXaomk3j2zo,6081
180
+ empathy_os/memory/__init__.py,sha256=HCTeBKVd9j1gs3Zh0cGTFZYA5oDtFIaxMntfuiYlOeM,5689
182
181
  empathy_os/memory/claude_memory.py,sha256=2bRUHdmATH2L3yh7wZmlOFdm7w1mYk5p0G2f37M7bA4,14996
183
182
  empathy_os/memory/config.py,sha256=EoBBZLgyY5sHT3kLeyWjyI4b6hRA3Xiaoo3xdMLLGos,6380
184
183
  empathy_os/memory/control_panel.py,sha256=ylU2RODUIXQSMhBLcqPI5KkOAOpcmuABVcd2AleeSaw,47334
@@ -189,9 +188,9 @@ empathy_os/memory/graph.py,sha256=JSAag-p5vCh4jznjUTUHdMNfyOAHjtOUDix6eLUeIcA,19
189
188
  empathy_os/memory/long_term.py,sha256=vtwtjVRPDvpTpU-jKrM0dkA8WJjpswGUFFMs2-wyxMY,51099
190
189
  empathy_os/memory/nodes.py,sha256=h71kV3x2ALzuTOdrB7LQswZWai71HzGHKlFBzf7TwrI,4795
191
190
  empathy_os/memory/redis_bootstrap.py,sha256=G71loEE2LTcn0BCp_mN96Bk37ygFz1ImORiLoEmg9jA,16508
192
- empathy_os/memory/short_term.py,sha256=0SAC4i8w3Eur0EE7CeKgS9Bj74Bf0REpEcbkvhta1kY,67784
191
+ empathy_os/memory/short_term.py,sha256=D6V4PtTUVKB-m86bIfrMjHHImqTXXwCQm5iYkFIkO1I,71899
193
192
  empathy_os/memory/summary_index.py,sha256=7m_m2xH3KMBJWRJFvk3hAws_tgPD4VCfFBxwAbV9fCo,20777
194
- empathy_os/memory/types.py,sha256=nM5w-ECtrjF0Z5qJu2bTgvms9K8UOcqJcE3jmwi4ev4,13975
193
+ empathy_os/memory/types.py,sha256=aRfPWXxfvCdCiJSAos2hx6NMCgKblXx1ZvCuVyMxPuE,14200
195
194
  empathy_os/memory/unified.py,sha256=xLUr7LHvFs7hNBvrsUdJRvGYkNbp6j_bPuL1A7IhrjY,47173
196
195
  empathy_os/memory/security/__init__.py,sha256=f_t-pFO1aHOE8uFJ0icGaCt2xCvWx-bFxBcv9U3Cu3Q,868
197
196
  empathy_os/memory/security/audit_logger.py,sha256=DP9OYdoavUN6ZlPYmidGVgFyivkQ8Y5huVP6gZYJ5bQ,34259
@@ -219,7 +218,7 @@ empathy_os/models/empathy_executor.py,sha256=8SBygcB1NlLI89DYjAJqbumcscIwK_noArm
219
218
  empathy_os/models/executor.py,sha256=nUWPOyhLOpxOQmc2FxBwGyD2aMiuW957BqiiMHb8bDE,7479
220
219
  empathy_os/models/fallback.py,sha256=HTDZYNhbX4Mpq97-22eaXsQt59hheFLn55Kbavz0ark,25808
221
220
  empathy_os/models/provider_config.py,sha256=RMGjWqjOCSUGEtudQU7uaTHQj1RgZFR9BlKdHoWKFh4,9225
222
- empathy_os/models/registry.py,sha256=L9GZ5hQvCcGDcaorOTW7GX4Ndu1wnqxXtwSjQ5cT0_4,15555
221
+ empathy_os/models/registry.py,sha256=9VEid-TZS8kSAZ5YO9J-v1rb1DW7k3U2aWA-0kRphac,15580
223
222
  empathy_os/models/tasks.py,sha256=mvxFZiiRgUGCHYdJE316Zp8PGhN5D1Ctx9Og3jz_Zy8,10396
224
223
  empathy_os/models/telemetry.py,sha256=piNLJXmLvpWQQu6gFHcUpaLEaPmFzvzKTmO1TGEbfOU,52532
225
224
  empathy_os/models/token_estimator.py,sha256=y242dDja7oZSg0LsfxYBmsGAaoiyVQ-bNWTQXV4CI_I,13042
@@ -249,7 +248,7 @@ empathy_os/project_index/cli.py,sha256=eQIz79h6m9sq7pCfT3Tot-ntKb0hhUZltuBZhNlxU
249
248
  empathy_os/project_index/index.py,sha256=ZQ53xtPYO2U3E2FyUJF3gQU-8LX_wf5uqr2sj7rjCWc,23483
250
249
  empathy_os/project_index/models.py,sha256=_m12jDd4qAzsf5aVVYTwrL36GDor04i4QJobEYLqAMw,17626
251
250
  empathy_os/project_index/reports.py,sha256=MTs2JbMx-mDR6RCUF-KRLkdf5wZOw7AsntdHTH2tcFk,17043
252
- empathy_os/project_index/scanner.py,sha256=c8bKXW7AzwhlMZYe5RusnBIX5UsmGRfoEaOCLX5pyQE,31261
251
+ empathy_os/project_index/scanner.py,sha256=E1ochUusLcPwOCPezSoEip22qKjTzcPHAnM6-ag1yGQ,31339
253
252
  empathy_os/project_index/scanner_parallel.py,sha256=Dq3f957Yxwu3Dp4c6flVrO9TyRw9O-GWH33jIBMcgBE,10019
254
253
  empathy_os/prompts/__init__.py,sha256=8sbL94w0h6P6kZcZbrXZnGlPqYTz3Fw1VUfCaMLrzlM,1554
255
254
  empathy_os/prompts/config.py,sha256=aV_NbUKwtHJJkggvGSykHApor_EaMJSkAGM5IFzd3NM,3009
@@ -273,7 +272,7 @@ empathy_os/scaffolding/__init__.py,sha256=GOlcRgoLxKgFdxhjbClMRbk9N7NMfDtyC4L3OK
273
272
  empathy_os/scaffolding/__main__.py,sha256=zFLQKRd8aRrT6zWKFCE8t5lhR3P6za4eWuZm2r7gVUA,282
274
273
  empathy_os/scaffolding/cli.py,sha256=uxB50ItugsWKBKjbEgmY35x-KnwE89Smz7T4uXFzLGQ,6764
275
274
  empathy_os/socratic/__init__.py,sha256=1EF1dP18mEx7DUJejlHZpTyF2bnrCKY_JlWMtSfTE6w,5998
276
- empathy_os/socratic/ab_testing.py,sha256=477OISyMCuwaeo8g0eSqIjNZ7DNH16TuSYscdMSS1mI,29960
275
+ empathy_os/socratic/ab_testing.py,sha256=r_PJwVAtKz0o5Pie_FFSHo0RzRfySfNTrerlX8ebqfw,29890
277
276
  empathy_os/socratic/blueprint.py,sha256=EusEbiSlwpyifDUmFandFRfjBIRbYGHIDmL7CbSJJns,17280
278
277
  empathy_os/socratic/cli.py,sha256=kEYlDo95B0eZKQ1KEOFA2dLDiqMaxsxgLomBorCUYdA,21321
279
278
  empathy_os/socratic/collaboration.py,sha256=l_IG1G4YXKIOsJqLnfEv6MJxaqsNTQ21pTvsHQX-XwA,33466
@@ -309,10 +308,10 @@ empathy_os/workflow_patterns/core.py,sha256=H52xnB4IqMdzJpOoySk5s7XcuKNTsqAt1RKp
309
308
  empathy_os/workflow_patterns/output.py,sha256=EyioUYeXGQWllZdJXHXv2mLwl7fMwihrEb8D1SG6MxE,3090
310
309
  empathy_os/workflow_patterns/registry.py,sha256=0U_XT0hdQ5fLHuEJlrvzjaCBUyeWDA675_hEyvHxT0o,7461
311
310
  empathy_os/workflow_patterns/structural.py,sha256=v1wbBU0pCQQKdNhPXM_fuPO8ptQCbEC_8X-OKgfhrk8,9432
312
- empathy_os/workflows/__init__.py,sha256=iaOjOtiJzfLBKey5W_v1LT6o-yjrsWLbQNglH8tDN5I,19594
313
- empathy_os/workflows/base.py,sha256=Vy1cUZHWLDcj7rWn3olXUMF3nIyuvPt3rjJOjXE7ufU,82514
311
+ empathy_os/workflows/__init__.py,sha256=DI_K19eeTY3TjYxRp-FMkv8714h3y2Ym8ZnPxPgxugA,19594
312
+ empathy_os/workflows/base.py,sha256=1c0hxtovTZreybLpk3hXy9KtGTs0jilzlVs6MIqvrIs,80456
314
313
  empathy_os/workflows/batch_processing.py,sha256=1DO5IQV7_LKTm0Mkcx0wZqrT_MFMQF-MKdxep64TppQ,9645
315
- empathy_os/workflows/bug_predict.py,sha256=fdY5zFMGynrLGTmy2IOyly3CQ06kuW0yi9mdZV95ptw,38382
314
+ empathy_os/workflows/bug_predict.py,sha256=x49KCzdsa6t1Em0FBpFCigOj0FB-zhydW-Pc2jTVeYE,38378
316
315
  empathy_os/workflows/builder.py,sha256=rRXevtS8v1FAGG91yhpSq6_dx5rvK_sZrF9ekdW40fE,8655
317
316
  empathy_os/workflows/caching.py,sha256=y6Ws0KKCQ_R6D6PTbpc8dQRjb3tG4U2-KcwJvxFi07g,8134
318
317
  empathy_os/workflows/code_review.py,sha256=BtpDV2cmKng4CbmeyWrKCkqZY8G2Bxv2fM7qPcnIdf8,36117
@@ -324,7 +323,7 @@ empathy_os/workflows/document_gen.py,sha256=3S8cq6x9omLxr3BFW0nFrpOSTL5xKeJT79Gg
324
323
  empathy_os/workflows/document_manager.py,sha256=mP6YFO9eKbKRLc5EuJdYYxL2tIylkNswpm3Npf1T0UM,7385
325
324
  empathy_os/workflows/document_manager_README.md,sha256=aKegxvNXTHpxQsShpSp9cdhF6rT2rhdLB5CsfsdA7YI,2157
326
325
  empathy_os/workflows/documentation_orchestrator.py,sha256=sSzTsLJPkSlHcE_o-pfM-27DVAVpwPcmxPZT71GYfeo,43013
327
- empathy_os/workflows/history.py,sha256=ZkGJBTQlgOj4VCSeehaq5C3hmJQ7L7X7sturjxNkQ2A,16469
326
+ empathy_os/workflows/history.py,sha256=g_hnNkhlNxIXF5aEJp9BPb32x3Xq32r_nk3iFUe0PL4,16401
328
327
  empathy_os/workflows/manage_docs.py,sha256=lSdQCG1y2R_9C9PLFS3dgFunRkLrRuwYskIRfGWwlcE,2127
329
328
  empathy_os/workflows/manage_docs_README.md,sha256=0v-DOpTdfXQ5qIFzVCtV2IY-QBNw5s_Yvp3YCFOnxaQ,1907
330
329
  empathy_os/workflows/manage_documentation.py,sha256=FUb4U2_OEjvzJ2mfRHkadZ6SohPWQVWXeKJCJbAz-Ac,30080
@@ -332,26 +331,25 @@ empathy_os/workflows/new_sample_workflow1.py,sha256=W59znXxsq5kgk4ZI3psC41KtzkLo
332
331
  empathy_os/workflows/new_sample_workflow1_README.md,sha256=bzLyqukgaKilG1OnCdLsc5GNWsYEagI7mn3n80BPMHY,2366
333
332
  empathy_os/workflows/orchestrated_health_check.py,sha256=sKmdvKrDhDe3bRSFVhPt7XeiexC-TKy0EK6TbVXLxQw,30492
334
333
  empathy_os/workflows/orchestrated_release_prep.py,sha256=Erp2rw-EBNOfIwyT0nJhGqpYPg2v-YL_h06aMtaALlA,20224
335
- empathy_os/workflows/output.py,sha256=oXYQBHa0zKUbN32Bki3es0H23LBKZ4xbsBkSbHwNxjs,12743
336
- empathy_os/workflows/perf_audit.py,sha256=R43OBx1cStQUTGWY6J6R7e4f6r1yNLiIG0QLoE6S1fM,29029
334
+ empathy_os/workflows/perf_audit.py,sha256=hxOB-Cjfo-FRrGstbLDt5ht-2D2sJp69Lsd8miL67Z0,29069
337
335
  empathy_os/workflows/pr_review.py,sha256=lR7TxvGjBj1fIMxYgBtgxuSvWFTGqQHTsVpL5zKLUB8,26796
338
- empathy_os/workflows/progress.py,sha256=DZll6H7aVWeyljnYL4m2fRiB6NPGH2tMQtAPuuC-XeM,26418
336
+ empathy_os/workflows/progress.py,sha256=J1ooVZp6WoaKz9IwDsoYFtfJGFTtSDU3kHewkGMjCJ8,15929
339
337
  empathy_os/workflows/progress_server.py,sha256=aLDrcBuxqN9_mfJRcRLJypuB4uRMFq9u4C_li9HioOM,10233
340
338
  empathy_os/workflows/refactor_plan.py,sha256=JmW0bMuQDHwCL77ZHC76pVFpp_UY9vke9phVVJfHyDw,25600
341
339
  empathy_os/workflows/release_prep.py,sha256=_u8-zVfKbO9aSNx97zRx682sfR6xvz4XqJJaBG-VwKs,28747
342
340
  empathy_os/workflows/release_prep_crew.py,sha256=kKZyJmvxhdovzF6Gm7b_flP88vdqiEHG-wuNzNr8Kbo,33900
343
341
  empathy_os/workflows/research_synthesis.py,sha256=7KozOOlFJADiVR1Y9LP3-DwwNG6JhRRnOLgCDGkdvSM,13967
344
- empathy_os/workflows/routing.py,sha256=sgAmqhzaQjafH5ao4bRk5jN87pK8KUHmxLH8o8mj4wo,5022
342
+ empathy_os/workflows/routing.py,sha256=az929cLQMe3v2XA-W74Xv38_9SEVmwzI570RXD840po,4857
345
343
  empathy_os/workflows/secure_release.py,sha256=cMhTT-iF_pTu9oS08QpWJBg15-Azx7AVA_ucRH_6bDY,21263
346
344
  empathy_os/workflows/security_adapters.py,sha256=UX4vRQwuSmA_V8t5sh5BGzT4RRkCk6lt6jy_VkhqJ1s,10945
347
- empathy_os/workflows/security_audit.py,sha256=1BctYCqD2dhK_lKJ2TV9xm-RGHDgHq68T6PWQ-MAIfM,49213
348
- empathy_os/workflows/security_audit_phase3.py,sha256=P46dbC1pHR_X6m4cMDVtWNBs9wOQWscwXY7P_SA8g58,10075
345
+ empathy_os/workflows/security_audit.py,sha256=iTsH9sk3qQ1UHdiLozDo6Nn2v7mcJCXdEiT_U1IFVp4,40908
346
+ empathy_os/workflows/security_audit_phase3.py,sha256=pEoOWsUBy5PHykYhc8_xXiYyVYzbf21DPm2zTtsoNV0,11321
349
347
  empathy_os/workflows/step_config.py,sha256=CdRNAQ1SiPsuAl10s58ioyk5w8XCArecSS9AjyHWQJM,7213
350
348
  empathy_os/workflows/telemetry_mixin.py,sha256=RB-zpllkILtBqjChU_LcDIo9nAdxky-Z7LI3SquI_Ok,10091
351
349
  empathy_os/workflows/test5.py,sha256=6o_sFk4dAIyOIVY9nDilgQWaJIGjl551wzphbcnXwTI,3767
352
350
  empathy_os/workflows/test5_README.md,sha256=bnYhbwyNVGN0dbIcnAUhEJbwSf4cE-UAkD09p_gvThc,2406
353
351
  empathy_os/workflows/test_coverage_boost_crew.py,sha256=nwW_3fhcQObCdiE5Pi9iidUdQm-G6ldCPWdzKlt6dk0,31053
354
- empathy_os/workflows/test_gen.py,sha256=Lw9Hh-feqiM9GCjWUJzlNyEPMqxP34LSNEscbuOUZjU,70621
352
+ empathy_os/workflows/test_gen.py,sha256=hs9r8v93tr-L0vGPkosFNRjNqAxSWeBUg-z2S5NtmE4,70655
355
353
  empathy_os/workflows/test_lifecycle.py,sha256=c6UDSd6kOQdCHmaJviwAnUVceVQuSdLNQ9eKbVooiMY,16890
356
354
  empathy_os/workflows/test_maintenance.py,sha256=qaIUmjPjF3KLO2X8exCR0MvaaU6kHJIO-ifnTX5GfCk,22966
357
355
  empathy_os/workflows/test_maintenance_cli.py,sha256=U8t-1uK9iqEg9RoVXbS27KbhqvbXm30anQH4GbCvKBM,17879
@@ -365,23 +363,14 @@ empathy_os/workflows/keyboard_shortcuts/parsers.py,sha256=aws4HSjqBOrl-DQEOV9WeJ
365
363
  empathy_os/workflows/keyboard_shortcuts/prompts.py,sha256=gcV2F2bAMjZUrbB13lOI4ixXzXm2TNWEZ4VbPhC7ITw,9164
366
364
  empathy_os/workflows/keyboard_shortcuts/schema.py,sha256=MwvM63J9WTO6nqtwes5A04HH1dTa9XhJlD0SbFhsS5E,5806
367
365
  empathy_os/workflows/keyboard_shortcuts/workflow.py,sha256=FOEQwc8IR0PEYim05zjR-uIlw6oPZHW9jQZ8skxXp0c,17678
368
- empathy_os/workflows/progressive/README 2.md,sha256=ngn3ZC48LW-ON5Vow90dW4UvEWeOKuU7V-W4JdudqJo,13793
369
366
  empathy_os/workflows/progressive/README.md,sha256=ngn3ZC48LW-ON5Vow90dW4UvEWeOKuU7V-W4JdudqJo,13793
370
- empathy_os/workflows/progressive/__init__ 2.py,sha256=l18JX30ONk8H08Wm210k1W3AKat2tVzI840JqlzTBpU,2203
371
367
  empathy_os/workflows/progressive/__init__.py,sha256=qkPVjO_MtHjxVcHMr5jbU9NMZTxVCGHXVD3EkngyCso,2179
372
- empathy_os/workflows/progressive/cli 2.py,sha256=WIFxTBUsCL2hvKKoPFxYUgfhRFjMm-HVUjRp3Y-pvXA,6305
373
368
  empathy_os/workflows/progressive/cli.py,sha256=jbl5jSk3wlbjGc00Ao06OO7aU53AZuVZVKJpJJAajX4,6122
374
- empathy_os/workflows/progressive/core 2.py,sha256=891OttvWkFokBRVzvqVUxwpcNlgc7edlVYqGUCkn0vs,16101
375
369
  empathy_os/workflows/progressive/core.py,sha256=2FzIsy0xKyP91-aMTGfERbX5Mow5CSlfR9RUmHU4GeM,16070
376
- empathy_os/workflows/progressive/orchestrator 2.py,sha256=FsLcoRC8jujRcOV87PyN-0jzlLvStIQQqMFisxWWg0I,26786
377
370
  empathy_os/workflows/progressive/orchestrator.py,sha256=LssTqdy4ufqhgpgS3QNZEdpeSkdg-MgpFyhW5zCJmAY,27733
378
- empathy_os/workflows/progressive/reports 2.py,sha256=F2p3HyInGH8fT9-e_BsOVcgeQBtOugYsSyBn49yhhmc,17588
379
371
  empathy_os/workflows/progressive/reports.py,sha256=VgymV6v7owodELf_QLQTwqGOEZjaFKclKxeQ0-vow0k,17631
380
- empathy_os/workflows/progressive/telemetry 2.py,sha256=5ZjCmeGjtfESejocWdtvnm5iCTAQv5_3NRTYmuoIbVs,9427
381
372
  empathy_os/workflows/progressive/telemetry.py,sha256=DiDTrkeKDjsWJnA57UrNfhbSG6qv9LaTP2wqHPcRscA,9398
382
- empathy_os/workflows/progressive/test_gen 2.py,sha256=rNjjrQ8AFoXRe99X1Yk020gX6tcTxLh5pGMXXho8XRs,15802
383
373
  empathy_os/workflows/progressive/test_gen.py,sha256=wdpjx-Tlz-dWqOwHwoblbgEABr7EjTRV2faXMTad1M0,15759
384
- empathy_os/workflows/progressive/workflow 2.py,sha256=bGXKmB9UFLfDw5c9MsW6Zw4GSbknCP-9HnaIEX36nhY,21597
385
374
  empathy_os/workflows/progressive/workflow.py,sha256=FD3MzRSMV1n_c1S8jSlLLIrcewcus6Niyml6-EMdk_E,21146
386
375
  empathy_software_plugin/SOFTWARE_PLUGIN_README.md,sha256=XjvK2TXoI5nsgEZqh4RQIAxBiGVpvbXihIu7zF8KNYk,1399
387
376
  empathy_software_plugin/__init__.py,sha256=OceDhLoQrjD0jTPlI4418608l97OT48u4SCL5yEDPQc,309
@@ -393,8 +382,8 @@ workflow_scaffolding/__init__.py,sha256=UpX5vjjjPjIaAKyIV1D4GxJzLUZy5DzdzgSkePYM
393
382
  workflow_scaffolding/__main__.py,sha256=0qspuNoadTDqyskXTlT8Sahqau-XIxN35NHTSGVW6z4,236
394
383
  workflow_scaffolding/cli.py,sha256=yLgvMsPbqI-LHt7UKXMuj-Dc0-44EqWiChldysrw1YQ,6763
395
384
  workflow_scaffolding/generator.py,sha256=9eEmm324kVzf8BCtXEML090pyke06o0U7aGATzZIaPM,8869
396
- empathy_framework-4.8.0.dist-info/METADATA,sha256=p6WOI6_OfX8SVhtjdnmxSewNqKZzYcqPKj_I3apxruc,29776
397
- empathy_framework-4.8.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
398
- empathy_framework-4.8.0.dist-info/entry_points.txt,sha256=Ox9iu_2Fx66x5fyZ5L1NJrrFFekD-BZJIudHNzKwYPs,1565
399
- empathy_framework-4.8.0.dist-info/top_level.txt,sha256=YJNBYFE2u5f2XnveFqYO-rZDcHR_aMOHAiIIf9tl72c,102
400
- empathy_framework-4.8.0.dist-info/RECORD,,
385
+ empathy_framework-4.9.0.dist-info/METADATA,sha256=A42trSFKu7TJLqPhKxJygG4T7JfIC1iUt2WASQd4D9Q,29776
386
+ empathy_framework-4.9.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
387
+ empathy_framework-4.9.0.dist-info/entry_points.txt,sha256=Ox9iu_2Fx66x5fyZ5L1NJrrFFekD-BZJIudHNzKwYPs,1565
388
+ empathy_framework-4.9.0.dist-info/top_level.txt,sha256=YJNBYFE2u5f2XnveFqYO-rZDcHR_aMOHAiIIf9tl72c,102
389
+ empathy_framework-4.9.0.dist-info/RECORD,,
@@ -6,7 +6,6 @@ Copyright 2025 Smart-AI-Memory
6
6
  Licensed under Fair Source License 0.9
7
7
  """
8
8
 
9
- import heapq
10
9
  import logging
11
10
  import time
12
11
  from typing import Any
@@ -203,12 +202,10 @@ class HashOnlyCache(BaseCache):
203
202
  # Evict 10% of entries (LRU)
204
203
  num_to_evict = max(1, len(self._memory_cache) // 10)
205
204
 
206
- # Get oldest entries by access time (LRU eviction)
207
- oldest_keys = heapq.nsmallest(
208
- num_to_evict, self._access_times.items(), key=lambda x: x[1]
209
- )
205
+ # Sort by access time (oldest first)
206
+ sorted_keys = sorted(self._access_times.items(), key=lambda x: x[1])
210
207
 
211
- for cache_key, _ in oldest_keys:
208
+ for cache_key, _ in sorted_keys[:num_to_evict]:
212
209
  self._evict_entry(cache_key)
213
210
  logger.debug(f"LRU eviction: {cache_key[:16]}...")
214
211
 
@@ -13,7 +13,6 @@ Licensed under Fair Source License 0.9
13
13
  """
14
14
 
15
15
  import hashlib
16
- import heapq
17
16
  import logging
18
17
  import time
19
18
  from pathlib import Path
@@ -408,12 +407,10 @@ class HybridCache(BaseCache):
408
407
  # Evict 10% of entries
409
408
  num_to_evict = max(1, len(self._hash_cache) // 10)
410
409
 
411
- # Get oldest entries by access time (LRU eviction)
412
- oldest_keys = heapq.nsmallest(
413
- num_to_evict, self._access_times.items(), key=lambda x: x[1]
414
- )
410
+ # Sort by access time
411
+ sorted_keys = sorted(self._access_times.items(), key=lambda x: x[1])
415
412
 
416
- for cache_key, _ in oldest_keys:
413
+ for cache_key, _ in sorted_keys[:num_to_evict]:
417
414
  self._evict_entry(cache_key)
418
415
 
419
416
  logger.info(
empathy_os/cli_legacy.py CHANGED
@@ -1,22 +1,5 @@
1
- """Command-Line Interface for Empathy Framework (LEGACY)
1
+ """Command-Line Interface for Empathy Framework
2
2
 
3
- DEPRECATED: This module is deprecated as of v5.0.0.
4
- Use the minimal CLI instead: `empathy` (empathy_os.cli_minimal)
5
-
6
- The minimal CLI provides:
7
- - `empathy workflow list|info|run` - Workflow management
8
- - `empathy telemetry show|savings|export` - Usage tracking
9
- - `empathy provider show|set` - Provider configuration
10
- - `empathy validate` - Configuration validation
11
-
12
- For interactive features, use Claude Code slash commands:
13
- - /dev, /testing, /docs, /release, /help
14
-
15
- Migration guide: https://smartaimemory.com/framework-docs/migration/cli/
16
-
17
- ---
18
-
19
- Original description:
20
3
  Provides CLI commands for:
21
4
  - Running interactive REPL (empathy run)
22
5
  - Inspecting patterns, metrics, state (empathy inspect)
@@ -29,15 +12,6 @@ Copyright 2025 Smart-AI-Memory
29
12
  Licensed under Fair Source License 0.9
30
13
  """
31
14
 
32
- import warnings
33
-
34
- warnings.warn(
35
- "empathy_os.cli_legacy is deprecated. Use 'empathy' (cli_minimal) instead. "
36
- "See: https://smartaimemory.com/framework-docs/reference/cli-reference/",
37
- DeprecationWarning,
38
- stacklevel=2,
39
- )
40
-
41
15
  import argparse
42
16
  import heapq
43
17
  import sys
empathy_os/cli_unified.py CHANGED
@@ -1,21 +1,5 @@
1
1
  """Unified CLI for Empathy Framework
2
2
 
3
- DEPRECATED: This module is deprecated as of v5.0.0.
4
- Use the minimal CLI instead: `empathy` (empathy_os.cli_minimal)
5
-
6
- The minimal CLI provides:
7
- - `empathy workflow list|info|run` - Workflow management
8
- - `empathy telemetry show|savings|export` - Usage tracking
9
- - `empathy provider show|set` - Provider configuration
10
- - `empathy validate` - Configuration validation
11
-
12
- For interactive features, use Claude Code slash commands:
13
- - /dev, /testing, /docs, /release, /help
14
-
15
- Migration guide: https://smartaimemory.com/framework-docs/migration/cli/
16
-
17
- ---
18
-
19
3
  A simplified, intelligent CLI using Socratic questioning.
20
4
 
21
5
  Usage:
@@ -30,15 +14,6 @@ Copyright 2025 Smart-AI-Memory
30
14
  Licensed under Fair Source License 0.9
31
15
  """
32
16
 
33
- import warnings
34
-
35
- warnings.warn(
36
- "empathy-unified CLI is deprecated. Use 'empathy' (cli_minimal) instead. "
37
- "See: https://smartaimemory.com/framework-docs/reference/cli-reference/",
38
- DeprecationWarning,
39
- stacklevel=2,
40
- )
41
-
42
17
  import json
43
18
  import subprocess
44
19
  import sys
@@ -123,24 +123,17 @@ from .security import ( # Audit Logging; PII Scrubbing; Secrets Detection
123
123
  Severity,
124
124
  detect_secrets,
125
125
  )
126
- from .short_term import RedisShortTermMemory
127
-
128
- # Conversation Summary Index
129
- from .summary_index import AgentContext, ConversationSummaryIndex
130
-
131
- # Types (extracted to types.py for cleaner separation)
132
- from .types import (
126
+ from .short_term import (
133
127
  AccessTier,
134
128
  AgentCredentials,
135
129
  ConflictContext,
136
- PaginatedResult,
137
- RedisConfig,
138
- RedisMetrics,
130
+ RedisShortTermMemory,
139
131
  StagedPattern,
140
- TimeWindowQuery,
141
132
  TTLStrategy,
142
133
  )
143
- from .types import SecurityError as ShortTermSecurityError
134
+
135
+ # Conversation Summary Index
136
+ from .summary_index import AgentContext, ConversationSummaryIndex
144
137
 
145
138
  # Unified memory interface
146
139
  from .unified import Environment, MemoryConfig, UnifiedMemory
@@ -187,8 +180,6 @@ __all__ = [
187
180
  "MemoryStats",
188
181
  "Node",
189
182
  "NodeType",
190
- # Pagination and Query Types
191
- "PaginatedResult",
192
183
  "PIIDetection",
193
184
  "PIIPattern",
194
185
  # Security - PII
@@ -196,9 +187,6 @@ __all__ = [
196
187
  "PatternMetadata",
197
188
  "PatternNode",
198
189
  "PerformanceNode",
199
- # Redis Configuration and Metrics
200
- "RedisConfig",
201
- "RedisMetrics",
202
190
  # Short-term Memory
203
191
  "RedisShortTermMemory",
204
192
  "RedisStartMethod",
@@ -215,10 +203,8 @@ __all__ = [
215
203
  "SessionInfo",
216
204
  "SessionType",
217
205
  "Severity",
218
- "ShortTermSecurityError",
219
206
  "StagedPattern",
220
207
  "TTLStrategy",
221
- "TimeWindowQuery",
222
208
  # Unified Memory Interface (recommended)
223
209
  "UnifiedMemory",
224
210
  "VulnerabilityNode",
@@ -164,6 +164,14 @@ class RedisShortTermMemory:
164
164
  self._mock_streams: dict[str, list[tuple[str, dict]]] = {}
165
165
  self._mock_pubsub_handlers: dict[str, list[Callable[[dict], None]]] = {}
166
166
 
167
+ # Local LRU cache for two-tier caching (memory + Redis)
168
+ # Reduces network I/O from 37ms to <0.001ms for frequently accessed keys
169
+ self._local_cache_enabled = self._config.local_cache_enabled
170
+ self._local_cache_max_size = self._config.local_cache_size
171
+ self._local_cache: dict[str, tuple[str, float, float]] = {} # key -> (value, timestamp, last_access)
172
+ self._local_cache_hits = 0
173
+ self._local_cache_misses = 0
174
+
167
175
  # Security: Initialize PII scrubber and secrets detector
168
176
  self._pii_scrubber: PIIScrubber | None = None
169
177
  self._secrets_detector: SecretsDetector | None = None
@@ -262,43 +270,105 @@ class RedisShortTermMemory:
262
270
  raise last_error if last_error else ConnectionError("Redis operation failed")
263
271
 
264
272
  def _get(self, key: str) -> str | None:
265
- """Get value from Redis or mock"""
273
+ """Get value from Redis or mock with two-tier caching (local + Redis)"""
274
+ # Check local cache first (0.001ms vs 37ms for Redis/mock)
275
+ # This works for BOTH mock and real Redis modes
276
+ if self._local_cache_enabled and key in self._local_cache:
277
+ value, timestamp, last_access = self._local_cache[key]
278
+ now = time.time()
279
+
280
+ # Update last access time for LRU
281
+ self._local_cache[key] = (value, timestamp, now)
282
+ self._local_cache_hits += 1
283
+
284
+ return value
285
+
286
+ # Cache miss - fetch from storage (mock or Redis)
287
+ self._local_cache_misses += 1
288
+
289
+ # Mock mode path
266
290
  if self.use_mock:
267
291
  if key in self._mock_storage:
268
292
  value, expires = self._mock_storage[key]
269
293
  if expires is None or datetime.now().timestamp() < expires:
270
- return str(value) if value is not None else None
294
+ result = str(value) if value is not None else None
295
+ # Add to local cache for next access
296
+ if result and self._local_cache_enabled:
297
+ self._add_to_local_cache(key, result)
298
+ return result
271
299
  del self._mock_storage[key]
272
300
  return None
301
+
302
+ # Real Redis path
273
303
  if self._client is None:
274
304
  return None
305
+
275
306
  result = self._client.get(key)
307
+
308
+ # Add to local cache if successful
309
+ if result and self._local_cache_enabled:
310
+ self._add_to_local_cache(key, str(result))
311
+
276
312
  return str(result) if result else None
277
313
 
278
314
  def _set(self, key: str, value: str, ttl: int | None = None) -> bool:
279
- """Set value in Redis or mock"""
315
+ """Set value in Redis or mock with two-tier caching"""
316
+ # Mock mode path
280
317
  if self.use_mock:
281
318
  expires = datetime.now().timestamp() + ttl if ttl else None
282
319
  self._mock_storage[key] = (value, expires)
320
+
321
+ # Update local cache in mock mode too
322
+ if self._local_cache_enabled:
323
+ self._add_to_local_cache(key, value)
324
+
283
325
  return True
326
+
327
+ # Real Redis path
284
328
  if self._client is None:
285
329
  return False
330
+
331
+ # Set in Redis
286
332
  if ttl:
287
333
  self._client.setex(key, ttl, value)
288
- return True
289
- result = self._client.set(key, value)
290
- return bool(result)
334
+ else:
335
+ result = self._client.set(key, value)
336
+ if not result:
337
+ return False
338
+
339
+ # Update local cache if enabled
340
+ if self._local_cache_enabled:
341
+ self._add_to_local_cache(key, value)
342
+
343
+ return True
291
344
 
292
345
  def _delete(self, key: str) -> bool:
293
- """Delete key from Redis or mock"""
346
+ """Delete key from Redis or mock and local cache"""
347
+ # Mock mode path
294
348
  if self.use_mock:
349
+ deleted = False
295
350
  if key in self._mock_storage:
296
351
  del self._mock_storage[key]
297
- return True
298
- return False
352
+ deleted = True
353
+
354
+ # Remove from local cache if present
355
+ if self._local_cache_enabled and key in self._local_cache:
356
+ del self._local_cache[key]
357
+
358
+ return deleted
359
+
360
+ # Real Redis path
299
361
  if self._client is None:
300
362
  return False
301
- return bool(self._client.delete(key) > 0)
363
+
364
+ # Delete from Redis
365
+ result = bool(self._client.delete(key) > 0)
366
+
367
+ # Also remove from local cache if present
368
+ if self._local_cache_enabled and key in self._local_cache:
369
+ del self._local_cache[key]
370
+
371
+ return result
302
372
 
303
373
  def _keys(self, pattern: str) -> list[str]:
304
374
  """Get keys matching pattern"""
@@ -313,6 +383,58 @@ class RedisShortTermMemory:
313
383
  # Convert bytes to strings - needed for API return type
314
384
  return [k.decode() if isinstance(k, bytes) else str(k) for k in keys]
315
385
 
386
+ # === Local LRU Cache Methods ===
387
+
388
+ def _add_to_local_cache(self, key: str, value: str) -> None:
389
+ """Add entry to local cache with LRU eviction.
390
+
391
+ Args:
392
+ key: Cache key
393
+ value: Value to cache
394
+ """
395
+ now = time.time()
396
+
397
+ # Evict oldest entry if cache is full
398
+ if len(self._local_cache) >= self._local_cache_max_size:
399
+ # Find key with oldest last_access time
400
+ oldest_key = min(self._local_cache, key=lambda k: self._local_cache[k][2])
401
+ del self._local_cache[oldest_key]
402
+
403
+ # Add new entry: (value, timestamp, last_access)
404
+ self._local_cache[key] = (value, now, now)
405
+
406
+ def clear_local_cache(self) -> int:
407
+ """Clear all entries from local cache.
408
+
409
+ Returns:
410
+ Number of entries cleared
411
+ """
412
+ count = len(self._local_cache)
413
+ self._local_cache.clear()
414
+ self._local_cache_hits = 0
415
+ self._local_cache_misses = 0
416
+ logger.info("local_cache_cleared", entries_cleared=count)
417
+ return count
418
+
419
+ def get_local_cache_stats(self) -> dict:
420
+ """Get local cache performance statistics.
421
+
422
+ Returns:
423
+ Dict with cache stats (hits, misses, hit_rate, size)
424
+ """
425
+ total = self._local_cache_hits + self._local_cache_misses
426
+ hit_rate = (self._local_cache_hits / total * 100) if total > 0 else 0.0
427
+
428
+ return {
429
+ "enabled": self._local_cache_enabled,
430
+ "size": len(self._local_cache),
431
+ "max_size": self._local_cache_max_size,
432
+ "hits": self._local_cache_hits,
433
+ "misses": self._local_cache_misses,
434
+ "hit_rate": hit_rate,
435
+ "total_requests": total,
436
+ }
437
+
316
438
  # === Security Methods ===
317
439
 
318
440
  def _sanitize_data(self, data: Any) -> tuple[Any, int]:
@@ -96,6 +96,10 @@ class RedisConfig:
96
96
  retry_base_delay: float = 0.1 # seconds
97
97
  retry_max_delay: float = 2.0 # seconds
98
98
 
99
+ # Local LRU cache settings (two-tier caching)
100
+ local_cache_enabled: bool = True # Enable local memory cache (reduces Redis network I/O)
101
+ local_cache_size: int = 500 # Maximum number of cached keys (~50KB memory)
102
+
99
103
  # Sentinel settings (for HA)
100
104
  sentinel_hosts: list[tuple[str, int]] | None = None
101
105
  sentinel_master_name: str | None = None
@@ -209,11 +209,11 @@ class ModelRegistry:
209
209
  """Build tier and model ID caches for O(1) lookups."""
210
210
  # Cache for get_models_by_tier (tier -> list[ModelInfo])
211
211
  self._tier_cache: dict[str, list[ModelInfo]] = {}
212
- for tier in ModelTier:
213
- self._tier_cache[tier.value] = [
214
- provider_models[tier.value]
212
+ for tier_value in [t.value for t in ModelTier]:
213
+ self._tier_cache[tier_value] = [
214
+ provider_models[tier_value]
215
215
  for provider_models in self._registry.values()
216
- if tier.value in provider_models
216
+ if tier_value in provider_models
217
217
  ]
218
218
 
219
219
  # Cache for get_model_by_id (model_id -> ModelInfo)
@@ -470,8 +470,9 @@ class ProjectScanner:
470
470
  try:
471
471
  content = path.read_text(encoding="utf-8", errors="ignore")
472
472
  lines = content.split("\n")
473
- metrics["lines_of_code"] = len(
474
- [line for line in lines if line.strip() and not line.strip().startswith("#")],
473
+ # Use generator expression for memory efficiency (no intermediate list)
474
+ metrics["lines_of_code"] = sum(
475
+ 1 for line in lines if line.strip() and not line.strip().startswith("#")
475
476
  )
476
477
 
477
478
  # Optimization: Skip expensive AST analysis for test files
@@ -20,7 +20,7 @@ import hashlib
20
20
  import json
21
21
  import logging
22
22
  import math
23
- import random # Security Note: For A/B test simulation data, not cryptographic use
23
+ import random
24
24
  import time
25
25
  from dataclasses import dataclass, field
26
26
  from datetime import datetime