Class McpLauncherLocator

java.lang.Object
com.shaft.commandline.session.McpLauncherLocator

public final class McpLauncherLocator extends Object
Resolves a LaunchSpec for shaft-mcp by probing, in order: an explicit SHAFT_MCP_JAR override, the installer's per-user versions directory, and finally a dev-checkout fallback that reconstructs a classpath for the thin shaft-mcp target jar.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a locator that uses the real process environment and real per-OS/dev roots.
  • Method Summary

    Modifier and Type
    Method
    Description
    Resolves how to launch shaft-mcp, trying the env override, then the installer versions directory, then the dev-checkout fallback.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • McpLauncherLocator

      public McpLauncherLocator()
      Creates a locator that uses the real process environment and real per-OS/dev roots.
  • Method Details

    • locate

      public LaunchSpec locate()
      Resolves how to launch shaft-mcp, trying the env override, then the installer versions directory, then the dev-checkout fallback.
      Returns:
      a ready-to-run LaunchSpec
      Throws:
      McpException - if no shaft-mcp installation or dev build could be found