Class PlannerService
java.lang.Object
com.shaft.mcp.PlannerService
MCP planner: crawls the active SHAFT browser session breadth-first and writes deterministic,
review-first Markdown test plans per discovered flow. No AI calls are made; locator evidence and
ranking reuse the same primitives as
BrowserService.openForIntent(String, String, int, int).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexploreAndPlan(String targetUrl, String goal, int maxDepth, int maxPages) Crawls the active SHAFT browser session breadth-first fromtargetUrl, discovering forms, primary navigation actions, and same-origin links, and writes one Markdown test plan per discovered flow intospecs/inside the MCP workspace.
-
Constructor Details
-
PlannerService
public PlannerService()Creates the default local MCP planner service.
-
-
Method Details
-
exploreAndPlan
@Tool(name="test_plan_explore", description="crawls the active SHAFT browser session breadth-first from a URL, discovering forms, primary navigation actions, and same-origin links, and writes one deterministic Markdown test plan per discovered flow into specs/ (no AI calls)") public McpTestPlanExploreResult exploreAndPlan(String targetUrl, String goal, int maxDepth, int maxPages) Crawls the active SHAFT browser session breadth-first fromtargetUrl, discovering forms, primary navigation actions, and same-origin links, and writes one Markdown test plan per discovered flow intospecs/inside the MCP workspace.- Parameters:
targetUrl- absolute URL to start the crawl fromgoal- optional natural-language exploration goal used only to order the written plans (flows whose text matches the goal are written first); never sent to an AI providermaxDepth- breadth-first depth fromtargetUrl, clamped to 1..3maxPages- maximum number of pages visited, clamped to 1..50 (default 10)- Returns:
- pages visited, the plan files written, and any bounded-crawl warnings
-