Class IndustrialProfile

java.lang.Object
neqsim.mcp.runners.IndustrialProfile

public final class IndustrialProfile extends Object
Industrial deployment profiles for the NeqSim MCP server.

Provides opinionated deployment modes that control which tools are exposed, whether human-approval gates are required for execution tools, and which validation level is enforced. Each profile is designed for a specific industry use case:

  • DESKTOP_ENGINEER — Full access for a single engineer working on studies.
  • STUDY_TEAM — Collaborative mode with session isolation and audit logging.
  • DIGITAL_TWIN — Read-heavy advisory mode for plant operations support.
  • ENTERPRISE — Restricted mode with approval gates, rate limiting, and minimal execution tools.
Version:
1.0
Author:
Even Solbraa
  • Field Details

    • GSON

      private static final com.google.gson.Gson GSON
    • activeMode

      private static volatile IndustrialProfile.DeploymentMode activeMode
      Active deployment mode.
    • autoValidationEnabled

      private static volatile boolean autoValidationEnabled
      Whether auto-validation is enforced on all calculation/execution tools.
    • approvalGateEnabled

      private static volatile boolean approvalGateEnabled
      Whether human approval is required for execution tools.
    • TOOL_CATEGORIES

      private static final Map<String, IndustrialProfile.ToolCategory> TOOL_CATEGORIES
      Tool-to-category classification for all MCP tools.
    • INDUSTRIAL_CORE

      private static final Set<String> INDUSTRIAL_CORE
      Tier 1 — Trusted core. Validated against NIST/experimental data, documented accuracy bounds, clear error behavior. This is the smallest credible surface for enterprise adoption.
    • ENGINEERING_ADVANCED

      private static final Set<String> ENGINEERING_ADVANCED
      Tier 2 — Engineering advanced. Tested against literature/industry cases, suitable for screening studies and engineering workflows. Available in DESKTOP_ENGINEER and STUDY_TEAM.
    • EXPERIMENTAL_TOOLS

      private static final Set<String> EXPERIMENTAL_TOOLS
      Tier 3 — Experimental/research. Functional but limited validation, or high-autonomy tools that are difficult to validate for industrial use. Available in DESKTOP_ENGINEER only.
  • Constructor Details

    • IndustrialProfile

      private IndustrialProfile()
      Private constructor — utility class.
  • Method Details

    • buildToolCategories

      private static Map<String, IndustrialProfile.ToolCategory> buildToolCategories()
      Builds the tool-to-category mapping.
      Returns:
      unmodifiable map of tool name to category
    • getActiveMode

      public static IndustrialProfile.DeploymentMode getActiveMode()
      Gets the current deployment mode.
      Returns:
      the active deployment mode
    • setActiveMode

      public static void setActiveMode(IndustrialProfile.DeploymentMode mode)
      Sets the deployment mode. This changes which tools are accessible and which governance controls are active.
      Parameters:
      mode - the deployment mode to activate
    • isToolAllowed

      public static boolean isToolAllowed(String toolName)
      Checks whether a tool is accessible in the current deployment mode.
      Parameters:
      toolName - the MCP tool name
      Returns:
      true if the tool is allowed
    • enforceAccess

      public static String enforceAccess(String toolName)
      Enforces tool access for the current deployment mode. Returns an error JSON string if the tool is blocked, or null if the tool is allowed. Call at the top of every @Tool method to prove governance is enforced in code, not just described in docs.
      Parameters:
      toolName - the MCP tool name being invoked
      Returns:
      null if allowed, or a JSON error string if blocked
    • getToolTier

      public static IndustrialProfile.ToolTier getToolTier(String toolName)
      Returns the tier classification for a tool.
      Parameters:
      toolName - the MCP tool name
      Returns:
      the tier, or null if the tool is not classified
    • requiresApproval

      public static boolean requiresApproval(String toolName)
      Checks whether a tool invocation requires human approval in the current mode.
      Parameters:
      toolName - the MCP tool name
      Returns:
      true if approval is required before execution
    • isAutoValidationEnabled

      public static boolean isAutoValidationEnabled()
      Returns whether auto-validation is enabled.
      Returns:
      true if every calculation/execution tool auto-validates results
    • getToolCategory

      public static IndustrialProfile.ToolCategory getToolCategory(String toolName)
      Gets the category for a specific tool.
      Parameters:
      toolName - the MCP tool name
      Returns:
      the tool category, or null if unknown
    • getIndustrialCore

      public static Set<String> getIndustrialCore()
      Returns the set of tools in the industrial core.
      Returns:
      unmodifiable set of tool names
    • getEngineeringAdvanced

      public static Set<String> getEngineeringAdvanced()
      Returns the set of Tier 2 (engineering advanced) tools.
      Returns:
      unmodifiable set of tool names
    • getExperimentalTools

      public static Set<String> getExperimentalTools()
      Returns the set of Tier 3 (experimental) tools.
      Returns:
      unmodifiable set of tool names
    • describeProfiles

      public static String describeProfiles()
      Returns a JSON description of all deployment modes and their tool access.
      Returns:
      JSON string describing all profiles
    • getProfileDescription

      private static String getProfileDescription(IndustrialProfile.DeploymentMode mode)
      Returns a human-readable description of a deployment mode.
      Parameters:
      mode - the deployment mode
      Returns:
      description string
    • countAllowedTools

      private static int countAllowedTools(IndustrialProfile.DeploymentMode mode)
      Counts the number of tools allowed in a given mode.
      Parameters:
      mode - the deployment mode
      Returns:
      count of allowed tools