Class PlannerService

java.lang.Object
com.shaft.mcp.PlannerService

@Service public class PlannerService extends Object
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
    Constructor
    Description
    Creates the default local MCP planner service.
  • Method Summary

    Modifier and Type
    Method
    Description
    exploreAndPlan(String targetUrl, String goal, int maxDepth, int maxPages)
    Crawls the active SHAFT browser session breadth-first from targetUrl, discovering forms, primary navigation actions, and same-origin links, and writes one Markdown test plan per discovered flow into specs/ inside the MCP workspace.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 from targetUrl, discovering forms, primary navigation actions, and same-origin links, and writes one Markdown test plan per discovered flow into specs/ inside the MCP workspace.
      Parameters:
      targetUrl - absolute URL to start the crawl from
      goal - 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 provider
      maxDepth - breadth-first depth from targetUrl, clamped to 1..3
      maxPages - maximum number of pages visited, clamped to 1..50 (default 10)
      Returns:
      pages visited, the plan files written, and any bounded-crawl warnings