attune-ai 2.1.4__py3-none-any.whl → 2.2.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 (123) hide show
  1. attune/cli/__init__.py +3 -55
  2. attune/cli/commands/batch.py +4 -12
  3. attune/cli/commands/cache.py +7 -15
  4. attune/cli/commands/provider.py +17 -0
  5. attune/cli/commands/routing.py +3 -1
  6. attune/cli/commands/setup.py +122 -0
  7. attune/cli/commands/tier.py +1 -3
  8. attune/cli/commands/workflow.py +31 -0
  9. attune/cli/parsers/cache.py +1 -0
  10. attune/cli/parsers/help.py +1 -3
  11. attune/cli/parsers/provider.py +7 -0
  12. attune/cli/parsers/routing.py +1 -3
  13. attune/cli/parsers/setup.py +7 -0
  14. attune/cli/parsers/status.py +1 -3
  15. attune/cli/parsers/tier.py +1 -3
  16. attune/cli_minimal.py +34 -28
  17. attune/cli_router.py +9 -7
  18. attune/cli_unified.py +3 -0
  19. attune/core.py +190 -0
  20. attune/dashboard/app.py +4 -2
  21. attune/dashboard/simple_server.py +3 -1
  22. attune/dashboard/standalone_server.py +7 -3
  23. attune/mcp/server.py +54 -102
  24. attune/memory/long_term.py +0 -2
  25. attune/memory/short_term/__init__.py +84 -0
  26. attune/memory/short_term/base.py +467 -0
  27. attune/memory/short_term/batch.py +219 -0
  28. attune/memory/short_term/caching.py +227 -0
  29. attune/memory/short_term/conflicts.py +265 -0
  30. attune/memory/short_term/cross_session.py +122 -0
  31. attune/memory/short_term/facade.py +655 -0
  32. attune/memory/short_term/pagination.py +215 -0
  33. attune/memory/short_term/patterns.py +271 -0
  34. attune/memory/short_term/pubsub.py +286 -0
  35. attune/memory/short_term/queues.py +244 -0
  36. attune/memory/short_term/security.py +300 -0
  37. attune/memory/short_term/sessions.py +250 -0
  38. attune/memory/short_term/streams.py +249 -0
  39. attune/memory/short_term/timelines.py +234 -0
  40. attune/memory/short_term/transactions.py +186 -0
  41. attune/memory/short_term/working.py +252 -0
  42. attune/meta_workflows/cli_commands/__init__.py +3 -0
  43. attune/meta_workflows/cli_commands/agent_commands.py +0 -4
  44. attune/meta_workflows/cli_commands/analytics_commands.py +0 -6
  45. attune/meta_workflows/cli_commands/config_commands.py +0 -5
  46. attune/meta_workflows/cli_commands/memory_commands.py +0 -5
  47. attune/meta_workflows/cli_commands/template_commands.py +0 -5
  48. attune/meta_workflows/cli_commands/workflow_commands.py +0 -6
  49. attune/meta_workflows/workflow.py +1 -1
  50. attune/models/adaptive_routing.py +4 -8
  51. attune/models/auth_cli.py +3 -9
  52. attune/models/auth_strategy.py +2 -4
  53. attune/models/provider_config.py +20 -1
  54. attune/models/telemetry/analytics.py +0 -2
  55. attune/models/telemetry/backend.py +0 -3
  56. attune/models/telemetry/storage.py +0 -2
  57. attune/orchestration/_strategies/__init__.py +156 -0
  58. attune/orchestration/_strategies/base.py +231 -0
  59. attune/orchestration/_strategies/conditional_strategies.py +373 -0
  60. attune/orchestration/_strategies/conditions.py +369 -0
  61. attune/orchestration/_strategies/core_strategies.py +491 -0
  62. attune/orchestration/_strategies/data_classes.py +64 -0
  63. attune/orchestration/_strategies/nesting.py +233 -0
  64. attune/orchestration/execution_strategies.py +58 -1567
  65. attune/orchestration/meta_orchestrator.py +1 -3
  66. attune/project_index/scanner.py +1 -3
  67. attune/project_index/scanner_parallel.py +7 -5
  68. attune/socratic_router.py +1 -3
  69. attune/telemetry/agent_coordination.py +9 -3
  70. attune/telemetry/agent_tracking.py +16 -3
  71. attune/telemetry/approval_gates.py +22 -5
  72. attune/telemetry/cli.py +3 -3
  73. attune/telemetry/commands/dashboard_commands.py +24 -8
  74. attune/telemetry/event_streaming.py +8 -2
  75. attune/telemetry/feedback_loop.py +10 -2
  76. attune/tools.py +1 -0
  77. attune/workflow_commands.py +1 -3
  78. attune/workflows/__init__.py +53 -10
  79. attune/workflows/autonomous_test_gen.py +160 -104
  80. attune/workflows/base.py +48 -664
  81. attune/workflows/batch_processing.py +2 -4
  82. attune/workflows/compat.py +156 -0
  83. attune/workflows/cost_mixin.py +141 -0
  84. attune/workflows/data_classes.py +92 -0
  85. attune/workflows/document_gen/workflow.py +11 -14
  86. attune/workflows/history.py +62 -37
  87. attune/workflows/llm_base.py +2 -4
  88. attune/workflows/migration.py +422 -0
  89. attune/workflows/output.py +3 -9
  90. attune/workflows/parsing_mixin.py +427 -0
  91. attune/workflows/perf_audit.py +3 -1
  92. attune/workflows/progress.py +10 -13
  93. attune/workflows/release_prep.py +5 -1
  94. attune/workflows/routing.py +0 -2
  95. attune/workflows/secure_release.py +2 -1
  96. attune/workflows/security_audit.py +19 -14
  97. attune/workflows/security_audit_phase3.py +28 -22
  98. attune/workflows/seo_optimization.py +29 -29
  99. attune/workflows/test_gen/test_templates.py +1 -4
  100. attune/workflows/test_gen/workflow.py +0 -2
  101. attune/workflows/test_gen_behavioral.py +7 -20
  102. attune/workflows/test_gen_parallel.py +6 -4
  103. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/METADATA +4 -3
  104. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/RECORD +119 -94
  105. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/entry_points.txt +0 -2
  106. attune_healthcare/monitors/monitoring/__init__.py +9 -9
  107. attune_llm/agent_factory/__init__.py +6 -6
  108. attune_llm/commands/__init__.py +10 -10
  109. attune_llm/commands/models.py +3 -3
  110. attune_llm/config/__init__.py +8 -8
  111. attune_llm/learning/__init__.py +3 -3
  112. attune_llm/learning/extractor.py +5 -3
  113. attune_llm/learning/storage.py +5 -3
  114. attune_llm/security/__init__.py +17 -17
  115. attune_llm/utils/tokens.py +3 -1
  116. attune/cli_legacy.py +0 -3957
  117. attune/memory/short_term.py +0 -2192
  118. attune/workflows/manage_docs.py +0 -87
  119. attune/workflows/test5.py +0 -125
  120. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/WHEEL +0 -0
  121. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/licenses/LICENSE +0 -0
  122. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/licenses/LICENSE_CHANGE_ANNOUNCEMENT.md +0 -0
  123. {attune_ai-2.1.4.dist-info → attune_ai-2.2.0.dist-info}/top_level.txt +0 -0
