crackerjack 0.32.0__py3-none-any.whl → 0.33.1__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 +1350 -34
- crackerjack/adapters/__init__.py +17 -0
- crackerjack/adapters/lsp_client.py +358 -0
- crackerjack/adapters/rust_tool_adapter.py +194 -0
- crackerjack/adapters/rust_tool_manager.py +193 -0
- crackerjack/adapters/skylos_adapter.py +231 -0
- crackerjack/adapters/zuban_adapter.py +560 -0
- crackerjack/agents/base.py +7 -3
- crackerjack/agents/coordinator.py +271 -33
- crackerjack/agents/documentation_agent.py +9 -15
- crackerjack/agents/dry_agent.py +3 -15
- crackerjack/agents/formatting_agent.py +1 -1
- crackerjack/agents/import_optimization_agent.py +36 -180
- crackerjack/agents/performance_agent.py +17 -98
- crackerjack/agents/performance_helpers.py +7 -31
- crackerjack/agents/proactive_agent.py +1 -3
- crackerjack/agents/refactoring_agent.py +16 -85
- crackerjack/agents/refactoring_helpers.py +7 -42
- crackerjack/agents/security_agent.py +9 -48
- crackerjack/agents/test_creation_agent.py +356 -513
- crackerjack/agents/test_specialist_agent.py +0 -4
- crackerjack/api.py +6 -25
- crackerjack/cli/cache_handlers.py +204 -0
- crackerjack/cli/cache_handlers_enhanced.py +683 -0
- crackerjack/cli/facade.py +100 -0
- crackerjack/cli/handlers.py +224 -9
- crackerjack/cli/interactive.py +6 -4
- crackerjack/cli/options.py +642 -55
- crackerjack/cli/utils.py +2 -1
- crackerjack/code_cleaner.py +58 -117
- crackerjack/config/global_lock_config.py +8 -48
- crackerjack/config/hooks.py +53 -62
- crackerjack/core/async_workflow_orchestrator.py +24 -34
- crackerjack/core/autofix_coordinator.py +3 -17
- crackerjack/core/enhanced_container.py +64 -6
- crackerjack/core/file_lifecycle.py +12 -89
- crackerjack/core/performance.py +2 -2
- crackerjack/core/performance_monitor.py +15 -55
- crackerjack/core/phase_coordinator.py +257 -218
- crackerjack/core/resource_manager.py +14 -90
- crackerjack/core/service_watchdog.py +62 -95
- crackerjack/core/session_coordinator.py +149 -0
- crackerjack/core/timeout_manager.py +14 -72
- crackerjack/core/websocket_lifecycle.py +13 -78
- crackerjack/core/workflow_orchestrator.py +558 -240
- crackerjack/docs/INDEX.md +11 -0
- crackerjack/docs/generated/api/API_REFERENCE.md +10895 -0
- crackerjack/docs/generated/api/CLI_REFERENCE.md +109 -0
- crackerjack/docs/generated/api/CROSS_REFERENCES.md +1755 -0
- crackerjack/docs/generated/api/PROTOCOLS.md +3 -0
- crackerjack/docs/generated/api/SERVICES.md +1252 -0
- crackerjack/documentation/__init__.py +31 -0
- crackerjack/documentation/ai_templates.py +756 -0
- crackerjack/documentation/dual_output_generator.py +765 -0
- crackerjack/documentation/mkdocs_integration.py +518 -0
- crackerjack/documentation/reference_generator.py +977 -0
- crackerjack/dynamic_config.py +55 -50
- crackerjack/executors/async_hook_executor.py +10 -15
- crackerjack/executors/cached_hook_executor.py +117 -43
- crackerjack/executors/hook_executor.py +8 -34
- crackerjack/executors/hook_lock_manager.py +26 -183
- crackerjack/executors/individual_hook_executor.py +13 -11
- crackerjack/executors/lsp_aware_hook_executor.py +270 -0
- crackerjack/executors/tool_proxy.py +417 -0
- crackerjack/hooks/lsp_hook.py +79 -0
- crackerjack/intelligence/adaptive_learning.py +25 -10
- crackerjack/intelligence/agent_orchestrator.py +2 -5
- crackerjack/intelligence/agent_registry.py +34 -24
- crackerjack/intelligence/agent_selector.py +5 -7
- crackerjack/interactive.py +17 -6
- crackerjack/managers/async_hook_manager.py +0 -1
- crackerjack/managers/hook_manager.py +79 -1
- crackerjack/managers/publish_manager.py +66 -13
- crackerjack/managers/test_command_builder.py +5 -17
- crackerjack/managers/test_executor.py +1 -3
- crackerjack/managers/test_manager.py +109 -7
- crackerjack/managers/test_manager_backup.py +10 -9
- crackerjack/mcp/cache.py +2 -2
- crackerjack/mcp/client_runner.py +1 -1
- crackerjack/mcp/context.py +191 -68
- crackerjack/mcp/dashboard.py +7 -5
- crackerjack/mcp/enhanced_progress_monitor.py +31 -28
- crackerjack/mcp/file_monitor.py +30 -23
- crackerjack/mcp/progress_components.py +31 -21
- crackerjack/mcp/progress_monitor.py +50 -53
- crackerjack/mcp/rate_limiter.py +6 -6
- crackerjack/mcp/server_core.py +161 -32
- crackerjack/mcp/service_watchdog.py +2 -1
- crackerjack/mcp/state.py +4 -7
- crackerjack/mcp/task_manager.py +11 -9
- crackerjack/mcp/tools/core_tools.py +174 -33
- crackerjack/mcp/tools/error_analyzer.py +3 -2
- crackerjack/mcp/tools/execution_tools.py +15 -12
- crackerjack/mcp/tools/execution_tools_backup.py +42 -30
- crackerjack/mcp/tools/intelligence_tool_registry.py +7 -5
- crackerjack/mcp/tools/intelligence_tools.py +5 -2
- crackerjack/mcp/tools/monitoring_tools.py +33 -70
- crackerjack/mcp/tools/proactive_tools.py +24 -11
- crackerjack/mcp/tools/progress_tools.py +5 -8
- crackerjack/mcp/tools/utility_tools.py +20 -14
- crackerjack/mcp/tools/workflow_executor.py +62 -40
- crackerjack/mcp/websocket/app.py +8 -0
- crackerjack/mcp/websocket/endpoints.py +352 -357
- crackerjack/mcp/websocket/jobs.py +40 -57
- crackerjack/mcp/websocket/monitoring_endpoints.py +2935 -0
- crackerjack/mcp/websocket/server.py +7 -25
- crackerjack/mcp/websocket/websocket_handler.py +6 -17
- crackerjack/mixins/__init__.py +3 -0
- crackerjack/mixins/error_handling.py +145 -0
- crackerjack/models/config.py +21 -1
- crackerjack/models/config_adapter.py +49 -1
- crackerjack/models/protocols.py +176 -107
- crackerjack/models/resource_protocols.py +55 -210
- crackerjack/models/task.py +3 -0
- crackerjack/monitoring/ai_agent_watchdog.py +13 -13
- crackerjack/monitoring/metrics_collector.py +426 -0
- crackerjack/monitoring/regression_prevention.py +8 -8
- crackerjack/monitoring/websocket_server.py +643 -0
- crackerjack/orchestration/advanced_orchestrator.py +11 -6
- crackerjack/orchestration/coverage_improvement.py +3 -3
- crackerjack/orchestration/execution_strategies.py +26 -6
- crackerjack/orchestration/test_progress_streamer.py +8 -5
- crackerjack/plugins/base.py +2 -2
- crackerjack/plugins/hooks.py +7 -0
- crackerjack/plugins/managers.py +11 -8
- crackerjack/security/__init__.py +0 -1
- crackerjack/security/audit.py +90 -105
- crackerjack/services/anomaly_detector.py +392 -0
- crackerjack/services/api_extractor.py +615 -0
- crackerjack/services/backup_service.py +2 -2
- crackerjack/services/bounded_status_operations.py +15 -152
- crackerjack/services/cache.py +127 -1
- crackerjack/services/changelog_automation.py +395 -0
- crackerjack/services/config.py +18 -11
- crackerjack/services/config_merge.py +30 -85
- crackerjack/services/config_template.py +506 -0
- crackerjack/services/contextual_ai_assistant.py +48 -22
- crackerjack/services/coverage_badge_service.py +171 -0
- crackerjack/services/coverage_ratchet.py +41 -17
- crackerjack/services/debug.py +3 -3
- crackerjack/services/dependency_analyzer.py +460 -0
- crackerjack/services/dependency_monitor.py +14 -11
- crackerjack/services/documentation_generator.py +491 -0
- crackerjack/services/documentation_service.py +675 -0
- crackerjack/services/enhanced_filesystem.py +6 -5
- crackerjack/services/enterprise_optimizer.py +865 -0
- crackerjack/services/error_pattern_analyzer.py +676 -0
- crackerjack/services/file_hasher.py +1 -1
- crackerjack/services/git.py +41 -45
- crackerjack/services/health_metrics.py +10 -8
- crackerjack/services/heatmap_generator.py +735 -0
- crackerjack/services/initialization.py +30 -33
- crackerjack/services/input_validator.py +5 -97
- crackerjack/services/intelligent_commit.py +327 -0
- crackerjack/services/log_manager.py +15 -12
- crackerjack/services/logging.py +4 -3
- crackerjack/services/lsp_client.py +628 -0
- crackerjack/services/memory_optimizer.py +409 -0
- crackerjack/services/metrics.py +42 -33
- crackerjack/services/parallel_executor.py +416 -0
- crackerjack/services/pattern_cache.py +1 -1
- crackerjack/services/pattern_detector.py +6 -6
- crackerjack/services/performance_benchmarks.py +250 -576
- crackerjack/services/performance_cache.py +382 -0
- crackerjack/services/performance_monitor.py +565 -0
- crackerjack/services/predictive_analytics.py +510 -0
- crackerjack/services/quality_baseline.py +234 -0
- crackerjack/services/quality_baseline_enhanced.py +646 -0
- crackerjack/services/quality_intelligence.py +785 -0
- crackerjack/services/regex_patterns.py +605 -524
- crackerjack/services/regex_utils.py +43 -123
- crackerjack/services/secure_path_utils.py +5 -164
- crackerjack/services/secure_status_formatter.py +30 -141
- crackerjack/services/secure_subprocess.py +11 -92
- crackerjack/services/security.py +61 -30
- crackerjack/services/security_logger.py +18 -22
- crackerjack/services/server_manager.py +124 -16
- crackerjack/services/status_authentication.py +16 -159
- crackerjack/services/status_security_manager.py +4 -131
- crackerjack/services/terminal_utils.py +0 -0
- crackerjack/services/thread_safe_status_collector.py +19 -125
- crackerjack/services/unified_config.py +21 -13
- crackerjack/services/validation_rate_limiter.py +5 -54
- crackerjack/services/version_analyzer.py +459 -0
- crackerjack/services/version_checker.py +1 -1
- crackerjack/services/websocket_resource_limiter.py +10 -144
- crackerjack/services/zuban_lsp_service.py +390 -0
- crackerjack/slash_commands/__init__.py +2 -7
- crackerjack/slash_commands/run.md +2 -2
- crackerjack/tools/validate_input_validator_patterns.py +14 -40
- crackerjack/tools/validate_regex_patterns.py +19 -48
- {crackerjack-0.32.0.dist-info → crackerjack-0.33.1.dist-info}/METADATA +197 -26
- crackerjack-0.33.1.dist-info/RECORD +229 -0
- crackerjack/CLAUDE.md +0 -207
- crackerjack/RULES.md +0 -380
- crackerjack/py313.py +0 -234
- crackerjack-0.32.0.dist-info/RECORD +0 -180
- {crackerjack-0.32.0.dist-info → crackerjack-0.33.1.dist-info}/WHEEL +0 -0
- {crackerjack-0.32.0.dist-info → crackerjack-0.33.1.dist-info}/entry_points.txt +0 -0
- {crackerjack-0.32.0.dist-info → crackerjack-0.33.1.dist-info}/licenses/LICENSE +0 -0
crackerjack/models/protocols.py
CHANGED
|
@@ -51,6 +51,10 @@ class OptionsProtocol(t.Protocol):
|
|
|
51
51
|
global_lock_timeout: int = 600
|
|
52
52
|
global_lock_cleanup: bool = True
|
|
53
53
|
global_lock_dir: str | None = None
|
|
54
|
+
generate_docs: bool = False
|
|
55
|
+
docs_format: str = "markdown"
|
|
56
|
+
validate_docs: bool = False
|
|
57
|
+
update_docs_index: bool = False
|
|
54
58
|
|
|
55
59
|
|
|
56
60
|
@t.runtime_checkable
|
|
@@ -77,6 +81,8 @@ class GitInterface(t.Protocol):
|
|
|
77
81
|
|
|
78
82
|
def get_changed_files(self) -> list[str]: ...
|
|
79
83
|
|
|
84
|
+
def get_staged_files(self) -> list[str]: ...
|
|
85
|
+
|
|
80
86
|
def commit(self, message: str) -> bool: ...
|
|
81
87
|
|
|
82
88
|
def push(self) -> bool: ...
|
|
@@ -105,43 +111,72 @@ class HookManager(t.Protocol):
|
|
|
105
111
|
|
|
106
112
|
@t.runtime_checkable
|
|
107
113
|
class SecurityAwareHookManager(HookManager, t.Protocol):
|
|
108
|
-
|
|
114
|
+
def get_security_critical_failures(self, results: list[t.Any]) -> list[t.Any]: ...
|
|
115
|
+
|
|
116
|
+
def has_security_critical_failures(self, results: list[t.Any]) -> bool: ...
|
|
109
117
|
|
|
110
|
-
def
|
|
111
|
-
|
|
118
|
+
def get_security_audit_report(
|
|
119
|
+
self, fast_results: list[t.Any], comprehensive_results: list[t.Any]
|
|
120
|
+
) -> dict[str, t.Any]: ...
|
|
112
121
|
|
|
113
|
-
Args:
|
|
114
|
-
results: List of hook results from run_fast_hooks or run_comprehensive_hooks
|
|
115
122
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
...
|
|
123
|
+
@t.runtime_checkable
|
|
124
|
+
class CoverageRatchetProtocol(t.Protocol):
|
|
125
|
+
def get_baseline_coverage(self) -> float: ...
|
|
120
126
|
|
|
121
|
-
def
|
|
122
|
-
"""Check if any security-critical hooks failed.
|
|
127
|
+
def update_baseline_coverage(self, new_coverage: float) -> bool: ...
|
|
123
128
|
|
|
124
|
-
|
|
125
|
-
results: List of hook results
|
|
129
|
+
def is_coverage_regression(self, current_coverage: float) -> bool: ...
|
|
126
130
|
|
|
127
|
-
|
|
128
|
-
True if any CRITICAL security level hooks failed
|
|
129
|
-
"""
|
|
130
|
-
...
|
|
131
|
+
def get_coverage_improvement_needed(self) -> float: ...
|
|
131
132
|
|
|
132
|
-
def
|
|
133
|
-
self, fast_results: list[t.Any], comprehensive_results: list[t.Any]
|
|
134
|
-
) -> dict[str, t.Any]:
|
|
135
|
-
"""Generate security audit report for publishing decisions.
|
|
133
|
+
def get_status_report(self) -> dict[str, t.Any]: ...
|
|
136
134
|
|
|
137
|
-
|
|
138
|
-
fast_results: Results from fast hooks
|
|
139
|
-
comprehensive_results: Results from comprehensive hooks
|
|
135
|
+
def get_coverage_report(self) -> str | None: ...
|
|
140
136
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
def check_and_update_coverage(self) -> dict[str, t.Any]: ...
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
@t.runtime_checkable
|
|
141
|
+
class ConfigurationServiceProtocol(t.Protocol):
|
|
142
|
+
def update_precommit_config(self, options: OptionsProtocol) -> bool: ...
|
|
143
|
+
|
|
144
|
+
def update_pyproject_config(self, options: OptionsProtocol) -> bool: ...
|
|
145
|
+
|
|
146
|
+
def get_temp_config_path(self) -> str | None: ...
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
@t.runtime_checkable
|
|
150
|
+
class SecurityServiceProtocol(t.Protocol):
|
|
151
|
+
def validate_file_safety(self, path: str | Path) -> bool: ...
|
|
152
|
+
|
|
153
|
+
def check_hardcoded_secrets(self, content: str) -> list[dict[str, t.Any]]: ...
|
|
154
|
+
|
|
155
|
+
def is_safe_subprocess_call(self, cmd: list[str]) -> bool: ...
|
|
156
|
+
|
|
157
|
+
def create_secure_command_env(self) -> dict[str, str]: ...
|
|
158
|
+
|
|
159
|
+
def mask_tokens(self, text: str) -> str: ...
|
|
160
|
+
|
|
161
|
+
def validate_token_format(self, token: str, token_type: str) -> bool: ...
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
@t.runtime_checkable
|
|
165
|
+
class InitializationServiceProtocol(t.Protocol):
|
|
166
|
+
def initialize_project(self, project_path: str | Path) -> bool: ...
|
|
167
|
+
|
|
168
|
+
def validate_project_structure(self) -> bool: ...
|
|
169
|
+
|
|
170
|
+
def setup_git_hooks(self) -> bool: ...
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
@t.runtime_checkable
|
|
174
|
+
class UnifiedConfigurationServiceProtocol(t.Protocol):
|
|
175
|
+
def merge_configurations(self) -> dict[str, t.Any]: ...
|
|
176
|
+
|
|
177
|
+
def validate_configuration(self, config: dict[str, t.Any]) -> bool: ...
|
|
178
|
+
|
|
179
|
+
def get_merged_config(self) -> dict[str, t.Any]: ...
|
|
145
180
|
|
|
146
181
|
|
|
147
182
|
@t.runtime_checkable
|
|
@@ -170,8 +205,6 @@ class PublishManager(t.Protocol):
|
|
|
170
205
|
|
|
171
206
|
@t.runtime_checkable
|
|
172
207
|
class ConfigMergeServiceProtocol(t.Protocol):
|
|
173
|
-
"""Protocol for smart configuration file merging."""
|
|
174
|
-
|
|
175
208
|
def smart_merge_pyproject(
|
|
176
209
|
self,
|
|
177
210
|
source_content: dict[str, t.Any],
|
|
@@ -216,107 +249,143 @@ class ConfigMergeServiceProtocol(t.Protocol):
|
|
|
216
249
|
|
|
217
250
|
@t.runtime_checkable
|
|
218
251
|
class HookLockManagerProtocol(t.Protocol):
|
|
219
|
-
|
|
252
|
+
def requires_lock(self, hook_name: str) -> bool: ...
|
|
253
|
+
|
|
254
|
+
async def acquire_hook_lock(
|
|
255
|
+
self, hook_name: str
|
|
256
|
+
) -> t.AsyncContextManager[None]: ...
|
|
257
|
+
|
|
258
|
+
def get_lock_stats(self) -> dict[str, t.Any]: ...
|
|
259
|
+
|
|
260
|
+
def add_hook_to_lock_list(self, hook_name: str) -> None: ...
|
|
261
|
+
|
|
262
|
+
def remove_hook_from_lock_list(self, hook_name: str) -> None: ...
|
|
263
|
+
|
|
264
|
+
def is_hook_currently_locked(self, hook_name: str) -> bool: ...
|
|
220
265
|
|
|
221
|
-
def
|
|
222
|
-
"""Check if a hook requires sequential execution.
|
|
266
|
+
def enable_global_lock(self, enabled: bool = True) -> None: ...
|
|
223
267
|
|
|
224
|
-
|
|
225
|
-
hook_name: Name of the hook to check
|
|
268
|
+
def is_global_lock_enabled(self) -> bool: ...
|
|
226
269
|
|
|
227
|
-
|
|
228
|
-
True if the hook requires a lock for sequential execution
|
|
229
|
-
"""
|
|
230
|
-
...
|
|
270
|
+
def get_global_lock_path(self, hook_name: str) -> Path: ...
|
|
231
271
|
|
|
232
|
-
|
|
233
|
-
"""Acquire a lock for the specified hook if it requires one.
|
|
272
|
+
def cleanup_stale_locks(self, max_age_hours: float = 2.0) -> int: ...
|
|
234
273
|
|
|
235
|
-
|
|
236
|
-
hook_name: Name of the hook to lock
|
|
274
|
+
def get_global_lock_stats(self) -> dict[str, t.Any]: ...
|
|
237
275
|
|
|
238
|
-
Returns:
|
|
239
|
-
Async context manager for lock acquisition
|
|
240
|
-
"""
|
|
241
|
-
...
|
|
242
276
|
|
|
243
|
-
|
|
244
|
-
|
|
277
|
+
@t.runtime_checkable
|
|
278
|
+
class DocumentationServiceProtocol(t.Protocol):
|
|
279
|
+
"""Service for automated documentation generation and maintenance."""
|
|
280
|
+
|
|
281
|
+
def extract_api_documentation(
|
|
282
|
+
self, source_paths: list[Path]
|
|
283
|
+
) -> dict[str, t.Any]: ...
|
|
284
|
+
|
|
285
|
+
def generate_documentation(
|
|
286
|
+
self, template_name: str, context: dict[str, t.Any]
|
|
287
|
+
) -> str: ...
|
|
245
288
|
|
|
246
|
-
|
|
247
|
-
Dict containing lock statistics per hook
|
|
248
|
-
"""
|
|
249
|
-
...
|
|
289
|
+
def validate_documentation(self, doc_paths: list[Path]) -> list[dict[str, str]]: ...
|
|
250
290
|
|
|
251
|
-
def
|
|
252
|
-
"""Add a hook to the list requiring sequential execution.
|
|
291
|
+
def update_documentation_index(self) -> bool: ...
|
|
253
292
|
|
|
254
|
-
|
|
255
|
-
hook_name: Name of the hook to add
|
|
256
|
-
"""
|
|
257
|
-
...
|
|
293
|
+
def get_documentation_coverage(self) -> dict[str, t.Any]: ...
|
|
258
294
|
|
|
259
|
-
def remove_hook_from_lock_list(self, hook_name: str) -> None:
|
|
260
|
-
"""Remove a hook from the list requiring sequential execution.
|
|
261
295
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
...
|
|
296
|
+
@t.runtime_checkable
|
|
297
|
+
class APIExtractorProtocol(t.Protocol):
|
|
298
|
+
"""Protocol for extracting API documentation from source code."""
|
|
266
299
|
|
|
267
|
-
def
|
|
268
|
-
"""Check if a hook is currently locked.
|
|
300
|
+
def extract_from_python_files(self, files: list[Path]) -> dict[str, t.Any]: ...
|
|
269
301
|
|
|
270
|
-
|
|
271
|
-
hook_name: Name of the hook to check
|
|
302
|
+
def extract_protocol_definitions(self, protocol_file: Path) -> dict[str, t.Any]: ...
|
|
272
303
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
...
|
|
304
|
+
def extract_service_interfaces(
|
|
305
|
+
self, service_files: list[Path]
|
|
306
|
+
) -> dict[str, t.Any]: ...
|
|
277
307
|
|
|
278
|
-
def
|
|
279
|
-
"""Enable or disable global lock functionality.
|
|
308
|
+
def extract_cli_commands(self, cli_files: list[Path]) -> dict[str, t.Any]: ...
|
|
280
309
|
|
|
281
|
-
|
|
282
|
-
enabled: Whether to enable global locking
|
|
283
|
-
"""
|
|
284
|
-
...
|
|
310
|
+
def extract_mcp_tools(self, mcp_files: list[Path]) -> dict[str, t.Any]: ...
|
|
285
311
|
|
|
286
|
-
def is_global_lock_enabled(self) -> bool:
|
|
287
|
-
"""Check if global lock functionality is enabled.
|
|
288
312
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
...
|
|
313
|
+
@t.runtime_checkable
|
|
314
|
+
class DocumentationGeneratorProtocol(t.Protocol):
|
|
315
|
+
"""Protocol for generating documentation from extracted data."""
|
|
293
316
|
|
|
294
|
-
def
|
|
295
|
-
"""Get the filesystem path for a hook's global lock file.
|
|
317
|
+
def generate_api_reference(self, api_data: dict[str, t.Any]) -> str: ...
|
|
296
318
|
|
|
297
|
-
|
|
298
|
-
|
|
319
|
+
def generate_user_guide(self, template_context: dict[str, t.Any]) -> str: ...
|
|
320
|
+
|
|
321
|
+
def generate_changelog_update(
|
|
322
|
+
self, version: str, changes: dict[str, t.Any]
|
|
323
|
+
) -> str: ...
|
|
324
|
+
|
|
325
|
+
def render_template(
|
|
326
|
+
self, template_path: Path, context: dict[str, t.Any]
|
|
327
|
+
) -> str: ...
|
|
328
|
+
|
|
329
|
+
def generate_cross_references(
|
|
330
|
+
self, api_data: dict[str, t.Any]
|
|
331
|
+
) -> dict[str, list[str]]: ...
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
@t.runtime_checkable
|
|
335
|
+
class DocumentationValidatorProtocol(t.Protocol):
|
|
336
|
+
"""Protocol for validating documentation quality and consistency."""
|
|
337
|
+
|
|
338
|
+
def validate_links(self, doc_content: str) -> list[dict[str, str]]: ...
|
|
339
|
+
|
|
340
|
+
def check_documentation_freshness(
|
|
341
|
+
self, api_data: dict[str, t.Any], doc_paths: list[Path]
|
|
342
|
+
) -> dict[str, t.Any]: ...
|
|
299
343
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
344
|
+
def validate_cross_references(
|
|
345
|
+
self, docs: dict[str, str]
|
|
346
|
+
) -> list[dict[str, str]]: ...
|
|
347
|
+
|
|
348
|
+
def calculate_coverage_metrics(
|
|
349
|
+
self, api_data: dict[str, t.Any], existing_docs: dict[str, str]
|
|
350
|
+
) -> dict[str, float]: ...
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
@t.runtime_checkable
|
|
354
|
+
class LoggerProtocol(t.Protocol):
|
|
355
|
+
"""Protocol for structured logging interface."""
|
|
356
|
+
|
|
357
|
+
def info(self, message: str, **kwargs: t.Any) -> None: ...
|
|
358
|
+
|
|
359
|
+
def warning(self, message: str, **kwargs: t.Any) -> None: ...
|
|
360
|
+
|
|
361
|
+
def error(self, message: str, **kwargs: t.Any) -> None: ...
|
|
362
|
+
|
|
363
|
+
def debug(self, message: str, **kwargs: t.Any) -> None: ...
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
@t.runtime_checkable
|
|
367
|
+
class ConfigManagerProtocol(t.Protocol):
|
|
368
|
+
"""Protocol for configuration management."""
|
|
369
|
+
|
|
370
|
+
def get(self, key: str, default: t.Any = None) -> t.Any: ...
|
|
371
|
+
|
|
372
|
+
def set(self, key: str, value: t.Any) -> None: ...
|
|
373
|
+
|
|
374
|
+
def save(self) -> bool: ...
|
|
375
|
+
|
|
376
|
+
def load(self) -> bool: ...
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
@t.runtime_checkable
|
|
380
|
+
class FileSystemServiceProtocol(t.Protocol):
|
|
381
|
+
"""Protocol for file system operations."""
|
|
304
382
|
|
|
305
|
-
def
|
|
306
|
-
"""Clean up stale lock files older than max_age_hours.
|
|
383
|
+
def read_file(self, path: str | Path) -> str: ...
|
|
307
384
|
|
|
308
|
-
|
|
309
|
-
max_age_hours: Maximum age in hours before a lock is considered stale
|
|
385
|
+
def write_file(self, path: str | Path, content: str) -> None: ...
|
|
310
386
|
|
|
311
|
-
|
|
312
|
-
Number of stale locks cleaned up
|
|
313
|
-
"""
|
|
314
|
-
...
|
|
387
|
+
def exists(self, path: str | Path) -> bool: ...
|
|
315
388
|
|
|
316
|
-
def
|
|
317
|
-
"""Get comprehensive statistics about global lock usage.
|
|
389
|
+
def mkdir(self, path: str | Path, parents: bool = False) -> None: ...
|
|
318
390
|
|
|
319
|
-
|
|
320
|
-
Dictionary containing global lock statistics and metrics
|
|
321
|
-
"""
|
|
322
|
-
...
|
|
391
|
+
def ensure_directory(self, path: str | Path) -> None: ...
|