Class AutobotService

java.lang.Object
com.shaft.mcp.AutobotService

@Service public class AutobotService extends Object
MCP adapter for SHAFT Autobot local agent routing.
  • Constructor Details

    • AutobotService

      public AutobotService()
      Creates the default Autobot MCP adapter.
  • Method Details

    • localAgentClients

      @Tool(name="autobot_local_agent_clients", description="lists local SHAFT Autobot CLI clients that do not require SHAFT cloud API keys") public List<AutobotLocalAgentClient> localAgentClients()
      Lists local agent CLI routes available to SHAFT Autobot.
      Returns:
      supported local clients
    • runLocalAgent

      @Tool(name="autobot_local_agent_run", description="routes Ask, Plan, or approved Agent requests to Codex, Claude Code, or Copilot CLI") public LocalAgentResponse runLocalAgent(String client, String mode, String prompt, String workingDirectory, List<String> command, Map<String,String> environment, int timeoutSeconds, boolean allowSourceMutation)
      Runs an Ask, Plan, or explicitly approved Agent prompt through a local CLI agent.
      Parameters:
      client - local agent client: CODEX, CLAUDE_CODE, or COPILOT_CLI
      mode - Autobot mode: ASK, PLAN, or AGENT
      prompt - prompt written to the local agent
      workingDirectory - optional workspace-relative working directory
      command - optional custom command and arguments
      environment - optional process environment variables; never echoed in the response
      timeoutSeconds - process timeout in seconds; defaults to 300 when non-positive
      allowSourceMutation - explicit approval required for AGENT mode
      Returns:
      safe local agent response
    • runProviderChat

      @Tool(name="autobot_provider_chat", description="routes Ask or Plan requests to configured SHAFT cloud providers without source mutation") public AutobotProviderChatResponse runProviderChat(String provider, String model, String mode, String prompt, String workingDirectory, int timeoutSeconds, boolean allowSourceMutation)
      Runs an Ask or Plan prompt through the configured SHAFT cloud provider.
      Parameters:
      provider - provider identifier: openai, anthropic, gemini, or github
      model - model identifier
      mode - assistant mode: ASK or PLAN
      prompt - prompt sent to the provider
      workingDirectory - optional workspace-relative working directory
      timeoutSeconds - provider timeout in seconds
      allowSourceMutation - ignored for cloud providers; source mutation is never allowed
      Returns:
      safe provider response
    • providerStatus

      @Tool(name="autobot_provider_status", description="reports the configured SHAFT cloud provider, model, API-key presence (never the value), and structured-output support for the IntelliJ readiness view") public AutobotProviderStatus providerStatus(String provider, String model)
      Reports the configured SHAFT cloud provider readiness for the IntelliJ status view.

      Never exposes the API key value; only whether the provider key is present in the environment.

      Parameters:
      provider - provider identifier: openai, anthropic, gemini, or github
      model - configured model, or blank when none is set
      Returns:
      read-only provider status
    • providerModels

      @Tool(name="autobot_provider_models", description="discovers model IDs from the configured SHAFT provider without exposing responses, headers, or credentials") public AutobotProviderModels providerModels(String provider, String model)
      Discovers configured provider model identifiers without returning provider response details.
      Parameters:
      provider - provider identifier
      model - selected provider model, or blank to use its configured default
      Returns:
      safe model-discovery state and identifiers