namespace io.github.hatayama.uLoopMCP { /// /// Compile error or warning information /// public class CompileIssue { public string Message { get; set; } public string File { get; set; } public int Line { get; set; } public CompileIssue(string message, string file, int line) { Message = message; File = file; Line = line; } public CompileIssue() { } } /// /// Response schema for Compile command /// Provides type-safe response structure /// public class CompileResponse : BaseToolResponse { /// /// Whether compilation was successful. /// Null is used when the tool cannot reliably determine the result yet (e.g., forced recompile/domain reload), /// to avoid misleading clients into treating "0 errors" as a confirmed success. /// public bool? Success { get; set; } /// /// Number of compilation errors. /// Null is used when the tool intentionally does not provide details (e.g., forced recompile), /// because Unity reports errors/warnings after domain reload and clients should fetch logs later. /// public int? ErrorCount { get; set; } /// /// Number of compilation warnings. /// Null is used when the tool intentionally does not provide details (e.g., forced recompile), /// because Unity reports errors/warnings after domain reload and clients should fetch logs later. /// public int? WarningCount { get; set; } /// /// Compilation errors. /// Null is used when the tool intentionally does not provide details (e.g., forced recompile), /// because Unity reports errors/warnings after domain reload and clients should fetch logs later. /// public CompileIssue[] Errors { get; set; } /// /// Compilation warnings. /// Null is used when the tool intentionally does not provide details (e.g., forced recompile), /// because Unity reports errors/warnings after domain reload and clients should fetch logs later. /// public CompileIssue[] Warnings { get; set; } /// /// Optional message for additional information /// public string Message { get; set; } /// /// Unity project root path (from Application.dataPath). /// Set only when WaitForDomainReload=true so that TS/CLI can locate lock files /// in the correct project even when connected to a remote Unity instance. /// public string ProjectRoot { get; set; } /// /// Create a new CompileResponse /// public CompileResponse( bool? success, int? errorCount, int? warningCount, CompileIssue[] errors, CompileIssue[] warnings, string message = null ) { Success = success; ErrorCount = errorCount; WarningCount = warningCount; Errors = errors; Warnings = warnings; Message = message; } /// /// Parameterless constructor for JSON deserialization /// public CompileResponse() { } } }