@@ -1,87 +0,0 @@
1
- """Manage documentation
2
-
3
- Stages:
4
- 1. process - Process
5
-
6
- Copyright 2025 Smart-AI-Memory
7
- Licensed under Fair Source License 0.9
8
- """
9
-
10
- import logging
11
- from typing import Any
12
-
13
- from attune.workflows.base import BaseWorkflow, ModelTier
14
-
15
- logger = logging.getLogger(__name__)
16
-
17
-
18
- class ManageDocsWorkflow(BaseWorkflow):
19
- """Manage documentation
20
-
21
-
22
- Usage:
23
- workflow = ManageDocsWorkflow()
24
- result = await workflow.execute(
25
- # Add parameters here
26
- )
27
- """
28
-
29
- name = "manage-docs"
30
- description = "Manage documentation"
31
- stages = ["process"]
32
- tier_map = {
33
- "process": ModelTier.CAPABLE,
34
- }
35
-
36
- def __init__(
37
- self,
38
- **kwargs: Any,
39
- ):
40
- """Initialize manage-docs workflow.
41
-
42
- Args:
43
- **kwargs: Additional arguments passed to BaseWorkflow
44
-
45
- """
46
- super().__init__(**kwargs)
47
-
48
- async def run_stage(
49
- self,
50
- stage_name: str,
51
- tier: ModelTier,
52
- input_data: Any,
53
- ) -> tuple[Any, int, int]:
54
- """Execute the single processing stage."""
55
- if stage_name == "process":
56
- return await self._process(input_data, tier)
57
- raise ValueError(f"Unknown stage: {stage_name}")
58
-
59
- async def _process(
60
- self,
61
- input_data: Any,
62
- tier: ModelTier,
63
- ) -> tuple[Any, int, int]:
64
- """Process the input data.
65
-
66
- Args:
67
- input_data: Input data to process
68
- tier: Model tier to use
69
-
70
- Returns:
71
- Tuple of (result, input_tokens, output_tokens)
72
-
73
- """
74
- # TODO: Implement processing logic
75
- prompt = f"Process this input: {input_data}"
76
-
77
- # Use LLM executor if available
78
- if self._executor:
79
- result = await self._executor.run(
80
- task_type="workflow_stage",
81
- prompt=prompt,
82
- tier=tier.to_unified() if hasattr(tier, "to_unified") else tier,
83
- )
84
- return result.content, result.input_tokens, result.output_tokens
85
-
86
- # Fallback to basic processing
87
- return {"result": "Processed", "input": input_data}, 0, 0
attune/workflows/test5.py DELETED
@@ -1,125 +0,0 @@
1
- """scan code for bugs or opportunities to improve the code and generate a detailed report.
2
-
3
- Stages:
4
- 1. analyze - Analyze
5
- 2. process - Process
6
- 3. test - Test
7
- 4. report - Report
8
-
9
- Copyright 2025 Smart-AI-Memory
10
- Licensed under Fair Source License 0.9
11
- """
12
-
13
- import logging
14
- from typing import Any
15
-
16
- from attune.workflows.base import BaseWorkflow, ModelTier
17
-
18
- logger = logging.getLogger(__name__)
19
-
20
-
21
- class Test5Workflow(BaseWorkflow):
22
- """scan code for bugs or opportunities to improve the code and generate a detailed report.
23
-
24
-
25
- Usage:
26
- workflow = Test5Workflow()
27
- result = await workflow.execute(
28
- # Add parameters here
29
- )
30
- """
31
-
32
- name = "test5"
33
- description = (
34
- "scan code for bugs or opportunities to improve the code and generate a detailed report."
35
- )
36
- stages = ["analyze", "fix"]
37
- tier_map = {
38
- "analyze": ModelTier.CAPABLE,
39
- "fix": ModelTier.CAPABLE,
40
- }
41
-
42
- def __init__(
43
- self,
44
- **kwargs: Any,
45
- ):
46
- """Initialize test5 workflow.
47
-
48
- Args:
49
- **kwargs: Additional arguments passed to BaseWorkflow
50
-
51
- """
52
- super().__init__(**kwargs)
53
- self._crew: Any = None
54
- self._crew_available = False
55
-
56
- async def _initialize_crew(self) -> None:
57
- """Initialize the Refactoring Crew."""
58
- if self._crew is not None:
59
- return
60
-
61
- try:
62
- from attune_llm.agent_factory.crews.refactoring import RefactoringCrew
63
-
64
- self._crew = RefactoringCrew()
65
- self._crew_available = True
66
- logger.info("RefactoringCrew initialized successfully")
67
- except ImportError as e:
68
- logger.warning(f"RefactoringCrew not available: {e}")
69
- self._crew_available = False
70
-
71
- async def run_stage(
72
- self,
73
- stage_name: str,
74
- tier: ModelTier,
75
- input_data: Any,
76
- ) -> tuple[Any, int, int]:
77
- """Execute RefactoringCrew for the given stage."""
78
- await self._initialize_crew()
79
-
80
- if not self._crew_available:
81
- return {"error": "Crew not available"}, 0, 0
82
-
83
- try:
84
- if stage_name == "analyze":
85
- # Use RefactoringCrew's analyze method
86
- result = await self._crew.analyze(
87
- code=input_data.get("code", ""), file_path=input_data.get("path", ".")
88
- )
89
-
90
- return (
91
- {
92
- "findings": [
93
- {
94
- "title": f.title,
95
- "description": f.description,
96
- "category": f.category.value,
97
- "severity": f.severity.value,
98
- "file": f.file_path,
99
- "lines": f"{f.start_line}-{f.end_line}",
100
- }
101
- for f in result.findings
102
- ],
103
- "summary": f"Found {len(result.findings)} refactoring opportunities",
104
- },
105
- 0,
106
- 0,
107
- )
108
-
109
- elif stage_name == "fix":
110
- # Apply refactorings (placeholder for now)
111
- return (
112
- {
113
- "status": "Refactoring recommendations ready",
114
- "message": "Review findings from analyze stage to apply fixes",
115
- },
116
- 0,
117
- 0,
118
- )
119
-
120
- else:
121
- return {"error": f"Unknown stage: {stage_name}"}, 0, 0
122
-
123
- except Exception as e:
124
- logger.error(f"Crew execution failed: {e}")
125
- return {"error": str(e)}, 0, 0