Class HealerService
java.lang.Object
com.shaft.mcp.HealerService
MCP healer loop for guarded SHAFT/Selenium reruns and review-only repair suggestions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunFailedPlaywrightTest(String repositoryRoot, List<String> testCommand, String outputDirectory, int maxAttempts, boolean includeScreenshots, boolean includePageSnapshots, List<String> allowedSourcePaths, boolean networkValidationApproved, boolean useConfiguredAi, boolean allowLocalAi, boolean allowRemoteAi, String driverVariableName) Reruns a failing SHAFT Playwright test and returns evidence-backed repair suggestions.runFailedTest(String repositoryRoot, List<String> testCommand, String outputDirectory, int maxAttempts, boolean includeScreenshots, boolean includePageSnapshots, List<String> allowedSourcePaths, boolean networkValidationApproved, boolean useConfiguredAi, boolean allowLocalAi, boolean allowRemoteAi, String driverVariableName) Reruns a failing SHAFT/Selenium test and returns evidence-backed repair suggestions.
-
Constructor Details
-
HealerService
public HealerService()Creates the default local MCP healer service.
-
-
Method Details
-
runFailedTest
@Tool(name="healer_run_failed_test", description="reruns a failing SHAFT/Selenium test, analyzes fresh Allure evidence, and returns review-only fixes plus agent replay guidance") public McpHealerRunResult runFailedTest(String repositoryRoot, List<String> testCommand, String outputDirectory, int maxAttempts, boolean includeScreenshots, boolean includePageSnapshots, List<String> allowedSourcePaths, boolean networkValidationApproved, boolean useConfiguredAi, boolean allowLocalAi, boolean allowRemoteAi, String driverVariableName) Reruns a failing SHAFT/Selenium test and returns evidence-backed repair suggestions.- Parameters:
repositoryRoot- Git/Maven project root inside the MCP workspacetestCommand- tokenized Maven command for the failing testoutputDirectory- healer and Doctor output directory inside the MCP workspacemaxAttempts- maximum rerun attempts, clamped to 1..5includeScreenshots- explicit approval to retain screenshot evidenceincludePageSnapshots- explicit approval to retain page-source evidenceallowedSourcePaths- optional repository-relative source paths approved for provider evidencenetworkValidationApproved- whether Maven may run without offline modeuseConfiguredAi- whether to request configured SHAFT provider snippets in addition to agent handoffallowLocalAi- explicit local provider consent when configured AI is requestedallowRemoteAi- explicit remote provider consent when configured AI is requesteddriverVariableName- Java driver variable name used in snippets- Returns:
- guarded rerun attempts plus review-only remediation
-
runFailedPlaywrightTest
@Tool(name="playwright_healer_run_failed_test", description="reruns a failing SHAFT Playwright test, analyzes fresh Allure evidence, and returns review-only fixes plus agent replay guidance") public McpHealerRunResult runFailedPlaywrightTest(String repositoryRoot, List<String> testCommand, String outputDirectory, int maxAttempts, boolean includeScreenshots, boolean includePageSnapshots, List<String> allowedSourcePaths, boolean networkValidationApproved, boolean useConfiguredAi, boolean allowLocalAi, boolean allowRemoteAi, String driverVariableName) Reruns a failing SHAFT Playwright test and returns evidence-backed repair suggestions.- Parameters:
repositoryRoot- Git/Maven project root inside the MCP workspacetestCommand- tokenized Maven command for the failing testoutputDirectory- healer and Doctor output directory inside the MCP workspacemaxAttempts- maximum rerun attempts, clamped to 1..5includeScreenshots- explicit approval to retain screenshot evidenceincludePageSnapshots- explicit approval to retain page-source evidenceallowedSourcePaths- optional repository-relative source paths approved for provider evidencenetworkValidationApproved- whether Maven may run without offline modeuseConfiguredAi- whether to request configured SHAFT provider snippets in addition to agent handoffallowLocalAi- explicit local provider consent when configured AI is requestedallowRemoteAi- explicit remote provider consent when configured AI is requesteddriverVariableName- Java driver variable name used in snippets- Returns:
- guarded rerun attempts plus review-only remediation
-