crackerjack 0.38.14__py3-none-any.whl → 0.39.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.
Potentially problematic release.
This version of crackerjack might be problematic. Click here for more details.
- crackerjack/__main__.py +134 -13
- crackerjack/agents/__init__.py +2 -0
- crackerjack/agents/base.py +1 -0
- crackerjack/agents/claude_code_bridge.py +319 -0
- crackerjack/agents/coordinator.py +6 -3
- crackerjack/agents/dry_agent.py +187 -3
- crackerjack/agents/enhanced_coordinator.py +279 -0
- crackerjack/agents/enhanced_proactive_agent.py +185 -0
- crackerjack/agents/performance_agent.py +324 -3
- crackerjack/agents/refactoring_agent.py +254 -5
- crackerjack/agents/semantic_agent.py +479 -0
- crackerjack/agents/semantic_helpers.py +356 -0
- crackerjack/cli/options.py +27 -0
- crackerjack/cli/semantic_handlers.py +290 -0
- crackerjack/core/async_workflow_orchestrator.py +9 -8
- crackerjack/core/enhanced_container.py +1 -1
- crackerjack/core/phase_coordinator.py +1 -1
- crackerjack/core/proactive_workflow.py +1 -1
- crackerjack/core/workflow_orchestrator.py +9 -6
- crackerjack/documentation/ai_templates.py +1 -1
- crackerjack/interactive.py +1 -1
- crackerjack/mcp/server_core.py +2 -0
- crackerjack/mcp/tools/__init__.py +2 -0
- crackerjack/mcp/tools/semantic_tools.py +584 -0
- crackerjack/models/semantic_models.py +271 -0
- crackerjack/plugins/loader.py +2 -2
- crackerjack/py313.py +4 -1
- crackerjack/services/embeddings.py +444 -0
- crackerjack/services/initialization.py +1 -1
- crackerjack/services/quality_intelligence.py +11 -1
- crackerjack/services/smart_scheduling.py +1 -1
- crackerjack/services/status_authentication.py +3 -3
- crackerjack/services/vector_store.py +681 -0
- crackerjack/slash_commands/run.md +84 -50
- {crackerjack-0.38.14.dist-info → crackerjack-0.39.0.dist-info}/METADATA +7 -2
- {crackerjack-0.38.14.dist-info → crackerjack-0.39.0.dist-info}/RECORD +39 -29
- {crackerjack-0.38.14.dist-info → crackerjack-0.39.0.dist-info}/WHEEL +0 -0
- {crackerjack-0.38.14.dist-info → crackerjack-0.39.0.dist-info}/entry_points.txt +0 -0
- {crackerjack-0.38.14.dist-info → crackerjack-0.39.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -110,7 +110,7 @@ class AsyncWorkflowPipeline:
|
|
|
110
110
|
|
|
111
111
|
result = await self.timeout_manager.with_timeout(
|
|
112
112
|
"file_operations",
|
|
113
|
-
asyncio.to_thread(self.phases.run_cleaning_phase, options),
|
|
113
|
+
asyncio.to_thread(self.phases.run_cleaning_phase, options),
|
|
114
114
|
strategy=TimeoutStrategy.RETRY_WITH_BACKOFF,
|
|
115
115
|
)
|
|
116
116
|
return bool(result)
|
|
@@ -262,7 +262,7 @@ class AsyncWorkflowPipeline:
|
|
|
262
262
|
async def _run_fast_hooks_async(self, options: OptionsProtocol) -> bool:
|
|
263
263
|
result = await self.timeout_manager.with_timeout(
|
|
264
264
|
"fast_hooks",
|
|
265
|
-
asyncio.to_thread(self.phases.run_fast_hooks_only, options),
|
|
265
|
+
asyncio.to_thread(self.phases.run_fast_hooks_only, options),
|
|
266
266
|
strategy=TimeoutStrategy.RETRY_WITH_BACKOFF,
|
|
267
267
|
)
|
|
268
268
|
return bool(result)
|
|
@@ -270,7 +270,7 @@ class AsyncWorkflowPipeline:
|
|
|
270
270
|
async def _run_comprehensive_hooks_async(self, options: OptionsProtocol) -> bool:
|
|
271
271
|
result = await self.timeout_manager.with_timeout(
|
|
272
272
|
"comprehensive_hooks",
|
|
273
|
-
asyncio.to_thread(self.phases.run_comprehensive_hooks_only, options),
|
|
273
|
+
asyncio.to_thread(self.phases.run_comprehensive_hooks_only, options),
|
|
274
274
|
strategy=TimeoutStrategy.GRACEFUL_DEGRADATION,
|
|
275
275
|
)
|
|
276
276
|
return bool(result)
|
|
@@ -278,7 +278,7 @@ class AsyncWorkflowPipeline:
|
|
|
278
278
|
async def _run_hooks_phase_async(self, options: OptionsProtocol) -> bool:
|
|
279
279
|
result = await self.timeout_manager.with_timeout(
|
|
280
280
|
"comprehensive_hooks",
|
|
281
|
-
asyncio.to_thread(self.phases.run_hooks_phase, options),
|
|
281
|
+
asyncio.to_thread(self.phases.run_hooks_phase, options),
|
|
282
282
|
strategy=TimeoutStrategy.GRACEFUL_DEGRADATION,
|
|
283
283
|
)
|
|
284
284
|
return bool(result)
|
|
@@ -286,7 +286,7 @@ class AsyncWorkflowPipeline:
|
|
|
286
286
|
async def _run_testing_phase_async(self, options: OptionsProtocol) -> bool:
|
|
287
287
|
result = await self.timeout_manager.with_timeout(
|
|
288
288
|
"test_execution",
|
|
289
|
-
asyncio.to_thread(self.phases.run_testing_phase, options),
|
|
289
|
+
asyncio.to_thread(self.phases.run_testing_phase, options),
|
|
290
290
|
strategy=TimeoutStrategy.GRACEFUL_DEGRADATION,
|
|
291
291
|
)
|
|
292
292
|
return bool(result)
|
|
@@ -507,7 +507,7 @@ class AsyncWorkflowPipeline:
|
|
|
507
507
|
try:
|
|
508
508
|
hook_results = await self.timeout_manager.with_timeout(
|
|
509
509
|
"comprehensive_hooks",
|
|
510
|
-
asyncio.to_thread(self.phases.hook_manager.run_comprehensive_hooks),
|
|
510
|
+
asyncio.to_thread(self.phases.hook_manager.run_comprehensive_hooks),
|
|
511
511
|
strategy=TimeoutStrategy.GRACEFUL_DEGRADATION,
|
|
512
512
|
)
|
|
513
513
|
|
|
@@ -573,10 +573,11 @@ class AsyncWorkflowPipeline:
|
|
|
573
573
|
|
|
574
574
|
def _create_agent_coordinator(self) -> t.Any:
|
|
575
575
|
from crackerjack.agents.base import AgentContext
|
|
576
|
-
from crackerjack.agents.
|
|
576
|
+
from crackerjack.agents.enhanced_coordinator import create_enhanced_coordinator
|
|
577
577
|
|
|
578
578
|
context = AgentContext(project_path=self.pkg_path)
|
|
579
|
-
|
|
579
|
+
# Use enhanced coordinator with Claude Code agent integration
|
|
580
|
+
return create_enhanced_coordinator(context=context, enable_external_agents=True)
|
|
580
581
|
|
|
581
582
|
def _report_fix_results(self, fix_result: FixResult, iteration: int) -> None:
|
|
582
583
|
if fix_result.success:
|
|
@@ -145,7 +145,7 @@ class DependencyResolver:
|
|
|
145
145
|
raise
|
|
146
146
|
|
|
147
147
|
def _build_constructor_kwargs(self, implementation: type) -> dict[str, Any]:
|
|
148
|
-
init_sig = inspect.signature(implementation
|
|
148
|
+
init_sig = inspect.signature(implementation)
|
|
149
149
|
kwargs: dict[str, Any] = {}
|
|
150
150
|
|
|
151
151
|
for param_name, param in init_sig.parameters.items():
|
|
@@ -626,7 +626,7 @@ class PhaseCoordinator(ErrorHandlingMixin):
|
|
|
626
626
|
return 2 if hook_type == "fast" else 1
|
|
627
627
|
|
|
628
628
|
def _has_hook_failures(self, summary: dict[str, t.Any]) -> bool:
|
|
629
|
-
return summary["failed"] > 0 or summary["errors"] > 0
|
|
629
|
+
return t.cast(int, summary["failed"]) > 0 or t.cast(int, summary["errors"]) > 0
|
|
630
630
|
|
|
631
631
|
def _should_retry_hooks(
|
|
632
632
|
self,
|
|
@@ -6,7 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from rich.console import Console
|
|
7
7
|
|
|
8
8
|
from crackerjack.agents.base import AgentContext, Issue, IssueType, Priority
|
|
9
|
-
from crackerjack.agents.
|
|
9
|
+
from crackerjack.agents.enhanced_coordinator import EnhancedAgentCoordinator
|
|
10
10
|
from crackerjack.models.protocols import OptionsProtocol
|
|
11
11
|
from crackerjack.services.debug import (
|
|
12
12
|
AIAgentDebugger,
|
|
@@ -1033,7 +1033,7 @@ class WorkflowPipeline:
|
|
|
1033
1033
|
|
|
1034
1034
|
async def _setup_ai_fixing_workflow(
|
|
1035
1035
|
self,
|
|
1036
|
-
) -> tuple[
|
|
1036
|
+
) -> tuple[EnhancedAgentCoordinator, list[t.Any]]:
|
|
1037
1037
|
agent_coordinator = self._setup_agent_coordinator()
|
|
1038
1038
|
issues = await self._collect_issues_from_failures()
|
|
1039
1039
|
return agent_coordinator, issues
|
|
@@ -1041,7 +1041,7 @@ class WorkflowPipeline:
|
|
|
1041
1041
|
async def _execute_ai_fixes(
|
|
1042
1042
|
self,
|
|
1043
1043
|
options: OptionsProtocol,
|
|
1044
|
-
agent_coordinator:
|
|
1044
|
+
agent_coordinator: EnhancedAgentCoordinator,
|
|
1045
1045
|
issues: list[t.Any],
|
|
1046
1046
|
) -> bool:
|
|
1047
1047
|
self.logger.info(f"AI agents will attempt to fix {len(issues)} issues")
|
|
@@ -1056,15 +1056,18 @@ class WorkflowPipeline:
|
|
|
1056
1056
|
details={"ai_agent": True},
|
|
1057
1057
|
)
|
|
1058
1058
|
|
|
1059
|
-
def _setup_agent_coordinator(self) ->
|
|
1060
|
-
from crackerjack.agents.
|
|
1059
|
+
def _setup_agent_coordinator(self) -> EnhancedAgentCoordinator:
|
|
1060
|
+
from crackerjack.agents.enhanced_coordinator import create_enhanced_coordinator
|
|
1061
1061
|
|
|
1062
1062
|
agent_context = AgentContext(
|
|
1063
1063
|
project_path=self.pkg_path,
|
|
1064
1064
|
session_id=getattr(self.session, "session_id", None),
|
|
1065
1065
|
)
|
|
1066
1066
|
|
|
1067
|
-
|
|
1067
|
+
# Use enhanced coordinator with Claude Code agent integration
|
|
1068
|
+
agent_coordinator = create_enhanced_coordinator(
|
|
1069
|
+
context=agent_context, enable_external_agents=True
|
|
1070
|
+
)
|
|
1068
1071
|
agent_coordinator.initialize_agents()
|
|
1069
1072
|
return agent_coordinator
|
|
1070
1073
|
|
|
@@ -523,7 +523,7 @@ class AITemplateEngine:
|
|
|
523
523
|
command_pattern = SAFE_PATTERNS[
|
|
524
524
|
"extract_bash_command_blocks"
|
|
525
525
|
]._get_compiled_pattern()
|
|
526
|
-
return command_pattern.sub(enhance_command_block, content)
|
|
526
|
+
return command_pattern.sub(enhance_command_block, content)
|
|
527
527
|
|
|
528
528
|
def _optimize_for_step_by_step(self, content: str, context: TemplateContext) -> str:
|
|
529
529
|
"""Optimize content for step-by-step processing.
|
crackerjack/interactive.py
CHANGED
|
@@ -422,7 +422,7 @@ class InteractiveCLI:
|
|
|
422
422
|
def create_dynamic_workflow(self, options: InteractiveWorkflowOptions) -> None:
|
|
423
423
|
builder = WorkflowBuilder(self.console)
|
|
424
424
|
|
|
425
|
-
workflow_steps = [
|
|
425
|
+
workflow_steps: list[t.Callable[[WorkflowBuilder, str], str]] = [
|
|
426
426
|
self._add_setup_phase,
|
|
427
427
|
self._add_config_phase,
|
|
428
428
|
partial(self._add_cleaning_phase, enabled=options.clean),
|
crackerjack/mcp/server_core.py
CHANGED
|
@@ -38,6 +38,7 @@ from .tools import (
|
|
|
38
38
|
register_monitoring_tools,
|
|
39
39
|
register_proactive_tools,
|
|
40
40
|
register_progress_tools,
|
|
41
|
+
register_semantic_tools,
|
|
41
42
|
register_utility_tools,
|
|
42
43
|
)
|
|
43
44
|
|
|
@@ -163,6 +164,7 @@ def create_mcp_server(config: dict[str, t.Any] | None = None) -> t.Any | None:
|
|
|
163
164
|
register_monitoring_tools(mcp_app)
|
|
164
165
|
register_progress_tools(mcp_app)
|
|
165
166
|
register_proactive_tools(mcp_app)
|
|
167
|
+
register_semantic_tools(mcp_app)
|
|
166
168
|
register_utility_tools(mcp_app)
|
|
167
169
|
|
|
168
170
|
return mcp_app
|
|
@@ -4,6 +4,7 @@ from .intelligence_tool_registry import register_intelligence_tools
|
|
|
4
4
|
from .monitoring_tools import register_monitoring_tools
|
|
5
5
|
from .proactive_tools import register_proactive_tools
|
|
6
6
|
from .progress_tools import register_progress_tools
|
|
7
|
+
from .semantic_tools import register_semantic_tools
|
|
7
8
|
from .utility_tools import register_utility_tools
|
|
8
9
|
|
|
9
10
|
__all__ = [
|
|
@@ -13,5 +14,6 @@ __all__ = [
|
|
|
13
14
|
"register_monitoring_tools",
|
|
14
15
|
"register_progress_tools",
|
|
15
16
|
"register_proactive_tools",
|
|
17
|
+
"register_semantic_tools",
|
|
16
18
|
"register_utility_tools",
|
|
17
19
|
]
|