empathy-framework 4.6.2__py3-none-any.whl → 4.6.3__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 (53) hide show
  1. {empathy_framework-4.6.2.dist-info → empathy_framework-4.6.3.dist-info}/METADATA +1 -1
  2. {empathy_framework-4.6.2.dist-info → empathy_framework-4.6.3.dist-info}/RECORD +53 -20
  3. {empathy_framework-4.6.2.dist-info → empathy_framework-4.6.3.dist-info}/WHEEL +1 -1
  4. empathy_os/__init__.py +1 -1
  5. empathy_os/cli.py +361 -32
  6. empathy_os/config/xml_config.py +8 -3
  7. empathy_os/core.py +37 -4
  8. empathy_os/leverage_points.py +2 -1
  9. empathy_os/memory/short_term.py +45 -1
  10. empathy_os/meta_workflows/agent_creator 2.py +254 -0
  11. empathy_os/meta_workflows/builtin_templates 2.py +567 -0
  12. empathy_os/meta_workflows/cli_meta_workflows 2.py +1551 -0
  13. empathy_os/meta_workflows/form_engine 2.py +304 -0
  14. empathy_os/meta_workflows/intent_detector 2.py +298 -0
  15. empathy_os/meta_workflows/pattern_learner 2.py +754 -0
  16. empathy_os/meta_workflows/session_context 2.py +398 -0
  17. empathy_os/meta_workflows/template_registry 2.py +229 -0
  18. empathy_os/meta_workflows/workflow 2.py +980 -0
  19. empathy_os/models/token_estimator.py +16 -9
  20. empathy_os/models/validation.py +7 -1
  21. empathy_os/orchestration/pattern_learner 2.py +699 -0
  22. empathy_os/orchestration/real_tools 2.py +938 -0
  23. empathy_os/orchestration/real_tools.py +4 -2
  24. empathy_os/socratic/__init__ 2.py +273 -0
  25. empathy_os/socratic/ab_testing 2.py +969 -0
  26. empathy_os/socratic/blueprint 2.py +532 -0
  27. empathy_os/socratic/cli 2.py +689 -0
  28. empathy_os/socratic/collaboration 2.py +1112 -0
  29. empathy_os/socratic/domain_templates 2.py +916 -0
  30. empathy_os/socratic/embeddings 2.py +734 -0
  31. empathy_os/socratic/engine 2.py +729 -0
  32. empathy_os/socratic/explainer 2.py +663 -0
  33. empathy_os/socratic/feedback 2.py +767 -0
  34. empathy_os/socratic/forms 2.py +624 -0
  35. empathy_os/socratic/generator 2.py +716 -0
  36. empathy_os/socratic/llm_analyzer 2.py +635 -0
  37. empathy_os/socratic/mcp_server 2.py +751 -0
  38. empathy_os/socratic/session 2.py +306 -0
  39. empathy_os/socratic/storage 2.py +635 -0
  40. empathy_os/socratic/storage.py +2 -1
  41. empathy_os/socratic/success 2.py +719 -0
  42. empathy_os/socratic/visual_editor 2.py +812 -0
  43. empathy_os/socratic/web_ui 2.py +925 -0
  44. empathy_os/tier_recommender.py +5 -2
  45. empathy_os/workflow_commands.py +11 -6
  46. empathy_os/workflows/base.py +1 -1
  47. empathy_os/workflows/batch_processing 2.py +310 -0
  48. empathy_os/workflows/release_prep_crew 2.py +968 -0
  49. empathy_os/workflows/test_coverage_boost_crew 2.py +848 -0
  50. empathy_os/workflows/test_maintenance.py +3 -2
  51. {empathy_framework-4.6.2.dist-info → empathy_framework-4.6.3.dist-info}/entry_points.txt +0 -0
  52. {empathy_framework-4.6.2.dist-info → empathy_framework-4.6.3.dist-info}/licenses/LICENSE +0 -0
  53. {empathy_framework-4.6.2.dist-info → empathy_framework-4.6.3.dist-info}/top_level.txt +0 -0
@@ -627,8 +627,10 @@ class RealSecurityAuditor:
627
627
  except json.JSONDecodeError as e:
628
628
  # Bandit might not be installed or JSON output malformed
