Record Class LaunchSpec

java.lang.Object
java.lang.Record
com.shaft.commandline.session.LaunchSpec
Record Components:
baseCommand - the process command that launches a stdio MCP server
jarPath - the resolved shaft-mcp jar path (for diagnostics / session metadata)

public record LaunchSpec(List<String> baseCommand, String jarPath) extends Record
How to launch shaft-mcp. The baseCommand is a ready-to-run process command that starts an MCP server in its default (stdio) profile, e.g. [java, @<versionDir>/shaft-mcp.args] or, for a dev checkout, [java, -cp, <classpath>, com.shaft.mcp.ShaftMcpApplication].

To start the HTTP daemon, append --spring.profiles.active=http --server.port=<port> to baseCommand. The shaft-mcp jar has no Main-Class, so java -jar is never used.

  • Constructor Details

    • LaunchSpec

      public LaunchSpec(List<String> baseCommand, String jarPath)
      Creates an instance of a LaunchSpec record class.
      Parameters:
      baseCommand - the value for the baseCommand record component
      jarPath - the value for the jarPath record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • baseCommand

      public List<String> baseCommand()
      Returns the value of the baseCommand record component.
      Returns:
      the value of the baseCommand record component
    • jarPath

      public String jarPath()
      Returns the value of the jarPath record component.
      Returns:
      the value of the jarPath record component