Class McpCompilerService

java.lang.Object
org.ek9lang.mcp.McpCompilerService

public final class McpCompilerService extends Object
Bridge between MCP server and the EK9 compiler. Manages workspace, bootstrap caching, and compilation.
  • Constructor Details

    • McpCompilerService

      McpCompilerService(OsSupport osSupport)
  • Method Details

    • initializeWorkspace

      public void initializeWorkspace(List<String> roots)
      Initialize workspace from root directories. Discovers all .ek9 files recursively and adds them to the workspace.
    • compile

      public boolean compile(CompilerFlags flags)
      Compile the workspace up to the specified phase.
      Returns:
      true if compilation succeeded without errors
    • collectDiagnostics

      public List<McpCompilerService.McpDiagnostic> collectDiagnostics(int errorLevel)
      Collect diagnostics from the last compilation.
    • hasErrors

      public boolean hasErrors()
    • getWorkspace

      public Workspace getWorkspace()
    • getLastCompiledProgram

      public SharedThreadContext<CompilableProgram> getLastCompiledProgram()