629
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]}")
630
+ stdout = result.stdout if isinstance(result.stdout, str) else ""
631
+ stderr = result.stderr if isinstance(result.stderr, str) else ""
632
+ logger.debug(f"Bandit stdout: {stdout[:500]}")
633
+ logger.debug(f"Bandit stderr: {stderr[:500]}")
632
634
  return SecurityReport(
633
635
  total_issues=0,
634
636
  critical_count=0,
@@ -0,0 +1,273 @@
1
+ """Socratic Agent Generation System
2
+
3
+ Generate optimized agent workflows through guided questioning.
4
+
5
+ This module provides a Socratic approach to agent generation where:
6
+ 1. User provides a free-form goal
7
+ 2. System asks clarifying questions to understand requirements
8
+ 3. Agents and workflows are generated based on refined understanding
9
+ 4. Success criteria are defined for measuring completion
10
+
11
+ Example:
12
+ >>> from empathy_os.socratic import SocraticWorkflowBuilder
13
+ >>>
14
+ >>> builder = SocraticWorkflowBuilder()
15
+ >>> session = builder.start_session("I want to automate code reviews")
16
+ >>>
17
+ >>> # Get clarifying questions
18
+ >>> form = builder.get_next_questions(session)
19
+ >>> print(form.questions[0].text)
20
+ "What programming languages does your team primarily use?"
21
+ >>>
22
+ >>> # Answer questions
23
+ >>> session = builder.submit_answers(session, {
24
+ ... "languages": ["python", "typescript"],
25
+ ... "focus_areas": ["security", "performance"]
26
+ ... })
27
+ >>>
28
+ >>> # Generate workflow when ready
29
+ >>> if builder.is_ready_to_generate(session):
30
+ ... workflow = builder.generate_workflow(session)
31
+ ... print(f"Generated {len(workflow.agents)} agents")
32
+
33
+ Copyright 2026 Smart-AI-Memory
34
+ Licensed under Fair Source License 0.9
35
+ """
36
+
37
+ # A/B testing
38
+ from .ab_testing import (
39
+ AllocationStrategy,
40
+ Experiment,
41
+ ExperimentManager,
42
+ ExperimentResult,
43
+ Variant,
44
+ WorkflowABTester,
45
+ )
46
+ from .blueprint import (
47
+ AgentBlueprint,
48
+ AgentSpec,
49
+ ToolSpec,
50
+ WorkflowBlueprint,
51
+ )
52
+
53
+ # CLI interface
54
+ from .cli import Console, SocraticCLI
55
+
56
+ # Collaboration
57
+ from .collaboration import (
58
+ Change,
59
+ ChangeType,
60
+ CollaborationManager,
61
+ CollaborativeSession,
62
+ Comment,
63
+ InvitationManager,
64
+ Participant,
65
+ ParticipantRole,
66
+ SyncAdapter,
67
+ Vote,
68
+ VoteType,
69
+ VotingResult,
70
+ )
71
+
72
+ # Domain templates
73
+ from .domain_templates import (
74
+ AgentTemplate,
75
+ Domain,
76
+ DomainTemplate,
77
+ DomainTemplateRegistry,
78
+ WorkflowTemplate,
79
+ get_registry,
80
+ )
81
+
82
+ # Vector embeddings for semantic matching
83
+ from .embeddings import (
84
+ AnthropicEmbeddingProvider,
85
+ EmbeddedGoal,
86
+ EmbeddingProvider,
87
+ SemanticGoalMatcher,
88
+ SimilarityResult,
89
+ TFIDFEmbeddingProvider,
90
+ VectorStore,
91
+ )
92
+ from .engine import SocraticWorkflowBuilder
93
+
94
+ # Workflow explainer
95
+ from .explainer import (
96
+ AudienceLevel,
97
+ DetailLevel,
98
+ Explanation,
99
+ LLMExplanationGenerator,
100
+ OutputFormat,
101
+ WorkflowExplainer,
102
+ explain_workflow,
103
+ )
104
+
105
+ # Feedback loop
106
+ from .feedback import (
107
+ AdaptiveAgentGenerator,
108
+ AgentPerformance,
109
+ FeedbackCollector,
110
+ FeedbackLoop,
111
+ WorkflowPattern,
112
+ )
113
+ from .forms import (
114
+ FieldType,
115
+ Form,
116
+ FormField,
117
+ FormResponse,
118
+ ValidationResult,
119
+ )
120
+ from .generator import AgentGenerator
121
+
122
+ # LLM-powered analysis
123
+ from .llm_analyzer import (
124
+ LLMAgentRecommendation,
125
+ LLMAnalysisResult,
126
+ LLMGoalAnalyzer,
127
+ LLMQuestionResult,
128
+ llm_questions_to_form,
129
+ )
130
+
131
+ # MCP server
132
+ from .mcp_server import SOCRATIC_TOOLS, SocraticMCPServer
133
+ from .session import SessionState, SocraticSession
134
+
135
+ # Persistent storage
136
+ from .storage import (
137
+ JSONFileStorage,
138
+ SQLiteStorage,
139
+ StorageBackend,
140
+ StorageManager,
141
+ )
142
+ from .success import MetricType, SuccessCriteria, SuccessMetric
143
+
144
+ # Visual editor
145
+ from .visual_editor import (
146
+ ASCIIVisualizer,
147
+ EditorEdge,
148
+ EditorNode,
149
+ EditorState,
150
+ VisualWorkflowEditor,
151
+ WorkflowVisualizer,
152
+ generate_editor_html,
153
+ generate_react_flow_schema,
154
+ )
155
+
156
+ # Web UI components
157
+ from .web_ui import (
158
+ ReactBlueprintSchema,
159
+ ReactFormSchema,
160
+ ReactSessionSchema,
161
+ create_blueprint_response,
162
+ create_form_response,
163
+ render_complete_page,
164
+ render_form_html,
165
+ )
166
+
167
+ __all__ = [
168
+ # Core engine
169
+ "SocraticWorkflowBuilder",
170
+ # Forms
171
+ "Form",
172
+ "FormField",
173
+ "FieldType",
174
+ "FormResponse",
175
+ "ValidationResult",
176
+ # Blueprints
177
+ "AgentBlueprint",
178
+ "AgentSpec",
179
+ "WorkflowBlueprint",
180
+ "ToolSpec",
181
+ # Generation
182
+ "AgentGenerator",
183
+ # Success measurement
184
+ "SuccessCriteria",
185
+ "SuccessMetric",
186
+ "MetricType",
187
+ # Session
188
+ "SocraticSession",
189
+ "SessionState",
190
+ # LLM-powered analysis
191
+ "LLMGoalAnalyzer",
192
+ "LLMAnalysisResult",
193
+ "LLMQuestionResult",
194
+ "LLMAgentRecommendation",
195
+ "llm_questions_to_form",
196
+ # Persistent storage
197
+ "StorageBackend",
198
+ "JSONFileStorage",
199
+ "SQLiteStorage",
200
+ "StorageManager",
201
+ # CLI interface
202
+ "SocraticCLI",
203
+ "Console",
204
+ # Web UI components
205
+ "ReactFormSchema",
206
+ "ReactSessionSchema",
207
+ "ReactBlueprintSchema",
208
+ "render_form_html",
209
+ "render_complete_page",
210
+ "create_form_response",
211
+ "create_blueprint_response",
212
+ # Feedback loop
213
+ "FeedbackLoop",
214
+ "FeedbackCollector",
215
+ "AdaptiveAgentGenerator",
216
+ "AgentPerformance",
217
+ "WorkflowPattern",
218
+ # MCP server
219
+ "SocraticMCPServer",
220
+ "SOCRATIC_TOOLS",
221
+ # Vector embeddings
222
+ "VectorStore",
223
+ "SemanticGoalMatcher",
224
+ "EmbeddingProvider",
225
+ "TFIDFEmbeddingProvider",
226
+ "AnthropicEmbeddingProvider",
227
+ "EmbeddedGoal",
228
+ "SimilarityResult",
229
+ # A/B testing
230
+ "ExperimentManager",
231
+ "WorkflowABTester",
232
+ "Experiment",
233
+ "Variant",
234
+ "ExperimentResult",
235
+ "AllocationStrategy",
236
+ # Domain templates
237
+ "DomainTemplateRegistry",
238
+ "Domain",
239
+ "AgentTemplate",
240
+ "WorkflowTemplate",
241
+ "DomainTemplate",
242
+ "get_registry",
243
+ # Visual editor
244
+ "VisualWorkflowEditor",
245
+ "ASCIIVisualizer",
246
+ "WorkflowVisualizer",
247
+ "EditorState",
248
+ "EditorNode",
249
+ "EditorEdge",
250
+ "generate_react_flow_schema",
251
+ "generate_editor_html",
252
+ # Workflow explainer
253
+ "WorkflowExplainer",
254
+ "LLMExplanationGenerator",
255
+ "Explanation",
256
+ "AudienceLevel",
257
+ "DetailLevel",
258
+ "OutputFormat",
259
+ "explain_workflow",
260
+ # Collaboration
261
+ "CollaborationManager",
262
+ "CollaborativeSession",
263
+ "Participant",
264
+ "ParticipantRole",
265
+ "Comment",
266
+ "Vote",
267
+ "VoteType",
268
+ "Change",
269
+ "ChangeType",
270
+ "VotingResult",
271
+ "InvitationManager",
272
+ "SyncAdapter",
273
+ ]