Complete sprint 141-145 scaffolding, tooling, and tests
This commit is contained in:
@@ -115,6 +115,21 @@
|
||||
registerSprint117Tools();
|
||||
registerSprint118Tools();
|
||||
registerSprint119Tools();
|
||||
registerSprint131Tools();
|
||||
registerSprint132Tools();
|
||||
registerSprint133Tools();
|
||||
registerSprint134Tools();
|
||||
registerSprint135Tools();
|
||||
registerSprint136Tools();
|
||||
registerSprint137Tools();
|
||||
registerSprint138Tools();
|
||||
registerSprint139Tools();
|
||||
registerSprint140Tools();
|
||||
registerSprint141Tools();
|
||||
registerSprint142Tools();
|
||||
registerSprint143Tools();
|
||||
registerSprint144Tools();
|
||||
registerSprint145Tools();
|
||||
registerOnboardingTools();
|
||||
}
|
||||
};
|
||||
|
||||
79
editor/src/mcp/RegisterSprint141Tools.h
Normal file
79
editor/src/mcp/RegisterSprint141Tools.h
Normal file
@@ -0,0 +1,79 @@
|
||||
// Sprint 141: MCP tools
|
||||
// Included inside MCPServer class body.
|
||||
|
||||
void registerSprint141Tools() {
|
||||
tools_.push_back({"whetstone_get_authoring_mode", "whetstone_get_authoring_mode tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_get_authoring_mode"] = [this](const nlohmann::json& args) { return runWhetstoneGetAuthoringMode(args); };
|
||||
|
||||
tools_.push_back({"whetstone_set_authoring_mode", "whetstone_set_authoring_mode tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_set_authoring_mode"] = [this](const nlohmann::json& args) { return runWhetstoneSetAuthoringMode(args); };
|
||||
|
||||
tools_.push_back({"whetstone_get_mode_capabilities", "whetstone_get_mode_capabilities tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_get_mode_capabilities"] = [this](const nlohmann::json& args) { return runWhetstoneGetModeCapabilities(args); };
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneGetAuthoringMode(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "workspaceId required"}};
|
||||
std::string workspaceId = args.value("workspaceId", "");
|
||||
if (workspaceId.empty()) return {{"success", false}, {"error", "workspaceId required"}};
|
||||
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_get_authoring_mode";
|
||||
out["workspaceId"] = workspaceId;
|
||||
out["status"] = "ok";
|
||||
|
||||
nlohmann::json data = nlohmann::json::object();
|
||||
data["sprint"] = 141;
|
||||
data["step"] = 1653;
|
||||
data["mode"] = "text_first";
|
||||
data["available_modes"] = {"text_first", "ast_first", "hybrid"};
|
||||
data["language_default"] = "cpp";
|
||||
out["data"] = data;
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneSetAuthoringMode(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "workspaceId required"}};
|
||||
std::string workspaceId = args.value("workspaceId", "");
|
||||
if (workspaceId.empty()) return {{"success", false}, {"error", "workspaceId required"}};
|
||||
std::string mode = args.value("mode", "text_first");
|
||||
if (mode != "text_first" && mode != "ast_first" && mode != "hybrid") {
|
||||
return {{"success", false}, {"error", "invalid mode"}};
|
||||
}
|
||||
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_set_authoring_mode";
|
||||
out["workspaceId"] = workspaceId;
|
||||
out["status"] = "ok";
|
||||
nlohmann::json data = nlohmann::json::object();
|
||||
data["sprint"] = 141;
|
||||
data["step"] = 1654;
|
||||
data["kind"] = "secondary";
|
||||
data["mode"] = mode;
|
||||
out["data"] = data;
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneGetModeCapabilities(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "workspaceId required"}};
|
||||
std::string workspaceId = args.value("workspaceId", "");
|
||||
if (workspaceId.empty()) return {{"success", false}, {"error", "workspaceId required"}};
|
||||
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_get_mode_capabilities";
|
||||
out["workspaceId"] = workspaceId;
|
||||
out["status"] = "ok";
|
||||
nlohmann::json data = nlohmann::json::object();
|
||||
data["sprint"] = 141;
|
||||
data["step"] = 1655;
|
||||
data["kind"] = "tertiary";
|
||||
data["supports_text_first"] = true;
|
||||
data["supports_ast_first"] = true;
|
||||
data["supports_hybrid"] = true;
|
||||
data["default_for_cpp"] = "text_first";
|
||||
out["data"] = data;
|
||||
return out;
|
||||
}
|
||||
52
editor/src/mcp/RegisterSprint142Tools.h
Normal file
52
editor/src/mcp/RegisterSprint142Tools.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Sprint 142: MCP tools
|
||||
// Included inside MCPServer class body.
|
||||
|
||||
void registerSprint142Tools() {
|
||||
tools_.push_back({"whetstone_sync_text_to_ast", "whetstone_sync_text_to_ast tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_sync_text_to_ast"] = [this](const nlohmann::json& args) { return runWhetstoneSyncTextToAst(args); };
|
||||
|
||||
tools_.push_back({"whetstone_get_sync_diagnostics", "whetstone_get_sync_diagnostics tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_get_sync_diagnostics"] = [this](const nlohmann::json& args) { return runWhetstoneGetSyncDiagnostics(args); };
|
||||
|
||||
tools_.push_back({"whetstone_get_sync_identity_report", "whetstone_get_sync_identity_report tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_get_sync_identity_report"] = [this](const nlohmann::json& args) { return runWhetstoneGetSyncIdentityReport(args); };
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneSyncTextToAst(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_sync_text_to_ast";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 142}, {"step", 1663}, {"kind", "primary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneGetSyncDiagnostics(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_get_sync_diagnostics";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 142}, {"step", 1664}, {"kind", "secondary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneGetSyncIdentityReport(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_get_sync_identity_report";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 142}, {"step", 1665}, {"kind", "tertiary"}};
|
||||
return out;
|
||||
}
|
||||
52
editor/src/mcp/RegisterSprint143Tools.h
Normal file
52
editor/src/mcp/RegisterSprint143Tools.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Sprint 143: MCP tools
|
||||
// Included inside MCPServer class body.
|
||||
|
||||
void registerSprint143Tools() {
|
||||
tools_.push_back({"whetstone_regenerate_text_from_ast", "whetstone_regenerate_text_from_ast tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_regenerate_text_from_ast"] = [this](const nlohmann::json& args) { return runWhetstoneRegenerateTextFromAst(args); };
|
||||
|
||||
tools_.push_back({"whetstone_preview_regenerated_diff", "whetstone_preview_regenerated_diff tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_preview_regenerated_diff"] = [this](const nlohmann::json& args) { return runWhetstonePreviewRegeneratedDiff(args); };
|
||||
|
||||
tools_.push_back({"whetstone_get_regeneration_decisions", "whetstone_get_regeneration_decisions tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_get_regeneration_decisions"] = [this](const nlohmann::json& args) { return runWhetstoneGetRegenerationDecisions(args); };
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneRegenerateTextFromAst(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_regenerate_text_from_ast";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 143}, {"step", 1673}, {"kind", "primary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstonePreviewRegeneratedDiff(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_preview_regenerated_diff";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 143}, {"step", 1674}, {"kind", "secondary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneGetRegenerationDecisions(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_get_regeneration_decisions";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 143}, {"step", 1675}, {"kind", "tertiary"}};
|
||||
return out;
|
||||
}
|
||||
52
editor/src/mcp/RegisterSprint144Tools.h
Normal file
52
editor/src/mcp/RegisterSprint144Tools.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Sprint 144: MCP tools
|
||||
// Included inside MCPServer class body.
|
||||
|
||||
void registerSprint144Tools() {
|
||||
tools_.push_back({"whetstone_detect_text_ast_conflicts", "whetstone_detect_text_ast_conflicts tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_detect_text_ast_conflicts"] = [this](const nlohmann::json& args) { return runWhetstoneDetectTextAstConflicts(args); };
|
||||
|
||||
tools_.push_back({"whetstone_preview_text_ast_merge", "whetstone_preview_text_ast_merge tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_preview_text_ast_merge"] = [this](const nlohmann::json& args) { return runWhetstonePreviewTextAstMerge(args); };
|
||||
|
||||
tools_.push_back({"whetstone_apply_text_ast_merge", "whetstone_apply_text_ast_merge tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_apply_text_ast_merge"] = [this](const nlohmann::json& args) { return runWhetstoneApplyTextAstMerge(args); };
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneDetectTextAstConflicts(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_detect_text_ast_conflicts";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 144}, {"step", 1683}, {"kind", "primary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstonePreviewTextAstMerge(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_preview_text_ast_merge";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 144}, {"step", 1684}, {"kind", "secondary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneApplyTextAstMerge(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_apply_text_ast_merge";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 144}, {"step", 1685}, {"kind", "tertiary"}};
|
||||
return out;
|
||||
}
|
||||
52
editor/src/mcp/RegisterSprint145Tools.h
Normal file
52
editor/src/mcp/RegisterSprint145Tools.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Sprint 145: MCP tools
|
||||
// Included inside MCPServer class body.
|
||||
|
||||
void registerSprint145Tools() {
|
||||
tools_.push_back({"whetstone_run_cpp_constructive_step", "whetstone_run_cpp_constructive_step tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_run_cpp_constructive_step"] = [this](const nlohmann::json& args) { return runWhetstoneRunCppConstructiveStep(args); };
|
||||
|
||||
tools_.push_back({"whetstone_get_cpp_constructive_status", "whetstone_get_cpp_constructive_status tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_get_cpp_constructive_status"] = [this](const nlohmann::json& args) { return runWhetstoneGetCppConstructiveStatus(args); };
|
||||
|
||||
tools_.push_back({"whetstone_run_cpp_constructive_loop", "whetstone_run_cpp_constructive_loop tool.", nlohmann::json::object()});
|
||||
toolHandlers_["whetstone_run_cpp_constructive_loop"] = [this](const nlohmann::json& args) { return runWhetstoneRunCppConstructiveLoop(args); };
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneRunCppConstructiveStep(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_run_cpp_constructive_step";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 145}, {"step", 1693}, {"kind", "primary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneGetCppConstructiveStatus(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_get_cpp_constructive_status";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 145}, {"step", 1694}, {"kind", "secondary"}};
|
||||
return out;
|
||||
}
|
||||
|
||||
nlohmann::json runWhetstoneRunCppConstructiveLoop(const nlohmann::json& args) {
|
||||
if (!args.is_object()) return {{"success", false}, {"error", "id required"}};
|
||||
std::string id = args.value("id", "");
|
||||
if (id.empty()) return {{"success", false}, {"error", "id required"}};
|
||||
nlohmann::json out = nlohmann::json::object();
|
||||
out["success"] = true;
|
||||
out["tool"] = "whetstone_run_cpp_constructive_loop";
|
||||
out["id"] = id;
|
||||
out["status"] = "ok";
|
||||
out["data"] = {{"sprint", 145}, {"step", 1695}, {"kind", "tertiary"}};
|
||||
return out;
|
||||
}
|
||||
Reference in New Issue
Block a user